@tailor-platform/sdk 2.14.0 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/application-BWOMdL3D.mjs +1 -0
  3. package/dist/{application-CiN_er9X.mjs → application-CfevPO-k.mjs} +8 -8
  4. package/dist/application-CfevPO-k.mjs.map +1 -0
  5. package/dist/cli/commands/api/api-call.d.mts +4 -5
  6. package/dist/cli/commands/deploy/config-id-injector.d.mts +3 -4
  7. package/dist/cli/commands/deploy/deploy.d.mts +3 -4
  8. package/dist/cli/commands/deploy/function-registry-types.d.mts +2 -3
  9. package/dist/cli/commands/executor/get.d.mts +3 -4
  10. package/dist/cli/commands/executor/jobs.d.mts +10 -11
  11. package/dist/cli/commands/executor/list.d.mts +3 -4
  12. package/dist/cli/commands/executor/transform.d.mts +6 -7
  13. package/dist/cli/commands/executor/trigger.d.mts +4 -5
  14. package/dist/cli/commands/executor/webhook.d.mts +4 -5
  15. package/dist/cli/commands/function/get.d.mts +3 -4
  16. package/dist/cli/commands/function/list.d.mts +3 -4
  17. package/dist/cli/commands/function/transform.d.mts +2 -3
  18. package/dist/cli/commands/generate/options.d.mts +2 -3
  19. package/dist/cli/commands/generate/seed/bundler.d.mts +3 -4
  20. package/dist/cli/commands/generate/service.d.mts +2 -3
  21. package/dist/cli/commands/machineuser/list.d.mts +4 -5
  22. package/dist/cli/commands/machineuser/token.d.mts +4 -5
  23. package/dist/cli/commands/oauth2client/get.d.mts +3 -4
  24. package/dist/cli/commands/oauth2client/list.d.mts +3 -4
  25. package/dist/cli/commands/oauth2client/transform.d.mts +3 -4
  26. package/dist/cli/commands/organization/folder/create.d.mts +3 -4
  27. package/dist/cli/commands/organization/folder/delete.d.mts +3 -4
  28. package/dist/cli/commands/organization/folder/get.d.mts +3 -4
  29. package/dist/cli/commands/organization/folder/list.d.mts +3 -4
  30. package/dist/cli/commands/organization/folder/update.d.mts +3 -4
  31. package/dist/cli/commands/organization/get.d.mts +3 -4
  32. package/dist/cli/commands/organization/list.d.mts +3 -4
  33. package/dist/cli/commands/organization/transform.d.mts +5 -6
  34. package/dist/cli/commands/organization/tree.d.mts +3 -4
  35. package/dist/cli/commands/organization/update.d.mts +3 -4
  36. package/dist/cli/commands/remove.d.mts +3 -4
  37. package/dist/cli/commands/show.d.mts +6 -7
  38. package/dist/cli/commands/staticwebsite/deploy.d.mts +3 -4
  39. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -4
  40. package/dist/cli/commands/tailordb/migrate/config.d.mts +3 -4
  41. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +34 -35
  42. package/dist/cli/commands/tailordb/migrate/generate.d.mts +3 -4
  43. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +3 -4
  44. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -5
  45. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +13 -14
  46. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -3
  47. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -3
  48. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +21 -22
  49. package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -3
  50. package/dist/cli/commands/tailordb/truncate.d.mts +3 -4
  51. package/dist/cli/commands/workflow/executions.d.mts +8 -9
  52. package/dist/cli/commands/workflow/get.d.mts +3 -4
  53. package/dist/cli/commands/workflow/list.d.mts +3 -4
  54. package/dist/cli/commands/workflow/resume.d.mts +4 -5
  55. package/dist/cli/commands/workflow/start.d.mts +5 -6
  56. package/dist/cli/commands/workflow/status.d.mts +3 -4
  57. package/dist/cli/commands/workflow/transform.d.mts +5 -6
  58. package/dist/cli/commands/workflow/wait.d.mts +3 -4
  59. package/dist/cli/commands/workflow/waiter.d.mts +3 -4
  60. package/dist/cli/commands/workspace/app/health.d.mts +3 -4
  61. package/dist/cli/commands/workspace/app/list.d.mts +3 -4
  62. package/dist/cli/commands/workspace/app/transform.d.mts +3 -4
  63. package/dist/cli/commands/workspace/create.d.mts +3 -4
  64. package/dist/cli/commands/workspace/delete.d.mts +3 -4
  65. package/dist/cli/commands/workspace/get.d.mts +3 -4
  66. package/dist/cli/commands/workspace/list.d.mts +3 -4
  67. package/dist/cli/commands/workspace/restore.d.mts +3 -4
  68. package/dist/cli/commands/workspace/transform.d.mts +3 -4
  69. package/dist/cli/commands/workspace/user/invite.d.mts +3 -4
  70. package/dist/cli/commands/workspace/user/list.d.mts +3 -4
  71. package/dist/cli/commands/workspace/user/remove.d.mts +3 -4
  72. package/dist/cli/commands/workspace/user/transform.d.mts +2 -3
  73. package/dist/cli/commands/workspace/user/update.d.mts +3 -4
  74. package/dist/cli/lib.mjs +1 -1
  75. package/dist/cli/main.d.mts +2 -3
  76. package/dist/cli/main.mjs +18 -18
  77. package/dist/cli/main.mjs.map +1 -1
  78. package/dist/cli/query/index.d.mts +2 -3
  79. package/dist/cli/shared/args.d.mts +11 -12
  80. package/dist/cli/shared/beta.d.mts +2 -3
  81. package/dist/cli/shared/client.d.mts +4 -5
  82. package/dist/cli/shared/command.d.mts +2 -3
  83. package/dist/cli/shared/config-loader.d.mts +5 -6
  84. package/dist/cli/shared/config.d.mts +2 -3
  85. package/dist/cli/shared/context.d.mts +3 -4
  86. package/dist/cli/shared/error-json.d.mts +4 -5
  87. package/dist/cli/shared/logger.d.mts +7 -8
  88. package/dist/cli/shared/prompt.d.mts +7 -8
  89. package/dist/cli/shared/readonly-guard.d.mts +2 -3
  90. package/dist/cli/shared/script-executor.d.mts +7 -8
  91. package/dist/cli/shared/seed-chunker.d.mts +5 -6
  92. package/dist/cli/shared/seed-context.d.mts +5 -5
  93. package/dist/cli/shared/tailordb-namespaces.d.mts +5 -6
  94. package/dist/cli/shared/type-generator.d.mts +2 -3
  95. package/dist/cli/shared/workspace-name.d.mts +2 -3
  96. package/dist/completion/zsh-worker.zsh +1 -1
  97. package/dist/configure/config/index.d.mts +3 -4
  98. package/dist/configure/config/types.d.mts +14 -15
  99. package/dist/configure/index.d.mts +6 -6
  100. package/dist/configure/services/aigateway/index.d.mts +2 -2
  101. package/dist/configure/services/aigateway/types.d.mts +4 -5
  102. package/dist/configure/services/auth/index.d.mts +3 -3
  103. package/dist/configure/services/auth/types.d.mts +24 -25
  104. package/dist/configure/services/executor/executor.d.mts +3 -4
  105. package/dist/configure/services/executor/operation.d.mts +6 -7
  106. package/dist/configure/services/executor/trigger/event.d.mts +56 -57
  107. package/dist/configure/services/executor/trigger/index.d.mts +2 -2
  108. package/dist/configure/services/executor/trigger/schedule.d.mts +4 -5
  109. package/dist/configure/services/executor/trigger/webhook.d.mts +8 -9
  110. package/dist/configure/services/http-adapter/http-adapter.d.mts +12 -13
  111. package/dist/configure/services/idp/index.d.mts +2 -2
  112. package/dist/configure/services/idp/permission.d.mts +4 -5
  113. package/dist/configure/services/idp/types.d.mts +5 -6
  114. package/dist/configure/services/resolver/permission.d.mts +4 -5
  115. package/dist/configure/services/resolver/resolver.d.mts +3 -4
  116. package/dist/configure/services/resolver/types.d.mts +2 -3
  117. package/dist/configure/services/secrets/index.d.mts +3 -3
  118. package/dist/configure/services/secrets/types.d.mts +3 -4
  119. package/dist/configure/services/staticwebsite/index.d.mts +2 -2
  120. package/dist/configure/services/staticwebsite/types.d.mts +3 -4
  121. package/dist/configure/services/tailordb/permission.d.mts +6 -7
  122. package/dist/configure/services/tailordb/schema.d.mts +7 -8
  123. package/dist/configure/services/tailordb/types.d.mts +25 -26
  124. package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
  125. package/dist/configure/services/workflow/execution-policy.types.d.mts +8 -9
  126. package/dist/configure/services/workflow/job.d.mts +4 -5
  127. package/dist/configure/services/workflow/wait-point.d.mts +5 -6
  128. package/dist/configure/services/workflow/workflow.d.mts +4 -4
  129. package/dist/configure/types/aigateway-name.d.mts +3 -4
  130. package/dist/configure/types/auth-namespace-name.d.mts +3 -4
  131. package/dist/configure/types/connection-name.d.mts +3 -4
  132. package/dist/configure/types/field.d.mts +3 -4
  133. package/dist/configure/types/field.types.d.mts +13 -14
  134. package/dist/configure/types/idp-name.d.mts +3 -4
  135. package/dist/configure/types/permission-operand.types.d.mts +7 -8
  136. package/dist/configure/types/type.d.mts +3 -4
  137. package/dist/kysely/index.d.mts +18 -18
  138. package/dist/parser/service/idp/types.d.mts +2 -3
  139. package/dist/parser/service/tailordb/type-source.d.mts +2 -3
  140. package/dist/parser/service/tailordb/types.d.mts +13 -14
  141. package/dist/plugin/builtin/enum-constants/index.d.mts +3 -4
  142. package/dist/plugin/builtin/file-utils/index.d.mts +3 -4
  143. package/dist/plugin/builtin/kysely-type/index.d.mts +4 -5
  144. package/dist/plugin/builtin/seed/index.d.mts +4 -5
  145. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +2 -3
  146. package/dist/plugin/get-generated-table.d.mts +2 -3
  147. package/dist/plugin/index.mjs +1 -1
  148. package/dist/plugin/index.mjs.map +1 -1
  149. package/dist/plugin/types.d.mts +29 -29
  150. package/dist/plugin/with-context.d.mts +9 -10
  151. package/dist/{register-ts-hook-DS1zYiCV.mjs → register-ts-hook-DZ1Kpt4s.mjs} +44 -44
  152. package/dist/register-ts-hook-DZ1Kpt4s.mjs.map +1 -0
  153. package/dist/runtime/aigateway.d.mts +4 -5
  154. package/dist/runtime/authconnection.d.mts +3 -4
  155. package/dist/runtime/context.d.mts +6 -7
  156. package/dist/runtime/date.d.mts +2 -3
  157. package/dist/runtime/field-parse.d.mts +2 -3
  158. package/dist/runtime/file.d.mts +14 -15
  159. package/dist/runtime/globals.d.mts +2 -1
  160. package/dist/runtime/iconv.d.mts +5 -6
  161. package/dist/runtime/idp.d.mts +14 -15
  162. package/dist/runtime/index.d.mts +7 -7
  163. package/dist/runtime/logger.d.mts +10 -11
  164. package/dist/runtime/secretmanager.d.mts +3 -4
  165. package/dist/runtime/types.d.mts +7 -8
  166. package/dist/runtime/workflow.d.mts +7 -8
  167. package/dist/seed/index.d.mts +3 -3
  168. package/dist/shared/src/color.d.mts +2 -3
  169. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +21 -22
  170. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +2 -3
  171. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +35 -36
  172. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +6 -7
  173. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +229 -230
  174. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +40 -41
  175. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +9 -10
  176. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +3 -4
  177. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +45 -46
  178. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +24 -25
  179. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +17 -18
  180. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +29 -30
  181. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +8 -9
  182. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +2 -3
  183. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +37 -38
  184. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +13 -14
  185. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +19 -20
  186. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +2 -3
  187. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +25 -26
  188. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +59 -60
  189. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +10 -11
  190. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +7 -8
  191. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +37 -38
  192. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +4 -5
  193. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +6 -7
  194. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +21 -22
  195. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +3 -4
  196. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +50 -51
  197. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +4 -5
  198. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +74 -75
  199. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +35 -36
  200. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +41 -42
  201. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +11 -12
  202. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +97 -98
  203. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +11 -12
  204. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +209 -210
  205. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +24 -25
  206. package/dist/types/aigateway.generated.d.mts +3 -4
  207. package/dist/types/app-config.generated.d.mts +2 -3
  208. package/dist/types/auth-connection.generated.d.mts +3 -4
  209. package/dist/types/auth.generated.d.mts +15 -16
  210. package/dist/types/executor.generated.d.mts +26 -27
  211. package/dist/types/helpers.d.mts +15 -13
  212. package/dist/types/http-adapter.generated.d.mts +2 -3
  213. package/dist/types/idp.generated.d.mts +7 -8
  214. package/dist/types/resolver.generated.d.mts +4 -5
  215. package/dist/types/secrets.generated.d.mts +3 -4
  216. package/dist/types/staticwebsite.generated.d.mts +3 -4
  217. package/dist/types/tailordb.generated.d.mts +7 -8
  218. package/dist/types/workflow.generated.d.mts +3 -4
  219. package/dist/utils/test/index.d.mts +3 -4
  220. package/dist/vitest/index.d.mts +2 -2
  221. package/dist/vitest/mock-kysely.d.mts +4 -5
  222. package/dist/vitest/mocks/aigateway.d.mts +3 -4
  223. package/dist/vitest/mocks/authconnection.d.mts +3 -4
  224. package/dist/vitest/mocks/file.d.mts +3 -4
  225. package/dist/vitest/mocks/iconv.d.mts +3 -4
  226. package/dist/vitest/mocks/idp.d.mts +3 -4
  227. package/dist/vitest/mocks/logger.d.mts +3 -4
  228. package/dist/vitest/mocks/secretmanager.d.mts +3 -4
  229. package/dist/vitest/mocks/tailordb-pglite.d.mts +4 -5
  230. package/dist/vitest/mocks/tailordb.d.mts +6 -7
  231. package/dist/vitest/mocks/workflow.d.mts +2 -3
  232. package/dist/vitest/pglite-kysely.d.mts +5 -6
  233. package/dist/vitest/setup.d.mts +6 -7
  234. package/dist/vitest/workflow-local.d.mts +5 -6
  235. package/docs/services/idp.md +6 -3
  236. package/package.json +12 -12
  237. package/dist/application-CiN_er9X.mjs.map +0 -1
  238. package/dist/application-_8rjQRx8.mjs +0 -1
  239. package/dist/register-ts-hook-DS1zYiCV.mjs.map +0 -1
@@ -17,7 +17,7 @@ type EqualityCondition<User extends object = InferredAttributes, Update extends
17
17
  type StringContainsCondition<User extends object, Update extends boolean> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, string[] | UserStringArrayOperand<User>];
18
18
  type BooleanContainsCondition<User extends object, Update extends boolean> = readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>];
19
19
  type ContainsCondition<User extends object = InferredAttributes, Update extends boolean = boolean> = StringContainsCondition<User, Update> | BooleanContainsCondition<User, Update>;
20
- type IdPPermissionCondition<User extends object = InferredAttributes, Update extends boolean = boolean> = EqualityCondition<User, Update> | ContainsCondition<User, Update>;
20
+ export type IdPPermissionCondition<User extends object = InferredAttributes, Update extends boolean = boolean> = EqualityCondition<User, Update> | ContainsCondition<User, Update>;
21
21
  type IdPActionPermission<User extends object = InferredAttributes, Update extends boolean = boolean> = {
22
22
  conditions: IdPPermissionCondition<User, Update> | readonly IdPPermissionCondition<User, Update>[];
23
23
  description?: string | undefined;
@@ -44,7 +44,7 @@ type IdPActionPermission<User extends object = InferredAttributes, Update extend
44
44
  * unenrollMfa: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
45
45
  * };
46
46
  */
47
- type IdPPermission<User extends object = InferredAttributes> = {
47
+ export type IdPPermission<User extends object = InferredAttributes> = {
48
48
  create: readonly IdPActionPermission<User, false>[];
49
49
  read: readonly IdPActionPermission<User, false>[];
50
50
  update: readonly IdPActionPermission<User, true>[];
@@ -59,6 +59,5 @@ type IdPPermission<User extends object = InferredAttributes> = {
59
59
  * Do not use this in production environments, as it effectively disables
60
60
  * authorization checks.
61
61
  */
62
- declare const unsafeAllowAllIdPPermission: IdPPermission;
63
- //#endregion
64
- export { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission };
62
+ export declare const unsafeAllowAllIdPPermission: IdPPermission;
63
+ //#endregion
@@ -3,21 +3,20 @@ import { IdPPermission } from "./permission.mjs";
3
3
  import { IdPInput } from "../../../types/idp.generated.mjs";
4
4
  //#region src/configure/services/idp/types.d.ts
5
5
  declare const idpDefinitionBrand: unique symbol;
6
- type IdpDefinitionBrand = {
6
+ export type IdpDefinitionBrand = {
7
7
  readonly [idpDefinitionBrand]: true;
8
8
  };
9
9
  type DefinedIdp<Name extends string, Config, ClientNames extends string> = Config & {
10
10
  name: Name;
11
11
  provider(providerName: string, clientName: ClientNames): BuiltinIdP;
12
12
  } & IdpDefinitionBrand;
13
- type IdPExternalConfig = {
13
+ export type IdPExternalConfig = {
14
14
  name: string;
15
15
  external: true;
16
16
  };
17
17
  type IdPOwnConfigInput = Omit<IdPInput, "permission"> & {
18
18
  permission?: IdPPermission;
19
19
  };
20
- type IdPOwnConfig = Omit<DefinedIdp<string, IdPOwnConfigInput, string>, "provider">;
21
- type IdPConfig = IdPOwnConfig | IdPExternalConfig;
22
- //#endregion
23
- export { IdPConfig, IdPExternalConfig, IdPOwnConfig, IdpDefinitionBrand };
20
+ export type IdPOwnConfig = Omit<DefinedIdp<string, IdPOwnConfigInput, string>, "provider">;
21
+ export type IdPConfig = IdPOwnConfig | IdPExternalConfig;
22
+ //#endregion
@@ -16,12 +16,12 @@ type BooleanEqualityCondition<User extends object> = readonly [UserBooleanOperan
16
16
  * `auth.userProfile.attributes` (or `auth.machineUserAttributes` when
17
17
  * `userProfile` is omitted) become available as types.
18
18
  */
19
- type ResolverPermissionCondition<User extends object = InferredAttributes> = StringEqualityCondition<User> | BooleanEqualityCondition<User>;
19
+ export type ResolverPermissionCondition<User extends object = InferredAttributes> = StringEqualityCondition<User> | BooleanEqualityCondition<User>;
20
20
  /**
21
21
  * A single access policy, in the same style as TailorDB's `.permission()`
22
22
  * policies.
23
23
  */
24
- type ResolverPermissionPolicy<User extends object = InferredAttributes> = {
24
+ export type ResolverPermissionPolicy<User extends object = InferredAttributes> = {
25
25
  conditions: ResolverPermissionCondition<User> | readonly ResolverPermissionCondition<User>[];
26
26
  /** Whether matching callers are granted (`true`) or denied (`false`) access. */
27
27
  permit: boolean;
@@ -59,6 +59,5 @@ type ResolverPermissionPolicy<User extends object = InferredAttributes> = {
59
59
  * @example
60
60
  * const permission: ResolverPermission = "allowAnonymous";
61
61
  */
62
- type ResolverPermission<User extends object = InferredAttributes> = readonly ResolverPermissionPolicy<User>[] | "allowAnonymous";
63
- //#endregion
64
- export { ResolverPermission, ResolverPermissionCondition, ResolverPermissionPolicy };
62
+ export type ResolverPermission<User extends object = InferredAttributes> = readonly ResolverPermissionPolicy<User>[] | "allowAnonymous";
63
+ //#endregion
@@ -76,13 +76,12 @@ type ResolverReturn<Input extends Record<string, TailorAnyField> | undefined, Ou
76
76
  * }),
77
77
  * });
78
78
  */
79
- declare function createResolver<Input extends Record<string, TailorAnyField> | undefined = undefined, Output extends TailorAnyField | Record<string, TailorAnyField> = TailorAnyField>(config: Omit<ResolverInput, "input" | "output" | "body" | "invoker" | "permission"> & Readonly<{
79
+ export declare function createResolver<Input extends Record<string, TailorAnyField> | undefined = undefined, Output extends TailorAnyField | Record<string, TailorAnyField> = TailorAnyField>(config: Omit<ResolverInput, "input" | "output" | "body" | "invoker" | "permission"> & Readonly<{
80
80
  input?: Input;
81
81
  output: Output;
82
82
  body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
83
83
  invoker?: MachineUserName;
84
84
  permission?: ResolverPermission;
85
85
  }>): ResolverReturn<Input, Output>;
86
- type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
87
- //#endregion
88
- export { ResolverConfig, createResolver };
86
+ export type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
87
+ //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Resolver } from "../../../types/resolver.generated.mjs";
2
2
  //#region src/configure/services/resolver/types.d.ts
3
- type QueryType = Resolver["operation"];
4
- //#endregion
5
- export { QueryType };
3
+ export type QueryType = Resolver["operation"];
4
+ //#endregion
@@ -19,7 +19,7 @@ type DefinedSecrets<T extends SecretsInputNullish> = {
19
19
  * @param config - Secrets configuration mapping vault names to their secrets
20
20
  * @returns Defined secrets with typed runtime access methods
21
21
  */
22
- declare function defineSecretManager<const T extends SecretsInput>(config: T): DefinedSecrets<T>;
22
+ export declare function defineSecretManager<const T extends SecretsInput>(config: T): DefinedSecrets<T>;
23
23
  /**
24
24
  * Define secrets configuration for the Tailor SDK with ignoreNullishValues option.
25
25
  * When `ignoreNullishValues` is true, secrets with nullish values are skipped during deploy
@@ -30,8 +30,8 @@ declare function defineSecretManager<const T extends SecretsInput>(config: T): D
30
30
  * @param options.ignoreNullishValues - When true, secrets with nullish values are skipped during deploy
31
31
  * @returns Defined secrets with typed runtime access methods
32
32
  */
33
- declare function defineSecretManager<const T extends SecretsInputNullish>(config: T, options: {
33
+ export declare function defineSecretManager<const T extends SecretsInputNullish>(config: T, options: {
34
34
  ignoreNullishValues: true;
35
35
  }): DefinedSecrets<T>;
36
36
  //#endregion
37
- export { type SecretsConfig, defineSecretManager };
37
+ export type { SecretsConfig };
@@ -1,10 +1,9 @@
1
1
  import { SecretsInput } from "../../../types/secrets.generated.mjs";
2
2
  //#region src/configure/services/secrets/types.d.ts
3
3
  declare const secretsDefinitionBrand: unique symbol;
4
- type SecretsDefinitionBrand = {
4
+ export type SecretsDefinitionBrand = {
5
5
  readonly [secretsDefinitionBrand]: true;
6
6
  };
7
7
  /** Type accepted by `AppConfig.secrets`. Only values returned by `defineSecretManager()` satisfy this. */
8
- type SecretsConfig = SecretsInput & SecretsDefinitionBrand;
9
- //#endregion
10
- export { SecretsConfig, SecretsDefinitionBrand };
8
+ export type SecretsConfig = SecretsInput & SecretsDefinitionBrand;
9
+ //#endregion
@@ -7,7 +7,7 @@ import { StaticWebsiteConfig, StaticWebsiteDefinitionBrand } from "./types.mjs";
7
7
  * @param config - Static website configuration
8
8
  * @returns Defined static website
9
9
  */
10
- declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
10
+ export declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
11
11
  readonly name: string;
12
12
  readonly url: `${string}:url`;
13
13
  readonly description?: string | undefined;
@@ -15,4 +15,4 @@ declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInp
15
15
  readonly customDomains?: string[] | undefined;
16
16
  } & StaticWebsiteDefinitionBrand;
17
17
  //#endregion
18
- export { type StaticWebsiteConfig, defineStaticWebSite };
18
+ export type { StaticWebsiteConfig };
@@ -1,10 +1,9 @@
1
1
  import { StaticWebsiteInput } from "../../../types/staticwebsite.generated.mjs";
2
2
  //#region src/configure/services/staticwebsite/types.d.ts
3
3
  declare const staticWebsiteDefinitionBrand: unique symbol;
4
- type StaticWebsiteDefinitionBrand = {
4
+ export type StaticWebsiteDefinitionBrand = {
5
5
  readonly [staticWebsiteDefinitionBrand]: true;
6
6
  };
7
7
  /** Type accepted by `AppConfig.staticWebsites`. Only values returned by `defineStaticWebSite()` satisfy this. */
8
- type StaticWebsiteConfig = StaticWebsiteInput & StaticWebsiteDefinitionBrand;
9
- //#endregion
10
- export { StaticWebsiteConfig, StaticWebsiteDefinitionBrand };
8
+ export type StaticWebsiteConfig = StaticWebsiteInput & StaticWebsiteDefinitionBrand;
9
+ //#endregion
@@ -17,7 +17,7 @@ import { UserBooleanArrayOperand, UserBooleanOperand, UserStringArrayOperand, Us
17
17
  * delete: [{ conditions: [[{ record: "ownerId" }, "=", { user: "id" }]], permit: true }],
18
18
  * };
19
19
  */
20
- type TailorTypePermission<User extends object = InferredAttributes, Type extends object = object> = {
20
+ export type TailorTypePermission<User extends object = InferredAttributes, Type extends object = object> = {
21
21
  create: readonly ActionPermission<"record", User, Type, false>[];
22
22
  read: readonly ActionPermission<"record", User, Type, false>[];
23
23
  update: readonly ActionPermission<"record", User, Type, true>[];
@@ -33,7 +33,7 @@ type ActionPermission<Level extends "record" | "gql" = "record" | "gql", User ex
33
33
  */
34
34
  permit?: boolean;
35
35
  } | readonly [...PermissionCondition<Level, User, Update, Type>, ...([] | [boolean])] | readonly [...PermissionCondition<Level, User, Update, Type>[], ...([] | [boolean])];
36
- type TailorTypeGqlPermission<User extends object = InferredAttributes, Type extends object = object> = readonly GqlPermissionPolicy<User, Type>[];
36
+ export type TailorTypeGqlPermission<User extends object = InferredAttributes, Type extends object = object> = readonly GqlPermissionPolicy<User, Type>[];
37
37
  type GqlPermissionPolicy<User extends object = InferredAttributes, Type extends object = object> = {
38
38
  conditions: readonly PermissionCondition<"gql", User, boolean, Type>[];
39
39
  actions: "all" | readonly GqlPermissionAction[];
@@ -82,7 +82,7 @@ type HasAnyCondition<Level extends "record" | "gql", User extends object, Update
82
82
  * });
83
83
  * ```
84
84
  */
85
- type PermissionCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributes, Update extends boolean = boolean, Type extends object = object> = EqualityCondition<Level, User, Update, Type> | ContainsCondition<Level, User, Update, Type> | HasAnyCondition<Level, User, Update, Type>;
85
+ export type PermissionCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributes, Update extends boolean = boolean, Type extends object = object> = EqualityCondition<Level, User, Update, Type> | ContainsCondition<Level, User, Update, Type> | HasAnyCondition<Level, User, Update, Type>;
86
86
  /**
87
87
  * Grants full record-level access without any conditions.
88
88
  *
@@ -90,7 +90,7 @@ type PermissionCondition<Level extends "record" | "gql" = "record", User extends
90
90
  * Do not use this in production environments, as it effectively disables
91
91
  * authorization checks.
92
92
  */
93
- declare const unsafeAllowAllTypePermission: TailorTypePermission;
93
+ export declare const unsafeAllowAllTypePermission: TailorTypePermission;
94
94
  /**
95
95
  * Grants full GraphQL access (all actions) without any conditions.
96
96
  *
@@ -98,6 +98,5 @@ declare const unsafeAllowAllTypePermission: TailorTypePermission;
98
98
  * Do not use this in production environments, as it effectively disables
99
99
  * authorization checks.
100
100
  */
101
- declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
102
- //#endregion
103
- export { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
101
+ export declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
102
+ //#endregion
@@ -9,7 +9,7 @@ import { TailorTypeGqlPermission, TailorTypePermission } from "./permission.mjs"
9
9
  import { StandardSchemaV1 } from "@standard-schema/spec";
10
10
  //#region src/configure/services/tailordb/schema.d.ts
11
11
  type AnyBuilderMethod = any;
12
- type TailorAnyDBField = Omit<TailorDBField$1<AnyBuilderMethod, AnyBuilderMethod>, "fields"> & {
12
+ export type TailorAnyDBField = Omit<TailorDBField$1<AnyBuilderMethod, AnyBuilderMethod>, "fields"> & {
13
13
  readonly fields: Record<string, AnyBuilderMethod>;
14
14
  _metadata: DBFieldMetadata;
15
15
  parse: AnyBuilderMethod;
@@ -25,7 +25,7 @@ type TailorAnyDBField = Omit<TailorDBField$1<AnyBuilderMethod, AnyBuilderMethod>
25
25
  serial: AnyBuilderMethod;
26
26
  clone: AnyBuilderMethod;
27
27
  };
28
- type TailorAnyDBType = TailorDBType<any, any, any>;
28
+ export type TailorAnyDBType = TailorDBType<any, any, any>;
29
29
  type IsAny<T> = 0 extends 1 & T ? true : false;
30
30
  type DBFieldTypeNameMethod<Defined extends DefinedDBFieldMetadata> = IsAny<Defined> extends true ? TypeLevelError<string> : TypeLevelError<"typeName cannot be used on TailorDB fields">;
31
31
  type WithDBFieldDescription<Defined> = Defined & {
@@ -201,7 +201,7 @@ type DBFieldDefaultMethod<Defined extends DefinedDBFieldMetadata, Output, Nested
201
201
  * Full TailorDBField interface with builder methods.
202
202
  * Extends the minimal structural interface from types/ with fluent API methods.
203
203
  */
204
- interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any, Nested extends Record<string, TailorAnyDBField> = Record<string, TailorAnyDBField>> extends Omit<TailorDBField$1<Defined, Output, Nested>, "fields"> {
204
+ export interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any, Nested extends Record<string, TailorAnyDBField> = Record<string, TailorAnyDBField>> extends Omit<TailorDBField$1<Defined, Output, Nested>, "fields"> {
205
205
  readonly fields: Nested;
206
206
  _metadata: DBFieldMetadata;
207
207
  /**
@@ -267,7 +267,7 @@ interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldM
267
267
  * Full TailorDBType interface with builder methods.
268
268
  * Extends the minimal structural interface from types/ with fluent API methods.
269
269
  */
270
- interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes, Defined extends DefinedDBTypeMetadata = any, FileKeys extends string = never> extends TailorDBType$1<Fields, User> {
270
+ export interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes, Defined extends DefinedDBTypeMetadata = any, FileKeys extends string = never> extends TailorDBType$1<Fields, User> {
271
271
  _description?: string;
272
272
  hooks(hook: DBTypeDuplicateInputGuard<Defined, "hooks", TypeHook<Fields>, ".hooks() has already been set">): TailorDBType<Fields, User, WithDBTypeMetadata<Defined, "hooks">, FileKeys>;
273
273
  validate(fn: DBTypeDuplicateInputGuard<Defined, "validate", TypeValidateFn<Fields>, ".validate() has already been set">): TailorDBType<Fields, User, WithDBTypeMetadata<Defined, "validate">, FileKeys>;
@@ -282,7 +282,7 @@ interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, Us
282
282
  omitFields<K extends keyof Fields>(keys: K[]): Omit<Fields, K>;
283
283
  plugin<const Config extends Record<string, unknown>>(config: Config & PluginConfigGuard<Fields, Config, FileKeys>): TailorDBType<PluginExtendedFields<Fields, Config>, User, Defined, FileKeys>;
284
284
  }
285
- type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes, Defined extends DefinedDBTypeMetadata = any, FileKeys extends string = never> = TailorDBType<Fields, User, Defined, FileKeys>;
285
+ export type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes, Defined extends DefinedDBTypeMetadata = any, FileKeys extends string = never> = TailorDBType<Fields, User, Defined, FileKeys>;
286
286
  interface RelationConfig<S extends RelationType, T extends TailorDBType> {
287
287
  type: S;
288
288
  toward: {
@@ -472,7 +472,7 @@ declare function dbTable<const F extends {
472
472
  } & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBTable<F, WithDBTypeMetadata<DefinedDBTypeMetadata, "description">>;
473
473
  type TimestampsUpdatedAtHookFn = UpdateHookFn<string | Date | null, string | Date>;
474
474
  /** TailorDB schema builder utilities for defining tables and fields. */
475
- declare const db: {
475
+ export declare const db: {
476
476
  table: typeof dbTable;
477
477
  uuid: typeof uuid;
478
478
  string: typeof string;
@@ -505,5 +505,4 @@ declare const db: {
505
505
  };
506
506
  };
507
507
  };
508
- //#endregion
509
- export { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db };
508
+ //#endregion
@@ -3,13 +3,13 @@ import { InferredAttributes, TailorPrincipal } from "../../../runtime/types.mjs"
3
3
  import { DeepReadonly, InferFieldsOutput, Prettify, output } from "../../../types/helpers.mjs";
4
4
  import { DBFieldMetadata as DBFieldMetadata$1, GqlOperationsInput, RawPermissions, TailorDBServiceConfigInput } from "../../../types/tailordb.generated.mjs";
5
5
  //#region src/configure/services/tailordb/types.d.ts
6
- type SerialConfig<T extends "string" | "integer" = "string" | "integer"> = Prettify<{
6
+ export type SerialConfig<T extends "string" | "integer" = "string" | "integer"> = Prettify<{
7
7
  start: number;
8
8
  maxValue?: number;
9
9
  } & (T extends "string" ? {
10
10
  format?: string;
11
11
  } : object)>;
12
- interface DBFieldMetadata extends FieldMetadata {
12
+ export interface DBFieldMetadata extends FieldMetadata {
13
13
  index?: boolean;
14
14
  unique?: boolean;
15
15
  vector?: boolean;
@@ -23,7 +23,7 @@ interface DBFieldMetadata extends FieldMetadata {
23
23
  scale?: number;
24
24
  default?: unknown;
25
25
  }
26
- interface DefinedDBFieldMetadata extends DefinedFieldMetadata {
26
+ export interface DefinedDBFieldMetadata extends DefinedFieldMetadata {
27
27
  index?: boolean;
28
28
  unique?: boolean;
29
29
  vector?: boolean;
@@ -39,7 +39,7 @@ interface DefinedDBFieldMetadata extends DefinedFieldMetadata {
39
39
  default?: boolean;
40
40
  }
41
41
  type GqlOperationsConfig = GqlOperationsInput;
42
- interface RawRelationConfig {
42
+ export interface RawRelationConfig {
43
43
  type: "1-1" | "n-1" | "keyOnly" | "oneToOne" | "manyToOne" | "N-1";
44
44
  toward: {
45
45
  table: string;
@@ -48,7 +48,7 @@ interface RawRelationConfig {
48
48
  };
49
49
  backward?: string;
50
50
  }
51
- interface TailorDBTypeMetadata {
51
+ export interface TailorDBTypeMetadata {
52
52
  name: string;
53
53
  description?: string;
54
54
  settings?: {
@@ -76,45 +76,45 @@ interface TailorDBTypeMetadata {
76
76
  * The full interface with builder methods (relation, index, unique, hooks, validate, etc.)
77
77
  * is defined in configure/services/tailordb/schema.ts.
78
78
  */
79
- interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any, Nested extends Record<string, TailorAnyDBField> = Record<string, TailorAnyDBField>> extends Omit<TailorField<Defined, Output, DBFieldMetadata, Defined["type"]>, "fields"> {
79
+ export interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any, Nested extends Record<string, TailorAnyDBField> = Record<string, TailorAnyDBField>> extends Omit<TailorField<Defined, Output, DBFieldMetadata, Defined["type"]>, "fields"> {
80
80
  readonly fields: Nested;
81
81
  readonly rawRelation: Readonly<RawRelationConfig> | undefined;
82
82
  }
83
- type TailorAnyDBField = TailorDBField<any, any, any>;
83
+ export type TailorAnyDBField = TailorDBField<any, any, any>;
84
84
  /**
85
85
  * Minimal structural interface for TailorDBType.
86
86
  * Defines only the properties needed by parser, plugin, cli, and types layers.
87
87
  * The full interface with builder methods (hooks, validate, features, permission, etc.)
88
88
  * is defined in configure/services/tailordb/schema.ts.
89
89
  */
90
- interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes> {
90
+ export interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes> {
91
91
  readonly name: string;
92
92
  readonly fields: Fields;
93
93
  readonly _output: InferFieldsOutput<Fields>;
94
94
  readonly metadata: TailorDBTypeMetadata;
95
95
  readonly plugins: PluginAttachment[];
96
96
  }
97
- type TailorAnyDBType = TailorDBType<any, any>;
98
- type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes> = TailorDBType<Fields, User>;
97
+ export type TailorAnyDBType = TailorDBType<any, any>;
98
+ export type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributes> = TailorDBType<Fields, User>;
99
99
  type HookArgs<TData> = TData extends Record<string, unknown> ? { readonly [K in keyof TData]?: DeepReadonly<TData[K]> | null | undefined; } : unknown;
100
100
  type CreateHookFn<TValue, TReturn> = (args: {
101
101
  input: TValue;
102
102
  invoker: TailorPrincipal | null;
103
103
  now: Date;
104
104
  }) => TReturn;
105
- type UpdateHookFn<TValue, TReturn> = (args: {
105
+ export type UpdateHookFn<TValue, TReturn> = (args: {
106
106
  input: TValue;
107
107
  oldValue: TReturn;
108
108
  invoker: TailorPrincipal | null;
109
109
  now: Date;
110
110
  }) => TReturn;
111
- type Hook<TReturn, TCreateReturn = TReturn> = {
111
+ export type Hook<TReturn, TCreateReturn = TReturn> = {
112
112
  create?: CreateHookFn<TReturn | null, TCreateReturn>;
113
113
  update?: UpdateHookFn<TReturn | null, TReturn>;
114
114
  };
115
115
  type DotJoin<A extends string, B extends string> = A extends "" ? B : `${A}.${B}`;
116
116
  type DottedPaths<T, Prefix extends string = ""> = string extends keyof T ? string : T extends readonly (infer E)[] ? E extends Record<string, unknown> ? { [K in keyof E & string]: `${Prefix}[${number}].${K}` | DottedPaths<NonNullable<E[K]>, `${Prefix}[${number}].${K}`>; }[keyof E & string] : never : T extends Record<string, unknown> ? { [K in keyof T & string]: DotJoin<Prefix, K> | DottedPaths<NonNullable<T[K]>, DotJoin<Prefix, K>>; }[keyof T & string] : never;
117
- type TypeValidateFn<F extends Record<string, TailorAnyDBField>, TData = { [K in keyof F]: output<F[K]>; }> = (args: {
117
+ export type TypeValidateFn<F extends Record<string, TailorAnyDBField>, TData = { [K in keyof F]: output<F[K]>; }> = (args: {
118
118
  newRecord: DeepReadonly<TData>;
119
119
  oldRecord: DeepReadonly<TData> | null;
120
120
  invoker: TailorPrincipal | null;
@@ -130,7 +130,7 @@ type TypeUpdateHookFn<F extends Record<string, TailorAnyDBField>, TData = { [K i
130
130
  invoker: TailorPrincipal | null;
131
131
  now: Date;
132
132
  }) => { [K in Exclude<keyof TData & string, "id">]?: TData[K] | null; };
133
- type TypeHook<F extends Record<string, TailorAnyDBField>> = {
133
+ export type TypeHook<F extends Record<string, TailorAnyDBField>> = {
134
134
  create?: TypeCreateHookFn<F>;
135
135
  update?: TypeUpdateHookFn<F>;
136
136
  };
@@ -142,7 +142,7 @@ type TypeHook<F extends Record<string, TailorAnyDBField>> = {
142
142
  * collection. `output<F>` alone cannot express it: the field reads back as
143
143
  * non-nullable even though the caller never writes it.
144
144
  */
145
- type IsReadOnlyDBField<F extends TailorAnyDBField> = F["_defined"] extends {
145
+ export type IsReadOnlyDBField<F extends TailorAnyDBField> = F["_defined"] extends {
146
146
  serial: true;
147
147
  } ? true : false;
148
148
  /**
@@ -153,18 +153,18 @@ type IsReadOnlyDBField<F extends TailorAnyDBField> = F["_defined"] extends {
153
153
  * collection. `output<F>` alone cannot express it: the field reads back as
154
154
  * non-nullable once created, yet supplying it on create is optional.
155
155
  */
156
- type IsAutoFilledDBField<F extends TailorAnyDBField> = F["_defined"] extends {
156
+ export type IsAutoFilledDBField<F extends TailorAnyDBField> = F["_defined"] extends {
157
157
  default: true;
158
158
  } | {
159
159
  hooks: {
160
160
  create: true;
161
161
  };
162
162
  } ? true : false;
163
- type ExcludeNestedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
163
+ export type ExcludeNestedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
164
164
  type: "nested";
165
165
  array: boolean;
166
166
  }, any> ? never : T[K]; };
167
- type ExcludeHookedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
167
+ export type ExcludeHookedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
168
168
  type: TailorFieldType;
169
169
  array: boolean;
170
170
  hooks: {
@@ -179,12 +179,12 @@ type ExcludeHookedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in
179
179
  update: true;
180
180
  };
181
181
  }, any> ? never : T[K]; };
182
- type ExcludeDefaultedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
182
+ export type ExcludeDefaultedDBFields<T extends Record<string, TailorAnyDBField>> = { [K in keyof T]: T[K] extends TailorDBField<{
183
183
  type: TailorFieldType;
184
184
  array: boolean;
185
185
  default: true;
186
186
  }, any> ? never : T[K]; };
187
- interface TypeFeatures {
187
+ export interface TypeFeatures {
188
188
  /** Custom plural form of the table name for GraphQL */
189
189
  pluralForm?: string;
190
190
  /** Enable aggregation queries for this table */
@@ -205,23 +205,22 @@ interface TypeFeatures {
205
205
  /**
206
206
  * Plugin attachment stored on TailorAnyDBType instances.
207
207
  */
208
- interface PluginAttachment {
208
+ export interface PluginAttachment {
209
209
  pluginId: string;
210
210
  config: unknown;
211
211
  }
212
- type IndexDef<T extends {
212
+ export type IndexDef<T extends {
213
213
  fields: Record<PropertyKey, unknown>;
214
214
  }> = {
215
215
  fields: [keyof T["fields"], keyof T["fields"], ...(keyof T["fields"])[]];
216
216
  unique?: boolean;
217
217
  name?: string;
218
218
  };
219
- type RelationType = "1-1" | "oneToOne" | "n-1" | "manyToOne" | "N-1" | "keyOnly";
219
+ export type RelationType = "1-1" | "oneToOne" | "n-1" | "manyToOne" | "N-1" | "keyOnly";
220
220
  type TailorDBExternalConfig = {
221
221
  external: true;
222
222
  };
223
- type TailorDBServiceInput = {
223
+ export type TailorDBServiceInput = {
224
224
  [namespace: string]: TailorDBServiceConfigInput | TailorDBExternalConfig;
225
225
  };
226
- //#endregion
227
- export { DBFieldMetadata, DefinedDBFieldMetadata, ExcludeDefaultedDBFields, ExcludeHookedDBFields, ExcludeNestedDBFields, Hook, IndexDef, IsAutoFilledDBField, IsReadOnlyDBField, PluginAttachment, RawRelationConfig, RelationType, SerialConfig, TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBServiceInput, TailorDBType, TailorDBTypeMetadata, TypeFeatures, TypeHook, TypeValidateFn, UpdateHookFn };
226
+ //#endregion
@@ -27,7 +27,7 @@ type ResolveMatchType<Def> = Def extends {
27
27
  *
28
28
  * perTenant.keyFor(tenantId); // "tenant-api.<tenantId>"
29
29
  */
30
- declare function defineWorkflowExecutionPolicy<const N extends string, const D extends (Omit<ExecutionPolicyDefInput, "name"> & {
30
+ export declare function defineWorkflowExecutionPolicy<const N extends string, const D extends (Omit<ExecutionPolicyDefInput, "name"> & {
31
31
  separator?: string;
32
32
  }) | undefined = undefined>(name: N, def?: D): ResolvedExecutionPolicyInstance<ResolveKey<D, N>, ResolveMatchType<D>>;
33
33
  /**
@@ -65,6 +65,6 @@ declare function defineWorkflowExecutionPolicy<const N extends string, const D e
65
65
  * executionPolicyKey: executionPolicies["tenant-api"].keyFor(input.tenantId),
66
66
  * });
67
67
  */
68
- declare function defineWorkflowExecutionPolicies<T extends Record<string, ExecutionPolicyInstance>>(builder: (define: <const D extends ExecutionPolicyDefInput | undefined = undefined>(def?: D) => ResolvedExecutionPolicyInstance<ResolveKey<D, string>, ResolveMatchType<D>>) => T, options?: ExecutionPolicyGroupOptions): T;
68
+ export declare function defineWorkflowExecutionPolicies<T extends Record<string, ExecutionPolicyInstance>>(builder: (define: <const D extends ExecutionPolicyDefInput | undefined = undefined>(def?: D) => ResolvedExecutionPolicyInstance<ResolveKey<D, string>, ResolveMatchType<D>>) => T, options?: ExecutionPolicyGroupOptions): T;
69
69
  //#endregion
70
- export { type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ResolvedExecutionPolicyInstance, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy };
70
+ export type { ExecutionPolicyConcurrency, ExecutionPolicyDefInput, ExecutionPolicyExactInstance, ExecutionPolicyGroupOptions, ExecutionPolicyInstance, ExecutionPolicyWildcardInstance, ResolvedExecutionPolicyInstance };
@@ -4,7 +4,7 @@ import { ExecutionPolicyKey } from "../../../runtime/workflow.mjs";
4
4
  * Optional per-key concurrency cap applied to job function dispatches that
5
5
  * resolve to a policy's `executionPolicyKey`.
6
6
  */
7
- interface ExecutionPolicyConcurrency {
7
+ export interface ExecutionPolicyConcurrency {
8
8
  /** Maximum number of concurrent executions allowed per resolved key. */
9
9
  maxConcurrentExecutions: number;
10
10
  }
@@ -20,7 +20,7 @@ interface ExecutionPolicyBase {
20
20
  * `key` is branded as {@link ExecutionPolicyKey}, so it can be passed
21
21
  * directly as the `executionPolicyKey` option.
22
22
  */
23
- interface ExecutionPolicyExactInstance<Key extends string = string> extends ExecutionPolicyBase {
23
+ export interface ExecutionPolicyExactInstance<Key extends string = string> extends ExecutionPolicyBase {
24
24
  /** Declared key; the platform registers it verbatim. */
25
25
  readonly key: Key & ExecutionPolicyKey;
26
26
  readonly matchType: "exact";
@@ -33,7 +33,7 @@ interface ExecutionPolicyExactInstance<Key extends string = string> extends Exec
33
33
  * key at the call site instead of hand-concatenating the prefix and a
34
34
  * suffix.
35
35
  */
36
- interface ExecutionPolicyWildcardInstance extends ExecutionPolicyBase {
36
+ export interface ExecutionPolicyWildcardInstance extends ExecutionPolicyBase {
37
37
  readonly matchType: "prefix";
38
38
  /**
39
39
  * Build a concrete runtime key by appending `suffix` after this policy's
@@ -53,7 +53,7 @@ interface ExecutionPolicyWildcardInstance extends ExecutionPolicyBase {
53
53
  * A declared workflow job function execution policy — either
54
54
  * {@link ExecutionPolicyExactInstance} or {@link ExecutionPolicyWildcardInstance}.
55
55
  */
56
- type ExecutionPolicyInstance<Key extends string = string> = ExecutionPolicyExactInstance<Key> | ExecutionPolicyWildcardInstance;
56
+ export type ExecutionPolicyInstance<Key extends string = string> = ExecutionPolicyExactInstance<Key> | ExecutionPolicyWildcardInstance;
57
57
  /**
58
58
  * Resolves to {@link ExecutionPolicyWildcardInstance} when `MatchType` is
59
59
  * known at the type level to be `"prefix"`, to {@link ExecutionPolicyExactInstance}
@@ -62,7 +62,7 @@ type ExecutionPolicyInstance<Key extends string = string> = ExecutionPolicyExact
62
62
  * `matchType`) — narrowing to one branch in that case would claim a `key` or
63
63
  * `keyFor` that may not exist on the actual runtime instance.
64
64
  */
65
- type ResolvedExecutionPolicyInstance<Key extends string, MatchType extends "exact" | "prefix"> = "exact" | "prefix" extends MatchType ? ExecutionPolicyExactInstance<Key> | ExecutionPolicyWildcardInstance : MatchType extends "prefix" ? ExecutionPolicyWildcardInstance : ExecutionPolicyExactInstance<Key>;
65
+ export type ResolvedExecutionPolicyInstance<Key extends string, MatchType extends "exact" | "prefix"> = "exact" | "prefix" extends MatchType ? ExecutionPolicyExactInstance<Key> | ExecutionPolicyWildcardInstance : MatchType extends "prefix" ? ExecutionPolicyWildcardInstance : ExecutionPolicyExactInstance<Key>;
66
66
  /**
67
67
  * Body of an execution policy declaration.
68
68
  *
@@ -72,7 +72,7 @@ type ResolvedExecutionPolicyInstance<Key extends string, MatchType extends "exac
72
72
  * valid execution policy grammar, and provide `key` when the runtime key
73
73
  * prefix needs to differ from `name` (e.g. it needs `:` or `.`).
74
74
  */
75
- interface ExecutionPolicyDefInput {
75
+ export interface ExecutionPolicyDefInput {
76
76
  /** Overrides the property-name-derived `name`. 3-63 characters from `[a-z0-9-]`; must start and end with `[a-z0-9]`. */
77
77
  name?: string;
78
78
  /** Overrides the property-name-derived `key` prefix. Independent of `matchType` — both may be set together. */
@@ -92,12 +92,11 @@ interface ExecutionPolicyDefInput {
92
92
  * Options for {@link defineWorkflowExecutionPolicies}, applying to every
93
93
  * policy declared by the builder (not settable per policy).
94
94
  */
95
- interface ExecutionPolicyGroupOptions {
95
+ export interface ExecutionPolicyGroupOptions {
96
96
  /**
97
97
  * Separator `keyFor(suffix)` inserts between a wildcard policy's declared
98
98
  * `key` prefix and `suffix`. Defaults to `.`.
99
99
  */
100
100
  separator?: string;
101
101
  }
102
- //#endregion
103
- export { ExecutionPolicyConcurrency, ExecutionPolicyDefInput, ExecutionPolicyExactInstance, ExecutionPolicyGroupOptions, ExecutionPolicyInstance, ExecutionPolicyWildcardInstance, ResolvedExecutionPolicyInstance };
102
+ //#endregion
@@ -5,7 +5,7 @@ import { ExecJobFunctionOptions } from "../../../runtime/workflow.mjs";
5
5
  /**
6
6
  * Context object passed as the second argument to workflow job body functions.
7
7
  */
8
- type WorkflowJobContext = {
8
+ export type WorkflowJobContext = {
9
9
  env: TailorEnv;
10
10
  invoker: TailorPrincipal | null;
11
11
  };
@@ -23,7 +23,7 @@ type JobBody<I, O> = [null] extends [I] ? TypeLevelError<"Input cannot be null a
23
23
  * - Output: Must be JsonValue-compatible (plain objects/arrays; no class instances or functions), undefined, or void.
24
24
  * - Start returns `Awaited<Output>` as-is (no Promise or Jsonify transformation).
25
25
  */
26
- interface WorkflowJob<Name extends string = string, Input = undefined, Output = undefined> {
26
+ export interface WorkflowJob<Name extends string = string, Input = undefined, Output = undefined> {
27
27
  name: Name;
28
28
  /**
29
29
  * Start this job with the given input and return the job's output value.
@@ -97,6 +97,5 @@ interface CreateWorkflowJobConfig<Name extends string, I, O> {
97
97
  * },
98
98
  * });
99
99
  */
100
- declare function createWorkflowJob<const Name extends string, I = undefined, O = undefined>(config: CreateWorkflowJobConfig<Name, I, O>): WorkflowJob<Name, I, Awaited<O>>;
101
- //#endregion
102
- export { WorkflowJob, WorkflowJobContext, createWorkflowJob };
100
+ export declare function createWorkflowJob<const Name extends string, I = undefined, O = undefined>(config: CreateWorkflowJobConfig<Name, I, O>): WorkflowJob<Name, I, Awaited<O>>;
101
+ //#endregion
@@ -9,7 +9,7 @@ import { JsonCompatible, Prettify, TypeLevelError } from "../../../types/helpers
9
9
  * Both `Payload` and `Result` must be JsonValue-compatible (primitives, plain objects, arrays).
10
10
  * Functions and objects with a `toJSON` method are rejected at the type level.
11
11
  */
12
- interface WaitPointInstance<Payload = undefined, Result = undefined> {
12
+ export interface WaitPointInstance<Payload = undefined, Result = undefined> {
13
13
  wait: [Payload] extends [undefined] ? () => Promise<Result> : (payload: Payload) => Promise<Result>;
14
14
  resolve: (executionId: string, callback: (payload: [Payload] extends [undefined] ? undefined : Payload) => Result | Promise<Result>) => Promise<void>;
15
15
  }
@@ -19,7 +19,7 @@ interface WaitPointInstance<Payload = undefined, Result = undefined> {
19
19
  * `.with(params)` substitutes the params into the declared key and returns the
20
20
  * same two-method surface as an unparameterized wait point.
21
21
  */
22
- interface ParameterizedWaitPointInstance<Params extends object, Payload = undefined, Result = undefined> {
22
+ export interface ParameterizedWaitPointInstance<Params extends object, Payload = undefined, Result = undefined> {
23
23
  /**
24
24
  * Bind runtime values to the key's `$params`.
25
25
  * @param params - One value per `$param` in the declared key
@@ -98,7 +98,7 @@ type DefineFn = {
98
98
  *
99
99
  * await approval.wait({ message: "Please approve" });
100
100
  */
101
- declare function createWaitPoint<Payload = undefined, Result = undefined>(key: string): WaitPointDef<Payload, Result>;
101
+ export declare function createWaitPoint<Payload = undefined, Result = undefined>(key: string): WaitPointDef<Payload, Result>;
102
102
  /**
103
103
  * Create a group of typed wait points for human-in-the-loop workflows.
104
104
  * Property names become the wait point keys, so they must match
@@ -126,6 +126,5 @@ declare function createWaitPoint<Payload = undefined, Result = undefined>(key: s
126
126
  *
127
127
  * // For 2-level access, use destructured export with JSDoc attached to the export itself.
128
128
  */
129
- declare function createWaitPoints<T extends Record<string, WaitPointInstance<any, any> | ParameterizedWaitPointInstance<any, any, any>>>(builder: (define: DefineFn) => T): T;
130
- //#endregion
131
- export { ParameterizedWaitPointInstance, WaitPointInstance, createWaitPoint, createWaitPoints };
129
+ export declare function createWaitPoints<T extends Record<string, WaitPointInstance<any, any> | ParameterizedWaitPointInstance<any, any, any>>>(builder: (define: DefineFn) => T): T;
130
+ //#endregion