shipmail 0.1.29 → 0.1.30

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/index.d.cts CHANGED
@@ -161,6 +161,200 @@ declare class Audiences extends ApiResource {
161
161
  delete(id: string, options?: MethodOptions): Promise<void>;
162
162
  }
163
163
 
164
+ type BookingPage = {
165
+ readonly object: "booking_page";
166
+ readonly id: string;
167
+ readonly mailbox: string;
168
+ readonly slug: string;
169
+ readonly url: string | null;
170
+ readonly name: string;
171
+ readonly description: string | null;
172
+ readonly duration_minutes: number;
173
+ readonly availability_days: readonly number[];
174
+ readonly window_start_minutes: number;
175
+ readonly window_end_minutes: number;
176
+ readonly timezone: string;
177
+ readonly buffer_minutes: number;
178
+ readonly minimum_notice_minutes: number;
179
+ readonly max_advance_days: number;
180
+ readonly active: boolean;
181
+ readonly created_at: string;
182
+ readonly updated_at: string;
183
+ };
184
+ type ListBookingPagesParams = PaginationParams;
185
+ type CreateBookingPageParams = {
186
+ readonly name: string;
187
+ readonly mailbox: string;
188
+ readonly slug: string;
189
+ readonly duration_minutes: number;
190
+ readonly availability_days: readonly number[];
191
+ readonly window_start_minutes: number;
192
+ readonly window_end_minutes: number;
193
+ readonly timezone: string;
194
+ readonly description?: string | null | undefined;
195
+ readonly buffer_minutes?: number | undefined;
196
+ readonly minimum_notice_minutes?: number | undefined;
197
+ readonly max_advance_days?: number | undefined;
198
+ readonly active?: boolean | undefined;
199
+ };
200
+ type UpdateBookingPageParams = {
201
+ readonly name?: string | undefined;
202
+ readonly mailbox?: string | undefined;
203
+ readonly slug?: string | undefined;
204
+ readonly duration_minutes?: number | undefined;
205
+ readonly availability_days?: readonly number[] | undefined;
206
+ readonly window_start_minutes?: number | undefined;
207
+ readonly window_end_minutes?: number | undefined;
208
+ readonly timezone?: string | undefined;
209
+ readonly description?: string | null | undefined;
210
+ readonly buffer_minutes?: number | undefined;
211
+ readonly minimum_notice_minutes?: number | undefined;
212
+ readonly max_advance_days?: number | undefined;
213
+ readonly active?: boolean | undefined;
214
+ };
215
+
216
+ declare class BookingPages extends ApiResource {
217
+ create(params: CreateBookingPageParams, options?: MethodOptions): Promise<BookingPage>;
218
+ list(params?: ListBookingPagesParams, options?: MethodOptions): Promise<PaginatedResponse<BookingPage>>;
219
+ listAutoPaginating(params?: Omit<ListBookingPagesParams, "cursor">): Page<BookingPage>;
220
+ get(id: string, options?: MethodOptions): Promise<BookingPage>;
221
+ update(id: string, params: UpdateBookingPageParams, options?: MethodOptions): Promise<BookingPage>;
222
+ delete(id: string, options?: MethodOptions): Promise<void>;
223
+ }
224
+
225
+ type CalendarEventStatus = "confirmed" | "tentative" | "cancelled";
226
+ type CalendarFreeBusyStatus = "free" | "busy";
227
+ type CalendarEventPrivacy = "public" | "private" | "secret";
228
+ type RecurrenceFrequency = "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly";
229
+ type Weekday = "mo" | "tu" | "we" | "th" | "fr" | "sa" | "su";
230
+ type RecurrenceNDay = {
231
+ readonly day: Weekday;
232
+ readonly nth_of_period?: number | undefined;
233
+ };
234
+ type Recurrence = {
235
+ readonly frequency: RecurrenceFrequency;
236
+ readonly interval?: number | undefined;
237
+ readonly count?: number | undefined;
238
+ readonly until?: string | undefined;
239
+ readonly by_day?: readonly RecurrenceNDay[] | undefined;
240
+ };
241
+ type Reminder = {
242
+ readonly minutes_before: number;
243
+ };
244
+ type CalendarEvent = {
245
+ readonly object: "calendar_event";
246
+ readonly id: string;
247
+ readonly mailbox: string;
248
+ readonly calendar_id: string | null;
249
+ readonly uid: string | null;
250
+ readonly title: string | null;
251
+ readonly description: string | null;
252
+ readonly location: string | null;
253
+ readonly video_url: string | null;
254
+ readonly all_day: boolean;
255
+ readonly start: string;
256
+ readonly end: string;
257
+ readonly timezone: string | null;
258
+ readonly duration: string | null;
259
+ readonly status: CalendarEventStatus | null;
260
+ readonly free_busy_status: CalendarFreeBusyStatus | null;
261
+ readonly privacy: CalendarEventPrivacy | null;
262
+ readonly color: string | null;
263
+ readonly recurrence: Recurrence | null;
264
+ readonly recurrence_id: string | null;
265
+ readonly reminders: readonly Reminder[];
266
+ readonly created_at: string | null;
267
+ readonly updated_at: string | null;
268
+ };
269
+ type ListCalendarEventsParams = PaginationParams & {
270
+ readonly mailbox: string;
271
+ readonly from: string;
272
+ readonly to: string;
273
+ readonly expand?: boolean | undefined;
274
+ readonly calendar_id?: string | undefined;
275
+ };
276
+ type GetCalendarEventParams = {
277
+ readonly mailbox: string;
278
+ };
279
+ type DeleteCalendarEventParams = {
280
+ readonly mailbox: string;
281
+ };
282
+ type CreateCalendarEventParams = {
283
+ readonly mailbox: string;
284
+ readonly calendar_id?: string | undefined;
285
+ readonly title: string;
286
+ readonly start: string;
287
+ readonly description?: string | undefined;
288
+ readonly timezone?: string | undefined;
289
+ readonly duration?: string | undefined;
290
+ readonly all_day?: boolean | undefined;
291
+ readonly location?: string | undefined;
292
+ readonly video_url?: string | undefined;
293
+ readonly color?: string | undefined;
294
+ readonly status?: CalendarEventStatus | undefined;
295
+ readonly free_busy_status?: CalendarFreeBusyStatus | undefined;
296
+ readonly privacy?: CalendarEventPrivacy | undefined;
297
+ readonly recurrence?: Recurrence | undefined;
298
+ readonly reminders?: readonly Reminder[] | undefined;
299
+ };
300
+ type UpdateCalendarEventParams = {
301
+ readonly mailbox: string;
302
+ readonly title?: string | undefined;
303
+ readonly description?: string | null | undefined;
304
+ readonly start?: string | undefined;
305
+ readonly timezone?: string | null | undefined;
306
+ readonly duration?: string | undefined;
307
+ readonly all_day?: boolean | undefined;
308
+ readonly location?: string | null | undefined;
309
+ readonly video_url?: string | null | undefined;
310
+ readonly color?: string | undefined;
311
+ readonly status?: CalendarEventStatus | undefined;
312
+ readonly free_busy_status?: CalendarFreeBusyStatus | undefined;
313
+ readonly privacy?: CalendarEventPrivacy | undefined;
314
+ readonly recurrence?: Recurrence | null | undefined;
315
+ readonly reminders?: readonly Reminder[] | null | undefined;
316
+ };
317
+ type CalendarAvailabilitySlot = {
318
+ readonly start: string;
319
+ readonly end: string;
320
+ };
321
+ type CalendarAvailability = {
322
+ readonly object: "calendar_availability";
323
+ readonly mailbox: string;
324
+ readonly from: string;
325
+ readonly to: string;
326
+ readonly duration_minutes: number;
327
+ readonly timezone: string;
328
+ readonly slots: readonly CalendarAvailabilitySlot[];
329
+ };
330
+ type CalendarAvailabilityParams = {
331
+ readonly mailbox: string;
332
+ readonly from: string;
333
+ readonly to: string;
334
+ readonly duration?: number | undefined;
335
+ readonly interval?: number | undefined;
336
+ readonly timezone?: string | undefined;
337
+ readonly days?: readonly number[] | undefined;
338
+ readonly window_start?: number | undefined;
339
+ readonly window_end?: number | undefined;
340
+ readonly buffer?: number | undefined;
341
+ readonly minimum_notice?: number | undefined;
342
+ };
343
+
344
+ declare class CalendarEvents extends ApiResource {
345
+ create(params: CreateCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
346
+ list(params: ListCalendarEventsParams, options?: MethodOptions): Promise<PaginatedResponse<CalendarEvent>>;
347
+ listAutoPaginating(params: Omit<ListCalendarEventsParams, "cursor">): Page<CalendarEvent>;
348
+ get(id: string, params: GetCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
349
+ update(id: string, params: UpdateCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
350
+ delete(id: string, params: DeleteCalendarEventParams, options?: MethodOptions): Promise<void>;
351
+ }
352
+ declare class Calendar extends ApiResource {
353
+ readonly events: CalendarEvents;
354
+ constructor(client: ShipMailClient);
355
+ availability(params: CalendarAvailabilityParams, options?: MethodOptions): Promise<CalendarAvailability>;
356
+ }
357
+
164
358
  type Domain = {
165
359
  readonly object: "domain";
166
360
  readonly id: string;
@@ -1159,6 +1353,8 @@ declare class ShipMailClient {
1159
1353
  private readonly fetchFn;
1160
1354
  private readonly defaultHeaders;
1161
1355
  readonly audiences: Audiences;
1356
+ readonly bookingPages: BookingPages;
1357
+ readonly calendar: Calendar;
1162
1358
  readonly domains: Domains;
1163
1359
  readonly mailboxes: Mailboxes;
1164
1360
  readonly messages: Messages;
@@ -1251,4 +1447,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1251
1447
  readonly toleranceInSeconds?: number | undefined;
1252
1448
  }): Promise<WebhookEvent>;
1253
1449
 
1254
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, ConflictError, ConnectionError, type CreateAudienceParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type Domain, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, InternalServerError, type ListAudiencesParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, 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 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 NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, ShipMailClient as default, verifyWebhook };
1450
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, ConflictError, ConnectionError, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type DeleteCalendarEventParams, type Domain, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, 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 InboxThread, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, 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 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 NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
package/dist/index.d.ts CHANGED
@@ -161,6 +161,200 @@ declare class Audiences extends ApiResource {
161
161
  delete(id: string, options?: MethodOptions): Promise<void>;
162
162
  }
163
163
 
164
+ type BookingPage = {
165
+ readonly object: "booking_page";
166
+ readonly id: string;
167
+ readonly mailbox: string;
168
+ readonly slug: string;
169
+ readonly url: string | null;
170
+ readonly name: string;
171
+ readonly description: string | null;
172
+ readonly duration_minutes: number;
173
+ readonly availability_days: readonly number[];
174
+ readonly window_start_minutes: number;
175
+ readonly window_end_minutes: number;
176
+ readonly timezone: string;
177
+ readonly buffer_minutes: number;
178
+ readonly minimum_notice_minutes: number;
179
+ readonly max_advance_days: number;
180
+ readonly active: boolean;
181
+ readonly created_at: string;
182
+ readonly updated_at: string;
183
+ };
184
+ type ListBookingPagesParams = PaginationParams;
185
+ type CreateBookingPageParams = {
186
+ readonly name: string;
187
+ readonly mailbox: string;
188
+ readonly slug: string;
189
+ readonly duration_minutes: number;
190
+ readonly availability_days: readonly number[];
191
+ readonly window_start_minutes: number;
192
+ readonly window_end_minutes: number;
193
+ readonly timezone: string;
194
+ readonly description?: string | null | undefined;
195
+ readonly buffer_minutes?: number | undefined;
196
+ readonly minimum_notice_minutes?: number | undefined;
197
+ readonly max_advance_days?: number | undefined;
198
+ readonly active?: boolean | undefined;
199
+ };
200
+ type UpdateBookingPageParams = {
201
+ readonly name?: string | undefined;
202
+ readonly mailbox?: string | undefined;
203
+ readonly slug?: string | undefined;
204
+ readonly duration_minutes?: number | undefined;
205
+ readonly availability_days?: readonly number[] | undefined;
206
+ readonly window_start_minutes?: number | undefined;
207
+ readonly window_end_minutes?: number | undefined;
208
+ readonly timezone?: string | undefined;
209
+ readonly description?: string | null | undefined;
210
+ readonly buffer_minutes?: number | undefined;
211
+ readonly minimum_notice_minutes?: number | undefined;
212
+ readonly max_advance_days?: number | undefined;
213
+ readonly active?: boolean | undefined;
214
+ };
215
+
216
+ declare class BookingPages extends ApiResource {
217
+ create(params: CreateBookingPageParams, options?: MethodOptions): Promise<BookingPage>;
218
+ list(params?: ListBookingPagesParams, options?: MethodOptions): Promise<PaginatedResponse<BookingPage>>;
219
+ listAutoPaginating(params?: Omit<ListBookingPagesParams, "cursor">): Page<BookingPage>;
220
+ get(id: string, options?: MethodOptions): Promise<BookingPage>;
221
+ update(id: string, params: UpdateBookingPageParams, options?: MethodOptions): Promise<BookingPage>;
222
+ delete(id: string, options?: MethodOptions): Promise<void>;
223
+ }
224
+
225
+ type CalendarEventStatus = "confirmed" | "tentative" | "cancelled";
226
+ type CalendarFreeBusyStatus = "free" | "busy";
227
+ type CalendarEventPrivacy = "public" | "private" | "secret";
228
+ type RecurrenceFrequency = "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly";
229
+ type Weekday = "mo" | "tu" | "we" | "th" | "fr" | "sa" | "su";
230
+ type RecurrenceNDay = {
231
+ readonly day: Weekday;
232
+ readonly nth_of_period?: number | undefined;
233
+ };
234
+ type Recurrence = {
235
+ readonly frequency: RecurrenceFrequency;
236
+ readonly interval?: number | undefined;
237
+ readonly count?: number | undefined;
238
+ readonly until?: string | undefined;
239
+ readonly by_day?: readonly RecurrenceNDay[] | undefined;
240
+ };
241
+ type Reminder = {
242
+ readonly minutes_before: number;
243
+ };
244
+ type CalendarEvent = {
245
+ readonly object: "calendar_event";
246
+ readonly id: string;
247
+ readonly mailbox: string;
248
+ readonly calendar_id: string | null;
249
+ readonly uid: string | null;
250
+ readonly title: string | null;
251
+ readonly description: string | null;
252
+ readonly location: string | null;
253
+ readonly video_url: string | null;
254
+ readonly all_day: boolean;
255
+ readonly start: string;
256
+ readonly end: string;
257
+ readonly timezone: string | null;
258
+ readonly duration: string | null;
259
+ readonly status: CalendarEventStatus | null;
260
+ readonly free_busy_status: CalendarFreeBusyStatus | null;
261
+ readonly privacy: CalendarEventPrivacy | null;
262
+ readonly color: string | null;
263
+ readonly recurrence: Recurrence | null;
264
+ readonly recurrence_id: string | null;
265
+ readonly reminders: readonly Reminder[];
266
+ readonly created_at: string | null;
267
+ readonly updated_at: string | null;
268
+ };
269
+ type ListCalendarEventsParams = PaginationParams & {
270
+ readonly mailbox: string;
271
+ readonly from: string;
272
+ readonly to: string;
273
+ readonly expand?: boolean | undefined;
274
+ readonly calendar_id?: string | undefined;
275
+ };
276
+ type GetCalendarEventParams = {
277
+ readonly mailbox: string;
278
+ };
279
+ type DeleteCalendarEventParams = {
280
+ readonly mailbox: string;
281
+ };
282
+ type CreateCalendarEventParams = {
283
+ readonly mailbox: string;
284
+ readonly calendar_id?: string | undefined;
285
+ readonly title: string;
286
+ readonly start: string;
287
+ readonly description?: string | undefined;
288
+ readonly timezone?: string | undefined;
289
+ readonly duration?: string | undefined;
290
+ readonly all_day?: boolean | undefined;
291
+ readonly location?: string | undefined;
292
+ readonly video_url?: string | undefined;
293
+ readonly color?: string | undefined;
294
+ readonly status?: CalendarEventStatus | undefined;
295
+ readonly free_busy_status?: CalendarFreeBusyStatus | undefined;
296
+ readonly privacy?: CalendarEventPrivacy | undefined;
297
+ readonly recurrence?: Recurrence | undefined;
298
+ readonly reminders?: readonly Reminder[] | undefined;
299
+ };
300
+ type UpdateCalendarEventParams = {
301
+ readonly mailbox: string;
302
+ readonly title?: string | undefined;
303
+ readonly description?: string | null | undefined;
304
+ readonly start?: string | undefined;
305
+ readonly timezone?: string | null | undefined;
306
+ readonly duration?: string | undefined;
307
+ readonly all_day?: boolean | undefined;
308
+ readonly location?: string | null | undefined;
309
+ readonly video_url?: string | null | undefined;
310
+ readonly color?: string | undefined;
311
+ readonly status?: CalendarEventStatus | undefined;
312
+ readonly free_busy_status?: CalendarFreeBusyStatus | undefined;
313
+ readonly privacy?: CalendarEventPrivacy | undefined;
314
+ readonly recurrence?: Recurrence | null | undefined;
315
+ readonly reminders?: readonly Reminder[] | null | undefined;
316
+ };
317
+ type CalendarAvailabilitySlot = {
318
+ readonly start: string;
319
+ readonly end: string;
320
+ };
321
+ type CalendarAvailability = {
322
+ readonly object: "calendar_availability";
323
+ readonly mailbox: string;
324
+ readonly from: string;
325
+ readonly to: string;
326
+ readonly duration_minutes: number;
327
+ readonly timezone: string;
328
+ readonly slots: readonly CalendarAvailabilitySlot[];
329
+ };
330
+ type CalendarAvailabilityParams = {
331
+ readonly mailbox: string;
332
+ readonly from: string;
333
+ readonly to: string;
334
+ readonly duration?: number | undefined;
335
+ readonly interval?: number | undefined;
336
+ readonly timezone?: string | undefined;
337
+ readonly days?: readonly number[] | undefined;
338
+ readonly window_start?: number | undefined;
339
+ readonly window_end?: number | undefined;
340
+ readonly buffer?: number | undefined;
341
+ readonly minimum_notice?: number | undefined;
342
+ };
343
+
344
+ declare class CalendarEvents extends ApiResource {
345
+ create(params: CreateCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
346
+ list(params: ListCalendarEventsParams, options?: MethodOptions): Promise<PaginatedResponse<CalendarEvent>>;
347
+ listAutoPaginating(params: Omit<ListCalendarEventsParams, "cursor">): Page<CalendarEvent>;
348
+ get(id: string, params: GetCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
349
+ update(id: string, params: UpdateCalendarEventParams, options?: MethodOptions): Promise<CalendarEvent>;
350
+ delete(id: string, params: DeleteCalendarEventParams, options?: MethodOptions): Promise<void>;
351
+ }
352
+ declare class Calendar extends ApiResource {
353
+ readonly events: CalendarEvents;
354
+ constructor(client: ShipMailClient);
355
+ availability(params: CalendarAvailabilityParams, options?: MethodOptions): Promise<CalendarAvailability>;
356
+ }
357
+
164
358
  type Domain = {
165
359
  readonly object: "domain";
166
360
  readonly id: string;
@@ -1159,6 +1353,8 @@ declare class ShipMailClient {
1159
1353
  private readonly fetchFn;
1160
1354
  private readonly defaultHeaders;
1161
1355
  readonly audiences: Audiences;
1356
+ readonly bookingPages: BookingPages;
1357
+ readonly calendar: Calendar;
1162
1358
  readonly domains: Domains;
1163
1359
  readonly mailboxes: Mailboxes;
1164
1360
  readonly messages: Messages;
@@ -1251,4 +1447,4 @@ declare function verifyWebhook(body: string, headers: WebhookHeaders | Headers,
1251
1447
  readonly toleranceInSeconds?: number | undefined;
1252
1448
  }): Promise<WebhookEvent>;
1253
1449
 
1254
- export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, ConflictError, ConnectionError, type CreateAudienceParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type Domain, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, type EmailRecipient, type EmailRecipientInput, type ErrorType, type GetThreadParams, type InboxAttachment, type InboxBodyPart, type InboxBodyValue, type InboxEmailHeader, type InboxFullMessage, type InboxKeyword, type InboxMessage, type InboxMessageAction, type InboxMessages, type InboxThread, InternalServerError, type ListAudiencesParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, 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 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 NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, ShipMailClient as default, verifyWebhook };
1450
+ export { type AddSubscriberParams, type AddSubscribersBatchParams, type AddSubscribersBatchResult, type ApiErrorBody, type Audience, AuthenticationError, AuthorizationError, type BookingPage, type CalendarAvailability, type CalendarAvailabilityParams, type CalendarAvailabilitySlot, type CalendarEvent, type CalendarEventPrivacy, type CalendarEventStatus, type CalendarFreeBusyStatus, ConflictError, ConnectionError, type CreateAudienceParams, type CreateBookingPageParams, type CreateCalendarEventParams, type CreateDomainParams, type CreateMailboxFolderParams, type CreateMailboxParams, type CreateNewsletterFromChangelogParams, type CreateNewsletterParams, type CreateWebhookParams, DOMAIN_STATUSES, type DeleteCalendarEventParams, type Domain, type DomainRegistrationInfo, type DomainSearchResult, type DomainStatus, type DomainVerificationResult, type DownloadInboxAttachmentParams, 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 InboxThread, InternalServerError, type ListAudiencesParams, type ListBookingPagesParams, type ListCalendarEventsParams, type ListDeliveriesParams, type ListDomainsParams, type ListInboxMessagesParams, type ListMailboxesParams, type ListMessagesParams, type ListNewsletterAssetsParams, type ListNewsletterDomainsParams, type ListNewslettersParams, type ListSubscribersParams, type ListSuppressionsParams, type ListThreadsParams, type ListWebhooksParams, MESSAGE_SOURCES, MESSAGE_STATUSES, type Mailbox, 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 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 NewsletterStatus, type NewsletterTestSend, type NewsletterTestSendStatus, type NewsletterUrlBreakdown, type NewsletterUrlSource, NotFoundError, Page, type PaginatedResponse, type PaginationParams, QuotaExceededError, RateLimitError, type Recurrence, type RecurrenceFrequency, type RecurrenceNDay, type RegisterDomainParams, type RegisterNewsletterAssetFromUrlParams, type RegistrationContact, type Reminder, type ReplyToMessageParams, type ReplyToThreadParams, type RequestOptions, type ResetMailboxPasswordParams, type RotateSecretResponse, type ScheduleNewsletterParams, type SearchDomainsParams, type SendMessageParams, type SendNewsletterTestParams, ShipMailClient, type ShipMailConfig, ShipMailError, type StatusResponse, type Subscriber, type SubscriberOutcome, type SubscriberResult, type SubscriberStatus, type Suppression, type TestWebhookResponse, type Thread, type UpdateAudienceParams, type UpdateAutoReplyParams, type UpdateBookingPageParams, type UpdateCalendarEventParams, type UpdateDomainParams, type UpdateInboxMessageParams, type UpdateMailboxFolderParams, type UpdateMailboxParams, type UpdateMailboxRulesParams, type UpdateNewsletterParams, type UpdateSpamFilterParams, type UpdateSubscriberParams, type UpdateWebhookParams, type UploadNewsletterAssetParams, ValidationError, WEBHOOK_DELIVERY_STATUSES, WEBHOOK_EVENT_TYPES, type Webhook, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookEvent, type WebhookEventType, WebhookVerificationError, type WebhookWithSecret, type Weekday, ShipMailClient as default, verifyWebhook };
package/dist/index.js CHANGED
@@ -276,6 +276,139 @@ var Audiences = class extends ApiResource {
276
276
  }
277
277
  };
278
278
 
279
+ // src/resources/booking-pages.ts
280
+ var BookingPages = class extends ApiResource {
281
+ create(params, options) {
282
+ return this.client.request({
283
+ method: "POST",
284
+ path: "/booking-pages",
285
+ body: params,
286
+ methodOptions: options
287
+ });
288
+ }
289
+ list(params, options) {
290
+ return this.client.request({
291
+ method: "GET",
292
+ path: "/booking-pages",
293
+ query: { cursor: params?.cursor, limit: params?.limit },
294
+ methodOptions: options
295
+ });
296
+ }
297
+ listAutoPaginating(params) {
298
+ return new Page(this.client, "/booking-pages", { limit: params?.limit });
299
+ }
300
+ get(id, options) {
301
+ return this.client.request({
302
+ method: "GET",
303
+ path: `/booking-pages/${encodeURIComponent(id)}`,
304
+ methodOptions: options
305
+ });
306
+ }
307
+ update(id, params, options) {
308
+ return this.client.request({
309
+ method: "PATCH",
310
+ path: `/booking-pages/${encodeURIComponent(id)}`,
311
+ body: params,
312
+ methodOptions: options
313
+ });
314
+ }
315
+ delete(id, options) {
316
+ return this.client.request({
317
+ method: "DELETE",
318
+ path: `/booking-pages/${encodeURIComponent(id)}`,
319
+ methodOptions: options
320
+ });
321
+ }
322
+ };
323
+
324
+ // src/resources/calendar.ts
325
+ var CalendarEvents = class extends ApiResource {
326
+ create(params, options) {
327
+ return this.client.request({
328
+ method: "POST",
329
+ path: "/calendar/events",
330
+ body: params,
331
+ methodOptions: options
332
+ });
333
+ }
334
+ list(params, options) {
335
+ return this.client.request({
336
+ method: "GET",
337
+ path: "/calendar/events",
338
+ query: {
339
+ mailbox: params.mailbox,
340
+ from: params.from,
341
+ to: params.to,
342
+ expand: params.expand,
343
+ calendar_id: params.calendar_id,
344
+ cursor: params.cursor,
345
+ limit: params.limit
346
+ },
347
+ methodOptions: options
348
+ });
349
+ }
350
+ listAutoPaginating(params) {
351
+ return new Page(this.client, "/calendar/events", {
352
+ mailbox: params.mailbox,
353
+ from: params.from,
354
+ to: params.to,
355
+ expand: params.expand,
356
+ calendar_id: params.calendar_id,
357
+ limit: params.limit
358
+ });
359
+ }
360
+ get(id, params, options) {
361
+ return this.client.request({
362
+ method: "GET",
363
+ path: `/calendar/events/${encodeURIComponent(id)}`,
364
+ query: { mailbox: params.mailbox },
365
+ methodOptions: options
366
+ });
367
+ }
368
+ update(id, params, options) {
369
+ return this.client.request({
370
+ method: "PATCH",
371
+ path: `/calendar/events/${encodeURIComponent(id)}`,
372
+ body: params,
373
+ methodOptions: options
374
+ });
375
+ }
376
+ delete(id, params, options) {
377
+ return this.client.request({
378
+ method: "DELETE",
379
+ path: `/calendar/events/${encodeURIComponent(id)}`,
380
+ query: { mailbox: params.mailbox },
381
+ methodOptions: options
382
+ });
383
+ }
384
+ };
385
+ var Calendar = class extends ApiResource {
386
+ constructor(client) {
387
+ super(client);
388
+ this.events = new CalendarEvents(client);
389
+ }
390
+ availability(params, options) {
391
+ return this.client.request({
392
+ method: "GET",
393
+ path: "/calendar/availability",
394
+ query: {
395
+ mailbox: params.mailbox,
396
+ from: params.from,
397
+ to: params.to,
398
+ duration: params.duration,
399
+ interval: params.interval,
400
+ timezone: params.timezone,
401
+ days: params.days ? params.days.join(",") : void 0,
402
+ window_start: params.window_start,
403
+ window_end: params.window_end,
404
+ buffer: params.buffer,
405
+ minimum_notice: params.minimum_notice
406
+ },
407
+ methodOptions: options
408
+ });
409
+ }
410
+ };
411
+
279
412
  // src/resources/domains.ts
280
413
  var Domains = class extends ApiResource {
281
414
  create(params, options) {
@@ -942,7 +1075,7 @@ var Webhooks = class extends ApiResource {
942
1075
  };
943
1076
 
944
1077
  // src/version.ts
945
- var VERSION = "0.1.29";
1078
+ var VERSION = "0.1.30";
946
1079
 
947
1080
  // src/client.ts
948
1081
  var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
@@ -994,6 +1127,8 @@ var ShipMailClient = class {
994
1127
  this.defaultHeaders = config.defaultHeaders ? { ...config.defaultHeaders } : {};
995
1128
  }
996
1129
  this.audiences = new Audiences(this);
1130
+ this.bookingPages = new BookingPages(this);
1131
+ this.calendar = new Calendar(this);
997
1132
  this.domains = new Domains(this);
998
1133
  this.mailboxes = new Mailboxes(this);
999
1134
  this.messages = new Messages(this);