@constructive-io/sdk 0.20.3 → 0.20.5

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 (165) hide show
  1. package/admin/orm/index.d.ts +24 -11
  2. package/admin/orm/index.js +24 -6
  3. package/admin/orm/input-types.d.ts +2108 -545
  4. package/admin/orm/input-types.js +13 -1
  5. package/admin/orm/models/appLimitCap.d.ts +56 -0
  6. package/admin/orm/models/appLimitCap.js +100 -0
  7. package/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  8. package/admin/orm/models/appLimitCapsDefault.js +100 -0
  9. package/admin/orm/models/appLimitCredit.d.ts +56 -0
  10. package/admin/orm/models/appLimitCredit.js +100 -0
  11. package/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  12. package/admin/orm/models/appLimitCreditCode.js +100 -0
  13. package/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  14. package/admin/orm/models/appLimitCreditCodeItem.js +100 -0
  15. package/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  16. package/admin/orm/models/appLimitCreditRedemption.js +100 -0
  17. package/admin/orm/models/index.d.ts +12 -3
  18. package/admin/orm/models/index.js +25 -7
  19. package/admin/orm/models/orgLimitCap.d.ts +56 -0
  20. package/admin/orm/models/orgLimitCap.js +100 -0
  21. package/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  22. package/admin/orm/models/orgLimitCapsDefault.js +100 -0
  23. package/admin/orm/models/orgLimitCredit.d.ts +56 -0
  24. package/admin/orm/models/orgLimitCredit.js +100 -0
  25. package/admin/orm/mutation/index.d.ts +1 -16
  26. package/admin/orm/mutation/index.js +0 -12
  27. package/admin/orm/query-builder.js +24 -0
  28. package/auth/orm/index.d.ts +0 -5
  29. package/auth/orm/input-types.d.ts +0 -38
  30. package/auth/orm/mutation/index.d.ts +1 -16
  31. package/auth/orm/mutation/index.js +0 -12
  32. package/auth/orm/query-builder.js +24 -0
  33. package/esm/admin/orm/index.d.ts +24 -11
  34. package/esm/admin/orm/index.js +24 -6
  35. package/esm/admin/orm/input-types.d.ts +2108 -545
  36. package/esm/admin/orm/input-types.js +13 -1
  37. package/esm/admin/orm/models/appLimitCap.d.ts +56 -0
  38. package/esm/admin/orm/models/appLimitCap.js +96 -0
  39. package/esm/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  40. package/esm/admin/orm/models/appLimitCapsDefault.js +96 -0
  41. package/esm/admin/orm/models/appLimitCredit.d.ts +56 -0
  42. package/esm/admin/orm/models/appLimitCredit.js +96 -0
  43. package/esm/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  44. package/esm/admin/orm/models/appLimitCreditCode.js +96 -0
  45. package/esm/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  46. package/esm/admin/orm/models/appLimitCreditCodeItem.js +96 -0
  47. package/esm/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  48. package/esm/admin/orm/models/appLimitCreditRedemption.js +96 -0
  49. package/esm/admin/orm/models/index.d.ts +12 -3
  50. package/esm/admin/orm/models/index.js +12 -3
  51. package/esm/admin/orm/models/orgLimitCap.d.ts +56 -0
  52. package/esm/admin/orm/models/orgLimitCap.js +96 -0
  53. package/esm/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  54. package/esm/admin/orm/models/orgLimitCapsDefault.js +96 -0
  55. package/esm/admin/orm/models/orgLimitCredit.d.ts +56 -0
  56. package/esm/admin/orm/models/orgLimitCredit.js +96 -0
  57. package/esm/admin/orm/mutation/index.d.ts +1 -16
  58. package/esm/admin/orm/mutation/index.js +0 -12
  59. package/esm/admin/orm/query-builder.js +24 -0
  60. package/esm/auth/orm/index.d.ts +0 -5
  61. package/esm/auth/orm/input-types.d.ts +0 -38
  62. package/esm/auth/orm/mutation/index.d.ts +1 -16
  63. package/esm/auth/orm/mutation/index.js +0 -12
  64. package/esm/auth/orm/query-builder.js +24 -0
  65. package/esm/objects/orm/index.d.ts +0 -5
  66. package/esm/objects/orm/input-types.d.ts +0 -38
  67. package/esm/objects/orm/mutation/index.d.ts +1 -16
  68. package/esm/objects/orm/mutation/index.js +0 -12
  69. package/esm/objects/orm/query-builder.js +24 -0
  70. package/esm/public/orm/index.d.ts +43 -7
  71. package/esm/public/orm/index.js +38 -2
  72. package/esm/public/orm/input-types.d.ts +4601 -321
  73. package/esm/public/orm/input-types.js +21 -0
  74. package/esm/public/orm/models/apiSetting.d.ts +56 -0
  75. package/esm/public/orm/models/apiSetting.js +96 -0
  76. package/esm/public/orm/models/appLimitCap.d.ts +56 -0
  77. package/esm/public/orm/models/appLimitCap.js +96 -0
  78. package/esm/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  79. package/esm/public/orm/models/appLimitCapsDefault.js +96 -0
  80. package/esm/public/orm/models/appLimitCredit.d.ts +56 -0
  81. package/esm/public/orm/models/appLimitCredit.js +96 -0
  82. package/esm/public/orm/models/appLimitCreditCode.d.ts +56 -0
  83. package/esm/public/orm/models/appLimitCreditCode.js +96 -0
  84. package/esm/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  85. package/esm/public/orm/models/appLimitCreditCodeItem.js +96 -0
  86. package/esm/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  87. package/esm/public/orm/models/appLimitCreditRedemption.js +96 -0
  88. package/esm/public/orm/models/billingProviderModule.d.ts +56 -0
  89. package/esm/public/orm/models/billingProviderModule.js +96 -0
  90. package/esm/public/orm/models/corsSetting.d.ts +56 -0
  91. package/esm/public/orm/models/corsSetting.js +96 -0
  92. package/esm/public/orm/models/databaseSetting.d.ts +56 -0
  93. package/esm/public/orm/models/databaseSetting.js +96 -0
  94. package/esm/public/orm/models/function.d.ts +56 -0
  95. package/esm/public/orm/models/function.js +96 -0
  96. package/esm/public/orm/models/index.d.ts +19 -1
  97. package/esm/public/orm/models/index.js +19 -1
  98. package/esm/public/orm/models/orgLimitCap.d.ts +56 -0
  99. package/esm/public/orm/models/orgLimitCap.js +96 -0
  100. package/esm/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  101. package/esm/public/orm/models/orgLimitCapsDefault.js +96 -0
  102. package/esm/public/orm/models/orgLimitCredit.d.ts +56 -0
  103. package/esm/public/orm/models/orgLimitCredit.js +96 -0
  104. package/esm/public/orm/models/partition.d.ts +56 -0
  105. package/esm/public/orm/models/partition.js +96 -0
  106. package/esm/public/orm/models/pubkeySetting.d.ts +56 -0
  107. package/esm/public/orm/models/pubkeySetting.js +96 -0
  108. package/esm/public/orm/models/rlsSetting.d.ts +56 -0
  109. package/esm/public/orm/models/rlsSetting.js +96 -0
  110. package/esm/public/orm/models/webauthnSetting.d.ts +56 -0
  111. package/esm/public/orm/models/webauthnSetting.js +96 -0
  112. package/esm/public/orm/mutation/index.d.ts +9 -16
  113. package/esm/public/orm/mutation/index.js +12 -12
  114. package/esm/public/orm/query-builder.js +24 -0
  115. package/objects/orm/index.d.ts +0 -5
  116. package/objects/orm/input-types.d.ts +0 -38
  117. package/objects/orm/mutation/index.d.ts +1 -16
  118. package/objects/orm/mutation/index.js +0 -12
  119. package/objects/orm/query-builder.js +24 -0
  120. package/package.json +4 -4
  121. package/public/orm/index.d.ts +43 -7
  122. package/public/orm/index.js +38 -2
  123. package/public/orm/input-types.d.ts +4601 -321
  124. package/public/orm/input-types.js +21 -0
  125. package/public/orm/models/apiSetting.d.ts +56 -0
  126. package/public/orm/models/apiSetting.js +100 -0
  127. package/public/orm/models/appLimitCap.d.ts +56 -0
  128. package/public/orm/models/appLimitCap.js +100 -0
  129. package/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  130. package/public/orm/models/appLimitCapsDefault.js +100 -0
  131. package/public/orm/models/appLimitCredit.d.ts +56 -0
  132. package/public/orm/models/appLimitCredit.js +100 -0
  133. package/public/orm/models/appLimitCreditCode.d.ts +56 -0
  134. package/public/orm/models/appLimitCreditCode.js +100 -0
  135. package/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  136. package/public/orm/models/appLimitCreditCodeItem.js +100 -0
  137. package/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  138. package/public/orm/models/appLimitCreditRedemption.js +100 -0
  139. package/public/orm/models/billingProviderModule.d.ts +56 -0
  140. package/public/orm/models/billingProviderModule.js +100 -0
  141. package/public/orm/models/corsSetting.d.ts +56 -0
  142. package/public/orm/models/corsSetting.js +100 -0
  143. package/public/orm/models/databaseSetting.d.ts +56 -0
  144. package/public/orm/models/databaseSetting.js +100 -0
  145. package/public/orm/models/function.d.ts +56 -0
  146. package/public/orm/models/function.js +100 -0
  147. package/public/orm/models/index.d.ts +19 -1
  148. package/public/orm/models/index.js +41 -5
  149. package/public/orm/models/orgLimitCap.d.ts +56 -0
  150. package/public/orm/models/orgLimitCap.js +100 -0
  151. package/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  152. package/public/orm/models/orgLimitCapsDefault.js +100 -0
  153. package/public/orm/models/orgLimitCredit.d.ts +56 -0
  154. package/public/orm/models/orgLimitCredit.js +100 -0
  155. package/public/orm/models/partition.d.ts +56 -0
  156. package/public/orm/models/partition.js +100 -0
  157. package/public/orm/models/pubkeySetting.d.ts +56 -0
  158. package/public/orm/models/pubkeySetting.js +100 -0
  159. package/public/orm/models/rlsSetting.d.ts +56 -0
  160. package/public/orm/models/rlsSetting.js +100 -0
  161. package/public/orm/models/webauthnSetting.d.ts +56 -0
  162. package/public/orm/models/webauthnSetting.js +100 -0
  163. package/public/orm/mutation/index.d.ts +9 -16
  164. package/public/orm/mutation/index.js +12 -12
  165. package/public/orm/query-builder.js +24 -0
@@ -0,0 +1,96 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class OrgLimitCapsDefaultModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', 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
+ }, 'OrgLimitCapsDefaultFilter', 'OrgLimitCapsDefaultOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'OrgLimitCapsDefault',
22
+ fieldName: 'orgLimitCapsDefaults',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', args.select, {
29
+ where: args?.where,
30
+ }, 'OrgLimitCapsDefaultFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'OrgLimitCapsDefault',
35
+ fieldName: 'orgLimitCapsDefaults',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'OrgLimitCapsDefaultFilter', 'OrgLimitCapsDefaultOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'OrgLimitCapsDefault',
53
+ fieldName: 'orgLimitCapsDefault',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ orgLimitCapsDefault: data.orgLimitCapsDefaults?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('OrgLimitCapsDefault', 'createOrgLimitCapsDefault', 'orgLimitCapsDefault', args.select, args.data, 'CreateOrgLimitCapsDefaultInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'OrgLimitCapsDefault',
67
+ fieldName: 'createOrgLimitCapsDefault',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('OrgLimitCapsDefault', 'updateOrgLimitCapsDefault', 'orgLimitCapsDefault', args.select, args.where.id, args.data, 'UpdateOrgLimitCapsDefaultInput', 'id', 'orgLimitCapsDefaultPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'OrgLimitCapsDefault',
78
+ fieldName: 'updateOrgLimitCapsDefault',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('OrgLimitCapsDefault', 'deleteOrgLimitCapsDefault', 'orgLimitCapsDefault', {
85
+ id: args.where.id,
86
+ }, 'DeleteOrgLimitCapsDefaultInput', args.select, connectionFieldsMap);
87
+ return new QueryBuilder({
88
+ client: this.client,
89
+ operation: 'mutation',
90
+ operationName: 'OrgLimitCapsDefault',
91
+ fieldName: 'deleteOrgLimitCapsDefault',
92
+ document,
93
+ variables,
94
+ });
95
+ }
96
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * OrgLimitCredit 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 { OrgLimitCreditWithRelations, OrgLimitCreditSelect, OrgLimitCreditFilter, OrgLimitCreditOrderBy, CreateOrgLimitCreditInput, OrgLimitCreditPatch } from '../input-types';
10
+ export declare class OrgLimitCreditModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends OrgLimitCreditSelect>(args: FindManyArgs<S, OrgLimitCreditFilter, OrgLimitCreditOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
16
+ orgLimitCredits: ConnectionResult<InferSelectResult<OrgLimitCreditWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends OrgLimitCreditSelect>(args: FindFirstArgs<S, OrgLimitCreditFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
21
+ orgLimitCredits: {
22
+ nodes: InferSelectResult<OrgLimitCreditWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends OrgLimitCreditSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
29
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S> | null;
30
+ }>;
31
+ create<S extends OrgLimitCreditSelect>(args: CreateArgs<S, CreateOrgLimitCreditInput['orgLimitCredit']> & {
32
+ select: S;
33
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
34
+ createOrgLimitCredit: {
35
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends OrgLimitCreditSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, OrgLimitCreditPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
43
+ updateOrgLimitCredit: {
44
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends OrgLimitCreditSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
52
+ deleteOrgLimitCredit: {
53
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,96 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class OrgLimitCreditModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('OrgLimitCredit', 'orgLimitCredits', 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
+ }, 'OrgLimitCreditFilter', 'OrgLimitCreditOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'OrgLimitCredit',
22
+ fieldName: 'orgLimitCredits',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('OrgLimitCredit', 'orgLimitCredits', args.select, {
29
+ where: args?.where,
30
+ }, 'OrgLimitCreditFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'OrgLimitCredit',
35
+ fieldName: 'orgLimitCredits',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('OrgLimitCredit', 'orgLimitCredits', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'OrgLimitCreditFilter', 'OrgLimitCreditOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'OrgLimitCredit',
53
+ fieldName: 'orgLimitCredit',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ orgLimitCredit: data.orgLimitCredits?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('OrgLimitCredit', 'createOrgLimitCredit', 'orgLimitCredit', args.select, args.data, 'CreateOrgLimitCreditInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'OrgLimitCredit',
67
+ fieldName: 'createOrgLimitCredit',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('OrgLimitCredit', 'updateOrgLimitCredit', 'orgLimitCredit', args.select, args.where.id, args.data, 'UpdateOrgLimitCreditInput', 'id', 'orgLimitCreditPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'OrgLimitCredit',
78
+ fieldName: 'updateOrgLimitCredit',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('OrgLimitCredit', 'deleteOrgLimitCredit', 'orgLimitCredit', {
85
+ id: args.where.id,
86
+ }, 'DeleteOrgLimitCreditInput', args.select, connectionFieldsMap);
87
+ return new QueryBuilder({
88
+ client: this.client,
89
+ operation: 'mutation',
90
+ operationName: 'OrgLimitCredit',
91
+ fieldName: 'deleteOrgLimitCredit',
92
+ document,
93
+ variables,
94
+ });
95
+ }
96
+ }
@@ -6,23 +6,13 @@
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 { SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, RequestUploadUrlInput, ProvisionBucketInput, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, RequestUploadUrlPayload, ProvisionBucketPayload, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, RequestUploadUrlPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, ProvisionBucketInput, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, ProvisionBucketPayload, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SubmitAppInviteCodeVariables {
11
11
  input: SubmitAppInviteCodeInput;
12
12
  }
13
13
  export interface SubmitOrgInviteCodeVariables {
14
14
  input: SubmitOrgInviteCodeInput;
15
15
  }
16
- /**
17
- * Variables for requestUploadUrl
18
- * Request a presigned URL for uploading a file directly to S3.
19
- Client computes SHA-256 of the file content and provides it here.
20
- If a file with the same hash already exists (dedup), returns the
21
- existing file ID and deduplicated=true with no uploadUrl.
22
- */
23
- export interface RequestUploadUrlVariables {
24
- input: RequestUploadUrlInput;
25
- }
26
16
  /**
27
17
  * Variables for provisionBucket
28
18
  * Provision an S3 bucket for a logical bucket in the database.
@@ -44,11 +34,6 @@ export declare function createMutationOperations(client: OrmClient): {
44
34
  } & StrictSelect<S, SubmitOrgInviteCodePayloadSelect>) => QueryBuilder<{
45
35
  submitOrgInviteCode: InferSelectResult<SubmitOrgInviteCodePayload, S> | null;
46
36
  }>;
47
- requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
48
- select: S;
49
- } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
50
- requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
51
- }>;
52
37
  provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
53
38
  select: S;
54
39
  } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
@@ -26,18 +26,6 @@ export function createMutationOperations(client) {
26
26
  },
27
27
  ], connectionFieldsMap, 'SubmitOrgInviteCodePayload'),
28
28
  }),
29
- requestUploadUrl: (args, options) => new QueryBuilder({
30
- client,
31
- operation: 'mutation',
32
- operationName: 'RequestUploadUrl',
33
- fieldName: 'requestUploadUrl',
34
- ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
35
- {
36
- name: 'input',
37
- type: 'RequestUploadUrlInput!',
38
- },
39
- ], connectionFieldsMap, 'RequestUploadUrlPayload'),
40
- }),
41
29
  provisionBucket: (args, options) => new QueryBuilder({
42
30
  client,
43
31
  operation: 'mutation',
@@ -89,6 +89,30 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
89
89
  }
90
90
  if (typeof value === 'object' && value !== null) {
91
91
  const nested = value;
92
+ // Field with arguments (e.g. requestUploadUrl on bucket types)
93
+ if (nested.args && typeof nested.args === 'object') {
94
+ const fieldArgs = Object.entries(nested.args).map(([argName, argValue]) => t.argument({ name: argName, value: buildValueAst(argValue) }));
95
+ const nestedSelect = nested.select;
96
+ if (nestedSelect && typeof nestedSelect === 'object') {
97
+ const subSelections = Object.entries(nestedSelect)
98
+ .filter(([, v]) => v)
99
+ .map(([name]) => t.field({ name }));
100
+ fields.push(t.field({
101
+ name: key,
102
+ args: fieldArgs.length ? fieldArgs : undefined,
103
+ selectionSet: subSelections.length
104
+ ? t.selectionSet({ selections: subSelections })
105
+ : undefined,
106
+ }));
107
+ }
108
+ else {
109
+ fields.push(t.field({
110
+ name: key,
111
+ args: fieldArgs.length ? fieldArgs : undefined,
112
+ }));
113
+ }
114
+ continue;
115
+ }
92
116
  if (!nested.select || typeof nested.select !== 'object') {
93
117
  throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
118
  }
@@ -181,11 +181,6 @@ export declare function createClient(config: OrmClientConfig): {
181
181
  } & import("./select-types").StrictSelect<S, import("./input-types").SendVerificationEmailPayloadSelect>) => import("./query-builder").QueryBuilder<{
182
182
  sendVerificationEmail: import("./select-types").InferSelectResult<import("./input-types").SendVerificationEmailPayload, S> | null;
183
183
  }>;
184
- requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
185
- select: S;
186
- } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
187
- requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
188
- }>;
189
184
  provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
190
185
  select: S;
191
186
  } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -1162,25 +1162,6 @@ export interface SendVerificationEmailInput {
1162
1162
  clientMutationId?: string;
1163
1163
  email?: ConstructiveInternalTypeEmail;
1164
1164
  }
1165
- export interface RequestUploadUrlInput {
1166
- /** Bucket key (e.g., "public", "private") */
1167
- bucketKey: string;
1168
- /**
1169
- * Owner entity ID for entity-scoped uploads.
1170
- * Omit for app-level (database-wide) storage.
1171
- * When provided, resolves the storage module for the entity type
1172
- * that owns this entity instance (e.g., a data room ID, team ID).
1173
- */
1174
- ownerId?: string;
1175
- /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
1176
- contentHash: string;
1177
- /** MIME type of the file (e.g., "image/png") */
1178
- contentType: string;
1179
- /** File size in bytes */
1180
- size: number;
1181
- /** Original filename (optional, for display and Content-Disposition) */
1182
- filename?: string;
1183
- }
1184
1165
  export interface ProvisionBucketInput {
1185
1166
  /** The logical bucket key (e.g., "public", "private") */
1186
1167
  bucketKey: string;
@@ -2237,25 +2218,6 @@ export type SendVerificationEmailPayloadSelect = {
2237
2218
  clientMutationId?: boolean;
2238
2219
  result?: boolean;
2239
2220
  };
2240
- export interface RequestUploadUrlPayload {
2241
- /** Presigned PUT URL (null if file was deduplicated) */
2242
- uploadUrl?: string | null;
2243
- /** The file ID (existing if deduplicated, new if fresh upload) */
2244
- fileId: string;
2245
- /** The S3 object key */
2246
- key: string;
2247
- /** Whether this file was deduplicated (already exists with same hash) */
2248
- deduplicated: boolean;
2249
- /** Presigned URL expiry time (null if deduplicated) */
2250
- expiresAt?: string | null;
2251
- }
2252
- export type RequestUploadUrlPayloadSelect = {
2253
- uploadUrl?: boolean;
2254
- fileId?: boolean;
2255
- key?: boolean;
2256
- deduplicated?: boolean;
2257
- expiresAt?: boolean;
2258
- };
2259
2221
  export interface ProvisionBucketPayload {
2260
2222
  /** Whether provisioning succeeded */
2261
2223
  success: boolean;
@@ -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 { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, ResetPasswordInput, SignInCrossOriginInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ExtendTokenExpiresInput, CreateApiKeyInput, ForgotPasswordInput, SendVerificationEmailInput, RequestUploadUrlInput, ProvisionBucketInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, ResetPasswordPayload, SignInCrossOriginPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, ForgotPasswordPayload, SendVerificationEmailPayload, RequestUploadUrlPayload, ProvisionBucketPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, SignInCrossOriginPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, RequestUploadUrlPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, ResetPasswordInput, SignInCrossOriginInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ExtendTokenExpiresInput, CreateApiKeyInput, ForgotPasswordInput, SendVerificationEmailInput, ProvisionBucketInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, ResetPasswordPayload, SignInCrossOriginPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, ForgotPasswordPayload, SendVerificationEmailPayload, ProvisionBucketPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, SignInCrossOriginPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SignOutVariables {
11
11
  input: SignOutInput;
12
12
  }
@@ -70,16 +70,6 @@ export interface ForgotPasswordVariables {
70
70
  export interface SendVerificationEmailVariables {
71
71
  input: SendVerificationEmailInput;
72
72
  }
73
- /**
74
- * Variables for requestUploadUrl
75
- * Request a presigned URL for uploading a file directly to S3.
76
- Client computes SHA-256 of the file content and provides it here.
77
- If a file with the same hash already exists (dedup), returns the
78
- existing file ID and deduplicated=true with no uploadUrl.
79
- */
80
- export interface RequestUploadUrlVariables {
81
- input: RequestUploadUrlInput;
82
- }
83
73
  /**
84
74
  * Variables for provisionBucket
85
75
  * Provision an S3 bucket for a logical bucket in the database.
@@ -196,11 +186,6 @@ export declare function createMutationOperations(client: OrmClient): {
196
186
  } & StrictSelect<S, SendVerificationEmailPayloadSelect>) => QueryBuilder<{
197
187
  sendVerificationEmail: InferSelectResult<SendVerificationEmailPayload, S> | null;
198
188
  }>;
199
- requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
200
- select: S;
201
- } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
202
- requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
203
- }>;
204
189
  provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
205
190
  select: S;
206
191
  } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
@@ -254,18 +254,6 @@ export function createMutationOperations(client) {
254
254
  },
255
255
  ], connectionFieldsMap, 'SendVerificationEmailPayload'),
256
256
  }),
257
- requestUploadUrl: (args, options) => new QueryBuilder({
258
- client,
259
- operation: 'mutation',
260
- operationName: 'RequestUploadUrl',
261
- fieldName: 'requestUploadUrl',
262
- ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
263
- {
264
- name: 'input',
265
- type: 'RequestUploadUrlInput!',
266
- },
267
- ], connectionFieldsMap, 'RequestUploadUrlPayload'),
268
- }),
269
257
  provisionBucket: (args, options) => new QueryBuilder({
270
258
  client,
271
259
  operation: 'mutation',
@@ -89,6 +89,30 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
89
89
  }
90
90
  if (typeof value === 'object' && value !== null) {
91
91
  const nested = value;
92
+ // Field with arguments (e.g. requestUploadUrl on bucket types)
93
+ if (nested.args && typeof nested.args === 'object') {
94
+ const fieldArgs = Object.entries(nested.args).map(([argName, argValue]) => t.argument({ name: argName, value: buildValueAst(argValue) }));
95
+ const nestedSelect = nested.select;
96
+ if (nestedSelect && typeof nestedSelect === 'object') {
97
+ const subSelections = Object.entries(nestedSelect)
98
+ .filter(([, v]) => v)
99
+ .map(([name]) => t.field({ name }));
100
+ fields.push(t.field({
101
+ name: key,
102
+ args: fieldArgs.length ? fieldArgs : undefined,
103
+ selectionSet: subSelections.length
104
+ ? t.selectionSet({ selections: subSelections })
105
+ : undefined,
106
+ }));
107
+ }
108
+ else {
109
+ fields.push(t.field({
110
+ name: key,
111
+ args: fieldArgs.length ? fieldArgs : undefined,
112
+ }));
113
+ }
114
+ continue;
115
+ }
92
116
  if (!nested.select || typeof nested.select !== 'object') {
93
117
  throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
118
  }
@@ -103,11 +103,6 @@ export declare function createClient(config: OrmClientConfig): {
103
103
  } & import("./select-types").StrictSelect<S, import("./input-types").SetAndCommitPayloadSelect>) => import("./query-builder").QueryBuilder<{
104
104
  setAndCommit: import("./select-types").InferSelectResult<import("./input-types").SetAndCommitPayload, S> | null;
105
105
  }>;
106
- requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
107
- select: S;
108
- } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
109
- requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
110
- }>;
111
106
  provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
112
107
  select: S;
113
108
  } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -629,25 +629,6 @@ export interface SetAndCommitInput {
629
629
  kids?: string[];
630
630
  ktree?: string[];
631
631
  }
632
- export interface RequestUploadUrlInput {
633
- /** Bucket key (e.g., "public", "private") */
634
- bucketKey: string;
635
- /**
636
- * Owner entity ID for entity-scoped uploads.
637
- * Omit for app-level (database-wide) storage.
638
- * When provided, resolves the storage module for the entity type
639
- * that owns this entity instance (e.g., a data room ID, team ID).
640
- */
641
- ownerId?: string;
642
- /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
643
- contentHash: string;
644
- /** MIME type of the file (e.g., "image/png") */
645
- contentType: string;
646
- /** File size in bytes */
647
- size: number;
648
- /** Original filename (optional, for display and Content-Disposition) */
649
- filename?: string;
650
- }
651
632
  export interface ProvisionBucketInput {
652
633
  /** The logical bucket key (e.g., "public", "private") */
653
634
  bucketKey: string;
@@ -736,25 +717,6 @@ export type SetAndCommitPayloadSelect = {
736
717
  clientMutationId?: boolean;
737
718
  result?: boolean;
738
719
  };
739
- export interface RequestUploadUrlPayload {
740
- /** Presigned PUT URL (null if file was deduplicated) */
741
- uploadUrl?: string | null;
742
- /** The file ID (existing if deduplicated, new if fresh upload) */
743
- fileId: string;
744
- /** The S3 object key */
745
- key: string;
746
- /** Whether this file was deduplicated (already exists with same hash) */
747
- deduplicated: boolean;
748
- /** Presigned URL expiry time (null if deduplicated) */
749
- expiresAt?: string | null;
750
- }
751
- export type RequestUploadUrlPayloadSelect = {
752
- uploadUrl?: boolean;
753
- fileId?: boolean;
754
- key?: boolean;
755
- deduplicated?: boolean;
756
- expiresAt?: boolean;
757
- };
758
720
  export interface ProvisionBucketPayload {
759
721
  /** Whether provisioning succeeded */
760
722
  success: boolean;
@@ -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 { FreezeObjectsInput, InitEmptyRepoInput, RemoveNodeAtPathInput, SetDataAtPathInput, SetPropsAndCommitInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, RequestUploadUrlInput, ProvisionBucketInput, FreezeObjectsPayload, InitEmptyRepoPayload, RemoveNodeAtPathPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, RequestUploadUrlPayload, ProvisionBucketPayload, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, RemoveNodeAtPathPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, RequestUploadUrlPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { FreezeObjectsInput, InitEmptyRepoInput, RemoveNodeAtPathInput, SetDataAtPathInput, SetPropsAndCommitInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionBucketInput, FreezeObjectsPayload, InitEmptyRepoPayload, RemoveNodeAtPathPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionBucketPayload, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, RemoveNodeAtPathPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface FreezeObjectsVariables {
11
11
  input: FreezeObjectsInput;
12
12
  }
@@ -31,16 +31,6 @@ export interface UpdateNodeAtPathVariables {
31
31
  export interface SetAndCommitVariables {
32
32
  input: SetAndCommitInput;
33
33
  }
34
- /**
35
- * Variables for requestUploadUrl
36
- * Request a presigned URL for uploading a file directly to S3.
37
- Client computes SHA-256 of the file content and provides it here.
38
- If a file with the same hash already exists (dedup), returns the
39
- existing file ID and deduplicated=true with no uploadUrl.
40
- */
41
- export interface RequestUploadUrlVariables {
42
- input: RequestUploadUrlInput;
43
- }
44
34
  /**
45
35
  * Variables for provisionBucket
46
36
  * Provision an S3 bucket for a logical bucket in the database.
@@ -92,11 +82,6 @@ export declare function createMutationOperations(client: OrmClient): {
92
82
  } & StrictSelect<S, SetAndCommitPayloadSelect>) => QueryBuilder<{
93
83
  setAndCommit: InferSelectResult<SetAndCommitPayload, S> | null;
94
84
  }>;
95
- requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
96
- select: S;
97
- } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
98
- requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
99
- }>;
100
85
  provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
101
86
  select: S;
102
87
  } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
@@ -98,18 +98,6 @@ export function createMutationOperations(client) {
98
98
  },
99
99
  ], connectionFieldsMap, 'SetAndCommitPayload'),
100
100
  }),
101
- requestUploadUrl: (args, options) => new QueryBuilder({
102
- client,
103
- operation: 'mutation',
104
- operationName: 'RequestUploadUrl',
105
- fieldName: 'requestUploadUrl',
106
- ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
107
- {
108
- name: 'input',
109
- type: 'RequestUploadUrlInput!',
110
- },
111
- ], connectionFieldsMap, 'RequestUploadUrlPayload'),
112
- }),
113
101
  provisionBucket: (args, options) => new QueryBuilder({
114
102
  client,
115
103
  operation: 'mutation',
@@ -89,6 +89,30 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
89
89
  }
90
90
  if (typeof value === 'object' && value !== null) {
91
91
  const nested = value;
92
+ // Field with arguments (e.g. requestUploadUrl on bucket types)
93
+ if (nested.args && typeof nested.args === 'object') {
94
+ const fieldArgs = Object.entries(nested.args).map(([argName, argValue]) => t.argument({ name: argName, value: buildValueAst(argValue) }));
95
+ const nestedSelect = nested.select;
96
+ if (nestedSelect && typeof nestedSelect === 'object') {
97
+ const subSelections = Object.entries(nestedSelect)
98
+ .filter(([, v]) => v)
99
+ .map(([name]) => t.field({ name }));
100
+ fields.push(t.field({
101
+ name: key,
102
+ args: fieldArgs.length ? fieldArgs : undefined,
103
+ selectionSet: subSelections.length
104
+ ? t.selectionSet({ selections: subSelections })
105
+ : undefined,
106
+ }));
107
+ }
108
+ else {
109
+ fields.push(t.field({
110
+ name: key,
111
+ args: fieldArgs.length ? fieldArgs : undefined,
112
+ }));
113
+ }
114
+ continue;
115
+ }
92
116
  if (!nested.select || typeof nested.select !== 'object') {
93
117
  throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
118
  }