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.cjs +136 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +197 -1
- package/dist/index.d.ts +197 -1
- package/dist/index.js +136 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -280,6 +280,139 @@ var Audiences = class extends ApiResource {
|
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
+
// src/resources/booking-pages.ts
|
|
284
|
+
var BookingPages = class extends ApiResource {
|
|
285
|
+
create(params, options) {
|
|
286
|
+
return this.client.request({
|
|
287
|
+
method: "POST",
|
|
288
|
+
path: "/booking-pages",
|
|
289
|
+
body: params,
|
|
290
|
+
methodOptions: options
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
list(params, options) {
|
|
294
|
+
return this.client.request({
|
|
295
|
+
method: "GET",
|
|
296
|
+
path: "/booking-pages",
|
|
297
|
+
query: { cursor: params?.cursor, limit: params?.limit },
|
|
298
|
+
methodOptions: options
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
listAutoPaginating(params) {
|
|
302
|
+
return new Page(this.client, "/booking-pages", { limit: params?.limit });
|
|
303
|
+
}
|
|
304
|
+
get(id, options) {
|
|
305
|
+
return this.client.request({
|
|
306
|
+
method: "GET",
|
|
307
|
+
path: `/booking-pages/${encodeURIComponent(id)}`,
|
|
308
|
+
methodOptions: options
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
update(id, params, options) {
|
|
312
|
+
return this.client.request({
|
|
313
|
+
method: "PATCH",
|
|
314
|
+
path: `/booking-pages/${encodeURIComponent(id)}`,
|
|
315
|
+
body: params,
|
|
316
|
+
methodOptions: options
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
delete(id, options) {
|
|
320
|
+
return this.client.request({
|
|
321
|
+
method: "DELETE",
|
|
322
|
+
path: `/booking-pages/${encodeURIComponent(id)}`,
|
|
323
|
+
methodOptions: options
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
// src/resources/calendar.ts
|
|
329
|
+
var CalendarEvents = class extends ApiResource {
|
|
330
|
+
create(params, options) {
|
|
331
|
+
return this.client.request({
|
|
332
|
+
method: "POST",
|
|
333
|
+
path: "/calendar/events",
|
|
334
|
+
body: params,
|
|
335
|
+
methodOptions: options
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
list(params, options) {
|
|
339
|
+
return this.client.request({
|
|
340
|
+
method: "GET",
|
|
341
|
+
path: "/calendar/events",
|
|
342
|
+
query: {
|
|
343
|
+
mailbox: params.mailbox,
|
|
344
|
+
from: params.from,
|
|
345
|
+
to: params.to,
|
|
346
|
+
expand: params.expand,
|
|
347
|
+
calendar_id: params.calendar_id,
|
|
348
|
+
cursor: params.cursor,
|
|
349
|
+
limit: params.limit
|
|
350
|
+
},
|
|
351
|
+
methodOptions: options
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
listAutoPaginating(params) {
|
|
355
|
+
return new Page(this.client, "/calendar/events", {
|
|
356
|
+
mailbox: params.mailbox,
|
|
357
|
+
from: params.from,
|
|
358
|
+
to: params.to,
|
|
359
|
+
expand: params.expand,
|
|
360
|
+
calendar_id: params.calendar_id,
|
|
361
|
+
limit: params.limit
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
get(id, params, options) {
|
|
365
|
+
return this.client.request({
|
|
366
|
+
method: "GET",
|
|
367
|
+
path: `/calendar/events/${encodeURIComponent(id)}`,
|
|
368
|
+
query: { mailbox: params.mailbox },
|
|
369
|
+
methodOptions: options
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
update(id, params, options) {
|
|
373
|
+
return this.client.request({
|
|
374
|
+
method: "PATCH",
|
|
375
|
+
path: `/calendar/events/${encodeURIComponent(id)}`,
|
|
376
|
+
body: params,
|
|
377
|
+
methodOptions: options
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
delete(id, params, options) {
|
|
381
|
+
return this.client.request({
|
|
382
|
+
method: "DELETE",
|
|
383
|
+
path: `/calendar/events/${encodeURIComponent(id)}`,
|
|
384
|
+
query: { mailbox: params.mailbox },
|
|
385
|
+
methodOptions: options
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
var Calendar = class extends ApiResource {
|
|
390
|
+
constructor(client) {
|
|
391
|
+
super(client);
|
|
392
|
+
this.events = new CalendarEvents(client);
|
|
393
|
+
}
|
|
394
|
+
availability(params, options) {
|
|
395
|
+
return this.client.request({
|
|
396
|
+
method: "GET",
|
|
397
|
+
path: "/calendar/availability",
|
|
398
|
+
query: {
|
|
399
|
+
mailbox: params.mailbox,
|
|
400
|
+
from: params.from,
|
|
401
|
+
to: params.to,
|
|
402
|
+
duration: params.duration,
|
|
403
|
+
interval: params.interval,
|
|
404
|
+
timezone: params.timezone,
|
|
405
|
+
days: params.days ? params.days.join(",") : void 0,
|
|
406
|
+
window_start: params.window_start,
|
|
407
|
+
window_end: params.window_end,
|
|
408
|
+
buffer: params.buffer,
|
|
409
|
+
minimum_notice: params.minimum_notice
|
|
410
|
+
},
|
|
411
|
+
methodOptions: options
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
283
416
|
// src/resources/domains.ts
|
|
284
417
|
var Domains = class extends ApiResource {
|
|
285
418
|
create(params, options) {
|
|
@@ -946,7 +1079,7 @@ var Webhooks = class extends ApiResource {
|
|
|
946
1079
|
};
|
|
947
1080
|
|
|
948
1081
|
// src/version.ts
|
|
949
|
-
var VERSION = "0.1.
|
|
1082
|
+
var VERSION = "0.1.30";
|
|
950
1083
|
|
|
951
1084
|
// src/client.ts
|
|
952
1085
|
var DEFAULT_BASE_URL = "https://shipmail.to/api/v1";
|
|
@@ -998,6 +1131,8 @@ var ShipMailClient = class {
|
|
|
998
1131
|
this.defaultHeaders = config.defaultHeaders ? { ...config.defaultHeaders } : {};
|
|
999
1132
|
}
|
|
1000
1133
|
this.audiences = new Audiences(this);
|
|
1134
|
+
this.bookingPages = new BookingPages(this);
|
|
1135
|
+
this.calendar = new Calendar(this);
|
|
1001
1136
|
this.domains = new Domains(this);
|
|
1002
1137
|
this.mailboxes = new Mailboxes(this);
|
|
1003
1138
|
this.messages = new Messages(this);
|