samva 0.9.0 → 0.11.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 +60 -10
- package/dist/client/sdk.gen.d.ts +1106 -215
- package/dist/client/types.gen.d.ts +11554 -6343
- package/dist/{client-DB7zbTti.js → client-8YXjfsVc.js} +6492 -3068
- package/dist/{client-attribution-vK1yjEdG.js → client-attribution-Ct2FKITg.js} +2 -2
- package/dist/effect/analytics.d.ts +18 -18
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.d.ts +100 -44
- package/dist/effect/api-keys.js +2 -4
- package/dist/effect/attachments.d.ts +5 -6
- package/dist/effect/attachments.js +1 -1
- package/dist/effect/brands.d.ts +6 -6
- package/dist/effect/brands.js +2 -2
- package/dist/effect/campaigns.d.ts +33 -63
- package/dist/effect/campaigns.js +1 -1
- package/dist/effect/client.js +1 -1
- package/dist/effect/contact-groups.d.ts +33 -50
- package/dist/effect/contact-groups.js +1 -1
- package/dist/effect/contacts.d.ts +327 -729
- package/dist/effect/contacts.js +10 -2
- package/dist/effect/conversations.d.ts +579 -1134
- package/dist/effect/conversations.js +14 -2
- package/dist/effect/custom-fields.d.ts +5 -55
- package/dist/effect/custom-fields.js +1 -1
- package/dist/effect/email.d.ts +283 -317
- package/dist/effect/email.js +5 -3
- package/dist/effect/extension-installations.d.ts +218 -0
- package/dist/effect/extension-installations.js +25 -0
- package/dist/effect/extensions.d.ts +192 -0
- package/dist/effect/extensions.js +19 -0
- package/dist/effect/feedback.d.ts +12 -0
- package/dist/effect/feedback.js +13 -0
- package/dist/effect/generated.d.ts +31383 -14386
- package/dist/effect/index.d.ts +6 -1
- package/dist/effect/index.js +7 -2
- package/dist/effect/internal/client.d.ts +5 -2
- package/dist/effect/internal/mailbox-events.d.ts +11 -0
- package/dist/effect/internal/operation.d.ts +23 -377
- package/dist/effect/mailboxes.d.ts +1676 -0
- package/dist/effect/mailboxes.js +3 -0
- package/dist/effect/media.d.ts +9 -9
- package/dist/effect/media.js +1 -1
- package/dist/effect/messages.d.ts +173 -940
- package/dist/effect/messages.js +6 -2
- package/dist/effect/namespaces.d.ts +82 -0
- package/dist/effect/namespaces.js +19 -0
- package/dist/effect/operations.d.ts +68 -12
- package/dist/effect/operations.js +1 -1
- package/dist/effect/organizations.d.ts +8 -7
- package/dist/effect/organizations.js +1 -1
- package/dist/effect/pagination.d.ts +16 -21
- package/dist/effect/scheduled-messages.d.ts +15 -25
- package/dist/effect/scheduled-messages.js +1 -1
- package/dist/effect/templates.d.ts +213 -290
- package/dist/effect/templates.js +2 -2
- package/dist/effect/unsubscribe-groups.d.ts +22 -76
- package/dist/effect/unsubscribe-groups.js +1 -1
- package/dist/effect/webhooks.d.ts +119 -41
- package/dist/effect/webhooks.js +2 -2
- package/dist/index.js +3 -2
- package/dist/mailbox-events-CcWm8lO4.js +617 -0
- package/dist/mailbox-events.d.ts +175 -0
- package/dist/mailboxes-4gJMAJh4.js +147 -0
- package/dist/{operation-Cdp1EI_1.js → operation-BuyvAsZ1.js} +403 -67
- package/dist/promises/errors.gen.d.ts +5 -0
- package/dist/promises/index.d.ts +23 -1
- package/dist/promises/index.js +3 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-DoEUUjNM.js → promises-CqAmI39P.js} +3242 -556
- package/dist/service-map.d.ts +458 -36
- package/package.json +28 -8
package/dist/effect/index.d.ts
CHANGED
|
@@ -27,8 +27,13 @@ export * as Contacts from "./contacts";
|
|
|
27
27
|
export * as Conversations from "./conversations";
|
|
28
28
|
export * as CustomFields from "./custom-fields";
|
|
29
29
|
export * as Email from "./email";
|
|
30
|
+
export * as ExtensionInstallations from "./extension-installations";
|
|
31
|
+
export * as Extensions from "./extensions";
|
|
32
|
+
export * as Feedback from "./feedback";
|
|
33
|
+
export * as Mailboxes from "./mailboxes";
|
|
30
34
|
export * as Media from "./media";
|
|
31
35
|
export * as Messages from "./messages";
|
|
36
|
+
export * as Namespaces from "./namespaces";
|
|
32
37
|
export * as Operations from "./operations";
|
|
33
38
|
export * as Organizations from "./organizations";
|
|
34
39
|
export * as Retry from "./retry";
|
|
@@ -38,5 +43,5 @@ export * as UnsubscribeGroups from "./unsubscribe-groups";
|
|
|
38
43
|
export * as Webhooks from "./webhooks";
|
|
39
44
|
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, UnauthorizedError, ValidationError, DeliveryUnavailableError, } from "./generated";
|
|
40
45
|
export { type ErrorCategory, categoriesOf, hasCategory, isAuthError, isValidationError, isNotFoundError, isConflictError, isThrottlingError, isBillingError, isTransient, isRetryable, catchCategory, catchAuthError, catchValidationError, catchNotFoundError, catchConflictError, catchThrottlingError, catchBillingError, catchTransient, } from "./categories";
|
|
41
|
-
export type {
|
|
46
|
+
export type { CursorPageEnvelope } from "./pagination";
|
|
42
47
|
export type { Json as JsonValue } from "effect/Schema";
|
package/dist/effect/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ResourceNotFoundError,
|
|
1
|
+
import { C as ResourceNotFoundError, M as ValidationError, O as UnauthorizedError, S as RateLimitedError, _ as ForbiddenError, a as AnalyticsQueryError, b as OnboardingReviewRequiredError, c as CampaignFooterRequiredError, g as FlagDisabledError, h as ExternalServiceError, l as ConflictError, m as EmailChannelError, o as BillingProviderError, p as DeliveryUnavailableError, s as BrandAddressRequiredError, v as GatewayTimeoutError, x as PaymentRequiredError, y as InternalError } from "../client-8YXjfsVc.js";
|
|
2
2
|
import { _ as isTransient, a as catchNotFoundError, c as catchValidationError, d as isAuthError, f as isBillingError, g as isThrottlingError, h as isRetryable, i as catchConflictError, l as categoriesOf, m as isNotFoundError, n as catchBillingError, o as catchThrottlingError, p as isConflictError, r as catchCategory, s as catchTransient, t as catchAuthError, u as hasCategory, v as isValidationError } from "../categories-DvsHUJtX.js";
|
|
3
3
|
import { t as retry_exports } from "./retry.js";
|
|
4
4
|
import { t as analytics_exports } from "./analytics.js";
|
|
@@ -12,12 +12,17 @@ import { t as contacts_exports } from "./contacts.js";
|
|
|
12
12
|
import { t as conversations_exports } from "./conversations.js";
|
|
13
13
|
import { t as custom_fields_exports } from "./custom-fields.js";
|
|
14
14
|
import { t as email_exports } from "./email.js";
|
|
15
|
+
import { t as extension_installations_exports } from "./extension-installations.js";
|
|
16
|
+
import { t as extensions_exports } from "./extensions.js";
|
|
17
|
+
import { t as feedback_exports } from "./feedback.js";
|
|
18
|
+
import { L as mailboxes_exports } from "../mailboxes-4gJMAJh4.js";
|
|
15
19
|
import { t as media_exports } from "./media.js";
|
|
16
20
|
import { t as messages_exports } from "./messages.js";
|
|
21
|
+
import { t as namespaces_exports } from "./namespaces.js";
|
|
17
22
|
import { t as operations_exports } from "./operations.js";
|
|
18
23
|
import { t as organizations_exports } from "./organizations.js";
|
|
19
24
|
import { t as scheduled_messages_exports } from "./scheduled-messages.js";
|
|
20
25
|
import { t as templates_exports } from "./templates.js";
|
|
21
26
|
import { t as unsubscribe_groups_exports } from "./unsubscribe-groups.js";
|
|
22
27
|
import { t as webhooks_exports } from "./webhooks.js";
|
|
23
|
-
export { analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, media_exports as Media, messages_exports as Messages, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
|
|
28
|
+
export { analytics_exports as Analytics, AnalyticsQueryError, api_keys_exports as ApiKeys, attachments_exports as Attachments, BillingProviderError, BrandAddressRequiredError, brands_exports as Brands, CampaignFooterRequiredError, campaigns_exports as Campaigns, client_exports as Client, ConflictError, contact_groups_exports as ContactGroups, contacts_exports as Contacts, conversations_exports as Conversations, custom_fields_exports as CustomFields, DeliveryUnavailableError, email_exports as Email, EmailChannelError, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, mailboxes_exports as Mailboxes, media_exports as Media, messages_exports as Messages, namespaces_exports as Namespaces, OnboardingReviewRequiredError, operations_exports as Operations, organizations_exports as Organizations, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, retry_exports as Retry, scheduled_messages_exports as ScheduledMessages, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Context, Effect, Layer } from "effect";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { HttpApiClient } from "effect/http-api";
|
|
3
|
+
import * as HttpClient from "effect/http/HttpClient";
|
|
4
|
+
import type { MailboxEventStreamConnection } from "../../mailbox-events";
|
|
4
5
|
import { SamvaApi } from "../generated";
|
|
5
6
|
export interface ConfigBase {
|
|
6
7
|
readonly baseUrl?: string;
|
|
@@ -25,6 +26,8 @@ export type Operation = keyof FlatRaw & string;
|
|
|
25
26
|
export interface Interface {
|
|
26
27
|
readonly raw: Raw;
|
|
27
28
|
readonly operation: <Name extends Operation>(name: Name) => FlatRaw[Name];
|
|
29
|
+
/** The origin and headers a connection outside HTTP requests, such as the event stream, uses. */
|
|
30
|
+
readonly connection: MailboxEventStreamConnection;
|
|
28
31
|
}
|
|
29
32
|
declare const Service_base: Context.ServiceClass<Service, "samva/Client", Interface>;
|
|
30
33
|
export declare class Service extends Service_base {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Stream } from "effect";
|
|
2
|
+
import { type MailboxEvent, type MailboxEventStreamFailure, type MailboxEventStreamOptions } from "../../mailbox-events";
|
|
3
|
+
import { Service } from "./client";
|
|
4
|
+
/**
|
|
5
|
+
* The organization's mailbox events as a stream, resuming from `cursor`. An event counts as handled
|
|
6
|
+
* once the stream is pulled again, or once it ends successfully after the event (as `Stream.take`
|
|
7
|
+
* does); a failure or interruption leaves the event in hand unacknowledged, so a resume repeats it.
|
|
8
|
+
* The stream fails with a {@link MailboxEventStreamFailure}, which `Effect.catchTag` narrows by the
|
|
9
|
+
* `_tag` of the host's refusal.
|
|
10
|
+
*/
|
|
11
|
+
export declare const events: (options?: Omit<MailboxEventStreamOptions, "signal">) => Stream.Stream<MailboxEvent, MailboxEventStreamFailure, Service>;
|
|
@@ -29,16 +29,18 @@ type OperationFunction<Name extends SdkOperation> = (typeof SDK_OPERATION_CALLS)
|
|
|
29
29
|
readonly kind: "none";
|
|
30
30
|
} ? (_?: never) => OperationResult<Name> : (typeof SDK_OPERATION_CALLS)[Name] extends {
|
|
31
31
|
readonly kind: "idempotentPayload" | "idempotentPath";
|
|
32
|
-
} ? (input: Input<Name> & IdempotencyKeyField<NonNullable<RequestArg<FlatRaw[Name]>>>) => OperationResult<Name> :
|
|
32
|
+
} ? (input: Input<Name> & IdempotencyKeyField<NonNullable<RequestArg<FlatRaw[Name]>>>) => OperationResult<Name> : (typeof SDK_OPERATION_CALLS)[Name] extends {
|
|
33
|
+
readonly kind: "optionalIdempotentPath" | "optionalIdempotentPathPayload";
|
|
34
|
+
} ? (input: Input<Name> & {
|
|
35
|
+
readonly idempotencyKey?: string | undefined;
|
|
36
|
+
}) => OperationResult<Name> : DirectOperation<Name>;
|
|
33
37
|
type EnvelopeItem<A> = A extends {
|
|
34
38
|
readonly items: ReadonlyArray<infer Item>;
|
|
35
39
|
} ? Item : never;
|
|
36
40
|
type IsPaginated<A> = [A] extends [
|
|
37
41
|
{
|
|
38
42
|
readonly items: ReadonlyArray<unknown>;
|
|
39
|
-
readonly
|
|
40
|
-
readonly totalPages: number;
|
|
41
|
-
};
|
|
43
|
+
readonly nextCursor: string | null;
|
|
42
44
|
}
|
|
43
45
|
] ? true : false;
|
|
44
46
|
type PaginationCompanions<Parameters, A, E, R> = {} extends Parameters ? {
|
|
@@ -79,385 +81,29 @@ export type EmailSendInput = Omit<EmailPayload, "channel" | "email" | "to" | "cc
|
|
|
79
81
|
readonly bcc?: ErgonomicMessageRecipient | ReadonlyArray<ErgonomicMessageRecipient>;
|
|
80
82
|
};
|
|
81
83
|
export declare const sendMessage: (input: MessageSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
82
|
-
readonly id: string
|
|
83
|
-
readonly organizationId: string;
|
|
84
|
-
readonly conversationId: string | null;
|
|
85
|
-
readonly parentMessageId: string | null;
|
|
86
|
-
readonly fromActorId: string;
|
|
87
|
-
readonly actorMetadata: {
|
|
88
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
89
|
-
} | null;
|
|
90
|
-
readonly channel: "email";
|
|
91
|
-
readonly direction: "inbound" | "outbound";
|
|
92
|
-
readonly content: {
|
|
93
|
-
readonly text?: string | null;
|
|
94
|
-
readonly html?: string | null;
|
|
95
|
-
readonly markdown?: string | null;
|
|
96
|
-
readonly email?: {
|
|
97
|
-
readonly subject?: string | null;
|
|
98
|
-
readonly html?: string | null;
|
|
99
|
-
readonly text?: string | null;
|
|
100
|
-
readonly headers?: {
|
|
101
|
-
readonly [x: string]: string;
|
|
102
|
-
} | null;
|
|
103
|
-
readonly tracking?: {
|
|
104
|
-
readonly opens?: boolean;
|
|
105
|
-
readonly clicks?: boolean;
|
|
106
|
-
};
|
|
107
|
-
readonly attachments?: readonly {
|
|
108
|
-
readonly filename: string;
|
|
109
|
-
readonly content?: string | null;
|
|
110
|
-
readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
|
|
111
|
-
readonly contentType: string;
|
|
112
|
-
readonly size: number;
|
|
113
|
-
}[] | null;
|
|
114
|
-
} | null;
|
|
115
|
-
readonly metadata?: {
|
|
116
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
117
|
-
} | null;
|
|
118
|
-
};
|
|
119
|
-
readonly metadata: {
|
|
120
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
121
|
-
} | null;
|
|
84
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
122
85
|
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
123
|
-
readonly scheduledAt: string | null;
|
|
124
|
-
readonly tags: readonly string[];
|
|
125
|
-
readonly categories: readonly string[];
|
|
126
|
-
readonly isTest: boolean;
|
|
127
|
-
readonly externalId: string | null;
|
|
128
|
-
readonly referenceId: string | null;
|
|
129
|
-
readonly submission: {
|
|
130
|
-
readonly origin: "campaign" | "direct" | "scheduled";
|
|
131
|
-
readonly transport: "http" | null;
|
|
132
|
-
readonly credential: {
|
|
133
|
-
readonly kind: "api_key";
|
|
134
|
-
readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
|
|
135
|
-
} | {
|
|
136
|
-
readonly kind: "oauth";
|
|
137
|
-
readonly clientId: string | null;
|
|
138
|
-
} | {
|
|
139
|
-
readonly kind: "session";
|
|
140
|
-
} | null;
|
|
141
|
-
readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
|
|
142
|
-
readonly client: {
|
|
143
|
-
readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
|
|
144
|
-
readonly version: string;
|
|
145
|
-
} | null;
|
|
146
|
-
} | null;
|
|
147
|
-
readonly createdAt: string;
|
|
148
|
-
readonly updatedAt: string;
|
|
149
|
-
readonly fromContact: {
|
|
150
|
-
readonly id: string;
|
|
151
|
-
readonly name: string;
|
|
152
|
-
readonly displayName: string | null;
|
|
153
|
-
readonly type: string;
|
|
154
|
-
readonly identities: readonly {
|
|
155
|
-
readonly channel: "email";
|
|
156
|
-
readonly identifier: string;
|
|
157
|
-
readonly verified: boolean;
|
|
158
|
-
}[];
|
|
159
|
-
} | null;
|
|
160
|
-
readonly toContacts: readonly {
|
|
161
|
-
readonly id: string;
|
|
162
|
-
readonly name: string;
|
|
163
|
-
readonly displayName: string | null;
|
|
164
|
-
readonly type: string;
|
|
165
|
-
readonly identities: readonly {
|
|
166
|
-
readonly channel: "email";
|
|
167
|
-
readonly identifier: string;
|
|
168
|
-
readonly verified: boolean;
|
|
169
|
-
}[];
|
|
170
|
-
}[];
|
|
171
|
-
readonly recipients: readonly {
|
|
172
|
-
readonly id: string;
|
|
173
|
-
readonly messageId: string;
|
|
174
|
-
readonly actorId: string | null;
|
|
175
|
-
readonly contactId: string | null;
|
|
176
|
-
readonly identityId: string | null;
|
|
177
|
-
readonly kind: "bcc" | "cc" | "to";
|
|
178
|
-
readonly address: string;
|
|
179
|
-
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
180
|
-
readonly createdAt: string;
|
|
181
|
-
readonly updatedAt: string;
|
|
182
|
-
readonly contact: {
|
|
183
|
-
readonly id: string;
|
|
184
|
-
readonly name: string;
|
|
185
|
-
readonly displayName: string | null;
|
|
186
|
-
readonly type: string;
|
|
187
|
-
readonly identities: readonly {
|
|
188
|
-
readonly channel: "email";
|
|
189
|
-
readonly identifier: string;
|
|
190
|
-
readonly verified: boolean;
|
|
191
|
-
}[];
|
|
192
|
-
} | null;
|
|
193
|
-
}[];
|
|
194
|
-
readonly deliveries: readonly {
|
|
195
|
-
readonly scheduling: {
|
|
196
|
-
readonly dueAt: string;
|
|
197
|
-
readonly expiresAt: string;
|
|
198
|
-
readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
|
|
199
|
-
readonly reviewExpectedAt: string | null;
|
|
200
|
-
} | null;
|
|
201
|
-
readonly id: string;
|
|
202
|
-
readonly messageId: string;
|
|
203
|
-
readonly recipientId: string | null;
|
|
204
|
-
readonly channel: "email";
|
|
205
|
-
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
206
|
-
readonly attemptCount: number;
|
|
207
|
-
readonly maxAttempts: number;
|
|
208
|
-
readonly queuedAt: string | null;
|
|
209
|
-
readonly claimedAt: string | null;
|
|
210
|
-
readonly lastAttemptAt: string | null;
|
|
211
|
-
readonly nextRetryAt: string | null;
|
|
212
|
-
readonly sentAt: string | null;
|
|
213
|
-
readonly deliveredAt: string | null;
|
|
214
|
-
readonly readAt: string | null;
|
|
215
|
-
readonly failedAt: string | null;
|
|
216
|
-
readonly terminalAt: string | null;
|
|
217
|
-
readonly errorCode: string | null;
|
|
218
|
-
readonly errorMessage: string | null;
|
|
219
|
-
readonly errorDetails: {
|
|
220
|
-
readonly code?: string | null;
|
|
221
|
-
readonly name?: string | null;
|
|
222
|
-
readonly message?: string | null;
|
|
223
|
-
readonly details?: {
|
|
224
|
-
readonly [x: string]: string | number | null;
|
|
225
|
-
} | null;
|
|
226
|
-
readonly retryable?: boolean | null;
|
|
227
|
-
} | null;
|
|
228
|
-
readonly cost: string;
|
|
229
|
-
readonly currency: string;
|
|
230
|
-
readonly idempotencyKey: string | null;
|
|
231
|
-
readonly createdAt: string;
|
|
232
|
-
readonly updatedAt: string;
|
|
233
|
-
}[];
|
|
234
|
-
readonly emailDeliveryDetails: readonly {
|
|
235
|
-
readonly deliveryId: string;
|
|
236
|
-
readonly messageIdHeader: string;
|
|
237
|
-
readonly inReplyTo: string | null;
|
|
238
|
-
readonly references: readonly string[] | null;
|
|
239
|
-
readonly subject: string;
|
|
240
|
-
readonly fromEmail: string;
|
|
241
|
-
readonly fromName: string | null;
|
|
242
|
-
readonly toEmails: readonly string[];
|
|
243
|
-
readonly toName: string | null;
|
|
244
|
-
readonly ccEmails: readonly string[] | null;
|
|
245
|
-
readonly bccEmails: readonly string[] | null;
|
|
246
|
-
readonly replyToEmails: readonly string[] | null;
|
|
247
|
-
readonly hasAttachments: boolean;
|
|
248
|
-
readonly attachmentCount: number;
|
|
249
|
-
readonly listUnsubscribeUrl: string | null;
|
|
250
|
-
readonly listUnsubscribeEmail: string | null;
|
|
251
|
-
readonly threadPosition: number | null;
|
|
252
|
-
readonly newContent: string | null;
|
|
253
|
-
readonly quotedContent: string | null;
|
|
254
|
-
readonly hasQuotedContent: boolean;
|
|
255
|
-
readonly dkimVerdict: string | null;
|
|
256
|
-
readonly spfVerdict: string | null;
|
|
257
|
-
readonly dmarcVerdict: string | null;
|
|
258
|
-
readonly isAutoReply: boolean;
|
|
259
|
-
readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
|
|
260
|
-
readonly priority: string | null;
|
|
261
|
-
readonly parsingErrors: readonly string[] | null;
|
|
262
|
-
readonly parsingDuration: number | null;
|
|
263
|
-
readonly receivedAt: string | null;
|
|
264
|
-
readonly processedAt: string | null;
|
|
265
|
-
readonly createdAt: string;
|
|
266
|
-
readonly updatedAt: string;
|
|
267
|
-
}[];
|
|
268
86
|
readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
|
|
269
87
|
readonly reviewExpectedAt: string | null;
|
|
270
|
-
|
|
271
|
-
export declare const sendEmail: (input: EmailSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
272
|
-
readonly id: string;
|
|
273
|
-
readonly organizationId: string;
|
|
274
|
-
readonly conversationId: string | null;
|
|
275
|
-
readonly parentMessageId: string | null;
|
|
276
|
-
readonly fromActorId: string;
|
|
277
|
-
readonly actorMetadata: {
|
|
278
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
279
|
-
} | null;
|
|
280
|
-
readonly channel: "email";
|
|
281
|
-
readonly direction: "inbound" | "outbound";
|
|
282
|
-
readonly content: {
|
|
283
|
-
readonly text?: string | null;
|
|
284
|
-
readonly html?: string | null;
|
|
285
|
-
readonly markdown?: string | null;
|
|
286
|
-
readonly email?: {
|
|
287
|
-
readonly subject?: string | null;
|
|
288
|
-
readonly html?: string | null;
|
|
289
|
-
readonly text?: string | null;
|
|
290
|
-
readonly headers?: {
|
|
291
|
-
readonly [x: string]: string;
|
|
292
|
-
} | null;
|
|
293
|
-
readonly tracking?: {
|
|
294
|
-
readonly opens?: boolean;
|
|
295
|
-
readonly clicks?: boolean;
|
|
296
|
-
};
|
|
297
|
-
readonly attachments?: readonly {
|
|
298
|
-
readonly filename: string;
|
|
299
|
-
readonly content?: string | null;
|
|
300
|
-
readonly mediaId?: (string & import("effect/Brand").Brand<"MediaId">) | null;
|
|
301
|
-
readonly contentType: string;
|
|
302
|
-
readonly size: number;
|
|
303
|
-
}[] | null;
|
|
304
|
-
} | null;
|
|
305
|
-
readonly metadata?: {
|
|
306
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
307
|
-
} | null;
|
|
308
|
-
};
|
|
309
|
-
readonly metadata: {
|
|
310
|
-
readonly [x: string]: import("../generated").JsonValue;
|
|
311
|
-
} | null;
|
|
312
|
-
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
313
|
-
readonly scheduledAt: string | null;
|
|
314
|
-
readonly tags: readonly string[];
|
|
315
|
-
readonly categories: readonly string[];
|
|
316
|
-
readonly isTest: boolean;
|
|
317
|
-
readonly externalId: string | null;
|
|
318
|
-
readonly referenceId: string | null;
|
|
319
|
-
readonly submission: {
|
|
320
|
-
readonly origin: "campaign" | "direct" | "scheduled";
|
|
321
|
-
readonly transport: "http" | null;
|
|
322
|
-
readonly credential: {
|
|
323
|
-
readonly kind: "api_key";
|
|
324
|
-
readonly apiKeyId: (string & import("effect/Brand").Brand<"ApiKeyId">) | null;
|
|
325
|
-
} | {
|
|
326
|
-
readonly kind: "oauth";
|
|
327
|
-
readonly clientId: string | null;
|
|
328
|
-
} | {
|
|
329
|
-
readonly kind: "session";
|
|
330
|
-
} | null;
|
|
331
|
-
readonly userId: (string & import("effect/Brand").Brand<"UserId">) | null;
|
|
332
|
-
readonly client: {
|
|
333
|
-
readonly surface: "cli" | "mcp" | "typescript-effect" | "typescript-promise";
|
|
334
|
-
readonly version: string;
|
|
335
|
-
} | null;
|
|
336
|
-
} | null;
|
|
337
|
-
readonly createdAt: string;
|
|
338
|
-
readonly updatedAt: string;
|
|
339
|
-
readonly fromContact: {
|
|
340
|
-
readonly id: string;
|
|
341
|
-
readonly name: string;
|
|
342
|
-
readonly displayName: string | null;
|
|
343
|
-
readonly type: string;
|
|
344
|
-
readonly identities: readonly {
|
|
345
|
-
readonly channel: "email";
|
|
346
|
-
readonly identifier: string;
|
|
347
|
-
readonly verified: boolean;
|
|
348
|
-
}[];
|
|
349
|
-
} | null;
|
|
350
|
-
readonly toContacts: readonly {
|
|
351
|
-
readonly id: string;
|
|
352
|
-
readonly name: string;
|
|
353
|
-
readonly displayName: string | null;
|
|
354
|
-
readonly type: string;
|
|
355
|
-
readonly identities: readonly {
|
|
356
|
-
readonly channel: "email";
|
|
357
|
-
readonly identifier: string;
|
|
358
|
-
readonly verified: boolean;
|
|
359
|
-
}[];
|
|
360
|
-
}[];
|
|
361
|
-
readonly recipients: readonly {
|
|
362
|
-
readonly id: string;
|
|
363
|
-
readonly messageId: string;
|
|
364
|
-
readonly actorId: string | null;
|
|
365
|
-
readonly contactId: string | null;
|
|
366
|
-
readonly identityId: string | null;
|
|
367
|
-
readonly kind: "bcc" | "cc" | "to";
|
|
88
|
+
readonly skippedRecipients: readonly {
|
|
368
89
|
readonly address: string;
|
|
369
|
-
readonly
|
|
370
|
-
readonly
|
|
371
|
-
readonly updatedAt: string;
|
|
372
|
-
readonly contact: {
|
|
373
|
-
readonly id: string;
|
|
374
|
-
readonly name: string;
|
|
375
|
-
readonly displayName: string | null;
|
|
376
|
-
readonly type: string;
|
|
377
|
-
readonly identities: readonly {
|
|
378
|
-
readonly channel: "email";
|
|
379
|
-
readonly identifier: string;
|
|
380
|
-
readonly verified: boolean;
|
|
381
|
-
}[];
|
|
382
|
-
} | null;
|
|
383
|
-
}[];
|
|
384
|
-
readonly deliveries: readonly {
|
|
385
|
-
readonly scheduling: {
|
|
386
|
-
readonly dueAt: string;
|
|
387
|
-
readonly expiresAt: string;
|
|
388
|
-
readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
|
|
389
|
-
readonly reviewExpectedAt: string | null;
|
|
390
|
-
} | null;
|
|
391
|
-
readonly id: string;
|
|
392
|
-
readonly messageId: string;
|
|
393
|
-
readonly recipientId: string | null;
|
|
394
|
-
readonly channel: "email";
|
|
395
|
-
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
396
|
-
readonly attemptCount: number;
|
|
397
|
-
readonly maxAttempts: number;
|
|
398
|
-
readonly queuedAt: string | null;
|
|
399
|
-
readonly claimedAt: string | null;
|
|
400
|
-
readonly lastAttemptAt: string | null;
|
|
401
|
-
readonly nextRetryAt: string | null;
|
|
402
|
-
readonly sentAt: string | null;
|
|
403
|
-
readonly deliveredAt: string | null;
|
|
404
|
-
readonly readAt: string | null;
|
|
405
|
-
readonly failedAt: string | null;
|
|
406
|
-
readonly terminalAt: string | null;
|
|
407
|
-
readonly errorCode: string | null;
|
|
408
|
-
readonly errorMessage: string | null;
|
|
409
|
-
readonly errorDetails: {
|
|
410
|
-
readonly code?: string | null;
|
|
411
|
-
readonly name?: string | null;
|
|
412
|
-
readonly message?: string | null;
|
|
413
|
-
readonly details?: {
|
|
414
|
-
readonly [x: string]: string | number | null;
|
|
415
|
-
} | null;
|
|
416
|
-
readonly retryable?: boolean | null;
|
|
417
|
-
} | null;
|
|
418
|
-
readonly cost: string;
|
|
419
|
-
readonly currency: string;
|
|
420
|
-
readonly idempotencyKey: string | null;
|
|
421
|
-
readonly createdAt: string;
|
|
422
|
-
readonly updatedAt: string;
|
|
423
|
-
}[];
|
|
424
|
-
readonly emailDeliveryDetails: readonly {
|
|
425
|
-
readonly deliveryId: string;
|
|
426
|
-
readonly messageIdHeader: string;
|
|
427
|
-
readonly inReplyTo: string | null;
|
|
428
|
-
readonly references: readonly string[] | null;
|
|
429
|
-
readonly subject: string;
|
|
430
|
-
readonly fromEmail: string;
|
|
431
|
-
readonly fromName: string | null;
|
|
432
|
-
readonly toEmails: readonly string[];
|
|
433
|
-
readonly toName: string | null;
|
|
434
|
-
readonly ccEmails: readonly string[] | null;
|
|
435
|
-
readonly bccEmails: readonly string[] | null;
|
|
436
|
-
readonly replyToEmails: readonly string[] | null;
|
|
437
|
-
readonly hasAttachments: boolean;
|
|
438
|
-
readonly attachmentCount: number;
|
|
439
|
-
readonly listUnsubscribeUrl: string | null;
|
|
440
|
-
readonly listUnsubscribeEmail: string | null;
|
|
441
|
-
readonly threadPosition: number | null;
|
|
442
|
-
readonly newContent: string | null;
|
|
443
|
-
readonly quotedContent: string | null;
|
|
444
|
-
readonly hasQuotedContent: boolean;
|
|
445
|
-
readonly dkimVerdict: string | null;
|
|
446
|
-
readonly spfVerdict: string | null;
|
|
447
|
-
readonly dmarcVerdict: string | null;
|
|
448
|
-
readonly isAutoReply: boolean;
|
|
449
|
-
readonly autoReplyReason: "auto-response" | "delivery-status" | "out-of-office" | "read-receipt" | null;
|
|
450
|
-
readonly priority: string | null;
|
|
451
|
-
readonly parsingErrors: readonly string[] | null;
|
|
452
|
-
readonly parsingDuration: number | null;
|
|
453
|
-
readonly receivedAt: string | null;
|
|
454
|
-
readonly processedAt: string | null;
|
|
455
|
-
readonly createdAt: string;
|
|
456
|
-
readonly updatedAt: string;
|
|
90
|
+
readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
|
|
91
|
+
readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
|
|
457
92
|
}[];
|
|
93
|
+
readonly createdAt: string;
|
|
94
|
+
}, import("..").BillingProviderError | import("..").ConflictError | import("..").DeliveryUnavailableError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").OnboardingReviewRequiredError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
|
|
95
|
+
export declare const sendEmail: (input: EmailSendInput, options?: SendOptions | undefined) => Effect.Effect<{
|
|
96
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
97
|
+
readonly status: "bounced" | "complained" | "delivered" | "failed" | "pending" | "processing" | "queued" | "read" | "scheduled" | "sent";
|
|
458
98
|
readonly waitReason: "campaign-paused" | "content-review" | "daily-quota" | "domain-health" | "domain-warming" | "onboarding-review" | "rate" | "retry" | "sending-paused" | "upstream-unavailable" | null;
|
|
459
99
|
readonly reviewExpectedAt: string | null;
|
|
460
|
-
|
|
100
|
+
readonly skippedRecipients: readonly {
|
|
101
|
+
readonly address: string;
|
|
102
|
+
readonly reason: "bounce" | "complaint" | "group-unsubscribe" | "manual" | "unsubscribe";
|
|
103
|
+
readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
|
|
104
|
+
}[];
|
|
105
|
+
readonly createdAt: string;
|
|
106
|
+
}, import("..").BillingProviderError | import("..").ConflictError | import("..").DeliveryUnavailableError | import("..").ExternalServiceError | import("..").FlagDisabledError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").OnboardingReviewRequiredError | import("..").PaymentRequiredError | import("..").RateLimitedError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
|
|
461
107
|
type AddSenderRequest = NonNullable<RequestArg<FlatRaw["emailAddSender"]>>;
|
|
462
108
|
export type EmailAddSenderInput = Omit<AddSenderRequest["payload"], "replyToEmails"> & {
|
|
463
109
|
readonly replyToEmails?: ErgonomicEmailList | null | undefined;
|
|
@@ -469,5 +115,5 @@ export declare const addEmailSender: (input: EmailAddSenderInput, options?: Send
|
|
|
469
115
|
readonly providerLifecycle: "active" | "deleting" | "failed" | "provisioning";
|
|
470
116
|
readonly providerFailureCode: string | null;
|
|
471
117
|
readonly createdAt: string;
|
|
472
|
-
}, import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/
|
|
118
|
+
}, import("..").ConflictError | import("..").ExternalServiceError | import("..").ForbiddenError | import("..").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("..").InternalError | import("..").ResourceNotFoundError | import("effect/Schema").SchemaError | import("..").UnauthorizedError | import("..").ValidationError, Service>;
|
|
473
119
|
export {};
|