@zyphr-dev/node-sdk 0.1.17 → 0.1.19

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/dist/index.cjs CHANGED
@@ -304,6 +304,29 @@ __export(index_exports, {
304
304
  EndUserDeleteResponseFromJSONTyped: () => EndUserDeleteResponseFromJSONTyped,
305
305
  EndUserDeleteResponseToJSON: () => EndUserDeleteResponseToJSON,
306
306
  EndUserDeleteResponseToJSONTyped: () => EndUserDeleteResponseToJSONTyped,
307
+ ExecutionCancelResponseDataFromJSON: () => ExecutionCancelResponseDataFromJSON,
308
+ ExecutionCancelResponseDataFromJSONTyped: () => ExecutionCancelResponseDataFromJSONTyped,
309
+ ExecutionCancelResponseDataStatusEnum: () => ExecutionCancelResponseDataStatusEnum,
310
+ ExecutionCancelResponseDataToJSON: () => ExecutionCancelResponseDataToJSON,
311
+ ExecutionCancelResponseDataToJSONTyped: () => ExecutionCancelResponseDataToJSONTyped,
312
+ ExecutionCancelResponseFromJSON: () => ExecutionCancelResponseFromJSON,
313
+ ExecutionCancelResponseFromJSONTyped: () => ExecutionCancelResponseFromJSONTyped,
314
+ ExecutionCancelResponseToJSON: () => ExecutionCancelResponseToJSON,
315
+ ExecutionCancelResponseToJSONTyped: () => ExecutionCancelResponseToJSONTyped,
316
+ ExecutionResponseFromJSON: () => ExecutionResponseFromJSON,
317
+ ExecutionResponseFromJSONTyped: () => ExecutionResponseFromJSONTyped,
318
+ ExecutionResponseToJSON: () => ExecutionResponseToJSON,
319
+ ExecutionResponseToJSONTyped: () => ExecutionResponseToJSONTyped,
320
+ ExecutionRetryResponseDataFromJSON: () => ExecutionRetryResponseDataFromJSON,
321
+ ExecutionRetryResponseDataFromJSONTyped: () => ExecutionRetryResponseDataFromJSONTyped,
322
+ ExecutionRetryResponseDataStatusEnum: () => ExecutionRetryResponseDataStatusEnum,
323
+ ExecutionRetryResponseDataToJSON: () => ExecutionRetryResponseDataToJSON,
324
+ ExecutionRetryResponseDataToJSONTyped: () => ExecutionRetryResponseDataToJSONTyped,
325
+ ExecutionRetryResponseFromJSON: () => ExecutionRetryResponseFromJSON,
326
+ ExecutionRetryResponseFromJSONTyped: () => ExecutionRetryResponseFromJSONTyped,
327
+ ExecutionRetryResponseToJSON: () => ExecutionRetryResponseToJSON,
328
+ ExecutionRetryResponseToJSONTyped: () => ExecutionRetryResponseToJSONTyped,
329
+ ExecutionsApi: () => ExecutionsApi,
307
330
  FetchError: () => FetchError,
308
331
  ForgotPasswordRequestFromJSON: () => ForgotPasswordRequestFromJSON,
309
332
  ForgotPasswordRequestFromJSONTyped: () => ForgotPasswordRequestFromJSONTyped,
@@ -1447,6 +1470,25 @@ __export(index_exports, {
1447
1470
  WithdrawSubscriberConsentRequestFromJSONTyped: () => WithdrawSubscriberConsentRequestFromJSONTyped,
1448
1471
  WithdrawSubscriberConsentRequestToJSON: () => WithdrawSubscriberConsentRequestToJSON,
1449
1472
  WithdrawSubscriberConsentRequestToJSONTyped: () => WithdrawSubscriberConsentRequestToJSONTyped,
1473
+ WorkflowExecutionFromJSON: () => WorkflowExecutionFromJSON,
1474
+ WorkflowExecutionFromJSONTyped: () => WorkflowExecutionFromJSONTyped,
1475
+ WorkflowExecutionStatus: () => WorkflowExecutionStatus,
1476
+ WorkflowExecutionStatusFromJSON: () => WorkflowExecutionStatusFromJSON,
1477
+ WorkflowExecutionStatusFromJSONTyped: () => WorkflowExecutionStatusFromJSONTyped,
1478
+ WorkflowExecutionStatusToJSON: () => WorkflowExecutionStatusToJSON,
1479
+ WorkflowExecutionStatusToJSONTyped: () => WorkflowExecutionStatusToJSONTyped,
1480
+ WorkflowExecutionToJSON: () => WorkflowExecutionToJSON,
1481
+ WorkflowExecutionToJSONTyped: () => WorkflowExecutionToJSONTyped,
1482
+ WorkflowStepExecutionFromJSON: () => WorkflowStepExecutionFromJSON,
1483
+ WorkflowStepExecutionFromJSONTyped: () => WorkflowStepExecutionFromJSONTyped,
1484
+ WorkflowStepExecutionStatus: () => WorkflowStepExecutionStatus,
1485
+ WorkflowStepExecutionStatusFromJSON: () => WorkflowStepExecutionStatusFromJSON,
1486
+ WorkflowStepExecutionStatusFromJSONTyped: () => WorkflowStepExecutionStatusFromJSONTyped,
1487
+ WorkflowStepExecutionStatusToJSON: () => WorkflowStepExecutionStatusToJSON,
1488
+ WorkflowStepExecutionStatusToJSONTyped: () => WorkflowStepExecutionStatusToJSONTyped,
1489
+ WorkflowStepExecutionStepTypeEnum: () => WorkflowStepExecutionStepTypeEnum,
1490
+ WorkflowStepExecutionToJSON: () => WorkflowStepExecutionToJSON,
1491
+ WorkflowStepExecutionToJSONTyped: () => WorkflowStepExecutionToJSONTyped,
1450
1492
  Zyphr: () => Zyphr,
1451
1493
  ZyphrAuthenticationError: () => ZyphrAuthenticationError,
1452
1494
  ZyphrError: () => ZyphrError,
@@ -1520,6 +1562,11 @@ __export(index_exports, {
1520
1562
  instanceOfEmailTrackingResponse: () => instanceOfEmailTrackingResponse,
1521
1563
  instanceOfEndUserDeleteResponse: () => instanceOfEndUserDeleteResponse,
1522
1564
  instanceOfEndUserDeleteResponseData: () => instanceOfEndUserDeleteResponseData,
1565
+ instanceOfExecutionCancelResponse: () => instanceOfExecutionCancelResponse,
1566
+ instanceOfExecutionCancelResponseData: () => instanceOfExecutionCancelResponseData,
1567
+ instanceOfExecutionResponse: () => instanceOfExecutionResponse,
1568
+ instanceOfExecutionRetryResponse: () => instanceOfExecutionRetryResponse,
1569
+ instanceOfExecutionRetryResponseData: () => instanceOfExecutionRetryResponseData,
1523
1570
  instanceOfForgotPasswordRequest: () => instanceOfForgotPasswordRequest,
1524
1571
  instanceOfGenerateSubscriberToken200Response: () => instanceOfGenerateSubscriberToken200Response,
1525
1572
  instanceOfGenerateSubscriberToken200ResponseData: () => instanceOfGenerateSubscriberToken200ResponseData,
@@ -1790,6 +1837,10 @@ __export(index_exports, {
1790
1837
  instanceOfWebhookVersionsResponse: () => instanceOfWebhookVersionsResponse,
1791
1838
  instanceOfWebhookVersionsResponseData: () => instanceOfWebhookVersionsResponseData,
1792
1839
  instanceOfWithdrawSubscriberConsentRequest: () => instanceOfWithdrawSubscriberConsentRequest,
1840
+ instanceOfWorkflowExecution: () => instanceOfWorkflowExecution,
1841
+ instanceOfWorkflowExecutionStatus: () => instanceOfWorkflowExecutionStatus,
1842
+ instanceOfWorkflowStepExecution: () => instanceOfWorkflowStepExecution,
1843
+ instanceOfWorkflowStepExecutionStatus: () => instanceOfWorkflowStepExecutionStatus,
1793
1844
  mapValues: () => mapValues,
1794
1845
  parseErrorResponse: () => parseErrorResponse,
1795
1846
  querystring: () => querystring
@@ -4451,6 +4502,352 @@ function EndUserDeleteResponseToJSONTyped(value, ignoreDiscriminator = false) {
4451
4502
  };
4452
4503
  }
4453
4504
 
4505
+ // src/src/models/ExecutionCancelResponseData.ts
4506
+ var ExecutionCancelResponseDataStatusEnum = {
4507
+ CANCELLED: "cancelled"
4508
+ };
4509
+ function instanceOfExecutionCancelResponseData(value) {
4510
+ return true;
4511
+ }
4512
+ function ExecutionCancelResponseDataFromJSON(json) {
4513
+ return ExecutionCancelResponseDataFromJSONTyped(json, false);
4514
+ }
4515
+ function ExecutionCancelResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4516
+ if (json == null) {
4517
+ return json;
4518
+ }
4519
+ return {
4520
+ "id": json["id"] == null ? void 0 : json["id"],
4521
+ "status": json["status"] == null ? void 0 : json["status"]
4522
+ };
4523
+ }
4524
+ function ExecutionCancelResponseDataToJSON(json) {
4525
+ return ExecutionCancelResponseDataToJSONTyped(json, false);
4526
+ }
4527
+ function ExecutionCancelResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
4528
+ if (value == null) {
4529
+ return value;
4530
+ }
4531
+ return {
4532
+ "id": value["id"],
4533
+ "status": value["status"]
4534
+ };
4535
+ }
4536
+
4537
+ // src/src/models/ExecutionCancelResponse.ts
4538
+ function instanceOfExecutionCancelResponse(value) {
4539
+ return true;
4540
+ }
4541
+ function ExecutionCancelResponseFromJSON(json) {
4542
+ return ExecutionCancelResponseFromJSONTyped(json, false);
4543
+ }
4544
+ function ExecutionCancelResponseFromJSONTyped(json, ignoreDiscriminator) {
4545
+ if (json == null) {
4546
+ return json;
4547
+ }
4548
+ return {
4549
+ "data": json["data"] == null ? void 0 : ExecutionCancelResponseDataFromJSON(json["data"]),
4550
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
4551
+ };
4552
+ }
4553
+ function ExecutionCancelResponseToJSON(json) {
4554
+ return ExecutionCancelResponseToJSONTyped(json, false);
4555
+ }
4556
+ function ExecutionCancelResponseToJSONTyped(value, ignoreDiscriminator = false) {
4557
+ if (value == null) {
4558
+ return value;
4559
+ }
4560
+ return {
4561
+ "data": ExecutionCancelResponseDataToJSON(value["data"]),
4562
+ "meta": RequestMetaToJSON(value["meta"])
4563
+ };
4564
+ }
4565
+
4566
+ // src/src/models/WorkflowExecutionStatus.ts
4567
+ var WorkflowExecutionStatus = {
4568
+ PENDING: "pending",
4569
+ RUNNING: "running",
4570
+ COMPLETED: "completed",
4571
+ FAILED: "failed",
4572
+ CANCELLED: "cancelled"
4573
+ };
4574
+ function instanceOfWorkflowExecutionStatus(value) {
4575
+ for (const key in WorkflowExecutionStatus) {
4576
+ if (Object.prototype.hasOwnProperty.call(WorkflowExecutionStatus, key)) {
4577
+ if (WorkflowExecutionStatus[key] === value) {
4578
+ return true;
4579
+ }
4580
+ }
4581
+ }
4582
+ return false;
4583
+ }
4584
+ function WorkflowExecutionStatusFromJSON(json) {
4585
+ return WorkflowExecutionStatusFromJSONTyped(json, false);
4586
+ }
4587
+ function WorkflowExecutionStatusFromJSONTyped(json, ignoreDiscriminator) {
4588
+ return json;
4589
+ }
4590
+ function WorkflowExecutionStatusToJSON(value) {
4591
+ return value;
4592
+ }
4593
+ function WorkflowExecutionStatusToJSONTyped(value, ignoreDiscriminator) {
4594
+ return value;
4595
+ }
4596
+
4597
+ // src/src/models/WorkflowStepExecutionStatus.ts
4598
+ var WorkflowStepExecutionStatus = {
4599
+ PENDING: "pending",
4600
+ RUNNING: "running",
4601
+ COMPLETED: "completed",
4602
+ SKIPPED: "skipped",
4603
+ FAILED: "failed",
4604
+ WAITING: "waiting"
4605
+ };
4606
+ function instanceOfWorkflowStepExecutionStatus(value) {
4607
+ for (const key in WorkflowStepExecutionStatus) {
4608
+ if (Object.prototype.hasOwnProperty.call(WorkflowStepExecutionStatus, key)) {
4609
+ if (WorkflowStepExecutionStatus[key] === value) {
4610
+ return true;
4611
+ }
4612
+ }
4613
+ }
4614
+ return false;
4615
+ }
4616
+ function WorkflowStepExecutionStatusFromJSON(json) {
4617
+ return WorkflowStepExecutionStatusFromJSONTyped(json, false);
4618
+ }
4619
+ function WorkflowStepExecutionStatusFromJSONTyped(json, ignoreDiscriminator) {
4620
+ return json;
4621
+ }
4622
+ function WorkflowStepExecutionStatusToJSON(value) {
4623
+ return value;
4624
+ }
4625
+ function WorkflowStepExecutionStatusToJSONTyped(value, ignoreDiscriminator) {
4626
+ return value;
4627
+ }
4628
+
4629
+ // src/src/models/WorkflowStepExecution.ts
4630
+ var WorkflowStepExecutionStepTypeEnum = {
4631
+ EMAIL: "email",
4632
+ PUSH: "push",
4633
+ SMS: "sms",
4634
+ IN_APP: "in_app",
4635
+ SLACK: "slack",
4636
+ DISCORD: "discord",
4637
+ TEAMS: "teams",
4638
+ DELAY: "delay",
4639
+ BRANCH: "branch"
4640
+ };
4641
+ function instanceOfWorkflowStepExecution(value) {
4642
+ if (!("id" in value) || value["id"] === void 0) return false;
4643
+ if (!("executionId" in value) || value["executionId"] === void 0) return false;
4644
+ if (!("stepId" in value) || value["stepId"] === void 0) return false;
4645
+ if (!("status" in value) || value["status"] === void 0) return false;
4646
+ if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
4647
+ return true;
4648
+ }
4649
+ function WorkflowStepExecutionFromJSON(json) {
4650
+ return WorkflowStepExecutionFromJSONTyped(json, false);
4651
+ }
4652
+ function WorkflowStepExecutionFromJSONTyped(json, ignoreDiscriminator) {
4653
+ if (json == null) {
4654
+ return json;
4655
+ }
4656
+ return {
4657
+ "id": json["id"],
4658
+ "executionId": json["execution_id"],
4659
+ "stepId": json["step_id"],
4660
+ "status": WorkflowStepExecutionStatusFromJSON(json["status"]),
4661
+ "result": json["result"] == null ? void 0 : json["result"],
4662
+ "startedAt": json["started_at"] == null ? void 0 : new Date(json["started_at"]),
4663
+ "completedAt": json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
4664
+ "error": json["error"] == null ? void 0 : json["error"],
4665
+ "createdAt": new Date(json["created_at"]),
4666
+ "stepKey": json["step_key"] == null ? void 0 : json["step_key"],
4667
+ "stepName": json["step_name"] == null ? void 0 : json["step_name"],
4668
+ "stepType": json["step_type"] == null ? void 0 : json["step_type"]
4669
+ };
4670
+ }
4671
+ function WorkflowStepExecutionToJSON(json) {
4672
+ return WorkflowStepExecutionToJSONTyped(json, false);
4673
+ }
4674
+ function WorkflowStepExecutionToJSONTyped(value, ignoreDiscriminator = false) {
4675
+ if (value == null) {
4676
+ return value;
4677
+ }
4678
+ return {
4679
+ "id": value["id"],
4680
+ "execution_id": value["executionId"],
4681
+ "step_id": value["stepId"],
4682
+ "status": WorkflowStepExecutionStatusToJSON(value["status"]),
4683
+ "result": value["result"],
4684
+ "started_at": value["startedAt"] == null ? void 0 : value["startedAt"].toISOString(),
4685
+ "completed_at": value["completedAt"] == null ? void 0 : value["completedAt"].toISOString(),
4686
+ "error": value["error"],
4687
+ "created_at": value["createdAt"].toISOString(),
4688
+ "step_key": value["stepKey"],
4689
+ "step_name": value["stepName"],
4690
+ "step_type": value["stepType"]
4691
+ };
4692
+ }
4693
+
4694
+ // src/src/models/WorkflowExecution.ts
4695
+ function instanceOfWorkflowExecution(value) {
4696
+ if (!("id" in value) || value["id"] === void 0) return false;
4697
+ if (!("workflowId" in value) || value["workflowId"] === void 0) return false;
4698
+ if (!("accountId" in value) || value["accountId"] === void 0) return false;
4699
+ if (!("projectId" in value) || value["projectId"] === void 0) return false;
4700
+ if (!("subscriberId" in value) || value["subscriberId"] === void 0) return false;
4701
+ if (!("status" in value) || value["status"] === void 0) return false;
4702
+ if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
4703
+ return true;
4704
+ }
4705
+ function WorkflowExecutionFromJSON(json) {
4706
+ return WorkflowExecutionFromJSONTyped(json, false);
4707
+ }
4708
+ function WorkflowExecutionFromJSONTyped(json, ignoreDiscriminator) {
4709
+ if (json == null) {
4710
+ return json;
4711
+ }
4712
+ return {
4713
+ "id": json["id"],
4714
+ "workflowId": json["workflow_id"],
4715
+ "accountId": json["account_id"],
4716
+ "projectId": json["project_id"],
4717
+ "subscriberId": json["subscriber_id"],
4718
+ "topicKey": json["topic_key"] == null ? void 0 : json["topic_key"],
4719
+ "triggerPayload": json["trigger_payload"] == null ? void 0 : json["trigger_payload"],
4720
+ "transactionId": json["transaction_id"] == null ? void 0 : json["transaction_id"],
4721
+ "senderFrom": json["sender_from"] == null ? void 0 : json["sender_from"],
4722
+ "status": WorkflowExecutionStatusFromJSON(json["status"]),
4723
+ "currentStepId": json["current_step_id"] == null ? void 0 : json["current_step_id"],
4724
+ "stepExecutions": json["step_executions"] == null ? void 0 : json["step_executions"].map(WorkflowStepExecutionFromJSON),
4725
+ "startedAt": json["started_at"] == null ? void 0 : new Date(json["started_at"]),
4726
+ "completedAt": json["completed_at"] == null ? void 0 : new Date(json["completed_at"]),
4727
+ "createdAt": new Date(json["created_at"])
4728
+ };
4729
+ }
4730
+ function WorkflowExecutionToJSON(json) {
4731
+ return WorkflowExecutionToJSONTyped(json, false);
4732
+ }
4733
+ function WorkflowExecutionToJSONTyped(value, ignoreDiscriminator = false) {
4734
+ if (value == null) {
4735
+ return value;
4736
+ }
4737
+ return {
4738
+ "id": value["id"],
4739
+ "workflow_id": value["workflowId"],
4740
+ "account_id": value["accountId"],
4741
+ "project_id": value["projectId"],
4742
+ "subscriber_id": value["subscriberId"],
4743
+ "topic_key": value["topicKey"],
4744
+ "trigger_payload": value["triggerPayload"],
4745
+ "transaction_id": value["transactionId"],
4746
+ "sender_from": value["senderFrom"],
4747
+ "status": WorkflowExecutionStatusToJSON(value["status"]),
4748
+ "current_step_id": value["currentStepId"],
4749
+ "step_executions": value["stepExecutions"] == null ? void 0 : value["stepExecutions"].map(WorkflowStepExecutionToJSON),
4750
+ "started_at": value["startedAt"] == null ? void 0 : value["startedAt"].toISOString(),
4751
+ "completed_at": value["completedAt"] == null ? void 0 : value["completedAt"].toISOString(),
4752
+ "created_at": value["createdAt"].toISOString()
4753
+ };
4754
+ }
4755
+
4756
+ // src/src/models/ExecutionResponse.ts
4757
+ function instanceOfExecutionResponse(value) {
4758
+ return true;
4759
+ }
4760
+ function ExecutionResponseFromJSON(json) {
4761
+ return ExecutionResponseFromJSONTyped(json, false);
4762
+ }
4763
+ function ExecutionResponseFromJSONTyped(json, ignoreDiscriminator) {
4764
+ if (json == null) {
4765
+ return json;
4766
+ }
4767
+ return {
4768
+ "data": json["data"] == null ? void 0 : WorkflowExecutionFromJSON(json["data"]),
4769
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
4770
+ };
4771
+ }
4772
+ function ExecutionResponseToJSON(json) {
4773
+ return ExecutionResponseToJSONTyped(json, false);
4774
+ }
4775
+ function ExecutionResponseToJSONTyped(value, ignoreDiscriminator = false) {
4776
+ if (value == null) {
4777
+ return value;
4778
+ }
4779
+ return {
4780
+ "data": WorkflowExecutionToJSON(value["data"]),
4781
+ "meta": RequestMetaToJSON(value["meta"])
4782
+ };
4783
+ }
4784
+
4785
+ // src/src/models/ExecutionRetryResponseData.ts
4786
+ var ExecutionRetryResponseDataStatusEnum = {
4787
+ PENDING: "pending"
4788
+ };
4789
+ function instanceOfExecutionRetryResponseData(value) {
4790
+ if (!("id" in value) || value["id"] === void 0) return false;
4791
+ if (!("originalExecutionId" in value) || value["originalExecutionId"] === void 0) return false;
4792
+ if (!("status" in value) || value["status"] === void 0) return false;
4793
+ return true;
4794
+ }
4795
+ function ExecutionRetryResponseDataFromJSON(json) {
4796
+ return ExecutionRetryResponseDataFromJSONTyped(json, false);
4797
+ }
4798
+ function ExecutionRetryResponseDataFromJSONTyped(json, ignoreDiscriminator) {
4799
+ if (json == null) {
4800
+ return json;
4801
+ }
4802
+ return {
4803
+ "id": json["id"],
4804
+ "originalExecutionId": json["original_execution_id"],
4805
+ "status": json["status"]
4806
+ };
4807
+ }
4808
+ function ExecutionRetryResponseDataToJSON(json) {
4809
+ return ExecutionRetryResponseDataToJSONTyped(json, false);
4810
+ }
4811
+ function ExecutionRetryResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
4812
+ if (value == null) {
4813
+ return value;
4814
+ }
4815
+ return {
4816
+ "id": value["id"],
4817
+ "original_execution_id": value["originalExecutionId"],
4818
+ "status": value["status"]
4819
+ };
4820
+ }
4821
+
4822
+ // src/src/models/ExecutionRetryResponse.ts
4823
+ function instanceOfExecutionRetryResponse(value) {
4824
+ return true;
4825
+ }
4826
+ function ExecutionRetryResponseFromJSON(json) {
4827
+ return ExecutionRetryResponseFromJSONTyped(json, false);
4828
+ }
4829
+ function ExecutionRetryResponseFromJSONTyped(json, ignoreDiscriminator) {
4830
+ if (json == null) {
4831
+ return json;
4832
+ }
4833
+ return {
4834
+ "data": json["data"] == null ? void 0 : ExecutionRetryResponseDataFromJSON(json["data"]),
4835
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
4836
+ };
4837
+ }
4838
+ function ExecutionRetryResponseToJSON(json) {
4839
+ return ExecutionRetryResponseToJSONTyped(json, false);
4840
+ }
4841
+ function ExecutionRetryResponseToJSONTyped(value, ignoreDiscriminator = false) {
4842
+ if (value == null) {
4843
+ return value;
4844
+ }
4845
+ return {
4846
+ "data": ExecutionRetryResponseDataToJSON(value["data"]),
4847
+ "meta": RequestMetaToJSON(value["meta"])
4848
+ };
4849
+ }
4850
+
4454
4851
  // src/src/models/ForgotPasswordRequest.ts
4455
4852
  function instanceOfForgotPasswordRequest(value) {
4456
4853
  if (!("email" in value) || value["email"] === void 0) return false;
@@ -15152,6 +15549,106 @@ var ListEmailsStatusEnum = {
15152
15549
  REJECTED: "rejected"
15153
15550
  };
15154
15551
 
15552
+ // src/src/apis/ExecutionsApi.ts
15553
+ var ExecutionsApi = class extends BaseAPI {
15554
+ /**
15555
+ * Cancel a workflow execution that is still pending or running. Already-terminal executions cannot be cancelled.
15556
+ * Cancel a running execution
15557
+ */
15558
+ async cancelExecutionRaw(requestParameters, initOverrides) {
15559
+ if (requestParameters["id"] == null) {
15560
+ throw new RequiredError(
15561
+ "id",
15562
+ 'Required parameter "id" was null or undefined when calling cancelExecution().'
15563
+ );
15564
+ }
15565
+ const queryParameters = {};
15566
+ const headerParameters = {};
15567
+ if (this.configuration && this.configuration.apiKey) {
15568
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15569
+ }
15570
+ const response = await this.request({
15571
+ path: `/executions/{id}/cancel`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15572
+ method: "POST",
15573
+ headers: headerParameters,
15574
+ query: queryParameters
15575
+ }, initOverrides);
15576
+ return new JSONApiResponse(response, (jsonValue) => ExecutionCancelResponseFromJSON(jsonValue));
15577
+ }
15578
+ /**
15579
+ * Cancel a workflow execution that is still pending or running. Already-terminal executions cannot be cancelled.
15580
+ * Cancel a running execution
15581
+ */
15582
+ async cancelExecution(id, initOverrides) {
15583
+ const response = await this.cancelExecutionRaw({ id }, initOverrides);
15584
+ return await response.value();
15585
+ }
15586
+ /**
15587
+ * Retrieve a workflow execution by ID, including its step execution details.
15588
+ * Get a workflow execution
15589
+ */
15590
+ async getExecutionRaw(requestParameters, initOverrides) {
15591
+ if (requestParameters["id"] == null) {
15592
+ throw new RequiredError(
15593
+ "id",
15594
+ 'Required parameter "id" was null or undefined when calling getExecution().'
15595
+ );
15596
+ }
15597
+ const queryParameters = {};
15598
+ const headerParameters = {};
15599
+ if (this.configuration && this.configuration.apiKey) {
15600
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15601
+ }
15602
+ const response = await this.request({
15603
+ path: `/executions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15604
+ method: "GET",
15605
+ headers: headerParameters,
15606
+ query: queryParameters
15607
+ }, initOverrides);
15608
+ return new JSONApiResponse(response, (jsonValue) => ExecutionResponseFromJSON(jsonValue));
15609
+ }
15610
+ /**
15611
+ * Retrieve a workflow execution by ID, including its step execution details.
15612
+ * Get a workflow execution
15613
+ */
15614
+ async getExecution(id, initOverrides) {
15615
+ const response = await this.getExecutionRaw({ id }, initOverrides);
15616
+ return await response.value();
15617
+ }
15618
+ /**
15619
+ * Create a new workflow execution that re-runs the same workflow with the original subscriber, payload, and sender. Only `failed` or `cancelled` executions can be retried.
15620
+ * Retry a failed or cancelled execution
15621
+ */
15622
+ async retryExecutionRaw(requestParameters, initOverrides) {
15623
+ if (requestParameters["id"] == null) {
15624
+ throw new RequiredError(
15625
+ "id",
15626
+ 'Required parameter "id" was null or undefined when calling retryExecution().'
15627
+ );
15628
+ }
15629
+ const queryParameters = {};
15630
+ const headerParameters = {};
15631
+ if (this.configuration && this.configuration.apiKey) {
15632
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
15633
+ }
15634
+ const response = await this.request({
15635
+ path: `/executions/{id}/retry`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
15636
+ method: "POST",
15637
+ headers: headerParameters,
15638
+ query: queryParameters
15639
+ }, initOverrides);
15640
+ return new JSONApiResponse(response, (jsonValue) => ExecutionRetryResponseFromJSON(jsonValue));
15641
+ }
15642
+ /**
15643
+ * Create a new workflow execution that re-runs the same workflow with the original subscriber, payload, and sender. Only `failed` or `cancelled` executions can be retried.
15644
+ * Retry a failed or cancelled execution
15645
+ */
15646
+ async retryExecution(id, initOverrides) {
15647
+ const response = await this.retryExecutionRaw({ id }, initOverrides);
15648
+ return await response.value();
15649
+ }
15650
+ };
15651
+
15155
15652
  // src/src/apis/InboxApi.ts
15156
15653
  var InboxApi = class extends BaseAPI {
15157
15654
  /**
@@ -20084,6 +20581,29 @@ var SDK_VERSION = "0.1.0";
20084
20581
  EndUserDeleteResponseFromJSONTyped,
20085
20582
  EndUserDeleteResponseToJSON,
20086
20583
  EndUserDeleteResponseToJSONTyped,
20584
+ ExecutionCancelResponseDataFromJSON,
20585
+ ExecutionCancelResponseDataFromJSONTyped,
20586
+ ExecutionCancelResponseDataStatusEnum,
20587
+ ExecutionCancelResponseDataToJSON,
20588
+ ExecutionCancelResponseDataToJSONTyped,
20589
+ ExecutionCancelResponseFromJSON,
20590
+ ExecutionCancelResponseFromJSONTyped,
20591
+ ExecutionCancelResponseToJSON,
20592
+ ExecutionCancelResponseToJSONTyped,
20593
+ ExecutionResponseFromJSON,
20594
+ ExecutionResponseFromJSONTyped,
20595
+ ExecutionResponseToJSON,
20596
+ ExecutionResponseToJSONTyped,
20597
+ ExecutionRetryResponseDataFromJSON,
20598
+ ExecutionRetryResponseDataFromJSONTyped,
20599
+ ExecutionRetryResponseDataStatusEnum,
20600
+ ExecutionRetryResponseDataToJSON,
20601
+ ExecutionRetryResponseDataToJSONTyped,
20602
+ ExecutionRetryResponseFromJSON,
20603
+ ExecutionRetryResponseFromJSONTyped,
20604
+ ExecutionRetryResponseToJSON,
20605
+ ExecutionRetryResponseToJSONTyped,
20606
+ ExecutionsApi,
20087
20607
  FetchError,
20088
20608
  ForgotPasswordRequestFromJSON,
20089
20609
  ForgotPasswordRequestFromJSONTyped,
@@ -21227,6 +21747,25 @@ var SDK_VERSION = "0.1.0";
21227
21747
  WithdrawSubscriberConsentRequestFromJSONTyped,
21228
21748
  WithdrawSubscriberConsentRequestToJSON,
21229
21749
  WithdrawSubscriberConsentRequestToJSONTyped,
21750
+ WorkflowExecutionFromJSON,
21751
+ WorkflowExecutionFromJSONTyped,
21752
+ WorkflowExecutionStatus,
21753
+ WorkflowExecutionStatusFromJSON,
21754
+ WorkflowExecutionStatusFromJSONTyped,
21755
+ WorkflowExecutionStatusToJSON,
21756
+ WorkflowExecutionStatusToJSONTyped,
21757
+ WorkflowExecutionToJSON,
21758
+ WorkflowExecutionToJSONTyped,
21759
+ WorkflowStepExecutionFromJSON,
21760
+ WorkflowStepExecutionFromJSONTyped,
21761
+ WorkflowStepExecutionStatus,
21762
+ WorkflowStepExecutionStatusFromJSON,
21763
+ WorkflowStepExecutionStatusFromJSONTyped,
21764
+ WorkflowStepExecutionStatusToJSON,
21765
+ WorkflowStepExecutionStatusToJSONTyped,
21766
+ WorkflowStepExecutionStepTypeEnum,
21767
+ WorkflowStepExecutionToJSON,
21768
+ WorkflowStepExecutionToJSONTyped,
21230
21769
  Zyphr,
21231
21770
  ZyphrAuthenticationError,
21232
21771
  ZyphrError,
@@ -21300,6 +21839,11 @@ var SDK_VERSION = "0.1.0";
21300
21839
  instanceOfEmailTrackingResponse,
21301
21840
  instanceOfEndUserDeleteResponse,
21302
21841
  instanceOfEndUserDeleteResponseData,
21842
+ instanceOfExecutionCancelResponse,
21843
+ instanceOfExecutionCancelResponseData,
21844
+ instanceOfExecutionResponse,
21845
+ instanceOfExecutionRetryResponse,
21846
+ instanceOfExecutionRetryResponseData,
21303
21847
  instanceOfForgotPasswordRequest,
21304
21848
  instanceOfGenerateSubscriberToken200Response,
21305
21849
  instanceOfGenerateSubscriberToken200ResponseData,
@@ -21570,6 +22114,10 @@ var SDK_VERSION = "0.1.0";
21570
22114
  instanceOfWebhookVersionsResponse,
21571
22115
  instanceOfWebhookVersionsResponseData,
21572
22116
  instanceOfWithdrawSubscriberConsentRequest,
22117
+ instanceOfWorkflowExecution,
22118
+ instanceOfWorkflowExecutionStatus,
22119
+ instanceOfWorkflowStepExecution,
22120
+ instanceOfWorkflowStepExecutionStatus,
21573
22121
  mapValues,
21574
22122
  parseErrorResponse,
21575
22123
  querystring