@constructive-io/sdk 0.23.2 → 0.24.0

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 (160) hide show
  1. package/admin/orm/index.d.ts +31 -33
  2. package/admin/orm/index.js +32 -33
  3. package/admin/orm/input-types.d.ts +2090 -2039
  4. package/admin/orm/input-types.js +4 -4
  5. package/admin/orm/models/appLimitEvent.d.ts +26 -2
  6. package/admin/orm/models/appLimitEvent.js +45 -0
  7. package/admin/orm/models/index.d.ts +15 -16
  8. package/admin/orm/models/index.js +31 -33
  9. package/admin/orm/models/orgLimitEvent.d.ts +26 -2
  10. package/admin/orm/models/orgLimitEvent.js +45 -0
  11. package/auth/orm/index.d.ts +8 -8
  12. package/auth/orm/index.js +4 -3
  13. package/auth/orm/input-types.d.ts +94 -94
  14. package/auth/orm/input-types.js +1 -1
  15. package/auth/orm/models/auditLogAuth.d.ts +54 -0
  16. package/{public/orm/models/agentMessage.js → auth/orm/models/auditLogAuth.js} +27 -27
  17. package/auth/orm/models/index.d.ts +1 -1
  18. package/auth/orm/models/index.js +3 -3
  19. package/auth/orm/mutation/index.d.ts +9 -9
  20. package/auth/orm/mutation/index.js +12 -12
  21. package/esm/admin/orm/index.d.ts +31 -33
  22. package/esm/admin/orm/index.js +31 -33
  23. package/esm/admin/orm/input-types.d.ts +2090 -2039
  24. package/esm/admin/orm/input-types.js +4 -4
  25. package/esm/admin/orm/models/appLimitEvent.d.ts +26 -2
  26. package/esm/admin/orm/models/appLimitEvent.js +46 -1
  27. package/esm/admin/orm/models/index.d.ts +15 -16
  28. package/esm/admin/orm/models/index.js +15 -16
  29. package/esm/admin/orm/models/orgLimitEvent.d.ts +26 -2
  30. package/esm/admin/orm/models/orgLimitEvent.js +46 -1
  31. package/esm/auth/orm/index.d.ts +8 -8
  32. package/esm/auth/orm/index.js +3 -3
  33. package/esm/auth/orm/input-types.d.ts +94 -94
  34. package/esm/auth/orm/input-types.js +1 -1
  35. package/esm/auth/orm/models/auditLogAuth.d.ts +54 -0
  36. package/esm/{public/orm/models/auditLog.js → auth/orm/models/auditLogAuth.js} +25 -25
  37. package/esm/auth/orm/models/index.d.ts +1 -1
  38. package/esm/auth/orm/models/index.js +1 -1
  39. package/esm/auth/orm/mutation/index.d.ts +9 -9
  40. package/esm/auth/orm/mutation/index.js +12 -12
  41. package/esm/objects/orm/index.d.ts +1 -1
  42. package/esm/objects/orm/index.js +1 -1
  43. package/esm/public/orm/index.d.ts +102 -153
  44. package/esm/public/orm/index.js +59 -55
  45. package/esm/public/orm/input-types.d.ts +6255 -3877
  46. package/esm/public/orm/input-types.js +24 -15
  47. package/esm/public/orm/models/agentModule.d.ts +54 -0
  48. package/esm/public/orm/models/{agentThread.js → agentModule.js} +25 -25
  49. package/esm/public/orm/models/appLimitEvent.d.ts +26 -2
  50. package/esm/public/orm/models/appLimitEvent.js +46 -1
  51. package/esm/public/orm/models/auditLogAuth.d.ts +54 -0
  52. package/esm/{auth/orm/models/auditLog.js → public/orm/models/auditLogAuth.js} +25 -25
  53. package/esm/public/orm/models/computeLogModule.d.ts +54 -0
  54. package/esm/public/orm/models/{commit.js → computeLogModule.js} +25 -25
  55. package/esm/public/orm/models/configSecretsOrgModule.d.ts +54 -0
  56. package/esm/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +25 -25
  57. package/esm/public/orm/models/configSecretsUserModule.d.ts +54 -0
  58. package/esm/public/orm/models/configSecretsUserModule.js +100 -0
  59. package/esm/public/orm/models/dbUsageModule.d.ts +54 -0
  60. package/esm/{admin/orm/models/usageSnapshot.js → public/orm/models/dbUsageModule.js} +25 -25
  61. package/esm/public/orm/models/functionModule.d.ts +54 -0
  62. package/esm/public/orm/models/{agentMessage.js → functionModule.js} +25 -25
  63. package/esm/public/orm/models/graphModule.d.ts +54 -0
  64. package/esm/public/orm/models/{agentTask.js → graphModule.js} +25 -25
  65. package/esm/public/orm/models/index.d.ts +29 -27
  66. package/esm/public/orm/models/index.js +29 -27
  67. package/esm/public/orm/models/inferenceLogModule.d.ts +54 -0
  68. package/esm/public/orm/models/inferenceLogModule.js +100 -0
  69. package/esm/public/orm/models/merkleStoreModule.d.ts +54 -0
  70. package/esm/public/orm/models/merkleStoreModule.js +100 -0
  71. package/esm/public/orm/models/namespaceModule.d.ts +54 -0
  72. package/esm/public/orm/models/namespaceModule.js +100 -0
  73. package/esm/public/orm/models/orgLimitEvent.d.ts +26 -2
  74. package/esm/public/orm/models/orgLimitEvent.js +46 -1
  75. package/esm/public/orm/models/storageLogModule.d.ts +54 -0
  76. package/esm/public/orm/models/{store.js → storageLogModule.js} +25 -25
  77. package/esm/public/orm/models/transferLogModule.d.ts +54 -0
  78. package/esm/public/orm/models/transferLogModule.js +100 -0
  79. package/esm/public/orm/mutation/index.d.ts +69 -133
  80. package/esm/public/orm/mutation/index.js +78 -174
  81. package/esm/public/orm/query/index.d.ts +22 -71
  82. package/esm/public/orm/query/index.js +36 -124
  83. package/objects/orm/index.d.ts +1 -1
  84. package/objects/orm/index.js +2 -1
  85. package/package.json +6 -6
  86. package/public/orm/index.d.ts +102 -153
  87. package/public/orm/index.js +60 -55
  88. package/public/orm/input-types.d.ts +6255 -3877
  89. package/public/orm/input-types.js +24 -15
  90. package/public/orm/models/agentModule.d.ts +54 -0
  91. package/public/orm/models/{agentThread.js → agentModule.js} +27 -27
  92. package/public/orm/models/appLimitEvent.d.ts +26 -2
  93. package/public/orm/models/appLimitEvent.js +45 -0
  94. package/public/orm/models/auditLogAuth.d.ts +54 -0
  95. package/public/orm/models/{usageSnapshot.js → auditLogAuth.js} +27 -27
  96. package/public/orm/models/computeLogModule.d.ts +54 -0
  97. package/public/orm/models/computeLogModule.js +104 -0
  98. package/public/orm/models/configSecretsOrgModule.d.ts +54 -0
  99. package/public/orm/models/{encryptedSecretsModule.js → configSecretsOrgModule.js} +27 -27
  100. package/public/orm/models/configSecretsUserModule.d.ts +54 -0
  101. package/public/orm/models/{ref.js → configSecretsUserModule.js} +27 -27
  102. package/public/orm/models/dbUsageModule.d.ts +54 -0
  103. package/{admin/orm/models/usageSnapshot.js → public/orm/models/dbUsageModule.js} +27 -27
  104. package/public/orm/models/functionModule.d.ts +54 -0
  105. package/{auth/orm/models/auditLog.js → public/orm/models/functionModule.js} +27 -27
  106. package/public/orm/models/graphModule.d.ts +54 -0
  107. package/public/orm/models/{agentTask.js → graphModule.js} +27 -27
  108. package/public/orm/models/index.d.ts +29 -27
  109. package/public/orm/models/index.js +61 -57
  110. package/public/orm/models/inferenceLogModule.d.ts +54 -0
  111. package/public/orm/models/inferenceLogModule.js +104 -0
  112. package/public/orm/models/merkleStoreModule.d.ts +54 -0
  113. package/public/orm/models/merkleStoreModule.js +104 -0
  114. package/public/orm/models/namespaceModule.d.ts +54 -0
  115. package/public/orm/models/namespaceModule.js +104 -0
  116. package/public/orm/models/orgLimitEvent.d.ts +26 -2
  117. package/public/orm/models/orgLimitEvent.js +45 -0
  118. package/public/orm/models/storageLogModule.d.ts +54 -0
  119. package/public/orm/models/storageLogModule.js +104 -0
  120. package/public/orm/models/transferLogModule.d.ts +54 -0
  121. package/public/orm/models/transferLogModule.js +104 -0
  122. package/public/orm/mutation/index.d.ts +69 -133
  123. package/public/orm/mutation/index.js +78 -174
  124. package/public/orm/query/index.d.ts +22 -71
  125. package/public/orm/query/index.js +36 -124
  126. package/admin/orm/models/usageSnapshot.d.ts +0 -54
  127. package/auth/orm/models/auditLog.d.ts +0 -54
  128. package/esm/admin/orm/models/usageSnapshot.d.ts +0 -54
  129. package/esm/auth/orm/models/auditLog.d.ts +0 -54
  130. package/esm/public/orm/models/agentMessage.d.ts +0 -54
  131. package/esm/public/orm/models/agentTask.d.ts +0 -54
  132. package/esm/public/orm/models/agentThread.d.ts +0 -54
  133. package/esm/public/orm/models/auditLog.d.ts +0 -54
  134. package/esm/public/orm/models/commit.d.ts +0 -54
  135. package/esm/public/orm/models/encryptedSecretsModule.d.ts +0 -54
  136. package/esm/public/orm/models/getAllRecord.d.ts +0 -30
  137. package/esm/public/orm/models/getAllRecord.js +0 -55
  138. package/esm/public/orm/models/object.d.ts +0 -54
  139. package/esm/public/orm/models/object.js +0 -90
  140. package/esm/public/orm/models/ref.d.ts +0 -54
  141. package/esm/public/orm/models/ref.js +0 -100
  142. package/esm/public/orm/models/store.d.ts +0 -54
  143. package/esm/public/orm/models/usageSnapshot.d.ts +0 -54
  144. package/esm/public/orm/models/usageSnapshot.js +0 -100
  145. package/public/orm/models/agentMessage.d.ts +0 -54
  146. package/public/orm/models/agentTask.d.ts +0 -54
  147. package/public/orm/models/agentThread.d.ts +0 -54
  148. package/public/orm/models/auditLog.d.ts +0 -54
  149. package/public/orm/models/auditLog.js +0 -104
  150. package/public/orm/models/commit.d.ts +0 -54
  151. package/public/orm/models/commit.js +0 -104
  152. package/public/orm/models/encryptedSecretsModule.d.ts +0 -54
  153. package/public/orm/models/getAllRecord.d.ts +0 -30
  154. package/public/orm/models/getAllRecord.js +0 -59
  155. package/public/orm/models/object.d.ts +0 -54
  156. package/public/orm/models/object.js +0 -94
  157. package/public/orm/models/ref.d.ts +0 -54
  158. package/public/orm/models/store.d.ts +0 -54
  159. package/public/orm/models/store.js +0 -104
  160. package/public/orm/models/usageSnapshot.d.ts +0 -54
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetAllRecordModel = void 0;
4
- const query_builder_1 = require("../query-builder");
5
- const input_types_1 = require("../input-types");
6
- class GetAllRecordModel {
7
- client;
8
- constructor(client) {
9
- this.client = client;
10
- }
11
- findMany(args) {
12
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('GetAllRecord', 'getAll', 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
- }, 'GetAllRecordFilter', 'GetAllRecordsOrderBy', input_types_1.connectionFieldsMap);
21
- return new query_builder_1.QueryBuilder({
22
- client: this.client,
23
- operation: 'query',
24
- operationName: 'GetAllRecord',
25
- fieldName: 'getAll',
26
- document,
27
- variables,
28
- });
29
- }
30
- findFirst(args) {
31
- const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('GetAllRecord', 'getAll', args.select, {
32
- where: args?.where,
33
- orderBy: args?.orderBy,
34
- }, 'GetAllRecordFilter', 'GetAllRecordsOrderBy', input_types_1.connectionFieldsMap);
35
- return new query_builder_1.QueryBuilder({
36
- client: this.client,
37
- operation: 'query',
38
- operationName: 'GetAllRecord',
39
- fieldName: 'getAllRecord',
40
- document,
41
- variables,
42
- transform: (data) => ({
43
- getAllRecord: data.getAll?.nodes?.[0] ?? null,
44
- }),
45
- });
46
- }
47
- create(args) {
48
- const { document, variables } = (0, query_builder_1.buildCreateDocument)('GetAllRecord', 'createGetAllRecord', 'getAllRecord', args.select, args.data, 'CreateGetAllRecordInput', input_types_1.connectionFieldsMap);
49
- return new query_builder_1.QueryBuilder({
50
- client: this.client,
51
- operation: 'mutation',
52
- operationName: 'GetAllRecord',
53
- fieldName: 'createGetAllRecord',
54
- document,
55
- variables,
56
- });
57
- }
58
- }
59
- exports.GetAllRecordModel = GetAllRecordModel;
@@ -1,54 +0,0 @@
1
- /**
2
- * Object model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { ObjectWithRelations, ObjectSelect, ObjectFilter, ObjectOrderBy, CreateObjectInput, ObjectPatch } from '../input-types';
10
- export declare class ObjectModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends ObjectSelect>(args: FindManyArgs<S, ObjectFilter, ObjectOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
16
- objects: ConnectionResult<InferSelectResult<ObjectWithRelations, S>>;
17
- }>;
18
- findFirst<S extends ObjectSelect>(args: FindFirstArgs<S, ObjectFilter, ObjectOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
21
- object: InferSelectResult<ObjectWithRelations, S> | null;
22
- }>;
23
- findOne<S extends ObjectSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
27
- object: InferSelectResult<ObjectWithRelations, S> | null;
28
- }>;
29
- create<S extends ObjectSelect>(args: CreateArgs<S, CreateObjectInput['object']> & {
30
- select: S;
31
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
32
- createObject: {
33
- object: InferSelectResult<ObjectWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends ObjectSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, ObjectPatch> & {
39
- select: S;
40
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
41
- updateObject: {
42
- object: InferSelectResult<ObjectWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends ObjectSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, ObjectSelect>): QueryBuilder<{
50
- deleteObject: {
51
- object: InferSelectResult<ObjectWithRelations, S>;
52
- };
53
- }>;
54
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectModel = void 0;
4
- const query_builder_1 = require("../query-builder");
5
- const input_types_1 = require("../input-types");
6
- class ObjectModel {
7
- client;
8
- constructor(client) {
9
- this.client = client;
10
- }
11
- findMany(args) {
12
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('Object', 'objects', 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
- }, 'ObjectFilter', 'ObjectOrderBy', input_types_1.connectionFieldsMap);
21
- return new query_builder_1.QueryBuilder({
22
- client: this.client,
23
- operation: 'query',
24
- operationName: 'Object',
25
- fieldName: 'objects',
26
- document,
27
- variables,
28
- });
29
- }
30
- findFirst(args) {
31
- const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('Object', 'objects', args.select, {
32
- where: args?.where,
33
- orderBy: args?.orderBy,
34
- }, 'ObjectFilter', 'ObjectOrderBy', input_types_1.connectionFieldsMap);
35
- return new query_builder_1.QueryBuilder({
36
- client: this.client,
37
- operation: 'query',
38
- operationName: 'Object',
39
- fieldName: 'object',
40
- document,
41
- variables,
42
- transform: (data) => ({
43
- object: data.objects?.nodes?.[0] ?? null,
44
- }),
45
- });
46
- }
47
- findOne(args) {
48
- const { document, variables } = (0, query_builder_1.buildFindOneDocument)('Object', 'getNodeAtPath', args.id, args.select, 'id', 'UUID!', input_types_1.connectionFieldsMap);
49
- return new query_builder_1.QueryBuilder({
50
- client: this.client,
51
- operation: 'query',
52
- operationName: 'Object',
53
- fieldName: 'object',
54
- document,
55
- variables,
56
- });
57
- }
58
- create(args) {
59
- const { document, variables } = (0, query_builder_1.buildCreateDocument)('Object', 'createObject', 'object', args.select, args.data, 'CreateObjectInput', input_types_1.connectionFieldsMap);
60
- return new query_builder_1.QueryBuilder({
61
- client: this.client,
62
- operation: 'mutation',
63
- operationName: 'Object',
64
- fieldName: 'createObject',
65
- document,
66
- variables,
67
- });
68
- }
69
- update(args) {
70
- const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('Object', 'updateObject', 'object', args.select, args.where.id, args.data, 'UpdateObjectInput', 'id', 'objectPatch', input_types_1.connectionFieldsMap);
71
- return new query_builder_1.QueryBuilder({
72
- client: this.client,
73
- operation: 'mutation',
74
- operationName: 'Object',
75
- fieldName: 'updateObject',
76
- document,
77
- variables,
78
- });
79
- }
80
- delete(args) {
81
- const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('Object', 'deleteObject', 'object', {
82
- id: args.where.id,
83
- }, 'DeleteObjectInput', args.select, input_types_1.connectionFieldsMap);
84
- return new query_builder_1.QueryBuilder({
85
- client: this.client,
86
- operation: 'mutation',
87
- operationName: 'Object',
88
- fieldName: 'deleteObject',
89
- document,
90
- variables,
91
- });
92
- }
93
- }
94
- exports.ObjectModel = ObjectModel;
@@ -1,54 +0,0 @@
1
- /**
2
- * Ref model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { RefWithRelations, RefSelect, RefFilter, RefOrderBy, CreateRefInput, RefPatch } from '../input-types';
10
- export declare class RefModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends RefSelect>(args: FindManyArgs<S, RefFilter, RefOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
16
- refs: ConnectionResult<InferSelectResult<RefWithRelations, S>>;
17
- }>;
18
- findFirst<S extends RefSelect>(args: FindFirstArgs<S, RefFilter, RefOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
21
- ref: InferSelectResult<RefWithRelations, S> | null;
22
- }>;
23
- findOne<S extends RefSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
27
- ref: InferSelectResult<RefWithRelations, S> | null;
28
- }>;
29
- create<S extends RefSelect>(args: CreateArgs<S, CreateRefInput['ref']> & {
30
- select: S;
31
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
32
- createRef: {
33
- ref: InferSelectResult<RefWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends RefSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, RefPatch> & {
39
- select: S;
40
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
41
- updateRef: {
42
- ref: InferSelectResult<RefWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends RefSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, RefSelect>): QueryBuilder<{
50
- deleteRef: {
51
- ref: InferSelectResult<RefWithRelations, S>;
52
- };
53
- }>;
54
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * Store model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { StoreWithRelations, StoreSelect, StoreFilter, StoreOrderBy, CreateStoreInput, StorePatch } from '../input-types';
10
- export declare class StoreModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends StoreSelect>(args: FindManyArgs<S, StoreFilter, StoreOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
16
- stores: ConnectionResult<InferSelectResult<StoreWithRelations, S>>;
17
- }>;
18
- findFirst<S extends StoreSelect>(args: FindFirstArgs<S, StoreFilter, StoreOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
21
- store: InferSelectResult<StoreWithRelations, S> | null;
22
- }>;
23
- findOne<S extends StoreSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
27
- store: InferSelectResult<StoreWithRelations, S> | null;
28
- }>;
29
- create<S extends StoreSelect>(args: CreateArgs<S, CreateStoreInput['store']> & {
30
- select: S;
31
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
32
- createStore: {
33
- store: InferSelectResult<StoreWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends StoreSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, StorePatch> & {
39
- select: S;
40
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
41
- updateStore: {
42
- store: InferSelectResult<StoreWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends StoreSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, StoreSelect>): QueryBuilder<{
50
- deleteStore: {
51
- store: InferSelectResult<StoreWithRelations, S>;
52
- };
53
- }>;
54
- }
@@ -1,104 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoreModel = void 0;
4
- const query_builder_1 = require("../query-builder");
5
- const input_types_1 = require("../input-types");
6
- class StoreModel {
7
- client;
8
- constructor(client) {
9
- this.client = client;
10
- }
11
- findMany(args) {
12
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('Store', 'stores', 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
- }, 'StoreFilter', 'StoreOrderBy', input_types_1.connectionFieldsMap);
21
- return new query_builder_1.QueryBuilder({
22
- client: this.client,
23
- operation: 'query',
24
- operationName: 'Store',
25
- fieldName: 'stores',
26
- document,
27
- variables,
28
- });
29
- }
30
- findFirst(args) {
31
- const { document, variables } = (0, query_builder_1.buildFindFirstDocument)('Store', 'stores', args.select, {
32
- where: args?.where,
33
- orderBy: args?.orderBy,
34
- }, 'StoreFilter', 'StoreOrderBy', input_types_1.connectionFieldsMap);
35
- return new query_builder_1.QueryBuilder({
36
- client: this.client,
37
- operation: 'query',
38
- operationName: 'Store',
39
- fieldName: 'store',
40
- document,
41
- variables,
42
- transform: (data) => ({
43
- store: data.stores?.nodes?.[0] ?? null,
44
- }),
45
- });
46
- }
47
- findOne(args) {
48
- const { document, variables } = (0, query_builder_1.buildFindManyDocument)('Store', 'stores', args.select, {
49
- where: {
50
- id: {
51
- equalTo: args.id,
52
- },
53
- },
54
- first: 1,
55
- }, 'StoreFilter', 'StoreOrderBy', input_types_1.connectionFieldsMap);
56
- return new query_builder_1.QueryBuilder({
57
- client: this.client,
58
- operation: 'query',
59
- operationName: 'Store',
60
- fieldName: 'store',
61
- document,
62
- variables,
63
- transform: (data) => ({
64
- store: data.stores?.nodes?.[0] ?? null,
65
- }),
66
- });
67
- }
68
- create(args) {
69
- const { document, variables } = (0, query_builder_1.buildCreateDocument)('Store', 'createStore', 'store', args.select, args.data, 'CreateStoreInput', input_types_1.connectionFieldsMap);
70
- return new query_builder_1.QueryBuilder({
71
- client: this.client,
72
- operation: 'mutation',
73
- operationName: 'Store',
74
- fieldName: 'createStore',
75
- document,
76
- variables,
77
- });
78
- }
79
- update(args) {
80
- const { document, variables } = (0, query_builder_1.buildUpdateByPkDocument)('Store', 'updateStore', 'store', args.select, args.where.id, args.data, 'UpdateStoreInput', 'id', 'storePatch', input_types_1.connectionFieldsMap);
81
- return new query_builder_1.QueryBuilder({
82
- client: this.client,
83
- operation: 'mutation',
84
- operationName: 'Store',
85
- fieldName: 'updateStore',
86
- document,
87
- variables,
88
- });
89
- }
90
- delete(args) {
91
- const { document, variables } = (0, query_builder_1.buildDeleteByPkDocument)('Store', 'deleteStore', 'store', {
92
- id: args.where.id,
93
- }, 'DeleteStoreInput', args.select, input_types_1.connectionFieldsMap);
94
- return new query_builder_1.QueryBuilder({
95
- client: this.client,
96
- operation: 'mutation',
97
- operationName: 'Store',
98
- fieldName: 'deleteStore',
99
- document,
100
- variables,
101
- });
102
- }
103
- }
104
- exports.StoreModel = StoreModel;
@@ -1,54 +0,0 @@
1
- /**
2
- * UsageSnapshot model for ORM client
3
- * @generated by @constructive-io/graphql-codegen
4
- * DO NOT EDIT - changes will be overwritten
5
- */
6
- import { OrmClient } from '../client';
7
- import { QueryBuilder } from '../query-builder';
8
- import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
- import type { UsageSnapshotWithRelations, UsageSnapshotSelect, UsageSnapshotFilter, UsageSnapshotOrderBy, CreateUsageSnapshotInput, UsageSnapshotPatch } from '../input-types';
10
- export declare class UsageSnapshotModel {
11
- private client;
12
- constructor(client: OrmClient);
13
- findMany<S extends UsageSnapshotSelect>(args: FindManyArgs<S, UsageSnapshotFilter, UsageSnapshotOrderBy> & {
14
- select: S;
15
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
16
- usageSnapshots: ConnectionResult<InferSelectResult<UsageSnapshotWithRelations, S>>;
17
- }>;
18
- findFirst<S extends UsageSnapshotSelect>(args: FindFirstArgs<S, UsageSnapshotFilter, UsageSnapshotOrderBy> & {
19
- select: S;
20
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
21
- usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
22
- }>;
23
- findOne<S extends UsageSnapshotSelect>(args: {
24
- id: string;
25
- select: S;
26
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
27
- usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S> | null;
28
- }>;
29
- create<S extends UsageSnapshotSelect>(args: CreateArgs<S, CreateUsageSnapshotInput['usageSnapshot']> & {
30
- select: S;
31
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
32
- createUsageSnapshot: {
33
- usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
34
- };
35
- }>;
36
- update<S extends UsageSnapshotSelect>(args: UpdateArgs<S, {
37
- id: string;
38
- }, UsageSnapshotPatch> & {
39
- select: S;
40
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
41
- updateUsageSnapshot: {
42
- usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
43
- };
44
- }>;
45
- delete<S extends UsageSnapshotSelect>(args: DeleteArgs<{
46
- id: string;
47
- }, S> & {
48
- select: S;
49
- } & StrictSelect<S, UsageSnapshotSelect>): QueryBuilder<{
50
- deleteUsageSnapshot: {
51
- usageSnapshot: InferSelectResult<UsageSnapshotWithRelations, S>;
52
- };
53
- }>;
54
- }