samva 0.48.0 → 0.50.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 +272 -33
- package/dist/client/sdk.gen.js +693 -55
- package/dist/client/types.gen.d.ts +1571 -206
- package/dist/effect/accounts.d.ts +6 -6
- package/dist/effect/agents.d.ts +13 -13
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/api-keys.d.ts +11 -11
- package/dist/effect/approval-requests.d.ts +4 -4
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/brands.d.ts +6 -6
- package/dist/effect/campaigns.d.ts +15 -15
- package/dist/effect/contact-groups.d.ts +10 -10
- package/dist/effect/contacts.d.ts +25 -25
- package/dist/effect/conversations.d.ts +13 -13
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/descriptors/integrations-catalog.d.ts +134 -0
- package/dist/effect/descriptors/integrations-catalog.js +122 -0
- package/dist/effect/descriptors/mailboxes.d.ts +73 -13
- package/dist/effect/descriptors/mailboxes.js +85 -13
- package/dist/effect/email.d.ts +61 -61
- package/dist/effect/events.d.ts +2 -2
- package/dist/effect/feedback.d.ts +1 -1
- package/dist/effect/generated/accounts.d.ts +1 -3
- package/dist/effect/generated/accounts.js +2 -7
- package/dist/effect/generated/api-keys.d.ts +15 -15
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/integrations-catalog.d.ts +2702 -1
- package/dist/effect/generated/integrations-catalog.js +578 -3
- package/dist/effect/generated/journeys.d.ts +9 -11
- package/dist/effect/generated/journeys.js +6 -12
- package/dist/effect/generated/mailboxes.d.ts +1661 -669
- package/dist/effect/generated/mailboxes.js +291 -103
- package/dist/effect/generated/messages.d.ts +109 -4
- package/dist/effect/generated/messages.js +41 -8
- package/dist/effect/generated/shared.d.ts +199 -21
- package/dist/effect/generated/shared.js +50 -13
- package/dist/effect/generated/template-registrations.d.ts +32 -1
- package/dist/effect/generated/template-registrations.js +8 -5
- package/dist/effect/generated/templates.d.ts +1 -4
- package/dist/effect/generated/templates.js +2 -6
- package/dist/effect/generated/webhooks.d.ts +19 -19
- package/dist/effect/generated/webhooks.js +8 -8
- package/dist/effect/generated/whoami.d.ts +4 -4
- package/dist/effect/generated-metadata.d.ts +138 -18
- package/dist/effect/generated-metadata.js +366 -340
- package/dist/effect/integrations-catalog.d.ts +228 -3
- package/dist/effect/integrations-catalog.js +29 -1
- package/dist/effect/integrations.d.ts +7 -7
- package/dist/effect/internal/client.d.ts +7 -3
- package/dist/effect/internal/operation.d.ts +10 -6
- package/dist/effect/internal/operation.js +3 -3
- package/dist/effect/journeys.d.ts +14 -14
- package/dist/effect/mailboxes.d.ts +142 -92
- package/dist/effect/mailboxes.js +20 -8
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/messages.d.ts +9 -9
- package/dist/effect/namespaces.d.ts +11 -11
- package/dist/effect/newsletter-domains.d.ts +4 -4
- package/dist/effect/newsletter-issues.d.ts +11 -11
- package/dist/effect/newsletters.d.ts +5 -5
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/organizations.d.ts +12 -12
- package/dist/effect/policies.d.ts +3 -3
- package/dist/effect/retry.js +1 -1
- package/dist/effect/scheduled-messages.d.ts +5 -5
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/template-registrations.d.ts +9 -3
- package/dist/effect/template-share-links.d.ts +5 -5
- package/dist/effect/templates.d.ts +37 -37
- package/dist/effect/topic-forms.d.ts +5 -5
- package/dist/effect/topics.d.ts +9 -9
- package/dist/effect/webhooks.d.ts +15 -15
- package/dist/effect/whatsapp-flows.d.ts +10 -10
- package/dist/effect/whatsapp-setup-links.d.ts +4 -4
- package/dist/effect/whatsapp.d.ts +12 -12
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/inline-attachments.d.ts +0 -5
- package/dist/mailbox-events.d.ts +1 -5
- package/dist/mailbox-events.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +4 -4
- package/dist/promises/client.js +8 -4
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +105 -11
- package/package.json +3 -3
|
@@ -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, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SmsSendMessagePayload, UnauthorizedError, UserId, ValidationError, WhatsAppButtonsMessage, WhatsAppCtaUrlMessage, WhatsAppFlowId, WhatsAppFlowVersionId, WhatsAppListMessage, WhatsAppSendMessagePayload, WhatsAppTextHeader } from "./shared.js";
|
|
4
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MailboxEndpointId, MailboxId, MailboxThreadId, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SmsSendMessagePayload, UnauthorizedError, UserId, ValidationError, WhatsAppButtonsMessage, WhatsAppCtaUrlMessage, WhatsAppFlowId, WhatsAppFlowVersionId, WhatsAppListMessage, WhatsAppSendMessagePayload, WhatsAppTextHeader } from "./shared.js";
|
|
5
5
|
export type MessageSender = {
|
|
6
6
|
readonly address: string;
|
|
7
7
|
readonly name: string | null;
|
|
@@ -304,6 +304,36 @@ export declare const WhatsAppStoredMedia: Schema.Union<readonly [Schema.Struct<{
|
|
|
304
304
|
readonly caption: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
305
305
|
readonly filename: Schema.optionalKey<Schema.String>;
|
|
306
306
|
}>]>;
|
|
307
|
+
export type MessageReplyObservation = {
|
|
308
|
+
readonly endpoints: ReadonlyArray<{
|
|
309
|
+
readonly mailboxId: MailboxId;
|
|
310
|
+
readonly endpointId: MailboxEndpointId;
|
|
311
|
+
readonly address: string;
|
|
312
|
+
}>;
|
|
313
|
+
readonly received: {
|
|
314
|
+
readonly messageId: MessageId;
|
|
315
|
+
readonly receivedAt: string;
|
|
316
|
+
readonly thread: {
|
|
317
|
+
readonly mailboxId: MailboxId;
|
|
318
|
+
readonly threadId: MailboxThreadId;
|
|
319
|
+
} | null;
|
|
320
|
+
} | null;
|
|
321
|
+
};
|
|
322
|
+
export declare const MessageReplyObservation: Schema.Struct<{
|
|
323
|
+
readonly endpoints: Schema.$Array<Schema.Struct<{
|
|
324
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
325
|
+
readonly endpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
|
|
326
|
+
readonly address: Schema.String;
|
|
327
|
+
}>>;
|
|
328
|
+
readonly received: Schema.Union<readonly [Schema.Struct<{
|
|
329
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
330
|
+
readonly receivedAt: Schema.String;
|
|
331
|
+
readonly thread: Schema.Union<readonly [Schema.Struct<{
|
|
332
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
333
|
+
readonly threadId: Schema.brand<Schema.String, "MailboxThreadId">;
|
|
334
|
+
}>, Schema.Null]>;
|
|
335
|
+
}>, Schema.Null]>;
|
|
336
|
+
}>;
|
|
307
337
|
export type WhatsAppStoredFlowMessage = {
|
|
308
338
|
readonly type: "flow";
|
|
309
339
|
readonly header?: WhatsAppTextHeader;
|
|
@@ -337,7 +367,7 @@ export declare const WhatsAppStoredFlowMessage: Schema.Struct<{
|
|
|
337
367
|
readonly flowVersionId: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
|
|
338
368
|
readonly providerFlowId: Schema.String;
|
|
339
369
|
}>;
|
|
340
|
-
export type
|
|
370
|
+
export type MessageDeliveryObservation = {
|
|
341
371
|
readonly id: MessageDeliveryId;
|
|
342
372
|
readonly recipient: string | null;
|
|
343
373
|
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
@@ -352,8 +382,9 @@ export type MessageDelivery = {
|
|
|
352
382
|
readonly estimatedProviderCost: EstimatedProviderCost | null;
|
|
353
383
|
readonly createdAt: string;
|
|
354
384
|
readonly updatedAt: string;
|
|
385
|
+
readonly queuedAt: string | null;
|
|
355
386
|
};
|
|
356
|
-
export declare const
|
|
387
|
+
export declare const MessageDeliveryObservation: Schema.Struct<{
|
|
357
388
|
readonly id: Schema.brand<Schema.String, "MessageDeliveryId">;
|
|
358
389
|
readonly recipient: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
359
390
|
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
|
|
@@ -376,6 +407,7 @@ export declare const MessageDelivery: Schema.Struct<{
|
|
|
376
407
|
}>, Schema.Null]>;
|
|
377
408
|
readonly createdAt: Schema.String;
|
|
378
409
|
readonly updatedAt: Schema.String;
|
|
410
|
+
readonly queuedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
379
411
|
}>;
|
|
380
412
|
export type MessageEventPage = {
|
|
381
413
|
readonly items: ReadonlyArray<{
|
|
@@ -447,9 +479,20 @@ export declare const MessageReceipt: Schema.Struct<{
|
|
|
447
479
|
readonly createdAt: Schema.String;
|
|
448
480
|
}>;
|
|
449
481
|
export type MessageDeliveryList = {
|
|
450
|
-
readonly
|
|
482
|
+
readonly id: MessageId;
|
|
483
|
+
readonly status: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained";
|
|
484
|
+
readonly skippedRecipients: ReadonlyArray<SkippedRecipient>;
|
|
485
|
+
readonly items: ReadonlyArray<MessageDeliveryObservation>;
|
|
486
|
+
readonly reply: MessageReplyObservation;
|
|
451
487
|
};
|
|
452
488
|
export declare const MessageDeliveryList: Schema.Struct<{
|
|
489
|
+
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
490
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
|
|
491
|
+
readonly skippedRecipients: Schema.$Array<Schema.Struct<{
|
|
492
|
+
readonly address: Schema.String;
|
|
493
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
|
|
494
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
495
|
+
}>>;
|
|
453
496
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
454
497
|
readonly id: Schema.brand<Schema.String, "MessageDeliveryId">;
|
|
455
498
|
readonly recipient: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -473,7 +516,23 @@ export declare const MessageDeliveryList: Schema.Struct<{
|
|
|
473
516
|
}>, Schema.Null]>;
|
|
474
517
|
readonly createdAt: Schema.String;
|
|
475
518
|
readonly updatedAt: Schema.String;
|
|
519
|
+
readonly queuedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
476
520
|
}>>;
|
|
521
|
+
readonly reply: Schema.Struct<{
|
|
522
|
+
readonly endpoints: Schema.$Array<Schema.Struct<{
|
|
523
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
524
|
+
readonly endpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
|
|
525
|
+
readonly address: Schema.String;
|
|
526
|
+
}>>;
|
|
527
|
+
readonly received: Schema.Union<readonly [Schema.Struct<{
|
|
528
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
529
|
+
readonly receivedAt: Schema.String;
|
|
530
|
+
readonly thread: Schema.Union<readonly [Schema.Struct<{
|
|
531
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
532
|
+
readonly threadId: Schema.brand<Schema.String, "MailboxThreadId">;
|
|
533
|
+
}>, Schema.Null]>;
|
|
534
|
+
}>, Schema.Null]>;
|
|
535
|
+
}>;
|
|
477
536
|
}>;
|
|
478
537
|
export type Message = {
|
|
479
538
|
readonly id: MessageId;
|
|
@@ -1981,6 +2040,13 @@ export declare const MessagesListDeliveriesPathParams: Schema.Struct<{
|
|
|
1981
2040
|
}>;
|
|
1982
2041
|
export type MessagesListDeliveries200 = MessageDeliveryList;
|
|
1983
2042
|
export declare const MessagesListDeliveries200: Schema.Struct<{
|
|
2043
|
+
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
2044
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
|
|
2045
|
+
readonly skippedRecipients: Schema.$Array<Schema.Struct<{
|
|
2046
|
+
readonly address: Schema.String;
|
|
2047
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
|
|
2048
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
2049
|
+
}>>;
|
|
1984
2050
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
1985
2051
|
readonly id: Schema.brand<Schema.String, "MessageDeliveryId">;
|
|
1986
2052
|
readonly recipient: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -2004,7 +2070,23 @@ export declare const MessagesListDeliveries200: Schema.Struct<{
|
|
|
2004
2070
|
}>, Schema.Null]>;
|
|
2005
2071
|
readonly createdAt: Schema.String;
|
|
2006
2072
|
readonly updatedAt: Schema.String;
|
|
2073
|
+
readonly queuedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2007
2074
|
}>>;
|
|
2075
|
+
readonly reply: Schema.Struct<{
|
|
2076
|
+
readonly endpoints: Schema.$Array<Schema.Struct<{
|
|
2077
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
2078
|
+
readonly endpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
|
|
2079
|
+
readonly address: Schema.String;
|
|
2080
|
+
}>>;
|
|
2081
|
+
readonly received: Schema.Union<readonly [Schema.Struct<{
|
|
2082
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
2083
|
+
readonly receivedAt: Schema.String;
|
|
2084
|
+
readonly thread: Schema.Union<readonly [Schema.Struct<{
|
|
2085
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
2086
|
+
readonly threadId: Schema.brand<Schema.String, "MailboxThreadId">;
|
|
2087
|
+
}>, Schema.Null]>;
|
|
2088
|
+
}>, Schema.Null]>;
|
|
2089
|
+
}>;
|
|
2008
2090
|
}>;
|
|
2009
2091
|
export type MessagesListDeliveries400 = MalformedRequestError;
|
|
2010
2092
|
export declare const MessagesListDeliveries400: typeof MalformedRequestError;
|
|
@@ -3448,6 +3530,13 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
3448
3530
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"messagesListDeliveries", "GET", "/v1/messages/:id/deliveries", Schema.toCodecStringTree<Schema.Struct<{
|
|
3449
3531
|
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
3450
3532
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
3533
|
+
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
3534
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"scheduled">, Schema.Literal<"queued">, Schema.Literal<"processing">, Schema.Literal<"sent">, Schema.Literal<"delivered">, Schema.Literal<"read">, Schema.Literal<"failed">, Schema.Literal<"bounced">, Schema.Literal<"complained">]>;
|
|
3535
|
+
readonly skippedRecipients: Schema.$Array<Schema.Struct<{
|
|
3536
|
+
readonly address: Schema.String;
|
|
3537
|
+
readonly reason: Schema.Union<readonly [Schema.Literal<"bounce">, Schema.Literal<"complaint">, Schema.Literal<"unsubscribe">, Schema.Literal<"manual">, Schema.Literal<"topic-unsubscribe">]>;
|
|
3538
|
+
readonly topicId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TopicId">, Schema.Null]>>;
|
|
3539
|
+
}>>;
|
|
3451
3540
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
3452
3541
|
readonly id: Schema.brand<Schema.String, "MessageDeliveryId">;
|
|
3453
3542
|
readonly recipient: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -3471,7 +3560,23 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
3471
3560
|
}>, Schema.Null]>;
|
|
3472
3561
|
readonly createdAt: Schema.String;
|
|
3473
3562
|
readonly updatedAt: Schema.String;
|
|
3563
|
+
readonly queuedAt: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3474
3564
|
}>>;
|
|
3565
|
+
readonly reply: Schema.Struct<{
|
|
3566
|
+
readonly endpoints: Schema.$Array<Schema.Struct<{
|
|
3567
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
3568
|
+
readonly endpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
|
|
3569
|
+
readonly address: Schema.String;
|
|
3570
|
+
}>>;
|
|
3571
|
+
readonly received: Schema.Union<readonly [Schema.Struct<{
|
|
3572
|
+
readonly messageId: Schema.brand<Schema.String, "MessageId">;
|
|
3573
|
+
readonly receivedAt: Schema.String;
|
|
3574
|
+
readonly thread: Schema.Union<readonly [Schema.Struct<{
|
|
3575
|
+
readonly mailboxId: Schema.brand<Schema.String, "MailboxId">;
|
|
3576
|
+
readonly threadId: Schema.brand<Schema.String, "MailboxThreadId">;
|
|
3577
|
+
}>, Schema.Null]>;
|
|
3578
|
+
}>, Schema.Null]>;
|
|
3579
|
+
}>;
|
|
3475
3580
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3476
3581
|
readonly _tag: "ForbiddenError";
|
|
3477
3582
|
readonly message: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SmsSendMessagePayload, UnauthorizedError, UserId, ValidationError, WhatsAppButtonsMessage, WhatsAppCtaUrlMessage, WhatsAppFlowId, WhatsAppFlowVersionId, WhatsAppListMessage, WhatsAppSendMessagePayload, WhatsAppTextHeader } from "./shared.js";
|
|
1
|
+
import { ApiKeyId, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, CampaignId, CampaignRunId, ConflictError, ContactId, ConversationId, DeliveryUnavailableError, EmailBccRecipients, EmailCcRecipients, EmailContent, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailTrackingOverrideV1, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, JsonValue, MailboxEndpointId, MailboxId, MailboxThreadId, MalformedRequestError, MediaId, MessageDeliveryId, MessageId, MessageMetadata, MessagePage, NamespaceId, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SenderNotReadyError, SkippedRecipient, SmsSendMessagePayload, UnauthorizedError, UserId, ValidationError, WhatsAppButtonsMessage, WhatsAppCtaUrlMessage, WhatsAppFlowId, WhatsAppFlowVersionId, WhatsAppListMessage, WhatsAppSendMessagePayload, WhatsAppTextHeader } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/messages.ts
|
|
@@ -190,6 +190,21 @@ const WhatsAppStoredMedia = /* @__PURE__ */ (() => Schema.Union([
|
|
|
190
190
|
filename: Schema.optionalKey(Schema.String)
|
|
191
191
|
})
|
|
192
192
|
]).annotate({ identifier: "WhatsAppStoredMedia" }))();
|
|
193
|
+
const MessageReplyObservation = /* @__PURE__ */ (() => Schema.Struct({
|
|
194
|
+
endpoints: Schema.Array(Schema.Struct({
|
|
195
|
+
mailboxId: MailboxId,
|
|
196
|
+
endpointId: MailboxEndpointId,
|
|
197
|
+
address: Schema.String
|
|
198
|
+
})),
|
|
199
|
+
received: Schema.Union([Schema.Struct({
|
|
200
|
+
messageId: MessageId,
|
|
201
|
+
receivedAt: Schema.String,
|
|
202
|
+
thread: Schema.Union([Schema.Struct({
|
|
203
|
+
mailboxId: MailboxId,
|
|
204
|
+
threadId: MailboxThreadId
|
|
205
|
+
}), Schema.Null])
|
|
206
|
+
}), Schema.Null])
|
|
207
|
+
}).annotate({ identifier: "MessageReplyObservation" }))();
|
|
193
208
|
const WhatsAppStoredFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
194
209
|
type: Schema.Literal("flow"),
|
|
195
210
|
header: Schema.optionalKey(WhatsAppTextHeader),
|
|
@@ -204,7 +219,7 @@ const WhatsAppStoredFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
204
219
|
flowVersionId: WhatsAppFlowVersionId,
|
|
205
220
|
providerFlowId: Schema.String
|
|
206
221
|
}).annotate({ identifier: "WhatsAppStoredFlowMessage" }))();
|
|
207
|
-
const
|
|
222
|
+
const MessageDeliveryObservation = /* @__PURE__ */ (() => Schema.Struct({
|
|
208
223
|
id: MessageDeliveryId,
|
|
209
224
|
recipient: Schema.Union([Schema.String, Schema.Null]),
|
|
210
225
|
status: Schema.Union([
|
|
@@ -241,8 +256,9 @@ const MessageDelivery = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
241
256
|
error: Schema.Union([MessageDeliveryError, Schema.Null]),
|
|
242
257
|
estimatedProviderCost: Schema.Union([EstimatedProviderCost, Schema.Null]),
|
|
243
258
|
createdAt: Schema.String,
|
|
244
|
-
updatedAt: Schema.String
|
|
245
|
-
|
|
259
|
+
updatedAt: Schema.String,
|
|
260
|
+
queuedAt: Schema.Union([Schema.String, Schema.Null])
|
|
261
|
+
}).annotate({ identifier: "MessageDeliveryObservation" }))();
|
|
246
262
|
const MessageEventPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
247
263
|
items: Schema.Array(Schema.Struct({
|
|
248
264
|
id: MessageEventId,
|
|
@@ -300,7 +316,24 @@ const MessageReceipt = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
300
316
|
skippedRecipients: Schema.Array(SkippedRecipient),
|
|
301
317
|
createdAt: Schema.String
|
|
302
318
|
}).annotate({ identifier: "MessageReceipt" }))();
|
|
303
|
-
const MessageDeliveryList = /* @__PURE__ */ (() => Schema.Struct({
|
|
319
|
+
const MessageDeliveryList = /* @__PURE__ */ (() => Schema.Struct({
|
|
320
|
+
id: MessageId,
|
|
321
|
+
status: Schema.Union([
|
|
322
|
+
Schema.Literal("pending"),
|
|
323
|
+
Schema.Literal("scheduled"),
|
|
324
|
+
Schema.Literal("queued"),
|
|
325
|
+
Schema.Literal("processing"),
|
|
326
|
+
Schema.Literal("sent"),
|
|
327
|
+
Schema.Literal("delivered"),
|
|
328
|
+
Schema.Literal("read"),
|
|
329
|
+
Schema.Literal("failed"),
|
|
330
|
+
Schema.Literal("bounced"),
|
|
331
|
+
Schema.Literal("complained")
|
|
332
|
+
]),
|
|
333
|
+
skippedRecipients: Schema.Array(SkippedRecipient),
|
|
334
|
+
items: Schema.Array(MessageDeliveryObservation),
|
|
335
|
+
reply: MessageReplyObservation
|
|
336
|
+
}).annotate({ identifier: "MessageDeliveryList" }))();
|
|
304
337
|
const Message = /* @__PURE__ */ (() => Schema.Struct({
|
|
305
338
|
id: MessageId,
|
|
306
339
|
campaign: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
@@ -849,7 +882,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
|
|
|
849
882
|
MessagesListDeliveries500,
|
|
850
883
|
MessagesListDeliveries504.pipe(HttpApiSchema.status(504))
|
|
851
884
|
]
|
|
852
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.listDeliveries").annotate(OpenApi.Summary, "List message deliveries").annotate(OpenApi.Description, "Returns
|
|
885
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.listDeliveries").annotate(OpenApi.Summary, "List message deliveries").annotate(OpenApi.Description, "Returns per-recipient queueing, provider acceptance (sentAt), delivery and read times, failures and waits. Includes recipients skipped at admission and the first reply linked by a message reference. Mailbox endpoints and threads require mailbox read access."), HttpApiEndpoint.get("messagesGetEmail", "/v1/messages/:id/email", {
|
|
853
886
|
params: MessagesGetEmailPathParams,
|
|
854
887
|
query: MessagesGetEmailQuery,
|
|
855
888
|
success: MessagesGetEmail200,
|
|
@@ -862,7 +895,7 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
|
|
|
862
895
|
MessagesGetEmail500,
|
|
863
896
|
MessagesGetEmail504.pipe(HttpApiSchema.status(504))
|
|
864
897
|
]
|
|
865
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getEmail").annotate(OpenApi.Summary, "Get email message details").annotate(OpenApi.Description, "Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content."), HttpApiEndpoint.get("messagesGetEvents", "/v1/messages/:id/events", {
|
|
898
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.getEmail").annotate(OpenApi.Summary, "Get email message details").annotate(OpenApi.Description, "Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content. Requesting download URLs for inbound email without a passing malware scan returns 404 (`ResourceNotFoundError`). Omit `includeDownloadUrls` to read the details."), HttpApiEndpoint.get("messagesGetEvents", "/v1/messages/:id/events", {
|
|
866
899
|
params: MessagesGetEventsPathParams,
|
|
867
900
|
query: MessagesGetEventsQuery,
|
|
868
901
|
success: MessagesGetEvents200,
|
|
@@ -901,6 +934,6 @@ var MessagesGroup = class extends HttpApiGroup.make("Messages").add(HttpApiEndpo
|
|
|
901
934
|
MessagesValidateEmail504.pipe(HttpApiSchema.status(504))
|
|
902
935
|
]
|
|
903
936
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "messages.validateEmail").annotate(OpenApi.Summary, "Validate an email message").annotate(OpenApi.Description, "Resolves recipients, sender, and inline or published-template content without sending anything, creating contacts or messages, or counting toward your quota.")).annotate(OpenApi.Description, "Send messages and read their delivery state and timeline.") {};
|
|
904
|
-
export { DeliveryErrorDetails, EmailAddress, EstimatedProviderCost, Message, MessageAddress, MessageContent,
|
|
937
|
+
export { DeliveryErrorDetails, EmailAddress, EstimatedProviderCost, Message, MessageAddress, MessageContent, MessageDeliveryError, MessageDeliveryList, MessageDeliveryObservation, MessageEventId, MessageEventPage, MessageReceipt, MessageReplyObservation, MessageSender, MessageSubmission, MessagesGet200, MessagesGet400, MessagesGet401, MessagesGet403, MessagesGet404, MessagesGet422, MessagesGet500, MessagesGet504, MessagesGetContent200, MessagesGetContent400, MessagesGetContent401, MessagesGetContent403, MessagesGetContent404, MessagesGetContent422, MessagesGetContent500, MessagesGetContent504, MessagesGetContentPathParams, MessagesGetEmail200, MessagesGetEmail400, MessagesGetEmail401, MessagesGetEmail403, MessagesGetEmail404, MessagesGetEmail422, MessagesGetEmail500, MessagesGetEmail504, MessagesGetEmailPathParams, MessagesGetEmailQuery, MessagesGetEvents200, MessagesGetEvents400, MessagesGetEvents401, MessagesGetEvents403, MessagesGetEvents404, MessagesGetEvents422, MessagesGetEvents500, MessagesGetEvents504, MessagesGetEventsPathParams, MessagesGetEventsQuery, MessagesGetPathParams, MessagesGetStatus200, MessagesGetStatus400, MessagesGetStatus401, MessagesGetStatus403, MessagesGetStatus404, MessagesGetStatus422, MessagesGetStatus500, MessagesGetStatus504, MessagesGetStatusPathParams, MessagesGroup, MessagesList200, MessagesList400, MessagesList401, MessagesList403, MessagesList422, MessagesList500, MessagesList504, MessagesListDeliveries200, MessagesListDeliveries400, MessagesListDeliveries401, MessagesListDeliveries403, MessagesListDeliveries404, MessagesListDeliveries422, MessagesListDeliveries500, MessagesListDeliveries504, MessagesListDeliveriesPathParams, MessagesListQuery, MessagesRemove200, MessagesRemove400, MessagesRemove401, MessagesRemove403, MessagesRemove404, MessagesRemove422, MessagesRemove500, MessagesRemove502, MessagesRemove504, MessagesRemovePathParams, MessagesSend201, MessagesSend400, MessagesSend401, MessagesSend402, MessagesSend403, MessagesSend404, MessagesSend409, MessagesSend422, MessagesSend429, MessagesSend500, MessagesSend502, MessagesSend503, MessagesSend504, MessagesSendHeaders, MessagesSendRequestJson, MessagesValidateEmail200, MessagesValidateEmail400, MessagesValidateEmail401, MessagesValidateEmail403, MessagesValidateEmail404, MessagesValidateEmail422, MessagesValidateEmail500, MessagesValidateEmail503, MessagesValidateEmail504, MessagesValidateEmailRequestJson, SmsMessageContent, SubmissionClient, SubmissionCredential, ValidateEmailResponse, WhatsAppMessageContent, WhatsAppMessageReference, WhatsAppReceivedFlowResponse, WhatsAppReceivedReply, WhatsAppStoredContactCard, WhatsAppStoredFlowMessage, WhatsAppStoredInteractive, WhatsAppStoredLocation, WhatsAppStoredMedia, WhatsAppStoredReaction, WhatsAppStructuredContent };
|
|
905
938
|
|
|
906
939
|
//# sourceMappingURL=messages.js.map
|