@tailor-platform/sdk 2.0.0-next.4 → 2.0.0-next.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 (258) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/dist/{application-BX13RArL.mjs → application-Bf8wxOi6.mjs} +417 -589
  3. package/dist/application-Bf8wxOi6.mjs.map +1 -0
  4. package/dist/application-CUkjzfij.mjs +3 -0
  5. package/dist/cli/cache/bundle-cache.d.mts +2 -1
  6. package/dist/cli/cache/store.d.mts +1 -1
  7. package/dist/cli/commands/api/index.d.mts +1 -0
  8. package/dist/cli/commands/deploy/aigateway.d.mts +5 -1
  9. package/dist/cli/commands/deploy/application.d.mts +7 -1
  10. package/dist/cli/commands/deploy/apply-phases.d.mts +14 -1
  11. package/dist/cli/commands/deploy/auth.d.mts +5 -1
  12. package/dist/cli/commands/deploy/deploy.d.mts +5 -0
  13. package/dist/cli/commands/deploy/executor.d.mts +7 -1
  14. package/dist/cli/commands/deploy/function-registry.d.mts +5 -0
  15. package/dist/cli/commands/deploy/idp.d.mts +5 -1
  16. package/dist/cli/commands/deploy/resolver.d.mts +5 -1
  17. package/dist/cli/commands/deploy/secret-manager.d.mts +5 -1
  18. package/dist/cli/commands/deploy/staticwebsite.d.mts +5 -1
  19. package/dist/cli/commands/deploy/tailordb/index.d.mts +8 -1
  20. package/dist/cli/commands/deploy/types.d.mts +3 -1
  21. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +3 -1
  22. package/dist/cli/commands/deploy/workflow.d.mts +4 -1
  23. package/dist/cli/commands/executor/get.d.mts +0 -1
  24. package/dist/cli/commands/executor/jobs.d.mts +0 -1
  25. package/dist/cli/commands/executor/list.d.mts +0 -1
  26. package/dist/cli/commands/executor/transform.d.mts +1 -0
  27. package/dist/cli/commands/executor/trigger.d.mts +0 -1
  28. package/dist/cli/commands/executor/webhook.d.mts +0 -1
  29. package/dist/cli/commands/function/get.d.mts +0 -1
  30. package/dist/cli/commands/function/list.d.mts +0 -1
  31. package/dist/cli/commands/function/transform.d.mts +1 -0
  32. package/dist/cli/commands/generate/service.d.mts +5 -1
  33. package/dist/cli/commands/machineuser/list.d.mts +0 -1
  34. package/dist/cli/commands/machineuser/token.d.mts +0 -1
  35. package/dist/cli/commands/oauth2client/get.d.mts +0 -1
  36. package/dist/cli/commands/oauth2client/list.d.mts +0 -1
  37. package/dist/cli/commands/oauth2client/transform.d.mts +1 -0
  38. package/dist/cli/commands/organization/folder/create.d.mts +0 -1
  39. package/dist/cli/commands/organization/folder/delete.d.mts +0 -1
  40. package/dist/cli/commands/organization/folder/get.d.mts +0 -1
  41. package/dist/cli/commands/organization/folder/list.d.mts +0 -1
  42. package/dist/cli/commands/organization/folder/update.d.mts +0 -1
  43. package/dist/cli/commands/organization/get.d.mts +0 -1
  44. package/dist/cli/commands/organization/list.d.mts +0 -1
  45. package/dist/cli/commands/organization/transform.d.mts +2 -0
  46. package/dist/cli/commands/organization/tree.d.mts +0 -1
  47. package/dist/cli/commands/organization/update.d.mts +0 -1
  48. package/dist/cli/commands/remove.d.mts +0 -1
  49. package/dist/cli/commands/show.d.mts +9 -4
  50. package/dist/cli/commands/tailordb/migrate/config.d.mts +0 -1
  51. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +16 -3
  52. package/dist/cli/commands/tailordb/migrate/generate.d.mts +0 -1
  53. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +6 -0
  54. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +1 -1
  55. package/dist/cli/commands/tailordb/truncate.d.mts +0 -1
  56. package/dist/cli/commands/workflow/executions.d.mts +0 -1
  57. package/dist/cli/commands/workflow/get.d.mts +2 -1
  58. package/dist/cli/commands/workflow/list.d.mts +0 -1
  59. package/dist/cli/commands/workflow/resume.d.mts +0 -1
  60. package/dist/cli/commands/workflow/start.d.mts +0 -1
  61. package/dist/cli/commands/workflow/status.d.mts +1 -0
  62. package/dist/cli/commands/workflow/transform.d.mts +1 -0
  63. package/dist/cli/commands/workflow/wait.d.mts +0 -1
  64. package/dist/cli/commands/workflow/waiter.d.mts +1 -1
  65. package/dist/cli/commands/workspace/app/health.d.mts +0 -1
  66. package/dist/cli/commands/workspace/app/list.d.mts +0 -1
  67. package/dist/cli/commands/workspace/app/transform.d.mts +2 -0
  68. package/dist/cli/commands/workspace/create.d.mts +0 -1
  69. package/dist/cli/commands/workspace/delete.d.mts +0 -1
  70. package/dist/cli/commands/workspace/get.d.mts +0 -1
  71. package/dist/cli/commands/workspace/list.d.mts +0 -1
  72. package/dist/cli/commands/workspace/restore.d.mts +0 -1
  73. package/dist/cli/commands/workspace/transform.d.mts +2 -0
  74. package/dist/cli/commands/workspace/user/invite.d.mts +0 -1
  75. package/dist/cli/commands/workspace/user/list.d.mts +0 -1
  76. package/dist/cli/commands/workspace/user/remove.d.mts +0 -1
  77. package/dist/cli/commands/workspace/user/transform.d.mts +1 -0
  78. package/dist/cli/commands/workspace/user/update.d.mts +0 -1
  79. package/dist/cli/index.d.mts +6 -3
  80. package/dist/cli/index.mjs +142 -73
  81. package/dist/cli/index.mjs.map +1 -1
  82. package/dist/cli/lib.d.mts +4 -2
  83. package/dist/cli/lib.mjs +3 -3
  84. package/dist/cli/lib.mjs.map +1 -1
  85. package/dist/cli/query/index.d.mts +0 -1
  86. package/dist/cli/services/application.d.mts +12 -1
  87. package/dist/cli/services/auth/service.d.mts +2 -0
  88. package/dist/cli/services/executor/service.d.mts +1 -1
  89. package/dist/cli/services/http-adapter/bundler.d.mts +3 -1
  90. package/dist/cli/services/http-adapter/service.d.mts +2 -1
  91. package/dist/cli/services/resolver/service.d.mts +1 -1
  92. package/dist/cli/services/tailordb/service.d.mts +3 -1
  93. package/dist/cli/services/workflow/bundler.d.mts +2 -1
  94. package/dist/cli/services/workflow/service.d.mts +1 -1
  95. package/dist/cli/shared/args.d.mts +1 -1
  96. package/dist/cli/shared/client.d.mts +1 -1
  97. package/dist/cli/shared/config-loader.d.mts +0 -1
  98. package/dist/cli/shared/context.d.mts +2 -1
  99. package/dist/cli/shared/script-executor.d.mts +0 -1
  100. package/dist/cli/shared/seed-chunker.d.mts +7 -3
  101. package/dist/cli/shared/type-generator.d.mts +0 -1
  102. package/dist/completion/zsh-worker.zsh +1 -1
  103. package/dist/configure/config/index.d.mts +0 -1
  104. package/dist/configure/config/types.d.mts +2 -2
  105. package/dist/configure/index.d.mts +14 -4
  106. package/dist/configure/index.mjs +196 -2
  107. package/dist/configure/index.mjs.map +1 -1
  108. package/dist/configure/services/aigateway/index.d.mts +0 -1
  109. package/dist/configure/services/aigateway/types.d.mts +0 -1
  110. package/dist/configure/services/auth/index.d.mts +0 -1
  111. package/dist/configure/services/auth/types.d.mts +15 -14
  112. package/dist/configure/services/executor/executor.d.mts +1 -1
  113. package/dist/configure/services/executor/index.d.mts +1 -0
  114. package/dist/configure/services/executor/operation.d.mts +2 -2
  115. package/dist/configure/services/executor/trigger/event.d.mts +0 -1
  116. package/dist/configure/services/executor/trigger/index.d.mts +0 -1
  117. package/dist/configure/services/executor/trigger/schedule.d.mts +0 -1
  118. package/dist/configure/services/executor/trigger/webhook.d.mts +0 -1
  119. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -2
  120. package/dist/configure/services/idp/index.d.mts +1 -5
  121. package/dist/configure/services/idp/permission.d.mts +4 -5
  122. package/dist/configure/services/idp/types.d.mts +0 -1
  123. package/dist/configure/services/index.d.mts +5 -0
  124. package/dist/configure/services/resolver/resolver.d.mts +1 -0
  125. package/dist/configure/services/resolver/types.d.mts +0 -1
  126. package/dist/configure/services/secrets/index.d.mts +0 -1
  127. package/dist/configure/services/secrets/types.d.mts +0 -1
  128. package/dist/configure/services/staticwebsite/index.d.mts +0 -1
  129. package/dist/configure/services/staticwebsite/types.d.mts +0 -1
  130. package/dist/configure/services/tailordb/permission.d.mts +4 -5
  131. package/dist/configure/services/tailordb/schema.d.mts +85 -49
  132. package/dist/configure/services/tailordb/types.d.mts +66 -17
  133. package/dist/configure/services/workflow/execution-policy.d.mts +0 -1
  134. package/dist/configure/services/workflow/execution-policy.types.d.mts +0 -1
  135. package/dist/configure/services/workflow/index.d.mts +1 -0
  136. package/dist/configure/services/workflow/job.d.mts +0 -1
  137. package/dist/configure/services/workflow/wait-point.d.mts +0 -1
  138. package/dist/configure/services/workflow/workflow.d.mts +1 -1
  139. package/dist/configure/types/field-runtime.d.mts +0 -1
  140. package/dist/configure/types/field.d.mts +1 -2
  141. package/dist/configure/types/field.types.d.mts +6 -45
  142. package/dist/configure/types/index.d.mts +1 -0
  143. package/dist/configure/types/type.d.mts +1 -2
  144. package/dist/kysely/index.d.mts +3 -4
  145. package/dist/{kysely-type-D-zflMGf.mjs → kysely-type-DqIRgDYR.mjs} +4 -3
  146. package/dist/kysely-type-DqIRgDYR.mjs.map +1 -0
  147. package/dist/parser/service/auth/index.d.mts +1 -1
  148. package/dist/parser/service/auth/schema.d.mts +2 -0
  149. package/dist/parser/service/http-adapter/index.d.mts +1 -1
  150. package/dist/parser/service/idp/types.d.mts +1 -0
  151. package/dist/parser/service/tailordb/types.d.mts +6 -1
  152. package/dist/plugin/builtin/enum-constants/index.d.mts +0 -1
  153. package/dist/plugin/builtin/file-utils/index.d.mts +0 -1
  154. package/dist/plugin/builtin/kysely-type/index.d.mts +0 -1
  155. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  156. package/dist/plugin/builtin/seed/index.d.mts +0 -1
  157. package/dist/plugin/get-generated-type.d.mts +0 -1
  158. package/dist/plugin/manager.d.mts +2 -1
  159. package/dist/plugin/types.d.mts +0 -1
  160. package/dist/plugin/with-context.d.mts +0 -1
  161. package/dist/{register-ts-hook-BM1caLT0.mjs → register-ts-hook-BhzVkej0.mjs} +553 -199
  162. package/dist/register-ts-hook-BhzVkej0.mjs.map +1 -0
  163. package/dist/runtime/aigateway.d.mts +0 -1
  164. package/dist/runtime/authconnection.d.mts +0 -1
  165. package/dist/runtime/context.d.mts +0 -1
  166. package/dist/runtime/globals.d.mts +0 -1
  167. package/dist/runtime/index.d.mts +0 -1
  168. package/dist/runtime/types.d.mts +9 -4
  169. package/dist/{schema-C4LYbXVG.mjs → schema-iCd1ugGp.mjs} +253 -50
  170. package/dist/schema-iCd1ugGp.mjs.map +1 -0
  171. package/dist/seed/index.d.mts +3 -2
  172. package/dist/service-BT0GPd01.mjs +3 -0
  173. package/dist/{service-ufH7sS8o.mjs → service-CzZEVrp9.mjs} +14 -9
  174. package/dist/service-CzZEVrp9.mjs.map +1 -0
  175. package/dist/{service_pb-B5w9rjPY.mjs → service_pb-Bk7dL-yT.mjs} +12 -2
  176. package/dist/{service_pb-B5w9rjPY.mjs.map → service_pb-Bk7dL-yT.mjs.map} +1 -1
  177. package/dist/{service_pb-B2FF59sP.mjs → service_pb-DZkfjB_6.mjs} +1 -1
  178. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +0 -1
  179. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +0 -1
  180. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +0 -1
  181. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +0 -1
  182. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +0 -1
  183. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +0 -1
  184. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +0 -1
  185. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +0 -1
  186. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +0 -1
  187. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +0 -1
  188. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +0 -1
  189. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +0 -1
  190. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -1
  191. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +0 -1
  192. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +0 -1
  193. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +0 -1
  194. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +0 -1
  195. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +0 -1
  196. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +0 -1
  197. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +0 -1
  198. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +0 -1
  199. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +0 -1
  200. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +0 -1
  201. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +0 -1
  202. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +0 -1
  203. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +0 -1
  204. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +0 -1
  205. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +0 -1
  206. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +0 -1
  207. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +0 -1
  208. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +0 -1
  209. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +0 -1
  210. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +0 -1
  211. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +0 -1
  212. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +0 -1
  213. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +0 -1
  214. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +0 -1
  215. package/dist/types/aigateway.generated.d.mts +5 -2
  216. package/dist/types/auth-connection.generated.d.mts +24 -11
  217. package/dist/types/auth.generated.d.mts +115 -84
  218. package/dist/types/executor.generated.d.mts +76 -84
  219. package/dist/types/helpers.d.mts +7 -6
  220. package/dist/types/http-adapter.generated.d.mts +11 -5
  221. package/dist/types/idp.generated.d.mts +536 -524
  222. package/dist/types/resolver.generated.d.mts +26 -11
  223. package/dist/types/staticwebsite.generated.d.mts +7 -3
  224. package/dist/types/tailordb.generated.d.mts +57 -29
  225. package/dist/types/workflow.generated.d.mts +9 -4
  226. package/dist/utils/test/index.d.mts +1 -2
  227. package/dist/utils/test/index.mjs +36 -10
  228. package/dist/utils/test/index.mjs.map +1 -1
  229. package/dist/utils/test/mock.d.mts +0 -1
  230. package/dist/vitest/index.d.mts +1 -1
  231. package/dist/vitest/mock-kysely.d.mts +0 -1
  232. package/dist/vitest/mocks/aigateway.d.mts +2 -2
  233. package/dist/vitest/mocks/authconnection.d.mts +2 -2
  234. package/dist/vitest/mocks/idp.d.mts +2 -2
  235. package/dist/vitest/mocks/secretmanager.d.mts +3 -1
  236. package/dist/vitest/mocks/tailordb.d.mts +6 -3
  237. package/dist/vitest/mocks/workflow.d.mts +11 -6
  238. package/dist/vitest/workflow-local.d.mts +1 -0
  239. package/docs/cli/setup.md +1 -1
  240. package/docs/cli-reference.md +7 -6
  241. package/docs/migration/v2.md +206 -0
  242. package/docs/services/aigateway.md +2 -0
  243. package/docs/services/tailordb.md +100 -68
  244. package/docs/services/workflow.md +1 -1
  245. package/package.json +22 -22
  246. package/dist/application-BO4ZF8wP.mjs +0 -3
  247. package/dist/application-BX13RArL.mjs.map +0 -1
  248. package/dist/cli/shared/trigger-context.d.mts +0 -1
  249. package/dist/field-runtime-CAnh_oow.mjs +0 -183
  250. package/dist/field-runtime-CAnh_oow.mjs.map +0 -1
  251. package/dist/kysely-type-D-zflMGf.mjs.map +0 -1
  252. package/dist/register-ts-hook-BM1caLT0.mjs.map +0 -1
  253. package/dist/schema-C4LYbXVG.mjs.map +0 -1
  254. package/dist/service-CkIwEctX.mjs +0 -3
  255. package/dist/service-ufH7sS8o.mjs.map +0 -1
  256. package/dist/types-C-lQ4se3.mjs +0 -4
  257. package/dist/types-CXF2OYdR.mjs +0 -199
  258. package/dist/types-CXF2OYdR.mjs.map +0 -1
@@ -1,93 +1,148 @@
1
1
  //#region src/types/auth.generated.d.ts
2
2
  type OIDC = {
3
- /** Identity provider name */name: string;
4
- kind: "OIDC"; /** OAuth2 client ID */
5
- clientID: string; /** OAuth2 client secret */
3
+ /** Identity provider name */
4
+ name: string;
5
+ kind: "OIDC";
6
+ /** OAuth2 client ID */
7
+ clientID: string;
8
+ /** OAuth2 client secret */
6
9
  clientSecret: {
7
10
  vaultName: string;
8
11
  secretKey: string;
9
- }; /** OIDC provider URL */
10
- providerURL: string; /** OIDC issuer URL (defaults to providerURL) */
11
- issuerURL?: string | undefined; /** JWT claim to use as username */
12
+ };
13
+ /** OIDC provider URL */
14
+ providerURL: string;
15
+ /** OIDC issuer URL (defaults to providerURL) */
16
+ issuerURL?: string | undefined;
17
+ /** JWT claim to use as username */
12
18
  usernameClaim?: string | undefined;
13
19
  };
14
20
  type SAML = {
15
- /** Identity provider name */name: string;
16
- kind: "SAML"; /** Enable signing of SAML requests */
17
- enableSignRequest: boolean; /** URL to fetch SAML metadata (mutually exclusive with rawMetadata) */
18
- metadataURL?: string | undefined; /** Raw SAML metadata XML (mutually exclusive with metadataURL) */
19
- rawMetadata?: string | undefined; /** URL to redirect to when SAML ACS receives a response with an empty RelayState. */
21
+ /** Identity provider name */
22
+ name: string;
23
+ kind: "SAML";
24
+ /** Enable signing of SAML requests */
25
+ enableSignRequest: boolean;
26
+ /** URL to fetch SAML metadata (mutually exclusive with rawMetadata) */
27
+ metadataURL?: string | undefined;
28
+ /** Raw SAML metadata XML (mutually exclusive with metadataURL) */
29
+ rawMetadata?: string | undefined;
30
+ /** URL to redirect to when SAML ACS receives a response with an empty RelayState. */
20
31
  defaultRedirectURL?: string | undefined;
21
32
  };
22
33
  type IDToken = {
23
- /** Identity provider name */name: string;
24
- kind: "IDToken"; /** ID token provider URL */
25
- providerURL: string; /** Client ID for ID token validation */
26
- clientID: string; /** ID token issuer URL */
27
- issuerURL?: string | undefined; /** JWT claim to use as username */
34
+ /** Identity provider name */
35
+ name: string;
36
+ kind: "IDToken";
37
+ /** ID token provider URL */
38
+ providerURL: string;
39
+ /** Client ID for ID token validation */
40
+ clientID: string;
41
+ /** ID token issuer URL */
42
+ issuerURL?: string | undefined;
43
+ /** JWT claim to use as username */
28
44
  usernameClaim?: string | undefined;
29
45
  };
30
46
  type BuiltinIdP = {
31
- /** Identity provider name */name: string;
32
- kind: "BuiltInIdP"; /** IdP namespace */
33
- namespace: string; /** OAuth2 client name in the IdP */
47
+ /** Identity provider name */
48
+ name: string;
49
+ kind: "BuiltInIdP";
50
+ /** IdP namespace */
51
+ namespace: string;
52
+ /** OAuth2 client name in the IdP */
34
53
  clientName: string;
35
54
  };
36
55
  type IdProvider = OIDC | SAML | IDToken | BuiltinIdP;
37
56
  type OAuth2ClientInput = {
38
- /** Allowed redirect URIs */redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[]; /** Client description */
39
- description?: string | undefined; /** Allowed OAuth2 grant types */
40
- grantTypes?: ("authorization_code" | "refresh_token")[] | undefined; /** OAuth2 client type */
41
- clientType?: "confidential" | "public" | "browser" | undefined; /** Access token lifetime in seconds (60-86400) */
42
- accessTokenLifetimeSeconds?: number | undefined; /** Refresh token lifetime in seconds (60-604800) */
43
- refreshTokenLifetimeSeconds?: number | undefined; /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
57
+ /** Allowed redirect URIs */
58
+ redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[];
59
+ /** Client description */
60
+ description?: string | undefined;
61
+ /** Allowed OAuth2 grant types */
62
+ grantTypes?: ("authorization_code" | "refresh_token")[] | undefined;
63
+ /** OAuth2 client type */
64
+ clientType?: "confidential" | "public" | "browser" | undefined;
65
+ /** Access token lifetime in seconds (60-86400) */
66
+ accessTokenLifetimeSeconds?: number | undefined;
67
+ /** Refresh token lifetime in seconds (60-604800) */
68
+ refreshTokenLifetimeSeconds?: number | undefined;
69
+ /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
44
70
  requireDpop?: boolean | undefined;
45
71
  };
46
72
  type OAuth2Client = {
47
- /** Allowed OAuth2 grant types */grantTypes: ("authorization_code" | "refresh_token")[]; /** Allowed redirect URIs */
48
- redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[]; /** Access token lifetime in seconds (60-86400) */
73
+ /** Allowed OAuth2 grant types */
74
+ grantTypes: ("authorization_code" | "refresh_token")[];
75
+ /** Allowed redirect URIs */
76
+ redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[];
77
+ /** Access token lifetime in seconds (60-86400) */
49
78
  accessTokenLifetimeSeconds: {
50
79
  seconds: bigint;
51
80
  nanos: number;
52
- } | undefined; /** Refresh token lifetime in seconds (60-604800) */
81
+ } | undefined;
82
+ /** Refresh token lifetime in seconds (60-604800) */
53
83
  refreshTokenLifetimeSeconds: {
54
84
  seconds: bigint;
55
85
  nanos: number;
56
- } | undefined; /** Client description */
57
- description?: string | undefined; /** OAuth2 client type */
58
- clientType?: "confidential" | "public" | "browser" | undefined; /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
86
+ } | undefined;
87
+ /** Client description */
88
+ description?: string | undefined;
89
+ /** OAuth2 client type */
90
+ clientType?: "confidential" | "public" | "browser" | undefined;
91
+ /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
59
92
  requireDpop?: boolean | undefined;
60
93
  };
61
94
  type SCIMAuthorization = {
62
- /** SCIM authorization type */type: "oauth2" | "bearer"; /** Bearer token secret (required for bearer type) */
95
+ /** SCIM authorization type */
96
+ type: "oauth2" | "bearer";
97
+ /** Bearer token secret (required for bearer type) */
63
98
  bearerSecret?: {
64
99
  vaultName: string;
65
100
  secretKey: string;
66
101
  } | undefined;
67
102
  };
103
+ /**
104
+ * SCIM attribute data type
105
+ */
106
+ type SCIMAttributeType = "string" | "number" | "boolean" | "datetime" | "complex";
68
107
  type SCIMAttribute = {
69
- /** Attribute data type */type: "string" | "number" | "boolean" | "datetime" | "complex"; /** Attribute name */
70
- name: string; /** Attribute description */
71
- description?: string | undefined; /** Attribute mutability */
72
- mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined; /** Whether the attribute is required */
73
- required?: boolean | undefined; /** Whether the attribute can have multiple values */
74
- multiValued?: boolean | undefined; /** Uniqueness constraint */
75
- uniqueness?: "none" | "server" | "global" | undefined; /** List of canonical values */
108
+ /** Attribute data type */
109
+ type: SCIMAttributeType;
110
+ /** Attribute name */
111
+ name: string;
112
+ /** Attribute description */
113
+ description?: string | undefined;
114
+ /** Attribute mutability */
115
+ mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
116
+ /** Whether the attribute is required */
117
+ required?: boolean | undefined;
118
+ /** Whether the attribute can have multiple values */
119
+ multiValued?: boolean | undefined;
120
+ /** Uniqueness constraint */
121
+ uniqueness?: "none" | "server" | "global" | undefined;
122
+ /** List of canonical values */
76
123
  canonicalValues?: string[] | null | undefined;
77
124
  subAttributes?: SCIMAttribute[] | null | undefined;
78
125
  };
79
126
  type SCIMAttributeMapping = {
80
- /** TailorDB field name to map to */tailorDBField: string; /** SCIM attribute path */
127
+ /** TailorDB field name to map to */
128
+ tailorDBField: string;
129
+ /** SCIM attribute path */
81
130
  scimPath: string;
82
131
  };
83
132
  type SCIMResource = {
84
- /** SCIM resource name */name: string; /** TailorDB namespace for the resource */
85
- tailorDBNamespace: string; /** TailorDB type name for the resource */
86
- tailorDBType: string; /** Core SCIM schema definition */
133
+ /** SCIM resource name */
134
+ name: string;
135
+ /** TailorDB namespace for the resource */
136
+ tailorDBNamespace: string;
137
+ /** TailorDB type name for the resource */
138
+ tailorDBType: string;
139
+ /** Core SCIM schema definition */
87
140
  coreSchema: {
88
- /** SCIM resource name */name: string;
141
+ /** SCIM resource name */
142
+ name: string;
89
143
  attributes: {
90
- type: "string" | "number" | "boolean" | "datetime" | "complex"; /** SCIM resource name */
144
+ type: "string" | "number" | "boolean" | "datetime" | "complex";
145
+ /** SCIM resource name */
91
146
  name: string;
92
147
  description?: string | undefined;
93
148
  mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
@@ -97,49 +152,25 @@ type SCIMResource = {
97
152
  canonicalValues?: string[] | null | undefined;
98
153
  subAttributes?: any[] | null | undefined;
99
154
  }[];
100
- }; /** Attribute mapping configuration */
101
- attributeMapping: {
102
- tailorDBField: string;
103
- scimPath: string;
104
- }[];
155
+ };
156
+ /** Attribute mapping configuration */
157
+ attributeMapping: SCIMAttributeMapping[];
105
158
  };
106
159
  type SCIMConfig = {
107
- /** Machine user name for SCIM operations */machineUserName: string; /** SCIM authorization configuration */
108
- authorization: {
109
- type: "oauth2" | "bearer";
110
- bearerSecret?: {
111
- vaultName: string;
112
- secretKey: string;
113
- } | undefined;
114
- }; /** SCIM resource definitions */
115
- resources: {
116
- name: string;
117
- tailorDBNamespace: string;
118
- tailorDBType: string;
119
- coreSchema: {
120
- name: string;
121
- attributes: {
122
- type: "string" | "number" | "boolean" | "datetime" | "complex";
123
- name: string;
124
- description?: string | undefined;
125
- mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
126
- required?: boolean | undefined;
127
- multiValued?: boolean | undefined;
128
- uniqueness?: "none" | "server" | "global" | undefined;
129
- canonicalValues?: string[] | null | undefined;
130
- subAttributes?: any[] | null | undefined;
131
- }[];
132
- };
133
- attributeMapping: {
134
- tailorDBField: string;
135
- scimPath: string;
136
- }[];
137
- }[];
160
+ /** Machine user name for SCIM operations */
161
+ machineUserName: string;
162
+ /** SCIM authorization configuration */
163
+ authorization: SCIMAuthorization;
164
+ /** SCIM resource definitions */
165
+ resources: SCIMResource[];
138
166
  };
139
167
  type TenantProvider = {
140
- /** TailorDB namespace for the tenant type */namespace: string; /** TailorDB type name for tenants */
141
- type: string; /** Field used as the tenant signature */
168
+ /** TailorDB namespace for the tenant type */
169
+ namespace: string;
170
+ /** TailorDB type name for tenants */
171
+ type: string;
172
+ /** Field used as the tenant signature */
142
173
  signatureField: string;
143
174
  };
144
175
  //#endregion
145
- export { BuiltinIdP, IDToken, IdProvider, OAuth2Client, OAuth2ClientInput, OIDC, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAuthorization, SCIMConfig, SCIMResource, TenantProvider };
176
+ export { BuiltinIdP, IDToken, IdProvider, OAuth2Client, OAuth2ClientInput, OIDC, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, TenantProvider };
@@ -1,39 +1,67 @@
1
1
  //#region src/types/executor.generated.d.ts
2
2
  type TailorDBTrigger = {
3
- /** TailorDB record event trigger */kind: "tailordb"; /** TailorDB event types to trigger on */
4
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[]; /** TailorDB type name to watch for events */
5
- typeName: string; /** Condition function to filter events */
3
+ /** TailorDB record event trigger */
4
+ kind: "tailordb";
5
+ /** TailorDB event types to trigger on */
6
+ events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
7
+ /** TailorDB type name to watch for events */
8
+ typeName: string;
9
+ /** Condition function to filter events */
6
10
  condition?: Function | undefined;
7
11
  };
8
12
  type ResolverExecutedTrigger = {
9
- kind: "resolverExecuted"; /** Name of the resolver to trigger on */
10
- resolverName: string; /** Condition function to filter events */
13
+ kind: "resolverExecuted";
14
+ /** Name of the resolver to trigger on */
15
+ resolverName: string;
16
+ /** Condition function to filter events */
11
17
  condition?: Function | undefined;
12
18
  };
13
19
  type ScheduleTriggerInput = {
14
- kind: "schedule"; /** CRON expression for the schedule */
15
- cron: string; /** Timezone for the CRON schedule (default: UTC) */
20
+ kind: "schedule";
21
+ /** CRON expression for the schedule */
22
+ cron: string;
23
+ /** Timezone for the CRON schedule (default: UTC) */
16
24
  timezone?: string | undefined;
17
25
  };
26
+ type ScheduleTrigger = {
27
+ kind: "schedule";
28
+ /** CRON expression for the schedule */
29
+ cron: string;
30
+ /** Timezone for the CRON schedule (default: UTC) */
31
+ timezone: string;
32
+ };
33
+ type IncomingWebhookTriggerResponse = {
34
+ /** Function returning the response body */
35
+ body?: Function | undefined;
36
+ /** HTTP status code for the response */
37
+ statusCode?: number | undefined;
38
+ };
18
39
  type IncomingWebhookTrigger = {
19
- kind: "incomingWebhook"; /** Response configuration */
20
- response?: {
21
- body?: Function | undefined;
22
- statusCode?: number | undefined;
23
- } | undefined;
40
+ kind: "incomingWebhook";
41
+ /** Response configuration */
42
+ response?: IncomingWebhookTriggerResponse;
24
43
  };
25
44
  type IdpUserTrigger = {
26
- /** IdP user event trigger */kind: "idpUser"; /** IdP user event types to trigger on */
27
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[]; /** IdP namespace name to subscribe to. If omitted, the project's only IdP is used; throws when multiple IdPs exist. */
45
+ /** IdP user event trigger */
46
+ kind: "idpUser";
47
+ /** IdP user event types to trigger on */
48
+ events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
49
+ /** IdP namespace name to subscribe to. If omitted, the project's only IdP is used; throws when multiple IdPs exist. */
28
50
  idp?: string | undefined;
29
51
  };
30
52
  type AuthAccessTokenTrigger = {
31
- /** Auth access token event trigger */kind: "authAccessToken"; /** Auth access token event types to trigger on */
53
+ /** Auth access token event trigger */
54
+ kind: "authAccessToken";
55
+ /** Auth access token event types to trigger on */
32
56
  events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
33
57
  };
58
+ type TriggerInput = TailorDBTrigger | ResolverExecutedTrigger | ScheduleTriggerInput | IncomingWebhookTrigger | IdpUserTrigger | AuthAccessTokenTrigger;
59
+ type Trigger = TailorDBTrigger | ResolverExecutedTrigger | ScheduleTrigger | IncomingWebhookTrigger | IdpUserTrigger | AuthAccessTokenTrigger;
34
60
  type FunctionOperation = {
35
- kind: "function" | "jobFunction"; /** Function implementation */
36
- body: Function; /** Invoker for the function execution */
61
+ kind: "function" | "jobFunction";
62
+ /** Function implementation */
63
+ body: Function;
64
+ /** Invoker for the function execution */
37
65
  invoker?: string | {
38
66
  namespace: string;
39
67
  machineUserName: string;
@@ -41,18 +69,24 @@ type FunctionOperation = {
41
69
  };
42
70
  type GqlOperation = {
43
71
  kind: "graphql";
44
- query: string; /** Target application name for the GraphQL query */
45
- appName?: string | undefined; /** Function to compute GraphQL variables */
46
- variables?: Function | undefined; /** Invoker for the GraphQL execution */
72
+ query: string;
73
+ /** Target application name for the GraphQL query */
74
+ appName?: string | undefined;
75
+ /** Function to compute GraphQL variables */
76
+ variables?: Function | undefined;
77
+ /** Invoker for the GraphQL execution */
47
78
  invoker?: string | {
48
79
  namespace: string;
49
80
  machineUserName: string;
50
81
  } | undefined;
51
82
  };
52
83
  type WebhookOperation = {
53
- kind: "webhook"; /** Function returning the webhook URL */
54
- url: Function; /** Function to compute the request body */
55
- requestBody?: Function | undefined; /** HTTP headers for the webhook request */
84
+ kind: "webhook";
85
+ /** Function returning the webhook URL */
86
+ url: Function;
87
+ /** Function to compute the request body */
88
+ requestBody?: Function | undefined;
89
+ /** HTTP headers for the webhook request */
56
90
  headers?: {
57
91
  [x: string]: string | {
58
92
  vault: string;
@@ -72,68 +106,25 @@ type WorkflowOperation = {
72
106
  } | undefined;
73
107
  };
74
108
  type ExecutorInput = {
75
- /** Executor name */name: string; /** Event trigger configuration */
76
- trigger: {
77
- kind: "tailordb";
78
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
79
- typeName: string;
80
- condition?: Function | undefined;
81
- } | {
82
- kind: "resolverExecuted";
83
- resolverName: string;
84
- condition?: Function | undefined;
85
- } | {
86
- kind: "schedule";
87
- cron: string;
88
- timezone?: string | undefined;
89
- } | {
90
- kind: "incomingWebhook";
91
- response?: {
92
- body?: Function | undefined;
93
- statusCode?: number | undefined;
94
- } | undefined;
95
- } | {
96
- kind: "idpUser";
97
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
98
- idp?: string | undefined;
99
- } | {
100
- kind: "authAccessToken";
101
- events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
102
- }; /** Operation to execute when triggered */
103
- operation: unknown; /** Executor description */
104
- description?: string | undefined; /** Whether the executor is disabled */
109
+ /** Executor name */
110
+ name: string;
111
+ /** Event trigger configuration */
112
+ trigger: TriggerInput;
113
+ /** Operation to execute when triggered */
114
+ operation: unknown;
115
+ /** Executor description */
116
+ description?: string | undefined;
117
+ /** Whether the executor is disabled */
105
118
  disabled?: boolean | undefined;
106
119
  };
107
120
  type Executor = {
108
- /** Executor name */name: string; /** Whether the executor is disabled */
109
- disabled: boolean; /** Event trigger configuration */
110
- trigger: {
111
- kind: "tailordb";
112
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
113
- typeName: string;
114
- condition?: Function | undefined;
115
- } | {
116
- kind: "resolverExecuted";
117
- resolverName: string;
118
- condition?: Function | undefined;
119
- } | {
120
- kind: "schedule";
121
- cron: string;
122
- timezone: string;
123
- } | {
124
- kind: "incomingWebhook";
125
- response?: {
126
- body?: Function | undefined;
127
- statusCode?: number | undefined;
128
- } | undefined;
129
- } | {
130
- kind: "idpUser";
131
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
132
- idp?: string | undefined;
133
- } | {
134
- kind: "authAccessToken";
135
- events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
136
- }; /** Operation to execute when triggered */
121
+ /** Executor name */
122
+ name: string;
123
+ /** Whether the executor is disabled */
124
+ disabled: boolean;
125
+ /** Event trigger configuration */
126
+ trigger: Trigger;
127
+ /** Operation to execute when triggered */
137
128
  operation: {
138
129
  kind: "workflow";
139
130
  workflowName: string;
@@ -170,8 +161,9 @@ type Executor = {
170
161
  key: string;
171
162
  };
172
163
  } | undefined;
173
- }; /** Executor description */
164
+ };
165
+ /** Executor description */
174
166
  description?: string | undefined;
175
167
  };
176
168
  //#endregion
177
- export { AuthAccessTokenTrigger, Executor, ExecutorInput, FunctionOperation, GqlOperation, IdpUserTrigger, IncomingWebhookTrigger, ResolverExecutedTrigger, ScheduleTriggerInput, TailorDBTrigger, WebhookOperation, WorkflowOperation };
169
+ export { AuthAccessTokenTrigger, Executor, ExecutorInput, FunctionOperation, GqlOperation, IdpUserTrigger, IncomingWebhookTrigger, IncomingWebhookTriggerResponse, ResolverExecutedTrigger, ScheduleTrigger, ScheduleTriggerInput, TailorDBTrigger, Trigger, TriggerInput, WebhookOperation, WorkflowOperation };
@@ -1,17 +1,18 @@
1
1
  //#region src/types/helpers.d.ts
2
- type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
2
+ type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K]; } & {};
3
3
  type TypeLevelError<Message extends string> = {
4
4
  readonly $error: Message;
5
5
  };
6
- type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
6
+ type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]>; } & {} : T;
7
+ type DeepReadonly<T> = T extends Date | RegExp | Function ? T : T extends readonly (infer E)[] ? readonly DeepReadonly<E>[] : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]>; } : T;
7
8
  type output<T> = T extends {
8
9
  _output: infer U;
9
10
  } ? DeepWritable<U> : never;
10
- type NullableToOptional<T> = { [K in keyof T as null extends T[K] ? never : K]: T[K] } & { [K in keyof T as null extends T[K] ? K : never]?: T[K] };
11
+ type NullableToOptional<T> = { [K in keyof T as null extends T[K] ? never : K]: T[K]; } & { [K in keyof T as null extends T[K] ? K : never]?: T[K]; };
11
12
  type InferFieldsOutput<F extends Record<string, {
12
13
  _output: any;
13
14
  [key: string]: any;
14
- }>> = DeepWritable<Prettify<NullableToOptional<{ [K in keyof F]: output<F[K]> }>>>;
15
+ }>> = DeepWritable<Prettify<NullableToOptional<{ [K in keyof F]: output<F[K]>; }>>>;
15
16
  type JsonValue = string | number | boolean | null | JsonValue[] | {
16
17
  [key: string]: JsonValue;
17
18
  };
@@ -34,6 +35,6 @@ type JsonValue = string | number | boolean | null | JsonValue[] | {
34
35
  */
35
36
  type JsonCompatible<T> = T extends string | number | boolean | null | undefined ? T : T extends readonly (infer U)[] ? JsonCompatible<U>[] : T extends Function ? never : T extends object ? T extends {
36
37
  toJSON: () => unknown;
37
- } ? never : { [K in keyof T]: JsonCompatible<T[K]> } : never;
38
+ } ? never : { [K in keyof T]: JsonCompatible<T[K]>; } : never;
38
39
  //#endregion
39
- export { DeepWritable, InferFieldsOutput, JsonCompatible, JsonValue, NullableToOptional, Prettify, TypeLevelError, output };
40
+ export { DeepReadonly, DeepWritable, InferFieldsOutput, JsonCompatible, JsonValue, NullableToOptional, Prettify, TypeLevelError, output };
@@ -1,16 +1,22 @@
1
1
  //#region src/types/http-adapter.generated.d.ts
2
2
  type HttpAdapterConfigInput = {
3
- /** Unique adapter name within the domain */name: string; /** Path pattern with segment wildcards (trailing or single-segment) */
4
- pathPattern: string; /** Per-method functions that transform HTTP requests to GraphQL requests */
3
+ /** Unique adapter name within the domain */
4
+ name: string;
5
+ /** Path pattern with segment wildcards (trailing or single-segment) */
6
+ pathPattern: string;
7
+ /** Per-method functions that transform HTTP requests to GraphQL requests */
5
8
  input: {
6
9
  get?: Function | undefined;
7
10
  post?: Function | undefined;
8
11
  put?: Function | undefined;
9
12
  patch?: Function | undefined;
10
13
  delete?: Function | undefined;
11
- }; /** Whether the adapter is active */
12
- enabled?: boolean | undefined; /** Matching priority; the lowest value wins when multiple adapters match */
13
- priority?: number | undefined; /** Function that transforms GraphQL response to HTTP response */
14
+ };
15
+ /** Whether the adapter is active */
16
+ enabled?: boolean | undefined;
17
+ /** Matching priority; the lowest value wins when multiple adapters match */
18
+ priority?: number | undefined;
19
+ /** Function that transforms GraphQL response to HTTP response */
14
20
  output?: Function | undefined;
15
21
  };
16
22
  //#endregion