@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
|
@@ -17,7 +17,7 @@ const fieldSchema = {
|
|
|
17
17
|
typeTableId: 'uuid',
|
|
18
18
|
typeTableName: 'string',
|
|
19
19
|
};
|
|
20
|
-
const usage = '\nusers-module <command>\n\nCommands:\n list List
|
|
20
|
+
const usage = '\nusers-module <command>\n\nCommands:\n list List usersModule records\n find-first Find first matching usersModule record\n get Get a usersModule by ID\n create Create a new usersModule\n update Update an existing usersModule\n delete Delete a usersModule\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
|
+
databaseId: true,
|
|
64
|
+
schemaId: true,
|
|
65
|
+
tableId: true,
|
|
66
|
+
tableName: true,
|
|
67
|
+
typeTableId: true,
|
|
68
|
+
typeTableName: true,
|
|
69
|
+
};
|
|
70
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
59
71
|
const client = (0, executor_1.getClient)();
|
|
60
|
-
const result = await client.usersModule
|
|
61
|
-
.findMany({
|
|
62
|
-
select: {
|
|
63
|
-
id: true,
|
|
64
|
-
databaseId: true,
|
|
65
|
-
schemaId: true,
|
|
66
|
-
tableId: true,
|
|
67
|
-
tableName: true,
|
|
68
|
-
typeTableId: true,
|
|
69
|
-
typeTableName: true,
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
.execute();
|
|
72
|
+
const result = await client.usersModule.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
|
+
databaseId: true,
|
|
88
|
+
schemaId: true,
|
|
89
|
+
tableId: true,
|
|
90
|
+
tableName: true,
|
|
91
|
+
typeTableId: true,
|
|
92
|
+
typeTableName: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.usersModule.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, [
|
|
@@ -17,7 +17,7 @@ const fieldSchema = {
|
|
|
17
17
|
withGrantOption: 'boolean',
|
|
18
18
|
isGrant: 'boolean',
|
|
19
19
|
};
|
|
20
|
-
const usage = '\nview-grant <command>\n\nCommands:\n list List
|
|
20
|
+
const usage = '\nview-grant <command>\n\nCommands:\n list List viewGrant records\n find-first Find first matching viewGrant record\n get Get a viewGrant by ID\n create Create a new viewGrant\n update Update an existing viewGrant\n delete Delete a viewGrant\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
|
+
databaseId: true,
|
|
64
|
+
viewId: true,
|
|
65
|
+
granteeName: true,
|
|
66
|
+
privilege: true,
|
|
67
|
+
withGrantOption: true,
|
|
68
|
+
isGrant: true,
|
|
69
|
+
};
|
|
70
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
59
71
|
const client = (0, executor_1.getClient)();
|
|
60
|
-
const result = await client.viewGrant
|
|
61
|
-
.findMany({
|
|
62
|
-
select: {
|
|
63
|
-
id: true,
|
|
64
|
-
databaseId: true,
|
|
65
|
-
viewId: true,
|
|
66
|
-
granteeName: true,
|
|
67
|
-
privilege: true,
|
|
68
|
-
withGrantOption: true,
|
|
69
|
-
isGrant: true,
|
|
70
|
-
},
|
|
71
|
-
})
|
|
72
|
-
.execute();
|
|
72
|
+
const result = await client.viewGrant.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
|
+
databaseId: true,
|
|
88
|
+
viewId: true,
|
|
89
|
+
granteeName: true,
|
|
90
|
+
privilege: true,
|
|
91
|
+
withGrantOption: true,
|
|
92
|
+
isGrant: true,
|
|
93
|
+
};
|
|
94
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
95
|
+
const client = (0, executor_1.getClient)();
|
|
96
|
+
const result = await client.viewGrant.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, [
|
|
@@ -16,7 +16,7 @@ const fieldSchema = {
|
|
|
16
16
|
event: 'string',
|
|
17
17
|
action: 'string',
|
|
18
18
|
};
|
|
19
|
-
const usage = '\nview-rule <command>\n\nCommands:\n list List
|
|
19
|
+
const usage = '\nview-rule <command>\n\nCommands:\n list List viewRule records\n find-first Find first matching viewRule record\n get Get a viewRule by ID\n create Create a new viewRule\n update Update an existing viewRule\n delete Delete a viewRule\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';
|
|
20
20
|
exports.default = async (argv, prompter, _options) => {
|
|
21
21
|
if (argv.help || argv.h) {
|
|
22
22
|
console.log(usage);
|
|
@@ -29,7 +29,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
29
29
|
type: 'autocomplete',
|
|
30
30
|
name: 'subcommand',
|
|
31
31
|
message: 'What do you want to do?',
|
|
32
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
32
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
33
33
|
},
|
|
34
34
|
]);
|
|
35
35
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -40,6 +40,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
40
40
|
switch (subcommand) {
|
|
41
41
|
case 'list':
|
|
42
42
|
return handleList(argv, prompter);
|
|
43
|
+
case 'find-first':
|
|
44
|
+
return handleFindFirst(argv, prompter);
|
|
43
45
|
case 'get':
|
|
44
46
|
return handleGet(argv, prompter);
|
|
45
47
|
case 'create':
|
|
@@ -53,21 +55,19 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
53
55
|
process.exit(1);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
async function handleList(
|
|
58
|
+
async function handleList(argv, _prompter) {
|
|
57
59
|
try {
|
|
60
|
+
const defaultSelect = {
|
|
61
|
+
id: true,
|
|
62
|
+
databaseId: true,
|
|
63
|
+
viewId: true,
|
|
64
|
+
name: true,
|
|
65
|
+
event: true,
|
|
66
|
+
action: true,
|
|
67
|
+
};
|
|
68
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
58
69
|
const client = (0, executor_1.getClient)();
|
|
59
|
-
const result = await client.viewRule
|
|
60
|
-
.findMany({
|
|
61
|
-
select: {
|
|
62
|
-
id: true,
|
|
63
|
-
databaseId: true,
|
|
64
|
-
viewId: true,
|
|
65
|
-
name: true,
|
|
66
|
-
event: true,
|
|
67
|
-
action: true,
|
|
68
|
-
},
|
|
69
|
-
})
|
|
70
|
-
.execute();
|
|
70
|
+
const result = await client.viewRule.findMany(findManyArgs).execute();
|
|
71
71
|
console.log(JSON.stringify(result, null, 2));
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
@@ -78,6 +78,29 @@ async function handleList(_argv, _prompter) {
|
|
|
78
78
|
process.exit(1);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
async function handleFindFirst(argv, _prompter) {
|
|
82
|
+
try {
|
|
83
|
+
const defaultSelect = {
|
|
84
|
+
id: true,
|
|
85
|
+
databaseId: true,
|
|
86
|
+
viewId: true,
|
|
87
|
+
name: true,
|
|
88
|
+
event: true,
|
|
89
|
+
action: true,
|
|
90
|
+
};
|
|
91
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
92
|
+
const client = (0, executor_1.getClient)();
|
|
93
|
+
const result = await client.viewRule.findFirst(findFirstArgs).execute();
|
|
94
|
+
console.log(JSON.stringify(result, null, 2));
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Failed to find record.');
|
|
98
|
+
if (error instanceof Error) {
|
|
99
|
+
console.error(error.message);
|
|
100
|
+
}
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
81
104
|
async function handleGet(argv, prompter) {
|
|
82
105
|
try {
|
|
83
106
|
const answers = await prompter.prompt(argv, [
|
|
@@ -14,7 +14,7 @@ const fieldSchema = {
|
|
|
14
14
|
tableId: 'uuid',
|
|
15
15
|
joinOrder: 'int',
|
|
16
16
|
};
|
|
17
|
-
const usage = '\nview-table <command>\n\nCommands:\n list List
|
|
17
|
+
const usage = '\nview-table <command>\n\nCommands:\n list List viewTable records\n find-first Find first matching viewTable record\n get Get a viewTable by ID\n create Create a new viewTable\n update Update an existing viewTable\n delete Delete a viewTable\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
|
+
viewId: true,
|
|
61
|
+
tableId: true,
|
|
62
|
+
joinOrder: true,
|
|
63
|
+
};
|
|
64
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
56
65
|
const client = (0, executor_1.getClient)();
|
|
57
|
-
const result = await client.viewTable
|
|
58
|
-
.findMany({
|
|
59
|
-
select: {
|
|
60
|
-
id: true,
|
|
61
|
-
viewId: true,
|
|
62
|
-
tableId: true,
|
|
63
|
-
joinOrder: true,
|
|
64
|
-
},
|
|
65
|
-
})
|
|
66
|
-
.execute();
|
|
66
|
+
const result = await client.viewTable.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
|
+
viewId: true,
|
|
82
|
+
tableId: true,
|
|
83
|
+
joinOrder: true,
|
|
84
|
+
};
|
|
85
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
86
|
+
const client = (0, executor_1.getClient)();
|
|
87
|
+
const result = await client.viewTable.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, [
|
|
@@ -26,7 +26,7 @@ const fieldSchema = {
|
|
|
26
26
|
scope: 'int',
|
|
27
27
|
tags: 'string',
|
|
28
28
|
};
|
|
29
|
-
const usage = '\nview <command>\n\nCommands:\n list List
|
|
29
|
+
const usage = '\nview <command>\n\nCommands:\n list List view records\n find-first Find first matching view record\n get Get a view by ID\n create Create a new view\n update Update an existing view\n delete Delete a view\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';
|
|
30
30
|
exports.default = async (argv, prompter, _options) => {
|
|
31
31
|
if (argv.help || argv.h) {
|
|
32
32
|
console.log(usage);
|
|
@@ -39,7 +39,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
39
39
|
type: 'autocomplete',
|
|
40
40
|
name: 'subcommand',
|
|
41
41
|
message: 'What do you want to do?',
|
|
42
|
-
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
42
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
43
43
|
},
|
|
44
44
|
]);
|
|
45
45
|
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
@@ -50,6 +50,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
50
50
|
switch (subcommand) {
|
|
51
51
|
case 'list':
|
|
52
52
|
return handleList(argv, prompter);
|
|
53
|
+
case 'find-first':
|
|
54
|
+
return handleFindFirst(argv, prompter);
|
|
53
55
|
case 'get':
|
|
54
56
|
return handleGet(argv, prompter);
|
|
55
57
|
case 'create':
|
|
@@ -63,31 +65,29 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
|
63
65
|
process.exit(1);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
async function handleList(
|
|
68
|
+
async function handleList(argv, _prompter) {
|
|
67
69
|
try {
|
|
70
|
+
const defaultSelect = {
|
|
71
|
+
id: true,
|
|
72
|
+
databaseId: true,
|
|
73
|
+
schemaId: true,
|
|
74
|
+
name: true,
|
|
75
|
+
tableId: true,
|
|
76
|
+
viewType: true,
|
|
77
|
+
data: true,
|
|
78
|
+
filterType: true,
|
|
79
|
+
filterData: true,
|
|
80
|
+
securityInvoker: true,
|
|
81
|
+
isReadOnly: true,
|
|
82
|
+
smartTags: true,
|
|
83
|
+
category: true,
|
|
84
|
+
module: true,
|
|
85
|
+
scope: true,
|
|
86
|
+
tags: true,
|
|
87
|
+
};
|
|
88
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
68
89
|
const client = (0, executor_1.getClient)();
|
|
69
|
-
const result = await client.view
|
|
70
|
-
.findMany({
|
|
71
|
-
select: {
|
|
72
|
-
id: true,
|
|
73
|
-
databaseId: true,
|
|
74
|
-
schemaId: true,
|
|
75
|
-
name: true,
|
|
76
|
-
tableId: true,
|
|
77
|
-
viewType: true,
|
|
78
|
-
data: true,
|
|
79
|
-
filterType: true,
|
|
80
|
-
filterData: true,
|
|
81
|
-
securityInvoker: true,
|
|
82
|
-
isReadOnly: true,
|
|
83
|
-
smartTags: true,
|
|
84
|
-
category: true,
|
|
85
|
-
module: true,
|
|
86
|
-
scope: true,
|
|
87
|
-
tags: true,
|
|
88
|
-
},
|
|
89
|
-
})
|
|
90
|
-
.execute();
|
|
90
|
+
const result = await client.view.findMany(findManyArgs).execute();
|
|
91
91
|
console.log(JSON.stringify(result, null, 2));
|
|
92
92
|
}
|
|
93
93
|
catch (error) {
|
|
@@ -98,6 +98,39 @@ async function handleList(_argv, _prompter) {
|
|
|
98
98
|
process.exit(1);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
async function handleFindFirst(argv, _prompter) {
|
|
102
|
+
try {
|
|
103
|
+
const defaultSelect = {
|
|
104
|
+
id: true,
|
|
105
|
+
databaseId: true,
|
|
106
|
+
schemaId: true,
|
|
107
|
+
name: true,
|
|
108
|
+
tableId: true,
|
|
109
|
+
viewType: true,
|
|
110
|
+
data: true,
|
|
111
|
+
filterType: true,
|
|
112
|
+
filterData: true,
|
|
113
|
+
securityInvoker: true,
|
|
114
|
+
isReadOnly: true,
|
|
115
|
+
smartTags: true,
|
|
116
|
+
category: true,
|
|
117
|
+
module: true,
|
|
118
|
+
scope: true,
|
|
119
|
+
tags: true,
|
|
120
|
+
};
|
|
121
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
122
|
+
const client = (0, executor_1.getClient)();
|
|
123
|
+
const result = await client.view.findFirst(findFirstArgs).execute();
|
|
124
|
+
console.log(JSON.stringify(result, null, 2));
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
console.error('Failed to find record.');
|
|
128
|
+
if (error instanceof Error) {
|
|
129
|
+
console.error(error.message);
|
|
130
|
+
}
|
|
131
|
+
process.exit(1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
101
134
|
async function handleGet(argv, prompter) {
|
|
102
135
|
try {
|
|
103
136
|
const answers = await prompter.prompt(argv, [
|
package/public/cli/commands.js
CHANGED
|
@@ -108,11 +108,11 @@ const role_type_1 = __importDefault(require("./commands/role-type"));
|
|
|
108
108
|
const migrate_file_1 = __importDefault(require("./commands/migrate-file"));
|
|
109
109
|
const app_limit_default_1 = __importDefault(require("./commands/app-limit-default"));
|
|
110
110
|
const org_limit_default_1 = __importDefault(require("./commands/org-limit-default"));
|
|
111
|
-
const node_type_registry_1 = __importDefault(require("./commands/node-type-registry"));
|
|
112
111
|
const membership_type_1 = __importDefault(require("./commands/membership-type"));
|
|
113
112
|
const commit_1 = __importDefault(require("./commands/commit"));
|
|
114
113
|
const app_membership_default_1 = __importDefault(require("./commands/app-membership-default"));
|
|
115
114
|
const rls_module_1 = __importDefault(require("./commands/rls-module"));
|
|
115
|
+
const node_type_registry_1 = __importDefault(require("./commands/node-type-registry"));
|
|
116
116
|
const org_membership_default_1 = __importDefault(require("./commands/org-membership-default"));
|
|
117
117
|
const sql_action_1 = __importDefault(require("./commands/sql-action"));
|
|
118
118
|
const user_1 = __importDefault(require("./commands/user"));
|
|
@@ -273,11 +273,11 @@ const createCommandMap = () => ({
|
|
|
273
273
|
'migrate-file': migrate_file_1.default,
|
|
274
274
|
'app-limit-default': app_limit_default_1.default,
|
|
275
275
|
'org-limit-default': org_limit_default_1.default,
|
|
276
|
-
'node-type-registry': node_type_registry_1.default,
|
|
277
276
|
'membership-type': membership_type_1.default,
|
|
278
277
|
commit: commit_1.default,
|
|
279
278
|
'app-membership-default': app_membership_default_1.default,
|
|
280
279
|
'rls-module': rls_module_1.default,
|
|
280
|
+
'node-type-registry': node_type_registry_1.default,
|
|
281
281
|
'org-membership-default': org_membership_default_1.default,
|
|
282
282
|
'sql-action': sql_action_1.default,
|
|
283
283
|
user: user_1.default,
|
|
@@ -340,7 +340,7 @@ const createCommandMap = () => ({
|
|
|
340
340
|
'verify-password': verify_password_1.default,
|
|
341
341
|
'verify-totp': verify_totp_1.default,
|
|
342
342
|
});
|
|
343
|
-
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n table-template-module tableTemplateModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n invite invite CRUD operations\n claimed-invite claimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n membership-type membershipType CRUD operations\n commit commit CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n sql-action sqlAction CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n submit-invite-code submitInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a draft blueprint definition. Four phases: (1) create tables with nodes[], fields, and policies[], (2) create relations between tables, (3) create indexes on table fields (supports BTREE, HNSW, GIN, GIST, BM25, etc.), (4) create full-text search configurations with weighted multi-field TSVector support. nodes[] entries can be strings or {$type, data} objects. Relations use $type for relation_type with junction config in data. Indexes reference table_ref + column name(s) and are resolved to field_ids. Full-text searches reference table_ref + tsvector field + source fields with weights/langs. Builds a ref_map of local ref names to created table UUIDs. Updates blueprint status to constructed (or failed with error_details). Returns the ref_map.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-database-with-user provisionDatabaseWithUser\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n apply-rls applyRls\n sign-in-one-time-token signInOneTimeToken\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
343
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n table-template-module tableTemplateModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n invite invite CRUD operations\n claimed-invite claimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n membership-type membershipType CRUD operations\n commit commit CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n sql-action sqlAction CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n submit-invite-code submitInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a draft blueprint definition. Four phases: (1) create tables with nodes[], fields, and policies[], (2) create relations between tables, (3) create indexes on table fields (supports BTREE, HNSW, GIN, GIST, BM25, etc.), (4) create full-text search configurations with weighted multi-field TSVector support. nodes[] entries can be strings or {$type, data} objects. Relations use $type for relation_type with junction config in data. Indexes reference table_ref + column name(s) and are resolved to field_ids. Full-text searches reference table_ref + tsvector field + source fields with weights/langs. Builds a ref_map of local ref names to created table UUIDs. Updates blueprint status to constructed (or failed with error_details). Returns the ref_map.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-database-with-user provisionDatabaseWithUser\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n apply-rls applyRls\n sign-in-one-time-token signInOneTimeToken\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
344
344
|
const commands = async (argv, prompter, options) => {
|
|
345
345
|
if (argv.help || argv.h) {
|
|
346
346
|
console.log(usage);
|
package/public/cli/executor.d.ts
CHANGED
|
@@ -96,11 +96,11 @@ export declare function getClient(contextName?: string): {
|
|
|
96
96
|
migrateFile: import("../orm").MigrateFileModel;
|
|
97
97
|
appLimitDefault: import("../orm").AppLimitDefaultModel;
|
|
98
98
|
orgLimitDefault: import("../orm").OrgLimitDefaultModel;
|
|
99
|
-
nodeTypeRegistry: import("../orm").NodeTypeRegistryModel;
|
|
100
99
|
membershipType: import("../orm").MembershipTypeModel;
|
|
101
100
|
commit: import("../orm").CommitModel;
|
|
102
101
|
appMembershipDefault: import("../orm").AppMembershipDefaultModel;
|
|
103
102
|
rlsModule: import("../orm").RlsModuleModel;
|
|
103
|
+
nodeTypeRegistry: import("../orm").NodeTypeRegistryModel;
|
|
104
104
|
orgMembershipDefault: import("../orm").OrgMembershipDefaultModel;
|
|
105
105
|
sqlAction: import("../orm").SqlActionModel;
|
|
106
106
|
user: import("../orm").UserModel;
|
package/public/cli/utils.d.ts
CHANGED
|
@@ -47,4 +47,42 @@ export declare function unflattenDotNotation(answers: Record<string, unknown>):
|
|
|
47
47
|
* @param paths - Comma-separated dot-notation field paths (e.g. 'clientMutationId,result.accessToken')
|
|
48
48
|
* @returns The nested select object for the ORM
|
|
49
49
|
*/
|
|
50
|
+
/**
|
|
51
|
+
* Parse a CLI flag as an integer.
|
|
52
|
+
* Handles minimist delivering numbers or strings depending on the input.
|
|
53
|
+
* Returns undefined when the flag is missing or not a valid number.
|
|
54
|
+
*/
|
|
55
|
+
export declare function parseIntFlag(argv: Record<string, unknown>, name: string): number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Parse a CLI flag as a string.
|
|
58
|
+
* Returns undefined when the flag is missing or not a string.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parseStringFlag(argv: Record<string, unknown>, name: string): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Parse --orderBy flag as a comma-separated list of enum values.
|
|
63
|
+
* e.g. --orderBy NAME_ASC,CREATED_AT_DESC → ['NAME_ASC', 'CREATED_AT_DESC']
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseOrderByFlag(argv: Record<string, unknown>): string[] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Parse --select flag into a select object, falling back to a default.
|
|
68
|
+
* e.g. --select id,name → { id: true, name: true }
|
|
69
|
+
*/
|
|
70
|
+
export declare function parseSelectFlag(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>): Record<string, unknown>;
|
|
71
|
+
/**
|
|
72
|
+
* Build the full findManyArgs object from CLI argv.
|
|
73
|
+
* Parses all pagination, filtering, ordering, and field selection flags
|
|
74
|
+
* in one call. Accepts an optional `extraWhere` to merge with dot-notation
|
|
75
|
+
* --where flags (used by the search handler to inject search clauses).
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const findManyArgs = parseFindManyArgs(argv, { id: true, name: true });
|
|
79
|
+
* const result = await client.user.findMany(findManyArgs).execute();
|
|
80
|
+
*/
|
|
81
|
+
export declare function parseFindManyArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>, extraWhere?: Record<string, unknown>): T;
|
|
82
|
+
/**
|
|
83
|
+
* Build findFirst args from CLI argv.
|
|
84
|
+
* Like parseFindManyArgs but only includes select, where, and condition
|
|
85
|
+
* (no pagination flags — findFirst returns the first matching record).
|
|
86
|
+
*/
|
|
87
|
+
export declare function parseFindFirstArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>): T;
|
|
50
88
|
export declare function buildSelectFromPaths(paths: string): Record<string, unknown>;
|