@constructive-io/sdk 0.9.2 → 0.10.1

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 (57) hide show
  1. package/README.md +0 -8
  2. package/admin/orm/input-types.d.ts +19 -95
  3. package/auth/orm/index.d.ts +6 -6
  4. package/auth/orm/index.js +6 -6
  5. package/auth/orm/input-types.d.ts +276 -311
  6. package/auth/orm/input-types.js +9 -1
  7. package/auth/orm/models/index.d.ts +3 -3
  8. package/auth/orm/models/index.js +7 -7
  9. package/esm/admin/orm/input-types.d.ts +19 -95
  10. package/esm/auth/orm/index.d.ts +6 -6
  11. package/esm/auth/orm/index.js +6 -6
  12. package/esm/auth/orm/input-types.d.ts +276 -311
  13. package/esm/auth/orm/input-types.js +9 -1
  14. package/esm/auth/orm/models/index.d.ts +3 -3
  15. package/esm/auth/orm/models/index.js +3 -3
  16. package/esm/objects/orm/input-types.d.ts +3 -27
  17. package/esm/public/orm/index.d.ts +81 -48
  18. package/esm/public/orm/index.js +26 -18
  19. package/esm/public/orm/input-types.d.ts +2318 -2557
  20. package/esm/public/orm/input-types.js +26 -1
  21. package/esm/public/orm/models/blueprint.d.ts +56 -0
  22. package/esm/public/orm/models/blueprint.js +94 -0
  23. package/esm/public/orm/models/blueprintTemplate.d.ts +56 -0
  24. package/esm/public/orm/models/blueprintTemplate.js +94 -0
  25. package/esm/public/orm/models/databaseTransfer.d.ts +56 -0
  26. package/esm/public/orm/models/databaseTransfer.js +94 -0
  27. package/esm/public/orm/models/embeddingChunk.d.ts +56 -0
  28. package/esm/public/orm/models/embeddingChunk.js +94 -0
  29. package/esm/public/orm/models/enum.d.ts +56 -0
  30. package/esm/public/orm/models/{uuidModule.js → enum.js} +23 -23
  31. package/esm/public/orm/models/index.d.ts +13 -9
  32. package/esm/public/orm/models/index.js +13 -9
  33. package/esm/public/orm/mutation/index.d.ts +98 -50
  34. package/esm/public/orm/mutation/index.js +126 -66
  35. package/index.js +8 -8
  36. package/objects/orm/input-types.d.ts +3 -27
  37. package/package.json +3 -3
  38. package/public/orm/index.d.ts +81 -48
  39. package/public/orm/index.js +26 -18
  40. package/public/orm/input-types.d.ts +2318 -2557
  41. package/public/orm/input-types.js +26 -1
  42. package/public/orm/models/blueprint.d.ts +56 -0
  43. package/public/orm/models/blueprint.js +98 -0
  44. package/public/orm/models/blueprintTemplate.d.ts +56 -0
  45. package/public/orm/models/blueprintTemplate.js +98 -0
  46. package/public/orm/models/databaseTransfer.d.ts +56 -0
  47. package/public/orm/models/databaseTransfer.js +98 -0
  48. package/public/orm/models/embeddingChunk.d.ts +56 -0
  49. package/public/orm/models/embeddingChunk.js +98 -0
  50. package/public/orm/models/enum.d.ts +56 -0
  51. package/public/orm/models/{uuidModule.js → enum.js} +25 -25
  52. package/public/orm/models/index.d.ts +13 -9
  53. package/public/orm/models/index.js +29 -21
  54. package/public/orm/mutation/index.d.ts +98 -50
  55. package/public/orm/mutation/index.js +126 -66
  56. package/esm/public/orm/models/uuidModule.d.ts +0 -56
  57. package/public/orm/models/uuidModule.d.ts +0 -56
@@ -19,6 +19,9 @@ export const connectionFieldsMap = {
19
19
  viewGrants: 'ViewGrant',
20
20
  viewRules: 'ViewRule',
21
21
  defaultPrivileges: 'DefaultPrivilege',
22
+ enums: 'Enum',
23
+ embeddingChunks: 'EmbeddingChunk',
24
+ databaseTransfers: 'DatabaseTransfer',
22
25
  apis: 'Api',
23
26
  apiModules: 'ApiModule',
24
27
  apiSchemas: 'ApiSchema',
@@ -48,10 +51,10 @@ export const connectionFieldsMap = {
48
51
  sessionsModules: 'SessionsModule',
49
52
  userAuthModules: 'UserAuthModule',
50
53
  usersModules: 'UsersModule',
51
- uuidModules: 'UuidModule',
52
54
  tableTemplateModules: 'TableTemplateModule',
53
55
  secureTableProvisions: 'SecureTableProvision',
54
56
  relationProvisions: 'RelationProvision',
57
+ blueprints: 'Blueprint',
55
58
  databaseProvisionModules: 'DatabaseProvisionModule',
56
59
  },
57
60
  Schema: {
@@ -59,6 +62,7 @@ export const connectionFieldsMap = {
59
62
  schemaGrants: 'SchemaGrant',
60
63
  views: 'View',
61
64
  defaultPrivileges: 'DefaultPrivilege',
65
+ enums: 'Enum',
62
66
  apiSchemas: 'ApiSchema',
63
67
  tableTemplateModulesByPrivateSchemaId: 'TableTemplateModule',
64
68
  tableTemplateModules: 'TableTemplateModule',
@@ -76,6 +80,8 @@ export const connectionFieldsMap = {
76
80
  uniqueConstraints: 'UniqueConstraint',
77
81
  views: 'View',
78
82
  viewTables: 'ViewTable',
83
+ embeddingChunksByChunksTableId: 'EmbeddingChunk',
84
+ embeddingChunks: 'EmbeddingChunk',
79
85
  tableTemplateModulesByOwnerTableId: 'TableTemplateModule',
80
86
  tableTemplateModules: 'TableTemplateModule',
81
87
  secureTableProvisions: 'SecureTableProvision',
@@ -98,19 +104,29 @@ export const connectionFieldsMap = {
98
104
  siteModules: 'SiteModule',
99
105
  siteThemes: 'SiteTheme',
100
106
  },
107
+ BlueprintTemplate: {
108
+ blueprintTemplatesByForkedFromId: 'BlueprintTemplate',
109
+ blueprintsByTemplateId: 'Blueprint',
110
+ },
101
111
  User: {
102
112
  ownedDatabases: 'Database',
113
+ appAdminGrantsByActorId: 'AppAdminGrant',
103
114
  appAdminGrantsByGrantorId: 'AppAdminGrant',
115
+ appOwnerGrantsByActorId: 'AppOwnerGrant',
104
116
  appOwnerGrantsByGrantorId: 'AppOwnerGrant',
117
+ appGrantsByActorId: 'AppGrant',
105
118
  appGrantsByGrantorId: 'AppGrant',
106
119
  orgMembershipsByActorId: 'OrgMembership',
107
120
  orgMembershipsByEntityId: 'OrgMembership',
108
121
  orgMembersByActorId: 'OrgMember',
109
122
  orgMembersByEntityId: 'OrgMember',
123
+ orgAdminGrantsByActorId: 'OrgAdminGrant',
110
124
  orgAdminGrantsByEntityId: 'OrgAdminGrant',
111
125
  orgAdminGrantsByGrantorId: 'OrgAdminGrant',
126
+ orgOwnerGrantsByActorId: 'OrgOwnerGrant',
112
127
  orgOwnerGrantsByEntityId: 'OrgOwnerGrant',
113
128
  orgOwnerGrantsByGrantorId: 'OrgOwnerGrant',
129
+ orgGrantsByActorId: 'OrgGrant',
114
130
  orgGrantsByEntityId: 'OrgGrant',
115
131
  orgGrantsByGrantorId: 'OrgGrant',
116
132
  parentOrgChartEdges: 'OrgChartEdge',
@@ -120,17 +136,26 @@ export const connectionFieldsMap = {
120
136
  orgChartEdgeGrantsByEntityId: 'OrgChartEdgeGrant',
121
137
  orgChartEdgeGrantsByGrantorId: 'OrgChartEdgeGrant',
122
138
  childOrgChartEdgeGrants: 'OrgChartEdgeGrant',
139
+ orgPermissionDefaultsByEntityId: 'OrgPermissionDefault',
123
140
  appLimitsByActorId: 'AppLimit',
124
141
  orgLimitsByActorId: 'OrgLimit',
125
142
  orgLimitsByEntityId: 'OrgLimit',
126
143
  appStepsByActorId: 'AppStep',
127
144
  appAchievementsByActorId: 'AppAchievement',
145
+ ownedAppLevels: 'AppLevel',
146
+ ownedEmails: 'Email',
147
+ ownedPhoneNumbers: 'PhoneNumber',
148
+ ownedCryptoAddresses: 'CryptoAddress',
149
+ ownedConnectedAccounts: 'ConnectedAccount',
128
150
  invitesBySenderId: 'Invite',
129
151
  claimedInvitesByReceiverId: 'ClaimedInvite',
130
152
  claimedInvitesBySenderId: 'ClaimedInvite',
131
153
  orgInvitesByEntityId: 'OrgInvite',
154
+ orgInvitesByReceiverId: 'OrgInvite',
132
155
  orgInvitesBySenderId: 'OrgInvite',
156
+ orgClaimedInvitesByEntityId: 'OrgClaimedInvite',
133
157
  orgClaimedInvitesByReceiverId: 'OrgClaimedInvite',
134
158
  orgClaimedInvitesBySenderId: 'OrgClaimedInvite',
159
+ auditLogsByActorId: 'AuditLog',
135
160
  },
136
161
  };
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Blueprint 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 { BlueprintWithRelations, BlueprintSelect, BlueprintFilter, BlueprintOrderBy, CreateBlueprintInput, BlueprintPatch } from '../input-types';
10
+ export declare class BlueprintModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends BlueprintSelect>(args: FindManyArgs<S, BlueprintFilter, never, BlueprintOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
16
+ blueprints: ConnectionResult<InferSelectResult<BlueprintWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends BlueprintSelect>(args: FindFirstArgs<S, BlueprintFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
21
+ blueprints: {
22
+ nodes: InferSelectResult<BlueprintWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends BlueprintSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
29
+ blueprint: InferSelectResult<BlueprintWithRelations, S> | null;
30
+ }>;
31
+ create<S extends BlueprintSelect>(args: CreateArgs<S, CreateBlueprintInput['blueprint']> & {
32
+ select: S;
33
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
34
+ createBlueprint: {
35
+ blueprint: InferSelectResult<BlueprintWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends BlueprintSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, BlueprintPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
43
+ updateBlueprint: {
44
+ blueprint: InferSelectResult<BlueprintWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends BlueprintSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, BlueprintSelect>): QueryBuilder<{
52
+ deleteBlueprint: {
53
+ blueprint: InferSelectResult<BlueprintWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,94 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class BlueprintModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('Blueprint', 'blueprints', 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
+ }, 'BlueprintFilter', 'BlueprintOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'Blueprint',
22
+ fieldName: 'blueprints',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('Blueprint', 'blueprints', args.select, {
29
+ where: args?.where,
30
+ }, 'BlueprintFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'Blueprint',
35
+ fieldName: 'blueprints',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('Blueprint', 'blueprints', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'BlueprintFilter', 'BlueprintOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'Blueprint',
53
+ fieldName: 'blueprint',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ blueprint: data.blueprints?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('Blueprint', 'createBlueprint', 'blueprint', args.select, args.data, 'CreateBlueprintInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'Blueprint',
67
+ fieldName: 'createBlueprint',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('Blueprint', 'updateBlueprint', 'blueprint', args.select, args.where.id, args.data, 'UpdateBlueprintInput', 'id', 'blueprintPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'Blueprint',
78
+ fieldName: 'updateBlueprint',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('Blueprint', 'deleteBlueprint', 'blueprint', args.where.id, 'DeleteBlueprintInput', 'id', args.select, connectionFieldsMap);
85
+ return new QueryBuilder({
86
+ client: this.client,
87
+ operation: 'mutation',
88
+ operationName: 'Blueprint',
89
+ fieldName: 'deleteBlueprint',
90
+ document,
91
+ variables,
92
+ });
93
+ }
94
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * BlueprintTemplate 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 { BlueprintTemplateWithRelations, BlueprintTemplateSelect, BlueprintTemplateFilter, BlueprintTemplateOrderBy, CreateBlueprintTemplateInput, BlueprintTemplatePatch } from '../input-types';
10
+ export declare class BlueprintTemplateModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends BlueprintTemplateSelect>(args: FindManyArgs<S, BlueprintTemplateFilter, never, BlueprintTemplateOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
16
+ blueprintTemplates: ConnectionResult<InferSelectResult<BlueprintTemplateWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends BlueprintTemplateSelect>(args: FindFirstArgs<S, BlueprintTemplateFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
21
+ blueprintTemplates: {
22
+ nodes: InferSelectResult<BlueprintTemplateWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends BlueprintTemplateSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
29
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S> | null;
30
+ }>;
31
+ create<S extends BlueprintTemplateSelect>(args: CreateArgs<S, CreateBlueprintTemplateInput['blueprintTemplate']> & {
32
+ select: S;
33
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
34
+ createBlueprintTemplate: {
35
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends BlueprintTemplateSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, BlueprintTemplatePatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
43
+ updateBlueprintTemplate: {
44
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends BlueprintTemplateSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, BlueprintTemplateSelect>): QueryBuilder<{
52
+ deleteBlueprintTemplate: {
53
+ blueprintTemplate: InferSelectResult<BlueprintTemplateWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,94 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class BlueprintTemplateModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('BlueprintTemplate', 'blueprintTemplates', 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
+ }, 'BlueprintTemplateFilter', 'BlueprintTemplateOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'BlueprintTemplate',
22
+ fieldName: 'blueprintTemplates',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('BlueprintTemplate', 'blueprintTemplates', args.select, {
29
+ where: args?.where,
30
+ }, 'BlueprintTemplateFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'BlueprintTemplate',
35
+ fieldName: 'blueprintTemplates',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('BlueprintTemplate', 'blueprintTemplates', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'BlueprintTemplateFilter', 'BlueprintTemplateOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'BlueprintTemplate',
53
+ fieldName: 'blueprintTemplate',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ blueprintTemplate: data.blueprintTemplates?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('BlueprintTemplate', 'createBlueprintTemplate', 'blueprintTemplate', args.select, args.data, 'CreateBlueprintTemplateInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'BlueprintTemplate',
67
+ fieldName: 'createBlueprintTemplate',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('BlueprintTemplate', 'updateBlueprintTemplate', 'blueprintTemplate', args.select, args.where.id, args.data, 'UpdateBlueprintTemplateInput', 'id', 'blueprintTemplatePatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'BlueprintTemplate',
78
+ fieldName: 'updateBlueprintTemplate',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('BlueprintTemplate', 'deleteBlueprintTemplate', 'blueprintTemplate', args.where.id, 'DeleteBlueprintTemplateInput', 'id', args.select, connectionFieldsMap);
85
+ return new QueryBuilder({
86
+ client: this.client,
87
+ operation: 'mutation',
88
+ operationName: 'BlueprintTemplate',
89
+ fieldName: 'deleteBlueprintTemplate',
90
+ document,
91
+ variables,
92
+ });
93
+ }
94
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * DatabaseTransfer 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 { DatabaseTransferWithRelations, DatabaseTransferSelect, DatabaseTransferFilter, DatabaseTransferOrderBy, CreateDatabaseTransferInput, DatabaseTransferPatch } from '../input-types';
10
+ export declare class DatabaseTransferModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends DatabaseTransferSelect>(args: FindManyArgs<S, DatabaseTransferFilter, never, DatabaseTransferOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
16
+ databaseTransfers: ConnectionResult<InferSelectResult<DatabaseTransferWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends DatabaseTransferSelect>(args: FindFirstArgs<S, DatabaseTransferFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
21
+ databaseTransfers: {
22
+ nodes: InferSelectResult<DatabaseTransferWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends DatabaseTransferSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
29
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S> | null;
30
+ }>;
31
+ create<S extends DatabaseTransferSelect>(args: CreateArgs<S, CreateDatabaseTransferInput['databaseTransfer']> & {
32
+ select: S;
33
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
34
+ createDatabaseTransfer: {
35
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends DatabaseTransferSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, DatabaseTransferPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
43
+ updateDatabaseTransfer: {
44
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends DatabaseTransferSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, DatabaseTransferSelect>): QueryBuilder<{
52
+ deleteDatabaseTransfer: {
53
+ databaseTransfer: InferSelectResult<DatabaseTransferWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,94 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class DatabaseTransferModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('DatabaseTransfer', 'databaseTransfers', 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
+ }, 'DatabaseTransferFilter', 'DatabaseTransferOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'DatabaseTransfer',
22
+ fieldName: 'databaseTransfers',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('DatabaseTransfer', 'databaseTransfers', args.select, {
29
+ where: args?.where,
30
+ }, 'DatabaseTransferFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'DatabaseTransfer',
35
+ fieldName: 'databaseTransfers',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('DatabaseTransfer', 'databaseTransfers', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'DatabaseTransferFilter', 'DatabaseTransferOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'DatabaseTransfer',
53
+ fieldName: 'databaseTransfer',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ databaseTransfer: data.databaseTransfers?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('DatabaseTransfer', 'createDatabaseTransfer', 'databaseTransfer', args.select, args.data, 'CreateDatabaseTransferInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'DatabaseTransfer',
67
+ fieldName: 'createDatabaseTransfer',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('DatabaseTransfer', 'updateDatabaseTransfer', 'databaseTransfer', args.select, args.where.id, args.data, 'UpdateDatabaseTransferInput', 'id', 'databaseTransferPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'DatabaseTransfer',
78
+ fieldName: 'updateDatabaseTransfer',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('DatabaseTransfer', 'deleteDatabaseTransfer', 'databaseTransfer', args.where.id, 'DeleteDatabaseTransferInput', 'id', args.select, connectionFieldsMap);
85
+ return new QueryBuilder({
86
+ client: this.client,
87
+ operation: 'mutation',
88
+ operationName: 'DatabaseTransfer',
89
+ fieldName: 'deleteDatabaseTransfer',
90
+ document,
91
+ variables,
92
+ });
93
+ }
94
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * EmbeddingChunk 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 { EmbeddingChunkWithRelations, EmbeddingChunkSelect, EmbeddingChunkFilter, EmbeddingChunkOrderBy, CreateEmbeddingChunkInput, EmbeddingChunkPatch } from '../input-types';
10
+ export declare class EmbeddingChunkModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends EmbeddingChunkSelect>(args: FindManyArgs<S, EmbeddingChunkFilter, never, EmbeddingChunkOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
16
+ embeddingChunks: ConnectionResult<InferSelectResult<EmbeddingChunkWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends EmbeddingChunkSelect>(args: FindFirstArgs<S, EmbeddingChunkFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
21
+ embeddingChunks: {
22
+ nodes: InferSelectResult<EmbeddingChunkWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends EmbeddingChunkSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
29
+ embeddingChunk: InferSelectResult<EmbeddingChunkWithRelations, S> | null;
30
+ }>;
31
+ create<S extends EmbeddingChunkSelect>(args: CreateArgs<S, CreateEmbeddingChunkInput['embeddingChunk']> & {
32
+ select: S;
33
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
34
+ createEmbeddingChunk: {
35
+ embeddingChunk: InferSelectResult<EmbeddingChunkWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends EmbeddingChunkSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, EmbeddingChunkPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
43
+ updateEmbeddingChunk: {
44
+ embeddingChunk: InferSelectResult<EmbeddingChunkWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends EmbeddingChunkSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, EmbeddingChunkSelect>): QueryBuilder<{
52
+ deleteEmbeddingChunk: {
53
+ embeddingChunk: InferSelectResult<EmbeddingChunkWithRelations, S>;
54
+ };
55
+ }>;
56
+ }