@constructive-sdk/cli 0.13.4 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/cli/commands/app-membership.js +22 -0
- package/admin/cli/commands/membership-type.js +44 -0
- package/{auth/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
- package/admin/cli/commands/org-member-profile.js +392 -0
- package/admin/cli/commands/org-membership.js +44 -0
- package/admin/cli/commands.js +7 -5
- package/admin/cli/executor.d.ts +3 -2
- package/admin/orm/index.d.ts +6 -4
- package/admin/orm/index.js +6 -4
- package/admin/orm/input-types.d.ts +503 -295
- package/admin/orm/models/index.d.ts +3 -2
- package/admin/orm/models/index.js +7 -5
- package/admin/orm/models/orgMemberProfile.d.ts +56 -0
- package/{auth/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +26 -26
- package/{esm/auth/cli/commands/one-time-token.d.ts → auth/cli/commands/create-api-key.d.ts} +1 -1
- package/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
- package/auth/cli/commands/disconnect-account.d.ts +8 -0
- package/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
- package/auth/cli/commands/provision-new-user.d.ts +8 -0
- package/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
- package/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/auth/cli/commands/request-cross-origin-token.js +36 -0
- package/auth/cli/commands/require-step-up.d.ts +8 -0
- package/auth/cli/commands/require-step-up.js +30 -0
- package/auth/cli/commands/{one-time-token.d.ts → revoke-api-key.d.ts} +1 -1
- package/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
- package/auth/cli/commands/revoke-session.d.ts +8 -0
- package/auth/cli/commands/revoke-session.js +36 -0
- package/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/auth/cli/commands/sign-in-cross-origin.js +36 -0
- package/auth/cli/commands/user-connected-account.d.ts +8 -0
- package/auth/cli/commands/user-connected-account.js +176 -0
- package/auth/cli/commands.js +23 -11
- package/auth/cli/executor.d.ts +44 -14
- package/auth/orm/index.d.ts +45 -15
- package/auth/orm/index.js +2 -2
- package/auth/orm/input-types.d.ts +186 -251
- package/auth/orm/input-types.js +0 -1
- package/auth/orm/models/index.d.ts +1 -1
- package/auth/orm/models/index.js +3 -3
- package/auth/orm/models/userConnectedAccount.d.ts +38 -0
- package/auth/orm/models/userConnectedAccount.js +76 -0
- package/auth/orm/mutation/index.d.ts +56 -16
- package/auth/orm/mutation/index.js +78 -18
- package/auth/orm/query/index.d.ts +12 -4
- package/auth/orm/query/index.js +19 -7
- package/esm/admin/cli/commands/app-membership.js +22 -0
- package/esm/admin/cli/commands/membership-type.js +44 -0
- package/esm/{public/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
- package/esm/admin/cli/commands/org-member-profile.js +390 -0
- package/esm/admin/cli/commands/org-membership.js +44 -0
- package/esm/admin/cli/commands.js +7 -5
- package/esm/admin/cli/executor.d.ts +3 -2
- package/esm/admin/orm/index.d.ts +6 -4
- package/esm/admin/orm/index.js +6 -4
- package/esm/admin/orm/input-types.d.ts +503 -295
- package/esm/admin/orm/models/index.d.ts +3 -2
- package/esm/admin/orm/models/index.js +3 -2
- package/esm/admin/orm/models/orgMemberProfile.d.ts +56 -0
- package/esm/{public/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +24 -24
- package/esm/auth/cli/commands/create-api-key.d.ts +8 -0
- package/esm/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
- package/esm/auth/cli/commands/disconnect-account.d.ts +8 -0
- package/esm/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
- package/esm/auth/cli/commands/provision-new-user.d.ts +8 -0
- package/esm/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
- package/esm/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/esm/auth/cli/commands/request-cross-origin-token.js +34 -0
- package/esm/auth/cli/commands/require-step-up.d.ts +8 -0
- package/esm/auth/cli/commands/require-step-up.js +28 -0
- package/esm/auth/cli/commands/revoke-api-key.d.ts +8 -0
- package/esm/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
- package/esm/auth/cli/commands/revoke-session.d.ts +8 -0
- package/esm/auth/cli/commands/revoke-session.js +34 -0
- package/esm/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/esm/auth/cli/commands/sign-in-cross-origin.js +34 -0
- package/esm/auth/cli/commands/user-connected-account.d.ts +8 -0
- package/esm/auth/cli/commands/user-connected-account.js +174 -0
- package/esm/auth/cli/commands.js +23 -11
- package/esm/auth/cli/executor.d.ts +44 -14
- package/esm/auth/orm/index.d.ts +45 -15
- package/esm/auth/orm/index.js +2 -2
- package/esm/auth/orm/input-types.d.ts +186 -251
- package/esm/auth/orm/input-types.js +0 -1
- package/esm/auth/orm/models/index.d.ts +1 -1
- package/esm/auth/orm/models/index.js +1 -1
- package/esm/auth/orm/models/userConnectedAccount.d.ts +38 -0
- package/esm/auth/orm/models/userConnectedAccount.js +72 -0
- package/esm/auth/orm/mutation/index.d.ts +56 -16
- package/esm/auth/orm/mutation/index.js +78 -18
- package/esm/auth/orm/query/index.d.ts +12 -4
- package/esm/auth/orm/query/index.js +19 -7
- package/esm/public/cli/commands/app-membership.js +22 -0
- package/esm/public/cli/commands/construct-blueprint.js +1 -1
- package/esm/public/cli/commands/create-api-key.d.ts +8 -0
- package/esm/public/cli/commands/create-api-key.js +34 -0
- package/{public/cli/commands/connected-account.d.ts → esm/public/cli/commands/devices-module.d.ts} +1 -1
- package/esm/public/cli/commands/{connected-account.js → devices-module.js} +101 -87
- package/esm/public/cli/commands/disconnect-account.d.ts +8 -0
- package/esm/public/cli/commands/disconnect-account.js +34 -0
- package/esm/public/cli/commands/{table-template-module.d.ts → entity-type-provision.d.ts} +1 -1
- package/esm/public/cli/commands/entity-type-provision.js +554 -0
- package/esm/public/cli/commands/membership-type.js +44 -0
- package/esm/public/cli/commands/memberships-module.js +22 -0
- package/esm/{auth/cli/commands/connected-account.d.ts → public/cli/commands/org-member-profile.d.ts} +1 -1
- package/esm/public/cli/commands/org-member-profile.js +390 -0
- package/esm/public/cli/commands/org-membership.js +44 -0
- package/esm/public/cli/commands/provision-new-user.d.ts +8 -0
- package/esm/public/cli/commands/provision-new-user.js +34 -0
- package/esm/public/cli/commands/provision-spatial-relation.d.ts +8 -0
- package/esm/public/cli/commands/provision-spatial-relation.js +34 -0
- package/esm/public/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/esm/public/cli/commands/request-cross-origin-token.js +34 -0
- package/esm/public/cli/commands/require-step-up.d.ts +8 -0
- package/esm/public/cli/commands/require-step-up.js +28 -0
- package/{auth/cli/commands/sign-in-one-time-token.d.ts → esm/public/cli/commands/resolve-blueprint-field.d.ts} +1 -1
- package/esm/public/cli/commands/resolve-blueprint-field.js +38 -0
- package/esm/public/cli/commands/revoke-api-key.d.ts +8 -0
- package/esm/public/cli/commands/revoke-api-key.js +34 -0
- package/esm/public/cli/commands/revoke-session.d.ts +8 -0
- package/esm/public/cli/commands/revoke-session.js +34 -0
- package/esm/public/cli/commands/session-secrets-module.d.ts +8 -0
- package/esm/{auth/cli/commands/connected-account.js → public/cli/commands/session-secrets-module.js} +82 -90
- package/esm/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/esm/public/cli/commands/sign-in-cross-origin.js +34 -0
- package/esm/public/cli/commands/spatial-relation.d.ts +8 -0
- package/esm/public/cli/commands/spatial-relation.js +472 -0
- package/esm/public/cli/commands/user-auth-module.js +24 -24
- package/esm/public/cli/commands/user-connected-account.d.ts +8 -0
- package/esm/public/cli/commands/user-connected-account.js +174 -0
- package/esm/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
- package/esm/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
- package/esm/public/cli/commands.js +41 -15
- package/esm/public/cli/executor.d.ts +61 -16
- package/esm/public/orm/index.d.ts +69 -19
- package/esm/public/orm/index.js +16 -6
- package/esm/public/orm/input-types.d.ts +2047 -640
- package/esm/public/orm/input-types.js +15 -6
- package/esm/public/orm/models/devicesModule.d.ts +56 -0
- package/esm/public/orm/models/devicesModule.js +96 -0
- package/esm/public/orm/models/entityTypeProvision.d.ts +56 -0
- package/esm/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +24 -24
- package/esm/public/orm/models/index.d.ts +8 -3
- package/esm/public/orm/models/index.js +8 -3
- package/esm/public/orm/models/orgMemberProfile.d.ts +56 -0
- package/esm/{auth/orm/models/connectedAccount.js → public/orm/models/orgMemberProfile.js} +24 -24
- package/esm/public/orm/models/sessionSecretsModule.d.ts +56 -0
- package/esm/public/orm/models/sessionSecretsModule.js +96 -0
- package/esm/public/orm/models/spatialRelation.d.ts +56 -0
- package/esm/public/orm/models/spatialRelation.js +96 -0
- package/esm/public/orm/models/userConnectedAccount.d.ts +38 -0
- package/esm/public/orm/models/userConnectedAccount.js +72 -0
- package/esm/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
- package/esm/public/orm/models/webauthnCredentialsModule.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +72 -20
- package/esm/public/orm/mutation/index.js +96 -24
- package/esm/public/orm/query/index.d.ts +24 -2
- package/esm/public/orm/query/index.js +36 -4
- package/package.json +5 -5
- package/public/cli/commands/app-membership.js +22 -0
- package/public/cli/commands/construct-blueprint.js +1 -1
- package/public/cli/commands/create-api-key.d.ts +8 -0
- package/public/cli/commands/create-api-key.js +36 -0
- package/public/cli/commands/devices-module.d.ts +8 -0
- package/{auth/cli/commands/connected-account.js → public/cli/commands/devices-module.js} +101 -87
- package/public/cli/commands/disconnect-account.d.ts +8 -0
- package/public/cli/commands/disconnect-account.js +36 -0
- package/public/cli/commands/entity-type-provision.d.ts +8 -0
- package/public/cli/commands/entity-type-provision.js +556 -0
- package/public/cli/commands/membership-type.js +44 -0
- package/public/cli/commands/memberships-module.js +22 -0
- package/public/cli/commands/org-member-profile.d.ts +8 -0
- package/public/cli/commands/org-member-profile.js +392 -0
- package/public/cli/commands/org-membership.js +44 -0
- package/public/cli/commands/provision-new-user.d.ts +8 -0
- package/public/cli/commands/provision-new-user.js +36 -0
- package/public/cli/commands/provision-spatial-relation.d.ts +8 -0
- package/public/cli/commands/provision-spatial-relation.js +36 -0
- package/public/cli/commands/request-cross-origin-token.d.ts +8 -0
- package/public/cli/commands/request-cross-origin-token.js +36 -0
- package/public/cli/commands/require-step-up.d.ts +8 -0
- package/public/cli/commands/require-step-up.js +30 -0
- package/public/cli/commands/resolve-blueprint-field.d.ts +8 -0
- package/public/cli/commands/resolve-blueprint-field.js +40 -0
- package/public/cli/commands/revoke-api-key.d.ts +8 -0
- package/public/cli/commands/revoke-api-key.js +36 -0
- package/public/cli/commands/revoke-session.d.ts +8 -0
- package/public/cli/commands/revoke-session.js +36 -0
- package/public/cli/commands/session-secrets-module.d.ts +8 -0
- package/public/cli/commands/{connected-account.js → session-secrets-module.js} +82 -90
- package/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
- package/public/cli/commands/sign-in-cross-origin.js +36 -0
- package/public/cli/commands/spatial-relation.d.ts +8 -0
- package/public/cli/commands/spatial-relation.js +474 -0
- package/public/cli/commands/user-auth-module.js +24 -24
- package/public/cli/commands/user-connected-account.d.ts +8 -0
- package/public/cli/commands/user-connected-account.js +176 -0
- package/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
- package/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
- package/public/cli/commands.js +41 -15
- package/public/cli/executor.d.ts +61 -16
- package/public/orm/index.d.ts +69 -19
- package/public/orm/index.js +16 -6
- package/public/orm/input-types.d.ts +2047 -640
- package/public/orm/input-types.js +15 -6
- package/public/orm/models/devicesModule.d.ts +56 -0
- package/public/orm/models/devicesModule.js +100 -0
- package/public/orm/models/entityTypeProvision.d.ts +56 -0
- package/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +26 -26
- package/public/orm/models/index.d.ts +8 -3
- package/public/orm/models/index.js +19 -9
- package/public/orm/models/orgMemberProfile.d.ts +56 -0
- package/public/orm/models/{connectedAccount.js → orgMemberProfile.js} +26 -26
- package/public/orm/models/sessionSecretsModule.d.ts +56 -0
- package/public/orm/models/sessionSecretsModule.js +100 -0
- package/public/orm/models/spatialRelation.d.ts +56 -0
- package/public/orm/models/spatialRelation.js +100 -0
- package/public/orm/models/userConnectedAccount.d.ts +38 -0
- package/public/orm/models/userConnectedAccount.js +76 -0
- package/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
- package/public/orm/models/webauthnCredentialsModule.js +100 -0
- package/public/orm/mutation/index.d.ts +72 -20
- package/public/orm/mutation/index.js +96 -24
- package/public/orm/query/index.d.ts +24 -2
- package/public/orm/query/index.js +36 -4
- package/auth/orm/models/connectedAccount.d.ts +0 -56
- package/esm/auth/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/esm/auth/orm/models/connectedAccount.d.ts +0 -56
- package/esm/public/cli/commands/one-time-token.d.ts +0 -8
- package/esm/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/esm/public/orm/models/connectedAccount.d.ts +0 -56
- package/esm/public/orm/models/tableTemplateModule.d.ts +0 -56
- package/public/cli/commands/one-time-token.d.ts +0 -8
- package/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
- package/public/cli/commands/table-template-module.d.ts +0 -8
- package/public/orm/models/connectedAccount.d.ts +0 -56
- package/public/orm/models/tableTemplateModule.d.ts +0 -56
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for UserConnectedAccount
|
|
3
|
+
* @generated by @constructive-io/graphql-codegen
|
|
4
|
+
* DO NOT EDIT - changes will be overwritten
|
|
5
|
+
*/
|
|
6
|
+
import { extractFirst } from 'inquirerer';
|
|
7
|
+
import { getClient } from '../executor';
|
|
8
|
+
import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
|
|
9
|
+
const fieldSchema = {
|
|
10
|
+
id: 'uuid',
|
|
11
|
+
ownerId: 'uuid',
|
|
12
|
+
service: 'string',
|
|
13
|
+
identifier: 'string',
|
|
14
|
+
details: 'json',
|
|
15
|
+
isVerified: 'boolean',
|
|
16
|
+
createdAt: 'string',
|
|
17
|
+
updatedAt: 'string',
|
|
18
|
+
};
|
|
19
|
+
const usage = '\nuser-connected-account <command>\n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
20
|
+
export default async (argv, prompter, _options) => {
|
|
21
|
+
if (argv.help || argv.h) {
|
|
22
|
+
console.log(usage);
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
26
|
+
if (!subcommand) {
|
|
27
|
+
const answer = await prompter.prompt(argv, [
|
|
28
|
+
{
|
|
29
|
+
type: 'autocomplete',
|
|
30
|
+
name: 'subcommand',
|
|
31
|
+
message: 'What do you want to do?',
|
|
32
|
+
options: ['list', 'find-first', 'create'],
|
|
33
|
+
},
|
|
34
|
+
]);
|
|
35
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
36
|
+
}
|
|
37
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
38
|
+
};
|
|
39
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
40
|
+
switch (subcommand) {
|
|
41
|
+
case 'list':
|
|
42
|
+
return handleList(argv, prompter);
|
|
43
|
+
case 'find-first':
|
|
44
|
+
return handleFindFirst(argv, prompter);
|
|
45
|
+
case 'create':
|
|
46
|
+
return handleCreate(argv, prompter);
|
|
47
|
+
default:
|
|
48
|
+
console.log(usage);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async function handleList(argv, _prompter) {
|
|
53
|
+
try {
|
|
54
|
+
const defaultSelect = {
|
|
55
|
+
id: true,
|
|
56
|
+
ownerId: true,
|
|
57
|
+
service: true,
|
|
58
|
+
identifier: true,
|
|
59
|
+
details: true,
|
|
60
|
+
isVerified: true,
|
|
61
|
+
createdAt: true,
|
|
62
|
+
updatedAt: true,
|
|
63
|
+
};
|
|
64
|
+
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
65
|
+
const client = getClient();
|
|
66
|
+
const result = await client.userConnectedAccount.findMany(findManyArgs).execute();
|
|
67
|
+
console.log(JSON.stringify(result, null, 2));
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.error('Failed to list records.');
|
|
71
|
+
if (error instanceof Error) {
|
|
72
|
+
console.error(error.message);
|
|
73
|
+
}
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async function handleFindFirst(argv, _prompter) {
|
|
78
|
+
try {
|
|
79
|
+
const defaultSelect = {
|
|
80
|
+
id: true,
|
|
81
|
+
ownerId: true,
|
|
82
|
+
service: true,
|
|
83
|
+
identifier: true,
|
|
84
|
+
details: true,
|
|
85
|
+
isVerified: true,
|
|
86
|
+
createdAt: true,
|
|
87
|
+
updatedAt: true,
|
|
88
|
+
};
|
|
89
|
+
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
90
|
+
const client = getClient();
|
|
91
|
+
const result = await client.userConnectedAccount.findFirst(findFirstArgs).execute();
|
|
92
|
+
console.log(JSON.stringify(result, null, 2));
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
console.error('Failed to find record.');
|
|
96
|
+
if (error instanceof Error) {
|
|
97
|
+
console.error(error.message);
|
|
98
|
+
}
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async function handleCreate(argv, prompter) {
|
|
103
|
+
try {
|
|
104
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
105
|
+
{
|
|
106
|
+
type: 'text',
|
|
107
|
+
name: 'ownerId',
|
|
108
|
+
message: 'ownerId',
|
|
109
|
+
required: false,
|
|
110
|
+
skipPrompt: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'text',
|
|
114
|
+
name: 'service',
|
|
115
|
+
message: 'service',
|
|
116
|
+
required: false,
|
|
117
|
+
skipPrompt: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'text',
|
|
121
|
+
name: 'identifier',
|
|
122
|
+
message: 'identifier',
|
|
123
|
+
required: false,
|
|
124
|
+
skipPrompt: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'json',
|
|
128
|
+
name: 'details',
|
|
129
|
+
message: 'details',
|
|
130
|
+
required: false,
|
|
131
|
+
skipPrompt: true,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'boolean',
|
|
135
|
+
name: 'isVerified',
|
|
136
|
+
message: 'isVerified',
|
|
137
|
+
required: false,
|
|
138
|
+
skipPrompt: true,
|
|
139
|
+
},
|
|
140
|
+
]);
|
|
141
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
142
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
143
|
+
const client = getClient();
|
|
144
|
+
const result = await client.userConnectedAccount
|
|
145
|
+
.create({
|
|
146
|
+
data: {
|
|
147
|
+
ownerId: cleanedData.ownerId,
|
|
148
|
+
service: cleanedData.service,
|
|
149
|
+
identifier: cleanedData.identifier,
|
|
150
|
+
details: cleanedData.details,
|
|
151
|
+
isVerified: cleanedData.isVerified,
|
|
152
|
+
},
|
|
153
|
+
select: {
|
|
154
|
+
id: true,
|
|
155
|
+
ownerId: true,
|
|
156
|
+
service: true,
|
|
157
|
+
identifier: true,
|
|
158
|
+
details: true,
|
|
159
|
+
isVerified: true,
|
|
160
|
+
createdAt: true,
|
|
161
|
+
updatedAt: true,
|
|
162
|
+
},
|
|
163
|
+
})
|
|
164
|
+
.execute();
|
|
165
|
+
console.log(JSON.stringify(result, null, 2));
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
console.error('Failed to create record.');
|
|
169
|
+
if (error instanceof Error) {
|
|
170
|
+
console.error(error.message);
|
|
171
|
+
}
|
|
172
|
+
process.exit(1);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for WebauthnCredentialsModule
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI commands for
|
|
2
|
+
* CLI commands for WebauthnCredentialsModule
|
|
3
3
|
* @generated by @constructive-io/graphql-codegen
|
|
4
4
|
* DO NOT EDIT - changes will be overwritten
|
|
5
5
|
*/
|
|
@@ -14,10 +14,8 @@ const fieldSchema = {
|
|
|
14
14
|
tableId: 'uuid',
|
|
15
15
|
ownerTableId: 'uuid',
|
|
16
16
|
tableName: 'string',
|
|
17
|
-
nodeType: 'string',
|
|
18
|
-
data: 'json',
|
|
19
17
|
};
|
|
20
|
-
const usage = '\
|
|
18
|
+
const usage = '\nwebauthn-credentials-module <command>\n\nCommands:\n list List webauthnCredentialsModule records\n find-first Find first matching webauthnCredentialsModule record\n get Get a webauthnCredentialsModule by ID\n create Create a new webauthnCredentialsModule\n update Update an existing webauthnCredentialsModule\n delete Delete a webauthnCredentialsModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
|
|
21
19
|
export default async (argv, prompter, _options) => {
|
|
22
20
|
if (argv.help || argv.h) {
|
|
23
21
|
console.log(usage);
|
|
@@ -66,12 +64,10 @@ async function handleList(argv, _prompter) {
|
|
|
66
64
|
tableId: true,
|
|
67
65
|
ownerTableId: true,
|
|
68
66
|
tableName: true,
|
|
69
|
-
nodeType: true,
|
|
70
|
-
data: true,
|
|
71
67
|
};
|
|
72
68
|
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
73
69
|
const client = getClient();
|
|
74
|
-
const result = await client.
|
|
70
|
+
const result = await client.webauthnCredentialsModule.findMany(findManyArgs).execute();
|
|
75
71
|
console.log(JSON.stringify(result, null, 2));
|
|
76
72
|
}
|
|
77
73
|
catch (error) {
|
|
@@ -92,12 +88,10 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
92
88
|
tableId: true,
|
|
93
89
|
ownerTableId: true,
|
|
94
90
|
tableName: true,
|
|
95
|
-
nodeType: true,
|
|
96
|
-
data: true,
|
|
97
91
|
};
|
|
98
92
|
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
99
93
|
const client = getClient();
|
|
100
|
-
const result = await client.
|
|
94
|
+
const result = await client.webauthnCredentialsModule.findFirst(findFirstArgs).execute();
|
|
101
95
|
console.log(JSON.stringify(result, null, 2));
|
|
102
96
|
}
|
|
103
97
|
catch (error) {
|
|
@@ -119,7 +113,7 @@ async function handleGet(argv, prompter) {
|
|
|
119
113
|
},
|
|
120
114
|
]);
|
|
121
115
|
const client = getClient();
|
|
122
|
-
const result = await client.
|
|
116
|
+
const result = await client.webauthnCredentialsModule
|
|
123
117
|
.findOne({
|
|
124
118
|
id: answers.id,
|
|
125
119
|
select: {
|
|
@@ -130,8 +124,6 @@ async function handleGet(argv, prompter) {
|
|
|
130
124
|
tableId: true,
|
|
131
125
|
ownerTableId: true,
|
|
132
126
|
tableName: true,
|
|
133
|
-
nodeType: true,
|
|
134
|
-
data: true,
|
|
135
127
|
},
|
|
136
128
|
})
|
|
137
129
|
.execute();
|
|
@@ -186,18 +178,6 @@ async function handleCreate(argv, prompter) {
|
|
|
186
178
|
type: 'text',
|
|
187
179
|
name: 'tableName',
|
|
188
180
|
message: 'tableName',
|
|
189
|
-
required: true,
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: 'text',
|
|
193
|
-
name: 'nodeType',
|
|
194
|
-
message: 'nodeType',
|
|
195
|
-
required: true,
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
type: 'json',
|
|
199
|
-
name: 'data',
|
|
200
|
-
message: 'data',
|
|
201
181
|
required: false,
|
|
202
182
|
skipPrompt: true,
|
|
203
183
|
},
|
|
@@ -205,7 +185,7 @@ async function handleCreate(argv, prompter) {
|
|
|
205
185
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
206
186
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
207
187
|
const client = getClient();
|
|
208
|
-
const result = await client.
|
|
188
|
+
const result = await client.webauthnCredentialsModule
|
|
209
189
|
.create({
|
|
210
190
|
data: {
|
|
211
191
|
databaseId: cleanedData.databaseId,
|
|
@@ -214,8 +194,6 @@ async function handleCreate(argv, prompter) {
|
|
|
214
194
|
tableId: cleanedData.tableId,
|
|
215
195
|
ownerTableId: cleanedData.ownerTableId,
|
|
216
196
|
tableName: cleanedData.tableName,
|
|
217
|
-
nodeType: cleanedData.nodeType,
|
|
218
|
-
data: cleanedData.data,
|
|
219
197
|
},
|
|
220
198
|
select: {
|
|
221
199
|
id: true,
|
|
@@ -225,8 +203,6 @@ async function handleCreate(argv, prompter) {
|
|
|
225
203
|
tableId: true,
|
|
226
204
|
ownerTableId: true,
|
|
227
205
|
tableName: true,
|
|
228
|
-
nodeType: true,
|
|
229
|
-
data: true,
|
|
230
206
|
},
|
|
231
207
|
})
|
|
232
208
|
.execute();
|
|
@@ -288,25 +264,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
288
264
|
name: 'tableName',
|
|
289
265
|
message: 'tableName',
|
|
290
266
|
required: false,
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: 'text',
|
|
294
|
-
name: 'nodeType',
|
|
295
|
-
message: 'nodeType',
|
|
296
|
-
required: false,
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
type: 'json',
|
|
300
|
-
name: 'data',
|
|
301
|
-
message: 'data',
|
|
302
|
-
required: false,
|
|
303
267
|
skipPrompt: true,
|
|
304
268
|
},
|
|
305
269
|
]);
|
|
306
270
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
307
271
|
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
308
272
|
const client = getClient();
|
|
309
|
-
const result = await client.
|
|
273
|
+
const result = await client.webauthnCredentialsModule
|
|
310
274
|
.update({
|
|
311
275
|
where: {
|
|
312
276
|
id: answers.id,
|
|
@@ -318,8 +282,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
318
282
|
tableId: cleanedData.tableId,
|
|
319
283
|
ownerTableId: cleanedData.ownerTableId,
|
|
320
284
|
tableName: cleanedData.tableName,
|
|
321
|
-
nodeType: cleanedData.nodeType,
|
|
322
|
-
data: cleanedData.data,
|
|
323
285
|
},
|
|
324
286
|
select: {
|
|
325
287
|
id: true,
|
|
@@ -329,8 +291,6 @@ async function handleUpdate(argv, prompter) {
|
|
|
329
291
|
tableId: true,
|
|
330
292
|
ownerTableId: true,
|
|
331
293
|
tableName: true,
|
|
332
|
-
nodeType: true,
|
|
333
|
-
data: true,
|
|
334
294
|
},
|
|
335
295
|
})
|
|
336
296
|
.execute();
|
|
@@ -356,7 +316,7 @@ async function handleDelete(argv, prompter) {
|
|
|
356
316
|
]);
|
|
357
317
|
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
358
318
|
const client = getClient();
|
|
359
|
-
const result = await client.
|
|
319
|
+
const result = await client.webauthnCredentialsModule
|
|
360
320
|
.delete({
|
|
361
321
|
where: {
|
|
362
322
|
id: answers.id,
|
|
@@ -18,6 +18,7 @@ import schemaCmd from './commands/schema';
|
|
|
18
18
|
import tableCmd from './commands/table';
|
|
19
19
|
import checkConstraintCmd from './commands/check-constraint';
|
|
20
20
|
import fieldCmd from './commands/field';
|
|
21
|
+
import spatialRelationCmd from './commands/spatial-relation';
|
|
21
22
|
import foreignKeyConstraintCmd from './commands/foreign-key-constraint';
|
|
22
23
|
import fullTextSearchCmd from './commands/full-text-search';
|
|
23
24
|
import indexCmd from './commands/index';
|
|
@@ -31,9 +32,9 @@ import viewTableCmd from './commands/view-table';
|
|
|
31
32
|
import viewGrantCmd from './commands/view-grant';
|
|
32
33
|
import viewRuleCmd from './commands/view-rule';
|
|
33
34
|
import embeddingChunkCmd from './commands/embedding-chunk';
|
|
34
|
-
import tableTemplateModuleCmd from './commands/table-template-module';
|
|
35
35
|
import secureTableProvisionCmd from './commands/secure-table-provision';
|
|
36
36
|
import relationProvisionCmd from './commands/relation-provision';
|
|
37
|
+
import sessionSecretsModuleCmd from './commands/session-secrets-module';
|
|
37
38
|
import schemaGrantCmd from './commands/schema-grant';
|
|
38
39
|
import defaultPrivilegeCmd from './commands/default-privilege';
|
|
39
40
|
import enumCmd from './commands/enum';
|
|
@@ -71,6 +72,8 @@ import blueprintCmd from './commands/blueprint';
|
|
|
71
72
|
import blueprintTemplateCmd from './commands/blueprint-template';
|
|
72
73
|
import blueprintConstructionCmd from './commands/blueprint-construction';
|
|
73
74
|
import storageModuleCmd from './commands/storage-module';
|
|
75
|
+
import entityTypeProvisionCmd from './commands/entity-type-provision';
|
|
76
|
+
import webauthnCredentialsModuleCmd from './commands/webauthn-credentials-module';
|
|
74
77
|
import databaseProvisionModuleCmd from './commands/database-provision-module';
|
|
75
78
|
import appAdminGrantCmd from './commands/app-admin-grant';
|
|
76
79
|
import appOwnerGrantCmd from './commands/app-owner-grant';
|
|
@@ -79,6 +82,7 @@ import orgMembershipCmd from './commands/org-membership';
|
|
|
79
82
|
import orgMemberCmd from './commands/org-member';
|
|
80
83
|
import orgAdminGrantCmd from './commands/org-admin-grant';
|
|
81
84
|
import orgOwnerGrantCmd from './commands/org-owner-grant';
|
|
85
|
+
import orgMemberProfileCmd from './commands/org-member-profile';
|
|
82
86
|
import orgGrantCmd from './commands/org-grant';
|
|
83
87
|
import orgChartEdgeCmd from './commands/org-chart-edge';
|
|
84
88
|
import orgChartEdgeGrantCmd from './commands/org-chart-edge-grant';
|
|
@@ -91,7 +95,6 @@ import appLevelCmd from './commands/app-level';
|
|
|
91
95
|
import emailCmd from './commands/email';
|
|
92
96
|
import phoneNumberCmd from './commands/phone-number';
|
|
93
97
|
import cryptoAddressCmd from './commands/crypto-address';
|
|
94
|
-
import connectedAccountCmd from './commands/connected-account';
|
|
95
98
|
import appInviteCmd from './commands/app-invite';
|
|
96
99
|
import appClaimedInviteCmd from './commands/app-claimed-invite';
|
|
97
100
|
import orgInviteCmd from './commands/org-invite';
|
|
@@ -104,10 +107,12 @@ import roleTypeCmd from './commands/role-type';
|
|
|
104
107
|
import migrateFileCmd from './commands/migrate-file';
|
|
105
108
|
import appLimitDefaultCmd from './commands/app-limit-default';
|
|
106
109
|
import orgLimitDefaultCmd from './commands/org-limit-default';
|
|
107
|
-
import
|
|
110
|
+
import devicesModuleCmd from './commands/devices-module';
|
|
111
|
+
import userConnectedAccountCmd from './commands/user-connected-account';
|
|
108
112
|
import appMembershipDefaultCmd from './commands/app-membership-default';
|
|
109
113
|
import commitCmd from './commands/commit';
|
|
110
114
|
import rateLimitsModuleCmd from './commands/rate-limits-module';
|
|
115
|
+
import membershipTypeCmd from './commands/membership-type';
|
|
111
116
|
import orgMembershipDefaultCmd from './commands/org-membership-default';
|
|
112
117
|
import rlsModuleCmd from './commands/rls-module';
|
|
113
118
|
import sqlActionCmd from './commands/sql-action';
|
|
@@ -116,12 +121,14 @@ import astMigrationCmd from './commands/ast-migration';
|
|
|
116
121
|
import appMembershipCmd from './commands/app-membership';
|
|
117
122
|
import hierarchyModuleCmd from './commands/hierarchy-module';
|
|
118
123
|
import currentUserIdCmd from './commands/current-user-id';
|
|
119
|
-
import currentIpAddressCmd from './commands/current-ip-address';
|
|
120
124
|
import currentUserAgentCmd from './commands/current-user-agent';
|
|
125
|
+
import currentIpAddressCmd from './commands/current-ip-address';
|
|
126
|
+
import requireStepUpCmd from './commands/require-step-up';
|
|
121
127
|
import appPermissionsGetPaddedMaskCmd from './commands/app-permissions-get-padded-mask';
|
|
122
128
|
import orgPermissionsGetPaddedMaskCmd from './commands/org-permissions-get-padded-mask';
|
|
123
129
|
import stepsAchievedCmd from './commands/steps-achieved';
|
|
124
130
|
import revParseCmd from './commands/rev-parse';
|
|
131
|
+
import resolveBlueprintFieldCmd from './commands/resolve-blueprint-field';
|
|
125
132
|
import orgIsManagerOfCmd from './commands/org-is-manager-of';
|
|
126
133
|
import appPermissionsGetMaskCmd from './commands/app-permissions-get-mask';
|
|
127
134
|
import orgPermissionsGetMaskCmd from './commands/org-permissions-get-mask';
|
|
@@ -140,6 +147,9 @@ import signOutCmd from './commands/sign-out';
|
|
|
140
147
|
import acceptDatabaseTransferCmd from './commands/accept-database-transfer';
|
|
141
148
|
import cancelDatabaseTransferCmd from './commands/cancel-database-transfer';
|
|
142
149
|
import rejectDatabaseTransferCmd from './commands/reject-database-transfer';
|
|
150
|
+
import disconnectAccountCmd from './commands/disconnect-account';
|
|
151
|
+
import revokeApiKeyCmd from './commands/revoke-api-key';
|
|
152
|
+
import revokeSessionCmd from './commands/revoke-session';
|
|
143
153
|
import verifyPasswordCmd from './commands/verify-password';
|
|
144
154
|
import verifyTotpCmd from './commands/verify-totp';
|
|
145
155
|
import submitAppInviteCodeCmd from './commands/submit-app-invite-code';
|
|
@@ -151,9 +161,12 @@ import verifyEmailCmd from './commands/verify-email';
|
|
|
151
161
|
import freezeObjectsCmd from './commands/freeze-objects';
|
|
152
162
|
import initEmptyRepoCmd from './commands/init-empty-repo';
|
|
153
163
|
import constructBlueprintCmd from './commands/construct-blueprint';
|
|
164
|
+
import provisionNewUserCmd from './commands/provision-new-user';
|
|
154
165
|
import resetPasswordCmd from './commands/reset-password';
|
|
155
166
|
import removeNodeAtPathCmd from './commands/remove-node-at-path';
|
|
156
167
|
import copyTemplateToBlueprintCmd from './commands/copy-template-to-blueprint';
|
|
168
|
+
import createApiKeyCmd from './commands/create-api-key';
|
|
169
|
+
import provisionSpatialRelationCmd from './commands/provision-spatial-relation';
|
|
157
170
|
import bootstrapUserCmd from './commands/bootstrap-user';
|
|
158
171
|
import setFieldOrderCmd from './commands/set-field-order';
|
|
159
172
|
import provisionUniqueConstraintCmd from './commands/provision-unique-constraint';
|
|
@@ -167,12 +180,12 @@ import updateNodeAtPathCmd from './commands/update-node-at-path';
|
|
|
167
180
|
import setAndCommitCmd from './commands/set-and-commit';
|
|
168
181
|
import provisionRelationCmd from './commands/provision-relation';
|
|
169
182
|
import applyRlsCmd from './commands/apply-rls';
|
|
170
|
-
import
|
|
183
|
+
import signInCrossOriginCmd from './commands/sign-in-cross-origin';
|
|
171
184
|
import createUserDatabaseCmd from './commands/create-user-database';
|
|
172
185
|
import extendTokenExpiresCmd from './commands/extend-token-expires';
|
|
173
|
-
import signInCmd from './commands/sign-in';
|
|
174
186
|
import signUpCmd from './commands/sign-up';
|
|
175
|
-
import
|
|
187
|
+
import requestCrossOriginTokenCmd from './commands/request-cross-origin-token';
|
|
188
|
+
import signInCmd from './commands/sign-in';
|
|
176
189
|
import provisionTableCmd from './commands/provision-table';
|
|
177
190
|
import sendVerificationEmailCmd from './commands/send-verification-email';
|
|
178
191
|
import forgotPasswordCmd from './commands/forgot-password';
|
|
@@ -194,6 +207,7 @@ const createCommandMap = () => ({
|
|
|
194
207
|
table: tableCmd,
|
|
195
208
|
'check-constraint': checkConstraintCmd,
|
|
196
209
|
field: fieldCmd,
|
|
210
|
+
'spatial-relation': spatialRelationCmd,
|
|
197
211
|
'foreign-key-constraint': foreignKeyConstraintCmd,
|
|
198
212
|
'full-text-search': fullTextSearchCmd,
|
|
199
213
|
index: indexCmd,
|
|
@@ -207,9 +221,9 @@ const createCommandMap = () => ({
|
|
|
207
221
|
'view-grant': viewGrantCmd,
|
|
208
222
|
'view-rule': viewRuleCmd,
|
|
209
223
|
'embedding-chunk': embeddingChunkCmd,
|
|
210
|
-
'table-template-module': tableTemplateModuleCmd,
|
|
211
224
|
'secure-table-provision': secureTableProvisionCmd,
|
|
212
225
|
'relation-provision': relationProvisionCmd,
|
|
226
|
+
'session-secrets-module': sessionSecretsModuleCmd,
|
|
213
227
|
'schema-grant': schemaGrantCmd,
|
|
214
228
|
'default-privilege': defaultPrivilegeCmd,
|
|
215
229
|
enum: enumCmd,
|
|
@@ -247,6 +261,8 @@ const createCommandMap = () => ({
|
|
|
247
261
|
'blueprint-template': blueprintTemplateCmd,
|
|
248
262
|
'blueprint-construction': blueprintConstructionCmd,
|
|
249
263
|
'storage-module': storageModuleCmd,
|
|
264
|
+
'entity-type-provision': entityTypeProvisionCmd,
|
|
265
|
+
'webauthn-credentials-module': webauthnCredentialsModuleCmd,
|
|
250
266
|
'database-provision-module': databaseProvisionModuleCmd,
|
|
251
267
|
'app-admin-grant': appAdminGrantCmd,
|
|
252
268
|
'app-owner-grant': appOwnerGrantCmd,
|
|
@@ -255,6 +271,7 @@ const createCommandMap = () => ({
|
|
|
255
271
|
'org-member': orgMemberCmd,
|
|
256
272
|
'org-admin-grant': orgAdminGrantCmd,
|
|
257
273
|
'org-owner-grant': orgOwnerGrantCmd,
|
|
274
|
+
'org-member-profile': orgMemberProfileCmd,
|
|
258
275
|
'org-grant': orgGrantCmd,
|
|
259
276
|
'org-chart-edge': orgChartEdgeCmd,
|
|
260
277
|
'org-chart-edge-grant': orgChartEdgeGrantCmd,
|
|
@@ -267,7 +284,6 @@ const createCommandMap = () => ({
|
|
|
267
284
|
email: emailCmd,
|
|
268
285
|
'phone-number': phoneNumberCmd,
|
|
269
286
|
'crypto-address': cryptoAddressCmd,
|
|
270
|
-
'connected-account': connectedAccountCmd,
|
|
271
287
|
'app-invite': appInviteCmd,
|
|
272
288
|
'app-claimed-invite': appClaimedInviteCmd,
|
|
273
289
|
'org-invite': orgInviteCmd,
|
|
@@ -280,10 +296,12 @@ const createCommandMap = () => ({
|
|
|
280
296
|
'migrate-file': migrateFileCmd,
|
|
281
297
|
'app-limit-default': appLimitDefaultCmd,
|
|
282
298
|
'org-limit-default': orgLimitDefaultCmd,
|
|
283
|
-
'
|
|
299
|
+
'devices-module': devicesModuleCmd,
|
|
300
|
+
'user-connected-account': userConnectedAccountCmd,
|
|
284
301
|
'app-membership-default': appMembershipDefaultCmd,
|
|
285
302
|
commit: commitCmd,
|
|
286
303
|
'rate-limits-module': rateLimitsModuleCmd,
|
|
304
|
+
'membership-type': membershipTypeCmd,
|
|
287
305
|
'org-membership-default': orgMembershipDefaultCmd,
|
|
288
306
|
'rls-module': rlsModuleCmd,
|
|
289
307
|
'sql-action': sqlActionCmd,
|
|
@@ -292,12 +310,14 @@ const createCommandMap = () => ({
|
|
|
292
310
|
'app-membership': appMembershipCmd,
|
|
293
311
|
'hierarchy-module': hierarchyModuleCmd,
|
|
294
312
|
'current-user-id': currentUserIdCmd,
|
|
295
|
-
'current-ip-address': currentIpAddressCmd,
|
|
296
313
|
'current-user-agent': currentUserAgentCmd,
|
|
314
|
+
'current-ip-address': currentIpAddressCmd,
|
|
315
|
+
'require-step-up': requireStepUpCmd,
|
|
297
316
|
'app-permissions-get-padded-mask': appPermissionsGetPaddedMaskCmd,
|
|
298
317
|
'org-permissions-get-padded-mask': orgPermissionsGetPaddedMaskCmd,
|
|
299
318
|
'steps-achieved': stepsAchievedCmd,
|
|
300
319
|
'rev-parse': revParseCmd,
|
|
320
|
+
'resolve-blueprint-field': resolveBlueprintFieldCmd,
|
|
301
321
|
'org-is-manager-of': orgIsManagerOfCmd,
|
|
302
322
|
'app-permissions-get-mask': appPermissionsGetMaskCmd,
|
|
303
323
|
'org-permissions-get-mask': orgPermissionsGetMaskCmd,
|
|
@@ -316,6 +336,9 @@ const createCommandMap = () => ({
|
|
|
316
336
|
'accept-database-transfer': acceptDatabaseTransferCmd,
|
|
317
337
|
'cancel-database-transfer': cancelDatabaseTransferCmd,
|
|
318
338
|
'reject-database-transfer': rejectDatabaseTransferCmd,
|
|
339
|
+
'disconnect-account': disconnectAccountCmd,
|
|
340
|
+
'revoke-api-key': revokeApiKeyCmd,
|
|
341
|
+
'revoke-session': revokeSessionCmd,
|
|
319
342
|
'verify-password': verifyPasswordCmd,
|
|
320
343
|
'verify-totp': verifyTotpCmd,
|
|
321
344
|
'submit-app-invite-code': submitAppInviteCodeCmd,
|
|
@@ -327,9 +350,12 @@ const createCommandMap = () => ({
|
|
|
327
350
|
'freeze-objects': freezeObjectsCmd,
|
|
328
351
|
'init-empty-repo': initEmptyRepoCmd,
|
|
329
352
|
'construct-blueprint': constructBlueprintCmd,
|
|
353
|
+
'provision-new-user': provisionNewUserCmd,
|
|
330
354
|
'reset-password': resetPasswordCmd,
|
|
331
355
|
'remove-node-at-path': removeNodeAtPathCmd,
|
|
332
356
|
'copy-template-to-blueprint': copyTemplateToBlueprintCmd,
|
|
357
|
+
'create-api-key': createApiKeyCmd,
|
|
358
|
+
'provision-spatial-relation': provisionSpatialRelationCmd,
|
|
333
359
|
'bootstrap-user': bootstrapUserCmd,
|
|
334
360
|
'set-field-order': setFieldOrderCmd,
|
|
335
361
|
'provision-unique-constraint': provisionUniqueConstraintCmd,
|
|
@@ -343,12 +369,12 @@ const createCommandMap = () => ({
|
|
|
343
369
|
'set-and-commit': setAndCommitCmd,
|
|
344
370
|
'provision-relation': provisionRelationCmd,
|
|
345
371
|
'apply-rls': applyRlsCmd,
|
|
346
|
-
'sign-in-
|
|
372
|
+
'sign-in-cross-origin': signInCrossOriginCmd,
|
|
347
373
|
'create-user-database': createUserDatabaseCmd,
|
|
348
374
|
'extend-token-expires': extendTokenExpiresCmd,
|
|
349
|
-
'sign-in': signInCmd,
|
|
350
375
|
'sign-up': signUpCmd,
|
|
351
|
-
'
|
|
376
|
+
'request-cross-origin-token': requestCrossOriginTokenCmd,
|
|
377
|
+
'sign-in': signInCmd,
|
|
352
378
|
'provision-table': provisionTableCmd,
|
|
353
379
|
'send-verification-email': sendVerificationEmailCmd,
|
|
354
380
|
'forgot-password': forgotPasswordCmd,
|
|
@@ -356,7 +382,7 @@ const createCommandMap = () => ({
|
|
|
356
382
|
'confirm-upload': confirmUploadCmd,
|
|
357
383
|
'provision-bucket': provisionBucketCmd,
|
|
358
384
|
});
|
|
359
|
-
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 app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite 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 rate-limits-module rateLimitsModule 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 verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\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 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";
|
|
385
|
+
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 spatial-relation spatialRelation 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 secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n session-secrets-module sessionSecretsModule 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 entity-type-provision entityTypeProvision CRUD operations\n webauthn-credentials-module webauthnCredentialsModule 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-member-profile orgMemberProfile 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 app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite 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 devices-module devicesModule CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n commit commit CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n membership-type membershipType 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-user-agent currentUserAgent\n current-ip-address currentIpAddress\n require-step-up requireStepUp\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\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 disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\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. Six phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security, (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. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n provision-new-user provisionNewUser\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 create-api-key createApiKey\n provision-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\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-cross-origin signInCrossOrigin\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-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\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 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";
|
|
360
386
|
export const commands = async (argv, prompter, options) => {
|
|
361
387
|
if (argv.help || argv.h) {
|
|
362
388
|
console.log(usage);
|