@zyphr-dev/node-sdk 0.1.39 → 0.1.41

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 (40) hide show
  1. package/dist/index.cjs +2315 -1220
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1724 -622
  4. package/dist/index.d.ts +1724 -622
  5. package/dist/index.js +2195 -1203
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +24 -4
  9. package/src/src/apis/AuthRegistrationApi.ts +4 -4
  10. package/src/src/apis/WorkflowsApi.ts +912 -0
  11. package/src/src/apis/index.ts +1 -1
  12. package/src/src/models/AddWorkflowStep201Response.ts +88 -0
  13. package/src/src/models/AddWorkflowStepRequest.ts +136 -0
  14. package/src/src/models/CreateWorkflow201Response.ts +88 -0
  15. package/src/src/models/CreateWorkflowRequest.ts +98 -0
  16. package/src/src/models/DeleteWorkflow200Response.ts +88 -0
  17. package/src/src/models/{TopicDeleteResponseData.ts → DeleteWorkflow200ResponseData.ts} +12 -12
  18. package/src/src/models/DeleteWorkflowStep200Response.ts +88 -0
  19. package/src/src/models/DeleteWorkflowStep200ResponseData.ts +81 -0
  20. package/src/src/models/ListWorkflowExecutions200Response.ts +88 -0
  21. package/src/src/models/{SmsListResponseMeta.ts → ListWorkflowExecutions200ResponseMeta.ts} +15 -15
  22. package/src/src/models/ListWorkflows200Response.ts +88 -0
  23. package/src/src/models/ListWorkflows200ResponseMeta.ts +121 -0
  24. package/src/src/models/ReorderWorkflowStepsRequest.ts +66 -0
  25. package/src/src/models/SignInWithGameCenterRequest.ts +1 -1
  26. package/src/src/models/SmsListResponse.ts +10 -10
  27. package/src/src/models/TopicDeleteResponse.ts +10 -10
  28. package/src/src/models/TriggerWorkflow202Response.ts +88 -0
  29. package/src/src/models/TriggerWorkflow202ResponseData.ts +81 -0
  30. package/src/src/models/TriggerWorkflowRequest.ts +90 -0
  31. package/src/src/models/UpdateWorkflowRequest.ts +89 -0
  32. package/src/src/models/UpdateWorkflowStatusRequest.ts +76 -0
  33. package/src/src/models/UpdateWorkflowStepRequest.ts +73 -0
  34. package/src/src/models/Workflow.ts +187 -0
  35. package/src/src/models/WorkflowStatus.ts +55 -0
  36. package/src/src/models/WorkflowStep.ts +176 -0
  37. package/src/src/models/WorkflowStepType.ts +60 -0
  38. package/src/src/models/index.ts +23 -3
  39. package/src/src/apis/MuseApi.ts +0 -531
  40. package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +0 -105
package/dist/index.js CHANGED
@@ -562,6 +562,204 @@ function AddTopicSubscribersRequestToJSONTyped(value, ignoreDiscriminator = fals
562
562
  };
563
563
  }
564
564
 
565
+ // src/src/models/WorkflowStepType.ts
566
+ var WorkflowStepType = {
567
+ EMAIL: "email",
568
+ PUSH: "push",
569
+ SMS: "sms",
570
+ IN_APP: "in_app",
571
+ SLACK: "slack",
572
+ DISCORD: "discord",
573
+ TEAMS: "teams",
574
+ DELAY: "delay",
575
+ BRANCH: "branch"
576
+ };
577
+ function instanceOfWorkflowStepType(value) {
578
+ for (const key in WorkflowStepType) {
579
+ if (Object.prototype.hasOwnProperty.call(WorkflowStepType, key)) {
580
+ if (WorkflowStepType[key] === value) {
581
+ return true;
582
+ }
583
+ }
584
+ }
585
+ return false;
586
+ }
587
+ function WorkflowStepTypeFromJSON(json) {
588
+ return WorkflowStepTypeFromJSONTyped(json, false);
589
+ }
590
+ function WorkflowStepTypeFromJSONTyped(json, ignoreDiscriminator) {
591
+ return json;
592
+ }
593
+ function WorkflowStepTypeToJSON(value) {
594
+ return value;
595
+ }
596
+ function WorkflowStepTypeToJSONTyped(value, ignoreDiscriminator) {
597
+ return value;
598
+ }
599
+
600
+ // src/src/models/WorkflowStep.ts
601
+ var WorkflowStepBranchPathEnum = {
602
+ TRUE: "true",
603
+ FALSE: "false"
604
+ };
605
+ function instanceOfWorkflowStep(value) {
606
+ if (!("id" in value) || value["id"] === void 0) return false;
607
+ if (!("workflowId" in value) || value["workflowId"] === void 0) return false;
608
+ if (!("stepKey" in value) || value["stepKey"] === void 0) return false;
609
+ if (!("name" in value) || value["name"] === void 0) return false;
610
+ if (!("type" in value) || value["type"] === void 0) return false;
611
+ if (!("position" in value) || value["position"] === void 0) return false;
612
+ if (!("config" in value) || value["config"] === void 0) return false;
613
+ if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
614
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
615
+ return true;
616
+ }
617
+ function WorkflowStepFromJSON(json) {
618
+ return WorkflowStepFromJSONTyped(json, false);
619
+ }
620
+ function WorkflowStepFromJSONTyped(json, ignoreDiscriminator) {
621
+ if (json == null) {
622
+ return json;
623
+ }
624
+ return {
625
+ "id": json["id"],
626
+ "workflowId": json["workflow_id"],
627
+ "stepKey": json["step_key"],
628
+ "name": json["name"],
629
+ "type": WorkflowStepTypeFromJSON(json["type"]),
630
+ "position": json["position"],
631
+ "config": json["config"],
632
+ "parentStepId": json["parent_step_id"] == null ? void 0 : json["parent_step_id"],
633
+ "branchPath": json["branch_path"] == null ? void 0 : json["branch_path"],
634
+ "createdAt": new Date(json["created_at"]),
635
+ "updatedAt": new Date(json["updated_at"])
636
+ };
637
+ }
638
+ function WorkflowStepToJSON(json) {
639
+ return WorkflowStepToJSONTyped(json, false);
640
+ }
641
+ function WorkflowStepToJSONTyped(value, ignoreDiscriminator = false) {
642
+ if (value == null) {
643
+ return value;
644
+ }
645
+ return {
646
+ "id": value["id"],
647
+ "workflow_id": value["workflowId"],
648
+ "step_key": value["stepKey"],
649
+ "name": value["name"],
650
+ "type": WorkflowStepTypeToJSON(value["type"]),
651
+ "position": value["position"],
652
+ "config": value["config"],
653
+ "parent_step_id": value["parentStepId"],
654
+ "branch_path": value["branchPath"],
655
+ "created_at": value["createdAt"].toISOString(),
656
+ "updated_at": value["updatedAt"].toISOString()
657
+ };
658
+ }
659
+
660
+ // src/src/models/RequestMeta.ts
661
+ function instanceOfRequestMeta(value) {
662
+ return true;
663
+ }
664
+ function RequestMetaFromJSON(json) {
665
+ return RequestMetaFromJSONTyped(json, false);
666
+ }
667
+ function RequestMetaFromJSONTyped(json, ignoreDiscriminator) {
668
+ if (json == null) {
669
+ return json;
670
+ }
671
+ return {
672
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"]
673
+ };
674
+ }
675
+ function RequestMetaToJSON(json) {
676
+ return RequestMetaToJSONTyped(json, false);
677
+ }
678
+ function RequestMetaToJSONTyped(value, ignoreDiscriminator = false) {
679
+ if (value == null) {
680
+ return value;
681
+ }
682
+ return {
683
+ "request_id": value["requestId"]
684
+ };
685
+ }
686
+
687
+ // src/src/models/AddWorkflowStep201Response.ts
688
+ function instanceOfAddWorkflowStep201Response(value) {
689
+ return true;
690
+ }
691
+ function AddWorkflowStep201ResponseFromJSON(json) {
692
+ return AddWorkflowStep201ResponseFromJSONTyped(json, false);
693
+ }
694
+ function AddWorkflowStep201ResponseFromJSONTyped(json, ignoreDiscriminator) {
695
+ if (json == null) {
696
+ return json;
697
+ }
698
+ return {
699
+ "data": json["data"] == null ? void 0 : WorkflowStepFromJSON(json["data"]),
700
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
701
+ };
702
+ }
703
+ function AddWorkflowStep201ResponseToJSON(json) {
704
+ return AddWorkflowStep201ResponseToJSONTyped(json, false);
705
+ }
706
+ function AddWorkflowStep201ResponseToJSONTyped(value, ignoreDiscriminator = false) {
707
+ if (value == null) {
708
+ return value;
709
+ }
710
+ return {
711
+ "data": WorkflowStepToJSON(value["data"]),
712
+ "meta": RequestMetaToJSON(value["meta"])
713
+ };
714
+ }
715
+
716
+ // src/src/models/AddWorkflowStepRequest.ts
717
+ var AddWorkflowStepRequestBranchPathEnum = {
718
+ TRUE: "true",
719
+ FALSE: "false"
720
+ };
721
+ function instanceOfAddWorkflowStepRequest(value) {
722
+ if (!("stepKey" in value) || value["stepKey"] === void 0) return false;
723
+ if (!("name" in value) || value["name"] === void 0) return false;
724
+ if (!("type" in value) || value["type"] === void 0) return false;
725
+ if (!("config" in value) || value["config"] === void 0) return false;
726
+ return true;
727
+ }
728
+ function AddWorkflowStepRequestFromJSON(json) {
729
+ return AddWorkflowStepRequestFromJSONTyped(json, false);
730
+ }
731
+ function AddWorkflowStepRequestFromJSONTyped(json, ignoreDiscriminator) {
732
+ if (json == null) {
733
+ return json;
734
+ }
735
+ return {
736
+ "stepKey": json["step_key"],
737
+ "name": json["name"],
738
+ "type": WorkflowStepTypeFromJSON(json["type"]),
739
+ "position": json["position"] == null ? void 0 : json["position"],
740
+ "config": json["config"],
741
+ "parentStepId": json["parent_step_id"] == null ? void 0 : json["parent_step_id"],
742
+ "branchPath": json["branch_path"] == null ? void 0 : json["branch_path"]
743
+ };
744
+ }
745
+ function AddWorkflowStepRequestToJSON(json) {
746
+ return AddWorkflowStepRequestToJSONTyped(json, false);
747
+ }
748
+ function AddWorkflowStepRequestToJSONTyped(value, ignoreDiscriminator = false) {
749
+ if (value == null) {
750
+ return value;
751
+ }
752
+ return {
753
+ "step_key": value["stepKey"],
754
+ "name": value["name"],
755
+ "type": WorkflowStepTypeToJSON(value["type"]),
756
+ "position": value["position"],
757
+ "config": value["config"],
758
+ "parent_step_id": value["parentStepId"],
759
+ "branch_path": value["branchPath"]
760
+ };
761
+ }
762
+
565
763
  // src/src/models/ApiErrorMeta.ts
566
764
  function instanceOfApiErrorMeta(value) {
567
765
  return true;
@@ -772,33 +970,6 @@ function AuthEmailTemplateDefaultToJSONTyped(value, ignoreDiscriminator = false)
772
970
  };
773
971
  }
774
972
 
775
- // src/src/models/RequestMeta.ts
776
- function instanceOfRequestMeta(value) {
777
- return true;
778
- }
779
- function RequestMetaFromJSON(json) {
780
- return RequestMetaFromJSONTyped(json, false);
781
- }
782
- function RequestMetaFromJSONTyped(json, ignoreDiscriminator) {
783
- if (json == null) {
784
- return json;
785
- }
786
- return {
787
- "requestId": json["request_id"] == null ? void 0 : json["request_id"]
788
- };
789
- }
790
- function RequestMetaToJSON(json) {
791
- return RequestMetaToJSONTyped(json, false);
792
- }
793
- function RequestMetaToJSONTyped(value, ignoreDiscriminator = false) {
794
- if (value == null) {
795
- return value;
796
- }
797
- return {
798
- "request_id": value["requestId"]
799
- };
800
- }
801
-
802
973
  // src/src/models/AuthEmailTemplateDefaultResponse.ts
803
974
  function instanceOfAuthEmailTemplateDefaultResponse(value) {
804
975
  return true;
@@ -3025,125 +3196,280 @@ function CreateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
3025
3196
  };
3026
3197
  }
3027
3198
 
3028
- // src/src/models/GetDomain200ResponseMeta.ts
3029
- function instanceOfGetDomain200ResponseMeta(value) {
3030
- return true;
3199
+ // src/src/models/WorkflowStatus.ts
3200
+ var WorkflowStatus = {
3201
+ DRAFT: "draft",
3202
+ ACTIVE: "active",
3203
+ PAUSED: "paused",
3204
+ ARCHIVED: "archived"
3205
+ };
3206
+ function instanceOfWorkflowStatus(value) {
3207
+ for (const key in WorkflowStatus) {
3208
+ if (Object.prototype.hasOwnProperty.call(WorkflowStatus, key)) {
3209
+ if (WorkflowStatus[key] === value) {
3210
+ return true;
3211
+ }
3212
+ }
3213
+ }
3214
+ return false;
3031
3215
  }
3032
- function GetDomain200ResponseMetaFromJSON(json) {
3033
- return GetDomain200ResponseMetaFromJSONTyped(json, false);
3216
+ function WorkflowStatusFromJSON(json) {
3217
+ return WorkflowStatusFromJSONTyped(json, false);
3034
3218
  }
3035
- function GetDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
3036
- if (json == null) {
3037
- return json;
3038
- }
3039
- return {
3040
- "requestId": json["request_id"] == null ? void 0 : json["request_id"]
3041
- };
3219
+ function WorkflowStatusFromJSONTyped(json, ignoreDiscriminator) {
3220
+ return json;
3042
3221
  }
3043
- function GetDomain200ResponseMetaToJSON(json) {
3044
- return GetDomain200ResponseMetaToJSONTyped(json, false);
3222
+ function WorkflowStatusToJSON(value) {
3223
+ return value;
3045
3224
  }
3046
- function GetDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
3047
- if (value == null) {
3048
- return value;
3049
- }
3050
- return {
3051
- "request_id": value["requestId"]
3052
- };
3225
+ function WorkflowStatusToJSONTyped(value, ignoreDiscriminator) {
3226
+ return value;
3053
3227
  }
3054
3228
 
3055
- // src/src/models/DeleteDomainResponseData.ts
3056
- function instanceOfDeleteDomainResponseData(value) {
3229
+ // src/src/models/Workflow.ts
3230
+ function instanceOfWorkflow(value) {
3057
3231
  if (!("id" in value) || value["id"] === void 0) return false;
3058
- if (!("deleted" in value) || value["deleted"] === void 0) return false;
3232
+ if (!("accountId" in value) || value["accountId"] === void 0) return false;
3233
+ if (!("key" in value) || value["key"] === void 0) return false;
3234
+ if (!("name" in value) || value["name"] === void 0) return false;
3235
+ if (!("status" in value) || value["status"] === void 0) return false;
3236
+ if (!("isCritical" in value) || value["isCritical"] === void 0) return false;
3237
+ if (!("tags" in value) || value["tags"] === void 0) return false;
3238
+ if (!("createdAt" in value) || value["createdAt"] === void 0) return false;
3239
+ if (!("updatedAt" in value) || value["updatedAt"] === void 0) return false;
3059
3240
  return true;
3060
3241
  }
3061
- function DeleteDomainResponseDataFromJSON(json) {
3062
- return DeleteDomainResponseDataFromJSONTyped(json, false);
3242
+ function WorkflowFromJSON(json) {
3243
+ return WorkflowFromJSONTyped(json, false);
3063
3244
  }
3064
- function DeleteDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
3245
+ function WorkflowFromJSONTyped(json, ignoreDiscriminator) {
3065
3246
  if (json == null) {
3066
3247
  return json;
3067
3248
  }
3068
3249
  return {
3069
3250
  "id": json["id"],
3070
- "deleted": json["deleted"]
3251
+ "accountId": json["account_id"],
3252
+ "key": json["key"],
3253
+ "name": json["name"],
3254
+ "description": json["description"] == null ? void 0 : json["description"],
3255
+ "status": WorkflowStatusFromJSON(json["status"]),
3256
+ "isCritical": json["is_critical"],
3257
+ "triggerSchema": json["trigger_schema"] == null ? void 0 : json["trigger_schema"],
3258
+ "tags": json["tags"],
3259
+ "stepCount": json["step_count"] == null ? void 0 : json["step_count"],
3260
+ "steps": json["steps"] == null ? void 0 : json["steps"].map(WorkflowStepFromJSON),
3261
+ "createdAt": new Date(json["created_at"]),
3262
+ "updatedAt": new Date(json["updated_at"])
3071
3263
  };
3072
3264
  }
3073
- function DeleteDomainResponseDataToJSON(json) {
3074
- return DeleteDomainResponseDataToJSONTyped(json, false);
3265
+ function WorkflowToJSON(json) {
3266
+ return WorkflowToJSONTyped(json, false);
3075
3267
  }
3076
- function DeleteDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
3268
+ function WorkflowToJSONTyped(value, ignoreDiscriminator = false) {
3077
3269
  if (value == null) {
3078
3270
  return value;
3079
3271
  }
3080
3272
  return {
3081
3273
  "id": value["id"],
3082
- "deleted": value["deleted"]
3274
+ "account_id": value["accountId"],
3275
+ "key": value["key"],
3276
+ "name": value["name"],
3277
+ "description": value["description"],
3278
+ "status": WorkflowStatusToJSON(value["status"]),
3279
+ "is_critical": value["isCritical"],
3280
+ "trigger_schema": value["triggerSchema"],
3281
+ "tags": value["tags"],
3282
+ "step_count": value["stepCount"],
3283
+ "steps": value["steps"] == null ? void 0 : value["steps"].map(WorkflowStepToJSON),
3284
+ "created_at": value["createdAt"].toISOString(),
3285
+ "updated_at": value["updatedAt"].toISOString()
3083
3286
  };
3084
3287
  }
3085
3288
 
3086
- // src/src/models/DeleteDomainResponse.ts
3087
- function instanceOfDeleteDomainResponse(value) {
3088
- if (!("data" in value) || value["data"] === void 0) return false;
3089
- if (!("meta" in value) || value["meta"] === void 0) return false;
3289
+ // src/src/models/CreateWorkflow201Response.ts
3290
+ function instanceOfCreateWorkflow201Response(value) {
3090
3291
  return true;
3091
3292
  }
3092
- function DeleteDomainResponseFromJSON(json) {
3093
- return DeleteDomainResponseFromJSONTyped(json, false);
3293
+ function CreateWorkflow201ResponseFromJSON(json) {
3294
+ return CreateWorkflow201ResponseFromJSONTyped(json, false);
3094
3295
  }
3095
- function DeleteDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
3296
+ function CreateWorkflow201ResponseFromJSONTyped(json, ignoreDiscriminator) {
3096
3297
  if (json == null) {
3097
3298
  return json;
3098
3299
  }
3099
3300
  return {
3100
- "data": DeleteDomainResponseDataFromJSON(json["data"]),
3101
- "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
3301
+ "data": json["data"] == null ? void 0 : WorkflowFromJSON(json["data"]),
3302
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
3102
3303
  };
3103
3304
  }
3104
- function DeleteDomainResponseToJSON(json) {
3105
- return DeleteDomainResponseToJSONTyped(json, false);
3305
+ function CreateWorkflow201ResponseToJSON(json) {
3306
+ return CreateWorkflow201ResponseToJSONTyped(json, false);
3106
3307
  }
3107
- function DeleteDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
3308
+ function CreateWorkflow201ResponseToJSONTyped(value, ignoreDiscriminator = false) {
3108
3309
  if (value == null) {
3109
3310
  return value;
3110
3311
  }
3111
3312
  return {
3112
- "data": DeleteDomainResponseDataToJSON(value["data"]),
3113
- "meta": GetDomain200ResponseMetaToJSON(value["meta"])
3313
+ "data": WorkflowToJSON(value["data"]),
3314
+ "meta": RequestMetaToJSON(value["meta"])
3114
3315
  };
3115
3316
  }
3116
3317
 
3117
- // src/src/models/DeleteResultData.ts
3118
- function instanceOfDeleteResultData(value) {
3318
+ // src/src/models/CreateWorkflowRequest.ts
3319
+ function instanceOfCreateWorkflowRequest(value) {
3320
+ if (!("name" in value) || value["name"] === void 0) return false;
3119
3321
  return true;
3120
3322
  }
3121
- function DeleteResultDataFromJSON(json) {
3122
- return DeleteResultDataFromJSONTyped(json, false);
3323
+ function CreateWorkflowRequestFromJSON(json) {
3324
+ return CreateWorkflowRequestFromJSONTyped(json, false);
3123
3325
  }
3124
- function DeleteResultDataFromJSONTyped(json, ignoreDiscriminator) {
3326
+ function CreateWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
3125
3327
  if (json == null) {
3126
3328
  return json;
3127
3329
  }
3128
3330
  return {
3129
- "id": json["id"] == null ? void 0 : json["id"],
3130
- "deleted": json["deleted"] == null ? void 0 : json["deleted"]
3331
+ "name": json["name"],
3332
+ "key": json["key"] == null ? void 0 : json["key"],
3333
+ "description": json["description"] == null ? void 0 : json["description"],
3334
+ "isCritical": json["is_critical"] == null ? void 0 : json["is_critical"],
3335
+ "tags": json["tags"] == null ? void 0 : json["tags"]
3131
3336
  };
3132
3337
  }
3133
- function DeleteResultDataToJSON(json) {
3134
- return DeleteResultDataToJSONTyped(json, false);
3338
+ function CreateWorkflowRequestToJSON(json) {
3339
+ return CreateWorkflowRequestToJSONTyped(json, false);
3135
3340
  }
3136
- function DeleteResultDataToJSONTyped(value, ignoreDiscriminator = false) {
3341
+ function CreateWorkflowRequestToJSONTyped(value, ignoreDiscriminator = false) {
3137
3342
  if (value == null) {
3138
3343
  return value;
3139
3344
  }
3140
3345
  return {
3141
- "id": value["id"],
3142
- "deleted": value["deleted"]
3346
+ "name": value["name"],
3347
+ "key": value["key"],
3348
+ "description": value["description"],
3349
+ "is_critical": value["isCritical"],
3350
+ "tags": value["tags"]
3143
3351
  };
3144
3352
  }
3145
3353
 
3146
- // src/src/models/DeleteResult.ts
3354
+ // src/src/models/GetDomain200ResponseMeta.ts
3355
+ function instanceOfGetDomain200ResponseMeta(value) {
3356
+ return true;
3357
+ }
3358
+ function GetDomain200ResponseMetaFromJSON(json) {
3359
+ return GetDomain200ResponseMetaFromJSONTyped(json, false);
3360
+ }
3361
+ function GetDomain200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
3362
+ if (json == null) {
3363
+ return json;
3364
+ }
3365
+ return {
3366
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"]
3367
+ };
3368
+ }
3369
+ function GetDomain200ResponseMetaToJSON(json) {
3370
+ return GetDomain200ResponseMetaToJSONTyped(json, false);
3371
+ }
3372
+ function GetDomain200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
3373
+ if (value == null) {
3374
+ return value;
3375
+ }
3376
+ return {
3377
+ "request_id": value["requestId"]
3378
+ };
3379
+ }
3380
+
3381
+ // src/src/models/DeleteDomainResponseData.ts
3382
+ function instanceOfDeleteDomainResponseData(value) {
3383
+ if (!("id" in value) || value["id"] === void 0) return false;
3384
+ if (!("deleted" in value) || value["deleted"] === void 0) return false;
3385
+ return true;
3386
+ }
3387
+ function DeleteDomainResponseDataFromJSON(json) {
3388
+ return DeleteDomainResponseDataFromJSONTyped(json, false);
3389
+ }
3390
+ function DeleteDomainResponseDataFromJSONTyped(json, ignoreDiscriminator) {
3391
+ if (json == null) {
3392
+ return json;
3393
+ }
3394
+ return {
3395
+ "id": json["id"],
3396
+ "deleted": json["deleted"]
3397
+ };
3398
+ }
3399
+ function DeleteDomainResponseDataToJSON(json) {
3400
+ return DeleteDomainResponseDataToJSONTyped(json, false);
3401
+ }
3402
+ function DeleteDomainResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
3403
+ if (value == null) {
3404
+ return value;
3405
+ }
3406
+ return {
3407
+ "id": value["id"],
3408
+ "deleted": value["deleted"]
3409
+ };
3410
+ }
3411
+
3412
+ // src/src/models/DeleteDomainResponse.ts
3413
+ function instanceOfDeleteDomainResponse(value) {
3414
+ if (!("data" in value) || value["data"] === void 0) return false;
3415
+ if (!("meta" in value) || value["meta"] === void 0) return false;
3416
+ return true;
3417
+ }
3418
+ function DeleteDomainResponseFromJSON(json) {
3419
+ return DeleteDomainResponseFromJSONTyped(json, false);
3420
+ }
3421
+ function DeleteDomainResponseFromJSONTyped(json, ignoreDiscriminator) {
3422
+ if (json == null) {
3423
+ return json;
3424
+ }
3425
+ return {
3426
+ "data": DeleteDomainResponseDataFromJSON(json["data"]),
3427
+ "meta": GetDomain200ResponseMetaFromJSON(json["meta"])
3428
+ };
3429
+ }
3430
+ function DeleteDomainResponseToJSON(json) {
3431
+ return DeleteDomainResponseToJSONTyped(json, false);
3432
+ }
3433
+ function DeleteDomainResponseToJSONTyped(value, ignoreDiscriminator = false) {
3434
+ if (value == null) {
3435
+ return value;
3436
+ }
3437
+ return {
3438
+ "data": DeleteDomainResponseDataToJSON(value["data"]),
3439
+ "meta": GetDomain200ResponseMetaToJSON(value["meta"])
3440
+ };
3441
+ }
3442
+
3443
+ // src/src/models/DeleteResultData.ts
3444
+ function instanceOfDeleteResultData(value) {
3445
+ return true;
3446
+ }
3447
+ function DeleteResultDataFromJSON(json) {
3448
+ return DeleteResultDataFromJSONTyped(json, false);
3449
+ }
3450
+ function DeleteResultDataFromJSONTyped(json, ignoreDiscriminator) {
3451
+ if (json == null) {
3452
+ return json;
3453
+ }
3454
+ return {
3455
+ "id": json["id"] == null ? void 0 : json["id"],
3456
+ "deleted": json["deleted"] == null ? void 0 : json["deleted"]
3457
+ };
3458
+ }
3459
+ function DeleteResultDataToJSON(json) {
3460
+ return DeleteResultDataToJSONTyped(json, false);
3461
+ }
3462
+ function DeleteResultDataToJSONTyped(value, ignoreDiscriminator = false) {
3463
+ if (value == null) {
3464
+ return value;
3465
+ }
3466
+ return {
3467
+ "id": value["id"],
3468
+ "deleted": value["deleted"]
3469
+ };
3470
+ }
3471
+
3472
+ // src/src/models/DeleteResult.ts
3147
3473
  function instanceOfDeleteResult(value) {
3148
3474
  return true;
3149
3475
  }
@@ -3172,6 +3498,124 @@ function DeleteResultToJSONTyped(value, ignoreDiscriminator = false) {
3172
3498
  };
3173
3499
  }
3174
3500
 
3501
+ // src/src/models/DeleteWorkflow200ResponseData.ts
3502
+ function instanceOfDeleteWorkflow200ResponseData(value) {
3503
+ return true;
3504
+ }
3505
+ function DeleteWorkflow200ResponseDataFromJSON(json) {
3506
+ return DeleteWorkflow200ResponseDataFromJSONTyped(json, false);
3507
+ }
3508
+ function DeleteWorkflow200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
3509
+ if (json == null) {
3510
+ return json;
3511
+ }
3512
+ return {
3513
+ "key": json["key"] == null ? void 0 : json["key"],
3514
+ "deleted": json["deleted"] == null ? void 0 : json["deleted"]
3515
+ };
3516
+ }
3517
+ function DeleteWorkflow200ResponseDataToJSON(json) {
3518
+ return DeleteWorkflow200ResponseDataToJSONTyped(json, false);
3519
+ }
3520
+ function DeleteWorkflow200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
3521
+ if (value == null) {
3522
+ return value;
3523
+ }
3524
+ return {
3525
+ "key": value["key"],
3526
+ "deleted": value["deleted"]
3527
+ };
3528
+ }
3529
+
3530
+ // src/src/models/DeleteWorkflow200Response.ts
3531
+ function instanceOfDeleteWorkflow200Response(value) {
3532
+ return true;
3533
+ }
3534
+ function DeleteWorkflow200ResponseFromJSON(json) {
3535
+ return DeleteWorkflow200ResponseFromJSONTyped(json, false);
3536
+ }
3537
+ function DeleteWorkflow200ResponseFromJSONTyped(json, ignoreDiscriminator) {
3538
+ if (json == null) {
3539
+ return json;
3540
+ }
3541
+ return {
3542
+ "data": json["data"] == null ? void 0 : DeleteWorkflow200ResponseDataFromJSON(json["data"]),
3543
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
3544
+ };
3545
+ }
3546
+ function DeleteWorkflow200ResponseToJSON(json) {
3547
+ return DeleteWorkflow200ResponseToJSONTyped(json, false);
3548
+ }
3549
+ function DeleteWorkflow200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
3550
+ if (value == null) {
3551
+ return value;
3552
+ }
3553
+ return {
3554
+ "data": DeleteWorkflow200ResponseDataToJSON(value["data"]),
3555
+ "meta": RequestMetaToJSON(value["meta"])
3556
+ };
3557
+ }
3558
+
3559
+ // src/src/models/DeleteWorkflowStep200ResponseData.ts
3560
+ function instanceOfDeleteWorkflowStep200ResponseData(value) {
3561
+ return true;
3562
+ }
3563
+ function DeleteWorkflowStep200ResponseDataFromJSON(json) {
3564
+ return DeleteWorkflowStep200ResponseDataFromJSONTyped(json, false);
3565
+ }
3566
+ function DeleteWorkflowStep200ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
3567
+ if (json == null) {
3568
+ return json;
3569
+ }
3570
+ return {
3571
+ "workflowKey": json["workflow_key"] == null ? void 0 : json["workflow_key"],
3572
+ "stepKey": json["step_key"] == null ? void 0 : json["step_key"],
3573
+ "deleted": json["deleted"] == null ? void 0 : json["deleted"]
3574
+ };
3575
+ }
3576
+ function DeleteWorkflowStep200ResponseDataToJSON(json) {
3577
+ return DeleteWorkflowStep200ResponseDataToJSONTyped(json, false);
3578
+ }
3579
+ function DeleteWorkflowStep200ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
3580
+ if (value == null) {
3581
+ return value;
3582
+ }
3583
+ return {
3584
+ "workflow_key": value["workflowKey"],
3585
+ "step_key": value["stepKey"],
3586
+ "deleted": value["deleted"]
3587
+ };
3588
+ }
3589
+
3590
+ // src/src/models/DeleteWorkflowStep200Response.ts
3591
+ function instanceOfDeleteWorkflowStep200Response(value) {
3592
+ return true;
3593
+ }
3594
+ function DeleteWorkflowStep200ResponseFromJSON(json) {
3595
+ return DeleteWorkflowStep200ResponseFromJSONTyped(json, false);
3596
+ }
3597
+ function DeleteWorkflowStep200ResponseFromJSONTyped(json, ignoreDiscriminator) {
3598
+ if (json == null) {
3599
+ return json;
3600
+ }
3601
+ return {
3602
+ "data": json["data"] == null ? void 0 : DeleteWorkflowStep200ResponseDataFromJSON(json["data"]),
3603
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
3604
+ };
3605
+ }
3606
+ function DeleteWorkflowStep200ResponseToJSON(json) {
3607
+ return DeleteWorkflowStep200ResponseToJSONTyped(json, false);
3608
+ }
3609
+ function DeleteWorkflowStep200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
3610
+ if (value == null) {
3611
+ return value;
3612
+ }
3613
+ return {
3614
+ "data": DeleteWorkflowStep200ResponseDataToJSON(value["data"]),
3615
+ "meta": RequestMetaToJSON(value["meta"])
3616
+ };
3617
+ }
3618
+
3175
3619
  // src/src/models/Device.ts
3176
3620
  var DevicePlatformEnum = {
3177
3621
  IOS: "ios",
@@ -5296,96 +5740,230 @@ function ListWaaSEventTypes200ResponseToJSONTyped(value, ignoreDiscriminator = f
5296
5740
  };
5297
5741
  }
5298
5742
 
5299
- // src/src/models/LoginRequest.ts
5300
- function instanceOfLoginRequest(value) {
5301
- if (!("email" in value) || value["email"] === void 0) return false;
5302
- if (!("password" in value) || value["password"] === void 0) return false;
5743
+ // src/src/models/ListWorkflowExecutions200ResponseMeta.ts
5744
+ function instanceOfListWorkflowExecutions200ResponseMeta(value) {
5303
5745
  return true;
5304
5746
  }
5305
- function LoginRequestFromJSON(json) {
5306
- return LoginRequestFromJSONTyped(json, false);
5747
+ function ListWorkflowExecutions200ResponseMetaFromJSON(json) {
5748
+ return ListWorkflowExecutions200ResponseMetaFromJSONTyped(json, false);
5307
5749
  }
5308
- function LoginRequestFromJSONTyped(json, ignoreDiscriminator) {
5750
+ function ListWorkflowExecutions200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
5309
5751
  if (json == null) {
5310
5752
  return json;
5311
5753
  }
5312
5754
  return {
5313
- "email": json["email"],
5314
- "password": json["password"],
5315
- "customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"],
5316
- "organizationId": json["organization_id"] == null ? void 0 : json["organization_id"]
5755
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"],
5756
+ "page": json["page"] == null ? void 0 : json["page"],
5757
+ "perPage": json["per_page"] == null ? void 0 : json["per_page"],
5758
+ "total": json["total"] == null ? void 0 : json["total"],
5759
+ "totalPages": json["total_pages"] == null ? void 0 : json["total_pages"]
5317
5760
  };
5318
5761
  }
5319
- function LoginRequestToJSON(json) {
5320
- return LoginRequestToJSONTyped(json, false);
5762
+ function ListWorkflowExecutions200ResponseMetaToJSON(json) {
5763
+ return ListWorkflowExecutions200ResponseMetaToJSONTyped(json, false);
5321
5764
  }
5322
- function LoginRequestToJSONTyped(value, ignoreDiscriminator = false) {
5765
+ function ListWorkflowExecutions200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
5323
5766
  if (value == null) {
5324
5767
  return value;
5325
5768
  }
5326
5769
  return {
5327
- "email": value["email"],
5328
- "password": value["password"],
5329
- "custom_claims": value["customClaims"],
5330
- "organization_id": value["organizationId"]
5770
+ "request_id": value["requestId"],
5771
+ "page": value["page"],
5772
+ "per_page": value["perPage"],
5773
+ "total": value["total"],
5774
+ "total_pages": value["totalPages"]
5331
5775
  };
5332
5776
  }
5333
5777
 
5334
- // src/src/models/MagicLinkSendRequest.ts
5335
- function instanceOfMagicLinkSendRequest(value) {
5336
- if (!("email" in value) || value["email"] === void 0) return false;
5778
+ // src/src/models/ListWorkflowExecutions200Response.ts
5779
+ function instanceOfListWorkflowExecutions200Response(value) {
5337
5780
  return true;
5338
5781
  }
5339
- function MagicLinkSendRequestFromJSON(json) {
5340
- return MagicLinkSendRequestFromJSONTyped(json, false);
5782
+ function ListWorkflowExecutions200ResponseFromJSON(json) {
5783
+ return ListWorkflowExecutions200ResponseFromJSONTyped(json, false);
5341
5784
  }
5342
- function MagicLinkSendRequestFromJSONTyped(json, ignoreDiscriminator) {
5785
+ function ListWorkflowExecutions200ResponseFromJSONTyped(json, ignoreDiscriminator) {
5343
5786
  if (json == null) {
5344
5787
  return json;
5345
5788
  }
5346
5789
  return {
5347
- "email": json["email"],
5348
- "redirectUrl": json["redirect_url"] == null ? void 0 : json["redirect_url"]
5790
+ "data": json["data"] == null ? void 0 : json["data"].map(WorkflowExecutionFromJSON),
5791
+ "meta": json["meta"] == null ? void 0 : ListWorkflowExecutions200ResponseMetaFromJSON(json["meta"])
5349
5792
  };
5350
5793
  }
5351
- function MagicLinkSendRequestToJSON(json) {
5352
- return MagicLinkSendRequestToJSONTyped(json, false);
5794
+ function ListWorkflowExecutions200ResponseToJSON(json) {
5795
+ return ListWorkflowExecutions200ResponseToJSONTyped(json, false);
5353
5796
  }
5354
- function MagicLinkSendRequestToJSONTyped(value, ignoreDiscriminator = false) {
5797
+ function ListWorkflowExecutions200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
5355
5798
  if (value == null) {
5356
5799
  return value;
5357
5800
  }
5358
5801
  return {
5359
- "email": value["email"],
5360
- "redirect_url": value["redirectUrl"]
5802
+ "data": value["data"] == null ? void 0 : value["data"].map(WorkflowExecutionToJSON),
5803
+ "meta": ListWorkflowExecutions200ResponseMetaToJSON(value["meta"])
5361
5804
  };
5362
5805
  }
5363
5806
 
5364
- // src/src/models/MagicLinkVerifyRequest.ts
5365
- function instanceOfMagicLinkVerifyRequest(value) {
5366
- if (!("token" in value) || value["token"] === void 0) return false;
5807
+ // src/src/models/ListWorkflows200ResponseMeta.ts
5808
+ function instanceOfListWorkflows200ResponseMeta(value) {
5367
5809
  return true;
5368
5810
  }
5369
- function MagicLinkVerifyRequestFromJSON(json) {
5370
- return MagicLinkVerifyRequestFromJSONTyped(json, false);
5811
+ function ListWorkflows200ResponseMetaFromJSON(json) {
5812
+ return ListWorkflows200ResponseMetaFromJSONTyped(json, false);
5371
5813
  }
5372
- function MagicLinkVerifyRequestFromJSONTyped(json, ignoreDiscriminator) {
5814
+ function ListWorkflows200ResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
5373
5815
  if (json == null) {
5374
5816
  return json;
5375
5817
  }
5376
5818
  return {
5377
- "token": json["token"]
5819
+ "requestId": json["request_id"] == null ? void 0 : json["request_id"],
5820
+ "page": json["page"] == null ? void 0 : json["page"],
5821
+ "perPage": json["per_page"] == null ? void 0 : json["per_page"],
5822
+ "total": json["total"] == null ? void 0 : json["total"],
5823
+ "totalPages": json["total_pages"] == null ? void 0 : json["total_pages"],
5824
+ "limit": json["limit"] == null ? void 0 : json["limit"],
5825
+ "plan": json["plan"] == null ? void 0 : json["plan"],
5826
+ "count": json["count"] == null ? void 0 : json["count"]
5378
5827
  };
5379
5828
  }
5380
- function MagicLinkVerifyRequestToJSON(json) {
5381
- return MagicLinkVerifyRequestToJSONTyped(json, false);
5829
+ function ListWorkflows200ResponseMetaToJSON(json) {
5830
+ return ListWorkflows200ResponseMetaToJSONTyped(json, false);
5382
5831
  }
5383
- function MagicLinkVerifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
5832
+ function ListWorkflows200ResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
5384
5833
  if (value == null) {
5385
5834
  return value;
5386
5835
  }
5387
5836
  return {
5388
- "token": value["token"]
5837
+ "request_id": value["requestId"],
5838
+ "page": value["page"],
5839
+ "per_page": value["perPage"],
5840
+ "total": value["total"],
5841
+ "total_pages": value["totalPages"],
5842
+ "limit": value["limit"],
5843
+ "plan": value["plan"],
5844
+ "count": value["count"]
5845
+ };
5846
+ }
5847
+
5848
+ // src/src/models/ListWorkflows200Response.ts
5849
+ function instanceOfListWorkflows200Response(value) {
5850
+ return true;
5851
+ }
5852
+ function ListWorkflows200ResponseFromJSON(json) {
5853
+ return ListWorkflows200ResponseFromJSONTyped(json, false);
5854
+ }
5855
+ function ListWorkflows200ResponseFromJSONTyped(json, ignoreDiscriminator) {
5856
+ if (json == null) {
5857
+ return json;
5858
+ }
5859
+ return {
5860
+ "data": json["data"] == null ? void 0 : json["data"].map(WorkflowFromJSON),
5861
+ "meta": json["meta"] == null ? void 0 : ListWorkflows200ResponseMetaFromJSON(json["meta"])
5862
+ };
5863
+ }
5864
+ function ListWorkflows200ResponseToJSON(json) {
5865
+ return ListWorkflows200ResponseToJSONTyped(json, false);
5866
+ }
5867
+ function ListWorkflows200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
5868
+ if (value == null) {
5869
+ return value;
5870
+ }
5871
+ return {
5872
+ "data": value["data"] == null ? void 0 : value["data"].map(WorkflowToJSON),
5873
+ "meta": ListWorkflows200ResponseMetaToJSON(value["meta"])
5874
+ };
5875
+ }
5876
+
5877
+ // src/src/models/LoginRequest.ts
5878
+ function instanceOfLoginRequest(value) {
5879
+ if (!("email" in value) || value["email"] === void 0) return false;
5880
+ if (!("password" in value) || value["password"] === void 0) return false;
5881
+ return true;
5882
+ }
5883
+ function LoginRequestFromJSON(json) {
5884
+ return LoginRequestFromJSONTyped(json, false);
5885
+ }
5886
+ function LoginRequestFromJSONTyped(json, ignoreDiscriminator) {
5887
+ if (json == null) {
5888
+ return json;
5889
+ }
5890
+ return {
5891
+ "email": json["email"],
5892
+ "password": json["password"],
5893
+ "customClaims": json["custom_claims"] == null ? void 0 : json["custom_claims"],
5894
+ "organizationId": json["organization_id"] == null ? void 0 : json["organization_id"]
5895
+ };
5896
+ }
5897
+ function LoginRequestToJSON(json) {
5898
+ return LoginRequestToJSONTyped(json, false);
5899
+ }
5900
+ function LoginRequestToJSONTyped(value, ignoreDiscriminator = false) {
5901
+ if (value == null) {
5902
+ return value;
5903
+ }
5904
+ return {
5905
+ "email": value["email"],
5906
+ "password": value["password"],
5907
+ "custom_claims": value["customClaims"],
5908
+ "organization_id": value["organizationId"]
5909
+ };
5910
+ }
5911
+
5912
+ // src/src/models/MagicLinkSendRequest.ts
5913
+ function instanceOfMagicLinkSendRequest(value) {
5914
+ if (!("email" in value) || value["email"] === void 0) return false;
5915
+ return true;
5916
+ }
5917
+ function MagicLinkSendRequestFromJSON(json) {
5918
+ return MagicLinkSendRequestFromJSONTyped(json, false);
5919
+ }
5920
+ function MagicLinkSendRequestFromJSONTyped(json, ignoreDiscriminator) {
5921
+ if (json == null) {
5922
+ return json;
5923
+ }
5924
+ return {
5925
+ "email": json["email"],
5926
+ "redirectUrl": json["redirect_url"] == null ? void 0 : json["redirect_url"]
5927
+ };
5928
+ }
5929
+ function MagicLinkSendRequestToJSON(json) {
5930
+ return MagicLinkSendRequestToJSONTyped(json, false);
5931
+ }
5932
+ function MagicLinkSendRequestToJSONTyped(value, ignoreDiscriminator = false) {
5933
+ if (value == null) {
5934
+ return value;
5935
+ }
5936
+ return {
5937
+ "email": value["email"],
5938
+ "redirect_url": value["redirectUrl"]
5939
+ };
5940
+ }
5941
+
5942
+ // src/src/models/MagicLinkVerifyRequest.ts
5943
+ function instanceOfMagicLinkVerifyRequest(value) {
5944
+ if (!("token" in value) || value["token"] === void 0) return false;
5945
+ return true;
5946
+ }
5947
+ function MagicLinkVerifyRequestFromJSON(json) {
5948
+ return MagicLinkVerifyRequestFromJSONTyped(json, false);
5949
+ }
5950
+ function MagicLinkVerifyRequestFromJSONTyped(json, ignoreDiscriminator) {
5951
+ if (json == null) {
5952
+ return json;
5953
+ }
5954
+ return {
5955
+ "token": json["token"]
5956
+ };
5957
+ }
5958
+ function MagicLinkVerifyRequestToJSON(json) {
5959
+ return MagicLinkVerifyRequestToJSONTyped(json, false);
5960
+ }
5961
+ function MagicLinkVerifyRequestToJSONTyped(value, ignoreDiscriminator = false) {
5962
+ if (value == null) {
5963
+ return value;
5964
+ }
5965
+ return {
5966
+ "token": value["token"]
5389
5967
  };
5390
5968
  }
5391
5969
 
@@ -8380,6 +8958,34 @@ function RenderTemplateRequestToJSONTyped(value, ignoreDiscriminator = false) {
8380
8958
  };
8381
8959
  }
8382
8960
 
8961
+ // src/src/models/ReorderWorkflowStepsRequest.ts
8962
+ function instanceOfReorderWorkflowStepsRequest(value) {
8963
+ if (!("stepKeys" in value) || value["stepKeys"] === void 0) return false;
8964
+ return true;
8965
+ }
8966
+ function ReorderWorkflowStepsRequestFromJSON(json) {
8967
+ return ReorderWorkflowStepsRequestFromJSONTyped(json, false);
8968
+ }
8969
+ function ReorderWorkflowStepsRequestFromJSONTyped(json, ignoreDiscriminator) {
8970
+ if (json == null) {
8971
+ return json;
8972
+ }
8973
+ return {
8974
+ "stepKeys": json["step_keys"]
8975
+ };
8976
+ }
8977
+ function ReorderWorkflowStepsRequestToJSON(json) {
8978
+ return ReorderWorkflowStepsRequestToJSONTyped(json, false);
8979
+ }
8980
+ function ReorderWorkflowStepsRequestToJSONTyped(value, ignoreDiscriminator = false) {
8981
+ if (value == null) {
8982
+ return value;
8983
+ }
8984
+ return {
8985
+ "step_keys": value["stepKeys"]
8986
+ };
8987
+ }
8988
+
8383
8989
  // src/src/models/ReplayWebhookEventsRequest.ts
8384
8990
  function instanceOfReplayWebhookEventsRequest(value) {
8385
8991
  if (!("startDate" in value) || value["startDate"] === void 0) return false;
@@ -10787,41 +11393,6 @@ function SmsMessageToJSONTyped(value, ignoreDiscriminator = false) {
10787
11393
  };
10788
11394
  }
10789
11395
 
10790
- // src/src/models/SmsListResponseMeta.ts
10791
- function instanceOfSmsListResponseMeta(value) {
10792
- return true;
10793
- }
10794
- function SmsListResponseMetaFromJSON(json) {
10795
- return SmsListResponseMetaFromJSONTyped(json, false);
10796
- }
10797
- function SmsListResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
10798
- if (json == null) {
10799
- return json;
10800
- }
10801
- return {
10802
- "requestId": json["request_id"] == null ? void 0 : json["request_id"],
10803
- "page": json["page"] == null ? void 0 : json["page"],
10804
- "perPage": json["per_page"] == null ? void 0 : json["per_page"],
10805
- "total": json["total"] == null ? void 0 : json["total"],
10806
- "totalPages": json["total_pages"] == null ? void 0 : json["total_pages"]
10807
- };
10808
- }
10809
- function SmsListResponseMetaToJSON(json) {
10810
- return SmsListResponseMetaToJSONTyped(json, false);
10811
- }
10812
- function SmsListResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
10813
- if (value == null) {
10814
- return value;
10815
- }
10816
- return {
10817
- "request_id": value["requestId"],
10818
- "page": value["page"],
10819
- "per_page": value["perPage"],
10820
- "total": value["total"],
10821
- "total_pages": value["totalPages"]
10822
- };
10823
- }
10824
-
10825
11396
  // src/src/models/SmsListResponse.ts
10826
11397
  function instanceOfSmsListResponse(value) {
10827
11398
  return true;
@@ -10835,7 +11406,7 @@ function SmsListResponseFromJSONTyped(json, ignoreDiscriminator) {
10835
11406
  }
10836
11407
  return {
10837
11408
  "data": json["data"] == null ? void 0 : json["data"].map(SmsMessageFromJSON),
10838
- "meta": json["meta"] == null ? void 0 : SmsListResponseMetaFromJSON(json["meta"])
11409
+ "meta": json["meta"] == null ? void 0 : ListWorkflowExecutions200ResponseMetaFromJSON(json["meta"])
10839
11410
  };
10840
11411
  }
10841
11412
  function SmsListResponseToJSON(json) {
@@ -10847,7 +11418,7 @@ function SmsListResponseToJSONTyped(value, ignoreDiscriminator = false) {
10847
11418
  }
10848
11419
  return {
10849
11420
  "data": value["data"] == null ? void 0 : value["data"].map(SmsMessageToJSON),
10850
- "meta": SmsListResponseMetaToJSON(value["meta"])
11421
+ "meta": ListWorkflowExecutions200ResponseMetaToJSON(value["meta"])
10851
11422
  };
10852
11423
  }
10853
11424
 
@@ -11362,35 +11933,6 @@ function TopicToJSONTyped(value, ignoreDiscriminator = false) {
11362
11933
  };
11363
11934
  }
11364
11935
 
11365
- // src/src/models/TopicDeleteResponseData.ts
11366
- function instanceOfTopicDeleteResponseData(value) {
11367
- return true;
11368
- }
11369
- function TopicDeleteResponseDataFromJSON(json) {
11370
- return TopicDeleteResponseDataFromJSONTyped(json, false);
11371
- }
11372
- function TopicDeleteResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11373
- if (json == null) {
11374
- return json;
11375
- }
11376
- return {
11377
- "key": json["key"] == null ? void 0 : json["key"],
11378
- "deleted": json["deleted"] == null ? void 0 : json["deleted"]
11379
- };
11380
- }
11381
- function TopicDeleteResponseDataToJSON(json) {
11382
- return TopicDeleteResponseDataToJSONTyped(json, false);
11383
- }
11384
- function TopicDeleteResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
11385
- if (value == null) {
11386
- return value;
11387
- }
11388
- return {
11389
- "key": value["key"],
11390
- "deleted": value["deleted"]
11391
- };
11392
- }
11393
-
11394
11936
  // src/src/models/TopicDeleteResponse.ts
11395
11937
  function instanceOfTopicDeleteResponse(value) {
11396
11938
  return true;
@@ -11403,7 +11945,7 @@ function TopicDeleteResponseFromJSONTyped(json, ignoreDiscriminator) {
11403
11945
  return json;
11404
11946
  }
11405
11947
  return {
11406
- "data": json["data"] == null ? void 0 : TopicDeleteResponseDataFromJSON(json["data"]),
11948
+ "data": json["data"] == null ? void 0 : DeleteWorkflow200ResponseDataFromJSON(json["data"]),
11407
11949
  "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
11408
11950
  };
11409
11951
  }
@@ -11415,7 +11957,7 @@ function TopicDeleteResponseToJSONTyped(value, ignoreDiscriminator = false) {
11415
11957
  return value;
11416
11958
  }
11417
11959
  return {
11418
- "data": TopicDeleteResponseDataToJSON(value["data"]),
11960
+ "data": DeleteWorkflow200ResponseDataToJSON(value["data"]),
11419
11961
  "meta": RequestMetaToJSON(value["meta"])
11420
11962
  };
11421
11963
  }
@@ -11749,6 +12291,100 @@ function TopicSubscribersRemoveResponseToJSONTyped(value, ignoreDiscriminator =
11749
12291
  };
11750
12292
  }
11751
12293
 
12294
+ // src/src/models/TriggerWorkflow202ResponseData.ts
12295
+ function instanceOfTriggerWorkflow202ResponseData(value) {
12296
+ return true;
12297
+ }
12298
+ function TriggerWorkflow202ResponseDataFromJSON(json) {
12299
+ return TriggerWorkflow202ResponseDataFromJSONTyped(json, false);
12300
+ }
12301
+ function TriggerWorkflow202ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
12302
+ if (json == null) {
12303
+ return json;
12304
+ }
12305
+ return {
12306
+ "executionIds": json["execution_ids"] == null ? void 0 : json["execution_ids"],
12307
+ "subscriberCount": json["subscriber_count"] == null ? void 0 : json["subscriber_count"],
12308
+ "workflowKey": json["workflow_key"] == null ? void 0 : json["workflow_key"]
12309
+ };
12310
+ }
12311
+ function TriggerWorkflow202ResponseDataToJSON(json) {
12312
+ return TriggerWorkflow202ResponseDataToJSONTyped(json, false);
12313
+ }
12314
+ function TriggerWorkflow202ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
12315
+ if (value == null) {
12316
+ return value;
12317
+ }
12318
+ return {
12319
+ "execution_ids": value["executionIds"],
12320
+ "subscriber_count": value["subscriberCount"],
12321
+ "workflow_key": value["workflowKey"]
12322
+ };
12323
+ }
12324
+
12325
+ // src/src/models/TriggerWorkflow202Response.ts
12326
+ function instanceOfTriggerWorkflow202Response(value) {
12327
+ return true;
12328
+ }
12329
+ function TriggerWorkflow202ResponseFromJSON(json) {
12330
+ return TriggerWorkflow202ResponseFromJSONTyped(json, false);
12331
+ }
12332
+ function TriggerWorkflow202ResponseFromJSONTyped(json, ignoreDiscriminator) {
12333
+ if (json == null) {
12334
+ return json;
12335
+ }
12336
+ return {
12337
+ "data": json["data"] == null ? void 0 : TriggerWorkflow202ResponseDataFromJSON(json["data"]),
12338
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
12339
+ };
12340
+ }
12341
+ function TriggerWorkflow202ResponseToJSON(json) {
12342
+ return TriggerWorkflow202ResponseToJSONTyped(json, false);
12343
+ }
12344
+ function TriggerWorkflow202ResponseToJSONTyped(value, ignoreDiscriminator = false) {
12345
+ if (value == null) {
12346
+ return value;
12347
+ }
12348
+ return {
12349
+ "data": TriggerWorkflow202ResponseDataToJSON(value["data"]),
12350
+ "meta": RequestMetaToJSON(value["meta"])
12351
+ };
12352
+ }
12353
+
12354
+ // src/src/models/TriggerWorkflowRequest.ts
12355
+ function instanceOfTriggerWorkflowRequest(value) {
12356
+ if (!("to" in value) || value["to"] === void 0) return false;
12357
+ return true;
12358
+ }
12359
+ function TriggerWorkflowRequestFromJSON(json) {
12360
+ return TriggerWorkflowRequestFromJSONTyped(json, false);
12361
+ }
12362
+ function TriggerWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
12363
+ if (json == null) {
12364
+ return json;
12365
+ }
12366
+ return {
12367
+ "to": json["to"],
12368
+ "payload": json["payload"] == null ? void 0 : json["payload"],
12369
+ "transactionId": json["transaction_id"] == null ? void 0 : json["transaction_id"],
12370
+ "from": json["from"] == null ? void 0 : json["from"]
12371
+ };
12372
+ }
12373
+ function TriggerWorkflowRequestToJSON(json) {
12374
+ return TriggerWorkflowRequestToJSONTyped(json, false);
12375
+ }
12376
+ function TriggerWorkflowRequestToJSONTyped(value, ignoreDiscriminator = false) {
12377
+ if (value == null) {
12378
+ return value;
12379
+ }
12380
+ return {
12381
+ "to": value["to"],
12382
+ "payload": value["payload"],
12383
+ "transaction_id": value["transactionId"],
12384
+ "from": value["from"]
12385
+ };
12386
+ }
12387
+
11752
12388
  // src/src/models/UnreadCountData.ts
11753
12389
  function instanceOfUnreadCountData(value) {
11754
12390
  return true;
@@ -12425,27 +13061,117 @@ function UpdateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
12425
13061
  };
12426
13062
  }
12427
13063
 
12428
- // src/src/models/UpsertSmsConfigRequest.ts
12429
- function instanceOfUpsertSmsConfigRequest(value) {
12430
- if (!("accountSid" in value) || value["accountSid"] === void 0) return false;
12431
- if (!("authToken" in value) || value["authToken"] === void 0) return false;
12432
- if (!("fromPhone" in value) || value["fromPhone"] === void 0) return false;
13064
+ // src/src/models/UpdateWorkflowRequest.ts
13065
+ function instanceOfUpdateWorkflowRequest(value) {
12433
13066
  return true;
12434
13067
  }
12435
- function UpsertSmsConfigRequestFromJSON(json) {
12436
- return UpsertSmsConfigRequestFromJSONTyped(json, false);
13068
+ function UpdateWorkflowRequestFromJSON(json) {
13069
+ return UpdateWorkflowRequestFromJSONTyped(json, false);
12437
13070
  }
12438
- function UpsertSmsConfigRequestFromJSONTyped(json, ignoreDiscriminator) {
13071
+ function UpdateWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
12439
13072
  if (json == null) {
12440
13073
  return json;
12441
13074
  }
12442
13075
  return {
12443
- "accountSid": json["account_sid"],
12444
- "authToken": json["auth_token"],
12445
- "fromPhone": json["from_phone"],
12446
- "messagingServiceSid": json["messaging_service_sid"] == null ? void 0 : json["messaging_service_sid"]
12447
- };
12448
- }
13076
+ "name": json["name"] == null ? void 0 : json["name"],
13077
+ "description": json["description"] == null ? void 0 : json["description"],
13078
+ "isCritical": json["is_critical"] == null ? void 0 : json["is_critical"],
13079
+ "tags": json["tags"] == null ? void 0 : json["tags"]
13080
+ };
13081
+ }
13082
+ function UpdateWorkflowRequestToJSON(json) {
13083
+ return UpdateWorkflowRequestToJSONTyped(json, false);
13084
+ }
13085
+ function UpdateWorkflowRequestToJSONTyped(value, ignoreDiscriminator = false) {
13086
+ if (value == null) {
13087
+ return value;
13088
+ }
13089
+ return {
13090
+ "name": value["name"],
13091
+ "description": value["description"],
13092
+ "is_critical": value["isCritical"],
13093
+ "tags": value["tags"]
13094
+ };
13095
+ }
13096
+
13097
+ // src/src/models/UpdateWorkflowStatusRequest.ts
13098
+ function instanceOfUpdateWorkflowStatusRequest(value) {
13099
+ if (!("status" in value) || value["status"] === void 0) return false;
13100
+ return true;
13101
+ }
13102
+ function UpdateWorkflowStatusRequestFromJSON(json) {
13103
+ return UpdateWorkflowStatusRequestFromJSONTyped(json, false);
13104
+ }
13105
+ function UpdateWorkflowStatusRequestFromJSONTyped(json, ignoreDiscriminator) {
13106
+ if (json == null) {
13107
+ return json;
13108
+ }
13109
+ return {
13110
+ "status": WorkflowStatusFromJSON(json["status"])
13111
+ };
13112
+ }
13113
+ function UpdateWorkflowStatusRequestToJSON(json) {
13114
+ return UpdateWorkflowStatusRequestToJSONTyped(json, false);
13115
+ }
13116
+ function UpdateWorkflowStatusRequestToJSONTyped(value, ignoreDiscriminator = false) {
13117
+ if (value == null) {
13118
+ return value;
13119
+ }
13120
+ return {
13121
+ "status": WorkflowStatusToJSON(value["status"])
13122
+ };
13123
+ }
13124
+
13125
+ // src/src/models/UpdateWorkflowStepRequest.ts
13126
+ function instanceOfUpdateWorkflowStepRequest(value) {
13127
+ return true;
13128
+ }
13129
+ function UpdateWorkflowStepRequestFromJSON(json) {
13130
+ return UpdateWorkflowStepRequestFromJSONTyped(json, false);
13131
+ }
13132
+ function UpdateWorkflowStepRequestFromJSONTyped(json, ignoreDiscriminator) {
13133
+ if (json == null) {
13134
+ return json;
13135
+ }
13136
+ return {
13137
+ "name": json["name"] == null ? void 0 : json["name"],
13138
+ "config": json["config"] == null ? void 0 : json["config"]
13139
+ };
13140
+ }
13141
+ function UpdateWorkflowStepRequestToJSON(json) {
13142
+ return UpdateWorkflowStepRequestToJSONTyped(json, false);
13143
+ }
13144
+ function UpdateWorkflowStepRequestToJSONTyped(value, ignoreDiscriminator = false) {
13145
+ if (value == null) {
13146
+ return value;
13147
+ }
13148
+ return {
13149
+ "name": value["name"],
13150
+ "config": value["config"]
13151
+ };
13152
+ }
13153
+
13154
+ // src/src/models/UpsertSmsConfigRequest.ts
13155
+ function instanceOfUpsertSmsConfigRequest(value) {
13156
+ if (!("accountSid" in value) || value["accountSid"] === void 0) return false;
13157
+ if (!("authToken" in value) || value["authToken"] === void 0) return false;
13158
+ if (!("fromPhone" in value) || value["fromPhone"] === void 0) return false;
13159
+ return true;
13160
+ }
13161
+ function UpsertSmsConfigRequestFromJSON(json) {
13162
+ return UpsertSmsConfigRequestFromJSONTyped(json, false);
13163
+ }
13164
+ function UpsertSmsConfigRequestFromJSONTyped(json, ignoreDiscriminator) {
13165
+ if (json == null) {
13166
+ return json;
13167
+ }
13168
+ return {
13169
+ "accountSid": json["account_sid"],
13170
+ "authToken": json["auth_token"],
13171
+ "fromPhone": json["from_phone"],
13172
+ "messagingServiceSid": json["messaging_service_sid"] == null ? void 0 : json["messaging_service_sid"]
13173
+ };
13174
+ }
12449
13175
  function UpsertSmsConfigRequestToJSON(json) {
12450
13176
  return UpsertSmsConfigRequestToJSONTyped(json, false);
12451
13177
  }
@@ -12519,45 +13245,6 @@ function UserDevicesDeleteResponseToJSONTyped(value, ignoreDiscriminator = false
12519
13245
  };
12520
13246
  }
12521
13247
 
12522
- // src/src/models/V1MuseSubjectsSuggestPostRequest.ts
12523
- var V1MuseSubjectsSuggestPostRequestChannelEnum = {
12524
- EMAIL: "email",
12525
- PUSH: "push"
12526
- };
12527
- function instanceOfV1MuseSubjectsSuggestPostRequest(value) {
12528
- if (!("channel" in value) || value["channel"] === void 0) return false;
12529
- if (!("projectId" in value) || value["projectId"] === void 0) return false;
12530
- return true;
12531
- }
12532
- function V1MuseSubjectsSuggestPostRequestFromJSON(json) {
12533
- return V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, false);
12534
- }
12535
- function V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, ignoreDiscriminator) {
12536
- if (json == null) {
12537
- return json;
12538
- }
12539
- return {
12540
- "templateId": json["template_id"] == null ? void 0 : json["template_id"],
12541
- "templateBody": json["template_body"] == null ? void 0 : json["template_body"],
12542
- "channel": json["channel"],
12543
- "projectId": json["project_id"]
12544
- };
12545
- }
12546
- function V1MuseSubjectsSuggestPostRequestToJSON(json) {
12547
- return V1MuseSubjectsSuggestPostRequestToJSONTyped(json, false);
12548
- }
12549
- function V1MuseSubjectsSuggestPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
12550
- if (value == null) {
12551
- return value;
12552
- }
12553
- return {
12554
- "template_id": value["templateId"],
12555
- "template_body": value["templateBody"],
12556
- "channel": value["channel"],
12557
- "project_id": value["projectId"]
12558
- };
12559
- }
12560
-
12561
13248
  // src/src/models/ValidateResetTokenRequest.ts
12562
13249
  function instanceOfValidateResetTokenRequest(value) {
12563
13250
  if (!("token" in value) || value["token"] === void 0) return false;
@@ -16928,7 +17615,7 @@ var AuthRegistrationApi = class extends BaseAPI {
16928
17615
  return await response.value();
16929
17616
  }
16930
17617
  /**
16931
- * Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the modern scoped `playerId` (gamePlayerID). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit\'s `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player\'s `gamePlayerID` and the app\'s bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer\'s own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
17618
+ * Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the player\'s `teamPlayerID` (the id GameKit signs the assertion over). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit\'s `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player\'s `teamPlayerID` (NOT `gamePlayerID`) and the app\'s bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer\'s own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
16932
17619
  * Sign in with Apple Game Center
16933
17620
  */
16934
17621
  async signInWithGameCenterRaw(requestParameters, initOverrides) {
@@ -16954,7 +17641,7 @@ var AuthRegistrationApi = class extends BaseAPI {
16954
17641
  return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
16955
17642
  }
16956
17643
  /**
16957
- * Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the modern scoped `playerId` (gamePlayerID). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit\'s `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player\'s `gamePlayerID` and the app\'s bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer\'s own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
17644
+ * Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the player\'s `teamPlayerID` (the id GameKit signs the assertion over). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit\'s `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player\'s `teamPlayerID` (NOT `gamePlayerID`) and the app\'s bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer\'s own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
16958
17645
  * Sign in with Apple Game Center
16959
17646
  */
16960
17647
  async signInWithGameCenter(signInWithGameCenterRequest, initOverrides) {
@@ -19454,446 +20141,507 @@ var ListAllInboxStatusEnum = {
19454
20141
  ARCHIVED: "archived"
19455
20142
  };
19456
20143
 
19457
- // src/src/apis/MuseApi.ts
19458
- var MuseApi = class extends BaseAPI {
20144
+ // src/src/apis/PushApi.ts
20145
+ var PushApi = class extends BaseAPI {
19459
20146
  /**
19460
- * Returns Muse invocations for the caller\'s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
19461
- * Paginated per-call audit log for Muse
20147
+ * Get a specific push notification message with delivery events.
20148
+ * Get push notification details
19462
20149
  */
19463
- async v1MuseAuditLogGetRaw(initOverrides) {
20150
+ async getPushRaw(requestParameters, initOverrides) {
20151
+ if (requestParameters["id"] == null) {
20152
+ throw new RequiredError(
20153
+ "id",
20154
+ 'Required parameter "id" was null or undefined when calling getPush().'
20155
+ );
20156
+ }
19464
20157
  const queryParameters = {};
19465
20158
  const headerParameters = {};
20159
+ if (this.configuration && this.configuration.apiKey) {
20160
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20161
+ }
19466
20162
  const response = await this.request({
19467
- path: `/v1/muse/audit-log`,
20163
+ path: `/push/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19468
20164
  method: "GET",
19469
20165
  headers: headerParameters,
19470
20166
  query: queryParameters
19471
20167
  }, initOverrides);
19472
- return new VoidApiResponse(response);
20168
+ return new JSONApiResponse(response, (jsonValue) => PushDetailResponseFromJSON(jsonValue));
19473
20169
  }
19474
20170
  /**
19475
- * Returns Muse invocations for the caller\'s account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
19476
- * Paginated per-call audit log for Muse
20171
+ * Get a specific push notification message with delivery events.
20172
+ * Get push notification details
19477
20173
  */
19478
- async v1MuseAuditLogGet(initOverrides) {
19479
- await this.v1MuseAuditLogGetRaw(initOverrides);
20174
+ async getPush(id, initOverrides) {
20175
+ const response = await this.getPushRaw({ id }, initOverrides);
20176
+ return await response.value();
19480
20177
  }
19481
20178
  /**
19482
- * Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
19483
- * Stream a pre-send advisory for a draft broadcast
20179
+ * Get aggregated push notification statistics for the account.
20180
+ * Get push notification statistics
19484
20181
  */
19485
- async v1MuseBroadcastsAnalyzePostRaw(initOverrides) {
20182
+ async getPushStatsRaw(initOverrides) {
19486
20183
  const queryParameters = {};
19487
20184
  const headerParameters = {};
20185
+ if (this.configuration && this.configuration.apiKey) {
20186
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20187
+ }
19488
20188
  const response = await this.request({
19489
- path: `/v1/muse/broadcasts/analyze`,
19490
- method: "POST",
20189
+ path: `/push/stats`,
20190
+ method: "GET",
19491
20191
  headers: headerParameters,
19492
20192
  query: queryParameters
19493
20193
  }, initOverrides);
19494
- return new VoidApiResponse(response);
20194
+ return new JSONApiResponse(response, (jsonValue) => PushStatsResponseFromJSON(jsonValue));
19495
20195
  }
19496
20196
  /**
19497
- * Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
19498
- * Stream a pre-send advisory for a draft broadcast
20197
+ * Get aggregated push notification statistics for the account.
20198
+ * Get push notification statistics
19499
20199
  */
19500
- async v1MuseBroadcastsAnalyzePost(initOverrides) {
19501
- await this.v1MuseBroadcastsAnalyzePostRaw(initOverrides);
20200
+ async getPushStats(initOverrides) {
20201
+ const response = await this.getPushStatsRaw(initOverrides);
20202
+ return await response.value();
19502
20203
  }
19503
20204
  /**
19504
- * Returns whether the caller\'s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
19505
- * Return the current account\'s Zyphr Muse entitlement
20205
+ * Get all push notification topics a specific device is subscribed to.
20206
+ * List topics for a device
19506
20207
  */
19507
- async v1MuseEntitlementGetRaw(initOverrides) {
20208
+ async listDevicePushTopicsRaw(requestParameters, initOverrides) {
20209
+ if (requestParameters["id"] == null) {
20210
+ throw new RequiredError(
20211
+ "id",
20212
+ 'Required parameter "id" was null or undefined when calling listDevicePushTopics().'
20213
+ );
20214
+ }
19508
20215
  const queryParameters = {};
19509
20216
  const headerParameters = {};
20217
+ if (this.configuration && this.configuration.apiKey) {
20218
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20219
+ }
19510
20220
  const response = await this.request({
19511
- path: `/v1/muse/entitlement`,
20221
+ path: `/push/devices/{id}/topics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19512
20222
  method: "GET",
19513
20223
  headers: headerParameters,
19514
20224
  query: queryParameters
19515
20225
  }, initOverrides);
19516
- return new VoidApiResponse(response);
20226
+ return new JSONApiResponse(response, (jsonValue) => DevicePushTopicListResponseFromJSON(jsonValue));
19517
20227
  }
19518
20228
  /**
19519
- * Returns whether the caller\'s account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
19520
- * Return the current account\'s Zyphr Muse entitlement
20229
+ * Get all push notification topics a specific device is subscribed to.
20230
+ * List topics for a device
19521
20231
  */
19522
- async v1MuseEntitlementGet(initOverrides) {
19523
- await this.v1MuseEntitlementGetRaw(initOverrides);
20232
+ async listDevicePushTopics(id, initOverrides) {
20233
+ const response = await this.listDevicePushTopicsRaw({ id }, initOverrides);
20234
+ return await response.value();
19524
20235
  }
19525
20236
  /**
19526
- * Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don\'t see this — it\'s for the internal Muse settings page / admin portal.
19527
- * Per-prompt eval baseline snapshots
20237
+ * List push notification messages for the account with optional filtering.
20238
+ * List push notifications
19528
20239
  */
19529
- async v1MuseEvalBaselinesGetRaw(initOverrides) {
20240
+ async listPushRaw(requestParameters, initOverrides) {
19530
20241
  const queryParameters = {};
20242
+ if (requestParameters["userId"] != null) {
20243
+ queryParameters["user_id"] = requestParameters["userId"];
20244
+ }
20245
+ if (requestParameters["deviceId"] != null) {
20246
+ queryParameters["device_id"] = requestParameters["deviceId"];
20247
+ }
20248
+ if (requestParameters["status"] != null) {
20249
+ queryParameters["status"] = requestParameters["status"];
20250
+ }
20251
+ if (requestParameters["limit"] != null) {
20252
+ queryParameters["limit"] = requestParameters["limit"];
20253
+ }
20254
+ if (requestParameters["offset"] != null) {
20255
+ queryParameters["offset"] = requestParameters["offset"];
20256
+ }
19531
20257
  const headerParameters = {};
20258
+ if (this.configuration && this.configuration.apiKey) {
20259
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20260
+ }
19532
20261
  const response = await this.request({
19533
- path: `/v1/muse/eval-baselines`,
20262
+ path: `/push`,
19534
20263
  method: "GET",
19535
20264
  headers: headerParameters,
19536
20265
  query: queryParameters
19537
20266
  }, initOverrides);
19538
- return new VoidApiResponse(response);
20267
+ return new JSONApiResponse(response, (jsonValue) => PushListResponseFromJSON(jsonValue));
19539
20268
  }
19540
20269
  /**
19541
- * Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don\'t see this — it\'s for the internal Muse settings page / admin portal.
19542
- * Per-prompt eval baseline snapshots
20270
+ * List push notification messages for the account with optional filtering.
20271
+ * List push notifications
19543
20272
  */
19544
- async v1MuseEvalBaselinesGet(initOverrides) {
19545
- await this.v1MuseEvalBaselinesGetRaw(initOverrides);
20273
+ async listPush(userId, deviceId, status, limit, offset, initOverrides) {
20274
+ const response = await this.listPushRaw({ userId, deviceId, status, limit, offset }, initOverrides);
20275
+ return await response.value();
19546
20276
  }
19547
20277
  /**
19548
- * Returns the project\'s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
19549
- * Read Muse settings for a project
20278
+ * Get all devices subscribed to a push notification topic with pagination.
20279
+ * List devices subscribed to a topic
19550
20280
  */
19551
- async v1MuseSettingsProjectIdGetRaw(requestParameters, initOverrides) {
19552
- if (requestParameters["projectId"] == null) {
20281
+ async listPushTopicDevicesRaw(requestParameters, initOverrides) {
20282
+ if (requestParameters["key"] == null) {
19553
20283
  throw new RequiredError(
19554
- "projectId",
19555
- 'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdGet().'
20284
+ "key",
20285
+ 'Required parameter "key" was null or undefined when calling listPushTopicDevices().'
19556
20286
  );
19557
20287
  }
19558
20288
  const queryParameters = {};
20289
+ if (requestParameters["limit"] != null) {
20290
+ queryParameters["limit"] = requestParameters["limit"];
20291
+ }
20292
+ if (requestParameters["offset"] != null) {
20293
+ queryParameters["offset"] = requestParameters["offset"];
20294
+ }
19559
20295
  const headerParameters = {};
20296
+ if (this.configuration && this.configuration.apiKey) {
20297
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20298
+ }
19560
20299
  const response = await this.request({
19561
- path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
20300
+ path: `/push/topics/{key}/devices`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
19562
20301
  method: "GET",
19563
20302
  headers: headerParameters,
19564
20303
  query: queryParameters
19565
20304
  }, initOverrides);
19566
- return new VoidApiResponse(response);
20305
+ return new JSONApiResponse(response, (jsonValue) => PushTopicDeviceListResponseFromJSON(jsonValue));
19567
20306
  }
19568
20307
  /**
19569
- * Returns the project\'s Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
19570
- * Read Muse settings for a project
20308
+ * Get all devices subscribed to a push notification topic with pagination.
20309
+ * List devices subscribed to a topic
19571
20310
  */
19572
- async v1MuseSettingsProjectIdGet(projectId, initOverrides) {
19573
- await this.v1MuseSettingsProjectIdGetRaw({ projectId }, initOverrides);
20311
+ async listPushTopicDevices(key, limit, offset, initOverrides) {
20312
+ const response = await this.listPushTopicDevicesRaw({ key, limit, offset }, initOverrides);
20313
+ return await response.value();
19574
20314
  }
19575
20315
  /**
19576
- * Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
19577
- * Update Muse settings for a project (admin or developer only)
20316
+ * Send a push notification to a specific device, multiple devices, all devices for a subscriber, or to a topic. Supports scheduling via `send_at` or `delay`.
20317
+ * Send a push notification
19578
20318
  */
19579
- async v1MuseSettingsProjectIdPatchRaw(requestParameters, initOverrides) {
19580
- if (requestParameters["projectId"] == null) {
20319
+ async sendPushRaw(requestParameters, initOverrides) {
20320
+ if (requestParameters["sendPushRequest"] == null) {
19581
20321
  throw new RequiredError(
19582
- "projectId",
19583
- 'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdPatch().'
20322
+ "sendPushRequest",
20323
+ 'Required parameter "sendPushRequest" was null or undefined when calling sendPush().'
19584
20324
  );
19585
20325
  }
19586
20326
  const queryParameters = {};
19587
20327
  const headerParameters = {};
20328
+ headerParameters["Content-Type"] = "application/json";
20329
+ if (this.configuration && this.configuration.apiKey) {
20330
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20331
+ }
19588
20332
  const response = await this.request({
19589
- path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
19590
- method: "PATCH",
20333
+ path: `/push`,
20334
+ method: "POST",
19591
20335
  headers: headerParameters,
19592
- query: queryParameters
20336
+ query: queryParameters,
20337
+ body: SendPushRequestToJSON(requestParameters["sendPushRequest"])
19593
20338
  }, initOverrides);
19594
- return new VoidApiResponse(response);
20339
+ return new JSONApiResponse(response, (jsonValue) => SendPushResponseFromJSON(jsonValue));
19595
20340
  }
19596
20341
  /**
19597
- * Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
19598
- * Update Muse settings for a project (admin or developer only)
20342
+ * Send a push notification to a specific device, multiple devices, all devices for a subscriber, or to a topic. Supports scheduling via `send_at` or `delay`.
20343
+ * Send a push notification
19599
20344
  */
19600
- async v1MuseSettingsProjectIdPatch(projectId, initOverrides) {
19601
- await this.v1MuseSettingsProjectIdPatchRaw({ projectId }, initOverrides);
20345
+ async sendPush(sendPushRequest, initOverrides) {
20346
+ const response = await this.sendPushRaw({ sendPushRequest }, initOverrides);
20347
+ return await response.value();
19602
20348
  }
19603
20349
  /**
19604
- * Suggest 5 ranked subject-line candidates for a template
20350
+ * Send a push notification to all devices subscribed to a topic.
20351
+ * Send push notification to a topic
19605
20352
  */
19606
- async v1MuseSubjectsSuggestPostRaw(requestParameters, initOverrides) {
19607
- if (requestParameters["v1MuseSubjectsSuggestPostRequest"] == null) {
20353
+ async sendPushToTopicRaw(requestParameters, initOverrides) {
20354
+ if (requestParameters["key"] == null) {
20355
+ throw new RequiredError(
20356
+ "key",
20357
+ 'Required parameter "key" was null or undefined when calling sendPushToTopic().'
20358
+ );
20359
+ }
20360
+ if (requestParameters["sendPushToTopicRequest"] == null) {
19608
20361
  throw new RequiredError(
19609
- "v1MuseSubjectsSuggestPostRequest",
19610
- 'Required parameter "v1MuseSubjectsSuggestPostRequest" was null or undefined when calling v1MuseSubjectsSuggestPost().'
20362
+ "sendPushToTopicRequest",
20363
+ 'Required parameter "sendPushToTopicRequest" was null or undefined when calling sendPushToTopic().'
19611
20364
  );
19612
20365
  }
19613
20366
  const queryParameters = {};
19614
20367
  const headerParameters = {};
19615
20368
  headerParameters["Content-Type"] = "application/json";
20369
+ if (this.configuration && this.configuration.apiKey) {
20370
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20371
+ }
19616
20372
  const response = await this.request({
19617
- path: `/v1/muse/subjects/suggest`,
20373
+ path: `/push/topics/{key}/send`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
19618
20374
  method: "POST",
19619
20375
  headers: headerParameters,
19620
20376
  query: queryParameters,
19621
- body: V1MuseSubjectsSuggestPostRequestToJSON(requestParameters["v1MuseSubjectsSuggestPostRequest"])
20377
+ body: SendPushToTopicRequestToJSON(requestParameters["sendPushToTopicRequest"])
19622
20378
  }, initOverrides);
19623
- return new VoidApiResponse(response);
20379
+ return new JSONApiResponse(response, (jsonValue) => SendPushToTopicResponseFromJSON(jsonValue));
19624
20380
  }
19625
20381
  /**
19626
- * Suggest 5 ranked subject-line candidates for a template
20382
+ * Send a push notification to all devices subscribed to a topic.
20383
+ * Send push notification to a topic
19627
20384
  */
19628
- async v1MuseSubjectsSuggestPost(v1MuseSubjectsSuggestPostRequest, initOverrides) {
19629
- await this.v1MuseSubjectsSuggestPostRaw({ v1MuseSubjectsSuggestPostRequest }, initOverrides);
20385
+ async sendPushToTopic(key, sendPushToTopicRequest, initOverrides) {
20386
+ const response = await this.sendPushToTopicRaw({ key, sendPushToTopicRequest }, initOverrides);
20387
+ return await response.value();
19630
20388
  }
19631
20389
  /**
19632
- * Stream a draft template from a natural-language brief
19633
- */
19634
- async v1MuseTemplatesDraftPostRaw(initOverrides) {
19635
- const queryParameters = {};
19636
- const headerParameters = {};
19637
- const response = await this.request({
19638
- path: `/v1/muse/templates/draft`,
19639
- method: "POST",
19640
- headers: headerParameters,
19641
- query: queryParameters
19642
- }, initOverrides);
19643
- return new VoidApiResponse(response);
19644
- }
19645
- /**
19646
- * Stream a draft template from a natural-language brief
19647
- */
19648
- async v1MuseTemplatesDraftPost(initOverrides) {
19649
- await this.v1MuseTemplatesDraftPostRaw(initOverrides);
19650
- }
19651
- /**
19652
- * Stream a rewritten block per the user\'s instruction
20390
+ * Subscribe one or more devices to a push notification topic. Maximum 100 devices per request.
20391
+ * Subscribe devices to a push topic
19653
20392
  */
19654
- async v1MuseTemplatesRewritePostRaw(initOverrides) {
20393
+ async subscribePushTopicRaw(requestParameters, initOverrides) {
20394
+ if (requestParameters["key"] == null) {
20395
+ throw new RequiredError(
20396
+ "key",
20397
+ 'Required parameter "key" was null or undefined when calling subscribePushTopic().'
20398
+ );
20399
+ }
20400
+ if (requestParameters["subscribePushTopicRequest"] == null) {
20401
+ throw new RequiredError(
20402
+ "subscribePushTopicRequest",
20403
+ 'Required parameter "subscribePushTopicRequest" was null or undefined when calling subscribePushTopic().'
20404
+ );
20405
+ }
19655
20406
  const queryParameters = {};
19656
20407
  const headerParameters = {};
20408
+ headerParameters["Content-Type"] = "application/json";
20409
+ if (this.configuration && this.configuration.apiKey) {
20410
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20411
+ }
19657
20412
  const response = await this.request({
19658
- path: `/v1/muse/templates/rewrite`,
20413
+ path: `/push/topics/{key}/subscribe`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
19659
20414
  method: "POST",
19660
20415
  headers: headerParameters,
19661
- query: queryParameters
19662
- }, initOverrides);
19663
- return new VoidApiResponse(response);
19664
- }
19665
- /**
19666
- * Stream a rewritten block per the user\'s instruction
19667
- */
19668
- async v1MuseTemplatesRewritePost(initOverrides) {
19669
- await this.v1MuseTemplatesRewritePostRaw(initOverrides);
19670
- }
19671
- /**
19672
- * Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
19673
- * Per-account Zyphr Muse usage + budget tier
19674
- */
19675
- async v1MuseUsageGetRaw(initOverrides) {
19676
- const queryParameters = {};
19677
- const headerParameters = {};
19678
- const response = await this.request({
19679
- path: `/v1/muse/usage`,
19680
- method: "GET",
19681
- headers: headerParameters,
19682
- query: queryParameters
20416
+ query: queryParameters,
20417
+ body: SubscribePushTopicRequestToJSON(requestParameters["subscribePushTopicRequest"])
19683
20418
  }, initOverrides);
19684
- return new VoidApiResponse(response);
20419
+ return new JSONApiResponse(response, (jsonValue) => PushTopicSubscribeResponseFromJSON(jsonValue));
19685
20420
  }
19686
20421
  /**
19687
- * Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
19688
- * Per-account Zyphr Muse usage + budget tier
20422
+ * Subscribe one or more devices to a push notification topic. Maximum 100 devices per request.
20423
+ * Subscribe devices to a push topic
19689
20424
  */
19690
- async v1MuseUsageGet(initOverrides) {
19691
- await this.v1MuseUsageGetRaw(initOverrides);
20425
+ async subscribePushTopic(key, subscribePushTopicRequest, initOverrides) {
20426
+ const response = await this.subscribePushTopicRaw({ key, subscribePushTopicRequest }, initOverrides);
20427
+ return await response.value();
19692
20428
  }
19693
20429
  /**
19694
- * Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project\'s available_channels grounding; unsupported channels fall back to email via the prompt\'s hard rules.
19695
- * Stream a generated workflow from a natural-language description
20430
+ * Unsubscribe one or more devices from a push notification topic. Maximum 100 devices per request.
20431
+ * Unsubscribe devices from a push topic
19696
20432
  */
19697
- async v1MuseWorkflowsGeneratePostRaw(initOverrides) {
20433
+ async unsubscribePushTopicRaw(requestParameters, initOverrides) {
20434
+ if (requestParameters["key"] == null) {
20435
+ throw new RequiredError(
20436
+ "key",
20437
+ 'Required parameter "key" was null or undefined when calling unsubscribePushTopic().'
20438
+ );
20439
+ }
20440
+ if (requestParameters["subscribePushTopicRequest"] == null) {
20441
+ throw new RequiredError(
20442
+ "subscribePushTopicRequest",
20443
+ 'Required parameter "subscribePushTopicRequest" was null or undefined when calling unsubscribePushTopic().'
20444
+ );
20445
+ }
19698
20446
  const queryParameters = {};
19699
20447
  const headerParameters = {};
20448
+ headerParameters["Content-Type"] = "application/json";
20449
+ if (this.configuration && this.configuration.apiKey) {
20450
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20451
+ }
19700
20452
  const response = await this.request({
19701
- path: `/v1/muse/workflows/generate`,
20453
+ path: `/push/topics/{key}/unsubscribe`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
19702
20454
  method: "POST",
19703
20455
  headers: headerParameters,
19704
- query: queryParameters
20456
+ query: queryParameters,
20457
+ body: SubscribePushTopicRequestToJSON(requestParameters["subscribePushTopicRequest"])
19705
20458
  }, initOverrides);
19706
- return new VoidApiResponse(response);
20459
+ return new JSONApiResponse(response, (jsonValue) => PushTopicUnsubscribeResponseFromJSON(jsonValue));
19707
20460
  }
19708
20461
  /**
19709
- * Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project\'s available_channels grounding; unsupported channels fall back to email via the prompt\'s hard rules.
19710
- * Stream a generated workflow from a natural-language description
20462
+ * Unsubscribe one or more devices from a push notification topic. Maximum 100 devices per request.
20463
+ * Unsubscribe devices from a push topic
19711
20464
  */
19712
- async v1MuseWorkflowsGeneratePost(initOverrides) {
19713
- await this.v1MuseWorkflowsGeneratePostRaw(initOverrides);
20465
+ async unsubscribePushTopic(key, subscribePushTopicRequest, initOverrides) {
20466
+ const response = await this.unsubscribePushTopicRaw({ key, subscribePushTopicRequest }, initOverrides);
20467
+ return await response.value();
19714
20468
  }
19715
20469
  };
20470
+ var ListPushStatusEnum = {
20471
+ PENDING: "pending",
20472
+ QUEUED: "queued",
20473
+ SENT: "sent",
20474
+ DELIVERED: "delivered",
20475
+ FAILED: "failed"
20476
+ };
19716
20477
 
19717
- // src/src/apis/PushApi.ts
19718
- var PushApi = class extends BaseAPI {
20478
+ // src/src/apis/SMSApi.ts
20479
+ var SMSApi = class extends BaseAPI {
19719
20480
  /**
19720
- * Get a specific push notification message with delivery events.
19721
- * Get push notification details
20481
+ * Remove the SMS provider configuration for the account.
20482
+ * Delete SMS configuration
19722
20483
  */
19723
- async getPushRaw(requestParameters, initOverrides) {
19724
- if (requestParameters["id"] == null) {
19725
- throw new RequiredError(
19726
- "id",
19727
- 'Required parameter "id" was null or undefined when calling getPush().'
19728
- );
19729
- }
20484
+ async deleteSmsConfigRaw(initOverrides) {
19730
20485
  const queryParameters = {};
19731
20486
  const headerParameters = {};
19732
20487
  if (this.configuration && this.configuration.apiKey) {
19733
20488
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19734
20489
  }
19735
20490
  const response = await this.request({
19736
- path: `/push/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19737
- method: "GET",
20491
+ path: `/sms/config`,
20492
+ method: "DELETE",
19738
20493
  headers: headerParameters,
19739
20494
  query: queryParameters
19740
20495
  }, initOverrides);
19741
- return new JSONApiResponse(response, (jsonValue) => PushDetailResponseFromJSON(jsonValue));
20496
+ return new JSONApiResponse(response, (jsonValue) => SmsConfigDeleteResponseFromJSON(jsonValue));
19742
20497
  }
19743
20498
  /**
19744
- * Get a specific push notification message with delivery events.
19745
- * Get push notification details
20499
+ * Remove the SMS provider configuration for the account.
20500
+ * Delete SMS configuration
19746
20501
  */
19747
- async getPush(id, initOverrides) {
19748
- const response = await this.getPushRaw({ id }, initOverrides);
20502
+ async deleteSmsConfig(initOverrides) {
20503
+ const response = await this.deleteSmsConfigRaw(initOverrides);
19749
20504
  return await response.value();
19750
20505
  }
19751
20506
  /**
19752
- * Get aggregated push notification statistics for the account.
19753
- * Get push notification statistics
20507
+ * Get detailed information about a specific SMS message.
20508
+ * Get SMS message details
19754
20509
  */
19755
- async getPushStatsRaw(initOverrides) {
20510
+ async getSmsRaw(requestParameters, initOverrides) {
20511
+ if (requestParameters["id"] == null) {
20512
+ throw new RequiredError(
20513
+ "id",
20514
+ 'Required parameter "id" was null or undefined when calling getSms().'
20515
+ );
20516
+ }
19756
20517
  const queryParameters = {};
19757
20518
  const headerParameters = {};
19758
20519
  if (this.configuration && this.configuration.apiKey) {
19759
20520
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19760
20521
  }
19761
20522
  const response = await this.request({
19762
- path: `/push/stats`,
20523
+ path: `/sms/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19763
20524
  method: "GET",
19764
20525
  headers: headerParameters,
19765
20526
  query: queryParameters
19766
20527
  }, initOverrides);
19767
- return new JSONApiResponse(response, (jsonValue) => PushStatsResponseFromJSON(jsonValue));
20528
+ return new JSONApiResponse(response, (jsonValue) => SmsDetailResponseFromJSON(jsonValue));
19768
20529
  }
19769
20530
  /**
19770
- * Get aggregated push notification statistics for the account.
19771
- * Get push notification statistics
20531
+ * Get detailed information about a specific SMS message.
20532
+ * Get SMS message details
19772
20533
  */
19773
- async getPushStats(initOverrides) {
19774
- const response = await this.getPushStatsRaw(initOverrides);
20534
+ async getSms(id, initOverrides) {
20535
+ const response = await this.getSmsRaw({ id }, initOverrides);
19775
20536
  return await response.value();
19776
20537
  }
19777
20538
  /**
19778
- * Get all push notification topics a specific device is subscribed to.
19779
- * List topics for a device
20539
+ * Get the current SMS provider configuration for the account.
20540
+ * Get SMS configuration
19780
20541
  */
19781
- async listDevicePushTopicsRaw(requestParameters, initOverrides) {
19782
- if (requestParameters["id"] == null) {
19783
- throw new RequiredError(
19784
- "id",
19785
- 'Required parameter "id" was null or undefined when calling listDevicePushTopics().'
19786
- );
19787
- }
20542
+ async getSmsConfigRaw(initOverrides) {
19788
20543
  const queryParameters = {};
19789
20544
  const headerParameters = {};
19790
20545
  if (this.configuration && this.configuration.apiKey) {
19791
20546
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19792
20547
  }
19793
20548
  const response = await this.request({
19794
- path: `/push/devices/{id}/topics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
20549
+ path: `/sms/config`,
19795
20550
  method: "GET",
19796
20551
  headers: headerParameters,
19797
20552
  query: queryParameters
19798
20553
  }, initOverrides);
19799
- return new JSONApiResponse(response, (jsonValue) => DevicePushTopicListResponseFromJSON(jsonValue));
20554
+ return new JSONApiResponse(response, (jsonValue) => SmsConfigResponseFromJSON(jsonValue));
19800
20555
  }
19801
20556
  /**
19802
- * Get all push notification topics a specific device is subscribed to.
19803
- * List topics for a device
20557
+ * Get the current SMS provider configuration for the account.
20558
+ * Get SMS configuration
19804
20559
  */
19805
- async listDevicePushTopics(id, initOverrides) {
19806
- const response = await this.listDevicePushTopicsRaw({ id }, initOverrides);
20560
+ async getSmsConfig(initOverrides) {
20561
+ const response = await this.getSmsConfigRaw(initOverrides);
19807
20562
  return await response.value();
19808
20563
  }
19809
20564
  /**
19810
- * List push notification messages for the account with optional filtering.
19811
- * List push notifications
20565
+ * List SMS messages for the account with optional filtering and pagination.
20566
+ * List SMS messages
19812
20567
  */
19813
- async listPushRaw(requestParameters, initOverrides) {
20568
+ async listSmsRaw(requestParameters, initOverrides) {
19814
20569
  const queryParameters = {};
19815
- if (requestParameters["userId"] != null) {
19816
- queryParameters["user_id"] = requestParameters["userId"];
20570
+ if (requestParameters["page"] != null) {
20571
+ queryParameters["page"] = requestParameters["page"];
19817
20572
  }
19818
- if (requestParameters["deviceId"] != null) {
19819
- queryParameters["device_id"] = requestParameters["deviceId"];
20573
+ if (requestParameters["perPage"] != null) {
20574
+ queryParameters["per_page"] = requestParameters["perPage"];
19820
20575
  }
19821
20576
  if (requestParameters["status"] != null) {
19822
20577
  queryParameters["status"] = requestParameters["status"];
19823
20578
  }
19824
- if (requestParameters["limit"] != null) {
19825
- queryParameters["limit"] = requestParameters["limit"];
19826
- }
19827
- if (requestParameters["offset"] != null) {
19828
- queryParameters["offset"] = requestParameters["offset"];
20579
+ if (requestParameters["search"] != null) {
20580
+ queryParameters["search"] = requestParameters["search"];
19829
20581
  }
19830
20582
  const headerParameters = {};
19831
20583
  if (this.configuration && this.configuration.apiKey) {
19832
20584
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19833
20585
  }
19834
20586
  const response = await this.request({
19835
- path: `/push`,
20587
+ path: `/sms`,
19836
20588
  method: "GET",
19837
20589
  headers: headerParameters,
19838
20590
  query: queryParameters
19839
20591
  }, initOverrides);
19840
- return new JSONApiResponse(response, (jsonValue) => PushListResponseFromJSON(jsonValue));
20592
+ return new JSONApiResponse(response, (jsonValue) => SmsListResponseFromJSON(jsonValue));
19841
20593
  }
19842
20594
  /**
19843
- * List push notification messages for the account with optional filtering.
19844
- * List push notifications
20595
+ * List SMS messages for the account with optional filtering and pagination.
20596
+ * List SMS messages
19845
20597
  */
19846
- async listPush(userId, deviceId, status, limit, offset, initOverrides) {
19847
- const response = await this.listPushRaw({ userId, deviceId, status, limit, offset }, initOverrides);
20598
+ async listSms(page, perPage, status, search, initOverrides) {
20599
+ const response = await this.listSmsRaw({ page, perPage, status, search }, initOverrides);
19848
20600
  return await response.value();
19849
20601
  }
19850
20602
  /**
19851
- * Get all devices subscribed to a push notification topic with pagination.
19852
- * List devices subscribed to a topic
20603
+ * Send SMS messages to multiple recipients (up to 100) in a single request.
20604
+ * Send batch SMS messages
19853
20605
  */
19854
- async listPushTopicDevicesRaw(requestParameters, initOverrides) {
19855
- if (requestParameters["key"] == null) {
20606
+ async sendBatchSmsRaw(requestParameters, initOverrides) {
20607
+ if (requestParameters["sendBatchSmsRequest"] == null) {
19856
20608
  throw new RequiredError(
19857
- "key",
19858
- 'Required parameter "key" was null or undefined when calling listPushTopicDevices().'
20609
+ "sendBatchSmsRequest",
20610
+ 'Required parameter "sendBatchSmsRequest" was null or undefined when calling sendBatchSms().'
19859
20611
  );
19860
20612
  }
19861
20613
  const queryParameters = {};
19862
- if (requestParameters["limit"] != null) {
19863
- queryParameters["limit"] = requestParameters["limit"];
19864
- }
19865
- if (requestParameters["offset"] != null) {
19866
- queryParameters["offset"] = requestParameters["offset"];
19867
- }
19868
20614
  const headerParameters = {};
20615
+ headerParameters["Content-Type"] = "application/json";
19869
20616
  if (this.configuration && this.configuration.apiKey) {
19870
20617
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19871
20618
  }
19872
20619
  const response = await this.request({
19873
- path: `/push/topics/{key}/devices`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
19874
- method: "GET",
20620
+ path: `/sms/batch`,
20621
+ method: "POST",
19875
20622
  headers: headerParameters,
19876
- query: queryParameters
20623
+ query: queryParameters,
20624
+ body: SendBatchSmsRequestToJSON(requestParameters["sendBatchSmsRequest"])
19877
20625
  }, initOverrides);
19878
- return new JSONApiResponse(response, (jsonValue) => PushTopicDeviceListResponseFromJSON(jsonValue));
20626
+ return new JSONApiResponse(response, (jsonValue) => SendBatchSmsResponseFromJSON(jsonValue));
19879
20627
  }
19880
20628
  /**
19881
- * Get all devices subscribed to a push notification topic with pagination.
19882
- * List devices subscribed to a topic
20629
+ * Send SMS messages to multiple recipients (up to 100) in a single request.
20630
+ * Send batch SMS messages
19883
20631
  */
19884
- async listPushTopicDevices(key, limit, offset, initOverrides) {
19885
- const response = await this.listPushTopicDevicesRaw({ key, limit, offset }, initOverrides);
20632
+ async sendBatchSms(sendBatchSmsRequest, initOverrides) {
20633
+ const response = await this.sendBatchSmsRaw({ sendBatchSmsRequest }, initOverrides);
19886
20634
  return await response.value();
19887
20635
  }
19888
20636
  /**
19889
- * Send a push notification to a specific device, multiple devices, all devices for a subscriber, or to a topic. Supports scheduling via `send_at` or `delay`.
19890
- * Send a push notification
20637
+ * Send a single SMS text message. Supports subscriber preference checks and scheduling.
20638
+ * Send an SMS message
19891
20639
  */
19892
- async sendPushRaw(requestParameters, initOverrides) {
19893
- if (requestParameters["sendPushRequest"] == null) {
20640
+ async sendSmsRaw(requestParameters, initOverrides) {
20641
+ if (requestParameters["sendSmsRequest"] == null) {
19894
20642
  throw new RequiredError(
19895
- "sendPushRequest",
19896
- 'Required parameter "sendPushRequest" was null or undefined when calling sendPush().'
20643
+ "sendSmsRequest",
20644
+ 'Required parameter "sendSmsRequest" was null or undefined when calling sendSms().'
19897
20645
  );
19898
20646
  }
19899
20647
  const queryParameters = {};
@@ -19903,37 +20651,31 @@ var PushApi = class extends BaseAPI {
19903
20651
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19904
20652
  }
19905
20653
  const response = await this.request({
19906
- path: `/push`,
20654
+ path: `/sms`,
19907
20655
  method: "POST",
19908
20656
  headers: headerParameters,
19909
20657
  query: queryParameters,
19910
- body: SendPushRequestToJSON(requestParameters["sendPushRequest"])
20658
+ body: SendSmsRequestToJSON(requestParameters["sendSmsRequest"])
19911
20659
  }, initOverrides);
19912
- return new JSONApiResponse(response, (jsonValue) => SendPushResponseFromJSON(jsonValue));
20660
+ return new JSONApiResponse(response, (jsonValue) => SendSmsResponseFromJSON(jsonValue));
19913
20661
  }
19914
20662
  /**
19915
- * Send a push notification to a specific device, multiple devices, all devices for a subscriber, or to a topic. Supports scheduling via `send_at` or `delay`.
19916
- * Send a push notification
20663
+ * Send a single SMS text message. Supports subscriber preference checks and scheduling.
20664
+ * Send an SMS message
19917
20665
  */
19918
- async sendPush(sendPushRequest, initOverrides) {
19919
- const response = await this.sendPushRaw({ sendPushRequest }, initOverrides);
20666
+ async sendSms(sendSmsRequest, initOverrides) {
20667
+ const response = await this.sendSmsRaw({ sendSmsRequest }, initOverrides);
19920
20668
  return await response.value();
19921
20669
  }
19922
20670
  /**
19923
- * Send a push notification to all devices subscribed to a topic.
19924
- * Send push notification to a topic
20671
+ * Send a test SMS message to verify the provider configuration is working.
20672
+ * Send a test SMS
19925
20673
  */
19926
- async sendPushToTopicRaw(requestParameters, initOverrides) {
19927
- if (requestParameters["key"] == null) {
19928
- throw new RequiredError(
19929
- "key",
19930
- 'Required parameter "key" was null or undefined when calling sendPushToTopic().'
19931
- );
19932
- }
19933
- if (requestParameters["sendPushToTopicRequest"] == null) {
20674
+ async sendTestSmsRaw(requestParameters, initOverrides) {
20675
+ if (requestParameters["sendTestSmsRequest"] == null) {
19934
20676
  throw new RequiredError(
19935
- "sendPushToTopicRequest",
19936
- 'Required parameter "sendPushToTopicRequest" was null or undefined when calling sendPushToTopic().'
20677
+ "sendTestSmsRequest",
20678
+ 'Required parameter "sendTestSmsRequest" was null or undefined when calling sendTestSms().'
19937
20679
  );
19938
20680
  }
19939
20681
  const queryParameters = {};
@@ -19943,37 +20685,31 @@ var PushApi = class extends BaseAPI {
19943
20685
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19944
20686
  }
19945
20687
  const response = await this.request({
19946
- path: `/push/topics/{key}/send`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
20688
+ path: `/sms/test`,
19947
20689
  method: "POST",
19948
20690
  headers: headerParameters,
19949
20691
  query: queryParameters,
19950
- body: SendPushToTopicRequestToJSON(requestParameters["sendPushToTopicRequest"])
20692
+ body: SendTestSmsRequestToJSON(requestParameters["sendTestSmsRequest"])
19951
20693
  }, initOverrides);
19952
- return new JSONApiResponse(response, (jsonValue) => SendPushToTopicResponseFromJSON(jsonValue));
20694
+ return new JSONApiResponse(response, (jsonValue) => SendTestSmsResponseFromJSON(jsonValue));
19953
20695
  }
19954
20696
  /**
19955
- * Send a push notification to all devices subscribed to a topic.
19956
- * Send push notification to a topic
20697
+ * Send a test SMS message to verify the provider configuration is working.
20698
+ * Send a test SMS
19957
20699
  */
19958
- async sendPushToTopic(key, sendPushToTopicRequest, initOverrides) {
19959
- const response = await this.sendPushToTopicRaw({ key, sendPushToTopicRequest }, initOverrides);
20700
+ async sendTestSms(sendTestSmsRequest, initOverrides) {
20701
+ const response = await this.sendTestSmsRaw({ sendTestSmsRequest }, initOverrides);
19960
20702
  return await response.value();
19961
20703
  }
19962
20704
  /**
19963
- * Subscribe one or more devices to a push notification topic. Maximum 100 devices per request.
19964
- * Subscribe devices to a push topic
20705
+ * Set up or update the SMS provider configuration (Twilio) for the account. Automatically verifies credentials.
20706
+ * Create or update SMS configuration
19965
20707
  */
19966
- async subscribePushTopicRaw(requestParameters, initOverrides) {
19967
- if (requestParameters["key"] == null) {
19968
- throw new RequiredError(
19969
- "key",
19970
- 'Required parameter "key" was null or undefined when calling subscribePushTopic().'
19971
- );
19972
- }
19973
- if (requestParameters["subscribePushTopicRequest"] == null) {
20708
+ async upsertSmsConfigRaw(requestParameters, initOverrides) {
20709
+ if (requestParameters["upsertSmsConfigRequest"] == null) {
19974
20710
  throw new RequiredError(
19975
- "subscribePushTopicRequest",
19976
- 'Required parameter "subscribePushTopicRequest" was null or undefined when calling subscribePushTopic().'
20711
+ "upsertSmsConfigRequest",
20712
+ 'Required parameter "upsertSmsConfigRequest" was null or undefined when calling upsertSmsConfig().'
19977
20713
  );
19978
20714
  }
19979
20715
  const queryParameters = {};
@@ -19983,108 +20719,69 @@ var PushApi = class extends BaseAPI {
19983
20719
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19984
20720
  }
19985
20721
  const response = await this.request({
19986
- path: `/push/topics/{key}/subscribe`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
20722
+ path: `/sms/config`,
19987
20723
  method: "POST",
19988
20724
  headers: headerParameters,
19989
20725
  query: queryParameters,
19990
- body: SubscribePushTopicRequestToJSON(requestParameters["subscribePushTopicRequest"])
20726
+ body: UpsertSmsConfigRequestToJSON(requestParameters["upsertSmsConfigRequest"])
19991
20727
  }, initOverrides);
19992
- return new JSONApiResponse(response, (jsonValue) => PushTopicSubscribeResponseFromJSON(jsonValue));
20728
+ return new JSONApiResponse(response, (jsonValue) => SmsConfigResponseFromJSON(jsonValue));
19993
20729
  }
19994
20730
  /**
19995
- * Subscribe one or more devices to a push notification topic. Maximum 100 devices per request.
19996
- * Subscribe devices to a push topic
20731
+ * Set up or update the SMS provider configuration (Twilio) for the account. Automatically verifies credentials.
20732
+ * Create or update SMS configuration
19997
20733
  */
19998
- async subscribePushTopic(key, subscribePushTopicRequest, initOverrides) {
19999
- const response = await this.subscribePushTopicRaw({ key, subscribePushTopicRequest }, initOverrides);
20734
+ async upsertSmsConfig(upsertSmsConfigRequest, initOverrides) {
20735
+ const response = await this.upsertSmsConfigRaw({ upsertSmsConfigRequest }, initOverrides);
20000
20736
  return await response.value();
20001
20737
  }
20002
20738
  /**
20003
- * Unsubscribe one or more devices from a push notification topic. Maximum 100 devices per request.
20004
- * Unsubscribe devices from a push topic
20739
+ * Verify the SMS provider credentials are valid and working.
20740
+ * Verify SMS configuration
20005
20741
  */
20006
- async unsubscribePushTopicRaw(requestParameters, initOverrides) {
20007
- if (requestParameters["key"] == null) {
20008
- throw new RequiredError(
20009
- "key",
20010
- 'Required parameter "key" was null or undefined when calling unsubscribePushTopic().'
20011
- );
20012
- }
20013
- if (requestParameters["subscribePushTopicRequest"] == null) {
20014
- throw new RequiredError(
20015
- "subscribePushTopicRequest",
20016
- 'Required parameter "subscribePushTopicRequest" was null or undefined when calling unsubscribePushTopic().'
20017
- );
20018
- }
20742
+ async verifySmsConfigRaw(initOverrides) {
20019
20743
  const queryParameters = {};
20020
20744
  const headerParameters = {};
20021
- headerParameters["Content-Type"] = "application/json";
20022
20745
  if (this.configuration && this.configuration.apiKey) {
20023
20746
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20024
20747
  }
20025
20748
  const response = await this.request({
20026
- path: `/push/topics/{key}/unsubscribe`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
20749
+ path: `/sms/config/verify`,
20027
20750
  method: "POST",
20028
20751
  headers: headerParameters,
20029
- query: queryParameters,
20030
- body: SubscribePushTopicRequestToJSON(requestParameters["subscribePushTopicRequest"])
20752
+ query: queryParameters
20031
20753
  }, initOverrides);
20032
- return new JSONApiResponse(response, (jsonValue) => PushTopicUnsubscribeResponseFromJSON(jsonValue));
20754
+ return new JSONApiResponse(response, (jsonValue) => VerifySmsConfigResponseFromJSON(jsonValue));
20033
20755
  }
20034
20756
  /**
20035
- * Unsubscribe one or more devices from a push notification topic. Maximum 100 devices per request.
20036
- * Unsubscribe devices from a push topic
20757
+ * Verify the SMS provider credentials are valid and working.
20758
+ * Verify SMS configuration
20037
20759
  */
20038
- async unsubscribePushTopic(key, subscribePushTopicRequest, initOverrides) {
20039
- const response = await this.unsubscribePushTopicRaw({ key, subscribePushTopicRequest }, initOverrides);
20760
+ async verifySmsConfig(initOverrides) {
20761
+ const response = await this.verifySmsConfigRaw(initOverrides);
20040
20762
  return await response.value();
20041
20763
  }
20042
20764
  };
20043
- var ListPushStatusEnum = {
20044
- PENDING: "pending",
20765
+ var ListSmsStatusEnum = {
20045
20766
  QUEUED: "queued",
20767
+ SENDING: "sending",
20046
20768
  SENT: "sent",
20047
20769
  DELIVERED: "delivered",
20770
+ UNDELIVERED: "undelivered",
20048
20771
  FAILED: "failed"
20049
20772
  };
20050
20773
 
20051
- // src/src/apis/SMSApi.ts
20052
- var SMSApi = class extends BaseAPI {
20053
- /**
20054
- * Remove the SMS provider configuration for the account.
20055
- * Delete SMS configuration
20056
- */
20057
- async deleteSmsConfigRaw(initOverrides) {
20058
- const queryParameters = {};
20059
- const headerParameters = {};
20060
- if (this.configuration && this.configuration.apiKey) {
20061
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20062
- }
20063
- const response = await this.request({
20064
- path: `/sms/config`,
20065
- method: "DELETE",
20066
- headers: headerParameters,
20067
- query: queryParameters
20068
- }, initOverrides);
20069
- return new JSONApiResponse(response, (jsonValue) => SmsConfigDeleteResponseFromJSON(jsonValue));
20070
- }
20071
- /**
20072
- * Remove the SMS provider configuration for the account.
20073
- * Delete SMS configuration
20074
- */
20075
- async deleteSmsConfig(initOverrides) {
20076
- const response = await this.deleteSmsConfigRaw(initOverrides);
20077
- return await response.value();
20078
- }
20774
+ // src/src/apis/SlackApi.ts
20775
+ var SlackApi = class extends BaseAPI {
20079
20776
  /**
20080
- * Get detailed information about a specific SMS message.
20081
- * Get SMS message details
20777
+ * Retrieve a single Slack message by ID, including its full block/attachment payload and status timestamps.
20778
+ * Get a Slack message
20082
20779
  */
20083
- async getSmsRaw(requestParameters, initOverrides) {
20780
+ async getSlackMessageRaw(requestParameters, initOverrides) {
20084
20781
  if (requestParameters["id"] == null) {
20085
20782
  throw new RequiredError(
20086
20783
  "id",
20087
- 'Required parameter "id" was null or undefined when calling getSms().'
20784
+ 'Required parameter "id" was null or undefined when calling getSlackMessage().'
20088
20785
  );
20089
20786
  }
20090
20787
  const queryParameters = {};
@@ -20093,94 +20790,71 @@ var SMSApi = class extends BaseAPI {
20093
20790
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20094
20791
  }
20095
20792
  const response = await this.request({
20096
- path: `/sms/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
20097
- method: "GET",
20098
- headers: headerParameters,
20099
- query: queryParameters
20100
- }, initOverrides);
20101
- return new JSONApiResponse(response, (jsonValue) => SmsDetailResponseFromJSON(jsonValue));
20102
- }
20103
- /**
20104
- * Get detailed information about a specific SMS message.
20105
- * Get SMS message details
20106
- */
20107
- async getSms(id, initOverrides) {
20108
- const response = await this.getSmsRaw({ id }, initOverrides);
20109
- return await response.value();
20110
- }
20111
- /**
20112
- * Get the current SMS provider configuration for the account.
20113
- * Get SMS configuration
20114
- */
20115
- async getSmsConfigRaw(initOverrides) {
20116
- const queryParameters = {};
20117
- const headerParameters = {};
20118
- if (this.configuration && this.configuration.apiKey) {
20119
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20120
- }
20121
- const response = await this.request({
20122
- path: `/sms/config`,
20793
+ path: `/slack/messages/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
20123
20794
  method: "GET",
20124
20795
  headers: headerParameters,
20125
20796
  query: queryParameters
20126
20797
  }, initOverrides);
20127
- return new JSONApiResponse(response, (jsonValue) => SmsConfigResponseFromJSON(jsonValue));
20798
+ return new JSONApiResponse(response, (jsonValue) => SlackMessageResponseFromJSON(jsonValue));
20128
20799
  }
20129
20800
  /**
20130
- * Get the current SMS provider configuration for the account.
20131
- * Get SMS configuration
20801
+ * Retrieve a single Slack message by ID, including its full block/attachment payload and status timestamps.
20802
+ * Get a Slack message
20132
20803
  */
20133
- async getSmsConfig(initOverrides) {
20134
- const response = await this.getSmsConfigRaw(initOverrides);
20804
+ async getSlackMessage(id, initOverrides) {
20805
+ const response = await this.getSlackMessageRaw({ id }, initOverrides);
20135
20806
  return await response.value();
20136
20807
  }
20137
20808
  /**
20138
- * List SMS messages for the account with optional filtering and pagination.
20139
- * List SMS messages
20809
+ * List Slack messages sent through the project, with optional filtering by connection, channel, and status.
20810
+ * List Slack messages
20140
20811
  */
20141
- async listSmsRaw(requestParameters, initOverrides) {
20812
+ async listSlackMessagesRaw(requestParameters, initOverrides) {
20142
20813
  const queryParameters = {};
20143
- if (requestParameters["page"] != null) {
20144
- queryParameters["page"] = requestParameters["page"];
20814
+ if (requestParameters["connectionId"] != null) {
20815
+ queryParameters["connection_id"] = requestParameters["connectionId"];
20145
20816
  }
20146
- if (requestParameters["perPage"] != null) {
20147
- queryParameters["per_page"] = requestParameters["perPage"];
20817
+ if (requestParameters["channelId"] != null) {
20818
+ queryParameters["channel_id"] = requestParameters["channelId"];
20148
20819
  }
20149
20820
  if (requestParameters["status"] != null) {
20150
20821
  queryParameters["status"] = requestParameters["status"];
20151
20822
  }
20152
- if (requestParameters["search"] != null) {
20153
- queryParameters["search"] = requestParameters["search"];
20823
+ if (requestParameters["limit"] != null) {
20824
+ queryParameters["limit"] = requestParameters["limit"];
20825
+ }
20826
+ if (requestParameters["offset"] != null) {
20827
+ queryParameters["offset"] = requestParameters["offset"];
20154
20828
  }
20155
20829
  const headerParameters = {};
20156
20830
  if (this.configuration && this.configuration.apiKey) {
20157
20831
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20158
20832
  }
20159
20833
  const response = await this.request({
20160
- path: `/sms`,
20834
+ path: `/slack/messages`,
20161
20835
  method: "GET",
20162
20836
  headers: headerParameters,
20163
20837
  query: queryParameters
20164
20838
  }, initOverrides);
20165
- return new JSONApiResponse(response, (jsonValue) => SmsListResponseFromJSON(jsonValue));
20839
+ return new JSONApiResponse(response, (jsonValue) => SlackMessageListResponseFromJSON(jsonValue));
20166
20840
  }
20167
20841
  /**
20168
- * List SMS messages for the account with optional filtering and pagination.
20169
- * List SMS messages
20842
+ * List Slack messages sent through the project, with optional filtering by connection, channel, and status.
20843
+ * List Slack messages
20170
20844
  */
20171
- async listSms(page, perPage, status, search, initOverrides) {
20172
- const response = await this.listSmsRaw({ page, perPage, status, search }, initOverrides);
20845
+ async listSlackMessages(connectionId, channelId, status, limit, offset, initOverrides) {
20846
+ const response = await this.listSlackMessagesRaw({ connectionId, channelId, status, limit, offset }, initOverrides);
20173
20847
  return await response.value();
20174
20848
  }
20175
20849
  /**
20176
- * Send SMS messages to multiple recipients (up to 100) in a single request.
20177
- * Send batch SMS messages
20850
+ * Send a message to a Slack channel through a connected Slack workspace. Either `text` or `blocks` must be provided. If `connection_id` is omitted, the project\'s active Slack connection is used. If `channel` is omitted, the connection\'s default channel is used.
20851
+ * Send a Slack message
20178
20852
  */
20179
- async sendBatchSmsRaw(requestParameters, initOverrides) {
20180
- if (requestParameters["sendBatchSmsRequest"] == null) {
20853
+ async sendSlackMessageRaw(requestParameters, initOverrides) {
20854
+ if (requestParameters["sendSlackMessageRequest"] == null) {
20181
20855
  throw new RequiredError(
20182
- "sendBatchSmsRequest",
20183
- 'Required parameter "sendBatchSmsRequest" was null or undefined when calling sendBatchSms().'
20856
+ "sendSlackMessageRequest",
20857
+ 'Required parameter "sendSlackMessageRequest" was null or undefined when calling sendSlackMessage().'
20184
20858
  );
20185
20859
  }
20186
20860
  const queryParameters = {};
@@ -20190,267 +20864,20 @@ var SMSApi = class extends BaseAPI {
20190
20864
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20191
20865
  }
20192
20866
  const response = await this.request({
20193
- path: `/sms/batch`,
20867
+ path: `/slack/send`,
20194
20868
  method: "POST",
20195
20869
  headers: headerParameters,
20196
20870
  query: queryParameters,
20197
- body: SendBatchSmsRequestToJSON(requestParameters["sendBatchSmsRequest"])
20871
+ body: SendSlackMessageRequestToJSON(requestParameters["sendSlackMessageRequest"])
20198
20872
  }, initOverrides);
20199
- return new JSONApiResponse(response, (jsonValue) => SendBatchSmsResponseFromJSON(jsonValue));
20873
+ return new JSONApiResponse(response, (jsonValue) => SendSlackMessageResponseFromJSON(jsonValue));
20200
20874
  }
20201
20875
  /**
20202
- * Send SMS messages to multiple recipients (up to 100) in a single request.
20203
- * Send batch SMS messages
20876
+ * Send a message to a Slack channel through a connected Slack workspace. Either `text` or `blocks` must be provided. If `connection_id` is omitted, the project\'s active Slack connection is used. If `channel` is omitted, the connection\'s default channel is used.
20877
+ * Send a Slack message
20204
20878
  */
20205
- async sendBatchSms(sendBatchSmsRequest, initOverrides) {
20206
- const response = await this.sendBatchSmsRaw({ sendBatchSmsRequest }, initOverrides);
20207
- return await response.value();
20208
- }
20209
- /**
20210
- * Send a single SMS text message. Supports subscriber preference checks and scheduling.
20211
- * Send an SMS message
20212
- */
20213
- async sendSmsRaw(requestParameters, initOverrides) {
20214
- if (requestParameters["sendSmsRequest"] == null) {
20215
- throw new RequiredError(
20216
- "sendSmsRequest",
20217
- 'Required parameter "sendSmsRequest" was null or undefined when calling sendSms().'
20218
- );
20219
- }
20220
- const queryParameters = {};
20221
- const headerParameters = {};
20222
- headerParameters["Content-Type"] = "application/json";
20223
- if (this.configuration && this.configuration.apiKey) {
20224
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20225
- }
20226
- const response = await this.request({
20227
- path: `/sms`,
20228
- method: "POST",
20229
- headers: headerParameters,
20230
- query: queryParameters,
20231
- body: SendSmsRequestToJSON(requestParameters["sendSmsRequest"])
20232
- }, initOverrides);
20233
- return new JSONApiResponse(response, (jsonValue) => SendSmsResponseFromJSON(jsonValue));
20234
- }
20235
- /**
20236
- * Send a single SMS text message. Supports subscriber preference checks and scheduling.
20237
- * Send an SMS message
20238
- */
20239
- async sendSms(sendSmsRequest, initOverrides) {
20240
- const response = await this.sendSmsRaw({ sendSmsRequest }, initOverrides);
20241
- return await response.value();
20242
- }
20243
- /**
20244
- * Send a test SMS message to verify the provider configuration is working.
20245
- * Send a test SMS
20246
- */
20247
- async sendTestSmsRaw(requestParameters, initOverrides) {
20248
- if (requestParameters["sendTestSmsRequest"] == null) {
20249
- throw new RequiredError(
20250
- "sendTestSmsRequest",
20251
- 'Required parameter "sendTestSmsRequest" was null or undefined when calling sendTestSms().'
20252
- );
20253
- }
20254
- const queryParameters = {};
20255
- const headerParameters = {};
20256
- headerParameters["Content-Type"] = "application/json";
20257
- if (this.configuration && this.configuration.apiKey) {
20258
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20259
- }
20260
- const response = await this.request({
20261
- path: `/sms/test`,
20262
- method: "POST",
20263
- headers: headerParameters,
20264
- query: queryParameters,
20265
- body: SendTestSmsRequestToJSON(requestParameters["sendTestSmsRequest"])
20266
- }, initOverrides);
20267
- return new JSONApiResponse(response, (jsonValue) => SendTestSmsResponseFromJSON(jsonValue));
20268
- }
20269
- /**
20270
- * Send a test SMS message to verify the provider configuration is working.
20271
- * Send a test SMS
20272
- */
20273
- async sendTestSms(sendTestSmsRequest, initOverrides) {
20274
- const response = await this.sendTestSmsRaw({ sendTestSmsRequest }, initOverrides);
20275
- return await response.value();
20276
- }
20277
- /**
20278
- * Set up or update the SMS provider configuration (Twilio) for the account. Automatically verifies credentials.
20279
- * Create or update SMS configuration
20280
- */
20281
- async upsertSmsConfigRaw(requestParameters, initOverrides) {
20282
- if (requestParameters["upsertSmsConfigRequest"] == null) {
20283
- throw new RequiredError(
20284
- "upsertSmsConfigRequest",
20285
- 'Required parameter "upsertSmsConfigRequest" was null or undefined when calling upsertSmsConfig().'
20286
- );
20287
- }
20288
- const queryParameters = {};
20289
- const headerParameters = {};
20290
- headerParameters["Content-Type"] = "application/json";
20291
- if (this.configuration && this.configuration.apiKey) {
20292
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20293
- }
20294
- const response = await this.request({
20295
- path: `/sms/config`,
20296
- method: "POST",
20297
- headers: headerParameters,
20298
- query: queryParameters,
20299
- body: UpsertSmsConfigRequestToJSON(requestParameters["upsertSmsConfigRequest"])
20300
- }, initOverrides);
20301
- return new JSONApiResponse(response, (jsonValue) => SmsConfigResponseFromJSON(jsonValue));
20302
- }
20303
- /**
20304
- * Set up or update the SMS provider configuration (Twilio) for the account. Automatically verifies credentials.
20305
- * Create or update SMS configuration
20306
- */
20307
- async upsertSmsConfig(upsertSmsConfigRequest, initOverrides) {
20308
- const response = await this.upsertSmsConfigRaw({ upsertSmsConfigRequest }, initOverrides);
20309
- return await response.value();
20310
- }
20311
- /**
20312
- * Verify the SMS provider credentials are valid and working.
20313
- * Verify SMS configuration
20314
- */
20315
- async verifySmsConfigRaw(initOverrides) {
20316
- const queryParameters = {};
20317
- const headerParameters = {};
20318
- if (this.configuration && this.configuration.apiKey) {
20319
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20320
- }
20321
- const response = await this.request({
20322
- path: `/sms/config/verify`,
20323
- method: "POST",
20324
- headers: headerParameters,
20325
- query: queryParameters
20326
- }, initOverrides);
20327
- return new JSONApiResponse(response, (jsonValue) => VerifySmsConfigResponseFromJSON(jsonValue));
20328
- }
20329
- /**
20330
- * Verify the SMS provider credentials are valid and working.
20331
- * Verify SMS configuration
20332
- */
20333
- async verifySmsConfig(initOverrides) {
20334
- const response = await this.verifySmsConfigRaw(initOverrides);
20335
- return await response.value();
20336
- }
20337
- };
20338
- var ListSmsStatusEnum = {
20339
- QUEUED: "queued",
20340
- SENDING: "sending",
20341
- SENT: "sent",
20342
- DELIVERED: "delivered",
20343
- UNDELIVERED: "undelivered",
20344
- FAILED: "failed"
20345
- };
20346
-
20347
- // src/src/apis/SlackApi.ts
20348
- var SlackApi = class extends BaseAPI {
20349
- /**
20350
- * Retrieve a single Slack message by ID, including its full block/attachment payload and status timestamps.
20351
- * Get a Slack message
20352
- */
20353
- async getSlackMessageRaw(requestParameters, initOverrides) {
20354
- if (requestParameters["id"] == null) {
20355
- throw new RequiredError(
20356
- "id",
20357
- 'Required parameter "id" was null or undefined when calling getSlackMessage().'
20358
- );
20359
- }
20360
- const queryParameters = {};
20361
- const headerParameters = {};
20362
- if (this.configuration && this.configuration.apiKey) {
20363
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20364
- }
20365
- const response = await this.request({
20366
- path: `/slack/messages/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
20367
- method: "GET",
20368
- headers: headerParameters,
20369
- query: queryParameters
20370
- }, initOverrides);
20371
- return new JSONApiResponse(response, (jsonValue) => SlackMessageResponseFromJSON(jsonValue));
20372
- }
20373
- /**
20374
- * Retrieve a single Slack message by ID, including its full block/attachment payload and status timestamps.
20375
- * Get a Slack message
20376
- */
20377
- async getSlackMessage(id, initOverrides) {
20378
- const response = await this.getSlackMessageRaw({ id }, initOverrides);
20379
- return await response.value();
20380
- }
20381
- /**
20382
- * List Slack messages sent through the project, with optional filtering by connection, channel, and status.
20383
- * List Slack messages
20384
- */
20385
- async listSlackMessagesRaw(requestParameters, initOverrides) {
20386
- const queryParameters = {};
20387
- if (requestParameters["connectionId"] != null) {
20388
- queryParameters["connection_id"] = requestParameters["connectionId"];
20389
- }
20390
- if (requestParameters["channelId"] != null) {
20391
- queryParameters["channel_id"] = requestParameters["channelId"];
20392
- }
20393
- if (requestParameters["status"] != null) {
20394
- queryParameters["status"] = requestParameters["status"];
20395
- }
20396
- if (requestParameters["limit"] != null) {
20397
- queryParameters["limit"] = requestParameters["limit"];
20398
- }
20399
- if (requestParameters["offset"] != null) {
20400
- queryParameters["offset"] = requestParameters["offset"];
20401
- }
20402
- const headerParameters = {};
20403
- if (this.configuration && this.configuration.apiKey) {
20404
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20405
- }
20406
- const response = await this.request({
20407
- path: `/slack/messages`,
20408
- method: "GET",
20409
- headers: headerParameters,
20410
- query: queryParameters
20411
- }, initOverrides);
20412
- return new JSONApiResponse(response, (jsonValue) => SlackMessageListResponseFromJSON(jsonValue));
20413
- }
20414
- /**
20415
- * List Slack messages sent through the project, with optional filtering by connection, channel, and status.
20416
- * List Slack messages
20417
- */
20418
- async listSlackMessages(connectionId, channelId, status, limit, offset, initOverrides) {
20419
- const response = await this.listSlackMessagesRaw({ connectionId, channelId, status, limit, offset }, initOverrides);
20420
- return await response.value();
20421
- }
20422
- /**
20423
- * Send a message to a Slack channel through a connected Slack workspace. Either `text` or `blocks` must be provided. If `connection_id` is omitted, the project\'s active Slack connection is used. If `channel` is omitted, the connection\'s default channel is used.
20424
- * Send a Slack message
20425
- */
20426
- async sendSlackMessageRaw(requestParameters, initOverrides) {
20427
- if (requestParameters["sendSlackMessageRequest"] == null) {
20428
- throw new RequiredError(
20429
- "sendSlackMessageRequest",
20430
- 'Required parameter "sendSlackMessageRequest" was null or undefined when calling sendSlackMessage().'
20431
- );
20432
- }
20433
- const queryParameters = {};
20434
- const headerParameters = {};
20435
- headerParameters["Content-Type"] = "application/json";
20436
- if (this.configuration && this.configuration.apiKey) {
20437
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20438
- }
20439
- const response = await this.request({
20440
- path: `/slack/send`,
20441
- method: "POST",
20442
- headers: headerParameters,
20443
- query: queryParameters,
20444
- body: SendSlackMessageRequestToJSON(requestParameters["sendSlackMessageRequest"])
20445
- }, initOverrides);
20446
- return new JSONApiResponse(response, (jsonValue) => SendSlackMessageResponseFromJSON(jsonValue));
20447
- }
20448
- /**
20449
- * Send a message to a Slack channel through a connected Slack workspace. Either `text` or `blocks` must be provided. If `connection_id` is omitted, the project\'s active Slack connection is used. If `channel` is omitted, the connection\'s default channel is used.
20450
- * Send a Slack message
20451
- */
20452
- async sendSlackMessage(sendSlackMessageRequest, initOverrides) {
20453
- const response = await this.sendSlackMessageRaw({ sendSlackMessageRequest }, initOverrides);
20879
+ async sendSlackMessage(sendSlackMessageRequest, initOverrides) {
20880
+ const response = await this.sendSlackMessageRaw({ sendSlackMessageRequest }, initOverrides);
20454
20881
  return await response.value();
20455
20882
  }
20456
20883
  };
@@ -22980,56 +23407,486 @@ var WebhooksApi = class extends BaseAPI {
22980
23407
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
22981
23408
  }
22982
23409
  const response = await this.request({
22983
- path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
22984
- method: "DELETE",
23410
+ path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23411
+ method: "DELETE",
23412
+ headers: headerParameters,
23413
+ query: queryParameters
23414
+ }, initOverrides);
23415
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeleteResponseFromJSON(jsonValue));
23416
+ }
23417
+ /**
23418
+ * Delete a webhook and clean up associated circuit breaker, rate limit, and metrics state.
23419
+ * Delete webhook
23420
+ */
23421
+ async deleteWebhook(id, initOverrides) {
23422
+ const response = await this.deleteWebhookRaw({ id }, initOverrides);
23423
+ return await response.value();
23424
+ }
23425
+ /**
23426
+ * Get aggregate webhook health and performance metrics for the entire account.
23427
+ * Get account webhook metrics
23428
+ */
23429
+ async getAccountWebhookMetricsRaw(initOverrides) {
23430
+ const queryParameters = {};
23431
+ const headerParameters = {};
23432
+ if (this.configuration && this.configuration.apiKey) {
23433
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23434
+ }
23435
+ const response = await this.request({
23436
+ path: `/v1/webhooks/metrics`,
23437
+ method: "GET",
23438
+ headers: headerParameters,
23439
+ query: queryParameters
23440
+ }, initOverrides);
23441
+ return new JSONApiResponse(response, (jsonValue) => WebhookAccountMetricsResponseFromJSON(jsonValue));
23442
+ }
23443
+ /**
23444
+ * Get aggregate webhook health and performance metrics for the entire account.
23445
+ * Get account webhook metrics
23446
+ */
23447
+ async getAccountWebhookMetrics(initOverrides) {
23448
+ const response = await this.getAccountWebhookMetricsRaw(initOverrides);
23449
+ return await response.value();
23450
+ }
23451
+ /**
23452
+ * Get a specific webhook by ID.
23453
+ * Get webhook
23454
+ */
23455
+ async getWebhookRaw(requestParameters, initOverrides) {
23456
+ if (requestParameters["id"] == null) {
23457
+ throw new RequiredError(
23458
+ "id",
23459
+ 'Required parameter "id" was null or undefined when calling getWebhook().'
23460
+ );
23461
+ }
23462
+ const queryParameters = {};
23463
+ const headerParameters = {};
23464
+ if (this.configuration && this.configuration.apiKey) {
23465
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23466
+ }
23467
+ const response = await this.request({
23468
+ path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23469
+ method: "GET",
23470
+ headers: headerParameters,
23471
+ query: queryParameters
23472
+ }, initOverrides);
23473
+ return new JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
23474
+ }
23475
+ /**
23476
+ * Get a specific webhook by ID.
23477
+ * Get webhook
23478
+ */
23479
+ async getWebhook(id, initOverrides) {
23480
+ const response = await this.getWebhookRaw({ id }, initOverrides);
23481
+ return await response.value();
23482
+ }
23483
+ /**
23484
+ * Get the circuit breaker state for a webhook endpoint.
23485
+ * Get circuit breaker state
23486
+ */
23487
+ async getWebhookCircuitStateRaw(requestParameters, initOverrides) {
23488
+ if (requestParameters["id"] == null) {
23489
+ throw new RequiredError(
23490
+ "id",
23491
+ 'Required parameter "id" was null or undefined when calling getWebhookCircuitState().'
23492
+ );
23493
+ }
23494
+ const queryParameters = {};
23495
+ const headerParameters = {};
23496
+ if (this.configuration && this.configuration.apiKey) {
23497
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23498
+ }
23499
+ const response = await this.request({
23500
+ path: `/v1/webhooks/{id}/circuit`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23501
+ method: "GET",
23502
+ headers: headerParameters,
23503
+ query: queryParameters
23504
+ }, initOverrides);
23505
+ return new JSONApiResponse(response, (jsonValue) => WebhookCircuitStateResponseFromJSON(jsonValue));
23506
+ }
23507
+ /**
23508
+ * Get the circuit breaker state for a webhook endpoint.
23509
+ * Get circuit breaker state
23510
+ */
23511
+ async getWebhookCircuitState(id, initOverrides) {
23512
+ const response = await this.getWebhookCircuitStateRaw({ id }, initOverrides);
23513
+ return await response.value();
23514
+ }
23515
+ /**
23516
+ * Get a single delivery with full details including payload, headers, and response for debugging.
23517
+ * Get webhook delivery details
23518
+ */
23519
+ async getWebhookDeliveryRaw(requestParameters, initOverrides) {
23520
+ if (requestParameters["id"] == null) {
23521
+ throw new RequiredError(
23522
+ "id",
23523
+ 'Required parameter "id" was null or undefined when calling getWebhookDelivery().'
23524
+ );
23525
+ }
23526
+ if (requestParameters["deliveryId"] == null) {
23527
+ throw new RequiredError(
23528
+ "deliveryId",
23529
+ 'Required parameter "deliveryId" was null or undefined when calling getWebhookDelivery().'
23530
+ );
23531
+ }
23532
+ const queryParameters = {};
23533
+ const headerParameters = {};
23534
+ if (this.configuration && this.configuration.apiKey) {
23535
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23536
+ }
23537
+ const response = await this.request({
23538
+ path: `/v1/webhooks/{id}/deliveries/{deliveryId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"deliveryId"}}`, encodeURIComponent(String(requestParameters["deliveryId"]))),
23539
+ method: "GET",
23540
+ headers: headerParameters,
23541
+ query: queryParameters
23542
+ }, initOverrides);
23543
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryResponseFromJSON(jsonValue));
23544
+ }
23545
+ /**
23546
+ * Get a single delivery with full details including payload, headers, and response for debugging.
23547
+ * Get webhook delivery details
23548
+ */
23549
+ async getWebhookDelivery(id, deliveryId, initOverrides) {
23550
+ const response = await this.getWebhookDeliveryRaw({ id, deliveryId }, initOverrides);
23551
+ return await response.value();
23552
+ }
23553
+ /**
23554
+ * Get static IP addresses used for webhook deliveries. Requires dedicated_ip plan feature (Scale/Enterprise).
23555
+ * Get static webhook IPs
23556
+ */
23557
+ async getWebhookIpsRaw(initOverrides) {
23558
+ const queryParameters = {};
23559
+ const headerParameters = {};
23560
+ if (this.configuration && this.configuration.apiKey) {
23561
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23562
+ }
23563
+ const response = await this.request({
23564
+ path: `/v1/webhooks/ips`,
23565
+ method: "GET",
23566
+ headers: headerParameters,
23567
+ query: queryParameters
23568
+ }, initOverrides);
23569
+ return new JSONApiResponse(response, (jsonValue) => WebhookIpsResponseFromJSON(jsonValue));
23570
+ }
23571
+ /**
23572
+ * Get static IP addresses used for webhook deliveries. Requires dedicated_ip plan feature (Scale/Enterprise).
23573
+ * Get static webhook IPs
23574
+ */
23575
+ async getWebhookIps(initOverrides) {
23576
+ const response = await this.getWebhookIpsRaw(initOverrides);
23577
+ return await response.value();
23578
+ }
23579
+ /**
23580
+ * Get the status of a replay or bulk retry job.
23581
+ * Get replay/retry job status
23582
+ */
23583
+ async getWebhookJobRaw(requestParameters, initOverrides) {
23584
+ if (requestParameters["jobId"] == null) {
23585
+ throw new RequiredError(
23586
+ "jobId",
23587
+ 'Required parameter "jobId" was null or undefined when calling getWebhookJob().'
23588
+ );
23589
+ }
23590
+ const queryParameters = {};
23591
+ const headerParameters = {};
23592
+ if (this.configuration && this.configuration.apiKey) {
23593
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23594
+ }
23595
+ const response = await this.request({
23596
+ path: `/v1/webhooks/jobs/{jobId}`.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters["jobId"]))),
23597
+ method: "GET",
23598
+ headers: headerParameters,
23599
+ query: queryParameters
23600
+ }, initOverrides);
23601
+ return new JSONApiResponse(response, (jsonValue) => WebhookJobResponseFromJSON(jsonValue));
23602
+ }
23603
+ /**
23604
+ * Get the status of a replay or bulk retry job.
23605
+ * Get replay/retry job status
23606
+ */
23607
+ async getWebhookJob(jobId, initOverrides) {
23608
+ const response = await this.getWebhookJobRaw({ jobId }, initOverrides);
23609
+ return await response.value();
23610
+ }
23611
+ /**
23612
+ * Get health and performance metrics for a specific webhook endpoint.
23613
+ * Get webhook health metrics
23614
+ */
23615
+ async getWebhookMetricsRaw(requestParameters, initOverrides) {
23616
+ if (requestParameters["id"] == null) {
23617
+ throw new RequiredError(
23618
+ "id",
23619
+ 'Required parameter "id" was null or undefined when calling getWebhookMetrics().'
23620
+ );
23621
+ }
23622
+ const queryParameters = {};
23623
+ const headerParameters = {};
23624
+ if (this.configuration && this.configuration.apiKey) {
23625
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23626
+ }
23627
+ const response = await this.request({
23628
+ path: `/v1/webhooks/{id}/metrics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23629
+ method: "GET",
23630
+ headers: headerParameters,
23631
+ query: queryParameters
23632
+ }, initOverrides);
23633
+ return new JSONApiResponse(response, (jsonValue) => WebhookMetricsResponseFromJSON(jsonValue));
23634
+ }
23635
+ /**
23636
+ * Get health and performance metrics for a specific webhook endpoint.
23637
+ * Get webhook health metrics
23638
+ */
23639
+ async getWebhookMetrics(id, initOverrides) {
23640
+ const response = await this.getWebhookMetricsRaw({ id }, initOverrides);
23641
+ return await response.value();
23642
+ }
23643
+ /**
23644
+ * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
23645
+ * Get available webhook regions
23646
+ */
23647
+ async getWebhookRegionsRaw(initOverrides) {
23648
+ const queryParameters = {};
23649
+ const headerParameters = {};
23650
+ if (this.configuration && this.configuration.apiKey) {
23651
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23652
+ }
23653
+ const response = await this.request({
23654
+ path: `/v1/webhooks/regions`,
23655
+ method: "GET",
23656
+ headers: headerParameters,
23657
+ query: queryParameters
23658
+ }, initOverrides);
23659
+ return new JSONApiResponse(response, (jsonValue) => WebhookRegionsResponseFromJSON(jsonValue));
23660
+ }
23661
+ /**
23662
+ * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
23663
+ * Get available webhook regions
23664
+ */
23665
+ async getWebhookRegions(initOverrides) {
23666
+ const response = await this.getWebhookRegionsRaw(initOverrides);
23667
+ return await response.value();
23668
+ }
23669
+ /**
23670
+ * Get webhook delivery usage statistics for the current billing period.
23671
+ * Get webhook usage metrics
23672
+ */
23673
+ async getWebhookUsageRaw(initOverrides) {
23674
+ const queryParameters = {};
23675
+ const headerParameters = {};
23676
+ if (this.configuration && this.configuration.apiKey) {
23677
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23678
+ }
23679
+ const response = await this.request({
23680
+ path: `/v1/webhooks/usage`,
23681
+ method: "GET",
23682
+ headers: headerParameters,
23683
+ query: queryParameters
23684
+ }, initOverrides);
23685
+ return new JSONApiResponse(response, (jsonValue) => WebhookUsageResponseFromJSON(jsonValue));
23686
+ }
23687
+ /**
23688
+ * Get webhook delivery usage statistics for the current billing period.
23689
+ * Get webhook usage metrics
23690
+ */
23691
+ async getWebhookUsage(initOverrides) {
23692
+ const response = await this.getWebhookUsageRaw(initOverrides);
23693
+ return await response.value();
23694
+ }
23695
+ /**
23696
+ * List delivery attempts for a webhook with filtering and pagination.
23697
+ * List webhook deliveries
23698
+ */
23699
+ async listWebhookDeliveriesRaw(requestParameters, initOverrides) {
23700
+ if (requestParameters["id"] == null) {
23701
+ throw new RequiredError(
23702
+ "id",
23703
+ 'Required parameter "id" was null or undefined when calling listWebhookDeliveries().'
23704
+ );
23705
+ }
23706
+ const queryParameters = {};
23707
+ if (requestParameters["status"] != null) {
23708
+ queryParameters["status"] = requestParameters["status"];
23709
+ }
23710
+ if (requestParameters["eventType"] != null) {
23711
+ queryParameters["event_type"] = requestParameters["eventType"];
23712
+ }
23713
+ if (requestParameters["search"] != null) {
23714
+ queryParameters["search"] = requestParameters["search"];
23715
+ }
23716
+ if (requestParameters["startDate"] != null) {
23717
+ queryParameters["start_date"] = requestParameters["startDate"].toISOString();
23718
+ }
23719
+ if (requestParameters["endDate"] != null) {
23720
+ queryParameters["end_date"] = requestParameters["endDate"].toISOString();
23721
+ }
23722
+ if (requestParameters["limit"] != null) {
23723
+ queryParameters["limit"] = requestParameters["limit"];
23724
+ }
23725
+ if (requestParameters["offset"] != null) {
23726
+ queryParameters["offset"] = requestParameters["offset"];
23727
+ }
23728
+ const headerParameters = {};
23729
+ if (this.configuration && this.configuration.apiKey) {
23730
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23731
+ }
23732
+ const response = await this.request({
23733
+ path: `/v1/webhooks/{id}/deliveries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23734
+ method: "GET",
23735
+ headers: headerParameters,
23736
+ query: queryParameters
23737
+ }, initOverrides);
23738
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryListResponseFromJSON(jsonValue));
23739
+ }
23740
+ /**
23741
+ * List delivery attempts for a webhook with filtering and pagination.
23742
+ * List webhook deliveries
23743
+ */
23744
+ async listWebhookDeliveries(id, status, eventType, search, startDate, endDate, limit, offset, initOverrides) {
23745
+ const response = await this.listWebhookDeliveriesRaw({ id, status, eventType, search, startDate, endDate, limit, offset }, initOverrides);
23746
+ return await response.value();
23747
+ }
23748
+ /**
23749
+ * List available webhook event types with full registry information. Optionally filter by category.
23750
+ * List webhook event types
23751
+ */
23752
+ async listWebhookEventTypesRaw(requestParameters, initOverrides) {
23753
+ const queryParameters = {};
23754
+ if (requestParameters["category"] != null) {
23755
+ queryParameters["category"] = requestParameters["category"];
23756
+ }
23757
+ const headerParameters = {};
23758
+ if (this.configuration && this.configuration.apiKey) {
23759
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23760
+ }
23761
+ const response = await this.request({
23762
+ path: `/v1/webhooks/events`,
23763
+ method: "GET",
23764
+ headers: headerParameters,
23765
+ query: queryParameters
23766
+ }, initOverrides);
23767
+ return new JSONApiResponse(response, (jsonValue) => WebhookEventTypesResponseFromJSON(jsonValue));
23768
+ }
23769
+ /**
23770
+ * List available webhook event types with full registry information. Optionally filter by category.
23771
+ * List webhook event types
23772
+ */
23773
+ async listWebhookEventTypes(category, initOverrides) {
23774
+ const response = await this.listWebhookEventTypesRaw({ category }, initOverrides);
23775
+ return await response.value();
23776
+ }
23777
+ /**
23778
+ * List available webhook API versions with changelog and deprecation info.
23779
+ * List webhook API versions
23780
+ */
23781
+ async listWebhookVersionsRaw(initOverrides) {
23782
+ const queryParameters = {};
23783
+ const headerParameters = {};
23784
+ if (this.configuration && this.configuration.apiKey) {
23785
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23786
+ }
23787
+ const response = await this.request({
23788
+ path: `/v1/webhooks/versions`,
23789
+ method: "GET",
23790
+ headers: headerParameters,
23791
+ query: queryParameters
23792
+ }, initOverrides);
23793
+ return new JSONApiResponse(response, (jsonValue) => WebhookVersionsResponseFromJSON(jsonValue));
23794
+ }
23795
+ /**
23796
+ * List available webhook API versions with changelog and deprecation info.
23797
+ * List webhook API versions
23798
+ */
23799
+ async listWebhookVersions(initOverrides) {
23800
+ const response = await this.listWebhookVersionsRaw(initOverrides);
23801
+ return await response.value();
23802
+ }
23803
+ /**
23804
+ * List all webhooks for the account with pagination.
23805
+ * List webhooks
23806
+ */
23807
+ async listWebhooksRaw(requestParameters, initOverrides) {
23808
+ const queryParameters = {};
23809
+ if (requestParameters["limit"] != null) {
23810
+ queryParameters["limit"] = requestParameters["limit"];
23811
+ }
23812
+ if (requestParameters["offset"] != null) {
23813
+ queryParameters["offset"] = requestParameters["offset"];
23814
+ }
23815
+ const headerParameters = {};
23816
+ if (this.configuration && this.configuration.apiKey) {
23817
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23818
+ }
23819
+ const response = await this.request({
23820
+ path: `/v1/webhooks`,
23821
+ method: "GET",
22985
23822
  headers: headerParameters,
22986
23823
  query: queryParameters
22987
23824
  }, initOverrides);
22988
- return new JSONApiResponse(response, (jsonValue) => WebhookDeleteResponseFromJSON(jsonValue));
23825
+ return new JSONApiResponse(response, (jsonValue) => WebhookListResponseFromJSON(jsonValue));
22989
23826
  }
22990
23827
  /**
22991
- * Delete a webhook and clean up associated circuit breaker, rate limit, and metrics state.
22992
- * Delete webhook
23828
+ * List all webhooks for the account with pagination.
23829
+ * List webhooks
22993
23830
  */
22994
- async deleteWebhook(id, initOverrides) {
22995
- const response = await this.deleteWebhookRaw({ id }, initOverrides);
23831
+ async listWebhooks(limit, offset, initOverrides) {
23832
+ const response = await this.listWebhooksRaw({ limit, offset }, initOverrides);
22996
23833
  return await response.value();
22997
23834
  }
22998
23835
  /**
22999
- * Get aggregate webhook health and performance metrics for the entire account.
23000
- * Get account webhook metrics
23836
+ * Replay events for a webhook within a date range. Creates an asynchronous job that re-delivers matching events.
23837
+ * Replay webhook events
23001
23838
  */
23002
- async getAccountWebhookMetricsRaw(initOverrides) {
23839
+ async replayWebhookEventsRaw(requestParameters, initOverrides) {
23840
+ if (requestParameters["id"] == null) {
23841
+ throw new RequiredError(
23842
+ "id",
23843
+ 'Required parameter "id" was null or undefined when calling replayWebhookEvents().'
23844
+ );
23845
+ }
23846
+ if (requestParameters["replayWebhookEventsRequest"] == null) {
23847
+ throw new RequiredError(
23848
+ "replayWebhookEventsRequest",
23849
+ 'Required parameter "replayWebhookEventsRequest" was null or undefined when calling replayWebhookEvents().'
23850
+ );
23851
+ }
23003
23852
  const queryParameters = {};
23004
23853
  const headerParameters = {};
23854
+ headerParameters["Content-Type"] = "application/json";
23005
23855
  if (this.configuration && this.configuration.apiKey) {
23006
23856
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23007
23857
  }
23008
23858
  const response = await this.request({
23009
- path: `/v1/webhooks/metrics`,
23010
- method: "GET",
23859
+ path: `/v1/webhooks/{id}/replay`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23860
+ method: "POST",
23011
23861
  headers: headerParameters,
23012
- query: queryParameters
23862
+ query: queryParameters,
23863
+ body: ReplayWebhookEventsRequestToJSON(requestParameters["replayWebhookEventsRequest"])
23013
23864
  }, initOverrides);
23014
- return new JSONApiResponse(response, (jsonValue) => WebhookAccountMetricsResponseFromJSON(jsonValue));
23865
+ return new JSONApiResponse(response, (jsonValue) => WebhookReplayResponseFromJSON(jsonValue));
23015
23866
  }
23016
23867
  /**
23017
- * Get aggregate webhook health and performance metrics for the entire account.
23018
- * Get account webhook metrics
23868
+ * Replay events for a webhook within a date range. Creates an asynchronous job that re-delivers matching events.
23869
+ * Replay webhook events
23019
23870
  */
23020
- async getAccountWebhookMetrics(initOverrides) {
23021
- const response = await this.getAccountWebhookMetricsRaw(initOverrides);
23871
+ async replayWebhookEvents(id, replayWebhookEventsRequest, initOverrides) {
23872
+ const response = await this.replayWebhookEventsRaw({ id, replayWebhookEventsRequest }, initOverrides);
23022
23873
  return await response.value();
23023
23874
  }
23024
23875
  /**
23025
- * Get a specific webhook by ID.
23026
- * Get webhook
23876
+ * Retry a failed or exhausted webhook delivery. Only deliveries with status \'failed\' or \'exhausted\' can be retried.
23877
+ * Retry webhook delivery
23027
23878
  */
23028
- async getWebhookRaw(requestParameters, initOverrides) {
23879
+ async retryWebhookDeliveryRaw(requestParameters, initOverrides) {
23029
23880
  if (requestParameters["id"] == null) {
23030
23881
  throw new RequiredError(
23031
23882
  "id",
23032
- 'Required parameter "id" was null or undefined when calling getWebhook().'
23883
+ 'Required parameter "id" was null or undefined when calling retryWebhookDelivery().'
23884
+ );
23885
+ }
23886
+ if (requestParameters["deliveryId"] == null) {
23887
+ throw new RequiredError(
23888
+ "deliveryId",
23889
+ 'Required parameter "deliveryId" was null or undefined when calling retryWebhookDelivery().'
23033
23890
  );
23034
23891
  }
23035
23892
  const queryParameters = {};
@@ -23038,30 +23895,30 @@ var WebhooksApi = class extends BaseAPI {
23038
23895
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23039
23896
  }
23040
23897
  const response = await this.request({
23041
- path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23042
- method: "GET",
23898
+ path: `/v1/webhooks/{id}/deliveries/{deliveryId}/retry`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"deliveryId"}}`, encodeURIComponent(String(requestParameters["deliveryId"]))),
23899
+ method: "POST",
23043
23900
  headers: headerParameters,
23044
23901
  query: queryParameters
23045
23902
  }, initOverrides);
23046
- return new JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
23903
+ return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryRetryResponseFromJSON(jsonValue));
23047
23904
  }
23048
23905
  /**
23049
- * Get a specific webhook by ID.
23050
- * Get webhook
23906
+ * Retry a failed or exhausted webhook delivery. Only deliveries with status \'failed\' or \'exhausted\' can be retried.
23907
+ * Retry webhook delivery
23051
23908
  */
23052
- async getWebhook(id, initOverrides) {
23053
- const response = await this.getWebhookRaw({ id }, initOverrides);
23909
+ async retryWebhookDelivery(id, deliveryId, initOverrides) {
23910
+ const response = await this.retryWebhookDeliveryRaw({ id, deliveryId }, initOverrides);
23054
23911
  return await response.value();
23055
23912
  }
23056
23913
  /**
23057
- * Get the circuit breaker state for a webhook endpoint.
23058
- * Get circuit breaker state
23914
+ * Rotate the signing secret for a webhook. The new secret is only returned once.
23915
+ * Rotate webhook secret
23059
23916
  */
23060
- async getWebhookCircuitStateRaw(requestParameters, initOverrides) {
23917
+ async rotateWebhookSecretRaw(requestParameters, initOverrides) {
23061
23918
  if (requestParameters["id"] == null) {
23062
23919
  throw new RequiredError(
23063
23920
  "id",
23064
- 'Required parameter "id" was null or undefined when calling getWebhookCircuitState().'
23921
+ 'Required parameter "id" was null or undefined when calling rotateWebhookSecret().'
23065
23922
  );
23066
23923
  }
23067
23924
  const queryParameters = {};
@@ -23070,356 +23927,413 @@ var WebhooksApi = class extends BaseAPI {
23070
23927
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23071
23928
  }
23072
23929
  const response = await this.request({
23073
- path: `/v1/webhooks/{id}/circuit`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23074
- method: "GET",
23930
+ path: `/v1/webhooks/{id}/rotate-secret`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23931
+ method: "POST",
23075
23932
  headers: headerParameters,
23076
23933
  query: queryParameters
23077
23934
  }, initOverrides);
23078
- return new JSONApiResponse(response, (jsonValue) => WebhookCircuitStateResponseFromJSON(jsonValue));
23935
+ return new JSONApiResponse(response, (jsonValue) => WebhookSecretRotateResponseFromJSON(jsonValue));
23079
23936
  }
23080
23937
  /**
23081
- * Get the circuit breaker state for a webhook endpoint.
23082
- * Get circuit breaker state
23938
+ * Rotate the signing secret for a webhook. The new secret is only returned once.
23939
+ * Rotate webhook secret
23083
23940
  */
23084
- async getWebhookCircuitState(id, initOverrides) {
23085
- const response = await this.getWebhookCircuitStateRaw({ id }, initOverrides);
23941
+ async rotateWebhookSecret(id, initOverrides) {
23942
+ const response = await this.rotateWebhookSecretRaw({ id }, initOverrides);
23086
23943
  return await response.value();
23087
23944
  }
23088
23945
  /**
23089
- * Get a single delivery with full details including payload, headers, and response for debugging.
23090
- * Get webhook delivery details
23946
+ * Send a test event to the webhook endpoint. Accepts optional event_type and custom payload.
23947
+ * Send test event
23091
23948
  */
23092
- async getWebhookDeliveryRaw(requestParameters, initOverrides) {
23949
+ async sendWebhookTestEventRaw(requestParameters, initOverrides) {
23093
23950
  if (requestParameters["id"] == null) {
23094
23951
  throw new RequiredError(
23095
23952
  "id",
23096
- 'Required parameter "id" was null or undefined when calling getWebhookDelivery().'
23097
- );
23098
- }
23099
- if (requestParameters["deliveryId"] == null) {
23100
- throw new RequiredError(
23101
- "deliveryId",
23102
- 'Required parameter "deliveryId" was null or undefined when calling getWebhookDelivery().'
23953
+ 'Required parameter "id" was null or undefined when calling sendWebhookTestEvent().'
23103
23954
  );
23104
23955
  }
23105
23956
  const queryParameters = {};
23106
23957
  const headerParameters = {};
23958
+ headerParameters["Content-Type"] = "application/json";
23107
23959
  if (this.configuration && this.configuration.apiKey) {
23108
23960
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23109
23961
  }
23110
23962
  const response = await this.request({
23111
- path: `/v1/webhooks/{id}/deliveries/{deliveryId}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"deliveryId"}}`, encodeURIComponent(String(requestParameters["deliveryId"]))),
23112
- method: "GET",
23963
+ path: `/v1/webhooks/{id}/test`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23964
+ method: "POST",
23113
23965
  headers: headerParameters,
23114
- query: queryParameters
23966
+ query: queryParameters,
23967
+ body: SendWebhookTestEventRequestToJSON(requestParameters["sendWebhookTestEventRequest"])
23115
23968
  }, initOverrides);
23116
- return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryResponseFromJSON(jsonValue));
23969
+ return new JSONApiResponse(response, (jsonValue) => WebhookTestEventResponseFromJSON(jsonValue));
23117
23970
  }
23118
23971
  /**
23119
- * Get a single delivery with full details including payload, headers, and response for debugging.
23120
- * Get webhook delivery details
23972
+ * Send a test event to the webhook endpoint. Accepts optional event_type and custom payload.
23973
+ * Send test event
23121
23974
  */
23122
- async getWebhookDelivery(id, deliveryId, initOverrides) {
23123
- const response = await this.getWebhookDeliveryRaw({ id, deliveryId }, initOverrides);
23975
+ async sendWebhookTestEvent(id, sendWebhookTestEventRequest, initOverrides) {
23976
+ const response = await this.sendWebhookTestEventRaw({ id, sendWebhookTestEventRequest }, initOverrides);
23124
23977
  return await response.value();
23125
23978
  }
23126
23979
  /**
23127
- * Get static IP addresses used for webhook deliveries. Requires dedicated_ip plan feature (Scale/Enterprise).
23128
- * Get static webhook IPs
23980
+ * Preview how a payload would be transformed by the webhook\'s transformation rules without actually delivering.
23981
+ * Test payload transformation
23129
23982
  */
23130
- async getWebhookIpsRaw(initOverrides) {
23983
+ async testWebhookTransformRaw(requestParameters, initOverrides) {
23984
+ if (requestParameters["id"] == null) {
23985
+ throw new RequiredError(
23986
+ "id",
23987
+ 'Required parameter "id" was null or undefined when calling testWebhookTransform().'
23988
+ );
23989
+ }
23990
+ if (requestParameters["testWebhookTransformRequest"] == null) {
23991
+ throw new RequiredError(
23992
+ "testWebhookTransformRequest",
23993
+ 'Required parameter "testWebhookTransformRequest" was null or undefined when calling testWebhookTransform().'
23994
+ );
23995
+ }
23131
23996
  const queryParameters = {};
23132
23997
  const headerParameters = {};
23998
+ headerParameters["Content-Type"] = "application/json";
23133
23999
  if (this.configuration && this.configuration.apiKey) {
23134
24000
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23135
24001
  }
23136
24002
  const response = await this.request({
23137
- path: `/v1/webhooks/ips`,
23138
- method: "GET",
24003
+ path: `/v1/webhooks/{id}/transform/test`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
24004
+ method: "POST",
23139
24005
  headers: headerParameters,
23140
- query: queryParameters
24006
+ query: queryParameters,
24007
+ body: TestWebhookTransformRequestToJSON(requestParameters["testWebhookTransformRequest"])
23141
24008
  }, initOverrides);
23142
- return new JSONApiResponse(response, (jsonValue) => WebhookIpsResponseFromJSON(jsonValue));
24009
+ return new JSONApiResponse(response, (jsonValue) => WebhookTransformTestResponseFromJSON(jsonValue));
23143
24010
  }
23144
24011
  /**
23145
- * Get static IP addresses used for webhook deliveries. Requires dedicated_ip plan feature (Scale/Enterprise).
23146
- * Get static webhook IPs
24012
+ * Preview how a payload would be transformed by the webhook\'s transformation rules without actually delivering.
24013
+ * Test payload transformation
23147
24014
  */
23148
- async getWebhookIps(initOverrides) {
23149
- const response = await this.getWebhookIpsRaw(initOverrides);
24015
+ async testWebhookTransform(id, testWebhookTransformRequest, initOverrides) {
24016
+ const response = await this.testWebhookTransformRaw({ id, testWebhookTransformRequest }, initOverrides);
23150
24017
  return await response.value();
23151
24018
  }
23152
24019
  /**
23153
- * Get the status of a replay or bulk retry job.
23154
- * Get replay/retry job status
24020
+ * Update an existing webhook configuration.
24021
+ * Update webhook
23155
24022
  */
23156
- async getWebhookJobRaw(requestParameters, initOverrides) {
23157
- if (requestParameters["jobId"] == null) {
24023
+ async updateWebhookRaw(requestParameters, initOverrides) {
24024
+ if (requestParameters["id"] == null) {
23158
24025
  throw new RequiredError(
23159
- "jobId",
23160
- 'Required parameter "jobId" was null or undefined when calling getWebhookJob().'
24026
+ "id",
24027
+ 'Required parameter "id" was null or undefined when calling updateWebhook().'
24028
+ );
24029
+ }
24030
+ if (requestParameters["updateWebhookRequest"] == null) {
24031
+ throw new RequiredError(
24032
+ "updateWebhookRequest",
24033
+ 'Required parameter "updateWebhookRequest" was null or undefined when calling updateWebhook().'
23161
24034
  );
23162
24035
  }
23163
24036
  const queryParameters = {};
23164
24037
  const headerParameters = {};
24038
+ headerParameters["Content-Type"] = "application/json";
23165
24039
  if (this.configuration && this.configuration.apiKey) {
23166
24040
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23167
24041
  }
23168
24042
  const response = await this.request({
23169
- path: `/v1/webhooks/jobs/{jobId}`.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters["jobId"]))),
23170
- method: "GET",
24043
+ path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
24044
+ method: "PUT",
23171
24045
  headers: headerParameters,
23172
- query: queryParameters
24046
+ query: queryParameters,
24047
+ body: UpdateWebhookRequestToJSON(requestParameters["updateWebhookRequest"])
23173
24048
  }, initOverrides);
23174
- return new JSONApiResponse(response, (jsonValue) => WebhookJobResponseFromJSON(jsonValue));
24049
+ return new JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
23175
24050
  }
23176
24051
  /**
23177
- * Get the status of a replay or bulk retry job.
23178
- * Get replay/retry job status
24052
+ * Update an existing webhook configuration.
24053
+ * Update webhook
23179
24054
  */
23180
- async getWebhookJob(jobId, initOverrides) {
23181
- const response = await this.getWebhookJobRaw({ jobId }, initOverrides);
24055
+ async updateWebhook(id, updateWebhookRequest, initOverrides) {
24056
+ const response = await this.updateWebhookRaw({ id, updateWebhookRequest }, initOverrides);
23182
24057
  return await response.value();
23183
24058
  }
24059
+ };
24060
+ var ListWebhookDeliveriesStatusEnum = {
24061
+ PENDING: "pending",
24062
+ DELIVERING: "delivering",
24063
+ DELIVERED: "delivered",
24064
+ FAILED: "failed",
24065
+ EXHAUSTED: "exhausted"
24066
+ };
24067
+
24068
+ // src/src/apis/WorkflowsApi.ts
24069
+ var WorkflowsApi = class extends BaseAPI {
23184
24070
  /**
23185
- * Get health and performance metrics for a specific webhook endpoint.
23186
- * Get webhook health metrics
24071
+ * Append a step to a workflow. Channel steps (`email`, `push`, `sms`, `in_app`, `slack`, `discord`, `teams`) carry message content in `config`; `delay` steps carry `{ amount, unit }`; `branch` steps carry `{ conditions }`.
24072
+ * Add a workflow step
23187
24073
  */
23188
- async getWebhookMetricsRaw(requestParameters, initOverrides) {
23189
- if (requestParameters["id"] == null) {
24074
+ async addWorkflowStepRaw(requestParameters, initOverrides) {
24075
+ if (requestParameters["key"] == null) {
23190
24076
  throw new RequiredError(
23191
- "id",
23192
- 'Required parameter "id" was null or undefined when calling getWebhookMetrics().'
24077
+ "key",
24078
+ 'Required parameter "key" was null or undefined when calling addWorkflowStep().'
24079
+ );
24080
+ }
24081
+ if (requestParameters["addWorkflowStepRequest"] == null) {
24082
+ throw new RequiredError(
24083
+ "addWorkflowStepRequest",
24084
+ 'Required parameter "addWorkflowStepRequest" was null or undefined when calling addWorkflowStep().'
23193
24085
  );
23194
24086
  }
23195
24087
  const queryParameters = {};
23196
24088
  const headerParameters = {};
24089
+ headerParameters["Content-Type"] = "application/json";
23197
24090
  if (this.configuration && this.configuration.apiKey) {
23198
24091
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23199
24092
  }
23200
24093
  const response = await this.request({
23201
- path: `/v1/webhooks/{id}/metrics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23202
- method: "GET",
24094
+ path: `/workflows/{key}/steps`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24095
+ method: "POST",
23203
24096
  headers: headerParameters,
23204
- query: queryParameters
24097
+ query: queryParameters,
24098
+ body: AddWorkflowStepRequestToJSON(requestParameters["addWorkflowStepRequest"])
23205
24099
  }, initOverrides);
23206
- return new JSONApiResponse(response, (jsonValue) => WebhookMetricsResponseFromJSON(jsonValue));
24100
+ return new JSONApiResponse(response, (jsonValue) => AddWorkflowStep201ResponseFromJSON(jsonValue));
23207
24101
  }
23208
24102
  /**
23209
- * Get health and performance metrics for a specific webhook endpoint.
23210
- * Get webhook health metrics
24103
+ * Append a step to a workflow. Channel steps (`email`, `push`, `sms`, `in_app`, `slack`, `discord`, `teams`) carry message content in `config`; `delay` steps carry `{ amount, unit }`; `branch` steps carry `{ conditions }`.
24104
+ * Add a workflow step
23211
24105
  */
23212
- async getWebhookMetrics(id, initOverrides) {
23213
- const response = await this.getWebhookMetricsRaw({ id }, initOverrides);
24106
+ async addWorkflowStep(key, addWorkflowStepRequest, initOverrides) {
24107
+ const response = await this.addWorkflowStepRaw({ key, addWorkflowStepRequest }, initOverrides);
23214
24108
  return await response.value();
23215
24109
  }
23216
24110
  /**
23217
- * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
23218
- * Get available webhook regions
24111
+ * Create a new notification workflow. A workflow is a named, multi-step notification sequence identified by a unique `key` within the project. If `key` is omitted, one is derived from the `name`.
24112
+ * Create a workflow
23219
24113
  */
23220
- async getWebhookRegionsRaw(initOverrides) {
24114
+ async createWorkflowRaw(requestParameters, initOverrides) {
24115
+ if (requestParameters["createWorkflowRequest"] == null) {
24116
+ throw new RequiredError(
24117
+ "createWorkflowRequest",
24118
+ 'Required parameter "createWorkflowRequest" was null or undefined when calling createWorkflow().'
24119
+ );
24120
+ }
23221
24121
  const queryParameters = {};
23222
24122
  const headerParameters = {};
24123
+ headerParameters["Content-Type"] = "application/json";
23223
24124
  if (this.configuration && this.configuration.apiKey) {
23224
24125
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23225
24126
  }
23226
24127
  const response = await this.request({
23227
- path: `/v1/webhooks/regions`,
23228
- method: "GET",
24128
+ path: `/workflows`,
24129
+ method: "POST",
23229
24130
  headers: headerParameters,
23230
- query: queryParameters
24131
+ query: queryParameters,
24132
+ body: CreateWorkflowRequestToJSON(requestParameters["createWorkflowRequest"])
23231
24133
  }, initOverrides);
23232
- return new JSONApiResponse(response, (jsonValue) => WebhookRegionsResponseFromJSON(jsonValue));
24134
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
23233
24135
  }
23234
24136
  /**
23235
- * Get available webhook delivery regions. Requires multi_region plan feature (Enterprise only).
23236
- * Get available webhook regions
24137
+ * Create a new notification workflow. A workflow is a named, multi-step notification sequence identified by a unique `key` within the project. If `key` is omitted, one is derived from the `name`.
24138
+ * Create a workflow
23237
24139
  */
23238
- async getWebhookRegions(initOverrides) {
23239
- const response = await this.getWebhookRegionsRaw(initOverrides);
24140
+ async createWorkflow(createWorkflowRequest, initOverrides) {
24141
+ const response = await this.createWorkflowRaw({ createWorkflowRequest }, initOverrides);
23240
24142
  return await response.value();
23241
24143
  }
23242
24144
  /**
23243
- * Get webhook delivery usage statistics for the current billing period.
23244
- * Get webhook usage metrics
24145
+ * Permanently delete a workflow and all of its steps.
24146
+ * Delete a workflow
23245
24147
  */
23246
- async getWebhookUsageRaw(initOverrides) {
24148
+ async deleteWorkflowRaw(requestParameters, initOverrides) {
24149
+ if (requestParameters["key"] == null) {
24150
+ throw new RequiredError(
24151
+ "key",
24152
+ 'Required parameter "key" was null or undefined when calling deleteWorkflow().'
24153
+ );
24154
+ }
23247
24155
  const queryParameters = {};
23248
24156
  const headerParameters = {};
23249
24157
  if (this.configuration && this.configuration.apiKey) {
23250
24158
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23251
24159
  }
23252
24160
  const response = await this.request({
23253
- path: `/v1/webhooks/usage`,
23254
- method: "GET",
24161
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24162
+ method: "DELETE",
23255
24163
  headers: headerParameters,
23256
24164
  query: queryParameters
23257
24165
  }, initOverrides);
23258
- return new JSONApiResponse(response, (jsonValue) => WebhookUsageResponseFromJSON(jsonValue));
24166
+ return new JSONApiResponse(response, (jsonValue) => DeleteWorkflow200ResponseFromJSON(jsonValue));
23259
24167
  }
23260
24168
  /**
23261
- * Get webhook delivery usage statistics for the current billing period.
23262
- * Get webhook usage metrics
24169
+ * Permanently delete a workflow and all of its steps.
24170
+ * Delete a workflow
23263
24171
  */
23264
- async getWebhookUsage(initOverrides) {
23265
- const response = await this.getWebhookUsageRaw(initOverrides);
24172
+ async deleteWorkflow(key, initOverrides) {
24173
+ const response = await this.deleteWorkflowRaw({ key }, initOverrides);
23266
24174
  return await response.value();
23267
24175
  }
23268
24176
  /**
23269
- * List delivery attempts for a webhook with filtering and pagination.
23270
- * List webhook deliveries
24177
+ * Remove a step from a workflow.
24178
+ * Delete a workflow step
23271
24179
  */
23272
- async listWebhookDeliveriesRaw(requestParameters, initOverrides) {
23273
- if (requestParameters["id"] == null) {
24180
+ async deleteWorkflowStepRaw(requestParameters, initOverrides) {
24181
+ if (requestParameters["key"] == null) {
23274
24182
  throw new RequiredError(
23275
- "id",
23276
- 'Required parameter "id" was null or undefined when calling listWebhookDeliveries().'
24183
+ "key",
24184
+ 'Required parameter "key" was null or undefined when calling deleteWorkflowStep().'
23277
24185
  );
23278
24186
  }
23279
- const queryParameters = {};
23280
- if (requestParameters["status"] != null) {
23281
- queryParameters["status"] = requestParameters["status"];
23282
- }
23283
- if (requestParameters["eventType"] != null) {
23284
- queryParameters["event_type"] = requestParameters["eventType"];
23285
- }
23286
- if (requestParameters["search"] != null) {
23287
- queryParameters["search"] = requestParameters["search"];
23288
- }
23289
- if (requestParameters["startDate"] != null) {
23290
- queryParameters["start_date"] = requestParameters["startDate"].toISOString();
23291
- }
23292
- if (requestParameters["endDate"] != null) {
23293
- queryParameters["end_date"] = requestParameters["endDate"].toISOString();
23294
- }
23295
- if (requestParameters["limit"] != null) {
23296
- queryParameters["limit"] = requestParameters["limit"];
23297
- }
23298
- if (requestParameters["offset"] != null) {
23299
- queryParameters["offset"] = requestParameters["offset"];
24187
+ if (requestParameters["stepKey"] == null) {
24188
+ throw new RequiredError(
24189
+ "stepKey",
24190
+ 'Required parameter "stepKey" was null or undefined when calling deleteWorkflowStep().'
24191
+ );
23300
24192
  }
24193
+ const queryParameters = {};
23301
24194
  const headerParameters = {};
23302
24195
  if (this.configuration && this.configuration.apiKey) {
23303
24196
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23304
24197
  }
23305
24198
  const response = await this.request({
23306
- path: `/v1/webhooks/{id}/deliveries`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23307
- method: "GET",
24199
+ path: `/workflows/{key}/steps/{stepKey}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))).replace(`{${"stepKey"}}`, encodeURIComponent(String(requestParameters["stepKey"]))),
24200
+ method: "DELETE",
23308
24201
  headers: headerParameters,
23309
24202
  query: queryParameters
23310
24203
  }, initOverrides);
23311
- return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryListResponseFromJSON(jsonValue));
24204
+ return new JSONApiResponse(response, (jsonValue) => DeleteWorkflowStep200ResponseFromJSON(jsonValue));
23312
24205
  }
23313
24206
  /**
23314
- * List delivery attempts for a webhook with filtering and pagination.
23315
- * List webhook deliveries
24207
+ * Remove a step from a workflow.
24208
+ * Delete a workflow step
23316
24209
  */
23317
- async listWebhookDeliveries(id, status, eventType, search, startDate, endDate, limit, offset, initOverrides) {
23318
- const response = await this.listWebhookDeliveriesRaw({ id, status, eventType, search, startDate, endDate, limit, offset }, initOverrides);
24210
+ async deleteWorkflowStep(key, stepKey, initOverrides) {
24211
+ const response = await this.deleteWorkflowStepRaw({ key, stepKey }, initOverrides);
23319
24212
  return await response.value();
23320
24213
  }
23321
24214
  /**
23322
- * List available webhook event types with full registry information. Optionally filter by category.
23323
- * List webhook event types
24215
+ * Retrieve a single workflow by its key, including its ordered steps.
24216
+ * Get a workflow
23324
24217
  */
23325
- async listWebhookEventTypesRaw(requestParameters, initOverrides) {
23326
- const queryParameters = {};
23327
- if (requestParameters["category"] != null) {
23328
- queryParameters["category"] = requestParameters["category"];
24218
+ async getWorkflowRaw(requestParameters, initOverrides) {
24219
+ if (requestParameters["key"] == null) {
24220
+ throw new RequiredError(
24221
+ "key",
24222
+ 'Required parameter "key" was null or undefined when calling getWorkflow().'
24223
+ );
23329
24224
  }
24225
+ const queryParameters = {};
23330
24226
  const headerParameters = {};
23331
24227
  if (this.configuration && this.configuration.apiKey) {
23332
24228
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23333
24229
  }
23334
24230
  const response = await this.request({
23335
- path: `/v1/webhooks/events`,
24231
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
23336
24232
  method: "GET",
23337
24233
  headers: headerParameters,
23338
24234
  query: queryParameters
23339
24235
  }, initOverrides);
23340
- return new JSONApiResponse(response, (jsonValue) => WebhookEventTypesResponseFromJSON(jsonValue));
24236
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
23341
24237
  }
23342
24238
  /**
23343
- * List available webhook event types with full registry information. Optionally filter by category.
23344
- * List webhook event types
24239
+ * Retrieve a single workflow by its key, including its ordered steps.
24240
+ * Get a workflow
23345
24241
  */
23346
- async listWebhookEventTypes(category, initOverrides) {
23347
- const response = await this.listWebhookEventTypesRaw({ category }, initOverrides);
24242
+ async getWorkflow(key, initOverrides) {
24243
+ const response = await this.getWorkflowRaw({ key }, initOverrides);
23348
24244
  return await response.value();
23349
24245
  }
23350
24246
  /**
23351
- * List available webhook API versions with changelog and deprecation info.
23352
- * List webhook API versions
24247
+ * List the executions of a workflow, most recent first. Supports pagination.
24248
+ * List workflow executions
23353
24249
  */
23354
- async listWebhookVersionsRaw(initOverrides) {
24250
+ async listWorkflowExecutionsRaw(requestParameters, initOverrides) {
24251
+ if (requestParameters["key"] == null) {
24252
+ throw new RequiredError(
24253
+ "key",
24254
+ 'Required parameter "key" was null or undefined when calling listWorkflowExecutions().'
24255
+ );
24256
+ }
23355
24257
  const queryParameters = {};
24258
+ if (requestParameters["page"] != null) {
24259
+ queryParameters["page"] = requestParameters["page"];
24260
+ }
24261
+ if (requestParameters["perPage"] != null) {
24262
+ queryParameters["per_page"] = requestParameters["perPage"];
24263
+ }
23356
24264
  const headerParameters = {};
23357
24265
  if (this.configuration && this.configuration.apiKey) {
23358
24266
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23359
24267
  }
23360
24268
  const response = await this.request({
23361
- path: `/v1/webhooks/versions`,
24269
+ path: `/workflows/{key}/executions`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
23362
24270
  method: "GET",
23363
24271
  headers: headerParameters,
23364
24272
  query: queryParameters
23365
24273
  }, initOverrides);
23366
- return new JSONApiResponse(response, (jsonValue) => WebhookVersionsResponseFromJSON(jsonValue));
24274
+ return new JSONApiResponse(response, (jsonValue) => ListWorkflowExecutions200ResponseFromJSON(jsonValue));
23367
24275
  }
23368
24276
  /**
23369
- * List available webhook API versions with changelog and deprecation info.
23370
- * List webhook API versions
24277
+ * List the executions of a workflow, most recent first. Supports pagination.
24278
+ * List workflow executions
23371
24279
  */
23372
- async listWebhookVersions(initOverrides) {
23373
- const response = await this.listWebhookVersionsRaw(initOverrides);
24280
+ async listWorkflowExecutions(key, page, perPage, initOverrides) {
24281
+ const response = await this.listWorkflowExecutionsRaw({ key, page, perPage }, initOverrides);
23374
24282
  return await response.value();
23375
24283
  }
23376
24284
  /**
23377
- * List all webhooks for the account with pagination.
23378
- * List webhooks
24285
+ * List workflows in the project. Supports pagination, free-text search, and status filtering.
24286
+ * List workflows
23379
24287
  */
23380
- async listWebhooksRaw(requestParameters, initOverrides) {
24288
+ async listWorkflowsRaw(requestParameters, initOverrides) {
23381
24289
  const queryParameters = {};
23382
- if (requestParameters["limit"] != null) {
23383
- queryParameters["limit"] = requestParameters["limit"];
24290
+ if (requestParameters["page"] != null) {
24291
+ queryParameters["page"] = requestParameters["page"];
23384
24292
  }
23385
- if (requestParameters["offset"] != null) {
23386
- queryParameters["offset"] = requestParameters["offset"];
24293
+ if (requestParameters["perPage"] != null) {
24294
+ queryParameters["per_page"] = requestParameters["perPage"];
24295
+ }
24296
+ if (requestParameters["search"] != null) {
24297
+ queryParameters["search"] = requestParameters["search"];
24298
+ }
24299
+ if (requestParameters["status"] != null) {
24300
+ queryParameters["status"] = requestParameters["status"];
23387
24301
  }
23388
24302
  const headerParameters = {};
23389
24303
  if (this.configuration && this.configuration.apiKey) {
23390
24304
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23391
24305
  }
23392
24306
  const response = await this.request({
23393
- path: `/v1/webhooks`,
24307
+ path: `/workflows`,
23394
24308
  method: "GET",
23395
24309
  headers: headerParameters,
23396
24310
  query: queryParameters
23397
24311
  }, initOverrides);
23398
- return new JSONApiResponse(response, (jsonValue) => WebhookListResponseFromJSON(jsonValue));
24312
+ return new JSONApiResponse(response, (jsonValue) => ListWorkflows200ResponseFromJSON(jsonValue));
23399
24313
  }
23400
24314
  /**
23401
- * List all webhooks for the account with pagination.
23402
- * List webhooks
24315
+ * List workflows in the project. Supports pagination, free-text search, and status filtering.
24316
+ * List workflows
23403
24317
  */
23404
- async listWebhooks(limit, offset, initOverrides) {
23405
- const response = await this.listWebhooksRaw({ limit, offset }, initOverrides);
24318
+ async listWorkflows(page, perPage, search, status, initOverrides) {
24319
+ const response = await this.listWorkflowsRaw({ page, perPage, search, status }, initOverrides);
23406
24320
  return await response.value();
23407
24321
  }
23408
24322
  /**
23409
- * Replay events for a webhook within a date range. Creates an asynchronous job that re-delivers matching events.
23410
- * Replay webhook events
24323
+ * Reorder a workflow\'s steps. Provide the full set of step keys in the desired order — the array must contain exactly the workflow\'s existing step keys.
24324
+ * Reorder workflow steps
23411
24325
  */
23412
- async replayWebhookEventsRaw(requestParameters, initOverrides) {
23413
- if (requestParameters["id"] == null) {
24326
+ async reorderWorkflowStepsRaw(requestParameters, initOverrides) {
24327
+ if (requestParameters["key"] == null) {
23414
24328
  throw new RequiredError(
23415
- "id",
23416
- 'Required parameter "id" was null or undefined when calling replayWebhookEvents().'
24329
+ "key",
24330
+ 'Required parameter "key" was null or undefined when calling reorderWorkflowSteps().'
23417
24331
  );
23418
24332
  }
23419
- if (requestParameters["replayWebhookEventsRequest"] == null) {
24333
+ if (requestParameters["reorderWorkflowStepsRequest"] == null) {
23420
24334
  throw new RequiredError(
23421
- "replayWebhookEventsRequest",
23422
- 'Required parameter "replayWebhookEventsRequest" was null or undefined when calling replayWebhookEvents().'
24335
+ "reorderWorkflowStepsRequest",
24336
+ 'Required parameter "reorderWorkflowStepsRequest" was null or undefined when calling reorderWorkflowSteps().'
23423
24337
  );
23424
24338
  }
23425
24339
  const queryParameters = {};
@@ -23429,101 +24343,77 @@ var WebhooksApi = class extends BaseAPI {
23429
24343
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23430
24344
  }
23431
24345
  const response = await this.request({
23432
- path: `/v1/webhooks/{id}/replay`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23433
- method: "POST",
24346
+ path: `/workflows/{key}/steps/reorder`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24347
+ method: "PUT",
23434
24348
  headers: headerParameters,
23435
24349
  query: queryParameters,
23436
- body: ReplayWebhookEventsRequestToJSON(requestParameters["replayWebhookEventsRequest"])
24350
+ body: ReorderWorkflowStepsRequestToJSON(requestParameters["reorderWorkflowStepsRequest"])
23437
24351
  }, initOverrides);
23438
- return new JSONApiResponse(response, (jsonValue) => WebhookReplayResponseFromJSON(jsonValue));
24352
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
23439
24353
  }
23440
24354
  /**
23441
- * Replay events for a webhook within a date range. Creates an asynchronous job that re-delivers matching events.
23442
- * Replay webhook events
24355
+ * Reorder a workflow\'s steps. Provide the full set of step keys in the desired order — the array must contain exactly the workflow\'s existing step keys.
24356
+ * Reorder workflow steps
23443
24357
  */
23444
- async replayWebhookEvents(id, replayWebhookEventsRequest, initOverrides) {
23445
- const response = await this.replayWebhookEventsRaw({ id, replayWebhookEventsRequest }, initOverrides);
24358
+ async reorderWorkflowSteps(key, reorderWorkflowStepsRequest, initOverrides) {
24359
+ const response = await this.reorderWorkflowStepsRaw({ key, reorderWorkflowStepsRequest }, initOverrides);
23446
24360
  return await response.value();
23447
24361
  }
23448
24362
  /**
23449
- * Retry a failed or exhausted webhook delivery. Only deliveries with status \'failed\' or \'exhausted\' can be retried.
23450
- * Retry webhook delivery
24363
+ * Trigger an execution of an active workflow for one or more recipients. The `to` field accepts a single recipient, an array of recipients, or a topic object (`{ \"topic\": \"topic-key\" }`) to trigger for all subscribers of a topic. One execution is created per resolved subscriber.
24364
+ * Trigger a workflow
23451
24365
  */
23452
- async retryWebhookDeliveryRaw(requestParameters, initOverrides) {
23453
- if (requestParameters["id"] == null) {
24366
+ async triggerWorkflowRaw(requestParameters, initOverrides) {
24367
+ if (requestParameters["key"] == null) {
23454
24368
  throw new RequiredError(
23455
- "id",
23456
- 'Required parameter "id" was null or undefined when calling retryWebhookDelivery().'
24369
+ "key",
24370
+ 'Required parameter "key" was null or undefined when calling triggerWorkflow().'
23457
24371
  );
23458
24372
  }
23459
- if (requestParameters["deliveryId"] == null) {
24373
+ if (requestParameters["triggerWorkflowRequest"] == null) {
23460
24374
  throw new RequiredError(
23461
- "deliveryId",
23462
- 'Required parameter "deliveryId" was null or undefined when calling retryWebhookDelivery().'
24375
+ "triggerWorkflowRequest",
24376
+ 'Required parameter "triggerWorkflowRequest" was null or undefined when calling triggerWorkflow().'
23463
24377
  );
23464
24378
  }
23465
24379
  const queryParameters = {};
23466
24380
  const headerParameters = {};
24381
+ headerParameters["Content-Type"] = "application/json";
23467
24382
  if (this.configuration && this.configuration.apiKey) {
23468
24383
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23469
24384
  }
23470
24385
  const response = await this.request({
23471
- path: `/v1/webhooks/{id}/deliveries/{deliveryId}/retry`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))).replace(`{${"deliveryId"}}`, encodeURIComponent(String(requestParameters["deliveryId"]))),
24386
+ path: `/workflows/{key}/trigger`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
23472
24387
  method: "POST",
23473
24388
  headers: headerParameters,
23474
- query: queryParameters
24389
+ query: queryParameters,
24390
+ body: TriggerWorkflowRequestToJSON(requestParameters["triggerWorkflowRequest"])
23475
24391
  }, initOverrides);
23476
- return new JSONApiResponse(response, (jsonValue) => WebhookDeliveryRetryResponseFromJSON(jsonValue));
24392
+ return new JSONApiResponse(response, (jsonValue) => TriggerWorkflow202ResponseFromJSON(jsonValue));
23477
24393
  }
23478
24394
  /**
23479
- * Retry a failed or exhausted webhook delivery. Only deliveries with status \'failed\' or \'exhausted\' can be retried.
23480
- * Retry webhook delivery
24395
+ * Trigger an execution of an active workflow for one or more recipients. The `to` field accepts a single recipient, an array of recipients, or a topic object (`{ \"topic\": \"topic-key\" }`) to trigger for all subscribers of a topic. One execution is created per resolved subscriber.
24396
+ * Trigger a workflow
23481
24397
  */
23482
- async retryWebhookDelivery(id, deliveryId, initOverrides) {
23483
- const response = await this.retryWebhookDeliveryRaw({ id, deliveryId }, initOverrides);
24398
+ async triggerWorkflow(key, triggerWorkflowRequest, initOverrides) {
24399
+ const response = await this.triggerWorkflowRaw({ key, triggerWorkflowRequest }, initOverrides);
23484
24400
  return await response.value();
23485
24401
  }
23486
24402
  /**
23487
- * Rotate the signing secret for a webhook. The new secret is only returned once.
23488
- * Rotate webhook secret
24403
+ * Update a workflow\'s metadata. Only the provided fields are changed. To change the status, use the dedicated status endpoint.
24404
+ * Update a workflow
23489
24405
  */
23490
- async rotateWebhookSecretRaw(requestParameters, initOverrides) {
23491
- if (requestParameters["id"] == null) {
24406
+ async updateWorkflowRaw(requestParameters, initOverrides) {
24407
+ if (requestParameters["key"] == null) {
23492
24408
  throw new RequiredError(
23493
- "id",
23494
- 'Required parameter "id" was null or undefined when calling rotateWebhookSecret().'
24409
+ "key",
24410
+ 'Required parameter "key" was null or undefined when calling updateWorkflow().'
23495
24411
  );
23496
24412
  }
23497
- const queryParameters = {};
23498
- const headerParameters = {};
23499
- if (this.configuration && this.configuration.apiKey) {
23500
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23501
- }
23502
- const response = await this.request({
23503
- path: `/v1/webhooks/{id}/rotate-secret`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23504
- method: "POST",
23505
- headers: headerParameters,
23506
- query: queryParameters
23507
- }, initOverrides);
23508
- return new JSONApiResponse(response, (jsonValue) => WebhookSecretRotateResponseFromJSON(jsonValue));
23509
- }
23510
- /**
23511
- * Rotate the signing secret for a webhook. The new secret is only returned once.
23512
- * Rotate webhook secret
23513
- */
23514
- async rotateWebhookSecret(id, initOverrides) {
23515
- const response = await this.rotateWebhookSecretRaw({ id }, initOverrides);
23516
- return await response.value();
23517
- }
23518
- /**
23519
- * Send a test event to the webhook endpoint. Accepts optional event_type and custom payload.
23520
- * Send test event
23521
- */
23522
- async sendWebhookTestEventRaw(requestParameters, initOverrides) {
23523
- if (requestParameters["id"] == null) {
24413
+ if (requestParameters["updateWorkflowRequest"] == null) {
23524
24414
  throw new RequiredError(
23525
- "id",
23526
- 'Required parameter "id" was null or undefined when calling sendWebhookTestEvent().'
24415
+ "updateWorkflowRequest",
24416
+ 'Required parameter "updateWorkflowRequest" was null or undefined when calling updateWorkflow().'
23527
24417
  );
23528
24418
  }
23529
24419
  const queryParameters = {};
@@ -23533,37 +24423,37 @@ var WebhooksApi = class extends BaseAPI {
23533
24423
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23534
24424
  }
23535
24425
  const response = await this.request({
23536
- path: `/v1/webhooks/{id}/test`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23537
- method: "POST",
24426
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24427
+ method: "PATCH",
23538
24428
  headers: headerParameters,
23539
24429
  query: queryParameters,
23540
- body: SendWebhookTestEventRequestToJSON(requestParameters["sendWebhookTestEventRequest"])
24430
+ body: UpdateWorkflowRequestToJSON(requestParameters["updateWorkflowRequest"])
23541
24431
  }, initOverrides);
23542
- return new JSONApiResponse(response, (jsonValue) => WebhookTestEventResponseFromJSON(jsonValue));
24432
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
23543
24433
  }
23544
24434
  /**
23545
- * Send a test event to the webhook endpoint. Accepts optional event_type and custom payload.
23546
- * Send test event
24435
+ * Update a workflow\'s metadata. Only the provided fields are changed. To change the status, use the dedicated status endpoint.
24436
+ * Update a workflow
23547
24437
  */
23548
- async sendWebhookTestEvent(id, sendWebhookTestEventRequest, initOverrides) {
23549
- const response = await this.sendWebhookTestEventRaw({ id, sendWebhookTestEventRequest }, initOverrides);
24438
+ async updateWorkflow(key, updateWorkflowRequest, initOverrides) {
24439
+ const response = await this.updateWorkflowRaw({ key, updateWorkflowRequest }, initOverrides);
23550
24440
  return await response.value();
23551
24441
  }
23552
24442
  /**
23553
- * Preview how a payload would be transformed by the webhook\'s transformation rules without actually delivering.
23554
- * Test payload transformation
24443
+ * Change a workflow\'s lifecycle status. This is the single endpoint for activating, pausing, archiving, or returning a workflow to draft — there are no separate `/activate` or `/pause` endpoints. Set `status` to `active` to activate and `paused` to pause.
24444
+ * Update workflow status
23555
24445
  */
23556
- async testWebhookTransformRaw(requestParameters, initOverrides) {
23557
- if (requestParameters["id"] == null) {
24446
+ async updateWorkflowStatusRaw(requestParameters, initOverrides) {
24447
+ if (requestParameters["key"] == null) {
23558
24448
  throw new RequiredError(
23559
- "id",
23560
- 'Required parameter "id" was null or undefined when calling testWebhookTransform().'
24449
+ "key",
24450
+ 'Required parameter "key" was null or undefined when calling updateWorkflowStatus().'
23561
24451
  );
23562
24452
  }
23563
- if (requestParameters["testWebhookTransformRequest"] == null) {
24453
+ if (requestParameters["updateWorkflowStatusRequest"] == null) {
23564
24454
  throw new RequiredError(
23565
- "testWebhookTransformRequest",
23566
- 'Required parameter "testWebhookTransformRequest" was null or undefined when calling testWebhookTransform().'
24455
+ "updateWorkflowStatusRequest",
24456
+ 'Required parameter "updateWorkflowStatusRequest" was null or undefined when calling updateWorkflowStatus().'
23567
24457
  );
23568
24458
  }
23569
24459
  const queryParameters = {};
@@ -23573,37 +24463,43 @@ var WebhooksApi = class extends BaseAPI {
23573
24463
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23574
24464
  }
23575
24465
  const response = await this.request({
23576
- path: `/v1/webhooks/{id}/transform/test`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23577
- method: "POST",
24466
+ path: `/workflows/{key}/status`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24467
+ method: "PATCH",
23578
24468
  headers: headerParameters,
23579
24469
  query: queryParameters,
23580
- body: TestWebhookTransformRequestToJSON(requestParameters["testWebhookTransformRequest"])
24470
+ body: UpdateWorkflowStatusRequestToJSON(requestParameters["updateWorkflowStatusRequest"])
23581
24471
  }, initOverrides);
23582
- return new JSONApiResponse(response, (jsonValue) => WebhookTransformTestResponseFromJSON(jsonValue));
24472
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
23583
24473
  }
23584
24474
  /**
23585
- * Preview how a payload would be transformed by the webhook\'s transformation rules without actually delivering.
23586
- * Test payload transformation
24475
+ * Change a workflow\'s lifecycle status. This is the single endpoint for activating, pausing, archiving, or returning a workflow to draft — there are no separate `/activate` or `/pause` endpoints. Set `status` to `active` to activate and `paused` to pause.
24476
+ * Update workflow status
23587
24477
  */
23588
- async testWebhookTransform(id, testWebhookTransformRequest, initOverrides) {
23589
- const response = await this.testWebhookTransformRaw({ id, testWebhookTransformRequest }, initOverrides);
24478
+ async updateWorkflowStatus(key, updateWorkflowStatusRequest, initOverrides) {
24479
+ const response = await this.updateWorkflowStatusRaw({ key, updateWorkflowStatusRequest }, initOverrides);
23590
24480
  return await response.value();
23591
24481
  }
23592
24482
  /**
23593
- * Update an existing webhook configuration.
23594
- * Update webhook
24483
+ * Update a step\'s name and/or config. Only the provided fields are changed.
24484
+ * Update a workflow step
23595
24485
  */
23596
- async updateWebhookRaw(requestParameters, initOverrides) {
23597
- if (requestParameters["id"] == null) {
24486
+ async updateWorkflowStepRaw(requestParameters, initOverrides) {
24487
+ if (requestParameters["key"] == null) {
23598
24488
  throw new RequiredError(
23599
- "id",
23600
- 'Required parameter "id" was null or undefined when calling updateWebhook().'
24489
+ "key",
24490
+ 'Required parameter "key" was null or undefined when calling updateWorkflowStep().'
23601
24491
  );
23602
24492
  }
23603
- if (requestParameters["updateWebhookRequest"] == null) {
24493
+ if (requestParameters["stepKey"] == null) {
23604
24494
  throw new RequiredError(
23605
- "updateWebhookRequest",
23606
- 'Required parameter "updateWebhookRequest" was null or undefined when calling updateWebhook().'
24495
+ "stepKey",
24496
+ 'Required parameter "stepKey" was null or undefined when calling updateWorkflowStep().'
24497
+ );
24498
+ }
24499
+ if (requestParameters["updateWorkflowStepRequest"] == null) {
24500
+ throw new RequiredError(
24501
+ "updateWorkflowStepRequest",
24502
+ 'Required parameter "updateWorkflowStepRequest" was null or undefined when calling updateWorkflowStep().'
23607
24503
  );
23608
24504
  }
23609
24505
  const queryParameters = {};
@@ -23613,30 +24509,23 @@ var WebhooksApi = class extends BaseAPI {
23613
24509
  headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
23614
24510
  }
23615
24511
  const response = await this.request({
23616
- path: `/v1/webhooks/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
23617
- method: "PUT",
24512
+ path: `/workflows/{key}/steps/{stepKey}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))).replace(`{${"stepKey"}}`, encodeURIComponent(String(requestParameters["stepKey"]))),
24513
+ method: "PATCH",
23618
24514
  headers: headerParameters,
23619
24515
  query: queryParameters,
23620
- body: UpdateWebhookRequestToJSON(requestParameters["updateWebhookRequest"])
24516
+ body: UpdateWorkflowStepRequestToJSON(requestParameters["updateWorkflowStepRequest"])
23621
24517
  }, initOverrides);
23622
- return new JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
24518
+ return new JSONApiResponse(response, (jsonValue) => AddWorkflowStep201ResponseFromJSON(jsonValue));
23623
24519
  }
23624
24520
  /**
23625
- * Update an existing webhook configuration.
23626
- * Update webhook
24521
+ * Update a step\'s name and/or config. Only the provided fields are changed.
24522
+ * Update a workflow step
23627
24523
  */
23628
- async updateWebhook(id, updateWebhookRequest, initOverrides) {
23629
- const response = await this.updateWebhookRaw({ id, updateWebhookRequest }, initOverrides);
24524
+ async updateWorkflowStep(key, stepKey, updateWorkflowStepRequest, initOverrides) {
24525
+ const response = await this.updateWorkflowStepRaw({ key, stepKey, updateWorkflowStepRequest }, initOverrides);
23630
24526
  return await response.value();
23631
24527
  }
23632
24528
  };
23633
- var ListWebhookDeliveriesStatusEnum = {
23634
- PENDING: "pending",
23635
- DELIVERING: "delivering",
23636
- DELIVERED: "delivered",
23637
- FAILED: "failed",
23638
- EXHAUSTED: "exhausted"
23639
- };
23640
24529
 
23641
24530
  // src/errors.ts
23642
24531
  var ZyphrError = class extends Error {
@@ -23956,6 +24845,15 @@ export {
23956
24845
  AddTopicSubscribersRequestFromJSONTyped,
23957
24846
  AddTopicSubscribersRequestToJSON,
23958
24847
  AddTopicSubscribersRequestToJSONTyped,
24848
+ AddWorkflowStep201ResponseFromJSON,
24849
+ AddWorkflowStep201ResponseFromJSONTyped,
24850
+ AddWorkflowStep201ResponseToJSON,
24851
+ AddWorkflowStep201ResponseToJSONTyped,
24852
+ AddWorkflowStepRequestBranchPathEnum,
24853
+ AddWorkflowStepRequestFromJSON,
24854
+ AddWorkflowStepRequestFromJSONTyped,
24855
+ AddWorkflowStepRequestToJSON,
24856
+ AddWorkflowStepRequestToJSONTyped,
23959
24857
  ApiErrorErrorFromJSON,
23960
24858
  ApiErrorErrorFromJSONTyped,
23961
24859
  ApiErrorErrorToJSON,
@@ -24247,6 +25145,14 @@ export {
24247
25145
  CreateWebhookRequestFromJSONTyped,
24248
25146
  CreateWebhookRequestToJSON,
24249
25147
  CreateWebhookRequestToJSONTyped,
25148
+ CreateWorkflow201ResponseFromJSON,
25149
+ CreateWorkflow201ResponseFromJSONTyped,
25150
+ CreateWorkflow201ResponseToJSON,
25151
+ CreateWorkflow201ResponseToJSONTyped,
25152
+ CreateWorkflowRequestFromJSON,
25153
+ CreateWorkflowRequestFromJSONTyped,
25154
+ CreateWorkflowRequestToJSON,
25155
+ CreateWorkflowRequestToJSONTyped,
24250
25156
  DefaultConfig,
24251
25157
  DeleteDomainResponseDataFromJSON,
24252
25158
  DeleteDomainResponseDataFromJSONTyped,
@@ -24264,6 +25170,22 @@ export {
24264
25170
  DeleteResultFromJSONTyped,
24265
25171
  DeleteResultToJSON,
24266
25172
  DeleteResultToJSONTyped,
25173
+ DeleteWorkflow200ResponseDataFromJSON,
25174
+ DeleteWorkflow200ResponseDataFromJSONTyped,
25175
+ DeleteWorkflow200ResponseDataToJSON,
25176
+ DeleteWorkflow200ResponseDataToJSONTyped,
25177
+ DeleteWorkflow200ResponseFromJSON,
25178
+ DeleteWorkflow200ResponseFromJSONTyped,
25179
+ DeleteWorkflow200ResponseToJSON,
25180
+ DeleteWorkflow200ResponseToJSONTyped,
25181
+ DeleteWorkflowStep200ResponseDataFromJSON,
25182
+ DeleteWorkflowStep200ResponseDataFromJSONTyped,
25183
+ DeleteWorkflowStep200ResponseDataToJSON,
25184
+ DeleteWorkflowStep200ResponseDataToJSONTyped,
25185
+ DeleteWorkflowStep200ResponseFromJSON,
25186
+ DeleteWorkflowStep200ResponseFromJSONTyped,
25187
+ DeleteWorkflowStep200ResponseToJSON,
25188
+ DeleteWorkflowStep200ResponseToJSONTyped,
24267
25189
  DeviceFromJSON,
24268
25190
  DeviceFromJSONTyped,
24269
25191
  DeviceListResponseFromJSON,
@@ -24530,6 +25452,22 @@ export {
24530
25452
  ListWaaSEventTypes200ResponseToJSONTyped,
24531
25453
  ListWaaSEventTypesStatusEnum,
24532
25454
  ListWebhookDeliveriesStatusEnum,
25455
+ ListWorkflowExecutions200ResponseFromJSON,
25456
+ ListWorkflowExecutions200ResponseFromJSONTyped,
25457
+ ListWorkflowExecutions200ResponseMetaFromJSON,
25458
+ ListWorkflowExecutions200ResponseMetaFromJSONTyped,
25459
+ ListWorkflowExecutions200ResponseMetaToJSON,
25460
+ ListWorkflowExecutions200ResponseMetaToJSONTyped,
25461
+ ListWorkflowExecutions200ResponseToJSON,
25462
+ ListWorkflowExecutions200ResponseToJSONTyped,
25463
+ ListWorkflows200ResponseFromJSON,
25464
+ ListWorkflows200ResponseFromJSONTyped,
25465
+ ListWorkflows200ResponseMetaFromJSON,
25466
+ ListWorkflows200ResponseMetaFromJSONTyped,
25467
+ ListWorkflows200ResponseMetaToJSON,
25468
+ ListWorkflows200ResponseMetaToJSONTyped,
25469
+ ListWorkflows200ResponseToJSON,
25470
+ ListWorkflows200ResponseToJSONTyped,
24533
25471
  LoginRequestFromJSON,
24534
25472
  LoginRequestFromJSONTyped,
24535
25473
  LoginRequestToJSON,
@@ -24643,7 +25581,6 @@ export {
24643
25581
  MfaVerifyRequestFromJSONTyped,
24644
25582
  MfaVerifyRequestToJSON,
24645
25583
  MfaVerifyRequestToJSONTyped,
24646
- MuseApi,
24647
25584
  OAuthAuthorizationUrlResponseDataFromJSON,
24648
25585
  OAuthAuthorizationUrlResponseDataFromJSONTyped,
24649
25586
  OAuthAuthorizationUrlResponseDataToJSON,
@@ -24917,6 +25854,10 @@ export {
24917
25854
  RenderTemplateRequestFromJSONTyped,
24918
25855
  RenderTemplateRequestToJSON,
24919
25856
  RenderTemplateRequestToJSONTyped,
25857
+ ReorderWorkflowStepsRequestFromJSON,
25858
+ ReorderWorkflowStepsRequestFromJSONTyped,
25859
+ ReorderWorkflowStepsRequestToJSON,
25860
+ ReorderWorkflowStepsRequestToJSONTyped,
24920
25861
  ReplayWebhookEventsRequestFromJSON,
24921
25862
  ReplayWebhookEventsRequestFromJSONTyped,
24922
25863
  ReplayWebhookEventsRequestToJSON,
@@ -25204,10 +26145,6 @@ export {
25204
26145
  SmsDetailResponseToJSONTyped,
25205
26146
  SmsListResponseFromJSON,
25206
26147
  SmsListResponseFromJSONTyped,
25207
- SmsListResponseMetaFromJSON,
25208
- SmsListResponseMetaFromJSONTyped,
25209
- SmsListResponseMetaToJSON,
25210
- SmsListResponseMetaToJSONTyped,
25211
26148
  SmsListResponseToJSON,
25212
26149
  SmsListResponseToJSONTyped,
25213
26150
  SmsMessageDetailFromJSON,
@@ -25294,10 +26231,6 @@ export {
25294
26231
  TestWebhookTransformRequestToJSON,
25295
26232
  TestWebhookTransformRequestToJSONTyped,
25296
26233
  TextApiResponse,
25297
- TopicDeleteResponseDataFromJSON,
25298
- TopicDeleteResponseDataFromJSONTyped,
25299
- TopicDeleteResponseDataToJSON,
25300
- TopicDeleteResponseDataToJSONTyped,
25301
26234
  TopicDeleteResponseFromJSON,
25302
26235
  TopicDeleteResponseFromJSONTyped,
25303
26236
  TopicDeleteResponseToJSON,
@@ -25351,6 +26284,18 @@ export {
25351
26284
  TopicToJSON,
25352
26285
  TopicToJSONTyped,
25353
26286
  TopicsApi,
26287
+ TriggerWorkflow202ResponseDataFromJSON,
26288
+ TriggerWorkflow202ResponseDataFromJSONTyped,
26289
+ TriggerWorkflow202ResponseDataToJSON,
26290
+ TriggerWorkflow202ResponseDataToJSONTyped,
26291
+ TriggerWorkflow202ResponseFromJSON,
26292
+ TriggerWorkflow202ResponseFromJSONTyped,
26293
+ TriggerWorkflow202ResponseToJSON,
26294
+ TriggerWorkflow202ResponseToJSONTyped,
26295
+ TriggerWorkflowRequestFromJSON,
26296
+ TriggerWorkflowRequestFromJSONTyped,
26297
+ TriggerWorkflowRequestToJSON,
26298
+ TriggerWorkflowRequestToJSONTyped,
25354
26299
  UnreadCountDataFromJSON,
25355
26300
  UnreadCountDataFromJSONTyped,
25356
26301
  UnreadCountDataToJSON,
@@ -25437,6 +26382,18 @@ export {
25437
26382
  UpdateWebhookRequestFromJSONTyped,
25438
26383
  UpdateWebhookRequestToJSON,
25439
26384
  UpdateWebhookRequestToJSONTyped,
26385
+ UpdateWorkflowRequestFromJSON,
26386
+ UpdateWorkflowRequestFromJSONTyped,
26387
+ UpdateWorkflowRequestToJSON,
26388
+ UpdateWorkflowRequestToJSONTyped,
26389
+ UpdateWorkflowStatusRequestFromJSON,
26390
+ UpdateWorkflowStatusRequestFromJSONTyped,
26391
+ UpdateWorkflowStatusRequestToJSON,
26392
+ UpdateWorkflowStatusRequestToJSONTyped,
26393
+ UpdateWorkflowStepRequestFromJSON,
26394
+ UpdateWorkflowStepRequestFromJSONTyped,
26395
+ UpdateWorkflowStepRequestToJSON,
26396
+ UpdateWorkflowStepRequestToJSONTyped,
25440
26397
  UpsertAuthEmailTemplateRequestEditorTypeEnum,
25441
26398
  UpsertAuthEmailTemplateRequestFromJSON,
25442
26399
  UpsertAuthEmailTemplateRequestFromJSONTyped,
@@ -25455,11 +26412,6 @@ export {
25455
26412
  UserDevicesDeleteResponseToJSON,
25456
26413
  UserDevicesDeleteResponseToJSONTyped,
25457
26414
  UtilityApi,
25458
- V1MuseSubjectsSuggestPostRequestChannelEnum,
25459
- V1MuseSubjectsSuggestPostRequestFromJSON,
25460
- V1MuseSubjectsSuggestPostRequestFromJSONTyped,
25461
- V1MuseSubjectsSuggestPostRequestToJSON,
25462
- V1MuseSubjectsSuggestPostRequestToJSONTyped,
25463
26415
  ValidateResetTokenRequestFromJSON,
25464
26416
  ValidateResetTokenRequestFromJSONTyped,
25465
26417
  ValidateResetTokenRequestToJSON,
@@ -25790,6 +26742,14 @@ export {
25790
26742
  WorkflowExecutionStatusToJSONTyped,
25791
26743
  WorkflowExecutionToJSON,
25792
26744
  WorkflowExecutionToJSONTyped,
26745
+ WorkflowFromJSON,
26746
+ WorkflowFromJSONTyped,
26747
+ WorkflowStatus,
26748
+ WorkflowStatusFromJSON,
26749
+ WorkflowStatusFromJSONTyped,
26750
+ WorkflowStatusToJSON,
26751
+ WorkflowStatusToJSONTyped,
26752
+ WorkflowStepBranchPathEnum,
25793
26753
  WorkflowStepExecutionFromJSON,
25794
26754
  WorkflowStepExecutionFromJSONTyped,
25795
26755
  WorkflowStepExecutionStatus,
@@ -25800,6 +26760,18 @@ export {
25800
26760
  WorkflowStepExecutionStepTypeEnum,
25801
26761
  WorkflowStepExecutionToJSON,
25802
26762
  WorkflowStepExecutionToJSONTyped,
26763
+ WorkflowStepFromJSON,
26764
+ WorkflowStepFromJSONTyped,
26765
+ WorkflowStepToJSON,
26766
+ WorkflowStepToJSONTyped,
26767
+ WorkflowStepType,
26768
+ WorkflowStepTypeFromJSON,
26769
+ WorkflowStepTypeFromJSONTyped,
26770
+ WorkflowStepTypeToJSON,
26771
+ WorkflowStepTypeToJSONTyped,
26772
+ WorkflowToJSON,
26773
+ WorkflowToJSONTyped,
26774
+ WorkflowsApi,
25803
26775
  Zyphr,
25804
26776
  ZyphrAuthenticationError,
25805
26777
  ZyphrClient,
@@ -25817,6 +26789,8 @@ export {
25817
26789
  instanceOfAddDomainRequest,
25818
26790
  instanceOfAddOrganizationMemberRequest,
25819
26791
  instanceOfAddTopicSubscribersRequest,
26792
+ instanceOfAddWorkflowStep201Response,
26793
+ instanceOfAddWorkflowStepRequest,
25820
26794
  instanceOfApiError,
25821
26795
  instanceOfApiErrorError,
25822
26796
  instanceOfApiErrorMeta,
@@ -25882,10 +26856,16 @@ export {
25882
26856
  instanceOfCreateWaaSEventType201Response,
25883
26857
  instanceOfCreateWaaSEventTypeRequest,
25884
26858
  instanceOfCreateWebhookRequest,
26859
+ instanceOfCreateWorkflow201Response,
26860
+ instanceOfCreateWorkflowRequest,
25885
26861
  instanceOfDeleteDomainResponse,
25886
26862
  instanceOfDeleteDomainResponseData,
25887
26863
  instanceOfDeleteResult,
25888
26864
  instanceOfDeleteResultData,
26865
+ instanceOfDeleteWorkflow200Response,
26866
+ instanceOfDeleteWorkflow200ResponseData,
26867
+ instanceOfDeleteWorkflowStep200Response,
26868
+ instanceOfDeleteWorkflowStep200ResponseData,
25889
26869
  instanceOfDevice,
25890
26870
  instanceOfDeviceListResponse,
25891
26871
  instanceOfDevicePushTopic,
@@ -25943,6 +26923,10 @@ export {
25943
26923
  instanceOfListWaaSEndpointDeliveries200Response,
25944
26924
  instanceOfListWaaSEndpoints200Response,
25945
26925
  instanceOfListWaaSEventTypes200Response,
26926
+ instanceOfListWorkflowExecutions200Response,
26927
+ instanceOfListWorkflowExecutions200ResponseMeta,
26928
+ instanceOfListWorkflows200Response,
26929
+ instanceOfListWorkflows200ResponseMeta,
25946
26930
  instanceOfLoginRequest,
25947
26931
  instanceOfMagicLinkSendRequest,
25948
26932
  instanceOfMagicLinkVerifyRequest,
@@ -26037,6 +27021,7 @@ export {
26037
27021
  instanceOfRemoveTopicSubscribersRequest,
26038
27022
  instanceOfRenameWebAuthnCredentialRequest,
26039
27023
  instanceOfRenderTemplateRequest,
27024
+ instanceOfReorderWorkflowStepsRequest,
26040
27025
  instanceOfReplayWebhookEventsRequest,
26041
27026
  instanceOfRequestMeta,
26042
27027
  instanceOfResetPasswordRequest,
@@ -26107,7 +27092,6 @@ export {
26107
27092
  instanceOfSmsConfigResponse,
26108
27093
  instanceOfSmsDetailResponse,
26109
27094
  instanceOfSmsListResponse,
26110
- instanceOfSmsListResponseMeta,
26111
27095
  instanceOfSmsMessage,
26112
27096
  instanceOfSmsMessageDetail,
26113
27097
  instanceOfSubscribePushTopicRequest,
@@ -26129,7 +27113,6 @@ export {
26129
27113
  instanceOfTestWebhookTransformRequest,
26130
27114
  instanceOfTopic,
26131
27115
  instanceOfTopicDeleteResponse,
26132
- instanceOfTopicDeleteResponseData,
26133
27116
  instanceOfTopicListResponse,
26134
27117
  instanceOfTopicResponse,
26135
27118
  instanceOfTopicStatsData,
@@ -26141,6 +27124,9 @@ export {
26141
27124
  instanceOfTopicSubscribersAddResult,
26142
27125
  instanceOfTopicSubscribersRemoveResponse,
26143
27126
  instanceOfTopicSubscribersRemoveResult,
27127
+ instanceOfTriggerWorkflow202Response,
27128
+ instanceOfTriggerWorkflow202ResponseData,
27129
+ instanceOfTriggerWorkflowRequest,
26144
27130
  instanceOfUnreadCountData,
26145
27131
  instanceOfUnreadCountResponse,
26146
27132
  instanceOfUnsubscribe,
@@ -26161,11 +27147,13 @@ export {
26161
27147
  instanceOfUpdateWaaSEndpointRequest,
26162
27148
  instanceOfUpdateWaaSEventTypeRequest,
26163
27149
  instanceOfUpdateWebhookRequest,
27150
+ instanceOfUpdateWorkflowRequest,
27151
+ instanceOfUpdateWorkflowStatusRequest,
27152
+ instanceOfUpdateWorkflowStepRequest,
26164
27153
  instanceOfUpsertAuthEmailTemplateRequest,
26165
27154
  instanceOfUpsertSmsConfigRequest,
26166
27155
  instanceOfUserDevicesDeleteResponse,
26167
27156
  instanceOfUserDevicesDeleteResponseData,
26168
- instanceOfV1MuseSubjectsSuggestPostRequest,
26169
27157
  instanceOfValidateResetTokenRequest,
26170
27158
  instanceOfValidateResetTokenResponse,
26171
27159
  instanceOfValidateResetTokenResponseData,
@@ -26241,10 +27229,14 @@ export {
26241
27229
  instanceOfWebhookVersionsResponse,
26242
27230
  instanceOfWebhookVersionsResponseData,
26243
27231
  instanceOfWithdrawSubscriberConsentRequest,
27232
+ instanceOfWorkflow,
26244
27233
  instanceOfWorkflowExecution,
26245
27234
  instanceOfWorkflowExecutionStatus,
27235
+ instanceOfWorkflowStatus,
27236
+ instanceOfWorkflowStep,
26246
27237
  instanceOfWorkflowStepExecution,
26247
27238
  instanceOfWorkflowStepExecutionStatus,
27239
+ instanceOfWorkflowStepType,
26248
27240
  mapValues,
26249
27241
  parseErrorResponse,
26250
27242
  querystring