@constructive-sdk/cli 0.12.7 → 0.12.8
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-achievement.js +38 -15
- package/admin/cli/commands/app-admin-grant.js +38 -15
- package/admin/cli/commands/app-grant.js +40 -16
- package/admin/cli/commands/app-level-requirement.js +42 -17
- package/admin/cli/commands/app-level.js +40 -16
- package/admin/cli/commands/app-limit-default.js +32 -12
- package/admin/cli/commands/app-limit.js +36 -14
- package/admin/cli/commands/app-membership-default.js +40 -16
- package/admin/cli/commands/app-membership.js +58 -25
- package/admin/cli/commands/app-owner-grant.js +38 -15
- package/admin/cli/commands/app-permission-default.js +30 -11
- package/admin/cli/commands/app-permission.js +36 -14
- package/admin/cli/commands/app-step.js +38 -15
- package/admin/cli/commands/claimed-invite.js +38 -15
- package/admin/cli/commands/invite.js +50 -21
- package/admin/cli/commands/membership-type.js +34 -13
- package/admin/cli/commands/org-admin-grant.js +40 -16
- package/admin/cli/commands/org-chart-edge-grant.js +44 -18
- package/admin/cli/commands/org-chart-edge.js +42 -17
- package/admin/cli/commands/org-claimed-invite.js +40 -16
- package/admin/cli/commands/org-get-managers-record.js +30 -11
- package/admin/cli/commands/org-get-subordinates-record.js +30 -11
- package/admin/cli/commands/org-grant.js +42 -17
- package/admin/cli/commands/org-invite.js +54 -23
- package/admin/cli/commands/org-limit-default.js +32 -12
- package/admin/cli/commands/org-limit.js +38 -15
- package/admin/cli/commands/org-member.js +34 -13
- package/admin/cli/commands/org-membership-default.js +44 -18
- package/admin/cli/commands/org-membership.js +58 -25
- package/admin/cli/commands/org-owner-grant.js +40 -16
- package/admin/cli/commands/org-permission-default.js +32 -12
- package/admin/cli/commands/org-permission.js +36 -14
- package/admin/cli/utils.d.ts +38 -0
- package/admin/cli/utils.js +96 -0
- package/auth/cli/commands/audit-log.js +42 -17
- package/auth/cli/commands/connected-account.js +42 -17
- package/auth/cli/commands/crypto-address.js +40 -16
- package/auth/cli/commands/email.js +40 -16
- package/auth/cli/commands/phone-number.js +42 -17
- package/auth/cli/commands/role-type.js +30 -11
- package/auth/cli/commands/user.js +80 -16
- package/auth/cli/utils.d.ts +38 -0
- package/auth/cli/utils.js +96 -0
- package/esm/admin/cli/commands/app-achievement.js +39 -16
- package/esm/admin/cli/commands/app-admin-grant.js +39 -16
- package/esm/admin/cli/commands/app-grant.js +41 -17
- package/esm/admin/cli/commands/app-level-requirement.js +43 -18
- package/esm/admin/cli/commands/app-level.js +41 -17
- package/esm/admin/cli/commands/app-limit-default.js +33 -13
- package/esm/admin/cli/commands/app-limit.js +37 -15
- package/esm/admin/cli/commands/app-membership-default.js +41 -17
- package/esm/admin/cli/commands/app-membership.js +59 -26
- package/esm/admin/cli/commands/app-owner-grant.js +39 -16
- package/esm/admin/cli/commands/app-permission-default.js +31 -12
- package/esm/admin/cli/commands/app-permission.js +37 -15
- package/esm/admin/cli/commands/app-step.js +39 -16
- package/esm/admin/cli/commands/claimed-invite.js +39 -16
- package/esm/admin/cli/commands/invite.js +51 -22
- package/esm/admin/cli/commands/membership-type.js +35 -14
- package/esm/admin/cli/commands/org-admin-grant.js +41 -17
- package/esm/admin/cli/commands/org-chart-edge-grant.js +45 -19
- package/esm/admin/cli/commands/org-chart-edge.js +43 -18
- package/esm/admin/cli/commands/org-claimed-invite.js +41 -17
- package/esm/admin/cli/commands/org-get-managers-record.js +31 -12
- package/esm/admin/cli/commands/org-get-subordinates-record.js +31 -12
- package/esm/admin/cli/commands/org-grant.js +43 -18
- package/esm/admin/cli/commands/org-invite.js +55 -24
- package/esm/admin/cli/commands/org-limit-default.js +33 -13
- package/esm/admin/cli/commands/org-limit.js +39 -16
- package/esm/admin/cli/commands/org-member.js +35 -14
- package/esm/admin/cli/commands/org-membership-default.js +45 -19
- package/esm/admin/cli/commands/org-membership.js +59 -26
- package/esm/admin/cli/commands/org-owner-grant.js +41 -17
- package/esm/admin/cli/commands/org-permission-default.js +33 -13
- package/esm/admin/cli/commands/org-permission.js +37 -15
- package/esm/admin/cli/utils.d.ts +38 -0
- package/esm/admin/cli/utils.js +90 -0
- package/esm/auth/cli/commands/audit-log.js +43 -18
- package/esm/auth/cli/commands/connected-account.js +43 -18
- package/esm/auth/cli/commands/crypto-address.js +41 -17
- package/esm/auth/cli/commands/email.js +41 -17
- package/esm/auth/cli/commands/phone-number.js +43 -18
- package/esm/auth/cli/commands/role-type.js +31 -12
- package/esm/auth/cli/commands/user.js +81 -17
- package/esm/auth/cli/utils.d.ts +38 -0
- package/esm/auth/cli/utils.js +90 -0
- package/esm/objects/cli/commands/commit.js +45 -19
- package/esm/objects/cli/commands/get-all-record.js +31 -12
- package/esm/objects/cli/commands/object.js +41 -17
- package/esm/objects/cli/commands/ref.js +37 -15
- package/esm/objects/cli/commands/store.js +37 -15
- package/esm/objects/cli/utils.d.ts +38 -0
- package/esm/objects/cli/utils.js +90 -0
- package/esm/public/cli/commands/api-module.js +37 -15
- package/esm/public/cli/commands/api-schema.js +35 -14
- package/esm/public/cli/commands/api.js +41 -17
- package/esm/public/cli/commands/app-achievement.js +39 -16
- package/esm/public/cli/commands/app-admin-grant.js +39 -16
- package/esm/public/cli/commands/app-grant.js +41 -17
- package/esm/public/cli/commands/app-level-requirement.js +43 -18
- package/esm/public/cli/commands/app-level.js +41 -17
- package/esm/public/cli/commands/app-limit-default.js +33 -13
- package/esm/public/cli/commands/app-limit.js +37 -15
- package/esm/public/cli/commands/app-membership-default.js +41 -17
- package/esm/public/cli/commands/app-membership.js +59 -26
- package/esm/public/cli/commands/app-owner-grant.js +39 -16
- package/esm/public/cli/commands/app-permission-default.js +31 -12
- package/esm/public/cli/commands/app-permission.js +37 -15
- package/esm/public/cli/commands/app-step.js +39 -16
- package/esm/public/cli/commands/app.js +45 -19
- package/esm/public/cli/commands/ast-migration.js +53 -23
- package/esm/public/cli/commands/audit-log.js +43 -18
- package/esm/public/cli/commands/blueprint-template.js +67 -30
- package/esm/public/cli/commands/blueprint.js +61 -27
- package/esm/public/cli/commands/check-constraint.js +55 -24
- package/esm/public/cli/commands/claimed-invite.js +39 -16
- package/esm/public/cli/commands/commit.js +45 -19
- package/esm/public/cli/commands/connected-account.js +43 -18
- package/esm/public/cli/commands/connected-accounts-module.js +41 -17
- package/esm/public/cli/commands/crypto-address.js +41 -17
- package/esm/public/cli/commands/crypto-addresses-module.js +43 -18
- package/esm/public/cli/commands/crypto-auth-module.js +55 -24
- package/esm/public/cli/commands/database-provision-module.js +55 -24
- package/esm/public/cli/commands/database-transfer.js +55 -24
- package/esm/public/cli/commands/database.js +43 -18
- package/esm/public/cli/commands/default-ids-module.js +31 -12
- package/esm/public/cli/commands/default-privilege.js +41 -17
- package/esm/public/cli/commands/denormalized-table-field.js +51 -22
- package/esm/public/cli/commands/domain.js +39 -16
- package/esm/public/cli/commands/email.js +41 -17
- package/esm/public/cli/commands/emails-module.js +41 -17
- package/esm/public/cli/commands/embedding-chunk.js +63 -28
- package/esm/public/cli/commands/encrypted-secrets-module.js +37 -15
- package/esm/public/cli/commands/enum.js +51 -22
- package/esm/public/cli/commands/field.js +75 -34
- package/esm/public/cli/commands/foreign-key-constraint.js +63 -28
- package/esm/public/cli/commands/full-text-search.js +45 -19
- package/esm/public/cli/commands/get-all-record.js +31 -12
- package/esm/public/cli/commands/hierarchy-module.js +67 -30
- package/esm/public/cli/commands/index.js +65 -29
- package/esm/public/cli/commands/invite.js +51 -22
- package/esm/public/cli/commands/invites-module.js +55 -24
- package/esm/public/cli/commands/levels-module.js +79 -36
- package/esm/public/cli/commands/limits-module.js +63 -28
- package/esm/public/cli/commands/membership-type.js +35 -14
- package/esm/public/cli/commands/membership-types-module.js +37 -15
- package/esm/public/cli/commands/memberships-module.js +89 -41
- package/esm/public/cli/commands/migrate-file.js +33 -13
- package/esm/public/cli/commands/node-type-registry.js +89 -19
- package/esm/public/cli/commands/object.js +41 -17
- package/esm/public/cli/commands/org-admin-grant.js +41 -17
- package/esm/public/cli/commands/org-chart-edge-grant.js +45 -19
- package/esm/public/cli/commands/org-chart-edge.js +43 -18
- package/esm/public/cli/commands/org-claimed-invite.js +41 -17
- package/esm/public/cli/commands/org-get-managers-record.js +31 -12
- package/esm/public/cli/commands/org-get-subordinates-record.js +31 -12
- package/esm/public/cli/commands/org-grant.js +43 -18
- package/esm/public/cli/commands/org-invite.js +55 -24
- package/esm/public/cli/commands/org-limit-default.js +33 -13
- package/esm/public/cli/commands/org-limit.js +39 -16
- package/esm/public/cli/commands/org-member.js +35 -14
- package/esm/public/cli/commands/org-membership-default.js +45 -19
- package/esm/public/cli/commands/org-membership.js +59 -26
- package/esm/public/cli/commands/org-owner-grant.js +41 -17
- package/esm/public/cli/commands/org-permission-default.js +33 -13
- package/esm/public/cli/commands/org-permission.js +37 -15
- package/esm/public/cli/commands/permissions-module.js +61 -27
- package/esm/public/cli/commands/phone-number.js +43 -18
- package/esm/public/cli/commands/phone-numbers-module.js +41 -17
- package/esm/public/cli/commands/policy.js +61 -27
- package/esm/public/cli/commands/primary-key-constraint.js +53 -23
- package/esm/public/cli/commands/profiles-module.js +63 -28
- package/esm/public/cli/commands/ref.js +37 -15
- package/esm/public/cli/commands/relation-provision.js +89 -41
- package/esm/public/cli/commands/rls-module.js +49 -21
- package/esm/public/cli/commands/role-type.js +31 -12
- package/esm/public/cli/commands/schema-grant.js +39 -16
- package/esm/public/cli/commands/schema.js +55 -24
- package/esm/public/cli/commands/secrets-module.js +37 -15
- package/esm/public/cli/commands/secure-table-provision.js +63 -28
- package/esm/public/cli/commands/sessions-module.js +49 -21
- package/esm/public/cli/commands/site-metadatum.js +39 -16
- package/esm/public/cli/commands/site-module.js +37 -15
- package/esm/public/cli/commands/site-theme.js +35 -14
- package/esm/public/cli/commands/site.js +45 -19
- package/esm/public/cli/commands/sql-action.js +53 -23
- package/esm/public/cli/commands/store.js +37 -15
- package/esm/public/cli/commands/table-grant.js +45 -19
- package/esm/public/cli/commands/table-template-module.js +45 -19
- package/esm/public/cli/commands/table.js +65 -29
- package/esm/public/cli/commands/trigger-function.js +39 -16
- package/esm/public/cli/commands/trigger.js +53 -23
- package/esm/public/cli/commands/unique-constraint.js +55 -24
- package/esm/public/cli/commands/user-auth-module.js +79 -36
- package/esm/public/cli/commands/user.js +81 -17
- package/esm/public/cli/commands/users-module.js +41 -17
- package/esm/public/cli/commands/view-grant.js +41 -17
- package/esm/public/cli/commands/view-rule.js +39 -16
- package/esm/public/cli/commands/view-table.js +35 -14
- package/esm/public/cli/commands/view.js +59 -26
- package/esm/public/cli/commands.js +3 -3
- package/esm/public/cli/executor.d.ts +1 -1
- package/esm/public/cli/utils.d.ts +38 -0
- package/esm/public/cli/utils.js +90 -0
- package/esm/public/orm/index.d.ts +2 -2
- package/esm/public/orm/index.js +2 -2
- package/esm/public/orm/input-types.d.ts +161 -147
- package/esm/public/orm/models/index.d.ts +1 -1
- package/esm/public/orm/models/index.js +1 -1
- package/objects/cli/commands/commit.js +44 -18
- package/objects/cli/commands/get-all-record.js +30 -11
- package/objects/cli/commands/object.js +40 -16
- package/objects/cli/commands/ref.js +36 -14
- package/objects/cli/commands/store.js +36 -14
- package/objects/cli/utils.d.ts +38 -0
- package/objects/cli/utils.js +96 -0
- package/package.json +3 -3
- package/public/cli/commands/api-module.js +36 -14
- package/public/cli/commands/api-schema.js +34 -13
- package/public/cli/commands/api.js +40 -16
- package/public/cli/commands/app-achievement.js +38 -15
- package/public/cli/commands/app-admin-grant.js +38 -15
- package/public/cli/commands/app-grant.js +40 -16
- package/public/cli/commands/app-level-requirement.js +42 -17
- package/public/cli/commands/app-level.js +40 -16
- package/public/cli/commands/app-limit-default.js +32 -12
- package/public/cli/commands/app-limit.js +36 -14
- package/public/cli/commands/app-membership-default.js +40 -16
- package/public/cli/commands/app-membership.js +58 -25
- package/public/cli/commands/app-owner-grant.js +38 -15
- package/public/cli/commands/app-permission-default.js +30 -11
- package/public/cli/commands/app-permission.js +36 -14
- package/public/cli/commands/app-step.js +38 -15
- package/public/cli/commands/app.js +44 -18
- package/public/cli/commands/ast-migration.js +52 -22
- package/public/cli/commands/audit-log.js +42 -17
- package/public/cli/commands/blueprint-template.js +66 -29
- package/public/cli/commands/blueprint.js +60 -26
- package/public/cli/commands/check-constraint.js +54 -23
- package/public/cli/commands/claimed-invite.js +38 -15
- package/public/cli/commands/commit.js +44 -18
- package/public/cli/commands/connected-account.js +42 -17
- package/public/cli/commands/connected-accounts-module.js +40 -16
- package/public/cli/commands/crypto-address.js +40 -16
- package/public/cli/commands/crypto-addresses-module.js +42 -17
- package/public/cli/commands/crypto-auth-module.js +54 -23
- package/public/cli/commands/database-provision-module.js +54 -23
- package/public/cli/commands/database-transfer.js +54 -23
- package/public/cli/commands/database.js +42 -17
- package/public/cli/commands/default-ids-module.js +30 -11
- package/public/cli/commands/default-privilege.js +40 -16
- package/public/cli/commands/denormalized-table-field.js +50 -21
- package/public/cli/commands/domain.js +38 -15
- package/public/cli/commands/email.js +40 -16
- package/public/cli/commands/emails-module.js +40 -16
- package/public/cli/commands/embedding-chunk.js +62 -27
- package/public/cli/commands/encrypted-secrets-module.js +36 -14
- package/public/cli/commands/enum.js +50 -21
- package/public/cli/commands/field.js +74 -33
- package/public/cli/commands/foreign-key-constraint.js +62 -27
- package/public/cli/commands/full-text-search.js +44 -18
- package/public/cli/commands/get-all-record.js +30 -11
- package/public/cli/commands/hierarchy-module.js +66 -29
- package/public/cli/commands/index.js +64 -28
- package/public/cli/commands/invite.js +50 -21
- package/public/cli/commands/invites-module.js +54 -23
- package/public/cli/commands/levels-module.js +78 -35
- package/public/cli/commands/limits-module.js +62 -27
- package/public/cli/commands/membership-type.js +34 -13
- package/public/cli/commands/membership-types-module.js +36 -14
- package/public/cli/commands/memberships-module.js +88 -40
- package/public/cli/commands/migrate-file.js +32 -12
- package/public/cli/commands/node-type-registry.js +88 -18
- package/public/cli/commands/object.js +40 -16
- package/public/cli/commands/org-admin-grant.js +40 -16
- package/public/cli/commands/org-chart-edge-grant.js +44 -18
- package/public/cli/commands/org-chart-edge.js +42 -17
- package/public/cli/commands/org-claimed-invite.js +40 -16
- package/public/cli/commands/org-get-managers-record.js +30 -11
- package/public/cli/commands/org-get-subordinates-record.js +30 -11
- package/public/cli/commands/org-grant.js +42 -17
- package/public/cli/commands/org-invite.js +54 -23
- package/public/cli/commands/org-limit-default.js +32 -12
- package/public/cli/commands/org-limit.js +38 -15
- package/public/cli/commands/org-member.js +34 -13
- package/public/cli/commands/org-membership-default.js +44 -18
- package/public/cli/commands/org-membership.js +58 -25
- package/public/cli/commands/org-owner-grant.js +40 -16
- package/public/cli/commands/org-permission-default.js +32 -12
- package/public/cli/commands/org-permission.js +36 -14
- package/public/cli/commands/permissions-module.js +60 -26
- package/public/cli/commands/phone-number.js +42 -17
- package/public/cli/commands/phone-numbers-module.js +40 -16
- package/public/cli/commands/policy.js +60 -26
- package/public/cli/commands/primary-key-constraint.js +52 -22
- package/public/cli/commands/profiles-module.js +62 -27
- package/public/cli/commands/ref.js +36 -14
- package/public/cli/commands/relation-provision.js +88 -40
- package/public/cli/commands/rls-module.js +48 -20
- package/public/cli/commands/role-type.js +30 -11
- package/public/cli/commands/schema-grant.js +38 -15
- package/public/cli/commands/schema.js +54 -23
- package/public/cli/commands/secrets-module.js +36 -14
- package/public/cli/commands/secure-table-provision.js +62 -27
- package/public/cli/commands/sessions-module.js +48 -20
- package/public/cli/commands/site-metadatum.js +38 -15
- package/public/cli/commands/site-module.js +36 -14
- package/public/cli/commands/site-theme.js +34 -13
- package/public/cli/commands/site.js +44 -18
- package/public/cli/commands/sql-action.js +52 -22
- package/public/cli/commands/store.js +36 -14
- package/public/cli/commands/table-grant.js +44 -18
- package/public/cli/commands/table-template-module.js +44 -18
- package/public/cli/commands/table.js +64 -28
- package/public/cli/commands/trigger-function.js +38 -15
- package/public/cli/commands/trigger.js +52 -22
- package/public/cli/commands/unique-constraint.js +54 -23
- package/public/cli/commands/user-auth-module.js +78 -35
- package/public/cli/commands/user.js +80 -16
- package/public/cli/commands/users-module.js +40 -16
- package/public/cli/commands/view-grant.js +40 -16
- package/public/cli/commands/view-rule.js +38 -15
- package/public/cli/commands/view-table.js +34 -13
- package/public/cli/commands/view.js +58 -25
- package/public/cli/commands.js +3 -3
- package/public/cli/executor.d.ts +1 -1
- package/public/cli/utils.d.ts +38 -0
- package/public/cli/utils.js +96 -0
- package/public/orm/index.d.ts +2 -2
- package/public/orm/index.js +2 -2
- package/public/orm/input-types.d.ts +161 -147
- package/public/orm/models/index.d.ts +1 -1
- package/public/orm/models/index.js +4 -4
|
@@ -22,7 +22,7 @@ const fieldSchema = {
|
|
|
22
22
|
createdAt: 'string',
|
|
23
23
|
updatedAt: 'string',
|
|
24
24
|
};
|
|
25
|
-
const usage = '\ninvite <command>\n\nCommands:\n list List
|
|
25
|
+
const usage = '\ninvite <command>\n\nCommands:\n list List invite records\n find-first Find first matching invite record\n get Get a invite by ID\n create Create a new invite\n update Update an existing invite\n delete Delete a invite\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';
|
|
26
26
|
exports.default = async (argv, prompter, _options) => {
|
|
27
27
|
if (argv.help || argv.h) {
|
|
28
28
|
console.log(usage);
|
|
@@ -35,7 +35,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
35
35
|
type: 'autocomplete',
|
|
36
36
|
name: 'subcommand',
|
|
37
37
|
message: 'What do you want to do?',
|
|
38
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
38
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
39
39
|
},
|
|
40
40
|
]);
|
|
41
41
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -46,6 +46,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
46
46
|
switch (subcommand) {
|
|
47
47
|
case 'list':
|
|
48
48
|
return handleList(argv, prompter);
|
|
49
|
+
case 'find-first':
|
|
50
|
+
return handleFindFirst(argv, prompter);
|
|
49
51
|
case 'get':
|
|
50
52
|
return handleGet(argv, prompter);
|
|
51
53
|
case 'create':
|
|
@@ -59,27 +61,25 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
59
61
|
process.exit(1);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
|
-
async function handleList(
|
|
64
|
+
async function handleList(argv, _prompter) {
|
|
63
65
|
try {
|
|
66
|
+
const defaultSelect = {
|
|
67
|
+
id: true,
|
|
68
|
+
email: true,
|
|
69
|
+
senderId: true,
|
|
70
|
+
inviteToken: true,
|
|
71
|
+
inviteValid: true,
|
|
72
|
+
inviteLimit: true,
|
|
73
|
+
inviteCount: true,
|
|
74
|
+
multiple: true,
|
|
75
|
+
data: true,
|
|
76
|
+
expiresAt: true,
|
|
77
|
+
createdAt: true,
|
|
78
|
+
updatedAt: true,
|
|
79
|
+
};
|
|
80
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
64
81
|
const client = (0, executor_1.getClient)();
|
|
65
|
-
const result = await client.invite
|
|
66
|
-
.findMany({
|
|
67
|
-
select: {
|
|
68
|
-
id: true,
|
|
69
|
-
email: true,
|
|
70
|
-
senderId: true,
|
|
71
|
-
inviteToken: true,
|
|
72
|
-
inviteValid: true,
|
|
73
|
-
inviteLimit: true,
|
|
74
|
-
inviteCount: true,
|
|
75
|
-
multiple: true,
|
|
76
|
-
data: true,
|
|
77
|
-
expiresAt: true,
|
|
78
|
-
createdAt: true,
|
|
79
|
-
updatedAt: true,
|
|
80
|
-
},
|
|
81
|
-
})
|
|
82
|
-
.execute();
|
|
82
|
+
const result = await client.invite.findMany(findManyArgs).execute();
|
|
83
83
|
console.log(JSON.stringify(result, null, 2));
|
|
84
84
|
}
|
|
85
85
|
catch (error) {
|
|
@@ -90,6 +90,35 @@ async function handleList(_argv, _prompter) {
|
|
|
90
90
|
process.exit(1);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
async function handleFindFirst(argv, _prompter) {
|
|
94
|
+
try {
|
|
95
|
+
const defaultSelect = {
|
|
96
|
+
id: true,
|
|
97
|
+
email: true,
|
|
98
|
+
senderId: true,
|
|
99
|
+
inviteToken: true,
|
|
100
|
+
inviteValid: true,
|
|
101
|
+
inviteLimit: true,
|
|
102
|
+
inviteCount: true,
|
|
103
|
+
multiple: true,
|
|
104
|
+
data: true,
|
|
105
|
+
expiresAt: true,
|
|
106
|
+
createdAt: true,
|
|
107
|
+
updatedAt: true,
|
|
108
|
+
};
|
|
109
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
110
|
+
const client = (0, executor_1.getClient)();
|
|
111
|
+
const result = await client.invite.findFirst(findFirstArgs).execute();
|
|
112
|
+
console.log(JSON.stringify(result, null, 2));
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
console.error('Failed to find record.');
|
|
116
|
+
if (error instanceof Error) {
|
|
117
|
+
console.error(error.message);
|
|
118
|
+
}
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
93
122
|
async function handleGet(argv, prompter) {
|
|
94
123
|
try {
|
|
95
124
|
const answers = await prompter.prompt(argv, [
|
|
@@ -14,7 +14,7 @@ const fieldSchema = {
|
|
|
14
14
|
description: 'string',
|
|
15
15
|
prefix: 'string',
|
|
16
16
|
};
|
|
17
|
-
const usage = '\nmembership-type <command>\n\nCommands:\n list List
|
|
17
|
+
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
18
|
exports.default = async (argv, prompter, _options) => {
|
|
19
19
|
if (argv.help || argv.h) {
|
|
20
20
|
console.log(usage);
|
|
@@ -27,7 +27,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
27
27
|
type: 'autocomplete',
|
|
28
28
|
name: 'subcommand',
|
|
29
29
|
message: 'What do you want to do?',
|
|
30
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
30
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
31
31
|
},
|
|
32
32
|
]);
|
|
33
33
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -38,6 +38,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
38
38
|
switch (subcommand) {
|
|
39
39
|
case 'list':
|
|
40
40
|
return handleList(argv, prompter);
|
|
41
|
+
case 'find-first':
|
|
42
|
+
return handleFindFirst(argv, prompter);
|
|
41
43
|
case 'get':
|
|
42
44
|
return handleGet(argv, prompter);
|
|
43
45
|
case 'create':
|
|
@@ -51,19 +53,17 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
51
53
|
process.exit(1);
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
async function handleList(
|
|
56
|
+
async function handleList(argv, _prompter) {
|
|
55
57
|
try {
|
|
58
|
+
const defaultSelect = {
|
|
59
|
+
id: true,
|
|
60
|
+
name: true,
|
|
61
|
+
description: true,
|
|
62
|
+
prefix: true,
|
|
63
|
+
};
|
|
64
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
56
65
|
const client = (0, executor_1.getClient)();
|
|
57
|
-
const result = await client.membershipType
|
|
58
|
-
.findMany({
|
|
59
|
-
select: {
|
|
60
|
-
id: true,
|
|
61
|
-
name: true,
|
|
62
|
-
description: true,
|
|
63
|
-
prefix: true,
|
|
64
|
-
},
|
|
65
|
-
})
|
|
66
|
-
.execute();
|
|
66
|
+
const result = await client.membershipType.findMany(findManyArgs).execute();
|
|
67
67
|
console.log(JSON.stringify(result, null, 2));
|
|
68
68
|
}
|
|
69
69
|
catch (error) {
|
|
@@ -74,6 +74,27 @@ async function handleList(_argv, _prompter) {
|
|
|
74
74
|
process.exit(1);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
async function handleFindFirst(argv, _prompter) {
|
|
78
|
+
try {
|
|
79
|
+
const defaultSelect = {
|
|
80
|
+
id: true,
|
|
81
|
+
name: true,
|
|
82
|
+
description: true,
|
|
83
|
+
prefix: true,
|
|
84
|
+
};
|
|
85
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
86
|
+
const client = (0, executor_1.getClient)();
|
|
87
|
+
const result = await client.membershipType.findFirst(findFirstArgs).execute();
|
|
88
|
+
console.log(JSON.stringify(result, null, 2));
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
console.error('Failed to find record.');
|
|
92
|
+
if (error instanceof Error) {
|
|
93
|
+
console.error(error.message);
|
|
94
|
+
}
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
77
98
|
async function handleGet(argv, prompter) {
|
|
78
99
|
try {
|
|
79
100
|
const answers = await prompter.prompt(argv, [
|
|
@@ -17,7 +17,7 @@ const fieldSchema = {
|
|
|
17
17
|
createdAt: 'string',
|
|
18
18
|
updatedAt: 'string',
|
|
19
19
|
};
|
|
20
|
-
const usage = '\norg-admin-grant <command>\n\nCommands:\n list List
|
|
20
|
+
const usage = '\norg-admin-grant <command>\n\nCommands:\n list List orgAdminGrant records\n find-first Find first matching orgAdminGrant record\n get Get a orgAdminGrant by ID\n create Create a new orgAdminGrant\n update Update an existing orgAdminGrant\n delete Delete a orgAdminGrant\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';
|
|
21
21
|
exports.default = async (argv, prompter, _options) => {
|
|
22
22
|
if (argv.help || argv.h) {
|
|
23
23
|
console.log(usage);
|
|
@@ -30,7 +30,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
30
30
|
type: 'autocomplete',
|
|
31
31
|
name: 'subcommand',
|
|
32
32
|
message: 'What do you want to do?',
|
|
33
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
33
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
34
34
|
},
|
|
35
35
|
]);
|
|
36
36
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -41,6 +41,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
41
41
|
switch (subcommand) {
|
|
42
42
|
case 'list':
|
|
43
43
|
return handleList(argv, prompter);
|
|
44
|
+
case 'find-first':
|
|
45
|
+
return handleFindFirst(argv, prompter);
|
|
44
46
|
case 'get':
|
|
45
47
|
return handleGet(argv, prompter);
|
|
46
48
|
case 'create':
|
|
@@ -54,22 +56,20 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
54
56
|
process.exit(1);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
async function handleList(
|
|
59
|
+
async function handleList(argv, _prompter) {
|
|
58
60
|
try {
|
|
61
|
+
const defaultSelect = {
|
|
62
|
+
id: true,
|
|
63
|
+
isGrant: true,
|
|
64
|
+
actorId: true,
|
|
65
|
+
entityId: true,
|
|
66
|
+
grantorId: true,
|
|
67
|
+
createdAt: true,
|
|
68
|
+
updatedAt: true,
|
|
69
|
+
};
|
|
70
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
59
71
|
const client = (0, executor_1.getClient)();
|
|
60
|
-
const result = await client.orgAdminGrant
|
|
61
|
-
.findMany({
|
|
62
|
-
select: {
|
|
63
|
-
id: true,
|
|
64
|
-
isGrant: true,
|
|
65
|
-
actorId: true,
|
|
66
|
-
entityId: true,
|
|
67
|
-
grantorId: true,
|
|
68
|
-
createdAt: true,
|
|
69
|
-
updatedAt: true,
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
.execute();
|
|
72
|
+
const result = await client.orgAdminGrant.findMany(findManyArgs).execute();
|
|
73
73
|
console.log(JSON.stringify(result, null, 2));
|
|
74
74
|
}
|
|
75
75
|
catch (error) {
|
|
@@ -80,6 +80,30 @@ async function handleList(_argv, _prompter) {
|
|
|
80
80
|
process.exit(1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
async function handleFindFirst(argv, _prompter) {
|
|
84
|
+
try {
|
|
85
|
+
const defaultSelect = {
|
|
86
|
+
id: true,
|
|
87
|
+
isGrant: true,
|
|
88
|
+
actorId: true,
|
|
89
|
+
entityId: true,
|
|
90
|
+
grantorId: true,
|
|
91
|
+
createdAt: true,
|
|
92
|
+
updatedAt: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.orgAdminGrant.findFirst(findFirstArgs).execute();
|
|
97
|
+
console.log(JSON.stringify(result, null, 2));
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error('Failed to find record.');
|
|
101
|
+
if (error instanceof Error) {
|
|
102
|
+
console.error(error.message);
|
|
103
|
+
}
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
83
107
|
async function handleGet(argv, prompter) {
|
|
84
108
|
try {
|
|
85
109
|
const answers = await prompter.prompt(argv, [
|
|
@@ -19,7 +19,7 @@ const fieldSchema = {
|
|
|
19
19
|
positionLevel: 'int',
|
|
20
20
|
createdAt: 'string',
|
|
21
21
|
};
|
|
22
|
-
const usage = '\norg-chart-edge-grant <command>\n\nCommands:\n list List
|
|
22
|
+
const usage = '\norg-chart-edge-grant <command>\n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\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';
|
|
23
23
|
exports.default = async (argv, prompter, _options) => {
|
|
24
24
|
if (argv.help || argv.h) {
|
|
25
25
|
console.log(usage);
|
|
@@ -32,7 +32,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
32
32
|
type: 'autocomplete',
|
|
33
33
|
name: 'subcommand',
|
|
34
34
|
message: 'What do you want to do?',
|
|
35
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
35
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
36
36
|
},
|
|
37
37
|
]);
|
|
38
38
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -43,6 +43,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
43
43
|
switch (subcommand) {
|
|
44
44
|
case 'list':
|
|
45
45
|
return handleList(argv, prompter);
|
|
46
|
+
case 'find-first':
|
|
47
|
+
return handleFindFirst(argv, prompter);
|
|
46
48
|
case 'get':
|
|
47
49
|
return handleGet(argv, prompter);
|
|
48
50
|
case 'create':
|
|
@@ -56,24 +58,22 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
56
58
|
process.exit(1);
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
|
-
async function handleList(
|
|
61
|
+
async function handleList(argv, _prompter) {
|
|
60
62
|
try {
|
|
63
|
+
const defaultSelect = {
|
|
64
|
+
id: true,
|
|
65
|
+
entityId: true,
|
|
66
|
+
childId: true,
|
|
67
|
+
parentId: true,
|
|
68
|
+
grantorId: true,
|
|
69
|
+
isGrant: true,
|
|
70
|
+
positionTitle: true,
|
|
71
|
+
positionLevel: true,
|
|
72
|
+
createdAt: true,
|
|
73
|
+
};
|
|
74
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
61
75
|
const client = (0, executor_1.getClient)();
|
|
62
|
-
const result = await client.orgChartEdgeGrant
|
|
63
|
-
.findMany({
|
|
64
|
-
select: {
|
|
65
|
-
id: true,
|
|
66
|
-
entityId: true,
|
|
67
|
-
childId: true,
|
|
68
|
-
parentId: true,
|
|
69
|
-
grantorId: true,
|
|
70
|
-
isGrant: true,
|
|
71
|
-
positionTitle: true,
|
|
72
|
-
positionLevel: true,
|
|
73
|
-
createdAt: true,
|
|
74
|
-
},
|
|
75
|
-
})
|
|
76
|
-
.execute();
|
|
76
|
+
const result = await client.orgChartEdgeGrant.findMany(findManyArgs).execute();
|
|
77
77
|
console.log(JSON.stringify(result, null, 2));
|
|
78
78
|
}
|
|
79
79
|
catch (error) {
|
|
@@ -84,6 +84,32 @@ async function handleList(_argv, _prompter) {
|
|
|
84
84
|
process.exit(1);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
async function handleFindFirst(argv, _prompter) {
|
|
88
|
+
try {
|
|
89
|
+
const defaultSelect = {
|
|
90
|
+
id: true,
|
|
91
|
+
entityId: true,
|
|
92
|
+
childId: true,
|
|
93
|
+
parentId: true,
|
|
94
|
+
grantorId: true,
|
|
95
|
+
isGrant: true,
|
|
96
|
+
positionTitle: true,
|
|
97
|
+
positionLevel: true,
|
|
98
|
+
createdAt: true,
|
|
99
|
+
};
|
|
100
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
101
|
+
const client = (0, executor_1.getClient)();
|
|
102
|
+
const result = await client.orgChartEdgeGrant.findFirst(findFirstArgs).execute();
|
|
103
|
+
console.log(JSON.stringify(result, null, 2));
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error('Failed to find record.');
|
|
107
|
+
if (error instanceof Error) {
|
|
108
|
+
console.error(error.message);
|
|
109
|
+
}
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
87
113
|
async function handleGet(argv, prompter) {
|
|
88
114
|
try {
|
|
89
115
|
const answers = await prompter.prompt(argv, [
|
|
@@ -18,7 +18,7 @@ const fieldSchema = {
|
|
|
18
18
|
positionTitle: 'string',
|
|
19
19
|
positionLevel: 'int',
|
|
20
20
|
};
|
|
21
|
-
const usage = '\norg-chart-edge <command>\n\nCommands:\n list List
|
|
21
|
+
const usage = '\norg-chart-edge <command>\n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\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
22
|
exports.default = async (argv, prompter, _options) => {
|
|
23
23
|
if (argv.help || argv.h) {
|
|
24
24
|
console.log(usage);
|
|
@@ -31,7 +31,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
31
31
|
type: 'autocomplete',
|
|
32
32
|
name: 'subcommand',
|
|
33
33
|
message: 'What do you want to do?',
|
|
34
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
34
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
35
35
|
},
|
|
36
36
|
]);
|
|
37
37
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -42,6 +42,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
42
42
|
switch (subcommand) {
|
|
43
43
|
case 'list':
|
|
44
44
|
return handleList(argv, prompter);
|
|
45
|
+
case 'find-first':
|
|
46
|
+
return handleFindFirst(argv, prompter);
|
|
45
47
|
case 'get':
|
|
46
48
|
return handleGet(argv, prompter);
|
|
47
49
|
case 'create':
|
|
@@ -55,23 +57,21 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
55
57
|
process.exit(1);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
|
-
async function handleList(
|
|
60
|
+
async function handleList(argv, _prompter) {
|
|
59
61
|
try {
|
|
62
|
+
const defaultSelect = {
|
|
63
|
+
id: true,
|
|
64
|
+
createdAt: true,
|
|
65
|
+
updatedAt: true,
|
|
66
|
+
entityId: true,
|
|
67
|
+
childId: true,
|
|
68
|
+
parentId: true,
|
|
69
|
+
positionTitle: true,
|
|
70
|
+
positionLevel: true,
|
|
71
|
+
};
|
|
72
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
60
73
|
const client = (0, executor_1.getClient)();
|
|
61
|
-
const result = await client.orgChartEdge
|
|
62
|
-
.findMany({
|
|
63
|
-
select: {
|
|
64
|
-
id: true,
|
|
65
|
-
createdAt: true,
|
|
66
|
-
updatedAt: true,
|
|
67
|
-
entityId: true,
|
|
68
|
-
childId: true,
|
|
69
|
-
parentId: true,
|
|
70
|
-
positionTitle: true,
|
|
71
|
-
positionLevel: true,
|
|
72
|
-
},
|
|
73
|
-
})
|
|
74
|
-
.execute();
|
|
74
|
+
const result = await client.orgChartEdge.findMany(findManyArgs).execute();
|
|
75
75
|
console.log(JSON.stringify(result, null, 2));
|
|
76
76
|
}
|
|
77
77
|
catch (error) {
|
|
@@ -82,6 +82,31 @@ async function handleList(_argv, _prompter) {
|
|
|
82
82
|
process.exit(1);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
async function handleFindFirst(argv, _prompter) {
|
|
86
|
+
try {
|
|
87
|
+
const defaultSelect = {
|
|
88
|
+
id: true,
|
|
89
|
+
createdAt: true,
|
|
90
|
+
updatedAt: true,
|
|
91
|
+
entityId: true,
|
|
92
|
+
childId: true,
|
|
93
|
+
parentId: true,
|
|
94
|
+
positionTitle: true,
|
|
95
|
+
positionLevel: true,
|
|
96
|
+
};
|
|
97
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
98
|
+
const client = (0, executor_1.getClient)();
|
|
99
|
+
const result = await client.orgChartEdge.findFirst(findFirstArgs).execute();
|
|
100
|
+
console.log(JSON.stringify(result, null, 2));
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.error('Failed to find record.');
|
|
104
|
+
if (error instanceof Error) {
|
|
105
|
+
console.error(error.message);
|
|
106
|
+
}
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
85
110
|
async function handleGet(argv, prompter) {
|
|
86
111
|
try {
|
|
87
112
|
const answers = await prompter.prompt(argv, [
|
|
@@ -17,7 +17,7 @@ const fieldSchema = {
|
|
|
17
17
|
updatedAt: 'string',
|
|
18
18
|
entityId: 'uuid',
|
|
19
19
|
};
|
|
20
|
-
const usage = '\norg-claimed-invite <command>\n\nCommands:\n list List
|
|
20
|
+
const usage = '\norg-claimed-invite <command>\n\nCommands:\n list List orgClaimedInvite records\n find-first Find first matching orgClaimedInvite record\n get Get a orgClaimedInvite by ID\n create Create a new orgClaimedInvite\n update Update an existing orgClaimedInvite\n delete Delete a orgClaimedInvite\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';
|
|
21
21
|
exports.default = async (argv, prompter, _options) => {
|
|
22
22
|
if (argv.help || argv.h) {
|
|
23
23
|
console.log(usage);
|
|
@@ -30,7 +30,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
30
30
|
type: 'autocomplete',
|
|
31
31
|
name: 'subcommand',
|
|
32
32
|
message: 'What do you want to do?',
|
|
33
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
33
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
34
34
|
},
|
|
35
35
|
]);
|
|
36
36
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -41,6 +41,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
41
41
|
switch (subcommand) {
|
|
42
42
|
case 'list':
|
|
43
43
|
return handleList(argv, prompter);
|
|
44
|
+
case 'find-first':
|
|
45
|
+
return handleFindFirst(argv, prompter);
|
|
44
46
|
case 'get':
|
|
45
47
|
return handleGet(argv, prompter);
|
|
46
48
|
case 'create':
|
|
@@ -54,22 +56,20 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
54
56
|
process.exit(1);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
async function handleList(
|
|
59
|
+
async function handleList(argv, _prompter) {
|
|
58
60
|
try {
|
|
61
|
+
const defaultSelect = {
|
|
62
|
+
id: true,
|
|
63
|
+
data: true,
|
|
64
|
+
senderId: true,
|
|
65
|
+
receiverId: true,
|
|
66
|
+
createdAt: true,
|
|
67
|
+
updatedAt: true,
|
|
68
|
+
entityId: true,
|
|
69
|
+
};
|
|
70
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
59
71
|
const client = (0, executor_1.getClient)();
|
|
60
|
-
const result = await client.orgClaimedInvite
|
|
61
|
-
.findMany({
|
|
62
|
-
select: {
|
|
63
|
-
id: true,
|
|
64
|
-
data: true,
|
|
65
|
-
senderId: true,
|
|
66
|
-
receiverId: true,
|
|
67
|
-
createdAt: true,
|
|
68
|
-
updatedAt: true,
|
|
69
|
-
entityId: true,
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
.execute();
|
|
72
|
+
const result = await client.orgClaimedInvite.findMany(findManyArgs).execute();
|
|
73
73
|
console.log(JSON.stringify(result, null, 2));
|
|
74
74
|
}
|
|
75
75
|
catch (error) {
|
|
@@ -80,6 +80,30 @@ async function handleList(_argv, _prompter) {
|
|
|
80
80
|
process.exit(1);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
async function handleFindFirst(argv, _prompter) {
|
|
84
|
+
try {
|
|
85
|
+
const defaultSelect = {
|
|
86
|
+
id: true,
|
|
87
|
+
data: true,
|
|
88
|
+
senderId: true,
|
|
89
|
+
receiverId: true,
|
|
90
|
+
createdAt: true,
|
|
91
|
+
updatedAt: true,
|
|
92
|
+
entityId: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.orgClaimedInvite.findFirst(findFirstArgs).execute();
|
|
97
|
+
console.log(JSON.stringify(result, null, 2));
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error('Failed to find record.');
|
|
101
|
+
if (error instanceof Error) {
|
|
102
|
+
console.error(error.message);
|
|
103
|
+
}
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
83
107
|
async function handleGet(argv, prompter) {
|
|
84
108
|
try {
|
|
85
109
|
const answers = await prompter.prompt(argv, [
|
|
@@ -12,7 +12,7 @@ const fieldSchema = {
|
|
|
12
12
|
userId: 'uuid',
|
|
13
13
|
depth: 'int',
|
|
14
14
|
};
|
|
15
|
-
const usage = '\norg-get-managers-record <command>\n\nCommands:\n list List
|
|
15
|
+
const usage = '\norg-get-managers-record <command>\n\nCommands:\n list List orgGetManagersRecord records\n find-first Find first matching orgGetManagersRecord record\n create Create a new orgGetManagersRecord\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';
|
|
16
16
|
exports.default = async (argv, prompter, _options) => {
|
|
17
17
|
if (argv.help || argv.h) {
|
|
18
18
|
console.log(usage);
|
|
@@ -25,7 +25,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
25
25
|
type: 'autocomplete',
|
|
26
26
|
name: 'subcommand',
|
|
27
27
|
message: 'What do you want to do?',
|
|
28
|
-
options: ['list', 'create'],
|
|
28
|
+
options: ['list', 'find-first', 'create'],
|
|
29
29
|
},
|
|
30
30
|
]);
|
|
31
31
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -36,6 +36,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
36
36
|
switch (subcommand) {
|
|
37
37
|
case 'list':
|
|
38
38
|
return handleList(argv, prompter);
|
|
39
|
+
case 'find-first':
|
|
40
|
+
return handleFindFirst(argv, prompter);
|
|
39
41
|
case 'create':
|
|
40
42
|
return handleCreate(argv, prompter);
|
|
41
43
|
default:
|
|
@@ -43,17 +45,15 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
43
45
|
process.exit(1);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
|
-
async function handleList(
|
|
48
|
+
async function handleList(argv, _prompter) {
|
|
47
49
|
try {
|
|
50
|
+
const defaultSelect = {
|
|
51
|
+
userId: true,
|
|
52
|
+
depth: true,
|
|
53
|
+
};
|
|
54
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
48
55
|
const client = (0, executor_1.getClient)();
|
|
49
|
-
const result = await client.orgGetManagersRecord
|
|
50
|
-
.findMany({
|
|
51
|
-
select: {
|
|
52
|
-
userId: true,
|
|
53
|
-
depth: true,
|
|
54
|
-
},
|
|
55
|
-
})
|
|
56
|
-
.execute();
|
|
56
|
+
const result = await client.orgGetManagersRecord.findMany(findManyArgs).execute();
|
|
57
57
|
console.log(JSON.stringify(result, null, 2));
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
@@ -64,6 +64,25 @@ async function handleList(_argv, _prompter) {
|
|
|
64
64
|
process.exit(1);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
async function handleFindFirst(argv, _prompter) {
|
|
68
|
+
try {
|
|
69
|
+
const defaultSelect = {
|
|
70
|
+
userId: true,
|
|
71
|
+
depth: true,
|
|
72
|
+
};
|
|
73
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
74
|
+
const client = (0, executor_1.getClient)();
|
|
75
|
+
const result = await client.orgGetManagersRecord.findFirst(findFirstArgs).execute();
|
|
76
|
+
console.log(JSON.stringify(result, null, 2));
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
console.error('Failed to find record.');
|
|
80
|
+
if (error instanceof Error) {
|
|
81
|
+
console.error(error.message);
|
|
82
|
+
}
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
67
86
|
async function handleCreate(argv, prompter) {
|
|
68
87
|
try {
|
|
69
88
|
const rawAnswers = await prompter.prompt(argv, [
|