@savvycal/appointments-core 0.13.0 → 1.0.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 +101 -1
- package/dist/index.d.cts +3000 -272
- package/dist/index.d.ts +3000 -272
- package/dist/index.js +87 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var index_exports = {};
|
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
abandonBookingIntent: () => abandonBookingIntent,
|
|
34
34
|
abandonPublicBookingIntent: () => abandonPublicBookingIntent,
|
|
35
|
+
attachServiceForm: () => attachServiceForm,
|
|
35
36
|
cancelAppointment: () => cancelAppointment,
|
|
36
37
|
cancelPublicAppointment: () => cancelPublicAppointment,
|
|
37
38
|
completeBookingIntent: () => completeBookingIntent,
|
|
@@ -44,8 +45,10 @@ __export(index_exports, {
|
|
|
44
45
|
createBookingIntent: () => createBookingIntent,
|
|
45
46
|
createCancellationReason: () => createCancellationReason,
|
|
46
47
|
createClient: () => createClient2,
|
|
48
|
+
createClientField: () => createClientField,
|
|
47
49
|
createDashboardSession: () => createDashboardSession,
|
|
48
50
|
createFetchClient: () => createFetchClient,
|
|
51
|
+
createForm: () => createForm,
|
|
49
52
|
createProvider: () => createProvider,
|
|
50
53
|
createProviderSchedule: () => createProviderSchedule,
|
|
51
54
|
createPublicAppointment: () => createPublicAppointment,
|
|
@@ -56,21 +59,26 @@ __export(index_exports, {
|
|
|
56
59
|
deleteBlock: () => deleteBlock,
|
|
57
60
|
deleteCancellationReason: () => deleteCancellationReason,
|
|
58
61
|
deleteClient: () => deleteClient,
|
|
62
|
+
deleteClientField: () => deleteClientField,
|
|
59
63
|
deleteConnectedAccount: () => deleteConnectedAccount,
|
|
64
|
+
deleteForm: () => deleteForm,
|
|
60
65
|
deleteProviderSchedule: () => deleteProviderSchedule,
|
|
61
66
|
deleteService: () => deleteService,
|
|
62
67
|
deleteServiceProvider: () => deleteServiceProvider,
|
|
68
|
+
detachServiceForm: () => detachServiceForm,
|
|
63
69
|
getAccountById: () => getAccountById,
|
|
64
70
|
getAppointment: () => getAppointment,
|
|
65
71
|
getBlock: () => getBlock,
|
|
66
72
|
getBookingIntent: () => getBookingIntent,
|
|
67
73
|
getCancellationReason: () => getCancellationReason,
|
|
68
74
|
getClient: () => getClient,
|
|
75
|
+
getClientField: () => getClientField,
|
|
69
76
|
getConnectedAccount: () => getConnectedAccount,
|
|
70
77
|
getCurrentAccount: () => getCurrentAccount,
|
|
71
78
|
getCurrentAccountUser: () => getCurrentAccountUser,
|
|
72
79
|
getCurrentPlatform: () => getCurrentPlatform,
|
|
73
80
|
getEarliestPublicServiceSlot: () => getEarliestPublicServiceSlot,
|
|
81
|
+
getForm: () => getForm,
|
|
74
82
|
getProvider: () => getProvider,
|
|
75
83
|
getProviderSchedule: () => getProviderSchedule,
|
|
76
84
|
getPublicAppointment: () => getPublicAppointment,
|
|
@@ -82,25 +90,31 @@ __export(index_exports, {
|
|
|
82
90
|
listBlocks: () => listBlocks,
|
|
83
91
|
listBookingIntents: () => listBookingIntents,
|
|
84
92
|
listCancellationReasons: () => listCancellationReasons,
|
|
93
|
+
listClientFields: () => listClientFields,
|
|
85
94
|
listClients: () => listClients,
|
|
86
95
|
listConnectedAccounts: () => listConnectedAccounts,
|
|
96
|
+
listForms: () => listForms,
|
|
87
97
|
listProviderSchedules: () => listProviderSchedules,
|
|
88
98
|
listProviders: () => listProviders,
|
|
89
99
|
listPublicCancellationReasons: () => listPublicCancellationReasons,
|
|
90
100
|
listPublicServiceSlots: () => listPublicServiceSlots,
|
|
91
101
|
listRoles: () => listRoles,
|
|
102
|
+
listServiceForms: () => listServiceForms,
|
|
92
103
|
listServiceProviders: () => listServiceProviders,
|
|
93
104
|
listServiceSlots: () => listServiceSlots,
|
|
94
105
|
listServices: () => listServices,
|
|
95
106
|
rescheduleAppointment: () => rescheduleAppointment,
|
|
96
107
|
reschedulePublicAppointment: () => reschedulePublicAppointment,
|
|
108
|
+
sortServiceForms: () => sortServiceForms,
|
|
97
109
|
updateAccount: () => updateAccount,
|
|
98
110
|
updateAccountUser: () => updateAccountUser,
|
|
99
111
|
updateBlock: () => updateBlock,
|
|
100
112
|
updateBookingIntent: () => updateBookingIntent,
|
|
101
113
|
updateCancellationReason: () => updateCancellationReason,
|
|
102
114
|
updateClient: () => updateClient,
|
|
115
|
+
updateClientField: () => updateClientField,
|
|
103
116
|
updateConnectedAccount: () => updateConnectedAccount,
|
|
117
|
+
updateForm: () => updateForm,
|
|
104
118
|
updateProvider: () => updateProvider,
|
|
105
119
|
updateProviderSchedule: () => updateProviderSchedule,
|
|
106
120
|
updatePublicBookingIntent: () => updatePublicBookingIntent,
|
|
@@ -194,6 +208,12 @@ function abandonPublicBookingIntent(client, path) {
|
|
|
194
208
|
params: { path }
|
|
195
209
|
});
|
|
196
210
|
}
|
|
211
|
+
function attachServiceForm(client, path, body) {
|
|
212
|
+
return client.POST("/v1/services/{service_id}/forms", {
|
|
213
|
+
body,
|
|
214
|
+
params: { path }
|
|
215
|
+
});
|
|
216
|
+
}
|
|
197
217
|
function cancelAppointment(client, path, body) {
|
|
198
218
|
return client.POST("/v1/appointments/{appointment_id}/cancel", {
|
|
199
219
|
body,
|
|
@@ -262,11 +282,21 @@ function createClient2(client, body) {
|
|
|
262
282
|
body
|
|
263
283
|
});
|
|
264
284
|
}
|
|
285
|
+
function createClientField(client, body) {
|
|
286
|
+
return client.POST("/v1/client_fields", {
|
|
287
|
+
body
|
|
288
|
+
});
|
|
289
|
+
}
|
|
265
290
|
function createDashboardSession(client, body) {
|
|
266
291
|
return client.POST("/v1/dashboard_sessions", {
|
|
267
292
|
body
|
|
268
293
|
});
|
|
269
294
|
}
|
|
295
|
+
function createForm(client, body) {
|
|
296
|
+
return client.POST("/v1/forms", {
|
|
297
|
+
body
|
|
298
|
+
});
|
|
299
|
+
}
|
|
270
300
|
function createProvider(client, body) {
|
|
271
301
|
return client.POST("/v1/providers", {
|
|
272
302
|
body
|
|
@@ -319,11 +349,21 @@ function deleteClient(client, path) {
|
|
|
319
349
|
params: { path }
|
|
320
350
|
});
|
|
321
351
|
}
|
|
352
|
+
function deleteClientField(client, path) {
|
|
353
|
+
return client.DELETE("/v1/client_fields/{client_field_id}", {
|
|
354
|
+
params: { path }
|
|
355
|
+
});
|
|
356
|
+
}
|
|
322
357
|
function deleteConnectedAccount(client, path) {
|
|
323
358
|
return client.DELETE("/v1/connected_accounts/{connected_account_id}", {
|
|
324
359
|
params: { path }
|
|
325
360
|
});
|
|
326
361
|
}
|
|
362
|
+
function deleteForm(client, path) {
|
|
363
|
+
return client.DELETE("/v1/forms/{form_id}", {
|
|
364
|
+
params: { path }
|
|
365
|
+
});
|
|
366
|
+
}
|
|
327
367
|
function deleteProviderSchedule(client, path) {
|
|
328
368
|
return client.DELETE("/v1/provider_schedules/{provider_schedule_id}", {
|
|
329
369
|
params: { path }
|
|
@@ -339,6 +379,11 @@ function deleteServiceProvider(client, path) {
|
|
|
339
379
|
params: { path }
|
|
340
380
|
});
|
|
341
381
|
}
|
|
382
|
+
function detachServiceForm(client, path) {
|
|
383
|
+
return client.DELETE("/v1/service_forms/{service_form_id}", {
|
|
384
|
+
params: { path }
|
|
385
|
+
});
|
|
386
|
+
}
|
|
342
387
|
function getAccountById(client, path) {
|
|
343
388
|
return client.GET("/v1/accounts/{account_id}", {
|
|
344
389
|
params: { path }
|
|
@@ -364,8 +409,13 @@ function getCancellationReason(client, path) {
|
|
|
364
409
|
params: { path }
|
|
365
410
|
});
|
|
366
411
|
}
|
|
367
|
-
function getClient(client, path) {
|
|
412
|
+
function getClient(client, path, query) {
|
|
368
413
|
return client.GET("/v1/clients/{client_id}", {
|
|
414
|
+
params: { path, query }
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
function getClientField(client, path) {
|
|
418
|
+
return client.GET("/v1/client_fields/{client_field_id}", {
|
|
369
419
|
params: { path }
|
|
370
420
|
});
|
|
371
421
|
}
|
|
@@ -388,6 +438,11 @@ function getEarliestPublicServiceSlot(client, path, query) {
|
|
|
388
438
|
params: { path, query }
|
|
389
439
|
});
|
|
390
440
|
}
|
|
441
|
+
function getForm(client, path) {
|
|
442
|
+
return client.GET("/v1/forms/{form_id}", {
|
|
443
|
+
params: { path }
|
|
444
|
+
});
|
|
445
|
+
}
|
|
391
446
|
function getProvider(client, path) {
|
|
392
447
|
return client.GET("/v1/providers/{provider_id}", {
|
|
393
448
|
params: { path }
|
|
@@ -439,6 +494,9 @@ function listBookingIntents(client, query) {
|
|
|
439
494
|
function listCancellationReasons(client) {
|
|
440
495
|
return client.GET("/v1/cancellation_reasons");
|
|
441
496
|
}
|
|
497
|
+
function listClientFields(client) {
|
|
498
|
+
return client.GET("/v1/client_fields");
|
|
499
|
+
}
|
|
442
500
|
function listClients(client, query) {
|
|
443
501
|
return client.GET("/v1/clients", {
|
|
444
502
|
params: { query }
|
|
@@ -449,6 +507,11 @@ function listConnectedAccounts(client, query) {
|
|
|
449
507
|
params: { query }
|
|
450
508
|
});
|
|
451
509
|
}
|
|
510
|
+
function listForms(client, query) {
|
|
511
|
+
return client.GET("/v1/forms", {
|
|
512
|
+
params: { query }
|
|
513
|
+
});
|
|
514
|
+
}
|
|
452
515
|
function listProviders(client, query) {
|
|
453
516
|
return client.GET("/v1/providers", {
|
|
454
517
|
params: { query }
|
|
@@ -475,6 +538,11 @@ function listPublicServiceSlots(client, path, query) {
|
|
|
475
538
|
function listRoles(client) {
|
|
476
539
|
return client.GET("/v1/roles");
|
|
477
540
|
}
|
|
541
|
+
function listServiceForms(client, path) {
|
|
542
|
+
return client.GET("/v1/services/{service_id}/forms", {
|
|
543
|
+
params: { path }
|
|
544
|
+
});
|
|
545
|
+
}
|
|
478
546
|
function listServiceProviders(client, path) {
|
|
479
547
|
return client.GET("/v1/services/{service_id}/providers", {
|
|
480
548
|
params: { path }
|
|
@@ -502,6 +570,12 @@ function reschedulePublicAppointment(client, path, body) {
|
|
|
502
570
|
params: { path }
|
|
503
571
|
});
|
|
504
572
|
}
|
|
573
|
+
function sortServiceForms(client, path, body) {
|
|
574
|
+
return client.POST("/v1/services/{service_id}/forms/sort", {
|
|
575
|
+
body,
|
|
576
|
+
params: { path }
|
|
577
|
+
});
|
|
578
|
+
}
|
|
505
579
|
function updateAccount(client, path, body) {
|
|
506
580
|
return client.PATCH("/v1/accounts/{account_id}", {
|
|
507
581
|
body,
|
|
@@ -538,12 +612,24 @@ function updateClient(client, path, body) {
|
|
|
538
612
|
params: { path }
|
|
539
613
|
});
|
|
540
614
|
}
|
|
615
|
+
function updateClientField(client, path, body) {
|
|
616
|
+
return client.PATCH("/v1/client_fields/{client_field_id}", {
|
|
617
|
+
body,
|
|
618
|
+
params: { path }
|
|
619
|
+
});
|
|
620
|
+
}
|
|
541
621
|
function updateConnectedAccount(client, path, body) {
|
|
542
622
|
return client.PATCH("/v1/connected_accounts/{connected_account_id}", {
|
|
543
623
|
body,
|
|
544
624
|
params: { path }
|
|
545
625
|
});
|
|
546
626
|
}
|
|
627
|
+
function updateForm(client, path, body) {
|
|
628
|
+
return client.PATCH("/v1/forms/{form_id}", {
|
|
629
|
+
body,
|
|
630
|
+
params: { path }
|
|
631
|
+
});
|
|
632
|
+
}
|
|
547
633
|
function updateProvider(client, path, body) {
|
|
548
634
|
return client.PATCH("/v1/providers/{provider_id}", {
|
|
549
635
|
body,
|
|
@@ -572,6 +658,7 @@ function updateService(client, path, body) {
|
|
|
572
658
|
0 && (module.exports = {
|
|
573
659
|
abandonBookingIntent,
|
|
574
660
|
abandonPublicBookingIntent,
|
|
661
|
+
attachServiceForm,
|
|
575
662
|
cancelAppointment,
|
|
576
663
|
cancelPublicAppointment,
|
|
577
664
|
completeBookingIntent,
|
|
@@ -584,8 +671,10 @@ function updateService(client, path, body) {
|
|
|
584
671
|
createBookingIntent,
|
|
585
672
|
createCancellationReason,
|
|
586
673
|
createClient,
|
|
674
|
+
createClientField,
|
|
587
675
|
createDashboardSession,
|
|
588
676
|
createFetchClient,
|
|
677
|
+
createForm,
|
|
589
678
|
createProvider,
|
|
590
679
|
createProviderSchedule,
|
|
591
680
|
createPublicAppointment,
|
|
@@ -596,21 +685,26 @@ function updateService(client, path, body) {
|
|
|
596
685
|
deleteBlock,
|
|
597
686
|
deleteCancellationReason,
|
|
598
687
|
deleteClient,
|
|
688
|
+
deleteClientField,
|
|
599
689
|
deleteConnectedAccount,
|
|
690
|
+
deleteForm,
|
|
600
691
|
deleteProviderSchedule,
|
|
601
692
|
deleteService,
|
|
602
693
|
deleteServiceProvider,
|
|
694
|
+
detachServiceForm,
|
|
603
695
|
getAccountById,
|
|
604
696
|
getAppointment,
|
|
605
697
|
getBlock,
|
|
606
698
|
getBookingIntent,
|
|
607
699
|
getCancellationReason,
|
|
608
700
|
getClient,
|
|
701
|
+
getClientField,
|
|
609
702
|
getConnectedAccount,
|
|
610
703
|
getCurrentAccount,
|
|
611
704
|
getCurrentAccountUser,
|
|
612
705
|
getCurrentPlatform,
|
|
613
706
|
getEarliestPublicServiceSlot,
|
|
707
|
+
getForm,
|
|
614
708
|
getProvider,
|
|
615
709
|
getProviderSchedule,
|
|
616
710
|
getPublicAppointment,
|
|
@@ -622,25 +716,31 @@ function updateService(client, path, body) {
|
|
|
622
716
|
listBlocks,
|
|
623
717
|
listBookingIntents,
|
|
624
718
|
listCancellationReasons,
|
|
719
|
+
listClientFields,
|
|
625
720
|
listClients,
|
|
626
721
|
listConnectedAccounts,
|
|
722
|
+
listForms,
|
|
627
723
|
listProviderSchedules,
|
|
628
724
|
listProviders,
|
|
629
725
|
listPublicCancellationReasons,
|
|
630
726
|
listPublicServiceSlots,
|
|
631
727
|
listRoles,
|
|
728
|
+
listServiceForms,
|
|
632
729
|
listServiceProviders,
|
|
633
730
|
listServiceSlots,
|
|
634
731
|
listServices,
|
|
635
732
|
rescheduleAppointment,
|
|
636
733
|
reschedulePublicAppointment,
|
|
734
|
+
sortServiceForms,
|
|
637
735
|
updateAccount,
|
|
638
736
|
updateAccountUser,
|
|
639
737
|
updateBlock,
|
|
640
738
|
updateBookingIntent,
|
|
641
739
|
updateCancellationReason,
|
|
642
740
|
updateClient,
|
|
741
|
+
updateClientField,
|
|
643
742
|
updateConnectedAccount,
|
|
743
|
+
updateForm,
|
|
644
744
|
updateProvider,
|
|
645
745
|
updateProviderSchedule,
|
|
646
746
|
updatePublicBookingIntent,
|