samva 0.14.0 → 0.16.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 (52) hide show
  1. package/README.md +6 -0
  2. package/dist/{categories-BGUBFdH9.js → categories-DV51kr2H.js} +5 -1
  3. package/dist/client/sdk.gen.d.ts +74 -45
  4. package/dist/client/types.gen.d.ts +356 -212
  5. package/dist/{client-CZjhOKPM.js → client-BMUew5Wp.js} +307 -198
  6. package/dist/effect/analytics.js +1 -1
  7. package/dist/effect/api-keys.d.ts +1 -0
  8. package/dist/effect/api-keys.js +5 -2
  9. package/dist/effect/attachments.js +1 -1
  10. package/dist/effect/brands.js +2 -2
  11. package/dist/effect/campaigns.js +1 -1
  12. package/dist/effect/categories.js +1 -1
  13. package/dist/effect/client.js +1 -1
  14. package/dist/effect/contact-groups.js +1 -1
  15. package/dist/effect/contacts.js +1 -1
  16. package/dist/effect/conversations.js +1 -1
  17. package/dist/effect/custom-fields.js +1 -1
  18. package/dist/effect/email.d.ts +0 -18
  19. package/dist/effect/email.js +3 -7
  20. package/dist/effect/extension-installations.js +1 -1
  21. package/dist/effect/extensions.js +1 -1
  22. package/dist/effect/feedback.js +2 -2
  23. package/dist/effect/generated-metadata.d.ts +4 -0
  24. package/dist/effect/generated.d.ts +1477 -1250
  25. package/dist/effect/index.d.ts +2 -1
  26. package/dist/effect/index.js +6 -5
  27. package/dist/effect/mailboxes.d.ts +191 -92
  28. package/dist/effect/mailboxes.js +2 -2
  29. package/dist/effect/media.js +1 -1
  30. package/dist/effect/messages.js +1 -1
  31. package/dist/effect/namespaces.js +1 -1
  32. package/dist/effect/operations.js +1 -1
  33. package/dist/effect/organizations.js +1 -1
  34. package/dist/effect/retry.js +1 -1
  35. package/dist/effect/scheduled-messages.js +1 -1
  36. package/dist/effect/subscriptions.js +1 -1
  37. package/dist/effect/templates.js +2 -2
  38. package/dist/effect/unsubscribe-groups.js +1 -1
  39. package/dist/effect/webhooks.js +2 -2
  40. package/dist/effect/whoami.d.ts +46 -0
  41. package/dist/effect/whoami.js +9 -0
  42. package/dist/index.js +3 -3
  43. package/dist/{inline-attachments-BrNnSMF2.js → inline-attachments-Cegg6tTF.js} +2 -2
  44. package/dist/{mailboxes-DT02zP7q.js → mailboxes-Thp5z0oX.js} +10 -4
  45. package/dist/{operation-g8nAzmIM.js → operation-BTXjPrwf.js} +18 -12
  46. package/dist/promises/errors.gen.d.ts +12 -2
  47. package/dist/promises/index.d.ts +3 -1
  48. package/dist/promises/index.js +3 -3
  49. package/dist/promises/types.gen.d.ts +1 -1
  50. package/dist/{promises-BFRKhpSS.js → promises-KrA2nSLg.js} +224 -84
  51. package/dist/service-map.d.ts +21 -10
  52. package/package.json +6 -2
@@ -1,3 +1,3 @@
1
1
  import { n as MailboxEventStreamError } from "../mailbox-events-VKR4f3qq.js";
2
- import { $ as updateDraft, A as listDrafts, C as getMessageAttachment, D as getThreadContent, E as getThread, F as listPolicies, G as reply, H as releaseMessage, I as listQuarantine, J as retryAction, K as replyAll, L as listThreadMessages, M as listFolders, N as listGrants, O as list, P as listLabels, Q as update, R as listThreadNotes, S as getMessage, T as getPolicy, U as remove, V as pause, W as removeThreadLabels, X as sendDraft, Y as revokeGrant, Z as sendMessage, _ as forward, a as create, at as events, b as getAgentActivity, c as createLabel, d as deleteDraft, et as updateGrant, f as deleteLabel, g as discardMessage, h as denyAction, i as copyMessageAttachment, it as updateThread, j as listEvents, k as listActions, l as createNote, m as deletePolicy, n as approveAction, nt as updateNote, o as createDraft, p as deleteNote, q as resume, r as cancelAction, rt as updatePolicy, s as createGrant, t as addThreadLabels, tt as updateLabel, u as createPolicy, v as get, w as getMessageRaw, x as getDraft, y as getAction, z as listThreads } from "../mailboxes-DT02zP7q.js";
3
- export { MailboxEventStreamError, addThreadLabels, approveAction, cancelAction, copyMessageAttachment, create, createDraft, createGrant, createLabel, createNote, createPolicy, deleteDraft, deleteLabel, deleteNote, deletePolicy, denyAction, discardMessage, events, forward, get, getAction, getAgentActivity, getDraft, getMessage, getMessageAttachment, getMessageRaw, getPolicy, getThread, getThreadContent, list, listActions, listDrafts, listEvents, listFolders, listGrants, listLabels, listPolicies, listQuarantine, listThreadMessages, listThreadNotes, listThreads, pause, releaseMessage, remove, removeThreadLabels, reply, replyAll, resume, retryAction, revokeGrant, sendDraft, sendMessage, update, updateDraft, updateGrant, updateLabel, updateNote, updatePolicy, updateThread };
2
+ import { $ as sendMessage, A as listActions, B as listThreads, C as getMessage, D as getThread, E as getPolicy, F as listLabels, G as removeEndpoint, H as pause, I as listPolicies, J as replyAll, K as removeThreadLabels, L as listQuarantine, M as listEvents, N as listFolders, O as getThreadContent, P as listGrants, Q as sendDraft, R as listThreadMessages, S as getDraft, T as getMessageRaw, U as releaseMessage, W as remove, X as retryAction, Y as resume, Z as revokeGrant, _ as discardMessage, a as create, at as updateNote, b as getAction, c as createGrant, ct as events, d as createPolicy, et as update, f as deleteDraft, g as denyAction, h as deletePolicy, i as copyMessageAttachment, it as updateLabel, j as listDrafts, k as list, l as createLabel, m as deleteNote, n as approveAction, nt as updateEndpoint, o as createDraft, ot as updatePolicy, p as deleteLabel, q as reply, r as cancelAction, rt as updateGrant, s as createEndpoint, st as updateThread, t as addThreadLabels, tt as updateDraft, u as createNote, v as forward, w as getMessageAttachment, x as getAgentActivity, y as get, z as listThreadNotes } from "../mailboxes-Thp5z0oX.js";
3
+ export { MailboxEventStreamError, addThreadLabels, approveAction, cancelAction, copyMessageAttachment, create, createDraft, createEndpoint, createGrant, createLabel, createNote, createPolicy, deleteDraft, deleteLabel, deleteNote, deletePolicy, denyAction, discardMessage, events, forward, get, getAction, getAgentActivity, getDraft, getMessage, getMessageAttachment, getMessageRaw, getPolicy, getThread, getThreadContent, list, listActions, listDrafts, listEvents, listFolders, listGrants, listLabels, listPolicies, listQuarantine, listThreadMessages, listThreadNotes, listThreads, pause, releaseMessage, remove, removeEndpoint, removeThreadLabels, reply, replyAll, resume, retryAction, revokeGrant, sendDraft, sendMessage, update, updateDraft, updateEndpoint, updateGrant, updateLabel, updateNote, updatePolicy, updateThread };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/media.ts
4
4
  var media_exports = /* @__PURE__ */ __exportAll({
5
5
  complete: () => complete,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { i as sendMessage, n as make } from "../operation-g8nAzmIM.js";
2
+ import { i as sendMessage, n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/messages.ts
4
4
  var messages_exports = /* @__PURE__ */ __exportAll({
5
5
  get: () => get,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/namespaces.ts
4
4
  var namespaces_exports = /* @__PURE__ */ __exportAll({
5
5
  create: () => create,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/operations.ts
4
4
  var operations_exports = /* @__PURE__ */ __exportAll({
5
5
  get: () => get,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/organizations.ts
4
4
  var organizations_exports = /* @__PURE__ */ __exportAll({
5
5
  create: () => create,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { h as isRetryable } from "../categories-BGUBFdH9.js";
2
+ import { h as isRetryable } from "../categories-DV51kr2H.js";
3
3
  import { Context, Duration, Effect, Layer, Option, Random, Schedule } from "effect";
4
4
  import * as Predicate$1 from "effect/Predicate";
5
5
  //#region src/effect/retry.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/scheduled-messages.ts
4
4
  var scheduled_messages_exports = /* @__PURE__ */ __exportAll({
5
5
  cancel: () => cancel,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/subscriptions.ts
4
4
  var subscriptions_exports = /* @__PURE__ */ __exportAll({ subscribe: () => subscribe });
5
5
  const subscribe = make("subscriptionsSubscribe");
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
3
- import { N as UpdateTemplatePayload, d as CreateTemplatePayload } from "../client-CZjhOKPM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
+ import { I as UpdateTemplatePayload, p as CreateTemplatePayload } from "../client-BMUew5Wp.js";
4
4
  //#region src/effect/templates.ts
5
5
  var templates_exports = /* @__PURE__ */ __exportAll({
6
6
  CreatePayload: () => CreateTemplatePayload,
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
3
  //#region src/effect/unsubscribe-groups.ts
4
4
  var unsubscribe_groups_exports = /* @__PURE__ */ __exportAll({
5
5
  addEmails: () => addEmails,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-g8nAzmIM.js";
3
- import { P as UpdateWebhookPayload, f as CreateWebhookPayload, k as TestWebhookPayload } from "../client-CZjhOKPM.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
+ import { L as UpdateWebhookPayload, M as TestWebhookPayload, m as CreateWebhookPayload } from "../client-BMUew5Wp.js";
4
4
  //#region src/effect/webhooks.ts
5
5
  var webhooks_exports = /* @__PURE__ */ __exportAll({
6
6
  CreatePayload: () => CreateWebhookPayload,
@@ -0,0 +1,46 @@
1
+ export declare const get: (_?: never) => import("effect/Effect").Effect<{
2
+ readonly organization: {
3
+ readonly id: string & import("effect/Brand").Brand<"OrganizationId">;
4
+ readonly slug: string;
5
+ readonly name: string;
6
+ };
7
+ readonly credential: {
8
+ readonly type: "apiKey";
9
+ readonly id: string;
10
+ readonly name: string;
11
+ readonly start: string | null;
12
+ readonly access: {
13
+ readonly mode: "full";
14
+ } | {
15
+ readonly mode: "restricted";
16
+ readonly resources: {
17
+ readonly messages?: "read" | "write" | null;
18
+ readonly email?: "read" | "write" | null;
19
+ readonly domains?: "read" | "write" | null;
20
+ readonly phoneNumbers?: "read" | "write" | null;
21
+ readonly contacts?: "read" | "write" | null;
22
+ readonly conversations?: "read" | "write" | null;
23
+ readonly templates?: "read" | "write" | null;
24
+ readonly webhooks?: "read" | "write" | null;
25
+ readonly apiKeys?: "read" | "write" | null;
26
+ readonly organization?: "read" | "write" | null;
27
+ readonly billing?: "read" | "write" | null;
28
+ readonly analytics?: "read" | "write" | null;
29
+ };
30
+ readonly mailboxes?: {
31
+ readonly permissions: readonly ["quarantine.read" | "read" | "send" | "update", ...("quarantine.read" | "read" | "send" | "update")[]];
32
+ readonly mailboxIds?: readonly [string & import("effect/Brand").Brand<"MailboxId">, ...(string & import("effect/Brand").Brand<"MailboxId">)[]] | null;
33
+ readonly sendMode?: "approval" | "send" | null;
34
+ } | null;
35
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
36
+ };
37
+ } | {
38
+ readonly type: "user";
39
+ readonly user: {
40
+ readonly id: string;
41
+ readonly name: string;
42
+ readonly email: string;
43
+ };
44
+ readonly role: "admin" | "member" | "owner";
45
+ };
46
+ }, import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
@@ -0,0 +1,9 @@
1
+ import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
+ import { n as make } from "../operation-BTXjPrwf.js";
3
+ //#region src/effect/whoami.ts
4
+ var whoami_exports = /* @__PURE__ */ __exportAll({ get: () => get });
5
+ const get = make("whoamiGet");
6
+ //#endregion
7
+ export { get, whoami_exports as t };
8
+
9
+ //# sourceMappingURL=whoami.js.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as MediaUploadError } from "./inline-attachments-BrNnSMF2.js";
2
- import { C as UnauthorizedError, S as SenderNotReadyError, T as fromApiError, _ as PaymentRequiredError, a as CampaignFooterRequiredError, b as SamvaApiError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as OnboardingReviewRequiredError, h as MailboxSendRefusedError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxSendConflictError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as RateLimitedError, w as ValidationError, x as SamvaTransportError, y as ResourceNotFoundError } from "./promises-BFRKhpSS.js";
1
+ import { t as MediaUploadError } from "./inline-attachments-Cegg6tTF.js";
2
+ import { C as SenderNotReadyError, E as fromApiError, S as SamvaTransportError, T as ValidationError, _ as OnboardingReviewRequiredError, a as CampaignFooterRequiredError, b as ResourceNotFoundError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as MailboxSendRefusedError, h as MailboxSendConflictError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxChannelUnsupportedError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as PaymentRequiredError, w as UnauthorizedError, x as SamvaApiError, y as RateLimitedError } from "./promises-KrA2nSLg.js";
3
3
  import { n as MailboxEventStreamError, t as MailboxEventStream } from "./mailbox-events-VKR4f3qq.js";
4
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
4
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxChannelUnsupportedError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
@@ -1,6 +1,6 @@
1
1
  //#endregion
2
2
  //#region src/client-attribution.ts
3
- const SDK_VERSION = "0.14.0";
3
+ const SDK_VERSION = "0.16.0";
4
4
  const CLIENT_ATTRIBUTION_HEADER = "x-samva-client";
5
5
  const clientAttribution = (surface) => `${surface}/${SDK_VERSION}`;
6
6
  /** A failed upload of an attachment's bytes to its presigned media URL. */
@@ -118,4 +118,4 @@ const withUploadedAttachments = (payload, uploaded) => {
118
118
  //#endregion
119
119
  export { withUploadedAttachments as a, uploadContentType as i, mediaCreateBody as n, CLIENT_ATTRIBUTION_HEADER as o, planInlineUploads as r, clientAttribution as s, MediaUploadError as t };
120
120
 
121
- //# sourceMappingURL=inline-attachments-BrNnSMF2.js.map
121
+ //# sourceMappingURL=inline-attachments-Cegg6tTF.js.map
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { n as MailboxEventStreamError, t as MailboxEventStream } from "./mailbox-events-VKR4f3qq.js";
3
- import { n as make } from "./operation-g8nAzmIM.js";
4
- import { t as Service } from "./client-CZjhOKPM.js";
3
+ import { n as make } from "./operation-BTXjPrwf.js";
4
+ import { t as Service } from "./client-BMUew5Wp.js";
5
5
  import { Cause, Effect, Exit, Stream } from "effect";
6
6
  //#region src/effect/internal/mailbox-events.ts
7
7
  const toStreamError = (cause) => cause instanceof MailboxEventStreamError ? cause : new MailboxEventStreamError({
@@ -39,6 +39,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
39
39
  copyMessageAttachment: () => copyMessageAttachment,
40
40
  create: () => create,
41
41
  createDraft: () => createDraft,
42
+ createEndpoint: () => createEndpoint,
42
43
  createGrant: () => createGrant,
43
44
  createLabel: () => createLabel,
44
45
  createNote: () => createNote,
@@ -76,6 +77,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
76
77
  pause: () => pause,
77
78
  releaseMessage: () => releaseMessage,
78
79
  remove: () => remove,
80
+ removeEndpoint: () => removeEndpoint,
79
81
  removeThreadLabels: () => removeThreadLabels,
80
82
  reply: () => reply,
81
83
  replyAll: () => replyAll,
@@ -86,6 +88,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
86
88
  sendMessage: () => sendMessage,
87
89
  update: () => update,
88
90
  updateDraft: () => updateDraft,
91
+ updateEndpoint: () => updateEndpoint,
89
92
  updateGrant: () => updateGrant,
90
93
  updateLabel: () => updateLabel,
91
94
  updateNote: () => updateNote,
@@ -97,6 +100,9 @@ const create = make("mailboxesCreate");
97
100
  const get = make("mailboxesGet");
98
101
  const update = make("mailboxesUpdate");
99
102
  const remove = make("mailboxesRemove");
103
+ const createEndpoint = make("mailboxesCreateEndpoint");
104
+ const updateEndpoint = make("mailboxesUpdateEndpoint");
105
+ const removeEndpoint = make("mailboxesRemoveEndpoint");
100
106
  const pause = make("mailboxesPause");
101
107
  const resume = make("mailboxesResume");
102
108
  const getAgentActivity = make("mailboxesGetAgentActivity");
@@ -150,6 +156,6 @@ const approveAction = make("mailboxesApproveAction");
150
156
  const denyAction = make("mailboxesDenyAction");
151
157
  const listEvents = make("mailboxesListEvents");
152
158
  //#endregion
153
- export { updateDraft as $, listDrafts as A, mailboxes_exports as B, getMessageAttachment as C, getThreadContent as D, getThread as E, listPolicies as F, reply as G, releaseMessage as H, listQuarantine as I, retryAction as J, replyAll as K, listThreadMessages as L, listFolders as M, listGrants as N, list as O, listLabels as P, update as Q, listThreadNotes as R, getMessage as S, getPolicy as T, remove as U, pause as V, removeThreadLabels as W, sendDraft as X, revokeGrant as Y, sendMessage as Z, forward as _, create as a, events as at, getAgentActivity as b, createLabel as c, deleteDraft as d, updateGrant as et, deleteLabel as f, discardMessage as g, denyAction as h, copyMessageAttachment as i, updateThread as it, listEvents as j, listActions as k, createNote as l, deletePolicy as m, approveAction as n, updateNote as nt, createDraft as o, deleteNote as p, resume as q, cancelAction as r, updatePolicy as rt, createGrant as s, addThreadLabels as t, updateLabel as tt, createPolicy as u, get as v, getMessageRaw as w, getDraft as x, getAction as y, listThreads as z };
159
+ export { sendMessage as $, listActions as A, listThreads as B, getMessage as C, getThread as D, getPolicy as E, listLabels as F, removeEndpoint as G, pause as H, listPolicies as I, replyAll as J, removeThreadLabels as K, listQuarantine as L, listEvents as M, listFolders as N, getThreadContent as O, listGrants as P, sendDraft as Q, listThreadMessages as R, getDraft as S, getMessageRaw as T, releaseMessage as U, mailboxes_exports as V, remove as W, retryAction as X, resume as Y, revokeGrant as Z, discardMessage as _, create as a, updateNote as at, getAction as b, createGrant as c, events as ct, createPolicy as d, update as et, deleteDraft as f, denyAction as g, deletePolicy as h, copyMessageAttachment as i, updateLabel as it, listDrafts as j, list as k, createLabel as l, deleteNote as m, approveAction as n, updateEndpoint as nt, createDraft as o, updatePolicy as ot, deleteLabel as p, reply as q, cancelAction as r, updateGrant as rt, createEndpoint as s, updateThread as st, addThreadLabels as t, updateDraft as tt, createNote as u, forward as v, getMessageAttachment as w, getAgentActivity as x, get as y, listThreadNotes as z };
154
160
 
155
- //# sourceMappingURL=mailboxes-DT02zP7q.js.map
161
+ //# sourceMappingURL=mailboxes-Thp5z0oX.js.map
@@ -1,6 +1,6 @@
1
- import { a as withUploadedAttachments, n as mediaCreateBody, r as planInlineUploads } from "./inline-attachments-BrNnSMF2.js";
1
+ import { a as withUploadedAttachments, n as mediaCreateBody, r as planInlineUploads } from "./inline-attachments-Cegg6tTF.js";
2
2
  import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-B79uJIeb.js";
3
- import { E as SamvaApi, t as Service } from "./client-CZjhOKPM.js";
3
+ import { k as SamvaApi, t as Service } from "./client-BMUew5Wp.js";
4
4
  import { generateIdempotencyKey, withRetry } from "./effect/retry.js";
5
5
  import { Effect, Option, Predicate, Stream } from "effect";
6
6
  //#region src/service-map.ts
@@ -170,14 +170,6 @@ const SDK_OPERATION_CALLS = {
170
170
  kind: "path",
171
171
  paths: ["id"]
172
172
  },
173
- emailSetDomainDefaultSender: {
174
- kind: "pathPayload",
175
- paths: ["id"]
176
- },
177
- emailClearDomainDefaultSender: {
178
- kind: "path",
179
- paths: ["id"]
180
- },
181
173
  emailUpdateDomainConfig: {
182
174
  kind: "pathPayload",
183
175
  paths: ["id"]
@@ -536,6 +528,7 @@ const SDK_OPERATION_CALLS = {
536
528
  kind: "path",
537
529
  paths: ["id", "inputContractId"]
538
530
  },
531
+ whoamiGet: { kind: "none" },
539
532
  webhooksList: { kind: "params" },
540
533
  webhooksCreate: { kind: "payload" },
541
534
  webhooksGet: {
@@ -706,6 +699,18 @@ const SDK_OPERATION_CALLS = {
706
699
  kind: "path",
707
700
  paths: ["id"]
708
701
  },
702
+ mailboxesCreateEndpoint: {
703
+ kind: "pathPayload",
704
+ paths: ["id"]
705
+ },
706
+ mailboxesUpdateEndpoint: {
707
+ kind: "pathPayload",
708
+ paths: ["id", "endpointId"]
709
+ },
710
+ mailboxesRemoveEndpoint: {
711
+ kind: "path",
712
+ paths: ["id", "endpointId"]
713
+ },
709
714
  mailboxesPause: {
710
715
  kind: "path",
711
716
  paths: ["id"]
@@ -1073,7 +1078,8 @@ const MODULE_NAMES = {
1073
1078
  scheduledMessages: "ScheduledMessages",
1074
1079
  templates: "Templates",
1075
1080
  unsubscribe: "UnsubscribeGroups",
1076
- webhooks: "Webhooks"
1081
+ webhooks: "Webhooks",
1082
+ whoami: "Whoami"
1077
1083
  };
1078
1084
  const traceName = (operationName) => {
1079
1085
  for (const [prefix, moduleName] of Object.entries(MODULE_NAMES)) {
@@ -1203,4 +1209,4 @@ const addEmailSender = Effect.fn("Email.addSender")(function* (input, options) {
1203
1209
  //#endregion
1204
1210
  export { sendMessage as i, make as n, sendEmail as r, addEmailSender as t };
1205
1211
 
1206
- //# sourceMappingURL=operation-g8nAzmIM.js.map
1212
+ //# sourceMappingURL=operation-BTXjPrwf.js.map
@@ -1,4 +1,4 @@
1
- export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "UnauthorizedError" | "ValidationError";
1
+ export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "GatewayTimeoutError" | "InternalError" | "MailboxChannelUnsupportedError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "UnauthorizedError" | "ValidationError";
2
2
  export interface SamvaApiErrorContext {
3
3
  readonly request?: Request | undefined;
4
4
  readonly response?: Response | undefined;
@@ -132,6 +132,16 @@ export declare class InternalError extends SamvaApiError<"InternalError"> {
132
132
  readonly _tag: "InternalError";
133
133
  constructor(payload: Omit<InternalErrorPayload, "_tag">, context?: SamvaApiErrorContext);
134
134
  }
135
+ type MailboxChannelUnsupportedErrorPayload = {
136
+ readonly _tag: "MailboxChannelUnsupportedError";
137
+ readonly channel: string;
138
+ readonly message: string;
139
+ };
140
+ export declare class MailboxChannelUnsupportedError extends SamvaApiError<"MailboxChannelUnsupportedError"> {
141
+ readonly _tag: "MailboxChannelUnsupportedError";
142
+ readonly "channel": string;
143
+ constructor(payload: Omit<MailboxChannelUnsupportedErrorPayload, "_tag">, context?: SamvaApiErrorContext);
144
+ }
135
145
  type MailboxSendConflictErrorPayload = {
136
146
  readonly _tag: "MailboxSendConflictError";
137
147
  readonly id: string;
@@ -240,7 +250,7 @@ export declare class ValidationError extends SamvaApiError<"ValidationError"> {
240
250
  readonly "fields"?: Record<string, Array<string>> | null;
241
251
  constructor(payload: Omit<ValidationErrorPayload, "_tag">, context?: SamvaApiErrorContext);
242
252
  }
243
- export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | UnauthorizedError | ValidationError;
253
+ export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | GatewayTimeoutError | InternalError | MailboxChannelUnsupportedError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | UnauthorizedError | ValidationError;
244
254
  /** Convert a decoded error payload into its generated JavaScript error class. */
245
255
  export declare function fromApiError(error: unknown, context?: SamvaApiErrorContext): AnySamvaApiError | SamvaTransportError;
246
256
  export {};
@@ -27,7 +27,7 @@
27
27
  * ```
28
28
  */
29
29
  import { type Client, type Config } from "../client/client";
30
- import { Analytics as analytics, ApiKeys as apiKeys, Attachments as attachments, Brands as brands, Campaigns as campaigns, ContactGroups as contactGroups, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Email as email, ExtensionInstallations as extensionInstallations, Extensions as extensions, Feedback as feedback, Mailboxes as mailboxes, Media as media, Messages as messages, Namespaces as namespaces, Operations as operations, Organizations as organizations, ScheduledMessages as scheduledMessages, Subscriptions as subscriptions, Templates as templates, Unsubscribe as unsubscribeGroups, Webhooks as webhooks } from "../client/sdk.gen";
30
+ import { Analytics as analytics, ApiKeys as apiKeys, Attachments as attachments, Brands as brands, Campaigns as campaigns, ContactGroups as contactGroups, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Email as email, ExtensionInstallations as extensionInstallations, Extensions as extensions, Feedback as feedback, Mailboxes as mailboxes, Media as media, Messages as messages, Namespaces as namespaces, Operations as operations, Organizations as organizations, ScheduledMessages as scheduledMessages, Subscriptions as subscriptions, Templates as templates, Unsubscribe as unsubscribeGroups, Webhooks as webhooks, Whoami as whoami } from "../client/sdk.gen";
31
31
  import type { MessagesSendData } from "../client/types.gen";
32
32
  import { MailboxEventStream, type MailboxEventStreamOptions } from "../mailbox-events";
33
33
  export * from "./errors.gen";
@@ -139,6 +139,7 @@ export interface SamvaRawClient {
139
139
  readonly unsubscribeGroups: typeof unsubscribeGroups;
140
140
  readonly analytics: typeof analytics;
141
141
  readonly feedback: typeof feedback;
142
+ readonly whoami: typeof whoami;
142
143
  readonly mailboxes: typeof mailboxes;
143
144
  readonly namespaces: typeof namespaces;
144
145
  readonly extensions: typeof extensions;
@@ -175,6 +176,7 @@ export interface SamvaClient {
175
176
  readonly unsubscribeGroups: DirectService<typeof unsubscribeGroups>;
176
177
  readonly analytics: DirectService<typeof analytics>;
177
178
  readonly feedback: DirectService<typeof feedback>;
179
+ readonly whoami: DirectService<typeof whoami>;
178
180
  readonly mailboxes: PromiseMailboxesService;
179
181
  readonly namespaces: DirectService<typeof namespaces>;
180
182
  readonly extensions: DirectService<typeof extensions>;
@@ -1,4 +1,4 @@
1
- import { t as MediaUploadError } from "../inline-attachments-BrNnSMF2.js";
2
- import { C as UnauthorizedError, S as SenderNotReadyError, T as fromApiError, _ as PaymentRequiredError, a as CampaignFooterRequiredError, b as SamvaApiError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as OnboardingReviewRequiredError, h as MailboxSendRefusedError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxSendConflictError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as RateLimitedError, w as ValidationError, x as SamvaTransportError, y as ResourceNotFoundError } from "../promises-BFRKhpSS.js";
1
+ import { t as MediaUploadError } from "../inline-attachments-Cegg6tTF.js";
2
+ import { C as SenderNotReadyError, E as fromApiError, S as SamvaTransportError, T as ValidationError, _ as OnboardingReviewRequiredError, a as CampaignFooterRequiredError, b as ResourceNotFoundError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as MailboxSendRefusedError, h as MailboxSendConflictError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxChannelUnsupportedError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as PaymentRequiredError, w as UnauthorizedError, x as SamvaApiError, y as RateLimitedError } from "../promises-KrA2nSLg.js";
3
3
  import { n as MailboxEventStreamError, t as MailboxEventStream } from "../mailbox-events-VKR4f3qq.js";
4
- export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
4
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxChannelUnsupportedError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };