@savvycal/appointments-react-query 1.2.9 → 1.3.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
@@ -246,6 +246,13 @@ var useCreateBookingIntent = (options) => {
246
246
  return client.useMutation("post", "/v1/booking_intents", mutationOptions);
247
247
  };
248
248
 
249
+ // src/mutation-hooks/use-create-booking-link.ts
250
+ var useCreateBookingLink = (options) => {
251
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
252
+ const client = useSavvyCalQueryClient(overrideClient);
253
+ return client.useMutation("post", "/v1/booking_links", mutationOptions);
254
+ };
255
+
249
256
  // src/mutation-hooks/use-create-cancellation-reason.ts
250
257
  var useCreateCancellationReason = (options) => {
251
258
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -285,6 +292,17 @@ var useCreateForm = (options) => {
285
292
  return client.useMutation("post", "/v1/forms", mutationOptions);
286
293
  };
287
294
 
295
+ // src/mutation-hooks/use-create-opening.ts
296
+ var useCreateOpening = (options) => {
297
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
298
+ const client = useSavvyCalQueryClient(overrideClient);
299
+ return client.useMutation(
300
+ "post",
301
+ "/v1/providers/{provider_id}/openings",
302
+ mutationOptions
303
+ );
304
+ };
305
+
288
306
  // src/mutation-hooks/use-create-provider.ts
289
307
  var useCreateProvider = (options) => {
290
308
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -357,6 +375,17 @@ var useDeleteBlock = (options) => {
357
375
  return client.useMutation("delete", "/v1/blocks/{block_id}", mutationOptions);
358
376
  };
359
377
 
378
+ // src/mutation-hooks/use-delete-booking-link.ts
379
+ var useDeleteBookingLink = (options) => {
380
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
381
+ const client = useSavvyCalQueryClient(overrideClient);
382
+ return client.useMutation(
383
+ "delete",
384
+ "/v1/booking_links/{booking_link_id}",
385
+ mutationOptions
386
+ );
387
+ };
388
+
360
389
  // src/mutation-hooks/use-delete-cancellation-reason.ts
361
390
  var useDeleteCancellationReason = (options) => {
362
391
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -408,6 +437,17 @@ var useDeleteForm = (options) => {
408
437
  return client.useMutation("delete", "/v1/forms/{form_id}", mutationOptions);
409
438
  };
410
439
 
440
+ // src/mutation-hooks/use-delete-opening.ts
441
+ var useDeleteOpening = (options) => {
442
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
443
+ const client = useSavvyCalQueryClient(overrideClient);
444
+ return client.useMutation(
445
+ "delete",
446
+ "/v1/openings/{opening_id}",
447
+ mutationOptions
448
+ );
449
+ };
450
+
411
451
  // src/mutation-hooks/use-delete-provider-schedule.ts
412
452
  var useDeleteProviderSchedule = (options) => {
413
453
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -441,6 +481,17 @@ var useDeleteServiceProvider = (options) => {
441
481
  );
442
482
  };
443
483
 
484
+ // src/mutation-hooks/use-delete-user-mapping.ts
485
+ var useDeleteUserMapping = (options) => {
486
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
487
+ const client = useSavvyCalQueryClient(overrideClient);
488
+ return client.useMutation(
489
+ "delete",
490
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
491
+ mutationOptions
492
+ );
493
+ };
494
+
444
495
  // src/mutation-hooks/use-detach-service-form.ts
445
496
  var useDetachServiceForm = (options) => {
446
497
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -474,6 +525,17 @@ var useReschedulePublicAppointment = (options) => {
474
525
  );
475
526
  };
476
527
 
528
+ // src/mutation-hooks/use-set-user-mapping.ts
529
+ var useSetUserMapping = (options) => {
530
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
531
+ const client = useSavvyCalQueryClient(overrideClient);
532
+ return client.useMutation(
533
+ "put",
534
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
535
+ mutationOptions
536
+ );
537
+ };
538
+
477
539
  // src/mutation-hooks/use-sort-service-forms.ts
478
540
  var useSortServiceForms = (options) => {
479
541
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -485,6 +547,17 @@ var useSortServiceForms = (options) => {
485
547
  );
486
548
  };
487
549
 
550
+ // src/mutation-hooks/use-sync-connected-account-external-users.ts
551
+ var useSyncConnectedAccountExternalUsers = (options) => {
552
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
553
+ const client = useSavvyCalQueryClient(overrideClient);
554
+ return client.useMutation(
555
+ "post",
556
+ "/v1/connected_accounts/{connected_account_id}/external_users/sync",
557
+ mutationOptions
558
+ );
559
+ };
560
+
488
561
  // src/mutation-hooks/use-update-account.ts
489
562
  var useUpdateAccount = (options) => {
490
563
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -521,6 +594,17 @@ var useUpdateBookingIntent = (options) => {
521
594
  );
522
595
  };
523
596
 
597
+ // src/mutation-hooks/use-update-booking-link.ts
598
+ var useUpdateBookingLink = (options) => {
599
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
600
+ const client = useSavvyCalQueryClient(overrideClient);
601
+ return client.useMutation(
602
+ "patch",
603
+ "/v1/booking_links/{booking_link_id}",
604
+ mutationOptions
605
+ );
606
+ };
607
+
524
608
  // src/mutation-hooks/use-update-cancellation-reason.ts
525
609
  var useUpdateCancellationReason = (options) => {
526
610
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -572,6 +656,17 @@ var useUpdateForm = (options) => {
572
656
  return client.useMutation("patch", "/v1/forms/{form_id}", mutationOptions);
573
657
  };
574
658
 
659
+ // src/mutation-hooks/use-update-opening.ts
660
+ var useUpdateOpening = (options) => {
661
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
662
+ const client = useSavvyCalQueryClient(overrideClient);
663
+ return client.useMutation(
664
+ "patch",
665
+ "/v1/openings/{opening_id}",
666
+ mutationOptions
667
+ );
668
+ };
669
+
575
670
  // src/mutation-hooks/use-update-provider.ts
576
671
  var useUpdateProvider = (options) => {
577
672
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -770,6 +865,38 @@ var useBookingIntents = (queryParams, options) => {
770
865
  );
771
866
  };
772
867
 
868
+ // src/query-hooks/use-booking-link.ts
869
+ var useBookingLink = (booking_link_id, options) => {
870
+ const { client: overrideClient, ...queryOptions } = options ?? {};
871
+ const client = useSavvyCalQueryClient(overrideClient);
872
+ return client.useQuery(
873
+ "get",
874
+ "/v1/booking_links/{booking_link_id}",
875
+ {
876
+ params: {
877
+ path: { booking_link_id }
878
+ }
879
+ },
880
+ queryOptions
881
+ );
882
+ };
883
+
884
+ // src/query-hooks/use-booking-links.ts
885
+ var useBookingLinks = (queryParams, options) => {
886
+ const { client: overrideClient, ...queryOptions } = options ?? {};
887
+ const client = useSavvyCalQueryClient(overrideClient);
888
+ return client.useQuery(
889
+ "get",
890
+ "/v1/booking_links",
891
+ {
892
+ params: {
893
+ query: queryParams
894
+ }
895
+ },
896
+ queryOptions
897
+ );
898
+ };
899
+
773
900
  // src/query-hooks/use-cancellation-reason.ts
774
901
  var useCancellationReason = (cancellation_reason_id, options) => {
775
902
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -865,6 +992,23 @@ var useConnectedAccount = (connected_account_id, options) => {
865
992
  );
866
993
  };
867
994
 
995
+ // src/query-hooks/use-connected-account-external-users.ts
996
+ var useConnectedAccountExternalUsers = (connected_account_id, queryParams, options) => {
997
+ const { client: overrideClient, ...queryOptions } = options ?? {};
998
+ const client = useSavvyCalQueryClient(overrideClient);
999
+ return client.useQuery(
1000
+ "get",
1001
+ "/v1/connected_accounts/{connected_account_id}/external_users",
1002
+ {
1003
+ params: {
1004
+ path: { connected_account_id },
1005
+ query: queryParams
1006
+ }
1007
+ },
1008
+ queryOptions
1009
+ );
1010
+ };
1011
+
868
1012
  // src/query-hooks/use-connected-accounts.ts
869
1013
  var useConnectedAccounts = (queryParams, options) => {
870
1014
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -951,6 +1095,38 @@ var useForms = (queryParams, options) => {
951
1095
  );
952
1096
  };
953
1097
 
1098
+ // src/query-hooks/use-opening.ts
1099
+ var useOpening = (opening_id, options) => {
1100
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1101
+ const client = useSavvyCalQueryClient(overrideClient);
1102
+ return client.useQuery(
1103
+ "get",
1104
+ "/v1/openings/{opening_id}",
1105
+ {
1106
+ params: {
1107
+ path: { opening_id }
1108
+ }
1109
+ },
1110
+ queryOptions
1111
+ );
1112
+ };
1113
+
1114
+ // src/query-hooks/use-openings.ts
1115
+ var useOpenings = (queryParams, options) => {
1116
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1117
+ const client = useSavvyCalQueryClient(overrideClient);
1118
+ return client.useQuery(
1119
+ "get",
1120
+ "/v1/openings",
1121
+ {
1122
+ params: {
1123
+ query: queryParams
1124
+ }
1125
+ },
1126
+ queryOptions
1127
+ );
1128
+ };
1129
+
954
1130
  // src/query-hooks/use-provider.ts
955
1131
  var useProvider = (provider_id, options) => {
956
1132
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1184,6 +1360,39 @@ var useServices = (queryParams, options) => {
1184
1360
  queryOptions
1185
1361
  );
1186
1362
  };
1363
+
1364
+ // src/query-hooks/use-user-mapping.ts
1365
+ var useUserMapping = (connected_account_id, provider_id, options) => {
1366
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1367
+ const client = useSavvyCalQueryClient(overrideClient);
1368
+ return client.useQuery(
1369
+ "get",
1370
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
1371
+ {
1372
+ params: {
1373
+ path: { connected_account_id, provider_id }
1374
+ }
1375
+ },
1376
+ queryOptions
1377
+ );
1378
+ };
1379
+
1380
+ // src/query-hooks/use-user-mappings.ts
1381
+ var useUserMappings = (connected_account_id, queryParams, options) => {
1382
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1383
+ const client = useSavvyCalQueryClient(overrideClient);
1384
+ return client.useQuery(
1385
+ "get",
1386
+ "/v1/connected_accounts/{connected_account_id}/user_mappings",
1387
+ {
1388
+ params: {
1389
+ path: { connected_account_id },
1390
+ query: queryParams
1391
+ }
1392
+ },
1393
+ queryOptions
1394
+ );
1395
+ };
1187
1396
  export {
1188
1397
  SavvyCalProvider,
1189
1398
  createQueryClient,
@@ -1200,6 +1409,8 @@ export {
1200
1409
  useBookingIntent,
1201
1410
  useBookingIntentSlots,
1202
1411
  useBookingIntents,
1412
+ useBookingLink,
1413
+ useBookingLinks,
1203
1414
  useCancelAppointment,
1204
1415
  useCancelPublicAppointment,
1205
1416
  useCancellationReason,
@@ -1212,17 +1423,20 @@ export {
1212
1423
  useCompletePublicBookingIntent,
1213
1424
  useConfirmAppointment,
1214
1425
  useConnectedAccount,
1426
+ useConnectedAccountExternalUsers,
1215
1427
  useConnectedAccounts,
1216
1428
  useCreateAccount,
1217
1429
  useCreateAccountUser,
1218
1430
  useCreateAppointment,
1219
1431
  useCreateBlock,
1220
1432
  useCreateBookingIntent,
1433
+ useCreateBookingLink,
1221
1434
  useCreateCancellationReason,
1222
1435
  useCreateClient,
1223
1436
  useCreateClientField,
1224
1437
  useCreateDashboardSession,
1225
1438
  useCreateForm,
1439
+ useCreateOpening,
1226
1440
  useCreateProvider,
1227
1441
  useCreateProviderSchedule,
1228
1442
  useCreatePublicAppointment,
@@ -1234,18 +1448,23 @@ export {
1234
1448
  useCurrentPlatform,
1235
1449
  useDeactivateProvider,
1236
1450
  useDeleteBlock,
1451
+ useDeleteBookingLink,
1237
1452
  useDeleteCancellationReason,
1238
1453
  useDeleteClient,
1239
1454
  useDeleteClientField,
1240
1455
  useDeleteConnectedAccount,
1241
1456
  useDeleteForm,
1457
+ useDeleteOpening,
1242
1458
  useDeleteProviderSchedule,
1243
1459
  useDeleteService,
1244
1460
  useDeleteServiceProvider,
1461
+ useDeleteUserMapping,
1245
1462
  useDetachServiceForm,
1246
1463
  useEarliestPublicServiceSlot,
1247
1464
  useForm,
1248
1465
  useForms,
1466
+ useOpening,
1467
+ useOpenings,
1249
1468
  useProvider,
1250
1469
  useProviderSchedule,
1251
1470
  useProviderSchedules,
@@ -1265,18 +1484,24 @@ export {
1265
1484
  useServiceProviders,
1266
1485
  useServiceSlots,
1267
1486
  useServices,
1487
+ useSetUserMapping,
1268
1488
  useSortServiceForms,
1489
+ useSyncConnectedAccountExternalUsers,
1269
1490
  useUpdateAccount,
1270
1491
  useUpdateAccountUser,
1271
1492
  useUpdateBlock,
1272
1493
  useUpdateBookingIntent,
1494
+ useUpdateBookingLink,
1273
1495
  useUpdateCancellationReason,
1274
1496
  useUpdateClient,
1275
1497
  useUpdateClientField,
1276
1498
  useUpdateConnectedAccount,
1277
1499
  useUpdateForm,
1500
+ useUpdateOpening,
1278
1501
  useUpdateProvider,
1279
1502
  useUpdateProviderSchedule,
1280
1503
  useUpdatePublicBookingIntent,
1281
- useUpdateService
1504
+ useUpdateService,
1505
+ useUserMapping,
1506
+ useUserMappings
1282
1507
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "1.2.9",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "A tiny wrapper around @tanstack/react-query for the SavvyCal Appointments API",
6
6
  "main": "./dist/index.cjs",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "openapi-typescript-helpers": "^0.0.15",
46
- "@savvycal/appointments-core": "1.10.0"
46
+ "@savvycal/appointments-core": "1.11.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",