samva 0.23.1 → 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/types.gen.d.ts +15 -10
- 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/package.json +2 -2
|
@@ -1777,6 +1777,11 @@ export type BrandAddressRequiredError = {
|
|
|
1777
1777
|
message: string;
|
|
1778
1778
|
brand: string | null;
|
|
1779
1779
|
};
|
|
1780
|
+
export type FromAddressRequiredError = {
|
|
1781
|
+
_tag: "FromAddressRequiredError";
|
|
1782
|
+
message: string;
|
|
1783
|
+
verifiedDomains: Array<string>;
|
|
1784
|
+
};
|
|
1780
1785
|
export type ExternalServiceError = {
|
|
1781
1786
|
_tag: "ExternalServiceError";
|
|
1782
1787
|
message: string;
|
|
@@ -3552,9 +3557,9 @@ export type MessagesSendErrors = {
|
|
|
3552
3557
|
*/
|
|
3553
3558
|
409: ConflictError;
|
|
3554
3559
|
/**
|
|
3555
|
-
* ValidationError
|
|
3560
|
+
* ValidationError | FromAddressRequiredError
|
|
3556
3561
|
*/
|
|
3557
|
-
422: ValidationError;
|
|
3562
|
+
422: ValidationError | FromAddressRequiredError;
|
|
3558
3563
|
/**
|
|
3559
3564
|
* RateLimitedError
|
|
3560
3565
|
*/
|
|
@@ -3918,9 +3923,9 @@ export type MessagesValidateEmailErrors = {
|
|
|
3918
3923
|
*/
|
|
3919
3924
|
404: ResourceNotFoundError;
|
|
3920
3925
|
/**
|
|
3921
|
-
* ValidationError
|
|
3926
|
+
* ValidationError | FromAddressRequiredError
|
|
3922
3927
|
*/
|
|
3923
|
-
422: ValidationError;
|
|
3928
|
+
422: ValidationError | FromAddressRequiredError;
|
|
3924
3929
|
/**
|
|
3925
3930
|
* InternalError
|
|
3926
3931
|
*/
|
|
@@ -4374,9 +4379,9 @@ export type ScheduledMessagesResumeErrors = {
|
|
|
4374
4379
|
*/
|
|
4375
4380
|
409: ConflictError;
|
|
4376
4381
|
/**
|
|
4377
|
-
* ValidationError
|
|
4382
|
+
* FromAddressRequiredError | ValidationError
|
|
4378
4383
|
*/
|
|
4379
|
-
422: ValidationError;
|
|
4384
|
+
422: FromAddressRequiredError | ValidationError;
|
|
4380
4385
|
/**
|
|
4381
4386
|
* InternalError
|
|
4382
4387
|
*/
|
|
@@ -4698,9 +4703,9 @@ export type CampaignsScheduleRunErrors = {
|
|
|
4698
4703
|
*/
|
|
4699
4704
|
409: ConflictError;
|
|
4700
4705
|
/**
|
|
4701
|
-
* ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError
|
|
4706
|
+
* FromAddressRequiredError | ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError
|
|
4702
4707
|
*/
|
|
4703
|
-
422: ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
4708
|
+
422: FromAddressRequiredError | ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
4704
4709
|
/**
|
|
4705
4710
|
* InternalError
|
|
4706
4711
|
*/
|
|
@@ -10772,9 +10777,9 @@ export type SubscriptionsSubscribeErrors = {
|
|
|
10772
10777
|
*/
|
|
10773
10778
|
409: ConflictError;
|
|
10774
10779
|
/**
|
|
10775
|
-
* ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError
|
|
10780
|
+
* ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError
|
|
10776
10781
|
*/
|
|
10777
|
-
422: ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
10782
|
+
422: ValidationError | FromAddressRequiredError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
10778
10783
|
/**
|
|
10779
10784
|
* RateLimitedError
|
|
10780
10785
|
*/
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
import { Effect } from "effect";
|
|
21
|
-
import type { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, UnauthorizedError, ValidationError, DeliveryUnavailableError } from "./errors";
|
|
21
|
+
import type { BillingProviderError, ConflictError, EmailChannelError, ExternalServiceError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, UnauthorizedError, ValidationError, DeliveryUnavailableError } from "./errors";
|
|
22
22
|
export type ErrorCategory = "auth" | "validation" | "notFound" | "conflict" | "throttling" | "billing" | "transient";
|
|
23
23
|
export declare const categoriesOf: (error: unknown) => ReadonlyArray<ErrorCategory>;
|
|
24
24
|
export declare const hasCategory: (error: unknown, category: ErrorCategory) => boolean;
|
|
25
25
|
type CategoryError = {
|
|
26
26
|
readonly auth: UnauthorizedError | ForbiddenError;
|
|
27
|
-
readonly validation: ValidationError;
|
|
27
|
+
readonly validation: ValidationError | FromAddressRequiredError;
|
|
28
28
|
readonly notFound: ResourceNotFoundError;
|
|
29
29
|
readonly conflict: ConflictError;
|
|
30
30
|
readonly throttling: RateLimitedError;
|
|
@@ -51,7 +51,7 @@ export declare const isRetryable: (error: unknown) => boolean;
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const catchCategory: <Category extends ErrorCategory, A2, E2, R2>(category: Category, handler: (error: CategoryHandlerError<Category>) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, Exclude<E, CategoryError[Category]> | E2, R | R2>;
|
|
53
53
|
export declare const catchAuthError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"auth">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, ForbiddenError | UnauthorizedError>, R | R2>;
|
|
54
|
-
export declare const catchValidationError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"validation">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, ValidationError>, R | R2>;
|
|
54
|
+
export declare const catchValidationError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"validation">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, FromAddressRequiredError | ValidationError>, R | R2>;
|
|
55
55
|
export declare const catchNotFoundError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"notFound">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, ResourceNotFoundError>, R | R2>;
|
|
56
56
|
export declare const catchConflictError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"conflict">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, ConflictError>, R | R2>;
|
|
57
57
|
export declare const catchThrottlingError: <A2, E2, R2>(handler: (error: CategoryHandlerError<"throttling">) => Effect.Effect<A2, E2, R2>) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A | A2, E2 | Exclude<E, RateLimitedError>, R | R2>;
|
package/dist/effect/email.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const send: (input: EmailSendInput, options?: SendOptions | undef
|
|
|
13
13
|
readonly unsubscribeGroupId?: (string & import("effect/Brand").Brand<"UnsubscribeId">) | null;
|
|
14
14
|
}[];
|
|
15
15
|
readonly createdAt: string;
|
|
16
|
-
}, 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>;
|
|
16
|
+
}, 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>;
|
|
17
17
|
export declare const getTrackingDefaults: (_?: never) => import("./internal/operation").OperationResult<"emailGetTrackingDefaults">;
|
|
18
18
|
export declare const updateTrackingDefaults: (input?: {
|
|
19
19
|
readonly opens?: boolean | undefined;
|
package/dist/effect/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError, DeliveryUnavailableError, } from "./generated/shared";
|
|
1
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError, DeliveryUnavailableError, } from "./generated/shared";
|
|
2
2
|
export { MediaUploadError } from "../inline-attachments";
|
package/dist/effect/errors.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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";
|
|
3
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError };
|
|
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
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, UnauthorizedError, ValidationError };
|
|
@@ -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, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, ContactGroupId, ContactId, ConversationId, Cursor, EmailContent, EmailDispatchContent, EmailDomainId, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, ResourceNotFoundError, SenderNotReadyError, SendsSeries, UnauthorizedError, UnsubscribeId, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
4
|
+
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, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
5
5
|
export type CampaignId = string & EffectBrand.Brand<"CampaignId">;
|
|
6
6
|
export declare const CampaignId: Schema.brand<Schema.String, "CampaignId">;
|
|
7
7
|
export type CampaignContentMetadata = {
|
|
@@ -1456,8 +1456,8 @@ export type CampaignsScheduleRun404 = ResourceNotFoundError;
|
|
|
1456
1456
|
export declare const CampaignsScheduleRun404: typeof ResourceNotFoundError;
|
|
1457
1457
|
export type CampaignsScheduleRun409 = ConflictError;
|
|
1458
1458
|
export declare const CampaignsScheduleRun409: typeof ConflictError;
|
|
1459
|
-
export type CampaignsScheduleRun422 = ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
1460
|
-
export declare const CampaignsScheduleRun422: Schema.Union<readonly [typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]>;
|
|
1459
|
+
export type CampaignsScheduleRun422 = FromAddressRequiredError | ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
|
|
1460
|
+
export declare const CampaignsScheduleRun422: Schema.Union<readonly [typeof FromAddressRequiredError, typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]>;
|
|
1461
1461
|
export type CampaignsScheduleRun500 = InternalError;
|
|
1462
1462
|
export declare const CampaignsScheduleRun500: typeof InternalError;
|
|
1463
1463
|
export type CampaignsScheduleRun502 = ExternalServiceError;
|
|
@@ -3604,7 +3604,7 @@ declare const CampaignsGroup_base: HttpApiGroup.HttpApiGroup<"Campaigns", HttpAp
|
|
|
3604
3604
|
readonly memberRole: Schema.String;
|
|
3605
3605
|
readonly createdAt: Schema.String;
|
|
3606
3606
|
readonly updatedAt: Schema.String;
|
|
3607
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.Union<readonly [typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
3607
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof FlagDisabledError, typeof ForbiddenError]> | Schema.Union<readonly [typeof FromAddressRequiredError, typeof ValidationError, typeof BrandAddressRequiredError, typeof CampaignFooterRequiredError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
3608
3608
|
readonly _tag: "ConflictError";
|
|
3609
3609
|
readonly message: string;
|
|
3610
3610
|
readonly resource: string;
|
|
@@ -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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "samva",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "TypeScript SDK for the Samva email API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
"typecheck": "tsc-rs --noEmit && tsc-rs --noEmit -p codegen/tsconfig.json && tsc-rs --noEmit -p tests/tsconfig.json && tsc-rs --noEmit --project tests/parity/tsconfig.json"
|
|
202
202
|
},
|
|
203
203
|
"dependencies": {
|
|
204
|
-
"@samva/webhooks": "0.
|
|
204
|
+
"@samva/webhooks": "0.24.0"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@effect/openapi-generator": "4.0.4",
|