@constructive-sdk/cli 0.29.0 → 0.29.2

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 (199) hide show
  1. package/api/cli/commands/api.js +44 -0
  2. package/api/cli/commands/check-constraint.js +0 -22
  3. package/api/cli/commands/composite-type.js +0 -22
  4. package/api/cli/commands/database-setting.js +44 -0
  5. package/api/cli/commands/domain.js +66 -0
  6. package/api/cli/commands/enum.js +0 -22
  7. package/api/cli/commands/field.js +0 -22
  8. package/api/cli/commands/foreign-key-constraint.js +0 -22
  9. package/api/cli/commands/index.js +0 -22
  10. package/api/cli/commands/policy.js +0 -22
  11. package/api/cli/commands/primary-key-constraint.js +0 -22
  12. package/api/cli/commands/schema.js +0 -22
  13. package/api/cli/commands/site.js +44 -0
  14. package/api/cli/commands/spatial-relation.js +0 -22
  15. package/api/cli/commands/table.js +0 -22
  16. package/api/cli/commands/trigger.js +0 -22
  17. package/api/cli/commands/unique-constraint.js +0 -22
  18. package/api/cli/commands/view.js +0 -22
  19. package/api/orm/input-types.d.ts +144 -171
  20. package/auth/cli/commands/create-org-api-key.d.ts +8 -0
  21. package/auth/cli/commands/create-org-api-key.js +36 -0
  22. package/auth/cli/commands/create-org-principal.d.ts +8 -0
  23. package/auth/cli/commands/create-org-principal.js +36 -0
  24. package/auth/cli/commands/delete-org-principal.d.ts +8 -0
  25. package/auth/cli/commands/delete-org-principal.js +36 -0
  26. package/auth/cli/commands/org-api-key-list.d.ts +8 -0
  27. package/auth/cli/commands/org-api-key-list.js +224 -0
  28. package/auth/cli/commands/principal-entity.d.ts +8 -0
  29. package/auth/cli/commands/principal-entity.js +282 -0
  30. package/auth/cli/commands/principal-scope-override.d.ts +8 -0
  31. package/auth/cli/commands/principal-scope-override.js +171 -0
  32. package/auth/cli/commands/principal.d.ts +8 -0
  33. package/auth/cli/commands/principal.js +171 -0
  34. package/auth/cli/commands/revoke-org-api-key.d.ts +8 -0
  35. package/auth/cli/commands/revoke-org-api-key.js +36 -0
  36. package/auth/cli/commands.js +19 -3
  37. package/auth/cli/executor.d.ts +28 -4
  38. package/auth/orm/index.d.ts +32 -4
  39. package/auth/orm/index.js +8 -0
  40. package/auth/orm/input-types.d.ts +915 -145
  41. package/auth/orm/input-types.js +7 -0
  42. package/auth/orm/models/index.d.ts +4 -0
  43. package/auth/orm/models/index.js +9 -1
  44. package/auth/orm/models/orgApiKeyList.d.ts +36 -0
  45. package/auth/orm/models/orgApiKeyList.js +80 -0
  46. package/auth/orm/models/principal.d.ts +45 -0
  47. package/auth/orm/models/principal.js +93 -0
  48. package/auth/orm/models/principalEntity.d.ts +54 -0
  49. package/auth/orm/models/principalEntity.js +104 -0
  50. package/auth/orm/models/principalScopeOverride.d.ts +36 -0
  51. package/auth/orm/models/principalScopeOverride.js +80 -0
  52. package/auth/orm/mutation/index.d.ts +33 -1
  53. package/auth/orm/mutation/index.js +48 -0
  54. package/auth/orm/query/index.d.ts +4 -4
  55. package/auth/orm/query/index.js +7 -7
  56. package/compute/cli/commands/function-graph-execution.js +0 -22
  57. package/compute/cli/commands/function-graph.js +0 -20
  58. package/compute/cli/commands/platform-namespace-event.d.ts +8 -0
  59. package/compute/cli/commands/platform-namespace-event.js +510 -0
  60. package/compute/cli/commands/platform-namespace.d.ts +8 -0
  61. package/compute/cli/commands/platform-namespace.js +436 -0
  62. package/compute/cli/commands/resource-event.d.ts +8 -0
  63. package/compute/cli/commands/resource-event.js +356 -0
  64. package/compute/cli/commands/resource.d.ts +8 -0
  65. package/compute/cli/commands/resource.js +520 -0
  66. package/compute/cli/commands.js +13 -5
  67. package/compute/cli/executor.d.ts +10 -6
  68. package/compute/orm/index.d.ts +15 -7
  69. package/compute/orm/index.js +10 -2
  70. package/compute/orm/input-types.d.ts +1159 -221
  71. package/compute/orm/input-types.js +4 -0
  72. package/compute/orm/models/index.d.ts +5 -1
  73. package/compute/orm/models/index.js +11 -3
  74. package/compute/orm/models/platformNamespace.d.ts +54 -0
  75. package/compute/orm/models/platformNamespace.js +104 -0
  76. package/compute/orm/models/platformNamespaceEvent.d.ts +56 -0
  77. package/compute/orm/models/platformNamespaceEvent.js +107 -0
  78. package/compute/orm/models/resource.d.ts +54 -0
  79. package/compute/orm/models/resource.js +104 -0
  80. package/compute/orm/models/resourceEvent.d.ts +56 -0
  81. package/compute/orm/models/resourceEvent.js +107 -0
  82. package/compute/orm/mutation/index.d.ts +9 -9
  83. package/compute/orm/mutation/index.js +12 -12
  84. package/esm/api/cli/commands/api.js +44 -0
  85. package/esm/api/cli/commands/check-constraint.js +0 -22
  86. package/esm/api/cli/commands/composite-type.js +0 -22
  87. package/esm/api/cli/commands/database-setting.js +44 -0
  88. package/esm/api/cli/commands/domain.js +66 -0
  89. package/esm/api/cli/commands/enum.js +0 -22
  90. package/esm/api/cli/commands/field.js +0 -22
  91. package/esm/api/cli/commands/foreign-key-constraint.js +0 -22
  92. package/esm/api/cli/commands/index.js +0 -22
  93. package/esm/api/cli/commands/policy.js +0 -22
  94. package/esm/api/cli/commands/primary-key-constraint.js +0 -22
  95. package/esm/api/cli/commands/schema.js +0 -22
  96. package/esm/api/cli/commands/site.js +44 -0
  97. package/esm/api/cli/commands/spatial-relation.js +0 -22
  98. package/esm/api/cli/commands/table.js +0 -22
  99. package/esm/api/cli/commands/trigger.js +0 -22
  100. package/esm/api/cli/commands/unique-constraint.js +0 -22
  101. package/esm/api/cli/commands/view.js +0 -22
  102. package/esm/api/orm/input-types.d.ts +144 -171
  103. package/esm/auth/cli/commands/create-org-api-key.d.ts +8 -0
  104. package/esm/auth/cli/commands/create-org-api-key.js +34 -0
  105. package/esm/auth/cli/commands/create-org-principal.d.ts +8 -0
  106. package/esm/auth/cli/commands/create-org-principal.js +34 -0
  107. package/esm/auth/cli/commands/delete-org-principal.d.ts +8 -0
  108. package/esm/auth/cli/commands/delete-org-principal.js +34 -0
  109. package/esm/auth/cli/commands/org-api-key-list.d.ts +8 -0
  110. package/esm/auth/cli/commands/org-api-key-list.js +222 -0
  111. package/esm/auth/cli/commands/principal-entity.d.ts +8 -0
  112. package/esm/auth/cli/commands/principal-entity.js +280 -0
  113. package/esm/auth/cli/commands/principal-scope-override.d.ts +8 -0
  114. package/esm/auth/cli/commands/principal-scope-override.js +169 -0
  115. package/esm/auth/cli/commands/principal.d.ts +8 -0
  116. package/esm/auth/cli/commands/principal.js +169 -0
  117. package/esm/auth/cli/commands/revoke-org-api-key.d.ts +8 -0
  118. package/esm/auth/cli/commands/revoke-org-api-key.js +34 -0
  119. package/esm/auth/cli/commands.js +19 -3
  120. package/esm/auth/cli/executor.d.ts +28 -4
  121. package/esm/auth/orm/index.d.ts +32 -4
  122. package/esm/auth/orm/index.js +8 -0
  123. package/esm/auth/orm/input-types.d.ts +915 -145
  124. package/esm/auth/orm/input-types.js +7 -0
  125. package/esm/auth/orm/models/index.d.ts +4 -0
  126. package/esm/auth/orm/models/index.js +4 -0
  127. package/esm/auth/orm/models/orgApiKeyList.d.ts +36 -0
  128. package/esm/auth/orm/models/orgApiKeyList.js +76 -0
  129. package/esm/auth/orm/models/principal.d.ts +45 -0
  130. package/esm/auth/orm/models/principal.js +89 -0
  131. package/esm/auth/orm/models/principalEntity.d.ts +54 -0
  132. package/esm/auth/orm/models/principalEntity.js +100 -0
  133. package/esm/auth/orm/models/principalScopeOverride.d.ts +36 -0
  134. package/esm/auth/orm/models/principalScopeOverride.js +76 -0
  135. package/esm/auth/orm/mutation/index.d.ts +33 -1
  136. package/esm/auth/orm/mutation/index.js +48 -0
  137. package/esm/auth/orm/query/index.d.ts +4 -4
  138. package/esm/auth/orm/query/index.js +7 -7
  139. package/esm/compute/cli/commands/function-graph-execution.js +0 -22
  140. package/esm/compute/cli/commands/function-graph.js +0 -20
  141. package/esm/compute/cli/commands/platform-namespace-event.d.ts +8 -0
  142. package/esm/compute/cli/commands/platform-namespace-event.js +508 -0
  143. package/esm/compute/cli/commands/platform-namespace.d.ts +8 -0
  144. package/esm/compute/cli/commands/platform-namespace.js +434 -0
  145. package/esm/compute/cli/commands/resource-event.d.ts +8 -0
  146. package/esm/compute/cli/commands/resource-event.js +354 -0
  147. package/esm/compute/cli/commands/resource.d.ts +8 -0
  148. package/esm/compute/cli/commands/resource.js +518 -0
  149. package/esm/compute/cli/commands.js +13 -5
  150. package/esm/compute/cli/executor.d.ts +10 -6
  151. package/esm/compute/orm/index.d.ts +15 -7
  152. package/esm/compute/orm/index.js +10 -2
  153. package/esm/compute/orm/input-types.d.ts +1159 -221
  154. package/esm/compute/orm/input-types.js +4 -0
  155. package/esm/compute/orm/models/index.d.ts +5 -1
  156. package/esm/compute/orm/models/index.js +5 -1
  157. package/esm/compute/orm/models/platformNamespace.d.ts +54 -0
  158. package/esm/compute/orm/models/platformNamespace.js +100 -0
  159. package/esm/compute/orm/models/platformNamespaceEvent.d.ts +56 -0
  160. package/esm/compute/orm/models/platformNamespaceEvent.js +103 -0
  161. package/esm/compute/orm/models/resource.d.ts +54 -0
  162. package/esm/compute/orm/models/resource.js +100 -0
  163. package/esm/compute/orm/models/resourceEvent.d.ts +56 -0
  164. package/esm/compute/orm/models/resourceEvent.js +103 -0
  165. package/esm/compute/orm/mutation/index.d.ts +9 -9
  166. package/esm/compute/orm/mutation/index.js +12 -12
  167. package/esm/modules/cli/commands/merkle-store-module.js +22 -0
  168. package/esm/modules/cli/commands/principal-auth-module.d.ts +8 -0
  169. package/esm/modules/cli/commands/principal-auth-module.js +580 -0
  170. package/esm/modules/cli/commands/resource-module.d.ts +8 -0
  171. package/esm/modules/cli/commands/resource-module.js +602 -0
  172. package/esm/modules/cli/commands.js +9 -5
  173. package/esm/modules/cli/executor.d.ts +4 -2
  174. package/esm/modules/orm/index.d.ts +8 -4
  175. package/esm/modules/orm/index.js +8 -4
  176. package/esm/modules/orm/input-types.d.ts +868 -411
  177. package/esm/modules/orm/models/index.d.ts +4 -2
  178. package/esm/modules/orm/models/index.js +4 -2
  179. package/esm/modules/orm/models/principalAuthModule.d.ts +54 -0
  180. package/esm/modules/orm/models/principalAuthModule.js +100 -0
  181. package/esm/modules/orm/models/resourceModule.d.ts +54 -0
  182. package/esm/modules/orm/models/resourceModule.js +100 -0
  183. package/modules/cli/commands/merkle-store-module.js +22 -0
  184. package/modules/cli/commands/principal-auth-module.d.ts +8 -0
  185. package/modules/cli/commands/principal-auth-module.js +582 -0
  186. package/modules/cli/commands/resource-module.d.ts +8 -0
  187. package/modules/cli/commands/resource-module.js +604 -0
  188. package/modules/cli/commands.js +9 -5
  189. package/modules/cli/executor.d.ts +4 -2
  190. package/modules/orm/index.d.ts +8 -4
  191. package/modules/orm/index.js +8 -4
  192. package/modules/orm/input-types.d.ts +868 -411
  193. package/modules/orm/models/index.d.ts +4 -2
  194. package/modules/orm/models/index.js +10 -6
  195. package/modules/orm/models/principalAuthModule.d.ts +54 -0
  196. package/modules/orm/models/principalAuthModule.js +104 -0
  197. package/modules/orm/models/resourceModule.d.ts +54 -0
  198. package/modules/orm/models/resourceModule.js +104 -0
  199. package/package.json +5 -5
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceEventModel = void 0;
4
+ const query_builder_1 = require("../query-builder");
5
+ const input_types_1 = require("../input-types");
6
+ class ResourceEventModel {
7
+ client;
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ findMany(args) {
12
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('ResourceEvent', 'resourceEvents', 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
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', input_types_1.connectionFieldsMap);
21
+ return new query_builder_1.QueryBuilder({
22
+ client: this.client,
23
+ operation: 'query',
24
+ operationName: 'ResourceEvent',
25
+ fieldName: 'resourceEvents',
26
+ document,
27
+ variables,
28
+ });
29
+ }
30
+ findFirst(args) {
31
+ const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('ResourceEvent', 'resourceEvents', args.select, {
32
+ where: args?.where,
33
+ orderBy: args?.orderBy,
34
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', input_types_1.connectionFieldsMap);
35
+ return new query_builder_1.QueryBuilder({
36
+ client: this.client,
37
+ operation: 'query',
38
+ operationName: 'ResourceEvent',
39
+ fieldName: 'resourceEvent',
40
+ document,
41
+ variables,
42
+ transform: (data) => ({
43
+ resourceEvent: data.resourceEvents?.nodes?.[0] ?? null,
44
+ }),
45
+ });
46
+ }
47
+ findOne(args) {
48
+ const { document, variables } = (0, query_builder_1.buildFindManyDocument)('ResourceEvent', 'resourceEvents', args.select, {
49
+ where: {
50
+ id: {
51
+ equalTo: args.id,
52
+ },
53
+ },
54
+ first: 1,
55
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', input_types_1.connectionFieldsMap);
56
+ return new query_builder_1.QueryBuilder({
57
+ client: this.client,
58
+ operation: 'query',
59
+ operationName: 'ResourceEvent',
60
+ fieldName: 'resourceEvent',
61
+ document,
62
+ variables,
63
+ transform: (data) => ({
64
+ resourceEvent: data.resourceEvents?.nodes?.[0] ?? null,
65
+ }),
66
+ });
67
+ }
68
+ create(args) {
69
+ const { document, variables } = (0, query_builder_1.buildCreateDocument)('ResourceEvent', 'createResourceEvent', 'resourceEvent', args.select, args.data, 'CreateResourceEventInput', input_types_1.connectionFieldsMap);
70
+ return new query_builder_1.QueryBuilder({
71
+ client: this.client,
72
+ operation: 'mutation',
73
+ operationName: 'ResourceEvent',
74
+ fieldName: 'createResourceEvent',
75
+ document,
76
+ variables,
77
+ });
78
+ }
79
+ update(args) {
80
+ const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('ResourceEvent', 'updateResourceEvent', 'resourceEvent', args.select, args.where.id, args.data, 'UpdateResourceEventInput', 'id', 'resourceEventPatch', input_types_1.connectionFieldsMap, {
81
+ createdAt: args.where.createdAt,
82
+ });
83
+ return new query_builder_1.QueryBuilder({
84
+ client: this.client,
85
+ operation: 'mutation',
86
+ operationName: 'ResourceEvent',
87
+ fieldName: 'updateResourceEvent',
88
+ document,
89
+ variables,
90
+ });
91
+ }
92
+ delete(args) {
93
+ const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('ResourceEvent', 'deleteResourceEvent', 'resourceEvent', {
94
+ id: args.where.id,
95
+ createdAt: args.where.createdAt,
96
+ }, 'DeleteResourceEventInput', args.select, input_types_1.connectionFieldsMap);
97
+ return new query_builder_1.QueryBuilder({
98
+ client: this.client,
99
+ operation: 'mutation',
100
+ operationName: 'ResourceEvent',
101
+ fieldName: 'deleteResourceEvent',
102
+ document,
103
+ variables,
104
+ });
105
+ }
106
+ }
107
+ exports.ResourceEventModel = ResourceEventModel;
@@ -6,7 +6,7 @@
6
6
  import { OrmClient } from '../client';
7
7
  import { QueryBuilder } from '../query-builder';
8
8
  import type { InferSelectResult, StrictSelect } from '../select-types';
9
- import type { ValidateFunctionGraphInput, InitEmptyRepoInput, SetDataAtPathInput, ImportDefinitionsInput, CopyGraphInput, SaveGraphInput, AddEdgeAndSaveInput, AddNodeAndSaveInput, AddEdgeInput, AddNodeInput, ImportGraphJsonInput, InsertNodeAtPathInput, StartExecutionInput, ProvisionBucketInput, ValidateFunctionGraphPayload, InitEmptyRepoPayload, SetDataAtPathPayload, ImportDefinitionsPayload, CopyGraphPayload, SaveGraphPayload, AddEdgeAndSavePayload, AddNodeAndSavePayload, AddEdgePayload, AddNodePayload, ImportGraphJsonPayload, InsertNodeAtPathPayload, StartExecutionPayload, ProvisionBucketPayload, ValidateFunctionGraphPayloadSelect, InitEmptyRepoPayloadSelect, SetDataAtPathPayloadSelect, ImportDefinitionsPayloadSelect, CopyGraphPayloadSelect, SaveGraphPayloadSelect, AddEdgeAndSavePayloadSelect, AddNodeAndSavePayloadSelect, AddEdgePayloadSelect, AddNodePayloadSelect, ImportGraphJsonPayloadSelect, InsertNodeAtPathPayloadSelect, StartExecutionPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { ValidateFunctionGraphInput, InitEmptyRepoInput, SetDataAtPathInput, ImportDefinitionsInput, CopyGraphInput, SaveGraphInput, AddEdgeAndSaveInput, AddNodeAndSaveInput, ImportGraphJsonInput, AddEdgeInput, AddNodeInput, InsertNodeAtPathInput, StartExecutionInput, ProvisionBucketInput, ValidateFunctionGraphPayload, InitEmptyRepoPayload, SetDataAtPathPayload, ImportDefinitionsPayload, CopyGraphPayload, SaveGraphPayload, AddEdgeAndSavePayload, AddNodeAndSavePayload, ImportGraphJsonPayload, AddEdgePayload, AddNodePayload, InsertNodeAtPathPayload, StartExecutionPayload, ProvisionBucketPayload, ValidateFunctionGraphPayloadSelect, InitEmptyRepoPayloadSelect, SetDataAtPathPayloadSelect, ImportDefinitionsPayloadSelect, CopyGraphPayloadSelect, SaveGraphPayloadSelect, AddEdgeAndSavePayloadSelect, AddNodeAndSavePayloadSelect, ImportGraphJsonPayloadSelect, AddEdgePayloadSelect, AddNodePayloadSelect, InsertNodeAtPathPayloadSelect, StartExecutionPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface ValidateFunctionGraphVariables {
11
11
  input: ValidateFunctionGraphInput;
12
12
  }
@@ -31,15 +31,15 @@ export interface AddEdgeAndSaveVariables {
31
31
  export interface AddNodeAndSaveVariables {
32
32
  input: AddNodeAndSaveInput;
33
33
  }
34
+ export interface ImportGraphJsonVariables {
35
+ input: ImportGraphJsonInput;
36
+ }
34
37
  export interface AddEdgeVariables {
35
38
  input: AddEdgeInput;
36
39
  }
37
40
  export interface AddNodeVariables {
38
41
  input: AddNodeInput;
39
42
  }
40
- export interface ImportGraphJsonVariables {
41
- input: ImportGraphJsonInput;
42
- }
43
43
  export interface InsertNodeAtPathVariables {
44
44
  input: InsertNodeAtPathInput;
45
45
  }
@@ -97,6 +97,11 @@ export declare function createMutationOperations(client: OrmClient): {
97
97
  } & StrictSelect<S, AddNodeAndSavePayloadSelect>) => QueryBuilder<{
98
98
  addNodeAndSave: InferSelectResult<AddNodeAndSavePayload, S> | null;
99
99
  }>;
100
+ importGraphJson: <S extends ImportGraphJsonPayloadSelect>(args: ImportGraphJsonVariables, options: {
101
+ select: S;
102
+ } & StrictSelect<S, ImportGraphJsonPayloadSelect>) => QueryBuilder<{
103
+ importGraphJson: InferSelectResult<ImportGraphJsonPayload, S> | null;
104
+ }>;
100
105
  addEdge: <S extends AddEdgePayloadSelect>(args: AddEdgeVariables, options: {
101
106
  select: S;
102
107
  } & StrictSelect<S, AddEdgePayloadSelect>) => QueryBuilder<{
@@ -107,11 +112,6 @@ export declare function createMutationOperations(client: OrmClient): {
107
112
  } & StrictSelect<S, AddNodePayloadSelect>) => QueryBuilder<{
108
113
  addNode: InferSelectResult<AddNodePayload, S> | null;
109
114
  }>;
110
- importGraphJson: <S extends ImportGraphJsonPayloadSelect>(args: ImportGraphJsonVariables, options: {
111
- select: S;
112
- } & StrictSelect<S, ImportGraphJsonPayloadSelect>) => QueryBuilder<{
113
- importGraphJson: InferSelectResult<ImportGraphJsonPayload, S> | null;
114
- }>;
115
115
  insertNodeAtPath: <S extends InsertNodeAtPathPayloadSelect>(args: InsertNodeAtPathVariables, options: {
116
116
  select: S;
117
117
  } & StrictSelect<S, InsertNodeAtPathPayloadSelect>) => QueryBuilder<{
@@ -101,6 +101,18 @@ function createMutationOperations(client) {
101
101
  },
102
102
  ], input_types_1.connectionFieldsMap, 'AddNodeAndSavePayload'),
103
103
  }),
104
+ importGraphJson: (args, options) => new query_builder_1.QueryBuilder({
105
+ client,
106
+ operation: 'mutation',
107
+ operationName: 'ImportGraphJson',
108
+ fieldName: 'importGraphJson',
109
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'ImportGraphJson', 'importGraphJson', options.select, args, [
110
+ {
111
+ name: 'input',
112
+ type: 'ImportGraphJsonInput!',
113
+ },
114
+ ], input_types_1.connectionFieldsMap, 'ImportGraphJsonPayload'),
115
+ }),
104
116
  addEdge: (args, options) => new query_builder_1.QueryBuilder({
105
117
  client,
106
118
  operation: 'mutation',
@@ -125,18 +137,6 @@ function createMutationOperations(client) {
125
137
  },
126
138
  ], input_types_1.connectionFieldsMap, 'AddNodePayload'),
127
139
  }),
128
- importGraphJson: (args, options) => new query_builder_1.QueryBuilder({
129
- client,
130
- operation: 'mutation',
131
- operationName: 'ImportGraphJson',
132
- fieldName: 'importGraphJson',
133
- ...(0, query_builder_1.buildCustomDocument)('mutation', 'ImportGraphJson', 'importGraphJson', options.select, args, [
134
- {
135
- name: 'input',
136
- type: 'ImportGraphJsonInput!',
137
- },
138
- ], input_types_1.connectionFieldsMap, 'ImportGraphJsonPayload'),
139
- }),
140
140
  insertNodeAtPath: (args, options) => new query_builder_1.QueryBuilder({
141
141
  client,
142
142
  operation: 'mutation',
@@ -14,6 +14,8 @@ const fieldSchema = {
14
14
  roleName: 'string',
15
15
  anonRole: 'string',
16
16
  isPublic: 'boolean',
17
+ labels: 'json',
18
+ annotations: 'json',
17
19
  };
18
20
  const usage = '\napi <command>\n\nCommands:\n list List api records\n find-first Find first matching api record\n get Get a api by ID\n create Create a new api\n update Update an existing api\n delete Delete a api\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
19
21
  export default async (argv, prompter, _options) => {
@@ -64,6 +66,8 @@ async function handleList(argv, _prompter) {
64
66
  roleName: true,
65
67
  anonRole: true,
66
68
  isPublic: true,
69
+ labels: true,
70
+ annotations: true,
67
71
  };
68
72
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
69
73
  const client = getClient();
@@ -88,6 +92,8 @@ async function handleFindFirst(argv, _prompter) {
88
92
  roleName: true,
89
93
  anonRole: true,
90
94
  isPublic: true,
95
+ labels: true,
96
+ annotations: true,
91
97
  };
92
98
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
93
99
  const client = getClient();
@@ -124,6 +130,8 @@ async function handleGet(argv, prompter) {
124
130
  roleName: true,
125
131
  anonRole: true,
126
132
  isPublic: true,
133
+ labels: true,
134
+ annotations: true,
127
135
  },
128
136
  })
129
137
  .execute();
@@ -180,6 +188,20 @@ async function handleCreate(argv, prompter) {
180
188
  required: false,
181
189
  skipPrompt: true,
182
190
  },
191
+ {
192
+ type: 'json',
193
+ name: 'labels',
194
+ message: 'labels',
195
+ required: false,
196
+ skipPrompt: true,
197
+ },
198
+ {
199
+ type: 'json',
200
+ name: 'annotations',
201
+ message: 'annotations',
202
+ required: false,
203
+ skipPrompt: true,
204
+ },
183
205
  ]);
184
206
  const answers = coerceAnswers(rawAnswers, fieldSchema);
185
207
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -193,6 +215,8 @@ async function handleCreate(argv, prompter) {
193
215
  roleName: cleanedData.roleName,
194
216
  anonRole: cleanedData.anonRole,
195
217
  isPublic: cleanedData.isPublic,
218
+ labels: cleanedData.labels,
219
+ annotations: cleanedData.annotations,
196
220
  },
197
221
  select: {
198
222
  id: true,
@@ -202,6 +226,8 @@ async function handleCreate(argv, prompter) {
202
226
  roleName: true,
203
227
  anonRole: true,
204
228
  isPublic: true,
229
+ labels: true,
230
+ annotations: true,
205
231
  },
206
232
  })
207
233
  .execute();
@@ -264,6 +290,20 @@ async function handleUpdate(argv, prompter) {
264
290
  required: false,
265
291
  skipPrompt: true,
266
292
  },
293
+ {
294
+ type: 'json',
295
+ name: 'labels',
296
+ message: 'labels',
297
+ required: false,
298
+ skipPrompt: true,
299
+ },
300
+ {
301
+ type: 'json',
302
+ name: 'annotations',
303
+ message: 'annotations',
304
+ required: false,
305
+ skipPrompt: true,
306
+ },
267
307
  ]);
268
308
  const answers = coerceAnswers(rawAnswers, fieldSchema);
269
309
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -280,6 +320,8 @@ async function handleUpdate(argv, prompter) {
280
320
  roleName: cleanedData.roleName,
281
321
  anonRole: cleanedData.anonRole,
282
322
  isPublic: cleanedData.isPublic,
323
+ labels: cleanedData.labels,
324
+ annotations: cleanedData.annotations,
283
325
  },
284
326
  select: {
285
327
  id: true,
@@ -289,6 +331,8 @@ async function handleUpdate(argv, prompter) {
289
331
  roleName: true,
290
332
  anonRole: true,
291
333
  isPublic: true,
334
+ labels: true,
335
+ annotations: true,
292
336
  },
293
337
  })
294
338
  .execute();
@@ -16,7 +16,6 @@ const fieldSchema = {
16
16
  expr: 'json',
17
17
  smartTags: 'json',
18
18
  category: 'string',
19
- scope: 'int',
20
19
  tags: 'string',
21
20
  createdAt: 'string',
22
21
  updatedAt: 'string',
@@ -72,7 +71,6 @@ async function handleList(argv, _prompter) {
72
71
  expr: true,
73
72
  smartTags: true,
74
73
  category: true,
75
- scope: true,
76
74
  tags: true,
77
75
  createdAt: true,
78
76
  updatedAt: true,
@@ -102,7 +100,6 @@ async function handleFindFirst(argv, _prompter) {
102
100
  expr: true,
103
101
  smartTags: true,
104
102
  category: true,
105
- scope: true,
106
103
  tags: true,
107
104
  createdAt: true,
108
105
  updatedAt: true,
@@ -144,7 +141,6 @@ async function handleGet(argv, prompter) {
144
141
  expr: true,
145
142
  smartTags: true,
146
143
  category: true,
147
- scope: true,
148
144
  tags: true,
149
145
  createdAt: true,
150
146
  updatedAt: true,
@@ -218,13 +214,6 @@ async function handleCreate(argv, prompter) {
218
214
  required: false,
219
215
  skipPrompt: true,
220
216
  },
221
- {
222
- type: 'text',
223
- name: 'scope',
224
- message: 'scope',
225
- required: false,
226
- skipPrompt: true,
227
- },
228
217
  {
229
218
  type: 'text',
230
219
  name: 'tags',
@@ -247,7 +236,6 @@ async function handleCreate(argv, prompter) {
247
236
  expr: cleanedData.expr,
248
237
  smartTags: cleanedData.smartTags,
249
238
  category: cleanedData.category,
250
- scope: cleanedData.scope,
251
239
  tags: cleanedData.tags,
252
240
  },
253
241
  select: {
@@ -260,7 +248,6 @@ async function handleCreate(argv, prompter) {
260
248
  expr: true,
261
249
  smartTags: true,
262
250
  category: true,
263
- scope: true,
264
251
  tags: true,
265
252
  createdAt: true,
266
253
  updatedAt: true,
@@ -340,13 +327,6 @@ async function handleUpdate(argv, prompter) {
340
327
  required: false,
341
328
  skipPrompt: true,
342
329
  },
343
- {
344
- type: 'text',
345
- name: 'scope',
346
- message: 'scope',
347
- required: false,
348
- skipPrompt: true,
349
- },
350
330
  {
351
331
  type: 'text',
352
332
  name: 'tags',
@@ -372,7 +352,6 @@ async function handleUpdate(argv, prompter) {
372
352
  expr: cleanedData.expr,
373
353
  smartTags: cleanedData.smartTags,
374
354
  category: cleanedData.category,
375
- scope: cleanedData.scope,
376
355
  tags: cleanedData.tags,
377
356
  },
378
357
  select: {
@@ -385,7 +364,6 @@ async function handleUpdate(argv, prompter) {
385
364
  expr: true,
386
365
  smartTags: true,
387
366
  category: true,
388
- scope: true,
389
367
  tags: true,
390
368
  createdAt: true,
391
369
  updatedAt: true,
@@ -16,7 +16,6 @@ const fieldSchema = {
16
16
  attributes: 'json',
17
17
  smartTags: 'json',
18
18
  category: 'string',
19
- scope: 'int',
20
19
  tags: 'string',
21
20
  };
22
21
  const usage = '\ncomposite-type <command>\n\nCommands:\n list List compositeType records\n find-first Find first matching compositeType record\n get Get a compositeType by ID\n create Create a new compositeType\n update Update an existing compositeType\n delete Delete a compositeType\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';
@@ -70,7 +69,6 @@ async function handleList(argv, _prompter) {
70
69
  attributes: true,
71
70
  smartTags: true,
72
71
  category: true,
73
- scope: true,
74
72
  tags: true,
75
73
  };
76
74
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
@@ -98,7 +96,6 @@ async function handleFindFirst(argv, _prompter) {
98
96
  attributes: true,
99
97
  smartTags: true,
100
98
  category: true,
101
- scope: true,
102
99
  tags: true,
103
100
  };
104
101
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
@@ -138,7 +135,6 @@ async function handleGet(argv, prompter) {
138
135
  attributes: true,
139
136
  smartTags: true,
140
137
  category: true,
141
- scope: true,
142
138
  tags: true,
143
139
  },
144
140
  })
@@ -209,13 +205,6 @@ async function handleCreate(argv, prompter) {
209
205
  required: false,
210
206
  skipPrompt: true,
211
207
  },
212
- {
213
- type: 'text',
214
- name: 'scope',
215
- message: 'scope',
216
- required: false,
217
- skipPrompt: true,
218
- },
219
208
  {
220
209
  type: 'text',
221
210
  name: 'tags',
@@ -238,7 +227,6 @@ async function handleCreate(argv, prompter) {
238
227
  attributes: cleanedData.attributes,
239
228
  smartTags: cleanedData.smartTags,
240
229
  category: cleanedData.category,
241
- scope: cleanedData.scope,
242
230
  tags: cleanedData.tags,
243
231
  },
244
232
  select: {
@@ -251,7 +239,6 @@ async function handleCreate(argv, prompter) {
251
239
  attributes: true,
252
240
  smartTags: true,
253
241
  category: true,
254
- scope: true,
255
242
  tags: true,
256
243
  },
257
244
  })
@@ -328,13 +315,6 @@ async function handleUpdate(argv, prompter) {
328
315
  required: false,
329
316
  skipPrompt: true,
330
317
  },
331
- {
332
- type: 'text',
333
- name: 'scope',
334
- message: 'scope',
335
- required: false,
336
- skipPrompt: true,
337
- },
338
318
  {
339
319
  type: 'text',
340
320
  name: 'tags',
@@ -360,7 +340,6 @@ async function handleUpdate(argv, prompter) {
360
340
  attributes: cleanedData.attributes,
361
341
  smartTags: cleanedData.smartTags,
362
342
  category: cleanedData.category,
363
- scope: cleanedData.scope,
364
343
  tags: cleanedData.tags,
365
344
  },
366
345
  select: {
@@ -373,7 +352,6 @@ async function handleUpdate(argv, prompter) {
373
352
  attributes: true,
374
353
  smartTags: true,
375
354
  category: true,
376
- scope: true,
377
355
  tags: true,
378
356
  },
379
357
  })
@@ -22,6 +22,8 @@ const fieldSchema = {
22
22
  enableBulk: 'boolean',
23
23
  enableI18N: 'boolean',
24
24
  options: 'json',
25
+ labels: 'json',
26
+ annotations: 'json',
25
27
  };
26
28
  const usage = '\ndatabase-setting <command>\n\nCommands:\n list List databaseSetting records\n find-first Find first matching databaseSetting record\n get Get a databaseSetting by ID\n create Create a new databaseSetting\n update Update an existing databaseSetting\n delete Delete a databaseSetting\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';
27
29
  export default async (argv, prompter, _options) => {
@@ -80,6 +82,8 @@ async function handleList(argv, _prompter) {
80
82
  enableBulk: true,
81
83
  enableI18N: true,
82
84
  options: true,
85
+ labels: true,
86
+ annotations: true,
83
87
  };
84
88
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
85
89
  const client = getClient();
@@ -112,6 +116,8 @@ async function handleFindFirst(argv, _prompter) {
112
116
  enableBulk: true,
113
117
  enableI18N: true,
114
118
  options: true,
119
+ labels: true,
120
+ annotations: true,
115
121
  };
116
122
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
117
123
  const client = getClient();
@@ -156,6 +162,8 @@ async function handleGet(argv, prompter) {
156
162
  enableBulk: true,
157
163
  enableI18N: true,
158
164
  options: true,
165
+ labels: true,
166
+ annotations: true,
159
167
  },
160
168
  })
161
169
  .execute();
@@ -269,6 +277,20 @@ async function handleCreate(argv, prompter) {
269
277
  required: false,
270
278
  skipPrompt: true,
271
279
  },
280
+ {
281
+ type: 'json',
282
+ name: 'labels',
283
+ message: 'labels',
284
+ required: false,
285
+ skipPrompt: true,
286
+ },
287
+ {
288
+ type: 'json',
289
+ name: 'annotations',
290
+ message: 'annotations',
291
+ required: false,
292
+ skipPrompt: true,
293
+ },
272
294
  ]);
273
295
  const answers = coerceAnswers(rawAnswers, fieldSchema);
274
296
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -290,6 +312,8 @@ async function handleCreate(argv, prompter) {
290
312
  enableBulk: cleanedData.enableBulk,
291
313
  enableI18N: cleanedData.enableI18N,
292
314
  options: cleanedData.options,
315
+ labels: cleanedData.labels,
316
+ annotations: cleanedData.annotations,
293
317
  },
294
318
  select: {
295
319
  id: true,
@@ -307,6 +331,8 @@ async function handleCreate(argv, prompter) {
307
331
  enableBulk: true,
308
332
  enableI18N: true,
309
333
  options: true,
334
+ labels: true,
335
+ annotations: true,
310
336
  },
311
337
  })
312
338
  .execute();
@@ -426,6 +452,20 @@ async function handleUpdate(argv, prompter) {
426
452
  required: false,
427
453
  skipPrompt: true,
428
454
  },
455
+ {
456
+ type: 'json',
457
+ name: 'labels',
458
+ message: 'labels',
459
+ required: false,
460
+ skipPrompt: true,
461
+ },
462
+ {
463
+ type: 'json',
464
+ name: 'annotations',
465
+ message: 'annotations',
466
+ required: false,
467
+ skipPrompt: true,
468
+ },
429
469
  ]);
430
470
  const answers = coerceAnswers(rawAnswers, fieldSchema);
431
471
  const cleanedData = stripUndefined(answers, fieldSchema);
@@ -450,6 +490,8 @@ async function handleUpdate(argv, prompter) {
450
490
  enableBulk: cleanedData.enableBulk,
451
491
  enableI18N: cleanedData.enableI18N,
452
492
  options: cleanedData.options,
493
+ labels: cleanedData.labels,
494
+ annotations: cleanedData.annotations,
453
495
  },
454
496
  select: {
455
497
  id: true,
@@ -467,6 +509,8 @@ async function handleUpdate(argv, prompter) {
467
509
  enableBulk: true,
468
510
  enableI18N: true,
469
511
  options: true,
512
+ labels: true,
513
+ annotations: true,
470
514
  },
471
515
  })
472
516
  .execute();