@tailor-platform/sdk 2.0.0-next.8 → 2.0.0
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 +631 -0
- package/dist/{application-GzW98_Xr.mjs → application-CM6hKnSK.mjs} +489 -118
- package/dist/application-CM6hKnSK.mjs.map +1 -0
- package/dist/application-CXNaUNhv.mjs +3 -0
- package/dist/cli/commands/deploy/aigateway.d.mts +2 -2
- package/dist/cli/commands/deploy/application.d.mts +2 -2
- package/dist/cli/commands/deploy/auth.d.mts +2 -2
- package/dist/cli/commands/deploy/deploy.d.mts +1 -0
- package/dist/cli/commands/deploy/executor.d.mts +2 -2
- package/dist/cli/commands/deploy/function-registry.d.mts +1 -2
- package/dist/cli/commands/deploy/idp.d.mts +2 -2
- package/dist/cli/commands/deploy/label.d.mts +2 -0
- package/dist/cli/commands/deploy/resolver.d.mts +2 -2
- package/dist/cli/commands/deploy/secret-manager.d.mts +1 -1
- package/dist/cli/commands/deploy/staticwebsite.d.mts +2 -2
- package/dist/cli/commands/deploy/tailordb/index.d.mts +4 -2
- package/dist/cli/commands/deploy/types.d.mts +2 -1
- package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +1 -2
- package/dist/cli/commands/deploy/workflow.d.mts +2 -2
- package/dist/cli/commands/executor/get.d.mts +1 -10
- package/dist/cli/commands/executor/jobs.d.mts +1 -38
- package/dist/cli/commands/executor/trigger.d.mts +1 -11
- package/dist/cli/commands/generate/seed/bundler.d.mts +2 -1
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -2
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +11 -1
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +5 -0
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +1 -1
- package/dist/cli/commands/workflow/executions.d.mts +1 -13
- package/dist/cli/commands/workflow/get.d.mts +1 -10
- package/dist/cli/commands/workflow/start.d.mts +2 -14
- package/dist/cli/index.mjs +12 -6552
- package/dist/cli/lib.d.mts +14 -15
- package/dist/cli/lib.mjs +203 -46
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/{index.d.mts → main.d.mts} +1 -1
- package/dist/cli/main.mjs +6777 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/services/http-adapter/bundler.d.mts +1 -0
- package/dist/cli/services/workflow/bundler.d.mts +2 -1
- package/dist/cli/shared/client.d.mts +28 -3
- package/dist/cli/shared/config-loader.d.mts +11 -4
- package/dist/cli/shared/error-json.d.mts +23 -0
- package/dist/cli/shared/script-executor.d.mts +6 -3
- package/dist/cli/shared/seed-chunker.d.mts +2 -7
- package/dist/cli/shared/seed-context.d.mts +49 -0
- package/dist/cli/shared/tailordb-namespaces.d.mts +7 -4
- package/dist/cli/shared/tsconfig-paths-plugin.d.mts +2 -0
- package/dist/cli/shared/type-generator.d.mts +4 -3
- package/dist/completion/zsh-worker.zsh +85 -22
- package/dist/configure/config/types.d.mts +29 -4
- package/dist/configure/index.d.mts +4 -3
- package/dist/configure/index.mjs +183 -6
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/index.d.mts +2 -2
- package/dist/configure/services/executor/trigger/event.d.mts +245 -2
- package/dist/configure/services/executor/trigger/index.d.mts +3 -3
- package/dist/configure/services/idp/index.d.mts +2 -2
- package/dist/configure/services/idp/permission.d.mts +1 -16
- package/dist/configure/services/idp/types.d.mts +5 -1
- package/dist/configure/services/index.d.mts +4 -3
- package/dist/configure/services/resolver/index.d.mts +2 -1
- package/dist/configure/services/resolver/permission.d.mts +64 -0
- package/dist/configure/services/resolver/resolver.d.mts +14 -2
- package/dist/configure/services/tailordb/index.d.mts +0 -1
- package/dist/configure/services/tailordb/permission.d.mts +1 -16
- package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
- package/dist/configure/services/workflow/execution-policy.types.d.mts +1 -1
- package/dist/configure/services/workflow/job.d.mts +11 -2
- package/dist/configure/services/workflow/workflow.d.mts +10 -0
- package/dist/configure/types/permission-operand.types.d.mts +20 -0
- package/dist/{crashreport-CxHne11E.mjs → crashreport-B5LqCTfF.mjs} +2 -2
- package/dist/{crashreport-CxHne11E.mjs.map → crashreport-B5LqCTfF.mjs.map} +1 -1
- package/dist/{crashreport-0ioNRZ4K.mjs → crashreport-eI7ty7ok.mjs} +1 -1
- package/dist/{errors-DfnF4ibq.mjs → errors-D7583Zz7.mjs} +2 -44
- package/dist/errors-D7583Zz7.mjs.map +1 -0
- package/dist/{globals-CBZ0egXT.mjs → globals-TfAVItuK.mjs} +21 -5
- package/dist/globals-TfAVItuK.mjs.map +1 -0
- package/dist/logger-BtX0suGY.mjs +48 -0
- package/dist/logger-BtX0suGY.mjs.map +1 -0
- package/dist/{logger-BwS4ppwO.mjs → logger-CXQq9YIp.mjs} +110 -13
- package/dist/logger-CXQq9YIp.mjs.map +1 -0
- package/dist/node-builtins-CmaL2Cbq.mjs +36 -0
- package/dist/node-builtins-CmaL2Cbq.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.mjs +115 -2
- package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -0
- package/dist/plugin/builtin/file-utils/index.mjs +149 -2
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +274 -2
- package/dist/plugin/builtin/kysely-type/index.mjs.map +1 -0
- package/dist/plugin/builtin/seed/index.d.mts +3 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +21 -0
- package/dist/plugin/builtin/seed/types.d.mts +2 -0
- package/dist/{register-ts-hook-DvEs6YsL.mjs → register-ts-hook-LYV7zH-e.mjs} +2953 -996
- package/dist/register-ts-hook-LYV7zH-e.mjs.map +1 -0
- package/dist/{registry-i7EdJ-D5.mjs → registry-BIGVUrMB.mjs} +3 -3
- package/dist/registry-BIGVUrMB.mjs.map +1 -0
- package/dist/runtime/globals.d.mts +7 -0
- package/dist/runtime/index.d.mts +3 -1
- package/dist/runtime/index.mjs +3 -2
- package/dist/runtime/logger.d.mts +98 -0
- package/dist/runtime/logger.mjs +3 -0
- package/dist/runtime/workflow.d.mts +15 -7
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/seed-B-yckgQY.mjs +483 -0
- package/dist/seed-B-yckgQY.mjs.map +1 -0
- package/dist/{service-DaeJlBoH.mjs → service-B5WynBHQ.mjs} +3 -3
- package/dist/{service-DaeJlBoH.mjs.map → service-B5WynBHQ.mjs.map} +1 -1
- package/dist/service-M7OYziQP.mjs +3 -0
- package/dist/{service-Dmxa2I4i.mjs → service-k1xy_A5G.mjs} +30 -4
- package/dist/service-k1xy_A5G.mjs.map +1 -0
- package/dist/{service_pb-BoLM0X4K.mjs → service_pb-D5--My_M.mjs} +5 -5
- package/dist/service_pb-D5--My_M.mjs.map +1 -0
- package/dist/{service_pb-r1T7kpJc.mjs → service_pb-i8CmnQP4.mjs} +1 -1
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +106 -1
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +6 -1
- package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +24 -1
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +49 -1
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +89 -6
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +26 -1
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +101 -1
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +22 -1
- package/dist/types/auth.generated.d.mts +14 -2
- package/dist/types/executor.generated.d.mts +45 -3
- package/dist/types/http-adapter.generated.d.mts +5 -0
- package/dist/types/idp.generated.d.mts +31 -1
- package/dist/types/resolver.generated.d.mts +30 -2
- package/dist/types/tailordb.generated.d.mts +15 -3
- package/dist/utils/test/index.d.mts +1 -2
- package/dist/utils/test/index.mjs +1 -169
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.d.mts +6 -4
- package/dist/vitest/index.mjs +112 -62
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock.d.mts +2 -1
- package/dist/vitest/mocks/logger.d.mts +45 -0
- package/dist/vitest/mocks/workflow.d.mts +8 -8
- package/dist/vitest/setup.mjs +1 -1
- package/dist/{workflow-CsBvRE3g.mjs → workflow-Bamae_Yc.mjs} +5 -5
- package/dist/workflow-Bamae_Yc.mjs.map +1 -0
- package/dist/{workspace_resource_pb-Db3fv68L.mjs → workspace_resource_pb-DXnO2AT-.mjs} +13 -8
- package/dist/workspace_resource_pb-DXnO2AT-.mjs.map +1 -0
- package/docs/cli/application.md +5 -1
- package/docs/cli/tailordb.md +47 -13
- package/docs/cli-reference.md +38 -30
- package/docs/configuration.md +54 -2
- package/docs/github-actions.md +2 -2
- package/docs/migration/v2.md +408 -5
- package/docs/runtime.md +5 -1
- package/docs/services/executor.md +83 -3
- package/docs/services/idp.md +8 -6
- package/docs/services/resolver.md +60 -4
- package/docs/services/tailordb-migration.md +31 -7
- package/docs/services/tailordb.md +7 -5
- package/docs/services/workflow.md +33 -3
- package/docs/testing.md +34 -7
- package/package.json +31 -24
- package/dist/application-GzW98_Xr.mjs.map +0 -1
- package/dist/application-OM0taSPn.mjs +0 -3
- package/dist/cli/index.mjs.map +0 -1
- package/dist/enum-constants-j9QBF0cB.mjs +0 -116
- package/dist/enum-constants-j9QBF0cB.mjs.map +0 -1
- package/dist/errors-DfnF4ibq.mjs.map +0 -1
- package/dist/file-utils-yEiIS4nJ.mjs +0 -150
- package/dist/file-utils-yEiIS4nJ.mjs.map +0 -1
- package/dist/globals-CBZ0egXT.mjs.map +0 -1
- package/dist/kysely-type-DqIRgDYR.mjs +0 -275
- package/dist/kysely-type-DqIRgDYR.mjs.map +0 -1
- package/dist/logger-BwS4ppwO.mjs.map +0 -1
- package/dist/register-ts-hook-DvEs6YsL.mjs.map +0 -1
- package/dist/registry-i7EdJ-D5.mjs.map +0 -1
- package/dist/seed-CRSQJI_z.mjs +0 -1170
- package/dist/seed-CRSQJI_z.mjs.map +0 -1
- package/dist/service-BJAQ70e5.mjs +0 -3
- package/dist/service-Dmxa2I4i.mjs.map +0 -1
- package/dist/service_pb-BoLM0X4K.mjs.map +0 -1
- package/dist/utils/test/mock.d.mts +0 -86
- package/dist/workflow-CsBvRE3g.mjs.map +0 -1
- package/dist/workspace_resource_pb-Db3fv68L.mjs.map +0 -1
|
@@ -9,6 +9,22 @@ import { LogLevelEnum } from "../../types/app-config.generated.mjs";
|
|
|
9
9
|
//#region src/configure/config/types.d.ts
|
|
10
10
|
type LogLevel = LogLevelEnum;
|
|
11
11
|
type LogLevelInput = LogLevel | (string & {});
|
|
12
|
+
/** Value an `env` entry resolves to at runtime. */
|
|
13
|
+
type EnvValue = string | number | boolean;
|
|
14
|
+
/**
|
|
15
|
+
* An `env` value that credential detection flags, allowed through together with
|
|
16
|
+
* the reason it is safe to deploy as plaintext.
|
|
17
|
+
*
|
|
18
|
+
* Booleans are excluded: `true` and `false` match no credential format and are
|
|
19
|
+
* far too short for the randomness heuristic, so they are never flagged.
|
|
20
|
+
*/
|
|
21
|
+
type AllowedSecretEnvValue = {
|
|
22
|
+
value: Exclude<EnvValue, boolean>;
|
|
23
|
+
/** Why this value is safe to deploy as plaintext even though it looks like a credential. */
|
|
24
|
+
allowSecretReason: string;
|
|
25
|
+
};
|
|
26
|
+
/** An entry of `defineConfig({ env })`. */
|
|
27
|
+
type EnvEntry = EnvValue | AllowedSecretEnvValue;
|
|
12
28
|
/** `files`/`ignores` patterns are resolved relative to this config's own directory, not the invocation directory. */
|
|
13
29
|
type ExecutorServiceConfig = {
|
|
14
30
|
files: string[];
|
|
@@ -53,7 +69,7 @@ type WorkflowServiceInput = WorkflowServiceConfig;
|
|
|
53
69
|
* - `aiGateways`: Array of AI Gateway configs, e.g. `[gateway]`
|
|
54
70
|
* - `db`, `resolver`, `executor`, `workflow`, `httpAdapter`: Service configs with file globs (resolved relative to this config file's own directory, not the invocation directory)
|
|
55
71
|
*/
|
|
56
|
-
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], AIGateways extends AIGatewayConfig[] = AIGatewayConfig[], Env extends Record<string,
|
|
72
|
+
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], AIGateways extends AIGatewayConfig[] = AIGatewayConfig[], Env extends Record<string, EnvEntry> = Record<string, EnvEntry>> {
|
|
57
73
|
/** Application name (required). */
|
|
58
74
|
name: string;
|
|
59
75
|
/**
|
|
@@ -66,7 +82,14 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
|
|
|
66
82
|
* data is preserved.
|
|
67
83
|
*/
|
|
68
84
|
id?: string;
|
|
69
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Environment variables accessible via `context.env` in resolvers and via the second argument `{ env }` in workflow job bodies.
|
|
87
|
+
*
|
|
88
|
+
* A value that looks like a credential is rejected, since `env` is deployed
|
|
89
|
+
* as plaintext. When the detection is wrong about a value, wrap it as
|
|
90
|
+
* `{ value, allowSecretReason }` to allow it and record why it is safe. Real
|
|
91
|
+
* credentials belong in `defineSecretManager()`.
|
|
92
|
+
*/
|
|
70
93
|
env?: Env;
|
|
71
94
|
/** Allowed CORS origins. Must be an array of strings, e.g. `["https://example.com"]`. */
|
|
72
95
|
cors?: string[];
|
|
@@ -100,10 +123,12 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
|
|
|
100
123
|
*/
|
|
101
124
|
inlineSourcemap?: boolean;
|
|
102
125
|
/**
|
|
103
|
-
* Controls which `console.*`
|
|
126
|
+
* Controls which `console.*` and `logger.*` (from `@tailor-platform/sdk/runtime`)
|
|
127
|
+
* calls remain in bundled functions. `logger.setAttributes` has no severity and
|
|
128
|
+
* is never dropped.
|
|
104
129
|
* @default "DEBUG"
|
|
105
130
|
*/
|
|
106
131
|
logLevel?: LogLevelInput;
|
|
107
132
|
}
|
|
108
133
|
//#endregion
|
|
109
|
-
export { AppConfig, ExecutorServiceConfig, ExecutorServiceInput, HttpAdapterServiceInput, LogLevel, LogLevelInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput };
|
|
134
|
+
export { AllowedSecretEnvValue, AppConfig, EnvEntry, EnvValue, ExecutorServiceConfig, ExecutorServiceInput, HttpAdapterServiceInput, LogLevel, LogLevelInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput };
|
|
@@ -11,6 +11,7 @@ import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, P
|
|
|
11
11
|
import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./services/tailordb/permission.mjs";
|
|
12
12
|
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./services/tailordb/schema.mjs";
|
|
13
13
|
import { AIGatewayConfig } from "./services/aigateway/types.mjs";
|
|
14
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./services/idp/permission.mjs";
|
|
14
15
|
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput } from "../types/idp.generated.mjs";
|
|
15
16
|
import { IdPConfig, IdPExternalConfig } from "./services/idp/types.mjs";
|
|
16
17
|
import { SecretsConfig } from "./services/secrets/types.mjs";
|
|
@@ -25,12 +26,13 @@ import { IdpName, IdpNameRegistry } from "./types/idp-name.mjs";
|
|
|
25
26
|
import { ConnectionName, ConnectionNameRegistry } from "./types/connection-name.mjs";
|
|
26
27
|
import { AIGatewayName, AIGatewayNameRegistry } from "./types/aigateway-name.mjs";
|
|
27
28
|
import { defineAuth } from "./services/auth/index.mjs";
|
|
29
|
+
import { ResolverPermission, ResolverPermissionCondition, ResolverPermissionPolicy } from "./services/resolver/permission.mjs";
|
|
28
30
|
import { createResolver } from "./services/resolver/resolver.mjs";
|
|
29
31
|
import { QueryType } from "./services/resolver/types.mjs";
|
|
30
32
|
import { WorkflowJob, WorkflowJobContext, createWorkflowJob } from "./services/workflow/job.mjs";
|
|
31
33
|
import { Workflow, WorkflowConfig, createWorkflow } from "./services/workflow/workflow.mjs";
|
|
32
34
|
import { FunctionOperation, GqlOperation, Operation, WebhookOperation, WorkflowOperation } from "./services/executor/operation.mjs";
|
|
33
|
-
import { AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, ResolverExecutedArgs, ResolverExecutedTrigger, TailorDBTrigger, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger } from "./services/executor/trigger/event.mjs";
|
|
35
|
+
import { AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, ResolverExecutedArgs, ResolverExecutedTrigger, TailorDBTrigger, WorkflowExecutionArgs, WorkflowExecutionCompletedArgs, WorkflowExecutionResumedArgs, WorkflowExecutionRetriedArgs, WorkflowExecutionStartedArgs, WorkflowExecutionTrigger, WorkflowExecutionWaitResolvedArgs, WorkflowExecutionWaitStartedArgs, WorkflowJobExecutionArgs, WorkflowJobExecutionCompletedArgs, WorkflowJobExecutionStartedArgs, WorkflowJobExecutionTrigger, WorkflowJobExecutionWaitResolvedArgs, WorkflowJobExecutionWaitStartedArgs, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger } from "./services/executor/trigger/event.mjs";
|
|
34
36
|
import { ScheduleArgs, ScheduleTrigger, scheduleTrigger } from "./services/executor/trigger/schedule.mjs";
|
|
35
37
|
import { IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, incomingWebhookTrigger } from "./services/executor/trigger/webhook.mjs";
|
|
36
38
|
import { Trigger } from "./services/executor/trigger/index.mjs";
|
|
@@ -39,7 +41,6 @@ import { defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy } from "
|
|
|
39
41
|
import { WaitPointInstance, createWaitPoint, createWaitPoints } from "./services/workflow/wait-point.mjs";
|
|
40
42
|
import { defineStaticWebSite } from "./services/staticwebsite/index.mjs";
|
|
41
43
|
import { defineAIGateway } from "./services/aigateway/index.mjs";
|
|
42
|
-
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./services/idp/permission.mjs";
|
|
43
44
|
import { defineIdp } from "./services/idp/index.mjs";
|
|
44
45
|
import { defineSecretManager } from "./services/secrets/index.mjs";
|
|
45
46
|
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./services/http-adapter/http-adapter.mjs";
|
|
@@ -131,4 +132,4 @@ declare namespace t {
|
|
|
131
132
|
type infer<T> = TailorOutput<T>;
|
|
132
133
|
}
|
|
133
134
|
//#endregion
|
|
134
|
-
export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, 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 ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, 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 ResolvedExecutionPolicyInstance, 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 UserAttributes, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
|
135
|
+
export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, 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 ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, 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 ResolvedExecutionPolicyInstance, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverPermission, type ResolverPermissionCondition, type ResolverPermissionPolicy, 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 UserAttributes, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowExecutionArgs, WorkflowExecutionCompletedArgs, WorkflowExecutionResumedArgs, WorkflowExecutionRetriedArgs, WorkflowExecutionStartedArgs, WorkflowExecutionTrigger, WorkflowExecutionWaitResolvedArgs, WorkflowExecutionWaitStartedArgs, WorkflowJob, WorkflowJobContext, WorkflowJobExecutionArgs, WorkflowJobExecutionCompletedArgs, WorkflowJobExecutionStartedArgs, WorkflowJobExecutionTrigger, WorkflowJobExecutionWaitResolvedArgs, WorkflowJobExecutionWaitStartedArgs, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger };
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as parseInternal, n as mapAllowedValues, t as db } from "../schema--xYWRGfe.mjs";
|
|
2
2
|
import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
|
|
3
|
-
import { a as registerJob, n as dispatchStartJob, r as dispatchStartWorkflow } from "../registry-
|
|
3
|
+
import { a as registerJob, n as dispatchStartJob, r as dispatchStartWorkflow } from "../registry-BIGVUrMB.mjs";
|
|
4
4
|
import { i as withWorkflowTestInvoker } from "../test-env-key-D7UkZp99.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/configure/types/type.ts
|
|
@@ -262,6 +262,14 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
262
262
|
* If not specified, this is automatically set to true when an executor uses this resolver
|
|
263
263
|
* with `resolverExecutedTrigger`. If explicitly set to false while an executor uses this
|
|
264
264
|
* resolver, an error will be thrown during apply.
|
|
265
|
+
*
|
|
266
|
+
* `permission` declares the resolver's access requirement, checked against `context.user` (the
|
|
267
|
+
* original caller, unaffected by `authInvoker`) before `body` runs. Omitted (default):
|
|
268
|
+
* unchanged, anonymous callers can reach the resolver. `"allowAnonymous"`: explicitly documents
|
|
269
|
+
* that anonymous callers are allowed. An array of `{ conditions, permit }` policies (in the same
|
|
270
|
+
* style as TailorDB's `.permission()`) rejects non-matching callers: at least one `permit: true`
|
|
271
|
+
* policy is required (denied unless it matches), and a matching `permit: false` policy always
|
|
272
|
+
* overrides that grant.
|
|
265
273
|
* @template Input
|
|
266
274
|
* @template Output
|
|
267
275
|
* @param config - Resolver configuration
|
|
@@ -272,6 +280,7 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
272
280
|
* export default createResolver({
|
|
273
281
|
* name: "getUser",
|
|
274
282
|
* operation: "query",
|
|
283
|
+
* permission: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
275
284
|
* input: {
|
|
276
285
|
* id: t.string(),
|
|
277
286
|
* },
|
|
@@ -506,6 +515,173 @@ function authAccessTokenTrigger(options) {
|
|
|
506
515
|
__args: {}
|
|
507
516
|
};
|
|
508
517
|
}
|
|
518
|
+
const workflowExecutionEventMap = {
|
|
519
|
+
started: "workflow.workflow_execution.started",
|
|
520
|
+
completed: "workflow.workflow_execution.completed",
|
|
521
|
+
retried: "workflow.workflow_execution.retried",
|
|
522
|
+
resumed: "workflow.workflow_execution.resumed",
|
|
523
|
+
wait_started: "workflow.workflow_execution.wait_started",
|
|
524
|
+
wait_resolved: "workflow.workflow_execution.wait_resolved"
|
|
525
|
+
};
|
|
526
|
+
function workflowExecutionTriggerConfig(events, options) {
|
|
527
|
+
return {
|
|
528
|
+
kind: "workflowExecution",
|
|
529
|
+
events,
|
|
530
|
+
workflowName: options.workflow.name,
|
|
531
|
+
condition: options.condition,
|
|
532
|
+
__args: {}
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Create a trigger that fires when a workflow execution starts running.
|
|
537
|
+
* @param options - Trigger options
|
|
538
|
+
* @param options.workflow - Workflow to subscribe to
|
|
539
|
+
* @param options.condition - Condition function to filter events
|
|
540
|
+
* @returns Workflow execution started trigger
|
|
541
|
+
*/
|
|
542
|
+
function workflowExecutionStartedTrigger(options) {
|
|
543
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.started"], options);
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Create a trigger that fires when a workflow execution succeeds or fails.
|
|
547
|
+
* @param options - Trigger options
|
|
548
|
+
* @param options.workflow - Workflow to subscribe to
|
|
549
|
+
* @param options.condition - Condition function to filter events
|
|
550
|
+
* @returns Workflow execution completed trigger
|
|
551
|
+
*/
|
|
552
|
+
function workflowExecutionCompletedTrigger(options) {
|
|
553
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.completed"], options);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Create a trigger that fires when a workflow execution is retried by its retry policy.
|
|
557
|
+
* @param options - Trigger options
|
|
558
|
+
* @param options.workflow - Workflow to subscribe to
|
|
559
|
+
* @param options.condition - Condition function to filter events
|
|
560
|
+
* @returns Workflow execution retried trigger
|
|
561
|
+
*/
|
|
562
|
+
function workflowExecutionRetriedTrigger(options) {
|
|
563
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.retried"], options);
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Create a trigger that fires when a failed workflow execution is manually resumed.
|
|
567
|
+
* @param options - Trigger options
|
|
568
|
+
* @param options.workflow - Workflow to subscribe to
|
|
569
|
+
* @param options.condition - Condition function to filter events
|
|
570
|
+
* @returns Workflow execution resumed trigger
|
|
571
|
+
*/
|
|
572
|
+
function workflowExecutionResumedTrigger(options) {
|
|
573
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.resumed"], options);
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Create a trigger that fires when a workflow execution starts waiting on a wait point.
|
|
577
|
+
* @param options - Trigger options
|
|
578
|
+
* @param options.workflow - Workflow to subscribe to
|
|
579
|
+
* @param options.condition - Condition function to filter events
|
|
580
|
+
* @returns Workflow execution wait started trigger
|
|
581
|
+
*/
|
|
582
|
+
function workflowExecutionWaitStartedTrigger(options) {
|
|
583
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.wait_started"], options);
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Create a trigger that fires when a waiting workflow execution is released.
|
|
587
|
+
* @param options - Trigger options
|
|
588
|
+
* @param options.workflow - Workflow to subscribe to
|
|
589
|
+
* @param options.condition - Condition function to filter events
|
|
590
|
+
* @returns Workflow execution wait resolved trigger
|
|
591
|
+
*/
|
|
592
|
+
function workflowExecutionWaitResolvedTrigger(options) {
|
|
593
|
+
return workflowExecutionTriggerConfig(["workflow.workflow_execution.wait_resolved"], options);
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Create a trigger that fires on multiple workflow execution event types.
|
|
597
|
+
* @template K
|
|
598
|
+
* @param options - Trigger options with events array
|
|
599
|
+
* @param options.events - Workflow execution event kinds to subscribe to
|
|
600
|
+
* @param options.workflow - Workflow to subscribe to
|
|
601
|
+
* @param options.condition - Condition function to filter events
|
|
602
|
+
* @returns Workflow execution trigger
|
|
603
|
+
*/
|
|
604
|
+
function workflowExecutionTrigger(options) {
|
|
605
|
+
const { events, workflow, condition } = options;
|
|
606
|
+
return workflowExecutionTriggerConfig(events.map((k) => workflowExecutionEventMap[k]), {
|
|
607
|
+
workflow,
|
|
608
|
+
condition
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
const workflowJobExecutionEventMap = {
|
|
612
|
+
started: "workflow.workflow_execution.job_execution.started",
|
|
613
|
+
completed: "workflow.workflow_execution.job_execution.completed",
|
|
614
|
+
wait_started: "workflow.workflow_execution.job_execution.wait_started",
|
|
615
|
+
wait_resolved: "workflow.workflow_execution.job_execution.wait_resolved"
|
|
616
|
+
};
|
|
617
|
+
function workflowJobExecutionTriggerConfig(events, options) {
|
|
618
|
+
return {
|
|
619
|
+
kind: "workflowJobExecution",
|
|
620
|
+
events,
|
|
621
|
+
workflowName: options.workflow.name,
|
|
622
|
+
condition: options.condition,
|
|
623
|
+
__args: {}
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Create a trigger that fires when a job inside a workflow starts running.
|
|
628
|
+
* @param options - Trigger options
|
|
629
|
+
* @param options.workflow - Workflow whose job executions to subscribe to
|
|
630
|
+
* @param options.condition - Condition function to filter events
|
|
631
|
+
* @returns Workflow job execution started trigger
|
|
632
|
+
*/
|
|
633
|
+
function workflowJobExecutionStartedTrigger(options) {
|
|
634
|
+
return workflowJobExecutionTriggerConfig(["workflow.workflow_execution.job_execution.started"], options);
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Create a trigger that fires when a job inside a workflow succeeds or fails.
|
|
638
|
+
*
|
|
639
|
+
* A job released from a wait point reports `wait_resolved` instead of
|
|
640
|
+
* `completed`; subscribe to both to observe every way a job can end.
|
|
641
|
+
* @param options - Trigger options
|
|
642
|
+
* @param options.workflow - Workflow whose job executions to subscribe to
|
|
643
|
+
* @param options.condition - Condition function to filter events
|
|
644
|
+
* @returns Workflow job execution completed trigger
|
|
645
|
+
*/
|
|
646
|
+
function workflowJobExecutionCompletedTrigger(options) {
|
|
647
|
+
return workflowJobExecutionTriggerConfig(["workflow.workflow_execution.job_execution.completed"], options);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Create a trigger that fires when a job inside a workflow starts waiting on a wait point.
|
|
651
|
+
* @param options - Trigger options
|
|
652
|
+
* @param options.workflow - Workflow whose job executions to subscribe to
|
|
653
|
+
* @param options.condition - Condition function to filter events
|
|
654
|
+
* @returns Workflow job execution wait started trigger
|
|
655
|
+
*/
|
|
656
|
+
function workflowJobExecutionWaitStartedTrigger(options) {
|
|
657
|
+
return workflowJobExecutionTriggerConfig(["workflow.workflow_execution.job_execution.wait_started"], options);
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Create a trigger that fires when a waiting job inside a workflow is released.
|
|
661
|
+
* @param options - Trigger options
|
|
662
|
+
* @param options.workflow - Workflow whose job executions to subscribe to
|
|
663
|
+
* @param options.condition - Condition function to filter events
|
|
664
|
+
* @returns Workflow job execution wait resolved trigger
|
|
665
|
+
*/
|
|
666
|
+
function workflowJobExecutionWaitResolvedTrigger(options) {
|
|
667
|
+
return workflowJobExecutionTriggerConfig(["workflow.workflow_execution.job_execution.wait_resolved"], options);
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Create a trigger that fires on multiple workflow job execution event types.
|
|
671
|
+
* @template K
|
|
672
|
+
* @param options - Trigger options with events array
|
|
673
|
+
* @param options.events - Workflow job execution event kinds to subscribe to
|
|
674
|
+
* @param options.workflow - Workflow whose job executions to subscribe to
|
|
675
|
+
* @param options.condition - Condition function to filter events
|
|
676
|
+
* @returns Workflow job execution trigger
|
|
677
|
+
*/
|
|
678
|
+
function workflowJobExecutionTrigger(options) {
|
|
679
|
+
const { events, workflow, condition } = options;
|
|
680
|
+
return workflowJobExecutionTriggerConfig(events.map((k) => workflowJobExecutionEventMap[k]), {
|
|
681
|
+
workflow,
|
|
682
|
+
condition
|
|
683
|
+
});
|
|
684
|
+
}
|
|
509
685
|
|
|
510
686
|
//#endregion
|
|
511
687
|
//#region src/configure/services/executor/trigger/schedule.ts
|
|
@@ -596,7 +772,7 @@ function defineWorkflowExecutionPolicy(name, def) {
|
|
|
596
772
|
/**
|
|
597
773
|
* Define a group of workflow job function execution policies. Property names
|
|
598
774
|
* become the workspace-unique `name` and default `key` verbatim, matching the
|
|
599
|
-
* mental model of {@link
|
|
775
|
+
* mental model of {@link createWaitPoints}. Provide `name` / `key` explicitly
|
|
600
776
|
* to override the property-name default (for example, when the property name
|
|
601
777
|
* is not valid for the execution policy grammar or when the runtime key
|
|
602
778
|
* prefix needs to differ).
|
|
@@ -621,10 +797,10 @@ function defineWorkflowExecutionPolicy(name, def) {
|
|
|
621
797
|
* }));
|
|
622
798
|
*
|
|
623
799
|
* // In a workflow job function:
|
|
624
|
-
* await tailor.workflow.
|
|
800
|
+
* await tailor.workflow.execJobFunction("worker", args, {
|
|
625
801
|
* executionPolicyKey: executionPolicies.premium.key,
|
|
626
802
|
* });
|
|
627
|
-
* await tailor.workflow.
|
|
803
|
+
* await tailor.workflow.execJobFunction("worker", args, {
|
|
628
804
|
* executionPolicyKey: executionPolicies["tenant-api"].keyFor(input.tenantId),
|
|
629
805
|
* });
|
|
630
806
|
*/
|
|
@@ -697,7 +873,8 @@ function createWorkflowJob(config) {
|
|
|
697
873
|
return brandValue({
|
|
698
874
|
name: config.name,
|
|
699
875
|
start,
|
|
700
|
-
body
|
|
876
|
+
body,
|
|
877
|
+
...config.publishEvents !== void 0 ? { publishEvents: config.publishEvents } : {}
|
|
701
878
|
}, "workflow-job");
|
|
702
879
|
}
|
|
703
880
|
|
|
@@ -1020,5 +1197,5 @@ function definePlugins(...configs) {
|
|
|
1020
1197
|
const t = t$1;
|
|
1021
1198
|
|
|
1022
1199
|
//#endregion
|
|
1023
|
-
export { authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
|
1200
|
+
export { authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger };
|
|
1024
1201
|
//# sourceMappingURL=index.mjs.map
|