@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
|
@@ -102,11 +102,11 @@ import roleTypeCmd from './commands/role-type';
|
|
|
102
102
|
import migrateFileCmd from './commands/migrate-file';
|
|
103
103
|
import appLimitDefaultCmd from './commands/app-limit-default';
|
|
104
104
|
import orgLimitDefaultCmd from './commands/org-limit-default';
|
|
105
|
-
import nodeTypeRegistryCmd from './commands/node-type-registry';
|
|
106
105
|
import membershipTypeCmd from './commands/membership-type';
|
|
107
106
|
import commitCmd from './commands/commit';
|
|
108
107
|
import appMembershipDefaultCmd from './commands/app-membership-default';
|
|
109
108
|
import rlsModuleCmd from './commands/rls-module';
|
|
109
|
+
import nodeTypeRegistryCmd from './commands/node-type-registry';
|
|
110
110
|
import orgMembershipDefaultCmd from './commands/org-membership-default';
|
|
111
111
|
import sqlActionCmd from './commands/sql-action';
|
|
112
112
|
import userCmd from './commands/user';
|
|
@@ -267,11 +267,11 @@ const createCommandMap = () => ({
|
|
|
267
267
|
'migrate-file': migrateFileCmd,
|
|
268
268
|
'app-limit-default': appLimitDefaultCmd,
|
|
269
269
|
'org-limit-default': orgLimitDefaultCmd,
|
|
270
|
-
'node-type-registry': nodeTypeRegistryCmd,
|
|
271
270
|
'membership-type': membershipTypeCmd,
|
|
272
271
|
commit: commitCmd,
|
|
273
272
|
'app-membership-default': appMembershipDefaultCmd,
|
|
274
273
|
'rls-module': rlsModuleCmd,
|
|
274
|
+
'node-type-registry': nodeTypeRegistryCmd,
|
|
275
275
|
'org-membership-default': orgMembershipDefaultCmd,
|
|
276
276
|
'sql-action': sqlActionCmd,
|
|
277
277
|
user: userCmd,
|
|
@@ -334,7 +334,7 @@ const createCommandMap = () => ({
|
|
|
334
334
|
'verify-password': verifyPasswordCmd,
|
|
335
335
|
'verify-totp': verifyTotpCmd,
|
|
336
336
|
});
|
|
337
|
-
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";
|
|
337
|
+
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";
|
|
338
338
|
export const commands = async (argv, prompter, options) => {
|
|
339
339
|
if (argv.help || argv.h) {
|
|
340
340
|
console.log(usage);
|
|
@@ -96,11 +96,11 @@ export declare function getClient(contextName?: string): {
|
|
|
96
96
|
migrateFile: import("..").MigrateFileModel;
|
|
97
97
|
appLimitDefault: import("..").AppLimitDefaultModel;
|
|
98
98
|
orgLimitDefault: import("..").OrgLimitDefaultModel;
|
|
99
|
-
nodeTypeRegistry: import("..").NodeTypeRegistryModel;
|
|
100
99
|
membershipType: import("..").MembershipTypeModel;
|
|
101
100
|
commit: import("..").CommitModel;
|
|
102
101
|
appMembershipDefault: import("..").AppMembershipDefaultModel;
|
|
103
102
|
rlsModule: import("..").RlsModuleModel;
|
|
103
|
+
nodeTypeRegistry: import("..").NodeTypeRegistryModel;
|
|
104
104
|
orgMembershipDefault: import("..").OrgMembershipDefaultModel;
|
|
105
105
|
sqlAction: import("..").SqlActionModel;
|
|
106
106
|
user: import("..").UserModel;
|
|
@@ -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>;
|
package/esm/public/cli/utils.js
CHANGED
|
@@ -153,6 +153,96 @@ export function unflattenDotNotation(answers) {
|
|
|
153
153
|
* @param paths - Comma-separated dot-notation field paths (e.g. 'clientMutationId,result.accessToken')
|
|
154
154
|
* @returns The nested select object for the ORM
|
|
155
155
|
*/
|
|
156
|
+
/**
|
|
157
|
+
* Parse a CLI flag as an integer.
|
|
158
|
+
* Handles minimist delivering numbers or strings depending on the input.
|
|
159
|
+
* Returns undefined when the flag is missing or not a valid number.
|
|
160
|
+
*/
|
|
161
|
+
export function parseIntFlag(argv, name) {
|
|
162
|
+
const val = argv[name];
|
|
163
|
+
if (typeof val === 'number')
|
|
164
|
+
return val;
|
|
165
|
+
if (typeof val === 'string') {
|
|
166
|
+
const n = parseInt(val, 10);
|
|
167
|
+
return isNaN(n) ? undefined : n;
|
|
168
|
+
}
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Parse a CLI flag as a string.
|
|
173
|
+
* Returns undefined when the flag is missing or not a string.
|
|
174
|
+
*/
|
|
175
|
+
export function parseStringFlag(argv, name) {
|
|
176
|
+
const val = argv[name];
|
|
177
|
+
return typeof val === 'string' ? val : undefined;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Parse --orderBy flag as a comma-separated list of enum values.
|
|
181
|
+
* e.g. --orderBy NAME_ASC,CREATED_AT_DESC → ['NAME_ASC', 'CREATED_AT_DESC']
|
|
182
|
+
*/
|
|
183
|
+
export function parseOrderByFlag(argv) {
|
|
184
|
+
const val = argv.orderBy;
|
|
185
|
+
return typeof val === 'string' ? val.split(',') : undefined;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Parse --select flag into a select object, falling back to a default.
|
|
189
|
+
* e.g. --select id,name → { id: true, name: true }
|
|
190
|
+
*/
|
|
191
|
+
export function parseSelectFlag(argv, defaultSelect) {
|
|
192
|
+
const raw = argv.select;
|
|
193
|
+
return typeof raw === 'string' ? buildSelectFromPaths(raw) : defaultSelect;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Build the full findManyArgs object from CLI argv.
|
|
197
|
+
* Parses all pagination, filtering, ordering, and field selection flags
|
|
198
|
+
* in one call. Accepts an optional `extraWhere` to merge with dot-notation
|
|
199
|
+
* --where flags (used by the search handler to inject search clauses).
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* const findManyArgs = parseFindManyArgs(argv, { id: true, name: true });
|
|
203
|
+
* const result = await client.user.findMany(findManyArgs).execute();
|
|
204
|
+
*/
|
|
205
|
+
export function parseFindManyArgs(argv, defaultSelect, extraWhere) {
|
|
206
|
+
const limit = parseIntFlag(argv, 'limit');
|
|
207
|
+
const last = parseIntFlag(argv, 'last');
|
|
208
|
+
const offset = parseIntFlag(argv, 'offset');
|
|
209
|
+
const after = parseStringFlag(argv, 'after');
|
|
210
|
+
const before = parseStringFlag(argv, 'before');
|
|
211
|
+
const select = parseSelectFlag(argv, defaultSelect);
|
|
212
|
+
const parsed = unflattenDotNotation(argv);
|
|
213
|
+
const where = (parsed.where ?? extraWhere)
|
|
214
|
+
? { ...(extraWhere ?? {}), ...(parsed.where ?? {}) }
|
|
215
|
+
: undefined;
|
|
216
|
+
const condition = parsed.condition;
|
|
217
|
+
const orderBy = parseOrderByFlag(argv);
|
|
218
|
+
return {
|
|
219
|
+
select,
|
|
220
|
+
...(limit !== undefined ? { first: limit } : {}),
|
|
221
|
+
...(after !== undefined ? { after } : {}),
|
|
222
|
+
...(last !== undefined ? { last } : {}),
|
|
223
|
+
...(before !== undefined ? { before } : {}),
|
|
224
|
+
...(offset !== undefined ? { offset } : {}),
|
|
225
|
+
...(where !== undefined ? { where } : {}),
|
|
226
|
+
...(condition !== undefined ? { condition } : {}),
|
|
227
|
+
...(orderBy !== undefined ? { orderBy } : {}),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Build findFirst args from CLI argv.
|
|
232
|
+
* Like parseFindManyArgs but only includes select, where, and condition
|
|
233
|
+
* (no pagination flags — findFirst returns the first matching record).
|
|
234
|
+
*/
|
|
235
|
+
export function parseFindFirstArgs(argv, defaultSelect) {
|
|
236
|
+
const select = parseSelectFlag(argv, defaultSelect);
|
|
237
|
+
const parsed = unflattenDotNotation(argv);
|
|
238
|
+
const where = parsed.where;
|
|
239
|
+
const condition = parsed.condition;
|
|
240
|
+
return {
|
|
241
|
+
select,
|
|
242
|
+
...(where !== undefined ? { where } : {}),
|
|
243
|
+
...(condition !== undefined ? { condition } : {}),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
156
246
|
export function buildSelectFromPaths(paths) {
|
|
157
247
|
const result = {};
|
|
158
248
|
const trimmedPaths = paths
|
|
@@ -95,11 +95,11 @@ import { RoleTypeModel } from './models/roleType';
|
|
|
95
95
|
import { MigrateFileModel } from './models/migrateFile';
|
|
96
96
|
import { AppLimitDefaultModel } from './models/appLimitDefault';
|
|
97
97
|
import { OrgLimitDefaultModel } from './models/orgLimitDefault';
|
|
98
|
-
import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
|
|
99
98
|
import { MembershipTypeModel } from './models/membershipType';
|
|
100
99
|
import { CommitModel } from './models/commit';
|
|
101
100
|
import { AppMembershipDefaultModel } from './models/appMembershipDefault';
|
|
102
101
|
import { RlsModuleModel } from './models/rlsModule';
|
|
102
|
+
import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
|
|
103
103
|
import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
|
|
104
104
|
import { SqlActionModel } from './models/sqlAction';
|
|
105
105
|
import { UserModel } from './models/user';
|
|
@@ -234,11 +234,11 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
234
234
|
migrateFile: MigrateFileModel;
|
|
235
235
|
appLimitDefault: AppLimitDefaultModel;
|
|
236
236
|
orgLimitDefault: OrgLimitDefaultModel;
|
|
237
|
-
nodeTypeRegistry: NodeTypeRegistryModel;
|
|
238
237
|
membershipType: MembershipTypeModel;
|
|
239
238
|
commit: CommitModel;
|
|
240
239
|
appMembershipDefault: AppMembershipDefaultModel;
|
|
241
240
|
rlsModule: RlsModuleModel;
|
|
241
|
+
nodeTypeRegistry: NodeTypeRegistryModel;
|
|
242
242
|
orgMembershipDefault: OrgMembershipDefaultModel;
|
|
243
243
|
sqlAction: SqlActionModel;
|
|
244
244
|
user: UserModel;
|
package/esm/public/orm/index.js
CHANGED
|
@@ -100,11 +100,11 @@ import { RoleTypeModel } from './models/roleType';
|
|
|
100
100
|
import { MigrateFileModel } from './models/migrateFile';
|
|
101
101
|
import { AppLimitDefaultModel } from './models/appLimitDefault';
|
|
102
102
|
import { OrgLimitDefaultModel } from './models/orgLimitDefault';
|
|
103
|
-
import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
|
|
104
103
|
import { MembershipTypeModel } from './models/membershipType';
|
|
105
104
|
import { CommitModel } from './models/commit';
|
|
106
105
|
import { AppMembershipDefaultModel } from './models/appMembershipDefault';
|
|
107
106
|
import { RlsModuleModel } from './models/rlsModule';
|
|
107
|
+
import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
|
|
108
108
|
import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
|
|
109
109
|
import { SqlActionModel } from './models/sqlAction';
|
|
110
110
|
import { UserModel } from './models/user';
|
|
@@ -242,11 +242,11 @@ export function createClient(config) {
|
|
|
242
242
|
migrateFile: new MigrateFileModel(client),
|
|
243
243
|
appLimitDefault: new AppLimitDefaultModel(client),
|
|
244
244
|
orgLimitDefault: new OrgLimitDefaultModel(client),
|
|
245
|
-
nodeTypeRegistry: new NodeTypeRegistryModel(client),
|
|
246
245
|
membershipType: new MembershipTypeModel(client),
|
|
247
246
|
commit: new CommitModel(client),
|
|
248
247
|
appMembershipDefault: new AppMembershipDefaultModel(client),
|
|
249
248
|
rlsModule: new RlsModuleModel(client),
|
|
249
|
+
nodeTypeRegistry: new NodeTypeRegistryModel(client),
|
|
250
250
|
orgMembershipDefault: new OrgMembershipDefaultModel(client),
|
|
251
251
|
sqlAction: new SqlActionModel(client),
|
|
252
252
|
user: new UserModel(client),
|