@tailor-platform/sdk 2.0.0-next.0 → 2.0.0-next.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 (200) hide show
  1. package/CHANGELOG.md +105 -0
  2. package/dist/application-DB2r36Et.mjs +3 -0
  3. package/dist/{application-76hhIhnJ.mjs → application-DqS1yBg3.mjs} +217 -131
  4. package/dist/application-DqS1yBg3.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 +78 -131
  13. package/dist/cli/index.mjs.map +1 -1
  14. package/dist/cli/lib.d.mts +619 -751
  15. package/dist/cli/lib.mjs +9 -10
  16. package/dist/cli/lib.mjs.map +1 -1
  17. package/dist/{client-C68VWo4g.mjs → client-Dbohmtkv.mjs} +1 -2
  18. package/dist/{client-CobIRHl-.mjs → client-z_oHGVNy.mjs} +10 -7
  19. package/dist/client-z_oHGVNy.mjs.map +1 -0
  20. package/dist/completion/zsh-worker.zsh +4029 -0
  21. package/dist/configure/index.d.mts +8 -7
  22. package/dist/configure/index.mjs +27 -28
  23. package/dist/configure/index.mjs.map +1 -1
  24. package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
  25. package/dist/{context-s0lxhu8_.mjs.map → context-Bd266-ru.mjs.map} +1 -1
  26. package/dist/{context-CUBwSBq4.d.mts → context-BuuIb8CC.d.mts} +1 -1
  27. package/dist/{crashreport-BhD0y14F.mjs → crashreport-BsjAkFWw.mjs} +19 -10
  28. package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-BsjAkFWw.mjs.map} +1 -1
  29. package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-pr6Rhvza.mjs} +1 -2
  30. package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
  31. package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
  32. package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
  33. package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
  34. package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
  35. package/dist/field-DOsJCPFa.mjs.map +1 -0
  36. package/dist/{file-BzK8z3X-.d.mts → file-BB8Vs9O_.d.mts} +1 -1
  37. package/dist/{file-B58Dm-2P.mjs → file-_oUZo76X.mjs} +2 -3
  38. package/dist/{file-B58Dm-2P.mjs.map → file-_oUZo76X.mjs.map} +1 -1
  39. package/dist/{file-utils-BHPxPXmn.mjs → file-utils-DcyIPFQh.mjs} +2 -3
  40. package/dist/{file-utils-BHPxPXmn.mjs.map → file-utils-DcyIPFQh.mjs.map} +1 -1
  41. package/dist/{globals-ByrCoDip.mjs → globals-Crz8o65k.mjs} +53 -5
  42. package/dist/globals-Crz8o65k.mjs.map +1 -0
  43. package/dist/http-adapter.generated-WgMnb7Sb.d.mts +580 -0
  44. package/dist/{iconv-kwrmd1U_.d.mts → iconv-Co-TOPuH.d.mts} +1 -1
  45. package/dist/{iconv-DreIffeM.mjs → iconv-D2vi8G36.mjs} +2 -3
  46. package/dist/{iconv-DreIffeM.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
  47. package/dist/{idp-Ch95ag8h.mjs → idp-BDbK5gjm.mjs} +2 -3
  48. package/dist/{idp-Ch95ag8h.mjs.map → idp-BDbK5gjm.mjs.map} +1 -1
  49. package/dist/{idp-BlBPtXJ-.d.mts → idp-DrhVrLmV.d.mts} +1 -1
  50. package/dist/{index-CQZVJ5SX.d.mts → index-5vPyRu1y.d.mts} +2 -2
  51. package/dist/{index-CfRFkXIO.d.mts → index-B7AKc18V.d.mts} +2 -2
  52. package/dist/{index-CLxubakC.d.mts → index-BlpzXncY.d.mts} +38 -247
  53. package/dist/{index-DRhMpdnA.d.mts → index-CK7u9isy.d.mts} +8 -8
  54. package/dist/{index-DUupuPhZ.d.mts → index-CNYe5lnW.d.mts} +2 -2
  55. package/dist/{index-CPRnOjjt.d.mts → index-DjUdWlzf.d.mts} +2 -2
  56. package/dist/index-ZePLwxw7.d.mts +208 -0
  57. package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
  58. package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
  59. package/dist/{job-BpsFXPbi.mjs → job-fuc3j1Ma.mjs} +9 -10
  60. package/dist/job-fuc3j1Ma.mjs.map +1 -0
  61. package/dist/kysely/index.mjs +0 -1
  62. package/dist/kysely/index.mjs.map +1 -1
  63. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DR8uzZTA.mjs} +2 -3
  64. package/dist/kysely-type-DR8uzZTA.mjs.map +1 -0
  65. package/dist/{logger-DpJyJvNz.mjs → logger-CxF-Ex5d.mjs} +1 -2
  66. package/dist/{logger-DpJyJvNz.mjs.map → logger-CxF-Ex5d.mjs.map} +1 -1
  67. package/dist/{mock-DMgIygjE.mjs → mock-BjFj5o1I.mjs} +9 -11
  68. package/dist/mock-BjFj5o1I.mjs.map +1 -0
  69. package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
  70. package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
  71. package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
  72. package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
  73. package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
  74. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  75. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  76. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  77. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  78. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  79. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  80. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  81. package/dist/plugin/builtin/seed/index.mjs +1 -2
  82. package/dist/plugin/index.d.mts +1 -3
  83. package/dist/plugin/index.mjs +0 -1
  84. package/dist/plugin/index.mjs.map +1 -1
  85. package/dist/registry-DdsYlL_P.mjs +51 -0
  86. package/dist/registry-DdsYlL_P.mjs.map +1 -0
  87. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DmGr9zMw.mjs} +2 -3
  88. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DmGr9zMw.mjs.map} +1 -1
  89. package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
  90. package/dist/runtime/authconnection.d.mts +1 -1
  91. package/dist/runtime/authconnection.mjs +1 -2
  92. package/dist/runtime/context.d.mts +1 -1
  93. package/dist/runtime/context.mjs +1 -2
  94. package/dist/runtime/file.d.mts +1 -1
  95. package/dist/runtime/file.mjs +1 -2
  96. package/dist/runtime/globals.d.mts +6 -39
  97. package/dist/runtime/globals.mjs +0 -1
  98. package/dist/runtime/iconv.d.mts +1 -1
  99. package/dist/runtime/iconv.mjs +1 -2
  100. package/dist/runtime/idp.d.mts +1 -1
  101. package/dist/runtime/idp.mjs +1 -2
  102. package/dist/runtime/index.d.mts +8 -8
  103. package/dist/runtime/index.mjs +7 -8
  104. package/dist/runtime/secretmanager.d.mts +1 -1
  105. package/dist/runtime/secretmanager.mjs +1 -2
  106. package/dist/runtime/workflow.d.mts +1 -1
  107. package/dist/runtime/workflow.mjs +1 -2
  108. package/dist/{runtime-C7qTBDD2.mjs → runtime-n9NCkjee.mjs} +301 -317
  109. package/dist/runtime-n9NCkjee.mjs.map +1 -0
  110. package/dist/{schema-1msIhXwA.mjs → schema-BhkpP5Hw.mjs} +3 -4
  111. package/dist/schema-BhkpP5Hw.mjs.map +1 -0
  112. package/dist/{secret-file-CWzF8rry.mjs → secret-file-DBqZhjFQ.mjs} +1 -2
  113. package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-DBqZhjFQ.mjs.map} +1 -1
  114. package/dist/{secretmanager-CKLB3wAQ.d.mts → secretmanager-B3n4KHfm.d.mts} +1 -1
  115. package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
  116. package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
  117. package/dist/seed/index.mjs +0 -1
  118. package/dist/seed/index.mjs.map +1 -1
  119. package/dist/{seed-BH2FbrPV.mjs → seed-jf3008-h.mjs} +5 -16
  120. package/dist/seed-jf3008-h.mjs.map +1 -0
  121. package/dist/{service-wI3Hvrgx.mjs → service-CCL8ruDf.mjs} +3 -4
  122. package/dist/service-CCL8ruDf.mjs.map +1 -0
  123. package/dist/service-D6yonf2I.mjs +3 -0
  124. package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri.mjs} +3 -4
  125. package/dist/service-DU1mVzri.mjs.map +1 -0
  126. package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
  127. package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
  128. package/dist/telemetry-ClwW5ohF.mjs +3 -0
  129. package/dist/test-env-key-D9kM6ETE.mjs +49 -0
  130. package/dist/test-env-key-D9kM6ETE.mjs.map +1 -0
  131. package/dist/type-source-DH_LH20p.mjs +13 -0
  132. package/dist/type-source-DH_LH20p.mjs.map +1 -0
  133. package/dist/{types-CmzfQP_m.mjs → types-B2RpYyA_.mjs} +2 -3
  134. package/dist/types-B2RpYyA_.mjs.map +1 -0
  135. package/dist/types-ClhIrW_C.mjs +4 -0
  136. package/dist/{tailordb-BlBGmQK-.d.mts → types-DCUhgpyI.d.mts} +142 -221
  137. package/dist/{plugin-C_FyVSdl.d.mts → types-DhO_VEZd.d.mts} +119 -179
  138. package/dist/types-DwDgacni.d.mts +338 -0
  139. package/dist/utils/test/index.d.mts +4 -3
  140. package/dist/utils/test/index.mjs +1 -2
  141. package/dist/utils/test/index.mjs.map +1 -1
  142. package/dist/vitest/environment.mjs +1 -2
  143. package/dist/vitest/environment.mjs.map +1 -1
  144. package/dist/vitest/index.d.mts +42 -5
  145. package/dist/vitest/index.mjs +133 -4
  146. package/dist/vitest/index.mjs.map +1 -1
  147. package/dist/vitest/setup.mjs +2 -3
  148. package/dist/vitest/setup.mjs.map +1 -1
  149. package/dist/{workflow-CMamswkK.d.mts → workflow-BbKvGLQg.d.mts} +1 -1
  150. package/dist/{workflow--aPbA8Uq.mjs → workflow-DgemCAz3.mjs} +2 -3
  151. package/dist/{workflow--aPbA8Uq.mjs.map → workflow-DgemCAz3.mjs.map} +1 -1
  152. package/dist/workflow.generated-DtQwEo-x.d.mts +671 -0
  153. package/docs/cli/application.md +0 -2
  154. package/docs/cli/completion.md +3 -0
  155. package/docs/cli/crashreport.md +0 -2
  156. package/docs/cli/function.md +1 -1
  157. package/docs/cli/user.md +3 -3
  158. package/docs/cli/workspace.md +3 -3
  159. package/docs/configuration.md +0 -2
  160. package/docs/plugin/custom.md +2 -2
  161. package/docs/plugin/index.md +1 -1
  162. package/docs/runtime.md +3 -3
  163. package/docs/services/aigateway.md +97 -0
  164. package/docs/services/auth.md +19 -2
  165. package/docs/services/executor.md +0 -2
  166. package/docs/services/resolver.md +2 -4
  167. package/docs/services/tailordb.md +1 -1
  168. package/docs/services/workflow.md +13 -15
  169. package/docs/testing.md +18 -11
  170. package/package.json +13 -12
  171. package/dist/actor-J2gJ0eK5.d.mts +0 -24
  172. package/dist/application-76hhIhnJ.mjs.map +0 -1
  173. package/dist/application-av2raLs6.mjs +0 -4
  174. package/dist/cli/skills.d.mts +0 -1
  175. package/dist/cli/skills.mjs +0 -22
  176. package/dist/cli/skills.mjs.map +0 -1
  177. package/dist/client-CobIRHl-.mjs.map +0 -1
  178. package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
  179. package/dist/env-B-g-qgE4.d.mts +0 -7
  180. package/dist/field-C4zdJLW5.mjs.map +0 -1
  181. package/dist/globals-ByrCoDip.mjs.map +0 -1
  182. package/dist/job-BpsFXPbi.mjs.map +0 -1
  183. package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
  184. package/dist/mock-DMgIygjE.mjs.map +0 -1
  185. package/dist/package-json-wzO6nV9O.mjs +0 -4
  186. package/dist/registry-D0uB0OrK.mjs +0 -178
  187. package/dist/registry-D0uB0OrK.mjs.map +0 -1
  188. package/dist/runtime-C7qTBDD2.mjs.map +0 -1
  189. package/dist/schema-1msIhXwA.mjs.map +0 -1
  190. package/dist/seed-BH2FbrPV.mjs.map +0 -1
  191. package/dist/service-BHQIerYh.mjs +0 -4
  192. package/dist/service-DMohAx8a2.mjs.map +0 -1
  193. package/dist/service-wI3Hvrgx.mjs.map +0 -1
  194. package/dist/telemetry-w92bvGdC.mjs +0 -4
  195. package/dist/types-2Be3wSMc.mjs +0 -5
  196. package/dist/types-CmzfQP_m.mjs.map +0 -1
  197. package/dist/workflow.generated-Bf1tWylx.d.mts +0 -1416
  198. package/docs/generator/builtin.md +0 -257
  199. package/docs/generator/custom.md +0 -147
  200. package/docs/generator/index.md +0 -66
@@ -1,153 +1,125 @@
1
- import { _ as PluginAttachment, a as TypeSourceInfoEntry, c as TailorAnyDBType, i as TailorDBType, s as TailorAnyDBField } from "./tailordb-BlBGmQK-.mjs";
1
+ import { S as EnumValue, _ as TailorDBTypeMetadata, c as RawRelationConfig, d as TailorAnyDBField, f as TailorAnyDBType, s as PluginAttachment, y as TailorDBTypeParsedSettings } from "./types-DCUhgpyI.mjs";
2
+ import { C as IdProvider, b as ValueOperand, w as OAuth2Client } from "./types-DwDgacni.mjs";
2
3
 
3
- //#region src/types/auth.generated.d.ts
4
- type AuthInvokerObject = {
5
- /** Auth namespace */namespace: string; /** Machine user name for authentication */
6
- machineUserName: string;
7
- };
8
- type AuthInvoker = AuthInvokerObject;
9
- type OIDC = {
10
- /** Identity provider name */name: string;
11
- kind: "OIDC"; /** OAuth2 client ID */
12
- clientID: string; /** OAuth2 client secret */
13
- clientSecret: {
14
- vaultName: string;
15
- secretKey: string;
16
- }; /** OIDC provider URL */
17
- providerURL: string; /** OIDC issuer URL (defaults to providerURL) */
18
- issuerURL?: string | undefined; /** JWT claim to use as username */
19
- usernameClaim?: string | undefined;
20
- };
21
- type SAML = {
22
- /** Identity provider name */name: string;
23
- kind: "SAML"; /** Enable signing of SAML requests */
24
- enableSignRequest: boolean; /** URL to fetch SAML metadata (mutually exclusive with rawMetadata) */
25
- metadataURL?: string | undefined; /** Raw SAML metadata XML (mutually exclusive with metadataURL) */
26
- rawMetadata?: string | undefined; /** URL to redirect to when SAML ACS receives a response with an empty RelayState. */
27
- defaultRedirectURL?: string | undefined;
28
- };
29
- type IDToken = {
30
- /** Identity provider name */name: string;
31
- kind: "IDToken"; /** ID token provider URL */
32
- providerURL: string; /** Client ID for ID token validation */
33
- clientID: string; /** ID token issuer URL */
34
- issuerURL?: string | undefined; /** JWT claim to use as username */
35
- usernameClaim?: string | undefined;
36
- };
37
- type BuiltinIdP = {
38
- /** Identity provider name */name: string;
39
- kind: "BuiltInIdP"; /** IdP namespace */
40
- namespace: string; /** OAuth2 client name in the IdP */
41
- clientName: string;
42
- };
43
- type IdProvider = OIDC | SAML | IDToken | BuiltinIdP;
44
- type OAuth2ClientInput = {
45
- /** Allowed redirect URIs */redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[]; /** Client description */
46
- description?: string | undefined; /** Allowed OAuth2 grant types */
47
- grantTypes?: ("authorization_code" | "refresh_token")[] | undefined; /** OAuth2 client type */
48
- clientType?: "confidential" | "public" | "browser" | undefined; /** Access token lifetime in seconds (60-86400) */
49
- accessTokenLifetimeSeconds?: number | undefined; /** Refresh token lifetime in seconds (60-604800) */
50
- refreshTokenLifetimeSeconds?: number | undefined; /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
51
- requireDpop?: boolean | undefined;
52
- };
53
- type OAuth2Client = {
54
- /** Allowed OAuth2 grant types */grantTypes: ("authorization_code" | "refresh_token")[]; /** Allowed redirect URIs */
55
- redirectURIs: (`https://${string}` | `http://${string}` | `${string}:url` | `${string}:url/${string}`)[]; /** Access token lifetime in seconds (60-86400) */
56
- accessTokenLifetimeSeconds: {
57
- seconds: bigint;
58
- nanos: number;
59
- } | undefined; /** Refresh token lifetime in seconds (60-604800) */
60
- refreshTokenLifetimeSeconds: {
61
- seconds: bigint;
62
- nanos: number;
63
- } | undefined; /** Client description */
64
- description?: string | undefined; /** OAuth2 client type */
65
- clientType?: "confidential" | "public" | "browser" | undefined; /** Require DPoP (Demonstrating Proof-of-Possession) for token requests */
66
- requireDpop?: boolean | undefined;
67
- };
68
- type SCIMAuthorization = {
69
- /** SCIM authorization type */type: "oauth2" | "bearer"; /** Bearer token secret (required for bearer type) */
70
- bearerSecret?: {
71
- vaultName: string;
72
- secretKey: string;
73
- } | undefined;
74
- };
75
- type SCIMAttribute = {
76
- /** Attribute data type */type: "string" | "number" | "boolean" | "datetime" | "complex"; /** Attribute name */
77
- name: string; /** Attribute description */
78
- description?: string | undefined; /** Attribute mutability */
79
- mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined; /** Whether the attribute is required */
80
- required?: boolean | undefined; /** Whether the attribute can have multiple values */
81
- multiValued?: boolean | undefined; /** Uniqueness constraint */
82
- uniqueness?: "none" | "server" | "global" | undefined; /** List of canonical values */
83
- canonicalValues?: string[] | null | undefined;
84
- subAttributes?: SCIMAttribute[] | null | undefined;
4
+ //#region src/parser/service/tailordb/types.d.ts
5
+ interface UserDefinedTypeSource {
6
+ filePath: string;
7
+ exportName: string;
8
+ pluginId?: never;
9
+ }
10
+ interface PluginGeneratedTypeSource {
11
+ filePath?: never;
12
+ exportName: string;
13
+ pluginId: string;
14
+ pluginImportPath: string;
15
+ originalFilePath: string;
16
+ originalExportName: string;
17
+ generatedTypeKind?: string;
18
+ pluginConfig?: unknown;
19
+ namespace?: string;
20
+ }
21
+ type TypeSourceInfoEntry = UserDefinedTypeSource | PluginGeneratedTypeSource;
22
+ interface Script {
23
+ expr: string;
24
+ }
25
+ interface OperatorValidateConfig {
26
+ script: Script;
27
+ errorMessage: string;
28
+ }
29
+ interface OperatorFieldHook {
30
+ create?: Script;
31
+ update?: Script;
32
+ }
33
+ interface OperatorFieldConfig {
34
+ type: string;
35
+ required?: boolean;
36
+ description?: string;
37
+ allowedValues?: EnumValue[];
38
+ array?: boolean;
39
+ index?: boolean;
40
+ unique?: boolean;
41
+ vector?: boolean;
42
+ foreignKey?: boolean;
43
+ foreignKeyType?: string;
44
+ foreignKeyField?: string;
45
+ rawRelation?: RawRelationConfig;
46
+ validate?: OperatorValidateConfig[];
47
+ hooks?: OperatorFieldHook;
48
+ serial?: {
49
+ start: number;
50
+ maxValue?: number;
51
+ format?: string;
52
+ };
53
+ scale?: number;
54
+ fields?: Record<string, OperatorFieldConfig>;
55
+ }
56
+ type GqlPermissionAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert";
57
+ type StandardPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
58
+ type UserOperand = {
59
+ user: string;
85
60
  };
86
- type SCIMAttributeMapping = {
87
- /** TailorDB field name to map to */tailorDBField: string; /** SCIM attribute path */
88
- scimPath: string;
61
+ type StandardRecordOperand<Update extends boolean = false> = Update extends true ? {
62
+ oldRecord: string;
63
+ } | {
64
+ newRecord: string;
65
+ } : {
66
+ record: string;
89
67
  };
90
- type SCIMResource = {
91
- /** SCIM resource name */name: string; /** TailorDB namespace for the resource */
92
- tailorDBNamespace: string; /** TailorDB type name for the resource */
93
- tailorDBType: string; /** Core SCIM schema definition */
94
- coreSchema: {
95
- /** SCIM resource name */name: string;
96
- attributes: {
97
- type: "string" | "number" | "boolean" | "datetime" | "complex"; /** SCIM resource name */
98
- name: string;
99
- description?: string | undefined;
100
- mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
101
- required?: boolean | undefined;
102
- multiValued?: boolean | undefined;
103
- uniqueness?: "none" | "server" | "global" | undefined;
104
- canonicalValues?: string[] | null | undefined;
105
- subAttributes?: any[] | null | undefined;
106
- }[];
107
- }; /** Attribute mapping configuration */
108
- attributeMapping: {
109
- tailorDBField: string;
110
- scimPath: string;
111
- }[];
68
+ type PermissionOperand<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = UserOperand | ValueOperand | (Level extends "record" ? StandardRecordOperand<Update> : never);
69
+ type StandardPermissionCondition<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = readonly [PermissionOperand<Level, Update>, StandardPermissionOperator, PermissionOperand<Level, Update>];
70
+ type StandardActionPermission<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = {
71
+ conditions: readonly StandardPermissionCondition<Level, Update>[];
72
+ description?: string;
73
+ permit: "allow" | "deny";
112
74
  };
113
- type SCIMConfig = {
114
- /** Machine user name for SCIM operations */machineUserName: string; /** SCIM authorization configuration */
115
- authorization: {
116
- type: "oauth2" | "bearer";
117
- bearerSecret?: {
118
- vaultName: string;
119
- secretKey: string;
120
- } | undefined;
121
- }; /** SCIM resource definitions */
122
- resources: {
123
- name: string;
124
- tailorDBNamespace: string;
125
- tailorDBType: string;
126
- coreSchema: {
127
- name: string;
128
- attributes: {
129
- type: "string" | "number" | "boolean" | "datetime" | "complex";
130
- name: string;
131
- description?: string | undefined;
132
- mutability?: "readOnly" | "readWrite" | "writeOnly" | undefined;
133
- required?: boolean | undefined;
134
- multiValued?: boolean | undefined;
135
- uniqueness?: "none" | "server" | "global" | undefined;
136
- canonicalValues?: string[] | null | undefined;
137
- subAttributes?: any[] | null | undefined;
138
- }[];
139
- };
140
- attributeMapping: {
141
- tailorDBField: string;
142
- scimPath: string;
143
- }[];
144
- }[];
75
+ type StandardTailorTypePermission = {
76
+ create: readonly StandardActionPermission<"record", false>[];
77
+ read: readonly StandardActionPermission<"record", false>[];
78
+ update: readonly StandardActionPermission<"record", true>[];
79
+ delete: readonly StandardActionPermission<"record", false>[];
145
80
  };
146
- type TenantProvider = {
147
- /** TailorDB namespace for the tenant type */namespace: string; /** TailorDB type name for tenants */
148
- type: string; /** Field used as the tenant signature */
149
- signatureField: string;
81
+ type StandardGqlPermissionPolicy = {
82
+ conditions: readonly StandardPermissionCondition<"gql">[];
83
+ actions: readonly ["all"] | readonly GqlPermissionAction[];
84
+ permit: "allow" | "deny";
85
+ description?: string;
150
86
  };
87
+ type StandardTailorTypeGqlPermission = readonly StandardGqlPermissionPolicy[];
88
+ interface Permissions {
89
+ record?: StandardTailorTypePermission;
90
+ gql?: StandardTailorTypeGqlPermission;
91
+ }
92
+ interface ParsedField {
93
+ name: string;
94
+ config: OperatorFieldConfig;
95
+ relation?: {
96
+ targetType: string;
97
+ forwardName: string;
98
+ backwardName: string;
99
+ key: string;
100
+ unique: boolean;
101
+ };
102
+ }
103
+ interface ParsedRelationship {
104
+ name: string;
105
+ targetType: string;
106
+ targetField: string;
107
+ sourceField: string;
108
+ isArray: boolean;
109
+ description: string;
110
+ }
111
+ interface TailorDBType {
112
+ name: string;
113
+ pluralForm: string;
114
+ description?: string;
115
+ fields: Record<string, ParsedField>;
116
+ forwardRelationships: Record<string, ParsedRelationship>;
117
+ backwardRelationships: Record<string, ParsedRelationship>;
118
+ settings: TailorDBTypeParsedSettings;
119
+ permissions: Permissions;
120
+ indexes?: TailorDBTypeMetadata["indexes"];
121
+ files?: TailorDBTypeMetadata["files"];
122
+ }
151
123
  //#endregion
152
124
  //#region src/types/executor.generated.d.ts
153
125
  type TailorDBTrigger = {
@@ -325,36 +297,6 @@ type Executor = {
325
297
  description?: string | undefined;
326
298
  };
327
299
  //#endregion
328
- //#region src/types/generator-config.generated.d.ts
329
- type BaseGeneratorConfig = ["@tailor-platform/kysely-type", {
330
- distPath: string;
331
- }] | ["@tailor-platform/seed", {
332
- distPath: string;
333
- machineUserName?: string | undefined;
334
- disableIdpUserSync?: {
335
- userToIdp?: boolean | undefined;
336
- idpToUser?: boolean | undefined;
337
- } | undefined;
338
- }] | ["@tailor-platform/enum-constants", {
339
- distPath: string;
340
- }] | ["@tailor-platform/file-utils", {
341
- distPath: string;
342
- }] | {
343
- id: string;
344
- description: string;
345
- dependencies: ("tailordb" | "resolver" | "executor")[];
346
- aggregate: Function;
347
- processType?: Function | undefined;
348
- processResolver?: Function | undefined;
349
- processExecutor?: Function | undefined;
350
- processTailorDBNamespace?: Function | undefined;
351
- processResolverNamespace?: Function | undefined;
352
- };
353
- type BaseGeneratorConfigInput = BaseGeneratorConfig;
354
- //#endregion
355
- //#region src/types/generator-config.d.ts
356
- type GeneratorConfig = BaseGeneratorConfigInput;
357
- //#endregion
358
300
  //#region src/types/resolver.generated.d.ts
359
301
  type Resolver = {
360
302
  /** GraphQL operation type (query or mutation) */operation: "query" | "mutation"; /** Resolver name */
@@ -392,7 +334,7 @@ type Resolver = {
392
334
  };
393
335
  type ResolverInput = Resolver;
394
336
  //#endregion
395
- //#region src/types/plugin-generation.d.ts
337
+ //#region src/plugin/types.d.ts
396
338
  /**
397
339
  * A single generated file to write to disk.
398
340
  */
@@ -501,8 +443,6 @@ interface ExecutorReadyContext<PluginConfig = unknown> {
501
443
  /** Plugin-level configuration passed via definePlugins() */
502
444
  pluginConfig: PluginConfig;
503
445
  }
504
- //#endregion
505
- //#region src/types/plugin.d.ts
506
446
  type TypeConfigRequired<PluginConfig = unknown> = boolean | ((pluginConfig: PluginConfig | undefined) => boolean);
507
447
  /**
508
448
  * Interface for plugin configuration mapping.
@@ -630,5 +570,5 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
630
570
  onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
631
571
  }
632
572
  //#endregion
633
- export { IdpUserTrigger as A, IdProvider as B, GeneratorConfig as C, ExecutorInput as D, Executor as E, WebhookOperation as F, SCIMAttribute as G, OAuth2ClientInput as H, WorkflowOperation as I, SCIMConfig as J, SCIMAttributeMapping as K, AuthInvoker as L, ResolverExecutedTrigger as M, ScheduleTriggerInput as N, FunctionOperation as O, TailorDBTrigger as P, BuiltinIdP as R, ResolverInput as S, AuthAccessTokenTrigger as T, OIDC as U, OAuth2Client as V, SAML as W, TenantProvider as X, SCIMResource as Y, ResolverNamespaceData as _, PluginExecutorContextBase as a, TailorDBReadyContext as b, PluginGeneratedResolver as c, PluginOutput as d, PluginProcessContext as f, GeneratorResult as g, ExecutorReadyContext as h, PluginExecutorContext as i, IncomingWebhookTrigger as j, GqlOperation as k, PluginGeneratedType as l, TypePluginOutput as m, Plugin as n, PluginGeneratedExecutor as o, TailorDBTypeForPlugin as p, SCIMAuthorization as q, PluginConfigs as r, PluginGeneratedExecutorWithFile as s, NamespacePluginOutput as t, PluginNamespaceProcessContext as u, ResolverReadyContext as v, BaseGeneratorConfig as w, Resolver as x, TailorDBNamespaceData as y, IDToken as z };
634
- //# sourceMappingURL=plugin-C_FyVSdl.d.mts.map
573
+ export { ResolverExecutedTrigger as A, AuthAccessTokenTrigger as C, GqlOperation as D, FunctionOperation as E, TailorDBType as F, TypeSourceInfoEntry as I, TailorDBTrigger as M, WebhookOperation as N, IdpUserTrigger as O, WorkflowOperation as P, ResolverInput as S, ExecutorInput as T, TailorDBNamespaceData as _, PluginConfigs as a, TypePluginOutput as b, PluginGeneratedExecutor as c, PluginGeneratedType as d, PluginNamespaceProcessContext as f, ResolverReadyContext as g, ResolverNamespaceData as h, Plugin as i, ScheduleTriggerInput as j, IncomingWebhookTrigger as k, PluginGeneratedExecutorWithFile as l, PluginProcessContext as m, GeneratorResult as n, PluginExecutorContext as o, PluginOutput as p, NamespacePluginOutput as r, PluginExecutorContextBase as s, ExecutorReadyContext as t, PluginGeneratedResolver as u, TailorDBReadyContext as v, Executor as w, Resolver as x, TailorDBTypeForPlugin as y };
574
+ //# sourceMappingURL=types-DhO_VEZd.d.mts.map