@tailor-platform/sdk 2.0.0-next.0 → 2.0.0-next.2

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 (208) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/dist/application-Dtqap5jM.mjs +3 -0
  3. package/dist/{client-CobIRHl-.mjs → application-XuMWK4eq.mjs} +5869 -25
  4. package/dist/application-XuMWK4eq.mjs.map +1 -0
  5. package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
  6. package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
  7. package/dist/{authconnection-D8SJGMpj.mjs → authconnection-D2MhtTN5.mjs} +2 -3
  8. package/dist/{authconnection-D8SJGMpj.mjs.map → authconnection-D2MhtTN5.mjs.map} +1 -1
  9. package/dist/{authconnection-BIYzEh2p.d.mts → authconnection-DvUQAjQS.d.mts} +1 -1
  10. package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
  11. package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
  12. package/dist/cli/index.mjs +241 -237
  13. package/dist/cli/index.mjs.map +1 -1
  14. package/dist/cli/lib.d.mts +547 -620
  15. package/dist/cli/lib.mjs +9 -11
  16. package/dist/cli/lib.mjs.map +1 -1
  17. package/dist/completion/zsh-worker.zsh +4108 -0
  18. package/dist/configure/index.d.mts +9 -7
  19. package/dist/configure/index.mjs +76 -40
  20. package/dist/configure/index.mjs.map +1 -1
  21. package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
  22. package/dist/context-Bd266-ru.mjs.map +1 -0
  23. package/dist/{context-CUBwSBq4.d.mts → context-C2lEi9uw.d.mts} +7 -28
  24. package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-BMWcxeSE.mjs} +1 -2
  25. package/dist/{crashreport-BhD0y14F.mjs → crashreport-DFq-vsU0.mjs} +21 -14
  26. package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-DFq-vsU0.mjs.map} +1 -1
  27. package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
  28. package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
  29. package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
  30. package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
  31. package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
  32. package/dist/field-DOsJCPFa.mjs.map +1 -0
  33. package/dist/{file-B58Dm-2P.mjs → file-BbdFGdMV.mjs} +3 -12
  34. package/dist/file-BbdFGdMV.mjs.map +1 -0
  35. package/dist/{file-BzK8z3X-.d.mts → file-Dq3NIt_F.d.mts} +3 -42
  36. package/dist/{file-utils-BHPxPXmn.mjs → file-utils-CYZnO1pX.mjs} +6 -7
  37. package/dist/file-utils-CYZnO1pX.mjs.map +1 -0
  38. package/dist/{globals-ByrCoDip.mjs → globals-Cf0sxIt8.mjs} +53 -5
  39. package/dist/globals-Cf0sxIt8.mjs.map +1 -0
  40. package/dist/http-adapter.generated-DFsXDdm5.d.mts +581 -0
  41. package/dist/{iconv-kwrmd1U_.d.mts → iconv-Co-TOPuH.d.mts} +1 -1
  42. package/dist/{iconv-DreIffeM.mjs → iconv-D2vi8G36.mjs} +2 -3
  43. package/dist/{iconv-DreIffeM.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
  44. package/dist/{idp-Ch95ag8h.mjs → idp-BDbK5gjm.mjs} +2 -3
  45. package/dist/{idp-Ch95ag8h.mjs.map → idp-BDbK5gjm.mjs.map} +1 -1
  46. package/dist/{idp-BlBPtXJ-.d.mts → idp-DrhVrLmV.d.mts} +1 -1
  47. package/dist/{index-CLxubakC.d.mts → index-BI-_j9Z3.d.mts} +49 -261
  48. package/dist/{index-CPRnOjjt.d.mts → index-C4JirJH8.d.mts} +2 -2
  49. package/dist/{index-CQZVJ5SX.d.mts → index-CZfWhr0a.d.mts} +2 -2
  50. package/dist/{index-DRhMpdnA.d.mts → index-Cg8VKAdN.d.mts} +8 -8
  51. package/dist/{index-CfRFkXIO.d.mts → index-DYRjoLXD.d.mts} +2 -2
  52. package/dist/index-lFpcjHPU.d.mts +201 -0
  53. package/dist/{index-DUupuPhZ.d.mts → index-nW7hE6oE.d.mts} +2 -2
  54. package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
  55. package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
  56. package/dist/kysely/index.mjs +0 -1
  57. package/dist/kysely/index.mjs.map +1 -1
  58. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DR8uzZTA.mjs} +2 -3
  59. package/dist/kysely-type-DR8uzZTA.mjs.map +1 -0
  60. package/dist/{logger-DpJyJvNz.mjs → logger-CxF-Ex5d.mjs} +1 -2
  61. package/dist/{logger-DpJyJvNz.mjs.map → logger-CxF-Ex5d.mjs.map} +1 -1
  62. package/dist/{mock-DMgIygjE.mjs → mock-FPxmnt-y.mjs} +9 -56
  63. package/dist/mock-FPxmnt-y.mjs.map +1 -0
  64. package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
  65. package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
  66. package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
  67. package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
  68. package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
  69. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  70. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  71. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  72. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  73. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  74. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  75. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  76. package/dist/plugin/builtin/seed/index.mjs +1 -2
  77. package/dist/plugin/index.d.mts +4 -5
  78. package/dist/plugin/index.mjs +0 -1
  79. package/dist/plugin/index.mjs.map +1 -1
  80. package/dist/registry-DH4m7eYo.mjs +53 -0
  81. package/dist/registry-DH4m7eYo.mjs.map +1 -0
  82. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DmGr9zMw.mjs} +2 -3
  83. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DmGr9zMw.mjs.map} +1 -1
  84. package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
  85. package/dist/runtime/authconnection.d.mts +1 -1
  86. package/dist/runtime/authconnection.mjs +1 -2
  87. package/dist/runtime/context.d.mts +1 -1
  88. package/dist/runtime/context.mjs +1 -2
  89. package/dist/runtime/file.d.mts +2 -2
  90. package/dist/runtime/file.mjs +2 -3
  91. package/dist/runtime/globals.d.mts +8 -41
  92. package/dist/runtime/globals.mjs +0 -1
  93. package/dist/runtime/iconv.d.mts +1 -1
  94. package/dist/runtime/iconv.mjs +1 -2
  95. package/dist/runtime/idp.d.mts +1 -1
  96. package/dist/runtime/idp.mjs +1 -2
  97. package/dist/runtime/index.d.mts +8 -8
  98. package/dist/runtime/index.mjs +7 -8
  99. package/dist/runtime/secretmanager.d.mts +1 -1
  100. package/dist/runtime/secretmanager.mjs +1 -2
  101. package/dist/runtime/workflow.d.mts +2 -2
  102. package/dist/runtime/workflow.mjs +1 -2
  103. package/dist/{runtime-C7qTBDD2.mjs → runtime-CY4JvrDj.mjs} +1069 -542
  104. package/dist/runtime-CY4JvrDj.mjs.map +1 -0
  105. package/dist/{schema-1msIhXwA.mjs → schema-Dtw9Orye.mjs} +18 -16
  106. package/dist/schema-Dtw9Orye.mjs.map +1 -0
  107. package/dist/{secret-file-CWzF8rry.mjs → secret-file-VSVGy1V0.mjs} +27 -3
  108. package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-VSVGy1V0.mjs.map} +1 -1
  109. package/dist/{secretmanager-CKLB3wAQ.d.mts → secretmanager-B3n4KHfm.d.mts} +1 -1
  110. package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
  111. package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
  112. package/dist/seed/index.mjs +0 -1
  113. package/dist/seed/index.mjs.map +1 -1
  114. package/dist/{seed-BH2FbrPV.mjs → seed-izIEyP3z.mjs} +7 -19
  115. package/dist/seed-izIEyP3z.mjs.map +1 -0
  116. package/dist/service-DCqIWibD.mjs +3 -0
  117. package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri2.mjs} +3 -4
  118. package/dist/{service-DMohAx8a2.mjs.map → service-DU1mVzri2.mjs.map} +1 -1
  119. package/dist/{service-wI3Hvrgx.mjs → service-DjyqbCaJ.mjs} +9 -10
  120. package/dist/service-DjyqbCaJ.mjs.map +1 -0
  121. package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
  122. package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
  123. package/dist/telemetry-ClwW5ohF.mjs +3 -0
  124. package/dist/test-env-key-D7UkZp99.mjs +75 -0
  125. package/dist/test-env-key-D7UkZp99.mjs.map +1 -0
  126. package/dist/type-source-DH_LH20p.mjs +13 -0
  127. package/dist/type-source-DH_LH20p.mjs.map +1 -0
  128. package/dist/types-74etvaxy.mjs +4 -0
  129. package/dist/{plugin-C_FyVSdl.d.mts → types-BDRml5C3.d.mts} +128 -188
  130. package/dist/{types-CmzfQP_m.mjs → types-BQijbo4m.mjs} +10 -11
  131. package/dist/types-BQijbo4m.mjs.map +1 -0
  132. package/dist/types-BX4q6Mo6.d.mts +339 -0
  133. package/dist/types-BZ7QKVE8.d.mts +21 -0
  134. package/dist/{tailordb-BlBGmQK-.d.mts → types-CdcQh4Z2.d.mts} +92 -242
  135. package/dist/utils/test/index.d.mts +6 -14
  136. package/dist/utils/test/index.mjs +4 -14
  137. package/dist/utils/test/index.mjs.map +1 -1
  138. package/dist/vitest/environment.mjs +1 -2
  139. package/dist/vitest/environment.mjs.map +1 -1
  140. package/dist/vitest/index.d.mts +42 -5
  141. package/dist/vitest/index.mjs +133 -4
  142. package/dist/vitest/index.mjs.map +1 -1
  143. package/dist/vitest/setup.mjs +2 -3
  144. package/dist/vitest/setup.mjs.map +1 -1
  145. package/dist/{workflow--aPbA8Uq.mjs → workflow-BOmaZwwG.mjs} +9 -5
  146. package/dist/workflow-BOmaZwwG.mjs.map +1 -0
  147. package/dist/{workflow-CMamswkK.d.mts → workflow-BVy4XWjS.d.mts} +15 -10
  148. package/dist/workflow.generated-ClEjBYhm.d.mts +671 -0
  149. package/docs/cli/application.md +0 -2
  150. package/docs/cli/completion.md +3 -0
  151. package/docs/cli/crashreport.md +0 -2
  152. package/docs/cli/executor.md +53 -0
  153. package/docs/cli/function.md +1 -1
  154. package/docs/cli/setup.md +35 -33
  155. package/docs/cli/user.md +3 -3
  156. package/docs/cli/workflow.md +157 -20
  157. package/docs/cli/workspace.md +3 -3
  158. package/docs/cli-reference.md +26 -20
  159. package/docs/configuration.md +0 -2
  160. package/docs/github-actions.md +29 -16
  161. package/docs/migration/v2.md +475 -0
  162. package/docs/plugin/custom.md +2 -2
  163. package/docs/plugin/index.md +1 -1
  164. package/docs/runtime.md +4 -4
  165. package/docs/services/aigateway.md +97 -0
  166. package/docs/services/auth.md +31 -14
  167. package/docs/services/executor.md +3 -5
  168. package/docs/services/resolver.md +8 -10
  169. package/docs/services/tailordb.md +15 -13
  170. package/docs/services/workflow.md +17 -19
  171. package/docs/testing.md +75 -56
  172. package/package.json +18 -17
  173. package/dist/actor-J2gJ0eK5.d.mts +0 -24
  174. package/dist/application-76hhIhnJ.mjs +0 -5594
  175. package/dist/application-76hhIhnJ.mjs.map +0 -1
  176. package/dist/application-av2raLs6.mjs +0 -4
  177. package/dist/cli/skills.d.mts +0 -1
  178. package/dist/cli/skills.mjs +0 -22
  179. package/dist/cli/skills.mjs.map +0 -1
  180. package/dist/client-C68VWo4g.mjs +0 -4
  181. package/dist/client-CobIRHl-.mjs.map +0 -1
  182. package/dist/context-s0lxhu8_.mjs.map +0 -1
  183. package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
  184. package/dist/env-B-g-qgE4.d.mts +0 -7
  185. package/dist/field-C4zdJLW5.mjs.map +0 -1
  186. package/dist/file-B58Dm-2P.mjs.map +0 -1
  187. package/dist/file-utils-BHPxPXmn.mjs.map +0 -1
  188. package/dist/globals-ByrCoDip.mjs.map +0 -1
  189. package/dist/job-BpsFXPbi.mjs +0 -54
  190. package/dist/job-BpsFXPbi.mjs.map +0 -1
  191. package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
  192. package/dist/mock-DMgIygjE.mjs.map +0 -1
  193. package/dist/package-json-wzO6nV9O.mjs +0 -4
  194. package/dist/registry-D0uB0OrK.mjs +0 -178
  195. package/dist/registry-D0uB0OrK.mjs.map +0 -1
  196. package/dist/runtime-C7qTBDD2.mjs.map +0 -1
  197. package/dist/schema-1msIhXwA.mjs.map +0 -1
  198. package/dist/seed-BH2FbrPV.mjs.map +0 -1
  199. package/dist/service-BHQIerYh.mjs +0 -4
  200. package/dist/service-wI3Hvrgx.mjs.map +0 -1
  201. package/dist/telemetry-w92bvGdC.mjs +0 -4
  202. package/dist/types-2Be3wSMc.mjs +0 -5
  203. package/dist/types-CmzfQP_m.mjs.map +0 -1
  204. package/dist/workflow--aPbA8Uq.mjs.map +0 -1
  205. package/dist/workflow.generated-Bf1tWylx.d.mts +0 -1416
  206. package/docs/generator/builtin.md +0 -257
  207. package/docs/generator/custom.md +0 -147
  208. package/docs/generator/index.md +0 -66
@@ -0,0 +1,581 @@
1
+ import { i as InferredAttributeMap, o as TailorPrincipal } from "./types-BZ7QKVE8.mjs";
2
+ import { A as Validators, D as TailorField, E as FieldValidateInput, F as output, P as Prettify, S as EnumValue, T as FieldOutput, a as Hooks, b as ArrayFieldOutput, g as TailorDBType$1, i as Hook, j as InferFieldsOutput, k as TailorToTs, l as RelationType, n as DefinedDBFieldMetadata, o as IndexDef, p as TailorDBField$1, r as ExcludeNestedDBFields, t as DBFieldMetadata, u as SerialConfig, v as TypeFeatures, w as FieldOptions } from "./types-CdcQh4Z2.mjs";
3
+ import { a as PluginConfigs } from "./types-BDRml5C3.mjs";
4
+ import { StandardSchemaV1 } from "@standard-schema/spec";
5
+
6
+ //#region src/configure/types/field.d.ts
7
+ type AllowedValues = readonly [string | EnumValue, ...(string | EnumValue)[]];
8
+ type AllowedValuesOutput<V extends AllowedValues> = V[number] extends infer T ? T extends string ? T : T extends {
9
+ value: infer K;
10
+ } ? K : never : never;
11
+ //#endregion
12
+ //#region src/configure/services/tailordb/permission.d.ts
13
+ /**
14
+ * Record-level permission configuration for a TailorDB type.
15
+ * Defines create, read, update, and delete permissions.
16
+ *
17
+ * Prefer object format with explicit `conditions` and `permit` for readability.
18
+ * Shorthand array format is supported for compatibility, but less readable.
19
+ *
20
+ * For update operations, use `newRecord`/`oldRecord` operands instead of `record`.
21
+ * @example
22
+ * const permission: TailorTypePermission = {
23
+ * create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
24
+ * read: [{ conditions: [[{ record: "isPublic" }, "=", true]], permit: true }],
25
+ * update: [{ conditions: [[{ newRecord: "ownerId" }, "=", { user: "id" }]], permit: true }],
26
+ * delete: [{ conditions: [[{ record: "ownerId" }, "=", { user: "id" }]], permit: true }],
27
+ * };
28
+ */
29
+ type TailorTypePermission<User extends object = InferredAttributeMap, Type extends object = object> = {
30
+ create: readonly ActionPermission<"record", User, Type, false>[];
31
+ read: readonly ActionPermission<"record", User, Type, false>[];
32
+ update: readonly ActionPermission<"record", User, Type, true>[];
33
+ delete: readonly ActionPermission<"record", User, Type, false>[];
34
+ };
35
+ type ActionPermission<Level extends "record" | "gql" = "record" | "gql", User extends object = InferredAttributeMap, Type extends object = object, Update extends boolean = boolean> = {
36
+ conditions: PermissionCondition<Level, User, Update, Type> | readonly PermissionCondition<Level, User, Update, Type>[];
37
+ description?: string | undefined;
38
+ /**
39
+ * Whether matching records are granted (`true`) or denied (`false`).
40
+ * Omitting `permit` in this object form defaults to `deny` and emits a
41
+ * warning; set it explicitly. (The array shorthand defaults to `allow`.)
42
+ */
43
+ permit?: boolean;
44
+ } | readonly [...PermissionCondition<Level, User, Update, Type>, ...([] | [boolean])] | readonly [...PermissionCondition<Level, User, Update, Type>[], ...([] | [boolean])];
45
+ type TailorTypeGqlPermission<User extends object = InferredAttributeMap, Type extends object = object> = readonly GqlPermissionPolicy<User, Type>[];
46
+ type GqlPermissionPolicy<User extends object = InferredAttributeMap, Type extends object = object> = {
47
+ conditions: readonly PermissionCondition<"gql", User, boolean, Type>[];
48
+ actions: "all" | readonly GqlPermissionAction[];
49
+ /**
50
+ * Whether matching requests are granted (`true`) or denied (`false`).
51
+ * Omitting `permit` defaults to `deny` and emits a warning; set it explicitly.
52
+ */
53
+ permit?: boolean;
54
+ description?: string;
55
+ };
56
+ type GqlPermissionAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert";
57
+ type EqualityOperator = "=" | "!=";
58
+ type ContainsOperator = "in" | "not in";
59
+ type HasAnyOperator = "hasAny" | "not hasAny";
60
+ type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
61
+ type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
62
+ type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
63
+ type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
64
+ type UserStringOperand<User extends object = InferredAttributeMap> = {
65
+ user: StringFieldKeys<User> | "id";
66
+ };
67
+ type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
68
+ user: StringArrayFieldKeys<User>;
69
+ };
70
+ type UserBooleanOperand<User extends object = InferredAttributeMap> = {
71
+ user: BooleanFieldKeys<User> | "_loggedIn";
72
+ };
73
+ type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
74
+ user: BooleanArrayFieldKeys<User>;
75
+ };
76
+ type RecordOperand<Type extends object, Update extends boolean = false> = Update extends true ? {
77
+ oldRecord: (keyof Type & string) | "id";
78
+ } | {
79
+ newRecord: (keyof Type & string) | "id";
80
+ } : {
81
+ record: (keyof Type & string) | "id";
82
+ };
83
+ type StringEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, EqualityOperator, boolean] : never) | readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, string | UserStringOperand<User>] | readonly [string | UserStringOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
84
+ type BooleanEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, boolean | UserBooleanOperand<User>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
85
+ type EqualityCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringEqualityCondition<Level, User, Update, Type> | BooleanEqualityCondition<Level, User, Update, Type>;
86
+ type StringContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, string[] | UserStringArrayOperand<User>] | readonly [string | UserStringOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
87
+ type BooleanContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, ContainsOperator, boolean[]] : never) | readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>] | readonly [boolean | UserBooleanOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
88
+ type ContainsCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringContainsCondition<Level, User, Update, Type> | BooleanContainsCondition<Level, User, Update, Type>;
89
+ type HasAnyCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, RecordOperand<Type, Update>] : never);
90
+ /**
91
+ * Type representing a permission condition that combines user attributes, record fields, and literal values using comparison operators.
92
+ *
93
+ * The User type is extended by `tailor.d.ts`, which is automatically generated when running `tailor-sdk generate`.
94
+ * Attributes enabled in the config file's `auth.userProfile.attributes` (or
95
+ * `auth.machineUserAttributes` when userProfile is omitted) become available as types.
96
+ * @example
97
+ * ```ts
98
+ * // tailor.config.ts
99
+ * export const auth = defineAuth("my-auth", {
100
+ * userProfile: {
101
+ * type: user,
102
+ * attributes: {
103
+ * isAdmin: true,
104
+ * roles: true,
105
+ * }
106
+ * }
107
+ * });
108
+ * ```
109
+ */
110
+ type PermissionCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = EqualityCondition<Level, User, Update, Type> | ContainsCondition<Level, User, Update, Type> | HasAnyCondition<Level, User, Update, Type>;
111
+ /**
112
+ * Grants full record-level access without any conditions.
113
+ *
114
+ * Unsafe and intended only for local development, prototyping, or tests.
115
+ * Do not use this in production environments, as it effectively disables
116
+ * authorization checks.
117
+ */
118
+ declare const unsafeAllowAllTypePermission: TailorTypePermission;
119
+ /**
120
+ * Grants full GraphQL access (all actions) without any conditions.
121
+ *
122
+ * Unsafe and intended only for local development, prototyping, or tests.
123
+ * Do not use this in production environments, as it effectively disables
124
+ * authorization checks.
125
+ */
126
+ declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
127
+ //#endregion
128
+ //#region src/configure/services/tailordb/schema.d.ts
129
+ type TailorAnyDBField = TailorDBField<any, any>;
130
+ type TailorAnyDBType = TailorDBType<any, any>;
131
+ /**
132
+ * Full TailorDBField interface with builder methods.
133
+ * Extends the minimal structural interface from types/ with fluent API methods.
134
+ */
135
+ interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any> extends Omit<TailorDBField$1<Defined, Output>, "fields"> {
136
+ readonly fields: Record<string, TailorAnyDBField>;
137
+ _metadata: DBFieldMetadata;
138
+ /**
139
+ * Parse and validate a value against this field's validation rules
140
+ */
141
+ parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
142
+ /**
143
+ * Internal parse method that tracks field path for nested validation
144
+ * @private
145
+ */
146
+ _parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
147
+ /**
148
+ * typeName is not available on TailorDB fields.
149
+ * Use typeName on pipeline fields (t.enum / t.object) instead.
150
+ */
151
+ typeName(this: never, typeName: string): never;
152
+ /**
153
+ * Set a description for the field
154
+ */
155
+ description<CurrentDefined extends Defined>(this: CurrentDefined extends {
156
+ description: unknown;
157
+ } ? never : TailorField<CurrentDefined, Output>, description: string): TailorDBField<Prettify<CurrentDefined & {
158
+ description: true;
159
+ }>, Output>;
160
+ /**
161
+ * Define a relation to another type.
162
+ */
163
+ relation<S extends RelationType, T extends TailorAnyDBType, CurrentDefined extends Defined>(this: CurrentDefined extends {
164
+ relation: unknown;
165
+ } ? never : TailorDBField<CurrentDefined, Output>, config: RelationConfig<S, T>): TailorDBField<S extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
166
+ unique: true;
167
+ index: true;
168
+ relation: true;
169
+ }> : Prettify<CurrentDefined & {
170
+ index: true;
171
+ relation: true;
172
+ }>, Output>;
173
+ /**
174
+ * Define a self-referencing relation
175
+ */
176
+ relation<S extends RelationSelfConfig, CurrentDefined extends Defined>(this: CurrentDefined extends {
177
+ relation: unknown;
178
+ } ? never : TailorDBField<CurrentDefined, Output>, config: S): TailorDBField<S["type"] extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
179
+ unique: true;
180
+ index: true;
181
+ relation: true;
182
+ }> : Prettify<CurrentDefined & {
183
+ index: true;
184
+ relation: true;
185
+ }>, Output>;
186
+ /**
187
+ * Add an index to the field
188
+ */
189
+ index<CurrentDefined extends Defined>(this: CurrentDefined extends {
190
+ index: unknown;
191
+ } ? never : CurrentDefined extends {
192
+ array: true;
193
+ } ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
194
+ index: true;
195
+ }>, Output>;
196
+ /**
197
+ * Make the field unique (also adds an index)
198
+ */
199
+ unique<CurrentDefined extends Defined>(this: CurrentDefined extends {
200
+ unique: unknown;
201
+ } ? never : CurrentDefined extends {
202
+ array: true;
203
+ } ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
204
+ unique: true;
205
+ index: true;
206
+ }>, Output>;
207
+ /**
208
+ * Enable vector search on the field (string type only)
209
+ */
210
+ vector<CurrentDefined extends Defined>(this: CurrentDefined extends {
211
+ vector: unknown;
212
+ } ? never : CurrentDefined extends {
213
+ type: "string";
214
+ array: false;
215
+ } ? TailorDBField<CurrentDefined, Output> : never): TailorDBField<Prettify<CurrentDefined & {
216
+ vector: true;
217
+ }>, Output>;
218
+ /**
219
+ * Add hooks for create/update operations on this field.
220
+ */
221
+ hooks<CurrentDefined extends Defined, const H extends Hook<unknown, Output>>(this: CurrentDefined extends {
222
+ hooks: unknown;
223
+ } ? never : CurrentDefined extends {
224
+ type: "nested";
225
+ } ? never : TailorDBField<CurrentDefined, Output>, hooks: H): TailorDBField<Prettify<CurrentDefined & {
226
+ hooks?: {
227
+ create: H extends {
228
+ create: unknown;
229
+ } ? true : false;
230
+ update: H extends {
231
+ update: unknown;
232
+ } ? true : false;
233
+ };
234
+ serial: false;
235
+ }>, Output>;
236
+ /**
237
+ * Add validation functions to the field.
238
+ */
239
+ validate<CurrentDefined extends Defined>(this: CurrentDefined extends {
240
+ validate: unknown;
241
+ } ? never : TailorDBField<CurrentDefined, Output>, ...validate: FieldValidateInput<Output>[]): TailorDBField<Prettify<CurrentDefined & {
242
+ validate: true;
243
+ }>, Output>;
244
+ /**
245
+ * Configure serial/auto-increment behavior
246
+ */
247
+ serial<CurrentDefined extends Defined>(this: CurrentDefined extends {
248
+ serial: unknown;
249
+ } ? never : Output extends null ? never : CurrentDefined extends {
250
+ type: "integer" | "string";
251
+ array: false;
252
+ } ? TailorDBField<CurrentDefined, Output> : never, config: SerialConfig<CurrentDefined["type"] & ("integer" | "string")>): TailorDBField<Prettify<CurrentDefined & {
253
+ serial: true;
254
+ hooks: {
255
+ create: false;
256
+ update: false;
257
+ };
258
+ }>, Output>;
259
+ /**
260
+ * Clone the field with optional overrides for field options
261
+ */
262
+ clone<const NewOpt extends FieldOptions>(options?: NewOpt): TailorDBField<Prettify<Omit<Defined, "array"> & {
263
+ array: NewOpt extends {
264
+ array: true;
265
+ } ? true : Defined["array"];
266
+ }>, FieldOutput<TailorToTs[Defined["type"]], NewOpt>>;
267
+ }
268
+ /**
269
+ * Full TailorDBType interface with builder methods.
270
+ * Extends the minimal structural interface from types/ with fluent API methods.
271
+ */
272
+ interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> extends TailorDBType$1<Fields, User> {
273
+ _description?: string;
274
+ hooks(hooks: Hooks<Fields>): TailorDBType<Fields, User>;
275
+ validate(validators: Validators<Fields>): TailorDBType<Fields, User>;
276
+ features(features: Omit<TypeFeatures, "pluralForm">): TailorDBType<Fields, User>;
277
+ indexes(...indexes: IndexDef<TailorDBType<Fields, User>>[]): TailorDBType<Fields, User>;
278
+ files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<TailorDBType<Fields, User>>, never>>): TailorDBType<Fields, User>;
279
+ permission<U extends object = User, P extends TailorTypePermission<U, output<TailorDBType<Fields, User>>> = TailorTypePermission<U, output<TailorDBType<Fields, User>>>>(permission: P): TailorDBType<Fields, U>;
280
+ gqlPermission<U extends object = User, P extends TailorTypeGqlPermission<U> = TailorTypeGqlPermission<U>>(permission: P): TailorDBType<Fields, U>;
281
+ description(description: string): TailorDBType<Fields, User>;
282
+ pickFields<K extends keyof Fields>(keys: K[]): Pick<Fields, K>;
283
+ pickFields<K extends keyof Fields, const Opt extends FieldOptions>(keys: K[], options: Opt): { [P in K]: Fields[P] extends TailorDBField<infer D, infer _O> ? TailorDBField<Omit<D, "array"> & {
284
+ array: Opt extends {
285
+ array: true;
286
+ } ? true : D["array"];
287
+ }, FieldOutput<TailorToTs[D["type"]], Opt>> : never };
288
+ omitFields<K extends keyof Fields>(keys: K[]): Omit<Fields, K>;
289
+ plugin<P extends keyof PluginConfigs<keyof Fields & string>>(config: { [K in P]: PluginConfigs<keyof Fields & string>[K] }): TailorDBType<Fields, User>;
290
+ }
291
+ type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> = TailorDBType<Fields, User>;
292
+ interface RelationConfig<S extends RelationType, T extends TailorDBType> {
293
+ type: S;
294
+ toward: {
295
+ type: T;
296
+ as?: string;
297
+ key?: keyof T["fields"] & string;
298
+ };
299
+ backward?: string;
300
+ }
301
+ type RelationSelfConfig = {
302
+ type: RelationType;
303
+ toward: {
304
+ type: "self";
305
+ as?: string;
306
+ key?: string;
307
+ };
308
+ backward?: string;
309
+ };
310
+ type FieldParseArgs = {
311
+ value: unknown;
312
+ data: unknown;
313
+ invoker: TailorPrincipal | null;
314
+ };
315
+ type FieldParseInternalArgs = {
316
+ value: any;
317
+ data: unknown;
318
+ invoker: TailorPrincipal | null;
319
+ pathArray: string[];
320
+ };
321
+ /**
322
+ * Create a UUID field.
323
+ * @param options - Field configuration options
324
+ * @returns A UUID field
325
+ * @example db.uuid()
326
+ * @example db.uuid({ optional: true })
327
+ */
328
+ declare function uuid<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
329
+ type: "uuid";
330
+ array: Opt extends {
331
+ array: true;
332
+ } ? true : false;
333
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
334
+ /**
335
+ * Create a string field.
336
+ * @param options - Field configuration options
337
+ * @returns A string field
338
+ * @example db.string()
339
+ * @example db.string({ optional: true })
340
+ */
341
+ declare function string<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
342
+ type: "string";
343
+ array: Opt extends {
344
+ array: true;
345
+ } ? true : false;
346
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
347
+ /**
348
+ * Create a boolean field.
349
+ * Note: The method name is `bool` but creates a `boolean` type field.
350
+ * @param options - Field configuration options
351
+ * @returns A boolean field
352
+ * @example db.bool()
353
+ * @example db.bool({ optional: true })
354
+ */
355
+ declare function bool<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
356
+ type: "boolean";
357
+ array: Opt extends {
358
+ array: true;
359
+ } ? true : false;
360
+ }, Opt["optional"] extends true ? ArrayFieldOutput<boolean, Opt> | null : ArrayFieldOutput<boolean, Opt>>;
361
+ /**
362
+ * Create an integer field.
363
+ * @param options - Field configuration options
364
+ * @returns An integer field
365
+ * @example db.int()
366
+ * @example db.int({ optional: true })
367
+ */
368
+ declare function int<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
369
+ type: "integer";
370
+ array: Opt extends {
371
+ array: true;
372
+ } ? true : false;
373
+ }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
374
+ /**
375
+ * Create a float (decimal number) field.
376
+ * @param options - Field configuration options
377
+ * @returns A float field
378
+ * @example db.float()
379
+ * @example db.float({ optional: true })
380
+ */
381
+ declare function float<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
382
+ type: "float";
383
+ array: Opt extends {
384
+ array: true;
385
+ } ? true : false;
386
+ }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
387
+ interface DecimalFieldOptions extends FieldOptions {
388
+ scale?: number;
389
+ }
390
+ /**
391
+ * Create a decimal field (stored as string for precision).
392
+ * @param options - Field configuration options including optional scale (0-12)
393
+ * @returns A decimal field
394
+ * @example db.decimal()
395
+ * @example db.decimal({ scale: 2 })
396
+ * @example db.decimal({ scale: 2, optional: true })
397
+ */
398
+ declare function decimal<const Opt extends DecimalFieldOptions>(options?: Opt): TailorDBField<{
399
+ type: "decimal";
400
+ array: Opt extends {
401
+ array: true;
402
+ } ? true : false;
403
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
404
+ /**
405
+ * Create a date field (date only, no time component).
406
+ * Format: "yyyy-MM-dd"
407
+ * @param options - Field configuration options
408
+ * @returns A date field
409
+ * @example db.date()
410
+ */
411
+ declare function date<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
412
+ type: "date";
413
+ array: Opt extends {
414
+ array: true;
415
+ } ? true : false;
416
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
417
+ /**
418
+ * Create a datetime field (date and time).
419
+ * Format: ISO 8601 "yyyy-MM-ddTHH:mm:ssZ"
420
+ * @param options - Field configuration options
421
+ * @returns A datetime field
422
+ * @example db.datetime()
423
+ */
424
+ declare function datetime<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
425
+ type: "datetime";
426
+ array: Opt extends {
427
+ array: true;
428
+ } ? true : false;
429
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string | Date, Opt> | null : ArrayFieldOutput<string | Date, Opt>>;
430
+ /**
431
+ * Create a time field (time only, no date component).
432
+ * Format: "HH:mm"
433
+ * @param options - Field configuration options
434
+ * @returns A time field
435
+ * @example db.time()
436
+ */
437
+ declare function time<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
438
+ type: "time";
439
+ array: Opt extends {
440
+ array: true;
441
+ } ? true : false;
442
+ }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
443
+ /**
444
+ * Create an enum field with a fixed set of allowed string values.
445
+ * @param values - Array of allowed string values, or array of `{ value, description }` objects
446
+ * @param options - Field configuration options
447
+ * @returns An enum field
448
+ * @example db.enum(["active", "inactive", "suspended"])
449
+ * @example db.enum(["small", "medium", "large"], { optional: true })
450
+ */
451
+ declare function _enum<const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt): TailorDBField<{
452
+ type: "enum";
453
+ array: Opt extends {
454
+ array: true;
455
+ } ? true : false;
456
+ }, FieldOutput<AllowedValuesOutput<V>, Opt>>;
457
+ /**
458
+ * Create a nested object field with sub-fields.
459
+ * @param fields - Record of nested field definitions
460
+ * @param options - Field configuration options
461
+ * @returns A nested object field
462
+ * @example db.object({ street: db.string(), city: db.string(), zip: db.string() })
463
+ * @example db.object({ name: db.string() }, { optional: true })
464
+ */
465
+ declare function object<const F extends Record<string, TailorAnyDBField> & ExcludeNestedDBFields<F>, const Opt extends FieldOptions>(fields: F, options?: Opt): TailorDBField<{
466
+ type: "nested";
467
+ array: Opt extends {
468
+ array: true;
469
+ } ? true : false;
470
+ }, FieldOutput<InferFieldsOutput<F>, Opt>>;
471
+ declare const idField: TailorDBField<{
472
+ type: "uuid";
473
+ array: false;
474
+ }, string>;
475
+ type idField = typeof idField;
476
+ type DBType<F extends {
477
+ id?: never;
478
+ } & Record<string, TailorAnyDBField>> = TailorDBInstance<{
479
+ id: idField;
480
+ } & F>;
481
+ /**
482
+ * Creates a new database type with the specified fields.
483
+ * An `id` field (UUID) is automatically added to every type.
484
+ * @param name - The name of the type, or a tuple of [name, pluralForm]
485
+ * @param fields - The field definitions for the type
486
+ * @returns A new TailorDBType instance
487
+ * @example
488
+ * export const user = db.type("User", {
489
+ * name: db.string(),
490
+ * email: db.string(),
491
+ * age: db.int({ optional: true }),
492
+ * role: db.enum(["admin", "member"]),
493
+ * ...db.fields.timestamps(),
494
+ * });
495
+ * // Always export both the value and type:
496
+ * export type user = typeof user;
497
+ */
498
+ declare function dbType<const F extends {
499
+ id?: never;
500
+ } & Record<string, TailorAnyDBField>>(name: string | [string, string], fields: F): DBType<F>;
501
+ /**
502
+ * Creates a new database type with the specified fields and description.
503
+ * An `id` field (UUID) is automatically added to every type.
504
+ * @param name - The name of the type, or a tuple of [name, pluralForm]
505
+ * @param description - A description of the type
506
+ * @param fields - The field definitions for the type
507
+ * @returns A new TailorDBType instance
508
+ */
509
+ declare function dbType<const F extends {
510
+ id?: never;
511
+ } & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBType<F>;
512
+ /** TailorDB schema builder utilities for defining types and fields. */
513
+ declare const db: {
514
+ type: typeof dbType;
515
+ uuid: typeof uuid;
516
+ string: typeof string;
517
+ bool: typeof bool;
518
+ int: typeof int;
519
+ float: typeof float;
520
+ decimal: typeof decimal;
521
+ date: typeof date;
522
+ datetime: typeof datetime;
523
+ time: typeof time;
524
+ enum: typeof _enum;
525
+ object: typeof object;
526
+ fields: {
527
+ /**
528
+ * Creates standard timestamp fields (createdAt, updatedAt) with auto-hooks.
529
+ * createdAt and updatedAt are set on create.
530
+ * User-specified timestamp values are respected when provided (e.g. seeding
531
+ * historical records); the current time is used only when the value is omitted.
532
+ * @returns An object with createdAt and updatedAt fields
533
+ * @example
534
+ * const model = db.type("Model", {
535
+ * name: db.string(),
536
+ * ...db.fields.timestamps(),
537
+ * });
538
+ */
539
+ timestamps: () => {
540
+ createdAt: TailorDBField<{
541
+ type: "datetime";
542
+ array: false;
543
+ hooks?: {
544
+ create: true;
545
+ update: false;
546
+ } | undefined;
547
+ serial: false;
548
+ description: true;
549
+ }, string | Date>;
550
+ updatedAt: TailorDBField<{
551
+ type: "datetime";
552
+ array: false;
553
+ hooks?: {
554
+ create: true;
555
+ update: true;
556
+ } | undefined;
557
+ serial: false;
558
+ description: true;
559
+ }, string | Date>;
560
+ };
561
+ };
562
+ };
563
+ //#endregion
564
+ //#region src/types/http-adapter.generated.d.ts
565
+ type HttpAdapterConfigInput = {
566
+ /** Unique adapter name within the domain */name: string; /** Path pattern with segment wildcards (trailing or single-segment) */
567
+ pathPattern: string; /** Per-method functions that transform HTTP requests to GraphQL requests */
568
+ input: {
569
+ get?: Function | undefined;
570
+ post?: Function | undefined;
571
+ put?: Function | undefined;
572
+ patch?: Function | undefined;
573
+ delete?: Function | undefined;
574
+ }; /** Whether the adapter is active */
575
+ enabled?: boolean | undefined; /** Matching priority; the lowest value wins when multiple adapters match */
576
+ priority?: number | undefined; /** Function that transforms GraphQL response to HTTP response */
577
+ output?: Function | undefined;
578
+ };
579
+ //#endregion
580
+ export { TailorDBInstance as a, PermissionCondition as c, unsafeAllowAllGqlPermission as d, unsafeAllowAllTypePermission as f, TailorDBField as i, TailorTypeGqlPermission as l, AllowedValuesOutput as m, TailorAnyDBField as n, TailorDBType as o, AllowedValues as p, TailorAnyDBType as r, db as s, HttpAdapterConfigInput as t, TailorTypePermission as u };
581
+ //# sourceMappingURL=http-adapter.generated-DFsXDdm5.d.mts.map
@@ -119,4 +119,4 @@ declare class Iconv {
119
119
  }
120
120
  //#endregion
121
121
  export { convert as a, encode as c, TailorIconvAPI as i, encodings as l, IconvConstructor as n, convertBuffer as o, IconvInstance as r, decode as s, Iconv as t, iconv_d_exports as u };
122
- //# sourceMappingURL=iconv-kwrmd1U_.d.mts.map
122
+ //# sourceMappingURL=iconv-Co-TOPuH.d.mts.map
@@ -1,5 +1,4 @@
1
-
2
- import { t as __exportAll } from "./chunk-BkoGK1jX.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-DXywRVcq.mjs";
3
2
 
4
3
  //#region src/runtime/iconv.ts
5
4
  var iconv_exports = /* @__PURE__ */ __exportAll({
@@ -61,4 +60,4 @@ var Iconv = class {
61
60
 
62
61
  //#endregion
63
62
  export { encode as a, decode as i, convert as n, encodings as o, convertBuffer as r, iconv_exports as s, Iconv as t };
64
- //# sourceMappingURL=iconv-DreIffeM.mjs.map
63
+ //# sourceMappingURL=iconv-D2vi8G36.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"iconv-DreIffeM.mjs","names":[],"sources":["../src/runtime/iconv.ts"],"sourcesContent":["/**\n * Character encoding conversion utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.iconv` runtime API.\n * At runtime this delegates to `globalThis.tailor.iconv`, which is provided by\n * the Tailor Platform Function runtime. Use `mockIconv` from\n * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { iconv } from \"@tailor-platform/sdk/runtime\";\n *\n * const utf8 = iconv.convert(sjisBuffer, \"Shift_JIS\", \"UTF-8\"); // string\n * const sjis = iconv.convert(\"こんにちは\", \"UTF-8\", \"Shift_JIS\"); // Uint8Array\n *\n * const conv = new iconv.Iconv(\"Shift_JIS\", \"UTF-8\");\n * const out = conv.convert(sjisBuffer);\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** Instance methods exposed by `tailor.iconv.Iconv`. */\nexport interface IconvInstance {\n convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;\n}\n\n/** Constructor shape for `tailor.iconv.Iconv`. */\nexport interface IconvConstructor {\n new (fromEncoding: string, toEncoding: string): IconvInstance;\n}\n\n/**\n * Platform API surface for `tailor.iconv`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.iconv` so the wrapper and ambient\n * globals stay in sync.\n *\n * Each method below is also re-exported as a top-level named export from this\n * module (e.g. `convert`, `decode`, `encode`) so callers can either\n * `import * as iconv from \"@tailor-platform/sdk/runtime/iconv\"` or pick\n * individual methods.\n */\nexport interface TailorIconvAPI {\n /**\n * Convert a string or buffer between encodings.\n * @param str - Input data to convert\n * @param fromEncoding - Source encoding name\n * @param toEncoding - Target encoding name\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n convert<T extends string>(\n str: string | Uint8Array | ArrayBuffer,\n fromEncoding: string,\n toEncoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Convert a buffer between encodings.\n * @param buffer - Input bytes to convert\n * @param fromEncoding - Source encoding name\n * @param toEncoding - Target encoding name\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n convertBuffer<T extends string>(\n buffer: Uint8Array | ArrayBuffer,\n fromEncoding: string,\n toEncoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Decode a buffer to a UTF-8 string using the given source encoding.\n * @param buffer - Input bytes\n * @param encoding - Source encoding name\n * @returns Decoded UTF-8 string\n */\n decode(buffer: Uint8Array | ArrayBuffer, encoding: string): string;\n\n /**\n * Encode a UTF-8 string into the given target encoding.\n * @param str - Input string\n * @param encoding - Target encoding name\n * @returns `string` when `encoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n encode<T extends string>(\n str: string,\n encoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Returns the list of supported encoding names.\n * @returns Array of encoding names supported by the platform iconv runtime\n */\n encodings(): string[];\n\n /** Constructor for the stateful {@link Iconv} converter. */\n Iconv: IconvConstructor;\n}\n\nconst api = (): TailorIconvAPI =>\n (globalThis as { tailor: { iconv: TailorIconvAPI } }).tailor.iconv;\n\n/**\n * See {@link TailorIconvAPI.convert}.\n * @param args - Forwarded to {@link TailorIconvAPI.convert}\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const convert: TailorIconvAPI[\"convert\"] = (...args) => api().convert(...args);\n\n/**\n * See {@link TailorIconvAPI.convertBuffer}.\n * @param args - Forwarded to {@link TailorIconvAPI.convertBuffer}\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const convertBuffer: TailorIconvAPI[\"convertBuffer\"] = (...args) =>\n api().convertBuffer(...args);\n\n/**\n * See {@link TailorIconvAPI.decode}.\n * @param args - Forwarded to {@link TailorIconvAPI.decode}\n * @returns Decoded UTF-8 string\n */\nexport const decode: TailorIconvAPI[\"decode\"] = (...args) => api().decode(...args);\n\n/**\n * See {@link TailorIconvAPI.encode}.\n * @param args - Forwarded to {@link TailorIconvAPI.encode}\n * @returns `string` when `encoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const encode: TailorIconvAPI[\"encode\"] = (...args) => api().encode(...args);\n\n/**\n * See {@link TailorIconvAPI.encodings}.\n * @returns Array of encoding names supported by the platform iconv runtime\n */\nexport const encodings: TailorIconvAPI[\"encodings\"] = () => api().encodings();\n\n/**\n * Stateful converter for repeated conversions between a fixed encoding pair.\n * Compatible with the `node-iconv` API surface.\n */\nexport class Iconv {\n private impl: IconvInstance;\n\n constructor(fromEncoding: string, toEncoding: string) {\n this.impl = new (api().Iconv)(fromEncoding, toEncoding);\n }\n\n /**\n * Convert input using this converter's fixed encoding pair.\n * @param input - Bytes or string to convert\n * @returns Encoded output (string for UTF-8 targets, otherwise `Uint8Array`).\n */\n convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array {\n return this.impl.convert(input);\n }\n}\n"],"mappings":";;;;;;;;;;;;AA+FA,MAAM,YACH,WAAqD,OAAO;;;;;;AAO/D,MAAa,WAAsC,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI;;;;;;AAOpF,MAAa,iBAAkD,GAAG,SAChE,IAAI,CAAC,CAAC,cAAc,GAAG,IAAI;;;;;;AAO7B,MAAa,UAAoC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI;;;;;;AAOjF,MAAa,UAAoC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI;;;;;AAMjF,MAAa,kBAA+C,IAAI,CAAC,CAAC,UAAU;;;;;AAM5E,IAAa,QAAb,MAAmB;CACjB,AAAQ;CAER,YAAY,cAAsB,YAAoB;EACpD,KAAK,OAAO,KAAK,IAAI,EAAC,CAAC,MAAO,cAAc,UAAU;CACxD;;;;;;CAOA,QAAQ,OAA+D;EACrE,OAAO,KAAK,KAAK,QAAQ,KAAK;CAChC;AACF"}
1
+ {"version":3,"file":"iconv-D2vi8G36.mjs","names":[],"sources":["../src/runtime/iconv.ts"],"sourcesContent":["/**\n * Character encoding conversion utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.iconv` runtime API.\n * At runtime this delegates to `globalThis.tailor.iconv`, which is provided by\n * the Tailor Platform Function runtime. Use `mockIconv` from\n * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { iconv } from \"@tailor-platform/sdk/runtime\";\n *\n * const utf8 = iconv.convert(sjisBuffer, \"Shift_JIS\", \"UTF-8\"); // string\n * const sjis = iconv.convert(\"こんにちは\", \"UTF-8\", \"Shift_JIS\"); // Uint8Array\n *\n * const conv = new iconv.Iconv(\"Shift_JIS\", \"UTF-8\");\n * const out = conv.convert(sjisBuffer);\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** Instance methods exposed by `tailor.iconv.Iconv`. */\nexport interface IconvInstance {\n convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;\n}\n\n/** Constructor shape for `tailor.iconv.Iconv`. */\nexport interface IconvConstructor {\n new (fromEncoding: string, toEncoding: string): IconvInstance;\n}\n\n/**\n * Platform API surface for `tailor.iconv`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.iconv` so the wrapper and ambient\n * globals stay in sync.\n *\n * Each method below is also re-exported as a top-level named export from this\n * module (e.g. `convert`, `decode`, `encode`) so callers can either\n * `import * as iconv from \"@tailor-platform/sdk/runtime/iconv\"` or pick\n * individual methods.\n */\nexport interface TailorIconvAPI {\n /**\n * Convert a string or buffer between encodings.\n * @param str - Input data to convert\n * @param fromEncoding - Source encoding name\n * @param toEncoding - Target encoding name\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n convert<T extends string>(\n str: string | Uint8Array | ArrayBuffer,\n fromEncoding: string,\n toEncoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Convert a buffer between encodings.\n * @param buffer - Input bytes to convert\n * @param fromEncoding - Source encoding name\n * @param toEncoding - Target encoding name\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n convertBuffer<T extends string>(\n buffer: Uint8Array | ArrayBuffer,\n fromEncoding: string,\n toEncoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Decode a buffer to a UTF-8 string using the given source encoding.\n * @param buffer - Input bytes\n * @param encoding - Source encoding name\n * @returns Decoded UTF-8 string\n */\n decode(buffer: Uint8Array | ArrayBuffer, encoding: string): string;\n\n /**\n * Encode a UTF-8 string into the given target encoding.\n * @param str - Input string\n * @param encoding - Target encoding name\n * @returns `string` when `encoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\n encode<T extends string>(\n str: string,\n encoding: T,\n ): T extends \"UTF8\" | \"UTF-8\" ? string : Uint8Array;\n\n /**\n * Returns the list of supported encoding names.\n * @returns Array of encoding names supported by the platform iconv runtime\n */\n encodings(): string[];\n\n /** Constructor for the stateful {@link Iconv} converter. */\n Iconv: IconvConstructor;\n}\n\nconst api = (): TailorIconvAPI =>\n (globalThis as { tailor: { iconv: TailorIconvAPI } }).tailor.iconv;\n\n/**\n * See {@link TailorIconvAPI.convert}.\n * @param args - Forwarded to {@link TailorIconvAPI.convert}\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const convert: TailorIconvAPI[\"convert\"] = (...args) => api().convert(...args);\n\n/**\n * See {@link TailorIconvAPI.convertBuffer}.\n * @param args - Forwarded to {@link TailorIconvAPI.convertBuffer}\n * @returns `string` when `toEncoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const convertBuffer: TailorIconvAPI[\"convertBuffer\"] = (...args) =>\n api().convertBuffer(...args);\n\n/**\n * See {@link TailorIconvAPI.decode}.\n * @param args - Forwarded to {@link TailorIconvAPI.decode}\n * @returns Decoded UTF-8 string\n */\nexport const decode: TailorIconvAPI[\"decode\"] = (...args) => api().decode(...args);\n\n/**\n * See {@link TailorIconvAPI.encode}.\n * @param args - Forwarded to {@link TailorIconvAPI.encode}\n * @returns `string` when `encoding` is `\"UTF8\"` or `\"UTF-8\"`, otherwise `Uint8Array`.\n */\nexport const encode: TailorIconvAPI[\"encode\"] = (...args) => api().encode(...args);\n\n/**\n * See {@link TailorIconvAPI.encodings}.\n * @returns Array of encoding names supported by the platform iconv runtime\n */\nexport const encodings: TailorIconvAPI[\"encodings\"] = () => api().encodings();\n\n/**\n * Stateful converter for repeated conversions between a fixed encoding pair.\n * Compatible with the `node-iconv` API surface.\n */\nexport class Iconv {\n private impl: IconvInstance;\n\n constructor(fromEncoding: string, toEncoding: string) {\n this.impl = new (api().Iconv)(fromEncoding, toEncoding);\n }\n\n /**\n * Convert input using this converter's fixed encoding pair.\n * @param input - Bytes or string to convert\n * @returns Encoded output (string for UTF-8 targets, otherwise `Uint8Array`).\n */\n convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array {\n return this.impl.convert(input);\n }\n}\n"],"mappings":";;;;;;;;;;;AA+FA,MAAM,YACH,WAAqD,OAAO;;;;;;AAO/D,MAAa,WAAsC,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI;;;;;;AAOpF,MAAa,iBAAkD,GAAG,SAChE,IAAI,CAAC,CAAC,cAAc,GAAG,IAAI;;;;;;AAO7B,MAAa,UAAoC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI;;;;;;AAOjF,MAAa,UAAoC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI;;;;;AAMjF,MAAa,kBAA+C,IAAI,CAAC,CAAC,UAAU;;;;;AAM5E,IAAa,QAAb,MAAmB;CACjB,AAAQ;CAER,YAAY,cAAsB,YAAoB;EACpD,KAAK,OAAO,KAAK,IAAI,EAAC,CAAC,MAAO,cAAc,UAAU;CACxD;;;;;;CAOA,QAAQ,OAA+D;EACrE,OAAO,KAAK,KAAK,QAAQ,KAAK;CAChC;AACF"}
@@ -1,5 +1,4 @@
1
-
2
- import { t as __exportAll } from "./chunk-BkoGK1jX.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-DXywRVcq.mjs";
3
2
 
4
3
  //#region src/runtime/idp.ts
5
4
  var idp_exports = /* @__PURE__ */ __exportAll({ Client: () => Client });
@@ -73,4 +72,4 @@ var Client = class {
73
72
 
74
73
  //#endregion
75
74
  export { idp_exports as n, Client as t };
76
- //# sourceMappingURL=idp-Ch95ag8h.mjs.map
75
+ //# sourceMappingURL=idp-BDbK5gjm.mjs.map