@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.
- package/CHANGELOG.md +161 -0
- package/dist/application-Dtqap5jM.mjs +3 -0
- package/dist/{client-CobIRHl-.mjs → application-XuMWK4eq.mjs} +5869 -25
- package/dist/application-XuMWK4eq.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 +241 -237
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +547 -620
- package/dist/cli/lib.mjs +9 -11
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/completion/zsh-worker.zsh +4108 -0
- package/dist/configure/index.d.mts +9 -7
- package/dist/configure/index.mjs +76 -40
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
- package/dist/context-Bd266-ru.mjs.map +1 -0
- package/dist/{context-CUBwSBq4.d.mts → context-C2lEi9uw.d.mts} +7 -28
- package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-BMWcxeSE.mjs} +1 -2
- package/dist/{crashreport-BhD0y14F.mjs → crashreport-DFq-vsU0.mjs} +21 -14
- package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-DFq-vsU0.mjs.map} +1 -1
- 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-B58Dm-2P.mjs → file-BbdFGdMV.mjs} +3 -12
- package/dist/file-BbdFGdMV.mjs.map +1 -0
- package/dist/{file-BzK8z3X-.d.mts → file-Dq3NIt_F.d.mts} +3 -42
- package/dist/{file-utils-BHPxPXmn.mjs → file-utils-CYZnO1pX.mjs} +6 -7
- package/dist/file-utils-CYZnO1pX.mjs.map +1 -0
- package/dist/{globals-ByrCoDip.mjs → globals-Cf0sxIt8.mjs} +53 -5
- package/dist/globals-Cf0sxIt8.mjs.map +1 -0
- package/dist/http-adapter.generated-DFsXDdm5.d.mts +581 -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-CLxubakC.d.mts → index-BI-_j9Z3.d.mts} +49 -261
- package/dist/{index-CPRnOjjt.d.mts → index-C4JirJH8.d.mts} +2 -2
- package/dist/{index-CQZVJ5SX.d.mts → index-CZfWhr0a.d.mts} +2 -2
- package/dist/{index-DRhMpdnA.d.mts → index-Cg8VKAdN.d.mts} +8 -8
- package/dist/{index-CfRFkXIO.d.mts → index-DYRjoLXD.d.mts} +2 -2
- package/dist/index-lFpcjHPU.d.mts +201 -0
- package/dist/{index-DUupuPhZ.d.mts → index-nW7hE6oE.d.mts} +2 -2
- 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/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-FPxmnt-y.mjs} +9 -56
- package/dist/mock-FPxmnt-y.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 +4 -5
- package/dist/plugin/index.mjs +0 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/registry-DH4m7eYo.mjs +53 -0
- package/dist/registry-DH4m7eYo.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 +2 -2
- package/dist/runtime/file.mjs +2 -3
- package/dist/runtime/globals.d.mts +8 -41
- 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 +2 -2
- package/dist/runtime/workflow.mjs +1 -2
- package/dist/{runtime-C7qTBDD2.mjs → runtime-CY4JvrDj.mjs} +1069 -542
- package/dist/runtime-CY4JvrDj.mjs.map +1 -0
- package/dist/{schema-1msIhXwA.mjs → schema-Dtw9Orye.mjs} +18 -16
- package/dist/schema-Dtw9Orye.mjs.map +1 -0
- package/dist/{secret-file-CWzF8rry.mjs → secret-file-VSVGy1V0.mjs} +27 -3
- package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-VSVGy1V0.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-izIEyP3z.mjs} +7 -19
- package/dist/seed-izIEyP3z.mjs.map +1 -0
- package/dist/service-DCqIWibD.mjs +3 -0
- package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri2.mjs} +3 -4
- package/dist/{service-DMohAx8a2.mjs.map → service-DU1mVzri2.mjs.map} +1 -1
- package/dist/{service-wI3Hvrgx.mjs → service-DjyqbCaJ.mjs} +9 -10
- package/dist/service-DjyqbCaJ.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-D7UkZp99.mjs +75 -0
- package/dist/test-env-key-D7UkZp99.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-74etvaxy.mjs +4 -0
- package/dist/{plugin-C_FyVSdl.d.mts → types-BDRml5C3.d.mts} +128 -188
- package/dist/{types-CmzfQP_m.mjs → types-BQijbo4m.mjs} +10 -11
- package/dist/types-BQijbo4m.mjs.map +1 -0
- package/dist/types-BX4q6Mo6.d.mts +339 -0
- package/dist/types-BZ7QKVE8.d.mts +21 -0
- package/dist/{tailordb-BlBGmQK-.d.mts → types-CdcQh4Z2.d.mts} +92 -242
- package/dist/utils/test/index.d.mts +6 -14
- package/dist/utils/test/index.mjs +4 -14
- 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--aPbA8Uq.mjs → workflow-BOmaZwwG.mjs} +9 -5
- package/dist/workflow-BOmaZwwG.mjs.map +1 -0
- package/dist/{workflow-CMamswkK.d.mts → workflow-BVy4XWjS.d.mts} +15 -10
- package/dist/workflow.generated-ClEjBYhm.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/executor.md +53 -0
- package/docs/cli/function.md +1 -1
- package/docs/cli/setup.md +35 -33
- package/docs/cli/user.md +3 -3
- package/docs/cli/workflow.md +157 -20
- package/docs/cli/workspace.md +3 -3
- package/docs/cli-reference.md +26 -20
- package/docs/configuration.md +0 -2
- package/docs/github-actions.md +29 -16
- package/docs/migration/v2.md +475 -0
- package/docs/plugin/custom.md +2 -2
- package/docs/plugin/index.md +1 -1
- package/docs/runtime.md +4 -4
- package/docs/services/aigateway.md +97 -0
- package/docs/services/auth.md +31 -14
- package/docs/services/executor.md +3 -5
- package/docs/services/resolver.md +8 -10
- package/docs/services/tailordb.md +15 -13
- package/docs/services/workflow.md +17 -19
- package/docs/testing.md +75 -56
- package/package.json +18 -17
- package/dist/actor-J2gJ0eK5.d.mts +0 -24
- package/dist/application-76hhIhnJ.mjs +0 -5594
- 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-C68VWo4g.mjs +0 -4
- package/dist/client-CobIRHl-.mjs.map +0 -1
- package/dist/context-s0lxhu8_.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/file-B58Dm-2P.mjs.map +0 -1
- package/dist/file-utils-BHPxPXmn.mjs.map +0 -1
- package/dist/globals-ByrCoDip.mjs.map +0 -1
- package/dist/job-BpsFXPbi.mjs +0 -54
- 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-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--aPbA8Uq.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,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { n as AttributeMap, o as TailorPrincipal, r as Env, t as AttributeList } from "../types-BZ7QKVE8.mjs";
|
|
2
|
+
import { s as PluginAttachment } from "../types-CdcQh4Z2.mjs";
|
|
3
|
+
import { A as SCIMAuthorization, C as IdProvider, D as SAML, E as OIDC, F as AuthConnectionOAuth2Config, M as SCIMResource, N as TenantProvider, O as SCIMAttribute, P as AuthConnectionConfig, S as IDToken, T as OAuth2ClientInput, _ as UserAttributeListKey, a as AuthServiceInput, b as ValueOperand, c as DefinedAuth, d as FederatedIdentityProvider, f as MachineUserName, g as UserAttributeKey, h as SCIMAttributeType, i as AuthOwnConfig, j as SCIMConfig, k as SCIMAttributeMapping, l as FederatedIdentity, m as OAuth2ClientGrantType, n as AuthConnectionTokenResult, o as BeforeLoginClaims, p as MachineUserNameRegistry, r as AuthExternalConfig, s as BeforeLoginHookArgs, t as AuthConfig, u as FederatedIdentityClaims, v as UserAttributeMap, x as BuiltinIdP, y as UsernameFieldKey } from "../types-BX4q6Mo6.mjs";
|
|
4
|
+
import { _ as TailorDBNamespaceData, a as PluginConfigs, b as TypePluginOutput, c as PluginGeneratedExecutor, d as PluginGeneratedType, f as PluginNamespaceProcessContext, g as ResolverReadyContext, h as ResolverNamespaceData, i as Plugin, l as PluginGeneratedExecutorWithFile, m as PluginProcessContext, n as GeneratorResult, o as PluginExecutorContext, p as PluginOutput, r as NamespacePluginOutput, s as PluginExecutorContextBase, t as ExecutorReadyContext, u as PluginGeneratedResolver, v as TailorDBReadyContext, x as Resolver, y as TailorDBTypeForPlugin } from "../types-BDRml5C3.mjs";
|
|
5
|
+
import { a as TailorDBInstance, c as PermissionCondition, d as unsafeAllowAllGqlPermission, f as unsafeAllowAllTypePermission, i as TailorDBField, l as TailorTypeGqlPermission, n as TailorAnyDBField, o as TailorDBType, r as TailorAnyDBType, s as db, u as TailorTypePermission } from "../http-adapter.generated-DFsXDdm5.mjs";
|
|
6
|
+
import { C as AIGatewayConfig, _ as IdPExternalConfig, a as ExecutorServiceInput, b as IdPGqlOperations, c as ResolverServiceInput, d as StaticWebsiteConfig, g as IdPConfig, i as ExecutorServiceConfig, l as WorkflowServiceConfig, m as SecretsConfig, n as RetryPolicy, o as ResolverExternalConfig, s as ResolverServiceConfig, t as ConcurrencyPolicy, u as WorkflowServiceInput, x as IdPGqlOperationsInput, y as IdPEmailConfig } from "../workflow.generated-ClEjBYhm.mjs";
|
|
7
|
+
import { a as WorkflowConfig, c as WorkflowJobContext, i as Workflow, l as createWorkflowJob, n as defineWaitPoint, o as createWorkflow, r as defineWaitPoints, s as WorkflowJob, t as WaitPointInstance } from "../index-lFpcjHPU.mjs";
|
|
8
|
+
import { $ as authAccessTokenTrigger, A as incomingWebhookTrigger, B as IdpUserCreatedArgs, C as Trigger, D as IncomingWebhookResponseConfig, E as IncomingWebhookResponse, F as AuthAccessTokenIssuedArgs, G as RecordDeletedArgs, H as IdpUserTrigger, I as AuthAccessTokenRefreshedArgs, J as ResolverExecutedTrigger, K as RecordUpdatedArgs, L as AuthAccessTokenRevokedArgs, M as ScheduleTrigger, N as scheduleTrigger, O as IncomingWebhookTrigger, P as AuthAccessTokenArgs, Q as authAccessTokenRevokedTrigger, R as AuthAccessTokenTrigger, S as createExecutor, T as IncomingWebhookRequest, U as IdpUserUpdatedArgs, V as IdpUserDeletedArgs, W as RecordCreatedArgs, X as authAccessTokenIssuedTrigger, Y as TailorDBTrigger, Z as authAccessTokenRefreshedTrigger, _ as IdPPermission, _t as IdpName, a as definePlugins, at as recordDeletedTrigger, b as defineAIGateway, c as HttpAdapterGraphQLResponse, ct as resolverExecutedTrigger, d as HttpAdapterOutputFn, dt as Operation, et as idpUserCreatedTrigger, f as HttpAdapterRequest, ft as WebhookOperation, g as defineIdp, gt as defineAuth, h as defineSecretManager, ht as createResolver, i as defineConfig, it as recordCreatedTrigger, j as ScheduleArgs, k as IncomingWebhookTriggerOptions, l as HttpAdapterInput, lt as FunctionOperation, m as createHttpAdapter, mt as QueryType, n as output, nt as idpUserTrigger, o as HttpAdapter, ot as recordTrigger, p as HttpAdapterResponse, pt as WorkflowOperation, q as ResolverExecutedArgs, r as t, rt as idpUserUpdatedTrigger, s as HttpAdapterGraphQLRequest, st as recordUpdatedTrigger, t as __Infer, tt as idpUserDeletedTrigger, u as HttpAdapterInputFn, ut as GqlOperation, v as IdPPermissionCondition, vt as IdpNameRegistry, w as IncomingWebhookArgs, x as defineStaticWebSite, y as unsafeAllowAllIdPPermission, yt as TailorField, z as IdpUserArgs } from "../index-BI-_j9Z3.mjs";
|
|
9
|
+
export { type AIGatewayConfig, type AttributeList, type AttributeMap, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type DefinedAuth, type Env, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedType, type PluginNamespaceProcessContext, type PluginOutput, type PluginProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, TailorDBTrigger, type TailorDBType, type TailorDBTypeForPlugin, type TailorField, type TailorPrincipal, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type TypePluginOutput, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,33 +1,15 @@
|
|
|
1
|
+
import { t as t$1 } from "../types-BQijbo4m.mjs";
|
|
2
|
+
import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
|
|
3
|
+
import { t as db } from "../schema-Dtw9Orye.mjs";
|
|
4
|
+
import { a as registerJob, n as dispatchTriggerJob, r as dispatchTriggerWorkflow } from "../registry-DH4m7eYo.mjs";
|
|
5
|
+
import { i as withWorkflowTestInvoker } from "../test-env-key-D7UkZp99.mjs";
|
|
1
6
|
|
|
2
|
-
import { t as t$1 } from "../types-CmzfQP_m.mjs";
|
|
3
|
-
import { t as brandValue } from "../brand-DlnJ375c.mjs";
|
|
4
|
-
import { t as db } from "../schema-1msIhXwA.mjs";
|
|
5
|
-
import { r as dispatchTriggerWorkflow, s as registerWorkflow, u as WORKFLOW_TEST_ENV_KEY } from "../registry-D0uB0OrK.mjs";
|
|
6
|
-
import { t as createWorkflowJob } from "../job-BpsFXPbi.mjs";
|
|
7
|
-
|
|
8
|
-
//#region src/types/user.ts
|
|
9
|
-
/** Represents an unauthenticated user in the Tailor platform. */
|
|
10
|
-
const unauthenticatedTailorUser = {
|
|
11
|
-
id: "00000000-0000-0000-0000-000000000000",
|
|
12
|
-
type: "",
|
|
13
|
-
workspaceId: "00000000-0000-0000-0000-000000000000",
|
|
14
|
-
attributes: null,
|
|
15
|
-
attributeList: []
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
7
|
//#region src/configure/services/auth/index.ts
|
|
20
8
|
/* @__NO_SIDE_EFFECTS__ */
|
|
21
9
|
function defineAuth(name, config) {
|
|
22
10
|
return {
|
|
23
11
|
...config,
|
|
24
12
|
name,
|
|
25
|
-
invoker(machineUser) {
|
|
26
|
-
return {
|
|
27
|
-
namespace: name,
|
|
28
|
-
machineUserName: machineUser
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
13
|
getConnectionToken(connectionName) {
|
|
32
14
|
return tailor.authconnection.getConnectionToken(connectionName);
|
|
33
15
|
}
|
|
@@ -80,7 +62,7 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
80
62
|
* Create a resolver definition for the Tailor SDK.
|
|
81
63
|
*
|
|
82
64
|
* The `body` function receives a context with `input` (typed from `config.input`),
|
|
83
|
-
* `
|
|
65
|
+
* `caller`, `invoker` (reflects configured machine-user delegation), and `env`.
|
|
84
66
|
* The return value of `body` must match the `output` type.
|
|
85
67
|
*
|
|
86
68
|
* `output` accepts either a single TailorField (e.g. `t.string()`) or a
|
|
@@ -103,7 +85,7 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
103
85
|
* input: {
|
|
104
86
|
* id: t.string(),
|
|
105
87
|
* },
|
|
106
|
-
* body: async ({ input,
|
|
88
|
+
* body: async ({ input, caller }) => {
|
|
107
89
|
* const db = getDB("tailordb");
|
|
108
90
|
* const result = await db.selectFrom("User").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
109
91
|
* return { name: result?.name ?? "", email: result?.email ?? "" };
|
|
@@ -370,6 +352,55 @@ function incomingWebhookTrigger(options) {
|
|
|
370
352
|
};
|
|
371
353
|
}
|
|
372
354
|
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/configure/services/workflow/job.ts
|
|
357
|
+
/**
|
|
358
|
+
* Create a workflow job definition.
|
|
359
|
+
*
|
|
360
|
+
* All jobs must be named exports from the workflow file.
|
|
361
|
+
* Job names must be unique across the entire project.
|
|
362
|
+
*
|
|
363
|
+
* Input and output must be JsonValue-compatible (primitives, plain objects, arrays).
|
|
364
|
+
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
365
|
+
* class instances exposing methods are rejected via the property walk.
|
|
366
|
+
* @param config - Job configuration with name and body function.
|
|
367
|
+
* @param config.name - Unique job name across the project.
|
|
368
|
+
* @param config.body - Function that processes the job input.
|
|
369
|
+
* @returns A WorkflowJob that can be triggered from other jobs.
|
|
370
|
+
* @example
|
|
371
|
+
* // Simple job with async body:
|
|
372
|
+
* export const fetchData = createWorkflowJob({
|
|
373
|
+
* name: "fetch-data",
|
|
374
|
+
* body: async (input: { id: string }) => {
|
|
375
|
+
* const db = getDB("tailordb");
|
|
376
|
+
* return await db.selectFrom("Table").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
377
|
+
* },
|
|
378
|
+
* });
|
|
379
|
+
* @example
|
|
380
|
+
* // Orchestrator job that fans out to other jobs.
|
|
381
|
+
* export const orchestrate = createWorkflowJob({
|
|
382
|
+
* name: "orchestrate",
|
|
383
|
+
* body: (input: { orderId: string }) => {
|
|
384
|
+
* const inventory = checkInventory.trigger({ orderId: input.orderId });
|
|
385
|
+
* const payment = processPayment.trigger({ orderId: input.orderId });
|
|
386
|
+
* return { inventory, payment };
|
|
387
|
+
* },
|
|
388
|
+
* });
|
|
389
|
+
*/
|
|
390
|
+
function createWorkflowJob(config) {
|
|
391
|
+
const userBody = config.body;
|
|
392
|
+
const body = process.env.TAILOR_PLATFORM_BUNDLE ? userBody : (input, context) => withWorkflowTestInvoker(context.invoker, () => userBody(input, context));
|
|
393
|
+
if (!process.env.TAILOR_PLATFORM_BUNDLE) registerJob(config.name, body);
|
|
394
|
+
const trigger = process.env.TAILOR_PLATFORM_BUNDLE ? () => {
|
|
395
|
+
throw new Error("This workflow job's .trigger() is rewritten at build time and is unavailable in the bundle");
|
|
396
|
+
} : (args) => dispatchTriggerJob(config.name, args);
|
|
397
|
+
return brandValue({
|
|
398
|
+
name: config.name,
|
|
399
|
+
trigger,
|
|
400
|
+
body
|
|
401
|
+
}, "workflow-job");
|
|
402
|
+
}
|
|
403
|
+
|
|
373
404
|
//#endregion
|
|
374
405
|
//#region src/configure/services/workflow/wait-point.ts
|
|
375
406
|
function getPlatformWorkflow() {
|
|
@@ -468,8 +499,8 @@ function defineWaitPoints(builder) {
|
|
|
468
499
|
* export const fetchData = createWorkflowJob({ name: "fetch-data", body: async (input: { id: string }) => ({ id: input.id }) });
|
|
469
500
|
* export const processData = createWorkflowJob({
|
|
470
501
|
* name: "process-data",
|
|
471
|
-
* body:
|
|
472
|
-
* const data =
|
|
502
|
+
* body: (input: { id: string }) => {
|
|
503
|
+
* const data = fetchData.trigger({ id: input.id });
|
|
473
504
|
* return { data };
|
|
474
505
|
* },
|
|
475
506
|
* });
|
|
@@ -481,7 +512,6 @@ function defineWaitPoints(builder) {
|
|
|
481
512
|
* });
|
|
482
513
|
*/
|
|
483
514
|
function createWorkflow(config) {
|
|
484
|
-
if (!process.env.TAILOR_PLATFORM_BUNDLE) registerWorkflow(config.name, config.mainJob.name);
|
|
485
515
|
return brandValue({
|
|
486
516
|
...config,
|
|
487
517
|
trigger: process.env.TAILOR_PLATFORM_BUNDLE ? async () => {
|
|
@@ -509,6 +539,22 @@ function defineStaticWebSite(name, config) {
|
|
|
509
539
|
};
|
|
510
540
|
}
|
|
511
541
|
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region src/configure/services/aigateway/index.ts
|
|
544
|
+
/**
|
|
545
|
+
* Define an AI Gateway configuration for the Tailor SDK.
|
|
546
|
+
* @param name - AI Gateway name
|
|
547
|
+
* @param config - AI Gateway configuration
|
|
548
|
+
* @returns Defined AI Gateway
|
|
549
|
+
*/
|
|
550
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
551
|
+
function defineAIGateway(name, config) {
|
|
552
|
+
return {
|
|
553
|
+
...config,
|
|
554
|
+
name
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
|
|
512
558
|
//#endregion
|
|
513
559
|
//#region src/configure/services/idp/permission.ts
|
|
514
560
|
/**
|
|
@@ -637,7 +683,7 @@ function createHttpAdapter(config) {
|
|
|
637
683
|
}
|
|
638
684
|
|
|
639
685
|
//#endregion
|
|
640
|
-
//#region src/configure/config.ts
|
|
686
|
+
//#region src/configure/config/index.ts
|
|
641
687
|
/**
|
|
642
688
|
* Define a Tailor SDK application configuration with shallow exactness.
|
|
643
689
|
* @template Config
|
|
@@ -649,16 +695,6 @@ function defineConfig(config) {
|
|
|
649
695
|
return config;
|
|
650
696
|
}
|
|
651
697
|
/**
|
|
652
|
-
* Define generators to be used with the Tailor SDK.
|
|
653
|
-
* @deprecated Use definePlugins() with generation hooks (onTypeLoaded, generate, etc.) instead.
|
|
654
|
-
* @param configs - Generator configurations
|
|
655
|
-
* @returns Generator configurations as given
|
|
656
|
-
*/
|
|
657
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
658
|
-
function defineGenerators(...configs) {
|
|
659
|
-
return configs;
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
698
|
* Define plugins to be used with the Tailor SDK.
|
|
663
699
|
* Plugins can generate additional types, resolvers, and executors
|
|
664
700
|
* based on existing TailorDB types.
|
|
@@ -676,5 +712,5 @@ function definePlugins(...configs) {
|
|
|
676
712
|
const t = t$1;
|
|
677
713
|
|
|
678
714
|
//#endregion
|
|
679
|
-
export {
|
|
715
|
+
export { authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
|
680
716
|
//# sourceMappingURL=index.mjs.map
|