samva 0.24.0 → 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.
Files changed (33) hide show
  1. package/dist/client/sdk.gen.d.ts +96 -4
  2. package/dist/client/sdk.gen.js +15 -8
  3. package/dist/client/types.gen.d.ts +544 -14
  4. package/dist/effect/api-keys.d.ts +3 -0
  5. package/dist/effect/email.d.ts +1 -0
  6. package/dist/effect/generated/agents.d.ts +1667 -0
  7. package/dist/effect/generated/api-keys.d.ts +15 -0
  8. package/dist/effect/generated/email.d.ts +19 -0
  9. package/dist/effect/generated/email.js +8 -3
  10. package/dist/effect/generated/index.d.ts +3 -1
  11. package/dist/effect/generated/mailboxes.d.ts +176 -98
  12. package/dist/effect/generated/mailboxes.js +35 -26
  13. package/dist/effect/generated/messages.d.ts +5 -5
  14. package/dist/effect/generated/messages.js +2 -1
  15. package/dist/effect/generated/organizations.d.ts +18 -0
  16. package/dist/effect/generated/organizations.js +7 -1
  17. package/dist/effect/generated/shared.d.ts +194 -45
  18. package/dist/effect/generated/shared.js +58 -36
  19. package/dist/effect/generated/templates.d.ts +11 -7
  20. package/dist/effect/generated/templates.js +4 -7
  21. package/dist/effect/generated/webhooks.d.ts +19 -19
  22. package/dist/effect/generated/webhooks.js +12 -0
  23. package/dist/effect/generated/whoami.d.ts +4 -0
  24. package/dist/effect/generated-metadata.d.ts +45 -0
  25. package/dist/effect/generated-metadata.js +465 -426
  26. package/dist/effect/journeys.d.ts +112 -112
  27. package/dist/effect/mailboxes.d.ts +20 -6
  28. package/dist/effect/templates.d.ts +4 -0
  29. package/dist/effect/webhooks.d.ts +4 -4
  30. package/dist/mailbox-events.d.ts +1 -1
  31. package/dist/package.js +1 -1
  32. package/dist/promises/types.gen.d.ts +1 -1
  33. package/package.json +2 -2
@@ -401,8 +401,19 @@ export type MailboxNonSendAction = {
401
401
  resolution: MailboxActionResolution | null;
402
402
  createdAt: string;
403
403
  updatedAt: string;
404
- type: "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest";
404
+ type: "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
405
405
  state: "proposed" | "allowed" | "approvalRequired" | "policyDenied" | "approved" | "approvalDenied" | "executing" | "executed" | "failed";
406
+ /**
407
+ * The tool a `toolCall` runs, with its arguments and their hash; an approval covers exactly this call. Null for every other action type.
408
+ */
409
+ tool: MailboxToolCall | null;
410
+ };
411
+ export type MailboxToolCall = {
412
+ name: string;
413
+ argumentsHash: string;
414
+ arguments: {
415
+ [key: string]: JsonValue;
416
+ };
406
417
  };
407
418
  /**
408
419
  * How the action's approval ended.
@@ -416,7 +427,7 @@ export type MailboxActionResolution = {
416
427
  kind: "user" | "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system";
417
428
  id: string;
418
429
  displayName?: string | null | undefined;
419
- source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "system";
430
+ source: "humanUi" | "externalApi" | "externalAgent" | "extension" | "samvaManagedAgent" | "system";
420
431
  };
421
432
  resolvedAt: string;
422
433
  /**
@@ -937,7 +948,7 @@ export type MailboxGrantPage = {
937
948
  export type MailboxAgentActivity = {
938
949
  actions: {
939
950
  byType: Array<{
940
- type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest";
951
+ type: "sendMessage" | "reply" | "updateDraft" | "createNote" | "assignThread" | "changeThreadState" | "call" | "extensionRequest" | "toolCall";
941
952
  count: number;
942
953
  }>;
943
954
  byState: Array<{
@@ -1075,6 +1086,7 @@ export type ApiKeyResourceAccess = {
1075
1086
  contacts?: "read" | "write" | null | undefined;
1076
1087
  conversations?: "read" | "write" | null | undefined;
1077
1088
  templates?: "read" | "write" | null | undefined;
1089
+ agents?: "read" | "write" | null | undefined;
1078
1090
  webhooks?: "read" | "write" | null | undefined;
1079
1091
  apiKeys?: "read" | "write" | null | undefined;
1080
1092
  organization?: "read" | "write" | null | undefined;
@@ -1289,7 +1301,7 @@ export type WebhookEndpoint = {
1289
1301
  id: WebhookEndpointId;
1290
1302
  name: string;
1291
1303
  url: string;
1292
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1304
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1293
1305
  channels: Array<"email"> | null;
1294
1306
  mailboxIds: Array<MailboxId> | null;
1295
1307
  namespaceId: NamespaceId | null;
@@ -1303,7 +1315,7 @@ export type WebhookEndpoint = {
1303
1315
  export type UpdateWebhookPayload = {
1304
1316
  name?: string | null | undefined;
1305
1317
  url?: string | null | undefined;
1306
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
1318
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
1307
1319
  channels?: Array<"email"> | null | null | undefined;
1308
1320
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
1309
1321
  namespaceId?: NamespaceId | null | null | undefined;
@@ -1320,7 +1332,7 @@ export type WebhookEndpointListItem = {
1320
1332
  id: WebhookEndpointId;
1321
1333
  name: string;
1322
1334
  url: string;
1323
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1335
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1324
1336
  channels: Array<"email"> | null;
1325
1337
  mailboxIds: Array<MailboxId> | null;
1326
1338
  namespaceId: NamespaceId | null;
@@ -1342,7 +1354,7 @@ export type WebhookDeliveryCounts = {
1342
1354
  export type CreateWebhookPayload = {
1343
1355
  name: string;
1344
1356
  url: string;
1345
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
1357
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
1346
1358
  channels?: Array<"email"> | null | undefined;
1347
1359
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
1348
1360
  namespaceId?: NamespaceId | null | undefined;
@@ -1485,10 +1497,7 @@ export type Template = {
1485
1497
  description: string | null;
1486
1498
  category: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null;
1487
1499
  replyToDefault: Array<string> | null;
1488
- trackingDefault: {
1489
- opens?: boolean | null | undefined;
1490
- clicks?: boolean | null | undefined;
1491
- } | null;
1500
+ trackingDefault: TemplateTrackingDefault | null;
1492
1501
  email: {
1493
1502
  subject: string;
1494
1503
  preheader: string | null;
@@ -1502,6 +1511,10 @@ export type Template = {
1502
1511
  [key: string]: JsonValue;
1503
1512
  } | null;
1504
1513
  };
1514
+ export type TemplateTrackingDefault = {
1515
+ opens?: boolean | null | undefined;
1516
+ clicks?: boolean | null | undefined;
1517
+ };
1505
1518
  export type TemplateFamilyId = string;
1506
1519
  export type TemplateFromDefault = {
1507
1520
  email: string;
@@ -1530,6 +1543,10 @@ export type UpdateTemplatePayload = {
1530
1543
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1531
1544
  fromDefault?: TemplateFromDefault | null | null | undefined;
1532
1545
  replyToDefault?: Array<string> | null | null | undefined;
1546
+ /**
1547
+ * Engagement tracking for sends of this template: `opens` and `clicks`, each inherited from the domain and organization defaults when omitted. A send request's own `tracking` still wins. Null clears the template's default.
1548
+ */
1549
+ trackingDefault?: TemplateTrackingDefault | null | null | undefined;
1533
1550
  isActive?: boolean | null | undefined;
1534
1551
  /**
1535
1552
  * Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared.
@@ -1811,6 +1828,104 @@ export type SubscribePayload = {
1811
1828
  consentIp?: string | null | undefined;
1812
1829
  consentSource?: string | null | undefined;
1813
1830
  };
1831
+ export type AgentVersion = {
1832
+ agentId: AgentId;
1833
+ version: number;
1834
+ definition: AgentDefinition;
1835
+ publishedAt: string;
1836
+ };
1837
+ export type ClockTime = string;
1838
+ export type Weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
1839
+ export type TimeZone = string;
1840
+ export type AgentApprovalPolicy = "toolActions" | "none";
1841
+ export type AgentModel = "standard" | "max";
1842
+ export type AgentMode = "live" | "supervised";
1843
+ export type AgentIntegrationReference = string;
1844
+ export type AgentId = string;
1845
+ export type AgentVersionPage = {
1846
+ items: Array<AgentVersionSummary>;
1847
+ nextCursor: string | null;
1848
+ };
1849
+ export type AgentVersionSummary = {
1850
+ agentId: AgentId;
1851
+ version: number;
1852
+ publishedAt: string;
1853
+ };
1854
+ export type PublishAgentResponse = {
1855
+ agent: Agent;
1856
+ version: AgentVersion;
1857
+ published: boolean;
1858
+ };
1859
+ export type PublishAgentPayload = {
1860
+ revision: string;
1861
+ };
1862
+ export type ReplaceAgentDraftPayload = {
1863
+ revision: string;
1864
+ definition: AgentDefinition;
1865
+ };
1866
+ export type AgentDefinition = {
1867
+ instructions: string;
1868
+ knowledge: string;
1869
+ endpointIds: Array<MailboxEndpointId>;
1870
+ integrationIds: Array<AgentIntegrationReference>;
1871
+ mode: AgentMode;
1872
+ model: AgentModel;
1873
+ approvalPolicy: AgentApprovalPolicy;
1874
+ workingHours: WorkingHours | null;
1875
+ takeoverTimeoutMinutes: number;
1876
+ };
1877
+ export type WorkingHours = {
1878
+ timeZone: TimeZone;
1879
+ ranges: Array<WorkingHoursRange>;
1880
+ };
1881
+ export type WorkingHoursRange = {
1882
+ day: Weekday;
1883
+ opens: ClockTime;
1884
+ closes: ClockTime;
1885
+ };
1886
+ export type DeleteAgentResponse = {
1887
+ id: AgentId;
1888
+ deleted: true;
1889
+ };
1890
+ export type UpdateAgentPayload = {
1891
+ name: AgentName;
1892
+ };
1893
+ export type AgentName = string;
1894
+ export type Agent = {
1895
+ id: AgentId;
1896
+ name: string;
1897
+ namespaceId: NamespaceId | null;
1898
+ revision: string;
1899
+ draft: AgentDefinition;
1900
+ publishedVersion: number | null;
1901
+ publishedAt: string | null;
1902
+ createdAt: string;
1903
+ updatedAt: string;
1904
+ };
1905
+ export type CreateAgentPayload = {
1906
+ name: AgentName;
1907
+ /**
1908
+ * The namespace the agent belongs to; it cannot move later. Omit for an organization-level agent. A namespace-scoped key always creates in its own namespace.
1909
+ */
1910
+ namespaceId?: NamespaceId | null | undefined;
1911
+ /**
1912
+ * The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model.
1913
+ */
1914
+ definition?: AgentDefinition | null | undefined;
1915
+ };
1916
+ export type AgentPage = {
1917
+ items: Array<AgentListItem>;
1918
+ nextCursor: string | null;
1919
+ };
1920
+ export type AgentListItem = {
1921
+ id: AgentId;
1922
+ name: string;
1923
+ namespaceId: NamespaceId | null;
1924
+ publishedVersion: number | null;
1925
+ publishedAt: string | null;
1926
+ createdAt: string;
1927
+ updatedAt: string;
1928
+ };
1814
1929
  export type JourneyRunDetail = {
1815
1930
  id: JourneyRunId;
1816
1931
  journeyId: JourneyId;
@@ -2733,6 +2848,7 @@ export type CustomTrackingStatus = {
2733
2848
  status: "pending" | "caa-blocked" | "active" | "teardown-scheduled" | "disabled";
2734
2849
  label: string;
2735
2850
  hostname: string;
2851
+ parentDomain: string;
2736
2852
  region: string;
2737
2853
  sslStatus: string | null;
2738
2854
  certificate: CustomTrackingCertificate | null;
@@ -2744,6 +2860,7 @@ export type CustomTrackingStatus = {
2744
2860
  verificationErrors: Array<string>;
2745
2861
  teardownScheduledAt: string | null;
2746
2862
  } | null;
2863
+ parentDomains: Array<string>;
2747
2864
  };
2748
2865
  export type CustomTrackingDnsRecord = {
2749
2866
  name: string;
@@ -3433,7 +3550,7 @@ export type Message = {
3433
3550
  updatedAt: string;
3434
3551
  };
3435
3552
  export type MessageSubmission = {
3436
- origin: "direct" | "campaign" | "scheduled" | "mailbox" | "forwarding" | "journey";
3553
+ origin: "direct" | "campaign" | "scheduled" | "mailbox" | "forwarding" | "journey" | "businessApp";
3437
3554
  transport: "http" | null;
3438
3555
  credential: SubmissionCredential | null;
3439
3556
  userId: UserId | null;
@@ -6078,6 +6195,7 @@ export type EmailGetCustomTrackingResponse = EmailGetCustomTrackingResponses[key
6078
6195
  export type EmailEnableCustomTrackingData = {
6079
6196
  body: {
6080
6197
  label?: string | null | undefined;
6198
+ parentDomain?: string | null | undefined;
6081
6199
  };
6082
6200
  path: {
6083
6201
  id: EmailDomainId;
@@ -10729,6 +10847,408 @@ export type JourneysGetRunResponses = {
10729
10847
  200: JourneyRunDetail;
10730
10848
  };
10731
10849
  export type JourneysGetRunResponse = JourneysGetRunResponses[keyof JourneysGetRunResponses];
10850
+ export type AgentsListData = {
10851
+ body?: never;
10852
+ path?: never;
10853
+ query?: {
10854
+ limit?: string | null | undefined;
10855
+ cursor?: Cursor | null | undefined;
10856
+ };
10857
+ url: "/v1/agents";
10858
+ };
10859
+ export type AgentsListErrors = {
10860
+ /**
10861
+ * UnauthorizedError
10862
+ */
10863
+ 401: UnauthorizedError;
10864
+ /**
10865
+ * ForbiddenError
10866
+ */
10867
+ 403: ForbiddenError;
10868
+ /**
10869
+ * ValidationError
10870
+ */
10871
+ 422: ValidationError;
10872
+ /**
10873
+ * InternalError
10874
+ */
10875
+ 500: InternalError;
10876
+ /**
10877
+ * GatewayTimeoutError
10878
+ */
10879
+ 504: GatewayTimeoutError;
10880
+ };
10881
+ export type AgentsListError = AgentsListErrors[keyof AgentsListErrors];
10882
+ export type AgentsListResponses = {
10883
+ /**
10884
+ * AgentPage
10885
+ */
10886
+ 200: AgentPage;
10887
+ };
10888
+ export type AgentsListResponse = AgentsListResponses[keyof AgentsListResponses];
10889
+ export type AgentsCreateData = {
10890
+ body: {
10891
+ name: AgentName;
10892
+ /**
10893
+ * The namespace the agent belongs to; it cannot move later. Omit for an organization-level agent. A namespace-scoped key always creates in its own namespace.
10894
+ */
10895
+ namespaceId?: NamespaceId | null | undefined;
10896
+ /**
10897
+ * The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model.
10898
+ */
10899
+ definition?: AgentDefinition | null | undefined;
10900
+ };
10901
+ path?: never;
10902
+ query?: never;
10903
+ url: "/v1/agents";
10904
+ };
10905
+ export type AgentsCreateErrors = {
10906
+ /**
10907
+ * UnauthorizedError
10908
+ */
10909
+ 401: UnauthorizedError;
10910
+ /**
10911
+ * ForbiddenError
10912
+ */
10913
+ 403: ForbiddenError;
10914
+ /**
10915
+ * ResourceNotFoundError
10916
+ */
10917
+ 404: ResourceNotFoundError;
10918
+ /**
10919
+ * ValidationError
10920
+ */
10921
+ 422: ValidationError;
10922
+ /**
10923
+ * InternalError
10924
+ */
10925
+ 500: InternalError;
10926
+ /**
10927
+ * GatewayTimeoutError
10928
+ */
10929
+ 504: GatewayTimeoutError;
10930
+ };
10931
+ export type AgentsCreateError = AgentsCreateErrors[keyof AgentsCreateErrors];
10932
+ export type AgentsCreateResponses = {
10933
+ /**
10934
+ * Agent
10935
+ */
10936
+ 201: Agent;
10937
+ };
10938
+ export type AgentsCreateResponse = AgentsCreateResponses[keyof AgentsCreateResponses];
10939
+ export type AgentsRemoveData = {
10940
+ body?: never;
10941
+ path: {
10942
+ id: AgentId;
10943
+ };
10944
+ query?: never;
10945
+ url: "/v1/agents/{id}";
10946
+ };
10947
+ export type AgentsRemoveErrors = {
10948
+ /**
10949
+ * UnauthorizedError
10950
+ */
10951
+ 401: UnauthorizedError;
10952
+ /**
10953
+ * ForbiddenError
10954
+ */
10955
+ 403: ForbiddenError;
10956
+ /**
10957
+ * ResourceNotFoundError
10958
+ */
10959
+ 404: ResourceNotFoundError;
10960
+ /**
10961
+ * ValidationError
10962
+ */
10963
+ 422: ValidationError;
10964
+ /**
10965
+ * InternalError
10966
+ */
10967
+ 500: InternalError;
10968
+ /**
10969
+ * GatewayTimeoutError
10970
+ */
10971
+ 504: GatewayTimeoutError;
10972
+ };
10973
+ export type AgentsRemoveError = AgentsRemoveErrors[keyof AgentsRemoveErrors];
10974
+ export type AgentsRemoveResponses = {
10975
+ /**
10976
+ * DeleteAgentResponse
10977
+ */
10978
+ 200: DeleteAgentResponse;
10979
+ };
10980
+ export type AgentsRemoveResponse = AgentsRemoveResponses[keyof AgentsRemoveResponses];
10981
+ export type AgentsGetData = {
10982
+ body?: never;
10983
+ path: {
10984
+ id: AgentId;
10985
+ };
10986
+ query?: never;
10987
+ url: "/v1/agents/{id}";
10988
+ };
10989
+ export type AgentsGetErrors = {
10990
+ /**
10991
+ * UnauthorizedError
10992
+ */
10993
+ 401: UnauthorizedError;
10994
+ /**
10995
+ * ForbiddenError
10996
+ */
10997
+ 403: ForbiddenError;
10998
+ /**
10999
+ * ResourceNotFoundError
11000
+ */
11001
+ 404: ResourceNotFoundError;
11002
+ /**
11003
+ * ValidationError
11004
+ */
11005
+ 422: ValidationError;
11006
+ /**
11007
+ * InternalError
11008
+ */
11009
+ 500: InternalError;
11010
+ /**
11011
+ * GatewayTimeoutError
11012
+ */
11013
+ 504: GatewayTimeoutError;
11014
+ };
11015
+ export type AgentsGetError = AgentsGetErrors[keyof AgentsGetErrors];
11016
+ export type AgentsGetResponses = {
11017
+ /**
11018
+ * Agent
11019
+ */
11020
+ 200: Agent;
11021
+ };
11022
+ export type AgentsGetResponse = AgentsGetResponses[keyof AgentsGetResponses];
11023
+ export type AgentsUpdateData = {
11024
+ body: {
11025
+ name: AgentName;
11026
+ };
11027
+ path: {
11028
+ id: AgentId;
11029
+ };
11030
+ query?: never;
11031
+ url: "/v1/agents/{id}";
11032
+ };
11033
+ export type AgentsUpdateErrors = {
11034
+ /**
11035
+ * UnauthorizedError
11036
+ */
11037
+ 401: UnauthorizedError;
11038
+ /**
11039
+ * ForbiddenError
11040
+ */
11041
+ 403: ForbiddenError;
11042
+ /**
11043
+ * ResourceNotFoundError
11044
+ */
11045
+ 404: ResourceNotFoundError;
11046
+ /**
11047
+ * ValidationError
11048
+ */
11049
+ 422: ValidationError;
11050
+ /**
11051
+ * InternalError
11052
+ */
11053
+ 500: InternalError;
11054
+ /**
11055
+ * GatewayTimeoutError
11056
+ */
11057
+ 504: GatewayTimeoutError;
11058
+ };
11059
+ export type AgentsUpdateError = AgentsUpdateErrors[keyof AgentsUpdateErrors];
11060
+ export type AgentsUpdateResponses = {
11061
+ /**
11062
+ * Agent
11063
+ */
11064
+ 200: Agent;
11065
+ };
11066
+ export type AgentsUpdateResponse = AgentsUpdateResponses[keyof AgentsUpdateResponses];
11067
+ export type AgentsReplaceDraftData = {
11068
+ body: {
11069
+ revision: string;
11070
+ definition: AgentDefinition;
11071
+ };
11072
+ path: {
11073
+ id: AgentId;
11074
+ };
11075
+ query?: never;
11076
+ url: "/v1/agents/{id}/draft";
11077
+ };
11078
+ export type AgentsReplaceDraftErrors = {
11079
+ /**
11080
+ * UnauthorizedError
11081
+ */
11082
+ 401: UnauthorizedError;
11083
+ /**
11084
+ * ForbiddenError
11085
+ */
11086
+ 403: ForbiddenError;
11087
+ /**
11088
+ * ResourceNotFoundError
11089
+ */
11090
+ 404: ResourceNotFoundError;
11091
+ /**
11092
+ * ConflictError
11093
+ */
11094
+ 409: ConflictError;
11095
+ /**
11096
+ * ValidationError
11097
+ */
11098
+ 422: ValidationError;
11099
+ /**
11100
+ * InternalError
11101
+ */
11102
+ 500: InternalError;
11103
+ /**
11104
+ * GatewayTimeoutError
11105
+ */
11106
+ 504: GatewayTimeoutError;
11107
+ };
11108
+ export type AgentsReplaceDraftError = AgentsReplaceDraftErrors[keyof AgentsReplaceDraftErrors];
11109
+ export type AgentsReplaceDraftResponses = {
11110
+ /**
11111
+ * Agent
11112
+ */
11113
+ 200: Agent;
11114
+ };
11115
+ export type AgentsReplaceDraftResponse = AgentsReplaceDraftResponses[keyof AgentsReplaceDraftResponses];
11116
+ export type AgentsPublishData = {
11117
+ body: {
11118
+ revision: string;
11119
+ };
11120
+ path: {
11121
+ id: AgentId;
11122
+ };
11123
+ query?: never;
11124
+ url: "/v1/agents/{id}/publish";
11125
+ };
11126
+ export type AgentsPublishErrors = {
11127
+ /**
11128
+ * UnauthorizedError
11129
+ */
11130
+ 401: UnauthorizedError;
11131
+ /**
11132
+ * ForbiddenError
11133
+ */
11134
+ 403: ForbiddenError;
11135
+ /**
11136
+ * ResourceNotFoundError
11137
+ */
11138
+ 404: ResourceNotFoundError;
11139
+ /**
11140
+ * ConflictError
11141
+ */
11142
+ 409: ConflictError;
11143
+ /**
11144
+ * ValidationError
11145
+ */
11146
+ 422: ValidationError;
11147
+ /**
11148
+ * InternalError
11149
+ */
11150
+ 500: InternalError;
11151
+ /**
11152
+ * GatewayTimeoutError
11153
+ */
11154
+ 504: GatewayTimeoutError;
11155
+ };
11156
+ export type AgentsPublishError = AgentsPublishErrors[keyof AgentsPublishErrors];
11157
+ export type AgentsPublishResponses = {
11158
+ /**
11159
+ * PublishAgentResponse
11160
+ */
11161
+ 200: PublishAgentResponse;
11162
+ };
11163
+ export type AgentsPublishResponse = AgentsPublishResponses[keyof AgentsPublishResponses];
11164
+ export type AgentsListVersionsData = {
11165
+ body?: never;
11166
+ path: {
11167
+ id: AgentId;
11168
+ };
11169
+ query?: {
11170
+ limit?: string | null | undefined;
11171
+ cursor?: VersionCursor | null | undefined;
11172
+ };
11173
+ url: "/v1/agents/{id}/versions";
11174
+ };
11175
+ export type AgentsListVersionsErrors = {
11176
+ /**
11177
+ * UnauthorizedError
11178
+ */
11179
+ 401: UnauthorizedError;
11180
+ /**
11181
+ * ForbiddenError
11182
+ */
11183
+ 403: ForbiddenError;
11184
+ /**
11185
+ * ResourceNotFoundError
11186
+ */
11187
+ 404: ResourceNotFoundError;
11188
+ /**
11189
+ * ValidationError
11190
+ */
11191
+ 422: ValidationError;
11192
+ /**
11193
+ * InternalError
11194
+ */
11195
+ 500: InternalError;
11196
+ /**
11197
+ * GatewayTimeoutError
11198
+ */
11199
+ 504: GatewayTimeoutError;
11200
+ };
11201
+ export type AgentsListVersionsError = AgentsListVersionsErrors[keyof AgentsListVersionsErrors];
11202
+ export type AgentsListVersionsResponses = {
11203
+ /**
11204
+ * AgentVersionPage
11205
+ */
11206
+ 200: AgentVersionPage;
11207
+ };
11208
+ export type AgentsListVersionsResponse = AgentsListVersionsResponses[keyof AgentsListVersionsResponses];
11209
+ export type AgentsGetVersionData = {
11210
+ body?: never;
11211
+ path: {
11212
+ id: AgentId;
11213
+ version: string;
11214
+ };
11215
+ query?: never;
11216
+ url: "/v1/agents/{id}/versions/{version}";
11217
+ };
11218
+ export type AgentsGetVersionErrors = {
11219
+ /**
11220
+ * UnauthorizedError
11221
+ */
11222
+ 401: UnauthorizedError;
11223
+ /**
11224
+ * ForbiddenError
11225
+ */
11226
+ 403: ForbiddenError;
11227
+ /**
11228
+ * ResourceNotFoundError
11229
+ */
11230
+ 404: ResourceNotFoundError;
11231
+ /**
11232
+ * ValidationError
11233
+ */
11234
+ 422: ValidationError;
11235
+ /**
11236
+ * InternalError
11237
+ */
11238
+ 500: InternalError;
11239
+ /**
11240
+ * GatewayTimeoutError
11241
+ */
11242
+ 504: GatewayTimeoutError;
11243
+ };
11244
+ export type AgentsGetVersionError = AgentsGetVersionErrors[keyof AgentsGetVersionErrors];
11245
+ export type AgentsGetVersionResponses = {
11246
+ /**
11247
+ * AgentVersion
11248
+ */
11249
+ 200: AgentVersion;
11250
+ };
11251
+ export type AgentsGetVersionResponse = AgentsGetVersionResponses[keyof AgentsGetVersionResponses];
10732
11252
  export type SubscriptionsSubscribeData = {
10733
11253
  body: {
10734
11254
  /**
@@ -12826,6 +13346,10 @@ export type TemplatesUpdateData = {
12826
13346
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
12827
13347
  fromDefault?: TemplateFromDefault | null | null | undefined;
12828
13348
  replyToDefault?: Array<string> | null | null | undefined;
13349
+ /**
13350
+ * Engagement tracking for sends of this template: `opens` and `clicks`, each inherited from the domain and organization defaults when omitted. A send request's own `tracking` still wins. Null clears the template's default.
13351
+ */
13352
+ trackingDefault?: TemplateTrackingDefault | null | null | undefined;
12829
13353
  isActive?: boolean | null | undefined;
12830
13354
  /**
12831
13355
  * Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared.
@@ -15263,7 +15787,7 @@ export type WebhooksCreateData = {
15263
15787
  body: {
15264
15788
  name: string;
15265
15789
  url: string;
15266
- eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook">;
15790
+ eventTypes: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook">;
15267
15791
  channels?: Array<"email"> | null | undefined;
15268
15792
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | undefined;
15269
15793
  namespaceId?: NamespaceId | null | undefined;
@@ -15417,7 +15941,7 @@ export type WebhooksUpdateData = {
15417
15941
  body: {
15418
15942
  name?: string | null | undefined;
15419
15943
  url?: string | null | undefined;
15420
- eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "journey.webhook"> | null | undefined;
15944
+ eventTypes?: Array<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null | undefined;
15421
15945
  channels?: Array<"email"> | null | null | undefined;
15422
15946
  mailboxIds?: [MailboxId, ...Array<MailboxId>] | null | null | undefined;
15423
15947
  namespaceId?: NamespaceId | null | null | undefined;
@@ -16111,6 +16635,12 @@ export type OrganizationsGetUsageResponses = {
16111
16635
  usedAiCredits: number | null;
16112
16636
  overageAiCredits: number | null;
16113
16637
  overageAiCost: number | null;
16638
+ aiPackCredits: number | null;
16639
+ aiResetsAt: string | null;
16640
+ creditsResetsAt: string | null;
16641
+ standardGranted: number | null;
16642
+ standardRemaining: number | null;
16643
+ standardResetsAt: string | null;
16114
16644
  };
16115
16645
  };
16116
16646
  };