@samva/webhooks 0.23.1 → 0.25.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.
@@ -931,7 +931,7 @@ export declare const MailboxMessageSentEventSchema: Schema.StructWithRest<Schema
931
931
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
932
932
  readonly id: Schema.String;
933
933
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
934
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
934
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
935
935
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
936
936
  readonly message: Schema.StructWithRest<Schema.Struct<{
937
937
  readonly id: Schema.String;
@@ -964,7 +964,7 @@ export declare const MailboxActionPendingApprovalEventSchema: Schema.StructWithR
964
964
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
965
965
  readonly action: Schema.StructWithRest<Schema.Struct<{
966
966
  readonly id: Schema.String;
967
- readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest"]>;
967
+ readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest", "toolCall"]>;
968
968
  readonly state: Schema.optionalKey<Schema.Literal<"approvalRequired">>;
969
969
  readonly decision: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
970
970
  readonly outcome: Schema.Literals<readonly ["allow", "requireApproval", "deny"]>;
@@ -979,15 +979,20 @@ export declare const MailboxActionPendingApprovalEventSchema: Schema.StructWithR
979
979
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
980
980
  readonly id: Schema.String;
981
981
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
982
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
982
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
983
983
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
984
984
  readonly createdAt: Schema.String;
985
985
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
986
- readonly draft: Schema.StructWithRest<Schema.Struct<{
986
+ readonly draft: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
987
987
  readonly to: Schema.$Array<Schema.String>;
988
988
  readonly cc: Schema.$Array<Schema.String>;
989
989
  readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
990
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
990
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>;
991
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
992
+ readonly name: Schema.String;
993
+ readonly argumentsHash: Schema.String;
994
+ readonly arguments: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
995
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
991
996
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
992
997
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
993
998
  export declare const MailboxActionResolvedEventSchema: Schema.StructWithRest<Schema.Struct<{
@@ -998,13 +1003,13 @@ export declare const MailboxActionResolvedEventSchema: Schema.StructWithRest<Sch
998
1003
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
999
1004
  readonly action: Schema.StructWithRest<Schema.Struct<{
1000
1005
  readonly id: Schema.String;
1001
- readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest"]>;
1006
+ readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest", "toolCall"]>;
1002
1007
  readonly threadId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1003
1008
  readonly proposedBy: Schema.StructWithRest<Schema.Struct<{
1004
1009
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1005
1010
  readonly id: Schema.String;
1006
1011
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1007
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
1012
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1008
1013
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1009
1014
  readonly createdAt: Schema.String;
1010
1015
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -1014,7 +1019,7 @@ export declare const MailboxActionResolvedEventSchema: Schema.StructWithRest<Sch
1014
1019
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1015
1020
  readonly id: Schema.String;
1016
1021
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1017
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
1022
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1018
1023
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1019
1024
  readonly resolvedAt: Schema.String;
1020
1025
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -1051,7 +1056,7 @@ export declare const MailboxMessageReleasedEventSchema: Schema.StructWithRest<Sc
1051
1056
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1052
1057
  readonly id: Schema.String;
1053
1058
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1054
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
1059
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1055
1060
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1056
1061
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "phishing", "fraud", "prompt_injection"]>;
1057
1062
  readonly message: Schema.StructWithRest<Schema.Struct<{
@@ -1093,7 +1098,7 @@ export declare const MailboxMessageDiscardedEventSchema: Schema.StructWithRest<S
1093
1098
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
1094
1099
  readonly id: Schema.String;
1095
1100
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1096
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
1101
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
1097
1102
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1098
1103
  readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
1099
1104
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "phishing", "fraud", "prompt_injection"]>;
@@ -1108,6 +1113,55 @@ export declare const MailboxMessageDiscardedEventSchema: Schema.StructWithRest<S
1108
1113
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1109
1114
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1110
1115
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1116
+ export declare const MailboxMessageDeliveredEventSchema: Schema.StructWithRest<Schema.Struct<{
1117
+ readonly type: Schema.Literal<"mailbox.message.delivered">;
1118
+ readonly timestamp: Schema.String;
1119
+ readonly data: Schema.StructWithRest<Schema.Struct<{
1120
+ readonly mailboxId: Schema.String;
1121
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1122
+ readonly threadId: Schema.String;
1123
+ readonly actionId: Schema.String;
1124
+ readonly messageId: Schema.String;
1125
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
1126
+ readonly recipient: Schema.String;
1127
+ readonly occurredAt: Schema.String;
1128
+ readonly status: Schema.Literal<"delivered">;
1129
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1130
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1131
+ export declare const MailboxMessageReadEventSchema: Schema.StructWithRest<Schema.Struct<{
1132
+ readonly type: Schema.Literal<"mailbox.message.read">;
1133
+ readonly timestamp: Schema.String;
1134
+ readonly data: Schema.StructWithRest<Schema.Struct<{
1135
+ readonly mailboxId: Schema.String;
1136
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1137
+ readonly threadId: Schema.String;
1138
+ readonly actionId: Schema.String;
1139
+ readonly messageId: Schema.String;
1140
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
1141
+ readonly recipient: Schema.String;
1142
+ readonly occurredAt: Schema.String;
1143
+ readonly status: Schema.Literal<"read">;
1144
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1145
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1146
+ export declare const MailboxMessageFailedEventSchema: Schema.StructWithRest<Schema.Struct<{
1147
+ readonly type: Schema.Literal<"mailbox.message.failed">;
1148
+ readonly timestamp: Schema.String;
1149
+ readonly data: Schema.StructWithRest<Schema.Struct<{
1150
+ readonly mailboxId: Schema.String;
1151
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
1152
+ readonly threadId: Schema.String;
1153
+ readonly actionId: Schema.String;
1154
+ readonly messageId: Schema.String;
1155
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
1156
+ readonly recipient: Schema.String;
1157
+ readonly occurredAt: Schema.String;
1158
+ readonly status: Schema.Literal<"failed">;
1159
+ readonly error: Schema.StructWithRest<Schema.Struct<{
1160
+ readonly code: Schema.Union<readonly [Schema.String, Schema.Null]>;
1161
+ readonly message: Schema.Union<readonly [Schema.String, Schema.Null]>;
1162
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1163
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1164
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
1111
1165
  export declare const JourneyWebhookEventSchema: Schema.StructWithRest<Schema.Struct<{
1112
1166
  readonly type: Schema.Literal<"journey.webhook">;
1113
1167
  readonly timestamp: Schema.String;
@@ -2028,7 +2082,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2028
2082
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2029
2083
  readonly id: Schema.String;
2030
2084
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2031
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2085
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2032
2086
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2033
2087
  readonly message: Schema.StructWithRest<Schema.Struct<{
2034
2088
  readonly id: Schema.String;
@@ -2060,7 +2114,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2060
2114
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2061
2115
  readonly action: Schema.StructWithRest<Schema.Struct<{
2062
2116
  readonly id: Schema.String;
2063
- readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest"]>;
2117
+ readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest", "toolCall"]>;
2064
2118
  readonly state: Schema.optionalKey<Schema.Literal<"approvalRequired">>;
2065
2119
  readonly decision: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
2066
2120
  readonly outcome: Schema.Literals<readonly ["allow", "requireApproval", "deny"]>;
@@ -2075,15 +2129,20 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2075
2129
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2076
2130
  readonly id: Schema.String;
2077
2131
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2078
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2132
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2079
2133
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2080
2134
  readonly createdAt: Schema.String;
2081
2135
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2082
- readonly draft: Schema.StructWithRest<Schema.Struct<{
2136
+ readonly draft: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
2083
2137
  readonly to: Schema.$Array<Schema.String>;
2084
2138
  readonly cc: Schema.$Array<Schema.String>;
2085
2139
  readonly subject: Schema.Union<readonly [Schema.String, Schema.Null]>;
2086
- }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2140
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>;
2141
+ readonly tool: Schema.optionalKey<Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
2142
+ readonly name: Schema.String;
2143
+ readonly argumentsHash: Schema.String;
2144
+ readonly arguments: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
2145
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.Null]>>;
2087
2146
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2088
2147
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2089
2148
  readonly type: Schema.Literal<"mailbox.action.resolved">;
@@ -2093,13 +2152,13 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2093
2152
  readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2094
2153
  readonly action: Schema.StructWithRest<Schema.Struct<{
2095
2154
  readonly id: Schema.String;
2096
- readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest"]>;
2155
+ readonly type: Schema.Literals<readonly ["sendMessage", "reply", "updateDraft", "createNote", "assignThread", "changeThreadState", "call", "extensionRequest", "toolCall"]>;
2097
2156
  readonly threadId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2098
2157
  readonly proposedBy: Schema.StructWithRest<Schema.Struct<{
2099
2158
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2100
2159
  readonly id: Schema.String;
2101
2160
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2102
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2161
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2103
2162
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2104
2163
  readonly createdAt: Schema.String;
2105
2164
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
@@ -2109,7 +2168,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2109
2168
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2110
2169
  readonly id: Schema.String;
2111
2170
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2112
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2171
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2113
2172
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2114
2173
  readonly resolvedAt: Schema.String;
2115
2174
  readonly reason: Schema.Union<readonly [Schema.String, Schema.Null]>;
@@ -2144,7 +2203,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2144
2203
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2145
2204
  readonly id: Schema.String;
2146
2205
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2147
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2206
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2148
2207
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2149
2208
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "phishing", "fraud", "prompt_injection"]>;
2150
2209
  readonly message: Schema.StructWithRest<Schema.Struct<{
@@ -2185,7 +2244,7 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2185
2244
  readonly kind: Schema.Literals<readonly ["user", "apiKey", "extension", "externalAgent", "samvaAgent", "system"]>;
2186
2245
  readonly id: Schema.String;
2187
2246
  readonly displayName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
2188
- readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "system"]>;
2247
+ readonly source: Schema.Literals<readonly ["humanUi", "externalApi", "externalAgent", "extension", "samvaManagedAgent", "system"]>;
2189
2248
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2190
2249
  readonly disposition: Schema.Literals<readonly ["quarantined", "isolated"]>;
2191
2250
  readonly reason: Schema.Literals<readonly ["spam", "dmarc", "virus", "virus_unscanned", "phishing", "fraud", "prompt_injection"]>;
@@ -2199,6 +2258,52 @@ export declare const SamvaWebhookEventSchema: Schema.Union<readonly [Schema.Stru
2199
2258
  readonly receivedAt: Schema.String;
2200
2259
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2201
2260
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2261
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2262
+ readonly type: Schema.Literal<"mailbox.message.delivered">;
2263
+ readonly timestamp: Schema.String;
2264
+ readonly data: Schema.StructWithRest<Schema.Struct<{
2265
+ readonly mailboxId: Schema.String;
2266
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2267
+ readonly threadId: Schema.String;
2268
+ readonly actionId: Schema.String;
2269
+ readonly messageId: Schema.String;
2270
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
2271
+ readonly recipient: Schema.String;
2272
+ readonly occurredAt: Schema.String;
2273
+ readonly status: Schema.Literal<"delivered">;
2274
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2275
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2276
+ readonly type: Schema.Literal<"mailbox.message.read">;
2277
+ readonly timestamp: Schema.String;
2278
+ readonly data: Schema.StructWithRest<Schema.Struct<{
2279
+ readonly mailboxId: Schema.String;
2280
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2281
+ readonly threadId: Schema.String;
2282
+ readonly actionId: Schema.String;
2283
+ readonly messageId: Schema.String;
2284
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
2285
+ readonly recipient: Schema.String;
2286
+ readonly occurredAt: Schema.String;
2287
+ readonly status: Schema.Literal<"read">;
2288
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2289
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2290
+ readonly type: Schema.Literal<"mailbox.message.failed">;
2291
+ readonly timestamp: Schema.String;
2292
+ readonly data: Schema.StructWithRest<Schema.Struct<{
2293
+ readonly mailboxId: Schema.String;
2294
+ readonly namespaceId: Schema.Union<readonly [Schema.String, Schema.Null]>;
2295
+ readonly threadId: Schema.String;
2296
+ readonly actionId: Schema.String;
2297
+ readonly messageId: Schema.String;
2298
+ readonly channel: Schema.Literals<readonly ["email", "whatsapp", "sms"]>;
2299
+ readonly recipient: Schema.String;
2300
+ readonly occurredAt: Schema.String;
2301
+ readonly status: Schema.Literal<"failed">;
2302
+ readonly error: Schema.StructWithRest<Schema.Struct<{
2303
+ readonly code: Schema.Union<readonly [Schema.String, Schema.Null]>;
2304
+ readonly message: Schema.Union<readonly [Schema.String, Schema.Null]>;
2305
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2306
+ }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>;
2202
2307
  }>, readonly [Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>]>, Schema.StructWithRest<Schema.Struct<{
2203
2308
  readonly type: Schema.Literal<"journey.webhook">;
2204
2309
  readonly timestamp: Schema.String;
@@ -1233,6 +1233,7 @@ const MailboxMessageSentEventSchema = Schema.StructWithRest(Schema.Struct({
1233
1233
  "externalApi",
1234
1234
  "externalAgent",
1235
1235
  "extension",
1236
+ "samvaManagedAgent",
1236
1237
  "system"
1237
1238
  ])
1238
1239
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
@@ -1279,7 +1280,8 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
1279
1280
  "assignThread",
1280
1281
  "changeThreadState",
1281
1282
  "call",
1282
- "extensionRequest"
1283
+ "extensionRequest",
1284
+ "toolCall"
1283
1285
  ]),
1284
1286
  state: Schema.optionalKey(Schema.Literal("approvalRequired").annotate({ description: "Deliveries recorded before this field existed omit it." })),
1285
1287
  decision: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
@@ -1315,16 +1317,22 @@ const MailboxActionPendingApprovalEventSchema = Schema.StructWithRest(Schema.Str
1315
1317
  "externalApi",
1316
1318
  "externalAgent",
1317
1319
  "extension",
1320
+ "samvaManagedAgent",
1318
1321
  "system"
1319
1322
  ])
1320
1323
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1321
1324
  createdAt: Schema.String
1322
1325
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
1323
- draft: Schema.StructWithRest(Schema.Struct({
1326
+ draft: Schema.Union([Schema.StructWithRest(Schema.Struct({
1324
1327
  to: Schema.Array(Schema.String),
1325
1328
  cc: Schema.Array(Schema.String),
1326
1329
  subject: Schema.Union([Schema.String, Schema.Null])
1327
- }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1330
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]).annotate({ description: "Who a held send goes to; null for a held tool call." }),
1331
+ tool: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
1332
+ name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })),
1333
+ argumentsHash: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[0-9a-f]{64}$", "u")).annotate({ expected: "a string matching the RegExp ^[0-9a-f]{64}$" })),
1334
+ arguments: Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))
1335
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null]).annotate({ description: "The tool a held tool call runs and its arguments; null for a held send. Deliveries recorded before this field existed omit it." }))
1328
1336
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1329
1337
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1330
1338
  const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
@@ -1343,7 +1351,8 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
1343
1351
  "assignThread",
1344
1352
  "changeThreadState",
1345
1353
  "call",
1346
- "extensionRequest"
1354
+ "extensionRequest",
1355
+ "toolCall"
1347
1356
  ]),
1348
1357
  threadId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1349
1358
  proposedBy: Schema.StructWithRest(Schema.Struct({
@@ -1362,6 +1371,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
1362
1371
  "externalApi",
1363
1372
  "externalAgent",
1364
1373
  "extension",
1374
+ "samvaManagedAgent",
1365
1375
  "system"
1366
1376
  ])
1367
1377
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
@@ -1389,6 +1399,7 @@ const MailboxActionResolvedEventSchema = Schema.StructWithRest(Schema.Struct({
1389
1399
  "externalApi",
1390
1400
  "externalAgent",
1391
1401
  "extension",
1402
+ "samvaManagedAgent",
1392
1403
  "system"
1393
1404
  ])
1394
1405
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ description: "Who resolved the approval." }),
@@ -1447,6 +1458,7 @@ const MailboxMessageReleasedEventSchema = Schema.StructWithRest(Schema.Struct({
1447
1458
  "externalApi",
1448
1459
  "externalAgent",
1449
1460
  "extension",
1461
+ "samvaManagedAgent",
1450
1462
  "system"
1451
1463
  ])
1452
1464
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
@@ -1514,6 +1526,7 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
1514
1526
  "externalApi",
1515
1527
  "externalAgent",
1516
1528
  "extension",
1529
+ "samvaManagedAgent",
1517
1530
  "system"
1518
1531
  ])
1519
1532
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
@@ -1538,6 +1551,67 @@ const MailboxMessageDiscardedEventSchema = Schema.StructWithRest(Schema.Struct({
1538
1551
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1539
1552
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1540
1553
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1554
+ const MailboxMessageDeliveredEventSchema = Schema.StructWithRest(Schema.Struct({
1555
+ type: Schema.Literal("mailbox.message.delivered"),
1556
+ timestamp: Schema.String,
1557
+ data: Schema.StructWithRest(Schema.Struct({
1558
+ mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1559
+ namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1560
+ threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1561
+ actionId: Schema.String.annotate({ description: "The mailbox send action that sent the message." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1562
+ messageId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1563
+ channel: Schema.Literals([
1564
+ "email",
1565
+ "whatsapp",
1566
+ "sms"
1567
+ ]).annotate({ description: "The channel an endpoint, thread, or message belongs to." }),
1568
+ recipient: Schema.String.annotate({ description: "The address or number the status is about." }),
1569
+ occurredAt: Schema.String,
1570
+ status: Schema.Literal("delivered")
1571
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1572
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1573
+ const MailboxMessageReadEventSchema = Schema.StructWithRest(Schema.Struct({
1574
+ type: Schema.Literal("mailbox.message.read"),
1575
+ timestamp: Schema.String,
1576
+ data: Schema.StructWithRest(Schema.Struct({
1577
+ mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1578
+ namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1579
+ threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1580
+ actionId: Schema.String.annotate({ description: "The mailbox send action that sent the message." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1581
+ messageId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1582
+ channel: Schema.Literals([
1583
+ "email",
1584
+ "whatsapp",
1585
+ "sms"
1586
+ ]).annotate({ description: "The channel an endpoint, thread, or message belongs to." }),
1587
+ recipient: Schema.String.annotate({ description: "The address or number the status is about." }),
1588
+ occurredAt: Schema.String,
1589
+ status: Schema.Literal("read")
1590
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1591
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1592
+ const MailboxMessageFailedEventSchema = Schema.StructWithRest(Schema.Struct({
1593
+ type: Schema.Literal("mailbox.message.failed"),
1594
+ timestamp: Schema.String,
1595
+ data: Schema.StructWithRest(Schema.Struct({
1596
+ mailboxId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1597
+ namespaceId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$" })), Schema.Null]),
1598
+ threadId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1599
+ actionId: Schema.String.annotate({ description: "The mailbox send action that sent the message." }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1600
+ messageId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$" })),
1601
+ channel: Schema.Literals([
1602
+ "email",
1603
+ "whatsapp",
1604
+ "sms"
1605
+ ]).annotate({ description: "The channel an endpoint, thread, or message belongs to." }),
1606
+ recipient: Schema.String.annotate({ description: "The address or number the status is about." }),
1607
+ occurredAt: Schema.String,
1608
+ status: Schema.Literal("failed"),
1609
+ error: Schema.StructWithRest(Schema.Struct({
1610
+ code: Schema.Union([Schema.String, Schema.Null]),
1611
+ message: Schema.Union([Schema.String, Schema.Null])
1612
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1613
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1614
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1541
1615
  const JourneyWebhookEventSchema = Schema.StructWithRest(Schema.Struct({
1542
1616
  type: Schema.Literal("journey.webhook"),
1543
1617
  timestamp: Schema.String,
@@ -1591,9 +1665,12 @@ const SamvaWebhookEventSchema = Schema.Union([
1591
1665
  MailboxMessageQuarantinedEventSchema,
1592
1666
  MailboxMessageReleasedEventSchema,
1593
1667
  MailboxMessageDiscardedEventSchema,
1668
+ MailboxMessageDeliveredEventSchema,
1669
+ MailboxMessageReadEventSchema,
1670
+ MailboxMessageFailedEventSchema,
1594
1671
  JourneyWebhookEventSchema
1595
1672
  ]);
1596
1673
  //#endregion
1597
- export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, FlowRegistrationUpdatedEventSchema, JourneyWebhookEventSchema, MailboxActionPendingApprovalEventSchema, MailboxActionResolvedEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema, WhatsappNumberConnectedEventSchema };
1674
+ export { ContactConsentChangedEventSchema, ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, 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 };
1598
1675
 
1599
1676
  //# sourceMappingURL=schemas.gen.js.map
@@ -1234,7 +1234,7 @@ export type MailboxMessageSentEvent = {
1234
1234
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1235
1235
  readonly id: string;
1236
1236
  readonly displayName?: string | null;
1237
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1237
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1238
1238
  } & {
1239
1239
  readonly [x: string]: JsonValue;
1240
1240
  };
@@ -1280,7 +1280,7 @@ export type MailboxActionPendingApprovalEvent = {
1280
1280
  readonly namespaceId: string | null;
1281
1281
  readonly action: {
1282
1282
  readonly id: string;
1283
- readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest";
1283
+ readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
1284
1284
  readonly state?: "approvalRequired";
1285
1285
  readonly decision?: {
1286
1286
  readonly outcome: "allow" | "requireApproval" | "deny";
@@ -1297,7 +1297,7 @@ export type MailboxActionPendingApprovalEvent = {
1297
1297
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1298
1298
  readonly id: string;
1299
1299
  readonly displayName?: string | null;
1300
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1300
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1301
1301
  } & {
1302
1302
  readonly [x: string]: JsonValue;
1303
1303
  };
@@ -1305,13 +1305,22 @@ export type MailboxActionPendingApprovalEvent = {
1305
1305
  } & {
1306
1306
  readonly [x: string]: JsonValue;
1307
1307
  };
1308
- readonly draft: {
1308
+ readonly draft: ({
1309
1309
  readonly to: ReadonlyArray<string>;
1310
1310
  readonly cc: ReadonlyArray<string>;
1311
1311
  readonly subject: string | null;
1312
1312
  } & {
1313
1313
  readonly [x: string]: JsonValue;
1314
- };
1314
+ }) | null;
1315
+ readonly tool?: ({
1316
+ readonly name: string;
1317
+ readonly argumentsHash: string;
1318
+ readonly arguments: {
1319
+ readonly [x: string]: JsonValue;
1320
+ };
1321
+ } & {
1322
+ readonly [x: string]: JsonValue;
1323
+ }) | null;
1315
1324
  } & {
1316
1325
  readonly [x: string]: JsonValue;
1317
1326
  };
@@ -1327,13 +1336,13 @@ export type MailboxActionResolvedEvent = {
1327
1336
  readonly namespaceId: string | null;
1328
1337
  readonly action: {
1329
1338
  readonly id: string;
1330
- readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest";
1339
+ readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
1331
1340
  readonly threadId: string | null;
1332
1341
  readonly proposedBy: {
1333
1342
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1334
1343
  readonly id: string;
1335
1344
  readonly displayName?: string | null;
1336
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1345
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1337
1346
  } & {
1338
1347
  readonly [x: string]: JsonValue;
1339
1348
  };
@@ -1347,7 +1356,7 @@ export type MailboxActionResolvedEvent = {
1347
1356
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1348
1357
  readonly id: string;
1349
1358
  readonly displayName?: string | null;
1350
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1359
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1351
1360
  } & {
1352
1361
  readonly [x: string]: JsonValue;
1353
1362
  };
@@ -1402,7 +1411,7 @@ export type MailboxMessageReleasedEvent = {
1402
1411
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1403
1412
  readonly id: string;
1404
1413
  readonly displayName?: string | null;
1405
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1414
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1406
1415
  } & {
1407
1416
  readonly [x: string]: JsonValue;
1408
1417
  };
@@ -1459,7 +1468,7 @@ export type MailboxMessageDiscardedEvent = {
1459
1468
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
1460
1469
  readonly id: string;
1461
1470
  readonly displayName?: string | null;
1462
- readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
1471
+ readonly source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
1463
1472
  } & {
1464
1473
  readonly [x: string]: JsonValue;
1465
1474
  };
@@ -1485,6 +1494,72 @@ export type MailboxMessageDiscardedEvent = {
1485
1494
  readonly [x: string]: JsonValue;
1486
1495
  };
1487
1496
  export type MailboxMessageDiscardedPayload = MailboxMessageDiscardedEvent["data"];
1497
+ export type MailboxMessageDeliveredEvent = {
1498
+ readonly type: "mailbox.message.delivered";
1499
+ readonly timestamp: string;
1500
+ readonly data: {
1501
+ readonly mailboxId: string;
1502
+ readonly namespaceId: string | null;
1503
+ readonly threadId: string;
1504
+ readonly actionId: string;
1505
+ readonly messageId: string;
1506
+ readonly channel: "email" | "whatsapp" | "sms";
1507
+ readonly recipient: string;
1508
+ readonly occurredAt: string;
1509
+ readonly status: "delivered";
1510
+ } & {
1511
+ readonly [x: string]: JsonValue;
1512
+ };
1513
+ } & {
1514
+ readonly [x: string]: JsonValue;
1515
+ };
1516
+ export type MailboxMessageDeliveredPayload = MailboxMessageDeliveredEvent["data"];
1517
+ export type MailboxMessageReadEvent = {
1518
+ readonly type: "mailbox.message.read";
1519
+ readonly timestamp: string;
1520
+ readonly data: {
1521
+ readonly mailboxId: string;
1522
+ readonly namespaceId: string | null;
1523
+ readonly threadId: string;
1524
+ readonly actionId: string;
1525
+ readonly messageId: string;
1526
+ readonly channel: "email" | "whatsapp" | "sms";
1527
+ readonly recipient: string;
1528
+ readonly occurredAt: string;
1529
+ readonly status: "read";
1530
+ } & {
1531
+ readonly [x: string]: JsonValue;
1532
+ };
1533
+ } & {
1534
+ readonly [x: string]: JsonValue;
1535
+ };
1536
+ export type MailboxMessageReadPayload = MailboxMessageReadEvent["data"];
1537
+ export type MailboxMessageFailedEvent = {
1538
+ readonly type: "mailbox.message.failed";
1539
+ readonly timestamp: string;
1540
+ readonly data: {
1541
+ readonly mailboxId: string;
1542
+ readonly namespaceId: string | null;
1543
+ readonly threadId: string;
1544
+ readonly actionId: string;
1545
+ readonly messageId: string;
1546
+ readonly channel: "email" | "whatsapp" | "sms";
1547
+ readonly recipient: string;
1548
+ readonly occurredAt: string;
1549
+ readonly status: "failed";
1550
+ readonly error: {
1551
+ readonly code: string | null;
1552
+ readonly message: string | null;
1553
+ } & {
1554
+ readonly [x: string]: JsonValue;
1555
+ };
1556
+ } & {
1557
+ readonly [x: string]: JsonValue;
1558
+ };
1559
+ } & {
1560
+ readonly [x: string]: JsonValue;
1561
+ };
1562
+ export type MailboxMessageFailedPayload = MailboxMessageFailedEvent["data"];
1488
1563
  export type JourneyWebhookEvent = {
1489
1564
  readonly type: "journey.webhook";
1490
1565
  readonly timestamp: string;
@@ -1511,7 +1586,7 @@ export type JourneyWebhookEvent = {
1511
1586
  readonly [x: string]: JsonValue;
1512
1587
  };
1513
1588
  export type JourneyWebhookPayload = JourneyWebhookEvent["data"];
1514
- 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 | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageQuarantinedEvent | MailboxMessageReleasedEvent | MailboxMessageDiscardedEvent | JourneyWebhookEvent;
1589
+ 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 | TemplateRegistrationUpdatedEvent | FlowRegistrationUpdatedEvent | WhatsappNumberConnectedEvent | MailboxMessageReceivedEvent | MailboxMessageSentEvent | MailboxActionPendingApprovalEvent | MailboxActionResolvedEvent | MailboxMessageQuarantinedEvent | MailboxMessageReleasedEvent | MailboxMessageDiscardedEvent | MailboxMessageDeliveredEvent | MailboxMessageReadEvent | MailboxMessageFailedEvent | JourneyWebhookEvent;
1515
1590
  export interface UnknownWebhookEvent {
1516
1591
  readonly type: string;
1517
1592
  readonly timestamp: string;