shipmail 0.4.13 → 0.4.15
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/api-key-scopes.cjs +4 -0
- package/dist/api-key-scopes.cjs.map +1 -1
- package/dist/api-key-scopes.d.cts +1 -1
- package/dist/api-key-scopes.d.ts +1 -1
- package/dist/api-key-scopes.js +4 -0
- package/dist/api-key-scopes.js.map +1 -1
- package/dist/index.cjs +47 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -1
- package/dist/index.d.ts +124 -1
- package/dist/index.js +47 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -205,6 +205,121 @@ declare class Audiences extends ApiResource {
|
|
|
205
205
|
delete(id: string, options?: MethodOptions): Promise<void>;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
type AutomationTrigger = {
|
|
209
|
+
readonly type: "email_received";
|
|
210
|
+
readonly mailbox_ids: readonly string[];
|
|
211
|
+
} | {
|
|
212
|
+
readonly type: "scheduled";
|
|
213
|
+
readonly cron: string;
|
|
214
|
+
readonly time_zone: string;
|
|
215
|
+
} | {
|
|
216
|
+
readonly type: "manual";
|
|
217
|
+
readonly mailbox_ids: readonly string[];
|
|
218
|
+
} | {
|
|
219
|
+
readonly type: "thread_state";
|
|
220
|
+
readonly mailbox_ids: readonly string[];
|
|
221
|
+
readonly state: "no_reply_after";
|
|
222
|
+
readonly duration_minutes: number;
|
|
223
|
+
};
|
|
224
|
+
type AutomationCondition = {
|
|
225
|
+
readonly type: "sender_address";
|
|
226
|
+
readonly addresses: readonly string[];
|
|
227
|
+
} | {
|
|
228
|
+
readonly type: "sender_domain";
|
|
229
|
+
readonly domains: readonly string[];
|
|
230
|
+
} | {
|
|
231
|
+
readonly type: "subject_contains";
|
|
232
|
+
readonly values: readonly string[];
|
|
233
|
+
} | {
|
|
234
|
+
readonly type: "has_attachment";
|
|
235
|
+
readonly value: boolean;
|
|
236
|
+
} | {
|
|
237
|
+
readonly type: "semantic_positive_match";
|
|
238
|
+
readonly instruction: string;
|
|
239
|
+
readonly minimum_confidence: number;
|
|
240
|
+
};
|
|
241
|
+
type AutomationAction = {
|
|
242
|
+
readonly type: "create_reply_draft";
|
|
243
|
+
readonly instruction: string;
|
|
244
|
+
} | {
|
|
245
|
+
readonly type: "reply_to_trigger_sender";
|
|
246
|
+
readonly instruction: string;
|
|
247
|
+
} | {
|
|
248
|
+
readonly type: "archive_trigger_message";
|
|
249
|
+
} | {
|
|
250
|
+
readonly type: "move_trigger_message";
|
|
251
|
+
readonly mailbox_id: string;
|
|
252
|
+
readonly destination_folder_id: string;
|
|
253
|
+
} | {
|
|
254
|
+
readonly type: "set_trigger_read_state";
|
|
255
|
+
readonly is_read: boolean;
|
|
256
|
+
} | {
|
|
257
|
+
readonly type: "set_trigger_star_state";
|
|
258
|
+
readonly is_starred: boolean;
|
|
259
|
+
} | {
|
|
260
|
+
readonly type: "generate_mail_report";
|
|
261
|
+
readonly metric: "received" | "sent" | "unread";
|
|
262
|
+
readonly lookback_minutes: number;
|
|
263
|
+
};
|
|
264
|
+
type AutomationDefinition = {
|
|
265
|
+
readonly trigger: AutomationTrigger;
|
|
266
|
+
readonly conditions: readonly AutomationCondition[];
|
|
267
|
+
readonly actions: readonly AutomationAction[];
|
|
268
|
+
readonly mode: "draft" | "send";
|
|
269
|
+
readonly scope: {
|
|
270
|
+
readonly mailbox_ids: readonly string[];
|
|
271
|
+
readonly calendar_addresses: readonly string[];
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
type AutomationStatus = "active" | "paused" | "disabled";
|
|
275
|
+
type AutomationRunStatus = "queued" | "running" | "completed" | "failed" | "degraded" | "cancelled" | "skipped";
|
|
276
|
+
type AutomationRunSummary = {
|
|
277
|
+
readonly object: "automation_run";
|
|
278
|
+
readonly id: string;
|
|
279
|
+
readonly status: AutomationRunStatus;
|
|
280
|
+
readonly error_code: string | null;
|
|
281
|
+
readonly created_at: string;
|
|
282
|
+
};
|
|
283
|
+
type AutomationRun = {
|
|
284
|
+
readonly object: "automation_run";
|
|
285
|
+
readonly id: string;
|
|
286
|
+
readonly automation_id: string;
|
|
287
|
+
readonly status: "queued";
|
|
288
|
+
};
|
|
289
|
+
type Automation = {
|
|
290
|
+
readonly object: "automation";
|
|
291
|
+
readonly id: string;
|
|
292
|
+
readonly name: string;
|
|
293
|
+
readonly status: AutomationStatus;
|
|
294
|
+
readonly version_id: string;
|
|
295
|
+
readonly version: number;
|
|
296
|
+
readonly definition: AutomationDefinition;
|
|
297
|
+
readonly last_run: AutomationRunSummary | null;
|
|
298
|
+
readonly next_run_at: string | null;
|
|
299
|
+
readonly created_at: string;
|
|
300
|
+
readonly updated_at: string;
|
|
301
|
+
};
|
|
302
|
+
type CreateAutomationParams = {
|
|
303
|
+
readonly name: string;
|
|
304
|
+
readonly definition: AutomationDefinition;
|
|
305
|
+
};
|
|
306
|
+
type UpdateAutomationParams = {
|
|
307
|
+
readonly name?: string | undefined;
|
|
308
|
+
readonly definition?: AutomationDefinition | undefined;
|
|
309
|
+
readonly status?: AutomationStatus | undefined;
|
|
310
|
+
};
|
|
311
|
+
type ListAutomationsResponse = {
|
|
312
|
+
readonly data: readonly Automation[];
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
declare class Automations extends ApiResource {
|
|
316
|
+
list(options?: MethodOptions): Promise<ListAutomationsResponse>;
|
|
317
|
+
create(params: CreateAutomationParams, options?: MethodOptions): Promise<Automation>;
|
|
318
|
+
get(id: string, options?: MethodOptions): Promise<Automation>;
|
|
319
|
+
update(id: string, params: UpdateAutomationParams, options?: MethodOptions): Promise<Automation>;
|
|
320
|
+
run(id: string, options?: MethodOptions): Promise<AutomationRun>;
|
|
321
|
+
}
|
|
322
|
+
|
|
208
323
|
declare const CONFERENCING_PROVIDER_IDS: readonly ["zoom", "google_meet"];
|
|
209
324
|
type ConferencingProviderId = (typeof CONFERENCING_PROVIDER_IDS)[number];
|
|
210
325
|
type BookingPage = {
|
|
@@ -274,6 +389,7 @@ declare class BookingPages extends ApiResource {
|
|
|
274
389
|
type CalendarEventStatus = "confirmed" | "tentative" | "cancelled";
|
|
275
390
|
type CalendarFreeBusyStatus = "free" | "busy";
|
|
276
391
|
type CalendarEventPrivacy = "public" | "private" | "secret";
|
|
392
|
+
type CalendarInvitationLanguage = "en" | "fr" | "es";
|
|
277
393
|
type RecurrenceFrequency = "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly";
|
|
278
394
|
type Weekday = "mo" | "tu" | "we" | "th" | "fr" | "sa" | "su";
|
|
279
395
|
type RecurrenceNDay = {
|
|
@@ -308,6 +424,7 @@ type CalendarEvent = {
|
|
|
308
424
|
readonly calendar_id: string | null;
|
|
309
425
|
readonly uid: string | null;
|
|
310
426
|
readonly title: string | null;
|
|
427
|
+
readonly invitation_language: CalendarInvitationLanguage;
|
|
311
428
|
readonly description: string | null;
|
|
312
429
|
readonly location: string | null;
|
|
313
430
|
readonly video_url: string | null;
|
|
@@ -345,6 +462,7 @@ type CreateCalendarEventParams = {
|
|
|
345
462
|
readonly mailbox: string;
|
|
346
463
|
readonly calendar_id?: string | undefined;
|
|
347
464
|
readonly title: string;
|
|
465
|
+
readonly invitation_language?: CalendarInvitationLanguage | undefined;
|
|
348
466
|
readonly start: string;
|
|
349
467
|
readonly description?: string | undefined;
|
|
350
468
|
readonly timezone?: string | undefined;
|
|
@@ -363,6 +481,7 @@ type CreateCalendarEventParams = {
|
|
|
363
481
|
type UpdateCalendarEventParams = {
|
|
364
482
|
readonly mailbox: string;
|
|
365
483
|
readonly title?: string | undefined;
|
|
484
|
+
readonly invitation_language?: CalendarInvitationLanguage | undefined;
|
|
366
485
|
readonly description?: string | null | undefined;
|
|
367
486
|
readonly start?: string | undefined;
|
|
368
487
|
readonly timezone?: string | null | undefined;
|
|
@@ -1422,6 +1541,7 @@ type Newsletter = {
|
|
|
1422
1541
|
readonly body_text: string | null;
|
|
1423
1542
|
readonly status: NewsletterStatus;
|
|
1424
1543
|
readonly archive_visibility: NewsletterArchiveVisibility;
|
|
1544
|
+
readonly feed_entry_url: string | null;
|
|
1425
1545
|
readonly styling_mode: NewsletterStylingMode;
|
|
1426
1546
|
readonly preflight_status: NewsletterPreflightStatus;
|
|
1427
1547
|
readonly preflight_results: Record<string, unknown>;
|
|
@@ -1509,6 +1629,7 @@ type CreateNewsletterParams = {
|
|
|
1509
1629
|
readonly blocks?: readonly NewsletterBlock[] | undefined;
|
|
1510
1630
|
readonly send_window_hours?: number | undefined;
|
|
1511
1631
|
readonly archive_visibility?: NewsletterArchiveVisibility | undefined;
|
|
1632
|
+
readonly feed_entry_url?: string | null | undefined;
|
|
1512
1633
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1513
1634
|
};
|
|
1514
1635
|
type UpdateNewsletterParams = Partial<CreateNewsletterParams>;
|
|
@@ -1547,6 +1668,7 @@ type CreateNewsletterFromChangelogParams = {
|
|
|
1547
1668
|
} | undefined;
|
|
1548
1669
|
readonly send_window_hours?: number | undefined;
|
|
1549
1670
|
readonly archive_visibility?: NewsletterArchiveVisibility | undefined;
|
|
1671
|
+
readonly feed_entry_url?: string | null | undefined;
|
|
1550
1672
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1551
1673
|
};
|
|
1552
1674
|
type ListNewsletterDomainsParams = PaginationParams;
|
|
@@ -2030,6 +2152,7 @@ declare class ShipmailClient {
|
|
|
2030
2152
|
private readonly defaultHeaders;
|
|
2031
2153
|
private readonly organizationId;
|
|
2032
2154
|
readonly audiences: Audiences;
|
|
2155
|
+
readonly automations: Automations;
|
|
2033
2156
|
readonly bookingPages: BookingPages;
|
|
2034
2157
|
readonly capabilities: Capabilities;
|
|
2035
2158
|
readonly calendar: Calendar;
|
|
@@ -2128,4 +2251,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2128
2251
|
readonly toleranceInSeconds?: number | undefined;
|
|
2129
2252
|
}): Promise<WebhookEvent>;
|
|
2130
2253
|
|
|
2131
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipmailClient as default, verifyWebhook };
|
|
2254
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipmailClient as default, verifyWebhook };
|
package/dist/index.d.ts
CHANGED
|
@@ -205,6 +205,121 @@ declare class Audiences extends ApiResource {
|
|
|
205
205
|
delete(id: string, options?: MethodOptions): Promise<void>;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
type AutomationTrigger = {
|
|
209
|
+
readonly type: "email_received";
|
|
210
|
+
readonly mailbox_ids: readonly string[];
|
|
211
|
+
} | {
|
|
212
|
+
readonly type: "scheduled";
|
|
213
|
+
readonly cron: string;
|
|
214
|
+
readonly time_zone: string;
|
|
215
|
+
} | {
|
|
216
|
+
readonly type: "manual";
|
|
217
|
+
readonly mailbox_ids: readonly string[];
|
|
218
|
+
} | {
|
|
219
|
+
readonly type: "thread_state";
|
|
220
|
+
readonly mailbox_ids: readonly string[];
|
|
221
|
+
readonly state: "no_reply_after";
|
|
222
|
+
readonly duration_minutes: number;
|
|
223
|
+
};
|
|
224
|
+
type AutomationCondition = {
|
|
225
|
+
readonly type: "sender_address";
|
|
226
|
+
readonly addresses: readonly string[];
|
|
227
|
+
} | {
|
|
228
|
+
readonly type: "sender_domain";
|
|
229
|
+
readonly domains: readonly string[];
|
|
230
|
+
} | {
|
|
231
|
+
readonly type: "subject_contains";
|
|
232
|
+
readonly values: readonly string[];
|
|
233
|
+
} | {
|
|
234
|
+
readonly type: "has_attachment";
|
|
235
|
+
readonly value: boolean;
|
|
236
|
+
} | {
|
|
237
|
+
readonly type: "semantic_positive_match";
|
|
238
|
+
readonly instruction: string;
|
|
239
|
+
readonly minimum_confidence: number;
|
|
240
|
+
};
|
|
241
|
+
type AutomationAction = {
|
|
242
|
+
readonly type: "create_reply_draft";
|
|
243
|
+
readonly instruction: string;
|
|
244
|
+
} | {
|
|
245
|
+
readonly type: "reply_to_trigger_sender";
|
|
246
|
+
readonly instruction: string;
|
|
247
|
+
} | {
|
|
248
|
+
readonly type: "archive_trigger_message";
|
|
249
|
+
} | {
|
|
250
|
+
readonly type: "move_trigger_message";
|
|
251
|
+
readonly mailbox_id: string;
|
|
252
|
+
readonly destination_folder_id: string;
|
|
253
|
+
} | {
|
|
254
|
+
readonly type: "set_trigger_read_state";
|
|
255
|
+
readonly is_read: boolean;
|
|
256
|
+
} | {
|
|
257
|
+
readonly type: "set_trigger_star_state";
|
|
258
|
+
readonly is_starred: boolean;
|
|
259
|
+
} | {
|
|
260
|
+
readonly type: "generate_mail_report";
|
|
261
|
+
readonly metric: "received" | "sent" | "unread";
|
|
262
|
+
readonly lookback_minutes: number;
|
|
263
|
+
};
|
|
264
|
+
type AutomationDefinition = {
|
|
265
|
+
readonly trigger: AutomationTrigger;
|
|
266
|
+
readonly conditions: readonly AutomationCondition[];
|
|
267
|
+
readonly actions: readonly AutomationAction[];
|
|
268
|
+
readonly mode: "draft" | "send";
|
|
269
|
+
readonly scope: {
|
|
270
|
+
readonly mailbox_ids: readonly string[];
|
|
271
|
+
readonly calendar_addresses: readonly string[];
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
type AutomationStatus = "active" | "paused" | "disabled";
|
|
275
|
+
type AutomationRunStatus = "queued" | "running" | "completed" | "failed" | "degraded" | "cancelled" | "skipped";
|
|
276
|
+
type AutomationRunSummary = {
|
|
277
|
+
readonly object: "automation_run";
|
|
278
|
+
readonly id: string;
|
|
279
|
+
readonly status: AutomationRunStatus;
|
|
280
|
+
readonly error_code: string | null;
|
|
281
|
+
readonly created_at: string;
|
|
282
|
+
};
|
|
283
|
+
type AutomationRun = {
|
|
284
|
+
readonly object: "automation_run";
|
|
285
|
+
readonly id: string;
|
|
286
|
+
readonly automation_id: string;
|
|
287
|
+
readonly status: "queued";
|
|
288
|
+
};
|
|
289
|
+
type Automation = {
|
|
290
|
+
readonly object: "automation";
|
|
291
|
+
readonly id: string;
|
|
292
|
+
readonly name: string;
|
|
293
|
+
readonly status: AutomationStatus;
|
|
294
|
+
readonly version_id: string;
|
|
295
|
+
readonly version: number;
|
|
296
|
+
readonly definition: AutomationDefinition;
|
|
297
|
+
readonly last_run: AutomationRunSummary | null;
|
|
298
|
+
readonly next_run_at: string | null;
|
|
299
|
+
readonly created_at: string;
|
|
300
|
+
readonly updated_at: string;
|
|
301
|
+
};
|
|
302
|
+
type CreateAutomationParams = {
|
|
303
|
+
readonly name: string;
|
|
304
|
+
readonly definition: AutomationDefinition;
|
|
305
|
+
};
|
|
306
|
+
type UpdateAutomationParams = {
|
|
307
|
+
readonly name?: string | undefined;
|
|
308
|
+
readonly definition?: AutomationDefinition | undefined;
|
|
309
|
+
readonly status?: AutomationStatus | undefined;
|
|
310
|
+
};
|
|
311
|
+
type ListAutomationsResponse = {
|
|
312
|
+
readonly data: readonly Automation[];
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
declare class Automations extends ApiResource {
|
|
316
|
+
list(options?: MethodOptions): Promise<ListAutomationsResponse>;
|
|
317
|
+
create(params: CreateAutomationParams, options?: MethodOptions): Promise<Automation>;
|
|
318
|
+
get(id: string, options?: MethodOptions): Promise<Automation>;
|
|
319
|
+
update(id: string, params: UpdateAutomationParams, options?: MethodOptions): Promise<Automation>;
|
|
320
|
+
run(id: string, options?: MethodOptions): Promise<AutomationRun>;
|
|
321
|
+
}
|
|
322
|
+
|
|
208
323
|
declare const CONFERENCING_PROVIDER_IDS: readonly ["zoom", "google_meet"];
|
|
209
324
|
type ConferencingProviderId = (typeof CONFERENCING_PROVIDER_IDS)[number];
|
|
210
325
|
type BookingPage = {
|
|
@@ -274,6 +389,7 @@ declare class BookingPages extends ApiResource {
|
|
|
274
389
|
type CalendarEventStatus = "confirmed" | "tentative" | "cancelled";
|
|
275
390
|
type CalendarFreeBusyStatus = "free" | "busy";
|
|
276
391
|
type CalendarEventPrivacy = "public" | "private" | "secret";
|
|
392
|
+
type CalendarInvitationLanguage = "en" | "fr" | "es";
|
|
277
393
|
type RecurrenceFrequency = "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly";
|
|
278
394
|
type Weekday = "mo" | "tu" | "we" | "th" | "fr" | "sa" | "su";
|
|
279
395
|
type RecurrenceNDay = {
|
|
@@ -308,6 +424,7 @@ type CalendarEvent = {
|
|
|
308
424
|
readonly calendar_id: string | null;
|
|
309
425
|
readonly uid: string | null;
|
|
310
426
|
readonly title: string | null;
|
|
427
|
+
readonly invitation_language: CalendarInvitationLanguage;
|
|
311
428
|
readonly description: string | null;
|
|
312
429
|
readonly location: string | null;
|
|
313
430
|
readonly video_url: string | null;
|
|
@@ -345,6 +462,7 @@ type CreateCalendarEventParams = {
|
|
|
345
462
|
readonly mailbox: string;
|
|
346
463
|
readonly calendar_id?: string | undefined;
|
|
347
464
|
readonly title: string;
|
|
465
|
+
readonly invitation_language?: CalendarInvitationLanguage | undefined;
|
|
348
466
|
readonly start: string;
|
|
349
467
|
readonly description?: string | undefined;
|
|
350
468
|
readonly timezone?: string | undefined;
|
|
@@ -363,6 +481,7 @@ type CreateCalendarEventParams = {
|
|
|
363
481
|
type UpdateCalendarEventParams = {
|
|
364
482
|
readonly mailbox: string;
|
|
365
483
|
readonly title?: string | undefined;
|
|
484
|
+
readonly invitation_language?: CalendarInvitationLanguage | undefined;
|
|
366
485
|
readonly description?: string | null | undefined;
|
|
367
486
|
readonly start?: string | undefined;
|
|
368
487
|
readonly timezone?: string | null | undefined;
|
|
@@ -1422,6 +1541,7 @@ type Newsletter = {
|
|
|
1422
1541
|
readonly body_text: string | null;
|
|
1423
1542
|
readonly status: NewsletterStatus;
|
|
1424
1543
|
readonly archive_visibility: NewsletterArchiveVisibility;
|
|
1544
|
+
readonly feed_entry_url: string | null;
|
|
1425
1545
|
readonly styling_mode: NewsletterStylingMode;
|
|
1426
1546
|
readonly preflight_status: NewsletterPreflightStatus;
|
|
1427
1547
|
readonly preflight_results: Record<string, unknown>;
|
|
@@ -1509,6 +1629,7 @@ type CreateNewsletterParams = {
|
|
|
1509
1629
|
readonly blocks?: readonly NewsletterBlock[] | undefined;
|
|
1510
1630
|
readonly send_window_hours?: number | undefined;
|
|
1511
1631
|
readonly archive_visibility?: NewsletterArchiveVisibility | undefined;
|
|
1632
|
+
readonly feed_entry_url?: string | null | undefined;
|
|
1512
1633
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1513
1634
|
};
|
|
1514
1635
|
type UpdateNewsletterParams = Partial<CreateNewsletterParams>;
|
|
@@ -1547,6 +1668,7 @@ type CreateNewsletterFromChangelogParams = {
|
|
|
1547
1668
|
} | undefined;
|
|
1548
1669
|
readonly send_window_hours?: number | undefined;
|
|
1549
1670
|
readonly archive_visibility?: NewsletterArchiveVisibility | undefined;
|
|
1671
|
+
readonly feed_entry_url?: string | null | undefined;
|
|
1550
1672
|
readonly styling_mode?: NewsletterStylingMode | undefined;
|
|
1551
1673
|
};
|
|
1552
1674
|
type ListNewsletterDomainsParams = PaginationParams;
|
|
@@ -2030,6 +2152,7 @@ declare class ShipmailClient {
|
|
|
2030
2152
|
private readonly defaultHeaders;
|
|
2031
2153
|
private readonly organizationId;
|
|
2032
2154
|
readonly audiences: Audiences;
|
|
2155
|
+
readonly automations: Automations;
|
|
2033
2156
|
readonly bookingPages: BookingPages;
|
|
2034
2157
|
readonly capabilities: Capabilities;
|
|
2035
2158
|
readonly calendar: Calendar;
|
|
@@ -2128,4 +2251,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
|
|
|
2128
2251
|
readonly toleranceInSeconds?: number | undefined;
|
|
2129
2252
|
}): Promise<WebhookEvent>;
|
|
2130
2253
|
|
|
2131
|
-
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipmailClient as default, verifyWebhook };
|
|
2254
|
+
export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, type AudienceFeed, AuthenticationError, AuthorizationError, type Automation, type AutomationAction, type AutomationCondition, type AutomationDefinition, type AutomationRun, type AutomationRunStatus, type AutomationRunSummary, type AutomationStatus, type AutomationTrigger, type BookingPage, CONFERENCING_PROVIDER_IDS, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, type CalendarInvitationLanguage, type CapabilitiesResponse, type CapabilityResourceConstraints, type ConferencingProviderId, ConflictError, ConnectionError, type ConsumePartnerMailboxCredentialGrantParams, type CreateAudienceParams, type CreateAutomationParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateInboxReplyDraftParams, type CreateMailboxAppPasswordParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreatePartnerOrganizationParams, type CreateReplyScanParams, type CreateWebhookParams, type CreatedMailboxAppPassword, type CreatedPartnerOrganization, DOMAIN_STATUSES, type DataMode, type DeleteCalendarEventParams, type Domain, type DomainDnsRecord, type DomainDnsRecordKey, type DomainDnsRecordSet, type DomainDnsRecordStatus, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailAuthVerdict, type EmailAuthenticationResults, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetCalendarEventParams, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxReplyDraft, type InboxReplyDraftSend, type InboxThread, type InboxThreadReplyState, type InboxThreadReplyStateResult, type InboxThreadSummary, type InboxThreads, type InjectSandboxInboundParams, InternalServerError, type ListAudiencesParams, type ListAutomationsResponse, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListInboxThreadsParams, type ListMailboxesParams, type ListMessageAnalyticsParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewsletterSenderIdentitiesParams, type ListNewslettersParams, type ListReplyScanResultsParams, type ListScheduledMessagesParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, type MailboxAppPassword, type MailboxAppPasswordList, type MailboxAppPasswordPurpose, type MailboxAppPasswordState, type MailboxExport, type MailboxExportErrorCode, type MailboxExportStatus, type MailboxFolder, type MailboxFolders, type MailboxIdentities, type MailboxIdentity, type MailboxRule, type MailboxRuleAction, type MailboxRuleCondition, type MailboxRuleFolder, type MailboxRuleMatchMode, type MailboxRuleMoveTarget, type MailboxRules, type MergeFields, type Message, type MessageAnalytics, type MessageAnalyticsPage, type MessageMetadata, type MessageRuleDisposition, type MessageSource, type MessageStatus, type MethodOptions, type MoveInboxMessageParams, type Newsletter, type NewsletterArchiveVisibility, type NewsletterAsset, type NewsletterAssetKind, type NewsletterAssetListResponse, type NewsletterAssetStorageUsage, type NewsletterBlock, type NewsletterButtonAlign, type NewsletterCalloutVariant, type NewsletterChangelogEntry, type NewsletterChangelogMedia, type NewsletterChangelogTone, type NewsletterColumnContent, type NewsletterColumnRatio, type NewsletterCountedUrl, type NewsletterDomain, type NewsletterDomainRecordStatus, type NewsletterDomainStatus, type NewsletterPreflight, type NewsletterPreflightItem, type NewsletterPreflightItemStatus, type NewsletterPreflightStatus, type NewsletterPreview, type NewsletterSenderIdentity, type NewsletterStatus, type NewsletterStylingMode, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, type OneTimeSecretMethodOptions, type OutboundHeader, Page, type PaginatedResponse, type PaginationParams, type PartnerDataClassification, type PartnerMailboxCredential, type PartnerMailboxCredentialGrant, type PartnerMailboxCredentialGrantList, type PartnerOrganization, type PartnerOrganizationList, type PartnerOrganizationStatus, type PartnerOwnershipInvitation, type PartnerUsage, type PrepareStagedAttachmentUploadParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyScan, type ReplyScanCandidate, type ReplyScanResults, type ReplyScanStatus, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type SandboxOutcome, type ScheduleNewsletterParams, type ScheduledMessage, type ScheduledMessageAttachment, type ScheduledMessageList, type ScheduledMessageRecipient, type ScheduledMessageUploadedAttachment, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipmailClient, type ShipmailConfig, ShipmailError, type StageAttachmentParams, type StagedAttachment, type StagedAttachmentUpload, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type TransactionalRecipientBudget, type UpdateAudienceFeedParams, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateAutomationParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateInboxThreadReplyStateParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdatePartnerOrganizationParams, type UpdateScheduledMessageParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_EVENT_TYPES, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryDetail, type WebhookDeliveryEventType, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipmailClient as default, verifyWebhook };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,8 @@ var API_KEY_SCOPES = [
|
|
|
3
3
|
"*",
|
|
4
4
|
"audiences:read",
|
|
5
5
|
"audiences:write",
|
|
6
|
+
"automations:read",
|
|
7
|
+
"automations:write",
|
|
6
8
|
"booking_pages:read",
|
|
7
9
|
"booking_pages:write",
|
|
8
10
|
"calendar:read",
|
|
@@ -39,6 +41,8 @@ var API_KEY_SCOPE_DESCRIPTIONS = {
|
|
|
39
41
|
"*": "All non-partner API endpoints in this organization.",
|
|
40
42
|
"audiences:read": "List and retrieve newsletter audiences and their subscribers.",
|
|
41
43
|
"audiences:write": "Create audiences and add, update, or remove their subscribers.",
|
|
44
|
+
"automations:read": "List and retrieve assistant automations.",
|
|
45
|
+
"automations:write": "Create, update, and manually run assistant automations.",
|
|
42
46
|
"booking_pages:read": "List and retrieve booking pages.",
|
|
43
47
|
"booking_pages:write": "Create, update, and delete booking pages.",
|
|
44
48
|
"calendar:read": "List and retrieve calendar events and open availability.",
|
|
@@ -393,6 +397,47 @@ var Audiences = class extends ApiResource {
|
|
|
393
397
|
}
|
|
394
398
|
};
|
|
395
399
|
|
|
400
|
+
// src/resources/automations.ts
|
|
401
|
+
var Automations = class extends ApiResource {
|
|
402
|
+
list(options) {
|
|
403
|
+
return this.client.request({
|
|
404
|
+
method: "GET",
|
|
405
|
+
path: "/automations",
|
|
406
|
+
methodOptions: options
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
create(params, options) {
|
|
410
|
+
return this.client.request({
|
|
411
|
+
method: "POST",
|
|
412
|
+
path: "/automations",
|
|
413
|
+
body: params,
|
|
414
|
+
methodOptions: options
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
get(id, options) {
|
|
418
|
+
return this.client.request({
|
|
419
|
+
method: "GET",
|
|
420
|
+
path: `/automations/${encodeURIComponent(id)}`,
|
|
421
|
+
methodOptions: options
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
update(id, params, options) {
|
|
425
|
+
return this.client.request({
|
|
426
|
+
method: "PATCH",
|
|
427
|
+
path: `/automations/${encodeURIComponent(id)}`,
|
|
428
|
+
body: params,
|
|
429
|
+
methodOptions: options
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
run(id, options) {
|
|
433
|
+
return this.client.request({
|
|
434
|
+
method: "POST",
|
|
435
|
+
path: `/automations/${encodeURIComponent(id)}/run`,
|
|
436
|
+
methodOptions: options
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
|
|
396
441
|
// src/resources/booking-pages.ts
|
|
397
442
|
var BookingPages = class extends ApiResource {
|
|
398
443
|
create(params, options) {
|
|
@@ -1564,7 +1609,7 @@ var Webhooks = class extends ApiResource {
|
|
|
1564
1609
|
};
|
|
1565
1610
|
|
|
1566
1611
|
// src/version.ts
|
|
1567
|
-
var VERSION = "0.4.
|
|
1612
|
+
var VERSION = "0.4.15";
|
|
1568
1613
|
|
|
1569
1614
|
// src/client.ts
|
|
1570
1615
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -1618,6 +1663,7 @@ var ShipmailClient = class {
|
|
|
1618
1663
|
this.organizationId = config.organizationId;
|
|
1619
1664
|
}
|
|
1620
1665
|
this.audiences = new Audiences(this);
|
|
1666
|
+
this.automations = new Automations(this);
|
|
1621
1667
|
this.bookingPages = new BookingPages(this);
|
|
1622
1668
|
this.capabilities = new Capabilities(this);
|
|
1623
1669
|
this.calendar = new Calendar(this);
|