@tiempo/sdk 0.0.0-stage → 0.1.1

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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +269 -2
  3. package/dist/cjs/client.d.ts +24 -0
  4. package/dist/cjs/client.js +42 -0
  5. package/dist/cjs/core.d.ts +72 -0
  6. package/dist/cjs/core.js +187 -0
  7. package/dist/cjs/crypto.d.ts +5 -0
  8. package/dist/cjs/crypto.js +29 -0
  9. package/dist/cjs/errors.d.ts +86 -0
  10. package/dist/cjs/errors.js +134 -0
  11. package/dist/cjs/events.d.ts +23 -0
  12. package/dist/cjs/events.js +10 -0
  13. package/dist/cjs/generated/events.d.ts +51 -0
  14. package/dist/cjs/generated/events.js +51 -0
  15. package/dist/cjs/generated/meta.d.ts +4 -0
  16. package/dist/cjs/generated/meta.js +8 -0
  17. package/dist/cjs/generated/openapi.d.ts +3721 -0
  18. package/dist/cjs/generated/openapi.js +2 -0
  19. package/dist/cjs/generated/resources.d.ts +416 -0
  20. package/dist/cjs/generated/resources.js +621 -0
  21. package/dist/cjs/generated/types.d.ts +134 -0
  22. package/dist/cjs/generated/types.js +3 -0
  23. package/dist/cjs/index.d.ts +16 -0
  24. package/dist/cjs/index.js +49 -0
  25. package/dist/cjs/list.d.ts +43 -0
  26. package/dist/cjs/list.js +78 -0
  27. package/dist/cjs/package.json +1 -0
  28. package/dist/cjs/query.d.ts +8 -0
  29. package/dist/cjs/query.js +47 -0
  30. package/dist/cjs/shared.d.ts +7 -0
  31. package/dist/cjs/shared.js +2 -0
  32. package/dist/cjs/webhooks.d.ts +34 -0
  33. package/dist/cjs/webhooks.js +115 -0
  34. package/dist/esm/client.d.ts +24 -0
  35. package/dist/esm/client.js +38 -0
  36. package/dist/esm/core.d.ts +72 -0
  37. package/dist/esm/core.js +181 -0
  38. package/dist/esm/crypto.d.ts +5 -0
  39. package/dist/esm/crypto.js +26 -0
  40. package/dist/esm/errors.d.ts +86 -0
  41. package/dist/esm/errors.js +120 -0
  42. package/dist/esm/events.d.ts +23 -0
  43. package/dist/esm/events.js +8 -0
  44. package/dist/esm/generated/events.d.ts +51 -0
  45. package/dist/esm/generated/events.js +48 -0
  46. package/dist/esm/generated/meta.d.ts +4 -0
  47. package/dist/esm/generated/meta.js +5 -0
  48. package/dist/esm/generated/openapi.d.ts +3721 -0
  49. package/dist/esm/generated/openapi.js +1 -0
  50. package/dist/esm/generated/resources.d.ts +416 -0
  51. package/dist/esm/generated/resources.js +603 -0
  52. package/dist/esm/generated/types.d.ts +134 -0
  53. package/dist/esm/generated/types.js +2 -0
  54. package/dist/esm/index.d.ts +16 -0
  55. package/dist/esm/index.js +10 -0
  56. package/dist/esm/list.d.ts +43 -0
  57. package/dist/esm/list.js +74 -0
  58. package/dist/esm/package.json +1 -0
  59. package/dist/esm/query.d.ts +8 -0
  60. package/dist/esm/query.js +43 -0
  61. package/dist/esm/shared.d.ts +7 -0
  62. package/dist/esm/shared.js +1 -0
  63. package/dist/esm/webhooks.d.ts +34 -0
  64. package/dist/esm/webhooks.js +109 -0
  65. package/package.json +74 -4
@@ -0,0 +1,621 @@
1
+ "use strict";
2
+ // Code generated by scripts/generate.mjs from openapi.json. DO NOT EDIT.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TiempoResources = exports.WebhookEndpointsResource = exports.UsageResource = exports.SeriesResource = exports.SchedulesResource = exports.ScheduleOverridesResource = exports.ResourcesResource = exports.LocationsResource = exports.EventsResource = exports.ConflictPreviewsResource = exports.BookingsResource = exports.BlocksResource = exports.AvailabilityResource = exports.AttendeesResource = exports.AccountsResource = void 0;
5
+ const query_js_1 = require("../query.js");
6
+ /** `tiempo.accounts` */
7
+ class AccountsResource {
8
+ core;
9
+ constructor(core) {
10
+ this.core = core;
11
+ }
12
+ /**
13
+ * `GET /v1/accounts`
14
+ *
15
+ * Await for one page, or `for await` to iterate every item.
16
+ */
17
+ list(params, options) {
18
+ return this.core.list({ method: "GET", path: `/v1/accounts`, query: params, options }, true);
19
+ }
20
+ /**
21
+ * `POST /v1/accounts`
22
+ */
23
+ create(params, options) {
24
+ return this.core.request({ method: "POST", path: `/v1/accounts`, body: params, options });
25
+ }
26
+ /**
27
+ * `GET /v1/accounts/{id}`
28
+ */
29
+ get(id, options) {
30
+ return this.core.request({ method: "GET", path: `/v1/accounts/${(0, query_js_1.encodePath)(id)}`, options });
31
+ }
32
+ /**
33
+ * `POST /v1/accounts/{id}`
34
+ */
35
+ update(id, params, options) {
36
+ return this.core.request({ method: "POST", path: `/v1/accounts/${(0, query_js_1.encodePath)(id)}`, body: params, options });
37
+ }
38
+ /**
39
+ * `DELETE /v1/accounts/{id}`
40
+ */
41
+ delete(id, options) {
42
+ return this.core.request({ method: "DELETE", path: `/v1/accounts/${(0, query_js_1.encodePath)(id)}`, options });
43
+ }
44
+ }
45
+ exports.AccountsResource = AccountsResource;
46
+ /** `tiempo.attendees` */
47
+ class AttendeesResource {
48
+ core;
49
+ constructor(core) {
50
+ this.core = core;
51
+ }
52
+ /**
53
+ * `GET /v1/bookings/{id}/attendees` (business-scoped: needs an account)
54
+ *
55
+ * Await for one page, or `for await` to iterate every item.
56
+ */
57
+ list(id, params, options) {
58
+ return this.core.list({ method: "GET", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/attendees`, query: params, options }, true);
59
+ }
60
+ /**
61
+ * `POST /v1/bookings/{id}/attendees` (business-scoped: needs an account)
62
+ */
63
+ create(id, params, options) {
64
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/attendees`, body: params, options });
65
+ }
66
+ /**
67
+ * `GET /v1/attendees/{id}` (business-scoped: needs an account)
68
+ */
69
+ get(id, options) {
70
+ return this.core.request({ method: "GET", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}`, options });
71
+ }
72
+ /**
73
+ * `POST /v1/attendees/{id}` (business-scoped: needs an account)
74
+ */
75
+ update(id, params, options) {
76
+ return this.core.request({ method: "POST", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}`, body: params, options });
77
+ }
78
+ /**
79
+ * `POST /v1/attendees/{id}/cancel` (business-scoped: needs an account)
80
+ */
81
+ cancel(id, params, options) {
82
+ return this.core.request({ method: "POST", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}/cancel`, body: params, options });
83
+ }
84
+ /**
85
+ * `POST /v1/attendees/{id}/complete` (business-scoped: needs an account)
86
+ */
87
+ complete(id, options) {
88
+ return this.core.request({ method: "POST", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}/complete`, options });
89
+ }
90
+ /**
91
+ * `POST /v1/attendees/{id}/confirm` (business-scoped: needs an account)
92
+ */
93
+ confirm(id, options) {
94
+ return this.core.request({ method: "POST", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}/confirm`, options });
95
+ }
96
+ /**
97
+ * `POST /v1/attendees/{id}/no_show` (business-scoped: needs an account)
98
+ */
99
+ noShow(id, options) {
100
+ return this.core.request({ method: "POST", path: `/v1/attendees/${(0, query_js_1.encodePath)(id)}/no_show`, options });
101
+ }
102
+ }
103
+ exports.AttendeesResource = AttendeesResource;
104
+ /** `tiempo.availability` */
105
+ class AvailabilityResource {
106
+ core;
107
+ constructor(core) {
108
+ this.core = core;
109
+ }
110
+ /**
111
+ * `GET /v1/availability/calendar` (business-scoped: needs an account)
112
+ */
113
+ calendar(params, options) {
114
+ return this.core.request({ method: "GET", path: `/v1/availability/calendar`, query: params, options });
115
+ }
116
+ /**
117
+ * `POST /v1/availability` (business-scoped: needs an account)
118
+ */
119
+ search(params, options) {
120
+ return this.core.request({ method: "POST", path: `/v1/availability`, body: params, readOnly: true, options });
121
+ }
122
+ }
123
+ exports.AvailabilityResource = AvailabilityResource;
124
+ /** `tiempo.blocks` */
125
+ class BlocksResource {
126
+ core;
127
+ constructor(core) {
128
+ this.core = core;
129
+ }
130
+ /**
131
+ * `GET /v1/blocks` (business-scoped: needs an account)
132
+ *
133
+ * Await for one page, or `for await` to iterate every item.
134
+ */
135
+ list(params, options) {
136
+ return this.core.list({ method: "GET", path: `/v1/blocks`, query: params, options }, true);
137
+ }
138
+ /**
139
+ * `POST /v1/blocks` (business-scoped: needs an account)
140
+ */
141
+ create(params, options) {
142
+ return this.core.request({ method: "POST", path: `/v1/blocks`, body: params, options });
143
+ }
144
+ /**
145
+ * `GET /v1/blocks/{id}` (business-scoped: needs an account)
146
+ */
147
+ get(id, options) {
148
+ return this.core.request({ method: "GET", path: `/v1/blocks/${(0, query_js_1.encodePath)(id)}`, options });
149
+ }
150
+ /**
151
+ * `POST /v1/blocks/{id}` (business-scoped: needs an account)
152
+ */
153
+ update(id, params, options) {
154
+ return this.core.request({ method: "POST", path: `/v1/blocks/${(0, query_js_1.encodePath)(id)}`, body: params, options });
155
+ }
156
+ /**
157
+ * `DELETE /v1/blocks/{id}` (business-scoped: needs an account)
158
+ */
159
+ delete(id, options) {
160
+ return this.core.request({ method: "DELETE", path: `/v1/blocks/${(0, query_js_1.encodePath)(id)}`, options });
161
+ }
162
+ }
163
+ exports.BlocksResource = BlocksResource;
164
+ /** `tiempo.bookings` */
165
+ class BookingsResource {
166
+ core;
167
+ constructor(core) {
168
+ this.core = core;
169
+ }
170
+ /**
171
+ * `GET /v1/bookings` (business-scoped: needs an account)
172
+ *
173
+ * Await for one page, or `for await` to iterate every item.
174
+ */
175
+ list(params, options) {
176
+ return this.core.list({ method: "GET", path: `/v1/bookings`, query: params, options }, true);
177
+ }
178
+ /**
179
+ * `POST /v1/bookings` (business-scoped: needs an account)
180
+ */
181
+ create(params, options) {
182
+ return this.core.request({ method: "POST", path: `/v1/bookings`, body: params, options });
183
+ }
184
+ /**
185
+ * `GET /v1/bookings/{id}` (business-scoped: needs an account)
186
+ */
187
+ get(id, options) {
188
+ return this.core.request({ method: "GET", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}`, options });
189
+ }
190
+ /**
191
+ * `POST /v1/bookings/{id}` (business-scoped: needs an account)
192
+ */
193
+ update(id, params, options) {
194
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}`, body: params, options });
195
+ }
196
+ /**
197
+ * `POST /v1/bookings/{id}/cancel` (business-scoped: needs an account)
198
+ */
199
+ cancel(id, params, options) {
200
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/cancel`, body: params, options });
201
+ }
202
+ /**
203
+ * `POST /v1/bookings/{id}/complete` (business-scoped: needs an account)
204
+ */
205
+ complete(id, options) {
206
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/complete`, options });
207
+ }
208
+ /**
209
+ * `POST /v1/bookings/{id}/confirm` (business-scoped: needs an account)
210
+ */
211
+ confirm(id, options) {
212
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/confirm`, options });
213
+ }
214
+ /**
215
+ * `POST /v1/bookings/import` (business-scoped: needs an account)
216
+ *
217
+ * Returns a single page; this endpoint does not paginate.
218
+ */
219
+ import(params, options) {
220
+ return this.core.list({ method: "POST", path: `/v1/bookings/import`, body: params, options }, false);
221
+ }
222
+ /**
223
+ * `POST /v1/bookings/{id}/no_show` (business-scoped: needs an account)
224
+ */
225
+ noShow(id, options) {
226
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/no_show`, options });
227
+ }
228
+ /**
229
+ * `POST /v1/bookings/{id}/reschedule` (business-scoped: needs an account)
230
+ */
231
+ reschedule(id, params, options) {
232
+ return this.core.request({ method: "POST", path: `/v1/bookings/${(0, query_js_1.encodePath)(id)}/reschedule`, body: params, options });
233
+ }
234
+ }
235
+ exports.BookingsResource = BookingsResource;
236
+ /** `tiempo.conflictPreviews` */
237
+ class ConflictPreviewsResource {
238
+ core;
239
+ constructor(core) {
240
+ this.core = core;
241
+ }
242
+ /**
243
+ * `POST /v1/conflict_previews` (business-scoped: needs an account)
244
+ */
245
+ create(params, options) {
246
+ return this.core.request({ method: "POST", path: `/v1/conflict_previews`, body: params, options });
247
+ }
248
+ }
249
+ exports.ConflictPreviewsResource = ConflictPreviewsResource;
250
+ /** `tiempo.events` */
251
+ class EventsResource {
252
+ core;
253
+ constructor(core) {
254
+ this.core = core;
255
+ }
256
+ /**
257
+ * `GET /v1/events` (business-scoped: needs an account)
258
+ *
259
+ * Await for one page, or `for await` to iterate every item.
260
+ */
261
+ list(params, options) {
262
+ return this.core.list({ method: "GET", path: `/v1/events`, query: params, options }, true);
263
+ }
264
+ /**
265
+ * `GET /v1/events/{id}`
266
+ */
267
+ get(id, options) {
268
+ return this.core.request({ method: "GET", path: `/v1/events/${(0, query_js_1.encodePath)(id)}`, options });
269
+ }
270
+ /**
271
+ * `GET /v1/events/{id}/deliveries`
272
+ *
273
+ * Returns a single page; this endpoint does not paginate.
274
+ */
275
+ deliveries(id, options) {
276
+ return this.core.list({ method: "GET", path: `/v1/events/${(0, query_js_1.encodePath)(id)}/deliveries`, options }, false);
277
+ }
278
+ /**
279
+ * `POST /v1/events/{id}/resend`
280
+ */
281
+ resend(id, params, options) {
282
+ return this.core.request({ method: "POST", path: `/v1/events/${(0, query_js_1.encodePath)(id)}/resend`, body: params, options });
283
+ }
284
+ }
285
+ exports.EventsResource = EventsResource;
286
+ /** `tiempo.locations` */
287
+ class LocationsResource {
288
+ core;
289
+ constructor(core) {
290
+ this.core = core;
291
+ }
292
+ /**
293
+ * `GET /v1/locations` (business-scoped: needs an account)
294
+ *
295
+ * Await for one page, or `for await` to iterate every item.
296
+ */
297
+ list(params, options) {
298
+ return this.core.list({ method: "GET", path: `/v1/locations`, query: params, options }, true);
299
+ }
300
+ /**
301
+ * `POST /v1/locations` (business-scoped: needs an account)
302
+ */
303
+ create(params, options) {
304
+ return this.core.request({ method: "POST", path: `/v1/locations`, body: params, options });
305
+ }
306
+ /**
307
+ * `GET /v1/locations/{id}` (business-scoped: needs an account)
308
+ */
309
+ get(id, options) {
310
+ return this.core.request({ method: "GET", path: `/v1/locations/${(0, query_js_1.encodePath)(id)}`, options });
311
+ }
312
+ /**
313
+ * `POST /v1/locations/{id}` (business-scoped: needs an account)
314
+ */
315
+ update(id, params, options) {
316
+ return this.core.request({ method: "POST", path: `/v1/locations/${(0, query_js_1.encodePath)(id)}`, body: params, options });
317
+ }
318
+ /**
319
+ * `DELETE /v1/locations/{id}` (business-scoped: needs an account)
320
+ */
321
+ delete(id, options) {
322
+ return this.core.request({ method: "DELETE", path: `/v1/locations/${(0, query_js_1.encodePath)(id)}`, options });
323
+ }
324
+ }
325
+ exports.LocationsResource = LocationsResource;
326
+ /** `tiempo.resources` */
327
+ class ResourcesResource {
328
+ core;
329
+ constructor(core) {
330
+ this.core = core;
331
+ }
332
+ /**
333
+ * `GET /v1/resources` (business-scoped: needs an account)
334
+ *
335
+ * Await for one page, or `for await` to iterate every item.
336
+ */
337
+ list(params, options) {
338
+ return this.core.list({ method: "GET", path: `/v1/resources`, query: params, options }, true);
339
+ }
340
+ /**
341
+ * `POST /v1/resources` (business-scoped: needs an account)
342
+ */
343
+ create(params, options) {
344
+ return this.core.request({ method: "POST", path: `/v1/resources`, body: params, options });
345
+ }
346
+ /**
347
+ * `GET /v1/resources/{id}` (business-scoped: needs an account)
348
+ */
349
+ get(id, options) {
350
+ return this.core.request({ method: "GET", path: `/v1/resources/${(0, query_js_1.encodePath)(id)}`, options });
351
+ }
352
+ /**
353
+ * `POST /v1/resources/{id}` (business-scoped: needs an account)
354
+ */
355
+ update(id, params, options) {
356
+ return this.core.request({ method: "POST", path: `/v1/resources/${(0, query_js_1.encodePath)(id)}`, body: params, options });
357
+ }
358
+ /**
359
+ * `DELETE /v1/resources/{id}` (business-scoped: needs an account)
360
+ */
361
+ delete(id, options) {
362
+ return this.core.request({ method: "DELETE", path: `/v1/resources/${(0, query_js_1.encodePath)(id)}`, options });
363
+ }
364
+ /**
365
+ * `POST /v1/resources/{id}/archive` (business-scoped: needs an account)
366
+ */
367
+ archive(id, options) {
368
+ return this.core.request({ method: "POST", path: `/v1/resources/${(0, query_js_1.encodePath)(id)}/archive`, options });
369
+ }
370
+ /**
371
+ * `POST /v1/resources/{id}/unarchive` (business-scoped: needs an account)
372
+ */
373
+ unarchive(id, options) {
374
+ return this.core.request({ method: "POST", path: `/v1/resources/${(0, query_js_1.encodePath)(id)}/unarchive`, options });
375
+ }
376
+ }
377
+ exports.ResourcesResource = ResourcesResource;
378
+ /** `tiempo.scheduleOverrides` */
379
+ class ScheduleOverridesResource {
380
+ core;
381
+ constructor(core) {
382
+ this.core = core;
383
+ }
384
+ /**
385
+ * `GET /v1/schedule_overrides` (business-scoped: needs an account)
386
+ *
387
+ * Await for one page, or `for await` to iterate every item.
388
+ */
389
+ list(params, options) {
390
+ return this.core.list({ method: "GET", path: `/v1/schedule_overrides`, query: params, options }, true);
391
+ }
392
+ /**
393
+ * `POST /v1/schedule_overrides` (business-scoped: needs an account)
394
+ */
395
+ create(params, options) {
396
+ return this.core.request({ method: "POST", path: `/v1/schedule_overrides`, body: params, options });
397
+ }
398
+ /**
399
+ * `GET /v1/schedule_overrides/{id}` (business-scoped: needs an account)
400
+ */
401
+ get(id, options) {
402
+ return this.core.request({ method: "GET", path: `/v1/schedule_overrides/${(0, query_js_1.encodePath)(id)}`, options });
403
+ }
404
+ /**
405
+ * `POST /v1/schedule_overrides/{id}` (business-scoped: needs an account)
406
+ */
407
+ update(id, params, options) {
408
+ return this.core.request({ method: "POST", path: `/v1/schedule_overrides/${(0, query_js_1.encodePath)(id)}`, body: params, options });
409
+ }
410
+ /**
411
+ * `DELETE /v1/schedule_overrides/{id}` (business-scoped: needs an account)
412
+ */
413
+ delete(id, options) {
414
+ return this.core.request({ method: "DELETE", path: `/v1/schedule_overrides/${(0, query_js_1.encodePath)(id)}`, options });
415
+ }
416
+ }
417
+ exports.ScheduleOverridesResource = ScheduleOverridesResource;
418
+ /** `tiempo.schedules` */
419
+ class SchedulesResource {
420
+ core;
421
+ constructor(core) {
422
+ this.core = core;
423
+ }
424
+ /**
425
+ * `GET /v1/schedules` (business-scoped: needs an account)
426
+ *
427
+ * Await for one page, or `for await` to iterate every item.
428
+ */
429
+ list(params, options) {
430
+ return this.core.list({ method: "GET", path: `/v1/schedules`, query: params, options }, true);
431
+ }
432
+ /**
433
+ * `POST /v1/schedules` (business-scoped: needs an account)
434
+ */
435
+ create(params, options) {
436
+ return this.core.request({ method: "POST", path: `/v1/schedules`, body: params, options });
437
+ }
438
+ /**
439
+ * `GET /v1/schedules/{id}` (business-scoped: needs an account)
440
+ */
441
+ get(id, options) {
442
+ return this.core.request({ method: "GET", path: `/v1/schedules/${(0, query_js_1.encodePath)(id)}`, options });
443
+ }
444
+ /**
445
+ * `POST /v1/schedules/{id}` (business-scoped: needs an account)
446
+ */
447
+ update(id, params, options) {
448
+ return this.core.request({ method: "POST", path: `/v1/schedules/${(0, query_js_1.encodePath)(id)}`, body: params, options });
449
+ }
450
+ /**
451
+ * `DELETE /v1/schedules/{id}` (business-scoped: needs an account)
452
+ */
453
+ delete(id, options) {
454
+ return this.core.request({ method: "DELETE", path: `/v1/schedules/${(0, query_js_1.encodePath)(id)}`, options });
455
+ }
456
+ }
457
+ exports.SchedulesResource = SchedulesResource;
458
+ /** `tiempo.series` */
459
+ class SeriesResource {
460
+ core;
461
+ constructor(core) {
462
+ this.core = core;
463
+ }
464
+ /**
465
+ * `GET /v1/series` (business-scoped: needs an account)
466
+ *
467
+ * Await for one page, or `for await` to iterate every item.
468
+ */
469
+ list(params, options) {
470
+ return this.core.list({ method: "GET", path: `/v1/series`, query: params, options }, true);
471
+ }
472
+ /**
473
+ * `POST /v1/series` (business-scoped: needs an account)
474
+ */
475
+ create(params, options) {
476
+ return this.core.request({ method: "POST", path: `/v1/series`, body: params, options });
477
+ }
478
+ /**
479
+ * `GET /v1/series/{id}` (business-scoped: needs an account)
480
+ */
481
+ get(id, options) {
482
+ return this.core.request({ method: "GET", path: `/v1/series/${(0, query_js_1.encodePath)(id)}`, options });
483
+ }
484
+ /**
485
+ * `POST /v1/series/{id}` (business-scoped: needs an account)
486
+ */
487
+ update(id, params, options) {
488
+ return this.core.request({ method: "POST", path: `/v1/series/${(0, query_js_1.encodePath)(id)}`, body: params, options });
489
+ }
490
+ /**
491
+ * `POST /v1/series/{id}/cancel` (business-scoped: needs an account)
492
+ */
493
+ cancel(id, params, options) {
494
+ return this.core.request({ method: "POST", path: `/v1/series/${(0, query_js_1.encodePath)(id)}/cancel`, body: params, options });
495
+ }
496
+ /**
497
+ * `GET /v1/series/{id}/skipped_occurrences` (business-scoped: needs an account)
498
+ *
499
+ * Returns a single page; this endpoint does not paginate.
500
+ */
501
+ skipped(id, options) {
502
+ return this.core.list({ method: "GET", path: `/v1/series/${(0, query_js_1.encodePath)(id)}/skipped_occurrences`, options }, false);
503
+ }
504
+ /**
505
+ * `POST /v1/series/{id}/split` (business-scoped: needs an account)
506
+ */
507
+ split(id, params, options) {
508
+ return this.core.request({ method: "POST", path: `/v1/series/${(0, query_js_1.encodePath)(id)}/split`, body: params, options });
509
+ }
510
+ }
511
+ exports.SeriesResource = SeriesResource;
512
+ /** `tiempo.usage` */
513
+ class UsageResource {
514
+ core;
515
+ constructor(core) {
516
+ this.core = core;
517
+ }
518
+ /**
519
+ * `GET /v1/usage`
520
+ */
521
+ get(params, options) {
522
+ return this.core.request({ method: "GET", path: `/v1/usage`, query: params, options });
523
+ }
524
+ /**
525
+ * `GET /v1/usage/statements`
526
+ *
527
+ * Returns a single page; this endpoint does not paginate.
528
+ */
529
+ statements(options) {
530
+ return this.core.list({ method: "GET", path: `/v1/usage/statements`, options }, false);
531
+ }
532
+ }
533
+ exports.UsageResource = UsageResource;
534
+ /** `tiempo.webhookEndpoints` */
535
+ class WebhookEndpointsResource {
536
+ core;
537
+ constructor(core) {
538
+ this.core = core;
539
+ }
540
+ /**
541
+ * `GET /v1/webhook_endpoints`
542
+ *
543
+ * Await for one page, or `for await` to iterate every item.
544
+ */
545
+ list(params, options) {
546
+ return this.core.list({ method: "GET", path: `/v1/webhook_endpoints`, query: params, options }, true);
547
+ }
548
+ /**
549
+ * `POST /v1/webhook_endpoints`
550
+ */
551
+ create(params, options) {
552
+ return this.core.request({ method: "POST", path: `/v1/webhook_endpoints`, body: params, options });
553
+ }
554
+ /**
555
+ * `GET /v1/webhook_endpoints/{id}`
556
+ */
557
+ get(id, options) {
558
+ return this.core.request({ method: "GET", path: `/v1/webhook_endpoints/${(0, query_js_1.encodePath)(id)}`, options });
559
+ }
560
+ /**
561
+ * `POST /v1/webhook_endpoints/{id}`
562
+ */
563
+ update(id, params, options) {
564
+ return this.core.request({ method: "POST", path: `/v1/webhook_endpoints/${(0, query_js_1.encodePath)(id)}`, body: params, options });
565
+ }
566
+ /**
567
+ * `DELETE /v1/webhook_endpoints/{id}`
568
+ */
569
+ delete(id, options) {
570
+ return this.core.request({ method: "DELETE", path: `/v1/webhook_endpoints/${(0, query_js_1.encodePath)(id)}`, options });
571
+ }
572
+ /**
573
+ * `GET /v1/webhook_endpoints/{id}/deliveries`
574
+ *
575
+ * Await for one page, or `for await` to iterate every item.
576
+ */
577
+ deliveries(id, params, options) {
578
+ return this.core.list({ method: "GET", path: `/v1/webhook_endpoints/${(0, query_js_1.encodePath)(id)}/deliveries`, query: params, options }, true);
579
+ }
580
+ /**
581
+ * `POST /v1/webhook_endpoints/{id}/resend`
582
+ */
583
+ resend(id, params, options) {
584
+ return this.core.request({ method: "POST", path: `/v1/webhook_endpoints/${(0, query_js_1.encodePath)(id)}/resend`, body: params, options });
585
+ }
586
+ }
587
+ exports.WebhookEndpointsResource = WebhookEndpointsResource;
588
+ /** Every resource, as properties of the client. */
589
+ class TiempoResources {
590
+ accounts;
591
+ attendees;
592
+ availability;
593
+ blocks;
594
+ bookings;
595
+ conflictPreviews;
596
+ events;
597
+ locations;
598
+ resources;
599
+ scheduleOverrides;
600
+ schedules;
601
+ series;
602
+ usage;
603
+ webhookEndpoints;
604
+ constructor(core) {
605
+ this.accounts = new AccountsResource(core);
606
+ this.attendees = new AttendeesResource(core);
607
+ this.availability = new AvailabilityResource(core);
608
+ this.blocks = new BlocksResource(core);
609
+ this.bookings = new BookingsResource(core);
610
+ this.conflictPreviews = new ConflictPreviewsResource(core);
611
+ this.events = new EventsResource(core);
612
+ this.locations = new LocationsResource(core);
613
+ this.resources = new ResourcesResource(core);
614
+ this.scheduleOverrides = new ScheduleOverridesResource(core);
615
+ this.schedules = new SchedulesResource(core);
616
+ this.series = new SeriesResource(core);
617
+ this.usage = new UsageResource(core);
618
+ this.webhookEndpoints = new WebhookEndpointsResource(core);
619
+ }
620
+ }
621
+ exports.TiempoResources = TiempoResources;