@samva/webhooks 0.21.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/effect.js +4 -4
- package/dist/{json-schemas.gen-BPULV030.js → json-schemas.gen-CPzGmYvg.js} +1362 -17
- package/dist/promise.js +2 -2
- package/dist/protocol-8ERuoP0F.js +730 -0
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +756 -32
- package/dist/schemas.gen.js +597 -34
- package/dist/types.gen.d.ts +515 -17
- package/package.json +4 -4
- package/dist/protocol-D0_izLnI.js +0 -591
package/dist/schemas.gen.js
CHANGED
|
@@ -5,10 +5,14 @@ const MessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
5
5
|
timestamp: Schema.String,
|
|
6
6
|
data: Schema.StructWithRest(Schema.Struct({
|
|
7
7
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
8
|
-
channel: Schema.
|
|
8
|
+
channel: Schema.Literals([
|
|
9
|
+
"sms",
|
|
10
|
+
"whatsapp",
|
|
11
|
+
"email"
|
|
12
|
+
]),
|
|
9
13
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
10
14
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
11
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
15
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
12
16
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
13
17
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
14
18
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -16,16 +20,25 @@ const MessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
16
20
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
17
21
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
18
22
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
23
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
24
|
+
"marketing",
|
|
25
|
+
"utility",
|
|
26
|
+
"authentication"
|
|
27
|
+
]), Schema.Null])),
|
|
19
28
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
20
29
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
21
30
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
31
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
22
32
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
23
33
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
34
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
24
35
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
25
36
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
26
37
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
27
38
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
28
39
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
40
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
41
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
29
42
|
messageId: Schema.String,
|
|
30
43
|
organizationId: Schema.String
|
|
31
44
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -35,10 +48,14 @@ const MessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
35
48
|
timestamp: Schema.String,
|
|
36
49
|
data: Schema.StructWithRest(Schema.Struct({
|
|
37
50
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
38
|
-
channel: Schema.
|
|
51
|
+
channel: Schema.Literals([
|
|
52
|
+
"sms",
|
|
53
|
+
"whatsapp",
|
|
54
|
+
"email"
|
|
55
|
+
]),
|
|
39
56
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
40
57
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
41
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
58
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
42
59
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
43
60
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
44
61
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -46,16 +63,68 @@ const MessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
46
63
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
47
64
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
48
65
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
66
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
67
|
+
"marketing",
|
|
68
|
+
"utility",
|
|
69
|
+
"authentication"
|
|
70
|
+
]), Schema.Null])),
|
|
49
71
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
50
72
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
51
73
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
74
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
52
75
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
53
76
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
77
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
54
78
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
55
79
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
56
80
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
57
81
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
58
82
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
83
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
84
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
85
|
+
messageId: Schema.String,
|
|
86
|
+
organizationId: Schema.String
|
|
87
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
88
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
89
|
+
const MessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
90
|
+
type: Schema.Literal("message.read"),
|
|
91
|
+
timestamp: Schema.String,
|
|
92
|
+
data: Schema.StructWithRest(Schema.Struct({
|
|
93
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
94
|
+
channel: Schema.Literals([
|
|
95
|
+
"sms",
|
|
96
|
+
"whatsapp",
|
|
97
|
+
"email"
|
|
98
|
+
]),
|
|
99
|
+
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
100
|
+
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
101
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
102
|
+
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
103
|
+
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
104
|
+
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
105
|
+
errorCode: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
106
|
+
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
107
|
+
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
108
|
+
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
109
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
110
|
+
"marketing",
|
|
111
|
+
"utility",
|
|
112
|
+
"authentication"
|
|
113
|
+
]), Schema.Null])),
|
|
114
|
+
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
115
|
+
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
116
|
+
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
117
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
118
|
+
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
119
|
+
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
120
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
121
|
+
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
122
|
+
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
123
|
+
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
124
|
+
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
125
|
+
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
126
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
127
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
59
128
|
messageId: Schema.String,
|
|
60
129
|
organizationId: Schema.String
|
|
61
130
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -65,10 +134,14 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
65
134
|
timestamp: Schema.String,
|
|
66
135
|
data: Schema.StructWithRest(Schema.Struct({
|
|
67
136
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
68
|
-
channel: Schema.
|
|
137
|
+
channel: Schema.Literals([
|
|
138
|
+
"sms",
|
|
139
|
+
"whatsapp",
|
|
140
|
+
"email"
|
|
141
|
+
]),
|
|
69
142
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
70
143
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
71
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
144
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
72
145
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
73
146
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
74
147
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -76,16 +149,25 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
76
149
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
77
150
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
78
151
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
152
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
153
|
+
"marketing",
|
|
154
|
+
"utility",
|
|
155
|
+
"authentication"
|
|
156
|
+
]), Schema.Null])),
|
|
79
157
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
80
158
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
81
159
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
160
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
82
161
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
83
162
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
163
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
84
164
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
85
165
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
86
166
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
87
167
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
88
168
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
169
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
170
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
89
171
|
messageId: Schema.String,
|
|
90
172
|
organizationId: Schema.String
|
|
91
173
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -95,10 +177,14 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
95
177
|
timestamp: Schema.String,
|
|
96
178
|
data: Schema.StructWithRest(Schema.Struct({
|
|
97
179
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
98
|
-
channel: Schema.
|
|
180
|
+
channel: Schema.Literals([
|
|
181
|
+
"sms",
|
|
182
|
+
"whatsapp",
|
|
183
|
+
"email"
|
|
184
|
+
]),
|
|
99
185
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
100
186
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
101
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
187
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
102
188
|
recipient: Schema.String,
|
|
103
189
|
occurredAt: Schema.String,
|
|
104
190
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -106,16 +192,25 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
106
192
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
107
193
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
108
194
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
195
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
196
|
+
"marketing",
|
|
197
|
+
"utility",
|
|
198
|
+
"authentication"
|
|
199
|
+
]), Schema.Null])),
|
|
109
200
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
110
201
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
111
202
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
203
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
112
204
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
113
205
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
206
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
114
207
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
115
208
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
116
209
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
117
210
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
118
211
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
212
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
213
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
119
214
|
messageId: Schema.String,
|
|
120
215
|
organizationId: Schema.String
|
|
121
216
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -125,10 +220,14 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
125
220
|
timestamp: Schema.String,
|
|
126
221
|
data: Schema.StructWithRest(Schema.Struct({
|
|
127
222
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
128
|
-
channel: Schema.
|
|
223
|
+
channel: Schema.Literals([
|
|
224
|
+
"sms",
|
|
225
|
+
"whatsapp",
|
|
226
|
+
"email"
|
|
227
|
+
]),
|
|
129
228
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
130
229
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
131
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
230
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
132
231
|
recipient: Schema.String,
|
|
133
232
|
occurredAt: Schema.String,
|
|
134
233
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -136,16 +235,25 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
136
235
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
137
236
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
138
237
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
238
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
239
|
+
"marketing",
|
|
240
|
+
"utility",
|
|
241
|
+
"authentication"
|
|
242
|
+
]), Schema.Null])),
|
|
139
243
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
140
244
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
141
245
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
246
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
142
247
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
143
248
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
249
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
144
250
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
145
251
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
146
252
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
147
253
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
148
254
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
255
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
256
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
149
257
|
messageId: Schema.String,
|
|
150
258
|
organizationId: Schema.String
|
|
151
259
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -155,10 +263,14 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
155
263
|
timestamp: Schema.String,
|
|
156
264
|
data: Schema.StructWithRest(Schema.Struct({
|
|
157
265
|
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
158
|
-
channel: Schema.
|
|
266
|
+
channel: Schema.Literals([
|
|
267
|
+
"sms",
|
|
268
|
+
"whatsapp",
|
|
269
|
+
"email"
|
|
270
|
+
]),
|
|
159
271
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
160
272
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
161
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
273
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
162
274
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
163
275
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
164
276
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -166,16 +278,293 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
166
278
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
167
279
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
168
280
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
281
|
+
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
282
|
+
"marketing",
|
|
283
|
+
"utility",
|
|
284
|
+
"authentication"
|
|
285
|
+
]), Schema.Null])),
|
|
169
286
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
170
287
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
171
288
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
289
|
+
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
172
290
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
173
291
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
292
|
+
segments: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
174
293
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
175
294
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
176
295
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
177
296
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
178
297
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
298
|
+
parts: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
299
|
+
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
300
|
+
whatsapp: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
301
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
302
|
+
template: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
303
|
+
name: Schema.String,
|
|
304
|
+
language: Schema.String,
|
|
305
|
+
components: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
306
|
+
type: Schema.Literals([
|
|
307
|
+
"header",
|
|
308
|
+
"body",
|
|
309
|
+
"footer",
|
|
310
|
+
"button"
|
|
311
|
+
]),
|
|
312
|
+
sub_type: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
313
|
+
"url",
|
|
314
|
+
"quick_reply",
|
|
315
|
+
"copy_code",
|
|
316
|
+
"flow"
|
|
317
|
+
]), Schema.Null])),
|
|
318
|
+
index: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
319
|
+
parameters: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
320
|
+
type: Schema.Literals([
|
|
321
|
+
"text",
|
|
322
|
+
"currency",
|
|
323
|
+
"date_time",
|
|
324
|
+
"image",
|
|
325
|
+
"document",
|
|
326
|
+
"video",
|
|
327
|
+
"coupon_code",
|
|
328
|
+
"action"
|
|
329
|
+
]),
|
|
330
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
331
|
+
currency: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
332
|
+
fallback_value: Schema.String,
|
|
333
|
+
code: Schema.String,
|
|
334
|
+
amount_1000: Schema.Finite
|
|
335
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
336
|
+
date_time: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ fallback_value: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
337
|
+
image: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ link: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
338
|
+
document: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
339
|
+
link: Schema.String,
|
|
340
|
+
filename: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
341
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
342
|
+
video: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ link: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
343
|
+
coupon_code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
344
|
+
action: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ flow_token: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]))
|
|
345
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
346
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
347
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
348
|
+
interactive: Schema.optionalKey(Schema.Union([
|
|
349
|
+
Schema.StructWithRest(Schema.Struct({
|
|
350
|
+
type: Schema.Literal("buttons"),
|
|
351
|
+
header: Schema.optionalKey(Schema.Union([
|
|
352
|
+
Schema.StructWithRest(Schema.Struct({
|
|
353
|
+
type: Schema.Literal("text"),
|
|
354
|
+
text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
|
|
355
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
356
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
357
|
+
type: Schema.Literal("image"),
|
|
358
|
+
url: Schema.String
|
|
359
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
360
|
+
type: Schema.Literal("image"),
|
|
361
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
362
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
363
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
364
|
+
type: Schema.Literal("video"),
|
|
365
|
+
url: Schema.String
|
|
366
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
367
|
+
type: Schema.Literal("video"),
|
|
368
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
369
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
370
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
371
|
+
type: Schema.Literal("document"),
|
|
372
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
|
|
373
|
+
url: Schema.String
|
|
374
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
375
|
+
type: Schema.Literal("document"),
|
|
376
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
|
|
377
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
378
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])])
|
|
379
|
+
])),
|
|
380
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })),
|
|
381
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
|
|
382
|
+
buttons: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
383
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })),
|
|
384
|
+
title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" }))
|
|
385
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(3).annotate({ expected: "a value with a length of at most 3" }))
|
|
386
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
387
|
+
Schema.StructWithRest(Schema.Struct({
|
|
388
|
+
type: Schema.Literal("list"),
|
|
389
|
+
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
390
|
+
type: Schema.Literal("text"),
|
|
391
|
+
text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
|
|
392
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
393
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })),
|
|
394
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
|
|
395
|
+
button: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })),
|
|
396
|
+
sections: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
397
|
+
title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" }))),
|
|
398
|
+
rows: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
399
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })),
|
|
400
|
+
title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })),
|
|
401
|
+
description: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(72).annotate({ expected: "a string with at most 72 code points" })))
|
|
402
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
403
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }))
|
|
404
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
405
|
+
Schema.StructWithRest(Schema.Struct({
|
|
406
|
+
type: Schema.Literal("cta_url"),
|
|
407
|
+
header: Schema.optionalKey(Schema.Union([
|
|
408
|
+
Schema.StructWithRest(Schema.Struct({
|
|
409
|
+
type: Schema.Literal("text"),
|
|
410
|
+
text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
|
|
411
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
412
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
413
|
+
type: Schema.Literal("image"),
|
|
414
|
+
url: Schema.String
|
|
415
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
416
|
+
type: Schema.Literal("image"),
|
|
417
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
418
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
419
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
420
|
+
type: Schema.Literal("video"),
|
|
421
|
+
url: Schema.String
|
|
422
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
423
|
+
type: Schema.Literal("video"),
|
|
424
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
425
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
426
|
+
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
427
|
+
type: Schema.Literal("document"),
|
|
428
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
|
|
429
|
+
url: Schema.String
|
|
430
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
431
|
+
type: Schema.Literal("document"),
|
|
432
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
|
|
433
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" }))
|
|
434
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])])
|
|
435
|
+
])),
|
|
436
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })),
|
|
437
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
|
|
438
|
+
displayText: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })),
|
|
439
|
+
url: Schema.String
|
|
440
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
441
|
+
Schema.StructWithRest(Schema.Struct({
|
|
442
|
+
type: Schema.Literal("flow"),
|
|
443
|
+
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
444
|
+
type: Schema.Literal("text"),
|
|
445
|
+
text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
|
|
446
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
447
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })),
|
|
448
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
|
|
449
|
+
flowId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
450
|
+
cta: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(30).annotate({ expected: "a string with at most 30 code points" })),
|
|
451
|
+
token: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" }))),
|
|
452
|
+
action: Schema.optionalKey(Schema.Literals(["navigate", "data_exchange"])),
|
|
453
|
+
screen: Schema.optionalKey(Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[A-Za-z_]{1,100}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z_]{1,100}$" }))),
|
|
454
|
+
data: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))),
|
|
455
|
+
flowVersionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
456
|
+
providerFlowId: Schema.String
|
|
457
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
458
|
+
])),
|
|
459
|
+
media: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
460
|
+
Schema.StructWithRest(Schema.Struct({
|
|
461
|
+
type: Schema.Literals([
|
|
462
|
+
"image",
|
|
463
|
+
"video",
|
|
464
|
+
"audio",
|
|
465
|
+
"document",
|
|
466
|
+
"sticker"
|
|
467
|
+
]),
|
|
468
|
+
url: Schema.String,
|
|
469
|
+
caption: Schema.optionalKey(Schema.String),
|
|
470
|
+
filename: Schema.optionalKey(Schema.String)
|
|
471
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
472
|
+
Schema.StructWithRest(Schema.Struct({
|
|
473
|
+
type: Schema.Literals([
|
|
474
|
+
"image",
|
|
475
|
+
"video",
|
|
476
|
+
"audio",
|
|
477
|
+
"document",
|
|
478
|
+
"sticker"
|
|
479
|
+
]),
|
|
480
|
+
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
481
|
+
caption: Schema.optionalKey(Schema.String),
|
|
482
|
+
filename: Schema.optionalKey(Schema.String)
|
|
483
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
484
|
+
Schema.StructWithRest(Schema.Struct({
|
|
485
|
+
type: Schema.Literals([
|
|
486
|
+
"image",
|
|
487
|
+
"video",
|
|
488
|
+
"audio",
|
|
489
|
+
"document",
|
|
490
|
+
"sticker"
|
|
491
|
+
]),
|
|
492
|
+
providerMediaId: Schema.String,
|
|
493
|
+
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
494
|
+
caption: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
495
|
+
filename: Schema.optionalKey(Schema.String)
|
|
496
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
497
|
+
]), Schema.Null])),
|
|
498
|
+
reaction: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
499
|
+
messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
500
|
+
providerMessageId: Schema.String,
|
|
501
|
+
emoji: Schema.Union([Schema.String, Schema.Null])
|
|
502
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
503
|
+
location: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
504
|
+
latitude: Schema.Finite,
|
|
505
|
+
longitude: Schema.Finite,
|
|
506
|
+
name: Schema.optionalKey(Schema.String),
|
|
507
|
+
address: Schema.optionalKey(Schema.String),
|
|
508
|
+
url: Schema.optionalKey(Schema.String)
|
|
509
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
510
|
+
contacts: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
511
|
+
name: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
512
|
+
formattedName: Schema.optionalKey(Schema.String),
|
|
513
|
+
firstName: Schema.optionalKey(Schema.String),
|
|
514
|
+
lastName: Schema.optionalKey(Schema.String),
|
|
515
|
+
middleName: Schema.optionalKey(Schema.String),
|
|
516
|
+
prefix: Schema.optionalKey(Schema.String),
|
|
517
|
+
suffix: Schema.optionalKey(Schema.String)
|
|
518
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
519
|
+
phones: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
520
|
+
phone: Schema.optionalKey(Schema.String),
|
|
521
|
+
type: Schema.optionalKey(Schema.String),
|
|
522
|
+
waId: Schema.optionalKey(Schema.String)
|
|
523
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
524
|
+
emails: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
525
|
+
email: Schema.optionalKey(Schema.String),
|
|
526
|
+
type: Schema.optionalKey(Schema.String)
|
|
527
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
528
|
+
urls: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
529
|
+
url: Schema.optionalKey(Schema.String),
|
|
530
|
+
type: Schema.optionalKey(Schema.String)
|
|
531
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
532
|
+
org: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
533
|
+
company: Schema.optionalKey(Schema.String),
|
|
534
|
+
department: Schema.optionalKey(Schema.String),
|
|
535
|
+
title: Schema.optionalKey(Schema.String)
|
|
536
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
537
|
+
addresses: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
538
|
+
street: Schema.optionalKey(Schema.String),
|
|
539
|
+
city: Schema.optionalKey(Schema.String),
|
|
540
|
+
state: Schema.optionalKey(Schema.String),
|
|
541
|
+
zip: Schema.optionalKey(Schema.String),
|
|
542
|
+
country: Schema.optionalKey(Schema.String),
|
|
543
|
+
countryCode: Schema.optionalKey(Schema.String),
|
|
544
|
+
type: Schema.optionalKey(Schema.String)
|
|
545
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
546
|
+
birthday: Schema.optionalKey(Schema.String)
|
|
547
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
548
|
+
reply: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
549
|
+
type: Schema.Literals([
|
|
550
|
+
"button",
|
|
551
|
+
"list",
|
|
552
|
+
"template_button"
|
|
553
|
+
]),
|
|
554
|
+
id: Schema.String,
|
|
555
|
+
title: Schema.String,
|
|
556
|
+
description: Schema.optionalKey(Schema.String)
|
|
557
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
558
|
+
flowResponse: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
559
|
+
flowToken: Schema.Union([Schema.String, Schema.Null]),
|
|
560
|
+
response: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
|
|
561
|
+
body: Schema.optionalKey(Schema.String)
|
|
562
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
563
|
+
context: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
564
|
+
messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
565
|
+
providerMessageId: Schema.String
|
|
566
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
567
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
179
568
|
messageId: Schema.String,
|
|
180
569
|
organizationId: Schema.String
|
|
181
570
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -203,9 +592,9 @@ const MessageOpenedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
203
592
|
]), Schema.Null]),
|
|
204
593
|
country: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
205
594
|
city: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
206
|
-
asn: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
595
|
+
asn: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
207
596
|
code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
208
|
-
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
597
|
+
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
209
598
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
210
599
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
211
600
|
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
@@ -237,9 +626,9 @@ const MessageClickedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
237
626
|
]), Schema.Null]),
|
|
238
627
|
country: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
239
628
|
city: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
240
|
-
asn: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
629
|
+
asn: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
241
630
|
code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
242
|
-
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite
|
|
631
|
+
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
243
632
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
244
633
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
245
634
|
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
@@ -404,7 +793,11 @@ const ContactConsentChangedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
404
793
|
type: Schema.Literals(["email", "phone"]),
|
|
405
794
|
identifier: Schema.String
|
|
406
795
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
407
|
-
channel: Schema.
|
|
796
|
+
channel: Schema.Literals([
|
|
797
|
+
"sms",
|
|
798
|
+
"whatsapp",
|
|
799
|
+
"email"
|
|
800
|
+
]),
|
|
408
801
|
status: Schema.Literals(["opted_in", "opted_out"]),
|
|
409
802
|
previousStatus: Schema.Union([Schema.Literals(["opted_in", "opted_out"]), Schema.Null]),
|
|
410
803
|
source: Schema.String,
|
|
@@ -418,8 +811,16 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
418
811
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
419
812
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
420
813
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
421
|
-
channels: Schema.Array(Schema.
|
|
422
|
-
|
|
814
|
+
channels: Schema.Array(Schema.Literals([
|
|
815
|
+
"sms",
|
|
816
|
+
"whatsapp",
|
|
817
|
+
"email"
|
|
818
|
+
])),
|
|
819
|
+
primaryChannel: Schema.Literals([
|
|
820
|
+
"sms",
|
|
821
|
+
"whatsapp",
|
|
822
|
+
"email"
|
|
823
|
+
]),
|
|
423
824
|
status: Schema.Literals([
|
|
424
825
|
"active",
|
|
425
826
|
"waiting",
|
|
@@ -439,8 +840,16 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
439
840
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
440
841
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
441
842
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
442
|
-
channels: Schema.Array(Schema.
|
|
443
|
-
|
|
843
|
+
channels: Schema.Array(Schema.Literals([
|
|
844
|
+
"sms",
|
|
845
|
+
"whatsapp",
|
|
846
|
+
"email"
|
|
847
|
+
])),
|
|
848
|
+
primaryChannel: Schema.Literals([
|
|
849
|
+
"sms",
|
|
850
|
+
"whatsapp",
|
|
851
|
+
"email"
|
|
852
|
+
]),
|
|
444
853
|
status: Schema.Literals([
|
|
445
854
|
"active",
|
|
446
855
|
"waiting",
|
|
@@ -460,8 +869,16 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
460
869
|
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
461
870
|
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
462
871
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
463
|
-
channels: Schema.Array(Schema.
|
|
464
|
-
|
|
872
|
+
channels: Schema.Array(Schema.Literals([
|
|
873
|
+
"sms",
|
|
874
|
+
"whatsapp",
|
|
875
|
+
"email"
|
|
876
|
+
])),
|
|
877
|
+
primaryChannel: Schema.Literals([
|
|
878
|
+
"sms",
|
|
879
|
+
"whatsapp",
|
|
880
|
+
"email"
|
|
881
|
+
]),
|
|
465
882
|
status: Schema.Literals([
|
|
466
883
|
"active",
|
|
467
884
|
"waiting",
|
|
@@ -612,16 +1029,146 @@ const DomainWarmingUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
612
1029
|
holdReason: Schema.Union([Schema.String, Schema.Null]),
|
|
613
1030
|
batch: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
614
1031
|
id: Schema.String,
|
|
615
|
-
sequence: Schema.Finite
|
|
1032
|
+
sequence: Schema.Finite,
|
|
616
1033
|
startsAt: Schema.String,
|
|
617
1034
|
endsAt: Schema.String,
|
|
618
|
-
allowanceRecipients: Schema.Finite
|
|
619
|
-
dailyGrowthPercent: Schema.Finite
|
|
620
|
-
targetDailyRecipients: Schema.Finite
|
|
1035
|
+
allowanceRecipients: Schema.Finite,
|
|
1036
|
+
dailyGrowthPercent: Schema.Finite,
|
|
1037
|
+
targetDailyRecipients: Schema.Finite
|
|
621
1038
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]),
|
|
622
1039
|
updatedAt: Schema.String
|
|
623
1040
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
624
1041
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1042
|
+
const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1043
|
+
type: Schema.Literal("template.registration.updated"),
|
|
1044
|
+
timestamp: Schema.String,
|
|
1045
|
+
data: Schema.StructWithRest(Schema.Struct({
|
|
1046
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1047
|
+
templateId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1048
|
+
publicationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1049
|
+
target: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1050
|
+
provider: Schema.Literal("whatsapp"),
|
|
1051
|
+
wabaId: Schema.String
|
|
1052
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
1053
|
+
provider: Schema.Literal("dlt"),
|
|
1054
|
+
entityId: Schema.String,
|
|
1055
|
+
headerId: Schema.String
|
|
1056
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
1057
|
+
name: Schema.String,
|
|
1058
|
+
language: Schema.String,
|
|
1059
|
+
status: Schema.Literals([
|
|
1060
|
+
"draft",
|
|
1061
|
+
"submitted",
|
|
1062
|
+
"approved",
|
|
1063
|
+
"rejected",
|
|
1064
|
+
"paused",
|
|
1065
|
+
"disabled"
|
|
1066
|
+
]),
|
|
1067
|
+
category: Schema.Literals([
|
|
1068
|
+
"marketing",
|
|
1069
|
+
"utility",
|
|
1070
|
+
"authentication",
|
|
1071
|
+
"transactional",
|
|
1072
|
+
"service_implicit",
|
|
1073
|
+
"service_explicit",
|
|
1074
|
+
"promotional"
|
|
1075
|
+
]),
|
|
1076
|
+
providerCategory: Schema.Union([Schema.Literals([
|
|
1077
|
+
"marketing",
|
|
1078
|
+
"utility",
|
|
1079
|
+
"authentication",
|
|
1080
|
+
"transactional",
|
|
1081
|
+
"service_implicit",
|
|
1082
|
+
"service_explicit",
|
|
1083
|
+
"promotional"
|
|
1084
|
+
]), Schema.Null]),
|
|
1085
|
+
providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
|
|
1086
|
+
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
1087
|
+
submittedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1088
|
+
statusChangedAt: Schema.String,
|
|
1089
|
+
createdAt: Schema.String,
|
|
1090
|
+
updatedAt: Schema.String,
|
|
1091
|
+
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1092
|
+
previousStatus: Schema.Literals([
|
|
1093
|
+
"draft",
|
|
1094
|
+
"submitted",
|
|
1095
|
+
"approved",
|
|
1096
|
+
"rejected",
|
|
1097
|
+
"paused",
|
|
1098
|
+
"disabled"
|
|
1099
|
+
])
|
|
1100
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1101
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1102
|
+
const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1103
|
+
type: Schema.Literal("flow.registration.updated"),
|
|
1104
|
+
timestamp: Schema.String,
|
|
1105
|
+
data: Schema.StructWithRest(Schema.Struct({
|
|
1106
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1107
|
+
flowId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1108
|
+
versionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1109
|
+
versionNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
|
|
1110
|
+
wabaId: Schema.String,
|
|
1111
|
+
providerFlowId: Schema.Union([Schema.String, Schema.Null]),
|
|
1112
|
+
name: Schema.String,
|
|
1113
|
+
status: Schema.Literals([
|
|
1114
|
+
"draft",
|
|
1115
|
+
"published",
|
|
1116
|
+
"throttled",
|
|
1117
|
+
"blocked",
|
|
1118
|
+
"deprecated"
|
|
1119
|
+
]),
|
|
1120
|
+
validationErrors: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1121
|
+
error: Schema.String,
|
|
1122
|
+
message: Schema.String,
|
|
1123
|
+
path: Schema.optionalKey(Schema.String),
|
|
1124
|
+
line: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))),
|
|
1125
|
+
column: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })))
|
|
1126
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
1127
|
+
endpointAlerts: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1128
|
+
kind: Schema.String,
|
|
1129
|
+
message: Schema.String,
|
|
1130
|
+
value: Schema.Union([Schema.Finite, Schema.Null]),
|
|
1131
|
+
threshold: Schema.Union([Schema.Finite, Schema.Null]),
|
|
1132
|
+
activatedAt: Schema.String
|
|
1133
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
1134
|
+
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1135
|
+
statusChangedAt: Schema.String,
|
|
1136
|
+
createdAt: Schema.String,
|
|
1137
|
+
updatedAt: Schema.String,
|
|
1138
|
+
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1139
|
+
previousStatus: Schema.Union([Schema.Literals([
|
|
1140
|
+
"draft",
|
|
1141
|
+
"published",
|
|
1142
|
+
"throttled",
|
|
1143
|
+
"blocked",
|
|
1144
|
+
"deprecated"
|
|
1145
|
+
]), Schema.Null])
|
|
1146
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1147
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1148
|
+
const WhatsappNumberConnectedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1149
|
+
type: Schema.Literal("whatsapp.number.connected"),
|
|
1150
|
+
timestamp: Schema.String,
|
|
1151
|
+
data: Schema.StructWithRest(Schema.Struct({
|
|
1152
|
+
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1153
|
+
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
1154
|
+
businessAccountId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1155
|
+
phoneNumber: Schema.String,
|
|
1156
|
+
phoneNumberId: Schema.String,
|
|
1157
|
+
whatsappBusinessAccountId: Schema.String,
|
|
1158
|
+
displayName: Schema.String,
|
|
1159
|
+
verificationStatus: Schema.Literals([
|
|
1160
|
+
"pending",
|
|
1161
|
+
"verified",
|
|
1162
|
+
"failed",
|
|
1163
|
+
"suspended"
|
|
1164
|
+
]),
|
|
1165
|
+
reconnected: Schema.Boolean,
|
|
1166
|
+
setupLink: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1167
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wasl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wasl_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1168
|
+
metadata: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
|
|
1169
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])
|
|
1170
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1171
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
625
1172
|
const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
626
1173
|
type: Schema.Literal("mailbox.message.received"),
|
|
627
1174
|
timestamp: Schema.String,
|
|
@@ -630,7 +1177,11 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
630
1177
|
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
631
1178
|
message: Schema.StructWithRest(Schema.Struct({
|
|
632
1179
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
633
|
-
channel: Schema.optionalKey(Schema.
|
|
1180
|
+
channel: Schema.optionalKey(Schema.Literals([
|
|
1181
|
+
"email",
|
|
1182
|
+
"whatsapp",
|
|
1183
|
+
"sms"
|
|
1184
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
634
1185
|
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
635
1186
|
from: Schema.StructWithRest(Schema.Struct({
|
|
636
1187
|
address: Schema.String,
|
|
@@ -645,7 +1196,7 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
645
1196
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
646
1197
|
filename: Schema.String,
|
|
647
1198
|
contentType: Schema.String,
|
|
648
|
-
size: Schema.Finite
|
|
1199
|
+
size: Schema.Finite
|
|
649
1200
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
650
1201
|
occurredAt: Schema.String
|
|
651
1202
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
@@ -687,7 +1238,11 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
687
1238
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
688
1239
|
message: Schema.StructWithRest(Schema.Struct({
|
|
689
1240
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
690
|
-
channel: Schema.optionalKey(Schema.
|
|
1241
|
+
channel: Schema.optionalKey(Schema.Literals([
|
|
1242
|
+
"email",
|
|
1243
|
+
"whatsapp",
|
|
1244
|
+
"sms"
|
|
1245
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
691
1246
|
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
692
1247
|
from: Schema.StructWithRest(Schema.Struct({
|
|
693
1248
|
address: Schema.String,
|
|
@@ -702,7 +1257,7 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
702
1257
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
703
1258
|
filename: Schema.String,
|
|
704
1259
|
contentType: Schema.String,
|
|
705
|
-
size: Schema.Finite
|
|
1260
|
+
size: Schema.Finite
|
|
706
1261
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
707
1262
|
occurredAt: Schema.String
|
|
708
1263
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -906,7 +1461,11 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
906
1461
|
]),
|
|
907
1462
|
message: Schema.StructWithRest(Schema.Struct({
|
|
908
1463
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
909
|
-
channel: Schema.optionalKey(Schema.
|
|
1464
|
+
channel: Schema.optionalKey(Schema.Literals([
|
|
1465
|
+
"email",
|
|
1466
|
+
"whatsapp",
|
|
1467
|
+
"sms"
|
|
1468
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
910
1469
|
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
911
1470
|
from: Schema.StructWithRest(Schema.Struct({
|
|
912
1471
|
address: Schema.String,
|
|
@@ -921,7 +1480,7 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
921
1480
|
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
922
1481
|
filename: Schema.String,
|
|
923
1482
|
contentType: Schema.String,
|
|
924
|
-
size: Schema.Finite
|
|
1483
|
+
size: Schema.Finite
|
|
925
1484
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
926
1485
|
occurredAt: Schema.String
|
|
927
1486
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
@@ -999,6 +1558,7 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
999
1558
|
const SamvaWebhookEventSchema = Schema.Union([
|
|
1000
1559
|
MessageSentEventSchema,
|
|
1001
1560
|
MessageDeliveredEventSchema,
|
|
1561
|
+
MessageReadEventSchema,
|
|
1002
1562
|
MessageFailedEventSchema,
|
|
1003
1563
|
MessageBouncedEventSchema,
|
|
1004
1564
|
MessageComplainedEventSchema,
|
|
@@ -1021,6 +1581,9 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1021
1581
|
WebhookTestEventSchema,
|
|
1022
1582
|
DomainUpdatedEventSchema,
|
|
1023
1583
|
DomainWarmingUpdatedEventSchema,
|
|
1584
|
+
TemplateRegistrationUpdatedEventSchema,
|
|
1585
|
+
FlowRegistrationUpdatedEventSchema,
|
|
1586
|
+
WhatsappNumberConnectedEventSchema,
|
|
1024
1587
|
MailboxMessageReceivedEventSchema,
|
|
1025
1588
|
MailboxMessageSentEventSchema,
|
|
1026
1589
|
MailboxActionPendingApprovalEventSchema,
|
|
@@ -1031,6 +1594,6 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1031
1594
|
JourneyWebhookEventSchema
|
|
1032
1595
|
]);
|
|
1033
1596
|
//#endregion
|
|
1034
|
-
export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema };
|
|
1597
|
+
export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema };
|
|
1035
1598
|
|
|
1036
1599
|
//# sourceMappingURL=schemas.gen.js.map
|