@dinghy-chat/sdk 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +52 -0
- package/dist/openapi.d.ts +3231 -105
- package/dist/resources.d.ts +101 -3
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -1037,7 +1037,7 @@ export interface paths {
|
|
|
1037
1037
|
content: {
|
|
1038
1038
|
"application/json": {
|
|
1039
1039
|
url: string;
|
|
1040
|
-
events: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired")[];
|
|
1040
|
+
events: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired" | "campaign.updated")[];
|
|
1041
1041
|
/** @default true */
|
|
1042
1042
|
enabled?: boolean;
|
|
1043
1043
|
};
|
|
@@ -1270,7 +1270,7 @@ export interface paths {
|
|
|
1270
1270
|
content: {
|
|
1271
1271
|
"application/json": {
|
|
1272
1272
|
url?: string;
|
|
1273
|
-
events?: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired")[];
|
|
1273
|
+
events?: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired" | "campaign.updated")[];
|
|
1274
1274
|
enabled?: boolean;
|
|
1275
1275
|
};
|
|
1276
1276
|
};
|
|
@@ -2992,7 +2992,7 @@ export interface paths {
|
|
|
2992
2992
|
get: {
|
|
2993
2993
|
parameters: {
|
|
2994
2994
|
query?: {
|
|
2995
|
-
/** @description A comma list of conversation.created, message.created, message.updated, message.deleted, conversation.closed, conversation.reopened, conversation.assigned, conversation.handoff, conversation.given_back, conversation.labeled, outbound_message.sent, outbound_message.delivered, outbound_message.read, outbound_message.clicked, outbound_message.replied, outbound_message.dismissed, outbound_message.cancelled, outbound_message.expired. All by default. */
|
|
2995
|
+
/** @description A comma list of conversation.created, message.created, message.updated, message.deleted, conversation.closed, conversation.reopened, conversation.assigned, conversation.handoff, conversation.given_back, conversation.labeled, outbound_message.sent, outbound_message.delivered, outbound_message.read, outbound_message.clicked, outbound_message.replied, outbound_message.dismissed, outbound_message.cancelled, outbound_message.expired, campaign.updated. All by default. */
|
|
2996
2996
|
types?: string;
|
|
2997
2997
|
after?: string;
|
|
2998
2998
|
};
|
|
@@ -3518,6 +3518,83 @@ export interface paths {
|
|
|
3518
3518
|
patch?: never;
|
|
3519
3519
|
trace?: never;
|
|
3520
3520
|
};
|
|
3521
|
+
"/v1/operator/workspaces/{workspaceId}/contact-fields": {
|
|
3522
|
+
parameters: {
|
|
3523
|
+
query?: never;
|
|
3524
|
+
header?: never;
|
|
3525
|
+
path?: never;
|
|
3526
|
+
cookie?: never;
|
|
3527
|
+
};
|
|
3528
|
+
/**
|
|
3529
|
+
* The attribute keys and event names of the contacts seen last
|
|
3530
|
+
* @description It reads the 1,000 contacts seen last, and leaves out test visitors. Each list is A to Z, with at most 200 names.
|
|
3531
|
+
*/
|
|
3532
|
+
get: {
|
|
3533
|
+
parameters: {
|
|
3534
|
+
query?: never;
|
|
3535
|
+
header?: never;
|
|
3536
|
+
path: {
|
|
3537
|
+
workspaceId: string;
|
|
3538
|
+
};
|
|
3539
|
+
cookie?: never;
|
|
3540
|
+
};
|
|
3541
|
+
requestBody?: never;
|
|
3542
|
+
responses: {
|
|
3543
|
+
/** @description The attributes and events */
|
|
3544
|
+
200: {
|
|
3545
|
+
headers: {
|
|
3546
|
+
[name: string]: unknown;
|
|
3547
|
+
};
|
|
3548
|
+
content: {
|
|
3549
|
+
"application/json": components["schemas"]["ContactFields"];
|
|
3550
|
+
};
|
|
3551
|
+
};
|
|
3552
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
3553
|
+
401: {
|
|
3554
|
+
headers: {
|
|
3555
|
+
[name: string]: unknown;
|
|
3556
|
+
};
|
|
3557
|
+
content: {
|
|
3558
|
+
"application/json": components["schemas"]["Error"];
|
|
3559
|
+
};
|
|
3560
|
+
};
|
|
3561
|
+
/** @description payment_required: the workspace waits for payment */
|
|
3562
|
+
402: {
|
|
3563
|
+
headers: {
|
|
3564
|
+
[name: string]: unknown;
|
|
3565
|
+
};
|
|
3566
|
+
content: {
|
|
3567
|
+
"application/json": components["schemas"]["Error"];
|
|
3568
|
+
};
|
|
3569
|
+
};
|
|
3570
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
3571
|
+
404: {
|
|
3572
|
+
headers: {
|
|
3573
|
+
[name: string]: unknown;
|
|
3574
|
+
};
|
|
3575
|
+
content: {
|
|
3576
|
+
"application/json": components["schemas"]["Error"];
|
|
3577
|
+
};
|
|
3578
|
+
};
|
|
3579
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
3580
|
+
429: {
|
|
3581
|
+
headers: {
|
|
3582
|
+
[name: string]: unknown;
|
|
3583
|
+
};
|
|
3584
|
+
content: {
|
|
3585
|
+
"application/json": components["schemas"]["Error"];
|
|
3586
|
+
};
|
|
3587
|
+
};
|
|
3588
|
+
};
|
|
3589
|
+
};
|
|
3590
|
+
put?: never;
|
|
3591
|
+
post?: never;
|
|
3592
|
+
delete?: never;
|
|
3593
|
+
options?: never;
|
|
3594
|
+
head?: never;
|
|
3595
|
+
patch?: never;
|
|
3596
|
+
trace?: never;
|
|
3597
|
+
};
|
|
3521
3598
|
"/v1/operator/workspaces/{workspaceId}/outbound-messages": {
|
|
3522
3599
|
parameters: {
|
|
3523
3600
|
query?: never;
|
|
@@ -3535,6 +3612,7 @@ export interface paths {
|
|
|
3535
3612
|
dedupeKey?: string;
|
|
3536
3613
|
status?: "scheduled" | "sent" | "delivered" | "read" | "replied" | "dismissed" | "cancelled" | "expired";
|
|
3537
3614
|
apiKeyId?: string;
|
|
3615
|
+
campaignId?: string;
|
|
3538
3616
|
/** @description The `next` of the page before */
|
|
3539
3617
|
cursor?: string;
|
|
3540
3618
|
limit?: number;
|
|
@@ -3670,7 +3748,2647 @@ export interface paths {
|
|
|
3670
3748
|
};
|
|
3671
3749
|
};
|
|
3672
3750
|
responses: {
|
|
3673
|
-
/** @description A retry, or a `dedupeKey` already used: the first outbound message */
|
|
3751
|
+
/** @description A retry, or a `dedupeKey` already used: the first outbound message */
|
|
3752
|
+
200: {
|
|
3753
|
+
headers: {
|
|
3754
|
+
[name: string]: unknown;
|
|
3755
|
+
};
|
|
3756
|
+
content: {
|
|
3757
|
+
"application/json": {
|
|
3758
|
+
outboundMessage: components["schemas"]["OutboundMessage"];
|
|
3759
|
+
};
|
|
3760
|
+
};
|
|
3761
|
+
};
|
|
3762
|
+
/** @description The new outbound message */
|
|
3763
|
+
201: {
|
|
3764
|
+
headers: {
|
|
3765
|
+
[name: string]: unknown;
|
|
3766
|
+
};
|
|
3767
|
+
content: {
|
|
3768
|
+
"application/json": {
|
|
3769
|
+
outboundMessage: components["schemas"]["OutboundMessage"];
|
|
3770
|
+
};
|
|
3771
|
+
};
|
|
3772
|
+
};
|
|
3773
|
+
/** @description invalid_request: the request is not valid, the sender is not a member, or expiresAt comes before the send time */
|
|
3774
|
+
400: {
|
|
3775
|
+
headers: {
|
|
3776
|
+
[name: string]: unknown;
|
|
3777
|
+
};
|
|
3778
|
+
content: {
|
|
3779
|
+
"application/json": components["schemas"]["Error"];
|
|
3780
|
+
};
|
|
3781
|
+
};
|
|
3782
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
3783
|
+
401: {
|
|
3784
|
+
headers: {
|
|
3785
|
+
[name: string]: unknown;
|
|
3786
|
+
};
|
|
3787
|
+
content: {
|
|
3788
|
+
"application/json": components["schemas"]["Error"];
|
|
3789
|
+
};
|
|
3790
|
+
};
|
|
3791
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
3792
|
+
402: {
|
|
3793
|
+
headers: {
|
|
3794
|
+
[name: string]: unknown;
|
|
3795
|
+
};
|
|
3796
|
+
content: {
|
|
3797
|
+
"application/json": components["schemas"]["Error"];
|
|
3798
|
+
};
|
|
3799
|
+
};
|
|
3800
|
+
/** @description send_mode_required: the key drafts replies. send_as_member_required: the key may not send as a member. send_email_required: the key may not send with `sendEmail: true`. blocked: the team blocked this visitor. suspended: the server's admin suspended the workspace */
|
|
3801
|
+
403: {
|
|
3802
|
+
headers: {
|
|
3803
|
+
[name: string]: unknown;
|
|
3804
|
+
};
|
|
3805
|
+
content: {
|
|
3806
|
+
"application/json": components["schemas"]["Error"];
|
|
3807
|
+
};
|
|
3808
|
+
};
|
|
3809
|
+
/** @description not_found: no visitor has this `id` */
|
|
3810
|
+
404: {
|
|
3811
|
+
headers: {
|
|
3812
|
+
[name: string]: unknown;
|
|
3813
|
+
};
|
|
3814
|
+
content: {
|
|
3815
|
+
"application/json": components["schemas"]["Error"];
|
|
3816
|
+
};
|
|
3817
|
+
};
|
|
3818
|
+
/** @description bots_paused: an owner or admin paused every bot */
|
|
3819
|
+
409: {
|
|
3820
|
+
headers: {
|
|
3821
|
+
[name: string]: unknown;
|
|
3822
|
+
};
|
|
3823
|
+
content: {
|
|
3824
|
+
"application/json": components["schemas"]["Error"];
|
|
3825
|
+
};
|
|
3826
|
+
};
|
|
3827
|
+
/** @description too_large: the body is over 64 KB */
|
|
3828
|
+
413: {
|
|
3829
|
+
headers: {
|
|
3830
|
+
[name: string]: unknown;
|
|
3831
|
+
};
|
|
3832
|
+
content: {
|
|
3833
|
+
"application/json": components["schemas"]["Error"];
|
|
3834
|
+
};
|
|
3835
|
+
};
|
|
3836
|
+
/** @description too_many_requests: over the key's rate limit. too_many_waiting: the visitor has 5 outbound messages waiting */
|
|
3837
|
+
429: {
|
|
3838
|
+
headers: {
|
|
3839
|
+
[name: string]: unknown;
|
|
3840
|
+
};
|
|
3841
|
+
content: {
|
|
3842
|
+
"application/json": components["schemas"]["Error"];
|
|
3843
|
+
};
|
|
3844
|
+
};
|
|
3845
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
3846
|
+
503: {
|
|
3847
|
+
headers: {
|
|
3848
|
+
[name: string]: unknown;
|
|
3849
|
+
};
|
|
3850
|
+
content: {
|
|
3851
|
+
"application/json": components["schemas"]["Error"];
|
|
3852
|
+
};
|
|
3853
|
+
};
|
|
3854
|
+
};
|
|
3855
|
+
};
|
|
3856
|
+
delete?: never;
|
|
3857
|
+
options?: never;
|
|
3858
|
+
head?: never;
|
|
3859
|
+
patch?: never;
|
|
3860
|
+
trace?: never;
|
|
3861
|
+
};
|
|
3862
|
+
"/v1/operator/workspaces/{workspaceId}/outbound-messages/{id}": {
|
|
3863
|
+
parameters: {
|
|
3864
|
+
query?: never;
|
|
3865
|
+
header?: never;
|
|
3866
|
+
path?: never;
|
|
3867
|
+
cookie?: never;
|
|
3868
|
+
};
|
|
3869
|
+
/** Get one outbound message */
|
|
3870
|
+
get: {
|
|
3871
|
+
parameters: {
|
|
3872
|
+
query?: never;
|
|
3873
|
+
header?: never;
|
|
3874
|
+
path: {
|
|
3875
|
+
workspaceId: string;
|
|
3876
|
+
id: string;
|
|
3877
|
+
};
|
|
3878
|
+
cookie?: never;
|
|
3879
|
+
};
|
|
3880
|
+
requestBody?: never;
|
|
3881
|
+
responses: {
|
|
3882
|
+
/** @description The outbound message */
|
|
3883
|
+
200: {
|
|
3884
|
+
headers: {
|
|
3885
|
+
[name: string]: unknown;
|
|
3886
|
+
};
|
|
3887
|
+
content: {
|
|
3888
|
+
"application/json": {
|
|
3889
|
+
outboundMessage: components["schemas"]["OutboundMessage"];
|
|
3890
|
+
};
|
|
3891
|
+
};
|
|
3892
|
+
};
|
|
3893
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
3894
|
+
401: {
|
|
3895
|
+
headers: {
|
|
3896
|
+
[name: string]: unknown;
|
|
3897
|
+
};
|
|
3898
|
+
content: {
|
|
3899
|
+
"application/json": components["schemas"]["Error"];
|
|
3900
|
+
};
|
|
3901
|
+
};
|
|
3902
|
+
/** @description payment_required: the workspace waits for payment */
|
|
3903
|
+
402: {
|
|
3904
|
+
headers: {
|
|
3905
|
+
[name: string]: unknown;
|
|
3906
|
+
};
|
|
3907
|
+
content: {
|
|
3908
|
+
"application/json": components["schemas"]["Error"];
|
|
3909
|
+
};
|
|
3910
|
+
};
|
|
3911
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
3912
|
+
404: {
|
|
3913
|
+
headers: {
|
|
3914
|
+
[name: string]: unknown;
|
|
3915
|
+
};
|
|
3916
|
+
content: {
|
|
3917
|
+
"application/json": components["schemas"]["Error"];
|
|
3918
|
+
};
|
|
3919
|
+
};
|
|
3920
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
3921
|
+
429: {
|
|
3922
|
+
headers: {
|
|
3923
|
+
[name: string]: unknown;
|
|
3924
|
+
};
|
|
3925
|
+
content: {
|
|
3926
|
+
"application/json": components["schemas"]["Error"];
|
|
3927
|
+
};
|
|
3928
|
+
};
|
|
3929
|
+
};
|
|
3930
|
+
};
|
|
3931
|
+
put?: never;
|
|
3932
|
+
post?: never;
|
|
3933
|
+
delete?: never;
|
|
3934
|
+
options?: never;
|
|
3935
|
+
head?: never;
|
|
3936
|
+
patch?: never;
|
|
3937
|
+
trace?: never;
|
|
3938
|
+
};
|
|
3939
|
+
"/v1/operator/workspaces/{workspaceId}/outbound-messages/{id}/cancel": {
|
|
3940
|
+
parameters: {
|
|
3941
|
+
query?: never;
|
|
3942
|
+
header?: never;
|
|
3943
|
+
path?: never;
|
|
3944
|
+
cookie?: never;
|
|
3945
|
+
};
|
|
3946
|
+
get?: never;
|
|
3947
|
+
put?: never;
|
|
3948
|
+
/**
|
|
3949
|
+
* Cancel an outbound message
|
|
3950
|
+
* @description A message that the visitor has not read ends as `cancelled`, with `statusReason: cancelled_by_request`, and its `dedupeKey` is free again. A message already read, answered or ended stays as it is: read its `status`.
|
|
3951
|
+
*/
|
|
3952
|
+
post: {
|
|
3953
|
+
parameters: {
|
|
3954
|
+
query?: never;
|
|
3955
|
+
header?: never;
|
|
3956
|
+
path: {
|
|
3957
|
+
workspaceId: string;
|
|
3958
|
+
id: string;
|
|
3959
|
+
};
|
|
3960
|
+
cookie?: never;
|
|
3961
|
+
};
|
|
3962
|
+
requestBody?: never;
|
|
3963
|
+
responses: {
|
|
3964
|
+
/** @description The outbound message after the cancel */
|
|
3965
|
+
200: {
|
|
3966
|
+
headers: {
|
|
3967
|
+
[name: string]: unknown;
|
|
3968
|
+
};
|
|
3969
|
+
content: {
|
|
3970
|
+
"application/json": {
|
|
3971
|
+
outboundMessage: components["schemas"]["OutboundMessage"];
|
|
3972
|
+
};
|
|
3973
|
+
};
|
|
3974
|
+
};
|
|
3975
|
+
/** @description invalid_request: the request is not valid */
|
|
3976
|
+
400: {
|
|
3977
|
+
headers: {
|
|
3978
|
+
[name: string]: unknown;
|
|
3979
|
+
};
|
|
3980
|
+
content: {
|
|
3981
|
+
"application/json": components["schemas"]["Error"];
|
|
3982
|
+
};
|
|
3983
|
+
};
|
|
3984
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
3985
|
+
401: {
|
|
3986
|
+
headers: {
|
|
3987
|
+
[name: string]: unknown;
|
|
3988
|
+
};
|
|
3989
|
+
content: {
|
|
3990
|
+
"application/json": components["schemas"]["Error"];
|
|
3991
|
+
};
|
|
3992
|
+
};
|
|
3993
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
3994
|
+
402: {
|
|
3995
|
+
headers: {
|
|
3996
|
+
[name: string]: unknown;
|
|
3997
|
+
};
|
|
3998
|
+
content: {
|
|
3999
|
+
"application/json": components["schemas"]["Error"];
|
|
4000
|
+
};
|
|
4001
|
+
};
|
|
4002
|
+
/** @description suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
4003
|
+
403: {
|
|
4004
|
+
headers: {
|
|
4005
|
+
[name: string]: unknown;
|
|
4006
|
+
};
|
|
4007
|
+
content: {
|
|
4008
|
+
"application/json": components["schemas"]["Error"];
|
|
4009
|
+
};
|
|
4010
|
+
};
|
|
4011
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4012
|
+
404: {
|
|
4013
|
+
headers: {
|
|
4014
|
+
[name: string]: unknown;
|
|
4015
|
+
};
|
|
4016
|
+
content: {
|
|
4017
|
+
"application/json": components["schemas"]["Error"];
|
|
4018
|
+
};
|
|
4019
|
+
};
|
|
4020
|
+
/** @description too_large: the body is over 64 KB */
|
|
4021
|
+
413: {
|
|
4022
|
+
headers: {
|
|
4023
|
+
[name: string]: unknown;
|
|
4024
|
+
};
|
|
4025
|
+
content: {
|
|
4026
|
+
"application/json": components["schemas"]["Error"];
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4030
|
+
429: {
|
|
4031
|
+
headers: {
|
|
4032
|
+
[name: string]: unknown;
|
|
4033
|
+
};
|
|
4034
|
+
content: {
|
|
4035
|
+
"application/json": components["schemas"]["Error"];
|
|
4036
|
+
};
|
|
4037
|
+
};
|
|
4038
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4039
|
+
503: {
|
|
4040
|
+
headers: {
|
|
4041
|
+
[name: string]: unknown;
|
|
4042
|
+
};
|
|
4043
|
+
content: {
|
|
4044
|
+
"application/json": components["schemas"]["Error"];
|
|
4045
|
+
};
|
|
4046
|
+
};
|
|
4047
|
+
};
|
|
4048
|
+
};
|
|
4049
|
+
delete?: never;
|
|
4050
|
+
options?: never;
|
|
4051
|
+
head?: never;
|
|
4052
|
+
patch?: never;
|
|
4053
|
+
trace?: never;
|
|
4054
|
+
};
|
|
4055
|
+
"/v1/operator/workspaces/{workspaceId}/outbound-messages/cancel": {
|
|
4056
|
+
parameters: {
|
|
4057
|
+
query?: never;
|
|
4058
|
+
header?: never;
|
|
4059
|
+
path?: never;
|
|
4060
|
+
cookie?: never;
|
|
4061
|
+
};
|
|
4062
|
+
get?: never;
|
|
4063
|
+
put?: never;
|
|
4064
|
+
/**
|
|
4065
|
+
* Cancel the outbound message that a visitor's `dedupeKey` names
|
|
4066
|
+
* @description A message that the visitor has not read ends as `cancelled`, with `statusReason: cancelled_by_request`, and its `dedupeKey` is free again. A message already read, answered or ended stays as it is: read its `status`. With no such message, `outboundMessage` is null.
|
|
4067
|
+
*/
|
|
4068
|
+
post: {
|
|
4069
|
+
parameters: {
|
|
4070
|
+
query?: never;
|
|
4071
|
+
header?: never;
|
|
4072
|
+
path: {
|
|
4073
|
+
workspaceId: string;
|
|
4074
|
+
};
|
|
4075
|
+
cookie?: never;
|
|
4076
|
+
};
|
|
4077
|
+
requestBody: {
|
|
4078
|
+
content: {
|
|
4079
|
+
"application/json": {
|
|
4080
|
+
visitor: components["schemas"]["VisitorRef"];
|
|
4081
|
+
dedupeKey: string;
|
|
4082
|
+
};
|
|
4083
|
+
};
|
|
4084
|
+
};
|
|
4085
|
+
responses: {
|
|
4086
|
+
/** @description The outbound message after the cancel, or null */
|
|
4087
|
+
200: {
|
|
4088
|
+
headers: {
|
|
4089
|
+
[name: string]: unknown;
|
|
4090
|
+
};
|
|
4091
|
+
content: {
|
|
4092
|
+
"application/json": {
|
|
4093
|
+
outboundMessage: components["schemas"]["OutboundMessage"] & (Record<string, never> | null);
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
};
|
|
4097
|
+
/** @description invalid_request: the request is not valid */
|
|
4098
|
+
400: {
|
|
4099
|
+
headers: {
|
|
4100
|
+
[name: string]: unknown;
|
|
4101
|
+
};
|
|
4102
|
+
content: {
|
|
4103
|
+
"application/json": components["schemas"]["Error"];
|
|
4104
|
+
};
|
|
4105
|
+
};
|
|
4106
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4107
|
+
401: {
|
|
4108
|
+
headers: {
|
|
4109
|
+
[name: string]: unknown;
|
|
4110
|
+
};
|
|
4111
|
+
content: {
|
|
4112
|
+
"application/json": components["schemas"]["Error"];
|
|
4113
|
+
};
|
|
4114
|
+
};
|
|
4115
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4116
|
+
402: {
|
|
4117
|
+
headers: {
|
|
4118
|
+
[name: string]: unknown;
|
|
4119
|
+
};
|
|
4120
|
+
content: {
|
|
4121
|
+
"application/json": components["schemas"]["Error"];
|
|
4122
|
+
};
|
|
4123
|
+
};
|
|
4124
|
+
/** @description suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
4125
|
+
403: {
|
|
4126
|
+
headers: {
|
|
4127
|
+
[name: string]: unknown;
|
|
4128
|
+
};
|
|
4129
|
+
content: {
|
|
4130
|
+
"application/json": components["schemas"]["Error"];
|
|
4131
|
+
};
|
|
4132
|
+
};
|
|
4133
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4134
|
+
404: {
|
|
4135
|
+
headers: {
|
|
4136
|
+
[name: string]: unknown;
|
|
4137
|
+
};
|
|
4138
|
+
content: {
|
|
4139
|
+
"application/json": components["schemas"]["Error"];
|
|
4140
|
+
};
|
|
4141
|
+
};
|
|
4142
|
+
/** @description too_large: the body is over 64 KB */
|
|
4143
|
+
413: {
|
|
4144
|
+
headers: {
|
|
4145
|
+
[name: string]: unknown;
|
|
4146
|
+
};
|
|
4147
|
+
content: {
|
|
4148
|
+
"application/json": components["schemas"]["Error"];
|
|
4149
|
+
};
|
|
4150
|
+
};
|
|
4151
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4152
|
+
429: {
|
|
4153
|
+
headers: {
|
|
4154
|
+
[name: string]: unknown;
|
|
4155
|
+
};
|
|
4156
|
+
content: {
|
|
4157
|
+
"application/json": components["schemas"]["Error"];
|
|
4158
|
+
};
|
|
4159
|
+
};
|
|
4160
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4161
|
+
503: {
|
|
4162
|
+
headers: {
|
|
4163
|
+
[name: string]: unknown;
|
|
4164
|
+
};
|
|
4165
|
+
content: {
|
|
4166
|
+
"application/json": components["schemas"]["Error"];
|
|
4167
|
+
};
|
|
4168
|
+
};
|
|
4169
|
+
};
|
|
4170
|
+
};
|
|
4171
|
+
delete?: never;
|
|
4172
|
+
options?: never;
|
|
4173
|
+
head?: never;
|
|
4174
|
+
patch?: never;
|
|
4175
|
+
trace?: never;
|
|
4176
|
+
};
|
|
4177
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns": {
|
|
4178
|
+
parameters: {
|
|
4179
|
+
query?: never;
|
|
4180
|
+
header?: never;
|
|
4181
|
+
path?: never;
|
|
4182
|
+
cookie?: never;
|
|
4183
|
+
};
|
|
4184
|
+
/** List the campaigns, oldest first, with their results since they started */
|
|
4185
|
+
get: {
|
|
4186
|
+
parameters: {
|
|
4187
|
+
query?: {
|
|
4188
|
+
status?: "draft" | "live" | "paused" | "ended";
|
|
4189
|
+
};
|
|
4190
|
+
header?: never;
|
|
4191
|
+
path: {
|
|
4192
|
+
workspaceId: string;
|
|
4193
|
+
};
|
|
4194
|
+
cookie?: never;
|
|
4195
|
+
};
|
|
4196
|
+
requestBody?: never;
|
|
4197
|
+
responses: {
|
|
4198
|
+
/** @description The campaigns */
|
|
4199
|
+
200: {
|
|
4200
|
+
headers: {
|
|
4201
|
+
[name: string]: unknown;
|
|
4202
|
+
};
|
|
4203
|
+
content: {
|
|
4204
|
+
"application/json": {
|
|
4205
|
+
campaigns: components["schemas"]["Campaign"][];
|
|
4206
|
+
/** @description The messages every campaign sent in the last 7 days, whatever the status */
|
|
4207
|
+
sentLastWeek: number;
|
|
4208
|
+
};
|
|
4209
|
+
};
|
|
4210
|
+
};
|
|
4211
|
+
/** @description invalid_request: the request is not valid */
|
|
4212
|
+
400: {
|
|
4213
|
+
headers: {
|
|
4214
|
+
[name: string]: unknown;
|
|
4215
|
+
};
|
|
4216
|
+
content: {
|
|
4217
|
+
"application/json": components["schemas"]["Error"];
|
|
4218
|
+
};
|
|
4219
|
+
};
|
|
4220
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4221
|
+
401: {
|
|
4222
|
+
headers: {
|
|
4223
|
+
[name: string]: unknown;
|
|
4224
|
+
};
|
|
4225
|
+
content: {
|
|
4226
|
+
"application/json": components["schemas"]["Error"];
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
4229
|
+
/** @description payment_required: the workspace waits for payment */
|
|
4230
|
+
402: {
|
|
4231
|
+
headers: {
|
|
4232
|
+
[name: string]: unknown;
|
|
4233
|
+
};
|
|
4234
|
+
content: {
|
|
4235
|
+
"application/json": components["schemas"]["Error"];
|
|
4236
|
+
};
|
|
4237
|
+
};
|
|
4238
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4239
|
+
404: {
|
|
4240
|
+
headers: {
|
|
4241
|
+
[name: string]: unknown;
|
|
4242
|
+
};
|
|
4243
|
+
content: {
|
|
4244
|
+
"application/json": components["schemas"]["Error"];
|
|
4245
|
+
};
|
|
4246
|
+
};
|
|
4247
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4248
|
+
429: {
|
|
4249
|
+
headers: {
|
|
4250
|
+
[name: string]: unknown;
|
|
4251
|
+
};
|
|
4252
|
+
content: {
|
|
4253
|
+
"application/json": components["schemas"]["Error"];
|
|
4254
|
+
};
|
|
4255
|
+
};
|
|
4256
|
+
};
|
|
4257
|
+
};
|
|
4258
|
+
put?: never;
|
|
4259
|
+
/**
|
|
4260
|
+
* Create a campaign, as a draft. Owners, admins and Full access keys only
|
|
4261
|
+
* @description The body is the whole definition. A new campaign is a draft until `/resume`. Its messages carry the member or key that saved it last, so a key needs the permissions its messages use.
|
|
4262
|
+
*/
|
|
4263
|
+
post: {
|
|
4264
|
+
parameters: {
|
|
4265
|
+
query?: never;
|
|
4266
|
+
header?: never;
|
|
4267
|
+
path: {
|
|
4268
|
+
workspaceId: string;
|
|
4269
|
+
};
|
|
4270
|
+
cookie?: never;
|
|
4271
|
+
};
|
|
4272
|
+
requestBody: {
|
|
4273
|
+
content: {
|
|
4274
|
+
"application/json": components["schemas"]["CampaignDefinition"];
|
|
4275
|
+
};
|
|
4276
|
+
};
|
|
4277
|
+
responses: {
|
|
4278
|
+
/** @description The new campaign */
|
|
4279
|
+
201: {
|
|
4280
|
+
headers: {
|
|
4281
|
+
[name: string]: unknown;
|
|
4282
|
+
};
|
|
4283
|
+
content: {
|
|
4284
|
+
"application/json": {
|
|
4285
|
+
campaign: components["schemas"]["Campaign"];
|
|
4286
|
+
};
|
|
4287
|
+
};
|
|
4288
|
+
};
|
|
4289
|
+
/** @description invalid_request: the request is not valid */
|
|
4290
|
+
400: {
|
|
4291
|
+
headers: {
|
|
4292
|
+
[name: string]: unknown;
|
|
4293
|
+
};
|
|
4294
|
+
content: {
|
|
4295
|
+
"application/json": components["schemas"]["Error"];
|
|
4296
|
+
};
|
|
4297
|
+
};
|
|
4298
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4299
|
+
401: {
|
|
4300
|
+
headers: {
|
|
4301
|
+
[name: string]: unknown;
|
|
4302
|
+
};
|
|
4303
|
+
content: {
|
|
4304
|
+
"application/json": components["schemas"]["Error"];
|
|
4305
|
+
};
|
|
4306
|
+
};
|
|
4307
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4308
|
+
402: {
|
|
4309
|
+
headers: {
|
|
4310
|
+
[name: string]: unknown;
|
|
4311
|
+
};
|
|
4312
|
+
content: {
|
|
4313
|
+
"application/json": components["schemas"]["Error"];
|
|
4314
|
+
};
|
|
4315
|
+
};
|
|
4316
|
+
/** @description forbidden: this role or key may not. send_mode_required, send_as_member_required, send_email_required: this key may not stand behind the campaign's messages */
|
|
4317
|
+
403: {
|
|
4318
|
+
headers: {
|
|
4319
|
+
[name: string]: unknown;
|
|
4320
|
+
};
|
|
4321
|
+
content: {
|
|
4322
|
+
"application/json": components["schemas"]["Error"];
|
|
4323
|
+
};
|
|
4324
|
+
};
|
|
4325
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4326
|
+
404: {
|
|
4327
|
+
headers: {
|
|
4328
|
+
[name: string]: unknown;
|
|
4329
|
+
};
|
|
4330
|
+
content: {
|
|
4331
|
+
"application/json": components["schemas"]["Error"];
|
|
4332
|
+
};
|
|
4333
|
+
};
|
|
4334
|
+
/** @description campaign_key_taken: another campaign has this key. campaign_ended: an ended campaign does not change */
|
|
4335
|
+
409: {
|
|
4336
|
+
headers: {
|
|
4337
|
+
[name: string]: unknown;
|
|
4338
|
+
};
|
|
4339
|
+
content: {
|
|
4340
|
+
"application/json": components["schemas"]["Error"];
|
|
4341
|
+
};
|
|
4342
|
+
};
|
|
4343
|
+
/** @description too_large: the body is over 64 KB */
|
|
4344
|
+
413: {
|
|
4345
|
+
headers: {
|
|
4346
|
+
[name: string]: unknown;
|
|
4347
|
+
};
|
|
4348
|
+
content: {
|
|
4349
|
+
"application/json": components["schemas"]["Error"];
|
|
4350
|
+
};
|
|
4351
|
+
};
|
|
4352
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4353
|
+
429: {
|
|
4354
|
+
headers: {
|
|
4355
|
+
[name: string]: unknown;
|
|
4356
|
+
};
|
|
4357
|
+
content: {
|
|
4358
|
+
"application/json": components["schemas"]["Error"];
|
|
4359
|
+
};
|
|
4360
|
+
};
|
|
4361
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4362
|
+
503: {
|
|
4363
|
+
headers: {
|
|
4364
|
+
[name: string]: unknown;
|
|
4365
|
+
};
|
|
4366
|
+
content: {
|
|
4367
|
+
"application/json": components["schemas"]["Error"];
|
|
4368
|
+
};
|
|
4369
|
+
};
|
|
4370
|
+
};
|
|
4371
|
+
};
|
|
4372
|
+
delete?: never;
|
|
4373
|
+
options?: never;
|
|
4374
|
+
head?: never;
|
|
4375
|
+
patch?: never;
|
|
4376
|
+
trace?: never;
|
|
4377
|
+
};
|
|
4378
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/estimate": {
|
|
4379
|
+
parameters: {
|
|
4380
|
+
query?: never;
|
|
4381
|
+
header?: never;
|
|
4382
|
+
path?: never;
|
|
4383
|
+
cookie?: never;
|
|
4384
|
+
};
|
|
4385
|
+
get?: never;
|
|
4386
|
+
put?: never;
|
|
4387
|
+
/**
|
|
4388
|
+
* Count the contacts an audience matches now, and those a trigger reached lately
|
|
4389
|
+
* @description `matching` counts the contacts who match `audience` now. `lastWeek` counts those a `match` or `event` trigger would have reached in the last 7 days, and is null for another trigger. Each count stops at 10,000 with `more: true`.
|
|
4390
|
+
*/
|
|
4391
|
+
post: {
|
|
4392
|
+
parameters: {
|
|
4393
|
+
query?: never;
|
|
4394
|
+
header?: never;
|
|
4395
|
+
path: {
|
|
4396
|
+
workspaceId: string;
|
|
4397
|
+
};
|
|
4398
|
+
cookie?: never;
|
|
4399
|
+
};
|
|
4400
|
+
requestBody: {
|
|
4401
|
+
content: {
|
|
4402
|
+
"application/json": {
|
|
4403
|
+
audience?: components["schemas"]["Condition"];
|
|
4404
|
+
trigger?: components["schemas"]["CampaignTrigger"];
|
|
4405
|
+
};
|
|
4406
|
+
};
|
|
4407
|
+
};
|
|
4408
|
+
responses: {
|
|
4409
|
+
/** @description The counts */
|
|
4410
|
+
200: {
|
|
4411
|
+
headers: {
|
|
4412
|
+
[name: string]: unknown;
|
|
4413
|
+
};
|
|
4414
|
+
content: {
|
|
4415
|
+
"application/json": {
|
|
4416
|
+
matching: {
|
|
4417
|
+
count: number;
|
|
4418
|
+
more: boolean;
|
|
4419
|
+
};
|
|
4420
|
+
lastWeek: {
|
|
4421
|
+
count: number;
|
|
4422
|
+
more: boolean;
|
|
4423
|
+
} | null;
|
|
4424
|
+
};
|
|
4425
|
+
};
|
|
4426
|
+
};
|
|
4427
|
+
/** @description invalid_request: the request is not valid */
|
|
4428
|
+
400: {
|
|
4429
|
+
headers: {
|
|
4430
|
+
[name: string]: unknown;
|
|
4431
|
+
};
|
|
4432
|
+
content: {
|
|
4433
|
+
"application/json": components["schemas"]["Error"];
|
|
4434
|
+
};
|
|
4435
|
+
};
|
|
4436
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4437
|
+
401: {
|
|
4438
|
+
headers: {
|
|
4439
|
+
[name: string]: unknown;
|
|
4440
|
+
};
|
|
4441
|
+
content: {
|
|
4442
|
+
"application/json": components["schemas"]["Error"];
|
|
4443
|
+
};
|
|
4444
|
+
};
|
|
4445
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4446
|
+
402: {
|
|
4447
|
+
headers: {
|
|
4448
|
+
[name: string]: unknown;
|
|
4449
|
+
};
|
|
4450
|
+
content: {
|
|
4451
|
+
"application/json": components["schemas"]["Error"];
|
|
4452
|
+
};
|
|
4453
|
+
};
|
|
4454
|
+
/** @description suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
4455
|
+
403: {
|
|
4456
|
+
headers: {
|
|
4457
|
+
[name: string]: unknown;
|
|
4458
|
+
};
|
|
4459
|
+
content: {
|
|
4460
|
+
"application/json": components["schemas"]["Error"];
|
|
4461
|
+
};
|
|
4462
|
+
};
|
|
4463
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4464
|
+
404: {
|
|
4465
|
+
headers: {
|
|
4466
|
+
[name: string]: unknown;
|
|
4467
|
+
};
|
|
4468
|
+
content: {
|
|
4469
|
+
"application/json": components["schemas"]["Error"];
|
|
4470
|
+
};
|
|
4471
|
+
};
|
|
4472
|
+
/** @description too_large: the body is over 64 KB */
|
|
4473
|
+
413: {
|
|
4474
|
+
headers: {
|
|
4475
|
+
[name: string]: unknown;
|
|
4476
|
+
};
|
|
4477
|
+
content: {
|
|
4478
|
+
"application/json": components["schemas"]["Error"];
|
|
4479
|
+
};
|
|
4480
|
+
};
|
|
4481
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4482
|
+
429: {
|
|
4483
|
+
headers: {
|
|
4484
|
+
[name: string]: unknown;
|
|
4485
|
+
};
|
|
4486
|
+
content: {
|
|
4487
|
+
"application/json": components["schemas"]["Error"];
|
|
4488
|
+
};
|
|
4489
|
+
};
|
|
4490
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4491
|
+
503: {
|
|
4492
|
+
headers: {
|
|
4493
|
+
[name: string]: unknown;
|
|
4494
|
+
};
|
|
4495
|
+
content: {
|
|
4496
|
+
"application/json": components["schemas"]["Error"];
|
|
4497
|
+
};
|
|
4498
|
+
};
|
|
4499
|
+
};
|
|
4500
|
+
};
|
|
4501
|
+
delete?: never;
|
|
4502
|
+
options?: never;
|
|
4503
|
+
head?: never;
|
|
4504
|
+
patch?: never;
|
|
4505
|
+
trace?: never;
|
|
4506
|
+
};
|
|
4507
|
+
"/v1/operator/workspaces/{workspaceId}/campaign-settings": {
|
|
4508
|
+
parameters: {
|
|
4509
|
+
query?: never;
|
|
4510
|
+
header?: never;
|
|
4511
|
+
path?: never;
|
|
4512
|
+
cookie?: never;
|
|
4513
|
+
};
|
|
4514
|
+
/** Read the settings for every campaign */
|
|
4515
|
+
get: {
|
|
4516
|
+
parameters: {
|
|
4517
|
+
query?: never;
|
|
4518
|
+
header?: never;
|
|
4519
|
+
path: {
|
|
4520
|
+
workspaceId: string;
|
|
4521
|
+
};
|
|
4522
|
+
cookie?: never;
|
|
4523
|
+
};
|
|
4524
|
+
requestBody?: never;
|
|
4525
|
+
responses: {
|
|
4526
|
+
/** @description The settings for every campaign */
|
|
4527
|
+
200: {
|
|
4528
|
+
headers: {
|
|
4529
|
+
[name: string]: unknown;
|
|
4530
|
+
};
|
|
4531
|
+
content: {
|
|
4532
|
+
"application/json": components["schemas"]["CampaignSettingsView"];
|
|
4533
|
+
};
|
|
4534
|
+
};
|
|
4535
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4536
|
+
401: {
|
|
4537
|
+
headers: {
|
|
4538
|
+
[name: string]: unknown;
|
|
4539
|
+
};
|
|
4540
|
+
content: {
|
|
4541
|
+
"application/json": components["schemas"]["Error"];
|
|
4542
|
+
};
|
|
4543
|
+
};
|
|
4544
|
+
/** @description payment_required: the workspace waits for payment */
|
|
4545
|
+
402: {
|
|
4546
|
+
headers: {
|
|
4547
|
+
[name: string]: unknown;
|
|
4548
|
+
};
|
|
4549
|
+
content: {
|
|
4550
|
+
"application/json": components["schemas"]["Error"];
|
|
4551
|
+
};
|
|
4552
|
+
};
|
|
4553
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4554
|
+
404: {
|
|
4555
|
+
headers: {
|
|
4556
|
+
[name: string]: unknown;
|
|
4557
|
+
};
|
|
4558
|
+
content: {
|
|
4559
|
+
"application/json": components["schemas"]["Error"];
|
|
4560
|
+
};
|
|
4561
|
+
};
|
|
4562
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4563
|
+
429: {
|
|
4564
|
+
headers: {
|
|
4565
|
+
[name: string]: unknown;
|
|
4566
|
+
};
|
|
4567
|
+
content: {
|
|
4568
|
+
"application/json": components["schemas"]["Error"];
|
|
4569
|
+
};
|
|
4570
|
+
};
|
|
4571
|
+
};
|
|
4572
|
+
};
|
|
4573
|
+
/**
|
|
4574
|
+
* Pause every campaign, or set the gap between two campaign messages to one visitor
|
|
4575
|
+
* @description `paused` holds every campaign's messages until it is false again. It is apart from pausing the bots. `gapHours` is checked when a campaign's message is about to go: one that comes sooner after another is cancelled with `frequency_capped`. Owners, admins and Full access keys only.
|
|
4576
|
+
*/
|
|
4577
|
+
put: {
|
|
4578
|
+
parameters: {
|
|
4579
|
+
query?: never;
|
|
4580
|
+
header?: never;
|
|
4581
|
+
path: {
|
|
4582
|
+
workspaceId: string;
|
|
4583
|
+
};
|
|
4584
|
+
cookie?: never;
|
|
4585
|
+
};
|
|
4586
|
+
requestBody: {
|
|
4587
|
+
content: {
|
|
4588
|
+
"application/json": components["schemas"]["CampaignSettings"];
|
|
4589
|
+
};
|
|
4590
|
+
};
|
|
4591
|
+
responses: {
|
|
4592
|
+
/** @description The settings for every campaign */
|
|
4593
|
+
200: {
|
|
4594
|
+
headers: {
|
|
4595
|
+
[name: string]: unknown;
|
|
4596
|
+
};
|
|
4597
|
+
content: {
|
|
4598
|
+
"application/json": components["schemas"]["CampaignSettingsView"];
|
|
4599
|
+
};
|
|
4600
|
+
};
|
|
4601
|
+
/** @description invalid_request: the request is not valid */
|
|
4602
|
+
400: {
|
|
4603
|
+
headers: {
|
|
4604
|
+
[name: string]: unknown;
|
|
4605
|
+
};
|
|
4606
|
+
content: {
|
|
4607
|
+
"application/json": components["schemas"]["Error"];
|
|
4608
|
+
};
|
|
4609
|
+
};
|
|
4610
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4611
|
+
401: {
|
|
4612
|
+
headers: {
|
|
4613
|
+
[name: string]: unknown;
|
|
4614
|
+
};
|
|
4615
|
+
content: {
|
|
4616
|
+
"application/json": components["schemas"]["Error"];
|
|
4617
|
+
};
|
|
4618
|
+
};
|
|
4619
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4620
|
+
402: {
|
|
4621
|
+
headers: {
|
|
4622
|
+
[name: string]: unknown;
|
|
4623
|
+
};
|
|
4624
|
+
content: {
|
|
4625
|
+
"application/json": components["schemas"]["Error"];
|
|
4626
|
+
};
|
|
4627
|
+
};
|
|
4628
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
4629
|
+
403: {
|
|
4630
|
+
headers: {
|
|
4631
|
+
[name: string]: unknown;
|
|
4632
|
+
};
|
|
4633
|
+
content: {
|
|
4634
|
+
"application/json": components["schemas"]["Error"];
|
|
4635
|
+
};
|
|
4636
|
+
};
|
|
4637
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4638
|
+
404: {
|
|
4639
|
+
headers: {
|
|
4640
|
+
[name: string]: unknown;
|
|
4641
|
+
};
|
|
4642
|
+
content: {
|
|
4643
|
+
"application/json": components["schemas"]["Error"];
|
|
4644
|
+
};
|
|
4645
|
+
};
|
|
4646
|
+
/** @description too_large: the body is over 64 KB */
|
|
4647
|
+
413: {
|
|
4648
|
+
headers: {
|
|
4649
|
+
[name: string]: unknown;
|
|
4650
|
+
};
|
|
4651
|
+
content: {
|
|
4652
|
+
"application/json": components["schemas"]["Error"];
|
|
4653
|
+
};
|
|
4654
|
+
};
|
|
4655
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4656
|
+
429: {
|
|
4657
|
+
headers: {
|
|
4658
|
+
[name: string]: unknown;
|
|
4659
|
+
};
|
|
4660
|
+
content: {
|
|
4661
|
+
"application/json": components["schemas"]["Error"];
|
|
4662
|
+
};
|
|
4663
|
+
};
|
|
4664
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4665
|
+
503: {
|
|
4666
|
+
headers: {
|
|
4667
|
+
[name: string]: unknown;
|
|
4668
|
+
};
|
|
4669
|
+
content: {
|
|
4670
|
+
"application/json": components["schemas"]["Error"];
|
|
4671
|
+
};
|
|
4672
|
+
};
|
|
4673
|
+
};
|
|
4674
|
+
};
|
|
4675
|
+
post?: never;
|
|
4676
|
+
delete?: never;
|
|
4677
|
+
options?: never;
|
|
4678
|
+
head?: never;
|
|
4679
|
+
patch?: never;
|
|
4680
|
+
trace?: never;
|
|
4681
|
+
};
|
|
4682
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{key}": {
|
|
4683
|
+
parameters: {
|
|
4684
|
+
query?: never;
|
|
4685
|
+
header?: never;
|
|
4686
|
+
path?: never;
|
|
4687
|
+
cookie?: never;
|
|
4688
|
+
};
|
|
4689
|
+
get?: never;
|
|
4690
|
+
/**
|
|
4691
|
+
* Create or replace the campaign with this key. Owners, admins and Full access keys only
|
|
4692
|
+
* @description The body is the whole definition, with this key or none. A new campaign is a draft. A save never changes the status, so a deploy never resumes a campaign that support paused. A live campaign keeps its changes for new messages only.
|
|
4693
|
+
*/
|
|
4694
|
+
put: {
|
|
4695
|
+
parameters: {
|
|
4696
|
+
query?: never;
|
|
4697
|
+
header?: never;
|
|
4698
|
+
path: {
|
|
4699
|
+
workspaceId: string;
|
|
4700
|
+
/** @description Lowercase letters, digits, - and _, unique in the workspace */
|
|
4701
|
+
key: string;
|
|
4702
|
+
};
|
|
4703
|
+
cookie?: never;
|
|
4704
|
+
};
|
|
4705
|
+
requestBody: {
|
|
4706
|
+
content: {
|
|
4707
|
+
"application/json": components["schemas"]["CampaignDefinition"];
|
|
4708
|
+
};
|
|
4709
|
+
};
|
|
4710
|
+
responses: {
|
|
4711
|
+
/** @description The campaign, replaced */
|
|
4712
|
+
200: {
|
|
4713
|
+
headers: {
|
|
4714
|
+
[name: string]: unknown;
|
|
4715
|
+
};
|
|
4716
|
+
content: {
|
|
4717
|
+
"application/json": {
|
|
4718
|
+
campaign: components["schemas"]["Campaign"];
|
|
4719
|
+
};
|
|
4720
|
+
};
|
|
4721
|
+
};
|
|
4722
|
+
/** @description The new campaign */
|
|
4723
|
+
201: {
|
|
4724
|
+
headers: {
|
|
4725
|
+
[name: string]: unknown;
|
|
4726
|
+
};
|
|
4727
|
+
content: {
|
|
4728
|
+
"application/json": {
|
|
4729
|
+
campaign: components["schemas"]["Campaign"];
|
|
4730
|
+
};
|
|
4731
|
+
};
|
|
4732
|
+
};
|
|
4733
|
+
/** @description invalid_request: the request is not valid */
|
|
4734
|
+
400: {
|
|
4735
|
+
headers: {
|
|
4736
|
+
[name: string]: unknown;
|
|
4737
|
+
};
|
|
4738
|
+
content: {
|
|
4739
|
+
"application/json": components["schemas"]["Error"];
|
|
4740
|
+
};
|
|
4741
|
+
};
|
|
4742
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4743
|
+
401: {
|
|
4744
|
+
headers: {
|
|
4745
|
+
[name: string]: unknown;
|
|
4746
|
+
};
|
|
4747
|
+
content: {
|
|
4748
|
+
"application/json": components["schemas"]["Error"];
|
|
4749
|
+
};
|
|
4750
|
+
};
|
|
4751
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4752
|
+
402: {
|
|
4753
|
+
headers: {
|
|
4754
|
+
[name: string]: unknown;
|
|
4755
|
+
};
|
|
4756
|
+
content: {
|
|
4757
|
+
"application/json": components["schemas"]["Error"];
|
|
4758
|
+
};
|
|
4759
|
+
};
|
|
4760
|
+
/** @description forbidden: this role or key may not. send_mode_required, send_as_member_required, send_email_required: this key may not stand behind the campaign's messages */
|
|
4761
|
+
403: {
|
|
4762
|
+
headers: {
|
|
4763
|
+
[name: string]: unknown;
|
|
4764
|
+
};
|
|
4765
|
+
content: {
|
|
4766
|
+
"application/json": components["schemas"]["Error"];
|
|
4767
|
+
};
|
|
4768
|
+
};
|
|
4769
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4770
|
+
404: {
|
|
4771
|
+
headers: {
|
|
4772
|
+
[name: string]: unknown;
|
|
4773
|
+
};
|
|
4774
|
+
content: {
|
|
4775
|
+
"application/json": components["schemas"]["Error"];
|
|
4776
|
+
};
|
|
4777
|
+
};
|
|
4778
|
+
/** @description campaign_key_taken: another campaign has this key. campaign_ended: an ended campaign does not change */
|
|
4779
|
+
409: {
|
|
4780
|
+
headers: {
|
|
4781
|
+
[name: string]: unknown;
|
|
4782
|
+
};
|
|
4783
|
+
content: {
|
|
4784
|
+
"application/json": components["schemas"]["Error"];
|
|
4785
|
+
};
|
|
4786
|
+
};
|
|
4787
|
+
/** @description too_large: the body is over 64 KB */
|
|
4788
|
+
413: {
|
|
4789
|
+
headers: {
|
|
4790
|
+
[name: string]: unknown;
|
|
4791
|
+
};
|
|
4792
|
+
content: {
|
|
4793
|
+
"application/json": components["schemas"]["Error"];
|
|
4794
|
+
};
|
|
4795
|
+
};
|
|
4796
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4797
|
+
429: {
|
|
4798
|
+
headers: {
|
|
4799
|
+
[name: string]: unknown;
|
|
4800
|
+
};
|
|
4801
|
+
content: {
|
|
4802
|
+
"application/json": components["schemas"]["Error"];
|
|
4803
|
+
};
|
|
4804
|
+
};
|
|
4805
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4806
|
+
503: {
|
|
4807
|
+
headers: {
|
|
4808
|
+
[name: string]: unknown;
|
|
4809
|
+
};
|
|
4810
|
+
content: {
|
|
4811
|
+
"application/json": components["schemas"]["Error"];
|
|
4812
|
+
};
|
|
4813
|
+
};
|
|
4814
|
+
};
|
|
4815
|
+
};
|
|
4816
|
+
post?: never;
|
|
4817
|
+
delete?: never;
|
|
4818
|
+
options?: never;
|
|
4819
|
+
head?: never;
|
|
4820
|
+
patch?: never;
|
|
4821
|
+
trace?: never;
|
|
4822
|
+
};
|
|
4823
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}": {
|
|
4824
|
+
parameters: {
|
|
4825
|
+
query?: never;
|
|
4826
|
+
header?: never;
|
|
4827
|
+
path?: never;
|
|
4828
|
+
cookie?: never;
|
|
4829
|
+
};
|
|
4830
|
+
/** Get one campaign */
|
|
4831
|
+
get: {
|
|
4832
|
+
parameters: {
|
|
4833
|
+
query?: never;
|
|
4834
|
+
header?: never;
|
|
4835
|
+
path: {
|
|
4836
|
+
workspaceId: string;
|
|
4837
|
+
/** @description The campaign's ID */
|
|
4838
|
+
ref: string;
|
|
4839
|
+
};
|
|
4840
|
+
cookie?: never;
|
|
4841
|
+
};
|
|
4842
|
+
requestBody?: never;
|
|
4843
|
+
responses: {
|
|
4844
|
+
/** @description The campaign */
|
|
4845
|
+
200: {
|
|
4846
|
+
headers: {
|
|
4847
|
+
[name: string]: unknown;
|
|
4848
|
+
};
|
|
4849
|
+
content: {
|
|
4850
|
+
"application/json": {
|
|
4851
|
+
campaign: components["schemas"]["Campaign"];
|
|
4852
|
+
};
|
|
4853
|
+
};
|
|
4854
|
+
};
|
|
4855
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4856
|
+
401: {
|
|
4857
|
+
headers: {
|
|
4858
|
+
[name: string]: unknown;
|
|
4859
|
+
};
|
|
4860
|
+
content: {
|
|
4861
|
+
"application/json": components["schemas"]["Error"];
|
|
4862
|
+
};
|
|
4863
|
+
};
|
|
4864
|
+
/** @description payment_required: the workspace waits for payment */
|
|
4865
|
+
402: {
|
|
4866
|
+
headers: {
|
|
4867
|
+
[name: string]: unknown;
|
|
4868
|
+
};
|
|
4869
|
+
content: {
|
|
4870
|
+
"application/json": components["schemas"]["Error"];
|
|
4871
|
+
};
|
|
4872
|
+
};
|
|
4873
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4874
|
+
404: {
|
|
4875
|
+
headers: {
|
|
4876
|
+
[name: string]: unknown;
|
|
4877
|
+
};
|
|
4878
|
+
content: {
|
|
4879
|
+
"application/json": components["schemas"]["Error"];
|
|
4880
|
+
};
|
|
4881
|
+
};
|
|
4882
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4883
|
+
429: {
|
|
4884
|
+
headers: {
|
|
4885
|
+
[name: string]: unknown;
|
|
4886
|
+
};
|
|
4887
|
+
content: {
|
|
4888
|
+
"application/json": components["schemas"]["Error"];
|
|
4889
|
+
};
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
};
|
|
4893
|
+
put?: never;
|
|
4894
|
+
post?: never;
|
|
4895
|
+
/**
|
|
4896
|
+
* Delete a campaign that never sent a message, such as a draft. Owners, admins and Full access keys only
|
|
4897
|
+
* @description Test messages do not count. A campaign that sent keeps its results, so it can only end.
|
|
4898
|
+
*/
|
|
4899
|
+
delete: {
|
|
4900
|
+
parameters: {
|
|
4901
|
+
query?: never;
|
|
4902
|
+
header?: never;
|
|
4903
|
+
path: {
|
|
4904
|
+
workspaceId: string;
|
|
4905
|
+
/** @description The campaign's ID */
|
|
4906
|
+
ref: string;
|
|
4907
|
+
};
|
|
4908
|
+
cookie?: never;
|
|
4909
|
+
};
|
|
4910
|
+
requestBody?: never;
|
|
4911
|
+
responses: {
|
|
4912
|
+
/** @description Deleted */
|
|
4913
|
+
200: {
|
|
4914
|
+
headers: {
|
|
4915
|
+
[name: string]: unknown;
|
|
4916
|
+
};
|
|
4917
|
+
content: {
|
|
4918
|
+
"application/json": {
|
|
4919
|
+
/** @enum {boolean} */
|
|
4920
|
+
ok: true;
|
|
4921
|
+
};
|
|
4922
|
+
};
|
|
4923
|
+
};
|
|
4924
|
+
/** @description invalid_request: the request is not valid */
|
|
4925
|
+
400: {
|
|
4926
|
+
headers: {
|
|
4927
|
+
[name: string]: unknown;
|
|
4928
|
+
};
|
|
4929
|
+
content: {
|
|
4930
|
+
"application/json": components["schemas"]["Error"];
|
|
4931
|
+
};
|
|
4932
|
+
};
|
|
4933
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
4934
|
+
401: {
|
|
4935
|
+
headers: {
|
|
4936
|
+
[name: string]: unknown;
|
|
4937
|
+
};
|
|
4938
|
+
content: {
|
|
4939
|
+
"application/json": components["schemas"]["Error"];
|
|
4940
|
+
};
|
|
4941
|
+
};
|
|
4942
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
4943
|
+
402: {
|
|
4944
|
+
headers: {
|
|
4945
|
+
[name: string]: unknown;
|
|
4946
|
+
};
|
|
4947
|
+
content: {
|
|
4948
|
+
"application/json": components["schemas"]["Error"];
|
|
4949
|
+
};
|
|
4950
|
+
};
|
|
4951
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
4952
|
+
403: {
|
|
4953
|
+
headers: {
|
|
4954
|
+
[name: string]: unknown;
|
|
4955
|
+
};
|
|
4956
|
+
content: {
|
|
4957
|
+
"application/json": components["schemas"]["Error"];
|
|
4958
|
+
};
|
|
4959
|
+
};
|
|
4960
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
4961
|
+
404: {
|
|
4962
|
+
headers: {
|
|
4963
|
+
[name: string]: unknown;
|
|
4964
|
+
};
|
|
4965
|
+
content: {
|
|
4966
|
+
"application/json": components["schemas"]["Error"];
|
|
4967
|
+
};
|
|
4968
|
+
};
|
|
4969
|
+
/** @description campaign_live: pause or end the campaign first. campaign_sent: the campaign sent messages */
|
|
4970
|
+
409: {
|
|
4971
|
+
headers: {
|
|
4972
|
+
[name: string]: unknown;
|
|
4973
|
+
};
|
|
4974
|
+
content: {
|
|
4975
|
+
"application/json": components["schemas"]["Error"];
|
|
4976
|
+
};
|
|
4977
|
+
};
|
|
4978
|
+
/** @description too_large: the body is over 64 KB */
|
|
4979
|
+
413: {
|
|
4980
|
+
headers: {
|
|
4981
|
+
[name: string]: unknown;
|
|
4982
|
+
};
|
|
4983
|
+
content: {
|
|
4984
|
+
"application/json": components["schemas"]["Error"];
|
|
4985
|
+
};
|
|
4986
|
+
};
|
|
4987
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
4988
|
+
429: {
|
|
4989
|
+
headers: {
|
|
4990
|
+
[name: string]: unknown;
|
|
4991
|
+
};
|
|
4992
|
+
content: {
|
|
4993
|
+
"application/json": components["schemas"]["Error"];
|
|
4994
|
+
};
|
|
4995
|
+
};
|
|
4996
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
4997
|
+
503: {
|
|
4998
|
+
headers: {
|
|
4999
|
+
[name: string]: unknown;
|
|
5000
|
+
};
|
|
5001
|
+
content: {
|
|
5002
|
+
"application/json": components["schemas"]["Error"];
|
|
5003
|
+
};
|
|
5004
|
+
};
|
|
5005
|
+
};
|
|
5006
|
+
};
|
|
5007
|
+
options?: never;
|
|
5008
|
+
head?: never;
|
|
5009
|
+
/**
|
|
5010
|
+
* Change parts of a campaign. Owners, admins and Full access keys only
|
|
5011
|
+
* @description Each part the body gives, such as `message` or `rules`, replaces that part whole, and the whole definition is checked again.
|
|
5012
|
+
*/
|
|
5013
|
+
patch: {
|
|
5014
|
+
parameters: {
|
|
5015
|
+
query?: never;
|
|
5016
|
+
header?: never;
|
|
5017
|
+
path: {
|
|
5018
|
+
workspaceId: string;
|
|
5019
|
+
/** @description The campaign's ID */
|
|
5020
|
+
ref: string;
|
|
5021
|
+
};
|
|
5022
|
+
cookie?: never;
|
|
5023
|
+
};
|
|
5024
|
+
requestBody: {
|
|
5025
|
+
content: {
|
|
5026
|
+
"application/json": components["schemas"]["CampaignPatch"];
|
|
5027
|
+
};
|
|
5028
|
+
};
|
|
5029
|
+
responses: {
|
|
5030
|
+
/** @description The campaign after the change */
|
|
5031
|
+
200: {
|
|
5032
|
+
headers: {
|
|
5033
|
+
[name: string]: unknown;
|
|
5034
|
+
};
|
|
5035
|
+
content: {
|
|
5036
|
+
"application/json": {
|
|
5037
|
+
campaign: components["schemas"]["Campaign"];
|
|
5038
|
+
};
|
|
5039
|
+
};
|
|
5040
|
+
};
|
|
5041
|
+
/** @description invalid_request: the request is not valid */
|
|
5042
|
+
400: {
|
|
5043
|
+
headers: {
|
|
5044
|
+
[name: string]: unknown;
|
|
5045
|
+
};
|
|
5046
|
+
content: {
|
|
5047
|
+
"application/json": components["schemas"]["Error"];
|
|
5048
|
+
};
|
|
5049
|
+
};
|
|
5050
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5051
|
+
401: {
|
|
5052
|
+
headers: {
|
|
5053
|
+
[name: string]: unknown;
|
|
5054
|
+
};
|
|
5055
|
+
content: {
|
|
5056
|
+
"application/json": components["schemas"]["Error"];
|
|
5057
|
+
};
|
|
5058
|
+
};
|
|
5059
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5060
|
+
402: {
|
|
5061
|
+
headers: {
|
|
5062
|
+
[name: string]: unknown;
|
|
5063
|
+
};
|
|
5064
|
+
content: {
|
|
5065
|
+
"application/json": components["schemas"]["Error"];
|
|
5066
|
+
};
|
|
5067
|
+
};
|
|
5068
|
+
/** @description forbidden: this role or key may not. send_mode_required, send_as_member_required, send_email_required: this key may not stand behind the campaign's messages */
|
|
5069
|
+
403: {
|
|
5070
|
+
headers: {
|
|
5071
|
+
[name: string]: unknown;
|
|
5072
|
+
};
|
|
5073
|
+
content: {
|
|
5074
|
+
"application/json": components["schemas"]["Error"];
|
|
5075
|
+
};
|
|
5076
|
+
};
|
|
5077
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5078
|
+
404: {
|
|
5079
|
+
headers: {
|
|
5080
|
+
[name: string]: unknown;
|
|
5081
|
+
};
|
|
5082
|
+
content: {
|
|
5083
|
+
"application/json": components["schemas"]["Error"];
|
|
5084
|
+
};
|
|
5085
|
+
};
|
|
5086
|
+
/** @description campaign_key_taken: another campaign has this key. campaign_ended: an ended campaign does not change */
|
|
5087
|
+
409: {
|
|
5088
|
+
headers: {
|
|
5089
|
+
[name: string]: unknown;
|
|
5090
|
+
};
|
|
5091
|
+
content: {
|
|
5092
|
+
"application/json": components["schemas"]["Error"];
|
|
5093
|
+
};
|
|
5094
|
+
};
|
|
5095
|
+
/** @description too_large: the body is over 64 KB */
|
|
5096
|
+
413: {
|
|
5097
|
+
headers: {
|
|
5098
|
+
[name: string]: unknown;
|
|
5099
|
+
};
|
|
5100
|
+
content: {
|
|
5101
|
+
"application/json": components["schemas"]["Error"];
|
|
5102
|
+
};
|
|
5103
|
+
};
|
|
5104
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5105
|
+
429: {
|
|
5106
|
+
headers: {
|
|
5107
|
+
[name: string]: unknown;
|
|
5108
|
+
};
|
|
5109
|
+
content: {
|
|
5110
|
+
"application/json": components["schemas"]["Error"];
|
|
5111
|
+
};
|
|
5112
|
+
};
|
|
5113
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5114
|
+
503: {
|
|
5115
|
+
headers: {
|
|
5116
|
+
[name: string]: unknown;
|
|
5117
|
+
};
|
|
5118
|
+
content: {
|
|
5119
|
+
"application/json": components["schemas"]["Error"];
|
|
5120
|
+
};
|
|
5121
|
+
};
|
|
5122
|
+
};
|
|
5123
|
+
};
|
|
5124
|
+
trace?: never;
|
|
5125
|
+
};
|
|
5126
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}": {
|
|
5127
|
+
parameters: {
|
|
5128
|
+
query?: never;
|
|
5129
|
+
header?: never;
|
|
5130
|
+
path?: never;
|
|
5131
|
+
cookie?: never;
|
|
5132
|
+
};
|
|
5133
|
+
/** Get one campaign */
|
|
5134
|
+
get: {
|
|
5135
|
+
parameters: {
|
|
5136
|
+
query?: never;
|
|
5137
|
+
header?: never;
|
|
5138
|
+
path: {
|
|
5139
|
+
workspaceId: string;
|
|
5140
|
+
/** @description The campaign's key */
|
|
5141
|
+
ref: string;
|
|
5142
|
+
};
|
|
5143
|
+
cookie?: never;
|
|
5144
|
+
};
|
|
5145
|
+
requestBody?: never;
|
|
5146
|
+
responses: {
|
|
5147
|
+
/** @description The campaign */
|
|
5148
|
+
200: {
|
|
5149
|
+
headers: {
|
|
5150
|
+
[name: string]: unknown;
|
|
5151
|
+
};
|
|
5152
|
+
content: {
|
|
5153
|
+
"application/json": {
|
|
5154
|
+
campaign: components["schemas"]["Campaign"];
|
|
5155
|
+
};
|
|
5156
|
+
};
|
|
5157
|
+
};
|
|
5158
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5159
|
+
401: {
|
|
5160
|
+
headers: {
|
|
5161
|
+
[name: string]: unknown;
|
|
5162
|
+
};
|
|
5163
|
+
content: {
|
|
5164
|
+
"application/json": components["schemas"]["Error"];
|
|
5165
|
+
};
|
|
5166
|
+
};
|
|
5167
|
+
/** @description payment_required: the workspace waits for payment */
|
|
5168
|
+
402: {
|
|
5169
|
+
headers: {
|
|
5170
|
+
[name: string]: unknown;
|
|
5171
|
+
};
|
|
5172
|
+
content: {
|
|
5173
|
+
"application/json": components["schemas"]["Error"];
|
|
5174
|
+
};
|
|
5175
|
+
};
|
|
5176
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5177
|
+
404: {
|
|
5178
|
+
headers: {
|
|
5179
|
+
[name: string]: unknown;
|
|
5180
|
+
};
|
|
5181
|
+
content: {
|
|
5182
|
+
"application/json": components["schemas"]["Error"];
|
|
5183
|
+
};
|
|
5184
|
+
};
|
|
5185
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5186
|
+
429: {
|
|
5187
|
+
headers: {
|
|
5188
|
+
[name: string]: unknown;
|
|
5189
|
+
};
|
|
5190
|
+
content: {
|
|
5191
|
+
"application/json": components["schemas"]["Error"];
|
|
5192
|
+
};
|
|
5193
|
+
};
|
|
5194
|
+
};
|
|
5195
|
+
};
|
|
5196
|
+
put?: never;
|
|
5197
|
+
post?: never;
|
|
5198
|
+
/**
|
|
5199
|
+
* Delete a campaign that never sent a message, such as a draft. Owners, admins and Full access keys only
|
|
5200
|
+
* @description Test messages do not count. A campaign that sent keeps its results, so it can only end.
|
|
5201
|
+
*/
|
|
5202
|
+
delete: {
|
|
5203
|
+
parameters: {
|
|
5204
|
+
query?: never;
|
|
5205
|
+
header?: never;
|
|
5206
|
+
path: {
|
|
5207
|
+
workspaceId: string;
|
|
5208
|
+
/** @description The campaign's key */
|
|
5209
|
+
ref: string;
|
|
5210
|
+
};
|
|
5211
|
+
cookie?: never;
|
|
5212
|
+
};
|
|
5213
|
+
requestBody?: never;
|
|
5214
|
+
responses: {
|
|
5215
|
+
/** @description Deleted */
|
|
5216
|
+
200: {
|
|
5217
|
+
headers: {
|
|
5218
|
+
[name: string]: unknown;
|
|
5219
|
+
};
|
|
5220
|
+
content: {
|
|
5221
|
+
"application/json": {
|
|
5222
|
+
/** @enum {boolean} */
|
|
5223
|
+
ok: true;
|
|
5224
|
+
};
|
|
5225
|
+
};
|
|
5226
|
+
};
|
|
5227
|
+
/** @description invalid_request: the request is not valid */
|
|
5228
|
+
400: {
|
|
5229
|
+
headers: {
|
|
5230
|
+
[name: string]: unknown;
|
|
5231
|
+
};
|
|
5232
|
+
content: {
|
|
5233
|
+
"application/json": components["schemas"]["Error"];
|
|
5234
|
+
};
|
|
5235
|
+
};
|
|
5236
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5237
|
+
401: {
|
|
5238
|
+
headers: {
|
|
5239
|
+
[name: string]: unknown;
|
|
5240
|
+
};
|
|
5241
|
+
content: {
|
|
5242
|
+
"application/json": components["schemas"]["Error"];
|
|
5243
|
+
};
|
|
5244
|
+
};
|
|
5245
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5246
|
+
402: {
|
|
5247
|
+
headers: {
|
|
5248
|
+
[name: string]: unknown;
|
|
5249
|
+
};
|
|
5250
|
+
content: {
|
|
5251
|
+
"application/json": components["schemas"]["Error"];
|
|
5252
|
+
};
|
|
5253
|
+
};
|
|
5254
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5255
|
+
403: {
|
|
5256
|
+
headers: {
|
|
5257
|
+
[name: string]: unknown;
|
|
5258
|
+
};
|
|
5259
|
+
content: {
|
|
5260
|
+
"application/json": components["schemas"]["Error"];
|
|
5261
|
+
};
|
|
5262
|
+
};
|
|
5263
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5264
|
+
404: {
|
|
5265
|
+
headers: {
|
|
5266
|
+
[name: string]: unknown;
|
|
5267
|
+
};
|
|
5268
|
+
content: {
|
|
5269
|
+
"application/json": components["schemas"]["Error"];
|
|
5270
|
+
};
|
|
5271
|
+
};
|
|
5272
|
+
/** @description campaign_live: pause or end the campaign first. campaign_sent: the campaign sent messages */
|
|
5273
|
+
409: {
|
|
5274
|
+
headers: {
|
|
5275
|
+
[name: string]: unknown;
|
|
5276
|
+
};
|
|
5277
|
+
content: {
|
|
5278
|
+
"application/json": components["schemas"]["Error"];
|
|
5279
|
+
};
|
|
5280
|
+
};
|
|
5281
|
+
/** @description too_large: the body is over 64 KB */
|
|
5282
|
+
413: {
|
|
5283
|
+
headers: {
|
|
5284
|
+
[name: string]: unknown;
|
|
5285
|
+
};
|
|
5286
|
+
content: {
|
|
5287
|
+
"application/json": components["schemas"]["Error"];
|
|
5288
|
+
};
|
|
5289
|
+
};
|
|
5290
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5291
|
+
429: {
|
|
5292
|
+
headers: {
|
|
5293
|
+
[name: string]: unknown;
|
|
5294
|
+
};
|
|
5295
|
+
content: {
|
|
5296
|
+
"application/json": components["schemas"]["Error"];
|
|
5297
|
+
};
|
|
5298
|
+
};
|
|
5299
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5300
|
+
503: {
|
|
5301
|
+
headers: {
|
|
5302
|
+
[name: string]: unknown;
|
|
5303
|
+
};
|
|
5304
|
+
content: {
|
|
5305
|
+
"application/json": components["schemas"]["Error"];
|
|
5306
|
+
};
|
|
5307
|
+
};
|
|
5308
|
+
};
|
|
5309
|
+
};
|
|
5310
|
+
options?: never;
|
|
5311
|
+
head?: never;
|
|
5312
|
+
/**
|
|
5313
|
+
* Change parts of a campaign. Owners, admins and Full access keys only
|
|
5314
|
+
* @description Each part the body gives, such as `message` or `rules`, replaces that part whole, and the whole definition is checked again.
|
|
5315
|
+
*/
|
|
5316
|
+
patch: {
|
|
5317
|
+
parameters: {
|
|
5318
|
+
query?: never;
|
|
5319
|
+
header?: never;
|
|
5320
|
+
path: {
|
|
5321
|
+
workspaceId: string;
|
|
5322
|
+
/** @description The campaign's key */
|
|
5323
|
+
ref: string;
|
|
5324
|
+
};
|
|
5325
|
+
cookie?: never;
|
|
5326
|
+
};
|
|
5327
|
+
requestBody: {
|
|
5328
|
+
content: {
|
|
5329
|
+
"application/json": components["schemas"]["CampaignPatch"];
|
|
5330
|
+
};
|
|
5331
|
+
};
|
|
5332
|
+
responses: {
|
|
5333
|
+
/** @description The campaign after the change */
|
|
5334
|
+
200: {
|
|
5335
|
+
headers: {
|
|
5336
|
+
[name: string]: unknown;
|
|
5337
|
+
};
|
|
5338
|
+
content: {
|
|
5339
|
+
"application/json": {
|
|
5340
|
+
campaign: components["schemas"]["Campaign"];
|
|
5341
|
+
};
|
|
5342
|
+
};
|
|
5343
|
+
};
|
|
5344
|
+
/** @description invalid_request: the request is not valid */
|
|
5345
|
+
400: {
|
|
5346
|
+
headers: {
|
|
5347
|
+
[name: string]: unknown;
|
|
5348
|
+
};
|
|
5349
|
+
content: {
|
|
5350
|
+
"application/json": components["schemas"]["Error"];
|
|
5351
|
+
};
|
|
5352
|
+
};
|
|
5353
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5354
|
+
401: {
|
|
5355
|
+
headers: {
|
|
5356
|
+
[name: string]: unknown;
|
|
5357
|
+
};
|
|
5358
|
+
content: {
|
|
5359
|
+
"application/json": components["schemas"]["Error"];
|
|
5360
|
+
};
|
|
5361
|
+
};
|
|
5362
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5363
|
+
402: {
|
|
5364
|
+
headers: {
|
|
5365
|
+
[name: string]: unknown;
|
|
5366
|
+
};
|
|
5367
|
+
content: {
|
|
5368
|
+
"application/json": components["schemas"]["Error"];
|
|
5369
|
+
};
|
|
5370
|
+
};
|
|
5371
|
+
/** @description forbidden: this role or key may not. send_mode_required, send_as_member_required, send_email_required: this key may not stand behind the campaign's messages */
|
|
5372
|
+
403: {
|
|
5373
|
+
headers: {
|
|
5374
|
+
[name: string]: unknown;
|
|
5375
|
+
};
|
|
5376
|
+
content: {
|
|
5377
|
+
"application/json": components["schemas"]["Error"];
|
|
5378
|
+
};
|
|
5379
|
+
};
|
|
5380
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5381
|
+
404: {
|
|
5382
|
+
headers: {
|
|
5383
|
+
[name: string]: unknown;
|
|
5384
|
+
};
|
|
5385
|
+
content: {
|
|
5386
|
+
"application/json": components["schemas"]["Error"];
|
|
5387
|
+
};
|
|
5388
|
+
};
|
|
5389
|
+
/** @description campaign_key_taken: another campaign has this key. campaign_ended: an ended campaign does not change */
|
|
5390
|
+
409: {
|
|
5391
|
+
headers: {
|
|
5392
|
+
[name: string]: unknown;
|
|
5393
|
+
};
|
|
5394
|
+
content: {
|
|
5395
|
+
"application/json": components["schemas"]["Error"];
|
|
5396
|
+
};
|
|
5397
|
+
};
|
|
5398
|
+
/** @description too_large: the body is over 64 KB */
|
|
5399
|
+
413: {
|
|
5400
|
+
headers: {
|
|
5401
|
+
[name: string]: unknown;
|
|
5402
|
+
};
|
|
5403
|
+
content: {
|
|
5404
|
+
"application/json": components["schemas"]["Error"];
|
|
5405
|
+
};
|
|
5406
|
+
};
|
|
5407
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5408
|
+
429: {
|
|
5409
|
+
headers: {
|
|
5410
|
+
[name: string]: unknown;
|
|
5411
|
+
};
|
|
5412
|
+
content: {
|
|
5413
|
+
"application/json": components["schemas"]["Error"];
|
|
5414
|
+
};
|
|
5415
|
+
};
|
|
5416
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5417
|
+
503: {
|
|
5418
|
+
headers: {
|
|
5419
|
+
[name: string]: unknown;
|
|
5420
|
+
};
|
|
5421
|
+
content: {
|
|
5422
|
+
"application/json": components["schemas"]["Error"];
|
|
5423
|
+
};
|
|
5424
|
+
};
|
|
5425
|
+
};
|
|
5426
|
+
};
|
|
5427
|
+
trace?: never;
|
|
5428
|
+
};
|
|
5429
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}/pause": {
|
|
5430
|
+
parameters: {
|
|
5431
|
+
query?: never;
|
|
5432
|
+
header?: never;
|
|
5433
|
+
path?: never;
|
|
5434
|
+
cookie?: never;
|
|
5435
|
+
};
|
|
5436
|
+
get?: never;
|
|
5437
|
+
put?: never;
|
|
5438
|
+
/** Pause a live campaign: its waiting messages wait, and it makes no new ones. Owners, admins and Full access keys only */
|
|
5439
|
+
post: {
|
|
5440
|
+
parameters: {
|
|
5441
|
+
query?: never;
|
|
5442
|
+
header?: never;
|
|
5443
|
+
path: {
|
|
5444
|
+
workspaceId: string;
|
|
5445
|
+
/** @description The campaign's ID */
|
|
5446
|
+
ref: string;
|
|
5447
|
+
};
|
|
5448
|
+
cookie?: never;
|
|
5449
|
+
};
|
|
5450
|
+
requestBody?: never;
|
|
5451
|
+
responses: {
|
|
5452
|
+
/** @description The campaign as it is now */
|
|
5453
|
+
200: {
|
|
5454
|
+
headers: {
|
|
5455
|
+
[name: string]: unknown;
|
|
5456
|
+
};
|
|
5457
|
+
content: {
|
|
5458
|
+
"application/json": {
|
|
5459
|
+
campaign: components["schemas"]["Campaign"];
|
|
5460
|
+
};
|
|
5461
|
+
};
|
|
5462
|
+
};
|
|
5463
|
+
/** @description invalid_request: the request is not valid */
|
|
5464
|
+
400: {
|
|
5465
|
+
headers: {
|
|
5466
|
+
[name: string]: unknown;
|
|
5467
|
+
};
|
|
5468
|
+
content: {
|
|
5469
|
+
"application/json": components["schemas"]["Error"];
|
|
5470
|
+
};
|
|
5471
|
+
};
|
|
5472
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5473
|
+
401: {
|
|
5474
|
+
headers: {
|
|
5475
|
+
[name: string]: unknown;
|
|
5476
|
+
};
|
|
5477
|
+
content: {
|
|
5478
|
+
"application/json": components["schemas"]["Error"];
|
|
5479
|
+
};
|
|
5480
|
+
};
|
|
5481
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5482
|
+
402: {
|
|
5483
|
+
headers: {
|
|
5484
|
+
[name: string]: unknown;
|
|
5485
|
+
};
|
|
5486
|
+
content: {
|
|
5487
|
+
"application/json": components["schemas"]["Error"];
|
|
5488
|
+
};
|
|
5489
|
+
};
|
|
5490
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5491
|
+
403: {
|
|
5492
|
+
headers: {
|
|
5493
|
+
[name: string]: unknown;
|
|
5494
|
+
};
|
|
5495
|
+
content: {
|
|
5496
|
+
"application/json": components["schemas"]["Error"];
|
|
5497
|
+
};
|
|
5498
|
+
};
|
|
5499
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5500
|
+
404: {
|
|
5501
|
+
headers: {
|
|
5502
|
+
[name: string]: unknown;
|
|
5503
|
+
};
|
|
5504
|
+
content: {
|
|
5505
|
+
"application/json": components["schemas"]["Error"];
|
|
5506
|
+
};
|
|
5507
|
+
};
|
|
5508
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
5509
|
+
409: {
|
|
5510
|
+
headers: {
|
|
5511
|
+
[name: string]: unknown;
|
|
5512
|
+
};
|
|
5513
|
+
content: {
|
|
5514
|
+
"application/json": components["schemas"]["Error"];
|
|
5515
|
+
};
|
|
5516
|
+
};
|
|
5517
|
+
/** @description too_large: the body is over 64 KB */
|
|
5518
|
+
413: {
|
|
5519
|
+
headers: {
|
|
5520
|
+
[name: string]: unknown;
|
|
5521
|
+
};
|
|
5522
|
+
content: {
|
|
5523
|
+
"application/json": components["schemas"]["Error"];
|
|
5524
|
+
};
|
|
5525
|
+
};
|
|
5526
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5527
|
+
429: {
|
|
5528
|
+
headers: {
|
|
5529
|
+
[name: string]: unknown;
|
|
5530
|
+
};
|
|
5531
|
+
content: {
|
|
5532
|
+
"application/json": components["schemas"]["Error"];
|
|
5533
|
+
};
|
|
5534
|
+
};
|
|
5535
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5536
|
+
503: {
|
|
5537
|
+
headers: {
|
|
5538
|
+
[name: string]: unknown;
|
|
5539
|
+
};
|
|
5540
|
+
content: {
|
|
5541
|
+
"application/json": components["schemas"]["Error"];
|
|
5542
|
+
};
|
|
5543
|
+
};
|
|
5544
|
+
};
|
|
5545
|
+
};
|
|
5546
|
+
delete?: never;
|
|
5547
|
+
options?: never;
|
|
5548
|
+
head?: never;
|
|
5549
|
+
patch?: never;
|
|
5550
|
+
trace?: never;
|
|
5551
|
+
};
|
|
5552
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}/pause": {
|
|
5553
|
+
parameters: {
|
|
5554
|
+
query?: never;
|
|
5555
|
+
header?: never;
|
|
5556
|
+
path?: never;
|
|
5557
|
+
cookie?: never;
|
|
5558
|
+
};
|
|
5559
|
+
get?: never;
|
|
5560
|
+
put?: never;
|
|
5561
|
+
/** Pause a live campaign: its waiting messages wait, and it makes no new ones. Owners, admins and Full access keys only */
|
|
5562
|
+
post: {
|
|
5563
|
+
parameters: {
|
|
5564
|
+
query?: never;
|
|
5565
|
+
header?: never;
|
|
5566
|
+
path: {
|
|
5567
|
+
workspaceId: string;
|
|
5568
|
+
/** @description The campaign's key */
|
|
5569
|
+
ref: string;
|
|
5570
|
+
};
|
|
5571
|
+
cookie?: never;
|
|
5572
|
+
};
|
|
5573
|
+
requestBody?: never;
|
|
5574
|
+
responses: {
|
|
5575
|
+
/** @description The campaign as it is now */
|
|
5576
|
+
200: {
|
|
5577
|
+
headers: {
|
|
5578
|
+
[name: string]: unknown;
|
|
5579
|
+
};
|
|
5580
|
+
content: {
|
|
5581
|
+
"application/json": {
|
|
5582
|
+
campaign: components["schemas"]["Campaign"];
|
|
5583
|
+
};
|
|
5584
|
+
};
|
|
5585
|
+
};
|
|
5586
|
+
/** @description invalid_request: the request is not valid */
|
|
5587
|
+
400: {
|
|
5588
|
+
headers: {
|
|
5589
|
+
[name: string]: unknown;
|
|
5590
|
+
};
|
|
5591
|
+
content: {
|
|
5592
|
+
"application/json": components["schemas"]["Error"];
|
|
5593
|
+
};
|
|
5594
|
+
};
|
|
5595
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5596
|
+
401: {
|
|
5597
|
+
headers: {
|
|
5598
|
+
[name: string]: unknown;
|
|
5599
|
+
};
|
|
5600
|
+
content: {
|
|
5601
|
+
"application/json": components["schemas"]["Error"];
|
|
5602
|
+
};
|
|
5603
|
+
};
|
|
5604
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5605
|
+
402: {
|
|
5606
|
+
headers: {
|
|
5607
|
+
[name: string]: unknown;
|
|
5608
|
+
};
|
|
5609
|
+
content: {
|
|
5610
|
+
"application/json": components["schemas"]["Error"];
|
|
5611
|
+
};
|
|
5612
|
+
};
|
|
5613
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5614
|
+
403: {
|
|
5615
|
+
headers: {
|
|
5616
|
+
[name: string]: unknown;
|
|
5617
|
+
};
|
|
5618
|
+
content: {
|
|
5619
|
+
"application/json": components["schemas"]["Error"];
|
|
5620
|
+
};
|
|
5621
|
+
};
|
|
5622
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5623
|
+
404: {
|
|
5624
|
+
headers: {
|
|
5625
|
+
[name: string]: unknown;
|
|
5626
|
+
};
|
|
5627
|
+
content: {
|
|
5628
|
+
"application/json": components["schemas"]["Error"];
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
5632
|
+
409: {
|
|
5633
|
+
headers: {
|
|
5634
|
+
[name: string]: unknown;
|
|
5635
|
+
};
|
|
5636
|
+
content: {
|
|
5637
|
+
"application/json": components["schemas"]["Error"];
|
|
5638
|
+
};
|
|
5639
|
+
};
|
|
5640
|
+
/** @description too_large: the body is over 64 KB */
|
|
5641
|
+
413: {
|
|
5642
|
+
headers: {
|
|
5643
|
+
[name: string]: unknown;
|
|
5644
|
+
};
|
|
5645
|
+
content: {
|
|
5646
|
+
"application/json": components["schemas"]["Error"];
|
|
5647
|
+
};
|
|
5648
|
+
};
|
|
5649
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5650
|
+
429: {
|
|
5651
|
+
headers: {
|
|
5652
|
+
[name: string]: unknown;
|
|
5653
|
+
};
|
|
5654
|
+
content: {
|
|
5655
|
+
"application/json": components["schemas"]["Error"];
|
|
5656
|
+
};
|
|
5657
|
+
};
|
|
5658
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5659
|
+
503: {
|
|
5660
|
+
headers: {
|
|
5661
|
+
[name: string]: unknown;
|
|
5662
|
+
};
|
|
5663
|
+
content: {
|
|
5664
|
+
"application/json": components["schemas"]["Error"];
|
|
5665
|
+
};
|
|
5666
|
+
};
|
|
5667
|
+
};
|
|
5668
|
+
};
|
|
5669
|
+
delete?: never;
|
|
5670
|
+
options?: never;
|
|
5671
|
+
head?: never;
|
|
5672
|
+
patch?: never;
|
|
5673
|
+
trace?: never;
|
|
5674
|
+
};
|
|
5675
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}/resume": {
|
|
5676
|
+
parameters: {
|
|
5677
|
+
query?: never;
|
|
5678
|
+
header?: never;
|
|
5679
|
+
path?: never;
|
|
5680
|
+
cookie?: never;
|
|
5681
|
+
};
|
|
5682
|
+
get?: never;
|
|
5683
|
+
put?: never;
|
|
5684
|
+
/** Start a draft, or resume a paused campaign. Owners, admins and Full access keys only */
|
|
5685
|
+
post: {
|
|
5686
|
+
parameters: {
|
|
5687
|
+
query?: never;
|
|
5688
|
+
header?: never;
|
|
5689
|
+
path: {
|
|
5690
|
+
workspaceId: string;
|
|
5691
|
+
/** @description The campaign's ID */
|
|
5692
|
+
ref: string;
|
|
5693
|
+
};
|
|
5694
|
+
cookie?: never;
|
|
5695
|
+
};
|
|
5696
|
+
requestBody?: never;
|
|
5697
|
+
responses: {
|
|
5698
|
+
/** @description The campaign as it is now */
|
|
5699
|
+
200: {
|
|
5700
|
+
headers: {
|
|
5701
|
+
[name: string]: unknown;
|
|
5702
|
+
};
|
|
5703
|
+
content: {
|
|
5704
|
+
"application/json": {
|
|
5705
|
+
campaign: components["schemas"]["Campaign"];
|
|
5706
|
+
};
|
|
5707
|
+
};
|
|
5708
|
+
};
|
|
5709
|
+
/** @description invalid_request: the request is not valid */
|
|
5710
|
+
400: {
|
|
5711
|
+
headers: {
|
|
5712
|
+
[name: string]: unknown;
|
|
5713
|
+
};
|
|
5714
|
+
content: {
|
|
5715
|
+
"application/json": components["schemas"]["Error"];
|
|
5716
|
+
};
|
|
5717
|
+
};
|
|
5718
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5719
|
+
401: {
|
|
5720
|
+
headers: {
|
|
5721
|
+
[name: string]: unknown;
|
|
5722
|
+
};
|
|
5723
|
+
content: {
|
|
5724
|
+
"application/json": components["schemas"]["Error"];
|
|
5725
|
+
};
|
|
5726
|
+
};
|
|
5727
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5728
|
+
402: {
|
|
5729
|
+
headers: {
|
|
5730
|
+
[name: string]: unknown;
|
|
5731
|
+
};
|
|
5732
|
+
content: {
|
|
5733
|
+
"application/json": components["schemas"]["Error"];
|
|
5734
|
+
};
|
|
5735
|
+
};
|
|
5736
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5737
|
+
403: {
|
|
5738
|
+
headers: {
|
|
5739
|
+
[name: string]: unknown;
|
|
5740
|
+
};
|
|
5741
|
+
content: {
|
|
5742
|
+
"application/json": components["schemas"]["Error"];
|
|
5743
|
+
};
|
|
5744
|
+
};
|
|
5745
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5746
|
+
404: {
|
|
5747
|
+
headers: {
|
|
5748
|
+
[name: string]: unknown;
|
|
5749
|
+
};
|
|
5750
|
+
content: {
|
|
5751
|
+
"application/json": components["schemas"]["Error"];
|
|
5752
|
+
};
|
|
5753
|
+
};
|
|
5754
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
5755
|
+
409: {
|
|
5756
|
+
headers: {
|
|
5757
|
+
[name: string]: unknown;
|
|
5758
|
+
};
|
|
5759
|
+
content: {
|
|
5760
|
+
"application/json": components["schemas"]["Error"];
|
|
5761
|
+
};
|
|
5762
|
+
};
|
|
5763
|
+
/** @description too_large: the body is over 64 KB */
|
|
5764
|
+
413: {
|
|
5765
|
+
headers: {
|
|
5766
|
+
[name: string]: unknown;
|
|
5767
|
+
};
|
|
5768
|
+
content: {
|
|
5769
|
+
"application/json": components["schemas"]["Error"];
|
|
5770
|
+
};
|
|
5771
|
+
};
|
|
5772
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5773
|
+
429: {
|
|
5774
|
+
headers: {
|
|
5775
|
+
[name: string]: unknown;
|
|
5776
|
+
};
|
|
5777
|
+
content: {
|
|
5778
|
+
"application/json": components["schemas"]["Error"];
|
|
5779
|
+
};
|
|
5780
|
+
};
|
|
5781
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5782
|
+
503: {
|
|
5783
|
+
headers: {
|
|
5784
|
+
[name: string]: unknown;
|
|
5785
|
+
};
|
|
5786
|
+
content: {
|
|
5787
|
+
"application/json": components["schemas"]["Error"];
|
|
5788
|
+
};
|
|
5789
|
+
};
|
|
5790
|
+
};
|
|
5791
|
+
};
|
|
5792
|
+
delete?: never;
|
|
5793
|
+
options?: never;
|
|
5794
|
+
head?: never;
|
|
5795
|
+
patch?: never;
|
|
5796
|
+
trace?: never;
|
|
5797
|
+
};
|
|
5798
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}/resume": {
|
|
5799
|
+
parameters: {
|
|
5800
|
+
query?: never;
|
|
5801
|
+
header?: never;
|
|
5802
|
+
path?: never;
|
|
5803
|
+
cookie?: never;
|
|
5804
|
+
};
|
|
5805
|
+
get?: never;
|
|
5806
|
+
put?: never;
|
|
5807
|
+
/** Start a draft, or resume a paused campaign. Owners, admins and Full access keys only */
|
|
5808
|
+
post: {
|
|
5809
|
+
parameters: {
|
|
5810
|
+
query?: never;
|
|
5811
|
+
header?: never;
|
|
5812
|
+
path: {
|
|
5813
|
+
workspaceId: string;
|
|
5814
|
+
/** @description The campaign's key */
|
|
5815
|
+
ref: string;
|
|
5816
|
+
};
|
|
5817
|
+
cookie?: never;
|
|
5818
|
+
};
|
|
5819
|
+
requestBody?: never;
|
|
5820
|
+
responses: {
|
|
5821
|
+
/** @description The campaign as it is now */
|
|
5822
|
+
200: {
|
|
5823
|
+
headers: {
|
|
5824
|
+
[name: string]: unknown;
|
|
5825
|
+
};
|
|
5826
|
+
content: {
|
|
5827
|
+
"application/json": {
|
|
5828
|
+
campaign: components["schemas"]["Campaign"];
|
|
5829
|
+
};
|
|
5830
|
+
};
|
|
5831
|
+
};
|
|
5832
|
+
/** @description invalid_request: the request is not valid */
|
|
5833
|
+
400: {
|
|
5834
|
+
headers: {
|
|
5835
|
+
[name: string]: unknown;
|
|
5836
|
+
};
|
|
5837
|
+
content: {
|
|
5838
|
+
"application/json": components["schemas"]["Error"];
|
|
5839
|
+
};
|
|
5840
|
+
};
|
|
5841
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5842
|
+
401: {
|
|
5843
|
+
headers: {
|
|
5844
|
+
[name: string]: unknown;
|
|
5845
|
+
};
|
|
5846
|
+
content: {
|
|
5847
|
+
"application/json": components["schemas"]["Error"];
|
|
5848
|
+
};
|
|
5849
|
+
};
|
|
5850
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5851
|
+
402: {
|
|
5852
|
+
headers: {
|
|
5853
|
+
[name: string]: unknown;
|
|
5854
|
+
};
|
|
5855
|
+
content: {
|
|
5856
|
+
"application/json": components["schemas"]["Error"];
|
|
5857
|
+
};
|
|
5858
|
+
};
|
|
5859
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5860
|
+
403: {
|
|
5861
|
+
headers: {
|
|
5862
|
+
[name: string]: unknown;
|
|
5863
|
+
};
|
|
5864
|
+
content: {
|
|
5865
|
+
"application/json": components["schemas"]["Error"];
|
|
5866
|
+
};
|
|
5867
|
+
};
|
|
5868
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5869
|
+
404: {
|
|
5870
|
+
headers: {
|
|
5871
|
+
[name: string]: unknown;
|
|
5872
|
+
};
|
|
5873
|
+
content: {
|
|
5874
|
+
"application/json": components["schemas"]["Error"];
|
|
5875
|
+
};
|
|
5876
|
+
};
|
|
5877
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
5878
|
+
409: {
|
|
5879
|
+
headers: {
|
|
5880
|
+
[name: string]: unknown;
|
|
5881
|
+
};
|
|
5882
|
+
content: {
|
|
5883
|
+
"application/json": components["schemas"]["Error"];
|
|
5884
|
+
};
|
|
5885
|
+
};
|
|
5886
|
+
/** @description too_large: the body is over 64 KB */
|
|
5887
|
+
413: {
|
|
5888
|
+
headers: {
|
|
5889
|
+
[name: string]: unknown;
|
|
5890
|
+
};
|
|
5891
|
+
content: {
|
|
5892
|
+
"application/json": components["schemas"]["Error"];
|
|
5893
|
+
};
|
|
5894
|
+
};
|
|
5895
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
5896
|
+
429: {
|
|
5897
|
+
headers: {
|
|
5898
|
+
[name: string]: unknown;
|
|
5899
|
+
};
|
|
5900
|
+
content: {
|
|
5901
|
+
"application/json": components["schemas"]["Error"];
|
|
5902
|
+
};
|
|
5903
|
+
};
|
|
5904
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
5905
|
+
503: {
|
|
5906
|
+
headers: {
|
|
5907
|
+
[name: string]: unknown;
|
|
5908
|
+
};
|
|
5909
|
+
content: {
|
|
5910
|
+
"application/json": components["schemas"]["Error"];
|
|
5911
|
+
};
|
|
5912
|
+
};
|
|
5913
|
+
};
|
|
5914
|
+
};
|
|
5915
|
+
delete?: never;
|
|
5916
|
+
options?: never;
|
|
5917
|
+
head?: never;
|
|
5918
|
+
patch?: never;
|
|
5919
|
+
trace?: never;
|
|
5920
|
+
};
|
|
5921
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}/end": {
|
|
5922
|
+
parameters: {
|
|
5923
|
+
query?: never;
|
|
5924
|
+
header?: never;
|
|
5925
|
+
path?: never;
|
|
5926
|
+
cookie?: never;
|
|
5927
|
+
};
|
|
5928
|
+
get?: never;
|
|
5929
|
+
put?: never;
|
|
5930
|
+
/** End a campaign for good: its messages that wait are cancelled with `campaign_ended`. Owners, admins and Full access keys only */
|
|
5931
|
+
post: {
|
|
5932
|
+
parameters: {
|
|
5933
|
+
query?: never;
|
|
5934
|
+
header?: never;
|
|
5935
|
+
path: {
|
|
5936
|
+
workspaceId: string;
|
|
5937
|
+
/** @description The campaign's ID */
|
|
5938
|
+
ref: string;
|
|
5939
|
+
};
|
|
5940
|
+
cookie?: never;
|
|
5941
|
+
};
|
|
5942
|
+
requestBody?: never;
|
|
5943
|
+
responses: {
|
|
5944
|
+
/** @description The campaign as it is now */
|
|
5945
|
+
200: {
|
|
5946
|
+
headers: {
|
|
5947
|
+
[name: string]: unknown;
|
|
5948
|
+
};
|
|
5949
|
+
content: {
|
|
5950
|
+
"application/json": {
|
|
5951
|
+
campaign: components["schemas"]["Campaign"];
|
|
5952
|
+
};
|
|
5953
|
+
};
|
|
5954
|
+
};
|
|
5955
|
+
/** @description invalid_request: the request is not valid */
|
|
5956
|
+
400: {
|
|
5957
|
+
headers: {
|
|
5958
|
+
[name: string]: unknown;
|
|
5959
|
+
};
|
|
5960
|
+
content: {
|
|
5961
|
+
"application/json": components["schemas"]["Error"];
|
|
5962
|
+
};
|
|
5963
|
+
};
|
|
5964
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
5965
|
+
401: {
|
|
5966
|
+
headers: {
|
|
5967
|
+
[name: string]: unknown;
|
|
5968
|
+
};
|
|
5969
|
+
content: {
|
|
5970
|
+
"application/json": components["schemas"]["Error"];
|
|
5971
|
+
};
|
|
5972
|
+
};
|
|
5973
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
5974
|
+
402: {
|
|
5975
|
+
headers: {
|
|
5976
|
+
[name: string]: unknown;
|
|
5977
|
+
};
|
|
5978
|
+
content: {
|
|
5979
|
+
"application/json": components["schemas"]["Error"];
|
|
5980
|
+
};
|
|
5981
|
+
};
|
|
5982
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
5983
|
+
403: {
|
|
5984
|
+
headers: {
|
|
5985
|
+
[name: string]: unknown;
|
|
5986
|
+
};
|
|
5987
|
+
content: {
|
|
5988
|
+
"application/json": components["schemas"]["Error"];
|
|
5989
|
+
};
|
|
5990
|
+
};
|
|
5991
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
5992
|
+
404: {
|
|
5993
|
+
headers: {
|
|
5994
|
+
[name: string]: unknown;
|
|
5995
|
+
};
|
|
5996
|
+
content: {
|
|
5997
|
+
"application/json": components["schemas"]["Error"];
|
|
5998
|
+
};
|
|
5999
|
+
};
|
|
6000
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
6001
|
+
409: {
|
|
6002
|
+
headers: {
|
|
6003
|
+
[name: string]: unknown;
|
|
6004
|
+
};
|
|
6005
|
+
content: {
|
|
6006
|
+
"application/json": components["schemas"]["Error"];
|
|
6007
|
+
};
|
|
6008
|
+
};
|
|
6009
|
+
/** @description too_large: the body is over 64 KB */
|
|
6010
|
+
413: {
|
|
6011
|
+
headers: {
|
|
6012
|
+
[name: string]: unknown;
|
|
6013
|
+
};
|
|
6014
|
+
content: {
|
|
6015
|
+
"application/json": components["schemas"]["Error"];
|
|
6016
|
+
};
|
|
6017
|
+
};
|
|
6018
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
6019
|
+
429: {
|
|
6020
|
+
headers: {
|
|
6021
|
+
[name: string]: unknown;
|
|
6022
|
+
};
|
|
6023
|
+
content: {
|
|
6024
|
+
"application/json": components["schemas"]["Error"];
|
|
6025
|
+
};
|
|
6026
|
+
};
|
|
6027
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
6028
|
+
503: {
|
|
6029
|
+
headers: {
|
|
6030
|
+
[name: string]: unknown;
|
|
6031
|
+
};
|
|
6032
|
+
content: {
|
|
6033
|
+
"application/json": components["schemas"]["Error"];
|
|
6034
|
+
};
|
|
6035
|
+
};
|
|
6036
|
+
};
|
|
6037
|
+
};
|
|
6038
|
+
delete?: never;
|
|
6039
|
+
options?: never;
|
|
6040
|
+
head?: never;
|
|
6041
|
+
patch?: never;
|
|
6042
|
+
trace?: never;
|
|
6043
|
+
};
|
|
6044
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}/end": {
|
|
6045
|
+
parameters: {
|
|
6046
|
+
query?: never;
|
|
6047
|
+
header?: never;
|
|
6048
|
+
path?: never;
|
|
6049
|
+
cookie?: never;
|
|
6050
|
+
};
|
|
6051
|
+
get?: never;
|
|
6052
|
+
put?: never;
|
|
6053
|
+
/** End a campaign for good: its messages that wait are cancelled with `campaign_ended`. Owners, admins and Full access keys only */
|
|
6054
|
+
post: {
|
|
6055
|
+
parameters: {
|
|
6056
|
+
query?: never;
|
|
6057
|
+
header?: never;
|
|
6058
|
+
path: {
|
|
6059
|
+
workspaceId: string;
|
|
6060
|
+
/** @description The campaign's key */
|
|
6061
|
+
ref: string;
|
|
6062
|
+
};
|
|
6063
|
+
cookie?: never;
|
|
6064
|
+
};
|
|
6065
|
+
requestBody?: never;
|
|
6066
|
+
responses: {
|
|
6067
|
+
/** @description The campaign as it is now */
|
|
6068
|
+
200: {
|
|
6069
|
+
headers: {
|
|
6070
|
+
[name: string]: unknown;
|
|
6071
|
+
};
|
|
6072
|
+
content: {
|
|
6073
|
+
"application/json": {
|
|
6074
|
+
campaign: components["schemas"]["Campaign"];
|
|
6075
|
+
};
|
|
6076
|
+
};
|
|
6077
|
+
};
|
|
6078
|
+
/** @description invalid_request: the request is not valid */
|
|
6079
|
+
400: {
|
|
6080
|
+
headers: {
|
|
6081
|
+
[name: string]: unknown;
|
|
6082
|
+
};
|
|
6083
|
+
content: {
|
|
6084
|
+
"application/json": components["schemas"]["Error"];
|
|
6085
|
+
};
|
|
6086
|
+
};
|
|
6087
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
6088
|
+
401: {
|
|
6089
|
+
headers: {
|
|
6090
|
+
[name: string]: unknown;
|
|
6091
|
+
};
|
|
6092
|
+
content: {
|
|
6093
|
+
"application/json": components["schemas"]["Error"];
|
|
6094
|
+
};
|
|
6095
|
+
};
|
|
6096
|
+
/** @description payment_required: the workspace waits for payment. read_only: the subscription ended, so operators can only read and export */
|
|
6097
|
+
402: {
|
|
6098
|
+
headers: {
|
|
6099
|
+
[name: string]: unknown;
|
|
6100
|
+
};
|
|
6101
|
+
content: {
|
|
6102
|
+
"application/json": components["schemas"]["Error"];
|
|
6103
|
+
};
|
|
6104
|
+
};
|
|
6105
|
+
/** @description forbidden: this role may not do this. suspended: the server's admin suspended the workspace. origin_not_allowed: the request did not come from this server's own pages */
|
|
6106
|
+
403: {
|
|
6107
|
+
headers: {
|
|
6108
|
+
[name: string]: unknown;
|
|
6109
|
+
};
|
|
6110
|
+
content: {
|
|
6111
|
+
"application/json": components["schemas"]["Error"];
|
|
6112
|
+
};
|
|
6113
|
+
};
|
|
6114
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
6115
|
+
404: {
|
|
6116
|
+
headers: {
|
|
6117
|
+
[name: string]: unknown;
|
|
6118
|
+
};
|
|
6119
|
+
content: {
|
|
6120
|
+
"application/json": components["schemas"]["Error"];
|
|
6121
|
+
};
|
|
6122
|
+
};
|
|
6123
|
+
/** @description campaign_ended: an ended campaign does not change */
|
|
6124
|
+
409: {
|
|
6125
|
+
headers: {
|
|
6126
|
+
[name: string]: unknown;
|
|
6127
|
+
};
|
|
6128
|
+
content: {
|
|
6129
|
+
"application/json": components["schemas"]["Error"];
|
|
6130
|
+
};
|
|
6131
|
+
};
|
|
6132
|
+
/** @description too_large: the body is over 64 KB */
|
|
6133
|
+
413: {
|
|
6134
|
+
headers: {
|
|
6135
|
+
[name: string]: unknown;
|
|
6136
|
+
};
|
|
6137
|
+
content: {
|
|
6138
|
+
"application/json": components["schemas"]["Error"];
|
|
6139
|
+
};
|
|
6140
|
+
};
|
|
6141
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
6142
|
+
429: {
|
|
6143
|
+
headers: {
|
|
6144
|
+
[name: string]: unknown;
|
|
6145
|
+
};
|
|
6146
|
+
content: {
|
|
6147
|
+
"application/json": components["schemas"]["Error"];
|
|
6148
|
+
};
|
|
6149
|
+
};
|
|
6150
|
+
/** @description busy: the workspace is busy. Retry after `retry-after` */
|
|
6151
|
+
503: {
|
|
6152
|
+
headers: {
|
|
6153
|
+
[name: string]: unknown;
|
|
6154
|
+
};
|
|
6155
|
+
content: {
|
|
6156
|
+
"application/json": components["schemas"]["Error"];
|
|
6157
|
+
};
|
|
6158
|
+
};
|
|
6159
|
+
};
|
|
6160
|
+
};
|
|
6161
|
+
delete?: never;
|
|
6162
|
+
options?: never;
|
|
6163
|
+
head?: never;
|
|
6164
|
+
patch?: never;
|
|
6165
|
+
trace?: never;
|
|
6166
|
+
};
|
|
6167
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}/results": {
|
|
6168
|
+
parameters: {
|
|
6169
|
+
query?: never;
|
|
6170
|
+
header?: never;
|
|
6171
|
+
path?: never;
|
|
6172
|
+
cookie?: never;
|
|
6173
|
+
};
|
|
6174
|
+
/**
|
|
6175
|
+
* A campaign's results per day in UTC and per A/B variant
|
|
6176
|
+
* @description Each day counts the contacts it reached (`entered`, the control group too), and its messages sent, delivered, read, replied and dismissed, the clicks by button value, the goals reached and the conversations started. Test visitors are left out. The days outlive the messages' text.
|
|
6177
|
+
*/
|
|
6178
|
+
get: {
|
|
6179
|
+
parameters: {
|
|
6180
|
+
query?: {
|
|
6181
|
+
/** @description The first day, in UTC */
|
|
6182
|
+
from?: string;
|
|
6183
|
+
/** @description The last day, in UTC */
|
|
6184
|
+
to?: string;
|
|
6185
|
+
};
|
|
6186
|
+
header?: never;
|
|
6187
|
+
path: {
|
|
6188
|
+
workspaceId: string;
|
|
6189
|
+
/** @description The campaign's ID */
|
|
6190
|
+
ref: string;
|
|
6191
|
+
};
|
|
6192
|
+
cookie?: never;
|
|
6193
|
+
};
|
|
6194
|
+
requestBody?: never;
|
|
6195
|
+
responses: {
|
|
6196
|
+
/** @description The results */
|
|
6197
|
+
200: {
|
|
6198
|
+
headers: {
|
|
6199
|
+
[name: string]: unknown;
|
|
6200
|
+
};
|
|
6201
|
+
content: {
|
|
6202
|
+
"application/json": components["schemas"]["CampaignResults"];
|
|
6203
|
+
};
|
|
6204
|
+
};
|
|
6205
|
+
/** @description invalid_request: the request is not valid */
|
|
6206
|
+
400: {
|
|
6207
|
+
headers: {
|
|
6208
|
+
[name: string]: unknown;
|
|
6209
|
+
};
|
|
6210
|
+
content: {
|
|
6211
|
+
"application/json": components["schemas"]["Error"];
|
|
6212
|
+
};
|
|
6213
|
+
};
|
|
6214
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
6215
|
+
401: {
|
|
6216
|
+
headers: {
|
|
6217
|
+
[name: string]: unknown;
|
|
6218
|
+
};
|
|
6219
|
+
content: {
|
|
6220
|
+
"application/json": components["schemas"]["Error"];
|
|
6221
|
+
};
|
|
6222
|
+
};
|
|
6223
|
+
/** @description payment_required: the workspace waits for payment */
|
|
6224
|
+
402: {
|
|
6225
|
+
headers: {
|
|
6226
|
+
[name: string]: unknown;
|
|
6227
|
+
};
|
|
6228
|
+
content: {
|
|
6229
|
+
"application/json": components["schemas"]["Error"];
|
|
6230
|
+
};
|
|
6231
|
+
};
|
|
6232
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
6233
|
+
404: {
|
|
6234
|
+
headers: {
|
|
6235
|
+
[name: string]: unknown;
|
|
6236
|
+
};
|
|
6237
|
+
content: {
|
|
6238
|
+
"application/json": components["schemas"]["Error"];
|
|
6239
|
+
};
|
|
6240
|
+
};
|
|
6241
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
6242
|
+
429: {
|
|
6243
|
+
headers: {
|
|
6244
|
+
[name: string]: unknown;
|
|
6245
|
+
};
|
|
6246
|
+
content: {
|
|
6247
|
+
"application/json": components["schemas"]["Error"];
|
|
6248
|
+
};
|
|
6249
|
+
};
|
|
6250
|
+
};
|
|
6251
|
+
};
|
|
6252
|
+
put?: never;
|
|
6253
|
+
post?: never;
|
|
6254
|
+
delete?: never;
|
|
6255
|
+
options?: never;
|
|
6256
|
+
head?: never;
|
|
6257
|
+
patch?: never;
|
|
6258
|
+
trace?: never;
|
|
6259
|
+
};
|
|
6260
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}/results": {
|
|
6261
|
+
parameters: {
|
|
6262
|
+
query?: never;
|
|
6263
|
+
header?: never;
|
|
6264
|
+
path?: never;
|
|
6265
|
+
cookie?: never;
|
|
6266
|
+
};
|
|
6267
|
+
/**
|
|
6268
|
+
* A campaign's results per day in UTC and per A/B variant
|
|
6269
|
+
* @description Each day counts the contacts it reached (`entered`, the control group too), and its messages sent, delivered, read, replied and dismissed, the clicks by button value, the goals reached and the conversations started. Test visitors are left out. The days outlive the messages' text.
|
|
6270
|
+
*/
|
|
6271
|
+
get: {
|
|
6272
|
+
parameters: {
|
|
6273
|
+
query?: {
|
|
6274
|
+
/** @description The first day, in UTC */
|
|
6275
|
+
from?: string;
|
|
6276
|
+
/** @description The last day, in UTC */
|
|
6277
|
+
to?: string;
|
|
6278
|
+
};
|
|
6279
|
+
header?: never;
|
|
6280
|
+
path: {
|
|
6281
|
+
workspaceId: string;
|
|
6282
|
+
/** @description The campaign's key */
|
|
6283
|
+
ref: string;
|
|
6284
|
+
};
|
|
6285
|
+
cookie?: never;
|
|
6286
|
+
};
|
|
6287
|
+
requestBody?: never;
|
|
6288
|
+
responses: {
|
|
6289
|
+
/** @description The results */
|
|
6290
|
+
200: {
|
|
6291
|
+
headers: {
|
|
6292
|
+
[name: string]: unknown;
|
|
6293
|
+
};
|
|
6294
|
+
content: {
|
|
6295
|
+
"application/json": components["schemas"]["CampaignResults"];
|
|
6296
|
+
};
|
|
6297
|
+
};
|
|
6298
|
+
/** @description invalid_request: the request is not valid */
|
|
6299
|
+
400: {
|
|
6300
|
+
headers: {
|
|
6301
|
+
[name: string]: unknown;
|
|
6302
|
+
};
|
|
6303
|
+
content: {
|
|
6304
|
+
"application/json": components["schemas"]["Error"];
|
|
6305
|
+
};
|
|
6306
|
+
};
|
|
6307
|
+
/** @description unauthorized: no valid session, or the API key is not valid or was revoked. two_factor_required: the session has not passed two-step sign-in yet */
|
|
6308
|
+
401: {
|
|
6309
|
+
headers: {
|
|
6310
|
+
[name: string]: unknown;
|
|
6311
|
+
};
|
|
6312
|
+
content: {
|
|
6313
|
+
"application/json": components["schemas"]["Error"];
|
|
6314
|
+
};
|
|
6315
|
+
};
|
|
6316
|
+
/** @description payment_required: the workspace waits for payment */
|
|
6317
|
+
402: {
|
|
6318
|
+
headers: {
|
|
6319
|
+
[name: string]: unknown;
|
|
6320
|
+
};
|
|
6321
|
+
content: {
|
|
6322
|
+
"application/json": components["schemas"]["Error"];
|
|
6323
|
+
};
|
|
6324
|
+
};
|
|
6325
|
+
/** @description not_found: it does not exist, or this operator is not a member */
|
|
6326
|
+
404: {
|
|
6327
|
+
headers: {
|
|
6328
|
+
[name: string]: unknown;
|
|
6329
|
+
};
|
|
6330
|
+
content: {
|
|
6331
|
+
"application/json": components["schemas"]["Error"];
|
|
6332
|
+
};
|
|
6333
|
+
};
|
|
6334
|
+
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
6335
|
+
429: {
|
|
6336
|
+
headers: {
|
|
6337
|
+
[name: string]: unknown;
|
|
6338
|
+
};
|
|
6339
|
+
content: {
|
|
6340
|
+
"application/json": components["schemas"]["Error"];
|
|
6341
|
+
};
|
|
6342
|
+
};
|
|
6343
|
+
};
|
|
6344
|
+
};
|
|
6345
|
+
put?: never;
|
|
6346
|
+
post?: never;
|
|
6347
|
+
delete?: never;
|
|
6348
|
+
options?: never;
|
|
6349
|
+
head?: never;
|
|
6350
|
+
patch?: never;
|
|
6351
|
+
trace?: never;
|
|
6352
|
+
};
|
|
6353
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/{ref}/send": {
|
|
6354
|
+
parameters: {
|
|
6355
|
+
query?: never;
|
|
6356
|
+
header?: never;
|
|
6357
|
+
path?: never;
|
|
6358
|
+
cookie?: never;
|
|
6359
|
+
};
|
|
6360
|
+
get?: never;
|
|
6361
|
+
put?: never;
|
|
6362
|
+
/**
|
|
6363
|
+
* Run a live campaign for one person, from your code
|
|
6364
|
+
* @description It skips the audience and the trigger, because your code chose the person, and keeps the frequency and the visitor's opt-out. `data` fills `{{ data.<key> }}` in the text. A retry with the same `clientId`, and a send that the frequency keeps out, answer 200 with the message that is there.
|
|
6365
|
+
*/
|
|
6366
|
+
post: {
|
|
6367
|
+
parameters: {
|
|
6368
|
+
query?: never;
|
|
6369
|
+
header?: never;
|
|
6370
|
+
path: {
|
|
6371
|
+
workspaceId: string;
|
|
6372
|
+
/** @description The campaign's ID */
|
|
6373
|
+
ref: string;
|
|
6374
|
+
};
|
|
6375
|
+
cookie?: never;
|
|
6376
|
+
};
|
|
6377
|
+
requestBody: {
|
|
6378
|
+
content: {
|
|
6379
|
+
"application/json": {
|
|
6380
|
+
/** @description Your own ID for this send. A retry with the same one answers the first result */
|
|
6381
|
+
clientId: string;
|
|
6382
|
+
visitor: components["schemas"]["VisitorSelector"];
|
|
6383
|
+
/** @description Values for `{{ data.<key> }}` in the text */
|
|
6384
|
+
data?: {
|
|
6385
|
+
[key: string]: string | number | boolean;
|
|
6386
|
+
};
|
|
6387
|
+
};
|
|
6388
|
+
};
|
|
6389
|
+
};
|
|
6390
|
+
responses: {
|
|
6391
|
+
/** @description A retry, or a message the frequency keeps: the one that is there */
|
|
3674
6392
|
200: {
|
|
3675
6393
|
headers: {
|
|
3676
6394
|
[name: string]: unknown;
|
|
@@ -3692,7 +6410,7 @@ export interface paths {
|
|
|
3692
6410
|
};
|
|
3693
6411
|
};
|
|
3694
6412
|
};
|
|
3695
|
-
/** @description invalid_request: the request is not valid
|
|
6413
|
+
/** @description invalid_request: the request is not valid */
|
|
3696
6414
|
400: {
|
|
3697
6415
|
headers: {
|
|
3698
6416
|
[name: string]: unknown;
|
|
@@ -3719,7 +6437,7 @@ export interface paths {
|
|
|
3719
6437
|
"application/json": components["schemas"]["Error"];
|
|
3720
6438
|
};
|
|
3721
6439
|
};
|
|
3722
|
-
/** @description
|
|
6440
|
+
/** @description blocked: the team blocked this visitor */
|
|
3723
6441
|
403: {
|
|
3724
6442
|
headers: {
|
|
3725
6443
|
[name: string]: unknown;
|
|
@@ -3728,7 +6446,7 @@ export interface paths {
|
|
|
3728
6446
|
"application/json": components["schemas"]["Error"];
|
|
3729
6447
|
};
|
|
3730
6448
|
};
|
|
3731
|
-
/** @description not_found: no visitor has this `id` */
|
|
6449
|
+
/** @description not_found: no such campaign, or no visitor has this `id` */
|
|
3732
6450
|
404: {
|
|
3733
6451
|
headers: {
|
|
3734
6452
|
[name: string]: unknown;
|
|
@@ -3737,7 +6455,7 @@ export interface paths {
|
|
|
3737
6455
|
"application/json": components["schemas"]["Error"];
|
|
3738
6456
|
};
|
|
3739
6457
|
};
|
|
3740
|
-
/** @description
|
|
6458
|
+
/** @description campaign_not_live: the campaign is a draft, paused or ended. opted_out: the visitor turned off automatic messages */
|
|
3741
6459
|
409: {
|
|
3742
6460
|
headers: {
|
|
3743
6461
|
[name: string]: unknown;
|
|
@@ -3755,7 +6473,7 @@ export interface paths {
|
|
|
3755
6473
|
"application/json": components["schemas"]["Error"];
|
|
3756
6474
|
};
|
|
3757
6475
|
};
|
|
3758
|
-
/** @description too_many_requests: over the key's rate limit. too_many_waiting: the visitor has
|
|
6476
|
+
/** @description too_many_requests: over the key's rate limit. too_many_waiting: the visitor has too many outbound messages waiting */
|
|
3759
6477
|
429: {
|
|
3760
6478
|
headers: {
|
|
3761
6479
|
[name: string]: unknown;
|
|
@@ -3781,27 +6499,45 @@ export interface paths {
|
|
|
3781
6499
|
patch?: never;
|
|
3782
6500
|
trace?: never;
|
|
3783
6501
|
};
|
|
3784
|
-
"/v1/operator/workspaces/{workspaceId}/
|
|
6502
|
+
"/v1/operator/workspaces/{workspaceId}/campaigns/by-key/{ref}/send": {
|
|
3785
6503
|
parameters: {
|
|
3786
6504
|
query?: never;
|
|
3787
6505
|
header?: never;
|
|
3788
6506
|
path?: never;
|
|
3789
6507
|
cookie?: never;
|
|
3790
6508
|
};
|
|
3791
|
-
|
|
3792
|
-
|
|
6509
|
+
get?: never;
|
|
6510
|
+
put?: never;
|
|
6511
|
+
/**
|
|
6512
|
+
* Run a live campaign for one person, from your code
|
|
6513
|
+
* @description It skips the audience and the trigger, because your code chose the person, and keeps the frequency and the visitor's opt-out. `data` fills `{{ data.<key> }}` in the text. A retry with the same `clientId`, and a send that the frequency keeps out, answer 200 with the message that is there.
|
|
6514
|
+
*/
|
|
6515
|
+
post: {
|
|
3793
6516
|
parameters: {
|
|
3794
6517
|
query?: never;
|
|
3795
6518
|
header?: never;
|
|
3796
6519
|
path: {
|
|
3797
6520
|
workspaceId: string;
|
|
3798
|
-
|
|
6521
|
+
/** @description The campaign's key */
|
|
6522
|
+
ref: string;
|
|
3799
6523
|
};
|
|
3800
6524
|
cookie?: never;
|
|
3801
6525
|
};
|
|
3802
|
-
requestBody
|
|
6526
|
+
requestBody: {
|
|
6527
|
+
content: {
|
|
6528
|
+
"application/json": {
|
|
6529
|
+
/** @description Your own ID for this send. A retry with the same one answers the first result */
|
|
6530
|
+
clientId: string;
|
|
6531
|
+
visitor: components["schemas"]["VisitorSelector"];
|
|
6532
|
+
/** @description Values for `{{ data.<key> }}` in the text */
|
|
6533
|
+
data?: {
|
|
6534
|
+
[key: string]: string | number | boolean;
|
|
6535
|
+
};
|
|
6536
|
+
};
|
|
6537
|
+
};
|
|
6538
|
+
};
|
|
3803
6539
|
responses: {
|
|
3804
|
-
/** @description
|
|
6540
|
+
/** @description A retry, or a message the frequency keeps: the one that is there */
|
|
3805
6541
|
200: {
|
|
3806
6542
|
headers: {
|
|
3807
6543
|
[name: string]: unknown;
|
|
@@ -3812,79 +6548,8 @@ export interface paths {
|
|
|
3812
6548
|
};
|
|
3813
6549
|
};
|
|
3814
6550
|
};
|
|
3815
|
-
/** @description
|
|
3816
|
-
|
|
3817
|
-
headers: {
|
|
3818
|
-
[name: string]: unknown;
|
|
3819
|
-
};
|
|
3820
|
-
content: {
|
|
3821
|
-
"application/json": components["schemas"]["Error"];
|
|
3822
|
-
};
|
|
3823
|
-
};
|
|
3824
|
-
/** @description payment_required: the workspace waits for payment */
|
|
3825
|
-
402: {
|
|
3826
|
-
headers: {
|
|
3827
|
-
[name: string]: unknown;
|
|
3828
|
-
};
|
|
3829
|
-
content: {
|
|
3830
|
-
"application/json": components["schemas"]["Error"];
|
|
3831
|
-
};
|
|
3832
|
-
};
|
|
3833
|
-
/** @description not_found: it does not exist, or this operator is not a member */
|
|
3834
|
-
404: {
|
|
3835
|
-
headers: {
|
|
3836
|
-
[name: string]: unknown;
|
|
3837
|
-
};
|
|
3838
|
-
content: {
|
|
3839
|
-
"application/json": components["schemas"]["Error"];
|
|
3840
|
-
};
|
|
3841
|
-
};
|
|
3842
|
-
/** @description too_many_requests: over an API key's 300 requests a minute. Retry after `retry-after` */
|
|
3843
|
-
429: {
|
|
3844
|
-
headers: {
|
|
3845
|
-
[name: string]: unknown;
|
|
3846
|
-
};
|
|
3847
|
-
content: {
|
|
3848
|
-
"application/json": components["schemas"]["Error"];
|
|
3849
|
-
};
|
|
3850
|
-
};
|
|
3851
|
-
};
|
|
3852
|
-
};
|
|
3853
|
-
put?: never;
|
|
3854
|
-
post?: never;
|
|
3855
|
-
delete?: never;
|
|
3856
|
-
options?: never;
|
|
3857
|
-
head?: never;
|
|
3858
|
-
patch?: never;
|
|
3859
|
-
trace?: never;
|
|
3860
|
-
};
|
|
3861
|
-
"/v1/operator/workspaces/{workspaceId}/outbound-messages/{id}/cancel": {
|
|
3862
|
-
parameters: {
|
|
3863
|
-
query?: never;
|
|
3864
|
-
header?: never;
|
|
3865
|
-
path?: never;
|
|
3866
|
-
cookie?: never;
|
|
3867
|
-
};
|
|
3868
|
-
get?: never;
|
|
3869
|
-
put?: never;
|
|
3870
|
-
/**
|
|
3871
|
-
* Cancel an outbound message
|
|
3872
|
-
* @description A message that the visitor has not read ends as `cancelled`, with `statusReason: cancelled_by_request`, and its `dedupeKey` is free again. A message already read, answered or ended stays as it is: read its `status`.
|
|
3873
|
-
*/
|
|
3874
|
-
post: {
|
|
3875
|
-
parameters: {
|
|
3876
|
-
query?: never;
|
|
3877
|
-
header?: never;
|
|
3878
|
-
path: {
|
|
3879
|
-
workspaceId: string;
|
|
3880
|
-
id: string;
|
|
3881
|
-
};
|
|
3882
|
-
cookie?: never;
|
|
3883
|
-
};
|
|
3884
|
-
requestBody?: never;
|
|
3885
|
-
responses: {
|
|
3886
|
-
/** @description The outbound message after the cancel */
|
|
3887
|
-
200: {
|
|
6551
|
+
/** @description The new outbound message */
|
|
6552
|
+
201: {
|
|
3888
6553
|
headers: {
|
|
3889
6554
|
[name: string]: unknown;
|
|
3890
6555
|
};
|
|
@@ -3921,7 +6586,7 @@ export interface paths {
|
|
|
3921
6586
|
"application/json": components["schemas"]["Error"];
|
|
3922
6587
|
};
|
|
3923
6588
|
};
|
|
3924
|
-
/** @description
|
|
6589
|
+
/** @description blocked: the team blocked this visitor */
|
|
3925
6590
|
403: {
|
|
3926
6591
|
headers: {
|
|
3927
6592
|
[name: string]: unknown;
|
|
@@ -3930,7 +6595,7 @@ export interface paths {
|
|
|
3930
6595
|
"application/json": components["schemas"]["Error"];
|
|
3931
6596
|
};
|
|
3932
6597
|
};
|
|
3933
|
-
/** @description not_found:
|
|
6598
|
+
/** @description not_found: no such campaign, or no visitor has this `id` */
|
|
3934
6599
|
404: {
|
|
3935
6600
|
headers: {
|
|
3936
6601
|
[name: string]: unknown;
|
|
@@ -3939,6 +6604,15 @@ export interface paths {
|
|
|
3939
6604
|
"application/json": components["schemas"]["Error"];
|
|
3940
6605
|
};
|
|
3941
6606
|
};
|
|
6607
|
+
/** @description campaign_not_live: the campaign is a draft, paused or ended. opted_out: the visitor turned off automatic messages */
|
|
6608
|
+
409: {
|
|
6609
|
+
headers: {
|
|
6610
|
+
[name: string]: unknown;
|
|
6611
|
+
};
|
|
6612
|
+
content: {
|
|
6613
|
+
"application/json": components["schemas"]["Error"];
|
|
6614
|
+
};
|
|
6615
|
+
};
|
|
3942
6616
|
/** @description too_large: the body is over 64 KB */
|
|
3943
6617
|
413: {
|
|
3944
6618
|
headers: {
|
|
@@ -3948,7 +6622,7 @@ export interface paths {
|
|
|
3948
6622
|
"application/json": components["schemas"]["Error"];
|
|
3949
6623
|
};
|
|
3950
6624
|
};
|
|
3951
|
-
/** @description too_many_requests: over
|
|
6625
|
+
/** @description too_many_requests: over the key's rate limit. too_many_waiting: the visitor has too many outbound messages waiting */
|
|
3952
6626
|
429: {
|
|
3953
6627
|
headers: {
|
|
3954
6628
|
[name: string]: unknown;
|
|
@@ -3974,7 +6648,7 @@ export interface paths {
|
|
|
3974
6648
|
patch?: never;
|
|
3975
6649
|
trace?: never;
|
|
3976
6650
|
};
|
|
3977
|
-
"/v1/operator/workspaces/{workspaceId}/
|
|
6651
|
+
"/v1/operator/workspaces/{workspaceId}/track": {
|
|
3978
6652
|
parameters: {
|
|
3979
6653
|
query?: never;
|
|
3980
6654
|
header?: never;
|
|
@@ -3984,8 +6658,8 @@ export interface paths {
|
|
|
3984
6658
|
get?: never;
|
|
3985
6659
|
put?: never;
|
|
3986
6660
|
/**
|
|
3987
|
-
*
|
|
3988
|
-
* @description
|
|
6661
|
+
* Track an event about a contact, from your server. API keys only
|
|
6662
|
+
* @description Counts the event `name` on the contact that `visitor` names, which it creates or updates. Each contact keeps, per name, how often it happened and when, first and last, and no log. Conditions read `events.<name>.count` and `events.<name>.lastAt`, and a live campaign with the trigger `{ type: "event", name }` runs for the contact, with `properties` in its text. Properties are never stored. A repeat of a recent `id` counts once.
|
|
3989
6663
|
*/
|
|
3990
6664
|
post: {
|
|
3991
6665
|
parameters: {
|
|
@@ -3999,20 +6673,33 @@ export interface paths {
|
|
|
3999
6673
|
requestBody: {
|
|
4000
6674
|
content: {
|
|
4001
6675
|
"application/json": {
|
|
4002
|
-
visitor: components["schemas"]["
|
|
4003
|
-
|
|
6676
|
+
visitor: components["schemas"]["VisitorSelector"];
|
|
6677
|
+
/** @example export.finished */
|
|
6678
|
+
name: string;
|
|
6679
|
+
/** @description Values for `{{ event.properties.<key> }}` in an `event` campaign's text. Never stored */
|
|
6680
|
+
properties?: {
|
|
6681
|
+
[key: string]: unknown;
|
|
6682
|
+
};
|
|
6683
|
+
/**
|
|
6684
|
+
* Format: date-time
|
|
6685
|
+
* @description When it happened. Now if left out
|
|
6686
|
+
*/
|
|
6687
|
+
occurredAt?: string;
|
|
6688
|
+
/** @description Your own ID for this event, so a retry soon after counts once */
|
|
6689
|
+
id?: string;
|
|
4004
6690
|
};
|
|
4005
6691
|
};
|
|
4006
6692
|
};
|
|
4007
6693
|
responses: {
|
|
4008
|
-
/** @description
|
|
6694
|
+
/** @description Tracked. `counted` is false for a repeat of a recent `id` */
|
|
4009
6695
|
200: {
|
|
4010
6696
|
headers: {
|
|
4011
6697
|
[name: string]: unknown;
|
|
4012
6698
|
};
|
|
4013
6699
|
content: {
|
|
4014
6700
|
"application/json": {
|
|
4015
|
-
|
|
6701
|
+
visitorId: string;
|
|
6702
|
+
counted: boolean;
|
|
4016
6703
|
};
|
|
4017
6704
|
};
|
|
4018
6705
|
};
|
|
@@ -4043,7 +6730,7 @@ export interface paths {
|
|
|
4043
6730
|
"application/json": components["schemas"]["Error"];
|
|
4044
6731
|
};
|
|
4045
6732
|
};
|
|
4046
|
-
/** @description
|
|
6733
|
+
/** @description forbidden: a member sent it. Only your server tracks events, with a key */
|
|
4047
6734
|
403: {
|
|
4048
6735
|
headers: {
|
|
4049
6736
|
[name: string]: unknown;
|
|
@@ -4052,7 +6739,7 @@ export interface paths {
|
|
|
4052
6739
|
"application/json": components["schemas"]["Error"];
|
|
4053
6740
|
};
|
|
4054
6741
|
};
|
|
4055
|
-
/** @description not_found:
|
|
6742
|
+
/** @description not_found: no visitor has this `id` */
|
|
4056
6743
|
404: {
|
|
4057
6744
|
headers: {
|
|
4058
6745
|
[name: string]: unknown;
|
|
@@ -4945,7 +7632,7 @@ export interface components {
|
|
|
4945
7632
|
Error: {
|
|
4946
7633
|
error: {
|
|
4947
7634
|
/** @enum {string} */
|
|
4948
|
-
code: "already_active" | "already_member" | "bad_endpoint" | "bad_origin" | "bad_signature" | "billing_unavailable" | "blocked" | "bots_paused" | "busy" | "check_unavailable" | "checkout_retry_later" | "conversation_closed" | "drafts_text_only" | "email_mismatch" | "email_rejected" | "email_taken" | "email_unavailable" | "forbidden" | "human_handling" | "grant_limit" | "internal_error" | "invalid_client" | "invalid_name" | "invalid_redirect_uri" | "invalid_reply_to" | "invalid_request" | "invite_invalid" | "invite_other_email" | "label_limit" | "label_name_taken" | "last_owner" | "last_workspace" | "manual_review" | "length_required" | "link_invalid" | "mail_failed" | "message_seen" | "name_mismatch" | "no_setup" | "no_customer" | "no_email" | "no_removal" | "not_a_member" | "not_an_image" | "not_found" | "operator_limit" | "origin_not_allowed" | "payment_pending" | "payment_required" | "push_unavailable" | "read_only" | "removal_blocked" | "removal_not_needed" | "saved_reply_limit" | "saved_reply_shortcut_taken" | "send_as_member_required" | "send_email_required" | "send_mode_required" | "signed_in" | "sign_in_again" | "site_limit" | "storage_full" | "suspended" | "team_changed" | "too_large" | "too_many_attempts" | "too_many_pixels" | "too_many_requests" | "too_many_streams" | "too_many_waiting" | "too_slow" | "two_factor_off" | "two_factor_on" | "two_factor_required" | "two_factor_unreadable" | "type_not_allowed" | "unauthorized" | "unsupported_media_type" | "webhook_limit" | "workspace_deleted" | "wrong_code";
|
|
7635
|
+
code: "already_active" | "already_member" | "bad_endpoint" | "bad_origin" | "bad_signature" | "billing_unavailable" | "blocked" | "bots_paused" | "busy" | "campaign_ended" | "campaign_key_taken" | "campaign_live" | "campaign_not_live" | "campaign_sent" | "check_unavailable" | "checkout_retry_later" | "conversation_closed" | "drafts_text_only" | "email_mismatch" | "email_rejected" | "email_taken" | "email_unavailable" | "forbidden" | "human_handling" | "grant_limit" | "internal_error" | "invalid_client" | "invalid_name" | "invalid_redirect_uri" | "invalid_reply_to" | "invalid_request" | "invite_invalid" | "invite_other_email" | "label_limit" | "label_name_taken" | "last_owner" | "last_workspace" | "manual_review" | "length_required" | "link_invalid" | "mail_failed" | "message_seen" | "name_mismatch" | "no_setup" | "no_customer" | "no_email" | "no_removal" | "not_a_member" | "not_an_image" | "not_found" | "operator_limit" | "opted_out" | "origin_not_allowed" | "payment_pending" | "payment_required" | "push_unavailable" | "read_only" | "removal_blocked" | "removal_not_needed" | "saved_reply_limit" | "saved_reply_shortcut_taken" | "send_as_member_required" | "send_email_required" | "send_mode_required" | "signed_in" | "sign_in_again" | "site_limit" | "storage_full" | "suspended" | "team_changed" | "too_large" | "too_many_attempts" | "too_many_pixels" | "too_many_requests" | "too_many_streams" | "too_many_waiting" | "too_slow" | "two_factor_off" | "two_factor_on" | "two_factor_required" | "two_factor_unreadable" | "type_not_allowed" | "unauthorized" | "unsupported_media_type" | "webhook_limit" | "workspace_deleted" | "wrong_code";
|
|
4949
7636
|
message: string;
|
|
4950
7637
|
requestId?: string;
|
|
4951
7638
|
};
|
|
@@ -5126,6 +7813,7 @@ export interface components {
|
|
|
5126
7813
|
authorName: string | null;
|
|
5127
7814
|
authorPictureUrl: string | null;
|
|
5128
7815
|
authorId: string | null;
|
|
7816
|
+
campaignId: string | null;
|
|
5129
7817
|
createdAt: string;
|
|
5130
7818
|
};
|
|
5131
7819
|
Visitor: {
|
|
@@ -5137,6 +7825,7 @@ export interface components {
|
|
|
5137
7825
|
lastReadSeq: string;
|
|
5138
7826
|
unread: number;
|
|
5139
7827
|
readCursor: string;
|
|
7828
|
+
optedOut: boolean;
|
|
5140
7829
|
};
|
|
5141
7830
|
/**
|
|
5142
7831
|
* @example {
|
|
@@ -5410,7 +8099,7 @@ export interface components {
|
|
|
5410
8099
|
Webhook: {
|
|
5411
8100
|
id: string;
|
|
5412
8101
|
url: string;
|
|
5413
|
-
events: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired")[];
|
|
8102
|
+
events: ("conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired" | "campaign.updated")[];
|
|
5414
8103
|
enabled: boolean;
|
|
5415
8104
|
createdBy: {
|
|
5416
8105
|
/** @enum {string} */
|
|
@@ -5423,7 +8112,7 @@ export interface components {
|
|
|
5423
8112
|
id: string;
|
|
5424
8113
|
eventId: string;
|
|
5425
8114
|
/** @enum {string} */
|
|
5426
|
-
type: "conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired";
|
|
8115
|
+
type: "conversation.created" | "message.created" | "message.updated" | "message.deleted" | "conversation.closed" | "conversation.reopened" | "conversation.assigned" | "conversation.handoff" | "conversation.given_back" | "conversation.labeled" | "outbound_message.sent" | "outbound_message.delivered" | "outbound_message.read" | "outbound_message.clicked" | "outbound_message.replied" | "outbound_message.dismissed" | "outbound_message.cancelled" | "outbound_message.expired" | "campaign.updated";
|
|
5427
8116
|
/** @enum {string} */
|
|
5428
8117
|
status: "pending" | "sent" | "failed";
|
|
5429
8118
|
attempts: number;
|
|
@@ -5580,12 +8269,28 @@ export interface components {
|
|
|
5580
8269
|
viewedAt: string;
|
|
5581
8270
|
}[];
|
|
5582
8271
|
};
|
|
8272
|
+
ContactFields: {
|
|
8273
|
+
attributes: {
|
|
8274
|
+
name: string;
|
|
8275
|
+
/** @description How many of those contacts have it */
|
|
8276
|
+
contacts: number;
|
|
8277
|
+
/** @description When one of them was last seen */
|
|
8278
|
+
lastSeenAt: string;
|
|
8279
|
+
}[];
|
|
8280
|
+
events: {
|
|
8281
|
+
name: string;
|
|
8282
|
+
/** @description How many of those contacts have it */
|
|
8283
|
+
contacts: number;
|
|
8284
|
+
/** @description When one of them last did it */
|
|
8285
|
+
lastAt: string;
|
|
8286
|
+
}[];
|
|
8287
|
+
};
|
|
5583
8288
|
OutboundMessage: {
|
|
5584
8289
|
id: string;
|
|
5585
8290
|
/** @enum {string} */
|
|
5586
8291
|
status: "scheduled" | "sent" | "delivered" | "read" | "replied" | "dismissed" | "cancelled" | "expired";
|
|
5587
8292
|
/** @enum {string|null} */
|
|
5588
|
-
statusReason: "open_conversation" | "open_conversation_skipped" | "human_handling" | "bots_paused" | "blocked" | "permission_revoked" | "workspace_inactive" | "unless_matched" | "cancelled_by_request" | "conversation_deleted" | null;
|
|
8293
|
+
statusReason: "open_conversation" | "open_conversation_skipped" | "human_handling" | "bots_paused" | "blocked" | "permission_revoked" | "workspace_inactive" | "unless_matched" | "cancelled_by_request" | "conversation_deleted" | "opted_out" | "audience_unmatched" | "frequency_capped" | "goal_reached" | "outside_business_hours" | "outside_send_window" | "campaign_paused" | "campaign_ended" | "control_group" | null;
|
|
5589
8294
|
visitorId: string;
|
|
5590
8295
|
body: string | null;
|
|
5591
8296
|
buttons: components["schemas"]["OutboundButton"][];
|
|
@@ -5613,6 +8318,9 @@ export interface components {
|
|
|
5613
8318
|
sendEmail: boolean;
|
|
5614
8319
|
conversationId: string | null;
|
|
5615
8320
|
messageId: string | null;
|
|
8321
|
+
campaignId: string | null;
|
|
8322
|
+
campaignRunId: string | null;
|
|
8323
|
+
variant: string | null;
|
|
5616
8324
|
dedupeKey: string | null;
|
|
5617
8325
|
sendAt: string;
|
|
5618
8326
|
expiresAt: string | null;
|
|
@@ -5656,7 +8364,7 @@ export interface components {
|
|
|
5656
8364
|
email: string;
|
|
5657
8365
|
};
|
|
5658
8366
|
/**
|
|
5659
|
-
* @description A rule `{ field, op, value }`, or a group `{ all: [...] }`, `{ any: [...] }` or `{ not: ... }`, which nest. Fields: name, firstName, email, userId, language, country, timeZone, signedIn, firstSeenAt, lastSeenAt, hasChatted, conversationCount, attributes.<key>. Ops: eq, ne, in, not_in, exists, missing, gt, gte, lt, lte, contains, older_than; older_than takes a duration such as 7d.
|
|
8367
|
+
* @description A rule `{ field, op, value }`, or a group `{ all: [...] }`, `{ any: [...] }` or `{ not: ... }`, which nest. Fields: name, firstName, email, userId, language, country, timeZone, signedIn, firstSeenAt, lastSeenAt, hasChatted, conversationCount, optedOut, attributes.<key>, events.<name>.count, events.<name>.lastAt. Ops: eq, ne, in, not_in, exists, missing, gt, gte, lt, lte, contains, older_than; older_than takes a duration such as 7d.
|
|
5660
8368
|
* @example {
|
|
5661
8369
|
* "all": [
|
|
5662
8370
|
* {
|
|
@@ -5693,6 +8401,424 @@ export interface components {
|
|
|
5693
8401
|
/** Format: uuid */
|
|
5694
8402
|
id: string;
|
|
5695
8403
|
};
|
|
8404
|
+
Campaign: {
|
|
8405
|
+
id: string;
|
|
8406
|
+
/** @enum {string} */
|
|
8407
|
+
status: "draft" | "live" | "paused" | "ended";
|
|
8408
|
+
version: number;
|
|
8409
|
+
definition: components["schemas"]["CampaignDefinition"];
|
|
8410
|
+
totals: {
|
|
8411
|
+
entered: number;
|
|
8412
|
+
sent: number;
|
|
8413
|
+
delivered: number;
|
|
8414
|
+
read: number;
|
|
8415
|
+
replied: number;
|
|
8416
|
+
dismissed: number;
|
|
8417
|
+
goalReached: number;
|
|
8418
|
+
conversationsStarted: number;
|
|
8419
|
+
clicks: {
|
|
8420
|
+
[key: string]: number;
|
|
8421
|
+
};
|
|
8422
|
+
};
|
|
8423
|
+
createdAt: string;
|
|
8424
|
+
updatedAt: string;
|
|
8425
|
+
liveAt: string | null;
|
|
8426
|
+
endedAt: string | null;
|
|
8427
|
+
};
|
|
8428
|
+
/**
|
|
8429
|
+
* @example {
|
|
8430
|
+
* "key": "dns-help",
|
|
8431
|
+
* "name": "DNS help after signup",
|
|
8432
|
+
* "audience": {
|
|
8433
|
+
* "field": "attributes.domainVerified",
|
|
8434
|
+
* "op": "ne",
|
|
8435
|
+
* "value": true
|
|
8436
|
+
* },
|
|
8437
|
+
* "trigger": {
|
|
8438
|
+
* "type": "match",
|
|
8439
|
+
* "delay": "1h"
|
|
8440
|
+
* },
|
|
8441
|
+
* "message": {
|
|
8442
|
+
* "sender": {
|
|
8443
|
+
* "email": "julien@example.com"
|
|
8444
|
+
* },
|
|
8445
|
+
* "body": "Hi {{ firstName | default: \"there\" }}, want me to check your DNS with you?",
|
|
8446
|
+
* "buttons": [
|
|
8447
|
+
* {
|
|
8448
|
+
* "label": "Yes, please",
|
|
8449
|
+
* "value": "yes"
|
|
8450
|
+
* },
|
|
8451
|
+
* {
|
|
8452
|
+
* "label": "I'm fine",
|
|
8453
|
+
* "dismiss": true,
|
|
8454
|
+
* "value": "no"
|
|
8455
|
+
* }
|
|
8456
|
+
* ]
|
|
8457
|
+
* },
|
|
8458
|
+
* "presentation": {
|
|
8459
|
+
* "startConversation": "on_reply",
|
|
8460
|
+
* "show": "preview",
|
|
8461
|
+
* "ifConversationOpen": "skip"
|
|
8462
|
+
* },
|
|
8463
|
+
* "delivery": {
|
|
8464
|
+
* "sendEmail": false
|
|
8465
|
+
* },
|
|
8466
|
+
* "rules": {
|
|
8467
|
+
* "frequency": "once",
|
|
8468
|
+
* "businessHours": true,
|
|
8469
|
+
* "endsAt": null
|
|
8470
|
+
* }
|
|
8471
|
+
* }
|
|
8472
|
+
*/
|
|
8473
|
+
CampaignDefinition: {
|
|
8474
|
+
/**
|
|
8475
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8476
|
+
* @example dns-help
|
|
8477
|
+
*/
|
|
8478
|
+
key: string;
|
|
8479
|
+
name: string;
|
|
8480
|
+
audience?: components["schemas"]["Condition"] & unknown;
|
|
8481
|
+
trigger: components["schemas"]["CampaignTrigger"];
|
|
8482
|
+
message: components["schemas"]["CampaignMessage"];
|
|
8483
|
+
presentation: {
|
|
8484
|
+
/** @enum {string} */
|
|
8485
|
+
startConversation: "on_reply" | "now";
|
|
8486
|
+
/** @enum {string} */
|
|
8487
|
+
show: "badge" | "preview" | "chat";
|
|
8488
|
+
/** @enum {string} */
|
|
8489
|
+
ifConversationOpen: "hold" | "join" | "skip";
|
|
8490
|
+
};
|
|
8491
|
+
/**
|
|
8492
|
+
* @default {
|
|
8493
|
+
* "sendEmail": false
|
|
8494
|
+
* }
|
|
8495
|
+
*/
|
|
8496
|
+
delivery?: {
|
|
8497
|
+
/** @default false */
|
|
8498
|
+
sendEmail?: boolean;
|
|
8499
|
+
assignOnReply?: boolean;
|
|
8500
|
+
/**
|
|
8501
|
+
* @description A number with m, h or d, such as 1h
|
|
8502
|
+
* @example 1h
|
|
8503
|
+
*/
|
|
8504
|
+
expiresIn?: string;
|
|
8505
|
+
/**
|
|
8506
|
+
* @description An `on_reply` message still unread after this time goes in a conversation and out by email, to a visitor with an email address
|
|
8507
|
+
* @example 1h
|
|
8508
|
+
*/
|
|
8509
|
+
emailIfUnread?: string;
|
|
8510
|
+
};
|
|
8511
|
+
/**
|
|
8512
|
+
* @default {
|
|
8513
|
+
* "frequency": "once",
|
|
8514
|
+
* "businessHours": false,
|
|
8515
|
+
* "endsAt": null
|
|
8516
|
+
* }
|
|
8517
|
+
*/
|
|
8518
|
+
rules?: {
|
|
8519
|
+
/**
|
|
8520
|
+
* @description `"once"` per contact, or `{ "every": "7d" }` at most
|
|
8521
|
+
* @default once
|
|
8522
|
+
*/
|
|
8523
|
+
frequency?: "once" | {
|
|
8524
|
+
/**
|
|
8525
|
+
* @description A number with m, h or d, such as 1h
|
|
8526
|
+
* @example 1h
|
|
8527
|
+
*/
|
|
8528
|
+
every: string;
|
|
8529
|
+
};
|
|
8530
|
+
/**
|
|
8531
|
+
* @description Send only during the workspace's business hours
|
|
8532
|
+
* @default false
|
|
8533
|
+
*/
|
|
8534
|
+
businessHours?: boolean;
|
|
8535
|
+
/** @description Send only between these times on the visitor's own clock */
|
|
8536
|
+
sendWindow?: {
|
|
8537
|
+
/** @example 09:00 */
|
|
8538
|
+
from: string;
|
|
8539
|
+
/** @example 09:00 */
|
|
8540
|
+
to: string;
|
|
8541
|
+
};
|
|
8542
|
+
/**
|
|
8543
|
+
* Format: date-time
|
|
8544
|
+
* @default null
|
|
8545
|
+
*/
|
|
8546
|
+
endsAt?: string | null;
|
|
8547
|
+
exitWhen?: components["schemas"]["CampaignCondition"];
|
|
8548
|
+
/**
|
|
8549
|
+
* @description A condition, plus `within`: a contact who matches it within that time after a message reached the goal, which ends the campaign for them and counts in results
|
|
8550
|
+
* @example {
|
|
8551
|
+
* "field": "attributes.domainVerified",
|
|
8552
|
+
* "op": "eq",
|
|
8553
|
+
* "value": true,
|
|
8554
|
+
* "within": "7d"
|
|
8555
|
+
* }
|
|
8556
|
+
*/
|
|
8557
|
+
goal?: unknown;
|
|
8558
|
+
};
|
|
8559
|
+
/** @description A/B variants by weight, each with its own message or the campaign's, and at most one `control: true` group that gets nothing */
|
|
8560
|
+
variants?: ({
|
|
8561
|
+
/**
|
|
8562
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8563
|
+
* @example dns-help
|
|
8564
|
+
*/
|
|
8565
|
+
key: string;
|
|
8566
|
+
weight: number;
|
|
8567
|
+
message?: components["schemas"]["CampaignMessage"] & unknown;
|
|
8568
|
+
} | {
|
|
8569
|
+
/**
|
|
8570
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8571
|
+
* @example dns-help
|
|
8572
|
+
*/
|
|
8573
|
+
key: string;
|
|
8574
|
+
weight: number;
|
|
8575
|
+
/**
|
|
8576
|
+
* @description The control group: no message, so the goal's results can compare
|
|
8577
|
+
* @enum {boolean}
|
|
8578
|
+
*/
|
|
8579
|
+
control: true;
|
|
8580
|
+
})[];
|
|
8581
|
+
};
|
|
8582
|
+
/** @description `match`: when a contact starts to match the audience, after `delay`. `schedule`: everyone in the audience at a time of day, once or again. `event`: when your server tracks the event `name`. `page`: in the widget, after `seconds` on a page that matches `url`. `api`: only when your code calls send */
|
|
8583
|
+
CampaignTrigger: {
|
|
8584
|
+
/** @enum {string} */
|
|
8585
|
+
type: "match";
|
|
8586
|
+
/**
|
|
8587
|
+
* @description A number with m, h or d, such as 1h
|
|
8588
|
+
* @example 1h
|
|
8589
|
+
*/
|
|
8590
|
+
delay?: string;
|
|
8591
|
+
} | {
|
|
8592
|
+
/** @enum {string} */
|
|
8593
|
+
type: "schedule";
|
|
8594
|
+
/** @enum {string} */
|
|
8595
|
+
repeat: "once" | "daily" | "weekly" | "monthly";
|
|
8596
|
+
/** @example 09:00 */
|
|
8597
|
+
time: string;
|
|
8598
|
+
days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[];
|
|
8599
|
+
/**
|
|
8600
|
+
* Format: date
|
|
8601
|
+
* @example 2026-12-01
|
|
8602
|
+
*/
|
|
8603
|
+
startDate: string;
|
|
8604
|
+
/**
|
|
8605
|
+
* Format: date
|
|
8606
|
+
* @example 2026-12-01
|
|
8607
|
+
*/
|
|
8608
|
+
endDate?: string;
|
|
8609
|
+
/** @default UTC */
|
|
8610
|
+
timeZone?: string;
|
|
8611
|
+
} | {
|
|
8612
|
+
/** @enum {string} */
|
|
8613
|
+
type: "event";
|
|
8614
|
+
name: string;
|
|
8615
|
+
/**
|
|
8616
|
+
* @description A number with m, h or d, such as 1h
|
|
8617
|
+
* @example 1h
|
|
8618
|
+
*/
|
|
8619
|
+
delay?: string;
|
|
8620
|
+
} | {
|
|
8621
|
+
/** @enum {string} */
|
|
8622
|
+
type: "page";
|
|
8623
|
+
/** @description A path or a full URL, where `*` matches any text, such as `/pricing*`. A path matches on any allowed site */
|
|
8624
|
+
url: string;
|
|
8625
|
+
seconds: number;
|
|
8626
|
+
} | {
|
|
8627
|
+
/** @enum {string} */
|
|
8628
|
+
type: "api";
|
|
8629
|
+
};
|
|
8630
|
+
CampaignMessage: {
|
|
8631
|
+
sender?: components["schemas"]["OutboundSender"];
|
|
8632
|
+
body: string;
|
|
8633
|
+
buttons?: components["schemas"]["OutboundButton"][];
|
|
8634
|
+
/** @description A body and buttons per language, by the visitor's language */
|
|
8635
|
+
translations?: {
|
|
8636
|
+
en?: {
|
|
8637
|
+
body: string;
|
|
8638
|
+
buttons?: components["schemas"]["OutboundButton"][];
|
|
8639
|
+
};
|
|
8640
|
+
fr?: {
|
|
8641
|
+
body: string;
|
|
8642
|
+
buttons?: components["schemas"]["OutboundButton"][];
|
|
8643
|
+
};
|
|
8644
|
+
es?: {
|
|
8645
|
+
body: string;
|
|
8646
|
+
buttons?: components["schemas"]["OutboundButton"][];
|
|
8647
|
+
};
|
|
8648
|
+
};
|
|
8649
|
+
};
|
|
8650
|
+
/**
|
|
8651
|
+
* @description A contact who matches it leaves the campaign, and their waiting messages from it are cancelled. `repliedToCampaign` stops it once they answer
|
|
8652
|
+
* @example {
|
|
8653
|
+
* "all": [
|
|
8654
|
+
* {
|
|
8655
|
+
* "field": "attributes.plan",
|
|
8656
|
+
* "op": "in",
|
|
8657
|
+
* "value": [
|
|
8658
|
+
* "trial",
|
|
8659
|
+
* "pro"
|
|
8660
|
+
* ]
|
|
8661
|
+
* },
|
|
8662
|
+
* {
|
|
8663
|
+
* "field": "attributes.onboarded",
|
|
8664
|
+
* "op": "ne",
|
|
8665
|
+
* "value": true
|
|
8666
|
+
* }
|
|
8667
|
+
* ]
|
|
8668
|
+
* }
|
|
8669
|
+
*/
|
|
8670
|
+
CampaignCondition: {
|
|
8671
|
+
field: string;
|
|
8672
|
+
/** @enum {string} */
|
|
8673
|
+
op: "eq" | "ne" | "in" | "not_in" | "exists" | "missing" | "gt" | "gte" | "lt" | "lte" | "contains" | "older_than";
|
|
8674
|
+
value?: (string | number | boolean) | (string | number | boolean)[];
|
|
8675
|
+
} | {
|
|
8676
|
+
all: components["schemas"]["Condition"][];
|
|
8677
|
+
} | {
|
|
8678
|
+
any: components["schemas"]["Condition"][];
|
|
8679
|
+
} | {
|
|
8680
|
+
not: components["schemas"]["Condition"];
|
|
8681
|
+
};
|
|
8682
|
+
CampaignSettingsView: components["schemas"]["CampaignSettings"] & {
|
|
8683
|
+
/** @description The member or key who paused every campaign, by its name then, or null */
|
|
8684
|
+
pausedBy: string | null;
|
|
8685
|
+
/** @description When, or null while they run */
|
|
8686
|
+
pausedAt: string | null;
|
|
8687
|
+
};
|
|
8688
|
+
CampaignSettings: {
|
|
8689
|
+
/** @description Every campaign's messages wait while true */
|
|
8690
|
+
paused: boolean;
|
|
8691
|
+
/** @description The fewest hours between two campaign messages to one visitor. 0 turns it off */
|
|
8692
|
+
gapHours: number;
|
|
8693
|
+
};
|
|
8694
|
+
CampaignPatch: {
|
|
8695
|
+
/**
|
|
8696
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8697
|
+
* @example dns-help
|
|
8698
|
+
*/
|
|
8699
|
+
key?: string;
|
|
8700
|
+
name?: string;
|
|
8701
|
+
audience?: components["schemas"]["Condition"] & unknown;
|
|
8702
|
+
trigger?: components["schemas"]["CampaignTrigger"];
|
|
8703
|
+
message?: components["schemas"]["CampaignMessage"];
|
|
8704
|
+
presentation?: {
|
|
8705
|
+
/** @enum {string} */
|
|
8706
|
+
startConversation: "on_reply" | "now";
|
|
8707
|
+
/** @enum {string} */
|
|
8708
|
+
show: "badge" | "preview" | "chat";
|
|
8709
|
+
/** @enum {string} */
|
|
8710
|
+
ifConversationOpen: "hold" | "join" | "skip";
|
|
8711
|
+
};
|
|
8712
|
+
delivery?: {
|
|
8713
|
+
/** @default false */
|
|
8714
|
+
sendEmail?: boolean;
|
|
8715
|
+
assignOnReply?: boolean;
|
|
8716
|
+
/**
|
|
8717
|
+
* @description A number with m, h or d, such as 1h
|
|
8718
|
+
* @example 1h
|
|
8719
|
+
*/
|
|
8720
|
+
expiresIn?: string;
|
|
8721
|
+
/**
|
|
8722
|
+
* @description An `on_reply` message still unread after this time goes in a conversation and out by email, to a visitor with an email address
|
|
8723
|
+
* @example 1h
|
|
8724
|
+
*/
|
|
8725
|
+
emailIfUnread?: string;
|
|
8726
|
+
};
|
|
8727
|
+
rules?: {
|
|
8728
|
+
/**
|
|
8729
|
+
* @description `"once"` per contact, or `{ "every": "7d" }` at most
|
|
8730
|
+
* @default once
|
|
8731
|
+
*/
|
|
8732
|
+
frequency?: "once" | {
|
|
8733
|
+
/**
|
|
8734
|
+
* @description A number with m, h or d, such as 1h
|
|
8735
|
+
* @example 1h
|
|
8736
|
+
*/
|
|
8737
|
+
every: string;
|
|
8738
|
+
};
|
|
8739
|
+
/**
|
|
8740
|
+
* @description Send only during the workspace's business hours
|
|
8741
|
+
* @default false
|
|
8742
|
+
*/
|
|
8743
|
+
businessHours?: boolean;
|
|
8744
|
+
/** @description Send only between these times on the visitor's own clock */
|
|
8745
|
+
sendWindow?: {
|
|
8746
|
+
/** @example 09:00 */
|
|
8747
|
+
from: string;
|
|
8748
|
+
/** @example 09:00 */
|
|
8749
|
+
to: string;
|
|
8750
|
+
};
|
|
8751
|
+
/**
|
|
8752
|
+
* Format: date-time
|
|
8753
|
+
* @default null
|
|
8754
|
+
*/
|
|
8755
|
+
endsAt?: string | null;
|
|
8756
|
+
exitWhen?: components["schemas"]["CampaignCondition"];
|
|
8757
|
+
/**
|
|
8758
|
+
* @description A condition, plus `within`: a contact who matches it within that time after a message reached the goal, which ends the campaign for them and counts in results
|
|
8759
|
+
* @example {
|
|
8760
|
+
* "field": "attributes.domainVerified",
|
|
8761
|
+
* "op": "eq",
|
|
8762
|
+
* "value": true,
|
|
8763
|
+
* "within": "7d"
|
|
8764
|
+
* }
|
|
8765
|
+
*/
|
|
8766
|
+
goal?: unknown;
|
|
8767
|
+
};
|
|
8768
|
+
/** @description A/B variants by weight, each with its own message or the campaign's, and at most one `control: true` group that gets nothing */
|
|
8769
|
+
variants?: ({
|
|
8770
|
+
/**
|
|
8771
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8772
|
+
* @example dns-help
|
|
8773
|
+
*/
|
|
8774
|
+
key: string;
|
|
8775
|
+
weight: number;
|
|
8776
|
+
message?: components["schemas"]["CampaignMessage"] & unknown;
|
|
8777
|
+
} | {
|
|
8778
|
+
/**
|
|
8779
|
+
* @description Lowercase letters, digits, - and _, unique in the workspace
|
|
8780
|
+
* @example dns-help
|
|
8781
|
+
*/
|
|
8782
|
+
key: string;
|
|
8783
|
+
weight: number;
|
|
8784
|
+
/**
|
|
8785
|
+
* @description The control group: no message, so the goal's results can compare
|
|
8786
|
+
* @enum {boolean}
|
|
8787
|
+
*/
|
|
8788
|
+
control: true;
|
|
8789
|
+
})[];
|
|
8790
|
+
};
|
|
8791
|
+
CampaignResults: {
|
|
8792
|
+
days: {
|
|
8793
|
+
entered: number;
|
|
8794
|
+
sent: number;
|
|
8795
|
+
delivered: number;
|
|
8796
|
+
read: number;
|
|
8797
|
+
replied: number;
|
|
8798
|
+
dismissed: number;
|
|
8799
|
+
goalReached: number;
|
|
8800
|
+
conversationsStarted: number;
|
|
8801
|
+
clicks: {
|
|
8802
|
+
[key: string]: number;
|
|
8803
|
+
};
|
|
8804
|
+
day: string;
|
|
8805
|
+
variant: string | null;
|
|
8806
|
+
}[];
|
|
8807
|
+
variants: {
|
|
8808
|
+
entered: number;
|
|
8809
|
+
sent: number;
|
|
8810
|
+
delivered: number;
|
|
8811
|
+
read: number;
|
|
8812
|
+
replied: number;
|
|
8813
|
+
dismissed: number;
|
|
8814
|
+
goalReached: number;
|
|
8815
|
+
conversationsStarted: number;
|
|
8816
|
+
clicks: {
|
|
8817
|
+
[key: string]: number;
|
|
8818
|
+
};
|
|
8819
|
+
variant: string | null;
|
|
8820
|
+
}[];
|
|
8821
|
+
};
|
|
5696
8822
|
LiveVisitor: {
|
|
5697
8823
|
tab: string;
|
|
5698
8824
|
page: string;
|