@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.
@@ -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 { D as TailorDBType } from "../../workflow.generated-CDCnZNkH.mjs";
4
- import { dt as WORKFLOW_TEST_ENV_KEY, n as output, yt as TailorField } from "../../index-Br4XCvX1.mjs";
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 { TailorTypeGqlPermission as A, TailorAnyDBField as C, TailorDBType as D, TailorDBInstance as E, AllowedValuesOutput as F, unsafeAllowAllGqlPermission as M, unsafeAllowAllTypePermission as N, db as O, AllowedValues as P, IdPInput as S, TailorDBField as T, IdPUserField as _, ResolverExternalConfig as a, IdPGqlOperations as b, WorkflowServiceConfig as c, StaticWebsiteDefinitionBrand as d, StaticWebsiteInput as f, IdPExternalConfig as g, IdPConfig as h, ExecutorServiceInput as i, TailorTypePermission as j, PermissionCondition as k, WorkflowServiceInput as l, SecretsDefinitionBrand as m, AppConfig as n, ResolverServiceConfig as o, SecretsConfig as p, ExecutorServiceConfig as r, ResolverServiceInput as s, RetryPolicy as t, StaticWebsiteConfig as u, IdpDefinitionBrand as v, TailorAnyDBType as w, IdPGqlOperationsInput as x, IdPEmailConfig as y };
1207
- //# sourceMappingURL=workflow.generated-CDCnZNkH.d.mts.map
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.44.0",
3
+ "version": "1.44.2",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-DkVNbIuh.mjs";
3
-
4
- export { defineApplication };