@samva/webhooks 0.20.0 → 0.22.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/dist/effect.js +4 -4
- package/dist/{json-schemas.gen-CzhmDgcj.js → json-schemas.gen-CPzGmYvg.js} +1562 -1523
- package/dist/promise.js +2 -2
- package/dist/{protocol-BSGksDha.js → protocol-8ERuoP0F.js} +323 -307
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +63 -4
- package/dist/schemas.gen.js +206 -545
- package/dist/types.gen.d.ts +46 -3
- package/package.json +3 -4
package/dist/schemas.gen.js
CHANGED
|
@@ -4,10 +4,7 @@ const MessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
4
4
|
type: Schema.Literal("message.sent"),
|
|
5
5
|
timestamp: Schema.String,
|
|
6
6
|
data: Schema.StructWithRest(Schema.Struct({
|
|
7
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
8
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
9
|
-
identifier: "MailboxId"
|
|
10
|
-
})), Schema.Null])),
|
|
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])),
|
|
11
8
|
channel: Schema.Literals([
|
|
12
9
|
"sms",
|
|
13
10
|
"whatsapp",
|
|
@@ -50,10 +47,7 @@ const MessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
50
47
|
type: Schema.Literal("message.delivered"),
|
|
51
48
|
timestamp: Schema.String,
|
|
52
49
|
data: Schema.StructWithRest(Schema.Struct({
|
|
53
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
54
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
55
|
-
identifier: "MailboxId"
|
|
56
|
-
})), Schema.Null])),
|
|
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])),
|
|
57
51
|
channel: Schema.Literals([
|
|
58
52
|
"sms",
|
|
59
53
|
"whatsapp",
|
|
@@ -96,10 +90,7 @@ const MessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
96
90
|
type: Schema.Literal("message.read"),
|
|
97
91
|
timestamp: Schema.String,
|
|
98
92
|
data: Schema.StructWithRest(Schema.Struct({
|
|
99
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
100
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
101
|
-
identifier: "MailboxId"
|
|
102
|
-
})), Schema.Null])),
|
|
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])),
|
|
103
94
|
channel: Schema.Literals([
|
|
104
95
|
"sms",
|
|
105
96
|
"whatsapp",
|
|
@@ -142,10 +133,7 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
142
133
|
type: Schema.Literal("message.failed"),
|
|
143
134
|
timestamp: Schema.String,
|
|
144
135
|
data: Schema.StructWithRest(Schema.Struct({
|
|
145
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
146
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
147
|
-
identifier: "MailboxId"
|
|
148
|
-
})), Schema.Null])),
|
|
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])),
|
|
149
137
|
channel: Schema.Literals([
|
|
150
138
|
"sms",
|
|
151
139
|
"whatsapp",
|
|
@@ -188,10 +176,7 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
188
176
|
type: Schema.Literal("message.bounced"),
|
|
189
177
|
timestamp: Schema.String,
|
|
190
178
|
data: Schema.StructWithRest(Schema.Struct({
|
|
191
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
192
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
193
|
-
identifier: "MailboxId"
|
|
194
|
-
})), Schema.Null])),
|
|
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])),
|
|
195
180
|
channel: Schema.Literals([
|
|
196
181
|
"sms",
|
|
197
182
|
"whatsapp",
|
|
@@ -234,10 +219,7 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
234
219
|
type: Schema.Literal("message.complained"),
|
|
235
220
|
timestamp: Schema.String,
|
|
236
221
|
data: Schema.StructWithRest(Schema.Struct({
|
|
237
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
238
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
239
|
-
identifier: "MailboxId"
|
|
240
|
-
})), Schema.Null])),
|
|
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])),
|
|
241
223
|
channel: Schema.Literals([
|
|
242
224
|
"sms",
|
|
243
225
|
"whatsapp",
|
|
@@ -280,10 +262,7 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
280
262
|
type: Schema.Literal("message.received"),
|
|
281
263
|
timestamp: Schema.String,
|
|
282
264
|
data: Schema.StructWithRest(Schema.Struct({
|
|
283
|
-
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
284
|
-
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
285
|
-
identifier: "MailboxId"
|
|
286
|
-
})), Schema.Null])),
|
|
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])),
|
|
287
266
|
channel: Schema.Literals([
|
|
288
267
|
"sms",
|
|
289
268
|
"whatsapp",
|
|
@@ -333,7 +312,8 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
333
312
|
sub_type: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
334
313
|
"url",
|
|
335
314
|
"quick_reply",
|
|
336
|
-
"copy_code"
|
|
315
|
+
"copy_code",
|
|
316
|
+
"flow"
|
|
337
317
|
]), Schema.Null])),
|
|
338
318
|
index: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
339
319
|
parameters: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
@@ -344,7 +324,8 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
344
324
|
"image",
|
|
345
325
|
"document",
|
|
346
326
|
"video",
|
|
347
|
-
"coupon_code"
|
|
327
|
+
"coupon_code",
|
|
328
|
+
"action"
|
|
348
329
|
]),
|
|
349
330
|
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
350
331
|
currency: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
@@ -359,7 +340,8 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
359
340
|
filename: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
360
341
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
361
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])),
|
|
362
|
-
coupon_code: Schema.optionalKey(Schema.Union([Schema.String, 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]))
|
|
363
345
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
364
346
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
365
347
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
@@ -370,53 +352,44 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
370
352
|
Schema.StructWithRest(Schema.Struct({
|
|
371
353
|
type: Schema.Literal("text"),
|
|
372
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" }))
|
|
373
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
355
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
374
356
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
375
357
|
type: Schema.Literal("image"),
|
|
376
358
|
url: Schema.String
|
|
377
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
359
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
378
360
|
type: Schema.Literal("image"),
|
|
379
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
380
|
-
|
|
381
|
-
identifier: "MediaId"
|
|
382
|
-
}))
|
|
383
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
|
|
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" }))])]),
|
|
384
363
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
385
364
|
type: Schema.Literal("video"),
|
|
386
365
|
url: Schema.String
|
|
387
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
366
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
388
367
|
type: Schema.Literal("video"),
|
|
389
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
390
|
-
|
|
391
|
-
identifier: "MediaId"
|
|
392
|
-
}))
|
|
393
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
|
|
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" }))])]),
|
|
394
370
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
395
371
|
type: Schema.Literal("document"),
|
|
396
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" }))),
|
|
397
373
|
url: Schema.String
|
|
398
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
374
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
399
375
|
type: Schema.Literal("document"),
|
|
400
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" }))),
|
|
401
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}))
|
|
405
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
|
|
406
|
-
]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
|
|
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
|
+
])),
|
|
407
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" })),
|
|
408
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" }))),
|
|
409
382
|
buttons: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
410
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" })),
|
|
411
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" }))
|
|
412
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
413
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
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" }))]),
|
|
414
387
|
Schema.StructWithRest(Schema.Struct({
|
|
415
388
|
type: Schema.Literal("list"),
|
|
416
389
|
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
417
390
|
type: Schema.Literal("text"),
|
|
418
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" }))
|
|
419
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
392
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
420
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" })),
|
|
421
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" }))),
|
|
422
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" })),
|
|
@@ -426,77 +399,63 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
426
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" })),
|
|
427
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" })),
|
|
428
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" })))
|
|
429
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
430
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
431
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
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" }))]),
|
|
432
405
|
Schema.StructWithRest(Schema.Struct({
|
|
433
406
|
type: Schema.Literal("cta_url"),
|
|
434
407
|
header: Schema.optionalKey(Schema.Union([
|
|
435
408
|
Schema.StructWithRest(Schema.Struct({
|
|
436
409
|
type: Schema.Literal("text"),
|
|
437
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" }))
|
|
438
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
411
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
439
412
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
440
413
|
type: Schema.Literal("image"),
|
|
441
414
|
url: Schema.String
|
|
442
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
415
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
443
416
|
type: Schema.Literal("image"),
|
|
444
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
445
|
-
|
|
446
|
-
identifier: "MediaId"
|
|
447
|
-
}))
|
|
448
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
|
|
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" }))])]),
|
|
449
419
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
450
420
|
type: Schema.Literal("video"),
|
|
451
421
|
url: Schema.String
|
|
452
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
422
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
453
423
|
type: Schema.Literal("video"),
|
|
454
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
455
|
-
|
|
456
|
-
identifier: "MediaId"
|
|
457
|
-
}))
|
|
458
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
|
|
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" }))])]),
|
|
459
426
|
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
460
427
|
type: Schema.Literal("document"),
|
|
461
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" }))),
|
|
462
429
|
url: Schema.String
|
|
463
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
430
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
464
431
|
type: Schema.Literal("document"),
|
|
465
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" }))),
|
|
466
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}))
|
|
470
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
|
|
471
|
-
]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
|
|
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
|
+
])),
|
|
472
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" })),
|
|
473
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" }))),
|
|
474
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" })),
|
|
475
439
|
url: Schema.String
|
|
476
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
440
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
477
441
|
Schema.StructWithRest(Schema.Struct({
|
|
478
442
|
type: Schema.Literal("flow"),
|
|
479
443
|
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
480
444
|
type: Schema.Literal("text"),
|
|
481
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" }))
|
|
482
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
446
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
483
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" })),
|
|
484
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" }))),
|
|
485
|
-
flowId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
486
|
-
expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
487
|
-
identifier: "WhatsAppFlowId"
|
|
488
|
-
})),
|
|
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}$" })),
|
|
489
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" })),
|
|
490
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"])),
|
|
491
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}$" }))),
|
|
492
454
|
data: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))),
|
|
493
|
-
flowVersionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
494
|
-
expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
495
|
-
identifier: "WhatsAppFlowVersionId"
|
|
496
|
-
})),
|
|
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}$" })),
|
|
497
456
|
providerFlowId: Schema.String
|
|
498
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
499
|
-
])
|
|
457
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
458
|
+
])),
|
|
500
459
|
media: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
501
460
|
Schema.StructWithRest(Schema.Struct({
|
|
502
461
|
type: Schema.Literals([
|
|
@@ -518,10 +477,7 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
518
477
|
"document",
|
|
519
478
|
"sticker"
|
|
520
479
|
]),
|
|
521
|
-
mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
522
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
523
|
-
identifier: "MediaId"
|
|
524
|
-
})),
|
|
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}$" })),
|
|
525
481
|
caption: Schema.optionalKey(Schema.String),
|
|
526
482
|
filename: Schema.optionalKey(Schema.String)
|
|
527
483
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
@@ -538,22 +494,19 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
538
494
|
caption: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
539
495
|
filename: Schema.optionalKey(Schema.String)
|
|
540
496
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
541
|
-
])
|
|
497
|
+
]), Schema.Null])),
|
|
542
498
|
reaction: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
543
|
-
messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
544
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
545
|
-
identifier: "MessageId"
|
|
546
|
-
})), Schema.Null]),
|
|
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]),
|
|
547
500
|
providerMessageId: Schema.String,
|
|
548
501
|
emoji: Schema.Union([Schema.String, Schema.Null])
|
|
549
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
502
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
550
503
|
location: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
551
504
|
latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
552
505
|
longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
553
506
|
name: Schema.optionalKey(Schema.String),
|
|
554
507
|
address: Schema.optionalKey(Schema.String),
|
|
555
508
|
url: Schema.optionalKey(Schema.String)
|
|
556
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
509
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
557
510
|
contacts: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
558
511
|
name: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
559
512
|
formattedName: Schema.optionalKey(Schema.String),
|
|
@@ -591,7 +544,7 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
591
544
|
type: Schema.optionalKey(Schema.String)
|
|
592
545
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
593
546
|
birthday: Schema.optionalKey(Schema.String)
|
|
594
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
547
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
595
548
|
reply: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
596
549
|
type: Schema.Literals([
|
|
597
550
|
"button",
|
|
@@ -601,20 +554,17 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
601
554
|
id: Schema.String,
|
|
602
555
|
title: Schema.String,
|
|
603
556
|
description: Schema.optionalKey(Schema.String)
|
|
604
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
557
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
605
558
|
flowResponse: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
606
559
|
flowToken: Schema.Union([Schema.String, Schema.Null]),
|
|
607
560
|
response: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
|
|
608
561
|
body: Schema.optionalKey(Schema.String)
|
|
609
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
562
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
610
563
|
context: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
611
|
-
messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
612
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
613
|
-
identifier: "MessageId"
|
|
614
|
-
})), Schema.Null]),
|
|
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]),
|
|
615
565
|
providerMessageId: Schema.String
|
|
616
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
617
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
566
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
567
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
618
568
|
messageId: Schema.String,
|
|
619
569
|
organizationId: Schema.String
|
|
620
570
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -623,19 +573,10 @@ const MessageOpenedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
623
573
|
type: Schema.Literal("message.opened"),
|
|
624
574
|
timestamp: Schema.String,
|
|
625
575
|
data: Schema.StructWithRest(Schema.Struct({
|
|
626
|
-
messageId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
627
|
-
|
|
628
|
-
identifier: "MessageId"
|
|
629
|
-
})),
|
|
630
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
631
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
632
|
-
identifier: "OrganizationId"
|
|
633
|
-
})),
|
|
576
|
+
messageId: 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}$" })),
|
|
577
|
+
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}$" })),
|
|
634
578
|
channel: Schema.Literal("email"),
|
|
635
|
-
deliveryId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
636
|
-
expected: "a string matching the RegExp ^mdel_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
637
|
-
identifier: "MessageDeliveryId"
|
|
638
|
-
})),
|
|
579
|
+
deliveryId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mdel_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
639
580
|
recipient: Schema.String,
|
|
640
581
|
occurredAt: Schema.String,
|
|
641
582
|
userAgent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -656,33 +597,18 @@ const MessageOpenedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
656
597
|
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
657
598
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
658
599
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
659
|
-
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
660
|
-
|
|
661
|
-
identifier: "CampaignId"
|
|
662
|
-
})), Schema.Null])),
|
|
663
|
-
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
664
|
-
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
665
|
-
identifier: "CampaignRunId"
|
|
666
|
-
})), Schema.Null]))
|
|
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])),
|
|
601
|
+
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]))
|
|
667
602
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
668
603
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
669
604
|
const MessageClickedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
670
605
|
type: Schema.Literal("message.clicked"),
|
|
671
606
|
timestamp: Schema.String,
|
|
672
607
|
data: Schema.StructWithRest(Schema.Struct({
|
|
673
|
-
messageId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
674
|
-
|
|
675
|
-
identifier: "MessageId"
|
|
676
|
-
})),
|
|
677
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
678
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
679
|
-
identifier: "OrganizationId"
|
|
680
|
-
})),
|
|
608
|
+
messageId: 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}$" })),
|
|
609
|
+
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}$" })),
|
|
681
610
|
channel: Schema.Literal("email"),
|
|
682
|
-
deliveryId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
683
|
-
expected: "a string matching the RegExp ^mdel_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
684
|
-
identifier: "MessageDeliveryId"
|
|
685
|
-
})),
|
|
611
|
+
deliveryId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mdel_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mdel_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
686
612
|
recipient: Schema.String,
|
|
687
613
|
occurredAt: Schema.String,
|
|
688
614
|
userAgent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -705,24 +631,15 @@ const MessageClickedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
705
631
|
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
706
632
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
707
633
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
708
|
-
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
709
|
-
|
|
710
|
-
identifier: "CampaignId"
|
|
711
|
-
})), Schema.Null])),
|
|
712
|
-
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
713
|
-
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
714
|
-
identifier: "CampaignRunId"
|
|
715
|
-
})), Schema.Null]))
|
|
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])),
|
|
635
|
+
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]))
|
|
716
636
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
717
637
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
718
638
|
const ContactCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
719
639
|
type: Schema.Literal("contact.created"),
|
|
720
640
|
timestamp: Schema.String,
|
|
721
641
|
data: Schema.StructWithRest(Schema.Struct({
|
|
722
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
723
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
724
|
-
identifier: "ContactId"
|
|
725
|
-
})),
|
|
642
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
726
643
|
status: Schema.Literals([
|
|
727
644
|
"active",
|
|
728
645
|
"paused",
|
|
@@ -735,7 +652,7 @@ const ContactCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
735
652
|
type: Schema.Literals(["email", "phone"]),
|
|
736
653
|
identifier: Schema.String,
|
|
737
654
|
verified: Schema.Boolean
|
|
738
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
655
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
739
656
|
tags: Schema.Array(Schema.String),
|
|
740
657
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
741
658
|
createdAt: Schema.String,
|
|
@@ -746,10 +663,7 @@ const ContactUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
746
663
|
type: Schema.Literal("contact.updated"),
|
|
747
664
|
timestamp: Schema.String,
|
|
748
665
|
data: Schema.StructWithRest(Schema.Struct({
|
|
749
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
750
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
751
|
-
identifier: "ContactId"
|
|
752
|
-
})),
|
|
666
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
753
667
|
status: Schema.Literals([
|
|
754
668
|
"active",
|
|
755
669
|
"paused",
|
|
@@ -762,7 +676,7 @@ const ContactUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
762
676
|
type: Schema.Literals(["email", "phone"]),
|
|
763
677
|
identifier: Schema.String,
|
|
764
678
|
verified: Schema.Boolean
|
|
765
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
679
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
766
680
|
tags: Schema.Array(Schema.String),
|
|
767
681
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
768
682
|
createdAt: Schema.String,
|
|
@@ -773,10 +687,7 @@ const ContactDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
773
687
|
type: Schema.Literal("contact.deleted"),
|
|
774
688
|
timestamp: Schema.String,
|
|
775
689
|
data: Schema.StructWithRest(Schema.Struct({
|
|
776
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
777
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
778
|
-
identifier: "ContactId"
|
|
779
|
-
})),
|
|
690
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
780
691
|
status: Schema.Literals([
|
|
781
692
|
"active",
|
|
782
693
|
"paused",
|
|
@@ -789,7 +700,7 @@ const ContactDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
789
700
|
type: Schema.Literals(["email", "phone"]),
|
|
790
701
|
identifier: Schema.String,
|
|
791
702
|
verified: Schema.Boolean
|
|
792
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
703
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
793
704
|
tags: Schema.Array(Schema.String),
|
|
794
705
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
795
706
|
createdAt: Schema.String,
|
|
@@ -800,25 +711,13 @@ const ContactSubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
800
711
|
type: Schema.Literal("contact.subscribed"),
|
|
801
712
|
timestamp: Schema.String,
|
|
802
713
|
data: Schema.StructWithRest(Schema.Struct({
|
|
803
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
804
|
-
|
|
805
|
-
identifier: "OrganizationId"
|
|
806
|
-
})),
|
|
807
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
808
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
809
|
-
identifier: "ContactId"
|
|
810
|
-
})),
|
|
714
|
+
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}$" })),
|
|
715
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
811
716
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
812
717
|
groupId: Schema.String,
|
|
813
718
|
groupName: Schema.String,
|
|
814
|
-
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
815
|
-
|
|
816
|
-
identifier: "ContactGroupId"
|
|
817
|
-
})), Schema.Null])),
|
|
818
|
-
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
819
|
-
expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
820
|
-
identifier: "UnsubscribeId"
|
|
821
|
-
})), Schema.Null])),
|
|
719
|
+
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
720
|
+
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
822
721
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
823
722
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
824
723
|
source: Schema.Literals([
|
|
@@ -827,18 +726,9 @@ const ContactSubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
827
726
|
"manual",
|
|
828
727
|
"complaint"
|
|
829
728
|
]),
|
|
830
|
-
messageId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
})), Schema.Null])),
|
|
834
|
-
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
835
|
-
expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
836
|
-
identifier: "CampaignId"
|
|
837
|
-
})), Schema.Null])),
|
|
838
|
-
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
839
|
-
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
840
|
-
identifier: "CampaignRunId"
|
|
841
|
-
})), Schema.Null])),
|
|
729
|
+
messageId: Schema.optionalKey(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])),
|
|
730
|
+
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])),
|
|
731
|
+
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
842
732
|
occurredAt: Schema.String
|
|
843
733
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
844
734
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -846,25 +736,13 @@ const ContactUnsubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
846
736
|
type: Schema.Literal("contact.unsubscribed"),
|
|
847
737
|
timestamp: Schema.String,
|
|
848
738
|
data: Schema.StructWithRest(Schema.Struct({
|
|
849
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
850
|
-
|
|
851
|
-
identifier: "OrganizationId"
|
|
852
|
-
})),
|
|
853
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
854
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
855
|
-
identifier: "ContactId"
|
|
856
|
-
})),
|
|
739
|
+
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}$" })),
|
|
740
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
857
741
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
858
742
|
groupId: Schema.String,
|
|
859
743
|
groupName: Schema.String,
|
|
860
|
-
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
861
|
-
|
|
862
|
-
identifier: "ContactGroupId"
|
|
863
|
-
})), Schema.Null])),
|
|
864
|
-
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
865
|
-
expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
866
|
-
identifier: "UnsubscribeId"
|
|
867
|
-
})), Schema.Null])),
|
|
744
|
+
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
745
|
+
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
868
746
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
869
747
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
870
748
|
source: Schema.Literals([
|
|
@@ -873,18 +751,9 @@ const ContactUnsubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
873
751
|
"manual",
|
|
874
752
|
"complaint"
|
|
875
753
|
]),
|
|
876
|
-
messageId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
})), Schema.Null])),
|
|
880
|
-
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
881
|
-
expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
882
|
-
identifier: "CampaignId"
|
|
883
|
-
})), Schema.Null])),
|
|
884
|
-
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
885
|
-
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
886
|
-
identifier: "CampaignRunId"
|
|
887
|
-
})), Schema.Null])),
|
|
754
|
+
messageId: Schema.optionalKey(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])),
|
|
755
|
+
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])),
|
|
756
|
+
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
888
757
|
occurredAt: Schema.String
|
|
889
758
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
890
759
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -892,25 +761,13 @@ const ContactResubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
892
761
|
type: Schema.Literal("contact.resubscribed"),
|
|
893
762
|
timestamp: Schema.String,
|
|
894
763
|
data: Schema.StructWithRest(Schema.Struct({
|
|
895
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
896
|
-
|
|
897
|
-
identifier: "OrganizationId"
|
|
898
|
-
})),
|
|
899
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
900
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
901
|
-
identifier: "ContactId"
|
|
902
|
-
})),
|
|
764
|
+
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}$" })),
|
|
765
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
903
766
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
904
767
|
groupId: Schema.String,
|
|
905
768
|
groupName: Schema.String,
|
|
906
|
-
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
907
|
-
|
|
908
|
-
identifier: "ContactGroupId"
|
|
909
|
-
})), Schema.Null])),
|
|
910
|
-
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
911
|
-
expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
912
|
-
identifier: "UnsubscribeId"
|
|
913
|
-
})), Schema.Null])),
|
|
769
|
+
contactGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
770
|
+
unsubscribeGroupId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
914
771
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
915
772
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
916
773
|
source: Schema.Literals([
|
|
@@ -919,18 +776,9 @@ const ContactResubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
919
776
|
"manual",
|
|
920
777
|
"complaint"
|
|
921
778
|
]),
|
|
922
|
-
messageId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
})), Schema.Null])),
|
|
926
|
-
campaignId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
927
|
-
expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
928
|
-
identifier: "CampaignId"
|
|
929
|
-
})), Schema.Null])),
|
|
930
|
-
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
931
|
-
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
932
|
-
identifier: "CampaignRunId"
|
|
933
|
-
})), Schema.Null])),
|
|
779
|
+
messageId: Schema.optionalKey(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])),
|
|
780
|
+
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])),
|
|
781
|
+
campaignRunId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
934
782
|
occurredAt: Schema.String
|
|
935
783
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
936
784
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -938,19 +786,10 @@ const ContactConsentChangedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
938
786
|
type: Schema.Literal("contact.consent_changed"),
|
|
939
787
|
timestamp: Schema.String,
|
|
940
788
|
data: Schema.StructWithRest(Schema.Struct({
|
|
941
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
942
|
-
|
|
943
|
-
identifier: "OrganizationId"
|
|
944
|
-
})),
|
|
945
|
-
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
946
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
947
|
-
identifier: "ContactId"
|
|
948
|
-
})),
|
|
789
|
+
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}$" })),
|
|
790
|
+
contactId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
949
791
|
identity: Schema.StructWithRest(Schema.Struct({
|
|
950
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
951
|
-
expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
952
|
-
identifier: "ContactIdentityId"
|
|
953
|
-
})),
|
|
792
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
954
793
|
type: Schema.Literals(["email", "phone"]),
|
|
955
794
|
identifier: Schema.String
|
|
956
795
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
@@ -969,14 +808,8 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
969
808
|
type: Schema.Literal("conversation.created"),
|
|
970
809
|
timestamp: Schema.String,
|
|
971
810
|
data: Schema.StructWithRest(Schema.Struct({
|
|
972
|
-
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
973
|
-
|
|
974
|
-
identifier: "ConversationId"
|
|
975
|
-
})),
|
|
976
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
977
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
978
|
-
identifier: "OrganizationId"
|
|
979
|
-
})),
|
|
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}$" })),
|
|
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}$" })),
|
|
980
813
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
981
814
|
channels: Schema.Array(Schema.Literals([
|
|
982
815
|
"sms",
|
|
@@ -995,10 +828,7 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
995
828
|
"escalated",
|
|
996
829
|
"archived"
|
|
997
830
|
]),
|
|
998
|
-
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
999
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1000
|
-
identifier: "ContactId"
|
|
1001
|
-
})), Schema.Null]), Schema.Null])),
|
|
831
|
+
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]), Schema.Null])),
|
|
1002
832
|
createdAt: Schema.String,
|
|
1003
833
|
updatedAt: Schema.String
|
|
1004
834
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1007,14 +837,8 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1007
837
|
type: Schema.Literal("conversation.updated"),
|
|
1008
838
|
timestamp: Schema.String,
|
|
1009
839
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1010
|
-
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1011
|
-
|
|
1012
|
-
identifier: "ConversationId"
|
|
1013
|
-
})),
|
|
1014
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1015
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1016
|
-
identifier: "OrganizationId"
|
|
1017
|
-
})),
|
|
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}$" })),
|
|
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}$" })),
|
|
1018
842
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
1019
843
|
channels: Schema.Array(Schema.Literals([
|
|
1020
844
|
"sms",
|
|
@@ -1033,10 +857,7 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1033
857
|
"escalated",
|
|
1034
858
|
"archived"
|
|
1035
859
|
]),
|
|
1036
|
-
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1037
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1038
|
-
identifier: "ContactId"
|
|
1039
|
-
})), Schema.Null]), Schema.Null])),
|
|
860
|
+
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]), Schema.Null])),
|
|
1040
861
|
createdAt: Schema.String,
|
|
1041
862
|
updatedAt: Schema.String
|
|
1042
863
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1045,14 +866,8 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1045
866
|
type: Schema.Literal("conversation.archived"),
|
|
1046
867
|
timestamp: Schema.String,
|
|
1047
868
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1048
|
-
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1049
|
-
|
|
1050
|
-
identifier: "ConversationId"
|
|
1051
|
-
})),
|
|
1052
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1053
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1054
|
-
identifier: "OrganizationId"
|
|
1055
|
-
})),
|
|
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}$" })),
|
|
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}$" })),
|
|
1056
871
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
1057
872
|
channels: Schema.Array(Schema.Literals([
|
|
1058
873
|
"sms",
|
|
@@ -1071,10 +886,7 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1071
886
|
"escalated",
|
|
1072
887
|
"archived"
|
|
1073
888
|
]),
|
|
1074
|
-
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1075
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1076
|
-
identifier: "ContactId"
|
|
1077
|
-
})), Schema.Null]), Schema.Null])),
|
|
889
|
+
primaryContactId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]), Schema.Null])),
|
|
1078
890
|
createdAt: Schema.String,
|
|
1079
891
|
updatedAt: Schema.String
|
|
1080
892
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1083,14 +895,8 @@ const WebhookCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1083
895
|
type: Schema.Literal("webhook.created"),
|
|
1084
896
|
timestamp: Schema.String,
|
|
1085
897
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1086
|
-
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1087
|
-
|
|
1088
|
-
identifier: "WebhookEndpointId"
|
|
1089
|
-
})),
|
|
1090
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1091
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1092
|
-
identifier: "OrganizationId"
|
|
1093
|
-
})),
|
|
898
|
+
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
899
|
+
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}$" })),
|
|
1094
900
|
name: Schema.String,
|
|
1095
901
|
url: Schema.String,
|
|
1096
902
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1104,14 +910,8 @@ const WebhookUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1104
910
|
type: Schema.Literal("webhook.updated"),
|
|
1105
911
|
timestamp: Schema.String,
|
|
1106
912
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1107
|
-
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1108
|
-
|
|
1109
|
-
identifier: "WebhookEndpointId"
|
|
1110
|
-
})),
|
|
1111
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1112
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1113
|
-
identifier: "OrganizationId"
|
|
1114
|
-
})),
|
|
913
|
+
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
914
|
+
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}$" })),
|
|
1115
915
|
name: Schema.String,
|
|
1116
916
|
url: Schema.String,
|
|
1117
917
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1125,14 +925,8 @@ const WebhookDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1125
925
|
type: Schema.Literal("webhook.deleted"),
|
|
1126
926
|
timestamp: Schema.String,
|
|
1127
927
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1128
|
-
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1129
|
-
|
|
1130
|
-
identifier: "WebhookEndpointId"
|
|
1131
|
-
})),
|
|
1132
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1133
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1134
|
-
identifier: "OrganizationId"
|
|
1135
|
-
})),
|
|
928
|
+
webhookId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
929
|
+
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}$" })),
|
|
1136
930
|
name: Schema.String,
|
|
1137
931
|
url: Schema.String,
|
|
1138
932
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1151,14 +945,8 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1151
945
|
type: Schema.Literal("domain.updated"),
|
|
1152
946
|
timestamp: Schema.String,
|
|
1153
947
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1154
|
-
domainId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1155
|
-
|
|
1156
|
-
identifier: "EmailDomainId"
|
|
1157
|
-
})),
|
|
1158
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1159
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1160
|
-
identifier: "OrganizationId"
|
|
1161
|
-
})),
|
|
948
|
+
domainId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^dom_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
949
|
+
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}$" })),
|
|
1162
950
|
domain: Schema.String,
|
|
1163
951
|
previousPhase: Schema.Literals([
|
|
1164
952
|
"dns-setup",
|
|
@@ -1204,10 +992,7 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1204
992
|
"unknown"
|
|
1205
993
|
]), Schema.Null]))
|
|
1206
994
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]),
|
|
1207
|
-
operationId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1208
|
-
expected: "a string matching the RegExp ^op_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1209
|
-
identifier: "OperationId"
|
|
1210
|
-
})), Schema.Null]),
|
|
995
|
+
operationId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^op_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
1211
996
|
checkedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1212
997
|
nextCheckAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1213
998
|
failure: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
@@ -1258,26 +1043,17 @@ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Stru
|
|
|
1258
1043
|
type: Schema.Literal("template.registration.updated"),
|
|
1259
1044
|
timestamp: Schema.String,
|
|
1260
1045
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1261
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
})),
|
|
1265
|
-
templateId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1266
|
-
expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1267
|
-
identifier: "TemplateId"
|
|
1268
|
-
})),
|
|
1269
|
-
publicationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1270
|
-
expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1271
|
-
identifier: "TemplatePublicationId"
|
|
1272
|
-
})),
|
|
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}$" })),
|
|
1273
1049
|
target: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1274
1050
|
provider: Schema.Literal("whatsapp"),
|
|
1275
1051
|
wabaId: Schema.String
|
|
1276
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1052
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.StructWithRest(Schema.Struct({
|
|
1277
1053
|
provider: Schema.Literal("dlt"),
|
|
1278
1054
|
entityId: Schema.String,
|
|
1279
1055
|
headerId: Schema.String
|
|
1280
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1056
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])]),
|
|
1281
1057
|
name: Schema.String,
|
|
1282
1058
|
language: Schema.String,
|
|
1283
1059
|
status: Schema.Literals([
|
|
@@ -1312,10 +1088,7 @@ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Stru
|
|
|
1312
1088
|
statusChangedAt: Schema.String,
|
|
1313
1089
|
createdAt: Schema.String,
|
|
1314
1090
|
updatedAt: Schema.String,
|
|
1315
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1316
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1317
|
-
identifier: "OrganizationId"
|
|
1318
|
-
})),
|
|
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}$" })),
|
|
1319
1092
|
previousStatus: Schema.Literals([
|
|
1320
1093
|
"draft",
|
|
1321
1094
|
"submitted",
|
|
@@ -1330,18 +1103,9 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1330
1103
|
type: Schema.Literal("flow.registration.updated"),
|
|
1331
1104
|
timestamp: Schema.String,
|
|
1332
1105
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1333
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
})),
|
|
1337
|
-
flowId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1338
|
-
expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1339
|
-
identifier: "WhatsAppFlowId"
|
|
1340
|
-
})),
|
|
1341
|
-
versionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^wafver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1342
|
-
expected: "a string matching the RegExp ^wafver_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1343
|
-
identifier: "WhatsAppFlowVersionId"
|
|
1344
|
-
})),
|
|
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}$" })),
|
|
1345
1109
|
versionNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
|
|
1346
1110
|
wabaId: Schema.String,
|
|
1347
1111
|
providerFlowId: Schema.Union([Schema.String, Schema.Null]),
|
|
@@ -1359,15 +1123,19 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1359
1123
|
path: Schema.optionalKey(Schema.String),
|
|
1360
1124
|
line: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))),
|
|
1361
1125
|
column: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })))
|
|
1362
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
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.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
|
|
1131
|
+
threshold: Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]),
|
|
1132
|
+
activatedAt: Schema.String
|
|
1133
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
1363
1134
|
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1364
1135
|
statusChangedAt: Schema.String,
|
|
1365
1136
|
createdAt: Schema.String,
|
|
1366
1137
|
updatedAt: Schema.String,
|
|
1367
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1368
|
-
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1369
|
-
identifier: "OrganizationId"
|
|
1370
|
-
})),
|
|
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}$" })),
|
|
1371
1139
|
previousStatus: Schema.Union([Schema.Literals([
|
|
1372
1140
|
"draft",
|
|
1373
1141
|
"published",
|
|
@@ -1377,35 +1145,44 @@ const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1377
1145
|
]), Schema.Null])
|
|
1378
1146
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1379
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" }))]);
|
|
1380
1172
|
const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1381
1173
|
type: Schema.Literal("mailbox.message.received"),
|
|
1382
1174
|
timestamp: Schema.String,
|
|
1383
1175
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1384
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1385
|
-
|
|
1386
|
-
identifier: "MailboxId"
|
|
1387
|
-
})),
|
|
1388
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1389
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1390
|
-
identifier: "NamespaceId"
|
|
1391
|
-
})), Schema.Null]),
|
|
1176
|
+
mailboxId: 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}$" })),
|
|
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]),
|
|
1392
1178
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1393
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1394
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1395
|
-
identifier: "MessageId"
|
|
1396
|
-
})),
|
|
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}$" })),
|
|
1397
1180
|
channel: Schema.optionalKey(Schema.Literals([
|
|
1398
1181
|
"email",
|
|
1399
1182
|
"whatsapp",
|
|
1400
1183
|
"sms"
|
|
1401
|
-
]).annotate({
|
|
1402
|
-
|
|
1403
|
-
identifier: "MailboxChannel"
|
|
1404
|
-
})),
|
|
1405
|
-
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1406
|
-
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1407
|
-
identifier: "MailboxThreadId"
|
|
1408
|
-
})),
|
|
1184
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
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}$" })),
|
|
1409
1186
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1410
1187
|
address: Schema.String,
|
|
1411
1188
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1416,10 +1193,7 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1416
1193
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1417
1194
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1418
1195
|
attachments: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1419
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1420
|
-
expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1421
|
-
identifier: "AttachmentId"
|
|
1422
|
-
})),
|
|
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}$" })),
|
|
1423
1197
|
filename: Schema.String,
|
|
1424
1198
|
contentType: Schema.String,
|
|
1425
1199
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1427,14 +1201,8 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1427
1201
|
occurredAt: Schema.String
|
|
1428
1202
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1429
1203
|
thread: Schema.StructWithRest(Schema.Struct({
|
|
1430
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1431
|
-
|
|
1432
|
-
identifier: "MailboxThreadId"
|
|
1433
|
-
})),
|
|
1434
|
-
endpointId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1435
|
-
expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1436
|
-
identifier: "MailboxEndpointId"
|
|
1437
|
-
})), Schema.Null]).annotate({ description: "The endpoint the message arrived at; null once it is removed. Deliveries recorded before this field existed omit it." })),
|
|
1204
|
+
id: 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}$" })),
|
|
1205
|
+
endpointId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]).annotate({ description: "The endpoint the message arrived at; null once it is removed. Deliveries recorded before this field existed omit it." })),
|
|
1438
1206
|
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
1439
1207
|
preview: Schema.Union([Schema.String, Schema.Null])
|
|
1440
1208
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1444,18 +1212,9 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1444
1212
|
type: Schema.Literal("mailbox.message.sent"),
|
|
1445
1213
|
timestamp: Schema.String,
|
|
1446
1214
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1447
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
})),
|
|
1451
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1452
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1453
|
-
identifier: "NamespaceId"
|
|
1454
|
-
})), Schema.Null]),
|
|
1455
|
-
actionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1456
|
-
expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1457
|
-
identifier: "MailboxActionId"
|
|
1458
|
-
})),
|
|
1215
|
+
mailboxId: 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}$" })),
|
|
1216
|
+
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]),
|
|
1217
|
+
actionId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1459
1218
|
state: Schema.optionalKey(Schema.Literal("completed").annotate({ description: "Deliveries recorded before this field existed omit it." })),
|
|
1460
1219
|
acceptedAt: Schema.optionalKey(Schema.String),
|
|
1461
1220
|
actor: Schema.StructWithRest(Schema.Struct({
|
|
@@ -1478,22 +1237,13 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1478
1237
|
])
|
|
1479
1238
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1480
1239
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1481
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1482
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1483
|
-
identifier: "MessageId"
|
|
1484
|
-
})),
|
|
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}$" })),
|
|
1485
1241
|
channel: Schema.optionalKey(Schema.Literals([
|
|
1486
1242
|
"email",
|
|
1487
1243
|
"whatsapp",
|
|
1488
1244
|
"sms"
|
|
1489
|
-
]).annotate({
|
|
1490
|
-
|
|
1491
|
-
identifier: "MailboxChannel"
|
|
1492
|
-
})),
|
|
1493
|
-
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1494
|
-
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1495
|
-
identifier: "MailboxThreadId"
|
|
1496
|
-
})),
|
|
1245
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
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}$" })),
|
|
1497
1247
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1498
1248
|
address: Schema.String,
|
|
1499
1249
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1504,10 +1254,7 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1504
1254
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1505
1255
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1506
1256
|
attachments: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1507
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1508
|
-
expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1509
|
-
identifier: "AttachmentId"
|
|
1510
|
-
})),
|
|
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}$" })),
|
|
1511
1258
|
filename: Schema.String,
|
|
1512
1259
|
contentType: Schema.String,
|
|
1513
1260
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1520,19 +1267,10 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1520
1267
|
type: Schema.Literal("mailbox.action.pending_approval"),
|
|
1521
1268
|
timestamp: Schema.String,
|
|
1522
1269
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1523
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1524
|
-
|
|
1525
|
-
identifier: "MailboxId"
|
|
1526
|
-
})),
|
|
1527
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1528
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1529
|
-
identifier: "NamespaceId"
|
|
1530
|
-
})), Schema.Null]),
|
|
1270
|
+
mailboxId: 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}$" })),
|
|
1271
|
+
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]),
|
|
1531
1272
|
action: Schema.StructWithRest(Schema.Struct({
|
|
1532
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1533
|
-
expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1534
|
-
identifier: "MailboxActionId"
|
|
1535
|
-
})),
|
|
1273
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1536
1274
|
type: Schema.Literals([
|
|
1537
1275
|
"sendMessage",
|
|
1538
1276
|
"reply",
|
|
@@ -1551,24 +1289,15 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1551
1289
|
"deny"
|
|
1552
1290
|
]),
|
|
1553
1291
|
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
1554
|
-
policyId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1555
|
-
expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1556
|
-
identifier: "MailboxPolicyId"
|
|
1557
|
-
})), Schema.Null]),
|
|
1292
|
+
policyId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
|
|
1558
1293
|
source: Schema.Union([Schema.Literals([
|
|
1559
1294
|
"grant",
|
|
1560
1295
|
"installation",
|
|
1561
1296
|
"policy"
|
|
1562
1297
|
]), Schema.Null]),
|
|
1563
1298
|
decidedAt: Schema.String
|
|
1564
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({
|
|
1565
|
-
|
|
1566
|
-
identifier: "MailboxActionDecision"
|
|
1567
|
-
})),
|
|
1568
|
-
threadId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1569
|
-
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1570
|
-
identifier: "MailboxThreadId"
|
|
1571
|
-
})), Schema.Null]),
|
|
1299
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "Deliveries recorded before this field existed omit it." })),
|
|
1300
|
+
threadId: Schema.Union([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}$" })), Schema.Null]),
|
|
1572
1301
|
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
1573
1302
|
proposedBy: Schema.StructWithRest(Schema.Struct({
|
|
1574
1303
|
kind: Schema.Literals([
|
|
@@ -1602,19 +1331,10 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1602
1331
|
type: Schema.Literal("mailbox.action.resolved"),
|
|
1603
1332
|
timestamp: Schema.String,
|
|
1604
1333
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1605
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1606
|
-
|
|
1607
|
-
identifier: "MailboxId"
|
|
1608
|
-
})),
|
|
1609
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1610
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1611
|
-
identifier: "NamespaceId"
|
|
1612
|
-
})), Schema.Null]),
|
|
1334
|
+
mailboxId: 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}$" })),
|
|
1335
|
+
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]),
|
|
1613
1336
|
action: Schema.StructWithRest(Schema.Struct({
|
|
1614
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1615
|
-
expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1616
|
-
identifier: "MailboxActionId"
|
|
1617
|
-
})),
|
|
1337
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1618
1338
|
type: Schema.Literals([
|
|
1619
1339
|
"sendMessage",
|
|
1620
1340
|
"reply",
|
|
@@ -1625,10 +1345,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1625
1345
|
"call",
|
|
1626
1346
|
"extensionRequest"
|
|
1627
1347
|
]),
|
|
1628
|
-
threadId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1629
|
-
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1630
|
-
identifier: "MailboxThreadId"
|
|
1631
|
-
})), Schema.Null]),
|
|
1348
|
+
threadId: Schema.Union([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}$" })), Schema.Null]),
|
|
1632
1349
|
proposedBy: Schema.StructWithRest(Schema.Struct({
|
|
1633
1350
|
kind: Schema.Literals([
|
|
1634
1351
|
"user",
|
|
@@ -1677,24 +1394,15 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1677
1394
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "Who resolved the approval." }),
|
|
1678
1395
|
resolvedAt: Schema.String,
|
|
1679
1396
|
reason: Schema.Union([Schema.String, Schema.Null]).annotate({ description: "The denial reason; null for an approval or a cancellation." })
|
|
1680
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({
|
|
1681
|
-
description: "How the action's approval ended.",
|
|
1682
|
-
identifier: "MailboxActionResolution"
|
|
1683
|
-
})
|
|
1397
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "How the action's approval ended." })
|
|
1684
1398
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1685
1399
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1686
1400
|
const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1687
1401
|
type: Schema.Literal("mailbox.message.quarantined"),
|
|
1688
1402
|
timestamp: Schema.String,
|
|
1689
1403
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1690
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1691
|
-
|
|
1692
|
-
identifier: "MailboxId"
|
|
1693
|
-
})),
|
|
1694
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1695
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1696
|
-
identifier: "NamespaceId"
|
|
1697
|
-
})), Schema.Null]),
|
|
1404
|
+
mailboxId: 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}$" })),
|
|
1405
|
+
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]),
|
|
1698
1406
|
disposition: Schema.Literals(["quarantined", "isolated"]),
|
|
1699
1407
|
reason: Schema.Literals([
|
|
1700
1408
|
"spam",
|
|
@@ -1707,10 +1415,7 @@ const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct
|
|
|
1707
1415
|
]),
|
|
1708
1416
|
source: Schema.Literals(["receipt", "classifier"]),
|
|
1709
1417
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1710
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1711
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1712
|
-
identifier: "MessageId"
|
|
1713
|
-
})),
|
|
1418
|
+
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}$" })),
|
|
1714
1419
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1715
1420
|
address: Schema.String,
|
|
1716
1421
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1724,14 +1429,8 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1724
1429
|
type: Schema.Literal("mailbox.message.released"),
|
|
1725
1430
|
timestamp: Schema.String,
|
|
1726
1431
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1727
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1728
|
-
|
|
1729
|
-
identifier: "MailboxId"
|
|
1730
|
-
})),
|
|
1731
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1732
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1733
|
-
identifier: "NamespaceId"
|
|
1734
|
-
})), Schema.Null]),
|
|
1432
|
+
mailboxId: 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}$" })),
|
|
1433
|
+
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]),
|
|
1735
1434
|
releasedBy: Schema.StructWithRest(Schema.Struct({
|
|
1736
1435
|
kind: Schema.Literals([
|
|
1737
1436
|
"user",
|
|
@@ -1761,22 +1460,13 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1761
1460
|
"prompt_injection"
|
|
1762
1461
|
]),
|
|
1763
1462
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1764
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1765
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1766
|
-
identifier: "MessageId"
|
|
1767
|
-
})),
|
|
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}$" })),
|
|
1768
1464
|
channel: Schema.optionalKey(Schema.Literals([
|
|
1769
1465
|
"email",
|
|
1770
1466
|
"whatsapp",
|
|
1771
1467
|
"sms"
|
|
1772
|
-
]).annotate({
|
|
1773
|
-
|
|
1774
|
-
identifier: "MailboxChannel"
|
|
1775
|
-
})),
|
|
1776
|
-
threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1777
|
-
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1778
|
-
identifier: "MailboxThreadId"
|
|
1779
|
-
})),
|
|
1468
|
+
]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
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}$" })),
|
|
1780
1470
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1781
1471
|
address: Schema.String,
|
|
1782
1472
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1787,10 +1477,7 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1787
1477
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1788
1478
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1789
1479
|
attachments: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1790
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1791
|
-
expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1792
|
-
identifier: "AttachmentId"
|
|
1793
|
-
})),
|
|
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}$" })),
|
|
1794
1481
|
filename: Schema.String,
|
|
1795
1482
|
contentType: Schema.String,
|
|
1796
1483
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1798,14 +1485,8 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1798
1485
|
occurredAt: Schema.String
|
|
1799
1486
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1800
1487
|
thread: Schema.StructWithRest(Schema.Struct({
|
|
1801
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1802
|
-
|
|
1803
|
-
identifier: "MailboxThreadId"
|
|
1804
|
-
})),
|
|
1805
|
-
endpointId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1806
|
-
expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1807
|
-
identifier: "MailboxEndpointId"
|
|
1808
|
-
})), Schema.Null]).annotate({ description: "The endpoint the message arrived at; null once it is removed. Deliveries recorded before this field existed omit it." })),
|
|
1488
|
+
id: 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}$" })),
|
|
1489
|
+
endpointId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]).annotate({ description: "The endpoint the message arrived at; null once it is removed. Deliveries recorded before this field existed omit it." })),
|
|
1809
1490
|
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
1810
1491
|
preview: Schema.Union([Schema.String, Schema.Null])
|
|
1811
1492
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1815,14 +1496,8 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1815
1496
|
type: Schema.Literal("mailbox.message.discarded"),
|
|
1816
1497
|
timestamp: Schema.String,
|
|
1817
1498
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1818
|
-
mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1819
|
-
|
|
1820
|
-
identifier: "MailboxId"
|
|
1821
|
-
})),
|
|
1822
|
-
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1823
|
-
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1824
|
-
identifier: "NamespaceId"
|
|
1825
|
-
})), Schema.Null]),
|
|
1499
|
+
mailboxId: 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}$" })),
|
|
1500
|
+
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]),
|
|
1826
1501
|
discardedBy: Schema.StructWithRest(Schema.Struct({
|
|
1827
1502
|
kind: Schema.Literals([
|
|
1828
1503
|
"user",
|
|
@@ -1853,10 +1528,7 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1853
1528
|
"prompt_injection"
|
|
1854
1529
|
]),
|
|
1855
1530
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1856
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1857
|
-
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1858
|
-
identifier: "MessageId"
|
|
1859
|
-
})),
|
|
1531
|
+
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}$" })),
|
|
1860
1532
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1861
1533
|
address: Schema.String,
|
|
1862
1534
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1870,29 +1542,17 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1870
1542
|
type: Schema.Literal("journey.webhook"),
|
|
1871
1543
|
timestamp: Schema.String,
|
|
1872
1544
|
data: Schema.StructWithRest(Schema.Struct({
|
|
1873
|
-
organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1874
|
-
|
|
1875
|
-
identifier: "OrganizationId"
|
|
1876
|
-
})),
|
|
1877
|
-
journeyId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1878
|
-
expected: "a string matching the RegExp ^jrny_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1879
|
-
identifier: "JourneyId"
|
|
1880
|
-
})),
|
|
1545
|
+
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}$" })),
|
|
1546
|
+
journeyId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^jrny_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrny_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1881
1547
|
journeyVersion: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
|
|
1882
|
-
runId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1883
|
-
expected: "a string matching the RegExp ^jrun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1884
|
-
identifier: "JourneyRunId"
|
|
1885
|
-
})),
|
|
1548
|
+
runId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^jrun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^jrun_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1886
1549
|
nodeId: Schema.String,
|
|
1887
1550
|
contact: Schema.StructWithRest(Schema.Struct({
|
|
1888
|
-
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
1889
|
-
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1890
|
-
identifier: "ContactId"
|
|
1891
|
-
})),
|
|
1551
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
1892
1552
|
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
1893
1553
|
email: Schema.Union([Schema.String, Schema.Null])
|
|
1894
1554
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1895
|
-
data: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
|
|
1555
|
+
data: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
|
|
1896
1556
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1897
1557
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1898
1558
|
const SamvaWebhookEventSchema = Schema.Union([
|
|
@@ -1923,6 +1583,7 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1923
1583
|
DomainWarmingUpdatedEventSchema,
|
|
1924
1584
|
TemplateRegistrationUpdatedEventSchema,
|
|
1925
1585
|
FlowRegistrationUpdatedEventSchema,
|
|
1586
|
+
WhatsappNumberConnectedEventSchema,
|
|
1926
1587
|
MailboxMessageReceivedEventSchema,
|
|
1927
1588
|
MailboxMessageSentEventSchema,
|
|
1928
1589
|
MailboxActionPendingApprovalEventSchema,
|
|
@@ -1933,6 +1594,6 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1933
1594
|
JourneyWebhookEventSchema
|
|
1934
1595
|
]);
|
|
1935
1596
|
//#endregion
|
|
1936
|
-
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 };
|
|
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 };
|
|
1937
1598
|
|
|
1938
1599
|
//# sourceMappingURL=schemas.gen.js.map
|