@samva/webhooks 0.52.0 → 0.54.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 +2 -2
- package/dist/{json-schemas.gen-CE5C7st9.js → json-schemas.gen-Ck8UIxoX.js} +225 -9
- package/dist/promise.js +2 -2
- package/dist/{protocol-COaro8fP.js → protocol-DwRceAlj.js} +429 -424
- package/dist/protocol.js +1 -1
- package/dist/schemas.gen.d.ts +82 -0
- package/dist/schemas.gen.js +86 -8
- package/dist/types.gen.d.ts +59 -0
- package/package.json +1 -1
package/dist/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-
|
|
1
|
+
export { t as DEFAULT_TOLERANCE_SECONDS, l as InvalidWebhookHeadersError, u as InvalidWebhookSecretError, d as MalformedWebhookPayloadError, n as WEBHOOK_ID_HEADER, r as WEBHOOK_SIGNATURE_HEADER, i as WEBHOOK_TIMESTAMP_HEADER, f as WebhookCryptoError, p as WebhookSignatureError, m as WebhookTimestampError, h as WebhookVerificationError, a as generateWebhookSecret, g as isKnownEvent, o as readWebhookHeaders, s as signWebhook, c as verifyWebhookAt } from "./protocol-DwRceAlj.js";
|
package/dist/schemas.gen.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export declare const MessageSentEventSchema: Schema.StructWithRest<Schema.Struct
|
|
|
8
8
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
9
9
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
10
10
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
11
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
12
|
+
readonly amount: Schema.String;
|
|
13
|
+
readonly currency: Schema.String;
|
|
14
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
15
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
11
16
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
12
17
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
13
18
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -43,6 +48,11 @@ export declare const MessageDeliveredEventSchema: Schema.StructWithRest<Schema.S
|
|
|
43
48
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
44
49
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
45
50
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
51
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
52
|
+
readonly amount: Schema.String;
|
|
53
|
+
readonly currency: Schema.String;
|
|
54
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
55
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
46
56
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
47
57
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
48
58
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -78,6 +88,11 @@ export declare const MessageReadEventSchema: Schema.StructWithRest<Schema.Struct
|
|
|
78
88
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
79
89
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
80
90
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
91
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
92
|
+
readonly amount: Schema.String;
|
|
93
|
+
readonly currency: Schema.String;
|
|
94
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
95
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
81
96
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
82
97
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
83
98
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -113,6 +128,11 @@ export declare const MessageFailedEventSchema: Schema.StructWithRest<Schema.Stru
|
|
|
113
128
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
114
129
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
115
130
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
131
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
132
|
+
readonly amount: Schema.String;
|
|
133
|
+
readonly currency: Schema.String;
|
|
134
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
135
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
116
136
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
117
137
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
118
138
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -148,6 +168,11 @@ export declare const MessageBouncedEventSchema: Schema.StructWithRest<Schema.Str
|
|
|
148
168
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
149
169
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
150
170
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
171
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
172
|
+
readonly amount: Schema.String;
|
|
173
|
+
readonly currency: Schema.String;
|
|
174
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
175
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
151
176
|
readonly recipient: Schema.String;
|
|
152
177
|
readonly occurredAt: Schema.String;
|
|
153
178
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -183,6 +208,11 @@ export declare const MessageComplainedEventSchema: Schema.StructWithRest<Schema.
|
|
|
183
208
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
184
209
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
185
210
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
211
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
212
|
+
readonly amount: Schema.String;
|
|
213
|
+
readonly currency: Schema.String;
|
|
214
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
215
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
186
216
|
readonly recipient: Schema.String;
|
|
187
217
|
readonly occurredAt: Schema.String;
|
|
188
218
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -218,6 +248,11 @@ export declare const MessageReceivedEventSchema: Schema.StructWithRest<Schema.St
|
|
|
218
248
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
219
249
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
220
250
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
251
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
252
|
+
readonly amount: Schema.String;
|
|
253
|
+
readonly currency: Schema.String;
|
|
254
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
255
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
221
256
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
222
257
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
223
258
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -246,7 +281,9 @@ export declare const MessageReceivedEventSchema: Schema.StructWithRest<Schema.St
|
|
|
246
281
|
readonly campaignId: Schema.String;
|
|
247
282
|
readonly runId: Schema.String;
|
|
248
283
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
|
|
284
|
+
readonly replyToMetadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
249
285
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
286
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
250
287
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
251
288
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
252
289
|
readonly name: Schema.String;
|
|
@@ -279,6 +316,7 @@ export declare const MessageReceivedEventSchema: Schema.StructWithRest<Schema.St
|
|
|
279
316
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
280
317
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
281
318
|
readonly flow_token: Schema.String;
|
|
319
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
282
320
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
|
|
283
321
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
284
322
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
@@ -454,6 +492,7 @@ export declare const MessageReceivedEventSchema: Schema.StructWithRest<Schema.St
|
|
|
454
492
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
455
493
|
readonly flowResponse: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
456
494
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
495
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
457
496
|
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
458
497
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
459
498
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
@@ -924,6 +963,7 @@ export declare const MailboxMessageReceivedEventSchema: Schema.StructWithRest<Sc
|
|
|
924
963
|
readonly mailboxId: Schema.String;
|
|
925
964
|
readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
926
965
|
readonly message: Schema.StructWithRest<Schema.Struct<{
|
|
966
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
927
967
|
readonly id: Schema.String;
|
|
928
968
|
readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
929
969
|
readonly campaignId: Schema.String;
|
|
@@ -972,6 +1012,7 @@ export declare const MailboxMessageSentEventSchema: Schema.StructWithRest<Schema
|
|
|
972
1012
|
readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
|
|
973
1013
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
974
1014
|
readonly message: Schema.StructWithRest<Schema.Struct<{
|
|
1015
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
975
1016
|
readonly id: Schema.String;
|
|
976
1017
|
readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
977
1018
|
readonly campaignId: Schema.String;
|
|
@@ -1229,6 +1270,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1229
1270
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1230
1271
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1231
1272
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1273
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1274
|
+
readonly amount: Schema.String;
|
|
1275
|
+
readonly currency: Schema.String;
|
|
1276
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1277
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1232
1278
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1233
1279
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1234
1280
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1263,6 +1309,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1263
1309
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1264
1310
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1265
1311
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1312
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1313
|
+
readonly amount: Schema.String;
|
|
1314
|
+
readonly currency: Schema.String;
|
|
1315
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1316
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1266
1317
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1267
1318
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1268
1319
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1297,6 +1348,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1297
1348
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1298
1349
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1299
1350
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1351
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1352
|
+
readonly amount: Schema.String;
|
|
1353
|
+
readonly currency: Schema.String;
|
|
1354
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1355
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1300
1356
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1301
1357
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1302
1358
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1331,6 +1387,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1331
1387
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1332
1388
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1333
1389
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1390
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1391
|
+
readonly amount: Schema.String;
|
|
1392
|
+
readonly currency: Schema.String;
|
|
1393
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1394
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1334
1395
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1335
1396
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1336
1397
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1365,6 +1426,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1365
1426
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1366
1427
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1367
1428
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1429
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1430
|
+
readonly amount: Schema.String;
|
|
1431
|
+
readonly currency: Schema.String;
|
|
1432
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1433
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1368
1434
|
readonly recipient: Schema.String;
|
|
1369
1435
|
readonly occurredAt: Schema.String;
|
|
1370
1436
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1399,6 +1465,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1399
1465
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1400
1466
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1401
1467
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1468
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1469
|
+
readonly amount: Schema.String;
|
|
1470
|
+
readonly currency: Schema.String;
|
|
1471
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1472
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1402
1473
|
readonly recipient: Schema.String;
|
|
1403
1474
|
readonly occurredAt: Schema.String;
|
|
1404
1475
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1433,6 +1504,11 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1433
1504
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1434
1505
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>, Schema.Null]>>;
|
|
1435
1506
|
readonly cost: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1507
|
+
readonly estimatedProviderCost: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1508
|
+
readonly amount: Schema.String;
|
|
1509
|
+
readonly currency: Schema.String;
|
|
1510
|
+
readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "service"]>;
|
|
1511
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1436
1512
|
readonly recipient: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1437
1513
|
readonly occurredAt: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1438
1514
|
readonly failureReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1461,7 +1537,9 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1461
1537
|
readonly campaignId: Schema.String;
|
|
1462
1538
|
readonly runId: Schema.String;
|
|
1463
1539
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
|
|
1540
|
+
readonly replyToMetadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1464
1541
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
1542
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
1465
1543
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1466
1544
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
1467
1545
|
readonly name: Schema.String;
|
|
@@ -1494,6 +1572,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1494
1572
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1495
1573
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
1496
1574
|
readonly flow_token: Schema.String;
|
|
1575
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1497
1576
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
|
|
1498
1577
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1499
1578
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
@@ -1669,6 +1748,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
1669
1748
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
1670
1749
|
readonly flowResponse: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1671
1750
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1751
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1672
1752
|
readonly response: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
1673
1753
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1674
1754
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
|
|
@@ -2115,6 +2195,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
2115
2195
|
readonly mailboxId: Schema.String;
|
|
2116
2196
|
readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2117
2197
|
readonly message: Schema.StructWithRest<Schema.Struct<{
|
|
2198
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
2118
2199
|
readonly id: Schema.String;
|
|
2119
2200
|
readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
2120
2201
|
readonly campaignId: Schema.String;
|
|
@@ -2162,6 +2243,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
|
|
|
2162
2243
|
readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
|
|
2163
2244
|
}>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
|
|
2164
2245
|
readonly message: Schema.StructWithRest<Schema.Struct<{
|
|
2246
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
2165
2247
|
readonly id: Schema.String;
|
|
2166
2248
|
readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
2167
2249
|
readonly campaignId: Schema.String;
|
package/dist/schemas.gen.js
CHANGED
|
@@ -12,7 +12,17 @@ const MessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
12
12
|
]),
|
|
13
13
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
14
14
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
15
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
15
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
16
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
17
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
18
|
+
currency: Schema.String,
|
|
19
|
+
category: Schema.Literals([
|
|
20
|
+
"marketing",
|
|
21
|
+
"utility",
|
|
22
|
+
"authentication",
|
|
23
|
+
"service"
|
|
24
|
+
])
|
|
25
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
16
26
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
17
27
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
18
28
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -55,7 +65,17 @@ const MessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
55
65
|
]),
|
|
56
66
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
57
67
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
58
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
68
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
69
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
70
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
71
|
+
currency: Schema.String,
|
|
72
|
+
category: Schema.Literals([
|
|
73
|
+
"marketing",
|
|
74
|
+
"utility",
|
|
75
|
+
"authentication",
|
|
76
|
+
"service"
|
|
77
|
+
])
|
|
78
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
59
79
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
60
80
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
61
81
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -98,7 +118,17 @@ const MessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
98
118
|
]),
|
|
99
119
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
100
120
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
101
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
121
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
122
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
123
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
124
|
+
currency: Schema.String,
|
|
125
|
+
category: Schema.Literals([
|
|
126
|
+
"marketing",
|
|
127
|
+
"utility",
|
|
128
|
+
"authentication",
|
|
129
|
+
"service"
|
|
130
|
+
])
|
|
131
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
102
132
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
103
133
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
104
134
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -141,7 +171,17 @@ const MessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
141
171
|
]),
|
|
142
172
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
143
173
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
144
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
174
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
175
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
176
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
177
|
+
currency: Schema.String,
|
|
178
|
+
category: Schema.Literals([
|
|
179
|
+
"marketing",
|
|
180
|
+
"utility",
|
|
181
|
+
"authentication",
|
|
182
|
+
"service"
|
|
183
|
+
])
|
|
184
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
145
185
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
146
186
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
147
187
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -184,7 +224,17 @@ const MessageBouncedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
184
224
|
]),
|
|
185
225
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
186
226
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
187
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
227
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
228
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
229
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
230
|
+
currency: Schema.String,
|
|
231
|
+
category: Schema.Literals([
|
|
232
|
+
"marketing",
|
|
233
|
+
"utility",
|
|
234
|
+
"authentication",
|
|
235
|
+
"service"
|
|
236
|
+
])
|
|
237
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
188
238
|
recipient: Schema.String,
|
|
189
239
|
occurredAt: Schema.String,
|
|
190
240
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -227,7 +277,17 @@ const MessageComplainedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
227
277
|
]),
|
|
228
278
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
229
279
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
230
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
280
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
281
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
282
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
283
|
+
currency: Schema.String,
|
|
284
|
+
category: Schema.Literals([
|
|
285
|
+
"marketing",
|
|
286
|
+
"utility",
|
|
287
|
+
"authentication",
|
|
288
|
+
"service"
|
|
289
|
+
])
|
|
290
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
231
291
|
recipient: Schema.String,
|
|
232
292
|
occurredAt: Schema.String,
|
|
233
293
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -270,7 +330,17 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
270
330
|
]),
|
|
271
331
|
status: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
272
332
|
metadata: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })), Schema.Null])),
|
|
273
|
-
cost: Schema.optionalKey(Schema.Union([Schema.Finite, Schema.Null])),
|
|
333
|
+
cost: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "The cost reported by the SMS provider, when available." }).check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
|
|
334
|
+
estimatedProviderCost: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
335
|
+
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
336
|
+
currency: Schema.String,
|
|
337
|
+
category: Schema.Literals([
|
|
338
|
+
"marketing",
|
|
339
|
+
"utility",
|
|
340
|
+
"authentication",
|
|
341
|
+
"service"
|
|
342
|
+
])
|
|
343
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
274
344
|
recipient: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
275
345
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
276
346
|
failureReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -316,7 +386,9 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
316
386
|
campaignId: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
|
317
387
|
runId: Schema.String.check(Schema.isPattern(new globalThis.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}$" }))
|
|
318
388
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
389
|
+
replyToMetadata: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))),
|
|
319
390
|
whatsapp: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
391
|
+
appHandlesFlowSubmission: Schema.optionalKey(Schema.Literal(true)),
|
|
320
392
|
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
321
393
|
template: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
322
394
|
name: Schema.String,
|
|
@@ -360,7 +432,10 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
360
432
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
361
433
|
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
434
|
coupon_code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
363
|
-
action: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
435
|
+
action: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
436
|
+
flow_token: Schema.String,
|
|
437
|
+
flow_action_data: Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })))
|
|
438
|
+
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]))
|
|
364
439
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
365
440
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
|
|
366
441
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
|
|
@@ -576,6 +651,7 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
576
651
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
577
652
|
flowResponse: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
|
|
578
653
|
flowToken: Schema.Union([Schema.String, Schema.Null]),
|
|
654
|
+
submissionHandler: Schema.optionalKey(Schema.Literal("app")),
|
|
579
655
|
response: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" })),
|
|
580
656
|
body: Schema.optionalKey(Schema.String)
|
|
581
657
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
|
|
@@ -1268,6 +1344,7 @@ const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1268
1344
|
mailboxId: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
|
1269
1345
|
namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.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]),
|
|
1270
1346
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1347
|
+
flowSubmissionHandledBy: Schema.optionalKey(Schema.Literal("app")),
|
|
1271
1348
|
id: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
|
1272
1349
|
campaign: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1273
1350
|
campaignId: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
|
@@ -1334,6 +1411,7 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
|
|
|
1334
1411
|
])
|
|
1335
1412
|
}), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
|
|
1336
1413
|
message: Schema.StructWithRest(Schema.Struct({
|
|
1414
|
+
flowSubmissionHandledBy: Schema.optionalKey(Schema.Literal("app")),
|
|
1337
1415
|
id: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
|
1338
1416
|
campaign: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
|
|
1339
1417
|
campaignId: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -12,6 +12,13 @@ export type MessageSentEvent = {
|
|
|
12
12
|
readonly [x: string]: JsonValue;
|
|
13
13
|
} | null;
|
|
14
14
|
readonly cost?: number | null;
|
|
15
|
+
readonly estimatedProviderCost?: {
|
|
16
|
+
readonly amount: string;
|
|
17
|
+
readonly currency: string;
|
|
18
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
19
|
+
} & {
|
|
20
|
+
readonly [x: string]: JsonValue;
|
|
21
|
+
};
|
|
15
22
|
readonly recipient?: string | null;
|
|
16
23
|
readonly occurredAt?: string | null;
|
|
17
24
|
readonly failureReason?: string | null;
|
|
@@ -54,6 +61,13 @@ export type MessageDeliveredEvent = {
|
|
|
54
61
|
readonly [x: string]: JsonValue;
|
|
55
62
|
} | null;
|
|
56
63
|
readonly cost?: number | null;
|
|
64
|
+
readonly estimatedProviderCost?: {
|
|
65
|
+
readonly amount: string;
|
|
66
|
+
readonly currency: string;
|
|
67
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
68
|
+
} & {
|
|
69
|
+
readonly [x: string]: JsonValue;
|
|
70
|
+
};
|
|
57
71
|
readonly recipient?: string | null;
|
|
58
72
|
readonly occurredAt?: string | null;
|
|
59
73
|
readonly failureReason?: string | null;
|
|
@@ -96,6 +110,13 @@ export type MessageReadEvent = {
|
|
|
96
110
|
readonly [x: string]: JsonValue;
|
|
97
111
|
} | null;
|
|
98
112
|
readonly cost?: number | null;
|
|
113
|
+
readonly estimatedProviderCost?: {
|
|
114
|
+
readonly amount: string;
|
|
115
|
+
readonly currency: string;
|
|
116
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
117
|
+
} & {
|
|
118
|
+
readonly [x: string]: JsonValue;
|
|
119
|
+
};
|
|
99
120
|
readonly recipient?: string | null;
|
|
100
121
|
readonly occurredAt?: string | null;
|
|
101
122
|
readonly failureReason?: string | null;
|
|
@@ -138,6 +159,13 @@ export type MessageFailedEvent = {
|
|
|
138
159
|
readonly [x: string]: JsonValue;
|
|
139
160
|
} | null;
|
|
140
161
|
readonly cost?: number | null;
|
|
162
|
+
readonly estimatedProviderCost?: {
|
|
163
|
+
readonly amount: string;
|
|
164
|
+
readonly currency: string;
|
|
165
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
166
|
+
} & {
|
|
167
|
+
readonly [x: string]: JsonValue;
|
|
168
|
+
};
|
|
141
169
|
readonly recipient?: string | null;
|
|
142
170
|
readonly occurredAt?: string | null;
|
|
143
171
|
readonly failureReason?: string | null;
|
|
@@ -180,6 +208,13 @@ export type MessageBouncedEvent = {
|
|
|
180
208
|
readonly [x: string]: JsonValue;
|
|
181
209
|
} | null;
|
|
182
210
|
readonly cost?: number | null;
|
|
211
|
+
readonly estimatedProviderCost?: {
|
|
212
|
+
readonly amount: string;
|
|
213
|
+
readonly currency: string;
|
|
214
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
215
|
+
} & {
|
|
216
|
+
readonly [x: string]: JsonValue;
|
|
217
|
+
};
|
|
183
218
|
readonly recipient: string;
|
|
184
219
|
readonly occurredAt: string;
|
|
185
220
|
readonly failureReason?: string | null;
|
|
@@ -222,6 +257,13 @@ export type MessageComplainedEvent = {
|
|
|
222
257
|
readonly [x: string]: JsonValue;
|
|
223
258
|
} | null;
|
|
224
259
|
readonly cost?: number | null;
|
|
260
|
+
readonly estimatedProviderCost?: {
|
|
261
|
+
readonly amount: string;
|
|
262
|
+
readonly currency: string;
|
|
263
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
264
|
+
} & {
|
|
265
|
+
readonly [x: string]: JsonValue;
|
|
266
|
+
};
|
|
225
267
|
readonly recipient: string;
|
|
226
268
|
readonly occurredAt: string;
|
|
227
269
|
readonly failureReason?: string | null;
|
|
@@ -264,6 +306,13 @@ export type MessageReceivedEvent = {
|
|
|
264
306
|
readonly [x: string]: JsonValue;
|
|
265
307
|
} | null;
|
|
266
308
|
readonly cost?: number | null;
|
|
309
|
+
readonly estimatedProviderCost?: {
|
|
310
|
+
readonly amount: string;
|
|
311
|
+
readonly currency: string;
|
|
312
|
+
readonly category: "marketing" | "utility" | "authentication" | "service";
|
|
313
|
+
} & {
|
|
314
|
+
readonly [x: string]: JsonValue;
|
|
315
|
+
};
|
|
267
316
|
readonly recipient?: string | null;
|
|
268
317
|
readonly occurredAt?: string | null;
|
|
269
318
|
readonly failureReason?: string | null;
|
|
@@ -294,7 +343,11 @@ export type MessageReceivedEvent = {
|
|
|
294
343
|
} & {
|
|
295
344
|
readonly [x: string]: JsonValue;
|
|
296
345
|
}) | null;
|
|
346
|
+
readonly replyToMetadata?: {
|
|
347
|
+
readonly [x: string]: JsonValue;
|
|
348
|
+
};
|
|
297
349
|
readonly whatsapp?: ({
|
|
350
|
+
readonly appHandlesFlowSubmission?: true;
|
|
298
351
|
readonly text?: string | null;
|
|
299
352
|
readonly template?: ({
|
|
300
353
|
readonly name: string;
|
|
@@ -337,6 +390,9 @@ export type MessageReceivedEvent = {
|
|
|
337
390
|
readonly coupon_code?: string | null;
|
|
338
391
|
readonly action?: ({
|
|
339
392
|
readonly flow_token: string;
|
|
393
|
+
readonly flow_action_data?: {
|
|
394
|
+
readonly [x: string]: JsonValue;
|
|
395
|
+
};
|
|
340
396
|
} & {
|
|
341
397
|
readonly [x: string]: JsonValue;
|
|
342
398
|
}) | null;
|
|
@@ -594,6 +650,7 @@ export type MessageReceivedEvent = {
|
|
|
594
650
|
};
|
|
595
651
|
readonly flowResponse?: {
|
|
596
652
|
readonly flowToken: string | null;
|
|
653
|
+
readonly submissionHandler?: "app";
|
|
597
654
|
readonly response: {
|
|
598
655
|
readonly [x: string]: JsonValue;
|
|
599
656
|
};
|
|
@@ -1226,6 +1283,7 @@ export type MailboxMessageReceivedEvent = {
|
|
|
1226
1283
|
readonly mailboxId: string;
|
|
1227
1284
|
readonly namespaceId: string | null;
|
|
1228
1285
|
readonly message: {
|
|
1286
|
+
readonly flowSubmissionHandledBy?: "app";
|
|
1229
1287
|
readonly id: string;
|
|
1230
1288
|
readonly campaign?: ({
|
|
1231
1289
|
readonly campaignId: string;
|
|
@@ -1291,6 +1349,7 @@ export type MailboxMessageSentEvent = {
|
|
|
1291
1349
|
readonly [x: string]: JsonValue;
|
|
1292
1350
|
};
|
|
1293
1351
|
readonly message: {
|
|
1352
|
+
readonly flowSubmissionHandledBy?: "app";
|
|
1294
1353
|
readonly id: string;
|
|
1295
1354
|
readonly campaign?: ({
|
|
1296
1355
|
readonly campaignId: string;
|