@constructive-io/sdk 0.29.1 → 0.29.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 (89) hide show
  1. package/api/orm/input-types.d.ts +144 -171
  2. package/auth/orm/index.d.ts +32 -4
  3. package/auth/orm/index.js +8 -0
  4. package/auth/orm/input-types.d.ts +915 -145
  5. package/auth/orm/input-types.js +7 -0
  6. package/auth/orm/models/index.d.ts +4 -0
  7. package/auth/orm/models/index.js +9 -1
  8. package/auth/orm/models/orgApiKeyList.d.ts +36 -0
  9. package/auth/orm/models/orgApiKeyList.js +80 -0
  10. package/auth/orm/models/principal.d.ts +45 -0
  11. package/auth/orm/models/principal.js +93 -0
  12. package/auth/orm/models/principalEntity.d.ts +54 -0
  13. package/auth/orm/models/principalEntity.js +104 -0
  14. package/auth/orm/models/principalScopeOverride.d.ts +36 -0
  15. package/auth/orm/models/principalScopeOverride.js +80 -0
  16. package/auth/orm/mutation/index.d.ts +33 -1
  17. package/auth/orm/mutation/index.js +48 -0
  18. package/auth/orm/query/index.d.ts +4 -4
  19. package/auth/orm/query/index.js +7 -7
  20. package/compute/orm/index.d.ts +15 -7
  21. package/compute/orm/index.js +10 -2
  22. package/compute/orm/input-types.d.ts +1159 -221
  23. package/compute/orm/input-types.js +4 -0
  24. package/compute/orm/models/index.d.ts +5 -1
  25. package/compute/orm/models/index.js +11 -3
  26. package/compute/orm/models/platformNamespace.d.ts +54 -0
  27. package/compute/orm/models/platformNamespace.js +104 -0
  28. package/compute/orm/models/platformNamespaceEvent.d.ts +56 -0
  29. package/compute/orm/models/platformNamespaceEvent.js +107 -0
  30. package/compute/orm/models/resource.d.ts +54 -0
  31. package/compute/orm/models/resource.js +104 -0
  32. package/compute/orm/models/resourceEvent.d.ts +56 -0
  33. package/compute/orm/models/resourceEvent.js +107 -0
  34. package/compute/orm/mutation/index.d.ts +9 -9
  35. package/compute/orm/mutation/index.js +12 -12
  36. package/esm/api/orm/input-types.d.ts +144 -171
  37. package/esm/auth/orm/index.d.ts +32 -4
  38. package/esm/auth/orm/index.js +8 -0
  39. package/esm/auth/orm/input-types.d.ts +915 -145
  40. package/esm/auth/orm/input-types.js +7 -0
  41. package/esm/auth/orm/models/index.d.ts +4 -0
  42. package/esm/auth/orm/models/index.js +4 -0
  43. package/esm/auth/orm/models/orgApiKeyList.d.ts +36 -0
  44. package/esm/auth/orm/models/orgApiKeyList.js +76 -0
  45. package/esm/auth/orm/models/principal.d.ts +45 -0
  46. package/esm/auth/orm/models/principal.js +89 -0
  47. package/esm/auth/orm/models/principalEntity.d.ts +54 -0
  48. package/esm/auth/orm/models/principalEntity.js +100 -0
  49. package/esm/auth/orm/models/principalScopeOverride.d.ts +36 -0
  50. package/esm/auth/orm/models/principalScopeOverride.js +76 -0
  51. package/esm/auth/orm/mutation/index.d.ts +33 -1
  52. package/esm/auth/orm/mutation/index.js +48 -0
  53. package/esm/auth/orm/query/index.d.ts +4 -4
  54. package/esm/auth/orm/query/index.js +7 -7
  55. package/esm/compute/orm/index.d.ts +15 -7
  56. package/esm/compute/orm/index.js +10 -2
  57. package/esm/compute/orm/input-types.d.ts +1159 -221
  58. package/esm/compute/orm/input-types.js +4 -0
  59. package/esm/compute/orm/models/index.d.ts +5 -1
  60. package/esm/compute/orm/models/index.js +5 -1
  61. package/esm/compute/orm/models/platformNamespace.d.ts +54 -0
  62. package/esm/compute/orm/models/platformNamespace.js +100 -0
  63. package/esm/compute/orm/models/platformNamespaceEvent.d.ts +56 -0
  64. package/esm/compute/orm/models/platformNamespaceEvent.js +103 -0
  65. package/esm/compute/orm/models/resource.d.ts +54 -0
  66. package/esm/compute/orm/models/resource.js +100 -0
  67. package/esm/compute/orm/models/resourceEvent.d.ts +56 -0
  68. package/esm/compute/orm/models/resourceEvent.js +103 -0
  69. package/esm/compute/orm/mutation/index.d.ts +9 -9
  70. package/esm/compute/orm/mutation/index.js +12 -12
  71. package/esm/modules/orm/index.d.ts +8 -4
  72. package/esm/modules/orm/index.js +8 -4
  73. package/esm/modules/orm/input-types.d.ts +868 -411
  74. package/esm/modules/orm/models/index.d.ts +4 -2
  75. package/esm/modules/orm/models/index.js +4 -2
  76. package/esm/modules/orm/models/principalAuthModule.d.ts +54 -0
  77. package/esm/modules/orm/models/principalAuthModule.js +100 -0
  78. package/esm/modules/orm/models/resourceModule.d.ts +54 -0
  79. package/esm/modules/orm/models/resourceModule.js +100 -0
  80. package/modules/orm/index.d.ts +8 -4
  81. package/modules/orm/index.js +8 -4
  82. package/modules/orm/input-types.d.ts +868 -411
  83. package/modules/orm/models/index.d.ts +4 -2
  84. package/modules/orm/models/index.js +10 -6
  85. package/modules/orm/models/principalAuthModule.d.ts +54 -0
  86. package/modules/orm/models/principalAuthModule.js +104 -0
  87. package/modules/orm/models/resourceModule.d.ts +54 -0
  88. package/modules/orm/models/resourceModule.js +104 -0
  89. 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',