@tailor-platform/sdk 1.44.0 → 1.44.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 +14 -0
- package/dist/{application-DkVNbIuh.mjs → application-7wtQzifE.mjs} +155 -5
- package/dist/application-7wtQzifE.mjs.map +1 -0
- package/dist/application-P55ZFKHG.mjs +4 -0
- package/dist/cli/index.mjs +5 -5
- package/dist/cli/lib.d.mts +320 -1
- package/dist/cli/lib.mjs +3 -3
- package/dist/{client-DQl5NPG9.mjs → client-DcuQRqSd.mjs} +25 -12
- package/dist/client-DcuQRqSd.mjs.map +1 -0
- package/dist/{client-EI4pMzvm.mjs → client-IsYnTV5A.mjs} +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-DtkFq9JF.mjs → crash-report-DQen2i_W.mjs} +1 -1
- package/dist/{crash-report-CSSrblUv.mjs → crash-report-DVZsX1bs.mjs} +2 -2
- package/dist/{crash-report-CSSrblUv.mjs.map → crash-report-DVZsX1bs.mjs.map} +1 -1
- package/dist/{index-Br4XCvX1.d.mts → index-BOfTiouP.d.mts} +5 -2
- package/dist/{runtime-l7GFD3Xg.mjs → runtime-CEj_sAfP.mjs} +16 -7
- package/dist/runtime-CEj_sAfP.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-CDCnZNkH.d.mts → workflow.generated-B7Mupf5V.d.mts} +5 -2
- package/docs/services/workflow.md +20 -0
- package/package.json +1 -1
- package/dist/application-BZRbA1pL.mjs +0 -4
- package/dist/application-DkVNbIuh.mjs.map +0 -1
- package/dist/client-DQl5NPG9.mjs.map +0 -1
- package/dist/runtime-l7GFD3Xg.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
2
|
import { Vt as TailorInvoker } from "../../tailor-db-field-D_z185oq.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { dt as WORKFLOW_TEST_ENV_KEY, n as output, yt as TailorField } from "../../index-
|
|
3
|
+
import { O as TailorDBType } from "../../workflow.generated-B7Mupf5V.mjs";
|
|
4
|
+
import { dt as WORKFLOW_TEST_ENV_KEY, n as output, yt as TailorField } from "../../index-BOfTiouP.mjs";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/test/mock.d.ts
|
|
@@ -1202,6 +1202,9 @@ type RetryPolicy = {
|
|
|
1202
1202
|
maxBackoff: `${number}ms` | `${number}s` | `${number}m`; /** Backoff multiplier (>= 1) */
|
|
1203
1203
|
backoffMultiplier: number;
|
|
1204
1204
|
};
|
|
1205
|
+
type ConcurrencyPolicy = {
|
|
1206
|
+
/** Maximum number of concurrent executions (1-1000) */maxConcurrentExecutions: number;
|
|
1207
|
+
};
|
|
1205
1208
|
//#endregion
|
|
1206
|
-
export {
|
|
1207
|
-
//# sourceMappingURL=workflow.generated-
|
|
1209
|
+
export { PermissionCondition as A, IdPInput as C, TailorDBInstance as D, TailorDBField as E, AllowedValues as F, AllowedValuesOutput as I, TailorTypePermission as M, unsafeAllowAllGqlPermission as N, TailorDBType as O, unsafeAllowAllTypePermission as P, IdPGqlOperationsInput as S, TailorAnyDBType as T, IdPExternalConfig as _, ExecutorServiceInput as a, IdPEmailConfig as b, ResolverServiceInput as c, StaticWebsiteConfig as d, StaticWebsiteDefinitionBrand as f, IdPConfig as g, SecretsDefinitionBrand as h, ExecutorServiceConfig as i, TailorTypeGqlPermission as j, db as k, WorkflowServiceConfig as l, SecretsConfig as m, RetryPolicy as n, ResolverExternalConfig as o, StaticWebsiteInput as p, AppConfig as r, ResolverServiceConfig as s, ConcurrencyPolicy as t, WorkflowServiceInput as u, IdPUserField as v, TailorAnyDBField as w, IdPGqlOperations as x, IdpDefinitionBrand as y };
|
|
1210
|
+
//# sourceMappingURL=workflow.generated-B7Mupf5V.d.mts.map
|
|
@@ -336,6 +336,26 @@ export default createWorkflow({
|
|
|
336
336
|
});
|
|
337
337
|
```
|
|
338
338
|
|
|
339
|
+
## Concurrency Policy
|
|
340
|
+
|
|
341
|
+
You can limit the number of concurrent executions of a workflow by setting `concurrencyPolicy`. When the limit is reached, new executions remain in PENDING state until a running execution completes.
|
|
342
|
+
|
|
343
|
+
| Field | Type | Description |
|
|
344
|
+
| ------------------------- | -------- | ------------------------------------------------ |
|
|
345
|
+
| `maxConcurrentExecutions` | `number` | Maximum number of concurrent executions (1-1000) |
|
|
346
|
+
|
|
347
|
+
When omitted, only platform-level limits apply.
|
|
348
|
+
|
|
349
|
+
```typescript
|
|
350
|
+
export default createWorkflow({
|
|
351
|
+
name: "order-processing",
|
|
352
|
+
mainJob: processOrder,
|
|
353
|
+
concurrencyPolicy: {
|
|
354
|
+
maxConcurrentExecutions: 5,
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
```
|
|
358
|
+
|
|
339
359
|
## Triggering a Workflow from a Resolver
|
|
340
360
|
|
|
341
361
|
You can start a workflow execution from a resolver using `workflow.trigger()`.
|
package/package.json
CHANGED