@constructive-sdk/cli 0.14.7 → 0.14.9
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/org-membership-default.js +0 -44
- package/admin/cli/commands/org-membership-setting.d.ts +8 -0
- package/admin/cli/commands/org-membership-setting.js +418 -0
- package/admin/cli/commands.js +5 -3
- package/admin/cli/executor.d.ts +2 -1
- package/admin/orm/index.d.ts +4 -2
- package/admin/orm/index.js +4 -2
- package/admin/orm/input-types.d.ts +303 -142
- package/admin/orm/models/index.d.ts +2 -1
- package/admin/orm/models/index.js +5 -3
- package/admin/orm/models/orgMembershipSetting.d.ts +56 -0
- package/admin/orm/models/orgMembershipSetting.js +100 -0
- package/auth/cli/commands/crypto-address.js +22 -0
- package/auth/cli/commands/email.js +22 -0
- package/auth/cli/commands/identity-provider.d.ts +8 -0
- package/auth/cli/commands/identity-provider.js +164 -0
- package/auth/cli/commands/phone-number.js +22 -0
- package/auth/cli/commands/webauthn-credential.d.ts +8 -0
- package/auth/cli/commands/webauthn-credential.js +456 -0
- package/auth/cli/commands.js +7 -3
- package/auth/cli/executor.d.ts +7 -5
- package/auth/orm/index.d.ts +9 -5
- package/auth/orm/index.js +4 -0
- package/auth/orm/input-types.d.ts +525 -81
- package/auth/orm/input-types.js +1 -0
- package/auth/orm/models/identityProvider.d.ts +32 -0
- package/auth/orm/models/identityProvider.js +55 -0
- package/auth/orm/models/index.d.ts +2 -0
- package/auth/orm/models/index.js +5 -1
- package/auth/orm/models/webauthnCredential.d.ts +56 -0
- package/auth/orm/models/webauthnCredential.js +100 -0
- package/auth/orm/mutation/index.d.ts +9 -9
- package/auth/orm/mutation/index.js +12 -12
- package/esm/admin/cli/commands/org-membership-default.js +0 -44
- package/esm/admin/cli/commands/org-membership-setting.d.ts +8 -0
- package/esm/admin/cli/commands/org-membership-setting.js +416 -0
- package/esm/admin/cli/commands.js +5 -3
- package/esm/admin/cli/executor.d.ts +2 -1
- package/esm/admin/orm/index.d.ts +4 -2
- package/esm/admin/orm/index.js +4 -2
- package/esm/admin/orm/input-types.d.ts +303 -142
- package/esm/admin/orm/models/index.d.ts +2 -1
- package/esm/admin/orm/models/index.js +2 -1
- package/esm/admin/orm/models/orgMembershipSetting.d.ts +56 -0
- package/esm/admin/orm/models/orgMembershipSetting.js +96 -0
- package/esm/auth/cli/commands/crypto-address.js +22 -0
- package/esm/auth/cli/commands/email.js +22 -0
- package/esm/auth/cli/commands/identity-provider.d.ts +8 -0
- package/esm/auth/cli/commands/identity-provider.js +162 -0
- package/esm/auth/cli/commands/phone-number.js +22 -0
- package/esm/auth/cli/commands/webauthn-credential.d.ts +8 -0
- package/esm/auth/cli/commands/webauthn-credential.js +454 -0
- package/esm/auth/cli/commands.js +7 -3
- package/esm/auth/cli/executor.d.ts +7 -5
- package/esm/auth/orm/index.d.ts +9 -5
- package/esm/auth/orm/index.js +4 -0
- package/esm/auth/orm/input-types.d.ts +525 -81
- package/esm/auth/orm/input-types.js +1 -0
- package/esm/auth/orm/models/identityProvider.d.ts +32 -0
- package/esm/auth/orm/models/identityProvider.js +51 -0
- package/esm/auth/orm/models/index.d.ts +2 -0
- package/esm/auth/orm/models/index.js +2 -0
- package/esm/auth/orm/models/webauthnCredential.d.ts +56 -0
- package/esm/auth/orm/models/webauthnCredential.js +96 -0
- package/esm/auth/orm/mutation/index.d.ts +9 -9
- package/esm/auth/orm/mutation/index.js +12 -12
- package/esm/objects/orm/input-types.d.ts +12 -0
- package/esm/public/cli/commands/crypto-address.js +22 -0
- package/esm/public/cli/commands/email.js +22 -0
- package/esm/public/cli/commands/entity-type-provision.js +110 -0
- package/esm/public/cli/commands/identity-provider.d.ts +8 -0
- package/esm/public/cli/commands/identity-provider.js +162 -0
- package/esm/public/cli/commands/identity-providers-module.d.ts +8 -0
- package/esm/public/cli/commands/identity-providers-module.js +316 -0
- package/esm/public/cli/commands/memberships-module.js +44 -0
- package/esm/public/cli/commands/notifications-module.d.ts +8 -0
- package/esm/public/cli/commands/notifications-module.js +448 -0
- package/esm/public/cli/commands/org-membership-default.js +0 -44
- package/esm/public/cli/commands/org-membership-setting.d.ts +8 -0
- package/esm/public/cli/commands/org-membership-setting.js +416 -0
- package/esm/public/cli/commands/phone-number.js +22 -0
- package/esm/public/cli/commands/relation-provision.js +24 -156
- package/esm/public/cli/commands/secure-table-provision.js +24 -156
- package/esm/public/cli/commands/storage-module.js +44 -0
- package/esm/public/cli/commands/webauthn-auth-module.d.ts +8 -0
- package/esm/public/cli/commands/webauthn-auth-module.js +536 -0
- package/esm/public/cli/commands/webauthn-credential.d.ts +8 -0
- package/esm/public/cli/commands/webauthn-credential.js +454 -0
- package/esm/public/cli/commands.js +17 -5
- package/esm/public/cli/executor.d.ts +12 -6
- package/esm/public/orm/index.d.ts +19 -7
- package/esm/public/orm/index.js +14 -2
- package/esm/public/orm/input-types.d.ts +1827 -366
- package/esm/public/orm/input-types.js +7 -0
- package/esm/public/orm/models/identityProvider.d.ts +32 -0
- package/esm/public/orm/models/identityProvider.js +51 -0
- package/esm/public/orm/models/identityProvidersModule.d.ts +56 -0
- package/esm/public/orm/models/identityProvidersModule.js +96 -0
- package/esm/public/orm/models/index.d.ts +7 -1
- package/esm/public/orm/models/index.js +7 -1
- package/esm/public/orm/models/notificationsModule.d.ts +56 -0
- package/esm/public/orm/models/notificationsModule.js +96 -0
- package/esm/public/orm/models/orgMembershipSetting.d.ts +56 -0
- package/esm/public/orm/models/orgMembershipSetting.js +96 -0
- package/esm/public/orm/models/webauthnAuthModule.d.ts +56 -0
- package/esm/public/orm/models/webauthnAuthModule.js +96 -0
- package/esm/public/orm/models/webauthnCredential.d.ts +56 -0
- package/esm/public/orm/models/webauthnCredential.js +96 -0
- package/esm/public/orm/mutation/index.d.ts +9 -9
- package/esm/public/orm/mutation/index.js +12 -12
- package/objects/orm/input-types.d.ts +12 -0
- package/package.json +3 -3
- package/public/cli/commands/crypto-address.js +22 -0
- package/public/cli/commands/email.js +22 -0
- package/public/cli/commands/entity-type-provision.js +110 -0
- package/public/cli/commands/identity-provider.d.ts +8 -0
- package/public/cli/commands/identity-provider.js +164 -0
- package/public/cli/commands/identity-providers-module.d.ts +8 -0
- package/public/cli/commands/identity-providers-module.js +318 -0
- package/public/cli/commands/memberships-module.js +44 -0
- package/public/cli/commands/notifications-module.d.ts +8 -0
- package/public/cli/commands/notifications-module.js +450 -0
- package/public/cli/commands/org-membership-default.js +0 -44
- package/public/cli/commands/org-membership-setting.d.ts +8 -0
- package/public/cli/commands/org-membership-setting.js +418 -0
- package/public/cli/commands/phone-number.js +22 -0
- package/public/cli/commands/relation-provision.js +24 -156
- package/public/cli/commands/secure-table-provision.js +24 -156
- package/public/cli/commands/storage-module.js +44 -0
- package/public/cli/commands/webauthn-auth-module.d.ts +8 -0
- package/public/cli/commands/webauthn-auth-module.js +538 -0
- package/public/cli/commands/webauthn-credential.d.ts +8 -0
- package/public/cli/commands/webauthn-credential.js +456 -0
- package/public/cli/commands.js +17 -5
- package/public/cli/executor.d.ts +12 -6
- package/public/orm/index.d.ts +19 -7
- package/public/orm/index.js +14 -2
- package/public/orm/input-types.d.ts +1827 -366
- package/public/orm/input-types.js +7 -0
- package/public/orm/models/identityProvider.d.ts +32 -0
- package/public/orm/models/identityProvider.js +55 -0
- package/public/orm/models/identityProvidersModule.d.ts +56 -0
- package/public/orm/models/identityProvidersModule.js +100 -0
- package/public/orm/models/index.d.ts +7 -1
- package/public/orm/models/index.js +17 -5
- package/public/orm/models/notificationsModule.d.ts +56 -0
- package/public/orm/models/notificationsModule.js +100 -0
- package/public/orm/models/orgMembershipSetting.d.ts +56 -0
- package/public/orm/models/orgMembershipSetting.js +100 -0
- package/public/orm/models/webauthnAuthModule.d.ts +56 -0
- package/public/orm/models/webauthnAuthModule.js +100 -0
- package/public/orm/models/webauthnCredential.d.ts +56 -0
- package/public/orm/models/webauthnCredential.js +100 -0
- package/public/orm/mutation/index.d.ts +9 -9
- package/public/orm/mutation/index.js +12 -12
|
@@ -14,6 +14,7 @@ const fieldSchema = {
|
|
|
14
14
|
email: 'string',
|
|
15
15
|
isVerified: 'boolean',
|
|
16
16
|
isPrimary: 'boolean',
|
|
17
|
+
name: 'string',
|
|
17
18
|
createdAt: 'string',
|
|
18
19
|
updatedAt: 'string',
|
|
19
20
|
};
|
|
@@ -64,6 +65,7 @@ async function handleList(argv, _prompter) {
|
|
|
64
65
|
email: true,
|
|
65
66
|
isVerified: true,
|
|
66
67
|
isPrimary: true,
|
|
68
|
+
name: true,
|
|
67
69
|
createdAt: true,
|
|
68
70
|
updatedAt: true,
|
|
69
71
|
};
|
|
@@ -88,6 +90,7 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
88
90
|
email: true,
|
|
89
91
|
isVerified: true,
|
|
90
92
|
isPrimary: true,
|
|
93
|
+
name: true,
|
|
91
94
|
createdAt: true,
|
|
92
95
|
updatedAt: true,
|
|
93
96
|
};
|
|
@@ -124,6 +127,7 @@ async function handleGet(argv, prompter) {
|
|
|
124
127
|
email: true,
|
|
125
128
|
isVerified: true,
|
|
126
129
|
isPrimary: true,
|
|
130
|
+
name: true,
|
|
127
131
|
createdAt: true,
|
|
128
132
|
updatedAt: true,
|
|
129
133
|
},
|
|
@@ -169,6 +173,13 @@ async function handleCreate(argv, prompter) {
|
|
|
169
173
|
required: false,
|
|
170
174
|
skipPrompt: true,
|
|
171
175
|
},
|
|
176
|
+
{
|
|
177
|
+
type: 'text',
|
|
178
|
+
name: 'name',
|
|
179
|
+
message: 'name',
|
|
180
|
+
required: false,
|
|
181
|
+
skipPrompt: true,
|
|
182
|
+
},
|
|
172
183
|
]);
|
|
173
184
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
174
185
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -180,6 +191,7 @@ async function handleCreate(argv, prompter) {
|
|
|
180
191
|
email: cleanedData.email,
|
|
181
192
|
isVerified: cleanedData.isVerified,
|
|
182
193
|
isPrimary: cleanedData.isPrimary,
|
|
194
|
+
name: cleanedData.name,
|
|
183
195
|
},
|
|
184
196
|
select: {
|
|
185
197
|
id: true,
|
|
@@ -187,6 +199,7 @@ async function handleCreate(argv, prompter) {
|
|
|
187
199
|
email: true,
|
|
188
200
|
isVerified: true,
|
|
189
201
|
isPrimary: true,
|
|
202
|
+
name: true,
|
|
190
203
|
createdAt: true,
|
|
191
204
|
updatedAt: true,
|
|
192
205
|
},
|
|
@@ -238,6 +251,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
238
251
|
required: false,
|
|
239
252
|
skipPrompt: true,
|
|
240
253
|
},
|
|
254
|
+
{
|
|
255
|
+
type: 'text',
|
|
256
|
+
name: 'name',
|
|
257
|
+
message: 'name',
|
|
258
|
+
required: false,
|
|
259
|
+
skipPrompt: true,
|
|
260
|
+
},
|
|
241
261
|
]);
|
|
242
262
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
243
263
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -252,6 +272,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
252
272
|
email: cleanedData.email,
|
|
253
273
|
isVerified: cleanedData.isVerified,
|
|
254
274
|
isPrimary: cleanedData.isPrimary,
|
|
275
|
+
name: cleanedData.name,
|
|
255
276
|
},
|
|
256
277
|
select: {
|
|
257
278
|
id: true,
|
|
@@ -259,6 +280,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
259
280
|
email: true,
|
|
260
281
|
isVerified: true,
|
|
261
282
|
isPrimary: true,
|
|
283
|
+
name: true,
|
|
262
284
|
createdAt: true,
|
|
263
285
|
updatedAt: true,
|
|
264
286
|
},
|
|
@@ -20,12 +20,17 @@ const fieldSchema = {
|
|
|
20
20
|
hasLimits: 'boolean',
|
|
21
21
|
hasProfiles: 'boolean',
|
|
22
22
|
hasLevels: 'boolean',
|
|
23
|
+
hasStorage: 'boolean',
|
|
24
|
+
storageConfig: 'json',
|
|
23
25
|
skipEntityPolicies: 'boolean',
|
|
24
26
|
tableProvision: 'json',
|
|
25
27
|
outMembershipType: 'int',
|
|
26
28
|
outEntityTableId: 'uuid',
|
|
27
29
|
outEntityTableName: 'string',
|
|
28
30
|
outInstalledModules: 'string',
|
|
31
|
+
outStorageModuleId: 'uuid',
|
|
32
|
+
outBucketsTableId: 'uuid',
|
|
33
|
+
outFilesTableId: 'uuid',
|
|
29
34
|
};
|
|
30
35
|
const usage = '\nentity-type-provision <command>\n\nCommands:\n list List entityTypeProvision records\n find-first Find first matching entityTypeProvision record\n get Get a entityTypeProvision by ID\n create Create a new entityTypeProvision\n update Update an existing entityTypeProvision\n delete Delete a entityTypeProvision\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';
|
|
31
36
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -80,12 +85,17 @@ async function handleList(argv, _prompter) {
|
|
|
80
85
|
hasLimits: true,
|
|
81
86
|
hasProfiles: true,
|
|
82
87
|
hasLevels: true,
|
|
88
|
+
hasStorage: true,
|
|
89
|
+
storageConfig: true,
|
|
83
90
|
skipEntityPolicies: true,
|
|
84
91
|
tableProvision: true,
|
|
85
92
|
outMembershipType: true,
|
|
86
93
|
outEntityTableId: true,
|
|
87
94
|
outEntityTableName: true,
|
|
88
95
|
outInstalledModules: true,
|
|
96
|
+
outStorageModuleId: true,
|
|
97
|
+
outBucketsTableId: true,
|
|
98
|
+
outFilesTableId: true,
|
|
89
99
|
};
|
|
90
100
|
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
91
101
|
const client = (0, executor_1.getClient)();
|
|
@@ -114,12 +124,17 @@ async function handleFindFirst(argv, _prompter) {
|
|
|
114
124
|
hasLimits: true,
|
|
115
125
|
hasProfiles: true,
|
|
116
126
|
hasLevels: true,
|
|
127
|
+
hasStorage: true,
|
|
128
|
+
storageConfig: true,
|
|
117
129
|
skipEntityPolicies: true,
|
|
118
130
|
tableProvision: true,
|
|
119
131
|
outMembershipType: true,
|
|
120
132
|
outEntityTableId: true,
|
|
121
133
|
outEntityTableName: true,
|
|
122
134
|
outInstalledModules: true,
|
|
135
|
+
outStorageModuleId: true,
|
|
136
|
+
outBucketsTableId: true,
|
|
137
|
+
outFilesTableId: true,
|
|
123
138
|
};
|
|
124
139
|
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
125
140
|
const client = (0, executor_1.getClient)();
|
|
@@ -160,12 +175,17 @@ async function handleGet(argv, prompter) {
|
|
|
160
175
|
hasLimits: true,
|
|
161
176
|
hasProfiles: true,
|
|
162
177
|
hasLevels: true,
|
|
178
|
+
hasStorage: true,
|
|
179
|
+
storageConfig: true,
|
|
163
180
|
skipEntityPolicies: true,
|
|
164
181
|
tableProvision: true,
|
|
165
182
|
outMembershipType: true,
|
|
166
183
|
outEntityTableId: true,
|
|
167
184
|
outEntityTableName: true,
|
|
168
185
|
outInstalledModules: true,
|
|
186
|
+
outStorageModuleId: true,
|
|
187
|
+
outBucketsTableId: true,
|
|
188
|
+
outFilesTableId: true,
|
|
169
189
|
},
|
|
170
190
|
})
|
|
171
191
|
.execute();
|
|
@@ -249,6 +269,20 @@ async function handleCreate(argv, prompter) {
|
|
|
249
269
|
required: false,
|
|
250
270
|
skipPrompt: true,
|
|
251
271
|
},
|
|
272
|
+
{
|
|
273
|
+
type: 'boolean',
|
|
274
|
+
name: 'hasStorage',
|
|
275
|
+
message: 'hasStorage',
|
|
276
|
+
required: false,
|
|
277
|
+
skipPrompt: true,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
type: 'json',
|
|
281
|
+
name: 'storageConfig',
|
|
282
|
+
message: 'storageConfig',
|
|
283
|
+
required: false,
|
|
284
|
+
skipPrompt: true,
|
|
285
|
+
},
|
|
252
286
|
{
|
|
253
287
|
type: 'boolean',
|
|
254
288
|
name: 'skipEntityPolicies',
|
|
@@ -291,6 +325,27 @@ async function handleCreate(argv, prompter) {
|
|
|
291
325
|
required: false,
|
|
292
326
|
skipPrompt: true,
|
|
293
327
|
},
|
|
328
|
+
{
|
|
329
|
+
type: 'text',
|
|
330
|
+
name: 'outStorageModuleId',
|
|
331
|
+
message: 'outStorageModuleId',
|
|
332
|
+
required: false,
|
|
333
|
+
skipPrompt: true,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
type: 'text',
|
|
337
|
+
name: 'outBucketsTableId',
|
|
338
|
+
message: 'outBucketsTableId',
|
|
339
|
+
required: false,
|
|
340
|
+
skipPrompt: true,
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
type: 'text',
|
|
344
|
+
name: 'outFilesTableId',
|
|
345
|
+
message: 'outFilesTableId',
|
|
346
|
+
required: false,
|
|
347
|
+
skipPrompt: true,
|
|
348
|
+
},
|
|
294
349
|
]);
|
|
295
350
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
296
351
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -308,12 +363,17 @@ async function handleCreate(argv, prompter) {
|
|
|
308
363
|
hasLimits: cleanedData.hasLimits,
|
|
309
364
|
hasProfiles: cleanedData.hasProfiles,
|
|
310
365
|
hasLevels: cleanedData.hasLevels,
|
|
366
|
+
hasStorage: cleanedData.hasStorage,
|
|
367
|
+
storageConfig: cleanedData.storageConfig,
|
|
311
368
|
skipEntityPolicies: cleanedData.skipEntityPolicies,
|
|
312
369
|
tableProvision: cleanedData.tableProvision,
|
|
313
370
|
outMembershipType: cleanedData.outMembershipType,
|
|
314
371
|
outEntityTableId: cleanedData.outEntityTableId,
|
|
315
372
|
outEntityTableName: cleanedData.outEntityTableName,
|
|
316
373
|
outInstalledModules: cleanedData.outInstalledModules,
|
|
374
|
+
outStorageModuleId: cleanedData.outStorageModuleId,
|
|
375
|
+
outBucketsTableId: cleanedData.outBucketsTableId,
|
|
376
|
+
outFilesTableId: cleanedData.outFilesTableId,
|
|
317
377
|
},
|
|
318
378
|
select: {
|
|
319
379
|
id: true,
|
|
@@ -327,12 +387,17 @@ async function handleCreate(argv, prompter) {
|
|
|
327
387
|
hasLimits: true,
|
|
328
388
|
hasProfiles: true,
|
|
329
389
|
hasLevels: true,
|
|
390
|
+
hasStorage: true,
|
|
391
|
+
storageConfig: true,
|
|
330
392
|
skipEntityPolicies: true,
|
|
331
393
|
tableProvision: true,
|
|
332
394
|
outMembershipType: true,
|
|
333
395
|
outEntityTableId: true,
|
|
334
396
|
outEntityTableName: true,
|
|
335
397
|
outInstalledModules: true,
|
|
398
|
+
outStorageModuleId: true,
|
|
399
|
+
outBucketsTableId: true,
|
|
400
|
+
outFilesTableId: true,
|
|
336
401
|
},
|
|
337
402
|
})
|
|
338
403
|
.execute();
|
|
@@ -422,6 +487,20 @@ async function handleUpdate(argv, prompter) {
|
|
|
422
487
|
required: false,
|
|
423
488
|
skipPrompt: true,
|
|
424
489
|
},
|
|
490
|
+
{
|
|
491
|
+
type: 'boolean',
|
|
492
|
+
name: 'hasStorage',
|
|
493
|
+
message: 'hasStorage',
|
|
494
|
+
required: false,
|
|
495
|
+
skipPrompt: true,
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
type: 'json',
|
|
499
|
+
name: 'storageConfig',
|
|
500
|
+
message: 'storageConfig',
|
|
501
|
+
required: false,
|
|
502
|
+
skipPrompt: true,
|
|
503
|
+
},
|
|
425
504
|
{
|
|
426
505
|
type: 'boolean',
|
|
427
506
|
name: 'skipEntityPolicies',
|
|
@@ -464,6 +543,27 @@ async function handleUpdate(argv, prompter) {
|
|
|
464
543
|
required: false,
|
|
465
544
|
skipPrompt: true,
|
|
466
545
|
},
|
|
546
|
+
{
|
|
547
|
+
type: 'text',
|
|
548
|
+
name: 'outStorageModuleId',
|
|
549
|
+
message: 'outStorageModuleId',
|
|
550
|
+
required: false,
|
|
551
|
+
skipPrompt: true,
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
type: 'text',
|
|
555
|
+
name: 'outBucketsTableId',
|
|
556
|
+
message: 'outBucketsTableId',
|
|
557
|
+
required: false,
|
|
558
|
+
skipPrompt: true,
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
type: 'text',
|
|
562
|
+
name: 'outFilesTableId',
|
|
563
|
+
message: 'outFilesTableId',
|
|
564
|
+
required: false,
|
|
565
|
+
skipPrompt: true,
|
|
566
|
+
},
|
|
467
567
|
]);
|
|
468
568
|
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
469
569
|
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
@@ -484,12 +584,17 @@ async function handleUpdate(argv, prompter) {
|
|
|
484
584
|
hasLimits: cleanedData.hasLimits,
|
|
485
585
|
hasProfiles: cleanedData.hasProfiles,
|
|
486
586
|
hasLevels: cleanedData.hasLevels,
|
|
587
|
+
hasStorage: cleanedData.hasStorage,
|
|
588
|
+
storageConfig: cleanedData.storageConfig,
|
|
487
589
|
skipEntityPolicies: cleanedData.skipEntityPolicies,
|
|
488
590
|
tableProvision: cleanedData.tableProvision,
|
|
489
591
|
outMembershipType: cleanedData.outMembershipType,
|
|
490
592
|
outEntityTableId: cleanedData.outEntityTableId,
|
|
491
593
|
outEntityTableName: cleanedData.outEntityTableName,
|
|
492
594
|
outInstalledModules: cleanedData.outInstalledModules,
|
|
595
|
+
outStorageModuleId: cleanedData.outStorageModuleId,
|
|
596
|
+
outBucketsTableId: cleanedData.outBucketsTableId,
|
|
597
|
+
outFilesTableId: cleanedData.outFilesTableId,
|
|
493
598
|
},
|
|
494
599
|
select: {
|
|
495
600
|
id: true,
|
|
@@ -503,12 +608,17 @@ async function handleUpdate(argv, prompter) {
|
|
|
503
608
|
hasLimits: true,
|
|
504
609
|
hasProfiles: true,
|
|
505
610
|
hasLevels: true,
|
|
611
|
+
hasStorage: true,
|
|
612
|
+
storageConfig: true,
|
|
506
613
|
skipEntityPolicies: true,
|
|
507
614
|
tableProvision: true,
|
|
508
615
|
outMembershipType: true,
|
|
509
616
|
outEntityTableId: true,
|
|
510
617
|
outEntityTableName: true,
|
|
511
618
|
outInstalledModules: true,
|
|
619
|
+
outStorageModuleId: true,
|
|
620
|
+
outBucketsTableId: true,
|
|
621
|
+
outFilesTableId: true,
|
|
512
622
|
},
|
|
513
623
|
})
|
|
514
624
|
.execute();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for IdentityProvider
|
|
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,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* CLI commands for IdentityProvider
|
|
5
|
+
* @generated by @constructive-io/graphql-codegen
|
|
6
|
+
* DO NOT EDIT - changes will be overwritten
|
|
7
|
+
*/
|
|
8
|
+
const inquirerer_1 = require("inquirerer");
|
|
9
|
+
const executor_1 = require("../executor");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const fieldSchema = {
|
|
12
|
+
slug: 'string',
|
|
13
|
+
kind: 'string',
|
|
14
|
+
displayName: 'string',
|
|
15
|
+
enabled: 'boolean',
|
|
16
|
+
isBuiltIn: 'boolean',
|
|
17
|
+
};
|
|
18
|
+
const usage = '\nidentity-provider <command>\n\nCommands:\n list List identityProvider records\n find-first Find first matching identityProvider record\n create Create a new identityProvider\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';
|
|
19
|
+
exports.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 } = (0, inquirerer_1.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', 'create'],
|
|
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 'create':
|
|
45
|
+
return handleCreate(argv, prompter);
|
|
46
|
+
default:
|
|
47
|
+
console.log(usage);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async function handleList(argv, _prompter) {
|
|
52
|
+
try {
|
|
53
|
+
const defaultSelect = {
|
|
54
|
+
slug: true,
|
|
55
|
+
kind: true,
|
|
56
|
+
displayName: true,
|
|
57
|
+
enabled: true,
|
|
58
|
+
isBuiltIn: true,
|
|
59
|
+
};
|
|
60
|
+
const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
|
|
61
|
+
const client = (0, executor_1.getClient)();
|
|
62
|
+
const result = await client.identityProvider.findMany(findManyArgs).execute();
|
|
63
|
+
console.log(JSON.stringify(result, null, 2));
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error('Failed to list records.');
|
|
67
|
+
if (error instanceof Error) {
|
|
68
|
+
console.error(error.message);
|
|
69
|
+
}
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async function handleFindFirst(argv, _prompter) {
|
|
74
|
+
try {
|
|
75
|
+
const defaultSelect = {
|
|
76
|
+
slug: true,
|
|
77
|
+
kind: true,
|
|
78
|
+
displayName: true,
|
|
79
|
+
enabled: true,
|
|
80
|
+
isBuiltIn: true,
|
|
81
|
+
};
|
|
82
|
+
const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
|
|
83
|
+
const client = (0, executor_1.getClient)();
|
|
84
|
+
const result = await client.identityProvider.findFirst(findFirstArgs).execute();
|
|
85
|
+
console.log(JSON.stringify(result, null, 2));
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error('Failed to find record.');
|
|
89
|
+
if (error instanceof Error) {
|
|
90
|
+
console.error(error.message);
|
|
91
|
+
}
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async function handleCreate(argv, prompter) {
|
|
96
|
+
try {
|
|
97
|
+
const rawAnswers = await prompter.prompt(argv, [
|
|
98
|
+
{
|
|
99
|
+
type: 'text',
|
|
100
|
+
name: 'slug',
|
|
101
|
+
message: 'slug',
|
|
102
|
+
required: false,
|
|
103
|
+
skipPrompt: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'text',
|
|
107
|
+
name: 'kind',
|
|
108
|
+
message: 'kind',
|
|
109
|
+
required: false,
|
|
110
|
+
skipPrompt: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'text',
|
|
114
|
+
name: 'displayName',
|
|
115
|
+
message: 'displayName',
|
|
116
|
+
required: false,
|
|
117
|
+
skipPrompt: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'boolean',
|
|
121
|
+
name: 'enabled',
|
|
122
|
+
message: 'enabled',
|
|
123
|
+
required: false,
|
|
124
|
+
skipPrompt: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
name: 'isBuiltIn',
|
|
129
|
+
message: 'isBuiltIn',
|
|
130
|
+
required: false,
|
|
131
|
+
skipPrompt: true,
|
|
132
|
+
},
|
|
133
|
+
]);
|
|
134
|
+
const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
|
|
135
|
+
const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
|
|
136
|
+
const client = (0, executor_1.getClient)();
|
|
137
|
+
const result = await client.identityProvider
|
|
138
|
+
.create({
|
|
139
|
+
data: {
|
|
140
|
+
slug: cleanedData.slug,
|
|
141
|
+
kind: cleanedData.kind,
|
|
142
|
+
displayName: cleanedData.displayName,
|
|
143
|
+
enabled: cleanedData.enabled,
|
|
144
|
+
isBuiltIn: cleanedData.isBuiltIn,
|
|
145
|
+
},
|
|
146
|
+
select: {
|
|
147
|
+
slug: true,
|
|
148
|
+
kind: true,
|
|
149
|
+
displayName: true,
|
|
150
|
+
enabled: true,
|
|
151
|
+
isBuiltIn: true,
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
.execute();
|
|
155
|
+
console.log(JSON.stringify(result, null, 2));
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
console.error('Failed to create record.');
|
|
159
|
+
if (error instanceof Error) {
|
|
160
|
+
console.error(error.message);
|
|
161
|
+
}
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI commands for IdentityProvidersModule
|
|
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;
|