@constructive-sdk/cli 1.21.5 → 1.21.6

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 (165) hide show
  1. package/admin/cli/commands/provision-bucket.js +1 -1
  2. package/admin/cli/commands.js +1 -1
  3. package/admin/orm/input-types.d.ts +4 -4
  4. package/admin/orm/mutation/index.d.ts +5 -4
  5. package/agent/cli/commands/provision-bucket.js +1 -1
  6. package/agent/cli/commands.js +1 -1
  7. package/agent/orm/input-types.d.ts +4 -4
  8. package/agent/orm/mutation/index.d.ts +5 -4
  9. package/api/cli/commands/{route-binding.d.ts → create-function-from-source.d.ts} +1 -1
  10. package/api/cli/commands/create-function-from-source.js +36 -0
  11. package/api/cli/commands/{hostname-binding.d.ts → email-shared-account.d.ts} +1 -1
  12. package/api/cli/commands/email-shared-account.js +21 -0
  13. package/api/cli/commands/managed-domain.js +22 -0
  14. package/api/cli/commands/platform-managed-domain.js +22 -0
  15. package/api/cli/commands/provision-bucket.js +1 -1
  16. package/api/cli/commands/unique-constraint.js +22 -0
  17. package/{esm/api/cli/commands/route-binding.d.ts → api/cli/commands/update-function-from-source.d.ts} +1 -1
  18. package/api/cli/commands/update-function-from-source.js +36 -0
  19. package/api/cli/commands.js +7 -5
  20. package/api/cli/executor.d.ts +15 -2
  21. package/api/orm/index.d.ts +15 -4
  22. package/api/orm/index.js +0 -4
  23. package/api/orm/input-types.d.ts +96 -439
  24. package/api/orm/models/index.d.ts +0 -2
  25. package/api/orm/models/index.js +2 -6
  26. package/api/orm/mutation/index.d.ts +30 -5
  27. package/api/orm/mutation/index.js +24 -0
  28. package/api/orm/query/index.d.ts +5 -0
  29. package/api/orm/query/index.js +7 -0
  30. package/auth/cli/commands/provision-bucket.js +1 -1
  31. package/auth/cli/commands.js +1 -1
  32. package/auth/orm/input-types.d.ts +5 -29
  33. package/auth/orm/mutation/index.d.ts +5 -4
  34. package/compute/cli/commands/function-invocation.js +44 -0
  35. package/compute/cli/commands/platform-function-invocation.js +44 -0
  36. package/compute/cli/commands/provision-bucket.js +1 -1
  37. package/compute/cli/commands.js +1 -1
  38. package/compute/orm/input-types.d.ts +50 -6
  39. package/compute/orm/mutation/index.d.ts +5 -4
  40. package/config/cli/commands/provision-bucket.js +1 -1
  41. package/config/cli/commands.js +1 -1
  42. package/config/orm/input-types.d.ts +4 -4
  43. package/config/orm/mutation/index.d.ts +5 -4
  44. package/esm/admin/cli/commands/provision-bucket.js +1 -1
  45. package/esm/admin/cli/commands.js +1 -1
  46. package/esm/admin/orm/input-types.d.ts +4 -4
  47. package/esm/admin/orm/mutation/index.d.ts +5 -4
  48. package/esm/agent/cli/commands/provision-bucket.js +1 -1
  49. package/esm/agent/cli/commands.js +1 -1
  50. package/esm/agent/orm/input-types.d.ts +4 -4
  51. package/esm/agent/orm/mutation/index.d.ts +5 -4
  52. package/esm/api/cli/commands/create-function-from-source.d.ts +8 -0
  53. package/esm/api/cli/commands/create-function-from-source.js +34 -0
  54. package/esm/api/cli/commands/{hostname-binding.d.ts → email-shared-account.d.ts} +1 -1
  55. package/esm/api/cli/commands/email-shared-account.js +19 -0
  56. package/esm/api/cli/commands/managed-domain.js +22 -0
  57. package/esm/api/cli/commands/platform-managed-domain.js +22 -0
  58. package/esm/api/cli/commands/provision-bucket.js +1 -1
  59. package/esm/api/cli/commands/unique-constraint.js +22 -0
  60. package/esm/api/cli/commands/update-function-from-source.d.ts +8 -0
  61. package/esm/api/cli/commands/update-function-from-source.js +34 -0
  62. package/esm/api/cli/commands.js +7 -5
  63. package/esm/api/cli/executor.d.ts +15 -2
  64. package/esm/api/orm/index.d.ts +15 -4
  65. package/esm/api/orm/index.js +0 -4
  66. package/esm/api/orm/input-types.d.ts +96 -439
  67. package/esm/api/orm/models/index.d.ts +0 -2
  68. package/esm/api/orm/models/index.js +0 -2
  69. package/esm/api/orm/mutation/index.d.ts +30 -5
  70. package/esm/api/orm/mutation/index.js +24 -0
  71. package/esm/api/orm/query/index.d.ts +5 -0
  72. package/esm/api/orm/query/index.js +7 -0
  73. package/esm/auth/cli/commands/provision-bucket.js +1 -1
  74. package/esm/auth/cli/commands.js +1 -1
  75. package/esm/auth/orm/input-types.d.ts +5 -29
  76. package/esm/auth/orm/mutation/index.d.ts +5 -4
  77. package/esm/compute/cli/commands/function-invocation.js +44 -0
  78. package/esm/compute/cli/commands/platform-function-invocation.js +44 -0
  79. package/esm/compute/cli/commands/provision-bucket.js +1 -1
  80. package/esm/compute/cli/commands.js +1 -1
  81. package/esm/compute/orm/input-types.d.ts +50 -6
  82. package/esm/compute/orm/mutation/index.d.ts +5 -4
  83. package/esm/config/cli/commands/provision-bucket.js +1 -1
  84. package/esm/config/cli/commands.js +1 -1
  85. package/esm/config/orm/input-types.d.ts +4 -4
  86. package/esm/config/orm/mutation/index.d.ts +5 -4
  87. package/esm/infra/cli/commands/provision-bucket.js +1 -1
  88. package/esm/infra/cli/commands.js +1 -1
  89. package/esm/infra/orm/input-types.d.ts +4 -4
  90. package/esm/infra/orm/mutation/index.d.ts +5 -4
  91. package/esm/modules/cli/commands/billing-provider-module.js +110 -0
  92. package/esm/modules/cli/commands/blueprint-construction.js +0 -22
  93. package/esm/modules/cli/commands/catalog-module.js +44 -0
  94. package/esm/modules/cli/commands/construct-blueprint.js +1 -1
  95. package/esm/modules/cli/commands/provision-bucket.js +1 -1
  96. package/esm/modules/cli/commands/storage-module.js +22 -0
  97. package/esm/modules/cli/commands.js +1 -1
  98. package/esm/modules/orm/input-types.d.ts +72 -21
  99. package/esm/modules/orm/mutation/index.d.ts +6 -5
  100. package/esm/objects/cli/commands/provision-bucket.js +1 -1
  101. package/esm/objects/cli/commands.js +1 -1
  102. package/esm/objects/orm/input-types.d.ts +4 -4
  103. package/esm/objects/orm/mutation/index.d.ts +5 -4
  104. package/esm/remote/cli/commands/provision-bucket.js +1 -1
  105. package/esm/remote/cli/commands.js +1 -1
  106. package/esm/remote/orm/input-types.d.ts +4 -4
  107. package/esm/remote/orm/mutation/index.d.ts +5 -4
  108. package/esm/storage/cli/commands/bucket.js +23 -0
  109. package/esm/storage/cli/commands/platform-bucket.js +23 -0
  110. package/esm/storage/cli/commands/provision-bucket.js +1 -1
  111. package/esm/storage/cli/commands/upload-files.js +1 -1
  112. package/esm/storage/cli/commands/upload-platform-files.js +1 -1
  113. package/esm/storage/cli/commands.js +1 -1
  114. package/esm/storage/orm/input-types.d.ts +34 -6
  115. package/esm/storage/orm/mutation/index.d.ts +7 -6
  116. package/esm/usage/cli/commands/provision-bucket.js +1 -1
  117. package/esm/usage/cli/commands.js +1 -1
  118. package/esm/usage/orm/input-types.d.ts +4 -4
  119. package/esm/usage/orm/mutation/index.d.ts +5 -4
  120. package/infra/cli/commands/provision-bucket.js +1 -1
  121. package/infra/cli/commands.js +1 -1
  122. package/infra/orm/input-types.d.ts +4 -4
  123. package/infra/orm/mutation/index.d.ts +5 -4
  124. package/modules/cli/commands/billing-provider-module.js +110 -0
  125. package/modules/cli/commands/blueprint-construction.js +0 -22
  126. package/modules/cli/commands/catalog-module.js +44 -0
  127. package/modules/cli/commands/construct-blueprint.js +1 -1
  128. package/modules/cli/commands/provision-bucket.js +1 -1
  129. package/modules/cli/commands/storage-module.js +22 -0
  130. package/modules/cli/commands.js +1 -1
  131. package/modules/orm/input-types.d.ts +72 -21
  132. package/modules/orm/mutation/index.d.ts +6 -5
  133. package/objects/cli/commands/provision-bucket.js +1 -1
  134. package/objects/cli/commands.js +1 -1
  135. package/objects/orm/input-types.d.ts +4 -4
  136. package/objects/orm/mutation/index.d.ts +5 -4
  137. package/package.json +2 -2
  138. package/remote/cli/commands/provision-bucket.js +1 -1
  139. package/remote/cli/commands.js +1 -1
  140. package/remote/orm/input-types.d.ts +4 -4
  141. package/remote/orm/mutation/index.d.ts +5 -4
  142. package/storage/cli/commands/bucket.js +23 -0
  143. package/storage/cli/commands/platform-bucket.js +23 -0
  144. package/storage/cli/commands/provision-bucket.js +1 -1
  145. package/storage/cli/commands/upload-files.js +1 -1
  146. package/storage/cli/commands/upload-platform-files.js +1 -1
  147. package/storage/cli/commands.js +1 -1
  148. package/storage/orm/input-types.d.ts +34 -6
  149. package/storage/orm/mutation/index.d.ts +7 -6
  150. package/usage/cli/commands/provision-bucket.js +1 -1
  151. package/usage/cli/commands.js +1 -1
  152. package/usage/orm/input-types.d.ts +4 -4
  153. package/usage/orm/mutation/index.d.ts +5 -4
  154. package/api/cli/commands/hostname-binding.js +0 -388
  155. package/api/cli/commands/route-binding.js +0 -476
  156. package/api/orm/models/hostnameBinding.d.ts +0 -54
  157. package/api/orm/models/hostnameBinding.js +0 -104
  158. package/api/orm/models/routeBinding.d.ts +0 -54
  159. package/api/orm/models/routeBinding.js +0 -104
  160. package/esm/api/cli/commands/hostname-binding.js +0 -386
  161. package/esm/api/cli/commands/route-binding.js +0 -474
  162. package/esm/api/orm/models/hostnameBinding.d.ts +0 -54
  163. package/esm/api/orm/models/hostnameBinding.js +0 -100
  164. package/esm/api/orm/models/routeBinding.d.ts +0 -54
  165. package/esm/api/orm/models/routeBinding.js +0 -100
@@ -1,476 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * CLI commands for RouteBinding
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
- domainId: 'uuid',
13
- id: 'uuid',
14
- isActive: 'boolean',
15
- method: 'string',
16
- path: 'string',
17
- priority: 'int',
18
- servingSiteId: 'uuid',
19
- targetApiId: 'uuid',
20
- targetBucketId: 'uuid',
21
- targetFunctionId: 'uuid',
22
- targetRedirectId: 'uuid',
23
- targetServiceId: 'uuid',
24
- targetSiteId: 'uuid',
25
- updatedAt: 'string',
26
- };
27
- const usage = '\nroute-binding <command>\n\nCommands:\n list List routeBinding records\n find-first Find first matching routeBinding record\n get Get a routeBinding by ID\n create Create a new routeBinding\n update Update an existing routeBinding\n delete Delete a routeBinding\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';
28
- exports.default = async (argv, prompter, _options) => {
29
- if (argv.help || argv.h) {
30
- console.log(usage);
31
- process.exit(0);
32
- }
33
- const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
34
- if (!subcommand) {
35
- const answer = await prompter.prompt(argv, [
36
- {
37
- type: 'autocomplete',
38
- name: 'subcommand',
39
- message: 'What do you want to do?',
40
- options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
41
- },
42
- ]);
43
- return handleTableSubcommand(answer.subcommand, newArgv, prompter);
44
- }
45
- return handleTableSubcommand(subcommand, newArgv, prompter);
46
- };
47
- async function handleTableSubcommand(subcommand, argv, prompter) {
48
- switch (subcommand) {
49
- case 'list':
50
- return handleList(argv, prompter);
51
- case 'find-first':
52
- return handleFindFirst(argv, prompter);
53
- case 'get':
54
- return handleGet(argv, prompter);
55
- case 'create':
56
- return handleCreate(argv, prompter);
57
- case 'update':
58
- return handleUpdate(argv, prompter);
59
- case 'delete':
60
- return handleDelete(argv, prompter);
61
- default:
62
- console.log(usage);
63
- process.exit(1);
64
- }
65
- }
66
- async function handleList(argv, _prompter) {
67
- try {
68
- const defaultSelect = {
69
- domainId: true,
70
- id: true,
71
- isActive: true,
72
- method: true,
73
- path: true,
74
- priority: true,
75
- servingSiteId: true,
76
- targetApiId: true,
77
- targetBucketId: true,
78
- targetFunctionId: true,
79
- targetRedirectId: true,
80
- targetServiceId: true,
81
- targetSiteId: true,
82
- updatedAt: true,
83
- };
84
- const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
85
- const client = (0, executor_1.getClient)();
86
- const result = await client.routeBinding.findMany(findManyArgs).execute();
87
- console.log(JSON.stringify(result, null, 2));
88
- }
89
- catch (error) {
90
- console.error('Failed to list records.');
91
- if (error instanceof Error) {
92
- console.error(error.message);
93
- }
94
- process.exit(1);
95
- }
96
- }
97
- async function handleFindFirst(argv, _prompter) {
98
- try {
99
- const defaultSelect = {
100
- domainId: true,
101
- id: true,
102
- isActive: true,
103
- method: true,
104
- path: true,
105
- priority: true,
106
- servingSiteId: true,
107
- targetApiId: true,
108
- targetBucketId: true,
109
- targetFunctionId: true,
110
- targetRedirectId: true,
111
- targetServiceId: true,
112
- targetSiteId: true,
113
- updatedAt: true,
114
- };
115
- const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
116
- const client = (0, executor_1.getClient)();
117
- const result = await client.routeBinding.findFirst(findFirstArgs).execute();
118
- console.log(JSON.stringify(result, null, 2));
119
- }
120
- catch (error) {
121
- console.error('Failed to find record.');
122
- if (error instanceof Error) {
123
- console.error(error.message);
124
- }
125
- process.exit(1);
126
- }
127
- }
128
- async function handleGet(argv, prompter) {
129
- try {
130
- const answers = await prompter.prompt(argv, [
131
- {
132
- type: 'text',
133
- name: 'id',
134
- message: 'id',
135
- required: true,
136
- },
137
- ]);
138
- const client = (0, executor_1.getClient)();
139
- const result = await client.routeBinding
140
- .findOne({
141
- id: answers.id,
142
- select: {
143
- domainId: true,
144
- id: true,
145
- isActive: true,
146
- method: true,
147
- path: true,
148
- priority: true,
149
- servingSiteId: true,
150
- targetApiId: true,
151
- targetBucketId: true,
152
- targetFunctionId: true,
153
- targetRedirectId: true,
154
- targetServiceId: true,
155
- targetSiteId: true,
156
- updatedAt: true,
157
- },
158
- })
159
- .execute();
160
- console.log(JSON.stringify(result, null, 2));
161
- }
162
- catch (error) {
163
- console.error('Record not found.');
164
- if (error instanceof Error) {
165
- console.error(error.message);
166
- }
167
- process.exit(1);
168
- }
169
- }
170
- async function handleCreate(argv, prompter) {
171
- try {
172
- const rawAnswers = await prompter.prompt(argv, [
173
- {
174
- type: 'text',
175
- name: 'domainId',
176
- message: 'domainId',
177
- required: true,
178
- },
179
- {
180
- type: 'boolean',
181
- name: 'isActive',
182
- message: 'isActive',
183
- required: false,
184
- skipPrompt: true,
185
- },
186
- {
187
- type: 'text',
188
- name: 'method',
189
- message: 'method',
190
- required: false,
191
- skipPrompt: true,
192
- },
193
- {
194
- type: 'text',
195
- name: 'path',
196
- message: 'path',
197
- required: true,
198
- },
199
- {
200
- type: 'text',
201
- name: 'priority',
202
- message: 'priority',
203
- required: false,
204
- skipPrompt: true,
205
- },
206
- {
207
- type: 'text',
208
- name: 'servingSiteId',
209
- message: 'servingSiteId',
210
- required: false,
211
- skipPrompt: true,
212
- },
213
- {
214
- type: 'text',
215
- name: 'targetApiId',
216
- message: 'targetApiId',
217
- required: false,
218
- skipPrompt: true,
219
- },
220
- {
221
- type: 'text',
222
- name: 'targetBucketId',
223
- message: 'targetBucketId',
224
- required: false,
225
- skipPrompt: true,
226
- },
227
- {
228
- type: 'text',
229
- name: 'targetFunctionId',
230
- message: 'targetFunctionId',
231
- required: false,
232
- skipPrompt: true,
233
- },
234
- {
235
- type: 'text',
236
- name: 'targetRedirectId',
237
- message: 'targetRedirectId',
238
- required: false,
239
- skipPrompt: true,
240
- },
241
- {
242
- type: 'text',
243
- name: 'targetServiceId',
244
- message: 'targetServiceId',
245
- required: false,
246
- skipPrompt: true,
247
- },
248
- {
249
- type: 'text',
250
- name: 'targetSiteId',
251
- message: 'targetSiteId',
252
- required: false,
253
- skipPrompt: true,
254
- },
255
- ]);
256
- const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
257
- const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
258
- const client = (0, executor_1.getClient)();
259
- const result = await client.routeBinding
260
- .create({
261
- data: {
262
- domainId: cleanedData.domainId,
263
- isActive: cleanedData.isActive,
264
- method: cleanedData.method,
265
- path: cleanedData.path,
266
- priority: cleanedData.priority,
267
- servingSiteId: cleanedData.servingSiteId,
268
- targetApiId: cleanedData.targetApiId,
269
- targetBucketId: cleanedData.targetBucketId,
270
- targetFunctionId: cleanedData.targetFunctionId,
271
- targetRedirectId: cleanedData.targetRedirectId,
272
- targetServiceId: cleanedData.targetServiceId,
273
- targetSiteId: cleanedData.targetSiteId,
274
- },
275
- select: {
276
- domainId: true,
277
- id: true,
278
- isActive: true,
279
- method: true,
280
- path: true,
281
- priority: true,
282
- servingSiteId: true,
283
- targetApiId: true,
284
- targetBucketId: true,
285
- targetFunctionId: true,
286
- targetRedirectId: true,
287
- targetServiceId: true,
288
- targetSiteId: true,
289
- updatedAt: true,
290
- },
291
- })
292
- .execute();
293
- console.log(JSON.stringify(result, null, 2));
294
- }
295
- catch (error) {
296
- console.error('Failed to create record.');
297
- if (error instanceof Error) {
298
- console.error(error.message);
299
- }
300
- process.exit(1);
301
- }
302
- }
303
- async function handleUpdate(argv, prompter) {
304
- try {
305
- const rawAnswers = await prompter.prompt(argv, [
306
- {
307
- type: 'text',
308
- name: 'id',
309
- message: 'id',
310
- required: true,
311
- },
312
- {
313
- type: 'text',
314
- name: 'domainId',
315
- message: 'domainId',
316
- required: false,
317
- },
318
- {
319
- type: 'boolean',
320
- name: 'isActive',
321
- message: 'isActive',
322
- required: false,
323
- skipPrompt: true,
324
- },
325
- {
326
- type: 'text',
327
- name: 'method',
328
- message: 'method',
329
- required: false,
330
- skipPrompt: true,
331
- },
332
- {
333
- type: 'text',
334
- name: 'path',
335
- message: 'path',
336
- required: false,
337
- },
338
- {
339
- type: 'text',
340
- name: 'priority',
341
- message: 'priority',
342
- required: false,
343
- skipPrompt: true,
344
- },
345
- {
346
- type: 'text',
347
- name: 'servingSiteId',
348
- message: 'servingSiteId',
349
- required: false,
350
- skipPrompt: true,
351
- },
352
- {
353
- type: 'text',
354
- name: 'targetApiId',
355
- message: 'targetApiId',
356
- required: false,
357
- skipPrompt: true,
358
- },
359
- {
360
- type: 'text',
361
- name: 'targetBucketId',
362
- message: 'targetBucketId',
363
- required: false,
364
- skipPrompt: true,
365
- },
366
- {
367
- type: 'text',
368
- name: 'targetFunctionId',
369
- message: 'targetFunctionId',
370
- required: false,
371
- skipPrompt: true,
372
- },
373
- {
374
- type: 'text',
375
- name: 'targetRedirectId',
376
- message: 'targetRedirectId',
377
- required: false,
378
- skipPrompt: true,
379
- },
380
- {
381
- type: 'text',
382
- name: 'targetServiceId',
383
- message: 'targetServiceId',
384
- required: false,
385
- skipPrompt: true,
386
- },
387
- {
388
- type: 'text',
389
- name: 'targetSiteId',
390
- message: 'targetSiteId',
391
- required: false,
392
- skipPrompt: true,
393
- },
394
- ]);
395
- const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
396
- const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
397
- const client = (0, executor_1.getClient)();
398
- const result = await client.routeBinding
399
- .update({
400
- where: {
401
- id: answers.id,
402
- },
403
- data: {
404
- domainId: cleanedData.domainId,
405
- isActive: cleanedData.isActive,
406
- method: cleanedData.method,
407
- path: cleanedData.path,
408
- priority: cleanedData.priority,
409
- servingSiteId: cleanedData.servingSiteId,
410
- targetApiId: cleanedData.targetApiId,
411
- targetBucketId: cleanedData.targetBucketId,
412
- targetFunctionId: cleanedData.targetFunctionId,
413
- targetRedirectId: cleanedData.targetRedirectId,
414
- targetServiceId: cleanedData.targetServiceId,
415
- targetSiteId: cleanedData.targetSiteId,
416
- },
417
- select: {
418
- domainId: true,
419
- id: true,
420
- isActive: true,
421
- method: true,
422
- path: true,
423
- priority: true,
424
- servingSiteId: true,
425
- targetApiId: true,
426
- targetBucketId: true,
427
- targetFunctionId: true,
428
- targetRedirectId: true,
429
- targetServiceId: true,
430
- targetSiteId: true,
431
- updatedAt: true,
432
- },
433
- })
434
- .execute();
435
- console.log(JSON.stringify(result, null, 2));
436
- }
437
- catch (error) {
438
- console.error('Failed to update record.');
439
- if (error instanceof Error) {
440
- console.error(error.message);
441
- }
442
- process.exit(1);
443
- }
444
- }
445
- async function handleDelete(argv, prompter) {
446
- try {
447
- const rawAnswers = await prompter.prompt(argv, [
448
- {
449
- type: 'text',
450
- name: 'id',
451
- message: 'id',
452
- required: true,
453
- },
454
- ]);
455
- const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
456
- const client = (0, executor_1.getClient)();
457
- const result = await client.routeBinding
458
- .delete({
459
- where: {
460
- id: answers.id,
461
- },
462
- select: {
463
- id: true,
464
- },
465
- })
466
- .execute();
467
- console.log(JSON.stringify(result, null, 2));
468
- }
469
- catch (error) {
470
- console.error('Failed to delete record.');
471
- if (error instanceof Error) {
472
- console.error(error.message);
473
- }
474
- process.exit(1);
475
- }
476
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * HostnameBinding model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { HostnameBindingWithRelations, HostnameBindingSelect, HostnameBindingFilter, HostnameBindingOrderBy, CreateHostnameBindingInput, HostnameBindingPatch } from '../input-types';
10
- export declare class HostnameBindingModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends HostnameBindingSelect>(args: FindManyArgs<S, HostnameBindingFilter, HostnameBindingOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
16
- hostnameBindings: ConnectionResult<InferSelectResult<HostnameBindingWithRelations, S>>;
17
- }>;
18
- findFirst<S extends HostnameBindingSelect>(args: FindFirstArgs<S, HostnameBindingFilter, HostnameBindingOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
21
- hostnameBinding: InferSelectResult<HostnameBindingWithRelations, S> | null;
22
- }>;
23
- findOne<S extends HostnameBindingSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
27
- hostnameBinding: InferSelectResult<HostnameBindingWithRelations, S> | null;
28
- }>;
29
- create<S extends HostnameBindingSelect>(args: CreateArgs<S, CreateHostnameBindingInput['hostnameBinding']> & {
30
- select: S;
31
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
32
- createHostnameBinding: {
33
- hostnameBinding: InferSelectResult<HostnameBindingWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends HostnameBindingSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, HostnameBindingPatch> & {
39
- select: S;
40
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
41
- updateHostnameBinding: {
42
- hostnameBinding: InferSelectResult<HostnameBindingWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends HostnameBindingSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, HostnameBindingSelect>): QueryBuilder<{
50
- deleteHostnameBinding: {
51
- hostnameBinding: InferSelectResult<HostnameBindingWithRelations, S>;
52
- };
53
- }>;
54
- }
@@ -1,104 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HostnameBindingModel = void 0;
4
- const query_builder_1 = require("../query-builder");
5
- const input_types_1 = require("../input-types");
6
- class HostnameBindingModel {
7
- client;
8
- constructor(client) {
9
- this.client = client;
10
- }
11
- findMany(args) {
12
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('HostnameBinding', 'hostnameBindings', args.select, {
13
- where: args?.where,
14
- orderBy: args?.orderBy,
15
- first: args?.first,
16
- last: args?.last,
17
- after: args?.after,
18
- before: args?.before,
19
- offset: args?.offset,
20
- }, 'HostnameBindingFilter', 'HostnameBindingOrderBy', input_types_1.connectionFieldsMap);
21
- return new query_builder_1.QueryBuilder({
22
- client: this.client,
23
- operation: 'query',
24
- operationName: 'HostnameBinding',
25
- fieldName: 'hostnameBindings',
26
- document,
27
- variables,
28
- });
29
- }
30
- findFirst(args) {
31
- const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('HostnameBinding', 'hostnameBindings', args.select, {
32
- where: args?.where,
33
- orderBy: args?.orderBy,
34
- }, 'HostnameBindingFilter', 'HostnameBindingOrderBy', input_types_1.connectionFieldsMap);
35
- return new query_builder_1.QueryBuilder({
36
- client: this.client,
37
- operation: 'query',
38
- operationName: 'HostnameBinding',
39
- fieldName: 'hostnameBinding',
40
- document,
41
- variables,
42
- transform: (data) => ({
43
- hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null,
44
- }),
45
- });
46
- }
47
- findOne(args) {
48
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('HostnameBinding', 'hostnameBindings', args.select, {
49
- where: {
50
- id: {
51
- equalTo: args.id,
52
- },
53
- },
54
- first: 1,
55
- }, 'HostnameBindingFilter', 'HostnameBindingOrderBy', input_types_1.connectionFieldsMap);
56
- return new query_builder_1.QueryBuilder({
57
- client: this.client,
58
- operation: 'query',
59
- operationName: 'HostnameBinding',
60
- fieldName: 'hostnameBinding',
61
- document,
62
- variables,
63
- transform: (data) => ({
64
- hostnameBinding: data.hostnameBindings?.nodes?.[0] ?? null,
65
- }),
66
- });
67
- }
68
- create(args) {
69
- const { document, variables } = (0, query_builder_1.buildCreateDocument)('HostnameBinding', 'createHostnameBinding', 'hostnameBinding', args.select, args.data, 'CreateHostnameBindingInput', input_types_1.connectionFieldsMap);
70
- return new query_builder_1.QueryBuilder({
71
- client: this.client,
72
- operation: 'mutation',
73
- operationName: 'HostnameBinding',
74
- fieldName: 'createHostnameBinding',
75
- document,
76
- variables,
77
- });
78
- }
79
- update(args) {
80
- const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('HostnameBinding', 'updateHostnameBinding', 'hostnameBinding', args.select, args.where.id, args.data, 'UpdateHostnameBindingInput', 'id', 'hostnameBindingPatch', input_types_1.connectionFieldsMap, undefined);
81
- return new query_builder_1.QueryBuilder({
82
- client: this.client,
83
- operation: 'mutation',
84
- operationName: 'HostnameBinding',
85
- fieldName: 'updateHostnameBinding',
86
- document,
87
- variables,
88
- });
89
- }
90
- delete(args) {
91
- const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('HostnameBinding', 'deleteHostnameBinding', 'hostnameBinding', {
92
- id: args.where.id,
93
- }, 'DeleteHostnameBindingInput', args.select, input_types_1.connectionFieldsMap);
94
- return new query_builder_1.QueryBuilder({
95
- client: this.client,
96
- operation: 'mutation',
97
- operationName: 'HostnameBinding',
98
- fieldName: 'deleteHostnameBinding',
99
- document,
100
- variables,
101
- });
102
- }
103
- }
104
- exports.HostnameBindingModel = HostnameBindingModel;
@@ -1,54 +0,0 @@
1
- /**
2
- * RouteBinding model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { RouteBindingWithRelations, RouteBindingSelect, RouteBindingFilter, RouteBindingOrderBy, CreateRouteBindingInput, RouteBindingPatch } from '../input-types';
10
- export declare class RouteBindingModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends RouteBindingSelect>(args: FindManyArgs<S, RouteBindingFilter, RouteBindingOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
16
- routeBindings: ConnectionResult<InferSelectResult<RouteBindingWithRelations, S>>;
17
- }>;
18
- findFirst<S extends RouteBindingSelect>(args: FindFirstArgs<S, RouteBindingFilter, RouteBindingOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
21
- routeBinding: InferSelectResult<RouteBindingWithRelations, S> | null;
22
- }>;
23
- findOne<S extends RouteBindingSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
27
- routeBinding: InferSelectResult<RouteBindingWithRelations, S> | null;
28
- }>;
29
- create<S extends RouteBindingSelect>(args: CreateArgs<S, CreateRouteBindingInput['routeBinding']> & {
30
- select: S;
31
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
32
- createRouteBinding: {
33
- routeBinding: InferSelectResult<RouteBindingWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends RouteBindingSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, RouteBindingPatch> & {
39
- select: S;
40
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
41
- updateRouteBinding: {
42
- routeBinding: InferSelectResult<RouteBindingWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends RouteBindingSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, RouteBindingSelect>): QueryBuilder<{
50
- deleteRouteBinding: {
51
- routeBinding: InferSelectResult<RouteBindingWithRelations, S>;
52
- };
53
- }>;
54
- }