@constructive-sdk/cli 0.10.0 → 0.10.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/README.md +0 -8
- package/admin/cli/commands/app-level-requirement.js +0 -2
- package/admin/cli/commands/app-level.js +0 -2
- package/admin/cli/commands/app-permission.js +0 -2
- package/admin/cli/commands/invite.js +0 -2
- package/admin/cli/commands/membership-type.js +0 -3
- package/admin/cli/commands/org-chart-edge-grant.js +3 -3
- package/admin/cli/commands/org-chart-edge.js +0 -2
- package/admin/cli/commands/org-invite.js +0 -2
- package/admin/cli/commands/org-permission.js +0 -2
- package/admin/orm/input-types.d.ts +33 -127
- package/auth/cli/commands/audit-log.js +0 -2
- package/auth/cli/commands/connected-account.js +0 -3
- package/auth/cli/commands/crypto-address.js +0 -2
- package/auth/cli/commands/phone-number.js +0 -3
- package/auth/cli/commands.js +7 -7
- package/auth/cli/executor.d.ts +3 -3
- package/auth/orm/index.d.ts +6 -6
- package/auth/orm/index.js +6 -6
- package/auth/orm/input-types.d.ts +279 -327
- package/auth/orm/input-types.js +9 -1
- package/auth/orm/models/index.d.ts +3 -3
- package/auth/orm/models/index.js +7 -7
- package/esm/admin/cli/commands/app-level-requirement.js +0 -2
- package/esm/admin/cli/commands/app-level.js +0 -2
- package/esm/admin/cli/commands/app-permission.js +0 -2
- package/esm/admin/cli/commands/invite.js +0 -2
- package/esm/admin/cli/commands/membership-type.js +0 -3
- package/esm/admin/cli/commands/org-chart-edge-grant.js +3 -3
- package/esm/admin/cli/commands/org-chart-edge.js +0 -2
- package/esm/admin/cli/commands/org-invite.js +0 -2
- package/esm/admin/cli/commands/org-permission.js +0 -2
- package/esm/admin/orm/input-types.d.ts +33 -127
- package/esm/auth/cli/commands/audit-log.js +0 -2
- package/esm/auth/cli/commands/connected-account.js +0 -3
- package/esm/auth/cli/commands/crypto-address.js +0 -2
- package/esm/auth/cli/commands/phone-number.js +0 -3
- package/esm/auth/cli/commands.js +7 -7
- package/esm/auth/cli/executor.d.ts +3 -3
- package/esm/auth/orm/index.d.ts +6 -6
- package/esm/auth/orm/index.js +6 -6
- package/esm/auth/orm/input-types.d.ts +279 -327
- package/esm/auth/orm/input-types.js +9 -1
- package/esm/auth/orm/models/index.d.ts +3 -3
- package/esm/auth/orm/models/index.js +3 -3
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/objects/cli/commands/commit.js +0 -2
- package/esm/objects/cli/commands/ref.js +0 -2
- package/esm/objects/cli/commands/store.js +0 -2
- package/esm/objects/orm/input-types.d.ts +17 -48
- package/esm/public/cli/commands/accept-database-transfer.d.ts +8 -0
- package/esm/public/cli/commands/accept-database-transfer.js +34 -0
- package/esm/public/cli/commands/api-module.js +0 -2
- package/esm/public/cli/commands/api.js +0 -5
- package/esm/public/cli/commands/app-level-requirement.js +0 -2
- package/esm/public/cli/commands/app-level.js +0 -2
- package/esm/public/cli/commands/app-permission.js +0 -2
- package/esm/public/cli/commands/app.js +0 -4
- package/esm/public/cli/commands/ast-migration.js +0 -2
- package/esm/public/cli/commands/audit-log.js +0 -2
- package/esm/public/cli/commands/blueprint-template.d.ts +8 -0
- package/esm/public/cli/commands/blueprint-template.js +549 -0
- package/esm/public/cli/commands/{uuid-module.d.ts → blueprint.d.ts} +1 -1
- package/esm/public/cli/commands/blueprint.js +484 -0
- package/esm/public/cli/commands/cancel-database-transfer.d.ts +8 -0
- package/esm/public/cli/commands/cancel-database-transfer.js +34 -0
- package/esm/public/cli/commands/check-constraint.js +0 -4
- package/esm/public/cli/commands/commit.js +0 -2
- package/esm/public/cli/commands/connected-account.js +0 -3
- package/esm/public/cli/commands/connected-accounts-module.js +0 -2
- package/esm/public/cli/commands/construct-blueprint.d.ts +8 -0
- package/esm/public/cli/commands/construct-blueprint.js +34 -0
- package/esm/public/cli/commands/copy-template-to-blueprint.d.ts +8 -0
- package/esm/public/cli/commands/copy-template-to-blueprint.js +34 -0
- package/esm/public/cli/commands/crypto-address.js +0 -2
- package/esm/public/cli/commands/crypto-addresses-module.js +0 -3
- package/esm/public/cli/commands/crypto-auth-module.js +0 -7
- package/esm/public/cli/commands/database-provision-module.js +0 -6
- package/esm/public/cli/commands/database-transfer.d.ts +8 -0
- package/esm/public/cli/commands/database-transfer.js +425 -0
- package/esm/public/cli/commands/database.js +0 -4
- package/esm/public/cli/commands/default-privilege.js +0 -4
- package/esm/public/cli/commands/denormalized-table-field.js +0 -2
- package/esm/public/cli/commands/emails-module.js +0 -2
- package/esm/public/cli/commands/embedding-chunk.d.ts +8 -0
- package/esm/public/cli/commands/embedding-chunk.js +513 -0
- package/esm/public/cli/commands/encrypted-secrets-module.js +0 -2
- package/{public/cli/commands/uuid-module.d.ts → esm/public/cli/commands/enum.d.ts} +1 -1
- package/esm/public/cli/commands/{uuid-module.js → enum.js} +175 -33
- package/esm/public/cli/commands/field-module.js +0 -2
- package/esm/public/cli/commands/field.js +21 -7
- package/esm/public/cli/commands/foreign-key-constraint.js +0 -7
- package/esm/public/cli/commands/hierarchy-module.js +0 -11
- package/esm/public/cli/commands/index.js +0 -4
- package/esm/public/cli/commands/invite.js +0 -2
- package/esm/public/cli/commands/invites-module.js +0 -5
- package/esm/public/cli/commands/levels-module.js +0 -16
- package/esm/public/cli/commands/limits-module.js +0 -10
- package/esm/public/cli/commands/membership-type.js +0 -3
- package/esm/public/cli/commands/membership-types-module.js +0 -2
- package/esm/public/cli/commands/memberships-module.js +0 -13
- package/esm/public/cli/commands/node-type-registry.js +0 -6
- package/esm/public/cli/commands/org-chart-edge-grant.js +3 -3
- package/esm/public/cli/commands/org-chart-edge.js +0 -2
- package/esm/public/cli/commands/org-invite.js +0 -2
- package/esm/public/cli/commands/org-permission.js +0 -2
- package/esm/public/cli/commands/permissions-module.js +0 -8
- package/esm/public/cli/commands/phone-number.js +0 -3
- package/esm/public/cli/commands/phone-numbers-module.js +0 -2
- package/esm/public/cli/commands/policy.js +0 -6
- package/esm/public/cli/commands/primary-key-constraint.js +0 -4
- package/esm/public/cli/commands/profiles-module.js +0 -6
- package/esm/public/cli/commands/ref.js +0 -2
- package/esm/public/cli/commands/reject-database-transfer.d.ts +8 -0
- package/esm/public/cli/commands/reject-database-transfer.js +34 -0
- package/esm/public/cli/commands/relation-provision.js +63 -11
- package/esm/public/cli/commands/rls-module.js +0 -5
- package/esm/public/cli/commands/schema-grant.js +0 -2
- package/esm/public/cli/commands/schema.js +0 -6
- package/esm/public/cli/commands/secrets-module.js +0 -2
- package/esm/public/cli/commands/secure-table-provision.js +0 -6
- package/esm/public/cli/commands/sessions-module.js +0 -4
- package/esm/public/cli/commands/site-metadatum.js +0 -3
- package/esm/public/cli/commands/site-module.js +0 -2
- package/esm/public/cli/commands/site.js +0 -4
- package/esm/public/cli/commands/sql-migration.js +0 -7
- package/esm/public/cli/commands/store.js +0 -2
- package/esm/public/cli/commands/table-grant.js +0 -3
- package/esm/public/cli/commands/table-template-module.js +0 -3
- package/esm/public/cli/commands/table.js +0 -7
- package/esm/public/cli/commands/trigger-function.js +0 -3
- package/esm/public/cli/commands/trigger.js +0 -5
- package/esm/public/cli/commands/unique-constraint.js +0 -5
- package/esm/public/cli/commands/user-auth-module.js +0 -17
- package/esm/public/cli/commands/users-module.js +0 -3
- package/esm/public/cli/commands/view-grant.js +0 -3
- package/esm/public/cli/commands/view-rule.js +0 -4
- package/esm/public/cli/commands/view.js +0 -5
- package/esm/public/cli/commands.js +53 -35
- package/esm/public/cli/executor.d.ts +68 -39
- package/esm/public/orm/index.d.ts +81 -48
- package/esm/public/orm/index.js +26 -18
- package/esm/public/orm/input-types.d.ts +2447 -2980
- package/esm/public/orm/input-types.js +26 -1
- package/esm/public/orm/models/blueprint.d.ts +56 -0
- package/esm/public/orm/models/blueprint.js +94 -0
- package/esm/public/orm/models/blueprintTemplate.d.ts +56 -0
- package/esm/public/orm/models/blueprintTemplate.js +94 -0
- package/esm/public/orm/models/databaseTransfer.d.ts +56 -0
- package/esm/public/orm/models/databaseTransfer.js +94 -0
- package/esm/public/orm/models/embeddingChunk.d.ts +56 -0
- package/esm/public/orm/models/embeddingChunk.js +94 -0
- package/esm/public/orm/models/enum.d.ts +56 -0
- package/esm/public/orm/models/{uuidModule.js → enum.js} +23 -23
- package/esm/public/orm/models/index.d.ts +13 -9
- package/esm/public/orm/models/index.js +13 -9
- package/esm/public/orm/mutation/index.d.ts +98 -50
- package/esm/public/orm/mutation/index.js +126 -66
- package/index.d.ts +3 -3
- package/index.js +8 -8
- package/objects/cli/commands/commit.js +0 -2
- package/objects/cli/commands/ref.js +0 -2
- package/objects/cli/commands/store.js +0 -2
- package/objects/orm/input-types.d.ts +17 -48
- package/package.json +3 -3
- package/public/cli/commands/accept-database-transfer.d.ts +8 -0
- package/public/cli/commands/accept-database-transfer.js +36 -0
- package/public/cli/commands/api-module.js +0 -2
- package/public/cli/commands/api.js +0 -5
- package/public/cli/commands/app-level-requirement.js +0 -2
- package/public/cli/commands/app-level.js +0 -2
- package/public/cli/commands/app-permission.js +0 -2
- package/public/cli/commands/app.js +0 -4
- package/public/cli/commands/ast-migration.js +0 -2
- package/public/cli/commands/audit-log.js +0 -2
- package/public/cli/commands/blueprint-template.d.ts +8 -0
- package/public/cli/commands/blueprint-template.js +551 -0
- package/public/cli/commands/blueprint.d.ts +8 -0
- package/public/cli/commands/blueprint.js +486 -0
- package/public/cli/commands/cancel-database-transfer.d.ts +8 -0
- package/public/cli/commands/cancel-database-transfer.js +36 -0
- package/public/cli/commands/check-constraint.js +0 -4
- package/public/cli/commands/commit.js +0 -2
- package/public/cli/commands/connected-account.js +0 -3
- package/public/cli/commands/connected-accounts-module.js +0 -2
- package/public/cli/commands/construct-blueprint.d.ts +8 -0
- package/public/cli/commands/construct-blueprint.js +36 -0
- package/public/cli/commands/copy-template-to-blueprint.d.ts +8 -0
- package/public/cli/commands/copy-template-to-blueprint.js +36 -0
- package/public/cli/commands/crypto-address.js +0 -2
- package/public/cli/commands/crypto-addresses-module.js +0 -3
- package/public/cli/commands/crypto-auth-module.js +0 -7
- package/public/cli/commands/database-provision-module.js +0 -6
- package/public/cli/commands/database-transfer.d.ts +8 -0
- package/public/cli/commands/database-transfer.js +427 -0
- package/public/cli/commands/database.js +0 -4
- package/public/cli/commands/default-privilege.js +0 -4
- package/public/cli/commands/denormalized-table-field.js +0 -2
- package/public/cli/commands/emails-module.js +0 -2
- package/public/cli/commands/embedding-chunk.d.ts +8 -0
- package/public/cli/commands/embedding-chunk.js +515 -0
- package/public/cli/commands/encrypted-secrets-module.js +0 -2
- package/public/cli/commands/enum.d.ts +8 -0
- package/public/cli/commands/{uuid-module.js → enum.js} +175 -33
- package/public/cli/commands/field-module.js +0 -2
- package/public/cli/commands/field.js +21 -7
- package/public/cli/commands/foreign-key-constraint.js +0 -7
- package/public/cli/commands/hierarchy-module.js +0 -11
- package/public/cli/commands/index.js +0 -4
- package/public/cli/commands/invite.js +0 -2
- package/public/cli/commands/invites-module.js +0 -5
- package/public/cli/commands/levels-module.js +0 -16
- package/public/cli/commands/limits-module.js +0 -10
- package/public/cli/commands/membership-type.js +0 -3
- package/public/cli/commands/membership-types-module.js +0 -2
- package/public/cli/commands/memberships-module.js +0 -13
- package/public/cli/commands/node-type-registry.js +0 -6
- package/public/cli/commands/org-chart-edge-grant.js +3 -3
- package/public/cli/commands/org-chart-edge.js +0 -2
- package/public/cli/commands/org-invite.js +0 -2
- package/public/cli/commands/org-permission.js +0 -2
- package/public/cli/commands/permissions-module.js +0 -8
- package/public/cli/commands/phone-number.js +0 -3
- package/public/cli/commands/phone-numbers-module.js +0 -2
- package/public/cli/commands/policy.js +0 -6
- package/public/cli/commands/primary-key-constraint.js +0 -4
- package/public/cli/commands/profiles-module.js +0 -6
- package/public/cli/commands/ref.js +0 -2
- package/public/cli/commands/reject-database-transfer.d.ts +8 -0
- package/public/cli/commands/reject-database-transfer.js +36 -0
- package/public/cli/commands/relation-provision.js +63 -11
- package/public/cli/commands/rls-module.js +0 -5
- package/public/cli/commands/schema-grant.js +0 -2
- package/public/cli/commands/schema.js +0 -6
- package/public/cli/commands/secrets-module.js +0 -2
- package/public/cli/commands/secure-table-provision.js +0 -6
- package/public/cli/commands/sessions-module.js +0 -4
- package/public/cli/commands/site-metadatum.js +0 -3
- package/public/cli/commands/site-module.js +0 -2
- package/public/cli/commands/site.js +0 -4
- package/public/cli/commands/sql-migration.js +0 -7
- package/public/cli/commands/store.js +0 -2
- package/public/cli/commands/table-grant.js +0 -3
- package/public/cli/commands/table-template-module.js +0 -3
- package/public/cli/commands/table.js +0 -7
- package/public/cli/commands/trigger-function.js +0 -3
- package/public/cli/commands/trigger.js +0 -5
- package/public/cli/commands/unique-constraint.js +0 -5
- package/public/cli/commands/user-auth-module.js +0 -17
- package/public/cli/commands/users-module.js +0 -3
- package/public/cli/commands/view-grant.js +0 -3
- package/public/cli/commands/view-rule.js +0 -4
- package/public/cli/commands/view.js +0 -5
- package/public/cli/commands.js +53 -35
- package/public/cli/executor.d.ts +68 -39
- package/public/orm/index.d.ts +81 -48
- package/public/orm/index.js +26 -18
- package/public/orm/input-types.d.ts +2447 -2980
- package/public/orm/input-types.js +26 -1
- package/public/orm/models/blueprint.d.ts +56 -0
- package/public/orm/models/blueprint.js +98 -0
- package/public/orm/models/blueprintTemplate.d.ts +56 -0
- package/public/orm/models/blueprintTemplate.js +98 -0
- package/public/orm/models/databaseTransfer.d.ts +56 -0
- package/public/orm/models/databaseTransfer.js +98 -0
- package/public/orm/models/embeddingChunk.d.ts +56 -0
- package/public/orm/models/embeddingChunk.js +98 -0
- package/public/orm/models/enum.d.ts +56 -0
- package/public/orm/models/{uuidModule.js → enum.js} +25 -25
- package/public/orm/models/index.d.ts +13 -9
- package/public/orm/models/index.js +29 -21
- package/public/orm/mutation/index.d.ts +98 -50
- package/public/orm/mutation/index.js +126 -66
- package/esm/public/orm/models/uuidModule.d.ts +0 -56
- package/public/orm/models/uuidModule.d.ts +0 -56
|
@@ -23,13 +23,6 @@ const fieldSchema = {
|
|
|
23
23
|
signInRecordFailure: 'string',
|
|
24
24
|
signUpWithKey: 'string',
|
|
25
25
|
signInWithChallenge: 'string',
|
|
26
|
-
userFieldTrgmSimilarity: 'float',
|
|
27
|
-
cryptoNetworkTrgmSimilarity: 'float',
|
|
28
|
-
signInRequestChallengeTrgmSimilarity: 'float',
|
|
29
|
-
signInRecordFailureTrgmSimilarity: 'float',
|
|
30
|
-
signUpWithKeyTrgmSimilarity: 'float',
|
|
31
|
-
signInWithChallengeTrgmSimilarity: 'float',
|
|
32
|
-
searchScore: 'float',
|
|
33
26
|
};
|
|
34
27
|
const usage = '\ncrypto-auth-module <command>\n\nCommands:\n list List all cryptoAuthModule records\n get Get a cryptoAuthModule by ID\n create Create a new cryptoAuthModule\n update Update an existing cryptoAuthModule\n delete Delete a cryptoAuthModule\n\n --help, -h Show this help message\n';
|
|
35
28
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -23,12 +23,6 @@ const fieldSchema = {
|
|
|
23
23
|
createdAt: 'string',
|
|
24
24
|
updatedAt: 'string',
|
|
25
25
|
completedAt: 'string',
|
|
26
|
-
databaseNameTrgmSimilarity: 'float',
|
|
27
|
-
subdomainTrgmSimilarity: 'float',
|
|
28
|
-
domainTrgmSimilarity: 'float',
|
|
29
|
-
statusTrgmSimilarity: 'float',
|
|
30
|
-
errorMessageTrgmSimilarity: 'float',
|
|
31
|
-
searchScore: 'float',
|
|
32
26
|
};
|
|
33
27
|
const usage = '\ndatabase-provision-module <command>\n\nCommands:\n list List all databaseProvisionModule records\n get Get a databaseProvisionModule by ID\n create Create a new databaseProvisionModule\n update Update an existing databaseProvisionModule\n delete Delete a databaseProvisionModule\n\n --help, -h Show this help message\n';
|
|
34
28
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for DatabaseTransfer
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for DatabaseTransfer
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
id: 'uuid',
|
|
13
|
+
databaseId: 'uuid',
|
|
14
|
+
targetOwnerId: 'uuid',
|
|
15
|
+
sourceApproved: 'boolean',
|
|
16
|
+
targetApproved: 'boolean',
|
|
17
|
+
sourceApprovedAt: 'string',
|
|
18
|
+
targetApprovedAt: 'string',
|
|
19
|
+
status: 'string',
|
|
20
|
+
initiatedBy: 'uuid',
|
|
21
|
+
notes: 'string',
|
|
22
|
+
expiresAt: 'string',
|
|
23
|
+
createdAt: 'string',
|
|
24
|
+
updatedAt: 'string',
|
|
25
|
+
completedAt: 'string',
|
|
26
|
+
};
|
|
27
|
+
const usage = '\ndatabase-transfer <command>\n\nCommands:\n list List all databaseTransfer records\n get Get a databaseTransfer by ID\n create Create a new databaseTransfer\n update Update an existing databaseTransfer\n delete Delete a databaseTransfer\n\n --help, -h Show this help message\n';
|
|
28
|
+
exports.default = async (argv, prompter, _options) => {
|
|
29
|
+
if (argv.help || argv.h) {
|
|
30
|
+
console.log(usage);
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
34
|
+
if (!subcommand) {
|
|
35
|
+
const answer = await prompter.prompt(argv, [
|
|
36
|
+
{
|
|
37
|
+
type: 'autocomplete',
|
|
38
|
+
name: 'subcommand',
|
|
39
|
+
message: 'What do you want to do?',
|
|
40
|
+
options: ['list', 'get', 'create', 'update', 'delete'],
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
43
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
44
|
+
}
|
|
45
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
46
|
+
};
|
|
47
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
48
|
+
switch (subcommand) {
|
|
49
|
+
case 'list':
|
|
50
|
+
return handleList(argv, prompter);
|
|
51
|
+
case 'get':
|
|
52
|
+
return handleGet(argv, prompter);
|
|
53
|
+
case 'create':
|
|
54
|
+
return handleCreate(argv, prompter);
|
|
55
|
+
case 'update':
|
|
56
|
+
return handleUpdate(argv, prompter);
|
|
57
|
+
case 'delete':
|
|
58
|
+
return handleDelete(argv, prompter);
|
|
59
|
+
default:
|
|
60
|
+
console.log(usage);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function handleList(_argv, _prompter) {
|
|
65
|
+
try {
|
|
66
|
+
const client = (0, executor_1.getClient)();
|
|
67
|
+
const result = await client.databaseTransfer
|
|
68
|
+
.findMany({
|
|
69
|
+
select: {
|
|
70
|
+
id: true,
|
|
71
|
+
databaseId: true,
|
|
72
|
+
targetOwnerId: true,
|
|
73
|
+
sourceApproved: true,
|
|
74
|
+
targetApproved: true,
|
|
75
|
+
sourceApprovedAt: true,
|
|
76
|
+
targetApprovedAt: true,
|
|
77
|
+
status: true,
|
|
78
|
+
initiatedBy: true,
|
|
79
|
+
notes: true,
|
|
80
|
+
expiresAt: true,
|
|
81
|
+
createdAt: true,
|
|
82
|
+
updatedAt: true,
|
|
83
|
+
completedAt: true,
|
|
84
|
+
},
|
|
85
|
+
})
|
|
86
|
+
.execute();
|
|
87
|
+
console.log(JSON.stringify(result, null, 2));
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.error('Failed to list records.');
|
|
91
|
+
if (error instanceof Error) {
|
|
92
|
+
console.error(error.message);
|
|
93
|
+
}
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function handleGet(argv, prompter) {
|
|
98
|
+
try {
|
|
99
|
+
const answers = await prompter.prompt(argv, [
|
|
100
|
+
{
|
|
101
|
+
type: 'text',
|
|
102
|
+
name: 'id',
|
|
103
|
+
message: 'id',
|
|
104
|
+
required: true,
|
|
105
|
+
},
|
|
106
|
+
]);
|
|
107
|
+
const client = (0, executor_1.getClient)();
|
|
108
|
+
const result = await client.databaseTransfer
|
|
109
|
+
.findOne({
|
|
110
|
+
id: answers.id,
|
|
111
|
+
select: {
|
|
112
|
+
id: true,
|
|
113
|
+
databaseId: true,
|
|
114
|
+
targetOwnerId: true,
|
|
115
|
+
sourceApproved: true,
|
|
116
|
+
targetApproved: true,
|
|
117
|
+
sourceApprovedAt: true,
|
|
118
|
+
targetApprovedAt: true,
|
|
119
|
+
status: true,
|
|
120
|
+
initiatedBy: true,
|
|
121
|
+
notes: true,
|
|
122
|
+
expiresAt: true,
|
|
123
|
+
createdAt: true,
|
|
124
|
+
updatedAt: true,
|
|
125
|
+
completedAt: true,
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
.execute();
|
|
129
|
+
console.log(JSON.stringify(result, null, 2));
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
console.error('Record not found.');
|
|
133
|
+
if (error instanceof Error) {
|
|
134
|
+
console.error(error.message);
|
|
135
|
+
}
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
async function handleCreate(argv, prompter) {
|
|
140
|
+
try {
|
|
141
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
142
|
+
{
|
|
143
|
+
type: 'text',
|
|
144
|
+
name: 'databaseId',
|
|
145
|
+
message: 'databaseId',
|
|
146
|
+
required: true,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'text',
|
|
150
|
+
name: 'targetOwnerId',
|
|
151
|
+
message: 'targetOwnerId',
|
|
152
|
+
required: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'boolean',
|
|
156
|
+
name: 'sourceApproved',
|
|
157
|
+
message: 'sourceApproved',
|
|
158
|
+
required: false,
|
|
159
|
+
skipPrompt: true,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'boolean',
|
|
163
|
+
name: 'targetApproved',
|
|
164
|
+
message: 'targetApproved',
|
|
165
|
+
required: false,
|
|
166
|
+
skipPrompt: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'text',
|
|
170
|
+
name: 'sourceApprovedAt',
|
|
171
|
+
message: 'sourceApprovedAt',
|
|
172
|
+
required: false,
|
|
173
|
+
skipPrompt: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'text',
|
|
177
|
+
name: 'targetApprovedAt',
|
|
178
|
+
message: 'targetApprovedAt',
|
|
179
|
+
required: false,
|
|
180
|
+
skipPrompt: true,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: 'text',
|
|
184
|
+
name: 'status',
|
|
185
|
+
message: 'status',
|
|
186
|
+
required: false,
|
|
187
|
+
skipPrompt: true,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
type: 'text',
|
|
191
|
+
name: 'initiatedBy',
|
|
192
|
+
message: 'initiatedBy',
|
|
193
|
+
required: true,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'text',
|
|
197
|
+
name: 'notes',
|
|
198
|
+
message: 'notes',
|
|
199
|
+
required: false,
|
|
200
|
+
skipPrompt: true,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: 'text',
|
|
204
|
+
name: 'expiresAt',
|
|
205
|
+
message: 'expiresAt',
|
|
206
|
+
required: false,
|
|
207
|
+
skipPrompt: true,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'text',
|
|
211
|
+
name: 'completedAt',
|
|
212
|
+
message: 'completedAt',
|
|
213
|
+
required: false,
|
|
214
|
+
skipPrompt: true,
|
|
215
|
+
},
|
|
216
|
+
]);
|
|
217
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
218
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
219
|
+
const client = (0, executor_1.getClient)();
|
|
220
|
+
const result = await client.databaseTransfer
|
|
221
|
+
.create({
|
|
222
|
+
data: {
|
|
223
|
+
databaseId: cleanedData.databaseId,
|
|
224
|
+
targetOwnerId: cleanedData.targetOwnerId,
|
|
225
|
+
sourceApproved: cleanedData.sourceApproved,
|
|
226
|
+
targetApproved: cleanedData.targetApproved,
|
|
227
|
+
sourceApprovedAt: cleanedData.sourceApprovedAt,
|
|
228
|
+
targetApprovedAt: cleanedData.targetApprovedAt,
|
|
229
|
+
status: cleanedData.status,
|
|
230
|
+
initiatedBy: cleanedData.initiatedBy,
|
|
231
|
+
notes: cleanedData.notes,
|
|
232
|
+
expiresAt: cleanedData.expiresAt,
|
|
233
|
+
completedAt: cleanedData.completedAt,
|
|
234
|
+
},
|
|
235
|
+
select: {
|
|
236
|
+
id: true,
|
|
237
|
+
databaseId: true,
|
|
238
|
+
targetOwnerId: true,
|
|
239
|
+
sourceApproved: true,
|
|
240
|
+
targetApproved: true,
|
|
241
|
+
sourceApprovedAt: true,
|
|
242
|
+
targetApprovedAt: true,
|
|
243
|
+
status: true,
|
|
244
|
+
initiatedBy: true,
|
|
245
|
+
notes: true,
|
|
246
|
+
expiresAt: true,
|
|
247
|
+
createdAt: true,
|
|
248
|
+
updatedAt: true,
|
|
249
|
+
completedAt: true,
|
|
250
|
+
},
|
|
251
|
+
})
|
|
252
|
+
.execute();
|
|
253
|
+
console.log(JSON.stringify(result, null, 2));
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
console.error('Failed to create record.');
|
|
257
|
+
if (error instanceof Error) {
|
|
258
|
+
console.error(error.message);
|
|
259
|
+
}
|
|
260
|
+
process.exit(1);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
async function handleUpdate(argv, prompter) {
|
|
264
|
+
try {
|
|
265
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
266
|
+
{
|
|
267
|
+
type: 'text',
|
|
268
|
+
name: 'id',
|
|
269
|
+
message: 'id',
|
|
270
|
+
required: true,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
type: 'text',
|
|
274
|
+
name: 'databaseId',
|
|
275
|
+
message: 'databaseId',
|
|
276
|
+
required: false,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
type: 'text',
|
|
280
|
+
name: 'targetOwnerId',
|
|
281
|
+
message: 'targetOwnerId',
|
|
282
|
+
required: false,
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: 'boolean',
|
|
286
|
+
name: 'sourceApproved',
|
|
287
|
+
message: 'sourceApproved',
|
|
288
|
+
required: false,
|
|
289
|
+
skipPrompt: true,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
type: 'boolean',
|
|
293
|
+
name: 'targetApproved',
|
|
294
|
+
message: 'targetApproved',
|
|
295
|
+
required: false,
|
|
296
|
+
skipPrompt: true,
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: 'text',
|
|
300
|
+
name: 'sourceApprovedAt',
|
|
301
|
+
message: 'sourceApprovedAt',
|
|
302
|
+
required: false,
|
|
303
|
+
skipPrompt: true,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
type: 'text',
|
|
307
|
+
name: 'targetApprovedAt',
|
|
308
|
+
message: 'targetApprovedAt',
|
|
309
|
+
required: false,
|
|
310
|
+
skipPrompt: true,
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
type: 'text',
|
|
314
|
+
name: 'status',
|
|
315
|
+
message: 'status',
|
|
316
|
+
required: false,
|
|
317
|
+
skipPrompt: true,
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: 'text',
|
|
321
|
+
name: 'initiatedBy',
|
|
322
|
+
message: 'initiatedBy',
|
|
323
|
+
required: false,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
type: 'text',
|
|
327
|
+
name: 'notes',
|
|
328
|
+
message: 'notes',
|
|
329
|
+
required: false,
|
|
330
|
+
skipPrompt: true,
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
type: 'text',
|
|
334
|
+
name: 'expiresAt',
|
|
335
|
+
message: 'expiresAt',
|
|
336
|
+
required: false,
|
|
337
|
+
skipPrompt: true,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
type: 'text',
|
|
341
|
+
name: 'completedAt',
|
|
342
|
+
message: 'completedAt',
|
|
343
|
+
required: false,
|
|
344
|
+
skipPrompt: true,
|
|
345
|
+
},
|
|
346
|
+
]);
|
|
347
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
348
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
349
|
+
const client = (0, executor_1.getClient)();
|
|
350
|
+
const result = await client.databaseTransfer
|
|
351
|
+
.update({
|
|
352
|
+
where: {
|
|
353
|
+
id: answers.id,
|
|
354
|
+
},
|
|
355
|
+
data: {
|
|
356
|
+
databaseId: cleanedData.databaseId,
|
|
357
|
+
targetOwnerId: cleanedData.targetOwnerId,
|
|
358
|
+
sourceApproved: cleanedData.sourceApproved,
|
|
359
|
+
targetApproved: cleanedData.targetApproved,
|
|
360
|
+
sourceApprovedAt: cleanedData.sourceApprovedAt,
|
|
361
|
+
targetApprovedAt: cleanedData.targetApprovedAt,
|
|
362
|
+
status: cleanedData.status,
|
|
363
|
+
initiatedBy: cleanedData.initiatedBy,
|
|
364
|
+
notes: cleanedData.notes,
|
|
365
|
+
expiresAt: cleanedData.expiresAt,
|
|
366
|
+
completedAt: cleanedData.completedAt,
|
|
367
|
+
},
|
|
368
|
+
select: {
|
|
369
|
+
id: true,
|
|
370
|
+
databaseId: true,
|
|
371
|
+
targetOwnerId: true,
|
|
372
|
+
sourceApproved: true,
|
|
373
|
+
targetApproved: true,
|
|
374
|
+
sourceApprovedAt: true,
|
|
375
|
+
targetApprovedAt: true,
|
|
376
|
+
status: true,
|
|
377
|
+
initiatedBy: true,
|
|
378
|
+
notes: true,
|
|
379
|
+
expiresAt: true,
|
|
380
|
+
createdAt: true,
|
|
381
|
+
updatedAt: true,
|
|
382
|
+
completedAt: true,
|
|
383
|
+
},
|
|
384
|
+
})
|
|
385
|
+
.execute();
|
|
386
|
+
console.log(JSON.stringify(result, null, 2));
|
|
387
|
+
}
|
|
388
|
+
catch (error) {
|
|
389
|
+
console.error('Failed to update record.');
|
|
390
|
+
if (error instanceof Error) {
|
|
391
|
+
console.error(error.message);
|
|
392
|
+
}
|
|
393
|
+
process.exit(1);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
async function handleDelete(argv, prompter) {
|
|
397
|
+
try {
|
|
398
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
399
|
+
{
|
|
400
|
+
type: 'text',
|
|
401
|
+
name: 'id',
|
|
402
|
+
message: 'id',
|
|
403
|
+
required: true,
|
|
404
|
+
},
|
|
405
|
+
]);
|
|
406
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
407
|
+
const client = (0, executor_1.getClient)();
|
|
408
|
+
const result = await client.databaseTransfer
|
|
409
|
+
.delete({
|
|
410
|
+
where: {
|
|
411
|
+
id: answers.id,
|
|
412
|
+
},
|
|
413
|
+
select: {
|
|
414
|
+
id: true,
|
|
415
|
+
},
|
|
416
|
+
})
|
|
417
|
+
.execute();
|
|
418
|
+
console.log(JSON.stringify(result, null, 2));
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
console.error('Failed to delete record.');
|
|
422
|
+
if (error instanceof Error) {
|
|
423
|
+
console.error(error.message);
|
|
424
|
+
}
|
|
425
|
+
process.exit(1);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
@@ -17,10 +17,6 @@ const fieldSchema = {
|
|
|
17
17
|
hash: 'uuid',
|
|
18
18
|
createdAt: 'string',
|
|
19
19
|
updatedAt: 'string',
|
|
20
|
-
schemaHashTrgmSimilarity: 'float',
|
|
21
|
-
nameTrgmSimilarity: 'float',
|
|
22
|
-
labelTrgmSimilarity: 'float',
|
|
23
|
-
searchScore: 'float',
|
|
24
20
|
};
|
|
25
21
|
const usage = '\ndatabase <command>\n\nCommands:\n list List all database records\n get Get a database by ID\n create Create a new database\n update Update an existing database\n delete Delete a database\n\n --help, -h Show this help message\n';
|
|
26
22
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -16,10 +16,6 @@ const fieldSchema = {
|
|
|
16
16
|
privilege: 'string',
|
|
17
17
|
granteeName: 'string',
|
|
18
18
|
isGrant: 'boolean',
|
|
19
|
-
objectTypeTrgmSimilarity: 'float',
|
|
20
|
-
privilegeTrgmSimilarity: 'float',
|
|
21
|
-
granteeNameTrgmSimilarity: 'float',
|
|
22
|
-
searchScore: 'float',
|
|
23
19
|
};
|
|
24
20
|
const usage = '\ndefault-privilege <command>\n\nCommands:\n list List all defaultPrivilege records\n get Get a defaultPrivilege by ID\n create Create a new defaultPrivilege\n update Update an existing defaultPrivilege\n delete Delete a defaultPrivilege\n\n --help, -h Show this help message\n';
|
|
25
21
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -21,8 +21,6 @@ const fieldSchema = {
|
|
|
21
21
|
updateDefaults: 'boolean',
|
|
22
22
|
funcName: 'string',
|
|
23
23
|
funcOrder: 'int',
|
|
24
|
-
funcNameTrgmSimilarity: 'float',
|
|
25
|
-
searchScore: 'float',
|
|
26
24
|
};
|
|
27
25
|
const usage = '\ndenormalized-table-field <command>\n\nCommands:\n list List all denormalizedTableField records\n get Get a denormalizedTableField by ID\n create Create a new denormalizedTableField\n update Update an existing denormalizedTableField\n delete Delete a denormalizedTableField\n\n --help, -h Show this help message\n';
|
|
28
26
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -16,8 +16,6 @@ const fieldSchema = {
|
|
|
16
16
|
tableId: 'uuid',
|
|
17
17
|
ownerTableId: 'uuid',
|
|
18
18
|
tableName: 'string',
|
|
19
|
-
tableNameTrgmSimilarity: 'float',
|
|
20
|
-
searchScore: 'float',
|
|
21
19
|
};
|
|
22
20
|
const usage = '\nemails-module <command>\n\nCommands:\n list List all emailsModule records\n get Get a emailsModule by ID\n create Create a new emailsModule\n update Update an existing emailsModule\n delete Delete a emailsModule\n\n --help, -h Show this help message\n';
|
|
23
21
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for EmbeddingChunk
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
7
|
+
declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
|
|
8
|
+
export default _default;
|