@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,103 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class ResourceEventModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('ResourceEvent', 'resourceEvents', args.select, {
10
+ where: args?.where,
11
+ orderBy: args?.orderBy,
12
+ first: args?.first,
13
+ last: args?.last,
14
+ after: args?.after,
15
+ before: args?.before,
16
+ offset: args?.offset,
17
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'ResourceEvent',
22
+ fieldName: 'resourceEvents',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('ResourceEvent', 'resourceEvents', args.select, {
29
+ where: args?.where,
30
+ orderBy: args?.orderBy,
31
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', connectionFieldsMap);
32
+ return new QueryBuilder({
33
+ client: this.client,
34
+ operation: 'query',
35
+ operationName: 'ResourceEvent',
36
+ fieldName: 'resourceEvent',
37
+ document,
38
+ variables,
39
+ transform: (data) => ({
40
+ resourceEvent: data.resourceEvents?.nodes?.[0] ?? null,
41
+ }),
42
+ });
43
+ }
44
+ findOne(args) {
45
+ const { document, variables } = buildFindManyDocument('ResourceEvent', 'resourceEvents', args.select, {
46
+ where: {
47
+ id: {
48
+ equalTo: args.id,
49
+ },
50
+ },
51
+ first: 1,
52
+ }, 'ResourceEventFilter', 'ResourceEventOrderBy', connectionFieldsMap);
53
+ return new QueryBuilder({
54
+ client: this.client,
55
+ operation: 'query',
56
+ operationName: 'ResourceEvent',
57
+ fieldName: 'resourceEvent',
58
+ document,
59
+ variables,
60
+ transform: (data) => ({
61
+ resourceEvent: data.resourceEvents?.nodes?.[0] ?? null,
62
+ }),
63
+ });
64
+ }
65
+ create(args) {
66
+ const { document, variables } = buildCreateDocument('ResourceEvent', 'createResourceEvent', 'resourceEvent', args.select, args.data, 'CreateResourceEventInput', connectionFieldsMap);
67
+ return new QueryBuilder({
68
+ client: this.client,
69
+ operation: 'mutation',
70
+ operationName: 'ResourceEvent',
71
+ fieldName: 'createResourceEvent',
72
+ document,
73
+ variables,
74
+ });
75
+ }
76
+ update(args) {
77
+ const { document, variables } = buildUpdateByPkDocument('ResourceEvent', 'updateResourceEvent', 'resourceEvent', args.select, args.where.id, args.data, 'UpdateResourceEventInput', 'id', 'resourceEventPatch', connectionFieldsMap, {
78
+ createdAt: args.where.createdAt,
79
+ });
80
+ return new QueryBuilder({
81
+ client: this.client,
82
+ operation: 'mutation',
83
+ operationName: 'ResourceEvent',
84
+ fieldName: 'updateResourceEvent',
85
+ document,
86
+ variables,
87
+ });
88
+ }
89
+ delete(args) {
90
+ const { document, variables } = buildDeleteByPkDocument('ResourceEvent', 'deleteResourceEvent', 'resourceEvent', {
91
+ id: args.where.id,
92
+ createdAt: args.where.createdAt,
93
+ }, 'DeleteResourceEventInput', args.select, connectionFieldsMap);
94
+ return new QueryBuilder({
95
+ client: this.client,
96
+ operation: 'mutation',
97
+ operationName: 'ResourceEvent',
98
+ fieldName: 'deleteResourceEvent',
99
+ document,
100
+ variables,
101
+ });
102
+ }
103
+ }
@@ -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<{
@@ -98,6 +98,18 @@ export function createMutationOperations(client) {
98
98
  },
99
99
  ], connectionFieldsMap, 'AddNodeAndSavePayload'),
100
100
  }),
101
+ importGraphJson: (args, options) => new QueryBuilder({
102
+ client,
103
+ operation: 'mutation',
104
+ operationName: 'ImportGraphJson',
105
+ fieldName: 'importGraphJson',
106
+ ...buildCustomDocument('mutation', 'ImportGraphJson', 'importGraphJson', options.select, args, [
107
+ {
108
+ name: 'input',
109
+ type: 'ImportGraphJsonInput!',
110
+ },
111
+ ], connectionFieldsMap, 'ImportGraphJsonPayload'),
112
+ }),
101
113
  addEdge: (args, options) => new QueryBuilder({
102
114
  client,
103
115
  operation: 'mutation',
@@ -122,18 +134,6 @@ export function createMutationOperations(client) {
122
134
  },
123
135
  ], connectionFieldsMap, 'AddNodePayload'),
124
136
  }),
125
- importGraphJson: (args, options) => new QueryBuilder({
126
- client,
127
- operation: 'mutation',
128
- operationName: 'ImportGraphJson',
129
- fieldName: 'importGraphJson',
130
- ...buildCustomDocument('mutation', 'ImportGraphJson', 'importGraphJson', options.select, args, [
131
- {
132
- name: 'input',
133
- type: 'ImportGraphJsonInput!',
134
- },
135
- ], connectionFieldsMap, 'ImportGraphJsonPayload'),
136
- }),
137
137
  insertNodeAtPath: (args, options) => new QueryBuilder({
138
138
  client,
139
139
  operation: 'mutation',
@@ -25,19 +25,21 @@ import { BlueprintConstructionModel } from './models/blueprintConstruction';
25
25
  import { CryptoAuthModuleModel } from './models/cryptoAuthModule';
26
26
  import { SessionsModuleModel } from './models/sessionsModule';
27
27
  import { SecureTableProvisionModel } from './models/secureTableProvision';
28
- import { MerkleStoreModuleModel } from './models/merkleStoreModule';
29
- import { GraphModuleModel } from './models/graphModule';
30
28
  import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule';
31
29
  import { ConfigSecretsModuleModel } from './models/configSecretsModule';
30
+ import { GraphModuleModel } from './models/graphModule';
31
+ import { MerkleStoreModuleModel } from './models/merkleStoreModule';
32
32
  import { RateLimitMetersModuleModel } from './models/rateLimitMetersModule';
33
33
  import { RealtimeModuleModel } from './models/realtimeModule';
34
34
  import { WebauthnAuthModuleModel } from './models/webauthnAuthModule';
35
35
  import { FunctionInvocationModuleModel } from './models/functionInvocationModule';
36
36
  import { FunctionModuleModel } from './models/functionModule';
37
37
  import { InvitesModuleModel } from './models/invitesModule';
38
+ import { PrincipalAuthModuleModel } from './models/principalAuthModule';
38
39
  import { ComputeLogModuleModel } from './models/computeLogModule';
39
40
  import { InferenceLogModuleModel } from './models/inferenceLogModule';
40
41
  import { NamespaceModuleModel } from './models/namespaceModule';
42
+ import { ResourceModuleModel } from './models/resourceModule';
41
43
  import { StorageLogModuleModel } from './models/storageLogModule';
42
44
  import { TransferLogModuleModel } from './models/transferLogModule';
43
45
  import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule';
@@ -115,19 +117,21 @@ export declare function createClient(config: OrmClientConfig): {
115
117
  cryptoAuthModule: CryptoAuthModuleModel;
116
118
  sessionsModule: SessionsModuleModel;
117
119
  secureTableProvision: SecureTableProvisionModel;
118
- merkleStoreModule: MerkleStoreModuleModel;
119
- graphModule: GraphModuleModel;
120
120
  databaseProvisionModule: DatabaseProvisionModuleModel;
121
121
  configSecretsModule: ConfigSecretsModuleModel;
122
+ graphModule: GraphModuleModel;
123
+ merkleStoreModule: MerkleStoreModuleModel;
122
124
  rateLimitMetersModule: RateLimitMetersModuleModel;
123
125
  realtimeModule: RealtimeModuleModel;
124
126
  webauthnAuthModule: WebauthnAuthModuleModel;
125
127
  functionInvocationModule: FunctionInvocationModuleModel;
126
128
  functionModule: FunctionModuleModel;
127
129
  invitesModule: InvitesModuleModel;
130
+ principalAuthModule: PrincipalAuthModuleModel;
128
131
  computeLogModule: ComputeLogModuleModel;
129
132
  inferenceLogModule: InferenceLogModuleModel;
130
133
  namespaceModule: NamespaceModuleModel;
134
+ resourceModule: ResourceModuleModel;
131
135
  storageLogModule: StorageLogModuleModel;
132
136
  transferLogModule: TransferLogModuleModel;
133
137
  functionDeploymentModule: FunctionDeploymentModuleModel;
@@ -30,19 +30,21 @@ import { BlueprintConstructionModel } from './models/blueprintConstruction';
30
30
  import { CryptoAuthModuleModel } from './models/cryptoAuthModule';
31
31
  import { SessionsModuleModel } from './models/sessionsModule';
32
32
  import { SecureTableProvisionModel } from './models/secureTableProvision';
33
- import { MerkleStoreModuleModel } from './models/merkleStoreModule';
34
- import { GraphModuleModel } from './models/graphModule';
35
33
  import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule';
36
34
  import { ConfigSecretsModuleModel } from './models/configSecretsModule';
35
+ import { GraphModuleModel } from './models/graphModule';
36
+ import { MerkleStoreModuleModel } from './models/merkleStoreModule';
37
37
  import { RateLimitMetersModuleModel } from './models/rateLimitMetersModule';
38
38
  import { RealtimeModuleModel } from './models/realtimeModule';
39
39
  import { WebauthnAuthModuleModel } from './models/webauthnAuthModule';
40
40
  import { FunctionInvocationModuleModel } from './models/functionInvocationModule';
41
41
  import { FunctionModuleModel } from './models/functionModule';
42
42
  import { InvitesModuleModel } from './models/invitesModule';
43
+ import { PrincipalAuthModuleModel } from './models/principalAuthModule';
43
44
  import { ComputeLogModuleModel } from './models/computeLogModule';
44
45
  import { InferenceLogModuleModel } from './models/inferenceLogModule';
45
46
  import { NamespaceModuleModel } from './models/namespaceModule';
47
+ import { ResourceModuleModel } from './models/resourceModule';
46
48
  import { StorageLogModuleModel } from './models/storageLogModule';
47
49
  import { TransferLogModuleModel } from './models/transferLogModule';
48
50
  import { FunctionDeploymentModuleModel } from './models/functionDeploymentModule';
@@ -123,19 +125,21 @@ export function createClient(config) {
123
125
  cryptoAuthModule: new CryptoAuthModuleModel(client),
124
126
  sessionsModule: new SessionsModuleModel(client),
125
127
  secureTableProvision: new SecureTableProvisionModel(client),
126
- merkleStoreModule: new MerkleStoreModuleModel(client),
127
- graphModule: new GraphModuleModel(client),
128
128
  databaseProvisionModule: new DatabaseProvisionModuleModel(client),
129
129
  configSecretsModule: new ConfigSecretsModuleModel(client),
130
+ graphModule: new GraphModuleModel(client),
131
+ merkleStoreModule: new MerkleStoreModuleModel(client),
130
132
  rateLimitMetersModule: new RateLimitMetersModuleModel(client),
131
133
  realtimeModule: new RealtimeModuleModel(client),
132
134
  webauthnAuthModule: new WebauthnAuthModuleModel(client),
133
135
  functionInvocationModule: new FunctionInvocationModuleModel(client),
134
136
  functionModule: new FunctionModuleModel(client),
135
137
  invitesModule: new InvitesModuleModel(client),
138
+ principalAuthModule: new PrincipalAuthModuleModel(client),
136
139
  computeLogModule: new ComputeLogModuleModel(client),
137
140
  inferenceLogModule: new InferenceLogModuleModel(client),
138
141
  namespaceModule: new NamespaceModuleModel(client),
142
+ resourceModule: new ResourceModuleModel(client),
139
143
  storageLogModule: new StorageLogModuleModel(client),
140
144
  transferLogModule: new TransferLogModuleModel(client),
141
145
  functionDeploymentModule: new FunctionDeploymentModuleModel(client),