@coast/core-api-types 1.2.185 → 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.
@@ -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
  }
@@ -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.185",
3
+ "version": "1.2.186",
4
4
  "description": "Facilitates the generation of core-api-types npm package",
5
5
  "exports": {
6
6
  "./*": {