@coast/core-api-types 1.2.184 → 1.2.186

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.
Files changed (27) hide show
  1. package/dist/models/application/HeaderKeys.d.ts +1 -0
  2. package/dist/models/application/HeaderKeys.js +1 -0
  3. package/dist/models/application/HeaderKeys.js.map +1 -1
  4. package/dist/models/automations/AutomationContext.d.ts +4 -0
  5. package/dist/models/automations/action/AutomationActionRegistry.d.ts +2 -1
  6. package/dist/models/automations/action/AutomationActionType.d.ts +1 -0
  7. package/dist/models/automations/action/AutomationActionType.js +1 -0
  8. package/dist/models/automations/action/AutomationActionType.js.map +1 -1
  9. package/dist/models/automations/action/SendWebhookAction.d.ts +5 -0
  10. package/dist/models/automations/action/SendWebhookAction.js +3 -0
  11. package/dist/models/automations/action/SendWebhookAction.js.map +1 -0
  12. package/dist/models/automations/action/settings/AutomationActionSettingsOneOf.d.ts +2 -0
  13. package/dist/models/automations/action/settings/AutomationActionSettingsRegistry.d.ts +2 -1
  14. package/dist/models/automations/action/settings/SendWebhookActionSettings.d.ts +5 -0
  15. package/dist/models/automations/action/settings/SendWebhookActionSettings.js +3 -0
  16. package/dist/models/automations/action/settings/SendWebhookActionSettings.js.map +1 -0
  17. package/dist/models/card/ExternalCardEventPayload.d.ts +2 -0
  18. package/dist/models/webhook/WebhookType.d.ts +4 -0
  19. package/dist/models/webhook/WebhookType.js +9 -0
  20. package/dist/models/webhook/WebhookType.js.map +1 -0
  21. package/dist/models/webhook/WorkflowEntityWebhookPayload.d.ts +7 -0
  22. package/dist/models/webhook/WorkflowEntityWebhookPayload.js +3 -0
  23. package/dist/models/webhook/WorkflowEntityWebhookPayload.js.map +1 -0
  24. package/dist/models/workflow-entity/WorkflowEntityEventId.d.ts +2 -0
  25. package/dist/models/workflow-entity/WorkflowEntityEventId.js +3 -0
  26. package/dist/models/workflow-entity/WorkflowEntityEventId.js.map +1 -0
  27. package/package.json +1 -1
@@ -3,6 +3,7 @@ export declare enum HeaderKeys {
3
3
  BUSINESS_ID = "x-coast-business-id",
4
4
  BUSINESS_ID_OVERRIDE = "x-coast-business-id-override",
5
5
  COAST_EXECUTION_CONTEXT = "x-coast-execution-context",
6
+ HMAC_SIGNATURE = "x-coast-signature",
6
7
  REQUEST_CONTEXT = "x-coast-request-context",
7
8
  SOURCE_AUTOMATION_ID = "x-coast-source-automation-id",
8
9
  TRACE_ID = "x-coast-trace-id"
@@ -7,6 +7,7 @@ var HeaderKeys;
7
7
  HeaderKeys["BUSINESS_ID"] = "x-coast-business-id";
8
8
  HeaderKeys["BUSINESS_ID_OVERRIDE"] = "x-coast-business-id-override";
9
9
  HeaderKeys["COAST_EXECUTION_CONTEXT"] = "x-coast-execution-context";
10
+ HeaderKeys["HMAC_SIGNATURE"] = "x-coast-signature";
10
11
  HeaderKeys["REQUEST_CONTEXT"] = "x-coast-request-context";
11
12
  HeaderKeys["SOURCE_AUTOMATION_ID"] = "x-coast-source-automation-id";
12
13
  HeaderKeys["TRACE_ID"] = "x-coast-trace-id";
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderKeys.js","sourceRoot":"","sources":["../../../src/models/application/HeaderKeys.ts"],"names":[],"mappings":";;;AACA,IAAY,UAQX;AARD,WAAY,UAAU;IAClB,6CAA+B,CAAA;IAC/B,iDAAmC,CAAA;IACnC,mEAAqD,CAAA;IACrD,mEAAqD,CAAA;IACrD,yDAA2C,CAAA;IAC3C,mEAAqD,CAAA;IACrD,2CAA6B,CAAA;AACjC,CAAC,EARW,UAAU,0BAAV,UAAU,QAQrB"}
1
+ {"version":3,"file":"HeaderKeys.js","sourceRoot":"","sources":["../../../src/models/application/HeaderKeys.ts"],"names":[],"mappings":";;;AACA,IAAY,UASX;AATD,WAAY,UAAU;IAClB,6CAA+B,CAAA;IAC/B,iDAAmC,CAAA;IACnC,mEAAqD,CAAA;IACrD,mEAAqD,CAAA;IACrD,kDAAoC,CAAA;IACpC,yDAA2C,CAAA;IAC3C,mEAAqD,CAAA;IACrD,2CAA6B,CAAA;AACjC,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB"}
@@ -1,11 +1,13 @@
1
1
  import { BusinessId } from '../business/BusinessId';
2
2
  import { OriginUserId } from '../user/UserId';
3
+ import { WorkflowEntityEventId } from '../workflow-entity/WorkflowEntityEventId';
3
4
  import { EntityFields } from '../workflow-template/entities/EntityFields';
4
5
  import { EntityRefs } from '../workflow-template/entities/refs/EntityRefs';
5
6
  import { WorkflowEntity } from '../workflow-template/entities/WorkflowEntity';
6
7
  import { AutomationActionResult } from './action/AutomationActionResult';
7
8
  import { AutomationEventContext } from './AutomationEventContext';
8
9
  import { AutomationId } from './AutomationId';
10
+ import { AutomationTriggerType } from './AutomationTriggerType';
9
11
  export interface AutomationContext {
10
12
  businessId: BusinessId;
11
13
  workflowEntity: WorkflowEntity;
@@ -16,4 +18,6 @@ export interface AutomationContext {
16
18
  eventContext: AutomationEventContext;
17
19
  automationId: AutomationId;
18
20
  originUserId: OriginUserId | undefined;
21
+ trigger: AutomationTriggerType;
22
+ eventId: WorkflowEntityEventId;
19
23
  }
@@ -5,10 +5,11 @@ import { ReferencedInQuantitySumAction } from './ReferencedInQuantitySumAction';
5
5
  import { SendEmailAction } from './SendEmailAction';
6
6
  import { SendNotificationAction } from './SendNotificationAction';
7
7
  import { SendPushNotificationAction } from './SendPushNotificationAction';
8
+ import { SendWebhookAction } from './SendWebhookAction';
8
9
  import { TriggerRelatedCardAutomationAction } from './TriggerRelatedCardAutomationAction';
9
10
  import { UpdateRelatedCardQuantityAction } from './UpdateRelatedCardQuantityAction';
10
11
  import { WorkflowEntityCreateAction } from './WorkflowEntityCreateAction';
11
12
  import { WorkflowEntityUpdateAction } from './WorkflowEntityUpdateAction';
12
13
  export declare namespace AutomationActionRegistry {
13
- type Any = CalculateValueAction | CurrentWorkflowEntityUpdateAction | ExternalFormLinkCreateAction | ReferencedInQuantitySumAction | SendEmailAction | SendNotificationAction | SendPushNotificationAction | TriggerRelatedCardAutomationAction | UpdateRelatedCardQuantityAction | WorkflowEntityCreateAction | WorkflowEntityUpdateAction;
14
+ type Any = CalculateValueAction | CurrentWorkflowEntityUpdateAction | ExternalFormLinkCreateAction | ReferencedInQuantitySumAction | SendEmailAction | SendNotificationAction | SendPushNotificationAction | SendWebhookAction | TriggerRelatedCardAutomationAction | UpdateRelatedCardQuantityAction | WorkflowEntityCreateAction | WorkflowEntityUpdateAction;
14
15
  }
@@ -6,6 +6,7 @@ export declare enum AutomationActionType {
6
6
  SEND_EMAIL = "SEND_EMAIL",
7
7
  SEND_NOTIFICATION = "SEND_NOTIFICATION",
8
8
  SEND_PUSH_NOTIFICATION = "SEND_PUSH_NOTIFICATION",
9
+ SEND_WEBHOOK = "SEND_WEBHOOK",
9
10
  TRIGGER_RELATED_CARD_AUTOMATION = "TRIGGER_RELATED_CARD_AUTOMATION",
10
11
  UPDATE_CURRENT_WORKFLOW_ENTITY = "UPDATE_CURRENT_WORKFLOW_ENTITY",
11
12
  UPDATE_RELATED_CARD_QUANTITY = "UPDATE_RELATED_CARD_QUANTITY",
@@ -10,6 +10,7 @@ var AutomationActionType;
10
10
  AutomationActionType["SEND_EMAIL"] = "SEND_EMAIL";
11
11
  AutomationActionType["SEND_NOTIFICATION"] = "SEND_NOTIFICATION";
12
12
  AutomationActionType["SEND_PUSH_NOTIFICATION"] = "SEND_PUSH_NOTIFICATION";
13
+ AutomationActionType["SEND_WEBHOOK"] = "SEND_WEBHOOK";
13
14
  AutomationActionType["TRIGGER_RELATED_CARD_AUTOMATION"] = "TRIGGER_RELATED_CARD_AUTOMATION";
14
15
  AutomationActionType["UPDATE_CURRENT_WORKFLOW_ENTITY"] = "UPDATE_CURRENT_WORKFLOW_ENTITY";
15
16
  AutomationActionType["UPDATE_RELATED_CARD_QUANTITY"] = "UPDATE_RELATED_CARD_QUANTITY";
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationActionType.js","sourceRoot":"","sources":["../../../../src/models/automations/action/AutomationActionType.ts"],"names":[],"mappings":";;;AACA,IAAY,oBAYX;AAZD,WAAY,oBAAoB;IAC5B,2DAAmC,CAAA;IACnC,+EAAuD,CAAA;IACvD,yEAAiD,CAAA;IACjD,iFAAyD,CAAA;IACzD,iDAAyB,CAAA;IACzB,+DAAuC,CAAA;IACvC,yEAAiD,CAAA;IACjD,2FAAmE,CAAA;IACnE,yFAAiE,CAAA;IACjE,qFAA6D,CAAA;IAC7D,yEAAiD,CAAA;AACrD,CAAC,EAZW,oBAAoB,oCAApB,oBAAoB,QAY/B"}
1
+ {"version":3,"file":"AutomationActionType.js","sourceRoot":"","sources":["../../../../src/models/automations/action/AutomationActionType.ts"],"names":[],"mappings":";;;AACA,IAAY,oBAaX;AAbD,WAAY,oBAAoB;IAC5B,2DAAmC,CAAA;IACnC,+EAAuD,CAAA;IACvD,yEAAiD,CAAA;IACjD,iFAAyD,CAAA;IACzD,iDAAyB,CAAA;IACzB,+DAAuC,CAAA;IACvC,yEAAiD,CAAA;IACjD,qDAA6B,CAAA;IAC7B,2FAAmE,CAAA;IACnE,yFAAiE,CAAA;IACjE,qFAA6D,CAAA;IAC7D,yEAAiD,CAAA;AACrD,CAAC,EAbW,oBAAoB,oCAApB,oBAAoB,QAa/B"}
@@ -0,0 +1,5 @@
1
+ import { AutomationAction } from './AutomationAction';
2
+ import { SendWebhookActionSettings } from './settings/SendWebhookActionSettings';
3
+ export interface SendWebhookAction extends Omit<AutomationAction, 'settings'> {
4
+ settings: SendWebhookActionSettings;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SendWebhookAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendWebhookAction.js","sourceRoot":"","sources":["../../../../src/models/automations/action/SendWebhookAction.ts"],"names":[],"mappings":""}
@@ -8,6 +8,7 @@ import { ReferencedInQuantitySumActionSettings } from './ReferencedInQuantitySum
8
8
  import { SendEmailActionSettings } from './SendEmailActionSettings';
9
9
  import { SendNotificationActionSettings } from './SendNotificationActionSettings';
10
10
  import { SendPushNotificationActionSettings } from './SendPushNotificationActionSettings';
11
+ import { SendWebhookActionSettings } from './SendWebhookActionSettings';
11
12
  import { TriggerRelatedCardAutomationActionSettings } from './TriggerRelatedCardAutomationActionSettings';
12
13
  export interface AutomationActionSettingsOneOf {
13
14
  calculateValueActionSettings?: CreateCalculateValueActionSettings;
@@ -17,6 +18,7 @@ export interface AutomationActionSettingsOneOf {
17
18
  sendEmailActionSettings?: SendEmailActionSettings;
18
19
  sendNotificationActionSettings?: SendNotificationActionSettings;
19
20
  sendPushNotificationActionSettings?: SendPushNotificationActionSettings;
21
+ sendWebhookActionSettings?: SendWebhookActionSettings;
20
22
  triggerRelatedCardAutomationActionSettings?: TriggerRelatedCardAutomationActionSettings;
21
23
  updateRelatedCardQuantityActionSettings?: CreateUpdateRelatedCardQuantityActionSettings;
22
24
  workflowEntityCreateActionSettings?: CreateWorkflowEntityCreateActionSettings;
@@ -5,10 +5,11 @@ import { ReferencedInQuantitySumActionSettings } from './ReferencedInQuantitySum
5
5
  import { SendEmailActionSettings } from './SendEmailActionSettings';
6
6
  import { SendNotificationActionSettings } from './SendNotificationActionSettings';
7
7
  import { SendPushNotificationActionSettings } from './SendPushNotificationActionSettings';
8
+ import { SendWebhookActionSettings } from './SendWebhookActionSettings';
8
9
  import { TriggerRelatedCardAutomationActionSettings } from './TriggerRelatedCardAutomationActionSettings';
9
10
  import { UpdateRelatedCardQuantityActionSettings } from './UpdateRelatedCardQuantityActionSettings';
10
11
  import { WorkflowEntityCreateActionSettings } from './WorkflowEntityCreateActionSettings';
11
12
  import { WorkflowEntityUpdateActionSettings } from './WorkflowEntityUpdateActionSettings';
12
13
  export declare namespace AutomationActionSettingsRegistry {
13
- type Any = CalculateValueActionSettings | CurrentWorkflowEntityUpdateActionSettings | ExternalFormLinkCreateActionSettings | ReferencedInQuantitySumActionSettings | SendEmailActionSettings | SendNotificationActionSettings | SendPushNotificationActionSettings | TriggerRelatedCardAutomationActionSettings | UpdateRelatedCardQuantityActionSettings | WorkflowEntityCreateActionSettings | WorkflowEntityUpdateActionSettings;
14
+ type Any = CalculateValueActionSettings | CurrentWorkflowEntityUpdateActionSettings | ExternalFormLinkCreateActionSettings | ReferencedInQuantitySumActionSettings | SendEmailActionSettings | SendNotificationActionSettings | SendPushNotificationActionSettings | SendWebhookActionSettings | TriggerRelatedCardAutomationActionSettings | UpdateRelatedCardQuantityActionSettings | WorkflowEntityCreateActionSettings | WorkflowEntityUpdateActionSettings;
14
15
  }
@@ -0,0 +1,5 @@
1
+ import { AutomationActionSettings } from './AutomationActionSettings';
2
+ export interface SendWebhookActionSettings extends AutomationActionSettings {
3
+ destinationUrl: string;
4
+ secretKey: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SendWebhookActionSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendWebhookActionSettings.js","sourceRoot":"","sources":["../../../../../src/models/automations/action/settings/SendWebhookActionSettings.ts"],"names":[],"mappings":""}
@@ -2,6 +2,7 @@ import { BusinessId } from '../business/BusinessId';
2
2
  import { UserId } from '../user/UserId';
3
3
  import { NonEmptyArray } from '../utils/NonEmptyArray';
4
4
  import { WorkflowAutomationsEvent } from '../workflow-automation/WorkflowAutomationsEvent';
5
+ import { WorkflowEntityEventId } from '../workflow-entity/WorkflowEntityEventId';
5
6
  import { ComponentSubscriptionEvents } from '../workflow-template/component-subscription/ComponentSubscriptionEvents';
6
7
  import { CreateEntityAuditTrailEvent } from '../workflow-template/entities/audit-trail/CreateEntityAuditTrailEvent';
7
8
  import { RecurringEntitiesAutoExtendEvent } from '../workflow-template/entities/recurring/RecurringEntitiesAutoExtendEvent';
@@ -16,5 +17,6 @@ export interface ExternalCardEventPayload {
16
17
  entityAuditTrailEvent?: CreateEntityAuditTrailEvent;
17
18
  targetEntity: boolean;
18
19
  userId: UserId;
20
+ eventId: WorkflowEntityEventId;
19
21
  recurringEntitiesAutoExtendEvents?: NonEmptyArray<RecurringEntitiesAutoExtendEvent>;
20
22
  }
@@ -0,0 +1,4 @@
1
+ export declare enum WebhookType {
2
+ WORKFLOW_ENTITY_CREATED = "WORKFLOW_ENTITY_CREATED",
3
+ WORKFLOW_ENTITY_UPDATED = "WORKFLOW_ENTITY_UPDATED"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookType = void 0;
4
+ var WebhookType;
5
+ (function (WebhookType) {
6
+ WebhookType["WORKFLOW_ENTITY_CREATED"] = "WORKFLOW_ENTITY_CREATED";
7
+ WebhookType["WORKFLOW_ENTITY_UPDATED"] = "WORKFLOW_ENTITY_UPDATED";
8
+ })(WebhookType || (exports.WebhookType = WebhookType = {}));
9
+ //# sourceMappingURL=WebhookType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebhookType.js","sourceRoot":"","sources":["../../../src/models/webhook/WebhookType.ts"],"names":[],"mappings":";;;AACA,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kEAAmD,CAAA;IACnD,kEAAmD,CAAA;AACvD,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -0,0 +1,7 @@
1
+ import { WorkflowEntity } from '../workflow-template/entities/WorkflowEntity';
2
+ import { WebhookType } from './WebhookType';
3
+ export interface WorkflowEntityWebhookPayload {
4
+ id: string;
5
+ type: WebhookType.WORKFLOW_ENTITY_CREATED | WebhookType.WORKFLOW_ENTITY_UPDATED;
6
+ entity: WorkflowEntity;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=WorkflowEntityWebhookPayload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowEntityWebhookPayload.js","sourceRoot":"","sources":["../../../src/models/webhook/WorkflowEntityWebhookPayload.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { Brand } from '@paradoxical-io/types';
2
+ export type WorkflowEntityEventId = Brand<string, 'WorkflowEntityEventId'>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=WorkflowEntityEventId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowEntityEventId.js","sourceRoot":"","sources":["../../../src/models/workflow-entity/WorkflowEntityEventId.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coast/core-api-types",
3
- "version": "1.2.184",
3
+ "version": "1.2.186",
4
4
  "description": "Facilitates the generation of core-api-types npm package",
5
5
  "exports": {
6
6
  "./*": {