@constructive-sdk/cli 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/cli/utils.d.ts +1 -1
- package/admin/cli/utils.js +1 -5
- package/admin/orm/models/appAchievement.d.ts +1 -1
- package/admin/orm/models/appAdminGrant.d.ts +1 -1
- package/admin/orm/models/appGrant.d.ts +1 -1
- package/admin/orm/models/appLevel.d.ts +1 -1
- package/admin/orm/models/appLevelRequirement.d.ts +1 -1
- package/admin/orm/models/appLimit.d.ts +1 -1
- package/admin/orm/models/appLimitDefault.d.ts +1 -1
- package/admin/orm/models/appMembership.d.ts +1 -1
- package/admin/orm/models/appMembershipDefault.d.ts +1 -1
- package/admin/orm/models/appOwnerGrant.d.ts +1 -1
- package/admin/orm/models/appPermission.d.ts +1 -1
- package/admin/orm/models/appPermissionDefault.d.ts +1 -1
- package/admin/orm/models/appStep.d.ts +1 -1
- package/admin/orm/models/claimedInvite.d.ts +1 -1
- package/admin/orm/models/invite.d.ts +1 -1
- package/admin/orm/models/membershipType.d.ts +1 -1
- package/admin/orm/models/orgAdminGrant.d.ts +1 -1
- package/admin/orm/models/orgChartEdge.d.ts +1 -1
- package/admin/orm/models/orgChartEdgeGrant.d.ts +1 -1
- package/admin/orm/models/orgClaimedInvite.d.ts +1 -1
- package/admin/orm/models/orgGetManagersRecord.d.ts +1 -1
- package/admin/orm/models/orgGetSubordinatesRecord.d.ts +1 -1
- package/admin/orm/models/orgGrant.d.ts +1 -1
- package/admin/orm/models/orgInvite.d.ts +1 -1
- package/admin/orm/models/orgLimit.d.ts +1 -1
- package/admin/orm/models/orgLimitDefault.d.ts +1 -1
- package/admin/orm/models/orgMember.d.ts +1 -1
- package/admin/orm/models/orgMembership.d.ts +1 -1
- package/admin/orm/models/orgMembershipDefault.d.ts +1 -1
- package/admin/orm/models/orgOwnerGrant.d.ts +1 -1
- package/admin/orm/models/orgPermission.d.ts +1 -1
- package/admin/orm/models/orgPermissionDefault.d.ts +1 -1
- package/admin/orm/query-builder.d.ts +4 -6
- package/admin/orm/query-builder.js +2 -12
- package/admin/orm/select-types.d.ts +2 -4
- package/auth/cli/utils.d.ts +1 -1
- package/auth/cli/utils.js +1 -5
- package/auth/orm/models/auditLog.d.ts +1 -1
- package/auth/orm/models/connectedAccount.d.ts +1 -1
- package/auth/orm/models/cryptoAddress.d.ts +1 -1
- package/auth/orm/models/email.d.ts +1 -1
- package/auth/orm/models/phoneNumber.d.ts +1 -1
- package/auth/orm/models/roleType.d.ts +1 -1
- package/auth/orm/models/user.d.ts +1 -1
- package/auth/orm/query-builder.d.ts +4 -6
- package/auth/orm/query-builder.js +2 -12
- package/auth/orm/select-types.d.ts +2 -4
- package/esm/admin/cli/utils.d.ts +1 -1
- package/esm/admin/cli/utils.js +1 -5
- package/esm/admin/orm/models/appAchievement.d.ts +1 -1
- package/esm/admin/orm/models/appAdminGrant.d.ts +1 -1
- package/esm/admin/orm/models/appGrant.d.ts +1 -1
- package/esm/admin/orm/models/appLevel.d.ts +1 -1
- package/esm/admin/orm/models/appLevelRequirement.d.ts +1 -1
- package/esm/admin/orm/models/appLimit.d.ts +1 -1
- package/esm/admin/orm/models/appLimitDefault.d.ts +1 -1
- package/esm/admin/orm/models/appMembership.d.ts +1 -1
- package/esm/admin/orm/models/appMembershipDefault.d.ts +1 -1
- package/esm/admin/orm/models/appOwnerGrant.d.ts +1 -1
- package/esm/admin/orm/models/appPermission.d.ts +1 -1
- package/esm/admin/orm/models/appPermissionDefault.d.ts +1 -1
- package/esm/admin/orm/models/appStep.d.ts +1 -1
- package/esm/admin/orm/models/claimedInvite.d.ts +1 -1
- package/esm/admin/orm/models/invite.d.ts +1 -1
- package/esm/admin/orm/models/membershipType.d.ts +1 -1
- package/esm/admin/orm/models/orgAdminGrant.d.ts +1 -1
- package/esm/admin/orm/models/orgChartEdge.d.ts +1 -1
- package/esm/admin/orm/models/orgChartEdgeGrant.d.ts +1 -1
- package/esm/admin/orm/models/orgClaimedInvite.d.ts +1 -1
- package/esm/admin/orm/models/orgGetManagersRecord.d.ts +1 -1
- package/esm/admin/orm/models/orgGetSubordinatesRecord.d.ts +1 -1
- package/esm/admin/orm/models/orgGrant.d.ts +1 -1
- package/esm/admin/orm/models/orgInvite.d.ts +1 -1
- package/esm/admin/orm/models/orgLimit.d.ts +1 -1
- package/esm/admin/orm/models/orgLimitDefault.d.ts +1 -1
- package/esm/admin/orm/models/orgMember.d.ts +1 -1
- package/esm/admin/orm/models/orgMembership.d.ts +1 -1
- package/esm/admin/orm/models/orgMembershipDefault.d.ts +1 -1
- package/esm/admin/orm/models/orgOwnerGrant.d.ts +1 -1
- package/esm/admin/orm/models/orgPermission.d.ts +1 -1
- package/esm/admin/orm/models/orgPermissionDefault.d.ts +1 -1
- package/esm/admin/orm/query-builder.d.ts +4 -6
- package/esm/admin/orm/query-builder.js +2 -12
- package/esm/admin/orm/select-types.d.ts +2 -4
- package/esm/auth/cli/utils.d.ts +1 -1
- package/esm/auth/cli/utils.js +1 -5
- package/esm/auth/orm/models/auditLog.d.ts +1 -1
- package/esm/auth/orm/models/connectedAccount.d.ts +1 -1
- package/esm/auth/orm/models/cryptoAddress.d.ts +1 -1
- package/esm/auth/orm/models/email.d.ts +1 -1
- package/esm/auth/orm/models/phoneNumber.d.ts +1 -1
- package/esm/auth/orm/models/roleType.d.ts +1 -1
- package/esm/auth/orm/models/user.d.ts +1 -1
- package/esm/auth/orm/query-builder.d.ts +4 -6
- package/esm/auth/orm/query-builder.js +2 -12
- package/esm/auth/orm/select-types.d.ts +2 -4
- package/esm/objects/cli/utils.d.ts +1 -1
- package/esm/objects/cli/utils.js +1 -5
- package/esm/objects/orm/models/commit.d.ts +1 -1
- package/esm/objects/orm/models/getAllRecord.d.ts +1 -1
- package/esm/objects/orm/models/object.d.ts +1 -1
- package/esm/objects/orm/models/ref.d.ts +1 -1
- package/esm/objects/orm/models/store.d.ts +1 -1
- package/esm/objects/orm/query-builder.d.ts +4 -6
- package/esm/objects/orm/query-builder.js +2 -12
- package/esm/objects/orm/select-types.d.ts +2 -4
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/esm/public/cli/commands.js +1 -1
- package/esm/public/cli/utils.d.ts +1 -1
- package/esm/public/cli/utils.js +1 -5
- package/esm/public/orm/models/api.d.ts +1 -1
- package/esm/public/orm/models/apiModule.d.ts +1 -1
- package/esm/public/orm/models/apiSchema.d.ts +1 -1
- package/esm/public/orm/models/app.d.ts +1 -1
- package/esm/public/orm/models/appAchievement.d.ts +1 -1
- package/esm/public/orm/models/appAdminGrant.d.ts +1 -1
- package/esm/public/orm/models/appGrant.d.ts +1 -1
- package/esm/public/orm/models/appLevel.d.ts +1 -1
- package/esm/public/orm/models/appLevelRequirement.d.ts +1 -1
- package/esm/public/orm/models/appLimit.d.ts +1 -1
- package/esm/public/orm/models/appLimitDefault.d.ts +1 -1
- package/esm/public/orm/models/appMembership.d.ts +1 -1
- package/esm/public/orm/models/appMembershipDefault.d.ts +1 -1
- package/esm/public/orm/models/appOwnerGrant.d.ts +1 -1
- package/esm/public/orm/models/appPermission.d.ts +1 -1
- package/esm/public/orm/models/appPermissionDefault.d.ts +1 -1
- package/esm/public/orm/models/appStep.d.ts +1 -1
- package/esm/public/orm/models/astMigration.d.ts +1 -1
- package/esm/public/orm/models/auditLog.d.ts +1 -1
- package/esm/public/orm/models/blueprint.d.ts +1 -1
- package/esm/public/orm/models/blueprintConstruction.d.ts +1 -1
- package/esm/public/orm/models/blueprintTemplate.d.ts +1 -1
- package/esm/public/orm/models/checkConstraint.d.ts +1 -1
- package/esm/public/orm/models/claimedInvite.d.ts +1 -1
- package/esm/public/orm/models/commit.d.ts +1 -1
- package/esm/public/orm/models/connectedAccount.d.ts +1 -1
- package/esm/public/orm/models/connectedAccountsModule.d.ts +1 -1
- package/esm/public/orm/models/cryptoAddress.d.ts +1 -1
- package/esm/public/orm/models/cryptoAddressesModule.d.ts +1 -1
- package/esm/public/orm/models/cryptoAuthModule.d.ts +1 -1
- package/esm/public/orm/models/database.d.ts +1 -1
- package/esm/public/orm/models/databaseProvisionModule.d.ts +1 -1
- package/esm/public/orm/models/databaseTransfer.d.ts +1 -1
- package/esm/public/orm/models/defaultIdsModule.d.ts +1 -1
- package/esm/public/orm/models/defaultPrivilege.d.ts +1 -1
- package/esm/public/orm/models/denormalizedTableField.d.ts +1 -1
- package/esm/public/orm/models/domain.d.ts +1 -1
- package/esm/public/orm/models/email.d.ts +1 -1
- package/esm/public/orm/models/emailsModule.d.ts +1 -1
- package/esm/public/orm/models/embeddingChunk.d.ts +1 -1
- package/esm/public/orm/models/encryptedSecretsModule.d.ts +1 -1
- package/esm/public/orm/models/enum.d.ts +1 -1
- package/esm/public/orm/models/field.d.ts +1 -1
- package/esm/public/orm/models/foreignKeyConstraint.d.ts +1 -1
- package/esm/public/orm/models/fullTextSearch.d.ts +1 -1
- package/esm/public/orm/models/getAllRecord.d.ts +1 -1
- package/esm/public/orm/models/hierarchyModule.d.ts +1 -1
- package/esm/public/orm/models/indexModel.d.ts +1 -1
- package/esm/public/orm/models/invite.d.ts +1 -1
- package/esm/public/orm/models/invitesModule.d.ts +1 -1
- package/esm/public/orm/models/levelsModule.d.ts +1 -1
- package/esm/public/orm/models/limitsModule.d.ts +1 -1
- package/esm/public/orm/models/membershipType.d.ts +1 -1
- package/esm/public/orm/models/membershipTypesModule.d.ts +1 -1
- package/esm/public/orm/models/membershipsModule.d.ts +1 -1
- package/esm/public/orm/models/migrateFile.d.ts +1 -1
- package/esm/public/orm/models/object.d.ts +1 -1
- package/esm/public/orm/models/orgAdminGrant.d.ts +1 -1
- package/esm/public/orm/models/orgChartEdge.d.ts +1 -1
- package/esm/public/orm/models/orgChartEdgeGrant.d.ts +1 -1
- package/esm/public/orm/models/orgClaimedInvite.d.ts +1 -1
- package/esm/public/orm/models/orgGetManagersRecord.d.ts +1 -1
- package/esm/public/orm/models/orgGetSubordinatesRecord.d.ts +1 -1
- package/esm/public/orm/models/orgGrant.d.ts +1 -1
- package/esm/public/orm/models/orgInvite.d.ts +1 -1
- package/esm/public/orm/models/orgLimit.d.ts +1 -1
- package/esm/public/orm/models/orgLimitDefault.d.ts +1 -1
- package/esm/public/orm/models/orgMember.d.ts +1 -1
- package/esm/public/orm/models/orgMembership.d.ts +1 -1
- package/esm/public/orm/models/orgMembershipDefault.d.ts +1 -1
- package/esm/public/orm/models/orgOwnerGrant.d.ts +1 -1
- package/esm/public/orm/models/orgPermission.d.ts +1 -1
- package/esm/public/orm/models/orgPermissionDefault.d.ts +1 -1
- package/esm/public/orm/models/permissionsModule.d.ts +1 -1
- package/esm/public/orm/models/phoneNumber.d.ts +1 -1
- package/esm/public/orm/models/phoneNumbersModule.d.ts +1 -1
- package/esm/public/orm/models/policy.d.ts +1 -1
- package/esm/public/orm/models/primaryKeyConstraint.d.ts +1 -1
- package/esm/public/orm/models/profilesModule.d.ts +1 -1
- package/esm/public/orm/models/ref.d.ts +1 -1
- package/esm/public/orm/models/relationProvision.d.ts +1 -1
- package/esm/public/orm/models/rlsModule.d.ts +1 -1
- package/esm/public/orm/models/roleType.d.ts +1 -1
- package/esm/public/orm/models/schema.d.ts +1 -1
- package/esm/public/orm/models/schemaGrant.d.ts +1 -1
- package/esm/public/orm/models/secretsModule.d.ts +1 -1
- package/esm/public/orm/models/secureTableProvision.d.ts +1 -1
- package/esm/public/orm/models/sessionsModule.d.ts +1 -1
- package/esm/public/orm/models/site.d.ts +1 -1
- package/esm/public/orm/models/siteMetadatum.d.ts +1 -1
- package/esm/public/orm/models/siteModule.d.ts +1 -1
- package/esm/public/orm/models/siteTheme.d.ts +1 -1
- package/esm/public/orm/models/sqlAction.d.ts +1 -1
- package/esm/public/orm/models/storageModule.d.ts +1 -1
- package/esm/public/orm/models/store.d.ts +1 -1
- package/esm/public/orm/models/table.d.ts +1 -1
- package/esm/public/orm/models/tableGrant.d.ts +1 -1
- package/esm/public/orm/models/tableTemplateModule.d.ts +1 -1
- package/esm/public/orm/models/trigger.d.ts +1 -1
- package/esm/public/orm/models/triggerFunction.d.ts +1 -1
- package/esm/public/orm/models/uniqueConstraint.d.ts +1 -1
- package/esm/public/orm/models/user.d.ts +1 -1
- package/esm/public/orm/models/userAuthModule.d.ts +1 -1
- package/esm/public/orm/models/usersModule.d.ts +1 -1
- package/esm/public/orm/models/view.d.ts +1 -1
- package/esm/public/orm/models/viewGrant.d.ts +1 -1
- package/esm/public/orm/models/viewRule.d.ts +1 -1
- package/esm/public/orm/models/viewTable.d.ts +1 -1
- package/esm/public/orm/mutation/index.d.ts +1 -1
- package/esm/public/orm/query-builder.d.ts +4 -6
- package/esm/public/orm/query-builder.js +2 -12
- package/esm/public/orm/select-types.d.ts +2 -4
- package/objects/cli/utils.d.ts +1 -1
- package/objects/cli/utils.js +1 -5
- package/objects/orm/models/commit.d.ts +1 -1
- package/objects/orm/models/getAllRecord.d.ts +1 -1
- package/objects/orm/models/object.d.ts +1 -1
- package/objects/orm/models/ref.d.ts +1 -1
- package/objects/orm/models/store.d.ts +1 -1
- package/objects/orm/query-builder.d.ts +4 -6
- package/objects/orm/query-builder.js +2 -12
- package/objects/orm/select-types.d.ts +2 -4
- package/package.json +3 -3
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/public/cli/commands.js +1 -1
- package/public/cli/utils.d.ts +1 -1
- package/public/cli/utils.js +1 -5
- package/public/orm/models/api.d.ts +1 -1
- package/public/orm/models/apiModule.d.ts +1 -1
- package/public/orm/models/apiSchema.d.ts +1 -1
- package/public/orm/models/app.d.ts +1 -1
- package/public/orm/models/appAchievement.d.ts +1 -1
- package/public/orm/models/appAdminGrant.d.ts +1 -1
- package/public/orm/models/appGrant.d.ts +1 -1
- package/public/orm/models/appLevel.d.ts +1 -1
- package/public/orm/models/appLevelRequirement.d.ts +1 -1
- package/public/orm/models/appLimit.d.ts +1 -1
- package/public/orm/models/appLimitDefault.d.ts +1 -1
- package/public/orm/models/appMembership.d.ts +1 -1
- package/public/orm/models/appMembershipDefault.d.ts +1 -1
- package/public/orm/models/appOwnerGrant.d.ts +1 -1
- package/public/orm/models/appPermission.d.ts +1 -1
- package/public/orm/models/appPermissionDefault.d.ts +1 -1
- package/public/orm/models/appStep.d.ts +1 -1
- package/public/orm/models/astMigration.d.ts +1 -1
- package/public/orm/models/auditLog.d.ts +1 -1
- package/public/orm/models/blueprint.d.ts +1 -1
- package/public/orm/models/blueprintConstruction.d.ts +1 -1
- package/public/orm/models/blueprintTemplate.d.ts +1 -1
- package/public/orm/models/checkConstraint.d.ts +1 -1
- package/public/orm/models/claimedInvite.d.ts +1 -1
- package/public/orm/models/commit.d.ts +1 -1
- package/public/orm/models/connectedAccount.d.ts +1 -1
- package/public/orm/models/connectedAccountsModule.d.ts +1 -1
- package/public/orm/models/cryptoAddress.d.ts +1 -1
- package/public/orm/models/cryptoAddressesModule.d.ts +1 -1
- package/public/orm/models/cryptoAuthModule.d.ts +1 -1
- package/public/orm/models/database.d.ts +1 -1
- package/public/orm/models/databaseProvisionModule.d.ts +1 -1
- package/public/orm/models/databaseTransfer.d.ts +1 -1
- package/public/orm/models/defaultIdsModule.d.ts +1 -1
- package/public/orm/models/defaultPrivilege.d.ts +1 -1
- package/public/orm/models/denormalizedTableField.d.ts +1 -1
- package/public/orm/models/domain.d.ts +1 -1
- package/public/orm/models/email.d.ts +1 -1
- package/public/orm/models/emailsModule.d.ts +1 -1
- package/public/orm/models/embeddingChunk.d.ts +1 -1
- package/public/orm/models/encryptedSecretsModule.d.ts +1 -1
- package/public/orm/models/enum.d.ts +1 -1
- package/public/orm/models/field.d.ts +1 -1
- package/public/orm/models/foreignKeyConstraint.d.ts +1 -1
- package/public/orm/models/fullTextSearch.d.ts +1 -1
- package/public/orm/models/getAllRecord.d.ts +1 -1
- package/public/orm/models/hierarchyModule.d.ts +1 -1
- package/public/orm/models/indexModel.d.ts +1 -1
- package/public/orm/models/invite.d.ts +1 -1
- package/public/orm/models/invitesModule.d.ts +1 -1
- package/public/orm/models/levelsModule.d.ts +1 -1
- package/public/orm/models/limitsModule.d.ts +1 -1
- package/public/orm/models/membershipType.d.ts +1 -1
- package/public/orm/models/membershipTypesModule.d.ts +1 -1
- package/public/orm/models/membershipsModule.d.ts +1 -1
- package/public/orm/models/migrateFile.d.ts +1 -1
- package/public/orm/models/object.d.ts +1 -1
- package/public/orm/models/orgAdminGrant.d.ts +1 -1
- package/public/orm/models/orgChartEdge.d.ts +1 -1
- package/public/orm/models/orgChartEdgeGrant.d.ts +1 -1
- package/public/orm/models/orgClaimedInvite.d.ts +1 -1
- package/public/orm/models/orgGetManagersRecord.d.ts +1 -1
- package/public/orm/models/orgGetSubordinatesRecord.d.ts +1 -1
- package/public/orm/models/orgGrant.d.ts +1 -1
- package/public/orm/models/orgInvite.d.ts +1 -1
- package/public/orm/models/orgLimit.d.ts +1 -1
- package/public/orm/models/orgLimitDefault.d.ts +1 -1
- package/public/orm/models/orgMember.d.ts +1 -1
- package/public/orm/models/orgMembership.d.ts +1 -1
- package/public/orm/models/orgMembershipDefault.d.ts +1 -1
- package/public/orm/models/orgOwnerGrant.d.ts +1 -1
- package/public/orm/models/orgPermission.d.ts +1 -1
- package/public/orm/models/orgPermissionDefault.d.ts +1 -1
- package/public/orm/models/permissionsModule.d.ts +1 -1
- package/public/orm/models/phoneNumber.d.ts +1 -1
- package/public/orm/models/phoneNumbersModule.d.ts +1 -1
- package/public/orm/models/policy.d.ts +1 -1
- package/public/orm/models/primaryKeyConstraint.d.ts +1 -1
- package/public/orm/models/profilesModule.d.ts +1 -1
- package/public/orm/models/ref.d.ts +1 -1
- package/public/orm/models/relationProvision.d.ts +1 -1
- package/public/orm/models/rlsModule.d.ts +1 -1
- package/public/orm/models/roleType.d.ts +1 -1
- package/public/orm/models/schema.d.ts +1 -1
- package/public/orm/models/schemaGrant.d.ts +1 -1
- package/public/orm/models/secretsModule.d.ts +1 -1
- package/public/orm/models/secureTableProvision.d.ts +1 -1
- package/public/orm/models/sessionsModule.d.ts +1 -1
- package/public/orm/models/site.d.ts +1 -1
- package/public/orm/models/siteMetadatum.d.ts +1 -1
- package/public/orm/models/siteModule.d.ts +1 -1
- package/public/orm/models/siteTheme.d.ts +1 -1
- package/public/orm/models/sqlAction.d.ts +1 -1
- package/public/orm/models/storageModule.d.ts +1 -1
- package/public/orm/models/store.d.ts +1 -1
- package/public/orm/models/table.d.ts +1 -1
- package/public/orm/models/tableGrant.d.ts +1 -1
- package/public/orm/models/tableTemplateModule.d.ts +1 -1
- package/public/orm/models/trigger.d.ts +1 -1
- package/public/orm/models/triggerFunction.d.ts +1 -1
- package/public/orm/models/uniqueConstraint.d.ts +1 -1
- package/public/orm/models/user.d.ts +1 -1
- package/public/orm/models/userAuthModule.d.ts +1 -1
- package/public/orm/models/usersModule.d.ts +1 -1
- package/public/orm/models/view.d.ts +1 -1
- package/public/orm/models/viewGrant.d.ts +1 -1
- package/public/orm/models/viewRule.d.ts +1 -1
- package/public/orm/models/viewTable.d.ts +1 -1
- package/public/orm/mutation/index.d.ts +1 -1
- package/public/orm/query-builder.d.ts +4 -6
- package/public/orm/query-builder.js +2 -12
- package/public/orm/select-types.d.ts +2 -4
|
@@ -10,7 +10,7 @@ import type { AuditLogWithRelations, AuditLogSelect, AuditLogFilter, AuditLogOrd
|
|
|
10
10
|
export declare class AuditLogModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AuditLogSelect>(args: FindManyArgs<S, AuditLogFilter,
|
|
13
|
+
findMany<S extends AuditLogSelect>(args: FindManyArgs<S, AuditLogFilter, AuditLogOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AuditLogSelect>): QueryBuilder<{
|
|
16
16
|
auditLogs: ConnectionResult<InferSelectResult<AuditLogWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { ConnectedAccountWithRelations, ConnectedAccountSelect, ConnectedAc
|
|
|
10
10
|
export declare class ConnectedAccountModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends ConnectedAccountSelect>(args: FindManyArgs<S, ConnectedAccountFilter,
|
|
13
|
+
findMany<S extends ConnectedAccountSelect>(args: FindManyArgs<S, ConnectedAccountFilter, ConnectedAccountOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, ConnectedAccountSelect>): QueryBuilder<{
|
|
16
16
|
connectedAccounts: ConnectionResult<InferSelectResult<ConnectedAccountWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { CryptoAddressWithRelations, CryptoAddressSelect, CryptoAddressFilt
|
|
|
10
10
|
export declare class CryptoAddressModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends CryptoAddressSelect>(args: FindManyArgs<S, CryptoAddressFilter,
|
|
13
|
+
findMany<S extends CryptoAddressSelect>(args: FindManyArgs<S, CryptoAddressFilter, CryptoAddressOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, CryptoAddressSelect>): QueryBuilder<{
|
|
16
16
|
cryptoAddresses: ConnectionResult<InferSelectResult<CryptoAddressWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { EmailWithRelations, EmailSelect, EmailFilter, EmailOrderBy, Create
|
|
|
10
10
|
export declare class EmailModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends EmailSelect>(args: FindManyArgs<S, EmailFilter,
|
|
13
|
+
findMany<S extends EmailSelect>(args: FindManyArgs<S, EmailFilter, EmailOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, EmailSelect>): QueryBuilder<{
|
|
16
16
|
emails: ConnectionResult<InferSelectResult<EmailWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { PhoneNumberWithRelations, PhoneNumberSelect, PhoneNumberFilter, Ph
|
|
|
10
10
|
export declare class PhoneNumberModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends PhoneNumberSelect>(args: FindManyArgs<S, PhoneNumberFilter,
|
|
13
|
+
findMany<S extends PhoneNumberSelect>(args: FindManyArgs<S, PhoneNumberFilter, PhoneNumberOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, PhoneNumberSelect>): QueryBuilder<{
|
|
16
16
|
phoneNumbers: ConnectionResult<InferSelectResult<PhoneNumberWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { RoleTypeWithRelations, RoleTypeSelect, RoleTypeFilter, RoleTypeOrd
|
|
|
10
10
|
export declare class RoleTypeModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends RoleTypeSelect>(args: FindManyArgs<S, RoleTypeFilter,
|
|
13
|
+
findMany<S extends RoleTypeSelect>(args: FindManyArgs<S, RoleTypeFilter, RoleTypeOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, RoleTypeSelect>): QueryBuilder<{
|
|
16
16
|
roleTypes: ConnectionResult<InferSelectResult<RoleTypeWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { UserWithRelations, UserSelect, UserFilter, UserOrderBy, CreateUser
|
|
|
10
10
|
export declare class UserModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends UserSelect>(args: FindManyArgs<S, UserFilter,
|
|
13
|
+
findMany<S extends UserSelect>(args: FindManyArgs<S, UserFilter, UserOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, UserSelect>): QueryBuilder<{
|
|
16
16
|
users: ConnectionResult<InferSelectResult<UserWithRelations, S>>;
|
|
@@ -34,23 +34,21 @@ export declare class QueryBuilder<TResult> {
|
|
|
34
34
|
getVariables(): Record<string, unknown> | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function buildSelections(select: Record<string, unknown> | undefined, connectionFieldsMap?: Record<string, Record<string, string>>, entityType?: string): FieldNode[];
|
|
37
|
-
export declare function buildFindManyDocument<TSelect, TWhere
|
|
37
|
+
export declare function buildFindManyDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
38
38
|
where?: TWhere;
|
|
39
|
-
condition?: TCondition;
|
|
40
39
|
orderBy?: string[];
|
|
41
40
|
first?: number;
|
|
42
41
|
last?: number;
|
|
43
42
|
after?: string;
|
|
44
43
|
before?: string;
|
|
45
44
|
offset?: number;
|
|
46
|
-
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string
|
|
45
|
+
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
|
|
47
46
|
document: string;
|
|
48
47
|
variables: Record<string, unknown>;
|
|
49
48
|
};
|
|
50
|
-
export declare function buildFindFirstDocument<TSelect, TWhere
|
|
49
|
+
export declare function buildFindFirstDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
51
50
|
where?: TWhere;
|
|
52
|
-
|
|
53
|
-
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
51
|
+
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
|
|
54
52
|
document: string;
|
|
55
53
|
variables: Record<string, unknown>;
|
|
56
54
|
};
|
|
@@ -131,18 +131,13 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
|
|
|
131
131
|
// ============================================================================
|
|
132
132
|
// Document Builders
|
|
133
133
|
// ============================================================================
|
|
134
|
-
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap
|
|
134
|
+
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
|
|
135
135
|
const selections = select
|
|
136
136
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
137
137
|
: [t.field({ name: 'id' })];
|
|
138
138
|
const variableDefinitions = [];
|
|
139
139
|
const queryArgs = [];
|
|
140
140
|
const variables = {};
|
|
141
|
-
addVariable({
|
|
142
|
-
varName: 'condition',
|
|
143
|
-
typeName: conditionTypeName,
|
|
144
|
-
value: args.condition,
|
|
145
|
-
}, variableDefinitions, queryArgs, variables);
|
|
146
141
|
addVariable({
|
|
147
142
|
varName: 'where',
|
|
148
143
|
typeName: filterTypeName,
|
|
@@ -180,7 +175,7 @@ export function buildFindManyDocument(operationName, queryField, select, args, f
|
|
|
180
175
|
});
|
|
181
176
|
return { document: print(document), variables };
|
|
182
177
|
}
|
|
183
|
-
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap
|
|
178
|
+
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
|
|
184
179
|
const selections = select
|
|
185
180
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
186
181
|
: [t.field({ name: 'id' })];
|
|
@@ -189,11 +184,6 @@ export function buildFindFirstDocument(operationName, queryField, select, args,
|
|
|
189
184
|
const variables = {};
|
|
190
185
|
// Always add first: 1 for findFirst
|
|
191
186
|
addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
|
|
192
|
-
addVariable({
|
|
193
|
-
varName: 'condition',
|
|
194
|
-
typeName: conditionTypeName,
|
|
195
|
-
value: args.condition,
|
|
196
|
-
}, variableDefinitions, queryArgs, variables);
|
|
197
187
|
addVariable({
|
|
198
188
|
varName: 'where',
|
|
199
189
|
typeName: filterTypeName,
|
|
@@ -14,10 +14,9 @@ export interface PageInfo {
|
|
|
14
14
|
startCursor?: string | null;
|
|
15
15
|
endCursor?: string | null;
|
|
16
16
|
}
|
|
17
|
-
export interface FindManyArgs<TSelect, TWhere,
|
|
17
|
+
export interface FindManyArgs<TSelect, TWhere, TOrderBy = never> {
|
|
18
18
|
select?: TSelect;
|
|
19
19
|
where?: TWhere;
|
|
20
|
-
condition?: TCondition;
|
|
21
20
|
orderBy?: TOrderBy[];
|
|
22
21
|
first?: number;
|
|
23
22
|
last?: number;
|
|
@@ -25,10 +24,9 @@ export interface FindManyArgs<TSelect, TWhere, TCondition = never, TOrderBy = ne
|
|
|
25
24
|
before?: string;
|
|
26
25
|
offset?: number;
|
|
27
26
|
}
|
|
28
|
-
export interface FindFirstArgs<TSelect, TWhere
|
|
27
|
+
export interface FindFirstArgs<TSelect, TWhere> {
|
|
29
28
|
select?: TSelect;
|
|
30
29
|
where?: TWhere;
|
|
31
|
-
condition?: TCondition;
|
|
32
30
|
}
|
|
33
31
|
export interface CreateArgs<TSelect, TData> {
|
|
34
32
|
data: TData;
|
|
@@ -81,7 +81,7 @@ export declare function parseSelectFlag(argv: Record<string, unknown>, defaultSe
|
|
|
81
81
|
export declare function parseFindManyArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>, extraWhere?: Record<string, unknown>): T;
|
|
82
82
|
/**
|
|
83
83
|
* Build findFirst args from CLI argv.
|
|
84
|
-
* Like parseFindManyArgs but only includes select
|
|
84
|
+
* Like parseFindManyArgs but only includes select and where
|
|
85
85
|
* (no pagination flags — findFirst returns the first matching record).
|
|
86
86
|
*/
|
|
87
87
|
export declare function parseFindFirstArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>): T;
|
package/esm/objects/cli/utils.js
CHANGED
|
@@ -213,7 +213,6 @@ export function parseFindManyArgs(argv, defaultSelect, extraWhere) {
|
|
|
213
213
|
const where = (parsed.where ?? extraWhere)
|
|
214
214
|
? { ...(extraWhere ?? {}), ...(parsed.where ?? {}) }
|
|
215
215
|
: undefined;
|
|
216
|
-
const condition = parsed.condition;
|
|
217
216
|
const orderBy = parseOrderByFlag(argv);
|
|
218
217
|
return {
|
|
219
218
|
select,
|
|
@@ -223,24 +222,21 @@ export function parseFindManyArgs(argv, defaultSelect, extraWhere) {
|
|
|
223
222
|
...(before !== undefined ? { before } : {}),
|
|
224
223
|
...(offset !== undefined ? { offset } : {}),
|
|
225
224
|
...(where !== undefined ? { where } : {}),
|
|
226
|
-
...(condition !== undefined ? { condition } : {}),
|
|
227
225
|
...(orderBy !== undefined ? { orderBy } : {}),
|
|
228
226
|
};
|
|
229
227
|
}
|
|
230
228
|
/**
|
|
231
229
|
* Build findFirst args from CLI argv.
|
|
232
|
-
* Like parseFindManyArgs but only includes select
|
|
230
|
+
* Like parseFindManyArgs but only includes select and where
|
|
233
231
|
* (no pagination flags — findFirst returns the first matching record).
|
|
234
232
|
*/
|
|
235
233
|
export function parseFindFirstArgs(argv, defaultSelect) {
|
|
236
234
|
const select = parseSelectFlag(argv, defaultSelect);
|
|
237
235
|
const parsed = unflattenDotNotation(argv);
|
|
238
236
|
const where = parsed.where;
|
|
239
|
-
const condition = parsed.condition;
|
|
240
237
|
return {
|
|
241
238
|
select,
|
|
242
239
|
...(where !== undefined ? { where } : {}),
|
|
243
|
-
...(condition !== undefined ? { condition } : {}),
|
|
244
240
|
};
|
|
245
241
|
}
|
|
246
242
|
export function buildSelectFromPaths(paths) {
|
|
@@ -10,7 +10,7 @@ import type { CommitWithRelations, CommitSelect, CommitFilter, CommitOrderBy, Cr
|
|
|
10
10
|
export declare class CommitModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends CommitSelect>(args: FindManyArgs<S, CommitFilter,
|
|
13
|
+
findMany<S extends CommitSelect>(args: FindManyArgs<S, CommitFilter, CommitOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, CommitSelect>): QueryBuilder<{
|
|
16
16
|
commits: ConnectionResult<InferSelectResult<CommitWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { GetAllRecordWithRelations, GetAllRecordSelect, GetAllRecordFilter,
|
|
|
10
10
|
export declare class GetAllRecordModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends GetAllRecordSelect>(args: FindManyArgs<S, GetAllRecordFilter,
|
|
13
|
+
findMany<S extends GetAllRecordSelect>(args: FindManyArgs<S, GetAllRecordFilter, GetAllRecordsOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, GetAllRecordSelect>): QueryBuilder<{
|
|
16
16
|
getAll: ConnectionResult<InferSelectResult<GetAllRecordWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { ObjectWithRelations, ObjectSelect, ObjectFilter, ObjectOrderBy, Cr
|
|
|
10
10
|
export declare class ObjectModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends ObjectSelect>(args: FindManyArgs<S, ObjectFilter,
|
|
13
|
+
findMany<S extends ObjectSelect>(args: FindManyArgs<S, ObjectFilter, ObjectOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, ObjectSelect>): QueryBuilder<{
|
|
16
16
|
objects: ConnectionResult<InferSelectResult<ObjectWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { RefWithRelations, RefSelect, RefFilter, RefOrderBy, CreateRefInput
|
|
|
10
10
|
export declare class RefModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends RefSelect>(args: FindManyArgs<S, RefFilter,
|
|
13
|
+
findMany<S extends RefSelect>(args: FindManyArgs<S, RefFilter, RefOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, RefSelect>): QueryBuilder<{
|
|
16
16
|
refs: ConnectionResult<InferSelectResult<RefWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { StoreWithRelations, StoreSelect, StoreFilter, StoreOrderBy, Create
|
|
|
10
10
|
export declare class StoreModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends StoreSelect>(args: FindManyArgs<S, StoreFilter,
|
|
13
|
+
findMany<S extends StoreSelect>(args: FindManyArgs<S, StoreFilter, StoreOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, StoreSelect>): QueryBuilder<{
|
|
16
16
|
stores: ConnectionResult<InferSelectResult<StoreWithRelations, S>>;
|
|
@@ -34,23 +34,21 @@ export declare class QueryBuilder<TResult> {
|
|
|
34
34
|
getVariables(): Record<string, unknown> | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function buildSelections(select: Record<string, unknown> | undefined, connectionFieldsMap?: Record<string, Record<string, string>>, entityType?: string): FieldNode[];
|
|
37
|
-
export declare function buildFindManyDocument<TSelect, TWhere
|
|
37
|
+
export declare function buildFindManyDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
38
38
|
where?: TWhere;
|
|
39
|
-
condition?: TCondition;
|
|
40
39
|
orderBy?: string[];
|
|
41
40
|
first?: number;
|
|
42
41
|
last?: number;
|
|
43
42
|
after?: string;
|
|
44
43
|
before?: string;
|
|
45
44
|
offset?: number;
|
|
46
|
-
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string
|
|
45
|
+
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
|
|
47
46
|
document: string;
|
|
48
47
|
variables: Record<string, unknown>;
|
|
49
48
|
};
|
|
50
|
-
export declare function buildFindFirstDocument<TSelect, TWhere
|
|
49
|
+
export declare function buildFindFirstDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
51
50
|
where?: TWhere;
|
|
52
|
-
|
|
53
|
-
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
51
|
+
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
|
|
54
52
|
document: string;
|
|
55
53
|
variables: Record<string, unknown>;
|
|
56
54
|
};
|
|
@@ -131,18 +131,13 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
|
|
|
131
131
|
// ============================================================================
|
|
132
132
|
// Document Builders
|
|
133
133
|
// ============================================================================
|
|
134
|
-
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap
|
|
134
|
+
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
|
|
135
135
|
const selections = select
|
|
136
136
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
137
137
|
: [t.field({ name: 'id' })];
|
|
138
138
|
const variableDefinitions = [];
|
|
139
139
|
const queryArgs = [];
|
|
140
140
|
const variables = {};
|
|
141
|
-
addVariable({
|
|
142
|
-
varName: 'condition',
|
|
143
|
-
typeName: conditionTypeName,
|
|
144
|
-
value: args.condition,
|
|
145
|
-
}, variableDefinitions, queryArgs, variables);
|
|
146
141
|
addVariable({
|
|
147
142
|
varName: 'where',
|
|
148
143
|
typeName: filterTypeName,
|
|
@@ -180,7 +175,7 @@ export function buildFindManyDocument(operationName, queryField, select, args, f
|
|
|
180
175
|
});
|
|
181
176
|
return { document: print(document), variables };
|
|
182
177
|
}
|
|
183
|
-
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap
|
|
178
|
+
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
|
|
184
179
|
const selections = select
|
|
185
180
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
186
181
|
: [t.field({ name: 'id' })];
|
|
@@ -189,11 +184,6 @@ export function buildFindFirstDocument(operationName, queryField, select, args,
|
|
|
189
184
|
const variables = {};
|
|
190
185
|
// Always add first: 1 for findFirst
|
|
191
186
|
addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
|
|
192
|
-
addVariable({
|
|
193
|
-
varName: 'condition',
|
|
194
|
-
typeName: conditionTypeName,
|
|
195
|
-
value: args.condition,
|
|
196
|
-
}, variableDefinitions, queryArgs, variables);
|
|
197
187
|
addVariable({
|
|
198
188
|
varName: 'where',
|
|
199
189
|
typeName: filterTypeName,
|
|
@@ -14,10 +14,9 @@ export interface PageInfo {
|
|
|
14
14
|
startCursor?: string | null;
|
|
15
15
|
endCursor?: string | null;
|
|
16
16
|
}
|
|
17
|
-
export interface FindManyArgs<TSelect, TWhere,
|
|
17
|
+
export interface FindManyArgs<TSelect, TWhere, TOrderBy = never> {
|
|
18
18
|
select?: TSelect;
|
|
19
19
|
where?: TWhere;
|
|
20
|
-
condition?: TCondition;
|
|
21
20
|
orderBy?: TOrderBy[];
|
|
22
21
|
first?: number;
|
|
23
22
|
last?: number;
|
|
@@ -25,10 +24,9 @@ export interface FindManyArgs<TSelect, TWhere, TCondition = never, TOrderBy = ne
|
|
|
25
24
|
before?: string;
|
|
26
25
|
offset?: number;
|
|
27
26
|
}
|
|
28
|
-
export interface FindFirstArgs<TSelect, TWhere
|
|
27
|
+
export interface FindFirstArgs<TSelect, TWhere> {
|
|
29
28
|
select?: TSelect;
|
|
30
29
|
where?: TWhere;
|
|
31
|
-
condition?: TCondition;
|
|
32
30
|
}
|
|
33
31
|
export interface CreateArgs<TSelect, TData> {
|
|
34
32
|
data: TData;
|
|
@@ -3,7 +3,7 @@ import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
6
|
-
console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (1) provision_table() for each table with
|
|
6
|
+
console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\n');
|
|
7
7
|
process.exit(0);
|
|
8
8
|
}
|
|
9
9
|
const answers = await prompter.prompt(argv, [
|
|
@@ -354,7 +354,7 @@ const createCommandMap = () => ({
|
|
|
354
354
|
'confirm-upload': confirmUploadCmd,
|
|
355
355
|
'provision-bucket': provisionBucketCmd,
|
|
356
356
|
});
|
|
357
|
-
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord 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 blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule 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 app-permission-default appPermissionDefault CRUD operations\n ref ref CRUD operations\n store store 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 app-membership-default appMembershipDefault CRUD operations\n commit commit CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n rls-module rlsModule 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 resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\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 blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (1) provision_table() for each table with all nodes[], fields[], policies[], grants, and table-level indexes/fts/unique_constraints in a single call, (2) provision_relation() for each relation, (3) provision_index() for top-level indexes, (4) provision_full_text_search() for top-level FTS, (5) provision_unique_constraint() for top-level unique constraints. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\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 bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\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 provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
357
|
+
const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord 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 blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule 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 app-permission-default appPermissionDefault CRUD operations\n ref ref CRUD operations\n store store 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 app-membership-default appMembershipDefault CRUD operations\n commit commit CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n rls-module rlsModule 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 resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\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 blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\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 bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\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 provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n";
|
|
358
358
|
export const commands = async (argv, prompter, options) => {
|
|
359
359
|
if (argv.help || argv.h) {
|
|
360
360
|
console.log(usage);
|
|
@@ -81,7 +81,7 @@ export declare function parseSelectFlag(argv: Record<string, unknown>, defaultSe
|
|
|
81
81
|
export declare function parseFindManyArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>, extraWhere?: Record<string, unknown>): T;
|
|
82
82
|
/**
|
|
83
83
|
* Build findFirst args from CLI argv.
|
|
84
|
-
* Like parseFindManyArgs but only includes select
|
|
84
|
+
* Like parseFindManyArgs but only includes select and where
|
|
85
85
|
* (no pagination flags — findFirst returns the first matching record).
|
|
86
86
|
*/
|
|
87
87
|
export declare function parseFindFirstArgs<T = Record<string, unknown>>(argv: Record<string, unknown>, defaultSelect: Record<string, unknown>): T;
|
package/esm/public/cli/utils.js
CHANGED
|
@@ -213,7 +213,6 @@ export function parseFindManyArgs(argv, defaultSelect, extraWhere) {
|
|
|
213
213
|
const where = (parsed.where ?? extraWhere)
|
|
214
214
|
? { ...(extraWhere ?? {}), ...(parsed.where ?? {}) }
|
|
215
215
|
: undefined;
|
|
216
|
-
const condition = parsed.condition;
|
|
217
216
|
const orderBy = parseOrderByFlag(argv);
|
|
218
217
|
return {
|
|
219
218
|
select,
|
|
@@ -223,24 +222,21 @@ export function parseFindManyArgs(argv, defaultSelect, extraWhere) {
|
|
|
223
222
|
...(before !== undefined ? { before } : {}),
|
|
224
223
|
...(offset !== undefined ? { offset } : {}),
|
|
225
224
|
...(where !== undefined ? { where } : {}),
|
|
226
|
-
...(condition !== undefined ? { condition } : {}),
|
|
227
225
|
...(orderBy !== undefined ? { orderBy } : {}),
|
|
228
226
|
};
|
|
229
227
|
}
|
|
230
228
|
/**
|
|
231
229
|
* Build findFirst args from CLI argv.
|
|
232
|
-
* Like parseFindManyArgs but only includes select
|
|
230
|
+
* Like parseFindManyArgs but only includes select and where
|
|
233
231
|
* (no pagination flags — findFirst returns the first matching record).
|
|
234
232
|
*/
|
|
235
233
|
export function parseFindFirstArgs(argv, defaultSelect) {
|
|
236
234
|
const select = parseSelectFlag(argv, defaultSelect);
|
|
237
235
|
const parsed = unflattenDotNotation(argv);
|
|
238
236
|
const where = parsed.where;
|
|
239
|
-
const condition = parsed.condition;
|
|
240
237
|
return {
|
|
241
238
|
select,
|
|
242
239
|
...(where !== undefined ? { where } : {}),
|
|
243
|
-
...(condition !== undefined ? { condition } : {}),
|
|
244
240
|
};
|
|
245
241
|
}
|
|
246
242
|
export function buildSelectFromPaths(paths) {
|
|
@@ -10,7 +10,7 @@ import type { ApiWithRelations, ApiSelect, ApiFilter, ApiOrderBy, CreateApiInput
|
|
|
10
10
|
export declare class ApiModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends ApiSelect>(args: FindManyArgs<S, ApiFilter,
|
|
13
|
+
findMany<S extends ApiSelect>(args: FindManyArgs<S, ApiFilter, ApiOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, ApiSelect>): QueryBuilder<{
|
|
16
16
|
apis: ConnectionResult<InferSelectResult<ApiWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { ApiModuleWithRelations, ApiModuleSelect, ApiModuleFilter, ApiModul
|
|
|
10
10
|
export declare class ApiModuleModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends ApiModuleSelect>(args: FindManyArgs<S, ApiModuleFilter,
|
|
13
|
+
findMany<S extends ApiModuleSelect>(args: FindManyArgs<S, ApiModuleFilter, ApiModuleOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, ApiModuleSelect>): QueryBuilder<{
|
|
16
16
|
apiModules: ConnectionResult<InferSelectResult<ApiModuleWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { ApiSchemaWithRelations, ApiSchemaSelect, ApiSchemaFilter, ApiSchem
|
|
|
10
10
|
export declare class ApiSchemaModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends ApiSchemaSelect>(args: FindManyArgs<S, ApiSchemaFilter,
|
|
13
|
+
findMany<S extends ApiSchemaSelect>(args: FindManyArgs<S, ApiSchemaFilter, ApiSchemaOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, ApiSchemaSelect>): QueryBuilder<{
|
|
16
16
|
apiSchemas: ConnectionResult<InferSelectResult<ApiSchemaWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppWithRelations, AppSelect, AppFilter, AppOrderBy, CreateAppInput
|
|
|
10
10
|
export declare class AppModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppSelect>(args: FindManyArgs<S, AppFilter,
|
|
13
|
+
findMany<S extends AppSelect>(args: FindManyArgs<S, AppFilter, AppOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppSelect>): QueryBuilder<{
|
|
16
16
|
apps: ConnectionResult<InferSelectResult<AppWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppAchievementWithRelations, AppAchievementSelect, AppAchievementF
|
|
|
10
10
|
export declare class AppAchievementModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppAchievementSelect>(args: FindManyArgs<S, AppAchievementFilter,
|
|
13
|
+
findMany<S extends AppAchievementSelect>(args: FindManyArgs<S, AppAchievementFilter, AppAchievementOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppAchievementSelect>): QueryBuilder<{
|
|
16
16
|
appAchievements: ConnectionResult<InferSelectResult<AppAchievementWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppAdminGrantWithRelations, AppAdminGrantSelect, AppAdminGrantFilt
|
|
|
10
10
|
export declare class AppAdminGrantModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppAdminGrantSelect>(args: FindManyArgs<S, AppAdminGrantFilter,
|
|
13
|
+
findMany<S extends AppAdminGrantSelect>(args: FindManyArgs<S, AppAdminGrantFilter, AppAdminGrantOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppAdminGrantSelect>): QueryBuilder<{
|
|
16
16
|
appAdminGrants: ConnectionResult<InferSelectResult<AppAdminGrantWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppGrantWithRelations, AppGrantSelect, AppGrantFilter, AppGrantOrd
|
|
|
10
10
|
export declare class AppGrantModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppGrantSelect>(args: FindManyArgs<S, AppGrantFilter,
|
|
13
|
+
findMany<S extends AppGrantSelect>(args: FindManyArgs<S, AppGrantFilter, AppGrantOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppGrantSelect>): QueryBuilder<{
|
|
16
16
|
appGrants: ConnectionResult<InferSelectResult<AppGrantWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppLevelWithRelations, AppLevelSelect, AppLevelFilter, AppLevelOrd
|
|
|
10
10
|
export declare class AppLevelModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLevelSelect>(args: FindManyArgs<S, AppLevelFilter,
|
|
13
|
+
findMany<S extends AppLevelSelect>(args: FindManyArgs<S, AppLevelFilter, AppLevelOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppLevelSelect>): QueryBuilder<{
|
|
16
16
|
appLevels: ConnectionResult<InferSelectResult<AppLevelWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppLevelRequirementWithRelations, AppLevelRequirementSelect, AppLe
|
|
|
10
10
|
export declare class AppLevelRequirementModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLevelRequirementSelect>(args: FindManyArgs<S, AppLevelRequirementFilter,
|
|
13
|
+
findMany<S extends AppLevelRequirementSelect>(args: FindManyArgs<S, AppLevelRequirementFilter, AppLevelRequirementOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppLevelRequirementSelect>): QueryBuilder<{
|
|
16
16
|
appLevelRequirements: ConnectionResult<InferSelectResult<AppLevelRequirementWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppLimitWithRelations, AppLimitSelect, AppLimitFilter, AppLimitOrd
|
|
|
10
10
|
export declare class AppLimitModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLimitSelect>(args: FindManyArgs<S, AppLimitFilter,
|
|
13
|
+
findMany<S extends AppLimitSelect>(args: FindManyArgs<S, AppLimitFilter, AppLimitOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppLimitSelect>): QueryBuilder<{
|
|
16
16
|
appLimits: ConnectionResult<InferSelectResult<AppLimitWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppLimitDefaultWithRelations, AppLimitDefaultSelect, AppLimitDefau
|
|
|
10
10
|
export declare class AppLimitDefaultModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppLimitDefaultSelect>(args: FindManyArgs<S, AppLimitDefaultFilter,
|
|
13
|
+
findMany<S extends AppLimitDefaultSelect>(args: FindManyArgs<S, AppLimitDefaultFilter, AppLimitDefaultOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppLimitDefaultSelect>): QueryBuilder<{
|
|
16
16
|
appLimitDefaults: ConnectionResult<InferSelectResult<AppLimitDefaultWithRelations, S>>;
|
|
@@ -10,7 +10,7 @@ import type { AppMembershipWithRelations, AppMembershipSelect, AppMembershipFilt
|
|
|
10
10
|
export declare class AppMembershipModel {
|
|
11
11
|
private client;
|
|
12
12
|
constructor(client: OrmClient);
|
|
13
|
-
findMany<S extends AppMembershipSelect>(args: FindManyArgs<S, AppMembershipFilter,
|
|
13
|
+
findMany<S extends AppMembershipSelect>(args: FindManyArgs<S, AppMembershipFilter, AppMembershipOrderBy> & {
|
|
14
14
|
select: S;
|
|
15
15
|
} & StrictSelect<S, AppMembershipSelect>): QueryBuilder<{
|
|
16
16
|
appMemberships: ConnectionResult<InferSelectResult<AppMembershipWithRelations, S>>;
|