@savvycal/appointments-core 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -30,13 +30,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ abandonBookingIntent: () => abandonBookingIntent,
34
+ abandonPublicBookingIntent: () => abandonPublicBookingIntent,
33
35
  cancelAppointment: () => cancelAppointment,
34
36
  cancelPublicAppointment: () => cancelPublicAppointment,
37
+ completeBookingIntent: () => completeBookingIntent,
38
+ completePublicBookingIntent: () => completePublicBookingIntent,
35
39
  confirmAppointment: () => confirmAppointment,
36
40
  createAccount: () => createAccount,
37
41
  createAccountUser: () => createAccountUser,
38
42
  createAppointment: () => createAppointment,
39
43
  createBlock: () => createBlock,
44
+ createBookingIntent: () => createBookingIntent,
40
45
  createCancellationReason: () => createCancellationReason,
41
46
  createClient: () => createClient2,
42
47
  createDashboardSession: () => createDashboardSession,
@@ -44,6 +49,7 @@ __export(index_exports, {
44
49
  createProvider: () => createProvider,
45
50
  createProviderSchedule: () => createProviderSchedule,
46
51
  createPublicAppointment: () => createPublicAppointment,
52
+ createPublicBookingIntent: () => createPublicBookingIntent,
47
53
  createService: () => createService,
48
54
  createServiceProvider: () => createServiceProvider,
49
55
  deactivateProvider: () => deactivateProvider,
@@ -57,6 +63,7 @@ __export(index_exports, {
57
63
  getAccountById: () => getAccountById,
58
64
  getAppointment: () => getAppointment,
59
65
  getBlock: () => getBlock,
66
+ getBookingIntent: () => getBookingIntent,
60
67
  getCancellationReason: () => getCancellationReason,
61
68
  getClient: () => getClient,
62
69
  getConnectedAccount: () => getConnectedAccount,
@@ -67,11 +74,13 @@ __export(index_exports, {
67
74
  getProvider: () => getProvider,
68
75
  getProviderSchedule: () => getProviderSchedule,
69
76
  getPublicAppointment: () => getPublicAppointment,
77
+ getPublicBookingIntent: () => getPublicBookingIntent,
70
78
  getService: () => getService,
71
79
  listAccountUsers: () => listAccountUsers,
72
80
  listAccounts: () => listAccounts,
73
81
  listAppointments: () => listAppointments,
74
82
  listBlocks: () => listBlocks,
83
+ listBookingIntents: () => listBookingIntents,
75
84
  listCancellationReasons: () => listCancellationReasons,
76
85
  listClients: () => listClients,
77
86
  listConnectedAccounts: () => listConnectedAccounts,
@@ -88,11 +97,13 @@ __export(index_exports, {
88
97
  updateAccount: () => updateAccount,
89
98
  updateAccountUser: () => updateAccountUser,
90
99
  updateBlock: () => updateBlock,
100
+ updateBookingIntent: () => updateBookingIntent,
91
101
  updateCancellationReason: () => updateCancellationReason,
92
102
  updateClient: () => updateClient,
93
103
  updateConnectedAccount: () => updateConnectedAccount,
94
104
  updateProvider: () => updateProvider,
95
105
  updateProviderSchedule: () => updateProviderSchedule,
106
+ updatePublicBookingIntent: () => updatePublicBookingIntent,
96
107
  updateService: () => updateService
97
108
  });
98
109
  module.exports = __toCommonJS(index_exports);
@@ -173,6 +184,16 @@ var createFetchClient = (options = {}) => {
173
184
  };
174
185
 
175
186
  // src/operations.ts
187
+ function abandonBookingIntent(client, path) {
188
+ return client.POST("/v1/booking_intents/{booking_intent_id}/abandon", {
189
+ params: { path }
190
+ });
191
+ }
192
+ function abandonPublicBookingIntent(client, path) {
193
+ return client.POST("/v1/public/booking_intents/{booking_intent_id}/abandon", {
194
+ params: { path }
195
+ });
196
+ }
176
197
  function cancelAppointment(client, path, body) {
177
198
  return client.POST("/v1/appointments/{appointment_id}/cancel", {
178
199
  body,
@@ -185,6 +206,21 @@ function cancelPublicAppointment(client, path, body) {
185
206
  params: { path }
186
207
  });
187
208
  }
209
+ function completeBookingIntent(client, path, body) {
210
+ return client.POST("/v1/booking_intents/{booking_intent_id}/complete", {
211
+ body,
212
+ params: { path }
213
+ });
214
+ }
215
+ function completePublicBookingIntent(client, path, body) {
216
+ return client.POST(
217
+ "/v1/public/booking_intents/{booking_intent_id}/complete",
218
+ {
219
+ body,
220
+ params: { path }
221
+ }
222
+ );
223
+ }
188
224
  function confirmAppointment(client, path, body) {
189
225
  return client.POST("/v1/appointments/{appointment_id}/confirm", {
190
226
  body,
@@ -211,6 +247,11 @@ function createBlock(client, body) {
211
247
  body
212
248
  });
213
249
  }
250
+ function createBookingIntent(client, body) {
251
+ return client.POST("/v1/booking_intents", {
252
+ body
253
+ });
254
+ }
214
255
  function createCancellationReason(client, body) {
215
256
  return client.POST("/v1/cancellation_reasons", {
216
257
  body
@@ -242,6 +283,11 @@ function createPublicAppointment(client, body) {
242
283
  body
243
284
  });
244
285
  }
286
+ function createPublicBookingIntent(client, body) {
287
+ return client.POST("/v1/public/booking_intents", {
288
+ body
289
+ });
290
+ }
245
291
  function createService(client, body) {
246
292
  return client.POST("/v1/services", {
247
293
  body
@@ -308,6 +354,11 @@ function getBlock(client, path) {
308
354
  params: { path }
309
355
  });
310
356
  }
357
+ function getBookingIntent(client, path, query) {
358
+ return client.GET("/v1/booking_intents/{booking_intent_id}", {
359
+ params: { path, query }
360
+ });
361
+ }
311
362
  function getCancellationReason(client, path) {
312
363
  return client.GET("/v1/cancellation_reasons/{cancellation_reason_id}", {
313
364
  params: { path }
@@ -352,6 +403,11 @@ function getPublicAppointment(client, path) {
352
403
  params: { path }
353
404
  });
354
405
  }
406
+ function getPublicBookingIntent(client, path) {
407
+ return client.GET("/v1/public/booking_intents/{booking_intent_id}", {
408
+ params: { path }
409
+ });
410
+ }
355
411
  function getService(client, path) {
356
412
  return client.GET("/v1/services/{service_id}", {
357
413
  params: { path }
@@ -375,6 +431,11 @@ function listBlocks(client, query) {
375
431
  params: { query }
376
432
  });
377
433
  }
434
+ function listBookingIntents(client, query) {
435
+ return client.GET("/v1/booking_intents", {
436
+ params: { query }
437
+ });
438
+ }
378
439
  function listCancellationReasons(client) {
379
440
  return client.GET("/v1/cancellation_reasons");
380
441
  }
@@ -459,6 +520,12 @@ function updateBlock(client, path, body) {
459
520
  params: { path }
460
521
  });
461
522
  }
523
+ function updateBookingIntent(client, path, body) {
524
+ return client.PATCH("/v1/booking_intents/{booking_intent_id}", {
525
+ body,
526
+ params: { path }
527
+ });
528
+ }
462
529
  function updateCancellationReason(client, path, body) {
463
530
  return client.PATCH("/v1/cancellation_reasons/{cancellation_reason_id}", {
464
531
  body,
@@ -489,6 +556,12 @@ function updateProviderSchedule(client, path, body) {
489
556
  params: { path }
490
557
  });
491
558
  }
559
+ function updatePublicBookingIntent(client, path, body) {
560
+ return client.PATCH("/v1/public/booking_intents/{booking_intent_id}", {
561
+ body,
562
+ params: { path }
563
+ });
564
+ }
492
565
  function updateService(client, path, body) {
493
566
  return client.PATCH("/v1/services/{service_id}", {
494
567
  body,
@@ -497,13 +570,18 @@ function updateService(client, path, body) {
497
570
  }
498
571
  // Annotate the CommonJS export names for ESM import in node:
499
572
  0 && (module.exports = {
573
+ abandonBookingIntent,
574
+ abandonPublicBookingIntent,
500
575
  cancelAppointment,
501
576
  cancelPublicAppointment,
577
+ completeBookingIntent,
578
+ completePublicBookingIntent,
502
579
  confirmAppointment,
503
580
  createAccount,
504
581
  createAccountUser,
505
582
  createAppointment,
506
583
  createBlock,
584
+ createBookingIntent,
507
585
  createCancellationReason,
508
586
  createClient,
509
587
  createDashboardSession,
@@ -511,6 +589,7 @@ function updateService(client, path, body) {
511
589
  createProvider,
512
590
  createProviderSchedule,
513
591
  createPublicAppointment,
592
+ createPublicBookingIntent,
514
593
  createService,
515
594
  createServiceProvider,
516
595
  deactivateProvider,
@@ -524,6 +603,7 @@ function updateService(client, path, body) {
524
603
  getAccountById,
525
604
  getAppointment,
526
605
  getBlock,
606
+ getBookingIntent,
527
607
  getCancellationReason,
528
608
  getClient,
529
609
  getConnectedAccount,
@@ -534,11 +614,13 @@ function updateService(client, path, body) {
534
614
  getProvider,
535
615
  getProviderSchedule,
536
616
  getPublicAppointment,
617
+ getPublicBookingIntent,
537
618
  getService,
538
619
  listAccountUsers,
539
620
  listAccounts,
540
621
  listAppointments,
541
622
  listBlocks,
623
+ listBookingIntents,
542
624
  listCancellationReasons,
543
625
  listClients,
544
626
  listConnectedAccounts,
@@ -555,10 +637,12 @@ function updateService(client, path, body) {
555
637
  updateAccount,
556
638
  updateAccountUser,
557
639
  updateBlock,
640
+ updateBookingIntent,
558
641
  updateCancellationReason,
559
642
  updateClient,
560
643
  updateConnectedAccount,
561
644
  updateProvider,
562
645
  updateProviderSchedule,
646
+ updatePublicBookingIntent,
563
647
  updateService
564
648
  });