@samva/webhooks 0.35.0 → 0.37.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.
@@ -1075,6 +1075,36 @@ export type DomainWarmingUpdatedEvent = {
1075
1075
  readonly [x: string]: JsonValue;
1076
1076
  };
1077
1077
  export type DomainWarmingUpdatedPayload = DomainWarmingUpdatedEvent["data"];
1078
+ export type EmailSendingPausedEvent = {
1079
+ readonly type: "email.sending.paused";
1080
+ readonly timestamp: string;
1081
+ readonly data: {
1082
+ readonly organizationId: string;
1083
+ readonly namespaceId: string | null;
1084
+ readonly channel: "email";
1085
+ readonly occurredAt: string;
1086
+ } & {
1087
+ readonly [x: string]: JsonValue;
1088
+ };
1089
+ } & {
1090
+ readonly [x: string]: JsonValue;
1091
+ };
1092
+ export type EmailSendingPausedPayload = EmailSendingPausedEvent["data"];
1093
+ export type EmailSendingResumedEvent = {
1094
+ readonly type: "email.sending.resumed";
1095
+ readonly timestamp: string;
1096
+ readonly data: {
1097
+ readonly organizationId: string;
1098
+ readonly namespaceId: string | null;
1099
+ readonly channel: "email";
1100
+ readonly occurredAt: string;
1101
+ } & {
1102
+ readonly [x: string]: JsonValue;
1103
+ };
1104
+ } & {
1105
+ readonly [x: string]: JsonValue;
1106
+ };
1107
+ export type EmailSendingResumedPayload = EmailSendingResumedEvent["data"];
1078
1108
  export type TemplateRegistrationUpdatedEvent = {
1079
1109
  readonly type: "template.registration.updated";
1080
1110
  readonly timestamp: string;
@@ -1304,14 +1334,58 @@ export type MailboxActionPendingApprovalEvent = {
1304
1334
  readonly namespaceId: string | null;
1305
1335
  readonly action: {
1306
1336
  readonly id: string;
1307
- readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
1337
+ readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall" | "handoff";
1338
+ readonly reviewRound: number;
1308
1339
  readonly state?: "approvalRequired";
1309
- readonly decision?: {
1310
- readonly outcome: "allow" | "requireApproval" | "deny";
1311
- readonly reason: string | null;
1312
- readonly policyId: string | null;
1313
- readonly source: "grant" | "installation" | "policy" | null;
1314
- readonly decidedAt: string;
1340
+ readonly decision: {
1341
+ readonly id: string;
1342
+ readonly reviewRound: number;
1343
+ readonly requirement: "run" | "model" | "person" | "never";
1344
+ readonly decider: "rule" | "model" | "person" | "agent";
1345
+ readonly outcome: "allow" | "hold" | "refuse";
1346
+ readonly reason: string;
1347
+ readonly scopes: ReadonlyArray<{
1348
+ readonly kind: "organization" | "mailbox" | "agent" | "apiKey";
1349
+ readonly id: string;
1350
+ } & {
1351
+ readonly [x: string]: JsonValue;
1352
+ }>;
1353
+ readonly rule?: ({
1354
+ readonly scope: {
1355
+ readonly kind: "organization" | "mailbox" | "agent" | "apiKey";
1356
+ readonly id: string;
1357
+ } & {
1358
+ readonly [x: string]: JsonValue;
1359
+ };
1360
+ readonly index: number;
1361
+ } & {
1362
+ readonly [x: string]: JsonValue;
1363
+ }) | null;
1364
+ readonly guard?: string | null;
1365
+ readonly guardReason?: string | null;
1366
+ readonly resolution?: ({
1367
+ readonly by: string;
1368
+ readonly at: string;
1369
+ readonly as: "approved" | "edited" | "denied" | "alwaysAllowed";
1370
+ readonly diff?: ({
1371
+ readonly text?: ({
1372
+ readonly before: string | null;
1373
+ readonly after: string | null;
1374
+ } & {
1375
+ readonly [x: string]: JsonValue;
1376
+ }) | null;
1377
+ readonly html?: ({
1378
+ readonly before: string | null;
1379
+ readonly after: string | null;
1380
+ } & {
1381
+ readonly [x: string]: JsonValue;
1382
+ }) | null;
1383
+ } & {
1384
+ readonly [x: string]: JsonValue;
1385
+ }) | null;
1386
+ } & {
1387
+ readonly [x: string]: JsonValue;
1388
+ }) | null;
1315
1389
  } & {
1316
1390
  readonly [x: string]: JsonValue;
1317
1391
  };
@@ -1360,7 +1434,8 @@ export type MailboxActionResolvedEvent = {
1360
1434
  readonly namespaceId: string | null;
1361
1435
  readonly action: {
1362
1436
  readonly id: string;
1363
- readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
1437
+ readonly type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall" | "handoff";
1438
+ readonly reviewRound: number;
1364
1439
  readonly threadId: string | null;
1365
1440
  readonly proposedBy: {
1366
1441
  readonly kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
@@ -1616,7 +1691,7 @@ export type JourneyWebhookEvent = {
1616
1691
  readonly [x: string]: JsonValue;
1617
1692
  };
1618
1693
  export type JourneyWebhookPayload = JourneyWebhookEvent["data"];
1619
- 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;
1694
+ 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;
1620
1695
  export interface UnknownWebhookEvent {
1621
1696
  readonly type: string;
1622
1697
  readonly timestamp: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samva/webhooks",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Runtime-neutral verification for Samva webhook deliveries",
5
5
  "keywords": [
6
6
  "samva",