@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.
- package/CHANGELOG.md +105 -0
- package/dist/application-DB2r36Et.mjs +3 -0
- package/dist/{application-76hhIhnJ.mjs → application-DqS1yBg3.mjs} +217 -131
- package/dist/application-DqS1yBg3.mjs.map +1 -0
- package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
- package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
- package/dist/{authconnection-D8SJGMpj.mjs → authconnection-D2MhtTN5.mjs} +2 -3
- package/dist/{authconnection-D8SJGMpj.mjs.map → authconnection-D2MhtTN5.mjs.map} +1 -1
- package/dist/{authconnection-BIYzEh2p.d.mts → authconnection-DvUQAjQS.d.mts} +1 -1
- package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
- package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
- package/dist/cli/index.mjs +78 -131
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +619 -751
- package/dist/cli/lib.mjs +9 -10
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/{client-C68VWo4g.mjs → client-Dbohmtkv.mjs} +1 -2
- package/dist/{client-CobIRHl-.mjs → client-z_oHGVNy.mjs} +10 -7
- package/dist/client-z_oHGVNy.mjs.map +1 -0
- package/dist/completion/zsh-worker.zsh +4029 -0
- package/dist/configure/index.d.mts +8 -7
- package/dist/configure/index.mjs +27 -28
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
- package/dist/{context-s0lxhu8_.mjs.map → context-Bd266-ru.mjs.map} +1 -1
- package/dist/{context-CUBwSBq4.d.mts → context-BuuIb8CC.d.mts} +1 -1
- package/dist/{crashreport-BhD0y14F.mjs → crashreport-BsjAkFWw.mjs} +19 -10
- package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-BsjAkFWw.mjs.map} +1 -1
- package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-pr6Rhvza.mjs} +1 -2
- package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
- package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
- package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
- package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
- package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
- package/dist/field-DOsJCPFa.mjs.map +1 -0
- package/dist/{file-BzK8z3X-.d.mts → file-BB8Vs9O_.d.mts} +1 -1
- package/dist/{file-B58Dm-2P.mjs → file-_oUZo76X.mjs} +2 -3
- package/dist/{file-B58Dm-2P.mjs.map → file-_oUZo76X.mjs.map} +1 -1
- package/dist/{file-utils-BHPxPXmn.mjs → file-utils-DcyIPFQh.mjs} +2 -3
- package/dist/{file-utils-BHPxPXmn.mjs.map → file-utils-DcyIPFQh.mjs.map} +1 -1
- package/dist/{globals-ByrCoDip.mjs → globals-Crz8o65k.mjs} +53 -5
- package/dist/globals-Crz8o65k.mjs.map +1 -0
- package/dist/http-adapter.generated-WgMnb7Sb.d.mts +580 -0
- package/dist/{iconv-kwrmd1U_.d.mts → iconv-Co-TOPuH.d.mts} +1 -1
- package/dist/{iconv-DreIffeM.mjs → iconv-D2vi8G36.mjs} +2 -3
- package/dist/{iconv-DreIffeM.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
- package/dist/{idp-Ch95ag8h.mjs → idp-BDbK5gjm.mjs} +2 -3
- package/dist/{idp-Ch95ag8h.mjs.map → idp-BDbK5gjm.mjs.map} +1 -1
- package/dist/{idp-BlBPtXJ-.d.mts → idp-DrhVrLmV.d.mts} +1 -1
- package/dist/{index-CQZVJ5SX.d.mts → index-5vPyRu1y.d.mts} +2 -2
- package/dist/{index-CfRFkXIO.d.mts → index-B7AKc18V.d.mts} +2 -2
- package/dist/{index-CLxubakC.d.mts → index-BlpzXncY.d.mts} +38 -247
- package/dist/{index-DRhMpdnA.d.mts → index-CK7u9isy.d.mts} +8 -8
- package/dist/{index-DUupuPhZ.d.mts → index-CNYe5lnW.d.mts} +2 -2
- package/dist/{index-CPRnOjjt.d.mts → index-DjUdWlzf.d.mts} +2 -2
- package/dist/index-ZePLwxw7.d.mts +208 -0
- package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
- package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
- package/dist/{job-BpsFXPbi.mjs → job-fuc3j1Ma.mjs} +9 -10
- package/dist/job-fuc3j1Ma.mjs.map +1 -0
- package/dist/kysely/index.mjs +0 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DR8uzZTA.mjs} +2 -3
- package/dist/kysely-type-DR8uzZTA.mjs.map +1 -0
- package/dist/{logger-DpJyJvNz.mjs → logger-CxF-Ex5d.mjs} +1 -2
- package/dist/{logger-DpJyJvNz.mjs.map → logger-CxF-Ex5d.mjs.map} +1 -1
- package/dist/{mock-DMgIygjE.mjs → mock-BjFj5o1I.mjs} +9 -11
- package/dist/mock-BjFj5o1I.mjs.map +1 -0
- package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
- package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
- package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
- package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
- package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -2
- package/dist/plugin/index.d.mts +1 -3
- package/dist/plugin/index.mjs +0 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/registry-DdsYlL_P.mjs +51 -0
- package/dist/registry-DdsYlL_P.mjs.map +1 -0
- package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DmGr9zMw.mjs} +2 -3
- package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DmGr9zMw.mjs.map} +1 -1
- package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
- package/dist/runtime/authconnection.d.mts +1 -1
- package/dist/runtime/authconnection.mjs +1 -2
- package/dist/runtime/context.d.mts +1 -1
- package/dist/runtime/context.mjs +1 -2
- package/dist/runtime/file.d.mts +1 -1
- package/dist/runtime/file.mjs +1 -2
- package/dist/runtime/globals.d.mts +6 -39
- package/dist/runtime/globals.mjs +0 -1
- package/dist/runtime/iconv.d.mts +1 -1
- package/dist/runtime/iconv.mjs +1 -2
- package/dist/runtime/idp.d.mts +1 -1
- package/dist/runtime/idp.mjs +1 -2
- package/dist/runtime/index.d.mts +8 -8
- package/dist/runtime/index.mjs +7 -8
- package/dist/runtime/secretmanager.d.mts +1 -1
- package/dist/runtime/secretmanager.mjs +1 -2
- package/dist/runtime/workflow.d.mts +1 -1
- package/dist/runtime/workflow.mjs +1 -2
- package/dist/{runtime-C7qTBDD2.mjs → runtime-n9NCkjee.mjs} +301 -317
- package/dist/runtime-n9NCkjee.mjs.map +1 -0
- package/dist/{schema-1msIhXwA.mjs → schema-BhkpP5Hw.mjs} +3 -4
- package/dist/schema-BhkpP5Hw.mjs.map +1 -0
- package/dist/{secret-file-CWzF8rry.mjs → secret-file-DBqZhjFQ.mjs} +1 -2
- package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-DBqZhjFQ.mjs.map} +1 -1
- package/dist/{secretmanager-CKLB3wAQ.d.mts → secretmanager-B3n4KHfm.d.mts} +1 -1
- package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
- package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
- package/dist/seed/index.mjs +0 -1
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-BH2FbrPV.mjs → seed-jf3008-h.mjs} +5 -16
- package/dist/seed-jf3008-h.mjs.map +1 -0
- package/dist/{service-wI3Hvrgx.mjs → service-CCL8ruDf.mjs} +3 -4
- package/dist/service-CCL8ruDf.mjs.map +1 -0
- package/dist/service-D6yonf2I.mjs +3 -0
- package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri.mjs} +3 -4
- package/dist/service-DU1mVzri.mjs.map +1 -0
- package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
- package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
- package/dist/telemetry-ClwW5ohF.mjs +3 -0
- package/dist/test-env-key-D9kM6ETE.mjs +49 -0
- package/dist/test-env-key-D9kM6ETE.mjs.map +1 -0
- package/dist/type-source-DH_LH20p.mjs +13 -0
- package/dist/type-source-DH_LH20p.mjs.map +1 -0
- package/dist/{types-CmzfQP_m.mjs → types-B2RpYyA_.mjs} +2 -3
- package/dist/types-B2RpYyA_.mjs.map +1 -0
- package/dist/types-ClhIrW_C.mjs +4 -0
- package/dist/{tailordb-BlBGmQK-.d.mts → types-DCUhgpyI.d.mts} +142 -221
- package/dist/{plugin-C_FyVSdl.d.mts → types-DhO_VEZd.d.mts} +119 -179
- package/dist/types-DwDgacni.d.mts +338 -0
- package/dist/utils/test/index.d.mts +4 -3
- package/dist/utils/test/index.mjs +1 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.mjs +1 -2
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.d.mts +42 -5
- package/dist/vitest/index.mjs +133 -4
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/setup.mjs +2 -3
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/{workflow-CMamswkK.d.mts → workflow-BbKvGLQg.d.mts} +1 -1
- package/dist/{workflow--aPbA8Uq.mjs → workflow-DgemCAz3.mjs} +2 -3
- package/dist/{workflow--aPbA8Uq.mjs.map → workflow-DgemCAz3.mjs.map} +1 -1
- package/dist/workflow.generated-DtQwEo-x.d.mts +671 -0
- package/docs/cli/application.md +0 -2
- package/docs/cli/completion.md +3 -0
- package/docs/cli/crashreport.md +0 -2
- package/docs/cli/function.md +1 -1
- package/docs/cli/user.md +3 -3
- package/docs/cli/workspace.md +3 -3
- package/docs/configuration.md +0 -2
- package/docs/plugin/custom.md +2 -2
- package/docs/plugin/index.md +1 -1
- package/docs/runtime.md +3 -3
- package/docs/services/aigateway.md +97 -0
- package/docs/services/auth.md +19 -2
- package/docs/services/executor.md +0 -2
- package/docs/services/resolver.md +2 -4
- package/docs/services/tailordb.md +1 -1
- package/docs/services/workflow.md +13 -15
- package/docs/testing.md +18 -11
- package/package.json +13 -12
- package/dist/actor-J2gJ0eK5.d.mts +0 -24
- package/dist/application-76hhIhnJ.mjs.map +0 -1
- package/dist/application-av2raLs6.mjs +0 -4
- package/dist/cli/skills.d.mts +0 -1
- package/dist/cli/skills.mjs +0 -22
- package/dist/cli/skills.mjs.map +0 -1
- package/dist/client-CobIRHl-.mjs.map +0 -1
- package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
- package/dist/env-B-g-qgE4.d.mts +0 -7
- package/dist/field-C4zdJLW5.mjs.map +0 -1
- package/dist/globals-ByrCoDip.mjs.map +0 -1
- package/dist/job-BpsFXPbi.mjs.map +0 -1
- package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
- package/dist/mock-DMgIygjE.mjs.map +0 -1
- package/dist/package-json-wzO6nV9O.mjs +0 -4
- package/dist/registry-D0uB0OrK.mjs +0 -178
- package/dist/registry-D0uB0OrK.mjs.map +0 -1
- package/dist/runtime-C7qTBDD2.mjs.map +0 -1
- package/dist/schema-1msIhXwA.mjs.map +0 -1
- package/dist/seed-BH2FbrPV.mjs.map +0 -1
- package/dist/service-BHQIerYh.mjs +0 -4
- package/dist/service-DMohAx8a2.mjs.map +0 -1
- package/dist/service-wI3Hvrgx.mjs.map +0 -1
- package/dist/telemetry-w92bvGdC.mjs +0 -4
- package/dist/types-2Be3wSMc.mjs +0 -5
- package/dist/types-CmzfQP_m.mjs.map +0 -1
- package/dist/workflow.generated-Bf1tWylx.d.mts +0 -1416
- package/docs/generator/builtin.md +0 -257
- package/docs/generator/custom.md +0 -147
- package/docs/generator/index.md +0 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idp-
|
|
1
|
+
{"version":3,"file":"idp-BDbK5gjm.mjs","names":["#impl"],"sources":["../src/runtime/idp.ts"],"sourcesContent":["/**\n * IDP (Identity Provider) utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.idp` runtime API.\n * At runtime this delegates to `globalThis.tailor.idp`. Use `mockIdp` from\n * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { idp } from \"@tailor-platform/sdk/runtime\";\n *\n * const client = new idp.Client({ namespace: \"my-namespace\" });\n * const { users } = await client.users({ first: 10 });\n */\n\n/** Configuration object for {@link Client}. */\nexport interface ClientConfig {\n namespace: string;\n}\n\n/** User record returned by IDP operations. */\nexport interface User {\n id: string;\n name: string;\n disabled: boolean;\n createdAt?: string;\n}\n\n/** Filter options for {@link Client.users}. */\nexport interface UserQuery {\n /** Filter by user IDs */\n ids?: string[];\n /** Filter by user names */\n names?: string[];\n}\n\n/** Pagination/filter options for {@link Client.users}. */\nexport interface ListUsersOptions {\n /** Maximum number of users to return */\n first?: number;\n /** Page token for pagination */\n after?: string;\n /** Query filter for users */\n query?: UserQuery;\n}\n\n/** Response shape for {@link Client.users}. */\nexport interface ListUsersResponse {\n users: User[];\n nextPageToken: string | null;\n totalCount: number;\n}\n\n/** Input for {@link Client.createUser}. */\nexport interface CreateUserInput {\n /** The user's name (typically email) */\n name: string;\n /** The user's password. If omitted, the user is created without a password (cannot log in with any password). */\n password?: string;\n /** Whether the user is disabled */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.updateUser}. */\nexport interface UpdateUserInput {\n /** The user's ID */\n id: string;\n /** New name for the user */\n name?: string;\n /** New password for the user. Cannot be used with clearPassword. */\n password?: string;\n /** If true, remove the user's password. Cannot be used with password. */\n clearPassword?: boolean;\n /** New disabled status for the user */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.sendPasswordResetEmail}. */\nexport interface SendPasswordResetEmailInput {\n /** The ID of the user */\n userId: string;\n /** The URI to redirect to after password reset */\n redirectUri: string;\n /** The sender display name. Defaults to 'Tailor Platform IdP'. */\n fromName?: string;\n /** The email subject line. Defaults to the localized default subject. */\n subject?: string;\n}\n\n/** Instance methods exposed by `tailor.idp.Client`. */\nexport interface IdpClientInstance {\n users(options?: ListUsersOptions): Promise<ListUsersResponse>;\n user(userId: string): Promise<User>;\n userByName(name: string): Promise<User>;\n createUser(input: CreateUserInput): Promise<User>;\n updateUser(input: UpdateUserInput): Promise<User>;\n deleteUser(userId: string): Promise<boolean>;\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;\n}\n\n/**\n * Constructor shape for `tailor.idp.Client`.\n * @internal\n */\nexport interface IdpClientConstructor {\n new (config: ClientConfig): IdpClientInstance;\n}\n\n/**\n * Platform API surface for `tailor.idp`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.idp`.\n * @internal\n */\nexport interface TailorIdpAPI {\n Client: IdpClientConstructor;\n}\n\n/**\n * IDP Client for user management operations.\n *\n * Wraps the platform-provided `tailor.idp.Client` and exposes the same surface.\n */\nexport class Client {\n #impl: IdpClientInstance;\n\n constructor(config: ClientConfig) {\n this.#impl = new (globalThis as { tailor: { idp: TailorIdpAPI } }).tailor.idp.Client(config);\n }\n\n /**\n * List users in the namespace with optional filtering and pagination.\n * @param options - Pagination and filter options\n * @returns Page of users with `nextPageToken` and `totalCount`\n */\n users(options?: ListUsersOptions): Promise<ListUsersResponse> {\n return this.#impl.users(options);\n }\n\n /**\n * Get a user by ID.\n * @param userId - IDP user ID\n * @returns The matching user\n */\n user(userId: string): Promise<User> {\n return this.#impl.user(userId);\n }\n\n /**\n * Get a user by name.\n * @param name - IDP user name\n * @returns The matching user\n */\n userByName(name: string): Promise<User> {\n return this.#impl.userByName(name);\n }\n\n /**\n * Create a new user.\n * @param input - User attributes\n * @returns The newly created user\n */\n createUser(input: CreateUserInput): Promise<User> {\n return this.#impl.createUser(input);\n }\n\n /**\n * Update an existing user.\n * @param input - User ID plus attributes to update\n * @returns The updated user\n */\n updateUser(input: UpdateUserInput): Promise<User> {\n return this.#impl.updateUser(input);\n }\n\n /**\n * Delete a user by ID.\n * @param userId - IDP user ID\n * @returns `true` when the user was deleted\n */\n deleteUser(userId: string): Promise<boolean> {\n return this.#impl.deleteUser(userId);\n }\n\n /**\n * Send a password reset email to a user.\n * @param input - Target user ID and redirect URI\n * @returns `true` when the email was queued\n */\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean> {\n return this.#impl.sendPasswordResetEmail(input);\n }\n}\n"],"mappings":";;;;;;;;;AAwHA,IAAa,SAAb,MAAoB;CAClB;CAEA,YAAY,QAAsB;EAChC,KAAKA,QAAQ,IAAK,WAAiD,OAAO,IAAI,OAAO,MAAM;CAC7F;;;;;;CAOA,MAAM,SAAwD;EAC5D,OAAO,KAAKA,MAAM,MAAM,OAAO;CACjC;;;;;;CAOA,KAAK,QAA+B;EAClC,OAAO,KAAKA,MAAM,KAAK,MAAM;CAC/B;;;;;;CAOA,WAAW,MAA6B;EACtC,OAAO,KAAKA,MAAM,WAAW,IAAI;CACnC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,QAAkC;EAC3C,OAAO,KAAKA,MAAM,WAAW,MAAM;CACrC;;;;;;CAOA,uBAAuB,OAAsD;EAC3E,OAAO,KAAKA,MAAM,uBAAuB,KAAK;CAChD;AACF"}
|
|
@@ -157,4 +157,4 @@ declare class Client {
|
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
159
|
export { IdpClientInstance as a, SendPasswordResetEmailInput as c, User as d, UserQuery as f, IdpClientConstructor as i, TailorIdpAPI as l, ClientConfig as n, ListUsersOptions as o, idp_d_exports as p, CreateUserInput as r, ListUsersResponse as s, Client as t, UpdateUserInput as u };
|
|
160
|
-
//# sourceMappingURL=idp-
|
|
160
|
+
//# sourceMappingURL=idp-DrhVrLmV.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Plugin } from "./types-DhO_VEZd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/builtin/kysely-type/index.d.ts
|
|
4
4
|
/** Unique identifier for the Kysely type generator plugin. */
|
|
@@ -15,4 +15,4 @@ type KyselyTypePluginOptions = {
|
|
|
15
15
|
declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { kyselyTypePlugin as n, KyselyGeneratorID as t };
|
|
18
|
-
//# sourceMappingURL=index-
|
|
18
|
+
//# sourceMappingURL=index-5vPyRu1y.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Plugin } from "./types-DhO_VEZd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/builtin/seed/index.d.ts
|
|
4
4
|
/** Unique identifier for the seed generator plugin. */
|
|
@@ -44,4 +44,4 @@ type SeedPluginOptions = {
|
|
|
44
44
|
declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { seedPlugin as n, SeedGeneratorID as t };
|
|
47
|
-
//# sourceMappingURL=index-
|
|
47
|
+
//# sourceMappingURL=index-B7AKc18V.d.mts.map
|
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { B as TailorActor, C as FieldMetadata, D as TailorField$1, E as FieldValidateInput, F as output$1, H as TailorInvoker, N as JsonValue, O as TailorFieldType, P as Prettify, T as FieldOutput, U as TailorUser, V as TailorEnv, b as ArrayFieldOutput, j as InferFieldsOutput, w as FieldOptions, x as DefinedFieldMetadata, z as InferredAttributeMap } from "./types-DCUhgpyI.mjs";
|
|
2
|
+
import { _ as UserAttributeListKey, a as AuthServiceInput, c as DefinedAuth, f as MachineUserName, v as UserAttributeMap } from "./types-DwDgacni.mjs";
|
|
3
|
+
import { A as ResolverExecutedTrigger$1, C as AuthAccessTokenTrigger$1, D as GqlOperation$1, E as FunctionOperation$1, M as TailorDBTrigger$1, N as WebhookOperation$1, O as IdpUserTrigger$1, P as WorkflowOperation$1, S as ResolverInput, T as ExecutorInput, i as Plugin, j as ScheduleTriggerInput, k as IncomingWebhookTrigger$1, x as Resolver } from "./types-DhO_VEZd.mjs";
|
|
4
|
+
import { a as TailorDBInstance, m as AllowedValuesOutput, o as TailorDBType, p as AllowedValues, t as HttpAdapterConfigInput } from "./http-adapter.generated-WgMnb7Sb.mjs";
|
|
5
|
+
import { S as IdPInput, T as AIGatewayInput, f as StaticWebsiteDefinitionBrand, h as SecretsDefinitionBrand, p as StaticWebsiteInput, r as AppConfig, v as IdpDefinitionBrand, w as AIGatewayDefinitionBrand } from "./workflow.generated-DtQwEo-x.mjs";
|
|
6
|
+
import { i as Workflow } from "./index-ZePLwxw7.mjs";
|
|
6
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
7
8
|
import { Client } from "@urql/core";
|
|
8
9
|
import { StandardCRON } from "ts-cron-validator";
|
|
9
10
|
|
|
10
|
-
//#region src/configure/types/machine-user.d.ts
|
|
11
|
-
interface MachineUserNameRegistry {}
|
|
12
|
-
/**
|
|
13
|
-
* Machine user name.
|
|
14
|
-
*
|
|
15
|
-
* When `tailor.d.ts` is generated (via `tailor-sdk deploy`/`generate`), this is narrowed
|
|
16
|
-
* to the union of defined machine user names. When no machine users are registered yet,
|
|
17
|
-
* falls back to `string` to avoid blocking editing before the first generate run.
|
|
18
|
-
*/
|
|
19
|
-
type MachineUserName = keyof MachineUserNameRegistry extends never ? string : keyof MachineUserNameRegistry & string;
|
|
20
|
-
//#endregion
|
|
21
11
|
//#region src/configure/types/type.d.ts
|
|
22
12
|
type TailorAnyField = TailorField<any>;
|
|
23
13
|
/**
|
|
@@ -92,6 +82,10 @@ type FieldParseInternalArgs = {
|
|
|
92
82
|
* @example t.uuid()
|
|
93
83
|
*/
|
|
94
84
|
//#endregion
|
|
85
|
+
//#region src/configure/user.d.ts
|
|
86
|
+
/** Represents an unauthenticated user in the Tailor platform. */
|
|
87
|
+
declare const unauthenticatedTailorUser: TailorUser;
|
|
88
|
+
//#endregion
|
|
95
89
|
//#region src/configure/types/idp-name.d.ts
|
|
96
90
|
interface IdpNameRegistry {}
|
|
97
91
|
/**
|
|
@@ -116,14 +110,6 @@ type MachineUserOnlyAuthInput<MachineUserNames extends string, MachineUserAttrib
|
|
|
116
110
|
userProfile?: never;
|
|
117
111
|
machineUserAttributes: MachineUserAttributes;
|
|
118
112
|
};
|
|
119
|
-
/**
|
|
120
|
-
* Invoker type compatible with tailor.v1.AuthInvoker
|
|
121
|
-
* - namespace: auth service name
|
|
122
|
-
* - machineUserName: machine user name
|
|
123
|
-
*/
|
|
124
|
-
type AuthInvoker<M extends string> = Omit<AuthInvoker$1, "machineUserName"> & {
|
|
125
|
-
machineUserName: M;
|
|
126
|
-
};
|
|
127
113
|
/**
|
|
128
114
|
* Define an auth service for the Tailor SDK.
|
|
129
115
|
* @template Name
|
|
@@ -131,13 +117,12 @@ type AuthInvoker<M extends string> = Omit<AuthInvoker$1, "machineUserName"> & {
|
|
|
131
117
|
* @template AttributeMap
|
|
132
118
|
* @template AttributeList
|
|
133
119
|
* @template MachineUserNames
|
|
134
|
-
* @template M
|
|
135
120
|
* @param name - Auth service name
|
|
136
121
|
* @param config - Auth service configuration
|
|
137
122
|
* @returns Defined auth service
|
|
138
123
|
*/
|
|
139
|
-
declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const AttributeMap extends UserAttributeMap<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames>): DefinedAuth<Name, UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames
|
|
140
|
-
declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames
|
|
124
|
+
declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const AttributeMap extends UserAttributeMap<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames>): DefinedAuth<Name, UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames>>;
|
|
125
|
+
declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>>;
|
|
141
126
|
//#endregion
|
|
142
127
|
//#region src/configure/services/resolver/resolver.d.ts
|
|
143
128
|
type Context<Input extends Record<string, TailorAnyField> | undefined> = {
|
|
@@ -160,7 +145,7 @@ type ResolverReturn<Input extends Record<string, TailorAnyField> | undefined, Ou
|
|
|
160
145
|
input?: Input;
|
|
161
146
|
output: NormalizedOutput<Output>;
|
|
162
147
|
body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
|
|
163
|
-
authInvoker?:
|
|
148
|
+
authInvoker?: MachineUserName;
|
|
164
149
|
}>;
|
|
165
150
|
/**
|
|
166
151
|
* Create a resolver definition for the Tailor SDK.
|
|
@@ -204,160 +189,27 @@ declare function createResolver<Input extends Record<string, TailorAnyField> | u
|
|
|
204
189
|
input?: Input;
|
|
205
190
|
output: Output;
|
|
206
191
|
body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
|
|
207
|
-
authInvoker?:
|
|
192
|
+
authInvoker?: MachineUserName;
|
|
208
193
|
}>): ResolverReturn<Input, Output>;
|
|
209
194
|
type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
|
|
210
195
|
//#endregion
|
|
211
|
-
//#region src/
|
|
196
|
+
//#region src/configure/services/resolver/types.d.ts
|
|
212
197
|
type QueryType = Resolver["operation"];
|
|
213
198
|
//#endregion
|
|
214
|
-
//#region src/configure/services/workflow/test-env-key.d.ts
|
|
215
|
-
/**
|
|
216
|
-
* Env-var fallback read by `.trigger()` when `mockWorkflow().setEnv()` is unset.
|
|
217
|
-
* @deprecated Use `mockWorkflow().setEnv()` from `@tailor-platform/sdk/vitest`.
|
|
218
|
-
* @internal
|
|
219
|
-
*/
|
|
220
|
-
declare const WORKFLOW_TEST_ENV_KEY = "TAILOR_TEST_WORKFLOW_ENV";
|
|
221
|
-
//#endregion
|
|
222
|
-
//#region src/configure/services/workflow/job.d.ts
|
|
223
|
-
/**
|
|
224
|
-
* Context object passed as the second argument to workflow job body functions.
|
|
225
|
-
*/
|
|
226
|
-
type WorkflowJobContext = {
|
|
227
|
-
env: TailorEnv;
|
|
228
|
-
invoker?: TailorInvoker;
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* The body function type for a workflow job.
|
|
232
|
-
* Resolves to the callable signature when `I` / `O` are JsonValue-compatible,
|
|
233
|
-
* or to a template-literal error string that surfaces at the `body:` property.
|
|
234
|
-
*/
|
|
235
|
-
type JobBody<I, O> = [null] extends [I] ? "ERROR: Input cannot be null at the top level" : [I] extends [undefined] ? [O] extends [JsonCompatible<O> | undefined | void] ? (input: I, context: WorkflowJobContext) => O | Promise<O> : "ERROR: Output must be JsonValue-compatible (plain objects/arrays; no class instances or functions)" : [undefined] extends [I] ? "ERROR: Input cannot include undefined at the top level" : [I] extends [JsonCompatible<I>] ? [O] extends [JsonCompatible<O> | undefined | void] ? (input: I, context: WorkflowJobContext) => O | Promise<O> : "ERROR: Output must be JsonValue-compatible (plain objects/arrays; no class instances or functions)" : "ERROR: Input must be JsonValue-compatible (plain objects/arrays; no class instances or functions)";
|
|
236
|
-
/**
|
|
237
|
-
* WorkflowJob represents a job that can be triggered in a workflow.
|
|
238
|
-
*
|
|
239
|
-
* Type constraints:
|
|
240
|
-
* - Input: Must be JsonValue-compatible (plain objects/arrays; no class instances or functions) or undefined.
|
|
241
|
-
* - Output: Must be JsonValue-compatible (plain objects/arrays; no class instances or functions), undefined, or void.
|
|
242
|
-
* - Trigger returns `Awaited<Output>` as-is (no Jsonify transformation).
|
|
243
|
-
*/
|
|
244
|
-
interface WorkflowJob<Name extends string = string, Input = undefined, Output = undefined> {
|
|
245
|
-
name: Name;
|
|
246
|
-
/**
|
|
247
|
-
* Trigger this job with the given input. Returns a Promise that resolves
|
|
248
|
-
* to the job's output value.
|
|
249
|
-
* @example
|
|
250
|
-
* body: async (input) => {
|
|
251
|
-
* const a = await jobA.trigger({ id: input.id });
|
|
252
|
-
* const b = await jobB.trigger({ id: input.id });
|
|
253
|
-
* return { a, b };
|
|
254
|
-
* }
|
|
255
|
-
*/
|
|
256
|
-
trigger: [Input] extends [undefined] ? () => Promise<Awaited<Output>> : (input: Input) => Promise<Awaited<Output>>;
|
|
257
|
-
body: (input: Input, context: WorkflowJobContext) => Output | Promise<Output>;
|
|
258
|
-
}
|
|
259
|
-
interface CreateWorkflowJobConfig<Name extends string, I, O> {
|
|
260
|
-
readonly name: Name;
|
|
261
|
-
readonly body: JobBody<I, O>;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Create a workflow job definition.
|
|
265
|
-
*
|
|
266
|
-
* All jobs must be named exports from the workflow file.
|
|
267
|
-
* Job names must be unique across the entire project.
|
|
268
|
-
*
|
|
269
|
-
* Input and output must be JsonValue-compatible (primitives, plain objects, arrays).
|
|
270
|
-
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
271
|
-
* class instances exposing methods are rejected via the property walk.
|
|
272
|
-
* @param config - Job configuration with name and body function.
|
|
273
|
-
* @param config.name - Unique job name across the project.
|
|
274
|
-
* @param config.body - Async function that processes the job input.
|
|
275
|
-
* @returns A WorkflowJob that can be triggered from other jobs.
|
|
276
|
-
* @example
|
|
277
|
-
* // Simple job with async body:
|
|
278
|
-
* export const fetchData = createWorkflowJob({
|
|
279
|
-
* name: "fetch-data",
|
|
280
|
-
* body: async (input: { id: string }) => {
|
|
281
|
-
* const db = getDB("tailordb");
|
|
282
|
-
* return await db.selectFrom("Table").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
283
|
-
* },
|
|
284
|
-
* });
|
|
285
|
-
* @example
|
|
286
|
-
* // Orchestrator job that fans out to other jobs.
|
|
287
|
-
* export const orchestrate = createWorkflowJob({
|
|
288
|
-
* name: "orchestrate",
|
|
289
|
-
* body: async (input: { orderId: string }) => {
|
|
290
|
-
* const inventory = await checkInventory.trigger({ orderId: input.orderId });
|
|
291
|
-
* const payment = await processPayment.trigger({ orderId: input.orderId });
|
|
292
|
-
* return { inventory, payment };
|
|
293
|
-
* },
|
|
294
|
-
* });
|
|
295
|
-
*/
|
|
296
|
-
declare function createWorkflowJob<const Name extends string, I = undefined, O = undefined>(config: CreateWorkflowJobConfig<Name, I, O>): WorkflowJob<Name, I, Awaited<O>>;
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region src/configure/services/workflow/workflow.d.ts
|
|
299
|
-
interface WorkflowConfig<Job extends WorkflowJob<any, any, any> = WorkflowJob<any, any, any>> {
|
|
300
|
-
name: string;
|
|
301
|
-
mainJob: Job;
|
|
302
|
-
retryPolicy?: RetryPolicy;
|
|
303
|
-
concurrencyPolicy?: ConcurrencyPolicy;
|
|
304
|
-
}
|
|
305
|
-
interface Workflow<Job extends WorkflowJob<any, any, any> = WorkflowJob<any, any, any>> {
|
|
306
|
-
name: string;
|
|
307
|
-
mainJob: Job;
|
|
308
|
-
retryPolicy?: RetryPolicy;
|
|
309
|
-
concurrencyPolicy?: ConcurrencyPolicy;
|
|
310
|
-
trigger: (args: Parameters<Job["trigger"]>[0], options?: {
|
|
311
|
-
authInvoker: AuthInvoker<string> | MachineUserName;
|
|
312
|
-
}) => Promise<string>;
|
|
313
|
-
}
|
|
314
|
-
interface WorkflowDefinition<Job extends WorkflowJob<any, any, any>> {
|
|
315
|
-
name: string;
|
|
316
|
-
mainJob: Job;
|
|
317
|
-
retryPolicy?: RetryPolicy;
|
|
318
|
-
concurrencyPolicy?: ConcurrencyPolicy;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Create a workflow definition that can be triggered via the Tailor SDK.
|
|
322
|
-
* In production, bundler transforms .trigger() calls to tailor.workflow.triggerWorkflow().
|
|
323
|
-
*
|
|
324
|
-
* The workflow MUST be the default export of the file.
|
|
325
|
-
* All jobs referenced by the workflow MUST be named exports.
|
|
326
|
-
* @template Job
|
|
327
|
-
* @param config - Workflow configuration
|
|
328
|
-
* @returns Defined workflow
|
|
329
|
-
* @example
|
|
330
|
-
* export const fetchData = createWorkflowJob({ name: "fetch-data", body: async (input: { id: string }) => ({ id: input.id }) });
|
|
331
|
-
* export const processData = createWorkflowJob({
|
|
332
|
-
* name: "process-data",
|
|
333
|
-
* body: async (input: { id: string }) => {
|
|
334
|
-
* const data = await fetchData.trigger({ id: input.id });
|
|
335
|
-
* return { data };
|
|
336
|
-
* },
|
|
337
|
-
* });
|
|
338
|
-
*
|
|
339
|
-
* // Workflow must be default export; mainJob is the entry point
|
|
340
|
-
* export default createWorkflow({
|
|
341
|
-
* name: "data-processing",
|
|
342
|
-
* mainJob: processData,
|
|
343
|
-
* });
|
|
344
|
-
*/
|
|
345
|
-
declare function createWorkflow<Job extends WorkflowJob<any, any, any>>(config: WorkflowDefinition<Job>): Workflow<Job>;
|
|
346
|
-
//#endregion
|
|
347
199
|
//#region src/configure/services/executor/operation.d.ts
|
|
348
200
|
/** Function-based executor operation. The body receives the trigger args and the `invoker`. */
|
|
349
201
|
type FunctionOperation<Args> = Omit<FunctionOperation$1, "body" | "authInvoker"> & {
|
|
350
202
|
body: (args: Args & {
|
|
351
203
|
invoker?: TailorInvoker;
|
|
352
204
|
}) => void | Promise<void>;
|
|
353
|
-
authInvoker?:
|
|
205
|
+
authInvoker?: MachineUserName;
|
|
354
206
|
};
|
|
355
207
|
type UrqlOperationArgs = Parameters<Client["query"] | Client["mutation"]>;
|
|
356
208
|
/** GraphQL-based executor operation. Executes a GraphQL query or mutation. */
|
|
357
209
|
type GqlOperation<Args> = Omit<GqlOperation$1, "query" | "variables" | "authInvoker"> & {
|
|
358
210
|
query: UrqlOperationArgs[0];
|
|
359
211
|
variables?: (args: Args) => UrqlOperationArgs[1];
|
|
360
|
-
authInvoker?:
|
|
212
|
+
authInvoker?: MachineUserName;
|
|
361
213
|
};
|
|
362
214
|
type RequestHeader = "A-IM" | "Accept" | "Accept-Additions" | "Accept-CH" | "Accept-Charset" | "Accept-Datetime" | "Accept-Encoding" | "Accept-Features" | "Accept-Language" | "Accept-Patch" | "Accept-Post" | "Accept-Ranges" | "Accept-Signature" | "Access-Control" | "Access-Control-Allow-Credentials" | "Access-Control-Allow-Headers" | "Access-Control-Allow-Methods" | "Access-Control-Allow-Origin" | "Access-Control-Expose-Headers" | "Access-Control-Max-Age" | "Access-Control-Request-Headers" | "Access-Control-Request-Method" | "Age" | "Allow" | "ALPN" | "Alt-Svc" | "Alt-Used" | "Alternates" | "AMP-Cache-Transform" | "Apply-To-Redirect-Ref" | "Authentication-Control" | "Authentication-Info" | "Authorization" | "Available-Dictionary" | "C-Ext" | "C-Man" | "C-Opt" | "C-PEP" | "C-PEP-Info" | "Cache-Control" | "Cache-Status" | "Cal-Managed-ID" | "CalDAV-Timezones" | "Capsule-Protocol" | "CDN-Cache-Control" | "CDN-Loop" | "Cert-Not-After" | "Cert-Not-Before" | "Clear-Site-Data" | "Client-Cert" | "Client-Cert-Chain" | "Close" | "CMCD-Object" | "CMCD-Request" | "CMCD-Session" | "CMCD-Status" | "CMSD-Dynamic" | "CMSD-Static" | "Concealed-Auth-Export" | "Configuration-Context" | "Connection" | "Content-Base" | "Content-Digest" | "Content-Disposition" | "Content-Encoding" | "Content-ID" | "Content-Language" | "Content-Length" | "Content-Location" | "Content-MD5" | "Content-Range" | "Content-Script-Type" | "Content-Security-Policy" | "Content-Security-Policy-Report-Only" | "Content-Style-Type" | "Content-Type" | "Content-Version" | "Cookie" | "Cookie2" | "Cross-Origin-Embedder-Policy" | "Cross-Origin-Embedder-Policy-Report-Only" | "Cross-Origin-Opener-Policy" | "Cross-Origin-Opener-Policy-Report-Only" | "Cross-Origin-Resource-Policy" | "CTA-Common-Access-Token" | "DASL" | "Date" | "DAV" | "Default-Style" | "Delta-Base" | "Deprecation" | "Depth" | "Derived-From" | "Destination" | "Differential-ID" | "Dictionary-ID" | "Digest" | "DPoP" | "DPoP-Nonce" | "Early-Data" | "EDIINT-Features" | "ETag" | "Expect" | "Expect-CT" | "Expires" | "Ext" | "Forwarded" | "From" | "GetProfile" | "Hobareg" | "Host" | "HTTP2-Settings" | "If" | "If-Match" | "If-Modified-Since" | "If-None-Match" | "If-Range" | "If-Schedule-Tag-Match" | "If-Unmodified-Since" | "IM" | "Include-Referred-Token-Binding-ID" | "Isolation" | "Keep-Alive" | "Label" | "Last-Event-ID" | "Last-Modified" | "Link" | "Link-Template" | "Location" | "Lock-Token" | "Man" | "Max-Forwards" | "Memento-Datetime" | "Meter" | "Method-Check" | "Method-Check-Expires" | "MIME-Version" | "Negotiate" | "NEL" | "OData-EntityId" | "OData-Isolation" | "OData-MaxVersion" | "OData-Version" | "Opt" | "Optional-WWW-Authenticate" | "Ordering-Type" | "Origin" | "Origin-Agent-Cluster" | "OSCORE" | "OSLC-Core-Version" | "Overwrite" | "P3P" | "PEP" | "PEP-Info" | "Permissions-Policy" | "PICS-Label" | "Ping-From" | "Ping-To" | "Position" | "Pragma" | "Prefer" | "Preference-Applied" | "Priority" | "ProfileObject" | "Protocol" | "Protocol-Info" | "Protocol-Query" | "Protocol-Request" | "Proxy-Authenticate" | "Proxy-Authentication-Info" | "Proxy-Authorization" | "Proxy-Features" | "Proxy-Instruction" | "Proxy-Status" | "Public" | "Public-Key-Pins" | "Public-Key-Pins-Report-Only" | "Range" | "Redirect-Ref" | "Referer" | "Referer-Root" | "Referrer-Policy" | "Refresh" | "Repeatability-Client-ID" | "Repeatability-First-Sent" | "Repeatability-Request-ID" | "Repeatability-Result" | "Replay-Nonce" | "Reporting-Endpoints" | "Repr-Digest" | "Retry-After" | "Safe" | "Schedule-Reply" | "Schedule-Tag" | "Sec-GPC" | "Sec-Purpose" | "Sec-Token-Binding" | "Sec-WebSocket-Accept" | "Sec-WebSocket-Extensions" | "Sec-WebSocket-Key" | "Sec-WebSocket-Protocol" | "Sec-WebSocket-Version" | "Security-Scheme" | "Server" | "Server-Timing" | "Set-Cookie" | "Set-Cookie2" | "SetProfile" | "Signature" | "Signature-Input" | "SLUG" | "SoapAction" | "Status-URI" | "Strict-Transport-Security" | "Sunset" | "Surrogate-Capability" | "Surrogate-Control" | "TCN" | "TE" | "Timeout" | "Timing-Allow-Origin" | "Topic" | "Traceparent" | "Tracestate" | "Trailer" | "Transfer-Encoding" | "TTL" | "Upgrade" | "Urgency" | "URI" | "Use-As-Dictionary" | "User-Agent" | "Variant-Vary" | "Vary" | "Via" | "Want-Content-Digest" | "Want-Digest" | "Want-Repr-Digest" | "Warning" | "WWW-Authenticate" | "X-Content-Type-Options" | "X-Frame-Options" | (string & {});
|
|
363
215
|
/** Outbound webhook executor operation. Sends HTTP requests to external URLs. */
|
|
@@ -378,7 +230,7 @@ type WorkflowInput$1<W extends Workflow> = Parameters<W["trigger"]>[0];
|
|
|
378
230
|
type WorkflowOperation<Args, W extends Workflow = Workflow> = Omit<WorkflowOperation$1, "workflowName" | "args" | "authInvoker"> & {
|
|
379
231
|
workflow: W;
|
|
380
232
|
args?: WorkflowInput$1<W> | ((args: Args) => WorkflowInput$1<W>);
|
|
381
|
-
authInvoker?:
|
|
233
|
+
authInvoker?: MachineUserName;
|
|
382
234
|
};
|
|
383
235
|
type Operation<Args> = FunctionOperation<Args> | GqlOperation<Args> | WebhookOperation<Args> | WorkflowOperation<Args>;
|
|
384
236
|
//#endregion
|
|
@@ -732,7 +584,7 @@ type Executor<T extends Trigger<unknown>, O> = O extends {
|
|
|
732
584
|
kind: "workflow";
|
|
733
585
|
workflow: W;
|
|
734
586
|
args?: WorkflowInput<W> | ((args: TriggerArgs<T>) => WorkflowInput<W>);
|
|
735
|
-
authInvoker?:
|
|
587
|
+
authInvoker?: MachineUserName;
|
|
736
588
|
};
|
|
737
589
|
} : ExecutorBase<T> & {
|
|
738
590
|
operation: O;
|
|
@@ -782,76 +634,6 @@ declare function createExecutor<Args, O extends Operation<Args> | {
|
|
|
782
634
|
workflow: Workflow;
|
|
783
635
|
}>(config: Executor<Trigger<Args>, O>): Executor<Trigger<Args>, O>;
|
|
784
636
|
//#endregion
|
|
785
|
-
//#region src/configure/services/workflow/wait-point.d.ts
|
|
786
|
-
/**
|
|
787
|
-
* A single wait point instance with typed `.wait()` and `.resolve()` methods.
|
|
788
|
-
*
|
|
789
|
-
* - `.wait(payload?)` suspends execution until resolved. Returns the result from `.resolve()`.
|
|
790
|
-
* - `.resolve(executionId, callback)` resumes a suspended execution.
|
|
791
|
-
*
|
|
792
|
-
* Both `Payload` and `Result` must be JsonValue-compatible (primitives, plain objects, arrays).
|
|
793
|
-
* Functions and objects with a `toJSON` method are rejected at the type level.
|
|
794
|
-
*/
|
|
795
|
-
interface WaitPointInstance<Payload = undefined, Result = undefined> {
|
|
796
|
-
wait: [Payload] extends [undefined] ? () => Promise<Result> : (payload: Payload) => Promise<Result>;
|
|
797
|
-
resolve: (executionId: string, callback: (payload: [Payload] extends [undefined] ? undefined : Payload) => Result | Promise<Result>) => Promise<void>;
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* The type produced by `define<Payload, Result>()` / `defineWaitPoint<Payload, Result>(key)`.
|
|
801
|
-
* Resolves to `WaitPointInstance<Payload, Result>` when both types are JsonValue-compatible,
|
|
802
|
-
* or to a template-literal error string that surfaces at the call site.
|
|
803
|
-
*/
|
|
804
|
-
type WaitPointDef<Payload, Result> = [null] extends [Payload] ? "ERROR: Payload cannot be null at the top level" : [undefined] extends [Result] ? "ERROR: Result cannot be (or include) undefined (resolve callback must return a value)" : [Payload] extends [undefined] ? [Result] extends [JsonCompatible<Result>] ? WaitPointInstance<Payload, Result> : "ERROR: Result must be JsonValue-compatible (plain objects/arrays; no class instances or functions)" : [undefined] extends [Payload] ? "ERROR: Payload cannot include undefined at the top level" : [Payload] extends [JsonCompatible<Payload>] ? [Result] extends [JsonCompatible<Result>] ? WaitPointInstance<Payload, Result> : "ERROR: Result must be JsonValue-compatible (plain objects/arrays; no class instances or functions)" : "ERROR: Payload must be JsonValue-compatible (plain objects/arrays; no class instances or functions)";
|
|
805
|
-
/**
|
|
806
|
-
* The `define` function passed to the `defineWaitPoints` builder callback.
|
|
807
|
-
* Returns an actual WaitPointInstance (not a phantom marker) so that the
|
|
808
|
-
* builder's return type can flow through as-is, preserving JSDoc comments
|
|
809
|
-
* on each property for IDE autocompletion.
|
|
810
|
-
*
|
|
811
|
-
* JSON validation is encoded in the return type rather than in type-parameter
|
|
812
|
-
* constraints, because tsgo rejects self-referential constraints like
|
|
813
|
-
* `Payload extends JsonCompatible<Payload>` as circular.
|
|
814
|
-
*/
|
|
815
|
-
type DefineFn = <Payload = undefined, Result = undefined>() => WaitPointDef<Payload, Result>;
|
|
816
|
-
/**
|
|
817
|
-
* Define a single typed wait point with an explicit key.
|
|
818
|
-
*
|
|
819
|
-
* `Payload` and `Result` must be JsonValue-compatible.
|
|
820
|
-
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
821
|
-
* class instances exposing methods are rejected via the property walk.
|
|
822
|
-
* @param key - The wait point key used to match wait and resolve calls
|
|
823
|
-
* @returns A WaitPointInstance with typed `.wait()` and `.resolve()` methods
|
|
824
|
-
* @example
|
|
825
|
-
* export const approval = defineWaitPoint<{ message: string }, { approved: boolean }>("approval");
|
|
826
|
-
*
|
|
827
|
-
* await approval.wait({ message: "Please approve" });
|
|
828
|
-
*/
|
|
829
|
-
declare function defineWaitPoint<Payload = undefined, Result = undefined>(key: string): WaitPointDef<Payload, Result>;
|
|
830
|
-
/**
|
|
831
|
-
* Define a group of typed wait points for human-in-the-loop workflows.
|
|
832
|
-
* Property names become the wait point keys.
|
|
833
|
-
*
|
|
834
|
-
* The return type is the same as the builder's return type, so JSDoc on each
|
|
835
|
-
* property is preserved and visible in IDE autocompletion.
|
|
836
|
-
*
|
|
837
|
-
* `Payload` and `Result` must be JsonValue-compatible.
|
|
838
|
-
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
839
|
-
* class instances exposing methods are rejected via the property walk.
|
|
840
|
-
* @param builder - Callback that receives a `define` factory and returns an object of wait points
|
|
841
|
-
* @returns The same object returned by the builder (with correct keys set on each instance)
|
|
842
|
-
* @example
|
|
843
|
-
* export const waitPoints = defineWaitPoints(define => ({
|
|
844
|
-
* // Preceding JSDoc on this property is shown in IDE autocompletion
|
|
845
|
-
* approval: define<{ message: string }, { approved: boolean }>(),
|
|
846
|
-
* }));
|
|
847
|
-
*
|
|
848
|
-
* // IDE shows the JSDoc when typing `waitPoints.`
|
|
849
|
-
* await waitPoints.approval.wait({ message: "Please approve" });
|
|
850
|
-
*
|
|
851
|
-
* // For 2-level access, use destructured export with JSDoc attached to the export itself.
|
|
852
|
-
*/
|
|
853
|
-
declare function defineWaitPoints<T extends Record<string, WaitPointInstance<any, any>>>(builder: (define: DefineFn) => T): T;
|
|
854
|
-
//#endregion
|
|
855
637
|
//#region src/configure/services/staticwebsite/index.d.ts
|
|
856
638
|
/**
|
|
857
639
|
* Define a static website configuration for the Tailor SDK.
|
|
@@ -867,6 +649,22 @@ declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInp
|
|
|
867
649
|
readonly customDomains?: string[] | undefined;
|
|
868
650
|
} & StaticWebsiteDefinitionBrand;
|
|
869
651
|
//#endregion
|
|
652
|
+
//#region src/configure/services/aigateway/index.d.ts
|
|
653
|
+
/**
|
|
654
|
+
* Define an AI Gateway configuration for the Tailor SDK.
|
|
655
|
+
* @param name - AI Gateway name
|
|
656
|
+
* @param config - AI Gateway configuration
|
|
657
|
+
* @returns Defined AI Gateway
|
|
658
|
+
*/
|
|
659
|
+
declare function defineAIGateway(name: string, config: Omit<AIGatewayInput, "name">): {
|
|
660
|
+
readonly name: string;
|
|
661
|
+
readonly cors?: string[] | undefined;
|
|
662
|
+
readonly authNamespace: string;
|
|
663
|
+
} & AIGatewayDefinitionBrand;
|
|
664
|
+
//#endregion
|
|
665
|
+
//#region src/parser/service/idp/types.d.ts
|
|
666
|
+
type IdPUserField = "id" | "name" | "disabled";
|
|
667
|
+
//#endregion
|
|
870
668
|
//#region src/configure/services/idp/permission.d.ts
|
|
871
669
|
type EqualityOperator = "=" | "!=";
|
|
872
670
|
type ContainsOperator = "in" | "not in";
|
|
@@ -1119,7 +917,7 @@ type HttpAdapter = Omit<HttpAdapterConfigInput, "input" | "output"> & {
|
|
|
1119
917
|
*/
|
|
1120
918
|
declare function createHttpAdapter(config: HttpAdapter): HttpAdapter;
|
|
1121
919
|
//#endregion
|
|
1122
|
-
//#region src/configure/config.d.ts
|
|
920
|
+
//#region src/configure/config/index.d.ts
|
|
1123
921
|
/**
|
|
1124
922
|
* Define a Tailor SDK application configuration with shallow exactness.
|
|
1125
923
|
* @template Config
|
|
@@ -1127,13 +925,6 @@ declare function createHttpAdapter(config: HttpAdapter): HttpAdapter;
|
|
|
1127
925
|
* @returns The same configuration object
|
|
1128
926
|
*/
|
|
1129
927
|
declare function defineConfig<const Config extends AppConfig & Record<Exclude<keyof Config, keyof AppConfig>, never>>(config: Config): Config;
|
|
1130
|
-
/**
|
|
1131
|
-
* Define generators to be used with the Tailor SDK.
|
|
1132
|
-
* @deprecated Use definePlugins() with generation hooks (onTypeLoaded, generate, etc.) instead.
|
|
1133
|
-
* @param configs - Generator configurations
|
|
1134
|
-
* @returns Generator configurations as given
|
|
1135
|
-
*/
|
|
1136
|
-
declare function defineGenerators(...configs: GeneratorConfig[]): BaseGeneratorConfig[];
|
|
1137
928
|
/**
|
|
1138
929
|
* Define plugins to be used with the Tailor SDK.
|
|
1139
930
|
* Plugins can generate additional types, resolvers, and executors
|
|
@@ -1221,5 +1012,5 @@ declare namespace t {
|
|
|
1221
1012
|
type infer<T> = TailorOutput<T>;
|
|
1222
1013
|
}
|
|
1223
1014
|
//#endregion
|
|
1224
|
-
export {
|
|
1225
|
-
//# sourceMappingURL=index-
|
|
1015
|
+
export { authAccessTokenTrigger as $, incomingWebhookTrigger as A, IdpUserCreatedArgs as B, Trigger as C, IncomingWebhookResponseConfig as D, IncomingWebhookResponse as E, AuthAccessTokenIssuedArgs as F, RecordDeletedArgs as G, IdpUserTrigger as H, AuthAccessTokenRefreshedArgs as I, ResolverExecutedTrigger as J, RecordUpdatedArgs as K, AuthAccessTokenRevokedArgs as L, ScheduleTrigger as M, scheduleTrigger as N, IncomingWebhookTrigger as O, AuthAccessTokenArgs as P, authAccessTokenRevokedTrigger as Q, AuthAccessTokenTrigger as R, createExecutor as S, IncomingWebhookRequest as T, IdpUserUpdatedArgs as U, IdpUserDeletedArgs as V, RecordCreatedArgs as W, authAccessTokenIssuedTrigger as X, TailorDBTrigger as Y, authAccessTokenRefreshedTrigger as Z, IdPPermission as _, IdpName as _t, definePlugins as a, recordDeletedTrigger as at, defineAIGateway as b, TailorField as bt, HttpAdapterGraphQLResponse as c, resolverExecutedTrigger as ct, HttpAdapterOutputFn as d, Operation as dt, idpUserCreatedTrigger as et, HttpAdapterRequest as f, WebhookOperation as ft, defineIdp as g, defineAuth as gt, defineSecretManager as h, createResolver as ht, defineConfig as i, recordCreatedTrigger as it, ScheduleArgs as j, IncomingWebhookTriggerOptions as k, HttpAdapterInput as l, FunctionOperation as lt, createHttpAdapter as m, QueryType as mt, output as n, idpUserTrigger as nt, HttpAdapter as o, recordTrigger as ot, HttpAdapterResponse as p, WorkflowOperation as pt, ResolverExecutedArgs as q, t as r, idpUserUpdatedTrigger as rt, HttpAdapterGraphQLRequest as s, recordUpdatedTrigger as st, infer as t, idpUserDeletedTrigger as tt, HttpAdapterInputFn as u, GqlOperation as ut, IdPPermissionCondition as v, IdpNameRegistry as vt, IncomingWebhookArgs as w, defineStaticWebSite as x, unsafeAllowAllIdPPermission as y, unauthenticatedTailorUser as yt, IdpUserArgs as z };
|
|
1016
|
+
//# sourceMappingURL=index-BlpzXncY.d.mts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as TailorAuthconnectionAPI } from "./authconnection-
|
|
2
|
-
import { r as TailorContextAPI } from "./context-
|
|
3
|
-
import { f as TailorDBFileAPI } from "./file-
|
|
4
|
-
import { i as TailorIconvAPI } from "./iconv-
|
|
5
|
-
import { l as TailorIdpAPI } from "./idp-
|
|
6
|
-
import { t as TailorSecretmanagerAPI } from "./secretmanager-
|
|
7
|
-
import { n as TailorWorkflowAPI } from "./workflow-
|
|
1
|
+
import { t as TailorAuthconnectionAPI } from "./authconnection-DvUQAjQS.mjs";
|
|
2
|
+
import { r as TailorContextAPI } from "./context-BuuIb8CC.mjs";
|
|
3
|
+
import { f as TailorDBFileAPI } from "./file-BB8Vs9O_.mjs";
|
|
4
|
+
import { i as TailorIconvAPI } from "./iconv-Co-TOPuH.mjs";
|
|
5
|
+
import { l as TailorIdpAPI } from "./idp-DrhVrLmV.mjs";
|
|
6
|
+
import { t as TailorSecretmanagerAPI } from "./secretmanager-B3n4KHfm.mjs";
|
|
7
|
+
import { n as TailorWorkflowAPI } from "./workflow-BbKvGLQg.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/runtime/index.d.ts
|
|
10
10
|
/** SQL command type recorded on a {@link TailordbQueryResult}. */
|
|
@@ -43,4 +43,4 @@ interface TailordbRuntime {
|
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
export { TailordbQueryResult as a, TailordbCommandType as i, TailordbClientConstructor as n, TailordbRuntime as o, TailordbClientInstance as r, TailorRuntime as t };
|
|
46
|
-
//# sourceMappingURL=index-
|
|
46
|
+
//# sourceMappingURL=index-CK7u9isy.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Plugin } from "./types-DhO_VEZd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/builtin/file-utils/index.d.ts
|
|
4
4
|
/** Unique identifier for the file utilities generator plugin. */
|
|
@@ -15,4 +15,4 @@ type FileUtilsPluginOptions = {
|
|
|
15
15
|
declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
|
|
18
|
-
//# sourceMappingURL=index-
|
|
18
|
+
//# sourceMappingURL=index-CNYe5lnW.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as Plugin } from "./types-DhO_VEZd.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin/builtin/enum-constants/index.d.ts
|
|
4
4
|
/** Unique identifier for the enum constants generator plugin. */
|
|
@@ -15,4 +15,4 @@ type EnumConstantsPluginOptions = {
|
|
|
15
15
|
declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
|
|
18
|
-
//# sourceMappingURL=index-
|
|
18
|
+
//# sourceMappingURL=index-DjUdWlzf.d.mts.map
|