@samva/webhooks 0.48.0 → 0.50.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.
@@ -839,6 +839,7 @@ export declare const TemplateRegistrationUpdatedEventSchema: Schema.StructWithRe
839
839
  readonly id: Schema.String;
840
840
  readonly templateId: Schema.String;
841
841
  readonly publicationId: Schema.String;
842
+ readonly templateChannelVariantId: Schema.String;
842
843
  readonly target: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
843
844
  readonly provider: Schema.Literal<"whatsapp">;
844
845
  readonly wabaId: Schema.String;
@@ -850,6 +851,7 @@ export declare const TemplateRegistrationUpdatedEventSchema: Schema.StructWithRe
850
851
  readonly name: Schema.String;
851
852
  readonly language: Schema.String;
852
853
  readonly status: Schema.Literals<readonly ["draft", "submitted", "approved", "rejected", "paused", "disabled"]>;
854
+ readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.String, Schema.Null]>;
853
855
  readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>;
854
856
  readonly providerCategory: Schema.Union<readonly [Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>, Schema.Null]>;
855
857
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1097,15 +1099,16 @@ export declare const MailboxActionResolvedEventSchema: Schema.StructWithRest<Sch
1097
1099
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1098
1100
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1099
1101
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1100
- export declare const MailboxMessageQuarantinedEventSchema: Schema.StructWithRest<Schema.Struct<{
1101
- readonly type: Schema.Literal<"mailbox.message.quarantined">;
1102
+ export declare const MailboxMessageSpamEventSchema: Schema.StructWithRest<Schema.Struct<{
1103
+ readonly type: Schema.Literal<"mailbox.message.spam">;
1102
1104
  readonly timestamp: Schema.String;
1103
1105
  readonly data: Schema.StructWithRest<Schema.Struct<{
1104
1106
  readonly mailboxId: Schema.String;
1105
1107
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1106
- readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
1107
- readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
1108
- readonly source: Schema.Literals<readonly ["receipt", "classifier"]>;
1108
+ readonly disposition: Schema.Literals<readonly ["spam", "isolated"]>;
1109
+ readonly threadId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1110
+ readonly reason: Schema.Union<readonly [Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>, Schema.Null]>;
1111
+ readonly source: Schema.Literals<readonly ["receipt", "classifier", "reader"]>;
1109
1112
  readonly message: Schema.StructWithRest<Schema.Struct<{
1110
1113
  readonly id: Schema.String;
1111
1114
  readonly from: Schema.StructWithRest<Schema.Struct<{
@@ -1117,75 +1120,38 @@ export declare const MailboxMessageQuarantinedEventSchema: Schema.StructWithRest
1117
1120
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1118
1121
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1119
1122
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1120
- export declare const MailboxMessageReleasedEventSchema: Schema.StructWithRest<Schema.Struct<{
1121
- readonly type: Schema.Literal<"mailbox.message.released">;
1123
+ export declare const MailboxMessageDiscardedEventSchema: Schema.StructWithRest<Schema.Struct<{
1124
+ readonly type: Schema.Literal<"mailbox.message.discarded">;
1122
1125
  readonly timestamp: Schema.String;
1123
1126
  readonly data: Schema.StructWithRest<Schema.Struct<{
1124
1127
  readonly mailboxId: Schema.String;
1125
1128
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1126
- readonly releasedBy: Schema.StructWithRest<Schema.Struct<{
1129
+ readonly discardedBy: Schema.StructWithRest<Schema.Struct<{
1127
1130
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1128
1131
  readonly id: Schema.String;
1129
1132
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1130
1133
  readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1131
1134
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1135
+ readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
1132
1136
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
1133
1137
  readonly message: Schema.StructWithRest<Schema.Struct<{
1134
1138
  readonly id: Schema.String;
1135
- readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
1136
- readonly campaignId: Schema.String;
1137
- readonly runId: Schema.String;
1138
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
1139
- readonly channel: Schema.optionalKey<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
1140
- readonly threadId: Schema.String;
1141
1139
  readonly from: Schema.StructWithRest<Schema.Struct<{
1142
1140
  readonly address: Schema.String;
1143
1141
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1144
1142
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1145
- readonly to: Schema.$Array<Schema.String>;
1146
- readonly cc: Schema.$Array<Schema.String>;
1147
- readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
1148
- readonly text: Schema.Union<readonly [Schema.String, Schema.Null]>;
1149
- readonly replyText: Schema.Union<readonly [Schema.String, Schema.Null]>;
1150
- readonly attachments: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
1151
- readonly id: Schema.String;
1152
- readonly filename: Schema.String;
1153
- readonly contentType: Schema.String;
1154
- readonly size: Schema.Finite;
1155
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
1156
- readonly occurredAt: Schema.String;
1157
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1158
- readonly thread: Schema.StructWithRest<Schema.Struct<{
1159
- readonly id: Schema.String;
1160
- readonly endpointId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1161
1143
  readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
1162
- readonly preview: Schema.Union<readonly [Schema.String, Schema.Null]>;
1144
+ readonly receivedAt: Schema.String;
1163
1145
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1164
1146
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1165
1147
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1166
- export declare const MailboxMessageDiscardedEventSchema: Schema.StructWithRest<Schema.Struct<{
1167
- readonly type: Schema.Literal<"mailbox.message.discarded">;
1148
+ export declare const MailboxThreadDeletedEventSchema: Schema.StructWithRest<Schema.Struct<{
1149
+ readonly type: Schema.Literal<"mailbox.thread.deleted">;
1168
1150
  readonly timestamp: Schema.String;
1169
1151
  readonly data: Schema.StructWithRest<Schema.Struct<{
1170
1152
  readonly mailboxId: Schema.String;
1171
1153
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1172
- readonly discardedBy: Schema.StructWithRest<Schema.Struct<{
1173
- readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1174
- readonly id: Schema.String;
1175
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1176
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1177
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1178
- readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
1179
- readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
1180
- readonly message: Schema.StructWithRest<Schema.Struct<{
1181
- readonly id: Schema.String;
1182
- readonly from: Schema.StructWithRest<Schema.Struct<{
1183
- readonly address: Schema.String;
1184
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1185
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1186
- readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
1187
- readonly receivedAt: Schema.String;
1188
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1154
+ readonly threadId: Schema.String;
1189
1155
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1190
1156
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1191
1157
  export declare const MailboxMessageDeliveredEventSchema: Schema.StructWithRest<Schema.Struct<{
@@ -2067,6 +2033,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2067
2033
  readonly id: Schema.String;
2068
2034
  readonly templateId: Schema.String;
2069
2035
  readonly publicationId: Schema.String;
2036
+ readonly templateChannelVariantId: Schema.String;
2070
2037
  readonly target: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
2071
2038
  readonly provider: Schema.Literal<"whatsapp">;
2072
2039
  readonly wabaId: Schema.String;
@@ -2078,6 +2045,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2078
2045
  readonly name: Schema.String;
2079
2046
  readonly language: Schema.String;
2080
2047
  readonly status: Schema.Literals<readonly ["draft", "submitted", "approved", "rejected", "paused", "disabled"]>;
2048
+ readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2081
2049
  readonly category: Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>;
2082
2050
  readonly providerCategory: Schema.Union<readonly [Schema.Literals<readonly ["marketing", "utility", "authentication", "transactional", "service_implicit", "service_explicit", "promotional"]>, Schema.Null]>;
2083
2051
  readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2319,14 +2287,15 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2319
2287
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2320
2288
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2321
2289
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2322
- readonly type: Schema.Literal<"mailbox.message.quarantined">;
2290
+ readonly type: Schema.Literal<"mailbox.message.spam">;
2323
2291
  readonly timestamp: Schema.String;
2324
2292
  readonly data: Schema.StructWithRest<Schema.Struct<{
2325
2293
  readonly mailboxId: Schema.String;
2326
2294
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2327
- readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
2328
- readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
2329
- readonly source: Schema.Literals<readonly ["receipt", "classifier"]>;
2295
+ readonly disposition: Schema.Literals<readonly ["spam", "isolated"]>;
2296
+ readonly threadId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2297
+ readonly reason: Schema.Union<readonly [Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>, Schema.Null]>;
2298
+ readonly source: Schema.Literals<readonly ["receipt", "classifier", "reader"]>;
2330
2299
  readonly message: Schema.StructWithRest<Schema.Struct<{
2331
2300
  readonly id: Schema.String;
2332
2301
  readonly from: Schema.StructWithRest<Schema.Struct<{
@@ -2338,73 +2307,36 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2338
2307
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2339
2308
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2340
2309
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2341
- readonly type: Schema.Literal<"mailbox.message.released">;
2310
+ readonly type: Schema.Literal<"mailbox.message.discarded">;
2342
2311
  readonly timestamp: Schema.String;
2343
2312
  readonly data: Schema.StructWithRest<Schema.Struct<{
2344
2313
  readonly mailboxId: Schema.String;
2345
2314
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2346
- readonly releasedBy: Schema.StructWithRest<Schema.Struct<{
2315
+ readonly discardedBy: Schema.StructWithRest<Schema.Struct<{
2347
2316
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2348
2317
  readonly id: Schema.String;
2349
2318
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2350
2319
  readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2351
2320
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2321
+ readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
2352
2322
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
2353
2323
  readonly message: Schema.StructWithRest<Schema.Struct<{
2354
2324
  readonly id: Schema.String;
2355
- readonly campaign: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
2356
- readonly campaignId: Schema.String;
2357
- readonly runId: Schema.String;
2358
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
2359
- readonly channel: Schema.optionalKey<Schema.Literals<readonly ["sms", "whatsapp", "email"]>>;
2360
- readonly threadId: Schema.String;
2361
2325
  readonly from: Schema.StructWithRest<Schema.Struct<{
2362
2326
  readonly address: Schema.String;
2363
2327
  readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2364
2328
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2365
- readonly to: Schema.$Array<Schema.String>;
2366
- readonly cc: Schema.$Array<Schema.String>;
2367
- readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
2368
- readonly text: Schema.Union<readonly [Schema.String, Schema.Null]>;
2369
- readonly replyText: Schema.Union<readonly [Schema.String, Schema.Null]>;
2370
- readonly attachments: Schema.$Array<Schema.StructWithRest<Schema.Struct<{
2371
- readonly id: Schema.String;
2372
- readonly filename: Schema.String;
2373
- readonly contentType: Schema.String;
2374
- readonly size: Schema.Finite;
2375
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>>;
2376
- readonly occurredAt: Schema.String;
2377
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2378
- readonly thread: Schema.StructWithRest<Schema.Struct<{
2379
- readonly id: Schema.String;
2380
- readonly endpointId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2381
2329
  readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
2382
- readonly preview: Schema.Union<readonly [Schema.String, Schema.Null]>;
2330
+ readonly receivedAt: Schema.String;
2383
2331
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2384
2332
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2385
2333
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2386
- readonly type: Schema.Literal<"mailbox.message.discarded">;
2334
+ readonly type: Schema.Literal<"mailbox.thread.deleted">;
2387
2335
  readonly timestamp: Schema.String;
2388
2336
  readonly data: Schema.StructWithRest<Schema.Struct<{
2389
2337
  readonly mailboxId: Schema.String;
2390
2338
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2391
- readonly discardedBy: Schema.StructWithRest<Schema.Struct<{
2392
- readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2393
- readonly id: Schema.String;
2394
- readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2395
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2396
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2397
- readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
2398
- readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "verdict_missing", "phishing", "fraud", "prompt_injection"]>;
2399
- readonly message: Schema.StructWithRest<Schema.Struct<{
2400
- readonly id: Schema.String;
2401
- readonly from: Schema.StructWithRest<Schema.Struct<{
2402
- readonly address: Schema.String;
2403
- readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2404
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2405
- readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
2406
- readonly receivedAt: Schema.String;
2407
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2339
+ readonly threadId: Schema.String;
2408
2340
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2409
2341
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2410
2342
  readonly type: Schema.Literal<"mailbox.message.delivered">;
@@ -1136,6 +1136,7 @@ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Stru
1136
1136
  id: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1137
1137
  templateId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1138
1138
  publicationId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1139
+ templateChannelVariantId: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tvar_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tvar_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1139
1140
  target: Schema.Union([Schema.StructWithRest(Schema.Struct({
1140
1141
  provider: Schema.Literal("whatsapp"),
1141
1142
  wabaId: Schema.String
@@ -1154,6 +1155,7 @@ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Stru
1154
1155
  "paused",
1155
1156
  "disabled"
1156
1157
  ]),
1158
+ pendingTemplateChannelVariantId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tvar_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^tvar_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]).annotate({ description: "Content a submission sent to the provider whose outcome is not yet recorded, because its request failed or is still in flight; the provider may already hold it. While it is set nothing sends from this registration, even when `status` is `approved`. Submitting again settles it." }),
1157
1159
  category: Schema.Literals([
1158
1160
  "marketing",
1159
1161
  "utility",
@@ -1562,14 +1564,15 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
1562
1564
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "How the action's approval ended." })
1563
1565
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1564
1566
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1565
- const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct({
1566
- type: Schema.Literal("mailbox.message.quarantined"),
1567
+ const MailboxMessageSpamEventSchema = Schema.StructWithRest(Schema.Struct({
1568
+ type: Schema.Literal("mailbox.message.spam"),
1567
1569
  timestamp: Schema.String,
1568
1570
  data: Schema.StructWithRest(Schema.Struct({
1569
1571
  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}$" })),
1570
1572
  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]),
1571
- disposition: Schema.Literals(["quarantined", "isolated"]),
1572
- reason: Schema.Literals([
1573
+ disposition: Schema.Literals(["spam", "isolated"]),
1574
+ threadId: Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.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]),
1575
+ reason: Schema.Union([Schema.Literals([
1573
1576
  "spam",
1574
1577
  "dmarc",
1575
1578
  "virus",
@@ -1578,8 +1581,12 @@ const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct
1578
1581
  "phishing",
1579
1582
  "fraud",
1580
1583
  "prompt_injection"
1584
+ ]), Schema.Null]),
1585
+ source: Schema.Literals([
1586
+ "receipt",
1587
+ "classifier",
1588
+ "reader"
1581
1589
  ]),
1582
- source: Schema.Literals(["receipt", "classifier"]),
1583
1590
  message: Schema.StructWithRest(Schema.Struct({
1584
1591
  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}$" })),
1585
1592
  from: Schema.StructWithRest(Schema.Struct({
@@ -1591,13 +1598,13 @@ const MailboxMessageQuarantinedEventSchema = Schema.StructWithRest(Schema.Struct
1591
1598
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1592
1599
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1593
1600
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1594
- const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
1595
- type: Schema.Literal("mailbox.message.released"),
1601
+ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
1602
+ type: Schema.Literal("mailbox.message.discarded"),
1596
1603
  timestamp: Schema.String,
1597
1604
  data: Schema.StructWithRest(Schema.Struct({
1598
1605
  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}$" })),
1599
1606
  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]),
1600
- releasedBy: Schema.StructWithRest(Schema.Struct({
1607
+ discardedBy: Schema.StructWithRest(Schema.Struct({
1601
1608
  kind: Schema.Literals([
1602
1609
  "user",
1603
1610
  "apiKey",
@@ -1617,6 +1624,7 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
1617
1624
  "system"
1618
1625
  ])
1619
1626
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1627
+ disposition: Schema.Literals(["quarantined", "isolated"]),
1620
1628
  reason: Schema.Literals([
1621
1629
  "spam",
1622
1630
  "dmarc",
@@ -1629,87 +1637,22 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
1629
1637
  ]),
1630
1638
  message: Schema.StructWithRest(Schema.Struct({
1631
1639
  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}$" })),
1632
- campaign: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
1633
- 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}$" })),
1634
- 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}$" }))
1635
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
1636
- channel: Schema.optionalKey(Schema.Literals([
1637
- "sms",
1638
- "whatsapp",
1639
- "email"
1640
- ]).annotate({ description: "Deliveries recorded before this field existed omit it; they are email." })),
1641
- threadId: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
1642
1640
  from: Schema.StructWithRest(Schema.Struct({
1643
1641
  address: Schema.String,
1644
1642
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
1645
1643
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1646
- to: Schema.Array(Schema.String),
1647
- cc: Schema.Array(Schema.String),
1648
1644
  subject: Schema.Union([Schema.String, Schema.Null]),
1649
- text: Schema.Union([Schema.String, Schema.Null]),
1650
- replyText: Schema.Union([Schema.String, Schema.Null]),
1651
- attachments: Schema.Array(Schema.StructWithRest(Schema.Struct({
1652
- id: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
1653
- filename: Schema.String,
1654
- contentType: Schema.String,
1655
- size: Schema.Finite
1656
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
1657
- occurredAt: Schema.String
1658
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1659
- thread: Schema.StructWithRest(Schema.Struct({
1660
- id: Schema.String.check(Schema.isPattern(new globalThis.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}$" })),
1661
- endpointId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.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." })),
1662
- subject: Schema.Union([Schema.String, Schema.Null]),
1663
- preview: Schema.Union([Schema.String, Schema.Null])
1645
+ receivedAt: Schema.String
1664
1646
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1665
1647
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1666
1648
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1667
- const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
1668
- type: Schema.Literal("mailbox.message.discarded"),
1649
+ const MailboxThreadDeletedEventSchema = Schema.StructWithRest(Schema.Struct({
1650
+ type: Schema.Literal("mailbox.thread.deleted"),
1669
1651
  timestamp: Schema.String,
1670
1652
  data: Schema.StructWithRest(Schema.Struct({
1671
1653
  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}$" })),
1672
1654
  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]),
1673
- discardedBy: Schema.StructWithRest(Schema.Struct({
1674
- kind: Schema.Literals([
1675
- "user",
1676
- "apiKey",
1677
- "extension",
1678
- "externalAgent",
1679
- "samvaAgent",
1680
- "system"
1681
- ]),
1682
- id: Schema.String,
1683
- displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1684
- source: Schema.Literals([
1685
- "humanUi",
1686
- "externalApi",
1687
- "externalAgent",
1688
- "extension",
1689
- "samvaManagedAgent",
1690
- "system"
1691
- ])
1692
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1693
- disposition: Schema.Literals(["quarantined", "isolated"]),
1694
- reason: Schema.Literals([
1695
- "spam",
1696
- "dmarc",
1697
- "virus",
1698
- "virus_unscanned",
1699
- "verdict_missing",
1700
- "phishing",
1701
- "fraud",
1702
- "prompt_injection"
1703
- ]),
1704
- message: Schema.StructWithRest(Schema.Struct({
1705
- 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}$" })),
1706
- from: Schema.StructWithRest(Schema.Struct({
1707
- address: Schema.String,
1708
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
1709
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1710
- subject: Schema.Union([Schema.String, Schema.Null]),
1711
- receivedAt: Schema.String
1712
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1655
+ threadId: Schema.String.check(Schema.isPattern(new globalThis.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}$" }))
1713
1656
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1714
1657
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1715
1658
  const MailboxMessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
@@ -1825,14 +1768,14 @@ const SamvaWebhookEventSchema = Schema.Union([
1825
1768
  MailboxMessageSentEventSchema,
1826
1769
  MailboxActionPendingApprovalEventSchema,
1827
1770
  MailboxActionResolvedEventSchema,
1828
- MailboxMessageQuarantinedEventSchema,
1829
- MailboxMessageReleasedEventSchema,
1771
+ MailboxMessageSpamEventSchema,
1830
1772
  MailboxMessageDiscardedEventSchema,
1773
+ MailboxThreadDeletedEventSchema,
1831
1774
  MailboxMessageDeliveredEventSchema,
1832
1775
  MailboxMessageReadEventSchema,
1833
1776
  MailboxMessageFailedEventSchema,
1834
1777
  JourneyWebhookEventSchema
1835
1778
  ]);
1836
- export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema };
1779
+ export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, EmailSendingPausedEventSchema, EmailSendingResumedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDeliveredEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageFailedEventSchema, MailboxMessageReadEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageSentEventSchema, MailboxMessageSpamEventSchema, MailboxThreadDeletedEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema };
1837
1780
 
1838
1781
  //# sourceMappingURL=schemas.gen.js.map
@@ -1114,6 +1114,7 @@ export type TemplateRegistrationUpdatedEvent = {
1114
1114
  readonly id: string;
1115
1115
  readonly templateId: string;
1116
1116
  readonly publicationId: string;
1117
+ readonly templateChannelVariantId: string;
1117
1118
  readonly target: ({
1118
1119
  readonly provider: "whatsapp";
1119
1120
  readonly wabaId: string;
@@ -1129,6 +1130,7 @@ export type TemplateRegistrationUpdatedEvent = {
1129
1130
  readonly name: string;
1130
1131
  readonly language: string;
1131
1132
  readonly status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
1133
+ readonly pendingTemplateChannelVariantId: string | null;
1132
1134
  readonly category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
1133
1135
  readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
1134
1136
  readonly providerTemplateId: string | null;
@@ -1473,15 +1475,16 @@ export type MailboxActionResolvedEvent = {
1473
1475
  readonly [x: string]: JsonValue;
1474
1476
  };
1475
1477
  export type MailboxActionResolvedPayload = MailboxActionResolvedEvent["data"];
1476
- export type MailboxMessageQuarantinedEvent = {
1477
- readonly type: "mailbox.message.quarantined";
1478
+ export type MailboxMessageSpamEvent = {
1479
+ readonly type: "mailbox.message.spam";
1478
1480
  readonly timestamp: string;
1479
1481
  readonly data: {
1480
1482
  readonly mailboxId: string;
1481
1483
  readonly namespaceId: string | null;
1482
- readonly disposition: "quarantined" | "isolated";
1483
- readonly reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
1484
- readonly source: "receipt" | "classifier";
1484
+ readonly disposition: "spam" | "isolated";
1485
+ readonly threadId: string | null;
1486
+ readonly reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection" | null;
1487
+ readonly source: "receipt" | "classifier" | "reader";
1485
1488
  readonly message: {
1486
1489
  readonly id: string;
1487
1490
  readonly from: {
@@ -1501,14 +1504,14 @@ export type MailboxMessageQuarantinedEvent = {
1501
1504
  } & {
1502
1505
  readonly [x: string]: JsonValue;
1503
1506
  };
1504
- export type MailboxMessageQuarantinedPayload = MailboxMessageQuarantinedEvent["data"];
1505
- export type MailboxMessageReleasedEvent = {
1506
- readonly type: "mailbox.message.released";
1507
+ export type MailboxMessageSpamPayload = MailboxMessageSpamEvent["data"];
1508
+ export type MailboxMessageDiscardedEvent = {
1509
+ readonly type: "mailbox.message.discarded";
1507
1510
  readonly timestamp: string;
1508
1511
  readonly data: {
1509
1512
  readonly mailboxId: string;
1510
1513
  readonly namespaceId: string | null;
1511
- readonly releasedBy: {
1514
+ readonly discardedBy: {
1512
1515
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1513
1516
  readonly id: string;
1514
1517
  readonly displayName?: string | null;
@@ -1516,45 +1519,18 @@ export type MailboxMessageReleasedEvent = {
1516
1519
  } & {
1517
1520
  readonly [x: string]: JsonValue;
1518
1521
  };
1522
+ readonly disposition: "quarantined" | "isolated";
1519
1523
  readonly reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
1520
1524
  readonly message: {
1521
1525
  readonly id: string;
1522
- readonly campaign?: ({
1523
- readonly campaignId: string;
1524
- readonly runId: string;
1525
- } & {
1526
- readonly [x: string]: JsonValue;
1527
- }) | null;
1528
- readonly channel?: "sms" | "whatsapp" | "email";
1529
- readonly threadId: string;
1530
1526
  readonly from: {
1531
1527
  readonly address: string;
1532
1528
  readonly name?: string | null;
1533
1529
  } & {
1534
1530
  readonly [x: string]: JsonValue;
1535
1531
  };
1536
- readonly to: ReadonlyArray<string>;
1537
- readonly cc: ReadonlyArray<string>;
1538
1532
  readonly subject: string | null;
1539
- readonly text: string | null;
1540
- readonly replyText: string | null;
1541
- readonly attachments: ReadonlyArray<{
1542
- readonly id: string;
1543
- readonly filename: string;
1544
- readonly contentType: string;
1545
- readonly size: number;
1546
- } & {
1547
- readonly [x: string]: JsonValue;
1548
- }>;
1549
- readonly occurredAt: string;
1550
- } & {
1551
- readonly [x: string]: JsonValue;
1552
- };
1553
- readonly thread: {
1554
- readonly id: string;
1555
- readonly endpointId?: string | null;
1556
- readonly subject: string | null;
1557
- readonly preview: string | null;
1533
+ readonly receivedAt: string;
1558
1534
  } & {
1559
1535
  readonly [x: string]: JsonValue;
1560
1536
  };
@@ -1564,43 +1540,21 @@ export type MailboxMessageReleasedEvent = {
1564
1540
  } & {
1565
1541
  readonly [x: string]: JsonValue;
1566
1542
  };
1567
- export type MailboxMessageReleasedPayload = MailboxMessageReleasedEvent["data"];
1568
- export type MailboxMessageDiscardedEvent = {
1569
- readonly type: "mailbox.message.discarded";
1543
+ export type MailboxMessageDiscardedPayload = MailboxMessageDiscardedEvent["data"];
1544
+ export type MailboxThreadDeletedEvent = {
1545
+ readonly type: "mailbox.thread.deleted";
1570
1546
  readonly timestamp: string;
1571
1547
  readonly data: {
1572
1548
  readonly mailboxId: string;
1573
1549
  readonly namespaceId: string | null;
1574
- readonly discardedBy: {
1575
- readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1576
- readonly id: string;
1577
- readonly displayName?: string | null;
1578
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1579
- } & {
1580
- readonly [x: string]: JsonValue;
1581
- };
1582
- readonly disposition: "quarantined" | "isolated";
1583
- readonly reason: "spam" | "dmarc" | "virus" | "virus_unscanned" | "verdict_missing" | "phishing" | "fraud" | "prompt_injection";
1584
- readonly message: {
1585
- readonly id: string;
1586
- readonly from: {
1587
- readonly address: string;
1588
- readonly name?: string | null;
1589
- } & {
1590
- readonly [x: string]: JsonValue;
1591
- };
1592
- readonly subject: string | null;
1593
- readonly receivedAt: string;
1594
- } & {
1595
- readonly [x: string]: JsonValue;
1596
- };
1550
+ readonly threadId: string;
1597
1551
  } & {
1598
1552
  readonly [x: string]: JsonValue;
1599
1553
  };
1600
1554
  } & {
1601
1555
  readonly [x: string]: JsonValue;
1602
1556
  };
1603
- export type MailboxMessageDiscardedPayload = MailboxMessageDiscardedEvent["data"];
1557
+ export type MailboxThreadDeletedPayload = MailboxThreadDeletedEvent["data"];
1604
1558
  export type MailboxMessageDeliveredEvent = {
1605
1559
  readonly type: "mailbox.message.delivered";
1606
1560
  readonly timestamp: string;
@@ -1693,7 +1647,7 @@ export type JourneyWebhookEvent = {
1693
1647
  readonly [x: string]: JsonValue;
1694
1648
  };
1695
1649
  export type JourneyWebhookPayload = JourneyWebhookEvent["data"];
1696
- export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent | MessageReadEvent | MessageFailedEvent | MessageBouncedEvent | MessageComplainedEvent | MessageReceivedEvent | MessageOpenedEvent | MessageClickedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactSubscribedEvent | ContactUnsubscribedEvent | ContactResubscribedEvent | ContactConsentChangedEvent | ConversationCreatedEvent | ConversationUpdatedEvent | ConversationArchivedEvent | WebhookCreatedEvent | WebhookUpdatedEvent | WebhookDeletedEvent | WebhookTestEvent | DomainUpdatedEvent | DomainWarmingUpdatedEvent | EmailSendingPausedEvent | EmailSendingResumedEvent | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageQuarantinedEvent | MailboxMessageReleasedEvent | MailboxMessageDiscardedEvent | MailboxMessageDeliveredEvent | MailboxMessageReadEvent | MailboxMessageFailedEvent | JourneyWebhookEvent;
1650
+ export type SamvaWebhookEvent = MessageSentEvent | MessageDeliveredEvent | MessageReadEvent | MessageFailedEvent | MessageBouncedEvent | MessageComplainedEvent | MessageReceivedEvent | MessageOpenedEvent | MessageClickedEvent | ContactCreatedEvent | ContactUpdatedEvent | ContactDeletedEvent | ContactSubscribedEvent | ContactUnsubscribedEvent | ContactResubscribedEvent | ContactConsentChangedEvent | ConversationCreatedEvent | ConversationUpdatedEvent | ConversationArchivedEvent | WebhookCreatedEvent | WebhookUpdatedEvent | WebhookDeletedEvent | WebhookTestEvent | DomainUpdatedEvent | DomainWarmingUpdatedEvent | EmailSendingPausedEvent | EmailSendingResumedEvent | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageSpamEvent | MailboxMessageDiscardedEvent | MailboxThreadDeletedEvent | MailboxMessageDeliveredEvent | MailboxMessageReadEvent | MailboxMessageFailedEvent | JourneyWebhookEvent;
1697
1651
  export interface UnknownWebhookEvent {
1698
1652
  readonly type: string;
1699
1653
  readonly timestamp: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samva/webhooks",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "description": "Runtime-neutral verification for Samva webhook deliveries",
5
5
  "keywords": [
6
6
  "samva",
@@ -73,7 +73,7 @@
73
73
  "effect": "^4.1.4",
74
74
  "tsdown": "0.23.7",
75
75
  "typescript": "^7.0.2",
76
- "vitest": "5.1.0"
76
+ "vitest": "5.1.1"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "effect": "^4.0.4"