@zyphr-dev/node-sdk 0.1.38 → 0.1.40

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 (41) hide show
  1. package/dist/index.cjs +1793 -626
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1766 -604
  4. package/dist/index.d.ts +1766 -604
  5. package/dist/index.js +1668 -609
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +25 -4
  9. package/src/src/apis/AuthRegistrationApi.ts +69 -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/SignInWithGooglePlayGamesRequest.ts +66 -0
  27. package/src/src/models/SmsListResponse.ts +10 -10
  28. package/src/src/models/TopicDeleteResponse.ts +10 -10
  29. package/src/src/models/TriggerWorkflow202Response.ts +88 -0
  30. package/src/src/models/TriggerWorkflow202ResponseData.ts +81 -0
  31. package/src/src/models/TriggerWorkflowRequest.ts +90 -0
  32. package/src/src/models/UpdateWorkflowRequest.ts +89 -0
  33. package/src/src/models/UpdateWorkflowStatusRequest.ts +76 -0
  34. package/src/src/models/UpdateWorkflowStepRequest.ts +73 -0
  35. package/src/src/models/Workflow.ts +187 -0
  36. package/src/src/models/WorkflowStatus.ts +55 -0
  37. package/src/src/models/WorkflowStep.ts +176 -0
  38. package/src/src/models/WorkflowStepType.ts +60 -0
  39. package/src/src/models/index.ts +24 -3
  40. package/src/src/apis/MuseApi.ts +0 -531
  41. 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;
@@ -10291,6 +10897,34 @@ function SignInWithGameCenterRequestToJSONTyped(value, ignoreDiscriminator = fal
10291
10897
  };
10292
10898
  }
10293
10899
 
10900
+ // src/src/models/SignInWithGooglePlayGamesRequest.ts
10901
+ function instanceOfSignInWithGooglePlayGamesRequest(value) {
10902
+ if (!("serverAuthCode" in value) || value["serverAuthCode"] === void 0) return false;
10903
+ return true;
10904
+ }
10905
+ function SignInWithGooglePlayGamesRequestFromJSON(json) {
10906
+ return SignInWithGooglePlayGamesRequestFromJSONTyped(json, false);
10907
+ }
10908
+ function SignInWithGooglePlayGamesRequestFromJSONTyped(json, ignoreDiscriminator) {
10909
+ if (json == null) {
10910
+ return json;
10911
+ }
10912
+ return {
10913
+ "serverAuthCode": json["serverAuthCode"]
10914
+ };
10915
+ }
10916
+ function SignInWithGooglePlayGamesRequestToJSON(json) {
10917
+ return SignInWithGooglePlayGamesRequestToJSONTyped(json, false);
10918
+ }
10919
+ function SignInWithGooglePlayGamesRequestToJSONTyped(value, ignoreDiscriminator = false) {
10920
+ if (value == null) {
10921
+ return value;
10922
+ }
10923
+ return {
10924
+ "serverAuthCode": value["serverAuthCode"]
10925
+ };
10926
+ }
10927
+
10294
10928
  // src/src/models/SlackMessage.ts
10295
10929
  function instanceOfSlackMessage(value) {
10296
10930
  return true;
@@ -10759,41 +11393,6 @@ function SmsMessageToJSONTyped(value, ignoreDiscriminator = false) {
10759
11393
  };
10760
11394
  }
10761
11395
 
10762
- // src/src/models/SmsListResponseMeta.ts
10763
- function instanceOfSmsListResponseMeta(value) {
10764
- return true;
10765
- }
10766
- function SmsListResponseMetaFromJSON(json) {
10767
- return SmsListResponseMetaFromJSONTyped(json, false);
10768
- }
10769
- function SmsListResponseMetaFromJSONTyped(json, ignoreDiscriminator) {
10770
- if (json == null) {
10771
- return json;
10772
- }
10773
- return {
10774
- "requestId": json["request_id"] == null ? void 0 : json["request_id"],
10775
- "page": json["page"] == null ? void 0 : json["page"],
10776
- "perPage": json["per_page"] == null ? void 0 : json["per_page"],
10777
- "total": json["total"] == null ? void 0 : json["total"],
10778
- "totalPages": json["total_pages"] == null ? void 0 : json["total_pages"]
10779
- };
10780
- }
10781
- function SmsListResponseMetaToJSON(json) {
10782
- return SmsListResponseMetaToJSONTyped(json, false);
10783
- }
10784
- function SmsListResponseMetaToJSONTyped(value, ignoreDiscriminator = false) {
10785
- if (value == null) {
10786
- return value;
10787
- }
10788
- return {
10789
- "request_id": value["requestId"],
10790
- "page": value["page"],
10791
- "per_page": value["perPage"],
10792
- "total": value["total"],
10793
- "total_pages": value["totalPages"]
10794
- };
10795
- }
10796
-
10797
11396
  // src/src/models/SmsListResponse.ts
10798
11397
  function instanceOfSmsListResponse(value) {
10799
11398
  return true;
@@ -10807,7 +11406,7 @@ function SmsListResponseFromJSONTyped(json, ignoreDiscriminator) {
10807
11406
  }
10808
11407
  return {
10809
11408
  "data": json["data"] == null ? void 0 : json["data"].map(SmsMessageFromJSON),
10810
- "meta": json["meta"] == null ? void 0 : SmsListResponseMetaFromJSON(json["meta"])
11409
+ "meta": json["meta"] == null ? void 0 : ListWorkflowExecutions200ResponseMetaFromJSON(json["meta"])
10811
11410
  };
10812
11411
  }
10813
11412
  function SmsListResponseToJSON(json) {
@@ -10819,7 +11418,7 @@ function SmsListResponseToJSONTyped(value, ignoreDiscriminator = false) {
10819
11418
  }
10820
11419
  return {
10821
11420
  "data": value["data"] == null ? void 0 : value["data"].map(SmsMessageToJSON),
10822
- "meta": SmsListResponseMetaToJSON(value["meta"])
11421
+ "meta": ListWorkflowExecutions200ResponseMetaToJSON(value["meta"])
10823
11422
  };
10824
11423
  }
10825
11424
 
@@ -11334,35 +11933,6 @@ function TopicToJSONTyped(value, ignoreDiscriminator = false) {
11334
11933
  };
11335
11934
  }
11336
11935
 
11337
- // src/src/models/TopicDeleteResponseData.ts
11338
- function instanceOfTopicDeleteResponseData(value) {
11339
- return true;
11340
- }
11341
- function TopicDeleteResponseDataFromJSON(json) {
11342
- return TopicDeleteResponseDataFromJSONTyped(json, false);
11343
- }
11344
- function TopicDeleteResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11345
- if (json == null) {
11346
- return json;
11347
- }
11348
- return {
11349
- "key": json["key"] == null ? void 0 : json["key"],
11350
- "deleted": json["deleted"] == null ? void 0 : json["deleted"]
11351
- };
11352
- }
11353
- function TopicDeleteResponseDataToJSON(json) {
11354
- return TopicDeleteResponseDataToJSONTyped(json, false);
11355
- }
11356
- function TopicDeleteResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
11357
- if (value == null) {
11358
- return value;
11359
- }
11360
- return {
11361
- "key": value["key"],
11362
- "deleted": value["deleted"]
11363
- };
11364
- }
11365
-
11366
11936
  // src/src/models/TopicDeleteResponse.ts
11367
11937
  function instanceOfTopicDeleteResponse(value) {
11368
11938
  return true;
@@ -11375,7 +11945,7 @@ function TopicDeleteResponseFromJSONTyped(json, ignoreDiscriminator) {
11375
11945
  return json;
11376
11946
  }
11377
11947
  return {
11378
- "data": json["data"] == null ? void 0 : TopicDeleteResponseDataFromJSON(json["data"]),
11948
+ "data": json["data"] == null ? void 0 : DeleteWorkflow200ResponseDataFromJSON(json["data"]),
11379
11949
  "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
11380
11950
  };
11381
11951
  }
@@ -11387,7 +11957,7 @@ function TopicDeleteResponseToJSONTyped(value, ignoreDiscriminator = false) {
11387
11957
  return value;
11388
11958
  }
11389
11959
  return {
11390
- "data": TopicDeleteResponseDataToJSON(value["data"]),
11960
+ "data": DeleteWorkflow200ResponseDataToJSON(value["data"]),
11391
11961
  "meta": RequestMetaToJSON(value["meta"])
11392
11962
  };
11393
11963
  }
@@ -11721,109 +12291,203 @@ function TopicSubscribersRemoveResponseToJSONTyped(value, ignoreDiscriminator =
11721
12291
  };
11722
12292
  }
11723
12293
 
11724
- // src/src/models/UnreadCountData.ts
11725
- function instanceOfUnreadCountData(value) {
12294
+ // src/src/models/TriggerWorkflow202ResponseData.ts
12295
+ function instanceOfTriggerWorkflow202ResponseData(value) {
11726
12296
  return true;
11727
12297
  }
11728
- function UnreadCountDataFromJSON(json) {
11729
- return UnreadCountDataFromJSONTyped(json, false);
12298
+ function TriggerWorkflow202ResponseDataFromJSON(json) {
12299
+ return TriggerWorkflow202ResponseDataFromJSONTyped(json, false);
11730
12300
  }
11731
- function UnreadCountDataFromJSONTyped(json, ignoreDiscriminator) {
12301
+ function TriggerWorkflow202ResponseDataFromJSONTyped(json, ignoreDiscriminator) {
11732
12302
  if (json == null) {
11733
12303
  return json;
11734
12304
  }
11735
12305
  return {
11736
- "unreadCount": json["unread_count"] == null ? void 0 : json["unread_count"]
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"]
11737
12309
  };
11738
12310
  }
11739
- function UnreadCountDataToJSON(json) {
11740
- return UnreadCountDataToJSONTyped(json, false);
12311
+ function TriggerWorkflow202ResponseDataToJSON(json) {
12312
+ return TriggerWorkflow202ResponseDataToJSONTyped(json, false);
11741
12313
  }
11742
- function UnreadCountDataToJSONTyped(value, ignoreDiscriminator = false) {
12314
+ function TriggerWorkflow202ResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
11743
12315
  if (value == null) {
11744
12316
  return value;
11745
12317
  }
11746
12318
  return {
11747
- "unread_count": value["unreadCount"]
12319
+ "execution_ids": value["executionIds"],
12320
+ "subscriber_count": value["subscriberCount"],
12321
+ "workflow_key": value["workflowKey"]
11748
12322
  };
11749
12323
  }
11750
12324
 
11751
- // src/src/models/UnreadCountResponse.ts
11752
- function instanceOfUnreadCountResponse(value) {
12325
+ // src/src/models/TriggerWorkflow202Response.ts
12326
+ function instanceOfTriggerWorkflow202Response(value) {
11753
12327
  return true;
11754
12328
  }
11755
- function UnreadCountResponseFromJSON(json) {
11756
- return UnreadCountResponseFromJSONTyped(json, false);
12329
+ function TriggerWorkflow202ResponseFromJSON(json) {
12330
+ return TriggerWorkflow202ResponseFromJSONTyped(json, false);
11757
12331
  }
11758
- function UnreadCountResponseFromJSONTyped(json, ignoreDiscriminator) {
12332
+ function TriggerWorkflow202ResponseFromJSONTyped(json, ignoreDiscriminator) {
11759
12333
  if (json == null) {
11760
12334
  return json;
11761
12335
  }
11762
12336
  return {
11763
- "data": json["data"] == null ? void 0 : UnreadCountDataFromJSON(json["data"]),
12337
+ "data": json["data"] == null ? void 0 : TriggerWorkflow202ResponseDataFromJSON(json["data"]),
11764
12338
  "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
11765
12339
  };
11766
12340
  }
11767
- function UnreadCountResponseToJSON(json) {
11768
- return UnreadCountResponseToJSONTyped(json, false);
12341
+ function TriggerWorkflow202ResponseToJSON(json) {
12342
+ return TriggerWorkflow202ResponseToJSONTyped(json, false);
11769
12343
  }
11770
- function UnreadCountResponseToJSONTyped(value, ignoreDiscriminator = false) {
12344
+ function TriggerWorkflow202ResponseToJSONTyped(value, ignoreDiscriminator = false) {
11771
12345
  if (value == null) {
11772
12346
  return value;
11773
12347
  }
11774
12348
  return {
11775
- "data": UnreadCountDataToJSON(value["data"]),
12349
+ "data": TriggerWorkflow202ResponseDataToJSON(value["data"]),
11776
12350
  "meta": RequestMetaToJSON(value["meta"])
11777
12351
  };
11778
12352
  }
11779
12353
 
11780
- // src/src/models/Unsubscribe.ts
11781
- var UnsubscribeChannelEnum = {
11782
- EMAIL: "email",
11783
- PUSH: "push",
11784
- SMS: "sms",
11785
- IN_APP: "in_app"
11786
- };
11787
- function instanceOfUnsubscribe(value) {
12354
+ // src/src/models/TriggerWorkflowRequest.ts
12355
+ function instanceOfTriggerWorkflowRequest(value) {
12356
+ if (!("to" in value) || value["to"] === void 0) return false;
11788
12357
  return true;
11789
12358
  }
11790
- function UnsubscribeFromJSON(json) {
11791
- return UnsubscribeFromJSONTyped(json, false);
12359
+ function TriggerWorkflowRequestFromJSON(json) {
12360
+ return TriggerWorkflowRequestFromJSONTyped(json, false);
11792
12361
  }
11793
- function UnsubscribeFromJSONTyped(json, ignoreDiscriminator) {
12362
+ function TriggerWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
11794
12363
  if (json == null) {
11795
12364
  return json;
11796
12365
  }
11797
12366
  return {
11798
- "id": json["id"] == null ? void 0 : json["id"],
11799
- "subscriberId": json["subscriber_id"] == null ? void 0 : json["subscriber_id"],
11800
- "channel": json["channel"] == null ? void 0 : json["channel"],
11801
- "reason": json["reason"] == null ? void 0 : json["reason"],
11802
- "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"])
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"]
11803
12371
  };
11804
12372
  }
11805
- function UnsubscribeToJSON(json) {
11806
- return UnsubscribeToJSONTyped(json, false);
12373
+ function TriggerWorkflowRequestToJSON(json) {
12374
+ return TriggerWorkflowRequestToJSONTyped(json, false);
11807
12375
  }
11808
- function UnsubscribeToJSONTyped(value, ignoreDiscriminator = false) {
12376
+ function TriggerWorkflowRequestToJSONTyped(value, ignoreDiscriminator = false) {
11809
12377
  if (value == null) {
11810
12378
  return value;
11811
12379
  }
11812
12380
  return {
11813
- "id": value["id"],
11814
- "subscriber_id": value["subscriberId"],
11815
- "channel": value["channel"],
11816
- "reason": value["reason"],
11817
- "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString()
12381
+ "to": value["to"],
12382
+ "payload": value["payload"],
12383
+ "transaction_id": value["transactionId"],
12384
+ "from": value["from"]
11818
12385
  };
11819
12386
  }
11820
12387
 
11821
- // src/src/models/UnsubscribeListResponse.ts
11822
- function instanceOfUnsubscribeListResponse(value) {
12388
+ // src/src/models/UnreadCountData.ts
12389
+ function instanceOfUnreadCountData(value) {
11823
12390
  return true;
11824
12391
  }
11825
- function UnsubscribeListResponseFromJSON(json) {
11826
- return UnsubscribeListResponseFromJSONTyped(json, false);
12392
+ function UnreadCountDataFromJSON(json) {
12393
+ return UnreadCountDataFromJSONTyped(json, false);
12394
+ }
12395
+ function UnreadCountDataFromJSONTyped(json, ignoreDiscriminator) {
12396
+ if (json == null) {
12397
+ return json;
12398
+ }
12399
+ return {
12400
+ "unreadCount": json["unread_count"] == null ? void 0 : json["unread_count"]
12401
+ };
12402
+ }
12403
+ function UnreadCountDataToJSON(json) {
12404
+ return UnreadCountDataToJSONTyped(json, false);
12405
+ }
12406
+ function UnreadCountDataToJSONTyped(value, ignoreDiscriminator = false) {
12407
+ if (value == null) {
12408
+ return value;
12409
+ }
12410
+ return {
12411
+ "unread_count": value["unreadCount"]
12412
+ };
12413
+ }
12414
+
12415
+ // src/src/models/UnreadCountResponse.ts
12416
+ function instanceOfUnreadCountResponse(value) {
12417
+ return true;
12418
+ }
12419
+ function UnreadCountResponseFromJSON(json) {
12420
+ return UnreadCountResponseFromJSONTyped(json, false);
12421
+ }
12422
+ function UnreadCountResponseFromJSONTyped(json, ignoreDiscriminator) {
12423
+ if (json == null) {
12424
+ return json;
12425
+ }
12426
+ return {
12427
+ "data": json["data"] == null ? void 0 : UnreadCountDataFromJSON(json["data"]),
12428
+ "meta": json["meta"] == null ? void 0 : RequestMetaFromJSON(json["meta"])
12429
+ };
12430
+ }
12431
+ function UnreadCountResponseToJSON(json) {
12432
+ return UnreadCountResponseToJSONTyped(json, false);
12433
+ }
12434
+ function UnreadCountResponseToJSONTyped(value, ignoreDiscriminator = false) {
12435
+ if (value == null) {
12436
+ return value;
12437
+ }
12438
+ return {
12439
+ "data": UnreadCountDataToJSON(value["data"]),
12440
+ "meta": RequestMetaToJSON(value["meta"])
12441
+ };
12442
+ }
12443
+
12444
+ // src/src/models/Unsubscribe.ts
12445
+ var UnsubscribeChannelEnum = {
12446
+ EMAIL: "email",
12447
+ PUSH: "push",
12448
+ SMS: "sms",
12449
+ IN_APP: "in_app"
12450
+ };
12451
+ function instanceOfUnsubscribe(value) {
12452
+ return true;
12453
+ }
12454
+ function UnsubscribeFromJSON(json) {
12455
+ return UnsubscribeFromJSONTyped(json, false);
12456
+ }
12457
+ function UnsubscribeFromJSONTyped(json, ignoreDiscriminator) {
12458
+ if (json == null) {
12459
+ return json;
12460
+ }
12461
+ return {
12462
+ "id": json["id"] == null ? void 0 : json["id"],
12463
+ "subscriberId": json["subscriber_id"] == null ? void 0 : json["subscriber_id"],
12464
+ "channel": json["channel"] == null ? void 0 : json["channel"],
12465
+ "reason": json["reason"] == null ? void 0 : json["reason"],
12466
+ "createdAt": json["created_at"] == null ? void 0 : new Date(json["created_at"])
12467
+ };
12468
+ }
12469
+ function UnsubscribeToJSON(json) {
12470
+ return UnsubscribeToJSONTyped(json, false);
12471
+ }
12472
+ function UnsubscribeToJSONTyped(value, ignoreDiscriminator = false) {
12473
+ if (value == null) {
12474
+ return value;
12475
+ }
12476
+ return {
12477
+ "id": value["id"],
12478
+ "subscriber_id": value["subscriberId"],
12479
+ "channel": value["channel"],
12480
+ "reason": value["reason"],
12481
+ "created_at": value["createdAt"] == null ? void 0 : value["createdAt"].toISOString()
12482
+ };
12483
+ }
12484
+
12485
+ // src/src/models/UnsubscribeListResponse.ts
12486
+ function instanceOfUnsubscribeListResponse(value) {
12487
+ return true;
12488
+ }
12489
+ function UnsubscribeListResponseFromJSON(json) {
12490
+ return UnsubscribeListResponseFromJSONTyped(json, false);
11827
12491
  }
11828
12492
  function UnsubscribeListResponseFromJSONTyped(json, ignoreDiscriminator) {
11829
12493
  if (json == null) {
@@ -12397,6 +13061,96 @@ function UpdateWebhookRequestToJSONTyped(value, ignoreDiscriminator = false) {
12397
13061
  };
12398
13062
  }
12399
13063
 
13064
+ // src/src/models/UpdateWorkflowRequest.ts
13065
+ function instanceOfUpdateWorkflowRequest(value) {
13066
+ return true;
13067
+ }
13068
+ function UpdateWorkflowRequestFromJSON(json) {
13069
+ return UpdateWorkflowRequestFromJSONTyped(json, false);
13070
+ }
13071
+ function UpdateWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
13072
+ if (json == null) {
13073
+ return json;
13074
+ }
13075
+ return {
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
+
12400
13154
  // src/src/models/UpsertSmsConfigRequest.ts
12401
13155
  function instanceOfUpsertSmsConfigRequest(value) {
12402
13156
  if (!("accountSid" in value) || value["accountSid"] === void 0) return false;
@@ -12491,45 +13245,6 @@ function UserDevicesDeleteResponseToJSONTyped(value, ignoreDiscriminator = false
12491
13245
  };
12492
13246
  }
12493
13247
 
12494
- // src/src/models/V1MuseSubjectsSuggestPostRequest.ts
12495
- var V1MuseSubjectsSuggestPostRequestChannelEnum = {
12496
- EMAIL: "email",
12497
- PUSH: "push"
12498
- };
12499
- function instanceOfV1MuseSubjectsSuggestPostRequest(value) {
12500
- if (!("channel" in value) || value["channel"] === void 0) return false;
12501
- if (!("projectId" in value) || value["projectId"] === void 0) return false;
12502
- return true;
12503
- }
12504
- function V1MuseSubjectsSuggestPostRequestFromJSON(json) {
12505
- return V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, false);
12506
- }
12507
- function V1MuseSubjectsSuggestPostRequestFromJSONTyped(json, ignoreDiscriminator) {
12508
- if (json == null) {
12509
- return json;
12510
- }
12511
- return {
12512
- "templateId": json["template_id"] == null ? void 0 : json["template_id"],
12513
- "templateBody": json["template_body"] == null ? void 0 : json["template_body"],
12514
- "channel": json["channel"],
12515
- "projectId": json["project_id"]
12516
- };
12517
- }
12518
- function V1MuseSubjectsSuggestPostRequestToJSON(json) {
12519
- return V1MuseSubjectsSuggestPostRequestToJSONTyped(json, false);
12520
- }
12521
- function V1MuseSubjectsSuggestPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
12522
- if (value == null) {
12523
- return value;
12524
- }
12525
- return {
12526
- "template_id": value["templateId"],
12527
- "template_body": value["templateBody"],
12528
- "channel": value["channel"],
12529
- "project_id": value["projectId"]
12530
- };
12531
- }
12532
-
12533
13248
  // src/src/models/ValidateResetTokenRequest.ts
12534
13249
  function instanceOfValidateResetTokenRequest(value) {
12535
13250
  if (!("token" in value) || value["token"] === void 0) return false;
@@ -16900,7 +17615,7 @@ var AuthRegistrationApi = class extends BaseAPI {
16900
17615
  return await response.value();
16901
17616
  }
16902
17617
  /**
16903
- * 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.
16904
17619
  * Sign in with Apple Game Center
16905
17620
  */
16906
17621
  async signInWithGameCenterRaw(requestParameters, initOverrides) {
@@ -16926,13 +17641,47 @@ var AuthRegistrationApi = class extends BaseAPI {
16926
17641
  return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
16927
17642
  }
16928
17643
  /**
16929
- * 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.
16930
17645
  * Sign in with Apple Game Center
16931
17646
  */
16932
17647
  async signInWithGameCenter(signInWithGameCenterRequest, initOverrides) {
16933
17648
  const response = await this.signInWithGameCenterRaw({ signInWithGameCenterRequest }, initOverrides);
16934
17649
  return await response.value();
16935
17650
  }
17651
+ /**
17652
+ * Exchange a Google Play Games Services (GPGS) **server auth code** for a Zyphr end-user session. Unlike Game Center (which submits an Apple-signed assertion), GPGS is verified by Google: Zyphr exchanges the single-use server auth code at Google\'s OAuth2 token endpoint, then calls the Play Games REST API (`players/me`) server-side to obtain the trusted, tamper-proof `playerId`. The user is provisioned-or-looked-up on that server-fetched `playerId` and tokens are minted. ## Producing the server auth code (Integration) The server auth code is obtained **on-device by the Android app** — there is no server-side way to mint it. The app calls `GamesSignInClient.requestServerSideAccess(serverClientId, …)` using the Google Cloud **web (server) client id** configured for the game, which returns a single-use auth code string. Submit that string here as `serverAuthCode`. The **backend-relayed** shape is the common one: the app forwards the auth code to the customer\'s own backend, which relays it to this endpoint; the app never holds Zyphr keys. ## Security The `playerId` is derived **only** from Zyphr\'s own server-side call to Google after the token exchange — a client-supplied player id is never accepted or trusted. On any verification failure the response is a single opaque `401` `invalid_auth_code`; the specific control that failed is never disclosed.
17653
+ * Sign in with Google Play Games Services
17654
+ */
17655
+ async signInWithGooglePlayGamesRaw(requestParameters, initOverrides) {
17656
+ if (requestParameters["signInWithGooglePlayGamesRequest"] == null) {
17657
+ throw new RequiredError(
17658
+ "signInWithGooglePlayGamesRequest",
17659
+ 'Required parameter "signInWithGooglePlayGamesRequest" was null or undefined when calling signInWithGooglePlayGames().'
17660
+ );
17661
+ }
17662
+ const queryParameters = {};
17663
+ const headerParameters = {};
17664
+ headerParameters["Content-Type"] = "application/json";
17665
+ if (this.configuration && this.configuration.apiKey) {
17666
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key");
17667
+ }
17668
+ const response = await this.request({
17669
+ path: `/auth/google-play-games`,
17670
+ method: "POST",
17671
+ headers: headerParameters,
17672
+ query: queryParameters,
17673
+ body: SignInWithGooglePlayGamesRequestToJSON(requestParameters["signInWithGooglePlayGamesRequest"])
17674
+ }, initOverrides);
17675
+ return new JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
17676
+ }
17677
+ /**
17678
+ * Exchange a Google Play Games Services (GPGS) **server auth code** for a Zyphr end-user session. Unlike Game Center (which submits an Apple-signed assertion), GPGS is verified by Google: Zyphr exchanges the single-use server auth code at Google\'s OAuth2 token endpoint, then calls the Play Games REST API (`players/me`) server-side to obtain the trusted, tamper-proof `playerId`. The user is provisioned-or-looked-up on that server-fetched `playerId` and tokens are minted. ## Producing the server auth code (Integration) The server auth code is obtained **on-device by the Android app** — there is no server-side way to mint it. The app calls `GamesSignInClient.requestServerSideAccess(serverClientId, …)` using the Google Cloud **web (server) client id** configured for the game, which returns a single-use auth code string. Submit that string here as `serverAuthCode`. The **backend-relayed** shape is the common one: the app forwards the auth code to the customer\'s own backend, which relays it to this endpoint; the app never holds Zyphr keys. ## Security The `playerId` is derived **only** from Zyphr\'s own server-side call to Google after the token exchange — a client-supplied player id is never accepted or trusted. On any verification failure the response is a single opaque `401` `invalid_auth_code`; the specific control that failed is never disclosed.
17679
+ * Sign in with Google Play Games Services
17680
+ */
17681
+ async signInWithGooglePlayGames(signInWithGooglePlayGamesRequest, initOverrides) {
17682
+ const response = await this.signInWithGooglePlayGamesRaw({ signInWithGooglePlayGamesRequest }, initOverrides);
17683
+ return await response.value();
17684
+ }
16936
17685
  };
16937
17686
 
16938
17687
  // src/src/apis/AuthSessionsApi.ts
@@ -19392,342 +20141,82 @@ var ListAllInboxStatusEnum = {
19392
20141
  ARCHIVED: "archived"
19393
20142
  };
19394
20143
 
19395
- // src/src/apis/MuseApi.ts
19396
- var MuseApi = class extends BaseAPI {
20144
+ // src/src/apis/PushApi.ts
20145
+ var PushApi = class extends BaseAPI {
19397
20146
  /**
19398
- * 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).
19399
- * Paginated per-call audit log for Muse
20147
+ * Get a specific push notification message with delivery events.
20148
+ * Get push notification details
19400
20149
  */
19401
- 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
+ }
19402
20157
  const queryParameters = {};
19403
20158
  const headerParameters = {};
20159
+ if (this.configuration && this.configuration.apiKey) {
20160
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20161
+ }
19404
20162
  const response = await this.request({
19405
- path: `/v1/muse/audit-log`,
20163
+ path: `/push/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19406
20164
  method: "GET",
19407
20165
  headers: headerParameters,
19408
20166
  query: queryParameters
19409
20167
  }, initOverrides);
19410
- return new VoidApiResponse(response);
20168
+ return new JSONApiResponse(response, (jsonValue) => PushDetailResponseFromJSON(jsonValue));
19411
20169
  }
19412
20170
  /**
19413
- * 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).
19414
- * Paginated per-call audit log for Muse
20171
+ * Get a specific push notification message with delivery events.
20172
+ * Get push notification details
19415
20173
  */
19416
- async v1MuseAuditLogGet(initOverrides) {
19417
- await this.v1MuseAuditLogGetRaw(initOverrides);
20174
+ async getPush(id, initOverrides) {
20175
+ const response = await this.getPushRaw({ id }, initOverrides);
20176
+ return await response.value();
19418
20177
  }
19419
20178
  /**
19420
- * 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.
19421
- * Stream a pre-send advisory for a draft broadcast
20179
+ * Get aggregated push notification statistics for the account.
20180
+ * Get push notification statistics
19422
20181
  */
19423
- async v1MuseBroadcastsAnalyzePostRaw(initOverrides) {
20182
+ async getPushStatsRaw(initOverrides) {
19424
20183
  const queryParameters = {};
19425
20184
  const headerParameters = {};
20185
+ if (this.configuration && this.configuration.apiKey) {
20186
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20187
+ }
19426
20188
  const response = await this.request({
19427
- path: `/v1/muse/broadcasts/analyze`,
19428
- method: "POST",
20189
+ path: `/push/stats`,
20190
+ method: "GET",
19429
20191
  headers: headerParameters,
19430
20192
  query: queryParameters
19431
20193
  }, initOverrides);
19432
- return new VoidApiResponse(response);
20194
+ return new JSONApiResponse(response, (jsonValue) => PushStatsResponseFromJSON(jsonValue));
19433
20195
  }
19434
20196
  /**
19435
- * 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.
19436
- * Stream a pre-send advisory for a draft broadcast
20197
+ * Get aggregated push notification statistics for the account.
20198
+ * Get push notification statistics
19437
20199
  */
19438
- async v1MuseBroadcastsAnalyzePost(initOverrides) {
19439
- await this.v1MuseBroadcastsAnalyzePostRaw(initOverrides);
20200
+ async getPushStats(initOverrides) {
20201
+ const response = await this.getPushStatsRaw(initOverrides);
20202
+ return await response.value();
19440
20203
  }
19441
20204
  /**
19442
- * 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).
19443
- * 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
19444
20207
  */
19445
- 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
+ }
19446
20215
  const queryParameters = {};
19447
20216
  const headerParameters = {};
19448
- const response = await this.request({
19449
- path: `/v1/muse/entitlement`,
19450
- method: "GET",
19451
- headers: headerParameters,
19452
- query: queryParameters
19453
- }, initOverrides);
19454
- return new VoidApiResponse(response);
19455
- }
19456
- /**
19457
- * 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).
19458
- * Return the current account\'s Zyphr Muse entitlement
19459
- */
19460
- async v1MuseEntitlementGet(initOverrides) {
19461
- await this.v1MuseEntitlementGetRaw(initOverrides);
19462
- }
19463
- /**
19464
- * 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.
19465
- * Per-prompt eval baseline snapshots
19466
- */
19467
- async v1MuseEvalBaselinesGetRaw(initOverrides) {
19468
- const queryParameters = {};
19469
- const headerParameters = {};
19470
- const response = await this.request({
19471
- path: `/v1/muse/eval-baselines`,
19472
- method: "GET",
19473
- headers: headerParameters,
19474
- query: queryParameters
19475
- }, initOverrides);
19476
- return new VoidApiResponse(response);
19477
- }
19478
- /**
19479
- * 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.
19480
- * Per-prompt eval baseline snapshots
19481
- */
19482
- async v1MuseEvalBaselinesGet(initOverrides) {
19483
- await this.v1MuseEvalBaselinesGetRaw(initOverrides);
19484
- }
19485
- /**
19486
- * 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.
19487
- * Read Muse settings for a project
19488
- */
19489
- async v1MuseSettingsProjectIdGetRaw(requestParameters, initOverrides) {
19490
- if (requestParameters["projectId"] == null) {
19491
- throw new RequiredError(
19492
- "projectId",
19493
- 'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdGet().'
19494
- );
19495
- }
19496
- const queryParameters = {};
19497
- const headerParameters = {};
19498
- const response = await this.request({
19499
- path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
19500
- method: "GET",
19501
- headers: headerParameters,
19502
- query: queryParameters
19503
- }, initOverrides);
19504
- return new VoidApiResponse(response);
19505
- }
19506
- /**
19507
- * 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.
19508
- * Read Muse settings for a project
19509
- */
19510
- async v1MuseSettingsProjectIdGet(projectId, initOverrides) {
19511
- await this.v1MuseSettingsProjectIdGetRaw({ projectId }, initOverrides);
19512
- }
19513
- /**
19514
- * 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.
19515
- * Update Muse settings for a project (admin or developer only)
19516
- */
19517
- async v1MuseSettingsProjectIdPatchRaw(requestParameters, initOverrides) {
19518
- if (requestParameters["projectId"] == null) {
19519
- throw new RequiredError(
19520
- "projectId",
19521
- 'Required parameter "projectId" was null or undefined when calling v1MuseSettingsProjectIdPatch().'
19522
- );
19523
- }
19524
- const queryParameters = {};
19525
- const headerParameters = {};
19526
- const response = await this.request({
19527
- path: `/v1/muse/settings/{project_id}`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters["projectId"]))),
19528
- method: "PATCH",
19529
- headers: headerParameters,
19530
- query: queryParameters
19531
- }, initOverrides);
19532
- return new VoidApiResponse(response);
19533
- }
19534
- /**
19535
- * 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.
19536
- * Update Muse settings for a project (admin or developer only)
19537
- */
19538
- async v1MuseSettingsProjectIdPatch(projectId, initOverrides) {
19539
- await this.v1MuseSettingsProjectIdPatchRaw({ projectId }, initOverrides);
19540
- }
19541
- /**
19542
- * Suggest 5 ranked subject-line candidates for a template
19543
- */
19544
- async v1MuseSubjectsSuggestPostRaw(requestParameters, initOverrides) {
19545
- if (requestParameters["v1MuseSubjectsSuggestPostRequest"] == null) {
19546
- throw new RequiredError(
19547
- "v1MuseSubjectsSuggestPostRequest",
19548
- 'Required parameter "v1MuseSubjectsSuggestPostRequest" was null or undefined when calling v1MuseSubjectsSuggestPost().'
19549
- );
19550
- }
19551
- const queryParameters = {};
19552
- const headerParameters = {};
19553
- headerParameters["Content-Type"] = "application/json";
19554
- const response = await this.request({
19555
- path: `/v1/muse/subjects/suggest`,
19556
- method: "POST",
19557
- headers: headerParameters,
19558
- query: queryParameters,
19559
- body: V1MuseSubjectsSuggestPostRequestToJSON(requestParameters["v1MuseSubjectsSuggestPostRequest"])
19560
- }, initOverrides);
19561
- return new VoidApiResponse(response);
19562
- }
19563
- /**
19564
- * Suggest 5 ranked subject-line candidates for a template
19565
- */
19566
- async v1MuseSubjectsSuggestPost(v1MuseSubjectsSuggestPostRequest, initOverrides) {
19567
- await this.v1MuseSubjectsSuggestPostRaw({ v1MuseSubjectsSuggestPostRequest }, initOverrides);
19568
- }
19569
- /**
19570
- * Stream a draft template from a natural-language brief
19571
- */
19572
- async v1MuseTemplatesDraftPostRaw(initOverrides) {
19573
- const queryParameters = {};
19574
- const headerParameters = {};
19575
- const response = await this.request({
19576
- path: `/v1/muse/templates/draft`,
19577
- method: "POST",
19578
- headers: headerParameters,
19579
- query: queryParameters
19580
- }, initOverrides);
19581
- return new VoidApiResponse(response);
19582
- }
19583
- /**
19584
- * Stream a draft template from a natural-language brief
19585
- */
19586
- async v1MuseTemplatesDraftPost(initOverrides) {
19587
- await this.v1MuseTemplatesDraftPostRaw(initOverrides);
19588
- }
19589
- /**
19590
- * Stream a rewritten block per the user\'s instruction
19591
- */
19592
- async v1MuseTemplatesRewritePostRaw(initOverrides) {
19593
- const queryParameters = {};
19594
- const headerParameters = {};
19595
- const response = await this.request({
19596
- path: `/v1/muse/templates/rewrite`,
19597
- method: "POST",
19598
- headers: headerParameters,
19599
- query: queryParameters
19600
- }, initOverrides);
19601
- return new VoidApiResponse(response);
19602
- }
19603
- /**
19604
- * Stream a rewritten block per the user\'s instruction
19605
- */
19606
- async v1MuseTemplatesRewritePost(initOverrides) {
19607
- await this.v1MuseTemplatesRewritePostRaw(initOverrides);
19608
- }
19609
- /**
19610
- * 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).
19611
- * Per-account Zyphr Muse usage + budget tier
19612
- */
19613
- async v1MuseUsageGetRaw(initOverrides) {
19614
- const queryParameters = {};
19615
- const headerParameters = {};
19616
- const response = await this.request({
19617
- path: `/v1/muse/usage`,
19618
- method: "GET",
19619
- headers: headerParameters,
19620
- query: queryParameters
19621
- }, initOverrides);
19622
- return new VoidApiResponse(response);
19623
- }
19624
- /**
19625
- * 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).
19626
- * Per-account Zyphr Muse usage + budget tier
19627
- */
19628
- async v1MuseUsageGet(initOverrides) {
19629
- await this.v1MuseUsageGetRaw(initOverrides);
19630
- }
19631
- /**
19632
- * 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.
19633
- * Stream a generated workflow from a natural-language description
19634
- */
19635
- async v1MuseWorkflowsGeneratePostRaw(initOverrides) {
19636
- const queryParameters = {};
19637
- const headerParameters = {};
19638
- const response = await this.request({
19639
- path: `/v1/muse/workflows/generate`,
19640
- method: "POST",
19641
- headers: headerParameters,
19642
- query: queryParameters
19643
- }, initOverrides);
19644
- return new VoidApiResponse(response);
19645
- }
19646
- /**
19647
- * 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.
19648
- * Stream a generated workflow from a natural-language description
19649
- */
19650
- async v1MuseWorkflowsGeneratePost(initOverrides) {
19651
- await this.v1MuseWorkflowsGeneratePostRaw(initOverrides);
19652
- }
19653
- };
19654
-
19655
- // src/src/apis/PushApi.ts
19656
- var PushApi = class extends BaseAPI {
19657
- /**
19658
- * Get a specific push notification message with delivery events.
19659
- * Get push notification details
19660
- */
19661
- async getPushRaw(requestParameters, initOverrides) {
19662
- if (requestParameters["id"] == null) {
19663
- throw new RequiredError(
19664
- "id",
19665
- 'Required parameter "id" was null or undefined when calling getPush().'
19666
- );
19667
- }
19668
- const queryParameters = {};
19669
- const headerParameters = {};
19670
- if (this.configuration && this.configuration.apiKey) {
19671
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19672
- }
19673
- const response = await this.request({
19674
- path: `/push/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19675
- method: "GET",
19676
- headers: headerParameters,
19677
- query: queryParameters
19678
- }, initOverrides);
19679
- return new JSONApiResponse(response, (jsonValue) => PushDetailResponseFromJSON(jsonValue));
19680
- }
19681
- /**
19682
- * Get a specific push notification message with delivery events.
19683
- * Get push notification details
19684
- */
19685
- async getPush(id, initOverrides) {
19686
- const response = await this.getPushRaw({ id }, initOverrides);
19687
- return await response.value();
19688
- }
19689
- /**
19690
- * Get aggregated push notification statistics for the account.
19691
- * Get push notification statistics
19692
- */
19693
- async getPushStatsRaw(initOverrides) {
19694
- const queryParameters = {};
19695
- const headerParameters = {};
19696
- if (this.configuration && this.configuration.apiKey) {
19697
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19698
- }
19699
- const response = await this.request({
19700
- path: `/push/stats`,
19701
- method: "GET",
19702
- headers: headerParameters,
19703
- query: queryParameters
19704
- }, initOverrides);
19705
- return new JSONApiResponse(response, (jsonValue) => PushStatsResponseFromJSON(jsonValue));
19706
- }
19707
- /**
19708
- * Get aggregated push notification statistics for the account.
19709
- * Get push notification statistics
19710
- */
19711
- async getPushStats(initOverrides) {
19712
- const response = await this.getPushStatsRaw(initOverrides);
19713
- return await response.value();
19714
- }
19715
- /**
19716
- * Get all push notification topics a specific device is subscribed to.
19717
- * List topics for a device
19718
- */
19719
- async listDevicePushTopicsRaw(requestParameters, initOverrides) {
19720
- if (requestParameters["id"] == null) {
19721
- throw new RequiredError(
19722
- "id",
19723
- 'Required parameter "id" was null or undefined when calling listDevicePushTopics().'
19724
- );
19725
- }
19726
- const queryParameters = {};
19727
- const headerParameters = {};
19728
- if (this.configuration && this.configuration.apiKey) {
19729
- headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
19730
- }
20217
+ if (this.configuration && this.configuration.apiKey) {
20218
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
20219
+ }
19731
20220
  const response = await this.request({
19732
20221
  path: `/push/devices/{id}/topics`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"]))),
19733
20222
  method: "GET",
@@ -23576,6 +24065,468 @@ var ListWebhookDeliveriesStatusEnum = {
23576
24065
  EXHAUSTED: "exhausted"
23577
24066
  };
23578
24067
 
24068
+ // src/src/apis/WorkflowsApi.ts
24069
+ var WorkflowsApi = class extends BaseAPI {
24070
+ /**
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
24073
+ */
24074
+ async addWorkflowStepRaw(requestParameters, initOverrides) {
24075
+ if (requestParameters["key"] == null) {
24076
+ throw new RequiredError(
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().'
24085
+ );
24086
+ }
24087
+ const queryParameters = {};
24088
+ const headerParameters = {};
24089
+ headerParameters["Content-Type"] = "application/json";
24090
+ if (this.configuration && this.configuration.apiKey) {
24091
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24092
+ }
24093
+ const response = await this.request({
24094
+ path: `/workflows/{key}/steps`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24095
+ method: "POST",
24096
+ headers: headerParameters,
24097
+ query: queryParameters,
24098
+ body: AddWorkflowStepRequestToJSON(requestParameters["addWorkflowStepRequest"])
24099
+ }, initOverrides);
24100
+ return new JSONApiResponse(response, (jsonValue) => AddWorkflowStep201ResponseFromJSON(jsonValue));
24101
+ }
24102
+ /**
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
24105
+ */
24106
+ async addWorkflowStep(key, addWorkflowStepRequest, initOverrides) {
24107
+ const response = await this.addWorkflowStepRaw({ key, addWorkflowStepRequest }, initOverrides);
24108
+ return await response.value();
24109
+ }
24110
+ /**
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
24113
+ */
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
+ }
24121
+ const queryParameters = {};
24122
+ const headerParameters = {};
24123
+ headerParameters["Content-Type"] = "application/json";
24124
+ if (this.configuration && this.configuration.apiKey) {
24125
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24126
+ }
24127
+ const response = await this.request({
24128
+ path: `/workflows`,
24129
+ method: "POST",
24130
+ headers: headerParameters,
24131
+ query: queryParameters,
24132
+ body: CreateWorkflowRequestToJSON(requestParameters["createWorkflowRequest"])
24133
+ }, initOverrides);
24134
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
24135
+ }
24136
+ /**
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
24139
+ */
24140
+ async createWorkflow(createWorkflowRequest, initOverrides) {
24141
+ const response = await this.createWorkflowRaw({ createWorkflowRequest }, initOverrides);
24142
+ return await response.value();
24143
+ }
24144
+ /**
24145
+ * Permanently delete a workflow and all of its steps.
24146
+ * Delete a workflow
24147
+ */
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
+ }
24155
+ const queryParameters = {};
24156
+ const headerParameters = {};
24157
+ if (this.configuration && this.configuration.apiKey) {
24158
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24159
+ }
24160
+ const response = await this.request({
24161
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24162
+ method: "DELETE",
24163
+ headers: headerParameters,
24164
+ query: queryParameters
24165
+ }, initOverrides);
24166
+ return new JSONApiResponse(response, (jsonValue) => DeleteWorkflow200ResponseFromJSON(jsonValue));
24167
+ }
24168
+ /**
24169
+ * Permanently delete a workflow and all of its steps.
24170
+ * Delete a workflow
24171
+ */
24172
+ async deleteWorkflow(key, initOverrides) {
24173
+ const response = await this.deleteWorkflowRaw({ key }, initOverrides);
24174
+ return await response.value();
24175
+ }
24176
+ /**
24177
+ * Remove a step from a workflow.
24178
+ * Delete a workflow step
24179
+ */
24180
+ async deleteWorkflowStepRaw(requestParameters, initOverrides) {
24181
+ if (requestParameters["key"] == null) {
24182
+ throw new RequiredError(
24183
+ "key",
24184
+ 'Required parameter "key" was null or undefined when calling deleteWorkflowStep().'
24185
+ );
24186
+ }
24187
+ if (requestParameters["stepKey"] == null) {
24188
+ throw new RequiredError(
24189
+ "stepKey",
24190
+ 'Required parameter "stepKey" was null or undefined when calling deleteWorkflowStep().'
24191
+ );
24192
+ }
24193
+ const queryParameters = {};
24194
+ const headerParameters = {};
24195
+ if (this.configuration && this.configuration.apiKey) {
24196
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24197
+ }
24198
+ const response = await this.request({
24199
+ path: `/workflows/{key}/steps/{stepKey}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))).replace(`{${"stepKey"}}`, encodeURIComponent(String(requestParameters["stepKey"]))),
24200
+ method: "DELETE",
24201
+ headers: headerParameters,
24202
+ query: queryParameters
24203
+ }, initOverrides);
24204
+ return new JSONApiResponse(response, (jsonValue) => DeleteWorkflowStep200ResponseFromJSON(jsonValue));
24205
+ }
24206
+ /**
24207
+ * Remove a step from a workflow.
24208
+ * Delete a workflow step
24209
+ */
24210
+ async deleteWorkflowStep(key, stepKey, initOverrides) {
24211
+ const response = await this.deleteWorkflowStepRaw({ key, stepKey }, initOverrides);
24212
+ return await response.value();
24213
+ }
24214
+ /**
24215
+ * Retrieve a single workflow by its key, including its ordered steps.
24216
+ * Get a workflow
24217
+ */
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
+ );
24224
+ }
24225
+ const queryParameters = {};
24226
+ const headerParameters = {};
24227
+ if (this.configuration && this.configuration.apiKey) {
24228
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24229
+ }
24230
+ const response = await this.request({
24231
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24232
+ method: "GET",
24233
+ headers: headerParameters,
24234
+ query: queryParameters
24235
+ }, initOverrides);
24236
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
24237
+ }
24238
+ /**
24239
+ * Retrieve a single workflow by its key, including its ordered steps.
24240
+ * Get a workflow
24241
+ */
24242
+ async getWorkflow(key, initOverrides) {
24243
+ const response = await this.getWorkflowRaw({ key }, initOverrides);
24244
+ return await response.value();
24245
+ }
24246
+ /**
24247
+ * List the executions of a workflow, most recent first. Supports pagination.
24248
+ * List workflow executions
24249
+ */
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
+ }
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
+ }
24264
+ const headerParameters = {};
24265
+ if (this.configuration && this.configuration.apiKey) {
24266
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24267
+ }
24268
+ const response = await this.request({
24269
+ path: `/workflows/{key}/executions`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24270
+ method: "GET",
24271
+ headers: headerParameters,
24272
+ query: queryParameters
24273
+ }, initOverrides);
24274
+ return new JSONApiResponse(response, (jsonValue) => ListWorkflowExecutions200ResponseFromJSON(jsonValue));
24275
+ }
24276
+ /**
24277
+ * List the executions of a workflow, most recent first. Supports pagination.
24278
+ * List workflow executions
24279
+ */
24280
+ async listWorkflowExecutions(key, page, perPage, initOverrides) {
24281
+ const response = await this.listWorkflowExecutionsRaw({ key, page, perPage }, initOverrides);
24282
+ return await response.value();
24283
+ }
24284
+ /**
24285
+ * List workflows in the project. Supports pagination, free-text search, and status filtering.
24286
+ * List workflows
24287
+ */
24288
+ async listWorkflowsRaw(requestParameters, initOverrides) {
24289
+ const queryParameters = {};
24290
+ if (requestParameters["page"] != null) {
24291
+ queryParameters["page"] = requestParameters["page"];
24292
+ }
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"];
24301
+ }
24302
+ const headerParameters = {};
24303
+ if (this.configuration && this.configuration.apiKey) {
24304
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24305
+ }
24306
+ const response = await this.request({
24307
+ path: `/workflows`,
24308
+ method: "GET",
24309
+ headers: headerParameters,
24310
+ query: queryParameters
24311
+ }, initOverrides);
24312
+ return new JSONApiResponse(response, (jsonValue) => ListWorkflows200ResponseFromJSON(jsonValue));
24313
+ }
24314
+ /**
24315
+ * List workflows in the project. Supports pagination, free-text search, and status filtering.
24316
+ * List workflows
24317
+ */
24318
+ async listWorkflows(page, perPage, search, status, initOverrides) {
24319
+ const response = await this.listWorkflowsRaw({ page, perPage, search, status }, initOverrides);
24320
+ return await response.value();
24321
+ }
24322
+ /**
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
24325
+ */
24326
+ async reorderWorkflowStepsRaw(requestParameters, initOverrides) {
24327
+ if (requestParameters["key"] == null) {
24328
+ throw new RequiredError(
24329
+ "key",
24330
+ 'Required parameter "key" was null or undefined when calling reorderWorkflowSteps().'
24331
+ );
24332
+ }
24333
+ if (requestParameters["reorderWorkflowStepsRequest"] == null) {
24334
+ throw new RequiredError(
24335
+ "reorderWorkflowStepsRequest",
24336
+ 'Required parameter "reorderWorkflowStepsRequest" was null or undefined when calling reorderWorkflowSteps().'
24337
+ );
24338
+ }
24339
+ const queryParameters = {};
24340
+ const headerParameters = {};
24341
+ headerParameters["Content-Type"] = "application/json";
24342
+ if (this.configuration && this.configuration.apiKey) {
24343
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24344
+ }
24345
+ const response = await this.request({
24346
+ path: `/workflows/{key}/steps/reorder`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24347
+ method: "PUT",
24348
+ headers: headerParameters,
24349
+ query: queryParameters,
24350
+ body: ReorderWorkflowStepsRequestToJSON(requestParameters["reorderWorkflowStepsRequest"])
24351
+ }, initOverrides);
24352
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
24353
+ }
24354
+ /**
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
24357
+ */
24358
+ async reorderWorkflowSteps(key, reorderWorkflowStepsRequest, initOverrides) {
24359
+ const response = await this.reorderWorkflowStepsRaw({ key, reorderWorkflowStepsRequest }, initOverrides);
24360
+ return await response.value();
24361
+ }
24362
+ /**
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
24365
+ */
24366
+ async triggerWorkflowRaw(requestParameters, initOverrides) {
24367
+ if (requestParameters["key"] == null) {
24368
+ throw new RequiredError(
24369
+ "key",
24370
+ 'Required parameter "key" was null or undefined when calling triggerWorkflow().'
24371
+ );
24372
+ }
24373
+ if (requestParameters["triggerWorkflowRequest"] == null) {
24374
+ throw new RequiredError(
24375
+ "triggerWorkflowRequest",
24376
+ 'Required parameter "triggerWorkflowRequest" was null or undefined when calling triggerWorkflow().'
24377
+ );
24378
+ }
24379
+ const queryParameters = {};
24380
+ const headerParameters = {};
24381
+ headerParameters["Content-Type"] = "application/json";
24382
+ if (this.configuration && this.configuration.apiKey) {
24383
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24384
+ }
24385
+ const response = await this.request({
24386
+ path: `/workflows/{key}/trigger`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24387
+ method: "POST",
24388
+ headers: headerParameters,
24389
+ query: queryParameters,
24390
+ body: TriggerWorkflowRequestToJSON(requestParameters["triggerWorkflowRequest"])
24391
+ }, initOverrides);
24392
+ return new JSONApiResponse(response, (jsonValue) => TriggerWorkflow202ResponseFromJSON(jsonValue));
24393
+ }
24394
+ /**
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
24397
+ */
24398
+ async triggerWorkflow(key, triggerWorkflowRequest, initOverrides) {
24399
+ const response = await this.triggerWorkflowRaw({ key, triggerWorkflowRequest }, initOverrides);
24400
+ return await response.value();
24401
+ }
24402
+ /**
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
24405
+ */
24406
+ async updateWorkflowRaw(requestParameters, initOverrides) {
24407
+ if (requestParameters["key"] == null) {
24408
+ throw new RequiredError(
24409
+ "key",
24410
+ 'Required parameter "key" was null or undefined when calling updateWorkflow().'
24411
+ );
24412
+ }
24413
+ if (requestParameters["updateWorkflowRequest"] == null) {
24414
+ throw new RequiredError(
24415
+ "updateWorkflowRequest",
24416
+ 'Required parameter "updateWorkflowRequest" was null or undefined when calling updateWorkflow().'
24417
+ );
24418
+ }
24419
+ const queryParameters = {};
24420
+ const headerParameters = {};
24421
+ headerParameters["Content-Type"] = "application/json";
24422
+ if (this.configuration && this.configuration.apiKey) {
24423
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24424
+ }
24425
+ const response = await this.request({
24426
+ path: `/workflows/{key}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24427
+ method: "PATCH",
24428
+ headers: headerParameters,
24429
+ query: queryParameters,
24430
+ body: UpdateWorkflowRequestToJSON(requestParameters["updateWorkflowRequest"])
24431
+ }, initOverrides);
24432
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
24433
+ }
24434
+ /**
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
24437
+ */
24438
+ async updateWorkflow(key, updateWorkflowRequest, initOverrides) {
24439
+ const response = await this.updateWorkflowRaw({ key, updateWorkflowRequest }, initOverrides);
24440
+ return await response.value();
24441
+ }
24442
+ /**
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
24445
+ */
24446
+ async updateWorkflowStatusRaw(requestParameters, initOverrides) {
24447
+ if (requestParameters["key"] == null) {
24448
+ throw new RequiredError(
24449
+ "key",
24450
+ 'Required parameter "key" was null or undefined when calling updateWorkflowStatus().'
24451
+ );
24452
+ }
24453
+ if (requestParameters["updateWorkflowStatusRequest"] == null) {
24454
+ throw new RequiredError(
24455
+ "updateWorkflowStatusRequest",
24456
+ 'Required parameter "updateWorkflowStatusRequest" was null or undefined when calling updateWorkflowStatus().'
24457
+ );
24458
+ }
24459
+ const queryParameters = {};
24460
+ const headerParameters = {};
24461
+ headerParameters["Content-Type"] = "application/json";
24462
+ if (this.configuration && this.configuration.apiKey) {
24463
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24464
+ }
24465
+ const response = await this.request({
24466
+ path: `/workflows/{key}/status`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))),
24467
+ method: "PATCH",
24468
+ headers: headerParameters,
24469
+ query: queryParameters,
24470
+ body: UpdateWorkflowStatusRequestToJSON(requestParameters["updateWorkflowStatusRequest"])
24471
+ }, initOverrides);
24472
+ return new JSONApiResponse(response, (jsonValue) => CreateWorkflow201ResponseFromJSON(jsonValue));
24473
+ }
24474
+ /**
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
24477
+ */
24478
+ async updateWorkflowStatus(key, updateWorkflowStatusRequest, initOverrides) {
24479
+ const response = await this.updateWorkflowStatusRaw({ key, updateWorkflowStatusRequest }, initOverrides);
24480
+ return await response.value();
24481
+ }
24482
+ /**
24483
+ * Update a step\'s name and/or config. Only the provided fields are changed.
24484
+ * Update a workflow step
24485
+ */
24486
+ async updateWorkflowStepRaw(requestParameters, initOverrides) {
24487
+ if (requestParameters["key"] == null) {
24488
+ throw new RequiredError(
24489
+ "key",
24490
+ 'Required parameter "key" was null or undefined when calling updateWorkflowStep().'
24491
+ );
24492
+ }
24493
+ if (requestParameters["stepKey"] == null) {
24494
+ throw new RequiredError(
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().'
24503
+ );
24504
+ }
24505
+ const queryParameters = {};
24506
+ const headerParameters = {};
24507
+ headerParameters["Content-Type"] = "application/json";
24508
+ if (this.configuration && this.configuration.apiKey) {
24509
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
24510
+ }
24511
+ const response = await this.request({
24512
+ path: `/workflows/{key}/steps/{stepKey}`.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"]))).replace(`{${"stepKey"}}`, encodeURIComponent(String(requestParameters["stepKey"]))),
24513
+ method: "PATCH",
24514
+ headers: headerParameters,
24515
+ query: queryParameters,
24516
+ body: UpdateWorkflowStepRequestToJSON(requestParameters["updateWorkflowStepRequest"])
24517
+ }, initOverrides);
24518
+ return new JSONApiResponse(response, (jsonValue) => AddWorkflowStep201ResponseFromJSON(jsonValue));
24519
+ }
24520
+ /**
24521
+ * Update a step\'s name and/or config. Only the provided fields are changed.
24522
+ * Update a workflow step
24523
+ */
24524
+ async updateWorkflowStep(key, stepKey, updateWorkflowStepRequest, initOverrides) {
24525
+ const response = await this.updateWorkflowStepRaw({ key, stepKey, updateWorkflowStepRequest }, initOverrides);
24526
+ return await response.value();
24527
+ }
24528
+ };
24529
+
23579
24530
  // src/errors.ts
23580
24531
  var ZyphrError = class extends Error {
23581
24532
  status;
@@ -23894,6 +24845,15 @@ export {
23894
24845
  AddTopicSubscribersRequestFromJSONTyped,
23895
24846
  AddTopicSubscribersRequestToJSON,
23896
24847
  AddTopicSubscribersRequestToJSONTyped,
24848
+ AddWorkflowStep201ResponseFromJSON,
24849
+ AddWorkflowStep201ResponseFromJSONTyped,
24850
+ AddWorkflowStep201ResponseToJSON,
24851
+ AddWorkflowStep201ResponseToJSONTyped,
24852
+ AddWorkflowStepRequestBranchPathEnum,
24853
+ AddWorkflowStepRequestFromJSON,
24854
+ AddWorkflowStepRequestFromJSONTyped,
24855
+ AddWorkflowStepRequestToJSON,
24856
+ AddWorkflowStepRequestToJSONTyped,
23897
24857
  ApiErrorErrorFromJSON,
23898
24858
  ApiErrorErrorFromJSONTyped,
23899
24859
  ApiErrorErrorToJSON,
@@ -24185,6 +25145,14 @@ export {
24185
25145
  CreateWebhookRequestFromJSONTyped,
24186
25146
  CreateWebhookRequestToJSON,
24187
25147
  CreateWebhookRequestToJSONTyped,
25148
+ CreateWorkflow201ResponseFromJSON,
25149
+ CreateWorkflow201ResponseFromJSONTyped,
25150
+ CreateWorkflow201ResponseToJSON,
25151
+ CreateWorkflow201ResponseToJSONTyped,
25152
+ CreateWorkflowRequestFromJSON,
25153
+ CreateWorkflowRequestFromJSONTyped,
25154
+ CreateWorkflowRequestToJSON,
25155
+ CreateWorkflowRequestToJSONTyped,
24188
25156
  DefaultConfig,
24189
25157
  DeleteDomainResponseDataFromJSON,
24190
25158
  DeleteDomainResponseDataFromJSONTyped,
@@ -24202,6 +25170,22 @@ export {
24202
25170
  DeleteResultFromJSONTyped,
24203
25171
  DeleteResultToJSON,
24204
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,
24205
25189
  DeviceFromJSON,
24206
25190
  DeviceFromJSONTyped,
24207
25191
  DeviceListResponseFromJSON,
@@ -24468,6 +25452,22 @@ export {
24468
25452
  ListWaaSEventTypes200ResponseToJSONTyped,
24469
25453
  ListWaaSEventTypesStatusEnum,
24470
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,
24471
25471
  LoginRequestFromJSON,
24472
25472
  LoginRequestFromJSONTyped,
24473
25473
  LoginRequestToJSON,
@@ -24581,7 +25581,6 @@ export {
24581
25581
  MfaVerifyRequestFromJSONTyped,
24582
25582
  MfaVerifyRequestToJSON,
24583
25583
  MfaVerifyRequestToJSONTyped,
24584
- MuseApi,
24585
25584
  OAuthAuthorizationUrlResponseDataFromJSON,
24586
25585
  OAuthAuthorizationUrlResponseDataFromJSONTyped,
24587
25586
  OAuthAuthorizationUrlResponseDataToJSON,
@@ -24855,6 +25854,10 @@ export {
24855
25854
  RenderTemplateRequestFromJSONTyped,
24856
25855
  RenderTemplateRequestToJSON,
24857
25856
  RenderTemplateRequestToJSONTyped,
25857
+ ReorderWorkflowStepsRequestFromJSON,
25858
+ ReorderWorkflowStepsRequestFromJSONTyped,
25859
+ ReorderWorkflowStepsRequestToJSON,
25860
+ ReorderWorkflowStepsRequestToJSONTyped,
24858
25861
  ReplayWebhookEventsRequestFromJSON,
24859
25862
  ReplayWebhookEventsRequestFromJSONTyped,
24860
25863
  ReplayWebhookEventsRequestToJSON,
@@ -25082,6 +26085,10 @@ export {
25082
26085
  SignInWithGameCenterRequestFromJSONTyped,
25083
26086
  SignInWithGameCenterRequestToJSON,
25084
26087
  SignInWithGameCenterRequestToJSONTyped,
26088
+ SignInWithGooglePlayGamesRequestFromJSON,
26089
+ SignInWithGooglePlayGamesRequestFromJSONTyped,
26090
+ SignInWithGooglePlayGamesRequestToJSON,
26091
+ SignInWithGooglePlayGamesRequestToJSONTyped,
25085
26092
  SlackApi,
25086
26093
  SlackMessageFromJSON,
25087
26094
  SlackMessageFromJSONTyped,
@@ -25138,10 +26145,6 @@ export {
25138
26145
  SmsDetailResponseToJSONTyped,
25139
26146
  SmsListResponseFromJSON,
25140
26147
  SmsListResponseFromJSONTyped,
25141
- SmsListResponseMetaFromJSON,
25142
- SmsListResponseMetaFromJSONTyped,
25143
- SmsListResponseMetaToJSON,
25144
- SmsListResponseMetaToJSONTyped,
25145
26148
  SmsListResponseToJSON,
25146
26149
  SmsListResponseToJSONTyped,
25147
26150
  SmsMessageDetailFromJSON,
@@ -25228,10 +26231,6 @@ export {
25228
26231
  TestWebhookTransformRequestToJSON,
25229
26232
  TestWebhookTransformRequestToJSONTyped,
25230
26233
  TextApiResponse,
25231
- TopicDeleteResponseDataFromJSON,
25232
- TopicDeleteResponseDataFromJSONTyped,
25233
- TopicDeleteResponseDataToJSON,
25234
- TopicDeleteResponseDataToJSONTyped,
25235
26234
  TopicDeleteResponseFromJSON,
25236
26235
  TopicDeleteResponseFromJSONTyped,
25237
26236
  TopicDeleteResponseToJSON,
@@ -25285,6 +26284,18 @@ export {
25285
26284
  TopicToJSON,
25286
26285
  TopicToJSONTyped,
25287
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,
25288
26299
  UnreadCountDataFromJSON,
25289
26300
  UnreadCountDataFromJSONTyped,
25290
26301
  UnreadCountDataToJSON,
@@ -25371,6 +26382,18 @@ export {
25371
26382
  UpdateWebhookRequestFromJSONTyped,
25372
26383
  UpdateWebhookRequestToJSON,
25373
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,
25374
26397
  UpsertAuthEmailTemplateRequestEditorTypeEnum,
25375
26398
  UpsertAuthEmailTemplateRequestFromJSON,
25376
26399
  UpsertAuthEmailTemplateRequestFromJSONTyped,
@@ -25389,11 +26412,6 @@ export {
25389
26412
  UserDevicesDeleteResponseToJSON,
25390
26413
  UserDevicesDeleteResponseToJSONTyped,
25391
26414
  UtilityApi,
25392
- V1MuseSubjectsSuggestPostRequestChannelEnum,
25393
- V1MuseSubjectsSuggestPostRequestFromJSON,
25394
- V1MuseSubjectsSuggestPostRequestFromJSONTyped,
25395
- V1MuseSubjectsSuggestPostRequestToJSON,
25396
- V1MuseSubjectsSuggestPostRequestToJSONTyped,
25397
26415
  ValidateResetTokenRequestFromJSON,
25398
26416
  ValidateResetTokenRequestFromJSONTyped,
25399
26417
  ValidateResetTokenRequestToJSON,
@@ -25724,6 +26742,14 @@ export {
25724
26742
  WorkflowExecutionStatusToJSONTyped,
25725
26743
  WorkflowExecutionToJSON,
25726
26744
  WorkflowExecutionToJSONTyped,
26745
+ WorkflowFromJSON,
26746
+ WorkflowFromJSONTyped,
26747
+ WorkflowStatus,
26748
+ WorkflowStatusFromJSON,
26749
+ WorkflowStatusFromJSONTyped,
26750
+ WorkflowStatusToJSON,
26751
+ WorkflowStatusToJSONTyped,
26752
+ WorkflowStepBranchPathEnum,
25727
26753
  WorkflowStepExecutionFromJSON,
25728
26754
  WorkflowStepExecutionFromJSONTyped,
25729
26755
  WorkflowStepExecutionStatus,
@@ -25734,6 +26760,18 @@ export {
25734
26760
  WorkflowStepExecutionStepTypeEnum,
25735
26761
  WorkflowStepExecutionToJSON,
25736
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,
25737
26775
  Zyphr,
25738
26776
  ZyphrAuthenticationError,
25739
26777
  ZyphrClient,
@@ -25751,6 +26789,8 @@ export {
25751
26789
  instanceOfAddDomainRequest,
25752
26790
  instanceOfAddOrganizationMemberRequest,
25753
26791
  instanceOfAddTopicSubscribersRequest,
26792
+ instanceOfAddWorkflowStep201Response,
26793
+ instanceOfAddWorkflowStepRequest,
25754
26794
  instanceOfApiError,
25755
26795
  instanceOfApiErrorError,
25756
26796
  instanceOfApiErrorMeta,
@@ -25816,10 +26856,16 @@ export {
25816
26856
  instanceOfCreateWaaSEventType201Response,
25817
26857
  instanceOfCreateWaaSEventTypeRequest,
25818
26858
  instanceOfCreateWebhookRequest,
26859
+ instanceOfCreateWorkflow201Response,
26860
+ instanceOfCreateWorkflowRequest,
25819
26861
  instanceOfDeleteDomainResponse,
25820
26862
  instanceOfDeleteDomainResponseData,
25821
26863
  instanceOfDeleteResult,
25822
26864
  instanceOfDeleteResultData,
26865
+ instanceOfDeleteWorkflow200Response,
26866
+ instanceOfDeleteWorkflow200ResponseData,
26867
+ instanceOfDeleteWorkflowStep200Response,
26868
+ instanceOfDeleteWorkflowStep200ResponseData,
25823
26869
  instanceOfDevice,
25824
26870
  instanceOfDeviceListResponse,
25825
26871
  instanceOfDevicePushTopic,
@@ -25877,6 +26923,10 @@ export {
25877
26923
  instanceOfListWaaSEndpointDeliveries200Response,
25878
26924
  instanceOfListWaaSEndpoints200Response,
25879
26925
  instanceOfListWaaSEventTypes200Response,
26926
+ instanceOfListWorkflowExecutions200Response,
26927
+ instanceOfListWorkflowExecutions200ResponseMeta,
26928
+ instanceOfListWorkflows200Response,
26929
+ instanceOfListWorkflows200ResponseMeta,
25880
26930
  instanceOfLoginRequest,
25881
26931
  instanceOfMagicLinkSendRequest,
25882
26932
  instanceOfMagicLinkVerifyRequest,
@@ -25971,6 +27021,7 @@ export {
25971
27021
  instanceOfRemoveTopicSubscribersRequest,
25972
27022
  instanceOfRenameWebAuthnCredentialRequest,
25973
27023
  instanceOfRenderTemplateRequest,
27024
+ instanceOfReorderWorkflowStepsRequest,
25974
27025
  instanceOfReplayWebhookEventsRequest,
25975
27026
  instanceOfRequestMeta,
25976
27027
  instanceOfResetPasswordRequest,
@@ -26026,6 +27077,7 @@ export {
26026
27077
  instanceOfSetPreferencesRequestPreferencesInner,
26027
27078
  instanceOfSignInAnonymouslyRequest,
26028
27079
  instanceOfSignInWithGameCenterRequest,
27080
+ instanceOfSignInWithGooglePlayGamesRequest,
26029
27081
  instanceOfSlackMessage,
26030
27082
  instanceOfSlackMessageListResponse,
26031
27083
  instanceOfSlackMessageListResponseMeta,
@@ -26040,7 +27092,6 @@ export {
26040
27092
  instanceOfSmsConfigResponse,
26041
27093
  instanceOfSmsDetailResponse,
26042
27094
  instanceOfSmsListResponse,
26043
- instanceOfSmsListResponseMeta,
26044
27095
  instanceOfSmsMessage,
26045
27096
  instanceOfSmsMessageDetail,
26046
27097
  instanceOfSubscribePushTopicRequest,
@@ -26062,7 +27113,6 @@ export {
26062
27113
  instanceOfTestWebhookTransformRequest,
26063
27114
  instanceOfTopic,
26064
27115
  instanceOfTopicDeleteResponse,
26065
- instanceOfTopicDeleteResponseData,
26066
27116
  instanceOfTopicListResponse,
26067
27117
  instanceOfTopicResponse,
26068
27118
  instanceOfTopicStatsData,
@@ -26074,6 +27124,9 @@ export {
26074
27124
  instanceOfTopicSubscribersAddResult,
26075
27125
  instanceOfTopicSubscribersRemoveResponse,
26076
27126
  instanceOfTopicSubscribersRemoveResult,
27127
+ instanceOfTriggerWorkflow202Response,
27128
+ instanceOfTriggerWorkflow202ResponseData,
27129
+ instanceOfTriggerWorkflowRequest,
26077
27130
  instanceOfUnreadCountData,
26078
27131
  instanceOfUnreadCountResponse,
26079
27132
  instanceOfUnsubscribe,
@@ -26094,11 +27147,13 @@ export {
26094
27147
  instanceOfUpdateWaaSEndpointRequest,
26095
27148
  instanceOfUpdateWaaSEventTypeRequest,
26096
27149
  instanceOfUpdateWebhookRequest,
27150
+ instanceOfUpdateWorkflowRequest,
27151
+ instanceOfUpdateWorkflowStatusRequest,
27152
+ instanceOfUpdateWorkflowStepRequest,
26097
27153
  instanceOfUpsertAuthEmailTemplateRequest,
26098
27154
  instanceOfUpsertSmsConfigRequest,
26099
27155
  instanceOfUserDevicesDeleteResponse,
26100
27156
  instanceOfUserDevicesDeleteResponseData,
26101
- instanceOfV1MuseSubjectsSuggestPostRequest,
26102
27157
  instanceOfValidateResetTokenRequest,
26103
27158
  instanceOfValidateResetTokenResponse,
26104
27159
  instanceOfValidateResetTokenResponseData,
@@ -26174,10 +27229,14 @@ export {
26174
27229
  instanceOfWebhookVersionsResponse,
26175
27230
  instanceOfWebhookVersionsResponseData,
26176
27231
  instanceOfWithdrawSubscriberConsentRequest,
27232
+ instanceOfWorkflow,
26177
27233
  instanceOfWorkflowExecution,
26178
27234
  instanceOfWorkflowExecutionStatus,
27235
+ instanceOfWorkflowStatus,
27236
+ instanceOfWorkflowStep,
26179
27237
  instanceOfWorkflowStepExecution,
26180
27238
  instanceOfWorkflowStepExecutionStatus,
27239
+ instanceOfWorkflowStepType,
26181
27240
  mapValues,
26182
27241
  parseErrorResponse,
26183
27242
  querystring