samva 0.15.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.
- package/README.md +2 -0
- package/dist/{categories-BGUBFdH9.js → categories-DV51kr2H.js} +5 -1
- package/dist/client/sdk.gen.d.ts +61 -47
- package/dist/client/types.gen.d.ts +265 -207
- package/dist/{client-CDg7zJs0.js → client-BMUew5Wp.js} +300 -232
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.d.ts +1 -0
- package/dist/effect/api-keys.js +5 -2
- package/dist/effect/attachments.js +1 -1
- package/dist/effect/brands.js +2 -2
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/categories.js +1 -1
- package/dist/effect/client.js +1 -1
- package/dist/effect/contact-groups.js +1 -1
- package/dist/effect/contacts.js +1 -1
- package/dist/effect/conversations.js +1 -1
- package/dist/effect/custom-fields.js +1 -1
- package/dist/effect/email.d.ts +0 -18
- package/dist/effect/email.js +3 -7
- package/dist/effect/extension-installations.js +1 -1
- package/dist/effect/extensions.js +1 -1
- package/dist/effect/feedback.js +2 -2
- package/dist/effect/generated-metadata.d.ts +4 -0
- package/dist/effect/generated.d.ts +1586 -1641
- package/dist/effect/index.d.ts +2 -1
- package/dist/effect/index.js +6 -5
- package/dist/effect/mailboxes.d.ts +144 -94
- package/dist/effect/mailboxes.js +2 -2
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.js +1 -1
- package/dist/effect/namespaces.js +1 -1
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/retry.js +1 -1
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/subscriptions.js +1 -1
- package/dist/effect/templates.js +2 -2
- package/dist/effect/unsubscribe-groups.js +1 -1
- package/dist/effect/webhooks.js +2 -2
- package/dist/effect/whoami.d.ts +46 -0
- package/dist/effect/whoami.js +9 -0
- package/dist/index.js +3 -3
- package/dist/{inline-attachments-UxLeyytJ.js → inline-attachments-Cegg6tTF.js} +2 -2
- package/dist/{mailboxes-BH_JPmOE.js → mailboxes-Thp5z0oX.js} +10 -8
- package/dist/{operation-BZ5Xov-x.js → operation-BTXjPrwf.js} +13 -15
- package/dist/promises/errors.gen.d.ts +12 -2
- package/dist/promises/index.d.ts +3 -1
- package/dist/promises/index.js +3 -3
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-Cd6Jamqk.js → promises-KrA2nSLg.js} +174 -88
- package/dist/service-map.d.ts +16 -15
- package/package.json +6 -2
package/dist/effect/mailboxes.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as MailboxEventStreamError } from "../mailbox-events-VKR4f3qq.js";
|
|
2
|
-
import { $ as sendMessage, A as listActions, B as listThreads, C as getMessage, D as getThread, E as getPolicy, F as listLabels, G as
|
|
3
|
-
export { MailboxEventStreamError, addThreadLabels, approveAction, cancelAction, copyMessageAttachment, create,
|
|
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 };
|
package/dist/effect/media.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
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,
|
package/dist/effect/messages.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
package/dist/effect/retry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { h as isRetryable } from "../categories-
|
|
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-
|
|
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-
|
|
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");
|
package/dist/effect/templates.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
3
|
-
import {
|
|
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-
|
|
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,
|
package/dist/effect/webhooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { n as make } from "../operation-
|
|
3
|
-
import {
|
|
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-
|
|
2
|
-
import { C as
|
|
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.
|
|
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-
|
|
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-
|
|
4
|
-
import { t as Service } from "./client-
|
|
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({
|
|
@@ -38,8 +38,8 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
|
38
38
|
cancelAction: () => cancelAction,
|
|
39
39
|
copyMessageAttachment: () => copyMessageAttachment,
|
|
40
40
|
create: () => create,
|
|
41
|
-
createAddress: () => createAddress,
|
|
42
41
|
createDraft: () => createDraft,
|
|
42
|
+
createEndpoint: () => createEndpoint,
|
|
43
43
|
createGrant: () => createGrant,
|
|
44
44
|
createLabel: () => createLabel,
|
|
45
45
|
createNote: () => createNote,
|
|
@@ -77,7 +77,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
|
77
77
|
pause: () => pause,
|
|
78
78
|
releaseMessage: () => releaseMessage,
|
|
79
79
|
remove: () => remove,
|
|
80
|
-
|
|
80
|
+
removeEndpoint: () => removeEndpoint,
|
|
81
81
|
removeThreadLabels: () => removeThreadLabels,
|
|
82
82
|
reply: () => reply,
|
|
83
83
|
replyAll: () => replyAll,
|
|
@@ -88,6 +88,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
|
88
88
|
sendMessage: () => sendMessage,
|
|
89
89
|
update: () => update,
|
|
90
90
|
updateDraft: () => updateDraft,
|
|
91
|
+
updateEndpoint: () => updateEndpoint,
|
|
91
92
|
updateGrant: () => updateGrant,
|
|
92
93
|
updateLabel: () => updateLabel,
|
|
93
94
|
updateNote: () => updateNote,
|
|
@@ -99,8 +100,9 @@ const create = make("mailboxesCreate");
|
|
|
99
100
|
const get = make("mailboxesGet");
|
|
100
101
|
const update = make("mailboxesUpdate");
|
|
101
102
|
const remove = make("mailboxesRemove");
|
|
102
|
-
const
|
|
103
|
-
const
|
|
103
|
+
const createEndpoint = make("mailboxesCreateEndpoint");
|
|
104
|
+
const updateEndpoint = make("mailboxesUpdateEndpoint");
|
|
105
|
+
const removeEndpoint = make("mailboxesRemoveEndpoint");
|
|
104
106
|
const pause = make("mailboxesPause");
|
|
105
107
|
const resume = make("mailboxesResume");
|
|
106
108
|
const getAgentActivity = make("mailboxesGetAgentActivity");
|
|
@@ -154,6 +156,6 @@ const approveAction = make("mailboxesApproveAction");
|
|
|
154
156
|
const denyAction = make("mailboxesDenyAction");
|
|
155
157
|
const listEvents = make("mailboxesListEvents");
|
|
156
158
|
//#endregion
|
|
157
|
-
export { sendMessage as $, listActions as A, listThreads as B, getMessage as C, getThread as D, getPolicy as E, listLabels as F,
|
|
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 };
|
|
158
160
|
|
|
159
|
-
//# sourceMappingURL=mailboxes-
|
|
161
|
+
//# sourceMappingURL=mailboxes-Thp5z0oX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as withUploadedAttachments, n as mediaCreateBody, r as planInlineUploads } from "./inline-attachments-
|
|
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 {
|
|
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,13 +699,17 @@ const SDK_OPERATION_CALLS = {
|
|
|
706
699
|
kind: "path",
|
|
707
700
|
paths: ["id"]
|
|
708
701
|
},
|
|
709
|
-
|
|
702
|
+
mailboxesCreateEndpoint: {
|
|
710
703
|
kind: "pathPayload",
|
|
711
704
|
paths: ["id"]
|
|
712
705
|
},
|
|
713
|
-
|
|
706
|
+
mailboxesUpdateEndpoint: {
|
|
707
|
+
kind: "pathPayload",
|
|
708
|
+
paths: ["id", "endpointId"]
|
|
709
|
+
},
|
|
710
|
+
mailboxesRemoveEndpoint: {
|
|
714
711
|
kind: "path",
|
|
715
|
-
paths: ["id", "
|
|
712
|
+
paths: ["id", "endpointId"]
|
|
716
713
|
},
|
|
717
714
|
mailboxesPause: {
|
|
718
715
|
kind: "path",
|
|
@@ -1081,7 +1078,8 @@ const MODULE_NAMES = {
|
|
|
1081
1078
|
scheduledMessages: "ScheduledMessages",
|
|
1082
1079
|
templates: "Templates",
|
|
1083
1080
|
unsubscribe: "UnsubscribeGroups",
|
|
1084
|
-
webhooks: "Webhooks"
|
|
1081
|
+
webhooks: "Webhooks",
|
|
1082
|
+
whoami: "Whoami"
|
|
1085
1083
|
};
|
|
1086
1084
|
const traceName = (operationName) => {
|
|
1087
1085
|
for (const [prefix, moduleName] of Object.entries(MODULE_NAMES)) {
|
|
@@ -1211,4 +1209,4 @@ const addEmailSender = Effect.fn("Email.addSender")(function* (input, options) {
|
|
|
1211
1209
|
//#endregion
|
|
1212
1210
|
export { sendMessage as i, make as n, sendEmail as r, addEmailSender as t };
|
|
1213
1211
|
|
|
1214
|
-
//# sourceMappingURL=operation-
|
|
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 {};
|
package/dist/promises/index.d.ts
CHANGED
|
@@ -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>;
|
package/dist/promises/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MediaUploadError } from "../inline-attachments-
|
|
2
|
-
import { C as
|
|
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 };
|