@constructive-sdk/cli 0.14.0 → 0.14.2
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 +3 -3
- 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,
|
|
@@ -13,6 +13,8 @@ const fieldSchema = {
|
|
|
13
13
|
name: 'string',
|
|
14
14
|
description: 'string',
|
|
15
15
|
prefix: 'string',
|
|
16
|
+
parentMembershipType: 'int',
|
|
17
|
+
hasUsersTableEntry: 'boolean',
|
|
16
18
|
};
|
|
17
19
|
const usage = '\nmembership-type <command>\n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\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';
|
|
18
20
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -60,6 +62,8 @@ async function handleList(argv, _prompter) {
|
|
|
60
62
|
name: true,
|
|
61
63
|
description: true,
|
|
62
64
|
prefix: true,
|
|
65
|
+
parentMembershipType: true,
|
|
66
|
+
hasUsersTableEntry: true,
|
|
63
67
|
};
|
|
64
68
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
65
69
|
const client = (0, executor_1.getClient)();
|
|
@@ -81,6 +85,8 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
81
85
|
name: true,
|
|
82
86
|
description: true,
|
|
83
87
|
prefix: true,
|
|
88
|
+
parentMembershipType: true,
|
|
89
|
+
hasUsersTableEntry: true,
|
|
84
90
|
};
|
|
85
91
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
86
92
|
const client = (0, executor_1.getClient)();
|
|
@@ -114,6 +120,8 @@ async function handleGet(argv, prompter) {
|
|
|
114
120
|
name: true,
|
|
115
121
|
description: true,
|
|
116
122
|
prefix: true,
|
|
123
|
+
parentMembershipType: true,
|
|
124
|
+
hasUsersTableEntry: true,
|
|
117
125
|
},
|
|
118
126
|
})
|
|
119
127
|
.execute();
|
|
@@ -148,6 +156,20 @@ async function handleCreate(argv, prompter) {
|
|
|
148
156
|
message: 'prefix',
|
|
149
157
|
required: true,
|
|
150
158
|
},
|
|
159
|
+
{
|
|
160
|
+
type: 'text',
|
|
161
|
+
name: 'parentMembershipType',
|
|
162
|
+
message: 'parentMembershipType',
|
|
163
|
+
required: false,
|
|
164
|
+
skipPrompt: true,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
name: 'hasUsersTableEntry',
|
|
169
|
+
message: 'hasUsersTableEntry',
|
|
170
|
+
required: false,
|
|
171
|
+
skipPrompt: true,
|
|
172
|
+
},
|
|
151
173
|
]);
|
|
152
174
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
153
175
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -158,12 +180,16 @@ async function handleCreate(argv, prompter) {
|
|
|
158
180
|
name: cleanedData.name,
|
|
159
181
|
description: cleanedData.description,
|
|
160
182
|
prefix: cleanedData.prefix,
|
|
183
|
+
parentMembershipType: cleanedData.parentMembershipType,
|
|
184
|
+
hasUsersTableEntry: cleanedData.hasUsersTableEntry,
|
|
161
185
|
},
|
|
162
186
|
select: {
|
|
163
187
|
id: true,
|
|
164
188
|
name: true,
|
|
165
189
|
description: true,
|
|
166
190
|
prefix: true,
|
|
191
|
+
parentMembershipType: true,
|
|
192
|
+
hasUsersTableEntry: true,
|
|
167
193
|
},
|
|
168
194
|
})
|
|
169
195
|
.execute();
|
|
@@ -204,6 +230,20 @@ async function handleUpdate(argv, prompter) {
|
|
|
204
230
|
message: 'prefix',
|
|
205
231
|
required: false,
|
|
206
232
|
},
|
|
233
|
+
{
|
|
234
|
+
type: 'text',
|
|
235
|
+
name: 'parentMembershipType',
|
|
236
|
+
message: 'parentMembershipType',
|
|
237
|
+
required: false,
|
|
238
|
+
skipPrompt: true,
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
type: 'boolean',
|
|
242
|
+
name: 'hasUsersTableEntry',
|
|
243
|
+
message: 'hasUsersTableEntry',
|
|
244
|
+
required: false,
|
|
245
|
+
skipPrompt: true,
|
|
246
|
+
},
|
|
207
247
|
]);
|
|
208
248
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
209
249
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -217,12 +257,16 @@ async function handleUpdate(argv, prompter) {
|
|
|
217
257
|
name: cleanedData.name,
|
|
218
258
|
description: cleanedData.description,
|
|
219
259
|
prefix: cleanedData.prefix,
|
|
260
|
+
parentMembershipType: cleanedData.parentMembershipType,
|
|
261
|
+
hasUsersTableEntry: cleanedData.hasUsersTableEntry,
|
|
220
262
|
},
|
|
221
263
|
select: {
|
|
222
264
|
id: true,
|
|
223
265
|
name: true,
|
|
224
266
|
description: true,
|
|
225
267
|
prefix: true,
|
|
268
|
+
parentMembershipType: true,
|
|
269
|
+
hasUsersTableEntry: true,
|
|
226
270
|
},
|
|
227
271
|
})
|
|
228
272
|
.execute();
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for OrgMemberProfile
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
id: 'uuid',
|
|
13
|
+
createdAt: 'string',
|
|
14
|
+
updatedAt: 'string',
|
|
15
|
+
membershipId: 'uuid',
|
|
16
|
+
entityId: 'uuid',
|
|
17
|
+
actorId: 'uuid',
|
|
18
|
+
displayName: 'string',
|
|
19
|
+
email: 'string',
|
|
20
|
+
title: 'string',
|
|
21
|
+
bio: 'string',
|
|
22
|
+
profilePicture: 'string',
|
|
23
|
+
};
|
|
24
|
+
const usage = '\norg-member-profile <command>\n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\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';
|
|
25
|
+
exports.default = async (argv, prompter, _options) => {
|
|
26
|
+
if (argv.help || argv.h) {
|
|
27
|
+
console.log(usage);
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
31
|
+
if (!subcommand) {
|
|
32
|
+
const answer = await prompter.prompt(argv, [
|
|
33
|
+
{
|
|
34
|
+
type: 'autocomplete',
|
|
35
|
+
name: 'subcommand',
|
|
36
|
+
message: 'What do you want to do?',
|
|
37
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
38
|
+
},
|
|
39
|
+
]);
|
|
40
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
41
|
+
}
|
|
42
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
43
|
+
};
|
|
44
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
45
|
+
switch (subcommand) {
|
|
46
|
+
case 'list':
|
|
47
|
+
return handleList(argv, prompter);
|
|
48
|
+
case 'find-first':
|
|
49
|
+
return handleFindFirst(argv, prompter);
|
|
50
|
+
case 'get':
|
|
51
|
+
return handleGet(argv, prompter);
|
|
52
|
+
case 'create':
|
|
53
|
+
return handleCreate(argv, prompter);
|
|
54
|
+
case 'update':
|
|
55
|
+
return handleUpdate(argv, prompter);
|
|
56
|
+
case 'delete':
|
|
57
|
+
return handleDelete(argv, prompter);
|
|
58
|
+
default:
|
|
59
|
+
console.log(usage);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function handleList(argv, _prompter) {
|
|
64
|
+
try {
|
|
65
|
+
const defaultSelect = {
|
|
66
|
+
id: true,
|
|
67
|
+
createdAt: true,
|
|
68
|
+
updatedAt: true,
|
|
69
|
+
membershipId: true,
|
|
70
|
+
entityId: true,
|
|
71
|
+
actorId: true,
|
|
72
|
+
displayName: true,
|
|
73
|
+
email: true,
|
|
74
|
+
title: true,
|
|
75
|
+
bio: true,
|
|
76
|
+
profilePicture: true,
|
|
77
|
+
};
|
|
78
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
79
|
+
const client = (0, executor_1.getClient)();
|
|
80
|
+
const result = await client.orgMemberProfile.findMany(findManyArgs).execute();
|
|
81
|
+
console.log(JSON.stringify(result, null, 2));
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
console.error('Failed to list records.');
|
|
85
|
+
if (error instanceof Error) {
|
|
86
|
+
console.error(error.message);
|
|
87
|
+
}
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async function handleFindFirst(argv, _prompter) {
|
|
92
|
+
try {
|
|
93
|
+
const defaultSelect = {
|
|
94
|
+
id: true,
|
|
95
|
+
createdAt: true,
|
|
96
|
+
updatedAt: true,
|
|
97
|
+
membershipId: true,
|
|
98
|
+
entityId: true,
|
|
99
|
+
actorId: true,
|
|
100
|
+
displayName: true,
|
|
101
|
+
email: true,
|
|
102
|
+
title: true,
|
|
103
|
+
bio: true,
|
|
104
|
+
profilePicture: true,
|
|
105
|
+
};
|
|
106
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
107
|
+
const client = (0, executor_1.getClient)();
|
|
108
|
+
const result = await client.orgMemberProfile.findFirst(findFirstArgs).execute();
|
|
109
|
+
console.log(JSON.stringify(result, null, 2));
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
console.error('Failed to find record.');
|
|
113
|
+
if (error instanceof Error) {
|
|
114
|
+
console.error(error.message);
|
|
115
|
+
}
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async function handleGet(argv, prompter) {
|
|
120
|
+
try {
|
|
121
|
+
const answers = await prompter.prompt(argv, [
|
|
122
|
+
{
|
|
123
|
+
type: 'text',
|
|
124
|
+
name: 'id',
|
|
125
|
+
message: 'id',
|
|
126
|
+
required: true,
|
|
127
|
+
},
|
|
128
|
+
]);
|
|
129
|
+
const client = (0, executor_1.getClient)();
|
|
130
|
+
const result = await client.orgMemberProfile
|
|
131
|
+
.findOne({
|
|
132
|
+
id: answers.id,
|
|
133
|
+
select: {
|
|
134
|
+
id: true,
|
|
135
|
+
createdAt: true,
|
|
136
|
+
updatedAt: true,
|
|
137
|
+
membershipId: true,
|
|
138
|
+
entityId: true,
|
|
139
|
+
actorId: true,
|
|
140
|
+
displayName: true,
|
|
141
|
+
email: true,
|
|
142
|
+
title: true,
|
|
143
|
+
bio: true,
|
|
144
|
+
profilePicture: true,
|
|
145
|
+
},
|
|
146
|
+
})
|
|
147
|
+
.execute();
|
|
148
|
+
console.log(JSON.stringify(result, null, 2));
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
console.error('Record not found.');
|
|
152
|
+
if (error instanceof Error) {
|
|
153
|
+
console.error(error.message);
|
|
154
|
+
}
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
async function handleCreate(argv, prompter) {
|
|
159
|
+
try {
|
|
160
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
161
|
+
{
|
|
162
|
+
type: 'text',
|
|
163
|
+
name: 'membershipId',
|
|
164
|
+
message: 'membershipId',
|
|
165
|
+
required: true,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: 'text',
|
|
169
|
+
name: 'entityId',
|
|
170
|
+
message: 'entityId',
|
|
171
|
+
required: true,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'text',
|
|
175
|
+
name: 'actorId',
|
|
176
|
+
message: 'actorId',
|
|
177
|
+
required: true,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: 'text',
|
|
181
|
+
name: 'displayName',
|
|
182
|
+
message: 'displayName',
|
|
183
|
+
required: false,
|
|
184
|
+
skipPrompt: true,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: 'text',
|
|
188
|
+
name: 'email',
|
|
189
|
+
message: 'email',
|
|
190
|
+
required: false,
|
|
191
|
+
skipPrompt: true,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
type: 'text',
|
|
195
|
+
name: 'title',
|
|
196
|
+
message: 'title',
|
|
197
|
+
required: false,
|
|
198
|
+
skipPrompt: true,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
type: 'text',
|
|
202
|
+
name: 'bio',
|
|
203
|
+
message: 'bio',
|
|
204
|
+
required: false,
|
|
205
|
+
skipPrompt: true,
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: 'text',
|
|
209
|
+
name: 'profilePicture',
|
|
210
|
+
message: 'profilePicture',
|
|
211
|
+
required: false,
|
|
212
|
+
skipPrompt: true,
|
|
213
|
+
},
|
|
214
|
+
]);
|
|
215
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
216
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
217
|
+
const client = (0, executor_1.getClient)();
|
|
218
|
+
const result = await client.orgMemberProfile
|
|
219
|
+
.create({
|
|
220
|
+
data: {
|
|
221
|
+
membershipId: cleanedData.membershipId,
|
|
222
|
+
entityId: cleanedData.entityId,
|
|
223
|
+
actorId: cleanedData.actorId,
|
|
224
|
+
displayName: cleanedData.displayName,
|
|
225
|
+
email: cleanedData.email,
|
|
226
|
+
title: cleanedData.title,
|
|
227
|
+
bio: cleanedData.bio,
|
|
228
|
+
profilePicture: cleanedData.profilePicture,
|
|
229
|
+
},
|
|
230
|
+
select: {
|
|
231
|
+
id: true,
|
|
232
|
+
createdAt: true,
|
|
233
|
+
updatedAt: true,
|
|
234
|
+
membershipId: true,
|
|
235
|
+
entityId: true,
|
|
236
|
+
actorId: true,
|
|
237
|
+
displayName: true,
|
|
238
|
+
email: true,
|
|
239
|
+
title: true,
|
|
240
|
+
bio: true,
|
|
241
|
+
profilePicture: true,
|
|
242
|
+
},
|
|
243
|
+
})
|
|
244
|
+
.execute();
|
|
245
|
+
console.log(JSON.stringify(result, null, 2));
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
console.error('Failed to create record.');
|
|
249
|
+
if (error instanceof Error) {
|
|
250
|
+
console.error(error.message);
|
|
251
|
+
}
|
|
252
|
+
process.exit(1);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async function handleUpdate(argv, prompter) {
|
|
256
|
+
try {
|
|
257
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
258
|
+
{
|
|
259
|
+
type: 'text',
|
|
260
|
+
name: 'id',
|
|
261
|
+
message: 'id',
|
|
262
|
+
required: true,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: 'text',
|
|
266
|
+
name: 'membershipId',
|
|
267
|
+
message: 'membershipId',
|
|
268
|
+
required: false,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
type: 'text',
|
|
272
|
+
name: 'entityId',
|
|
273
|
+
message: 'entityId',
|
|
274
|
+
required: false,
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
type: 'text',
|
|
278
|
+
name: 'actorId',
|
|
279
|
+
message: 'actorId',
|
|
280
|
+
required: false,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
type: 'text',
|
|
284
|
+
name: 'displayName',
|
|
285
|
+
message: 'displayName',
|
|
286
|
+
required: false,
|
|
287
|
+
skipPrompt: true,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
type: 'text',
|
|
291
|
+
name: 'email',
|
|
292
|
+
message: 'email',
|
|
293
|
+
required: false,
|
|
294
|
+
skipPrompt: true,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: 'text',
|
|
298
|
+
name: 'title',
|
|
299
|
+
message: 'title',
|
|
300
|
+
required: false,
|
|
301
|
+
skipPrompt: true,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
type: 'text',
|
|
305
|
+
name: 'bio',
|
|
306
|
+
message: 'bio',
|
|
307
|
+
required: false,
|
|
308
|
+
skipPrompt: true,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
type: 'text',
|
|
312
|
+
name: 'profilePicture',
|
|
313
|
+
message: 'profilePicture',
|
|
314
|
+
required: false,
|
|
315
|
+
skipPrompt: true,
|
|
316
|
+
},
|
|
317
|
+
]);
|
|
318
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
319
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
320
|
+
const client = (0, executor_1.getClient)();
|
|
321
|
+
const result = await client.orgMemberProfile
|
|
322
|
+
.update({
|
|
323
|
+
where: {
|
|
324
|
+
id: answers.id,
|
|
325
|
+
},
|
|
326
|
+
data: {
|
|
327
|
+
membershipId: cleanedData.membershipId,
|
|
328
|
+
entityId: cleanedData.entityId,
|
|
329
|
+
actorId: cleanedData.actorId,
|
|
330
|
+
displayName: cleanedData.displayName,
|
|
331
|
+
email: cleanedData.email,
|
|
332
|
+
title: cleanedData.title,
|
|
333
|
+
bio: cleanedData.bio,
|
|
334
|
+
profilePicture: cleanedData.profilePicture,
|
|
335
|
+
},
|
|
336
|
+
select: {
|
|
337
|
+
id: true,
|
|
338
|
+
createdAt: true,
|
|
339
|
+
updatedAt: true,
|
|
340
|
+
membershipId: true,
|
|
341
|
+
entityId: true,
|
|
342
|
+
actorId: true,
|
|
343
|
+
displayName: true,
|
|
344
|
+
email: true,
|
|
345
|
+
title: true,
|
|
346
|
+
bio: true,
|
|
347
|
+
profilePicture: true,
|
|
348
|
+
},
|
|
349
|
+
})
|
|
350
|
+
.execute();
|
|
351
|
+
console.log(JSON.stringify(result, null, 2));
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
console.error('Failed to update record.');
|
|
355
|
+
if (error instanceof Error) {
|
|
356
|
+
console.error(error.message);
|
|
357
|
+
}
|
|
358
|
+
process.exit(1);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
async function handleDelete(argv, prompter) {
|
|
362
|
+
try {
|
|
363
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
364
|
+
{
|
|
365
|
+
type: 'text',
|
|
366
|
+
name: 'id',
|
|
367
|
+
message: 'id',
|
|
368
|
+
required: true,
|
|
369
|
+
},
|
|
370
|
+
]);
|
|
371
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
372
|
+
const client = (0, executor_1.getClient)();
|
|
373
|
+
const result = await client.orgMemberProfile
|
|
374
|
+
.delete({
|
|
375
|
+
where: {
|
|
376
|
+
id: answers.id,
|
|
377
|
+
},
|
|
378
|
+
select: {
|
|
379
|
+
id: true,
|
|
380
|
+
},
|
|
381
|
+
})
|
|
382
|
+
.execute();
|
|
383
|
+
console.log(JSON.stringify(result, null, 2));
|
|
384
|
+
}
|
|
385
|
+
catch (error) {
|
|
386
|
+
console.error('Failed to delete record.');
|
|
387
|
+
if (error instanceof Error) {
|
|
388
|
+
console.error(error.message);
|
|
389
|
+
}
|
|
390
|
+
process.exit(1);
|
|
391
|
+
}
|
|
392
|
+
}
|