@constructive-sdk/cli 1.9.2 → 1.9.3

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 (99) hide show
  1. package/{api/cli/commands/platform-api-module.d.ts → admin/cli/commands/org-chart-edge-grant.d.ts} +1 -1
  2. package/{api/cli/commands/platform-api-module.js → admin/cli/commands/org-chart-edge-grant.js} +137 -53
  3. package/{esm/api/cli/commands/platform-api-module.d.ts → admin/cli/commands/org-chart-edge.d.ts} +1 -1
  4. package/{api/cli/commands/api-module.js → admin/cli/commands/org-chart-edge.js} +86 -60
  5. package/admin/cli/commands/org-get-managers-record.d.ts +8 -0
  6. package/admin/cli/commands/org-get-managers-record.js +126 -0
  7. package/admin/cli/commands/org-get-subordinates-record.d.ts +8 -0
  8. package/admin/cli/commands/org-get-subordinates-record.js +126 -0
  9. package/admin/cli/commands/org-is-manager-of.d.ts +8 -0
  10. package/admin/cli/commands/org-is-manager-of.js +45 -0
  11. package/admin/cli/commands.js +11 -1
  12. package/admin/cli/executor.d.ts +9 -0
  13. package/admin/orm/index.d.ts +13 -0
  14. package/admin/orm/index.js +8 -0
  15. package/admin/orm/input-types.d.ts +399 -0
  16. package/admin/orm/models/index.d.ts +4 -0
  17. package/admin/orm/models/index.js +9 -1
  18. package/admin/orm/models/orgChartEdge.d.ts +54 -0
  19. package/admin/orm/models/orgChartEdge.js +104 -0
  20. package/admin/orm/models/orgChartEdgeGrant.d.ts +54 -0
  21. package/{api/orm/models/platformApiModule.js → admin/orm/models/orgChartEdgeGrant.js} +27 -27
  22. package/admin/orm/models/orgGetManagersRecord.d.ts +30 -0
  23. package/admin/orm/models/orgGetManagersRecord.js +59 -0
  24. package/admin/orm/models/orgGetSubordinatesRecord.d.ts +30 -0
  25. package/admin/orm/models/orgGetSubordinatesRecord.js +59 -0
  26. package/admin/orm/query/index.d.ts +11 -0
  27. package/admin/orm/query/index.js +24 -0
  28. package/api/cli/commands/{api-module.d.ts → domain-type.d.ts} +1 -1
  29. package/api/cli/commands/domain-type.js +466 -0
  30. package/api/cli/commands/table.js +22 -0
  31. package/api/cli/commands.js +3 -5
  32. package/api/cli/executor.d.ts +1 -2
  33. package/api/orm/index.d.ts +2 -4
  34. package/api/orm/index.js +2 -4
  35. package/api/orm/input-types.d.ts +378 -468
  36. package/api/orm/input-types.js +2 -2
  37. package/api/orm/models/domainType.d.ts +54 -0
  38. package/api/orm/models/{apiModule.js → domainType.js} +27 -27
  39. package/api/orm/models/index.d.ts +1 -2
  40. package/api/orm/models/index.js +4 -6
  41. package/compute/cli/commands/function-api-binding.js +12 -0
  42. package/compute/cli/commands/platform-function-api-binding.js +12 -0
  43. package/compute/cli/commands/platform-function-invocation.js +22 -0
  44. package/compute/orm/input-types.d.ts +42 -3
  45. package/esm/admin/cli/commands/org-chart-edge-grant.d.ts +8 -0
  46. package/esm/{api/cli/commands/platform-api-module.js → admin/cli/commands/org-chart-edge-grant.js} +137 -53
  47. package/esm/admin/cli/commands/org-chart-edge.d.ts +8 -0
  48. package/esm/{api/cli/commands/api-module.js → admin/cli/commands/org-chart-edge.js} +86 -60
  49. package/esm/admin/cli/commands/org-get-managers-record.d.ts +8 -0
  50. package/esm/admin/cli/commands/org-get-managers-record.js +124 -0
  51. package/esm/admin/cli/commands/org-get-subordinates-record.d.ts +8 -0
  52. package/esm/admin/cli/commands/org-get-subordinates-record.js +124 -0
  53. package/esm/admin/cli/commands/org-is-manager-of.d.ts +8 -0
  54. package/esm/admin/cli/commands/org-is-manager-of.js +43 -0
  55. package/esm/admin/cli/commands.js +11 -1
  56. package/esm/admin/cli/executor.d.ts +9 -0
  57. package/esm/admin/orm/index.d.ts +13 -0
  58. package/esm/admin/orm/index.js +8 -0
  59. package/esm/admin/orm/input-types.d.ts +399 -0
  60. package/esm/admin/orm/models/index.d.ts +4 -0
  61. package/esm/admin/orm/models/index.js +4 -0
  62. package/esm/admin/orm/models/orgChartEdge.d.ts +54 -0
  63. package/esm/admin/orm/models/orgChartEdge.js +100 -0
  64. package/esm/admin/orm/models/orgChartEdgeGrant.d.ts +54 -0
  65. package/esm/{api/orm/models/platformApiModule.js → admin/orm/models/orgChartEdgeGrant.js} +25 -25
  66. package/esm/admin/orm/models/orgGetManagersRecord.d.ts +30 -0
  67. package/esm/admin/orm/models/orgGetManagersRecord.js +55 -0
  68. package/esm/admin/orm/models/orgGetSubordinatesRecord.d.ts +30 -0
  69. package/esm/admin/orm/models/orgGetSubordinatesRecord.js +55 -0
  70. package/esm/admin/orm/query/index.d.ts +11 -0
  71. package/esm/admin/orm/query/index.js +24 -0
  72. package/esm/api/cli/commands/{api-module.d.ts → domain-type.d.ts} +1 -1
  73. package/esm/api/cli/commands/domain-type.js +464 -0
  74. package/esm/api/cli/commands/table.js +22 -0
  75. package/esm/api/cli/commands.js +3 -5
  76. package/esm/api/cli/executor.d.ts +1 -2
  77. package/esm/api/orm/index.d.ts +2 -4
  78. package/esm/api/orm/index.js +2 -4
  79. package/esm/api/orm/input-types.d.ts +378 -468
  80. package/esm/api/orm/input-types.js +2 -2
  81. package/esm/api/orm/models/domainType.d.ts +54 -0
  82. package/esm/api/orm/models/{apiModule.js → domainType.js} +25 -25
  83. package/esm/api/orm/models/index.d.ts +1 -2
  84. package/esm/api/orm/models/index.js +1 -2
  85. package/esm/compute/cli/commands/function-api-binding.js +12 -0
  86. package/esm/compute/cli/commands/platform-function-api-binding.js +12 -0
  87. package/esm/compute/cli/commands/platform-function-invocation.js +22 -0
  88. package/esm/compute/orm/input-types.d.ts +42 -3
  89. package/esm/modules/cli/commands/api-surface-module.js +0 -44
  90. package/esm/modules/cli/commands/billing-module.js +22 -0
  91. package/esm/modules/orm/input-types.d.ts +9 -16
  92. package/modules/cli/commands/api-surface-module.js +0 -44
  93. package/modules/cli/commands/billing-module.js +22 -0
  94. package/modules/orm/input-types.d.ts +9 -16
  95. package/package.json +5 -5
  96. package/api/orm/models/apiModule.d.ts +0 -54
  97. package/api/orm/models/platformApiModule.d.ts +0 -54
  98. package/esm/api/orm/models/apiModule.d.ts +0 -54
  99. package/esm/api/orm/models/platformApiModule.d.ts +0 -54
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CLI commands for PlatformApiModule
2
+ * CLI commands for OrgChartEdgeGrant
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /**
4
- * CLI commands for PlatformApiModule
4
+ * CLI commands for OrgChartEdgeGrant
5
5
  * @generated by @constructive-io/graphql-codegen
6
6
  * DO NOT EDIT - changes will be overwritten
7
7
  */
@@ -9,14 +9,17 @@ const inquirerer_1 = require("inquirerer");
9
9
  const executor_1 = require("../executor");
10
10
  const utils_1 = require("../utils");
11
11
  const fieldSchema = {
12
- apiId: 'uuid',
12
+ childId: 'uuid',
13
13
  createdAt: 'string',
14
- data: 'json',
14
+ entityId: 'uuid',
15
+ grantorId: 'uuid',
15
16
  id: 'uuid',
16
- name: 'string',
17
- updatedAt: 'string',
17
+ isGrant: 'boolean',
18
+ parentId: 'uuid',
19
+ positionLevel: 'int',
20
+ positionTitle: 'string',
18
21
  };
19
- const usage = '\nplatform-api-module <command>\n\nCommands:\n list List platformApiModule records\n find-first Find first matching platformApiModule record\n get Get a platformApiModule by ID\n create Create a new platformApiModule\n update Update an existing platformApiModule\n delete Delete a platformApiModule\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';
22
+ const usage = '\norg-chart-edge-grant <command>\n\nCommands:\n list List orgChartEdgeGrant records\n find-first Find first matching orgChartEdgeGrant record\n get Get a orgChartEdgeGrant by ID\n create Create a new orgChartEdgeGrant\n update Update an existing orgChartEdgeGrant\n delete Delete a orgChartEdgeGrant\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';
20
23
  exports.default = async (argv, prompter, _options) => {
21
24
  if (argv.help || argv.h) {
22
25
  console.log(usage);
@@ -58,16 +61,19 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
58
61
  async function handleList(argv, _prompter) {
59
62
  try {
60
63
  const defaultSelect = {
61
- apiId: true,
64
+ childId: true,
62
65
  createdAt: true,
63
- data: true,
66
+ entityId: true,
67
+ grantorId: true,
64
68
  id: true,
65
- name: true,
66
- updatedAt: true,
69
+ isGrant: true,
70
+ parentId: true,
71
+ positionLevel: true,
72
+ positionTitle: true,
67
73
  };
68
74
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
69
75
  const client = (0, executor_1.getClient)();
70
- const result = await client.platformApiModule.findMany(findManyArgs).execute();
76
+ const result = await client.orgChartEdgeGrant.findMany(findManyArgs).execute();
71
77
  console.log(JSON.stringify(result, null, 2));
72
78
  }
73
79
  catch (error) {
@@ -81,16 +87,19 @@ async function handleList(argv, _prompter) {
81
87
  async function handleFindFirst(argv, _prompter) {
82
88
  try {
83
89
  const defaultSelect = {
84
- apiId: true,
90
+ childId: true,
85
91
  createdAt: true,
86
- data: true,
92
+ entityId: true,
93
+ grantorId: true,
87
94
  id: true,
88
- name: true,
89
- updatedAt: true,
95
+ isGrant: true,
96
+ parentId: true,
97
+ positionLevel: true,
98
+ positionTitle: true,
90
99
  };
91
100
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
92
101
  const client = (0, executor_1.getClient)();
93
- const result = await client.platformApiModule.findFirst(findFirstArgs).execute();
102
+ const result = await client.orgChartEdgeGrant.findFirst(findFirstArgs).execute();
94
103
  console.log(JSON.stringify(result, null, 2));
95
104
  }
96
105
  catch (error) {
@@ -112,16 +121,19 @@ async function handleGet(argv, prompter) {
112
121
  },
113
122
  ]);
114
123
  const client = (0, executor_1.getClient)();
115
- const result = await client.platformApiModule
124
+ const result = await client.orgChartEdgeGrant
116
125
  .findOne({
117
126
  id: answers.id,
118
127
  select: {
119
- apiId: true,
128
+ childId: true,
120
129
  createdAt: true,
121
- data: true,
130
+ entityId: true,
131
+ grantorId: true,
122
132
  id: true,
123
- name: true,
124
- updatedAt: true,
133
+ isGrant: true,
134
+ parentId: true,
135
+ positionLevel: true,
136
+ positionTitle: true,
125
137
  },
126
138
  })
127
139
  .execute();
@@ -140,40 +152,76 @@ async function handleCreate(argv, prompter) {
140
152
  const rawAnswers = await prompter.prompt(argv, [
141
153
  {
142
154
  type: 'text',
143
- name: 'apiId',
144
- message: 'apiId',
155
+ name: 'childId',
156
+ message: 'childId',
145
157
  required: true,
146
158
  },
147
159
  {
148
- type: 'json',
149
- name: 'data',
150
- message: 'data',
160
+ type: 'text',
161
+ name: 'entityId',
162
+ message: 'entityId',
151
163
  required: true,
152
164
  },
153
165
  {
154
166
  type: 'text',
155
- name: 'name',
156
- message: 'name',
157
- required: true,
167
+ name: 'grantorId',
168
+ message: 'grantorId',
169
+ required: false,
170
+ skipPrompt: true,
171
+ },
172
+ {
173
+ type: 'boolean',
174
+ name: 'isGrant',
175
+ message: 'isGrant',
176
+ required: false,
177
+ skipPrompt: true,
178
+ },
179
+ {
180
+ type: 'text',
181
+ name: 'parentId',
182
+ message: 'parentId',
183
+ required: false,
184
+ skipPrompt: true,
185
+ },
186
+ {
187
+ type: 'text',
188
+ name: 'positionLevel',
189
+ message: 'positionLevel',
190
+ required: false,
191
+ skipPrompt: true,
192
+ },
193
+ {
194
+ type: 'text',
195
+ name: 'positionTitle',
196
+ message: 'positionTitle',
197
+ required: false,
198
+ skipPrompt: true,
158
199
  },
159
200
  ]);
160
201
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
161
202
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
162
203
  const client = (0, executor_1.getClient)();
163
- const result = await client.platformApiModule
204
+ const result = await client.orgChartEdgeGrant
164
205
  .create({
165
206
  data: {
166
- apiId: cleanedData.apiId,
167
- data: cleanedData.data,
168
- name: cleanedData.name,
207
+ childId: cleanedData.childId,
208
+ entityId: cleanedData.entityId,
209
+ grantorId: cleanedData.grantorId,
210
+ isGrant: cleanedData.isGrant,
211
+ parentId: cleanedData.parentId,
212
+ positionLevel: cleanedData.positionLevel,
213
+ positionTitle: cleanedData.positionTitle,
169
214
  },
170
215
  select: {
171
- apiId: true,
216
+ childId: true,
172
217
  createdAt: true,
173
- data: true,
218
+ entityId: true,
219
+ grantorId: true,
174
220
  id: true,
175
- name: true,
176
- updatedAt: true,
221
+ isGrant: true,
222
+ parentId: true,
223
+ positionLevel: true,
224
+ positionTitle: true,
177
225
  },
178
226
  })
179
227
  .execute();
@@ -198,43 +246,79 @@ async function handleUpdate(argv, prompter) {
198
246
  },
199
247
  {
200
248
  type: 'text',
201
- name: 'apiId',
202
- message: 'apiId',
249
+ name: 'childId',
250
+ message: 'childId',
251
+ required: false,
252
+ },
253
+ {
254
+ type: 'text',
255
+ name: 'entityId',
256
+ message: 'entityId',
257
+ required: false,
258
+ },
259
+ {
260
+ type: 'text',
261
+ name: 'grantorId',
262
+ message: 'grantorId',
203
263
  required: false,
264
+ skipPrompt: true,
204
265
  },
205
266
  {
206
- type: 'json',
207
- name: 'data',
208
- message: 'data',
267
+ type: 'boolean',
268
+ name: 'isGrant',
269
+ message: 'isGrant',
270
+ required: false,
271
+ skipPrompt: true,
272
+ },
273
+ {
274
+ type: 'text',
275
+ name: 'parentId',
276
+ message: 'parentId',
277
+ required: false,
278
+ skipPrompt: true,
279
+ },
280
+ {
281
+ type: 'text',
282
+ name: 'positionLevel',
283
+ message: 'positionLevel',
209
284
  required: false,
285
+ skipPrompt: true,
210
286
  },
211
287
  {
212
288
  type: 'text',
213
- name: 'name',
214
- message: 'name',
289
+ name: 'positionTitle',
290
+ message: 'positionTitle',
215
291
  required: false,
292
+ skipPrompt: true,
216
293
  },
217
294
  ]);
218
295
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
219
296
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
220
297
  const client = (0, executor_1.getClient)();
221
- const result = await client.platformApiModule
298
+ const result = await client.orgChartEdgeGrant
222
299
  .update({
223
300
  where: {
224
301
  id: answers.id,
225
302
  },
226
303
  data: {
227
- apiId: cleanedData.apiId,
228
- data: cleanedData.data,
229
- name: cleanedData.name,
304
+ childId: cleanedData.childId,
305
+ entityId: cleanedData.entityId,
306
+ grantorId: cleanedData.grantorId,
307
+ isGrant: cleanedData.isGrant,
308
+ parentId: cleanedData.parentId,
309
+ positionLevel: cleanedData.positionLevel,
310
+ positionTitle: cleanedData.positionTitle,
230
311
  },
231
312
  select: {
232
- apiId: true,
313
+ childId: true,
233
314
  createdAt: true,
234
- data: true,
315
+ entityId: true,
316
+ grantorId: true,
235
317
  id: true,
236
- name: true,
237
- updatedAt: true,
318
+ isGrant: true,
319
+ parentId: true,
320
+ positionLevel: true,
321
+ positionTitle: true,
238
322
  },
239
323
  })
240
324
  .execute();
@@ -260,7 +344,7 @@ async function handleDelete(argv, prompter) {
260
344
  ]);
261
345
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
262
346
  const client = (0, executor_1.getClient)();
263
- const result = await client.platformApiModule
347
+ const result = await client.orgChartEdgeGrant
264
348
  .delete({
265
349
  where: {
266
350
  id: answers.id,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CLI commands for PlatformApiModule
2
+ * CLI commands for OrgChartEdge
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /**
4
- * CLI commands for ApiModule
4
+ * CLI commands for OrgChartEdge
5
5
  * @generated by @constructive-io/graphql-codegen
6
6
  * DO NOT EDIT - changes will be overwritten
7
7
  */
@@ -9,15 +9,16 @@ const inquirerer_1 = require("inquirerer");
9
9
  const executor_1 = require("../executor");
10
10
  const utils_1 = require("../utils");
11
11
  const fieldSchema = {
12
- apiId: 'uuid',
12
+ childId: 'uuid',
13
13
  createdAt: 'string',
14
- data: 'json',
15
- databaseId: 'uuid',
14
+ entityId: 'uuid',
16
15
  id: 'uuid',
17
- name: 'string',
16
+ parentId: 'uuid',
17
+ positionLevel: 'int',
18
+ positionTitle: 'string',
18
19
  updatedAt: 'string',
19
20
  };
20
- const usage = '\napi-module <command>\n\nCommands:\n list List apiModule records\n find-first Find first matching apiModule record\n get Get a apiModule by ID\n create Create a new apiModule\n update Update an existing apiModule\n delete Delete a apiModule\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';
21
+ const usage = '\norg-chart-edge <command>\n\nCommands:\n list List orgChartEdge records\n find-first Find first matching orgChartEdge record\n get Get a orgChartEdge by ID\n create Create a new orgChartEdge\n update Update an existing orgChartEdge\n delete Delete a orgChartEdge\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';
21
22
  exports.default = async (argv, prompter, _options) => {
22
23
  if (argv.help || argv.h) {
23
24
  console.log(usage);
@@ -59,17 +60,18 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
59
60
  async function handleList(argv, _prompter) {
60
61
  try {
61
62
  const defaultSelect = {
62
- apiId: true,
63
+ childId: true,
63
64
  createdAt: true,
64
- data: true,
65
- databaseId: true,
65
+ entityId: true,
66
66
  id: true,
67
- name: true,
67
+ parentId: true,
68
+ positionLevel: true,
69
+ positionTitle: true,
68
70
  updatedAt: true,
69
71
  };
70
72
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
71
73
  const client = (0, executor_1.getClient)();
72
- const result = await client.apiModule.findMany(findManyArgs).execute();
74
+ const result = await client.orgChartEdge.findMany(findManyArgs).execute();
73
75
  console.log(JSON.stringify(result, null, 2));
74
76
  }
75
77
  catch (error) {
@@ -83,17 +85,18 @@ async function handleList(argv, _prompter) {
83
85
  async function handleFindFirst(argv, _prompter) {
84
86
  try {
85
87
  const defaultSelect = {
86
- apiId: true,
88
+ childId: true,
87
89
  createdAt: true,
88
- data: true,
89
- databaseId: true,
90
+ entityId: true,
90
91
  id: true,
91
- name: true,
92
+ parentId: true,
93
+ positionLevel: true,
94
+ positionTitle: true,
92
95
  updatedAt: true,
93
96
  };
94
97
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
95
98
  const client = (0, executor_1.getClient)();
96
- const result = await client.apiModule.findFirst(findFirstArgs).execute();
99
+ const result = await client.orgChartEdge.findFirst(findFirstArgs).execute();
97
100
  console.log(JSON.stringify(result, null, 2));
98
101
  }
99
102
  catch (error) {
@@ -115,16 +118,17 @@ async function handleGet(argv, prompter) {
115
118
  },
116
119
  ]);
117
120
  const client = (0, executor_1.getClient)();
118
- const result = await client.apiModule
121
+ const result = await client.orgChartEdge
119
122
  .findOne({
120
123
  id: answers.id,
121
124
  select: {
122
- apiId: true,
125
+ childId: true,
123
126
  createdAt: true,
124
- data: true,
125
- databaseId: true,
127
+ entityId: true,
126
128
  id: true,
127
- name: true,
129
+ parentId: true,
130
+ positionLevel: true,
131
+ positionTitle: true,
128
132
  updatedAt: true,
129
133
  },
130
134
  })
@@ -144,47 +148,58 @@ async function handleCreate(argv, prompter) {
144
148
  const rawAnswers = await prompter.prompt(argv, [
145
149
  {
146
150
  type: 'text',
147
- name: 'apiId',
148
- message: 'apiId',
151
+ name: 'childId',
152
+ message: 'childId',
149
153
  required: true,
150
154
  },
151
155
  {
152
- type: 'json',
153
- name: 'data',
154
- message: 'data',
156
+ type: 'text',
157
+ name: 'entityId',
158
+ message: 'entityId',
155
159
  required: true,
156
160
  },
157
161
  {
158
162
  type: 'text',
159
- name: 'databaseId',
160
- message: 'databaseId',
161
- required: true,
163
+ name: 'parentId',
164
+ message: 'parentId',
165
+ required: false,
166
+ skipPrompt: true,
162
167
  },
163
168
  {
164
169
  type: 'text',
165
- name: 'name',
166
- message: 'name',
167
- required: true,
170
+ name: 'positionLevel',
171
+ message: 'positionLevel',
172
+ required: false,
173
+ skipPrompt: true,
174
+ },
175
+ {
176
+ type: 'text',
177
+ name: 'positionTitle',
178
+ message: 'positionTitle',
179
+ required: false,
180
+ skipPrompt: true,
168
181
  },
169
182
  ]);
170
183
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
171
184
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
172
185
  const client = (0, executor_1.getClient)();
173
- const result = await client.apiModule
186
+ const result = await client.orgChartEdge
174
187
  .create({
175
188
  data: {
176
- apiId: cleanedData.apiId,
177
- data: cleanedData.data,
178
- databaseId: cleanedData.databaseId,
179
- name: cleanedData.name,
189
+ childId: cleanedData.childId,
190
+ entityId: cleanedData.entityId,
191
+ parentId: cleanedData.parentId,
192
+ positionLevel: cleanedData.positionLevel,
193
+ positionTitle: cleanedData.positionTitle,
180
194
  },
181
195
  select: {
182
- apiId: true,
196
+ childId: true,
183
197
  createdAt: true,
184
- data: true,
185
- databaseId: true,
198
+ entityId: true,
186
199
  id: true,
187
- name: true,
200
+ parentId: true,
201
+ positionLevel: true,
202
+ positionTitle: true,
188
203
  updatedAt: true,
189
204
  },
190
205
  })
@@ -210,50 +225,61 @@ async function handleUpdate(argv, prompter) {
210
225
  },
211
226
  {
212
227
  type: 'text',
213
- name: 'apiId',
214
- message: 'apiId',
228
+ name: 'childId',
229
+ message: 'childId',
215
230
  required: false,
216
231
  },
217
232
  {
218
- type: 'json',
219
- name: 'data',
220
- message: 'data',
233
+ type: 'text',
234
+ name: 'entityId',
235
+ message: 'entityId',
236
+ required: false,
237
+ },
238
+ {
239
+ type: 'text',
240
+ name: 'parentId',
241
+ message: 'parentId',
221
242
  required: false,
243
+ skipPrompt: true,
222
244
  },
223
245
  {
224
246
  type: 'text',
225
- name: 'databaseId',
226
- message: 'databaseId',
247
+ name: 'positionLevel',
248
+ message: 'positionLevel',
227
249
  required: false,
250
+ skipPrompt: true,
228
251
  },
229
252
  {
230
253
  type: 'text',
231
- name: 'name',
232
- message: 'name',
254
+ name: 'positionTitle',
255
+ message: 'positionTitle',
233
256
  required: false,
257
+ skipPrompt: true,
234
258
  },
235
259
  ]);
236
260
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
237
261
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
238
262
  const client = (0, executor_1.getClient)();
239
- const result = await client.apiModule
263
+ const result = await client.orgChartEdge
240
264
  .update({
241
265
  where: {
242
266
  id: answers.id,
243
267
  },
244
268
  data: {
245
- apiId: cleanedData.apiId,
246
- data: cleanedData.data,
247
- databaseId: cleanedData.databaseId,
248
- name: cleanedData.name,
269
+ childId: cleanedData.childId,
270
+ entityId: cleanedData.entityId,
271
+ parentId: cleanedData.parentId,
272
+ positionLevel: cleanedData.positionLevel,
273
+ positionTitle: cleanedData.positionTitle,
249
274
  },
250
275
  select: {
251
- apiId: true,
276
+ childId: true,
252
277
  createdAt: true,
253
- data: true,
254
- databaseId: true,
278
+ entityId: true,
255
279
  id: true,
256
- name: true,
280
+ parentId: true,
281
+ positionLevel: true,
282
+ positionTitle: true,
257
283
  updatedAt: true,
258
284
  },
259
285
  })
@@ -280,7 +306,7 @@ async function handleDelete(argv, prompter) {
280
306
  ]);
281
307
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
282
308
  const client = (0, executor_1.getClient)();
283
- const result = await client.apiModule
309
+ const result = await client.orgChartEdge
284
310
  .delete({
285
311
  where: {
286
312
  id: answers.id,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for OrgGetManagersRecord
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;