@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.
Files changed (155) hide show
  1. package/admin/cli/commands/org-membership-default.js +0 -44
  2. package/admin/cli/commands/org-membership-setting.d.ts +8 -0
  3. package/admin/cli/commands/org-membership-setting.js +418 -0
  4. package/admin/cli/commands.js +5 -3
  5. package/admin/cli/executor.d.ts +2 -1
  6. package/admin/orm/index.d.ts +4 -2
  7. package/admin/orm/index.js +4 -2
  8. package/admin/orm/input-types.d.ts +303 -142
  9. package/admin/orm/models/index.d.ts +2 -1
  10. package/admin/orm/models/index.js +5 -3
  11. package/admin/orm/models/orgMembershipSetting.d.ts +56 -0
  12. package/admin/orm/models/orgMembershipSetting.js +100 -0
  13. package/auth/cli/commands/crypto-address.js +22 -0
  14. package/auth/cli/commands/email.js +22 -0
  15. package/auth/cli/commands/identity-provider.d.ts +8 -0
  16. package/auth/cli/commands/identity-provider.js +164 -0
  17. package/auth/cli/commands/phone-number.js +22 -0
  18. package/auth/cli/commands/webauthn-credential.d.ts +8 -0
  19. package/auth/cli/commands/webauthn-credential.js +456 -0
  20. package/auth/cli/commands.js +7 -3
  21. package/auth/cli/executor.d.ts +7 -5
  22. package/auth/orm/index.d.ts +9 -5
  23. package/auth/orm/index.js +4 -0
  24. package/auth/orm/input-types.d.ts +525 -81
  25. package/auth/orm/input-types.js +1 -0
  26. package/auth/orm/models/identityProvider.d.ts +32 -0
  27. package/auth/orm/models/identityProvider.js +55 -0
  28. package/auth/orm/models/index.d.ts +2 -0
  29. package/auth/orm/models/index.js +5 -1
  30. package/auth/orm/models/webauthnCredential.d.ts +56 -0
  31. package/auth/orm/models/webauthnCredential.js +100 -0
  32. package/auth/orm/mutation/index.d.ts +9 -9
  33. package/auth/orm/mutation/index.js +12 -12
  34. package/esm/admin/cli/commands/org-membership-default.js +0 -44
  35. package/esm/admin/cli/commands/org-membership-setting.d.ts +8 -0
  36. package/esm/admin/cli/commands/org-membership-setting.js +416 -0
  37. package/esm/admin/cli/commands.js +5 -3
  38. package/esm/admin/cli/executor.d.ts +2 -1
  39. package/esm/admin/orm/index.d.ts +4 -2
  40. package/esm/admin/orm/index.js +4 -2
  41. package/esm/admin/orm/input-types.d.ts +303 -142
  42. package/esm/admin/orm/models/index.d.ts +2 -1
  43. package/esm/admin/orm/models/index.js +2 -1
  44. package/esm/admin/orm/models/orgMembershipSetting.d.ts +56 -0
  45. package/esm/admin/orm/models/orgMembershipSetting.js +96 -0
  46. package/esm/auth/cli/commands/crypto-address.js +22 -0
  47. package/esm/auth/cli/commands/email.js +22 -0
  48. package/esm/auth/cli/commands/identity-provider.d.ts +8 -0
  49. package/esm/auth/cli/commands/identity-provider.js +162 -0
  50. package/esm/auth/cli/commands/phone-number.js +22 -0
  51. package/esm/auth/cli/commands/webauthn-credential.d.ts +8 -0
  52. package/esm/auth/cli/commands/webauthn-credential.js +454 -0
  53. package/esm/auth/cli/commands.js +7 -3
  54. package/esm/auth/cli/executor.d.ts +7 -5
  55. package/esm/auth/orm/index.d.ts +9 -5
  56. package/esm/auth/orm/index.js +4 -0
  57. package/esm/auth/orm/input-types.d.ts +525 -81
  58. package/esm/auth/orm/input-types.js +1 -0
  59. package/esm/auth/orm/models/identityProvider.d.ts +32 -0
  60. package/esm/auth/orm/models/identityProvider.js +51 -0
  61. package/esm/auth/orm/models/index.d.ts +2 -0
  62. package/esm/auth/orm/models/index.js +2 -0
  63. package/esm/auth/orm/models/webauthnCredential.d.ts +56 -0
  64. package/esm/auth/orm/models/webauthnCredential.js +96 -0
  65. package/esm/auth/orm/mutation/index.d.ts +9 -9
  66. package/esm/auth/orm/mutation/index.js +12 -12
  67. package/esm/objects/orm/input-types.d.ts +12 -0
  68. package/esm/public/cli/commands/crypto-address.js +22 -0
  69. package/esm/public/cli/commands/email.js +22 -0
  70. package/esm/public/cli/commands/entity-type-provision.js +110 -0
  71. package/esm/public/cli/commands/identity-provider.d.ts +8 -0
  72. package/esm/public/cli/commands/identity-provider.js +162 -0
  73. package/esm/public/cli/commands/identity-providers-module.d.ts +8 -0
  74. package/esm/public/cli/commands/identity-providers-module.js +316 -0
  75. package/esm/public/cli/commands/memberships-module.js +44 -0
  76. package/esm/public/cli/commands/notifications-module.d.ts +8 -0
  77. package/esm/public/cli/commands/notifications-module.js +448 -0
  78. package/esm/public/cli/commands/org-membership-default.js +0 -44
  79. package/esm/public/cli/commands/org-membership-setting.d.ts +8 -0
  80. package/esm/public/cli/commands/org-membership-setting.js +416 -0
  81. package/esm/public/cli/commands/phone-number.js +22 -0
  82. package/esm/public/cli/commands/relation-provision.js +24 -156
  83. package/esm/public/cli/commands/secure-table-provision.js +24 -156
  84. package/esm/public/cli/commands/storage-module.js +44 -0
  85. package/esm/public/cli/commands/webauthn-auth-module.d.ts +8 -0
  86. package/esm/public/cli/commands/webauthn-auth-module.js +536 -0
  87. package/esm/public/cli/commands/webauthn-credential.d.ts +8 -0
  88. package/esm/public/cli/commands/webauthn-credential.js +454 -0
  89. package/esm/public/cli/commands.js +17 -5
  90. package/esm/public/cli/executor.d.ts +12 -6
  91. package/esm/public/orm/index.d.ts +19 -7
  92. package/esm/public/orm/index.js +14 -2
  93. package/esm/public/orm/input-types.d.ts +1827 -366
  94. package/esm/public/orm/input-types.js +7 -0
  95. package/esm/public/orm/models/identityProvider.d.ts +32 -0
  96. package/esm/public/orm/models/identityProvider.js +51 -0
  97. package/esm/public/orm/models/identityProvidersModule.d.ts +56 -0
  98. package/esm/public/orm/models/identityProvidersModule.js +96 -0
  99. package/esm/public/orm/models/index.d.ts +7 -1
  100. package/esm/public/orm/models/index.js +7 -1
  101. package/esm/public/orm/models/notificationsModule.d.ts +56 -0
  102. package/esm/public/orm/models/notificationsModule.js +96 -0
  103. package/esm/public/orm/models/orgMembershipSetting.d.ts +56 -0
  104. package/esm/public/orm/models/orgMembershipSetting.js +96 -0
  105. package/esm/public/orm/models/webauthnAuthModule.d.ts +56 -0
  106. package/esm/public/orm/models/webauthnAuthModule.js +96 -0
  107. package/esm/public/orm/models/webauthnCredential.d.ts +56 -0
  108. package/esm/public/orm/models/webauthnCredential.js +96 -0
  109. package/esm/public/orm/mutation/index.d.ts +9 -9
  110. package/esm/public/orm/mutation/index.js +12 -12
  111. package/objects/orm/input-types.d.ts +12 -0
  112. package/package.json +3 -3
  113. package/public/cli/commands/crypto-address.js +22 -0
  114. package/public/cli/commands/email.js +22 -0
  115. package/public/cli/commands/entity-type-provision.js +110 -0
  116. package/public/cli/commands/identity-provider.d.ts +8 -0
  117. package/public/cli/commands/identity-provider.js +164 -0
  118. package/public/cli/commands/identity-providers-module.d.ts +8 -0
  119. package/public/cli/commands/identity-providers-module.js +318 -0
  120. package/public/cli/commands/memberships-module.js +44 -0
  121. package/public/cli/commands/notifications-module.d.ts +8 -0
  122. package/public/cli/commands/notifications-module.js +450 -0
  123. package/public/cli/commands/org-membership-default.js +0 -44
  124. package/public/cli/commands/org-membership-setting.d.ts +8 -0
  125. package/public/cli/commands/org-membership-setting.js +418 -0
  126. package/public/cli/commands/phone-number.js +22 -0
  127. package/public/cli/commands/relation-provision.js +24 -156
  128. package/public/cli/commands/secure-table-provision.js +24 -156
  129. package/public/cli/commands/storage-module.js +44 -0
  130. package/public/cli/commands/webauthn-auth-module.d.ts +8 -0
  131. package/public/cli/commands/webauthn-auth-module.js +538 -0
  132. package/public/cli/commands/webauthn-credential.d.ts +8 -0
  133. package/public/cli/commands/webauthn-credential.js +456 -0
  134. package/public/cli/commands.js +17 -5
  135. package/public/cli/executor.d.ts +12 -6
  136. package/public/orm/index.d.ts +19 -7
  137. package/public/orm/index.js +14 -2
  138. package/public/orm/input-types.d.ts +1827 -366
  139. package/public/orm/input-types.js +7 -0
  140. package/public/orm/models/identityProvider.d.ts +32 -0
  141. package/public/orm/models/identityProvider.js +55 -0
  142. package/public/orm/models/identityProvidersModule.d.ts +56 -0
  143. package/public/orm/models/identityProvidersModule.js +100 -0
  144. package/public/orm/models/index.d.ts +7 -1
  145. package/public/orm/models/index.js +17 -5
  146. package/public/orm/models/notificationsModule.d.ts +56 -0
  147. package/public/orm/models/notificationsModule.js +100 -0
  148. package/public/orm/models/orgMembershipSetting.d.ts +56 -0
  149. package/public/orm/models/orgMembershipSetting.js +100 -0
  150. package/public/orm/models/webauthnAuthModule.d.ts +56 -0
  151. package/public/orm/models/webauthnAuthModule.js +100 -0
  152. package/public/orm/models/webauthnCredential.d.ts +56 -0
  153. package/public/orm/models/webauthnCredential.js +100 -0
  154. package/public/orm/mutation/index.d.ts +9 -9
  155. package/public/orm/mutation/index.js +12 -12
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * CLI commands for NotificationsModule
5
+ * @generated by @constructive-io/graphql-codegen
6
+ * DO NOT EDIT - changes will be overwritten
7
+ */
8
+ const inquirerer_1 = require("inquirerer");
9
+ const executor_1 = require("../executor");
10
+ const utils_1 = require("../utils");
11
+ const fieldSchema = {
12
+ id: 'uuid',
13
+ databaseId: 'uuid',
14
+ schemaId: 'uuid',
15
+ privateSchemaId: 'uuid',
16
+ notificationsTableId: 'uuid',
17
+ eventsTableId: 'uuid',
18
+ preferencesTableId: 'uuid',
19
+ channelsTableId: 'uuid',
20
+ deliveryLogTableId: 'uuid',
21
+ ownerTableId: 'uuid',
22
+ userSettingsTableId: 'uuid',
23
+ organizationSettingsTableId: 'uuid',
24
+ };
25
+ const usage = '\nnotifications-module <command>\n\nCommands:\n list List notificationsModule records\n find-first Find first matching notificationsModule record\n get Get a notificationsModule by ID\n create Create a new notificationsModule\n update Update an existing notificationsModule\n delete Delete a notificationsModule\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';
26
+ exports.default = async (argv, prompter, _options) => {
27
+ if (argv.help || argv.h) {
28
+ console.log(usage);
29
+ process.exit(0);
30
+ }
31
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
32
+ if (!subcommand) {
33
+ const answer = await prompter.prompt(argv, [
34
+ {
35
+ type: 'autocomplete',
36
+ name: 'subcommand',
37
+ message: 'What do you want to do?',
38
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
39
+ },
40
+ ]);
41
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
42
+ }
43
+ return handleTableSubcommand(subcommand, newArgv, prompter);
44
+ };
45
+ async function handleTableSubcommand(subcommand, argv, prompter) {
46
+ switch (subcommand) {
47
+ case 'list':
48
+ return handleList(argv, prompter);
49
+ case 'find-first':
50
+ return handleFindFirst(argv, prompter);
51
+ case 'get':
52
+ return handleGet(argv, prompter);
53
+ case 'create':
54
+ return handleCreate(argv, prompter);
55
+ case 'update':
56
+ return handleUpdate(argv, prompter);
57
+ case 'delete':
58
+ return handleDelete(argv, prompter);
59
+ default:
60
+ console.log(usage);
61
+ process.exit(1);
62
+ }
63
+ }
64
+ async function handleList(argv, _prompter) {
65
+ try {
66
+ const defaultSelect = {
67
+ id: true,
68
+ databaseId: true,
69
+ schemaId: true,
70
+ privateSchemaId: true,
71
+ notificationsTableId: true,
72
+ eventsTableId: true,
73
+ preferencesTableId: true,
74
+ channelsTableId: true,
75
+ deliveryLogTableId: true,
76
+ ownerTableId: true,
77
+ userSettingsTableId: true,
78
+ organizationSettingsTableId: true,
79
+ };
80
+ const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
81
+ const client = (0, executor_1.getClient)();
82
+ const result = await client.notificationsModule.findMany(findManyArgs).execute();
83
+ console.log(JSON.stringify(result, null, 2));
84
+ }
85
+ catch (error) {
86
+ console.error('Failed to list records.');
87
+ if (error instanceof Error) {
88
+ console.error(error.message);
89
+ }
90
+ process.exit(1);
91
+ }
92
+ }
93
+ async function handleFindFirst(argv, _prompter) {
94
+ try {
95
+ const defaultSelect = {
96
+ id: true,
97
+ databaseId: true,
98
+ schemaId: true,
99
+ privateSchemaId: true,
100
+ notificationsTableId: true,
101
+ eventsTableId: true,
102
+ preferencesTableId: true,
103
+ channelsTableId: true,
104
+ deliveryLogTableId: true,
105
+ ownerTableId: true,
106
+ userSettingsTableId: true,
107
+ organizationSettingsTableId: true,
108
+ };
109
+ const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
110
+ const client = (0, executor_1.getClient)();
111
+ const result = await client.notificationsModule.findFirst(findFirstArgs).execute();
112
+ console.log(JSON.stringify(result, null, 2));
113
+ }
114
+ catch (error) {
115
+ console.error('Failed to find record.');
116
+ if (error instanceof Error) {
117
+ console.error(error.message);
118
+ }
119
+ process.exit(1);
120
+ }
121
+ }
122
+ async function handleGet(argv, prompter) {
123
+ try {
124
+ const answers = await prompter.prompt(argv, [
125
+ {
126
+ type: 'text',
127
+ name: 'id',
128
+ message: 'id',
129
+ required: true,
130
+ },
131
+ ]);
132
+ const client = (0, executor_1.getClient)();
133
+ const result = await client.notificationsModule
134
+ .findOne({
135
+ id: answers.id,
136
+ select: {
137
+ id: true,
138
+ databaseId: true,
139
+ schemaId: true,
140
+ privateSchemaId: true,
141
+ notificationsTableId: true,
142
+ eventsTableId: true,
143
+ preferencesTableId: true,
144
+ channelsTableId: true,
145
+ deliveryLogTableId: true,
146
+ ownerTableId: true,
147
+ userSettingsTableId: true,
148
+ organizationSettingsTableId: true,
149
+ },
150
+ })
151
+ .execute();
152
+ console.log(JSON.stringify(result, null, 2));
153
+ }
154
+ catch (error) {
155
+ console.error('Record not found.');
156
+ if (error instanceof Error) {
157
+ console.error(error.message);
158
+ }
159
+ process.exit(1);
160
+ }
161
+ }
162
+ async function handleCreate(argv, prompter) {
163
+ try {
164
+ const rawAnswers = await prompter.prompt(argv, [
165
+ {
166
+ type: 'text',
167
+ name: 'databaseId',
168
+ message: 'databaseId',
169
+ required: true,
170
+ },
171
+ {
172
+ type: 'text',
173
+ name: 'schemaId',
174
+ message: 'schemaId',
175
+ required: false,
176
+ skipPrompt: true,
177
+ },
178
+ {
179
+ type: 'text',
180
+ name: 'privateSchemaId',
181
+ message: 'privateSchemaId',
182
+ required: false,
183
+ skipPrompt: true,
184
+ },
185
+ {
186
+ type: 'text',
187
+ name: 'notificationsTableId',
188
+ message: 'notificationsTableId',
189
+ required: false,
190
+ skipPrompt: true,
191
+ },
192
+ {
193
+ type: 'text',
194
+ name: 'eventsTableId',
195
+ message: 'eventsTableId',
196
+ required: false,
197
+ skipPrompt: true,
198
+ },
199
+ {
200
+ type: 'text',
201
+ name: 'preferencesTableId',
202
+ message: 'preferencesTableId',
203
+ required: false,
204
+ skipPrompt: true,
205
+ },
206
+ {
207
+ type: 'text',
208
+ name: 'channelsTableId',
209
+ message: 'channelsTableId',
210
+ required: false,
211
+ skipPrompt: true,
212
+ },
213
+ {
214
+ type: 'text',
215
+ name: 'deliveryLogTableId',
216
+ message: 'deliveryLogTableId',
217
+ required: false,
218
+ skipPrompt: true,
219
+ },
220
+ {
221
+ type: 'text',
222
+ name: 'ownerTableId',
223
+ message: 'ownerTableId',
224
+ required: false,
225
+ skipPrompt: true,
226
+ },
227
+ {
228
+ type: 'text',
229
+ name: 'userSettingsTableId',
230
+ message: 'userSettingsTableId',
231
+ required: false,
232
+ skipPrompt: true,
233
+ },
234
+ {
235
+ type: 'text',
236
+ name: 'organizationSettingsTableId',
237
+ message: 'organizationSettingsTableId',
238
+ required: false,
239
+ skipPrompt: true,
240
+ },
241
+ ]);
242
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
243
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
244
+ const client = (0, executor_1.getClient)();
245
+ const result = await client.notificationsModule
246
+ .create({
247
+ data: {
248
+ databaseId: cleanedData.databaseId,
249
+ schemaId: cleanedData.schemaId,
250
+ privateSchemaId: cleanedData.privateSchemaId,
251
+ notificationsTableId: cleanedData.notificationsTableId,
252
+ eventsTableId: cleanedData.eventsTableId,
253
+ preferencesTableId: cleanedData.preferencesTableId,
254
+ channelsTableId: cleanedData.channelsTableId,
255
+ deliveryLogTableId: cleanedData.deliveryLogTableId,
256
+ ownerTableId: cleanedData.ownerTableId,
257
+ userSettingsTableId: cleanedData.userSettingsTableId,
258
+ organizationSettingsTableId: cleanedData.organizationSettingsTableId,
259
+ },
260
+ select: {
261
+ id: true,
262
+ databaseId: true,
263
+ schemaId: true,
264
+ privateSchemaId: true,
265
+ notificationsTableId: true,
266
+ eventsTableId: true,
267
+ preferencesTableId: true,
268
+ channelsTableId: true,
269
+ deliveryLogTableId: true,
270
+ ownerTableId: true,
271
+ userSettingsTableId: true,
272
+ organizationSettingsTableId: true,
273
+ },
274
+ })
275
+ .execute();
276
+ console.log(JSON.stringify(result, null, 2));
277
+ }
278
+ catch (error) {
279
+ console.error('Failed to create record.');
280
+ if (error instanceof Error) {
281
+ console.error(error.message);
282
+ }
283
+ process.exit(1);
284
+ }
285
+ }
286
+ async function handleUpdate(argv, prompter) {
287
+ try {
288
+ const rawAnswers = await prompter.prompt(argv, [
289
+ {
290
+ type: 'text',
291
+ name: 'id',
292
+ message: 'id',
293
+ required: true,
294
+ },
295
+ {
296
+ type: 'text',
297
+ name: 'databaseId',
298
+ message: 'databaseId',
299
+ required: false,
300
+ },
301
+ {
302
+ type: 'text',
303
+ name: 'schemaId',
304
+ message: 'schemaId',
305
+ required: false,
306
+ skipPrompt: true,
307
+ },
308
+ {
309
+ type: 'text',
310
+ name: 'privateSchemaId',
311
+ message: 'privateSchemaId',
312
+ required: false,
313
+ skipPrompt: true,
314
+ },
315
+ {
316
+ type: 'text',
317
+ name: 'notificationsTableId',
318
+ message: 'notificationsTableId',
319
+ required: false,
320
+ skipPrompt: true,
321
+ },
322
+ {
323
+ type: 'text',
324
+ name: 'eventsTableId',
325
+ message: 'eventsTableId',
326
+ required: false,
327
+ skipPrompt: true,
328
+ },
329
+ {
330
+ type: 'text',
331
+ name: 'preferencesTableId',
332
+ message: 'preferencesTableId',
333
+ required: false,
334
+ skipPrompt: true,
335
+ },
336
+ {
337
+ type: 'text',
338
+ name: 'channelsTableId',
339
+ message: 'channelsTableId',
340
+ required: false,
341
+ skipPrompt: true,
342
+ },
343
+ {
344
+ type: 'text',
345
+ name: 'deliveryLogTableId',
346
+ message: 'deliveryLogTableId',
347
+ required: false,
348
+ skipPrompt: true,
349
+ },
350
+ {
351
+ type: 'text',
352
+ name: 'ownerTableId',
353
+ message: 'ownerTableId',
354
+ required: false,
355
+ skipPrompt: true,
356
+ },
357
+ {
358
+ type: 'text',
359
+ name: 'userSettingsTableId',
360
+ message: 'userSettingsTableId',
361
+ required: false,
362
+ skipPrompt: true,
363
+ },
364
+ {
365
+ type: 'text',
366
+ name: 'organizationSettingsTableId',
367
+ message: 'organizationSettingsTableId',
368
+ required: false,
369
+ skipPrompt: true,
370
+ },
371
+ ]);
372
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
373
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
374
+ const client = (0, executor_1.getClient)();
375
+ const result = await client.notificationsModule
376
+ .update({
377
+ where: {
378
+ id: answers.id,
379
+ },
380
+ data: {
381
+ databaseId: cleanedData.databaseId,
382
+ schemaId: cleanedData.schemaId,
383
+ privateSchemaId: cleanedData.privateSchemaId,
384
+ notificationsTableId: cleanedData.notificationsTableId,
385
+ eventsTableId: cleanedData.eventsTableId,
386
+ preferencesTableId: cleanedData.preferencesTableId,
387
+ channelsTableId: cleanedData.channelsTableId,
388
+ deliveryLogTableId: cleanedData.deliveryLogTableId,
389
+ ownerTableId: cleanedData.ownerTableId,
390
+ userSettingsTableId: cleanedData.userSettingsTableId,
391
+ organizationSettingsTableId: cleanedData.organizationSettingsTableId,
392
+ },
393
+ select: {
394
+ id: true,
395
+ databaseId: true,
396
+ schemaId: true,
397
+ privateSchemaId: true,
398
+ notificationsTableId: true,
399
+ eventsTableId: true,
400
+ preferencesTableId: true,
401
+ channelsTableId: true,
402
+ deliveryLogTableId: true,
403
+ ownerTableId: true,
404
+ userSettingsTableId: true,
405
+ organizationSettingsTableId: true,
406
+ },
407
+ })
408
+ .execute();
409
+ console.log(JSON.stringify(result, null, 2));
410
+ }
411
+ catch (error) {
412
+ console.error('Failed to update record.');
413
+ if (error instanceof Error) {
414
+ console.error(error.message);
415
+ }
416
+ process.exit(1);
417
+ }
418
+ }
419
+ async function handleDelete(argv, prompter) {
420
+ try {
421
+ const rawAnswers = await prompter.prompt(argv, [
422
+ {
423
+ type: 'text',
424
+ name: 'id',
425
+ message: 'id',
426
+ required: true,
427
+ },
428
+ ]);
429
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
430
+ const client = (0, executor_1.getClient)();
431
+ const result = await client.notificationsModule
432
+ .delete({
433
+ where: {
434
+ id: answers.id,
435
+ },
436
+ select: {
437
+ id: true,
438
+ },
439
+ })
440
+ .execute();
441
+ console.log(JSON.stringify(result, null, 2));
442
+ }
443
+ catch (error) {
444
+ console.error('Failed to delete record.');
445
+ if (error instanceof Error) {
446
+ console.error(error.message);
447
+ }
448
+ process.exit(1);
449
+ }
450
+ }
@@ -16,8 +16,6 @@ const fieldSchema = {
16
16
  updatedBy: 'uuid',
17
17
  isApproved: 'boolean',
18
18
  entityId: 'uuid',
19
- deleteMemberCascadeGroups: 'boolean',
20
- createGroupsCascadeMembers: 'boolean',
21
19
  };
22
20
  const usage = '\norg-membership-default <command>\n\nCommands:\n list List orgMembershipDefault records\n find-first Find first matching orgMembershipDefault record\n get Get a orgMembershipDefault by ID\n create Create a new orgMembershipDefault\n update Update an existing orgMembershipDefault\n delete Delete a orgMembershipDefault\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';
23
21
  exports.default = async (argv, prompter, _options) => {
@@ -68,8 +66,6 @@ async function handleList(argv, _prompter) {
68
66
  updatedBy: true,
69
67
  isApproved: true,
70
68
  entityId: true,
71
- deleteMemberCascadeGroups: true,
72
- createGroupsCascadeMembers: true,
73
69
  };
74
70
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
75
71
  const client = (0, executor_1.getClient)();
@@ -94,8 +90,6 @@ async function handleFindFirst(argv, _prompter) {
94
90
  updatedBy: true,
95
91
  isApproved: true,
96
92
  entityId: true,
97
- deleteMemberCascadeGroups: true,
98
- createGroupsCascadeMembers: true,
99
93
  };
100
94
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
101
95
  const client = (0, executor_1.getClient)();
@@ -132,8 +126,6 @@ async function handleGet(argv, prompter) {
132
126
  updatedBy: true,
133
127
  isApproved: true,
134
128
  entityId: true,
135
- deleteMemberCascadeGroups: true,
136
- createGroupsCascadeMembers: true,
137
129
  },
138
130
  })
139
131
  .execute();
@@ -177,20 +169,6 @@ async function handleCreate(argv, prompter) {
177
169
  message: 'entityId',
178
170
  required: true,
179
171
  },
180
- {
181
- type: 'boolean',
182
- name: 'deleteMemberCascadeGroups',
183
- message: 'deleteMemberCascadeGroups',
184
- required: false,
185
- skipPrompt: true,
186
- },
187
- {
188
- type: 'boolean',
189
- name: 'createGroupsCascadeMembers',
190
- message: 'createGroupsCascadeMembers',
191
- required: false,
192
- skipPrompt: true,
193
- },
194
172
  ]);
195
173
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
196
174
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -202,8 +180,6 @@ async function handleCreate(argv, prompter) {
202
180
  updatedBy: cleanedData.updatedBy,
203
181
  isApproved: cleanedData.isApproved,
204
182
  entityId: cleanedData.entityId,
205
- deleteMemberCascadeGroups: cleanedData.deleteMemberCascadeGroups,
206
- createGroupsCascadeMembers: cleanedData.createGroupsCascadeMembers,
207
183
  },
208
184
  select: {
209
185
  id: true,
@@ -213,8 +189,6 @@ async function handleCreate(argv, prompter) {
213
189
  updatedBy: true,
214
190
  isApproved: true,
215
191
  entityId: true,
216
- deleteMemberCascadeGroups: true,
217
- createGroupsCascadeMembers: true,
218
192
  },
219
193
  })
220
194
  .execute();
@@ -264,20 +238,6 @@ async function handleUpdate(argv, prompter) {
264
238
  message: 'entityId',
265
239
  required: false,
266
240
  },
267
- {
268
- type: 'boolean',
269
- name: 'deleteMemberCascadeGroups',
270
- message: 'deleteMemberCascadeGroups',
271
- required: false,
272
- skipPrompt: true,
273
- },
274
- {
275
- type: 'boolean',
276
- name: 'createGroupsCascadeMembers',
277
- message: 'createGroupsCascadeMembers',
278
- required: false,
279
- skipPrompt: true,
280
- },
281
241
  ]);
282
242
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
283
243
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -292,8 +252,6 @@ async function handleUpdate(argv, prompter) {
292
252
  updatedBy: cleanedData.updatedBy,
293
253
  isApproved: cleanedData.isApproved,
294
254
  entityId: cleanedData.entityId,
295
- deleteMemberCascadeGroups: cleanedData.deleteMemberCascadeGroups,
296
- createGroupsCascadeMembers: cleanedData.createGroupsCascadeMembers,
297
255
  },
298
256
  select: {
299
257
  id: true,
@@ -303,8 +261,6 @@ async function handleUpdate(argv, prompter) {
303
261
  updatedBy: true,
304
262
  isApproved: true,
305
263
  entityId: true,
306
- deleteMemberCascadeGroups: true,
307
- createGroupsCascadeMembers: true,
308
264
  },
309
265
  })
310
266
  .execute();
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for OrgMembershipSetting
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;