@savvycal/appointments-core 0.14.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.js CHANGED
@@ -84,6 +84,12 @@ function abandonPublicBookingIntent(client, path) {
84
84
  params: { path }
85
85
  });
86
86
  }
87
+ function attachServiceForm(client, path, body) {
88
+ return client.POST("/v1/services/{service_id}/forms", {
89
+ body,
90
+ params: { path }
91
+ });
92
+ }
87
93
  function cancelAppointment(client, path, body) {
88
94
  return client.POST("/v1/appointments/{appointment_id}/cancel", {
89
95
  body,
@@ -152,11 +158,21 @@ function createClient2(client, body) {
152
158
  body
153
159
  });
154
160
  }
161
+ function createClientField(client, body) {
162
+ return client.POST("/v1/client_fields", {
163
+ body
164
+ });
165
+ }
155
166
  function createDashboardSession(client, body) {
156
167
  return client.POST("/v1/dashboard_sessions", {
157
168
  body
158
169
  });
159
170
  }
171
+ function createForm(client, body) {
172
+ return client.POST("/v1/forms", {
173
+ body
174
+ });
175
+ }
160
176
  function createProvider(client, body) {
161
177
  return client.POST("/v1/providers", {
162
178
  body
@@ -209,11 +225,21 @@ function deleteClient(client, path) {
209
225
  params: { path }
210
226
  });
211
227
  }
228
+ function deleteClientField(client, path) {
229
+ return client.DELETE("/v1/client_fields/{client_field_id}", {
230
+ params: { path }
231
+ });
232
+ }
212
233
  function deleteConnectedAccount(client, path) {
213
234
  return client.DELETE("/v1/connected_accounts/{connected_account_id}", {
214
235
  params: { path }
215
236
  });
216
237
  }
238
+ function deleteForm(client, path) {
239
+ return client.DELETE("/v1/forms/{form_id}", {
240
+ params: { path }
241
+ });
242
+ }
217
243
  function deleteProviderSchedule(client, path) {
218
244
  return client.DELETE("/v1/provider_schedules/{provider_schedule_id}", {
219
245
  params: { path }
@@ -229,6 +255,11 @@ function deleteServiceProvider(client, path) {
229
255
  params: { path }
230
256
  });
231
257
  }
258
+ function detachServiceForm(client, path) {
259
+ return client.DELETE("/v1/service_forms/{service_form_id}", {
260
+ params: { path }
261
+ });
262
+ }
232
263
  function getAccountById(client, path) {
233
264
  return client.GET("/v1/accounts/{account_id}", {
234
265
  params: { path }
@@ -254,8 +285,13 @@ function getCancellationReason(client, path) {
254
285
  params: { path }
255
286
  });
256
287
  }
257
- function getClient(client, path) {
288
+ function getClient(client, path, query) {
258
289
  return client.GET("/v1/clients/{client_id}", {
290
+ params: { path, query }
291
+ });
292
+ }
293
+ function getClientField(client, path) {
294
+ return client.GET("/v1/client_fields/{client_field_id}", {
259
295
  params: { path }
260
296
  });
261
297
  }
@@ -278,6 +314,11 @@ function getEarliestPublicServiceSlot(client, path, query) {
278
314
  params: { path, query }
279
315
  });
280
316
  }
317
+ function getForm(client, path) {
318
+ return client.GET("/v1/forms/{form_id}", {
319
+ params: { path }
320
+ });
321
+ }
281
322
  function getProvider(client, path) {
282
323
  return client.GET("/v1/providers/{provider_id}", {
283
324
  params: { path }
@@ -329,6 +370,9 @@ function listBookingIntents(client, query) {
329
370
  function listCancellationReasons(client) {
330
371
  return client.GET("/v1/cancellation_reasons");
331
372
  }
373
+ function listClientFields(client) {
374
+ return client.GET("/v1/client_fields");
375
+ }
332
376
  function listClients(client, query) {
333
377
  return client.GET("/v1/clients", {
334
378
  params: { query }
@@ -339,6 +383,11 @@ function listConnectedAccounts(client, query) {
339
383
  params: { query }
340
384
  });
341
385
  }
386
+ function listForms(client, query) {
387
+ return client.GET("/v1/forms", {
388
+ params: { query }
389
+ });
390
+ }
342
391
  function listProviders(client, query) {
343
392
  return client.GET("/v1/providers", {
344
393
  params: { query }
@@ -365,6 +414,11 @@ function listPublicServiceSlots(client, path, query) {
365
414
  function listRoles(client) {
366
415
  return client.GET("/v1/roles");
367
416
  }
417
+ function listServiceForms(client, path) {
418
+ return client.GET("/v1/services/{service_id}/forms", {
419
+ params: { path }
420
+ });
421
+ }
368
422
  function listServiceProviders(client, path) {
369
423
  return client.GET("/v1/services/{service_id}/providers", {
370
424
  params: { path }
@@ -392,6 +446,12 @@ function reschedulePublicAppointment(client, path, body) {
392
446
  params: { path }
393
447
  });
394
448
  }
449
+ function sortServiceForms(client, path, body) {
450
+ return client.POST("/v1/services/{service_id}/forms/sort", {
451
+ body,
452
+ params: { path }
453
+ });
454
+ }
395
455
  function updateAccount(client, path, body) {
396
456
  return client.PATCH("/v1/accounts/{account_id}", {
397
457
  body,
@@ -428,12 +488,24 @@ function updateClient(client, path, body) {
428
488
  params: { path }
429
489
  });
430
490
  }
491
+ function updateClientField(client, path, body) {
492
+ return client.PATCH("/v1/client_fields/{client_field_id}", {
493
+ body,
494
+ params: { path }
495
+ });
496
+ }
431
497
  function updateConnectedAccount(client, path, body) {
432
498
  return client.PATCH("/v1/connected_accounts/{connected_account_id}", {
433
499
  body,
434
500
  params: { path }
435
501
  });
436
502
  }
503
+ function updateForm(client, path, body) {
504
+ return client.PATCH("/v1/forms/{form_id}", {
505
+ body,
506
+ params: { path }
507
+ });
508
+ }
437
509
  function updateProvider(client, path, body) {
438
510
  return client.PATCH("/v1/providers/{provider_id}", {
439
511
  body,
@@ -461,6 +533,7 @@ function updateService(client, path, body) {
461
533
  export {
462
534
  abandonBookingIntent,
463
535
  abandonPublicBookingIntent,
536
+ attachServiceForm,
464
537
  cancelAppointment,
465
538
  cancelPublicAppointment,
466
539
  completeBookingIntent,
@@ -473,8 +546,10 @@ export {
473
546
  createBookingIntent,
474
547
  createCancellationReason,
475
548
  createClient2 as createClient,
549
+ createClientField,
476
550
  createDashboardSession,
477
551
  createFetchClient,
552
+ createForm,
478
553
  createProvider,
479
554
  createProviderSchedule,
480
555
  createPublicAppointment,
@@ -485,21 +560,26 @@ export {
485
560
  deleteBlock,
486
561
  deleteCancellationReason,
487
562
  deleteClient,
563
+ deleteClientField,
488
564
  deleteConnectedAccount,
565
+ deleteForm,
489
566
  deleteProviderSchedule,
490
567
  deleteService,
491
568
  deleteServiceProvider,
569
+ detachServiceForm,
492
570
  getAccountById,
493
571
  getAppointment,
494
572
  getBlock,
495
573
  getBookingIntent,
496
574
  getCancellationReason,
497
575
  getClient,
576
+ getClientField,
498
577
  getConnectedAccount,
499
578
  getCurrentAccount,
500
579
  getCurrentAccountUser,
501
580
  getCurrentPlatform,
502
581
  getEarliestPublicServiceSlot,
582
+ getForm,
503
583
  getProvider,
504
584
  getProviderSchedule,
505
585
  getPublicAppointment,
@@ -511,25 +591,31 @@ export {
511
591
  listBlocks,
512
592
  listBookingIntents,
513
593
  listCancellationReasons,
594
+ listClientFields,
514
595
  listClients,
515
596
  listConnectedAccounts,
597
+ listForms,
516
598
  listProviderSchedules,
517
599
  listProviders,
518
600
  listPublicCancellationReasons,
519
601
  listPublicServiceSlots,
520
602
  listRoles,
603
+ listServiceForms,
521
604
  listServiceProviders,
522
605
  listServiceSlots,
523
606
  listServices,
524
607
  rescheduleAppointment,
525
608
  reschedulePublicAppointment,
609
+ sortServiceForms,
526
610
  updateAccount,
527
611
  updateAccountUser,
528
612
  updateBlock,
529
613
  updateBookingIntent,
530
614
  updateCancellationReason,
531
615
  updateClient,
616
+ updateClientField,
532
617
  updateConnectedAccount,
618
+ updateForm,
533
619
  updateProvider,
534
620
  updateProviderSchedule,
535
621
  updatePublicBookingIntent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-core",
3
- "version": "0.14.0",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "description": "JavaScript/TypeScript client library for the SavvyCal Appointments API",
6
6
  "main": "./dist/index.cjs",