@constructive-sdk/cli 0.25.9 → 0.25.11
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-admin-grant.js +3 -1
- package/admin/cli/commands/app-grant.js +3 -1
- package/admin/cli/commands/app-invite.js +44 -0
- package/admin/cli/commands/app-owner-grant.js +3 -1
- package/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
- package/admin/cli/commands/app-permission-default-grant.js +286 -0
- package/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
- package/admin/cli/commands/app-permission-default-permission.js +242 -0
- package/admin/cli/commands/org-admin-grant.js +3 -1
- package/admin/cli/commands/org-grant.js +3 -1
- package/admin/cli/commands/org-invite.js +44 -0
- package/admin/cli/commands/org-owner-grant.js +3 -1
- package/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
- package/admin/cli/commands/org-permission-default-grant.js +306 -0
- package/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
- package/admin/cli/commands/org-permission-default-permission.js +262 -0
- package/admin/cli/commands.js +11 -3
- package/admin/cli/executor.d.ts +5 -1
- package/admin/orm/index.d.ts +10 -2
- package/admin/orm/index.js +10 -2
- package/admin/orm/input-types.d.ts +1611 -230
- package/admin/orm/input-types.js +9 -1
- package/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
- package/admin/orm/models/appPermissionDefaultGrant.js +104 -0
- package/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
- package/admin/orm/models/appPermissionDefaultPermission.js +104 -0
- package/admin/orm/models/index.d.ts +5 -1
- package/admin/orm/models/index.js +11 -3
- package/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
- package/admin/orm/models/orgPermissionDefaultGrant.js +104 -0
- package/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
- package/admin/orm/models/orgPermissionDefaultPermission.js +104 -0
- package/agent/cli/commands/agent-message.js +34 -12
- package/agent/cli/commands/agent-task.js +12 -12
- package/agent/cli/embedder.d.ts +5 -0
- package/agent/cli/embedder.js +46 -9
- package/agent/orm/input-types.d.ts +289 -47
- package/agent/orm/input-types.js +1 -0
- package/api/cli/commands/check-constraint.js +0 -22
- package/api/cli/commands/composite-type.d.ts +8 -0
- package/api/cli/commands/composite-type.js +424 -0
- package/api/cli/commands/enum.js +0 -22
- package/api/cli/commands/field.js +0 -22
- package/api/cli/commands/foreign-key-constraint.js +0 -22
- package/api/cli/commands/index.js +0 -22
- package/api/cli/commands/policy.js +0 -22
- package/api/cli/commands/primary-key-constraint.js +0 -22
- package/api/cli/commands/schema.js +0 -22
- package/api/cli/commands/spatial-relation.js +0 -22
- package/api/cli/commands/table.js +6 -28
- package/api/cli/commands/trigger.js +0 -22
- package/api/cli/commands/unique-constraint.js +0 -22
- package/api/cli/commands/view-table.js +22 -0
- package/api/cli/commands/view.js +0 -22
- package/api/cli/commands.js +3 -1
- package/api/cli/executor.d.ts +1 -0
- package/api/orm/index.d.ts +2 -0
- package/api/orm/index.js +2 -0
- package/api/orm/input-types.d.ts +1064 -125
- package/api/orm/input-types.js +3 -0
- package/api/orm/models/compositeType.d.ts +54 -0
- package/api/orm/models/compositeType.js +104 -0
- package/api/orm/models/index.d.ts +1 -0
- package/api/orm/models/index.js +3 -1
- package/auth/cli/commands/link-identity.d.ts +8 -0
- package/auth/cli/commands/link-identity.js +36 -0
- package/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
- package/auth/cli/commands/sign-in-sms-otp.js +36 -0
- package/auth/cli/commands/sign-up-sms.d.ts +8 -0
- package/auth/cli/commands/sign-up-sms.js +36 -0
- package/auth/cli/commands.js +7 -1
- package/auth/cli/executor.d.ts +15 -0
- package/auth/orm/index.d.ts +15 -0
- package/auth/orm/input-types.d.ts +197 -1
- package/auth/orm/mutation/index.d.ts +25 -1
- package/auth/orm/mutation/index.js +36 -0
- package/esm/admin/cli/commands/app-admin-grant.js +3 -1
- package/esm/admin/cli/commands/app-grant.js +3 -1
- package/esm/admin/cli/commands/app-invite.js +44 -0
- package/esm/admin/cli/commands/app-owner-grant.js +3 -1
- package/esm/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
- package/esm/admin/cli/commands/app-permission-default-grant.js +284 -0
- package/esm/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
- package/esm/admin/cli/commands/app-permission-default-permission.js +240 -0
- package/esm/admin/cli/commands/org-admin-grant.js +3 -1
- package/esm/admin/cli/commands/org-grant.js +3 -1
- package/esm/admin/cli/commands/org-invite.js +44 -0
- package/esm/admin/cli/commands/org-owner-grant.js +3 -1
- package/esm/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
- package/esm/admin/cli/commands/org-permission-default-grant.js +304 -0
- package/esm/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
- package/esm/admin/cli/commands/org-permission-default-permission.js +260 -0
- package/esm/admin/cli/commands.js +11 -3
- package/esm/admin/cli/executor.d.ts +5 -1
- package/esm/admin/orm/index.d.ts +10 -2
- package/esm/admin/orm/index.js +10 -2
- package/esm/admin/orm/input-types.d.ts +1611 -230
- package/esm/admin/orm/input-types.js +9 -1
- package/esm/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
- package/esm/admin/orm/models/appPermissionDefaultGrant.js +100 -0
- package/esm/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
- package/esm/admin/orm/models/appPermissionDefaultPermission.js +100 -0
- package/esm/admin/orm/models/index.d.ts +5 -1
- package/esm/admin/orm/models/index.js +5 -1
- package/esm/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
- package/esm/admin/orm/models/orgPermissionDefaultGrant.js +100 -0
- package/esm/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
- package/esm/admin/orm/models/orgPermissionDefaultPermission.js +100 -0
- package/esm/agent/cli/commands/agent-message.js +34 -12
- package/esm/agent/cli/commands/agent-task.js +12 -12
- package/esm/agent/cli/embedder.d.ts +5 -0
- package/esm/agent/cli/embedder.js +10 -2
- package/esm/agent/orm/input-types.d.ts +289 -47
- package/esm/agent/orm/input-types.js +1 -0
- package/esm/api/cli/commands/check-constraint.js +0 -22
- package/esm/api/cli/commands/composite-type.d.ts +8 -0
- package/esm/api/cli/commands/composite-type.js +422 -0
- package/esm/api/cli/commands/enum.js +0 -22
- package/esm/api/cli/commands/field.js +0 -22
- package/esm/api/cli/commands/foreign-key-constraint.js +0 -22
- package/esm/api/cli/commands/index.js +0 -22
- package/esm/api/cli/commands/policy.js +0 -22
- package/esm/api/cli/commands/primary-key-constraint.js +0 -22
- package/esm/api/cli/commands/schema.js +0 -22
- package/esm/api/cli/commands/spatial-relation.js +0 -22
- package/esm/api/cli/commands/table.js +6 -28
- package/esm/api/cli/commands/trigger.js +0 -22
- package/esm/api/cli/commands/unique-constraint.js +0 -22
- package/esm/api/cli/commands/view-table.js +22 -0
- package/esm/api/cli/commands/view.js +0 -22
- package/esm/api/cli/commands.js +3 -1
- package/esm/api/cli/executor.d.ts +1 -0
- package/esm/api/orm/index.d.ts +2 -0
- package/esm/api/orm/index.js +2 -0
- package/esm/api/orm/input-types.d.ts +1064 -125
- package/esm/api/orm/input-types.js +3 -0
- package/esm/api/orm/models/compositeType.d.ts +54 -0
- package/esm/api/orm/models/compositeType.js +100 -0
- package/esm/api/orm/models/index.d.ts +1 -0
- package/esm/api/orm/models/index.js +1 -0
- package/esm/auth/cli/commands/link-identity.d.ts +8 -0
- package/esm/auth/cli/commands/link-identity.js +34 -0
- package/esm/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
- package/esm/auth/cli/commands/sign-in-sms-otp.js +34 -0
- package/esm/auth/cli/commands/sign-up-sms.d.ts +8 -0
- package/esm/auth/cli/commands/sign-up-sms.js +34 -0
- package/esm/auth/cli/commands.js +7 -1
- package/esm/auth/cli/executor.d.ts +15 -0
- package/esm/auth/orm/index.d.ts +15 -0
- package/esm/auth/orm/input-types.d.ts +197 -1
- package/esm/auth/orm/mutation/index.d.ts +25 -1
- package/esm/auth/orm/mutation/index.js +36 -0
- package/esm/modules/cli/commands/agent-module.js +88 -0
- package/esm/modules/cli/commands/billing-module.js +66 -0
- package/esm/modules/cli/commands/compute-log-module.js +44 -0
- package/esm/modules/cli/commands/config-secrets-module.js +44 -0
- package/esm/modules/cli/commands/db-usage-module.js +66 -0
- package/esm/modules/cli/commands/entity-type-provision.js +0 -44
- package/esm/modules/cli/commands/events-module.js +66 -0
- package/esm/modules/cli/commands/function-invocation-module.d.ts +8 -0
- package/esm/modules/cli/commands/function-invocation-module.js +580 -0
- package/esm/modules/cli/commands/function-module.js +22 -198
- package/esm/modules/cli/commands/graph-module.js +22 -0
- package/esm/modules/cli/commands/hierarchy-module.js +22 -0
- package/esm/modules/cli/commands/identity-providers-module.js +44 -0
- package/esm/modules/cli/commands/inference-log-module.js +44 -0
- package/esm/modules/cli/commands/invites-module.js +44 -0
- package/esm/modules/cli/commands/limits-module.js +44 -0
- package/esm/modules/cli/commands/memberships-module.js +88 -0
- package/esm/modules/cli/commands/merkle-store-module.js +22 -0
- package/esm/modules/cli/commands/namespace-module.js +22 -0
- package/esm/modules/cli/commands/notifications-module.js +88 -0
- package/esm/modules/cli/commands/permissions-module.js +44 -0
- package/esm/modules/cli/commands/plans-module.js +44 -0
- package/esm/modules/cli/commands/profiles-module.js +44 -0
- package/esm/modules/cli/commands/rate-limit-meters-module.js +66 -0
- package/esm/modules/cli/commands/storage-log-module.js +44 -0
- package/esm/modules/cli/commands/storage-module.js +66 -0
- package/esm/modules/cli/commands/transfer-log-module.js +44 -0
- package/esm/modules/cli/commands.js +29 -27
- package/esm/modules/cli/executor.d.ts +14 -13
- package/esm/modules/orm/index.d.ts +28 -26
- package/esm/modules/orm/index.js +28 -26
- package/esm/modules/orm/input-types.d.ts +4485 -2514
- package/esm/modules/orm/models/functionInvocationModule.d.ts +54 -0
- package/esm/modules/orm/models/functionInvocationModule.js +100 -0
- package/esm/modules/orm/models/index.d.ts +14 -13
- package/esm/modules/orm/models/index.js +14 -13
- package/esm/objects/orm/input-types.d.ts +62 -0
- package/esm/usage/orm/input-types.d.ts +314 -19
- package/modules/cli/commands/agent-module.js +88 -0
- package/modules/cli/commands/billing-module.js +66 -0
- package/modules/cli/commands/compute-log-module.js +44 -0
- package/modules/cli/commands/config-secrets-module.js +44 -0
- package/modules/cli/commands/db-usage-module.js +66 -0
- package/modules/cli/commands/entity-type-provision.js +0 -44
- package/modules/cli/commands/events-module.js +66 -0
- package/modules/cli/commands/function-invocation-module.d.ts +8 -0
- package/modules/cli/commands/function-invocation-module.js +582 -0
- package/modules/cli/commands/function-module.js +22 -198
- package/modules/cli/commands/graph-module.js +22 -0
- package/modules/cli/commands/hierarchy-module.js +22 -0
- package/modules/cli/commands/identity-providers-module.js +44 -0
- package/modules/cli/commands/inference-log-module.js +44 -0
- package/modules/cli/commands/invites-module.js +44 -0
- package/modules/cli/commands/limits-module.js +44 -0
- package/modules/cli/commands/memberships-module.js +88 -0
- package/modules/cli/commands/merkle-store-module.js +22 -0
- package/modules/cli/commands/namespace-module.js +22 -0
- package/modules/cli/commands/notifications-module.js +88 -0
- package/modules/cli/commands/permissions-module.js +44 -0
- package/modules/cli/commands/plans-module.js +44 -0
- package/modules/cli/commands/profiles-module.js +44 -0
- package/modules/cli/commands/rate-limit-meters-module.js +66 -0
- package/modules/cli/commands/storage-log-module.js +44 -0
- package/modules/cli/commands/storage-module.js +66 -0
- package/modules/cli/commands/transfer-log-module.js +44 -0
- package/modules/cli/commands.js +29 -27
- package/modules/cli/executor.d.ts +14 -13
- package/modules/orm/index.d.ts +28 -26
- package/modules/orm/index.js +28 -26
- package/modules/orm/input-types.d.ts +4485 -2514
- package/modules/orm/models/functionInvocationModule.d.ts +54 -0
- package/modules/orm/models/functionInvocationModule.js +104 -0
- package/modules/orm/models/index.d.ts +14 -13
- package/modules/orm/models/index.js +30 -28
- package/objects/orm/input-types.d.ts +62 -0
- package/package.json +4 -4
- package/usage/orm/input-types.d.ts +314 -19
|
@@ -151,7 +151,8 @@ async function handleCreate(argv, prompter) {
|
|
|
151
151
|
type: 'text',
|
|
152
152
|
name: 'actorId',
|
|
153
153
|
message: 'actorId',
|
|
154
|
-
required:
|
|
154
|
+
required: false,
|
|
155
|
+
skipPrompt: true,
|
|
155
156
|
},
|
|
156
157
|
{
|
|
157
158
|
type: 'text',
|
|
@@ -220,6 +221,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
220
221
|
name: 'actorId',
|
|
221
222
|
message: 'actorId',
|
|
222
223
|
required: false,
|
|
224
|
+
skipPrompt: true,
|
|
223
225
|
},
|
|
224
226
|
{
|
|
225
227
|
type: 'text',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgPermissionDefaultGrant
|
|
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,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgPermissionDefaultGrant
|
|
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
|
+
permissionId: 'uuid',
|
|
12
|
+
isGrant: 'boolean',
|
|
13
|
+
grantorId: 'uuid',
|
|
14
|
+
entityId: 'uuid',
|
|
15
|
+
createdAt: 'string',
|
|
16
|
+
updatedAt: 'string',
|
|
17
|
+
};
|
|
18
|
+
const usage = '\norg-permission-default-grant <command>\n\nCommands:\n list List orgPermissionDefaultGrant records\n find-first Find first matching orgPermissionDefaultGrant record\n get Get a orgPermissionDefaultGrant by ID\n create Create a new orgPermissionDefaultGrant\n update Update an existing orgPermissionDefaultGrant\n delete Delete a orgPermissionDefaultGrant\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 --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
|
|
19
|
+
export default async (argv, prompter, _options) => {
|
|
20
|
+
if (argv.help || argv.h) {
|
|
21
|
+
console.log(usage);
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
25
|
+
if (!subcommand) {
|
|
26
|
+
const answer = await prompter.prompt(argv, [
|
|
27
|
+
{
|
|
28
|
+
type: 'autocomplete',
|
|
29
|
+
name: 'subcommand',
|
|
30
|
+
message: 'What do you want to do?',
|
|
31
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
34
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
35
|
+
}
|
|
36
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
37
|
+
};
|
|
38
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
39
|
+
switch (subcommand) {
|
|
40
|
+
case 'list':
|
|
41
|
+
return handleList(argv, prompter);
|
|
42
|
+
case 'find-first':
|
|
43
|
+
return handleFindFirst(argv, prompter);
|
|
44
|
+
case 'get':
|
|
45
|
+
return handleGet(argv, prompter);
|
|
46
|
+
case 'create':
|
|
47
|
+
return handleCreate(argv, prompter);
|
|
48
|
+
case 'update':
|
|
49
|
+
return handleUpdate(argv, prompter);
|
|
50
|
+
case 'delete':
|
|
51
|
+
return handleDelete(argv, prompter);
|
|
52
|
+
default:
|
|
53
|
+
console.log(usage);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function handleList(argv, _prompter) {
|
|
58
|
+
try {
|
|
59
|
+
const defaultSelect = {
|
|
60
|
+
id: true,
|
|
61
|
+
permissionId: true,
|
|
62
|
+
isGrant: true,
|
|
63
|
+
grantorId: true,
|
|
64
|
+
entityId: true,
|
|
65
|
+
createdAt: true,
|
|
66
|
+
updatedAt: true,
|
|
67
|
+
};
|
|
68
|
+
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
69
|
+
const client = getClient();
|
|
70
|
+
const result = await client.orgPermissionDefaultGrant.findMany(findManyArgs).execute();
|
|
71
|
+
console.log(JSON.stringify(result, null, 2));
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error('Failed to list records.');
|
|
75
|
+
if (error instanceof Error) {
|
|
76
|
+
console.error(error.message);
|
|
77
|
+
}
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async function handleFindFirst(argv, _prompter) {
|
|
82
|
+
try {
|
|
83
|
+
const defaultSelect = {
|
|
84
|
+
id: true,
|
|
85
|
+
permissionId: true,
|
|
86
|
+
isGrant: true,
|
|
87
|
+
grantorId: true,
|
|
88
|
+
entityId: true,
|
|
89
|
+
createdAt: true,
|
|
90
|
+
updatedAt: true,
|
|
91
|
+
};
|
|
92
|
+
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
93
|
+
const client = getClient();
|
|
94
|
+
const result = await client.orgPermissionDefaultGrant.findFirst(findFirstArgs).execute();
|
|
95
|
+
console.log(JSON.stringify(result, null, 2));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
console.error('Failed to find record.');
|
|
99
|
+
if (error instanceof Error) {
|
|
100
|
+
console.error(error.message);
|
|
101
|
+
}
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
async function handleGet(argv, prompter) {
|
|
106
|
+
try {
|
|
107
|
+
const answers = await prompter.prompt(argv, [
|
|
108
|
+
{
|
|
109
|
+
type: 'text',
|
|
110
|
+
name: 'id',
|
|
111
|
+
message: 'id',
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
]);
|
|
115
|
+
const client = getClient();
|
|
116
|
+
const result = await client.orgPermissionDefaultGrant
|
|
117
|
+
.findOne({
|
|
118
|
+
id: answers.id,
|
|
119
|
+
select: {
|
|
120
|
+
id: true,
|
|
121
|
+
permissionId: true,
|
|
122
|
+
isGrant: true,
|
|
123
|
+
grantorId: true,
|
|
124
|
+
entityId: true,
|
|
125
|
+
createdAt: true,
|
|
126
|
+
updatedAt: true,
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
.execute();
|
|
130
|
+
console.log(JSON.stringify(result, null, 2));
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error('Record not found.');
|
|
134
|
+
if (error instanceof Error) {
|
|
135
|
+
console.error(error.message);
|
|
136
|
+
}
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async function handleCreate(argv, prompter) {
|
|
141
|
+
try {
|
|
142
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
143
|
+
{
|
|
144
|
+
type: 'text',
|
|
145
|
+
name: 'permissionId',
|
|
146
|
+
message: 'permissionId',
|
|
147
|
+
required: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
name: 'isGrant',
|
|
152
|
+
message: 'isGrant',
|
|
153
|
+
required: false,
|
|
154
|
+
skipPrompt: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'text',
|
|
158
|
+
name: 'grantorId',
|
|
159
|
+
message: 'grantorId',
|
|
160
|
+
required: false,
|
|
161
|
+
skipPrompt: true,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'text',
|
|
165
|
+
name: 'entityId',
|
|
166
|
+
message: 'entityId',
|
|
167
|
+
required: true,
|
|
168
|
+
},
|
|
169
|
+
]);
|
|
170
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
171
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
172
|
+
const client = getClient();
|
|
173
|
+
const result = await client.orgPermissionDefaultGrant
|
|
174
|
+
.create({
|
|
175
|
+
data: {
|
|
176
|
+
permissionId: cleanedData.permissionId,
|
|
177
|
+
isGrant: cleanedData.isGrant,
|
|
178
|
+
grantorId: cleanedData.grantorId,
|
|
179
|
+
entityId: cleanedData.entityId,
|
|
180
|
+
},
|
|
181
|
+
select: {
|
|
182
|
+
id: true,
|
|
183
|
+
permissionId: true,
|
|
184
|
+
isGrant: true,
|
|
185
|
+
grantorId: true,
|
|
186
|
+
entityId: true,
|
|
187
|
+
createdAt: true,
|
|
188
|
+
updatedAt: true,
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
.execute();
|
|
192
|
+
console.log(JSON.stringify(result, null, 2));
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
console.error('Failed to create record.');
|
|
196
|
+
if (error instanceof Error) {
|
|
197
|
+
console.error(error.message);
|
|
198
|
+
}
|
|
199
|
+
process.exit(1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async function handleUpdate(argv, prompter) {
|
|
203
|
+
try {
|
|
204
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
205
|
+
{
|
|
206
|
+
type: 'text',
|
|
207
|
+
name: 'id',
|
|
208
|
+
message: 'id',
|
|
209
|
+
required: true,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: 'text',
|
|
213
|
+
name: 'permissionId',
|
|
214
|
+
message: 'permissionId',
|
|
215
|
+
required: false,
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
type: 'boolean',
|
|
219
|
+
name: 'isGrant',
|
|
220
|
+
message: 'isGrant',
|
|
221
|
+
required: false,
|
|
222
|
+
skipPrompt: true,
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: 'text',
|
|
226
|
+
name: 'grantorId',
|
|
227
|
+
message: 'grantorId',
|
|
228
|
+
required: false,
|
|
229
|
+
skipPrompt: true,
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
type: 'text',
|
|
233
|
+
name: 'entityId',
|
|
234
|
+
message: 'entityId',
|
|
235
|
+
required: false,
|
|
236
|
+
},
|
|
237
|
+
]);
|
|
238
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
239
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
240
|
+
const client = getClient();
|
|
241
|
+
const result = await client.orgPermissionDefaultGrant
|
|
242
|
+
.update({
|
|
243
|
+
where: {
|
|
244
|
+
id: answers.id,
|
|
245
|
+
},
|
|
246
|
+
data: {
|
|
247
|
+
permissionId: cleanedData.permissionId,
|
|
248
|
+
isGrant: cleanedData.isGrant,
|
|
249
|
+
grantorId: cleanedData.grantorId,
|
|
250
|
+
entityId: cleanedData.entityId,
|
|
251
|
+
},
|
|
252
|
+
select: {
|
|
253
|
+
id: true,
|
|
254
|
+
permissionId: true,
|
|
255
|
+
isGrant: true,
|
|
256
|
+
grantorId: true,
|
|
257
|
+
entityId: true,
|
|
258
|
+
createdAt: true,
|
|
259
|
+
updatedAt: true,
|
|
260
|
+
},
|
|
261
|
+
})
|
|
262
|
+
.execute();
|
|
263
|
+
console.log(JSON.stringify(result, null, 2));
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
console.error('Failed to update record.');
|
|
267
|
+
if (error instanceof Error) {
|
|
268
|
+
console.error(error.message);
|
|
269
|
+
}
|
|
270
|
+
process.exit(1);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
async function handleDelete(argv, prompter) {
|
|
274
|
+
try {
|
|
275
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
276
|
+
{
|
|
277
|
+
type: 'text',
|
|
278
|
+
name: 'id',
|
|
279
|
+
message: 'id',
|
|
280
|
+
required: true,
|
|
281
|
+
},
|
|
282
|
+
]);
|
|
283
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
284
|
+
const client = getClient();
|
|
285
|
+
const result = await client.orgPermissionDefaultGrant
|
|
286
|
+
.delete({
|
|
287
|
+
where: {
|
|
288
|
+
id: answers.id,
|
|
289
|
+
},
|
|
290
|
+
select: {
|
|
291
|
+
id: true,
|
|
292
|
+
},
|
|
293
|
+
})
|
|
294
|
+
.execute();
|
|
295
|
+
console.log(JSON.stringify(result, null, 2));
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
console.error('Failed to delete record.');
|
|
299
|
+
if (error instanceof Error) {
|
|
300
|
+
console.error(error.message);
|
|
301
|
+
}
|
|
302
|
+
process.exit(1);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgPermissionDefaultPermission
|
|
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,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for OrgPermissionDefaultPermission
|
|
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
|
+
permissionId: 'uuid',
|
|
12
|
+
entityId: 'uuid',
|
|
13
|
+
createdAt: 'string',
|
|
14
|
+
updatedAt: 'string',
|
|
15
|
+
};
|
|
16
|
+
const usage = '\norg-permission-default-permission <command>\n\nCommands:\n list List orgPermissionDefaultPermission records\n find-first Find first matching orgPermissionDefaultPermission record\n get Get a orgPermissionDefaultPermission by ID\n create Create a new orgPermissionDefaultPermission\n update Update an existing orgPermissionDefaultPermission\n delete Delete a orgPermissionDefaultPermission\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 --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
|
|
17
|
+
export default async (argv, prompter, _options) => {
|
|
18
|
+
if (argv.help || argv.h) {
|
|
19
|
+
console.log(usage);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
const { first: subcommand, newArgv } = extractFirst(argv);
|
|
23
|
+
if (!subcommand) {
|
|
24
|
+
const answer = await prompter.prompt(argv, [
|
|
25
|
+
{
|
|
26
|
+
type: 'autocomplete',
|
|
27
|
+
name: 'subcommand',
|
|
28
|
+
message: 'What do you want to do?',
|
|
29
|
+
options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
|
|
30
|
+
},
|
|
31
|
+
]);
|
|
32
|
+
return handleTableSubcommand(answer.subcommand, newArgv, prompter);
|
|
33
|
+
}
|
|
34
|
+
return handleTableSubcommand(subcommand, newArgv, prompter);
|
|
35
|
+
};
|
|
36
|
+
async function handleTableSubcommand(subcommand, argv, prompter) {
|
|
37
|
+
switch (subcommand) {
|
|
38
|
+
case 'list':
|
|
39
|
+
return handleList(argv, prompter);
|
|
40
|
+
case 'find-first':
|
|
41
|
+
return handleFindFirst(argv, prompter);
|
|
42
|
+
case 'get':
|
|
43
|
+
return handleGet(argv, prompter);
|
|
44
|
+
case 'create':
|
|
45
|
+
return handleCreate(argv, prompter);
|
|
46
|
+
case 'update':
|
|
47
|
+
return handleUpdate(argv, prompter);
|
|
48
|
+
case 'delete':
|
|
49
|
+
return handleDelete(argv, prompter);
|
|
50
|
+
default:
|
|
51
|
+
console.log(usage);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function handleList(argv, _prompter) {
|
|
56
|
+
try {
|
|
57
|
+
const defaultSelect = {
|
|
58
|
+
id: true,
|
|
59
|
+
permissionId: true,
|
|
60
|
+
entityId: true,
|
|
61
|
+
createdAt: true,
|
|
62
|
+
updatedAt: true,
|
|
63
|
+
};
|
|
64
|
+
const findManyArgs = parseFindManyArgs(argv, defaultSelect);
|
|
65
|
+
const client = getClient();
|
|
66
|
+
const result = await client.orgPermissionDefaultPermission.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
|
+
permissionId: true,
|
|
82
|
+
entityId: true,
|
|
83
|
+
createdAt: true,
|
|
84
|
+
updatedAt: true,
|
|
85
|
+
};
|
|
86
|
+
const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
|
|
87
|
+
const client = getClient();
|
|
88
|
+
const result = await client.orgPermissionDefaultPermission.findFirst(findFirstArgs).execute();
|
|
89
|
+
console.log(JSON.stringify(result, null, 2));
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.error('Failed to find record.');
|
|
93
|
+
if (error instanceof Error) {
|
|
94
|
+
console.error(error.message);
|
|
95
|
+
}
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function handleGet(argv, prompter) {
|
|
100
|
+
try {
|
|
101
|
+
const answers = await prompter.prompt(argv, [
|
|
102
|
+
{
|
|
103
|
+
type: 'text',
|
|
104
|
+
name: 'id',
|
|
105
|
+
message: 'id',
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
108
|
+
]);
|
|
109
|
+
const client = getClient();
|
|
110
|
+
const result = await client.orgPermissionDefaultPermission
|
|
111
|
+
.findOne({
|
|
112
|
+
id: answers.id,
|
|
113
|
+
select: {
|
|
114
|
+
id: true,
|
|
115
|
+
permissionId: true,
|
|
116
|
+
entityId: true,
|
|
117
|
+
createdAt: true,
|
|
118
|
+
updatedAt: true,
|
|
119
|
+
},
|
|
120
|
+
})
|
|
121
|
+
.execute();
|
|
122
|
+
console.log(JSON.stringify(result, null, 2));
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
console.error('Record not found.');
|
|
126
|
+
if (error instanceof Error) {
|
|
127
|
+
console.error(error.message);
|
|
128
|
+
}
|
|
129
|
+
process.exit(1);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function handleCreate(argv, prompter) {
|
|
133
|
+
try {
|
|
134
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
135
|
+
{
|
|
136
|
+
type: 'text',
|
|
137
|
+
name: 'permissionId',
|
|
138
|
+
message: 'permissionId',
|
|
139
|
+
required: true,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'text',
|
|
143
|
+
name: 'entityId',
|
|
144
|
+
message: 'entityId',
|
|
145
|
+
required: true,
|
|
146
|
+
},
|
|
147
|
+
]);
|
|
148
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
149
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
150
|
+
const client = getClient();
|
|
151
|
+
const result = await client.orgPermissionDefaultPermission
|
|
152
|
+
.create({
|
|
153
|
+
data: {
|
|
154
|
+
permissionId: cleanedData.permissionId,
|
|
155
|
+
entityId: cleanedData.entityId,
|
|
156
|
+
},
|
|
157
|
+
select: {
|
|
158
|
+
id: true,
|
|
159
|
+
permissionId: true,
|
|
160
|
+
entityId: true,
|
|
161
|
+
createdAt: true,
|
|
162
|
+
updatedAt: true,
|
|
163
|
+
},
|
|
164
|
+
})
|
|
165
|
+
.execute();
|
|
166
|
+
console.log(JSON.stringify(result, null, 2));
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
console.error('Failed to create record.');
|
|
170
|
+
if (error instanceof Error) {
|
|
171
|
+
console.error(error.message);
|
|
172
|
+
}
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
async function handleUpdate(argv, prompter) {
|
|
177
|
+
try {
|
|
178
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
179
|
+
{
|
|
180
|
+
type: 'text',
|
|
181
|
+
name: 'id',
|
|
182
|
+
message: 'id',
|
|
183
|
+
required: true,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: 'text',
|
|
187
|
+
name: 'permissionId',
|
|
188
|
+
message: 'permissionId',
|
|
189
|
+
required: false,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: 'text',
|
|
193
|
+
name: 'entityId',
|
|
194
|
+
message: 'entityId',
|
|
195
|
+
required: false,
|
|
196
|
+
},
|
|
197
|
+
]);
|
|
198
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
199
|
+
const cleanedData = stripUndefined(answers, fieldSchema);
|
|
200
|
+
const client = getClient();
|
|
201
|
+
const result = await client.orgPermissionDefaultPermission
|
|
202
|
+
.update({
|
|
203
|
+
where: {
|
|
204
|
+
id: answers.id,
|
|
205
|
+
},
|
|
206
|
+
data: {
|
|
207
|
+
permissionId: cleanedData.permissionId,
|
|
208
|
+
entityId: cleanedData.entityId,
|
|
209
|
+
},
|
|
210
|
+
select: {
|
|
211
|
+
id: true,
|
|
212
|
+
permissionId: true,
|
|
213
|
+
entityId: true,
|
|
214
|
+
createdAt: true,
|
|
215
|
+
updatedAt: true,
|
|
216
|
+
},
|
|
217
|
+
})
|
|
218
|
+
.execute();
|
|
219
|
+
console.log(JSON.stringify(result, null, 2));
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
console.error('Failed to update record.');
|
|
223
|
+
if (error instanceof Error) {
|
|
224
|
+
console.error(error.message);
|
|
225
|
+
}
|
|
226
|
+
process.exit(1);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
async function handleDelete(argv, prompter) {
|
|
230
|
+
try {
|
|
231
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
232
|
+
{
|
|
233
|
+
type: 'text',
|
|
234
|
+
name: 'id',
|
|
235
|
+
message: 'id',
|
|
236
|
+
required: true,
|
|
237
|
+
},
|
|
238
|
+
]);
|
|
239
|
+
const answers = coerceAnswers(rawAnswers, fieldSchema);
|
|
240
|
+
const client = getClient();
|
|
241
|
+
const result = await client.orgPermissionDefaultPermission
|
|
242
|
+
.delete({
|
|
243
|
+
where: {
|
|
244
|
+
id: answers.id,
|
|
245
|
+
},
|
|
246
|
+
select: {
|
|
247
|
+
id: true,
|
|
248
|
+
},
|
|
249
|
+
})
|
|
250
|
+
.execute();
|
|
251
|
+
console.log(JSON.stringify(result, null, 2));
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
console.error('Failed to delete record.');
|
|
255
|
+
if (error instanceof Error) {
|
|
256
|
+
console.error(error.message);
|
|
257
|
+
}
|
|
258
|
+
process.exit(1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -9,10 +9,14 @@ import authCmd from './commands/auth';
|
|
|
9
9
|
import orgGetManagersRecordCmd from './commands/org-get-managers-record';
|
|
10
10
|
import orgGetSubordinatesRecordCmd from './commands/org-get-subordinates-record';
|
|
11
11
|
import appPermissionCmd from './commands/app-permission';
|
|
12
|
+
import appPermissionDefaultGrantCmd from './commands/app-permission-default-grant';
|
|
12
13
|
import orgPermissionCmd from './commands/org-permission';
|
|
14
|
+
import orgPermissionDefaultPermissionCmd from './commands/org-permission-default-permission';
|
|
15
|
+
import orgPermissionDefaultGrantCmd from './commands/org-permission-default-grant';
|
|
13
16
|
import orgMemberCmd from './commands/org-member';
|
|
14
17
|
import appPermissionDefaultCmd from './commands/app-permission-default';
|
|
15
18
|
import orgPermissionDefaultCmd from './commands/org-permission-default';
|
|
19
|
+
import appPermissionDefaultPermissionCmd from './commands/app-permission-default-permission';
|
|
16
20
|
import appAdminGrantCmd from './commands/app-admin-grant';
|
|
17
21
|
import appOwnerGrantCmd from './commands/app-owner-grant';
|
|
18
22
|
import orgAdminGrantCmd from './commands/org-admin-grant';
|
|
@@ -28,9 +32,9 @@ import orgGrantCmd from './commands/org-grant';
|
|
|
28
32
|
import orgChartEdgeCmd from './commands/org-chart-edge';
|
|
29
33
|
import orgMembershipSettingCmd from './commands/org-membership-setting';
|
|
30
34
|
import appMembershipCmd from './commands/app-membership';
|
|
31
|
-
import appInviteCmd from './commands/app-invite';
|
|
32
35
|
import orgMembershipCmd from './commands/org-membership';
|
|
33
36
|
import orgMemberProfileCmd from './commands/org-member-profile';
|
|
37
|
+
import appInviteCmd from './commands/app-invite';
|
|
34
38
|
import orgInviteCmd from './commands/org-invite';
|
|
35
39
|
import appPermissionsGetPaddedMaskCmd from './commands/app-permissions-get-padded-mask';
|
|
36
40
|
import orgPermissionsGetPaddedMaskCmd from './commands/org-permissions-get-padded-mask';
|
|
@@ -50,10 +54,14 @@ const createCommandMap = () => ({
|
|
|
50
54
|
'org-get-managers-record': orgGetManagersRecordCmd,
|
|
51
55
|
'org-get-subordinates-record': orgGetSubordinatesRecordCmd,
|
|
52
56
|
'app-permission': appPermissionCmd,
|
|
57
|
+
'app-permission-default-grant': appPermissionDefaultGrantCmd,
|
|
53
58
|
'org-permission': orgPermissionCmd,
|
|
59
|
+
'org-permission-default-permission': orgPermissionDefaultPermissionCmd,
|
|
60
|
+
'org-permission-default-grant': orgPermissionDefaultGrantCmd,
|
|
54
61
|
'org-member': orgMemberCmd,
|
|
55
62
|
'app-permission-default': appPermissionDefaultCmd,
|
|
56
63
|
'org-permission-default': orgPermissionDefaultCmd,
|
|
64
|
+
'app-permission-default-permission': appPermissionDefaultPermissionCmd,
|
|
57
65
|
'app-admin-grant': appAdminGrantCmd,
|
|
58
66
|
'app-owner-grant': appOwnerGrantCmd,
|
|
59
67
|
'org-admin-grant': orgAdminGrantCmd,
|
|
@@ -69,9 +77,9 @@ const createCommandMap = () => ({
|
|
|
69
77
|
'org-chart-edge': orgChartEdgeCmd,
|
|
70
78
|
'org-membership-setting': orgMembershipSettingCmd,
|
|
71
79
|
'app-membership': appMembershipCmd,
|
|
72
|
-
'app-invite': appInviteCmd,
|
|
73
80
|
'org-membership': orgMembershipCmd,
|
|
74
81
|
'org-member-profile': orgMemberProfileCmd,
|
|
82
|
+
'app-invite': appInviteCmd,
|
|
75
83
|
'org-invite': orgInviteCmd,
|
|
76
84
|
'app-permissions-get-padded-mask': appPermissionsGetPaddedMaskCmd,
|
|
77
85
|
'org-permissions-get-padded-mask': orgPermissionsGetPaddedMaskCmd,
|
|
@@ -86,7 +94,7 @@ const createCommandMap = () => ({
|
|
|
86
94
|
'submit-org-invite-code': submitOrgInviteCodeCmd,
|
|
87
95
|
'provision-bucket': provisionBucketCmd,
|
|
88
96
|
});
|
|
89
|
-
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 app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n membership-type membershipType CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n app-membership appMembership CRUD operations\n
|
|
97
|
+
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 app-permission appPermission CRUD operations\n app-permission-default-grant appPermissionDefaultGrant CRUD operations\n org-permission orgPermission CRUD operations\n org-permission-default-permission orgPermissionDefaultPermission CRUD operations\n org-permission-default-grant orgPermissionDefaultGrant CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-permission-default-permission appPermissionDefaultPermission CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n membership-type membershipType CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n app-membership appMembership CRUD operations\n org-membership orgMembership CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n app-invite appInvite CRUD operations\n org-invite orgInvite CRUD operations\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n 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 submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\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';
|
|
90
98
|
export const commands = async (argv, prompter, options) => {
|
|
91
99
|
if (argv.help || argv.h) {
|
|
92
100
|
console.log(usage);
|