@constructive-sdk/cli 0.13.4 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/cli/commands/app-membership.js +22 -0
- package/admin/cli/commands/membership-type.js +44 -0
- package/{auth/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
- package/admin/cli/commands/org-member-profile.js +392 -0
- package/admin/cli/commands/org-membership.js +44 -0
- package/admin/cli/commands.js +7 -5
- package/admin/cli/executor.d.ts +3 -2
- package/admin/orm/index.d.ts +6 -4
- package/admin/orm/index.js +6 -4
- package/admin/orm/input-types.d.ts +503 -295
- package/admin/orm/models/index.d.ts +3 -2
- package/admin/orm/models/index.js +7 -5
- package/admin/orm/models/orgMemberProfile.d.ts +56 -0
- package/{auth/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +26 -26
- package/{esm/auth/cli/commands/one-time-token.d.ts → auth/cli/commands/create-api-key.d.ts} +1 -1
- package/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
- package/auth/cli/commands/disconnect-account.d.ts +8 -0
- package/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
- package/auth/cli/commands/provision-new-user.d.ts +8 -0
- package/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
- package/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/auth/cli/commands/request-cross-origin-token.js +36 -0
- package/auth/cli/commands/require-step-up.d.ts +8 -0
- package/auth/cli/commands/require-step-up.js +30 -0
- package/auth/cli/commands/{one-time-token.d.ts → revoke-api-key.d.ts} +1 -1
- package/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
- package/auth/cli/commands/revoke-session.d.ts +8 -0
- package/auth/cli/commands/revoke-session.js +36 -0
- package/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/auth/cli/commands/sign-in-cross-origin.js +36 -0
- package/auth/cli/commands/user-connected-account.d.ts +8 -0
- package/auth/cli/commands/user-connected-account.js +176 -0
- package/auth/cli/commands.js +23 -11
- package/auth/cli/executor.d.ts +44 -14
- package/auth/orm/index.d.ts +45 -15
- package/auth/orm/index.js +2 -2
- package/auth/orm/input-types.d.ts +186 -251
- package/auth/orm/input-types.js +0 -1
- package/auth/orm/models/index.d.ts +1 -1
- package/auth/orm/models/index.js +3 -3
- package/auth/orm/models/userConnectedAccount.d.ts +38 -0
- package/auth/orm/models/userConnectedAccount.js +76 -0
- package/auth/orm/mutation/index.d.ts +56 -16
- package/auth/orm/mutation/index.js +78 -18
- package/auth/orm/query/index.d.ts +12 -4
- package/auth/orm/query/index.js +19 -7
- package/esm/admin/cli/commands/app-membership.js +22 -0
- package/esm/admin/cli/commands/membership-type.js +44 -0
- package/esm/{public/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
- package/esm/admin/cli/commands/org-member-profile.js +390 -0
- package/esm/admin/cli/commands/org-membership.js +44 -0
- package/esm/admin/cli/commands.js +7 -5
- package/esm/admin/cli/executor.d.ts +3 -2
- package/esm/admin/orm/index.d.ts +6 -4
- package/esm/admin/orm/index.js +6 -4
- package/esm/admin/orm/input-types.d.ts +503 -295
- package/esm/admin/orm/models/index.d.ts +3 -2
- package/esm/admin/orm/models/index.js +3 -2
- package/esm/admin/orm/models/orgMemberProfile.d.ts +56 -0
- package/esm/{public/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +24 -24
- package/esm/auth/cli/commands/create-api-key.d.ts +8 -0
- package/esm/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
- package/esm/auth/cli/commands/disconnect-account.d.ts +8 -0
- package/esm/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
- package/esm/auth/cli/commands/provision-new-user.d.ts +8 -0
- package/esm/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
- package/esm/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/esm/auth/cli/commands/request-cross-origin-token.js +34 -0
- package/esm/auth/cli/commands/require-step-up.d.ts +8 -0
- package/esm/auth/cli/commands/require-step-up.js +28 -0
- package/esm/auth/cli/commands/revoke-api-key.d.ts +8 -0
- package/esm/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
- package/esm/auth/cli/commands/revoke-session.d.ts +8 -0
- package/esm/auth/cli/commands/revoke-session.js +34 -0
- package/esm/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/esm/auth/cli/commands/sign-in-cross-origin.js +34 -0
- package/esm/auth/cli/commands/user-connected-account.d.ts +8 -0
- package/esm/auth/cli/commands/user-connected-account.js +174 -0
- package/esm/auth/cli/commands.js +23 -11
- package/esm/auth/cli/executor.d.ts +44 -14
- package/esm/auth/orm/index.d.ts +45 -15
- package/esm/auth/orm/index.js +2 -2
- package/esm/auth/orm/input-types.d.ts +186 -251
- package/esm/auth/orm/input-types.js +0 -1
- package/esm/auth/orm/models/index.d.ts +1 -1
- package/esm/auth/orm/models/index.js +1 -1
- package/esm/auth/orm/models/userConnectedAccount.d.ts +38 -0
- package/esm/auth/orm/models/userConnectedAccount.js +72 -0
- package/esm/auth/orm/mutation/index.d.ts +56 -16
- package/esm/auth/orm/mutation/index.js +78 -18
- package/esm/auth/orm/query/index.d.ts +12 -4
- package/esm/auth/orm/query/index.js +19 -7
- package/esm/public/cli/commands/app-membership.js +22 -0
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/esm/public/cli/commands/create-api-key.d.ts +8 -0
- package/esm/public/cli/commands/create-api-key.js +34 -0
- package/{public/cli/commands/connected-account.d.ts → esm/public/cli/commands/devices-module.d.ts} +1 -1
- package/esm/public/cli/commands/{connected-account.js → devices-module.js} +101 -87
- package/esm/public/cli/commands/disconnect-account.d.ts +8 -0
- package/esm/public/cli/commands/disconnect-account.js +34 -0
- package/esm/public/cli/commands/{table-template-module.d.ts → entity-type-provision.d.ts} +1 -1
- package/esm/public/cli/commands/entity-type-provision.js +554 -0
- package/esm/public/cli/commands/membership-type.js +44 -0
- package/esm/public/cli/commands/memberships-module.js +22 -0
- package/esm/{auth/cli/commands/connected-account.d.ts → public/cli/commands/org-member-profile.d.ts} +1 -1
- package/esm/public/cli/commands/org-member-profile.js +390 -0
- package/esm/public/cli/commands/org-membership.js +44 -0
- package/esm/public/cli/commands/provision-new-user.d.ts +8 -0
- package/esm/public/cli/commands/provision-new-user.js +34 -0
- package/esm/public/cli/commands/provision-spatial-relation.d.ts +8 -0
- package/esm/public/cli/commands/provision-spatial-relation.js +34 -0
- package/esm/public/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/esm/public/cli/commands/request-cross-origin-token.js +34 -0
- package/esm/public/cli/commands/require-step-up.d.ts +8 -0
- package/esm/public/cli/commands/require-step-up.js +28 -0
- package/{auth/cli/commands/sign-in-one-time-token.d.ts → esm/public/cli/commands/resolve-blueprint-field.d.ts} +1 -1
- package/esm/public/cli/commands/resolve-blueprint-field.js +38 -0
- package/esm/public/cli/commands/revoke-api-key.d.ts +8 -0
- package/esm/public/cli/commands/revoke-api-key.js +34 -0
- package/esm/public/cli/commands/revoke-session.d.ts +8 -0
- package/esm/public/cli/commands/revoke-session.js +34 -0
- package/esm/public/cli/commands/session-secrets-module.d.ts +8 -0
- package/esm/{auth/cli/commands/connected-account.js → public/cli/commands/session-secrets-module.js} +82 -90
- package/esm/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/esm/public/cli/commands/sign-in-cross-origin.js +34 -0
- package/esm/public/cli/commands/spatial-relation.d.ts +8 -0
- package/esm/public/cli/commands/spatial-relation.js +472 -0
- package/esm/public/cli/commands/user-auth-module.js +24 -24
- package/esm/public/cli/commands/user-connected-account.d.ts +8 -0
- package/esm/public/cli/commands/user-connected-account.js +174 -0
- package/esm/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
- package/esm/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
- package/esm/public/cli/commands.js +41 -15
- package/esm/public/cli/executor.d.ts +61 -16
- package/esm/public/orm/index.d.ts +69 -19
- package/esm/public/orm/index.js +16 -6
- package/esm/public/orm/input-types.d.ts +2047 -640
- package/esm/public/orm/input-types.js +15 -6
- package/esm/public/orm/models/devicesModule.d.ts +56 -0
- package/esm/public/orm/models/devicesModule.js +96 -0
- package/esm/public/orm/models/entityTypeProvision.d.ts +56 -0
- package/esm/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +24 -24
- package/esm/public/orm/models/index.d.ts +8 -3
- package/esm/public/orm/models/index.js +8 -3
- package/esm/public/orm/models/orgMemberProfile.d.ts +56 -0
- package/esm/{auth/orm/models/connectedAccount.js → public/orm/models/orgMemberProfile.js} +24 -24
- package/esm/public/orm/models/sessionSecretsModule.d.ts +56 -0
- package/esm/public/orm/models/sessionSecretsModule.js +96 -0
- package/esm/public/orm/models/spatialRelation.d.ts +56 -0
- package/esm/public/orm/models/spatialRelation.js +96 -0
- package/esm/public/orm/models/userConnectedAccount.d.ts +38 -0
- package/esm/public/orm/models/userConnectedAccount.js +72 -0
- package/esm/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
- package/esm/public/orm/models/webauthnCredentialsModule.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +72 -20
- package/esm/public/orm/mutation/index.js +96 -24
- package/esm/public/orm/query/index.d.ts +24 -2
- package/esm/public/orm/query/index.js +36 -4
- package/package.json +5 -5
- package/public/cli/commands/app-membership.js +22 -0
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/public/cli/commands/create-api-key.d.ts +8 -0
- package/public/cli/commands/create-api-key.js +36 -0
- package/public/cli/commands/devices-module.d.ts +8 -0
- package/{auth/cli/commands/connected-account.js → public/cli/commands/devices-module.js} +101 -87
- package/public/cli/commands/disconnect-account.d.ts +8 -0
- package/public/cli/commands/disconnect-account.js +36 -0
- package/public/cli/commands/entity-type-provision.d.ts +8 -0
- package/public/cli/commands/entity-type-provision.js +556 -0
- package/public/cli/commands/membership-type.js +44 -0
- package/public/cli/commands/memberships-module.js +22 -0
- package/public/cli/commands/org-member-profile.d.ts +8 -0
- package/public/cli/commands/org-member-profile.js +392 -0
- package/public/cli/commands/org-membership.js +44 -0
- package/public/cli/commands/provision-new-user.d.ts +8 -0
- package/public/cli/commands/provision-new-user.js +36 -0
- package/public/cli/commands/provision-spatial-relation.d.ts +8 -0
- package/public/cli/commands/provision-spatial-relation.js +36 -0
- package/public/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/public/cli/commands/request-cross-origin-token.js +36 -0
- package/public/cli/commands/require-step-up.d.ts +8 -0
- package/public/cli/commands/require-step-up.js +30 -0
- package/public/cli/commands/resolve-blueprint-field.d.ts +8 -0
- package/public/cli/commands/resolve-blueprint-field.js +40 -0
- package/public/cli/commands/revoke-api-key.d.ts +8 -0
- package/public/cli/commands/revoke-api-key.js +36 -0
- package/public/cli/commands/revoke-session.d.ts +8 -0
- package/public/cli/commands/revoke-session.js +36 -0
- package/public/cli/commands/session-secrets-module.d.ts +8 -0
- package/public/cli/commands/{connected-account.js → session-secrets-module.js} +82 -90
- package/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/public/cli/commands/sign-in-cross-origin.js +36 -0
- package/public/cli/commands/spatial-relation.d.ts +8 -0
- package/public/cli/commands/spatial-relation.js +474 -0
- package/public/cli/commands/user-auth-module.js +24 -24
- package/public/cli/commands/user-connected-account.d.ts +8 -0
- package/public/cli/commands/user-connected-account.js +176 -0
- package/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
- package/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
- package/public/cli/commands.js +41 -15
- package/public/cli/executor.d.ts +61 -16
- package/public/orm/index.d.ts +69 -19
- package/public/orm/index.js +16 -6
- package/public/orm/input-types.d.ts +2047 -640
- package/public/orm/input-types.js +15 -6
- package/public/orm/models/devicesModule.d.ts +56 -0
- package/public/orm/models/devicesModule.js +100 -0
- package/public/orm/models/entityTypeProvision.d.ts +56 -0
- package/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +26 -26
- package/public/orm/models/index.d.ts +8 -3
- package/public/orm/models/index.js +19 -9
- package/public/orm/models/orgMemberProfile.d.ts +56 -0
- package/public/orm/models/{connectedAccount.js → orgMemberProfile.js} +26 -26
- package/public/orm/models/sessionSecretsModule.d.ts +56 -0
- package/public/orm/models/sessionSecretsModule.js +100 -0
- package/public/orm/models/spatialRelation.d.ts +56 -0
- package/public/orm/models/spatialRelation.js +100 -0
- package/public/orm/models/userConnectedAccount.d.ts +38 -0
- package/public/orm/models/userConnectedAccount.js +76 -0
- package/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
- package/public/orm/models/webauthnCredentialsModule.js +100 -0
- package/public/orm/mutation/index.d.ts +72 -20
- package/public/orm/mutation/index.js +96 -24
- package/public/orm/query/index.d.ts +24 -2
- package/public/orm/query/index.js +36 -4
- package/auth/orm/models/connectedAccount.d.ts +0 -56
- package/esm/auth/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/esm/auth/orm/models/connectedAccount.d.ts +0 -56
- package/esm/public/cli/commands/one-time-token.d.ts +0 -8
- package/esm/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/esm/public/orm/models/connectedAccount.d.ts +0 -56
- package/esm/public/orm/models/tableTemplateModule.d.ts +0 -56
- package/public/cli/commands/one-time-token.d.ts +0 -8
- package/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/public/cli/commands/table-template-module.d.ts +0 -8
- package/public/orm/models/connectedAccount.d.ts +0 -56
- package/public/orm/models/tableTemplateModule.d.ts +0 -56
|
@@ -19,6 +19,7 @@ const fieldSchema = {
|
|
|
19
19
|
isDisabled: 'boolean',
|
|
20
20
|
isVerified: 'boolean',
|
|
21
21
|
isActive: 'boolean',
|
|
22
|
+
isExternal: 'boolean',
|
|
22
23
|
isOwner: 'boolean',
|
|
23
24
|
isAdmin: 'boolean',
|
|
24
25
|
permissions: 'string',
|
|
@@ -78,6 +79,7 @@ async function handleList(argv, _prompter) {
|
|
|
78
79
|
isDisabled: true,
|
|
79
80
|
isVerified: true,
|
|
80
81
|
isActive: true,
|
|
82
|
+
isExternal: true,
|
|
81
83
|
isOwner: true,
|
|
82
84
|
isAdmin: true,
|
|
83
85
|
permissions: true,
|
|
@@ -111,6 +113,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
111
113
|
isDisabled: true,
|
|
112
114
|
isVerified: true,
|
|
113
115
|
isActive: true,
|
|
116
|
+
isExternal: true,
|
|
114
117
|
isOwner: true,
|
|
115
118
|
isAdmin: true,
|
|
116
119
|
permissions: true,
|
|
@@ -156,6 +159,7 @@ async function handleGet(argv, prompter) {
|
|
|
156
159
|
isDisabled: true,
|
|
157
160
|
isVerified: true,
|
|
158
161
|
isActive: true,
|
|
162
|
+
isExternal: true,
|
|
159
163
|
isOwner: true,
|
|
160
164
|
isAdmin: true,
|
|
161
165
|
permissions: true,
|
|
@@ -227,6 +231,13 @@ async function handleCreate(argv, prompter) {
|
|
|
227
231
|
required: false,
|
|
228
232
|
skipPrompt: true,
|
|
229
233
|
},
|
|
234
|
+
{
|
|
235
|
+
type: 'boolean',
|
|
236
|
+
name: 'isExternal',
|
|
237
|
+
message: 'isExternal',
|
|
238
|
+
required: false,
|
|
239
|
+
skipPrompt: true,
|
|
240
|
+
},
|
|
230
241
|
{
|
|
231
242
|
type: 'boolean',
|
|
232
243
|
name: 'isOwner',
|
|
@@ -282,6 +293,7 @@ async function handleCreate(argv, prompter) {
|
|
|
282
293
|
isDisabled: cleanedData.isDisabled,
|
|
283
294
|
isVerified: cleanedData.isVerified,
|
|
284
295
|
isActive: cleanedData.isActive,
|
|
296
|
+
isExternal: cleanedData.isExternal,
|
|
285
297
|
isOwner: cleanedData.isOwner,
|
|
286
298
|
isAdmin: cleanedData.isAdmin,
|
|
287
299
|
permissions: cleanedData.permissions,
|
|
@@ -300,6 +312,7 @@ async function handleCreate(argv, prompter) {
|
|
|
300
312
|
isDisabled: true,
|
|
301
313
|
isVerified: true,
|
|
302
314
|
isActive: true,
|
|
315
|
+
isExternal: true,
|
|
303
316
|
isOwner: true,
|
|
304
317
|
isAdmin: true,
|
|
305
318
|
permissions: true,
|
|
@@ -377,6 +390,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
377
390
|
required: false,
|
|
378
391
|
skipPrompt: true,
|
|
379
392
|
},
|
|
393
|
+
{
|
|
394
|
+
type: 'boolean',
|
|
395
|
+
name: 'isExternal',
|
|
396
|
+
message: 'isExternal',
|
|
397
|
+
required: false,
|
|
398
|
+
skipPrompt: true,
|
|
399
|
+
},
|
|
380
400
|
{
|
|
381
401
|
type: 'boolean',
|
|
382
402
|
name: 'isOwner',
|
|
@@ -435,6 +455,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
435
455
|
isDisabled: cleanedData.isDisabled,
|
|
436
456
|
isVerified: cleanedData.isVerified,
|
|
437
457
|
isActive: cleanedData.isActive,
|
|
458
|
+
isExternal: cleanedData.isExternal,
|
|
438
459
|
isOwner: cleanedData.isOwner,
|
|
439
460
|
isAdmin: cleanedData.isAdmin,
|
|
440
461
|
permissions: cleanedData.permissions,
|
|
@@ -453,6 +474,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
453
474
|
isDisabled: true,
|
|
454
475
|
isVerified: true,
|
|
455
476
|
isActive: true,
|
|
477
|
+
isExternal: true,
|
|
456
478
|
isOwner: true,
|
|
457
479
|
isAdmin: true,
|
|
458
480
|
permissions: true,
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
|
|
|
5
5
|
exports.default = async (argv, prompter, _options) => {
|
|
6
6
|
try {
|
|
7
7
|
if (argv.help || argv.h) {
|
|
8
|
-
console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt.
|
|
8
|
+
console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Six phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\n');
|
|
9
9
|
process.exit(0);
|
|
10
10
|
}
|
|
11
11
|
const answers = await prompter.prompt(argv, [
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command for mutation createApiKey
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const executor_1 = require("../executor");
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
exports.default = async (argv, prompter, _options) => {
|
|
6
|
+
try {
|
|
7
|
+
if (argv.help || argv.h) {
|
|
8
|
+
console.log('create-api-key - createApiKey\n\nUsage: create-api-key [OPTIONS]\n');
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
const answers = await prompter.prompt(argv, [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
name: 'input',
|
|
15
|
+
message: 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
]);
|
|
19
|
+
const client = (0, executor_1.getClient)();
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
|
+
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
|
+
const result = await client.mutation
|
|
23
|
+
.createApiKey(parsedAnswers, {
|
|
24
|
+
select: selectFields,
|
|
25
|
+
})
|
|
26
|
+
.execute();
|
|
27
|
+
console.log(JSON.stringify(result, null, 2));
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error('Failed: createApiKey');
|
|
31
|
+
if (error instanceof Error) {
|
|
32
|
+
console.error(error.message);
|
|
33
|
+
}
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for DevicesModule
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/**
|
|
4
|
-
* CLI commands for
|
|
4
|
+
* CLI commands for DevicesModule
|
|
5
5
|
* @generated by @constructive-io/graphql-codegen
|
|
6
6
|
* DO NOT EDIT - changes will be overwritten
|
|
7
7
|
*/
|
|
@@ -10,15 +10,14 @@ const executor_1 = require("../executor");
|
|
|
10
10
|
const utils_1 = require("../utils");
|
|
11
11
|
const fieldSchema = {
|
|
12
12
|
id: 'uuid',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
updatedAt: 'string',
|
|
13
|
+
databaseId: 'uuid',
|
|
14
|
+
schemaId: 'uuid',
|
|
15
|
+
userDevicesTableId: 'uuid',
|
|
16
|
+
deviceSettingsTableId: 'uuid',
|
|
17
|
+
userDevicesTable: 'string',
|
|
18
|
+
deviceSettingsTable: 'string',
|
|
20
19
|
};
|
|
21
|
-
const usage = '\
|
|
20
|
+
const usage = '\ndevices-module <command>\n\nCommands:\n list List devicesModule records\n find-first Find first matching devicesModule record\n get Get a devicesModule by ID\n create Create a new devicesModule\n update Update an existing devicesModule\n delete Delete a devicesModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
22
21
|
exports.default = async (argv, prompter, _options) => {
|
|
23
22
|
if (argv.help || argv.h) {
|
|
24
23
|
console.log(usage);
|
|
@@ -61,17 +60,16 @@ async function handleList(argv, _prompter) {
|
|
|
61
60
|
try {
|
|
62
61
|
const defaultSelect = {
|
|
63
62
|
id: true,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
updatedAt: true,
|
|
63
|
+
databaseId: true,
|
|
64
|
+
schemaId: true,
|
|
65
|
+
userDevicesTableId: true,
|
|
66
|
+
deviceSettingsTableId: true,
|
|
67
|
+
userDevicesTable: true,
|
|
68
|
+
deviceSettingsTable: true,
|
|
71
69
|
};
|
|
72
70
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
73
71
|
const client = (0, executor_1.getClient)();
|
|
74
|
-
const result = await client.
|
|
72
|
+
const result = await client.devicesModule.findMany(findManyArgs).execute();
|
|
75
73
|
console.log(JSON.stringify(result, null, 2));
|
|
76
74
|
}
|
|
77
75
|
catch (error) {
|
|
@@ -86,17 +84,16 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
86
84
|
try {
|
|
87
85
|
const defaultSelect = {
|
|
88
86
|
id: true,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
updatedAt: true,
|
|
87
|
+
databaseId: true,
|
|
88
|
+
schemaId: true,
|
|
89
|
+
userDevicesTableId: true,
|
|
90
|
+
deviceSettingsTableId: true,
|
|
91
|
+
userDevicesTable: true,
|
|
92
|
+
deviceSettingsTable: true,
|
|
96
93
|
};
|
|
97
94
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
98
95
|
const client = (0, executor_1.getClient)();
|
|
99
|
-
const result = await client.
|
|
96
|
+
const result = await client.devicesModule.findFirst(findFirstArgs).execute();
|
|
100
97
|
console.log(JSON.stringify(result, null, 2));
|
|
101
98
|
}
|
|
102
99
|
catch (error) {
|
|
@@ -118,18 +115,17 @@ async function handleGet(argv, prompter) {
|
|
|
118
115
|
},
|
|
119
116
|
]);
|
|
120
117
|
const client = (0, executor_1.getClient)();
|
|
121
|
-
const result = await client.
|
|
118
|
+
const result = await client.devicesModule
|
|
122
119
|
.findOne({
|
|
123
120
|
id: answers.id,
|
|
124
121
|
select: {
|
|
125
122
|
id: true,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
updatedAt: true,
|
|
123
|
+
databaseId: true,
|
|
124
|
+
schemaId: true,
|
|
125
|
+
userDevicesTableId: true,
|
|
126
|
+
deviceSettingsTableId: true,
|
|
127
|
+
userDevicesTable: true,
|
|
128
|
+
deviceSettingsTable: true,
|
|
133
129
|
},
|
|
134
130
|
})
|
|
135
131
|
.execute();
|
|
@@ -148,33 +144,42 @@ async function handleCreate(argv, prompter) {
|
|
|
148
144
|
const rawAnswers = await prompter.prompt(argv, [
|
|
149
145
|
{
|
|
150
146
|
type: 'text',
|
|
151
|
-
name: '
|
|
152
|
-
message: '
|
|
147
|
+
name: 'databaseId',
|
|
148
|
+
message: 'databaseId',
|
|
149
|
+
required: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'text',
|
|
153
|
+
name: 'schemaId',
|
|
154
|
+
message: 'schemaId',
|
|
153
155
|
required: false,
|
|
154
156
|
skipPrompt: true,
|
|
155
157
|
},
|
|
156
158
|
{
|
|
157
159
|
type: 'text',
|
|
158
|
-
name: '
|
|
159
|
-
message: '
|
|
160
|
-
required:
|
|
160
|
+
name: 'userDevicesTableId',
|
|
161
|
+
message: 'userDevicesTableId',
|
|
162
|
+
required: false,
|
|
163
|
+
skipPrompt: true,
|
|
161
164
|
},
|
|
162
165
|
{
|
|
163
166
|
type: 'text',
|
|
164
|
-
name: '
|
|
165
|
-
message: '
|
|
166
|
-
required:
|
|
167
|
+
name: 'deviceSettingsTableId',
|
|
168
|
+
message: 'deviceSettingsTableId',
|
|
169
|
+
required: false,
|
|
170
|
+
skipPrompt: true,
|
|
167
171
|
},
|
|
168
172
|
{
|
|
169
|
-
type: '
|
|
170
|
-
name: '
|
|
171
|
-
message: '
|
|
172
|
-
required:
|
|
173
|
+
type: 'text',
|
|
174
|
+
name: 'userDevicesTable',
|
|
175
|
+
message: 'userDevicesTable',
|
|
176
|
+
required: false,
|
|
177
|
+
skipPrompt: true,
|
|
173
178
|
},
|
|
174
179
|
{
|
|
175
|
-
type: '
|
|
176
|
-
name: '
|
|
177
|
-
message: '
|
|
180
|
+
type: 'text',
|
|
181
|
+
name: 'deviceSettingsTable',
|
|
182
|
+
message: 'deviceSettingsTable',
|
|
178
183
|
required: false,
|
|
179
184
|
skipPrompt: true,
|
|
180
185
|
},
|
|
@@ -182,24 +187,24 @@ async function handleCreate(argv, prompter) {
|
|
|
182
187
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
183
188
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
184
189
|
const client = (0, executor_1.getClient)();
|
|
185
|
-
const result = await client.
|
|
190
|
+
const result = await client.devicesModule
|
|
186
191
|
.create({
|
|
187
192
|
data: {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
databaseId: cleanedData.databaseId,
|
|
194
|
+
schemaId: cleanedData.schemaId,
|
|
195
|
+
userDevicesTableId: cleanedData.userDevicesTableId,
|
|
196
|
+
deviceSettingsTableId: cleanedData.deviceSettingsTableId,
|
|
197
|
+
userDevicesTable: cleanedData.userDevicesTable,
|
|
198
|
+
deviceSettingsTable: cleanedData.deviceSettingsTable,
|
|
193
199
|
},
|
|
194
200
|
select: {
|
|
195
201
|
id: true,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
updatedAt: true,
|
|
202
|
+
databaseId: true,
|
|
203
|
+
schemaId: true,
|
|
204
|
+
userDevicesTableId: true,
|
|
205
|
+
deviceSettingsTableId: true,
|
|
206
|
+
userDevicesTable: true,
|
|
207
|
+
deviceSettingsTable: true,
|
|
203
208
|
},
|
|
204
209
|
})
|
|
205
210
|
.execute();
|
|
@@ -224,33 +229,42 @@ async function handleUpdate(argv, prompter) {
|
|
|
224
229
|
},
|
|
225
230
|
{
|
|
226
231
|
type: 'text',
|
|
227
|
-
name: '
|
|
228
|
-
message: '
|
|
232
|
+
name: 'databaseId',
|
|
233
|
+
message: 'databaseId',
|
|
234
|
+
required: false,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
type: 'text',
|
|
238
|
+
name: 'schemaId',
|
|
239
|
+
message: 'schemaId',
|
|
229
240
|
required: false,
|
|
230
241
|
skipPrompt: true,
|
|
231
242
|
},
|
|
232
243
|
{
|
|
233
244
|
type: 'text',
|
|
234
|
-
name: '
|
|
235
|
-
message: '
|
|
245
|
+
name: 'userDevicesTableId',
|
|
246
|
+
message: 'userDevicesTableId',
|
|
236
247
|
required: false,
|
|
248
|
+
skipPrompt: true,
|
|
237
249
|
},
|
|
238
250
|
{
|
|
239
251
|
type: 'text',
|
|
240
|
-
name: '
|
|
241
|
-
message: '
|
|
252
|
+
name: 'deviceSettingsTableId',
|
|
253
|
+
message: 'deviceSettingsTableId',
|
|
242
254
|
required: false,
|
|
255
|
+
skipPrompt: true,
|
|
243
256
|
},
|
|
244
257
|
{
|
|
245
|
-
type: '
|
|
246
|
-
name: '
|
|
247
|
-
message: '
|
|
258
|
+
type: 'text',
|
|
259
|
+
name: 'userDevicesTable',
|
|
260
|
+
message: 'userDevicesTable',
|
|
248
261
|
required: false,
|
|
262
|
+
skipPrompt: true,
|
|
249
263
|
},
|
|
250
264
|
{
|
|
251
|
-
type: '
|
|
252
|
-
name: '
|
|
253
|
-
message: '
|
|
265
|
+
type: 'text',
|
|
266
|
+
name: 'deviceSettingsTable',
|
|
267
|
+
message: 'deviceSettingsTable',
|
|
254
268
|
required: false,
|
|
255
269
|
skipPrompt: true,
|
|
256
270
|
},
|
|
@@ -258,27 +272,27 @@ async function handleUpdate(argv, prompter) {
|
|
|
258
272
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
259
273
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
260
274
|
const client = (0, executor_1.getClient)();
|
|
261
|
-
const result = await client.
|
|
275
|
+
const result = await client.devicesModule
|
|
262
276
|
.update({
|
|
263
277
|
where: {
|
|
264
278
|
id: answers.id,
|
|
265
279
|
},
|
|
266
280
|
data: {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
281
|
+
databaseId: cleanedData.databaseId,
|
|
282
|
+
schemaId: cleanedData.schemaId,
|
|
283
|
+
userDevicesTableId: cleanedData.userDevicesTableId,
|
|
284
|
+
deviceSettingsTableId: cleanedData.deviceSettingsTableId,
|
|
285
|
+
userDevicesTable: cleanedData.userDevicesTable,
|
|
286
|
+
deviceSettingsTable: cleanedData.deviceSettingsTable,
|
|
272
287
|
},
|
|
273
288
|
select: {
|
|
274
289
|
id: true,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
updatedAt: true,
|
|
290
|
+
databaseId: true,
|
|
291
|
+
schemaId: true,
|
|
292
|
+
userDevicesTableId: true,
|
|
293
|
+
deviceSettingsTableId: true,
|
|
294
|
+
userDevicesTable: true,
|
|
295
|
+
deviceSettingsTable: true,
|
|
282
296
|
},
|
|
283
297
|
})
|
|
284
298
|
.execute();
|
|
@@ -304,7 +318,7 @@ async function handleDelete(argv, prompter) {
|
|
|
304
318
|
]);
|
|
305
319
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
306
320
|
const client = (0, executor_1.getClient)();
|
|
307
|
-
const result = await client.
|
|
321
|
+
const result = await client.devicesModule
|
|
308
322
|
.delete({
|
|
309
323
|
where: {
|
|
310
324
|
id: answers.id,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command for mutation disconnectAccount
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const executor_1 = require("../executor");
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
exports.default = async (argv, prompter, _options) => {
|
|
6
|
+
try {
|
|
7
|
+
if (argv.help || argv.h) {
|
|
8
|
+
console.log('disconnect-account - disconnectAccount\n\nUsage: disconnect-account [OPTIONS]\n');
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
const answers = await prompter.prompt(argv, [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
name: 'input',
|
|
15
|
+
message: 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
]);
|
|
19
|
+
const client = (0, executor_1.getClient)();
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
|
+
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
|
+
const result = await client.mutation
|
|
23
|
+
.disconnectAccount(parsedAnswers, {
|
|
24
|
+
select: selectFields,
|
|
25
|
+
})
|
|
26
|
+
.execute();
|
|
27
|
+
console.log(JSON.stringify(result, null, 2));
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error('Failed: disconnectAccount');
|
|
31
|
+
if (error instanceof Error) {
|
|
32
|
+
console.error(error.message);
|
|
33
|
+
}
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for EntityTypeProvision
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|