@epilot/sdk 2.20.84 → 2.20.86
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/definitions/automation-runtime.json +1 -1
- package/definitions/automation.json +294 -17
- package/definitions/integration-toolkit.json +69 -2
- package/definitions/workflow-definition.json +686 -12
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +8 -8
- package/dist/apis/automation.d.cts +2 -2
- package/dist/apis/automation.d.ts +2 -2
- package/dist/apis/automation.js +2 -2
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/external-values.cjs +6 -6
- package/dist/apis/external-values.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/identity.cjs +6 -6
- package/dist/apis/identity.js +1 -1
- package/dist/apis/integration-toolkit.cjs +76 -7
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +71 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/phone-integration.cjs +6 -6
- package/dist/apis/phone-integration.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.d.cts +2 -2
- package/dist/apis/workflow-definition.d.ts +2 -2
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/automation-KNJZDJD7.cjs +7 -0
- package/dist/automation-RKVFGJTO.js +7 -0
- package/dist/{automation-runtime-KLCXZKEC.cjs → automation-runtime-7LXZ343U.cjs} +2 -2
- package/dist/{automation-runtime-Y52HM57N.js → automation-runtime-JZKABTGP.js} +1 -1
- package/dist/{automation.d-B8g3nYp-.d.cts → automation.d-cTvIBxDI.d.cts} +514 -26
- package/dist/{automation.d-B8g3nYp-.d.ts → automation.d-cTvIBxDI.d.ts} +514 -26
- package/dist/{chunk-ZPG2RR4J.js → chunk-2AWPRVIH.js} +4 -7
- package/dist/{chunk-WOUASZJW.cjs → chunk-EIT2JFPB.cjs} +1 -1
- package/dist/{chunk-QW3ROE6H.js → chunk-JKCBMHOZ.js} +1 -1
- package/dist/{chunk-T4WYY7OU.cjs → chunk-NMY7ACYO.cjs} +4 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/integration-toolkit-DER5W7ID.cjs +7 -0
- package/dist/integration-toolkit-EMCDJARR.js +7 -0
- package/dist/{integration-toolkit.d-BGF0LVB7.d.cts → integration-toolkit.d-BJgyGgcU.d.cts} +45 -2
- package/dist/{integration-toolkit.d-BGF0LVB7.d.ts → integration-toolkit.d-BJgyGgcU.d.ts} +45 -2
- package/dist/workflow-definition-46NTR2N5.cjs +7 -0
- package/dist/workflow-definition-BSY2BNM2.js +7 -0
- package/dist/{workflow-definition.d-CweGhhBU.d.cts → workflow-definition.d-Be0CM3Py.d.cts} +574 -10
- package/dist/{workflow-definition.d-CweGhhBU.d.ts → workflow-definition.d-Be0CM3Py.d.ts} +574 -10
- package/docs/automation.md +267 -26
- package/docs/integration-toolkit.md +54 -8
- package/docs/workflow-definition.md +840 -138
- package/package.json +1 -1
- package/dist/automation-G2CKAQNB.cjs +0 -7
- package/dist/automation-UPTNUOYO.js +0 -7
- package/dist/erp-integration-735KQ73W.js +0 -5295
- package/dist/erp-integration-PAVHSUDM.cjs +0 -7
- package/dist/erp-integration-SBQJ6HEG.js +0 -7
- package/dist/erp-integration-W7FZDJOB.cjs +0 -5295
- package/dist/erp-integration-runtime-JGVGQ22V.js +0 -13
- package/dist/erp-integration-runtime-OZ4YSTQX.cjs +0 -13
- package/dist/integration-toolkit-3XNG4PL5.cjs +0 -7
- package/dist/integration-toolkit-VLTS5HKV.js +0 -7
- package/dist/workflow-definition-MSO4JDA3.js +0 -7
- package/dist/workflow-definition-XTWO4RMY.cjs +0 -7
- package/docs/erp-integration.md +0 -6011
|
@@ -2472,6 +2472,12 @@ declare namespace Components {
|
|
|
2472
2472
|
[name: string]: any;
|
|
2473
2473
|
}[];
|
|
2474
2474
|
};
|
|
2475
|
+
/**
|
|
2476
|
+
* Present when the entity mapping has a `sharing` block: each partner with its `enabled` evaluated against the payload.
|
|
2477
|
+
*/
|
|
2478
|
+
sharing?: {
|
|
2479
|
+
[name: string]: any;
|
|
2480
|
+
};
|
|
2475
2481
|
/**
|
|
2476
2482
|
* Effective operation mode applied to this entity at runtime. `upsert-prune-scope-purge` / `upsert-prune-scope-delete` configurations report `upsert` here, because the individual entities in the payload are upserted — the destructive part of those modes is reported separately in `prune_scope_updates`. For `delete` / `purge`, `attributes` are still mapped and returned but ignored at runtime: only `unique_identifiers` are used to locate the entity to remove.
|
|
2477
2483
|
*/
|
|
@@ -2991,6 +2997,12 @@ declare namespace Components {
|
|
|
2991
2997
|
[name: string]: any;
|
|
2992
2998
|
}[];
|
|
2993
2999
|
};
|
|
3000
|
+
/**
|
|
3001
|
+
* Present when the entity mapping has a `sharing` block: each partner with its `enabled` evaluated against the payload.
|
|
3002
|
+
*/
|
|
3003
|
+
sharing?: {
|
|
3004
|
+
[name: string]: any;
|
|
3005
|
+
};
|
|
2994
3006
|
/**
|
|
2995
3007
|
* Effective operation mode applied to this entity at runtime. `upsert-prune-scope-purge` / `upsert-prune-scope-delete` configurations report `upsert` here, because the individual entities in the payload are upserted — the destructive part of those modes is reported separately in `prune_scope_updates`. For `delete` / `purge`, `attributes` are still mapped and returned but ignored at runtime: only `unique_identifiers` are used to locate the entity to remove.
|
|
2996
3008
|
*/
|
|
@@ -5776,6 +5788,7 @@ declare namespace Components {
|
|
|
5776
5788
|
*/
|
|
5777
5789
|
fields?: IntegrationEntityField[];
|
|
5778
5790
|
conditional?: /* Conditional Pricing extras for this target, used when it writes a conditional entity (a Product, Price or Coupon carrying context-dependent variants). The conditions themselves are declared on the entity schema, not here. */ IntegrationEntityConditional;
|
|
5791
|
+
sharing?: /* Keeps the mapped entity's sharing with partner organizations in sync. After the entity is written, it is shared with every listed partner whose `enabled` is true and unshared from every listed partner whose `enabled` is false. Changes are computed against the entity's current `_acl`, so a repeated event with the same outcome makes no sharing call. Each partner org needs an existing partnership; partners without one are skipped and reported as `SHARING_PARTNER_NOT_CONNECTED`. */ IntegrationEntitySharing;
|
|
5779
5792
|
}
|
|
5780
5793
|
/**
|
|
5781
5794
|
* Conditional Pricing extras for this target, used when it writes a conditional entity (a Product, Price or Coupon carrying context-dependent variants). The conditions themselves are declared on the entity schema, not here.
|
|
@@ -5873,6 +5886,34 @@ declare namespace Components {
|
|
|
5873
5886
|
[name: string]: /* One mapped value. Exactly one of field, constant or jsonataExpression must be set — the same three forms `IntegrationEntityField` accepts. */ MappedFieldValue;
|
|
5874
5887
|
};
|
|
5875
5888
|
}
|
|
5889
|
+
/**
|
|
5890
|
+
* Keeps the mapped entity's sharing with partner organizations in sync. After the entity is written, it is shared with every listed partner whose `enabled` is true and unshared from every listed partner whose `enabled` is false. Changes are computed against the entity's current `_acl`, so a repeated event with the same outcome makes no sharing call. Each partner org needs an existing partnership; partners without one are skipped and reported as `SHARING_PARTNER_NOT_CONNECTED`.
|
|
5891
|
+
*/
|
|
5892
|
+
export interface IntegrationEntitySharing {
|
|
5893
|
+
partners: [
|
|
5894
|
+
IntegrationEntitySharingPartner,
|
|
5895
|
+
...IntegrationEntitySharingPartner[]
|
|
5896
|
+
];
|
|
5897
|
+
}
|
|
5898
|
+
export interface IntegrationEntitySharingPartner {
|
|
5899
|
+
/**
|
|
5900
|
+
* The partner organization to keep the entity's sharing in sync with.
|
|
5901
|
+
* example:
|
|
5902
|
+
* 739224
|
|
5903
|
+
*/
|
|
5904
|
+
partner_org_id: string;
|
|
5905
|
+
/**
|
|
5906
|
+
* Whether the entity should be shared with this partner. A boolean, or a JSONata expression evaluated against the mapped payload item (the same input as field-level `enabled`). Defaults to true. When false, the entity is unshared from the partner.
|
|
5907
|
+
* example:
|
|
5908
|
+
* salesPartner.number = 'SP-1001'
|
|
5909
|
+
*/
|
|
5910
|
+
enabled?: /**
|
|
5911
|
+
* Whether the entity should be shared with this partner. A boolean, or a JSONata expression evaluated against the mapped payload item (the same input as field-level `enabled`). Defaults to true. When false, the entity is unshared from the partner.
|
|
5912
|
+
* example:
|
|
5913
|
+
* salesPartner.number = 'SP-1001'
|
|
5914
|
+
*/
|
|
5915
|
+
boolean | string;
|
|
5916
|
+
}
|
|
5876
5917
|
export interface IntegrationFieldV1 {
|
|
5877
5918
|
/**
|
|
5878
5919
|
* Target entity slug
|
|
@@ -6511,7 +6552,7 @@ declare namespace Components {
|
|
|
6511
6552
|
* `monitoring-code-enum.test.ts`, which fails if the two diverge.
|
|
6512
6553
|
*
|
|
6513
6554
|
*/
|
|
6514
|
-
export type MonitoringCode = "ACK_CONFIRMED" | "ACK_PENDING" | "ACK_TIMEOUT" | "ATTACHMENT_NOT_FOUND" | "ATTRIBUTE_TYPE_MISMATCH" | "CONDITIONAL_VARIANTS_WRITTEN" | "CONDITIONAL_VARIANT_WRITE_FAILED" | "CONDITIONAL_VARIANT_WRITE_WARNING" | "CORRELATION_CLOSED_EMPTY" | "CORRELATION_CLOSED_INCOMPLETE" | "CORRELATION_CLOSE_IGNORED" | "CORRELATION_COMPLETED" | "CORRELATION_EVENT_LIMIT_EXCEEDED" | "CORRELATION_ID_MISSING" | "CORRELATION_LATE_EVENT" | "CORRELATION_REQUIREMENT_FAILED" | "CORRELATION_WAIT_REJECTED" | "CORRELATION_WAIT_TIMEOUT" | "DEPRECATED_ENDPOINT" | "DIRECT_ENTITY_NOT_ALLOWED" | "DIRECT_PAYLOAD_INVALID" | "DIRECT_VERSION_UNSUPPORTED" | "DUPLICATE_EVENT" | "ENTITY_CREATED" | "ENTITY_DELETED" | "ENTITY_NO_OP" | "ENTITY_REFERENCE_NOT_FOUND" | "ENTITY_UPDATED" | "EVENT_NOT_CONFIGURED" | "EXTERNAL_API_ERROR" | "EXTERNAL_ERROR" | "EXTERNAL_INFO" | "EXTERNAL_SUCCESS" | "EXTERNAL_WARNING" | "FAN_OUT_EMPTY" | "FAN_OUT_INVALID_RESULT" | "FILE_EXTRACTION_FAILED" | "FILE_FETCH_FAILED" | "FILE_PROXY_OK" | "FILE_PROXY_UPLOADED" | "FILE_PROXY_UPLOAD_ENQUEUED" | "FILE_PROXY_UPLOAD_FAILED" | "FILE_PROXY_UPLOAD_RETRYING" | "FILE_TOO_LARGE" | "INTEGRATION_NOT_FOUND" | "INTERACTIVE_CROSS_LANE_WRITE" | "INTERACTIVE_NOT_ALLOWED" | "INTERACTIVE_RATE_LIMITED" | "INVALID_METER_READING_ATTRIBUTES" | "LOOKUP_UNMAPPED" | "MALFORMED_PAYLOAD" | "MAPPING_EXPRESSION_FAILED" | "METERING_API_ERROR" | "METER_READING_DELETED" | "METER_READING_GROUP_FAILED" | "METER_READING_GROUP_RETRYING" | "METER_READING_UPSERTED" | "MISSING_REQUIRED_PARAM" | "MISSING_UNIQUE_IDENTIFIERS" | "MSG_ACKED" | "MSG_DEAD_LETTERED" | "MSG_ENQUEUED" | "MSG_EXPIRED_UNPOLLED" | "MSG_HEAD_BLOCKED" | "MSG_LATE_ARRIVAL" | "OAUTH2_TOKEN_FAILURE" | "PAYLOAD_TOO_LARGE" | "PROCESSING_STATE_LIMIT" | "PRUNE_SCOPE_COMPLETED" | "PRUNE_SCOPE_PARTIAL_FAILURE" | "RECURSION_DEPTH_EXCEEDED" | "RELATION_REF_ITEM_NOT_FOUND" | "RELATION_REF_VALUE_UNDEFINED" | "REQUIRED_PARAM_MISSING" | "SECURE_PROXY_DISABLED" | "SECURE_PROXY_DOMAIN_BLOCKED" | "SECURE_PROXY_DOMAIN_NOT_ALLOWED" | "SECURE_PROXY_ERROR" | "SECURE_PROXY_INVALID_CONFIG" | "SECURE_PROXY_INVALID_TYPE" | "SECURE_PROXY_INVALID_URL" | "SECURE_PROXY_IP_BLOCKED" | "SECURE_PROXY_IP_NOT_ALLOWED" | "SECURE_PROXY_NOT_FOUND" | "SECURE_PROXY_UNAVAILABLE" | "SIGNATURE_VERIFICATION_FAILED" | "SIGNATURE_VERIFICATION_UNAVAILABLE" | "SOFT_DELETED_ENTITY_MATCHED" | "STEP_DISABLED" | "TIMEOUT" | "UNIQUE_ID_LOOKUP_UNRESOLVABLE" | "UNIQUE_ID_MULTIPLE_MATCHES" | "UNIQUE_ID_NOT_IN_SCHEMA" | "UNKNOWN_ERROR" | "USE_CASE_DISABLED" | "USE_CASE_INVALID_TYPE" | "USE_CASE_MISSING_CONFIG" | "USE_CASE_NOT_FOUND" | "WEBHOOK_DELIVERED";
|
|
6555
|
+
export type MonitoringCode = "ACK_CONFIRMED" | "ACK_PENDING" | "ACK_TIMEOUT" | "ATTACHMENT_NOT_FOUND" | "ATTRIBUTE_TYPE_MISMATCH" | "CONDITIONAL_VARIANTS_WRITTEN" | "CONDITIONAL_VARIANT_WRITE_FAILED" | "CONDITIONAL_VARIANT_WRITE_WARNING" | "CORRELATION_CLOSED_EMPTY" | "CORRELATION_CLOSED_INCOMPLETE" | "CORRELATION_CLOSE_IGNORED" | "CORRELATION_COMPLETED" | "CORRELATION_EVENT_LIMIT_EXCEEDED" | "CORRELATION_ID_MISSING" | "CORRELATION_LATE_EVENT" | "CORRELATION_REQUIREMENT_FAILED" | "CORRELATION_WAIT_REJECTED" | "CORRELATION_WAIT_TIMEOUT" | "DEPRECATED_ENDPOINT" | "DIRECT_ENTITY_NOT_ALLOWED" | "DIRECT_PAYLOAD_INVALID" | "DIRECT_VERSION_UNSUPPORTED" | "DUPLICATE_EVENT" | "ENTITY_CREATED" | "ENTITY_DELETED" | "ENTITY_NO_OP" | "ENTITY_REFERENCE_NOT_FOUND" | "ENTITY_UPDATED" | "ENV_VAR_REF_JSONATA_FAILED" | "ENV_VAR_REF_LOOKUP_FAILED" | "ENV_VAR_REF_NOT_FOUND" | "EVENT_NOT_CONFIGURED" | "EXTERNAL_API_ERROR" | "EXTERNAL_ERROR" | "EXTERNAL_INFO" | "EXTERNAL_SUCCESS" | "EXTERNAL_WARNING" | "FAN_OUT_EMPTY" | "FAN_OUT_INVALID_RESULT" | "FILE_EXTRACTION_FAILED" | "FILE_FETCH_FAILED" | "FILE_PROXY_OK" | "FILE_PROXY_UPLOADED" | "FILE_PROXY_UPLOAD_ENQUEUED" | "FILE_PROXY_UPLOAD_FAILED" | "FILE_PROXY_UPLOAD_RETRYING" | "FILE_TOO_LARGE" | "INTEGRATION_NOT_FOUND" | "INTERACTIVE_CROSS_LANE_WRITE" | "INTERACTIVE_NOT_ALLOWED" | "INTERACTIVE_RATE_LIMITED" | "INVALID_METER_READING_ATTRIBUTES" | "LOOKUP_UNMAPPED" | "MALFORMED_PAYLOAD" | "MAPPING_EXPRESSION_FAILED" | "METERING_API_ERROR" | "METER_READING_DELETED" | "METER_READING_GROUP_FAILED" | "METER_READING_GROUP_RETRYING" | "METER_READING_UPSERTED" | "MISSING_METER_COUNTER_UNIQUE_IDS" | "MISSING_METER_UNIQUE_IDS" | "MISSING_REQUIRED_PARAM" | "MISSING_UNIQUE_IDENTIFIERS" | "MSG_ACKED" | "MSG_DEAD_LETTERED" | "MSG_ENQUEUED" | "MSG_EXPIRED_UNPOLLED" | "MSG_HEAD_BLOCKED" | "MSG_LATE_ARRIVAL" | "OAUTH2_TOKEN_FAILURE" | "ORG_DROPPED" | "PAYLOAD_TOO_LARGE" | "PORTAL_REF_AMBIGUOUS" | "PORTAL_REF_JSONATA_FAILED" | "PORTAL_REF_LOOKUP_FAILED" | "PORTAL_REF_NO_MATCH" | "PROCESSING_STATE_LIMIT" | "PRUNE_SCOPE_COMPLETED" | "PRUNE_SCOPE_PARTIAL_FAILURE" | "RECURSION_DEPTH_EXCEEDED" | "RELATION_MISSING_UNIQUE_IDS" | "RELATION_REF_ITEM_NOT_FOUND" | "RELATION_REF_VALUE_UNDEFINED" | "REQUIRED_PARAM_MISSING" | "SECURE_PROXY_DISABLED" | "SECURE_PROXY_DOMAIN_BLOCKED" | "SECURE_PROXY_DOMAIN_NOT_ALLOWED" | "SECURE_PROXY_ERROR" | "SECURE_PROXY_INVALID_CONFIG" | "SECURE_PROXY_INVALID_TYPE" | "SECURE_PROXY_INVALID_URL" | "SECURE_PROXY_IP_BLOCKED" | "SECURE_PROXY_IP_NOT_ALLOWED" | "SECURE_PROXY_NOT_FOUND" | "SECURE_PROXY_OK" | "SECURE_PROXY_UNAVAILABLE" | "SHARING_FAILED" | "SHARING_PARTNER_NOT_CONNECTED" | "SHARING_REJECTED" | "SIGNATURE_VERIFICATION_FAILED" | "SIGNATURE_VERIFICATION_UNAVAILABLE" | "SOFT_DELETED_ENTITY_MATCHED" | "STEP_DISABLED" | "TIMEOUT" | "UNIQUE_ID_LOOKUP_UNRESOLVABLE" | "UNIQUE_ID_MULTIPLE_MATCHES" | "UNIQUE_ID_NOT_IN_SCHEMA" | "UNIQUE_ID_TYPE_DERIVATION_FAILED" | "UNKNOWN_ERROR" | "USE_CASE_DISABLED" | "USE_CASE_INVALID_TYPE" | "USE_CASE_MISSING_CONFIG" | "USE_CASE_NOT_FOUND" | "WEBHOOK_DELIVERED" | "WEBHOOK_DELIVERY_FAILED" | "WEBHOOK_SKIPPED";
|
|
6515
6556
|
export interface MonitoringEventV2 {
|
|
6516
6557
|
/**
|
|
6517
6558
|
* Unique monitoring event ID
|
|
@@ -13438,6 +13479,8 @@ type IntegrationEntity = Components.Schemas.IntegrationEntity;
|
|
|
13438
13479
|
type IntegrationEntityConditional = Components.Schemas.IntegrationEntityConditional;
|
|
13439
13480
|
type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
|
|
13440
13481
|
type IntegrationEntityFromRows = Components.Schemas.IntegrationEntityFromRows;
|
|
13482
|
+
type IntegrationEntitySharing = Components.Schemas.IntegrationEntitySharing;
|
|
13483
|
+
type IntegrationEntitySharingPartner = Components.Schemas.IntegrationEntitySharingPartner;
|
|
13441
13484
|
type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
|
|
13442
13485
|
type IntegrationMap = Components.Schemas.IntegrationMap;
|
|
13443
13486
|
type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
|
|
@@ -13561,4 +13604,4 @@ type ValidateErpImportRequest = Components.Schemas.ValidateErpImportRequest;
|
|
|
13561
13604
|
type WebhookDeliveryConfig = Components.Schemas.WebhookDeliveryConfig;
|
|
13562
13605
|
type WebhookStatus = Components.Schemas.WebhookStatus;
|
|
13563
13606
|
|
|
13564
|
-
export { type EntityUpdate as $, type AccessLogEntry as A, type DirectEntityOperation as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type DirectMeterReadingOperation as E, type DirectPayload as F, type DirectRelationItem as G, type DirectRelationRefItem as H, type DirectRelationRefValue as I, type DirectRelationValue as J, type DirectSimulationError as K, type DirectSimulationRequest as L, type DirectSimulationResponse as M, type DocumentationPage as N, type OperationMethods as O, Paths as P, type DocumentationPageSummary as Q, type EmbeddedFileProxyUseCaseRequest as R, type EmbeddedInboundUseCaseRequest as S, type EmbeddedManagedCallUseCaseRequest as T, type EmbeddedOutboundUseCaseRequest as U, type EmbeddedSecureProxyUseCaseRequest as V, type EmbeddedUseCaseRequest as W, type EmbeddedUseCaseRequestBase as X, type EntityPruneScopeUpdate as Y, type EntitySyncState as Z, type EntitySyncStatusResponse as _, Components as a, type
|
|
13607
|
+
export { type EntityUpdate as $, type AccessLogEntry as A, type DirectEntityOperation as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type DirectMeterReadingOperation as E, type DirectPayload as F, type DirectRelationItem as G, type DirectRelationRefItem as H, type DirectRelationRefValue as I, type DirectRelationValue as J, type DirectSimulationError as K, type DirectSimulationRequest as L, type DirectSimulationResponse as M, type DocumentationPage as N, type OperationMethods as O, Paths as P, type DocumentationPageSummary as Q, type EmbeddedFileProxyUseCaseRequest as R, type EmbeddedInboundUseCaseRequest as S, type EmbeddedManagedCallUseCaseRequest as T, type EmbeddedOutboundUseCaseRequest as U, type EmbeddedSecureProxyUseCaseRequest as V, type EmbeddedUseCaseRequest as W, type EmbeddedUseCaseRequestBase as X, type EntityPruneScopeUpdate as Y, type EntitySyncState as Z, type EntitySyncStatusResponse as _, Components as a, type IntegrationMeterReading as a$, type EnvVarRefConfig as a0, type EnvironmentFieldConfig as a1, type ErpEvent as a2, type ErpEventV3 as a3, type ErpImportDownload as a4, type ErpImportEntityDetail as a5, type ErpImportError as a6, type ErpImportFilePreview as a7, type ErpImportIssue as a8, type ErpImportJob as a9, type GenerateTypesPreviewResponse as aA, type GenerateTypesRequest as aB, type GenerateTypesResponse as aC, type GetMonitoringRunCompletionV2Request as aD, type GetMonitoringStatsRequest as aE, type GetMonitoringStatsV2Request as aF, type GetMonitoringTimeSeriesRequest as aG, type GetMonitoringTimeSeriesV2Request as aH, type InboundIntegrationEventConfiguration as aI, type InboundMonitoringEvent as aJ, type InboundUseCase as aK, type InboundUseCaseHistoryEntry as aL, type IngestExternalMonitoringEventsRequest as aM, type IngestExternalMonitoringEventsResponse as aN, type Integration as aO, type IntegrationAppMapping as aP, type IntegrationConfigurationV1 as aQ, type IntegrationConfigurationV2 as aR, type IntegrationEditableFields as aS, type IntegrationEntity as aT, type IntegrationEntityConditional as aU, type IntegrationEntityField as aV, type IntegrationEntityFromRows as aW, type IntegrationEntitySharing as aX, type IntegrationEntitySharingPartner as aY, type IntegrationFieldV1 as aZ, type IntegrationMap as a_, type ErpImportList as aa, type ErpImportProgress as ab, type ErpImportUseCaseSuggestion as ac, type ErpImportValidation as ad, type ErpUpdateEventStatus as ae, type ErpUpdateProcessedEntity as af, type ErpUpdateProcessingError as ag, type ErpUpdatesEventsV2Request as ah, type ErpUpdatesEventsV3Request as ai, type ErrorResponseBase as aj, type ExecuteErpImportRequest as ak, type ExternalMonitoringSpan as al, type FileProxyAuth as am, type FileProxyDeliveryConfig as an, type FileProxyFanOutConfig as ao, type FileProxyParam as ap, type FileProxyResponseConfig as aq, type FileProxySecureProxyAttachment as ar, type FileProxyStep as as, type FileProxyUploadConfig as at, type FileProxyUrlConfig as au, type FileProxyUrlParam as av, type FileProxyUrlParams as aw, type FileProxyUseCase as ax, type FileProxyUseCaseConfiguration as ay, type FileProxyUseCaseHistoryEntry as az, type PathsDictionary as b, type RedriveOutboundDlqRequest as b$, type IntegrationNotificationConfig as b0, type IntegrationObjectV1 as b1, type IntegrationSettings as b2, type IntegrationWithUseCases as b3, type ManagedCallAuth as b4, type ManagedCallErrorResponse as b5, type ManagedCallExecuteRequest as b6, type ManagedCallExecuteResponse as b7, type ManagedCallOperation as b8, type ManagedCallOperationConfig as b9, type NotificationStatusResponse as bA, type OutboundConflict as bB, type OutboundDlqListResponse as bC, type OutboundDlqMessage as bD, type OutboundFileProxyTargetStatus as bE, type OutboundIntegrationEventConfiguration as bF, type OutboundMapping as bG, type OutboundMappingSimulationError as bH, type OutboundMessage as bI, type OutboundMonitoringEvent as bJ, type OutboundPollStatus as bK, type OutboundStatusResponse as bL, type OutboundUseCase as bM, type OutboundUseCaseHistoryEntry as bN, type OutboundUseCaseStatus as bO, type PollDeliveryConfig as bP, type PollOutboundMessagesRequest as bQ, type PollOutboundMessagesResponse as bR, type PortalOrigin as bS, type PortalRefConfig as bT, type PortalRefFilter as bU, type PruneScopeConfig as bV, type QueryAccessLogsRequest as bW, type QueryEventsRequest as bX, type QueryInboundMonitoringEventsRequest as bY, type QueryMonitoringEventsV2Request as bZ, type QueryOutboundMonitoringEventsRequest as b_, type ManagedCallUseCase as ba, type ManagedCallUseCaseHistoryEntry as bb, type MappedFieldValue as bc, type MappingSimulationRequest as bd, type MappingSimulationResponse as be, type MappingSimulationV2Request as bf, type MappingSimulationWarning as bg, type MeterReadingPruneScopeConfig as bh, type MeterReadingPruneScopeUpdate as bi, type MeterReadingUpdate as bj, type MeterUniqueIdsConfig as bk, type MonitoringCode as bl, type MonitoringEventV2 as bm, type MonitoringRunCompletionV2 as bn, type MonitoringRunCompletionV2Response as bo, type MonitoringRunEntriesV2 as bp, type MonitoringStats as bq, type MonitoringStatsV2 as br, type MonitoringTraceResponse as bs, type NotificationChannelSet as bt, type NotificationDigestConfig as bu, type NotificationHistoryItem as bv, type NotificationHistoryResponse as bw, type NotificationRecipient as bx, type NotificationRule as by, type NotificationRuleStatus as bz, type AckOutboundMessagesRequest as c, type RedriveOutboundDlqResponse as c0, type RedriveOutboundDlqResult as c1, type RelationConfig as c2, type RelationItemConfig as c3, type RelationRefItemConfig as c4, type RelationRefValueConfig as c5, type RelationRefsConfig as c6, type RelationUniqueIdField as c7, type RepeatableFieldType as c8, type ReplayEventsRequest as c9, type UnblockOutboundStreamResponse as cA, type UpdateFileProxyUseCaseRequest as cB, type UpdateInboundUseCaseRequest as cC, type UpdateIntegrationRequest as cD, type UpdateManagedCallUseCaseRequest as cE, type UpdateOutboundUseCaseRequest as cF, type UpdateSecureProxyUseCaseRequest as cG, type UpdateUseCaseRequest as cH, type UpdateUseCaseRequestBase as cI, type UpsertDocumentationPageRequest as cJ, type UpsertIntegrationWithUseCasesRequest as cK, type UseCase as cL, type UseCaseBase as cM, type UseCaseHistoryEntry as cN, type UseCaseHistoryEntryBase as cO, type UseCaseTypePreview as cP, type ValidateErpImportRequest as cQ, type WebhookDeliveryConfig as cR, type WebhookStatus as cS, type RuleBaselineBucket as ca, type RuleBaselineStatus as cb, type S3Reference as cc, type SecureProxyRequest as cd, type SecureProxyResponse as ce, type SecureProxySummary as cf, type SecureProxyUpstreamError as cg, type SecureProxyUseCase as ch, type SecureProxyUseCaseConfiguration as ci, type SecureProxyUseCaseHistoryEntry as cj, type SecureProxyWhitelist as ck, type SecureProxyWhitelistUpdate as cl, type SetIntegrationAppMappingRequest as cm, type SimulateOutboundMappingRequest as cn, type SimulateOutboundMappingResponse as co, type SuggestErpImportUseCasesResponse as cp, type TestNotificationRequest as cq, type TestNotificationResponse as cr, type TimeSeriesBreakdownItemV2 as cs, type TimeSeriesBucket as ct, type TimeSeriesBucketV2 as cu, type TriggerErpActionRequest as cv, type TriggerWebhookResp as cw, type TypeAnnotations as cx, type TypeDescriptor as cy, type UnblockOutboundStreamRequest as cz, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CorrelationCloseResult as j, type CorrelationStatus as k, type CorrelationStatusList as l, type CorrelationUseCaseCounts as m, type CorrelationWaitBadRequest as n, type CorrelationWaitResult as o, type CreateErpImportRequest as p, type CreateErpImportResponse as q, type CreateFileProxyUseCaseRequest as r, type CreateInboundUseCaseRequest as s, type CreateIntegrationRequest as t, type CreateManagedCallUseCaseRequest as u, type CreateOutboundUseCaseRequest as v, type CreateSecureProxyUseCaseRequest as w, type CreateUseCaseRequest as x, type CreateUseCaseRequestBase as y, type DeliveryConfig as z };
|
|
@@ -2472,6 +2472,12 @@ declare namespace Components {
|
|
|
2472
2472
|
[name: string]: any;
|
|
2473
2473
|
}[];
|
|
2474
2474
|
};
|
|
2475
|
+
/**
|
|
2476
|
+
* Present when the entity mapping has a `sharing` block: each partner with its `enabled` evaluated against the payload.
|
|
2477
|
+
*/
|
|
2478
|
+
sharing?: {
|
|
2479
|
+
[name: string]: any;
|
|
2480
|
+
};
|
|
2475
2481
|
/**
|
|
2476
2482
|
* Effective operation mode applied to this entity at runtime. `upsert-prune-scope-purge` / `upsert-prune-scope-delete` configurations report `upsert` here, because the individual entities in the payload are upserted — the destructive part of those modes is reported separately in `prune_scope_updates`. For `delete` / `purge`, `attributes` are still mapped and returned but ignored at runtime: only `unique_identifiers` are used to locate the entity to remove.
|
|
2477
2483
|
*/
|
|
@@ -2991,6 +2997,12 @@ declare namespace Components {
|
|
|
2991
2997
|
[name: string]: any;
|
|
2992
2998
|
}[];
|
|
2993
2999
|
};
|
|
3000
|
+
/**
|
|
3001
|
+
* Present when the entity mapping has a `sharing` block: each partner with its `enabled` evaluated against the payload.
|
|
3002
|
+
*/
|
|
3003
|
+
sharing?: {
|
|
3004
|
+
[name: string]: any;
|
|
3005
|
+
};
|
|
2994
3006
|
/**
|
|
2995
3007
|
* Effective operation mode applied to this entity at runtime. `upsert-prune-scope-purge` / `upsert-prune-scope-delete` configurations report `upsert` here, because the individual entities in the payload are upserted — the destructive part of those modes is reported separately in `prune_scope_updates`. For `delete` / `purge`, `attributes` are still mapped and returned but ignored at runtime: only `unique_identifiers` are used to locate the entity to remove.
|
|
2996
3008
|
*/
|
|
@@ -5776,6 +5788,7 @@ declare namespace Components {
|
|
|
5776
5788
|
*/
|
|
5777
5789
|
fields?: IntegrationEntityField[];
|
|
5778
5790
|
conditional?: /* Conditional Pricing extras for this target, used when it writes a conditional entity (a Product, Price or Coupon carrying context-dependent variants). The conditions themselves are declared on the entity schema, not here. */ IntegrationEntityConditional;
|
|
5791
|
+
sharing?: /* Keeps the mapped entity's sharing with partner organizations in sync. After the entity is written, it is shared with every listed partner whose `enabled` is true and unshared from every listed partner whose `enabled` is false. Changes are computed against the entity's current `_acl`, so a repeated event with the same outcome makes no sharing call. Each partner org needs an existing partnership; partners without one are skipped and reported as `SHARING_PARTNER_NOT_CONNECTED`. */ IntegrationEntitySharing;
|
|
5779
5792
|
}
|
|
5780
5793
|
/**
|
|
5781
5794
|
* Conditional Pricing extras for this target, used when it writes a conditional entity (a Product, Price or Coupon carrying context-dependent variants). The conditions themselves are declared on the entity schema, not here.
|
|
@@ -5873,6 +5886,34 @@ declare namespace Components {
|
|
|
5873
5886
|
[name: string]: /* One mapped value. Exactly one of field, constant or jsonataExpression must be set — the same three forms `IntegrationEntityField` accepts. */ MappedFieldValue;
|
|
5874
5887
|
};
|
|
5875
5888
|
}
|
|
5889
|
+
/**
|
|
5890
|
+
* Keeps the mapped entity's sharing with partner organizations in sync. After the entity is written, it is shared with every listed partner whose `enabled` is true and unshared from every listed partner whose `enabled` is false. Changes are computed against the entity's current `_acl`, so a repeated event with the same outcome makes no sharing call. Each partner org needs an existing partnership; partners without one are skipped and reported as `SHARING_PARTNER_NOT_CONNECTED`.
|
|
5891
|
+
*/
|
|
5892
|
+
export interface IntegrationEntitySharing {
|
|
5893
|
+
partners: [
|
|
5894
|
+
IntegrationEntitySharingPartner,
|
|
5895
|
+
...IntegrationEntitySharingPartner[]
|
|
5896
|
+
];
|
|
5897
|
+
}
|
|
5898
|
+
export interface IntegrationEntitySharingPartner {
|
|
5899
|
+
/**
|
|
5900
|
+
* The partner organization to keep the entity's sharing in sync with.
|
|
5901
|
+
* example:
|
|
5902
|
+
* 739224
|
|
5903
|
+
*/
|
|
5904
|
+
partner_org_id: string;
|
|
5905
|
+
/**
|
|
5906
|
+
* Whether the entity should be shared with this partner. A boolean, or a JSONata expression evaluated against the mapped payload item (the same input as field-level `enabled`). Defaults to true. When false, the entity is unshared from the partner.
|
|
5907
|
+
* example:
|
|
5908
|
+
* salesPartner.number = 'SP-1001'
|
|
5909
|
+
*/
|
|
5910
|
+
enabled?: /**
|
|
5911
|
+
* Whether the entity should be shared with this partner. A boolean, or a JSONata expression evaluated against the mapped payload item (the same input as field-level `enabled`). Defaults to true. When false, the entity is unshared from the partner.
|
|
5912
|
+
* example:
|
|
5913
|
+
* salesPartner.number = 'SP-1001'
|
|
5914
|
+
*/
|
|
5915
|
+
boolean | string;
|
|
5916
|
+
}
|
|
5876
5917
|
export interface IntegrationFieldV1 {
|
|
5877
5918
|
/**
|
|
5878
5919
|
* Target entity slug
|
|
@@ -6511,7 +6552,7 @@ declare namespace Components {
|
|
|
6511
6552
|
* `monitoring-code-enum.test.ts`, which fails if the two diverge.
|
|
6512
6553
|
*
|
|
6513
6554
|
*/
|
|
6514
|
-
export type MonitoringCode = "ACK_CONFIRMED" | "ACK_PENDING" | "ACK_TIMEOUT" | "ATTACHMENT_NOT_FOUND" | "ATTRIBUTE_TYPE_MISMATCH" | "CONDITIONAL_VARIANTS_WRITTEN" | "CONDITIONAL_VARIANT_WRITE_FAILED" | "CONDITIONAL_VARIANT_WRITE_WARNING" | "CORRELATION_CLOSED_EMPTY" | "CORRELATION_CLOSED_INCOMPLETE" | "CORRELATION_CLOSE_IGNORED" | "CORRELATION_COMPLETED" | "CORRELATION_EVENT_LIMIT_EXCEEDED" | "CORRELATION_ID_MISSING" | "CORRELATION_LATE_EVENT" | "CORRELATION_REQUIREMENT_FAILED" | "CORRELATION_WAIT_REJECTED" | "CORRELATION_WAIT_TIMEOUT" | "DEPRECATED_ENDPOINT" | "DIRECT_ENTITY_NOT_ALLOWED" | "DIRECT_PAYLOAD_INVALID" | "DIRECT_VERSION_UNSUPPORTED" | "DUPLICATE_EVENT" | "ENTITY_CREATED" | "ENTITY_DELETED" | "ENTITY_NO_OP" | "ENTITY_REFERENCE_NOT_FOUND" | "ENTITY_UPDATED" | "EVENT_NOT_CONFIGURED" | "EXTERNAL_API_ERROR" | "EXTERNAL_ERROR" | "EXTERNAL_INFO" | "EXTERNAL_SUCCESS" | "EXTERNAL_WARNING" | "FAN_OUT_EMPTY" | "FAN_OUT_INVALID_RESULT" | "FILE_EXTRACTION_FAILED" | "FILE_FETCH_FAILED" | "FILE_PROXY_OK" | "FILE_PROXY_UPLOADED" | "FILE_PROXY_UPLOAD_ENQUEUED" | "FILE_PROXY_UPLOAD_FAILED" | "FILE_PROXY_UPLOAD_RETRYING" | "FILE_TOO_LARGE" | "INTEGRATION_NOT_FOUND" | "INTERACTIVE_CROSS_LANE_WRITE" | "INTERACTIVE_NOT_ALLOWED" | "INTERACTIVE_RATE_LIMITED" | "INVALID_METER_READING_ATTRIBUTES" | "LOOKUP_UNMAPPED" | "MALFORMED_PAYLOAD" | "MAPPING_EXPRESSION_FAILED" | "METERING_API_ERROR" | "METER_READING_DELETED" | "METER_READING_GROUP_FAILED" | "METER_READING_GROUP_RETRYING" | "METER_READING_UPSERTED" | "MISSING_REQUIRED_PARAM" | "MISSING_UNIQUE_IDENTIFIERS" | "MSG_ACKED" | "MSG_DEAD_LETTERED" | "MSG_ENQUEUED" | "MSG_EXPIRED_UNPOLLED" | "MSG_HEAD_BLOCKED" | "MSG_LATE_ARRIVAL" | "OAUTH2_TOKEN_FAILURE" | "PAYLOAD_TOO_LARGE" | "PROCESSING_STATE_LIMIT" | "PRUNE_SCOPE_COMPLETED" | "PRUNE_SCOPE_PARTIAL_FAILURE" | "RECURSION_DEPTH_EXCEEDED" | "RELATION_REF_ITEM_NOT_FOUND" | "RELATION_REF_VALUE_UNDEFINED" | "REQUIRED_PARAM_MISSING" | "SECURE_PROXY_DISABLED" | "SECURE_PROXY_DOMAIN_BLOCKED" | "SECURE_PROXY_DOMAIN_NOT_ALLOWED" | "SECURE_PROXY_ERROR" | "SECURE_PROXY_INVALID_CONFIG" | "SECURE_PROXY_INVALID_TYPE" | "SECURE_PROXY_INVALID_URL" | "SECURE_PROXY_IP_BLOCKED" | "SECURE_PROXY_IP_NOT_ALLOWED" | "SECURE_PROXY_NOT_FOUND" | "SECURE_PROXY_UNAVAILABLE" | "SIGNATURE_VERIFICATION_FAILED" | "SIGNATURE_VERIFICATION_UNAVAILABLE" | "SOFT_DELETED_ENTITY_MATCHED" | "STEP_DISABLED" | "TIMEOUT" | "UNIQUE_ID_LOOKUP_UNRESOLVABLE" | "UNIQUE_ID_MULTIPLE_MATCHES" | "UNIQUE_ID_NOT_IN_SCHEMA" | "UNKNOWN_ERROR" | "USE_CASE_DISABLED" | "USE_CASE_INVALID_TYPE" | "USE_CASE_MISSING_CONFIG" | "USE_CASE_NOT_FOUND" | "WEBHOOK_DELIVERED";
|
|
6555
|
+
export type MonitoringCode = "ACK_CONFIRMED" | "ACK_PENDING" | "ACK_TIMEOUT" | "ATTACHMENT_NOT_FOUND" | "ATTRIBUTE_TYPE_MISMATCH" | "CONDITIONAL_VARIANTS_WRITTEN" | "CONDITIONAL_VARIANT_WRITE_FAILED" | "CONDITIONAL_VARIANT_WRITE_WARNING" | "CORRELATION_CLOSED_EMPTY" | "CORRELATION_CLOSED_INCOMPLETE" | "CORRELATION_CLOSE_IGNORED" | "CORRELATION_COMPLETED" | "CORRELATION_EVENT_LIMIT_EXCEEDED" | "CORRELATION_ID_MISSING" | "CORRELATION_LATE_EVENT" | "CORRELATION_REQUIREMENT_FAILED" | "CORRELATION_WAIT_REJECTED" | "CORRELATION_WAIT_TIMEOUT" | "DEPRECATED_ENDPOINT" | "DIRECT_ENTITY_NOT_ALLOWED" | "DIRECT_PAYLOAD_INVALID" | "DIRECT_VERSION_UNSUPPORTED" | "DUPLICATE_EVENT" | "ENTITY_CREATED" | "ENTITY_DELETED" | "ENTITY_NO_OP" | "ENTITY_REFERENCE_NOT_FOUND" | "ENTITY_UPDATED" | "ENV_VAR_REF_JSONATA_FAILED" | "ENV_VAR_REF_LOOKUP_FAILED" | "ENV_VAR_REF_NOT_FOUND" | "EVENT_NOT_CONFIGURED" | "EXTERNAL_API_ERROR" | "EXTERNAL_ERROR" | "EXTERNAL_INFO" | "EXTERNAL_SUCCESS" | "EXTERNAL_WARNING" | "FAN_OUT_EMPTY" | "FAN_OUT_INVALID_RESULT" | "FILE_EXTRACTION_FAILED" | "FILE_FETCH_FAILED" | "FILE_PROXY_OK" | "FILE_PROXY_UPLOADED" | "FILE_PROXY_UPLOAD_ENQUEUED" | "FILE_PROXY_UPLOAD_FAILED" | "FILE_PROXY_UPLOAD_RETRYING" | "FILE_TOO_LARGE" | "INTEGRATION_NOT_FOUND" | "INTERACTIVE_CROSS_LANE_WRITE" | "INTERACTIVE_NOT_ALLOWED" | "INTERACTIVE_RATE_LIMITED" | "INVALID_METER_READING_ATTRIBUTES" | "LOOKUP_UNMAPPED" | "MALFORMED_PAYLOAD" | "MAPPING_EXPRESSION_FAILED" | "METERING_API_ERROR" | "METER_READING_DELETED" | "METER_READING_GROUP_FAILED" | "METER_READING_GROUP_RETRYING" | "METER_READING_UPSERTED" | "MISSING_METER_COUNTER_UNIQUE_IDS" | "MISSING_METER_UNIQUE_IDS" | "MISSING_REQUIRED_PARAM" | "MISSING_UNIQUE_IDENTIFIERS" | "MSG_ACKED" | "MSG_DEAD_LETTERED" | "MSG_ENQUEUED" | "MSG_EXPIRED_UNPOLLED" | "MSG_HEAD_BLOCKED" | "MSG_LATE_ARRIVAL" | "OAUTH2_TOKEN_FAILURE" | "ORG_DROPPED" | "PAYLOAD_TOO_LARGE" | "PORTAL_REF_AMBIGUOUS" | "PORTAL_REF_JSONATA_FAILED" | "PORTAL_REF_LOOKUP_FAILED" | "PORTAL_REF_NO_MATCH" | "PROCESSING_STATE_LIMIT" | "PRUNE_SCOPE_COMPLETED" | "PRUNE_SCOPE_PARTIAL_FAILURE" | "RECURSION_DEPTH_EXCEEDED" | "RELATION_MISSING_UNIQUE_IDS" | "RELATION_REF_ITEM_NOT_FOUND" | "RELATION_REF_VALUE_UNDEFINED" | "REQUIRED_PARAM_MISSING" | "SECURE_PROXY_DISABLED" | "SECURE_PROXY_DOMAIN_BLOCKED" | "SECURE_PROXY_DOMAIN_NOT_ALLOWED" | "SECURE_PROXY_ERROR" | "SECURE_PROXY_INVALID_CONFIG" | "SECURE_PROXY_INVALID_TYPE" | "SECURE_PROXY_INVALID_URL" | "SECURE_PROXY_IP_BLOCKED" | "SECURE_PROXY_IP_NOT_ALLOWED" | "SECURE_PROXY_NOT_FOUND" | "SECURE_PROXY_OK" | "SECURE_PROXY_UNAVAILABLE" | "SHARING_FAILED" | "SHARING_PARTNER_NOT_CONNECTED" | "SHARING_REJECTED" | "SIGNATURE_VERIFICATION_FAILED" | "SIGNATURE_VERIFICATION_UNAVAILABLE" | "SOFT_DELETED_ENTITY_MATCHED" | "STEP_DISABLED" | "TIMEOUT" | "UNIQUE_ID_LOOKUP_UNRESOLVABLE" | "UNIQUE_ID_MULTIPLE_MATCHES" | "UNIQUE_ID_NOT_IN_SCHEMA" | "UNIQUE_ID_TYPE_DERIVATION_FAILED" | "UNKNOWN_ERROR" | "USE_CASE_DISABLED" | "USE_CASE_INVALID_TYPE" | "USE_CASE_MISSING_CONFIG" | "USE_CASE_NOT_FOUND" | "WEBHOOK_DELIVERED" | "WEBHOOK_DELIVERY_FAILED" | "WEBHOOK_SKIPPED";
|
|
6515
6556
|
export interface MonitoringEventV2 {
|
|
6516
6557
|
/**
|
|
6517
6558
|
* Unique monitoring event ID
|
|
@@ -13438,6 +13479,8 @@ type IntegrationEntity = Components.Schemas.IntegrationEntity;
|
|
|
13438
13479
|
type IntegrationEntityConditional = Components.Schemas.IntegrationEntityConditional;
|
|
13439
13480
|
type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
|
|
13440
13481
|
type IntegrationEntityFromRows = Components.Schemas.IntegrationEntityFromRows;
|
|
13482
|
+
type IntegrationEntitySharing = Components.Schemas.IntegrationEntitySharing;
|
|
13483
|
+
type IntegrationEntitySharingPartner = Components.Schemas.IntegrationEntitySharingPartner;
|
|
13441
13484
|
type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
|
|
13442
13485
|
type IntegrationMap = Components.Schemas.IntegrationMap;
|
|
13443
13486
|
type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
|
|
@@ -13561,4 +13604,4 @@ type ValidateErpImportRequest = Components.Schemas.ValidateErpImportRequest;
|
|
|
13561
13604
|
type WebhookDeliveryConfig = Components.Schemas.WebhookDeliveryConfig;
|
|
13562
13605
|
type WebhookStatus = Components.Schemas.WebhookStatus;
|
|
13563
13606
|
|
|
13564
|
-
export { type EntityUpdate as $, type AccessLogEntry as A, type DirectEntityOperation as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type DirectMeterReadingOperation as E, type DirectPayload as F, type DirectRelationItem as G, type DirectRelationRefItem as H, type DirectRelationRefValue as I, type DirectRelationValue as J, type DirectSimulationError as K, type DirectSimulationRequest as L, type DirectSimulationResponse as M, type DocumentationPage as N, type OperationMethods as O, Paths as P, type DocumentationPageSummary as Q, type EmbeddedFileProxyUseCaseRequest as R, type EmbeddedInboundUseCaseRequest as S, type EmbeddedManagedCallUseCaseRequest as T, type EmbeddedOutboundUseCaseRequest as U, type EmbeddedSecureProxyUseCaseRequest as V, type EmbeddedUseCaseRequest as W, type EmbeddedUseCaseRequestBase as X, type EntityPruneScopeUpdate as Y, type EntitySyncState as Z, type EntitySyncStatusResponse as _, Components as a, type
|
|
13607
|
+
export { type EntityUpdate as $, type AccessLogEntry as A, type DirectEntityOperation as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type DirectMeterReadingOperation as E, type DirectPayload as F, type DirectRelationItem as G, type DirectRelationRefItem as H, type DirectRelationRefValue as I, type DirectRelationValue as J, type DirectSimulationError as K, type DirectSimulationRequest as L, type DirectSimulationResponse as M, type DocumentationPage as N, type OperationMethods as O, Paths as P, type DocumentationPageSummary as Q, type EmbeddedFileProxyUseCaseRequest as R, type EmbeddedInboundUseCaseRequest as S, type EmbeddedManagedCallUseCaseRequest as T, type EmbeddedOutboundUseCaseRequest as U, type EmbeddedSecureProxyUseCaseRequest as V, type EmbeddedUseCaseRequest as W, type EmbeddedUseCaseRequestBase as X, type EntityPruneScopeUpdate as Y, type EntitySyncState as Z, type EntitySyncStatusResponse as _, Components as a, type IntegrationMeterReading as a$, type EnvVarRefConfig as a0, type EnvironmentFieldConfig as a1, type ErpEvent as a2, type ErpEventV3 as a3, type ErpImportDownload as a4, type ErpImportEntityDetail as a5, type ErpImportError as a6, type ErpImportFilePreview as a7, type ErpImportIssue as a8, type ErpImportJob as a9, type GenerateTypesPreviewResponse as aA, type GenerateTypesRequest as aB, type GenerateTypesResponse as aC, type GetMonitoringRunCompletionV2Request as aD, type GetMonitoringStatsRequest as aE, type GetMonitoringStatsV2Request as aF, type GetMonitoringTimeSeriesRequest as aG, type GetMonitoringTimeSeriesV2Request as aH, type InboundIntegrationEventConfiguration as aI, type InboundMonitoringEvent as aJ, type InboundUseCase as aK, type InboundUseCaseHistoryEntry as aL, type IngestExternalMonitoringEventsRequest as aM, type IngestExternalMonitoringEventsResponse as aN, type Integration as aO, type IntegrationAppMapping as aP, type IntegrationConfigurationV1 as aQ, type IntegrationConfigurationV2 as aR, type IntegrationEditableFields as aS, type IntegrationEntity as aT, type IntegrationEntityConditional as aU, type IntegrationEntityField as aV, type IntegrationEntityFromRows as aW, type IntegrationEntitySharing as aX, type IntegrationEntitySharingPartner as aY, type IntegrationFieldV1 as aZ, type IntegrationMap as a_, type ErpImportList as aa, type ErpImportProgress as ab, type ErpImportUseCaseSuggestion as ac, type ErpImportValidation as ad, type ErpUpdateEventStatus as ae, type ErpUpdateProcessedEntity as af, type ErpUpdateProcessingError as ag, type ErpUpdatesEventsV2Request as ah, type ErpUpdatesEventsV3Request as ai, type ErrorResponseBase as aj, type ExecuteErpImportRequest as ak, type ExternalMonitoringSpan as al, type FileProxyAuth as am, type FileProxyDeliveryConfig as an, type FileProxyFanOutConfig as ao, type FileProxyParam as ap, type FileProxyResponseConfig as aq, type FileProxySecureProxyAttachment as ar, type FileProxyStep as as, type FileProxyUploadConfig as at, type FileProxyUrlConfig as au, type FileProxyUrlParam as av, type FileProxyUrlParams as aw, type FileProxyUseCase as ax, type FileProxyUseCaseConfiguration as ay, type FileProxyUseCaseHistoryEntry as az, type PathsDictionary as b, type RedriveOutboundDlqRequest as b$, type IntegrationNotificationConfig as b0, type IntegrationObjectV1 as b1, type IntegrationSettings as b2, type IntegrationWithUseCases as b3, type ManagedCallAuth as b4, type ManagedCallErrorResponse as b5, type ManagedCallExecuteRequest as b6, type ManagedCallExecuteResponse as b7, type ManagedCallOperation as b8, type ManagedCallOperationConfig as b9, type NotificationStatusResponse as bA, type OutboundConflict as bB, type OutboundDlqListResponse as bC, type OutboundDlqMessage as bD, type OutboundFileProxyTargetStatus as bE, type OutboundIntegrationEventConfiguration as bF, type OutboundMapping as bG, type OutboundMappingSimulationError as bH, type OutboundMessage as bI, type OutboundMonitoringEvent as bJ, type OutboundPollStatus as bK, type OutboundStatusResponse as bL, type OutboundUseCase as bM, type OutboundUseCaseHistoryEntry as bN, type OutboundUseCaseStatus as bO, type PollDeliveryConfig as bP, type PollOutboundMessagesRequest as bQ, type PollOutboundMessagesResponse as bR, type PortalOrigin as bS, type PortalRefConfig as bT, type PortalRefFilter as bU, type PruneScopeConfig as bV, type QueryAccessLogsRequest as bW, type QueryEventsRequest as bX, type QueryInboundMonitoringEventsRequest as bY, type QueryMonitoringEventsV2Request as bZ, type QueryOutboundMonitoringEventsRequest as b_, type ManagedCallUseCase as ba, type ManagedCallUseCaseHistoryEntry as bb, type MappedFieldValue as bc, type MappingSimulationRequest as bd, type MappingSimulationResponse as be, type MappingSimulationV2Request as bf, type MappingSimulationWarning as bg, type MeterReadingPruneScopeConfig as bh, type MeterReadingPruneScopeUpdate as bi, type MeterReadingUpdate as bj, type MeterUniqueIdsConfig as bk, type MonitoringCode as bl, type MonitoringEventV2 as bm, type MonitoringRunCompletionV2 as bn, type MonitoringRunCompletionV2Response as bo, type MonitoringRunEntriesV2 as bp, type MonitoringStats as bq, type MonitoringStatsV2 as br, type MonitoringTraceResponse as bs, type NotificationChannelSet as bt, type NotificationDigestConfig as bu, type NotificationHistoryItem as bv, type NotificationHistoryResponse as bw, type NotificationRecipient as bx, type NotificationRule as by, type NotificationRuleStatus as bz, type AckOutboundMessagesRequest as c, type RedriveOutboundDlqResponse as c0, type RedriveOutboundDlqResult as c1, type RelationConfig as c2, type RelationItemConfig as c3, type RelationRefItemConfig as c4, type RelationRefValueConfig as c5, type RelationRefsConfig as c6, type RelationUniqueIdField as c7, type RepeatableFieldType as c8, type ReplayEventsRequest as c9, type UnblockOutboundStreamResponse as cA, type UpdateFileProxyUseCaseRequest as cB, type UpdateInboundUseCaseRequest as cC, type UpdateIntegrationRequest as cD, type UpdateManagedCallUseCaseRequest as cE, type UpdateOutboundUseCaseRequest as cF, type UpdateSecureProxyUseCaseRequest as cG, type UpdateUseCaseRequest as cH, type UpdateUseCaseRequestBase as cI, type UpsertDocumentationPageRequest as cJ, type UpsertIntegrationWithUseCasesRequest as cK, type UseCase as cL, type UseCaseBase as cM, type UseCaseHistoryEntry as cN, type UseCaseHistoryEntryBase as cO, type UseCaseTypePreview as cP, type ValidateErpImportRequest as cQ, type WebhookDeliveryConfig as cR, type WebhookStatus as cS, type RuleBaselineBucket as ca, type RuleBaselineStatus as cb, type S3Reference as cc, type SecureProxyRequest as cd, type SecureProxyResponse as ce, type SecureProxySummary as cf, type SecureProxyUpstreamError as cg, type SecureProxyUseCase as ch, type SecureProxyUseCaseConfiguration as ci, type SecureProxyUseCaseHistoryEntry as cj, type SecureProxyWhitelist as ck, type SecureProxyWhitelistUpdate as cl, type SetIntegrationAppMappingRequest as cm, type SimulateOutboundMappingRequest as cn, type SimulateOutboundMappingResponse as co, type SuggestErpImportUseCasesResponse as cp, type TestNotificationRequest as cq, type TestNotificationResponse as cr, type TimeSeriesBreakdownItemV2 as cs, type TimeSeriesBucket as ct, type TimeSeriesBucketV2 as cu, type TriggerErpActionRequest as cv, type TriggerWebhookResp as cw, type TypeAnnotations as cx, type TypeDescriptor as cy, type UnblockOutboundStreamRequest as cz, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CorrelationCloseResult as j, type CorrelationStatus as k, type CorrelationStatusList as l, type CorrelationUseCaseCounts as m, type CorrelationWaitBadRequest as n, type CorrelationWaitResult as o, type CreateErpImportRequest as p, type CreateErpImportResponse as q, type CreateFileProxyUseCaseRequest as r, type CreateInboundUseCaseRequest as s, type CreateIntegrationRequest as t, type CreateManagedCallUseCaseRequest as u, type CreateOutboundUseCaseRequest as v, type CreateSecureProxyUseCaseRequest as w, type CreateUseCaseRequest as x, type CreateUseCaseRequestBase as y, type DeliveryConfig as z };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/workflow-definition.json
|
|
4
|
+
var workflow_definition_default = '# Workflows Definitions\n\n- **Base URL:** `https://workflows-definition.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/workflow-definition](https://docs.epilot.io/api/workflow-definition)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.workflowDefinition.getMaxAllowedLimit(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/workflow-definition\'\n\nconst workflowDefinitionClient = getClient()\nauthorize(workflowDefinitionClient, () => \'<token>\')\nconst { data } = await workflowDefinitionClient.getMaxAllowedLimit(...)\n```\n\n## Operations\n\n**Workflows**\n- [`getMaxAllowedLimit`](#getmaxallowedlimit)\n- [`getDefinitions`](#getdefinitions)\n- [`createDefinition`](#createdefinition)\n- [`getDefinition`](#getdefinition)\n- [`updateDefinition`](#updatedefinition)\n- [`deleteDefinition`](#deletedefinition)\n- [`getWorkflowClosingReasons`](#getworkflowclosingreasons)\n- [`setWorkflowClosingReasons`](#setworkflowclosingreasons)\n\n**Flows V2**\n- [`listFlowTemplates`](#listflowtemplates)\n- [`createFlowTemplate`](#createflowtemplate)\n- [`searchFlowTemplates`](#searchflowtemplates)\n- [`getFlowTemplate`](#getflowtemplate)\n- [`updateFlowTemplate`](#updateflowtemplate)\n- [`deleteFlowTemplate`](#deleteflowtemplate)\n- [`duplicateFlowTemplate`](#duplicateflowtemplate)\n\n**Closing Reason**\n- [`getAllClosingReasons`](#getallclosingreasons)\n- [`createClosingReason`](#createclosingreason)\n- [`getClosingReason`](#getclosingreason)\n- [`updateClosingReason`](#updateclosingreason)\n- [`deleteClosingReason`](#deleteclosingreason)\n- [`changeReasonStatus`](#changereasonstatus)\n\n**Schemas**\n- [`FlowTemplateBase`](#flowtemplatebase)\n- [`FlowLimitWarning`](#flowlimitwarning)\n- [`FlowTemplate`](#flowtemplate)\n- [`Version`](#version)\n- [`Trigger`](#trigger)\n- [`ManualTrigger`](#manualtrigger)\n- [`AutomationTrigger`](#automationtrigger)\n- [`JourneyAutomationTrigger`](#journeyautomationtrigger)\n- [`JourneySubmissionTrigger`](#journeysubmissiontrigger)\n- [`CreateFlowTemplate`](#createflowtemplate)\n- [`SearchFlowTemplates`](#searchflowtemplates)\n- [`FlowTemplatesList`](#flowtemplateslist)\n- [`FlowTemplateId`](#flowtemplateid)\n- [`Task`](#task)\n- [`ManualTask`](#manualtask)\n- [`AutomationTask`](#automationtask)\n- [`AutomationFailurePolicy`](#automationfailurepolicy)\n- [`AutomationConfig`](#automationconfig)\n- [`EmailReviewConfig`](#emailreviewconfig)\n- [`AutomationInputContext`](#automationinputcontext)\n- [`FlowContextSettings`](#flowcontextsettings)\n- [`MainContextSetting`](#maincontextsetting)\n- [`FlowDisplayRule`](#flowdisplayrule)\n- [`FlowRuleAnchor`](#flowruleanchor)\n- [`MainContextAnchor`](#maincontextanchor)\n- [`RuleAnchor`](#ruleanchor)\n- [`AutomationOutputContext`](#automationoutputcontext)\n- [`AiAgentTask`](#aiagenttask)\n- [`AgentConfig`](#agentconfig)\n- [`TriggerMode`](#triggermode)\n- [`ActionSchedule`](#actionschedule)\n- [`ImmediateSchedule`](#immediateschedule)\n- [`DelayedSchedule`](#delayedschedule)\n- [`RelativeSchedule`](#relativeschedule)\n- [`DecisionTask`](#decisiontask)\n- [`TaskBase`](#taskbase)\n- [`Phase`](#phase)\n- [`Stage`](#stage)\n- [`VariableAssignment`](#variableassignment)\n- [`TaskType`](#tasktype)\n- [`Edge`](#edge)\n- [`Condition`](#condition)\n- [`Statement`](#statement)\n- [`EvaluationSource`](#evaluationsource)\n- [`Operator`](#operator)\n- [`DueDateConfig`](#duedateconfig)\n- [`TimeUnit`](#timeunit)\n- [`EnableRequirement`](#enablerequirement)\n- [`Subtask`](#subtask)\n- [`WorkflowDefinition`](#workflowdefinition)\n- [`Step`](#step)\n- [`Section`](#section)\n- [`TriggerType`](#triggertype)\n- [`ItemType`](#itemtype)\n- [`StepType`](#steptype)\n- [`StepJourney`](#stepjourney)\n- [`AiPrefillConfig`](#aiprefillconfig)\n- [`AiPrefillExtractionField`](#aiprefillextractionfield)\n- [`AiPrefillMapping`](#aiprefillmapping)\n- [`JourneyContextParameter`](#journeycontextparameter)\n- [`ECPDetails`](#ecpdetails)\n- [`PartnerDetails`](#partnerdetails)\n- [`StepDescription`](#stepdescription)\n- [`MaxAllowedLimit`](#maxallowedlimit)\n- [`DefinitionNotFoundResp`](#definitionnotfoundresp)\n- [`ClosingReasonNotFoundResp`](#closingreasonnotfoundresp)\n- [`ChangeReasonStatusReq`](#changereasonstatusreq)\n- [`ClosingReasons`](#closingreasons)\n- [`ClosingReason`](#closingreason)\n- [`ClosingReasonsStatus`](#closingreasonsstatus)\n- [`ClosingReasonsIds`](#closingreasonsids)\n- [`ClosingReasonId`](#closingreasonid)\n- [`ErrorResp`](#errorresp)\n- [`UpdateEntityAttributes`](#updateentityattributes)\n- [`EntitySync`](#entitysync)\n- [`DynamicDueDate`](#dynamicduedate)\n- [`StepRequirement`](#steprequirement)\n- [`JourneyContextUsagesReq`](#journeycontextusagesreq)\n- [`JourneyContextUsage`](#journeycontextusage)\n- [`JourneyContextUsagesResp`](#journeycontextusagesresp)\n\n### `getMaxAllowedLimit`\n\nGet limits and number of created executions for an Organization.\n\n`GET /v1/workflows/limits/max-allowed`\n\n```ts\nconst { data } = await client.getMaxAllowedLimit()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "currentNoOfWorkflows": 0,\n "maxAllowed": 0\n}\n```\n\n</details>\n\n---\n\n### `getDefinitions`\n\nRetrieve all V1 workflow definitions belonging to the authenticated organization.\n\n`GET /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.getDefinitions()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {},\n {}\n ],\n "closingReasons": [\n {}\n ],\n "updateEntityAttributes": [\n {}\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n }\n]\n```\n\n</details>\n\n---\n\n### `createDefinition`\n\nCreate a new V1 workflow definition. The definition consists of sections and steps\nthat define the structure of the workflow. Once created, the definition can be used\nto start workflow executions.\n\n`POST /v1/workflows/definitions`\n\n```ts\nconst { data } = await client.createDefinition(\n null,\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `listFlowTemplates`\n\nList all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values.\n\n`GET /v2/flows/templates`\n\n```ts\nconst { data } = await client.listFlowTemplates({\n trigger_type: \'example\',\n trigger_source_id: \'example\',\n trigger_schema: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {},\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "stages": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {},\n "limit_warnings": [],\n "keep_task_automations_in_sync": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createFlowTemplate`\n\nCreate a new Flow Template (V2 workflow definition).\n\n`POST /v2/flows/templates`\n\n```ts\nconst { data } = await client.createFlowTemplate(\n {\n enforce_limits: true,\n },\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n portal_titles: {\n ecp: \'string\',\n installer: \'string\'\n },\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n input_entity: \'thread\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n stages: [\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n entry_node_id: \'string\',\n cut_edge_ids: [\'string\'],\n color: \'string\',\n portal_names: { /* ... */ },\n portal_descriptions: { /* ... */ }\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n required: false,\n subtasks: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n required: false,\n subtasks: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n on_failure: \'stop\',\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\'],\n linear: true,\n context_settings: {\n visibility: \'entity_views\',\n main_context: {\n schema: \'string\',\n relation_labels: [\'string\']\n },\n displays: [\n { /* ... */ }\n ]\n },\n limit_warnings: [\n {\n i18nKey: \'string\',\n message: \'string\',\n max: 0,\n current: 0,\n node_id: \'string\',\n task_name: \'string\',\n branch_name: \'string\',\n param_name: \'string\',\n path: [ /* ... */ ]\n }\n ],\n keep_task_automations_in_sync: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {\n "ecp": "string",\n "installer": "string"\n },\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "stages": [\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "entry_node_id": "string",\n "cut_edge_ids": ["string"],\n "color": "string",\n "portal_names": {},\n "portal_descriptions": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "on_failure": "stop",\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {\n "visibility": "entity_views",\n "main_context": {\n "schema": "string",\n "relation_labels": ["string"]\n },\n "displays": [\n {}\n ]\n },\n "limit_warnings": [\n {\n "i18nKey": "string",\n "message": "string",\n "max": 0,\n "current": 0,\n "node_id": "string",\n "task_name": "string",\n "branch_name": "string",\n "param_name": "string",\n "path": []\n }\n ],\n "keep_task_automations_in_sync": true\n}\n```\n\n</details>\n\n---\n\n### `searchFlowTemplates`\n\nSearch for flow templates by name, trigger type, enabled status, and more.\n\n`POST /v2/flows/templates:search`\n\n```ts\nconst { data } = await client.searchFlowTemplates(\n null,\n {\n name: \'string\',\n definition_id: \'string\',\n trigger_type: \'journey_submission\',\n enabled: true,\n from: 0,\n size: 0,\n sort_by: \'updated_at\',\n sort_order: \'desc\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {},\n "trigger": {},\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [],\n "phases": [],\n "stages": [],\n "tasks": [],\n "edges": [],\n "closing_reasons": [],\n "entity_sync": [],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {},\n "limit_warnings": [],\n "keep_task_automations_in_sync": true\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getFlowTemplate`\n\nRetrieve a specific flow template by its unique identifier.\n\n`GET /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.getFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {\n "ecp": "string",\n "installer": "string"\n },\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "stages": [\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "entry_node_id": "string",\n "cut_edge_ids": ["string"],\n "color": "string",\n "portal_names": {},\n "portal_descriptions": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "on_failure": "stop",\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {\n "visibility": "entity_views",\n "main_context": {\n "schema": "string",\n "relation_labels": ["string"]\n },\n "displays": [\n {}\n ]\n },\n "limit_warnings": [\n {\n "i18nKey": "string",\n "message": "string",\n "max": 0,\n "current": 0,\n "node_id": "string",\n "task_name": "string",\n "branch_name": "string",\n "param_name": "string",\n "path": []\n }\n ],\n "keep_task_automations_in_sync": true\n}\n```\n\n</details>\n\n---\n\n### `updateFlowTemplate`\n\nUpdate Flow Template.\n\n`PUT /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.updateFlowTemplate(\n {\n flowId: \'example\',\n enforce_limits: true,\n },\n {\n id: \'string\',\n org_id: \'string\',\n name: \'string\',\n description: \'string\',\n portal_titles: {\n ecp: \'string\',\n installer: \'string\'\n },\n trigger: {\n type: \'automation\',\n automation_id: \'g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg\'\n },\n enabled: true,\n version: 2,\n created_at: \'2021-04-27T12:01:13.000Z\',\n updated_at: \'2021-04-27T12:01:13.000Z\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: {\n duration: 0,\n unit: \'minutes\',\n type: \'WORKFLOW_STARTED\',\n task_id: \'string\',\n phase_id: \'string\'\n },\n assigned_to: [\'string\'],\n available_in_ecp: true,\n additional_triggers: [\n {\n id: \'string\',\n type: \'manual\',\n entity_schema: \'string\'\n },\n {\n id: \'string\',\n type: \'automation\',\n automation_id: \'string\',\n input_entity: \'thread\',\n trigger_config: [ /* ... */ ]\n },\n /* ... 2 more */\n ],\n phases: [\n {\n id: \'string\',\n name: \'string\',\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n assigned_to: [\'string\'],\n taxonomies: [\'string\']\n }\n ],\n stages: [\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n entry_node_id: \'string\',\n cut_edge_ids: [\'string\'],\n color: \'string\',\n portal_names: { /* ... */ },\n portal_descriptions: { /* ... */ }\n }\n ],\n tasks: [\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n required: false,\n subtasks: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\'\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n journey: { /* ... */ },\n due_date: \'2021-04-27T12:00:00.000Z\',\n due_date_config: { /* ... */ },\n requirements: [ /* ... */ ],\n required: false,\n subtasks: [ /* ... */ ],\n assigned_to: [\'string\'],\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\'],\n phase_id: \'string\',\n task_type: \'MANUAL\',\n automation_config: { /* ... */ },\n on_failure: \'stop\',\n trigger_mode: \'manual\',\n schedule: { /* ... */ },\n created_automatically: false\n },\n /* ... 2 more */\n ],\n edges: [\n {\n id: \'string\',\n from_id: \'string\',\n to_id: \'string\',\n condition_id: \'string\',\n none_met: true\n }\n ],\n closing_reasons: [\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n }\n ],\n entity_sync: [\n {\n trigger: { /* ... */ },\n target: { /* ... */ },\n value: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\'],\n linear: true,\n context_settings: {\n visibility: \'entity_views\',\n main_context: {\n schema: \'string\',\n relation_labels: [\'string\']\n },\n displays: [\n { /* ... */ }\n ]\n },\n limit_warnings: [\n {\n i18nKey: \'string\',\n message: \'string\',\n max: 0,\n current: 0,\n node_id: \'string\',\n task_name: \'string\',\n branch_name: \'string\',\n param_name: \'string\',\n path: [ /* ... */ ]\n }\n ],\n keep_task_automations_in_sync: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {\n "ecp": "string",\n "installer": "string"\n },\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "stages": [\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "entry_node_id": "string",\n "cut_edge_ids": ["string"],\n "color": "string",\n "portal_names": {},\n "portal_descriptions": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "on_failure": "stop",\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {\n "visibility": "entity_views",\n "main_context": {\n "schema": "string",\n "relation_labels": ["string"]\n },\n "displays": [\n {}\n ]\n },\n "limit_warnings": [\n {\n "i18nKey": "string",\n "message": "string",\n "max": 0,\n "current": 0,\n "node_id": "string",\n "task_name": "string",\n "branch_name": "string",\n "param_name": "string",\n "path": []\n }\n ],\n "keep_task_automations_in_sync": true\n}\n```\n\n</details>\n\n---\n\n### `deleteFlowTemplate`\n\nDelete Flow Template.\n\n`DELETE /v2/flows/templates/{flowId}`\n\n```ts\nconst { data } = await client.deleteFlowTemplate({\n flowId: \'example\',\n})\n```\n\n---\n\n### `duplicateFlowTemplate`\n\nCreate a copy of an existing flow template. The duplicated template will have a new\nunique identifier and can be modified independently of the original. This is useful\nfor creating variations of exist\n\n`POST /v2/flows/templates/{flowId}/duplicate`\n\n```ts\nconst { data } = await client.duplicateFlowTemplate({\n flowId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "portal_titles": {\n "ecp": "string",\n "installer": "string"\n },\n "trigger": {\n "type": "automation",\n "automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"\n },\n "enabled": true,\n "version": 2,\n "created_at": "2021-04-27T12:01:13.000Z",\n "updated_at": "2021-04-27T12:01:13.000Z",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {\n "duration": 0,\n "unit": "minutes",\n "type": "WORKFLOW_STARTED",\n "task_id": "string",\n "phase_id": "string"\n },\n "assigned_to": ["string"],\n "available_in_ecp": true,\n "additional_triggers": [\n {\n "id": "string",\n "type": "manual",\n "entity_schema": "string"\n },\n {\n "id": "string",\n "type": "automation",\n "automation_id": "string",\n "input_entity": "thread",\n "trigger_config": []\n }\n ],\n "phases": [\n {\n "id": "string",\n "name": "string",\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "assigned_to": ["string"],\n "taxonomies": ["string"]\n }\n ],\n "stages": [\n {\n "id": "string",\n "name": "string",\n "description": "string",\n "entry_node_id": "string",\n "cut_edge_ids": ["string"],\n "color": "string",\n "portal_names": {},\n "portal_descriptions": {}\n }\n ],\n "tasks": [\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL"\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "journey": {},\n "due_date": "2021-04-27T12:00:00.000Z",\n "due_date_config": {},\n "requirements": [],\n "required": false,\n "subtasks": [],\n "assigned_to": ["string"],\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"],\n "phase_id": "string",\n "task_type": "MANUAL",\n "automation_config": {},\n "on_failure": "stop",\n "trigger_mode": "manual",\n "schedule": {},\n "created_automatically": false\n }\n ],\n "edges": [\n {\n "id": "string",\n "from_id": "string",\n "to_id": "string",\n "condition_id": "string",\n "none_met": true\n }\n ],\n "closing_reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ],\n "entity_sync": [\n {\n "trigger": {},\n "target": {},\n "value": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"],\n "linear": true,\n "context_settings": {\n "visibility": "entity_views",\n "main_context": {\n "schema": "string",\n "relation_labels": ["string"]\n },\n "displays": [\n {}\n ]\n },\n "limit_warnings": [\n {\n "i18nKey": "string",\n "message": "string",\n "max": 0,\n "current": 0,\n "node_id": "string",\n "task_name": "string",\n "branch_name": "string",\n "param_name": "string",\n "path": []\n }\n ],\n "keep_task_automations_in_sync": true\n}\n```\n\n</details>\n\n---\n\n### `getDefinition`\n\nGet specific Definition by id from the Organization.\n\n`GET /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.getDefinition({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `updateDefinition`\n\nUpdate Workflow Definition.\n\n`PUT /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.updateDefinition(\n {\n definitionId: \'example\',\n },\n {\n id: \'string\',\n name: \'string\',\n description: \'string\',\n creationTime: \'2021-04-27T12:01:13.000Z\',\n enabled: true,\n lastUpdateTime: \'2021-04-27T12:01:13.000Z\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: {\n numberOfUnits: 0,\n timePeriod: \'minutes\',\n actionTypeCondition: \'WORKFLOW_STARTED\',\n stepId: \'string\',\n phaseId: \'string\'\n },\n userIds: [0],\n assignedTo: [\'string\'],\n enableECPWorkflow: true,\n flow: [\n {\n id: \'string\',\n name: \'string\',\n order: 0,\n type: \'STEP\',\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n assignedTo: [\'string\'],\n steps: [ /* ... */ ],\n taxonomies: [\'string\']\n },\n {\n id: \'string\',\n name: \'string\',\n description: { /* ... */ },\n executionType: \'MANUAL\',\n automationConfig: { /* ... */ },\n journey: { /* ... */ },\n order: 0,\n dueDate: \'2021-04-27T12:00:00.000Z\',\n dynamicDueDate: { /* ... */ },\n userIds: [0],\n requirements: [ /* ... */ ],\n assignedTo: [\'string\'],\n type: \'STEP\',\n ecp: { /* ... */ },\n installer: { /* ... */ },\n partner: { /* ... */ },\n taxonomies: [\'string\']\n }\n ],\n closingReasons: [\n {\n id: \'x739cew\'\n }\n ],\n updateEntityAttributes: [\n {\n source: \'workflow_status\',\n target: { /* ... */ }\n }\n ],\n taxonomies: [\'string\'],\n singleClosingReasonSelection: true,\n _manifest: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "name": "string",\n "description": "string",\n "creationTime": "2021-04-27T12:01:13.000Z",\n "enabled": true,\n "lastUpdateTime": "2021-04-27T12:01:13.000Z",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {\n "numberOfUnits": 0,\n "timePeriod": "minutes",\n "actionTypeCondition": "WORKFLOW_STARTED",\n "stepId": "string",\n "phaseId": "string"\n },\n "userIds": [0],\n "assignedTo": ["string"],\n "enableECPWorkflow": true,\n "flow": [\n {\n "id": "string",\n "name": "string",\n "order": 0,\n "type": "STEP",\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "assignedTo": ["string"],\n "steps": [],\n "taxonomies": ["string"]\n },\n {\n "id": "string",\n "name": "string",\n "description": {},\n "executionType": "MANUAL",\n "automationConfig": {},\n "journey": {},\n "order": 0,\n "dueDate": "2021-04-27T12:00:00.000Z",\n "dynamicDueDate": {},\n "userIds": [0],\n "requirements": [],\n "assignedTo": ["string"],\n "type": "STEP",\n "ecp": {},\n "installer": {},\n "partner": {},\n "taxonomies": ["string"]\n }\n ],\n "closingReasons": [\n {\n "id": "x739cew"\n }\n ],\n "updateEntityAttributes": [\n {\n "source": "workflow_status",\n "target": {}\n }\n ],\n "taxonomies": ["string"],\n "singleClosingReasonSelection": true,\n "_manifest": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `deleteDefinition`\n\nDelete Workflow Definition.\n\n`DELETE /v1/workflows/definitions/{definitionId}`\n\n```ts\nconst { data } = await client.deleteDefinition({\n definitionId: \'example\',\n})\n```\n\n---\n\n### `getAllClosingReasons`\n\nGet all Closing Reasons defined in the organization by default all Active.\n\n`GET /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.getAllClosingReasons({\n includeInactive: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createClosingReason`\n\nA created Closing Reason is stored for the organization and will be displayed in the library of reasons.\n\n`POST /v1/workflows/closing-reasons`\n\n```ts\nconst { data } = await client.createClosingReason(\n null,\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `getClosingReason`\n\nGet specific closing reason by id from the organisation.\n\n`GET /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.getClosingReason({\n reasonId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClosingReason`\n\nUpdate an existing closing reason\n\n`PATCH /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.updateClosingReason(\n {\n reasonId: \'example\',\n },\n {\n id: \'string\',\n title: \'string\',\n status: \'ACTIVE\',\n lastUpdateTime: \'string\',\n creationTime: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "title": "string",\n "status": "ACTIVE",\n "lastUpdateTime": "string",\n "creationTime": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteClosingReason`\n\nPermanently delete a closing reason (Using INACTIVE status is recommended instead)\n\n`DELETE /v2/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.deleteClosingReason({\n reasonId: \'example\',\n})\n```\n\n---\n\n### `changeReasonStatus`\n\nChange the status of a Closing Reason (eg. ACTIVE to INACTIVE).\n\n`PATCH /v1/workflows/closing-reasons/{reasonId}`\n\n```ts\nconst { data } = await client.changeReasonStatus(\n {\n reasonId: \'example\',\n },\n {\n status: \'ACTIVE\'\n },\n)\n```\n\n---\n\n### `getWorkflowClosingReasons`\n\nReturns all closing reasons defined for the workflow.\n\n`GET /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.getWorkflowClosingReasons({\n definitionId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "reasons": [\n {\n "id": "x739cew"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setWorkflowClosingReasons`\n\nSets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.\n\n`PATCH /v1/workflows/definitions/{definitionId}/closing-reasons`\n\n```ts\nconst { data } = await client.setWorkflowClosingReasons(\n {\n definitionId: \'example\',\n },\n {\n reasons: [\n {\n id: \'x739cew\'\n }\n ]\n },\n)\n```\n\n---\n\n## Schemas\n\n### `FlowTemplateBase`\n\nBase schema for V2 flow templates. A flow template defines the structure of a workflow\nincluding phases, tasks, edges, triggers, and other configuration. Flow templates serve\nas blueprints that can be instantiated as flow executions.\n\n\n```ts\ntype FlowTemplateBase = {\n id?: string\n org_id?: string\n name: string\n description?: string\n portal_titles?: {\n ecp?: string\n installer?: string\n }\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n stages?: Array<{\n id: string\n name: string\n description?: string\n entry_node_id?: string\n cut_edge_ids?: string[]\n color?: string\n portal_names?: {\n ecp?: { ... }\n // ...\n}\n```\n\n### `FlowLimitWarning`\n\nA configuration limit that the flow currently exceeds. Returned by the get-flow endpoint and by create/update responses so the UI can show a non-blocking banner. Size/count limit violations never cause a 400 \u2014 only structural errors do. The flow remains fully usable; users are encouraged to bring va\n\n```ts\ntype FlowLimitWarning = {\n i18nKey: string\n message: string\n max: number\n current?: number\n node_id?: string\n task_name?: string\n branch_name?: string\n param_name?: string\n path: unknown[]\n}\n```\n\n### `FlowTemplate`\n\n```ts\ntype FlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n portal_titles?: {\n ecp?: string\n installer?: string\n }\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n stages?: Array<{\n id: string\n name: string\n description?: string\n entry_node_id?: string\n cut_edge_ids?: string[]\n color?: string\n portal_names?: {\n ecp?: { ... }\n // ...\n}\n```\n\n### `Version`\n\nVersion of the workflow schema.\n\n- `v1` \u2013 *Deprecated*. The initial version of workflows with limited structure and automation capabilities.\n- `v2` \u2013 Linear workflows. Supports sequential task execution with basic automation triggers.\n- `v3` \u2013 Advanced workflows. Adds support for branching logic (co\n\n```ts\ntype Version = "v1" | "v2" | "v3"\n```\n\n### `Trigger`\n\n```ts\ntype Trigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n} | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n} | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n} | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `ManualTrigger`\n\n```ts\ntype ManualTrigger = {\n id?: string\n type: "manual"\n entity_schema?: string\n}\n```\n\n### `AutomationTrigger`\n\n```ts\ntype AutomationTrigger = {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: string\n configuration?: Record<string, unknown>\n }>\n}\n```\n\n### `JourneyAutomationTrigger`\n\n```ts\ntype JourneyAutomationTrigger = {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n}\n```\n\n### `JourneySubmissionTrigger`\n\n```ts\ntype JourneySubmissionTrigger = {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n}\n```\n\n### `CreateFlowTemplate`\n\n```ts\ntype CreateFlowTemplate = {\n id?: string\n org_id?: string\n name: string\n description?: string\n portal_titles?: {\n ecp?: string\n installer?: string\n }\n trigger?: {\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: string\n type: "manual"\n entity_schema?: string\n } | {\n id?: string\n type: "automation"\n automation_id?: string\n input_entity?: "thread" | "first_email" | "last_email"\n trigger_config?: Array<{\n type: { ... }\n configuration?: { ... }\n }>\n } | {\n id?: string\n type: "journey_submission"\n journey_id: string\n journey_name?: string\n automation_id?: string\n } | {\n id?: string\n type: "journey_automation"\n entity_schema?: string\n }>\n phases?: Array<{\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n taxonomies?: string[]\n }>\n stages?: Array<{\n id: string\n name: string\n description?: string\n entry_node_id?: string\n cut_edge_ids?: string[]\n color?: string\n portal_names?: {\n ecp?: { ... }\n // ...\n}\n```\n\n### `SearchFlowTemplates`\n\n```ts\ntype SearchFlowTemplates = {\n name?: string\n definition_id?: string\n trigger_type?: "journey_submission" | "manual" | "automation"\n enabled?: boolean\n from?: number\n size?: number\n sort_by?: "created_at" | "updated_at" | "name" | "enabled" | "id"\n sort_order?: "asc" | "desc"\n}\n```\n\n### `FlowTemplatesList`\n\n```ts\ntype FlowTemplatesList = {\n results: Array<{\n id?: string\n org_id?: string\n name: string\n description?: string\n portal_titles?: {\n ecp?: { ... }\n installer?: { ... }\n }\n trigger?: {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n input_entity?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }\n enabled?: boolean\n version?: "v1" | "v2" | "v3"\n created_at?: string\n updated_at?: string\n due_date?: string\n due_date_config?: {\n duration: { ... }\n unit: { ... }\n type: { ... }\n task_id?: { ... }\n phase_id?: { ... }\n }\n assigned_to?: Array<string | {\n variable: { ... }\n value?: { ... }\n }>\n available_in_ecp?: boolean\n additional_triggers?: Array<{\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n automation_id?: { ... }\n input_entity?: { ... }\n trigger_config?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n journey_id: { ... }\n journey_name?: { ... }\n automation_id?: { ... }\n } | {\n id?: { ... }\n type: { ... }\n entity_schema?: { ... }\n }>\n phases?: Array<{\n id: { ... }\n name: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n assigned_to?: { ... }\n taxonomies?: { ... }\n }>\n stages?: Array<{\n id: { ... }\n name: { ... }\n description?: { ... }\n entry_node_id?: { ... }\n cut_edge_ids?: { ... }\n color?: { ... }\n portal_names?: { ... }\n portal_descriptions?: { ... }\n }>\n tasks: Array<{\n id: { ... }\n name: { ... }\n description?: { ... }\n journey?: { ... }\n due_date?: { ... }\n due_date_config?: { ... }\n requirements?: { ... }\n required?: { ... }\n subtasks?: { ... }\n assigned_to?: { ... }\n ecp?: { ... }\n installer?: { ... }\n // ...\n}\n```\n\n### `FlowTemplateId`\n\nShort unique id (length 8) to identify the Flow Template.\n\n```ts\ntype FlowTemplateId = string\n```\n\n### `Task`\n\n```ts\ntype Task = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n} | {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n // ...\n}\n```\n\n### `ManualTask`\n\n```ts\ntype ManualTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `AutomationTask`\n\n```ts\ntype AutomationTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n automation_config: {\n flow_id?: string\n action_config?: {\n type: { ... }\n config?: { ... }\n }\n duplicated_flow_id?: string\n input_context?: {\n source: { ... }\n task_id?: { ... }\n trigger_id?: { ... }\n // ...\n}\n```\n\n### `AutomationFailurePolicy`\n\nWhat the flow does when this automation ends in a failed state. `stop` waits on the failed task until it is retried or skipped. `continue` proceeds to the next task. An absent value means `stop`.\n\n```ts\ntype AutomationFailurePolicy = "stop" | "continue"\n```\n\n### `AutomationConfig`\n\nConfiguration for automation execution to run\n\n```ts\ntype AutomationConfig = {\n flow_id?: string\n action_config?: {\n type: string\n config?: Record<string, unknown>\n }\n duplicated_flow_id?: string\n input_context?: {\n source: "trigger" | "task"\n task_id?: string\n trigger_id?: string\n }\n output_context?: {\n set_as_primary?: boolean\n attach_to_contexts?: boolean\n }\n eligible_closing_reason_ids?: string[]\n email_review?: {\n enabled?: boolean\n allow_document_selection?: boolean\n allow_subject_and_body_edit?: boolean\n }\n allow_execution_note?: boolean\n}\n```\n\n### `EmailReviewConfig`\n\nWhether the person running a semi-automated send-email step may adjust the email before it goes out, and what they may adjust. Meaningful only on a task a person triggers \u2014 the engine\'s own dispatch has nobody to review \u2014 so the template healer clears it from an `automatic` task. With `enabled` fals\n\n```ts\ntype EmailReviewConfig = {\n enabled?: boolean\n allow_document_selection?: boolean\n allow_subject_and_body_edit?: boolean\n}\n```\n\n### `AutomationInputContext`\n\nOptional. Source of the entity fed into this automation task. If omitted, the entity of the trigger that started the run is used.\n\n\n```ts\ntype AutomationInputContext = {\n source: "trigger" | "task"\n task_id?: string\n trigger_id?: string\n}\n```\n\n### `FlowContextSettings`\n\nWhere a flow runs, and where people see it.\nA run is ALWAYS visible on the entities it runs on \u2014 the entity its trigger supplied and every context it picks up. That is not configurable: it is what running there means, and hiding a run from its own entity is what `visibility: background` is for.\n`dis\n\n```ts\ntype FlowContextSettings = {\n visibility?: "entity_views" | "background"\n main_context?: {\n schema: string\n relation_labels?: string[]\n }\n displays?: Array<{\n id: string\n entity_schema: string\n from?: {\n role: { ... }\n } | {\n role: { ... }\n rule_id: { ... }\n }\n relation_labels?: string[]\n attach_to_contexts?: boolean\n }>\n}\n```\n\n### `MainContextSetting`\n\nWhich of a flow\'s contexts owns the run: the entity conditions, automations and entity sync resolve against by default.\nABSENT means the historical behaviour \u2014 the primary trigger\'s entity. That default exists because it describes every flow built so far, not because the primary trigger is special: \n\n```ts\ntype MainContextSetting = {\n schema: string\n relation_labels?: string[]\n}\n```\n\n### `FlowDisplayRule`\n\nOne additional entity kind the flow should be visible on, found by relation from the main context or from an earlier entry.\nAn entity reached this way has no context of its own: it shows the main context\'s run, and acting on it acts on the main context. Nothing is copied and no second run starts.\nTh\n\n```ts\ntype FlowDisplayRule = {\n id: string\n entity_schema: string\n from?: {\n role: "main_context"\n } | {\n role: "rule"\n rule_id: string\n }\n relation_labels?: string[]\n attach_to_contexts?: boolean\n}\n```\n\n### `FlowRuleAnchor`\n\nWhere an entry starts looking. Absent means `main_context`.\nA ROLE, not a schema: an entry anchored on `main_context` follows the primary when a task promotes another entity, where naming a schema would freeze it on the old one.\n\n\n```ts\ntype FlowRuleAnchor = {\n role: "main_context"\n} | {\n role: "rule"\n rule_id: string\n}\n```\n\n### `MainContextAnchor`\n\nThe run\'s primary context, whatever it currently is.\n\n```ts\ntype MainContextAnchor = {\n role: "main_context"\n}\n```\n\n### `RuleAnchor`\n\nAn earlier entry in `displays`, by its id: this entry searches from whatever that one matched. Chaining ticket -> contact -> account this way keeps both hops DISPLAY-only; making the contact a real context first is a separate decision (`attach_to_contexts`), not a prerequisite for reaching the accou\n\n```ts\ntype RuleAnchor = {\n role: "rule"\n rule_id: string\n}\n```\n\n### `AutomationOutputContext`\n\nOptional. What happens to the entity produced by this automation task (the last successful entity-producing action of its automation).\n\n\n```ts\ntype AutomationOutputContext = {\n set_as_primary?: boolean\n attach_to_contexts?: boolean\n}\n```\n\n### `AiAgentTask`\n\n```ts\ntype AiAgentTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n agent_config?: {\n agent_id: string\n }\n trigger_mode?: "manual" | "automatic"\n}\n```\n\n### `AgentConfig`\n\nConfiguration for AI Agent to run\n\n```ts\ntype AgentConfig = {\n agent_id: string\n}\n```\n\n### `TriggerMode`\n\n```ts\ntype TriggerMode = "manual" | "automatic"\n```\n\n### `ActionSchedule`\n\n```ts\ntype ActionSchedule = {\n mode?: "immediate"\n} | {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n} | {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `ImmediateSchedule`\n\n```ts\ntype ImmediateSchedule = {\n mode?: "immediate"\n}\n```\n\n### `DelayedSchedule`\n\n```ts\ntype DelayedSchedule = {\n mode: "delayed"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n}\n```\n\n### `RelativeSchedule`\n\n```ts\ntype RelativeSchedule = {\n mode: "relative"\n direction: "before" | "after"\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n reference: {\n id: string\n origin: "flow_started" | "task_completed" | "trigger_entity_attribute" | "all_preceding_tasks_completed"\n schema?: string\n attribute?: string\n }\n}\n```\n\n### `DecisionTask`\n\n```ts\ntype DecisionTask = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n trigger_mode: "manual" | "automatic"\n conditions: Array<{\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: { ... }\n source: { ... }\n operator: { ... }\n values: { ... }\n value_type?: { ... }\n // ...\n}\n```\n\n### `TaskBase`\n\n```ts\ntype TaskBase = {\n id: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n requirements?: Array<{\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n }>\n required?: boolean\n subtasks?: Array<{\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n }>\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n phase_id?: string\n task_type: "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n}\n```\n\n### `Phase`\n\n```ts\ntype Phase = {\n id: string\n name: string\n due_date?: string\n due_date_config?: {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n }\n assigned_to?: Array<string | {\n variable: string\n value?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `Stage`\n\nA customer-facing progress segment layered on top of the flow graph. Unlike phases (internal task grouping), stages exist to communicate progress to outside users (e.g. end customers) with a title and description. Stages form a strict total order; the array order is the boundary order and must match\n\n```ts\ntype Stage = {\n id: string\n name: string\n description?: string\n entry_node_id?: string\n cut_edge_ids?: string[]\n color?: string\n portal_names?: {\n ecp?: string\n installer?: string\n }\n portal_descriptions?: {\n ecp?: string\n installer?: string\n }\n}\n```\n\n### `VariableAssignment`\n\nRepresents a variable assignment with its expression and optional resolved value. Used for dynamic user assignments that get resolved during workflow execution.\n\n```ts\ntype VariableAssignment = {\n variable: string\n value?: string[]\n}\n```\n\n### `TaskType`\n\n```ts\ntype TaskType = "MANUAL" | "AUTOMATION" | "DECISION" | "AI_AGENT"\n```\n\n### `Edge`\n\n```ts\ntype Edge = {\n id: string\n from_id: string\n to_id?: string\n condition_id?: string\n none_met?: boolean\n}\n```\n\n### `Condition`\n\n```ts\ntype Condition = {\n id: string\n branch_name: string\n logical_operator: "AND" | "OR"\n statements: Array<{\n id: string\n source: {\n id?: { ... }\n origin?: { ... }\n origin_type?: { ... }\n schema?: { ... }\n attribute?: { ... }\n attribute_type?: { ... }\n attribute_repeatable?: { ... }\n attribute_operation?: { ... }\n attributes?: { ... }\n attributes_match?: { ... }\n attribute_sub_field?: { ... }\n date_offset?: { ... }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n }>\n}\n```\n\n### `Statement`\n\n```ts\ntype Statement = {\n id: string\n source: {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block" | "trigger_source" | "main_context"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attributes?: string[]\n attributes_match?: "any" | "all"\n attribute_sub_field?: string\n date_offset?: {\n amount?: { ... }\n unit?: { ... }\n }\n }\n operator: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n values: string[]\n value_type?: "static" | "relative_date"\n}\n```\n\n### `EvaluationSource`\n\n```ts\ntype EvaluationSource = {\n id?: string\n origin?: "trigger" | "action"\n origin_type?: "entity" | "workflow" | "journey_block" | "trigger_source" | "main_context"\n schema?: string\n attribute?: string\n attribute_type?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "message_email_address"\n attribute_repeatable?: boolean\n attribute_operation?: "all" | "updated" | "added" | "deleted"\n attributes?: string[]\n attributes_match?: "any" | "all"\n attribute_sub_field?: string\n date_offset?: {\n amount?: number\n unit?: "days" | "months" | "years"\n }\n}\n```\n\n### `Operator`\n\n```ts\ntype Operator = "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty"\n```\n\n### `DueDateConfig`\n\nSet due date for the task based on a dynamic condition\n\n```ts\ntype DueDateConfig = {\n duration: number\n unit: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n type: "WORKFLOW_STARTED" | "TASK_FINISHED" | "PHASE_FINISHED" | "A_PRECEDING_TASK_COMPLETED" | "ALL_PRECEDING_TASKS_COMPLETED"\n task_id?: string\n phase_id?: string\n}\n```\n\n### `TimeUnit`\n\n```ts\ntype TimeUnit = "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n```\n\n### `EnableRequirement`\n\ndescribe the requirement for a task to be enabled\n\n```ts\ntype EnableRequirement = {\n task_id?: string\n phase_id?: string\n when: "TASK_FINISHED" | "PHASE_FINISHED"\n}\n```\n\n### `Subtask`\n\nOne checklist item of a task, derived from the checklist markup in the party descriptions. Identity is the stable data-subtask-id the editor mints into the markup.\n\n```ts\ntype Subtask = {\n id: string\n name?: string\n party: "description" | "ecp" | "installer" | "partner"\n required?: boolean\n}\n```\n\n### `WorkflowDefinition`\n\nV1 workflow definition schema. Defines a linear workflow structure with sections\nand steps. Sections group related steps together, and steps represent individual\ntasks that need to be completed. This is the legacy workflow model; for new\nimplementations, consider using V2 flow templates instead.\n\n\n```ts\ntype WorkflowDefinition = {\n id?: string\n name: string\n description?: string\n creationTime?: string\n enabled?: boolean\n lastUpdateTime?: string\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n assignedTo?: string[]\n enableECPWorkflow?: boolean\n flow: Array<{\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n assignedTo?: string[]\n steps: Array<{\n id?: { ... }\n name: { ... }\n description?: { ... }\n executionType?: { ... }\n automationConfig?: { ... }\n journey?: { ... }\n order: { ... }\n dueDate?: { ... }\n dynamicDueDate?: { ... }\n userIds?: { ... }\n requirements?: { ... }\n assignedTo?: { ... }\n type: { ... }\n ecp?: { ... }\n installer?: { ... }\n partner?: { ... }\n taxonomies?: { ... }\n }>\n taxonomies?: string[]\n } | {\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n // ...\n}\n```\n\n### `Step`\n\nAction that needs to be done in a Workflow\n\n```ts\ntype Step = {\n id?: string\n name: string\n description?: {\n enabled?: boolean\n value?: string\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: string\n }\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n installer?: {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n }\n partner?: {\n enabled?: boolean\n label?: string\n description?: string\n }\n taxonomies?: string[]\n}\n```\n\n### `Section`\n\nA group of Steps that define the progress of the Workflow\n\n```ts\ntype Section = {\n id?: string\n name: string\n order: number\n type: "STEP" | "SECTION"\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n }\n assignedTo?: string[]\n steps: Array<{\n id?: string\n name: string\n description?: {\n enabled?: { ... }\n value?: { ... }\n }\n executionType?: "MANUAL" | "AUTOMATION"\n automationConfig?: {\n flowId: { ... }\n }\n journey?: {\n id?: { ... }\n journeyId?: { ... }\n name?: { ... }\n portal_button_label?: { ... }\n complete_task_automatically?: { ... }\n journey_submission_required?: { ... }\n context_parameters?: { ... }\n ai_prefill?: { ... }\n }\n order: number\n dueDate?: string\n dynamicDueDate?: {\n numberOfUnits: { ... }\n timePeriod: { ... }\n actionTypeCondition: { ... }\n stepId?: { ... }\n phaseId?: { ... }\n }\n userIds?: number[]\n requirements?: Array<{\n definitionId: { ... }\n type: { ... }\n condition: { ... }\n }>\n assignedTo?: string[]\n type: "STEP" | "SECTION"\n ecp?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n installer?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n journey?: { ... }\n }\n partner?: {\n enabled?: { ... }\n label?: { ... }\n description?: { ... }\n }\n taxonomies?: string[]\n }>\n taxonomies?: string[]\n}\n```\n\n### `TriggerType`\n\n```ts\ntype TriggerType = "MANUAL" | "AUTOMATIC"\n```\n\n### `ItemType`\n\n```ts\ntype ItemType = "STEP" | "SECTION"\n```\n\n### `StepType`\n\n```ts\ntype StepType = "MANUAL" | "AUTOMATION"\n```\n\n### `StepJourney`\n\n```ts\ntype StepJourney = {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: string\n value: string\n }>\n ai_prefill?: {\n enabled?: boolean\n source?: {\n type?: { ... }\n input_entity?: { ... }\n }\n extraction_fields?: Array<{\n key: { ... }\n type: { ... }\n description?: { ... }\n description_overridden?: { ... }\n enum?: { ... }\n }>\n mappings?: Array<{\n source: { ... }\n block_id: { ... }\n block_type: { ... }\n block_field?: { ... }\n }>\n min_confidence?: number\n instructions?: string\n }\n}\n```\n\n### `AiPrefillConfig`\n\nAI extraction + prefill configuration for the attached journey (Flows v2 only)\n\n```ts\ntype AiPrefillConfig = {\n enabled?: boolean\n source?: {\n type?: "flow_context"\n input_entity?: "thread" | "first_email" | "last_email"\n }\n extraction_fields?: Array<{\n key: string\n type: "string" | "number" | "boolean" | "date" | "enum"\n description?: string\n description_overridden?: boolean\n enum?: string[]\n }>\n mappings?: Array<{\n source: string\n block_id: string\n block_type: "text-input" | "number-input" | "personal-information" | "meter-reading"\n block_field?: string\n }>\n min_confidence?: number\n instructions?: string\n}\n```\n\n### `AiPrefillExtractionField`\n\n```ts\ntype AiPrefillExtractionField = {\n key: string\n type: "string" | "number" | "boolean" | "date" | "enum"\n description?: string\n description_overridden?: boolean\n enum?: string[]\n}\n```\n\n### `AiPrefillMapping`\n\n```ts\ntype AiPrefillMapping = {\n source: string\n block_id: string\n block_type: "text-input" | "number-input" | "personal-information" | "meter-reading"\n block_field?: string\n}\n```\n\n### `JourneyContextParameter`\n\n```ts\ntype JourneyContextParameter = {\n key: string\n value: string\n}\n```\n\n### `ECPDetails`\n\nDetails regarding ECP for the workflow step\n\n```ts\ntype ECPDetails = {\n enabled?: boolean\n label?: string\n description?: string\n journey?: {\n id?: string\n journeyId?: string\n name?: string\n portal_button_label?: string\n complete_task_automatically?: boolean\n journey_submission_required?: boolean\n context_parameters?: Array<{\n key: { ... }\n value: { ... }\n }>\n ai_prefill?: {\n enabled?: { ... }\n source?: { ... }\n extraction_fields?: { ... }\n mappings?: { ... }\n min_confidence?: { ... }\n instructions?: { ... }\n }\n }\n}\n```\n\n### `PartnerDetails`\n\nDetails regarding partner for the workflow step\n\n```ts\ntype PartnerDetails = {\n enabled?: boolean\n label?: string\n description?: string\n}\n```\n\n### `StepDescription`\n\nLonger information regarding Task\n\n```ts\ntype StepDescription = {\n enabled?: boolean\n value?: string\n}\n```\n\n### `MaxAllowedLimit`\n\n```ts\ntype MaxAllowedLimit = {\n currentNoOfWorkflows?: number\n maxAllowed?: number\n}\n```\n\n### `DefinitionNotFoundResp`\n\nError response returned when a workflow definition or flow template is not found.\n\n```ts\ntype DefinitionNotFoundResp = {\n message?: string\n}\n```\n\n### `ClosingReasonNotFoundResp`\n\nError response returned when a closing reason is not found.\n\n```ts\ntype ClosingReasonNotFoundResp = {\n message?: string\n}\n```\n\n### `ChangeReasonStatusReq`\n\n```ts\ntype ChangeReasonStatusReq = {\n status: "ACTIVE" | "INACTIVE"\n}\n```\n\n### `ClosingReasons`\n\n```ts\ntype ClosingReasons = {\n reasons: Array<{\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n }>\n}\n```\n\n### `ClosingReason`\n\nOne Closing reason for a workflow\n\n```ts\ntype ClosingReason = {\n id?: string\n title?: string\n status?: "ACTIVE" | "INACTIVE"\n lastUpdateTime?: string\n creationTime?: string\n}\n```\n\n### `ClosingReasonsStatus`\n\n```ts\ntype ClosingReasonsStatus = "ACTIVE" | "INACTIVE"\n```\n\n### `ClosingReasonsIds`\n\n```ts\ntype ClosingReasonsIds = {\n reasons: Array<{\n id: string\n }>\n}\n```\n\n### `ClosingReasonId`\n\n```ts\ntype ClosingReasonId = {\n id: string\n}\n```\n\n### `ErrorResp`\n\nStandard error response returned when an API request fails.\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `UpdateEntityAttributes`\n\n```ts\ntype UpdateEntityAttributes = {\n source: "workflow_status" | "current_section" | "current_step"\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `EntitySync`\n\n```ts\ntype EntitySync = {\n trigger: {\n event: "FlowStarted" | "FlowCompleted" | "FlowCancelled" | "FlowReopened" | "FlowDeleted" | "FlowAssigned" | "FlowDueDateChanged" | "FlowContextsChanged" | "TaskUpdated" | "CurrTaskChanged" | "TaskCompleted" | "TaskSkipped" | "TaskMarkedInProgress" | "TaskMarkedOnHold" | "PhaseUpdated" | "PhaseCompleted" | "PhaseSkipped" | "PhaseMarkedInProgress"\n filter?: {\n task_template_id?: { ... }\n phase_template_id?: { ... }\n }\n }\n value: {\n source: "workflow_name" | "workflow_status" | "workflow_assigned_to" | "task_name" | "task_status" | "task_assigned_to" | "phase_name" | "phase_status" | "phase_assigned_to" | "custom_value"\n value?: string\n }\n target: {\n entitySchema: string\n entityAttribute: string\n }\n}\n```\n\n### `DynamicDueDate`\n\nConfiguration for calculating a due date dynamically based on workflow events.\nThe due date is computed by adding a duration (numberOfUnits + timePeriod) to\na reference point defined by actionTypeCondition (e.g., when workflow started,\nwhen a step closed, or when a phase finished).\n\n\n```ts\ntype DynamicDueDate = {\n numberOfUnits: number\n timePeriod: "minutes" | "hours" | "days" | "weeks" | "months" | "years"\n actionTypeCondition: "WORKFLOW_STARTED" | "STEP_CLOSED" | "PHASE_FINISHED"\n stepId?: string\n phaseId?: string\n}\n```\n\n### `StepRequirement`\n\ndescribe the requirement for step enablement\n\n```ts\ntype StepRequirement = {\n definitionId: string\n type: "STEP" | "SECTION"\n condition: "CLOSED"\n}\n```\n\n### `JourneyContextUsagesReq`\n\nRequest payload for getJourneyContextUsages.\n\n```ts\ntype JourneyContextUsagesReq = {\n journey_id: string\n param_keys: string[]\n param_ids?: string[]\n}\n```\n\n### `JourneyContextUsage`\n\nOne place a flow template task presets one of the requested context parameters.\n\n```ts\ntype JourneyContextUsage = {\n kind: "workflow-task"\n resource: {\n type: "workflow_template"\n id: string\n name?: string\n }\n location?: {\n task_id?: string\n task_name?: string\n }\n matched_as: {\n dialect: "name"\n token: string\n at: string\n }\n link_hint?: {\n route: "workflows-hub-flow"\n params: {\n template_id: { ... }\n }\n }\n}\n```\n\n### `JourneyContextUsagesResp`\n\nResponse payload for getJourneyContextUsages.\n\n```ts\ntype JourneyContextUsagesResp = {\n usages: Array<{\n kind: "workflow-task"\n resource: {\n type: { ... }\n id: { ... }\n name?: { ... }\n }\n location?: {\n task_id?: { ... }\n task_name?: { ... }\n }\n matched_as: {\n dialect: { ... }\n token: { ... }\n at: { ... }\n }\n link_hint?: {\n route: { ... }\n params: { ... }\n }\n }>\n status: "ok" | "partial"\n scanned: number\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = workflow_definition_default;
|