@constructive-io/sdk 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/admin/orm/client.js +11 -1
  2. package/agent/orm/client.js +11 -1
  3. package/agent/orm/input-types.d.ts +0 -3
  4. package/api/orm/client.js +11 -1
  5. package/api/orm/index.d.ts +66 -4
  6. package/api/orm/index.js +36 -4
  7. package/api/orm/input-types.d.ts +4946 -630
  8. package/api/orm/input-types.js +34 -6
  9. package/api/orm/models/apis.d.ts +54 -0
  10. package/api/orm/models/{api.js → apis.js} +27 -27
  11. package/api/orm/models/derive.d.ts +54 -0
  12. package/api/orm/models/derive.js +104 -0
  13. package/api/orm/models/fieldBehavior.d.ts +54 -0
  14. package/api/orm/models/fieldBehavior.js +104 -0
  15. package/api/orm/models/foreignKeyConstraintBehavior.d.ts +54 -0
  16. package/api/orm/models/foreignKeyConstraintBehavior.js +104 -0
  17. package/api/orm/models/index.d.ts +18 -2
  18. package/api/orm/models/index.js +38 -6
  19. package/api/orm/models/page.d.ts +54 -0
  20. package/api/orm/models/page.js +104 -0
  21. package/api/orm/models/platformApis.d.ts +54 -0
  22. package/api/orm/models/platformApis.js +104 -0
  23. package/api/orm/models/platformPage.d.ts +54 -0
  24. package/api/orm/models/platformPage.js +104 -0
  25. package/api/orm/models/platformSiteAppLink.d.ts +54 -0
  26. package/api/orm/models/platformSiteAppLink.js +104 -0
  27. package/api/orm/models/platformSiteDeepLink.d.ts +54 -0
  28. package/api/orm/models/platformSiteDeepLink.js +104 -0
  29. package/api/orm/models/platformSiteErrorPage.d.ts +54 -0
  30. package/api/orm/models/platformSiteErrorPage.js +104 -0
  31. package/api/orm/models/platformSiteWebConfig.d.ts +54 -0
  32. package/api/orm/models/platformSiteWebConfig.js +104 -0
  33. package/api/orm/models/siteAppLink.d.ts +54 -0
  34. package/api/orm/models/{platformApi.js → siteAppLink.js} +27 -27
  35. package/api/orm/models/siteDeepLink.d.ts +54 -0
  36. package/api/orm/models/siteDeepLink.js +104 -0
  37. package/api/orm/models/siteErrorPage.d.ts +54 -0
  38. package/api/orm/models/siteErrorPage.js +104 -0
  39. package/api/orm/models/siteWebConfig.d.ts +54 -0
  40. package/api/orm/models/siteWebConfig.js +104 -0
  41. package/api/orm/models/tableBehavior.d.ts +54 -0
  42. package/api/orm/models/tableBehavior.js +104 -0
  43. package/api/orm/models/uniqueConstraintBehavior.d.ts +54 -0
  44. package/api/orm/models/uniqueConstraintBehavior.js +104 -0
  45. package/api/orm/models/viewBehavior.d.ts +54 -0
  46. package/api/orm/models/viewBehavior.js +104 -0
  47. package/api/orm/mutation/index.d.ts +33 -1
  48. package/api/orm/mutation/index.js +48 -0
  49. package/api/orm/query/index.d.ts +17 -0
  50. package/api/orm/query/index.js +28 -0
  51. package/auth/orm/client.js +11 -1
  52. package/auth/orm/input-types.d.ts +166 -220
  53. package/auth/orm/input-types.js +6 -11
  54. package/compute/orm/client.js +11 -1
  55. package/compute/orm/index.d.ts +4 -0
  56. package/compute/orm/index.js +4 -0
  57. package/compute/orm/input-types.d.ts +539 -8
  58. package/compute/orm/input-types.js +2 -0
  59. package/compute/orm/models/functionCapabilityBinding.d.ts +54 -0
  60. package/compute/orm/models/functionCapabilityBinding.js +104 -0
  61. package/compute/orm/models/index.d.ts +2 -0
  62. package/compute/orm/models/index.js +6 -2
  63. package/compute/orm/models/platformFunctionCapabilityBinding.d.ts +54 -0
  64. package/compute/orm/models/platformFunctionCapabilityBinding.js +104 -0
  65. package/config/orm/client.js +11 -1
  66. package/config/orm/input-types.d.ts +53 -5
  67. package/esm/admin/orm/client.js +11 -1
  68. package/esm/agent/orm/client.js +11 -1
  69. package/esm/agent/orm/input-types.d.ts +0 -3
  70. package/esm/api/orm/client.js +11 -1
  71. package/esm/api/orm/index.d.ts +66 -4
  72. package/esm/api/orm/index.js +36 -4
  73. package/esm/api/orm/input-types.d.ts +4946 -630
  74. package/esm/api/orm/input-types.js +34 -6
  75. package/esm/api/orm/models/apis.d.ts +54 -0
  76. package/esm/api/orm/models/{api.js → apis.js} +25 -25
  77. package/esm/api/orm/models/derive.d.ts +54 -0
  78. package/esm/api/orm/models/derive.js +100 -0
  79. package/esm/api/orm/models/fieldBehavior.d.ts +54 -0
  80. package/esm/api/orm/models/fieldBehavior.js +100 -0
  81. package/esm/api/orm/models/foreignKeyConstraintBehavior.d.ts +54 -0
  82. package/esm/api/orm/models/foreignKeyConstraintBehavior.js +100 -0
  83. package/esm/api/orm/models/index.d.ts +18 -2
  84. package/esm/api/orm/models/index.js +18 -2
  85. package/esm/api/orm/models/page.d.ts +54 -0
  86. package/esm/api/orm/models/page.js +100 -0
  87. package/esm/api/orm/models/platformApis.d.ts +54 -0
  88. package/esm/api/orm/models/{platformApi.js → platformApis.js} +25 -25
  89. package/esm/api/orm/models/platformPage.d.ts +54 -0
  90. package/esm/api/orm/models/platformPage.js +100 -0
  91. package/esm/api/orm/models/platformSiteAppLink.d.ts +54 -0
  92. package/esm/api/orm/models/platformSiteAppLink.js +100 -0
  93. package/esm/api/orm/models/platformSiteDeepLink.d.ts +54 -0
  94. package/esm/api/orm/models/platformSiteDeepLink.js +100 -0
  95. package/esm/api/orm/models/platformSiteErrorPage.d.ts +54 -0
  96. package/esm/api/orm/models/platformSiteErrorPage.js +100 -0
  97. package/esm/api/orm/models/platformSiteWebConfig.d.ts +54 -0
  98. package/esm/api/orm/models/platformSiteWebConfig.js +100 -0
  99. package/esm/api/orm/models/siteAppLink.d.ts +54 -0
  100. package/esm/api/orm/models/siteAppLink.js +100 -0
  101. package/esm/api/orm/models/siteDeepLink.d.ts +54 -0
  102. package/esm/api/orm/models/siteDeepLink.js +100 -0
  103. package/esm/api/orm/models/siteErrorPage.d.ts +54 -0
  104. package/esm/api/orm/models/siteErrorPage.js +100 -0
  105. package/esm/api/orm/models/siteWebConfig.d.ts +54 -0
  106. package/esm/api/orm/models/siteWebConfig.js +100 -0
  107. package/esm/api/orm/models/tableBehavior.d.ts +54 -0
  108. package/esm/api/orm/models/tableBehavior.js +100 -0
  109. package/esm/api/orm/models/uniqueConstraintBehavior.d.ts +54 -0
  110. package/esm/api/orm/models/uniqueConstraintBehavior.js +100 -0
  111. package/esm/api/orm/models/viewBehavior.d.ts +54 -0
  112. package/esm/api/orm/models/viewBehavior.js +100 -0
  113. package/esm/api/orm/mutation/index.d.ts +33 -1
  114. package/esm/api/orm/mutation/index.js +48 -0
  115. package/esm/api/orm/query/index.d.ts +17 -0
  116. package/esm/api/orm/query/index.js +28 -0
  117. package/esm/auth/orm/client.js +11 -1
  118. package/esm/auth/orm/input-types.d.ts +166 -220
  119. package/esm/auth/orm/input-types.js +6 -11
  120. package/esm/compute/orm/client.js +11 -1
  121. package/esm/compute/orm/index.d.ts +4 -0
  122. package/esm/compute/orm/index.js +4 -0
  123. package/esm/compute/orm/input-types.d.ts +539 -8
  124. package/esm/compute/orm/input-types.js +2 -0
  125. package/esm/compute/orm/models/functionCapabilityBinding.d.ts +54 -0
  126. package/esm/compute/orm/models/functionCapabilityBinding.js +100 -0
  127. package/esm/compute/orm/models/index.d.ts +2 -0
  128. package/esm/compute/orm/models/index.js +2 -0
  129. package/esm/compute/orm/models/platformFunctionCapabilityBinding.d.ts +54 -0
  130. package/esm/compute/orm/models/platformFunctionCapabilityBinding.js +100 -0
  131. package/esm/config/orm/client.js +11 -1
  132. package/esm/config/orm/input-types.d.ts +53 -5
  133. package/esm/infra/orm/client.js +11 -1
  134. package/esm/modules/orm/client.js +11 -1
  135. package/esm/modules/orm/index.d.ts +2 -0
  136. package/esm/modules/orm/index.js +2 -0
  137. package/esm/modules/orm/input-types.d.ts +2116 -122
  138. package/esm/modules/orm/input-types.js +40 -0
  139. package/esm/modules/orm/models/index.d.ts +1 -0
  140. package/esm/modules/orm/models/index.js +1 -0
  141. package/esm/modules/orm/models/pagesModule.d.ts +54 -0
  142. package/esm/modules/orm/models/pagesModule.js +100 -0
  143. package/esm/objects/orm/client.js +11 -1
  144. package/esm/usage/orm/client.js +11 -1
  145. package/infra/orm/client.js +11 -1
  146. package/modules/orm/client.js +11 -1
  147. package/modules/orm/index.d.ts +2 -0
  148. package/modules/orm/index.js +2 -0
  149. package/modules/orm/input-types.d.ts +2116 -122
  150. package/modules/orm/input-types.js +40 -0
  151. package/modules/orm/models/index.d.ts +1 -0
  152. package/modules/orm/models/index.js +4 -2
  153. package/modules/orm/models/pagesModule.d.ts +54 -0
  154. package/modules/orm/models/pagesModule.js +104 -0
  155. package/objects/orm/client.js +11 -1
  156. package/package.json +5 -5
  157. package/usage/orm/client.js +11 -1
  158. package/api/orm/models/api.d.ts +0 -54
  159. package/api/orm/models/platformApi.d.ts +0 -54
  160. package/esm/api/orm/models/api.d.ts +0 -54
  161. package/esm/api/orm/models/platformApi.d.ts +0 -54
@@ -38,6 +38,42 @@ export function createMutationOperations(client) {
38
38
  },
39
39
  ], connectionFieldsMap, 'CancelDatabaseTransferPayload'),
40
40
  }),
41
+ domainsAssignSubdomain: (args, options) => new QueryBuilder({
42
+ client,
43
+ operation: 'mutation',
44
+ operationName: 'DomainsAssignSubdomain',
45
+ fieldName: 'domainsAssignSubdomain',
46
+ ...buildCustomDocument('mutation', 'DomainsAssignSubdomain', 'domainsAssignSubdomain', options.select, args, [
47
+ {
48
+ name: 'input',
49
+ type: 'DomainsAssignSubdomainInput!',
50
+ },
51
+ ], connectionFieldsMap, 'DomainsAssignSubdomainPayload'),
52
+ }),
53
+ platformDomainsAssignSubdomain: (args, options) => new QueryBuilder({
54
+ client,
55
+ operation: 'mutation',
56
+ operationName: 'PlatformDomainsAssignSubdomain',
57
+ fieldName: 'platformDomainsAssignSubdomain',
58
+ ...buildCustomDocument('mutation', 'PlatformDomainsAssignSubdomain', 'platformDomainsAssignSubdomain', options.select, args, [
59
+ {
60
+ name: 'input',
61
+ type: 'PlatformDomainsAssignSubdomainInput!',
62
+ },
63
+ ], connectionFieldsMap, 'PlatformDomainsAssignSubdomainPayload'),
64
+ }),
65
+ platformSitesProvisionStaticSite: (args, options) => new QueryBuilder({
66
+ client,
67
+ operation: 'mutation',
68
+ operationName: 'PlatformSitesProvisionStaticSite',
69
+ fieldName: 'platformSitesProvisionStaticSite',
70
+ ...buildCustomDocument('mutation', 'PlatformSitesProvisionStaticSite', 'platformSitesProvisionStaticSite', options.select, args, [
71
+ {
72
+ name: 'input',
73
+ type: 'PlatformSitesProvisionStaticSiteInput!',
74
+ },
75
+ ], connectionFieldsMap, 'PlatformSitesProvisionStaticSitePayload'),
76
+ }),
41
77
  provisionBucket: (args, options) => new QueryBuilder({
42
78
  client,
43
79
  operation: 'mutation',
@@ -86,5 +122,17 @@ export function createMutationOperations(client) {
86
122
  },
87
123
  ], connectionFieldsMap, 'SetFieldOrderPayload'),
88
124
  }),
125
+ sitesProvisionStaticSite: (args, options) => new QueryBuilder({
126
+ client,
127
+ operation: 'mutation',
128
+ operationName: 'SitesProvisionStaticSite',
129
+ fieldName: 'sitesProvisionStaticSite',
130
+ ...buildCustomDocument('mutation', 'SitesProvisionStaticSite', 'sitesProvisionStaticSite', options.select, args, [
131
+ {
132
+ name: 'input',
133
+ type: 'SitesProvisionStaticSiteInput!',
134
+ },
135
+ ], connectionFieldsMap, 'SitesProvisionStaticSitePayload'),
136
+ }),
89
137
  };
90
138
  }
@@ -14,6 +14,10 @@ export interface ApplyRegistryDefaultsVariables {
14
14
  data?: unknown;
15
15
  nodeType?: string;
16
16
  }
17
+ export interface ResolveDeepLinkVariables {
18
+ linkSlug?: string;
19
+ targetSiteId?: string;
20
+ }
17
21
  export interface ResolveHttpRouteVariables {
18
22
  requestHost?: string;
19
23
  requestMethod?: string;
@@ -24,6 +28,9 @@ export interface ResolveRouteVariables {
24
28
  requestMethod?: string;
25
29
  requestPath?: string;
26
30
  }
31
+ export interface ResolveSiteAppLinksVariables {
32
+ targetSiteId?: string;
33
+ }
27
34
  export declare function createQueryOperations(client: OrmClient): {
28
35
  apiSchemaNames: (args: ApiSchemaNamesVariables, options?: {
29
36
  select?: Record<string, unknown>;
@@ -35,6 +42,11 @@ export declare function createQueryOperations(client: OrmClient): {
35
42
  }) => QueryBuilder<{
36
43
  applyRegistryDefaults: unknown | null;
37
44
  }>;
45
+ resolveDeepLink: (args: ResolveDeepLinkVariables, options?: {
46
+ select?: Record<string, unknown>;
47
+ }) => QueryBuilder<{
48
+ resolveDeepLink: unknown | null;
49
+ }>;
38
50
  resolveHttpRoute: <S extends ResolveHttpRouteRecordSelect>(args: ResolveHttpRouteVariables, options: {
39
51
  select: S;
40
52
  } & StrictSelect<S, ResolveHttpRouteRecordSelect>) => QueryBuilder<{
@@ -45,4 +57,9 @@ export declare function createQueryOperations(client: OrmClient): {
45
57
  } & StrictSelect<S, ResolveRouteRecordSelect>) => QueryBuilder<{
46
58
  resolveRoute: InferSelectResult<ResolveRouteRecord, S> | null;
47
59
  }>;
60
+ resolveSiteAppLinks: (args: ResolveSiteAppLinksVariables, options?: {
61
+ select?: Record<string, unknown>;
62
+ }) => QueryBuilder<{
63
+ resolveSiteAppLinks: unknown | null;
64
+ }>;
48
65
  };
@@ -30,6 +30,22 @@ export function createQueryOperations(client) {
30
30
  },
31
31
  ], connectionFieldsMap, undefined),
32
32
  }),
33
+ resolveDeepLink: (args, options) => new QueryBuilder({
34
+ client,
35
+ operation: 'query',
36
+ operationName: 'ResolveDeepLink',
37
+ fieldName: 'resolveDeepLink',
38
+ ...buildCustomDocument('query', 'ResolveDeepLink', 'resolveDeepLink', options?.select, args, [
39
+ {
40
+ name: 'linkSlug',
41
+ type: 'String',
42
+ },
43
+ {
44
+ name: 'targetSiteId',
45
+ type: 'UUID',
46
+ },
47
+ ], connectionFieldsMap, undefined),
48
+ }),
33
49
  resolveHttpRoute: (args, options) => new QueryBuilder({
34
50
  client,
35
51
  operation: 'query',
@@ -70,5 +86,17 @@ export function createQueryOperations(client) {
70
86
  },
71
87
  ], connectionFieldsMap, 'ResolveRouteRecord'),
72
88
  }),
89
+ resolveSiteAppLinks: (args, options) => new QueryBuilder({
90
+ client,
91
+ operation: 'query',
92
+ operationName: 'ResolveSiteAppLinks',
93
+ fieldName: 'resolveSiteAppLinks',
94
+ ...buildCustomDocument('query', 'ResolveSiteAppLinks', 'resolveSiteAppLinks', options?.select, args, [
95
+ {
96
+ name: 'targetSiteId',
97
+ type: 'UUID',
98
+ },
99
+ ], connectionFieldsMap, undefined),
100
+ }),
73
101
  };
74
102
  }
@@ -59,6 +59,16 @@ export class FetchAdapter {
59
59
  return this.endpoint;
60
60
  }
61
61
  }
62
+ /**
63
+ * Describe a single GraphQL error, falling back to its `extensions.code` when
64
+ * the server omits `message` so the error never renders as an empty string.
65
+ */
66
+ function describeGraphQLError(error) {
67
+ if (error.message)
68
+ return error.message;
69
+ const code = error.extensions?.code;
70
+ return typeof code === 'string' ? code : 'Unknown error';
71
+ }
62
72
  /**
63
73
  * Error thrown when GraphQL request fails
64
74
  */
@@ -66,7 +76,7 @@ export class GraphQLRequestError extends Error {
66
76
  errors;
67
77
  data;
68
78
  constructor(errors, data = null) {
69
- const messages = errors.map((e) => e.message).join('; ');
79
+ const messages = errors.map(describeGraphQLError).join('; ');
70
80
  super(`GraphQL Error: ${messages}`);
71
81
  this.errors = errors;
72
82
  this.data = data;