samva 0.23.0 → 0.24.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/dist/client/sdk.gen.d.ts +55 -55
- package/dist/client/types.gen.d.ts +149 -47
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/email.d.ts +1 -1
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/generated/campaigns.d.ts +4 -4
- package/dist/effect/generated/campaigns.js +2 -1
- package/dist/effect/generated/messages.d.ts +7 -47
- package/dist/effect/generated/messages.js +3 -3
- package/dist/effect/generated/scheduled-messages.d.ts +4 -24
- package/dist/effect/generated/scheduled-messages.js +2 -2
- package/dist/effect/generated/shared.d.ts +7 -0
- package/dist/effect/generated/shared.js +5 -1
- package/dist/effect/generated/subscriptions.d.ts +4 -4
- package/dist/effect/generated/subscriptions.js +2 -1
- package/dist/effect/generated-metadata.d.ts +4 -0
- package/dist/effect/generated-metadata.js +4 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/messages.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +12 -2
- package/dist/promises/errors.gen.js +31 -1
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbsoluteInstant } from "../runtime.js";
|
|
2
|
-
import { ApiKeySecurityMiddleware, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, ContactId, ConversationId, Cursor, EmailContent, EmailDispatchContent, EmailDomainId, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, ResourceNotFoundError, SenderNotReadyError, SendsSeries, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared.js";
|
|
2
|
+
import { ApiKeySecurityMiddleware, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, ContactId, ConversationId, Cursor, EmailContent, EmailDispatchContent, EmailDomainId, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, ResourceNotFoundError, SenderNotReadyError, SendsSeries, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared.js";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
//#region src/effect/generated/campaigns.ts
|
|
@@ -280,6 +280,7 @@ const CampaignsScheduleRun403 = /* @__PURE__ */ Schema.Union([FlagDisabledError,
|
|
|
280
280
|
const CampaignsScheduleRun404 = ResourceNotFoundError;
|
|
281
281
|
const CampaignsScheduleRun409 = ConflictError;
|
|
282
282
|
const CampaignsScheduleRun422 = /* @__PURE__ */ Schema.Union([
|
|
283
|
+
FromAddressRequiredError,
|
|
283
284
|
ValidationError,
|
|
284
285
|
BrandAddressRequiredError,
|
|
285
286
|
CampaignFooterRequiredError
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
|
|
4
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared";
|
|
5
5
|
export type MessageSender = {
|
|
6
6
|
readonly address: string;
|
|
7
7
|
readonly name: string | null;
|
|
@@ -541,8 +541,8 @@ export type MessagesSend404 = ResourceNotFoundError;
|
|
|
541
541
|
export declare const MessagesSend404: typeof ResourceNotFoundError;
|
|
542
542
|
export type MessagesSend409 = ConflictError;
|
|
543
543
|
export declare const MessagesSend409: typeof ConflictError;
|
|
544
|
-
export type MessagesSend422 = ValidationError;
|
|
545
|
-
export declare const MessagesSend422: typeof ValidationError
|
|
544
|
+
export type MessagesSend422 = ValidationError | FromAddressRequiredError;
|
|
545
|
+
export declare const MessagesSend422: Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError]>;
|
|
546
546
|
export type MessagesSend429 = RateLimitedError;
|
|
547
547
|
export declare const MessagesSend429: typeof RateLimitedError;
|
|
548
548
|
export type MessagesSend500 = InternalError;
|
|
@@ -1109,8 +1109,8 @@ export type MessagesValidateEmail403 = ForbiddenError;
|
|
|
1109
1109
|
export declare const MessagesValidateEmail403: typeof ForbiddenError;
|
|
1110
1110
|
export type MessagesValidateEmail404 = ResourceNotFoundError;
|
|
1111
1111
|
export declare const MessagesValidateEmail404: typeof ResourceNotFoundError;
|
|
1112
|
-
export type MessagesValidateEmail422 = ValidationError;
|
|
1113
|
-
export declare const MessagesValidateEmail422: typeof ValidationError
|
|
1112
|
+
export type MessagesValidateEmail422 = ValidationError | FromAddressRequiredError;
|
|
1113
|
+
export declare const MessagesValidateEmail422: Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError]>;
|
|
1114
1114
|
export type MessagesValidateEmail500 = InternalError;
|
|
1115
1115
|
export declare const MessagesValidateEmail500: typeof InternalError;
|
|
1116
1116
|
export type MessagesValidateEmail503 = SenderNotReadyError;
|
|
@@ -2084,7 +2084,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
2084
2084
|
readonly unsubscribeGroupId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "UnsubscribeId">, Schema.Null]>>;
|
|
2085
2085
|
}>>;
|
|
2086
2086
|
readonly createdAt: Schema.String;
|
|
2087
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
2087
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError]> | Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
2088
2088
|
readonly _tag: "ConflictError";
|
|
2089
2089
|
readonly message: string;
|
|
2090
2090
|
readonly resource: string;
|
|
@@ -2192,26 +2192,6 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
2192
2192
|
}>, Schema.Struct<{
|
|
2193
2193
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
2194
2194
|
readonly message: Schema.String;
|
|
2195
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
2196
|
-
readonly _tag: "ValidationError";
|
|
2197
|
-
readonly message: string;
|
|
2198
|
-
readonly fields?: {
|
|
2199
|
-
readonly [x: string]: readonly string[];
|
|
2200
|
-
} | null;
|
|
2201
|
-
}, readonly [Schema.Struct<{
|
|
2202
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
2203
|
-
readonly message: Schema.String;
|
|
2204
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
2205
|
-
}>], {
|
|
2206
|
-
readonly _tag: "ValidationError";
|
|
2207
|
-
readonly message: string;
|
|
2208
|
-
readonly fields?: {
|
|
2209
|
-
readonly [x: string]: readonly string[];
|
|
2210
|
-
} | null;
|
|
2211
|
-
}>, Schema.Struct<{
|
|
2212
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
2213
|
-
readonly message: Schema.String;
|
|
2214
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
2215
2195
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"messagesValidateEmail", "POST", "/v1/messages/validate/email", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
2216
2196
|
readonly conversationId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>, Schema.Null]>>;
|
|
2217
2197
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
@@ -2283,7 +2263,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
2283
2263
|
readonly hasHtml: Schema.Boolean;
|
|
2284
2264
|
readonly hasText: Schema.Boolean;
|
|
2285
2265
|
}>;
|
|
2286
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
2266
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
2287
2267
|
readonly _tag: "ForbiddenError";
|
|
2288
2268
|
readonly message: string;
|
|
2289
2269
|
}, readonly [Schema.Struct<{
|
|
@@ -2363,26 +2343,6 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
2363
2343
|
}>, Schema.Struct<{
|
|
2364
2344
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
2365
2345
|
readonly message: Schema.String;
|
|
2366
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
2367
|
-
readonly _tag: "ValidationError";
|
|
2368
|
-
readonly message: string;
|
|
2369
|
-
readonly fields?: {
|
|
2370
|
-
readonly [x: string]: readonly string[];
|
|
2371
|
-
} | null;
|
|
2372
|
-
}, readonly [Schema.Struct<{
|
|
2373
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
2374
|
-
readonly message: Schema.String;
|
|
2375
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
2376
|
-
}>], {
|
|
2377
|
-
readonly _tag: "ValidationError";
|
|
2378
|
-
readonly message: string;
|
|
2379
|
-
readonly fields?: {
|
|
2380
|
-
readonly [x: string]: readonly string[];
|
|
2381
|
-
} | null;
|
|
2382
|
-
}>, Schema.Struct<{
|
|
2383
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
2384
|
-
readonly message: Schema.String;
|
|
2385
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
2386
2346
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
|
|
2387
2347
|
export declare class MessagesGroup extends MessagesGroup_base {
|
|
2388
2348
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, ConflictError, ContactId, ConversationId, Cursor, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MediaId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, UnauthorizedError, UserId, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
//#region src/effect/generated/messages.ts
|
|
@@ -293,7 +293,7 @@ const MessagesSend403 = /* @__PURE__ */ Schema.Union([
|
|
|
293
293
|
]);
|
|
294
294
|
const MessagesSend404 = ResourceNotFoundError;
|
|
295
295
|
const MessagesSend409 = ConflictError;
|
|
296
|
-
const MessagesSend422 = ValidationError;
|
|
296
|
+
const MessagesSend422 = /* @__PURE__ */ Schema.Union([ValidationError, FromAddressRequiredError]);
|
|
297
297
|
const MessagesSend429 = RateLimitedError;
|
|
298
298
|
const MessagesSend500 = InternalError;
|
|
299
299
|
const MessagesSend502 = /* @__PURE__ */ Schema.Union([BillingProviderError, ExternalServiceError]);
|
|
@@ -548,7 +548,7 @@ const MessagesValidateEmail200 = ValidateEmailResponse;
|
|
|
548
548
|
const MessagesValidateEmail401 = UnauthorizedError;
|
|
549
549
|
const MessagesValidateEmail403 = ForbiddenError;
|
|
550
550
|
const MessagesValidateEmail404 = ResourceNotFoundError;
|
|
551
|
-
const MessagesValidateEmail422 = ValidationError;
|
|
551
|
+
const MessagesValidateEmail422 = /* @__PURE__ */ Schema.Union([ValidationError, FromAddressRequiredError]);
|
|
552
552
|
const MessagesValidateEmail500 = InternalError;
|
|
553
553
|
const MessagesValidateEmail503 = SenderNotReadyError;
|
|
554
554
|
const MessagesValidateEmail504 = GatewayTimeoutError;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailDispatchContent, EmailRecipients, EmailSender, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
4
|
+
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailDispatchContent, EmailRecipients, EmailSender, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
5
5
|
export type ScheduledMessageId = string & EffectBrand.Brand<"ScheduledMessageId">;
|
|
6
6
|
export declare const ScheduledMessageId: Schema.brand<Schema.String, "ScheduledMessageId">;
|
|
7
7
|
export type SendMessagePayload = {
|
|
@@ -875,8 +875,8 @@ export type ScheduledMessagesResume404 = ResourceNotFoundError;
|
|
|
875
875
|
export declare const ScheduledMessagesResume404: typeof ResourceNotFoundError;
|
|
876
876
|
export type ScheduledMessagesResume409 = ConflictError;
|
|
877
877
|
export declare const ScheduledMessagesResume409: typeof ConflictError;
|
|
878
|
-
export type ScheduledMessagesResume422 = ValidationError;
|
|
879
|
-
export declare const ScheduledMessagesResume422: typeof ValidationError
|
|
878
|
+
export type ScheduledMessagesResume422 = FromAddressRequiredError | ValidationError;
|
|
879
|
+
export declare const ScheduledMessagesResume422: Schema.Union<readonly [typeof FromAddressRequiredError, typeof ValidationError]>;
|
|
880
880
|
export type ScheduledMessagesResume500 = InternalError;
|
|
881
881
|
export declare const ScheduledMessagesResume500: typeof InternalError;
|
|
882
882
|
export type ScheduledMessagesResume502 = ExternalServiceError;
|
|
@@ -1660,7 +1660,7 @@ declare const ScheduledMessagesGroup_base: HttpApiGroup.HttpApiGroup<"Scheduled
|
|
|
1660
1660
|
readonly memberRole: Schema.String;
|
|
1661
1661
|
readonly createdAt: Schema.String;
|
|
1662
1662
|
readonly updatedAt: Schema.String;
|
|
1663
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1663
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FromAddressRequiredError, typeof ValidationError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1664
1664
|
readonly _tag: "ConflictError";
|
|
1665
1665
|
readonly message: string;
|
|
1666
1666
|
readonly resource: string;
|
|
@@ -1772,26 +1772,6 @@ declare const ScheduledMessagesGroup_base: HttpApiGroup.HttpApiGroup<"Scheduled
|
|
|
1772
1772
|
}>, Schema.Struct<{
|
|
1773
1773
|
readonly _tag: Schema.tag<"UnauthorizedError">;
|
|
1774
1774
|
readonly message: Schema.String;
|
|
1775
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ValidationError, {
|
|
1776
|
-
readonly _tag: "ValidationError";
|
|
1777
|
-
readonly message: string;
|
|
1778
|
-
readonly fields?: {
|
|
1779
|
-
readonly [x: string]: readonly string[];
|
|
1780
|
-
} | null;
|
|
1781
|
-
}, readonly [Schema.Struct<{
|
|
1782
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
1783
|
-
readonly message: Schema.String;
|
|
1784
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1785
|
-
}>], {
|
|
1786
|
-
readonly _tag: "ValidationError";
|
|
1787
|
-
readonly message: string;
|
|
1788
|
-
readonly fields?: {
|
|
1789
|
-
readonly [x: string]: readonly string[];
|
|
1790
|
-
} | null;
|
|
1791
|
-
}>, Schema.Struct<{
|
|
1792
|
-
readonly _tag: Schema.tag<"ValidationError">;
|
|
1793
|
-
readonly message: Schema.String;
|
|
1794
|
-
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1795
1775
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never>, false>;
|
|
1796
1776
|
export declare class ScheduledMessagesGroup extends ScheduledMessagesGroup_base {
|
|
1797
1777
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbsoluteInstant } from "../runtime.js";
|
|
2
|
-
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailDispatchContent, EmailRecipients, EmailSender, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
|
+
import { ApiKeySecurityMiddleware, ConflictError, ConversationId, Cursor, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailDispatchContent, EmailRecipients, EmailSender, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, MessageId, MessageMetadata, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
//#region src/effect/generated/scheduled-messages.ts
|
|
@@ -118,7 +118,7 @@ const ScheduledMessagesResume401 = UnauthorizedError;
|
|
|
118
118
|
const ScheduledMessagesResume403 = ForbiddenError;
|
|
119
119
|
const ScheduledMessagesResume404 = ResourceNotFoundError;
|
|
120
120
|
const ScheduledMessagesResume409 = ConflictError;
|
|
121
|
-
const ScheduledMessagesResume422 = ValidationError;
|
|
121
|
+
const ScheduledMessagesResume422 = /* @__PURE__ */ Schema.Union([FromAddressRequiredError, ValidationError]);
|
|
122
122
|
const ScheduledMessagesResume500 = InternalError;
|
|
123
123
|
const ScheduledMessagesResume502 = ExternalServiceError;
|
|
124
124
|
const ScheduledMessagesResume503 = SenderNotReadyError;
|
|
@@ -217,6 +217,13 @@ export declare class FlagDisabledError extends FlagDisabledError_base {
|
|
|
217
217
|
}
|
|
218
218
|
export type EmailDomainId = string & EffectBrand.Brand<"EmailDomainId">;
|
|
219
219
|
export declare const EmailDomainId: Schema.brand<Schema.String, "EmailDomainId">;
|
|
220
|
+
declare const FromAddressRequiredError_base: Schema.Class<FromAddressRequiredError, Schema.Struct<{
|
|
221
|
+
readonly _tag: Schema.tag<"FromAddressRequiredError">;
|
|
222
|
+
readonly message: Schema.String;
|
|
223
|
+
readonly verifiedDomains: Schema.$Array<Schema.String>;
|
|
224
|
+
}>, import("effect/Cause").YieldableError>;
|
|
225
|
+
export declare class FromAddressRequiredError extends FromAddressRequiredError_base {
|
|
226
|
+
}
|
|
220
227
|
declare const BrandAddressRequiredError_base: Schema.Class<BrandAddressRequiredError, Schema.Struct<{
|
|
221
228
|
readonly _tag: Schema.tag<"BrandAddressRequiredError">;
|
|
222
229
|
readonly message: Schema.String;
|
|
@@ -159,6 +159,10 @@ const EmailDomainId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @_
|
|
|
159
159
|
expected: "a string matching the RegExp ^dom_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
160
160
|
identifier: "EmailDomainId"
|
|
161
161
|
})).pipe(Schema.brand("EmailDomainId"));
|
|
162
|
+
var FromAddressRequiredError = class extends Schema.TaggedError()("FromAddressRequiredError", Schema.Struct({
|
|
163
|
+
message: Schema.String,
|
|
164
|
+
verifiedDomains: Schema.Array(Schema.String)
|
|
165
|
+
})) {};
|
|
162
166
|
var BrandAddressRequiredError = class extends Schema.TaggedError()("BrandAddressRequiredError", Schema.Struct({
|
|
163
167
|
message: Schema.String,
|
|
164
168
|
brand: Schema.Union([Schema.String, Schema.Null])
|
|
@@ -1079,6 +1083,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
|
|
|
1079
1083
|
});
|
|
1080
1084
|
var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
|
|
1081
1085
|
//#endregion
|
|
1082
|
-
export { AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TestWebhookPayload, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
1086
|
+
export { AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TestWebhookPayload, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
1083
1087
|
|
|
1084
1088
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared";
|
|
3
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared";
|
|
4
4
|
export type SubscribeResult = {
|
|
5
5
|
readonly success: boolean;
|
|
6
6
|
readonly expiresAt: string;
|
|
@@ -48,8 +48,8 @@ export type SubscriptionsSubscribe404 = ResourceNotFoundError;
|
|
|
48
48
|
export declare const SubscriptionsSubscribe404: typeof ResourceNotFoundError;
|
|
49
49
|
export type SubscriptionsSubscribe409 = ConflictError;
|
|
50
50
|
export declare const SubscriptionsSubscribe409: typeof ConflictError;
|
|
51
|
-
export type SubscriptionsSubscribe422 = ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
52
|
-
export declare const SubscriptionsSubscribe422: Schema.Union<readonly [typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]>;
|
|
51
|
+
export type SubscriptionsSubscribe422 = ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
52
|
+
export declare const SubscriptionsSubscribe422: Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]>;
|
|
53
53
|
export type SubscriptionsSubscribe429 = RateLimitedError;
|
|
54
54
|
export declare const SubscriptionsSubscribe429: typeof RateLimitedError;
|
|
55
55
|
export type SubscriptionsSubscribe500 = InternalError;
|
|
@@ -74,7 +74,7 @@ declare const SubscriptionsGroup_base: HttpApiGroup.HttpApiGroup<"Subscriptions"
|
|
|
74
74
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
75
75
|
readonly success: Schema.Boolean;
|
|
76
76
|
readonly expiresAt: Schema.String;
|
|
77
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.Union<readonly [typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
77
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof BillingProviderError, typeof ExternalServiceError]> | Schema.Union<readonly [typeof SenderNotReadyError, typeof DeliveryUnavailableError]> | Schema.Union<readonly [typeof ForbiddenError, typeof OnboardingReviewRequiredError, typeof FlagDisabledError]> | Schema.Union<readonly [typeof ValidationError, typeof FromAddressRequiredError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
78
78
|
readonly _tag: "ConflictError";
|
|
79
79
|
readonly message: string;
|
|
80
80
|
readonly resource: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, DeliveryUnavailableError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, UnsubscribeId, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
//#region src/effect/generated/subscriptions.ts
|
|
@@ -30,6 +30,7 @@ const SubscriptionsSubscribe404 = ResourceNotFoundError;
|
|
|
30
30
|
const SubscriptionsSubscribe409 = ConflictError;
|
|
31
31
|
const SubscriptionsSubscribe422 = /* @__PURE__ */ Schema.Union([
|
|
32
32
|
ValidationError,
|
|
33
|
+
FromAddressRequiredError,
|
|
33
34
|
BrandAddressRequiredError,
|
|
34
35
|
CampaignFooterRequiredError
|
|
35
36
|
]);
|
|
@@ -39,6 +39,10 @@ export declare const SamvaErrorMetadata: {
|
|
|
39
39
|
readonly categories: readonly ["auth"];
|
|
40
40
|
readonly retryable: false;
|
|
41
41
|
};
|
|
42
|
+
readonly FromAddressRequiredError: {
|
|
43
|
+
readonly categories: readonly ["validation"];
|
|
44
|
+
readonly retryable: false;
|
|
45
|
+
};
|
|
42
46
|
readonly GatewayTimeoutError: {
|
|
43
47
|
readonly categories: readonly ["transient"];
|
|
44
48
|
readonly retryable: true;
|
package/dist/effect/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaUploadError } from "../inline-attachments.js";
|
|
2
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./generated/shared.js";
|
|
2
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError } from "./generated/shared.js";
|
|
3
3
|
import { catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError } from "./categories.js";
|
|
4
4
|
import { retry_exports } from "./retry.js";
|
|
5
5
|
import { analytics_exports } from "./analytics.js";
|
|
@@ -30,4 +30,4 @@ import { templates_exports } from "./templates.js";
|
|
|
30
30
|
import { unsubscribe_groups_exports } from "./unsubscribe-groups.js";
|
|
31
31
|
import { webhooks_exports } from "./webhooks.js";
|
|
32
32
|
import { whoami_exports } from "./whoami.js";
|
|
33
|
-
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, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, 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, SenderNotReadyError, subscriptions_exports as Subscriptions, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
|
|
33
|
+
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, events_exports as Events, extension_installations_exports as ExtensionInstallations, extensions_exports as Extensions, ExternalServiceError, feedback_exports as Feedback, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, journeys_exports as Journeys, MailboxSendConflictError, MailboxSendRefusedError, mailboxes_exports as Mailboxes, media_exports as Media, MediaUploadError, 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, SenderNotReadyError, subscriptions_exports as Subscriptions, templates_exports as Templates, UnauthorizedError, unsubscribe_groups_exports as UnsubscribeGroups, ValidationError, webhooks_exports as Webhooks, whoami_exports as Whoami, catchAuthError, catchBillingError, catchCategory, catchConflictError, catchNotFoundError, catchThrottlingError, catchTransient, catchValidationError, categoriesOf, hasCategory, isAuthError, isBillingError, isConflictError, isNotFoundError, isRetryable, isThrottlingError, isTransient, isValidationError };
|
|
@@ -74,7 +74,7 @@ export declare const send: (input: MessageSendInput, options?: SendOptions | und
|
|
|
74
74
|
readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
|
|
75
75
|
}[];
|
|
76
76
|
readonly createdAt: string;
|
|
77
|
-
}, import("./errors").BillingProviderError | import("./errors").ConflictError | import("./errors").DeliveryUnavailableError | import("./errors").ExternalServiceError | import("./errors").FlagDisabledError | import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("..").MediaUploadError | import("./errors").OnboardingReviewRequiredError | import("./errors").PaymentRequiredError | import("./errors").RateLimitedError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").SenderNotReadyError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
77
|
+
}, import("./errors").BillingProviderError | import("./errors").ConflictError | import("./errors").DeliveryUnavailableError | import("./errors").ExternalServiceError | import("./errors").FlagDisabledError | import("./errors").ForbiddenError | import("./errors").FromAddressRequiredError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("..").MediaUploadError | import("./errors").OnboardingReviewRequiredError | import("./errors").PaymentRequiredError | import("./errors").RateLimitedError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").SenderNotReadyError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
78
78
|
export declare const validateEmail: (input: {
|
|
79
79
|
readonly conversationId?: string | null | undefined;
|
|
80
80
|
readonly metadata?: {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaUploadError } from "./inline-attachments.js";
|
|
2
2
|
import { MailboxEventStream, MailboxEventStreamError } from "./mailbox-events.js";
|
|
3
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
|
|
3
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
|
|
4
4
|
import { createClient } from "./promises/index.js";
|
|
5
|
-
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 };
|
|
5
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
package/dist/package.js
CHANGED
|
@@ -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" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "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;
|
|
@@ -114,6 +114,16 @@ export declare class ForbiddenError extends SamvaApiError<"ForbiddenError"> {
|
|
|
114
114
|
readonly _tag: "ForbiddenError";
|
|
115
115
|
constructor(payload: Omit<ForbiddenErrorPayload, "_tag">, context?: SamvaApiErrorContext);
|
|
116
116
|
}
|
|
117
|
+
type FromAddressRequiredErrorPayload = {
|
|
118
|
+
readonly _tag: "FromAddressRequiredError";
|
|
119
|
+
readonly message: string;
|
|
120
|
+
readonly verifiedDomains: Array<string>;
|
|
121
|
+
};
|
|
122
|
+
export declare class FromAddressRequiredError extends SamvaApiError<"FromAddressRequiredError"> {
|
|
123
|
+
readonly _tag: "FromAddressRequiredError";
|
|
124
|
+
readonly "verifiedDomains": Array<string>;
|
|
125
|
+
constructor(payload: Omit<FromAddressRequiredErrorPayload, "_tag">, context?: SamvaApiErrorContext);
|
|
126
|
+
}
|
|
117
127
|
type GatewayTimeoutErrorPayload = {
|
|
118
128
|
readonly _tag: "GatewayTimeoutError";
|
|
119
129
|
readonly message: 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 | FromAddressRequiredError | GatewayTimeoutError | InternalError | 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 {};
|
|
@@ -103,6 +103,13 @@ var ForbiddenError = class extends SamvaApiError {
|
|
|
103
103
|
Object.assign(this, payload);
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
+
var FromAddressRequiredError = class extends SamvaApiError {
|
|
107
|
+
_tag = "FromAddressRequiredError";
|
|
108
|
+
constructor(payload, context = {}) {
|
|
109
|
+
super(messageOf("FromAddressRequiredError", payload), context);
|
|
110
|
+
Object.assign(this, payload);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
106
113
|
var GatewayTimeoutError = class extends SamvaApiError {
|
|
107
114
|
_tag = "GatewayTimeoutError";
|
|
108
115
|
constructor(payload, context = {}) {
|
|
@@ -191,6 +198,7 @@ const constructors = {
|
|
|
191
198
|
ExternalServiceError,
|
|
192
199
|
FlagDisabledError,
|
|
193
200
|
ForbiddenError,
|
|
201
|
+
FromAddressRequiredError,
|
|
194
202
|
GatewayTimeoutError,
|
|
195
203
|
InternalError,
|
|
196
204
|
MailboxSendConflictError,
|
|
@@ -370,6 +378,28 @@ const payloadSchemas = {
|
|
|
370
378
|
"x-category": ["auth"],
|
|
371
379
|
"x-retryable": false
|
|
372
380
|
},
|
|
381
|
+
FromAddressRequiredError: {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
_tag: {
|
|
385
|
+
type: "string",
|
|
386
|
+
enum: ["FromAddressRequiredError"]
|
|
387
|
+
},
|
|
388
|
+
message: { type: "string" },
|
|
389
|
+
verifiedDomains: {
|
|
390
|
+
type: "array",
|
|
391
|
+
items: { type: "string" }
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
required: [
|
|
395
|
+
"_tag",
|
|
396
|
+
"message",
|
|
397
|
+
"verifiedDomains"
|
|
398
|
+
],
|
|
399
|
+
additionalProperties: false,
|
|
400
|
+
"x-category": ["validation"],
|
|
401
|
+
"x-retryable": false
|
|
402
|
+
},
|
|
373
403
|
GatewayTimeoutError: {
|
|
374
404
|
type: "object",
|
|
375
405
|
properties: {
|
|
@@ -1310,6 +1340,6 @@ function fromApiError(error, context = {}) {
|
|
|
1310
1340
|
return new SamvaTransportError(error, context);
|
|
1311
1341
|
}
|
|
1312
1342
|
//#endregion
|
|
1313
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError };
|
|
1343
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError };
|
|
1314
1344
|
|
|
1315
1345
|
//# sourceMappingURL=errors.gen.js.map
|
package/dist/promises/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, Cont
|
|
|
5
5
|
import { MediaUploadError, mediaCreateBody, planInlineUploads, withUploadedAttachments } from "../inline-attachments.js";
|
|
6
6
|
import { MailboxEventStream, MailboxEventStreamError } from "../mailbox-events.js";
|
|
7
7
|
import { buildEmailSendPayload, buildMessagesSendPayload, replyToEmailsPayload } from "../normalize.js";
|
|
8
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
8
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
9
9
|
//#region src/promises/index.ts
|
|
10
10
|
/**
|
|
11
11
|
* Samva SDK - TypeScript client for the Samva API.
|
|
@@ -284,6 +284,6 @@ function createClient(config) {
|
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
//#endregion
|
|
287
|
-
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 };
|
|
287
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
|
288
288
|
|
|
289
289
|
//# sourceMappingURL=index.js.map
|