1.0.21 • Published 3 years ago
@hypi/hypi-client-nodejs v1.0.21
Hypi NodeJS Client
A NodeJS library to interface with Hypi low-code platform
Setup
npm -i @hypi/hypi-client-nodejsUsage
Instantiate
const HypiClient = require("@hypi/hypi-client-nodejs")
const hypiClient = new HypiClient.HypiClient('foo.apps.hypi.app')
// changing app
hypiClient.setDomain('bar.apps.hypi.app')Authentication
hypiClient.login('email@organization.org', 'secret-password')The function createAccount accepts parameters of email, password, firstName, lastName, otherJsonObj
The firstName and lastName should be null if not provided
The otherJsonObj should be empty object if not provided or any more additional fields that the Hypi core type Account accepts.
The following examples demonstrate such:
hypiClient.createAccount(
"email@organization.com", "secret-password", null, null, {}
)
hypiClient.createAccount(
"email@organization.com", "secret-password", "firstName", "lastName", {}
)
hypiClient.createAccount(
"email@organization.com", "secret-password", "firstName", "lastName", {
"owner": {
"dob": "2008-09-15T15:53:00"
}
}
)CRUD APIs
hypiClient.upsert({
Pair: {
hypi: {
id: 'pairId'
},
key: 'k',
value: 'v'
}
})
hypiClient.get('Pair', 'pairId', `{
... on Pair {
hypi {
id
}
key
value
}
}`)
hypiClient.find('Pair', 'hypi.id=\'pairId\'', `{
... on Pair {
hypi {
id
}
key
value
}
}`)
hypiClient.trash('Pair', 'hypi.id = \'pairId\'')
hypiClient.untrash('Pair', 'hypi.id = \'pairId\'')
hypiClient.delete('Pair', 'hypi.id = \'pairId\'')Mutation/Query
hypiClient.getGqlClient().query(query, variables)
hypiClient.getGqlClient().mutate(mutation, variables)1.0.21
3 years ago
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.20
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago