@samva/webhooks 0.20.0 → 0.21.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-BPULV030.js} +656 -1962
- package/dist/promise.js +2 -2
- package/dist/protocol-D0_izLnI.js +591 -0
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +32 -697
- package/dist/schemas.gen.js +123 -1025
- package/dist/types.gen.d.ts +17 -472
- package/package.json +3 -4
- package/dist/protocol-BSGksDha.js +0 -714
package/dist/schemas.gen.js
CHANGED
|
@@ -4,15 +4,8 @@ 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
|
-
|
|
9
|
-
identifier: "MailboxId"
|
|
10
|
-
})), Schema.Null])),
|
|
11
|
-
channel: Schema.Literals([
|
|
12
|
-
"sms",
|
|
13
|
-
"whatsapp",
|
|
14
|
-
"email"
|
|
15
|
-
]),
|
|
7
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
8
|
+
channel: Schema.Literal("email"),
|
|
16
9
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
17
10
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
18
11
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -23,25 +16,16 @@ const MessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
23
16
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
24
17
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
25
18
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
26
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
27
|
-
"marketing",
|
|
28
|
-
"utility",
|
|
29
|
-
"authentication"
|
|
30
|
-
]), Schema.Null])),
|
|
31
19
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
32
20
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
33
21
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
34
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
35
22
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
36
23
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
37
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
38
24
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
39
25
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
40
26
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
41
27
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
42
28
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
43
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
44
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
45
29
|
messageId: Schema.String,
|
|
46
30
|
organizationId: Schema.String
|
|
47
31
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -50,61 +34,8 @@ const MessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
50
34
|
type: Schema.Literal("message.delivered"),
|
|
51
35
|
timestamp: Schema.String,
|
|
52
36
|
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
|
-
|
|
55
|
-
identifier: "MailboxId"
|
|
56
|
-
})), Schema.Null])),
|
|
57
|
-
channel: Schema.Literals([
|
|
58
|
-
"sms",
|
|
59
|
-
"whatsapp",
|
|
60
|
-
"email"
|
|
61
|
-
]),
|
|
62
|
-
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
63
|
-
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
64
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
65
|
-
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
66
|
-
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
67
|
-
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
68
|
-
errorCode: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
69
|
-
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
70
|
-
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
71
|
-
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
72
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
73
|
-
"marketing",
|
|
74
|
-
"utility",
|
|
75
|
-
"authentication"
|
|
76
|
-
]), Schema.Null])),
|
|
77
|
-
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
78
|
-
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
79
|
-
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
80
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
81
|
-
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
82
|
-
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
83
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
84
|
-
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
85
|
-
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
86
|
-
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
87
|
-
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
88
|
-
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
89
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
90
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
91
|
-
messageId: Schema.String,
|
|
92
|
-
organizationId: Schema.String
|
|
93
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
94
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
95
|
-
const MessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
96
|
-
type: Schema.Literal("message.read"),
|
|
97
|
-
timestamp: Schema.String,
|
|
98
|
-
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])),
|
|
103
|
-
channel: Schema.Literals([
|
|
104
|
-
"sms",
|
|
105
|
-
"whatsapp",
|
|
106
|
-
"email"
|
|
107
|
-
]),
|
|
37
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
38
|
+
channel: Schema.Literal("email"),
|
|
108
39
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
109
40
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
110
41
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -115,25 +46,16 @@ const MessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
115
46
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
116
47
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
117
48
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
118
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
119
|
-
"marketing",
|
|
120
|
-
"utility",
|
|
121
|
-
"authentication"
|
|
122
|
-
]), Schema.Null])),
|
|
123
49
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
124
50
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
125
51
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
126
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
127
52
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
128
53
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
129
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
130
54
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
131
55
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
132
56
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
133
57
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
134
58
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
135
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
136
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
137
59
|
messageId: Schema.String,
|
|
138
60
|
organizationId: Schema.String
|
|
139
61
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -142,15 +64,8 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
142
64
|
type: Schema.Literal("message.failed"),
|
|
143
65
|
timestamp: Schema.String,
|
|
144
66
|
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
|
-
|
|
147
|
-
identifier: "MailboxId"
|
|
148
|
-
})), Schema.Null])),
|
|
149
|
-
channel: Schema.Literals([
|
|
150
|
-
"sms",
|
|
151
|
-
"whatsapp",
|
|
152
|
-
"email"
|
|
153
|
-
]),
|
|
67
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
68
|
+
channel: Schema.Literal("email"),
|
|
154
69
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
155
70
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
156
71
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -161,25 +76,16 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
161
76
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
162
77
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
163
78
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
164
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
165
|
-
"marketing",
|
|
166
|
-
"utility",
|
|
167
|
-
"authentication"
|
|
168
|
-
]), Schema.Null])),
|
|
169
79
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
170
80
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
171
81
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
172
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
173
82
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
174
83
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
175
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
176
84
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
177
85
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
178
86
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
179
87
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
180
88
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
181
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
182
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
183
89
|
messageId: Schema.String,
|
|
184
90
|
organizationId: Schema.String
|
|
185
91
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -188,15 +94,8 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
188
94
|
type: Schema.Literal("message.bounced"),
|
|
189
95
|
timestamp: Schema.String,
|
|
190
96
|
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
|
-
|
|
193
|
-
identifier: "MailboxId"
|
|
194
|
-
})), Schema.Null])),
|
|
195
|
-
channel: Schema.Literals([
|
|
196
|
-
"sms",
|
|
197
|
-
"whatsapp",
|
|
198
|
-
"email"
|
|
199
|
-
]),
|
|
97
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
98
|
+
channel: Schema.Literal("email"),
|
|
200
99
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
201
100
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
202
101
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -207,25 +106,16 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
207
106
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
208
107
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
209
108
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
210
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
211
|
-
"marketing",
|
|
212
|
-
"utility",
|
|
213
|
-
"authentication"
|
|
214
|
-
]), Schema.Null])),
|
|
215
109
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
216
110
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
217
111
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
218
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
219
112
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
220
113
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
221
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
222
114
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
223
115
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
224
116
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
225
117
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
226
118
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
227
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
228
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
229
119
|
messageId: Schema.String,
|
|
230
120
|
organizationId: Schema.String
|
|
231
121
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -234,15 +124,8 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
234
124
|
type: Schema.Literal("message.complained"),
|
|
235
125
|
timestamp: Schema.String,
|
|
236
126
|
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
|
-
|
|
239
|
-
identifier: "MailboxId"
|
|
240
|
-
})), Schema.Null])),
|
|
241
|
-
channel: Schema.Literals([
|
|
242
|
-
"sms",
|
|
243
|
-
"whatsapp",
|
|
244
|
-
"email"
|
|
245
|
-
]),
|
|
127
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
128
|
+
channel: Schema.Literal("email"),
|
|
246
129
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
247
130
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
248
131
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -253,25 +136,16 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
253
136
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
254
137
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
255
138
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
256
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
257
|
-
"marketing",
|
|
258
|
-
"utility",
|
|
259
|
-
"authentication"
|
|
260
|
-
]), Schema.Null])),
|
|
261
139
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
262
140
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
263
141
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
264
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
265
142
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
266
143
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
267
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
268
144
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
269
145
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
270
146
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
271
147
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
272
148
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
273
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
274
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
275
149
|
messageId: Schema.String,
|
|
276
150
|
organizationId: Schema.String
|
|
277
151
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -280,15 +154,8 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
280
154
|
type: Schema.Literal("message.received"),
|
|
281
155
|
timestamp: Schema.String,
|
|
282
156
|
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
|
-
|
|
285
|
-
identifier: "MailboxId"
|
|
286
|
-
})), Schema.Null])),
|
|
287
|
-
channel: Schema.Literals([
|
|
288
|
-
"sms",
|
|
289
|
-
"whatsapp",
|
|
290
|
-
"email"
|
|
291
|
-
]),
|
|
157
|
+
mailboxId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null])),
|
|
158
|
+
channel: Schema.Literal("email"),
|
|
292
159
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
293
160
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
294
161
|
cost: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
@@ -299,322 +166,16 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
299
166
|
conversationId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
300
167
|
isBillable: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
301
168
|
messageType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
302
|
-
templateCategory: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
303
|
-
"marketing",
|
|
304
|
-
"utility",
|
|
305
|
-
"authentication"
|
|
306
|
-
]), Schema.Null])),
|
|
307
169
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
308
170
|
toEmails: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
309
171
|
providerMessageId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
310
|
-
waId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
311
172
|
hasAttachments: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
312
173
|
isAutoReply: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
313
|
-
segments: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
314
174
|
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
315
175
|
from: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
316
176
|
body: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
317
177
|
direction: Schema.optionalKey(Schema.Union([Schema.Literals(["inbound", "outbound"]), Schema.Null])),
|
|
318
178
|
errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
319
|
-
parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
320
|
-
carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
321
|
-
whatsapp: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
322
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
323
|
-
template: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
324
|
-
name: Schema.String,
|
|
325
|
-
language: Schema.String,
|
|
326
|
-
components: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
327
|
-
type: Schema.Literals([
|
|
328
|
-
"header",
|
|
329
|
-
"body",
|
|
330
|
-
"footer",
|
|
331
|
-
"button"
|
|
332
|
-
]),
|
|
333
|
-
sub_type: Schema.optionalKey(Schema.Union([Schema.Literals([
|
|
334
|
-
"url",
|
|
335
|
-
"quick_reply",
|
|
336
|
-
"copy_code"
|
|
337
|
-
]), Schema.Null])),
|
|
338
|
-
index: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
339
|
-
parameters: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
340
|
-
type: Schema.Literals([
|
|
341
|
-
"text",
|
|
342
|
-
"currency",
|
|
343
|
-
"date_time",
|
|
344
|
-
"image",
|
|
345
|
-
"document",
|
|
346
|
-
"video",
|
|
347
|
-
"coupon_code"
|
|
348
|
-
]),
|
|
349
|
-
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
350
|
-
currency: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
351
|
-
fallback_value: Schema.String,
|
|
352
|
-
code: Schema.String,
|
|
353
|
-
amount_1000: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
354
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
355
|
-
date_time: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ fallback_value: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
356
|
-
image: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ link: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
357
|
-
document: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
358
|
-
link: Schema.String,
|
|
359
|
-
filename: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
360
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
361
|
-
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]))
|
|
363
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
364
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
365
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
366
|
-
interactive: Schema.optionalKey(Schema.Union([
|
|
367
|
-
Schema.StructWithRest(Schema.Struct({
|
|
368
|
-
type: Schema.Literal("buttons"),
|
|
369
|
-
header: Schema.optionalKey(Schema.Union([
|
|
370
|
-
Schema.StructWithRest(Schema.Struct({
|
|
371
|
-
type: Schema.Literal("text"),
|
|
372
|
-
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" }))]).annotate({ identifier: "WhatsAppTextHeader" }),
|
|
374
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
375
|
-
type: Schema.Literal("image"),
|
|
376
|
-
url: Schema.String
|
|
377
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
378
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
381
|
-
identifier: "MediaId"
|
|
382
|
-
}))
|
|
383
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
|
|
384
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
385
|
-
type: Schema.Literal("video"),
|
|
386
|
-
url: Schema.String
|
|
387
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
388
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
391
|
-
identifier: "MediaId"
|
|
392
|
-
}))
|
|
393
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
|
|
394
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
395
|
-
type: Schema.Literal("document"),
|
|
396
|
-
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
|
-
url: Schema.String
|
|
398
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
399
|
-
type: Schema.Literal("document"),
|
|
400
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
403
|
-
identifier: "MediaId"
|
|
404
|
-
}))
|
|
405
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
|
|
406
|
-
]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
|
|
407
|
-
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
|
-
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
|
-
buttons: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
410
|
-
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
|
-
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" }))]).annotate({ identifier: "WhatsAppReplyButton" })).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" }))
|
|
413
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppButtonsMessage" }),
|
|
414
|
-
Schema.StructWithRest(Schema.Struct({
|
|
415
|
-
type: Schema.Literal("list"),
|
|
416
|
-
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
417
|
-
type: Schema.Literal("text"),
|
|
418
|
-
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" }))]).annotate({ identifier: "WhatsAppTextHeader" })),
|
|
420
|
-
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
|
-
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
|
-
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" })),
|
|
423
|
-
sections: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
424
|
-
title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" }))),
|
|
425
|
-
rows: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
426
|
-
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
|
-
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
|
-
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" }))]).annotate({ identifier: "WhatsAppListRow" })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
430
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppListSection" })).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" }))
|
|
431
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppListMessage" }),
|
|
432
|
-
Schema.StructWithRest(Schema.Struct({
|
|
433
|
-
type: Schema.Literal("cta_url"),
|
|
434
|
-
header: Schema.optionalKey(Schema.Union([
|
|
435
|
-
Schema.StructWithRest(Schema.Struct({
|
|
436
|
-
type: Schema.Literal("text"),
|
|
437
|
-
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" }))]).annotate({ identifier: "WhatsAppTextHeader" }),
|
|
439
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
440
|
-
type: Schema.Literal("image"),
|
|
441
|
-
url: Schema.String
|
|
442
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
443
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
446
|
-
identifier: "MediaId"
|
|
447
|
-
}))
|
|
448
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
|
|
449
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
450
|
-
type: Schema.Literal("video"),
|
|
451
|
-
url: Schema.String
|
|
452
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
453
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
456
|
-
identifier: "MediaId"
|
|
457
|
-
}))
|
|
458
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
|
|
459
|
-
Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
460
|
-
type: Schema.Literal("document"),
|
|
461
|
-
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
|
-
url: Schema.String
|
|
463
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderLink" }), Schema.StructWithRest(Schema.Struct({
|
|
464
|
-
type: Schema.Literal("document"),
|
|
465
|
-
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
|
-
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
468
|
-
identifier: "MediaId"
|
|
469
|
-
}))
|
|
470
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
|
|
471
|
-
]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
|
|
472
|
-
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
|
-
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
|
-
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
|
-
url: Schema.String
|
|
476
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppCtaUrlMessage" }),
|
|
477
|
-
Schema.StructWithRest(Schema.Struct({
|
|
478
|
-
type: Schema.Literal("flow"),
|
|
479
|
-
header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
480
|
-
type: Schema.Literal("text"),
|
|
481
|
-
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" }))]).annotate({ identifier: "WhatsAppTextHeader_1" })),
|
|
483
|
-
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
|
-
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
|
-
})),
|
|
489
|
-
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
|
-
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" }))),
|
|
491
|
-
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
|
-
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
|
-
})),
|
|
497
|
-
providerFlowId: Schema.String
|
|
498
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredFlowMessage" })
|
|
499
|
-
]).annotate({ identifier: "WhatsAppStoredInteractive" })),
|
|
500
|
-
media: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
501
|
-
Schema.StructWithRest(Schema.Struct({
|
|
502
|
-
type: Schema.Literals([
|
|
503
|
-
"image",
|
|
504
|
-
"video",
|
|
505
|
-
"audio",
|
|
506
|
-
"document",
|
|
507
|
-
"sticker"
|
|
508
|
-
]),
|
|
509
|
-
url: Schema.String,
|
|
510
|
-
caption: Schema.optionalKey(Schema.String),
|
|
511
|
-
filename: Schema.optionalKey(Schema.String)
|
|
512
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
513
|
-
Schema.StructWithRest(Schema.Struct({
|
|
514
|
-
type: Schema.Literals([
|
|
515
|
-
"image",
|
|
516
|
-
"video",
|
|
517
|
-
"audio",
|
|
518
|
-
"document",
|
|
519
|
-
"sticker"
|
|
520
|
-
]),
|
|
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
|
-
})),
|
|
525
|
-
caption: Schema.optionalKey(Schema.String),
|
|
526
|
-
filename: Schema.optionalKey(Schema.String)
|
|
527
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
528
|
-
Schema.StructWithRest(Schema.Struct({
|
|
529
|
-
type: Schema.Literals([
|
|
530
|
-
"image",
|
|
531
|
-
"video",
|
|
532
|
-
"audio",
|
|
533
|
-
"document",
|
|
534
|
-
"sticker"
|
|
535
|
-
]),
|
|
536
|
-
providerMediaId: Schema.String,
|
|
537
|
-
mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
538
|
-
caption: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
539
|
-
filename: Schema.optionalKey(Schema.String)
|
|
540
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
541
|
-
]).annotate({ identifier: "WhatsAppStoredMedia" }), Schema.Null])),
|
|
542
|
-
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]),
|
|
547
|
-
providerMessageId: Schema.String,
|
|
548
|
-
emoji: Schema.Union([Schema.String, Schema.Null])
|
|
549
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredReaction" })),
|
|
550
|
-
location: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
551
|
-
latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
552
|
-
longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
553
|
-
name: Schema.optionalKey(Schema.String),
|
|
554
|
-
address: Schema.optionalKey(Schema.String),
|
|
555
|
-
url: Schema.optionalKey(Schema.String)
|
|
556
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredLocation" })),
|
|
557
|
-
contacts: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
558
|
-
name: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
559
|
-
formattedName: Schema.optionalKey(Schema.String),
|
|
560
|
-
firstName: Schema.optionalKey(Schema.String),
|
|
561
|
-
lastName: Schema.optionalKey(Schema.String),
|
|
562
|
-
middleName: Schema.optionalKey(Schema.String),
|
|
563
|
-
prefix: Schema.optionalKey(Schema.String),
|
|
564
|
-
suffix: Schema.optionalKey(Schema.String)
|
|
565
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
566
|
-
phones: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
567
|
-
phone: Schema.optionalKey(Schema.String),
|
|
568
|
-
type: Schema.optionalKey(Schema.String),
|
|
569
|
-
waId: Schema.optionalKey(Schema.String)
|
|
570
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
571
|
-
emails: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
572
|
-
email: Schema.optionalKey(Schema.String),
|
|
573
|
-
type: Schema.optionalKey(Schema.String)
|
|
574
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
575
|
-
urls: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
576
|
-
url: Schema.optionalKey(Schema.String),
|
|
577
|
-
type: Schema.optionalKey(Schema.String)
|
|
578
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
579
|
-
org: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
580
|
-
company: Schema.optionalKey(Schema.String),
|
|
581
|
-
department: Schema.optionalKey(Schema.String),
|
|
582
|
-
title: Schema.optionalKey(Schema.String)
|
|
583
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
584
|
-
addresses: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
585
|
-
street: Schema.optionalKey(Schema.String),
|
|
586
|
-
city: Schema.optionalKey(Schema.String),
|
|
587
|
-
state: Schema.optionalKey(Schema.String),
|
|
588
|
-
zip: Schema.optionalKey(Schema.String),
|
|
589
|
-
country: Schema.optionalKey(Schema.String),
|
|
590
|
-
countryCode: Schema.optionalKey(Schema.String),
|
|
591
|
-
type: Schema.optionalKey(Schema.String)
|
|
592
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
|
|
593
|
-
birthday: Schema.optionalKey(Schema.String)
|
|
594
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredContactCard" }))),
|
|
595
|
-
reply: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
596
|
-
type: Schema.Literals([
|
|
597
|
-
"button",
|
|
598
|
-
"list",
|
|
599
|
-
"template_button"
|
|
600
|
-
]),
|
|
601
|
-
id: Schema.String,
|
|
602
|
-
title: Schema.String,
|
|
603
|
-
description: Schema.optionalKey(Schema.String)
|
|
604
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppReceivedReply" })),
|
|
605
|
-
flowResponse: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
606
|
-
flowToken: Schema.Union([Schema.String, Schema.Null]),
|
|
607
|
-
response: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
|
|
608
|
-
body: Schema.optionalKey(Schema.String)
|
|
609
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppReceivedFlowResponse" })),
|
|
610
|
-
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]),
|
|
615
|
-
providerMessageId: Schema.String
|
|
616
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppMessageReference" }))
|
|
617
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppMessageContent" }), Schema.Null])),
|
|
618
179
|
messageId: Schema.String,
|
|
619
180
|
organizationId: Schema.String
|
|
620
181
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -623,19 +184,10 @@ const MessageOpenedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
623
184
|
type: Schema.Literal("message.opened"),
|
|
624
185
|
timestamp: Schema.String,
|
|
625
186
|
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
|
-
})),
|
|
187
|
+
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}$" })),
|
|
188
|
+
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
189
|
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
|
-
})),
|
|
190
|
+
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
191
|
recipient: Schema.String,
|
|
640
192
|
occurredAt: Schema.String,
|
|
641
193
|
userAgent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -656,33 +208,18 @@ const MessageOpenedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
656
208
|
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
657
209
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
658
210
|
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]))
|
|
211
|
+
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])),
|
|
212
|
+
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
213
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
668
214
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
669
215
|
const MessageClickedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
670
216
|
type: Schema.Literal("message.clicked"),
|
|
671
217
|
timestamp: Schema.String,
|
|
672
218
|
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
|
-
})),
|
|
219
|
+
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}$" })),
|
|
220
|
+
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
221
|
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
|
-
})),
|
|
222
|
+
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
223
|
recipient: Schema.String,
|
|
687
224
|
occurredAt: Schema.String,
|
|
688
225
|
userAgent: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -705,24 +242,15 @@ const MessageClickedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
705
242
|
linkIndex: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
706
243
|
destinationUrl: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
707
244
|
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]))
|
|
245
|
+
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])),
|
|
246
|
+
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
247
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
717
248
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
718
249
|
const ContactCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
719
250
|
type: Schema.Literal("contact.created"),
|
|
720
251
|
timestamp: Schema.String,
|
|
721
252
|
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
|
-
})),
|
|
253
|
+
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
254
|
status: Schema.Literals([
|
|
727
255
|
"active",
|
|
728
256
|
"paused",
|
|
@@ -735,7 +263,7 @@ const ContactCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
735
263
|
type: Schema.Literals(["email", "phone"]),
|
|
736
264
|
identifier: Schema.String,
|
|
737
265
|
verified: Schema.Boolean
|
|
738
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
266
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
739
267
|
tags: Schema.Array(Schema.String),
|
|
740
268
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
741
269
|
createdAt: Schema.String,
|
|
@@ -746,10 +274,7 @@ const ContactUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
746
274
|
type: Schema.Literal("contact.updated"),
|
|
747
275
|
timestamp: Schema.String,
|
|
748
276
|
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
|
-
})),
|
|
277
|
+
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
278
|
status: Schema.Literals([
|
|
754
279
|
"active",
|
|
755
280
|
"paused",
|
|
@@ -762,7 +287,7 @@ const ContactUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
762
287
|
type: Schema.Literals(["email", "phone"]),
|
|
763
288
|
identifier: Schema.String,
|
|
764
289
|
verified: Schema.Boolean
|
|
765
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
290
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
766
291
|
tags: Schema.Array(Schema.String),
|
|
767
292
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
768
293
|
createdAt: Schema.String,
|
|
@@ -773,10 +298,7 @@ const ContactDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
773
298
|
type: Schema.Literal("contact.deleted"),
|
|
774
299
|
timestamp: Schema.String,
|
|
775
300
|
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
|
-
})),
|
|
301
|
+
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
302
|
status: Schema.Literals([
|
|
781
303
|
"active",
|
|
782
304
|
"paused",
|
|
@@ -789,7 +311,7 @@ const ContactDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
789
311
|
type: Schema.Literals(["email", "phone"]),
|
|
790
312
|
identifier: Schema.String,
|
|
791
313
|
verified: Schema.Boolean
|
|
792
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
314
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
793
315
|
tags: Schema.Array(Schema.String),
|
|
794
316
|
externalId: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
795
317
|
createdAt: Schema.String,
|
|
@@ -800,25 +322,13 @@ const ContactSubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
800
322
|
type: Schema.Literal("contact.subscribed"),
|
|
801
323
|
timestamp: Schema.String,
|
|
802
324
|
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
|
-
})),
|
|
325
|
+
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}$" })),
|
|
326
|
+
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
327
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
812
328
|
groupId: Schema.String,
|
|
813
329
|
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])),
|
|
330
|
+
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])),
|
|
331
|
+
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
332
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
823
333
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
824
334
|
source: Schema.Literals([
|
|
@@ -827,18 +337,9 @@ const ContactSubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
827
337
|
"manual",
|
|
828
338
|
"complaint"
|
|
829
339
|
]),
|
|
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])),
|
|
340
|
+
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])),
|
|
341
|
+
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])),
|
|
342
|
+
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
343
|
occurredAt: Schema.String
|
|
843
344
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
844
345
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -846,25 +347,13 @@ const ContactUnsubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
846
347
|
type: Schema.Literal("contact.unsubscribed"),
|
|
847
348
|
timestamp: Schema.String,
|
|
848
349
|
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
|
-
})),
|
|
350
|
+
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}$" })),
|
|
351
|
+
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
352
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
858
353
|
groupId: Schema.String,
|
|
859
354
|
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])),
|
|
355
|
+
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])),
|
|
356
|
+
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
357
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
869
358
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
870
359
|
source: Schema.Literals([
|
|
@@ -873,18 +362,9 @@ const ContactUnsubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
873
362
|
"manual",
|
|
874
363
|
"complaint"
|
|
875
364
|
]),
|
|
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])),
|
|
365
|
+
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])),
|
|
366
|
+
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])),
|
|
367
|
+
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
368
|
occurredAt: Schema.String
|
|
889
369
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
890
370
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -892,25 +372,13 @@ const ContactResubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
892
372
|
type: Schema.Literal("contact.resubscribed"),
|
|
893
373
|
timestamp: Schema.String,
|
|
894
374
|
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
|
-
})),
|
|
375
|
+
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}$" })),
|
|
376
|
+
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
377
|
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
904
378
|
groupId: Schema.String,
|
|
905
379
|
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])),
|
|
380
|
+
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])),
|
|
381
|
+
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
382
|
consentIp: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
915
383
|
consentSource: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
916
384
|
source: Schema.Literals([
|
|
@@ -919,18 +387,9 @@ const ContactResubscribedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
919
387
|
"manual",
|
|
920
388
|
"complaint"
|
|
921
389
|
]),
|
|
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])),
|
|
390
|
+
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])),
|
|
391
|
+
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])),
|
|
392
|
+
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
393
|
occurredAt: Schema.String
|
|
935
394
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
936
395
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
@@ -938,27 +397,14 @@ const ContactConsentChangedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
938
397
|
type: Schema.Literal("contact.consent_changed"),
|
|
939
398
|
timestamp: Schema.String,
|
|
940
399
|
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
|
-
})),
|
|
400
|
+
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}$" })),
|
|
401
|
+
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
402
|
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
|
-
})),
|
|
403
|
+
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
404
|
type: Schema.Literals(["email", "phone"]),
|
|
955
405
|
identifier: Schema.String
|
|
956
406
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
957
|
-
channel: Schema.
|
|
958
|
-
"sms",
|
|
959
|
-
"whatsapp",
|
|
960
|
-
"email"
|
|
961
|
-
]),
|
|
407
|
+
channel: Schema.Literal("email"),
|
|
962
408
|
status: Schema.Literals(["opted_in", "opted_out"]),
|
|
963
409
|
previousStatus: Schema.Union([Schema.Literals(["opted_in", "opted_out"]), Schema.Null]),
|
|
964
410
|
source: Schema.String,
|
|
@@ -969,25 +415,11 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
969
415
|
type: Schema.Literal("conversation.created"),
|
|
970
416
|
timestamp: Schema.String,
|
|
971
417
|
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
|
-
})),
|
|
418
|
+
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
419
|
+
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
420
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
981
|
-
channels: Schema.Array(Schema.
|
|
982
|
-
|
|
983
|
-
"whatsapp",
|
|
984
|
-
"email"
|
|
985
|
-
])),
|
|
986
|
-
primaryChannel: Schema.Literals([
|
|
987
|
-
"sms",
|
|
988
|
-
"whatsapp",
|
|
989
|
-
"email"
|
|
990
|
-
]),
|
|
421
|
+
channels: Schema.Array(Schema.Literal("email")),
|
|
422
|
+
primaryChannel: Schema.Literal("email"),
|
|
991
423
|
status: Schema.Literals([
|
|
992
424
|
"active",
|
|
993
425
|
"waiting",
|
|
@@ -995,10 +427,7 @@ const ConversationCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
995
427
|
"escalated",
|
|
996
428
|
"archived"
|
|
997
429
|
]),
|
|
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])),
|
|
430
|
+
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
431
|
createdAt: Schema.String,
|
|
1003
432
|
updatedAt: Schema.String
|
|
1004
433
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1007,25 +436,11 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1007
436
|
type: Schema.Literal("conversation.updated"),
|
|
1008
437
|
timestamp: Schema.String,
|
|
1009
438
|
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
|
-
})),
|
|
439
|
+
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
440
|
+
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
441
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
1019
|
-
channels: Schema.Array(Schema.
|
|
1020
|
-
|
|
1021
|
-
"whatsapp",
|
|
1022
|
-
"email"
|
|
1023
|
-
])),
|
|
1024
|
-
primaryChannel: Schema.Literals([
|
|
1025
|
-
"sms",
|
|
1026
|
-
"whatsapp",
|
|
1027
|
-
"email"
|
|
1028
|
-
]),
|
|
442
|
+
channels: Schema.Array(Schema.Literal("email")),
|
|
443
|
+
primaryChannel: Schema.Literal("email"),
|
|
1029
444
|
status: Schema.Literals([
|
|
1030
445
|
"active",
|
|
1031
446
|
"waiting",
|
|
@@ -1033,10 +448,7 @@ const ConversationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1033
448
|
"escalated",
|
|
1034
449
|
"archived"
|
|
1035
450
|
]),
|
|
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])),
|
|
451
|
+
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
452
|
createdAt: Schema.String,
|
|
1041
453
|
updatedAt: Schema.String
|
|
1042
454
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1045,25 +457,11 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1045
457
|
type: Schema.Literal("conversation.archived"),
|
|
1046
458
|
timestamp: Schema.String,
|
|
1047
459
|
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
|
-
})),
|
|
460
|
+
conversationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
461
|
+
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
462
|
title: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null])),
|
|
1057
|
-
channels: Schema.Array(Schema.
|
|
1058
|
-
|
|
1059
|
-
"whatsapp",
|
|
1060
|
-
"email"
|
|
1061
|
-
])),
|
|
1062
|
-
primaryChannel: Schema.Literals([
|
|
1063
|
-
"sms",
|
|
1064
|
-
"whatsapp",
|
|
1065
|
-
"email"
|
|
1066
|
-
]),
|
|
463
|
+
channels: Schema.Array(Schema.Literal("email")),
|
|
464
|
+
primaryChannel: Schema.Literal("email"),
|
|
1067
465
|
status: Schema.Literals([
|
|
1068
466
|
"active",
|
|
1069
467
|
"waiting",
|
|
@@ -1071,10 +469,7 @@ const ConversationArchivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1071
469
|
"escalated",
|
|
1072
470
|
"archived"
|
|
1073
471
|
]),
|
|
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])),
|
|
472
|
+
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
473
|
createdAt: Schema.String,
|
|
1079
474
|
updatedAt: Schema.String
|
|
1080
475
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1083,14 +478,8 @@ const WebhookCreatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1083
478
|
type: Schema.Literal("webhook.created"),
|
|
1084
479
|
timestamp: Schema.String,
|
|
1085
480
|
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
|
-
})),
|
|
481
|
+
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}$" })),
|
|
482
|
+
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
483
|
name: Schema.String,
|
|
1095
484
|
url: Schema.String,
|
|
1096
485
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1104,14 +493,8 @@ const WebhookUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1104
493
|
type: Schema.Literal("webhook.updated"),
|
|
1105
494
|
timestamp: Schema.String,
|
|
1106
495
|
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
|
-
})),
|
|
496
|
+
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}$" })),
|
|
497
|
+
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
498
|
name: Schema.String,
|
|
1116
499
|
url: Schema.String,
|
|
1117
500
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1125,14 +508,8 @@ const WebhookDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1125
508
|
type: Schema.Literal("webhook.deleted"),
|
|
1126
509
|
timestamp: Schema.String,
|
|
1127
510
|
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
|
-
})),
|
|
511
|
+
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}$" })),
|
|
512
|
+
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
513
|
name: Schema.String,
|
|
1137
514
|
url: Schema.String,
|
|
1138
515
|
eventTypes: Schema.Array(Schema.String),
|
|
@@ -1151,14 +528,8 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1151
528
|
type: Schema.Literal("domain.updated"),
|
|
1152
529
|
timestamp: Schema.String,
|
|
1153
530
|
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
|
-
})),
|
|
531
|
+
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}$" })),
|
|
532
|
+
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
533
|
domain: Schema.String,
|
|
1163
534
|
previousPhase: Schema.Literals([
|
|
1164
535
|
"dns-setup",
|
|
@@ -1204,10 +575,7 @@ const DomainUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1204
575
|
"unknown"
|
|
1205
576
|
]), Schema.Null]))
|
|
1206
577
|
}), [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]),
|
|
578
|
+
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
579
|
checkedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1212
580
|
nextCheckAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1213
581
|
failure: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
@@ -1254,158 +622,16 @@ const DomainWarmingUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1254
622
|
updatedAt: Schema.String
|
|
1255
623
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1256
624
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1257
|
-
const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1258
|
-
type: Schema.Literal("template.registration.updated"),
|
|
1259
|
-
timestamp: Schema.String,
|
|
1260
|
-
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
|
-
expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1263
|
-
identifier: "TemplateRegistrationId"
|
|
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
|
-
})),
|
|
1273
|
-
target: Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1274
|
-
provider: Schema.Literal("whatsapp"),
|
|
1275
|
-
wabaId: Schema.String
|
|
1276
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppRegistrationTarget" }), Schema.StructWithRest(Schema.Struct({
|
|
1277
|
-
provider: Schema.Literal("dlt"),
|
|
1278
|
-
entityId: Schema.String,
|
|
1279
|
-
headerId: Schema.String
|
|
1280
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "DltRegistrationTarget" })]).annotate({ identifier: "TemplateRegistrationTarget" }),
|
|
1281
|
-
name: Schema.String,
|
|
1282
|
-
language: Schema.String,
|
|
1283
|
-
status: Schema.Literals([
|
|
1284
|
-
"draft",
|
|
1285
|
-
"submitted",
|
|
1286
|
-
"approved",
|
|
1287
|
-
"rejected",
|
|
1288
|
-
"paused",
|
|
1289
|
-
"disabled"
|
|
1290
|
-
]),
|
|
1291
|
-
category: Schema.Literals([
|
|
1292
|
-
"marketing",
|
|
1293
|
-
"utility",
|
|
1294
|
-
"authentication",
|
|
1295
|
-
"transactional",
|
|
1296
|
-
"service_implicit",
|
|
1297
|
-
"service_explicit",
|
|
1298
|
-
"promotional"
|
|
1299
|
-
]),
|
|
1300
|
-
providerCategory: Schema.Union([Schema.Literals([
|
|
1301
|
-
"marketing",
|
|
1302
|
-
"utility",
|
|
1303
|
-
"authentication",
|
|
1304
|
-
"transactional",
|
|
1305
|
-
"service_implicit",
|
|
1306
|
-
"service_explicit",
|
|
1307
|
-
"promotional"
|
|
1308
|
-
]), Schema.Null]),
|
|
1309
|
-
providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
|
|
1310
|
-
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
1311
|
-
submittedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1312
|
-
statusChangedAt: Schema.String,
|
|
1313
|
-
createdAt: Schema.String,
|
|
1314
|
-
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
|
-
})),
|
|
1319
|
-
previousStatus: Schema.Literals([
|
|
1320
|
-
"draft",
|
|
1321
|
-
"submitted",
|
|
1322
|
-
"approved",
|
|
1323
|
-
"rejected",
|
|
1324
|
-
"paused",
|
|
1325
|
-
"disabled"
|
|
1326
|
-
])
|
|
1327
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1328
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1329
|
-
const FlowRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1330
|
-
type: Schema.Literal("flow.registration.updated"),
|
|
1331
|
-
timestamp: Schema.String,
|
|
1332
|
-
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
|
-
expected: "a string matching the RegExp ^wafreg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
1335
|
-
identifier: "WhatsAppFlowRegistrationId"
|
|
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
|
-
})),
|
|
1345
|
-
versionNumber: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })),
|
|
1346
|
-
wabaId: Schema.String,
|
|
1347
|
-
providerFlowId: Schema.Union([Schema.String, Schema.Null]),
|
|
1348
|
-
name: Schema.String,
|
|
1349
|
-
status: Schema.Literals([
|
|
1350
|
-
"draft",
|
|
1351
|
-
"published",
|
|
1352
|
-
"throttled",
|
|
1353
|
-
"blocked",
|
|
1354
|
-
"deprecated"
|
|
1355
|
-
]),
|
|
1356
|
-
validationErrors: Schema.Array(Schema.StructWithRest(Schema.Struct({
|
|
1357
|
-
error: Schema.String,
|
|
1358
|
-
message: Schema.String,
|
|
1359
|
-
path: Schema.optionalKey(Schema.String),
|
|
1360
|
-
line: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))),
|
|
1361
|
-
column: Schema.optionalKey(Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })))
|
|
1362
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppFlowValidationError" })),
|
|
1363
|
-
publishedAt: Schema.Union([Schema.String, Schema.Null]),
|
|
1364
|
-
statusChangedAt: Schema.String,
|
|
1365
|
-
createdAt: Schema.String,
|
|
1366
|
-
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
|
-
})),
|
|
1371
|
-
previousStatus: Schema.Union([Schema.Literals([
|
|
1372
|
-
"draft",
|
|
1373
|
-
"published",
|
|
1374
|
-
"throttled",
|
|
1375
|
-
"blocked",
|
|
1376
|
-
"deprecated"
|
|
1377
|
-
]), Schema.Null])
|
|
1378
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1379
|
-
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1380
625
|
const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1381
626
|
type: Schema.Literal("mailbox.message.received"),
|
|
1382
627
|
timestamp: Schema.String,
|
|
1383
628
|
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]),
|
|
629
|
+
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}$" })),
|
|
630
|
+
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
631
|
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
|
-
|
|
1395
|
-
|
|
1396
|
-
})),
|
|
1397
|
-
channel: Schema.optionalKey(Schema.Literals([
|
|
1398
|
-
"email",
|
|
1399
|
-
"whatsapp",
|
|
1400
|
-
"sms"
|
|
1401
|
-
]).annotate({
|
|
1402
|
-
description: "Deliveries recorded before this field existed omit it; they are email.",
|
|
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
|
-
})),
|
|
632
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
633
|
+
channel: Schema.optionalKey(Schema.Literal("email").annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
634
|
+
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
635
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1410
636
|
address: Schema.String,
|
|
1411
637
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1416,10 +642,7 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1416
642
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1417
643
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1418
644
|
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
|
-
})),
|
|
645
|
+
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
646
|
filename: Schema.String,
|
|
1424
647
|
contentType: Schema.String,
|
|
1425
648
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1427,14 +650,8 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1427
650
|
occurredAt: Schema.String
|
|
1428
651
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1429
652
|
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." })),
|
|
653
|
+
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}$" })),
|
|
654
|
+
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
655
|
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
1439
656
|
preview: Schema.Union([Schema.String, Schema.Null])
|
|
1440
657
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1444,18 +661,9 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1444
661
|
type: Schema.Literal("mailbox.message.sent"),
|
|
1445
662
|
timestamp: Schema.String,
|
|
1446
663
|
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
|
-
})),
|
|
664
|
+
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}$" })),
|
|
665
|
+
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]),
|
|
666
|
+
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
667
|
state: Schema.optionalKey(Schema.Literal("completed").annotate({ description: "Deliveries recorded before this field existed omit it." })),
|
|
1460
668
|
acceptedAt: Schema.optionalKey(Schema.String),
|
|
1461
669
|
actor: Schema.StructWithRest(Schema.Struct({
|
|
@@ -1478,22 +686,9 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1478
686
|
])
|
|
1479
687
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1480
688
|
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
|
-
|
|
1483
|
-
|
|
1484
|
-
})),
|
|
1485
|
-
channel: Schema.optionalKey(Schema.Literals([
|
|
1486
|
-
"email",
|
|
1487
|
-
"whatsapp",
|
|
1488
|
-
"sms"
|
|
1489
|
-
]).annotate({
|
|
1490
|
-
description: "Deliveries recorded before this field existed omit it; they are email.",
|
|
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
|
-
})),
|
|
689
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
690
|
+
channel: Schema.optionalKey(Schema.Literal("email").annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
691
|
+
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
692
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1498
693
|
address: Schema.String,
|
|
1499
694
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1504,10 +699,7 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1504
699
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1505
700
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1506
701
|
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
|
-
})),
|
|
702
|
+
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
703
|
filename: Schema.String,
|
|
1512
704
|
contentType: Schema.String,
|
|
1513
705
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1520,19 +712,10 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1520
712
|
type: Schema.Literal("mailbox.action.pending_approval"),
|
|
1521
713
|
timestamp: Schema.String,
|
|
1522
714
|
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]),
|
|
715
|
+
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}$" })),
|
|
716
|
+
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
717
|
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
|
-
})),
|
|
718
|
+
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
719
|
type: Schema.Literals([
|
|
1537
720
|
"sendMessage",
|
|
1538
721
|
"reply",
|
|
@@ -1551,24 +734,15 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
|
|
|
1551
734
|
"deny"
|
|
1552
735
|
]),
|
|
1553
736
|
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]),
|
|
737
|
+
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
738
|
source: Schema.Union([Schema.Literals([
|
|
1559
739
|
"grant",
|
|
1560
740
|
"installation",
|
|
1561
741
|
"policy"
|
|
1562
742
|
]), Schema.Null]),
|
|
1563
743
|
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]),
|
|
744
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "Deliveries recorded before this field existed omit it." })),
|
|
745
|
+
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
746
|
reason: Schema.Union([Schema.String, Schema.Null]),
|
|
1573
747
|
proposedBy: Schema.StructWithRest(Schema.Struct({
|
|
1574
748
|
kind: Schema.Literals([
|
|
@@ -1602,19 +776,10 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1602
776
|
type: Schema.Literal("mailbox.action.resolved"),
|
|
1603
777
|
timestamp: Schema.String,
|
|
1604
778
|
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]),
|
|
779
|
+
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}$" })),
|
|
780
|
+
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
781
|
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
|
-
})),
|
|
782
|
+
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
783
|
type: Schema.Literals([
|
|
1619
784
|
"sendMessage",
|
|
1620
785
|
"reply",
|
|
@@ -1625,10 +790,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1625
790
|
"call",
|
|
1626
791
|
"extensionRequest"
|
|
1627
792
|
]),
|
|
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]),
|
|
793
|
+
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
794
|
proposedBy: Schema.StructWithRest(Schema.Struct({
|
|
1633
795
|
kind: Schema.Literals([
|
|
1634
796
|
"user",
|
|
@@ -1677,24 +839,15 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1677
839
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "Who resolved the approval." }),
|
|
1678
840
|
resolvedAt: Schema.String,
|
|
1679
841
|
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
|
-
})
|
|
842
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "How the action's approval ended." })
|
|
1684
843
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1685
844
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1686
845
|
const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
1687
846
|
type: Schema.Literal("mailbox.message.quarantined"),
|
|
1688
847
|
timestamp: Schema.String,
|
|
1689
848
|
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]),
|
|
849
|
+
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}$" })),
|
|
850
|
+
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
851
|
disposition: Schema.Literals(["quarantined", "isolated"]),
|
|
1699
852
|
reason: Schema.Literals([
|
|
1700
853
|
"spam",
|
|
@@ -1707,10 +860,7 @@ const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct
|
|
|
1707
860
|
]),
|
|
1708
861
|
source: Schema.Literals(["receipt", "classifier"]),
|
|
1709
862
|
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
|
-
})),
|
|
863
|
+
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
864
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1715
865
|
address: Schema.String,
|
|
1716
866
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1724,14 +874,8 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1724
874
|
type: Schema.Literal("mailbox.message.released"),
|
|
1725
875
|
timestamp: Schema.String,
|
|
1726
876
|
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]),
|
|
877
|
+
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}$" })),
|
|
878
|
+
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
879
|
releasedBy: Schema.StructWithRest(Schema.Struct({
|
|
1736
880
|
kind: Schema.Literals([
|
|
1737
881
|
"user",
|
|
@@ -1761,22 +905,9 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1761
905
|
"prompt_injection"
|
|
1762
906
|
]),
|
|
1763
907
|
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
|
-
|
|
1766
|
-
|
|
1767
|
-
})),
|
|
1768
|
-
channel: Schema.optionalKey(Schema.Literals([
|
|
1769
|
-
"email",
|
|
1770
|
-
"whatsapp",
|
|
1771
|
-
"sms"
|
|
1772
|
-
]).annotate({
|
|
1773
|
-
description: "Deliveries recorded before this field existed omit it; they are email.",
|
|
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
|
-
})),
|
|
908
|
+
id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
|
|
909
|
+
channel: Schema.optionalKey(Schema.Literal("email").annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
|
|
910
|
+
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
911
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1781
912
|
address: Schema.String,
|
|
1782
913
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1787,10 +918,7 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1787
918
|
text: Schema.Union([Schema.String, Schema.Null]),
|
|
1788
919
|
replyText: Schema.Union([Schema.String, Schema.Null]),
|
|
1789
920
|
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
|
-
})),
|
|
921
|
+
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
922
|
filename: Schema.String,
|
|
1795
923
|
contentType: Schema.String,
|
|
1796
924
|
size: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
@@ -1798,14 +926,8 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1798
926
|
occurredAt: Schema.String
|
|
1799
927
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1800
928
|
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." })),
|
|
929
|
+
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}$" })),
|
|
930
|
+
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
931
|
subject: Schema.Union([Schema.String, Schema.Null]),
|
|
1810
932
|
preview: Schema.Union([Schema.String, Schema.Null])
|
|
1811
933
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
@@ -1815,14 +937,8 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1815
937
|
type: Schema.Literal("mailbox.message.discarded"),
|
|
1816
938
|
timestamp: Schema.String,
|
|
1817
939
|
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]),
|
|
940
|
+
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}$" })),
|
|
941
|
+
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
942
|
discardedBy: Schema.StructWithRest(Schema.Struct({
|
|
1827
943
|
kind: Schema.Literals([
|
|
1828
944
|
"user",
|
|
@@ -1853,10 +969,7 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1853
969
|
"prompt_injection"
|
|
1854
970
|
]),
|
|
1855
971
|
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
|
-
})),
|
|
972
|
+
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
973
|
from: Schema.StructWithRest(Schema.Struct({
|
|
1861
974
|
address: Schema.String,
|
|
1862
975
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -1870,35 +983,22 @@ const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1870
983
|
type: Schema.Literal("journey.webhook"),
|
|
1871
984
|
timestamp: Schema.String,
|
|
1872
985
|
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
|
-
})),
|
|
986
|
+
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}$" })),
|
|
987
|
+
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
988
|
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
|
-
})),
|
|
989
|
+
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
990
|
nodeId: Schema.String,
|
|
1887
991
|
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
|
-
})),
|
|
992
|
+
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
993
|
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
1893
994
|
email: Schema.Union([Schema.String, Schema.Null])
|
|
1894
995
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1895
|
-
data: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
|
|
996
|
+
data: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
|
|
1896
997
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
|
|
1897
998
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
|
|
1898
999
|
const SamvaWebhookEventSchema = Schema.Union([
|
|
1899
1000
|
MessageSentEventSchema,
|
|
1900
1001
|
MessageDeliveredEventSchema,
|
|
1901
|
-
MessageReadEventSchema,
|
|
1902
1002
|
MessageFailedEventSchema,
|
|
1903
1003
|
MessageBouncedEventSchema,
|
|
1904
1004
|
MessageComplainedEventSchema,
|
|
@@ -1921,8 +1021,6 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1921
1021
|
WebhookTestEventSchema,
|
|
1922
1022
|
DomainUpdatedEventSchema,
|
|
1923
1023
|
DomainWarmingUpdatedEventSchema,
|
|
1924
|
-
TemplateRegistrationUpdatedEventSchema,
|
|
1925
|
-
FlowRegistrationUpdatedEventSchema,
|
|
1926
1024
|
MailboxMessageReceivedEventSchema,
|
|
1927
1025
|
MailboxMessageSentEventSchema,
|
|
1928
1026
|
MailboxActionPendingApprovalEventSchema,
|
|
@@ -1933,6 +1031,6 @@ const SamvaWebhookEventSchema = Schema.Union([
|
|
|
1933
1031
|
JourneyWebhookEventSchema
|
|
1934
1032
|
]);
|
|
1935
1033
|
//#endregion
|
|
1936
|
-
export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema,
|
|
1034
|
+
export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema };
|
|
1937
1035
|
|
|
1938
1036
|
//# sourceMappingURL=schemas.gen.js.map
|