@savvycal/appointments-react-query 1.2.9 → 2.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
@@ -178,6 +178,28 @@ var useCancelPublicAppointment = (options) => {
178
178
  );
179
179
  };
180
180
 
181
+ // src/mutation-hooks/use-clear-service-conferencing.ts
182
+ var useClearServiceConferencing = (options) => {
183
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
184
+ const client = useSavvyCalQueryClient(overrideClient);
185
+ return client.useMutation(
186
+ "delete",
187
+ "/v1/services/{service_id}/conferencing",
188
+ mutationOptions
189
+ );
190
+ };
191
+
192
+ // src/mutation-hooks/use-clear-service-provider-conferencing.ts
193
+ var useClearServiceProviderConferencing = (options) => {
194
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
195
+ const client = useSavvyCalQueryClient(overrideClient);
196
+ return client.useMutation(
197
+ "delete",
198
+ "/v1/services/{service_id}/providers/{provider_id}/conferencing",
199
+ mutationOptions
200
+ );
201
+ };
202
+
181
203
  // src/mutation-hooks/use-complete-booking-intent.ts
182
204
  var useCompleteBookingIntent = (options) => {
183
205
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -246,6 +268,13 @@ var useCreateBookingIntent = (options) => {
246
268
  return client.useMutation("post", "/v1/booking_intents", mutationOptions);
247
269
  };
248
270
 
271
+ // src/mutation-hooks/use-create-booking-link.ts
272
+ var useCreateBookingLink = (options) => {
273
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
274
+ const client = useSavvyCalQueryClient(overrideClient);
275
+ return client.useMutation("post", "/v1/booking_links", mutationOptions);
276
+ };
277
+
249
278
  // src/mutation-hooks/use-create-cancellation-reason.ts
250
279
  var useCreateCancellationReason = (options) => {
251
280
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -285,6 +314,17 @@ var useCreateForm = (options) => {
285
314
  return client.useMutation("post", "/v1/forms", mutationOptions);
286
315
  };
287
316
 
317
+ // src/mutation-hooks/use-create-opening.ts
318
+ var useCreateOpening = (options) => {
319
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
320
+ const client = useSavvyCalQueryClient(overrideClient);
321
+ return client.useMutation(
322
+ "post",
323
+ "/v1/providers/{provider_id}/openings",
324
+ mutationOptions
325
+ );
326
+ };
327
+
288
328
  // src/mutation-hooks/use-create-provider.ts
289
329
  var useCreateProvider = (options) => {
290
330
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -357,6 +397,17 @@ var useDeleteBlock = (options) => {
357
397
  return client.useMutation("delete", "/v1/blocks/{block_id}", mutationOptions);
358
398
  };
359
399
 
400
+ // src/mutation-hooks/use-delete-booking-link.ts
401
+ var useDeleteBookingLink = (options) => {
402
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
403
+ const client = useSavvyCalQueryClient(overrideClient);
404
+ return client.useMutation(
405
+ "delete",
406
+ "/v1/booking_links/{booking_link_id}",
407
+ mutationOptions
408
+ );
409
+ };
410
+
360
411
  // src/mutation-hooks/use-delete-cancellation-reason.ts
361
412
  var useDeleteCancellationReason = (options) => {
362
413
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -408,6 +459,17 @@ var useDeleteForm = (options) => {
408
459
  return client.useMutation("delete", "/v1/forms/{form_id}", mutationOptions);
409
460
  };
410
461
 
462
+ // src/mutation-hooks/use-delete-opening.ts
463
+ var useDeleteOpening = (options) => {
464
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
465
+ const client = useSavvyCalQueryClient(overrideClient);
466
+ return client.useMutation(
467
+ "delete",
468
+ "/v1/openings/{opening_id}",
469
+ mutationOptions
470
+ );
471
+ };
472
+
411
473
  // src/mutation-hooks/use-delete-provider-schedule.ts
412
474
  var useDeleteProviderSchedule = (options) => {
413
475
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -436,7 +498,18 @@ var useDeleteServiceProvider = (options) => {
436
498
  const client = useSavvyCalQueryClient(overrideClient);
437
499
  return client.useMutation(
438
500
  "delete",
439
- "/v1/service_providers/{service_provider_id}",
501
+ "/v1/services/{service_id}/providers/{provider_id}",
502
+ mutationOptions
503
+ );
504
+ };
505
+
506
+ // src/mutation-hooks/use-delete-user-mapping.ts
507
+ var useDeleteUserMapping = (options) => {
508
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
509
+ const client = useSavvyCalQueryClient(overrideClient);
510
+ return client.useMutation(
511
+ "delete",
512
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
440
513
  mutationOptions
441
514
  );
442
515
  };
@@ -474,6 +547,39 @@ var useReschedulePublicAppointment = (options) => {
474
547
  );
475
548
  };
476
549
 
550
+ // src/mutation-hooks/use-set-service-conferencing.ts
551
+ var useSetServiceConferencing = (options) => {
552
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
553
+ const client = useSavvyCalQueryClient(overrideClient);
554
+ return client.useMutation(
555
+ "put",
556
+ "/v1/services/{service_id}/conferencing",
557
+ mutationOptions
558
+ );
559
+ };
560
+
561
+ // src/mutation-hooks/use-set-service-provider-conferencing.ts
562
+ var useSetServiceProviderConferencing = (options) => {
563
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
564
+ const client = useSavvyCalQueryClient(overrideClient);
565
+ return client.useMutation(
566
+ "put",
567
+ "/v1/services/{service_id}/providers/{provider_id}/conferencing",
568
+ mutationOptions
569
+ );
570
+ };
571
+
572
+ // src/mutation-hooks/use-set-user-mapping.ts
573
+ var useSetUserMapping = (options) => {
574
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
575
+ const client = useSavvyCalQueryClient(overrideClient);
576
+ return client.useMutation(
577
+ "put",
578
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
579
+ mutationOptions
580
+ );
581
+ };
582
+
477
583
  // src/mutation-hooks/use-sort-service-forms.ts
478
584
  var useSortServiceForms = (options) => {
479
585
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -485,6 +591,28 @@ var useSortServiceForms = (options) => {
485
591
  );
486
592
  };
487
593
 
594
+ // src/mutation-hooks/use-sync-connected-account-external-users.ts
595
+ var useSyncConnectedAccountExternalUsers = (options) => {
596
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
597
+ const client = useSavvyCalQueryClient(overrideClient);
598
+ return client.useMutation(
599
+ "post",
600
+ "/v1/connected_accounts/{connected_account_id}/external_users/sync",
601
+ mutationOptions
602
+ );
603
+ };
604
+
605
+ // src/mutation-hooks/use-sync-service-conferencing.ts
606
+ var useSyncServiceConferencing = (options) => {
607
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
608
+ const client = useSavvyCalQueryClient(overrideClient);
609
+ return client.useMutation(
610
+ "post",
611
+ "/v1/services/{service_id}/conferencing/sync",
612
+ mutationOptions
613
+ );
614
+ };
615
+
488
616
  // src/mutation-hooks/use-update-account.ts
489
617
  var useUpdateAccount = (options) => {
490
618
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -521,6 +649,17 @@ var useUpdateBookingIntent = (options) => {
521
649
  );
522
650
  };
523
651
 
652
+ // src/mutation-hooks/use-update-booking-link.ts
653
+ var useUpdateBookingLink = (options) => {
654
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
655
+ const client = useSavvyCalQueryClient(overrideClient);
656
+ return client.useMutation(
657
+ "patch",
658
+ "/v1/booking_links/{booking_link_id}",
659
+ mutationOptions
660
+ );
661
+ };
662
+
524
663
  // src/mutation-hooks/use-update-cancellation-reason.ts
525
664
  var useUpdateCancellationReason = (options) => {
526
665
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -572,6 +711,17 @@ var useUpdateForm = (options) => {
572
711
  return client.useMutation("patch", "/v1/forms/{form_id}", mutationOptions);
573
712
  };
574
713
 
714
+ // src/mutation-hooks/use-update-opening.ts
715
+ var useUpdateOpening = (options) => {
716
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
717
+ const client = useSavvyCalQueryClient(overrideClient);
718
+ return client.useMutation(
719
+ "patch",
720
+ "/v1/openings/{opening_id}",
721
+ mutationOptions
722
+ );
723
+ };
724
+
575
725
  // src/mutation-hooks/use-update-provider.ts
576
726
  var useUpdateProvider = (options) => {
577
727
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -770,6 +920,38 @@ var useBookingIntents = (queryParams, options) => {
770
920
  );
771
921
  };
772
922
 
923
+ // src/query-hooks/use-booking-link.ts
924
+ var useBookingLink = (booking_link_id, options) => {
925
+ const { client: overrideClient, ...queryOptions } = options ?? {};
926
+ const client = useSavvyCalQueryClient(overrideClient);
927
+ return client.useQuery(
928
+ "get",
929
+ "/v1/booking_links/{booking_link_id}",
930
+ {
931
+ params: {
932
+ path: { booking_link_id }
933
+ }
934
+ },
935
+ queryOptions
936
+ );
937
+ };
938
+
939
+ // src/query-hooks/use-booking-links.ts
940
+ var useBookingLinks = (queryParams, options) => {
941
+ const { client: overrideClient, ...queryOptions } = options ?? {};
942
+ const client = useSavvyCalQueryClient(overrideClient);
943
+ return client.useQuery(
944
+ "get",
945
+ "/v1/booking_links",
946
+ {
947
+ params: {
948
+ query: queryParams
949
+ }
950
+ },
951
+ queryOptions
952
+ );
953
+ };
954
+
773
955
  // src/query-hooks/use-cancellation-reason.ts
774
956
  var useCancellationReason = (cancellation_reason_id, options) => {
775
957
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -865,6 +1047,23 @@ var useConnectedAccount = (connected_account_id, options) => {
865
1047
  );
866
1048
  };
867
1049
 
1050
+ // src/query-hooks/use-connected-account-external-users.ts
1051
+ var useConnectedAccountExternalUsers = (connected_account_id, queryParams, options) => {
1052
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1053
+ const client = useSavvyCalQueryClient(overrideClient);
1054
+ return client.useQuery(
1055
+ "get",
1056
+ "/v1/connected_accounts/{connected_account_id}/external_users",
1057
+ {
1058
+ params: {
1059
+ path: { connected_account_id },
1060
+ query: queryParams
1061
+ }
1062
+ },
1063
+ queryOptions
1064
+ );
1065
+ };
1066
+
868
1067
  // src/query-hooks/use-connected-accounts.ts
869
1068
  var useConnectedAccounts = (queryParams, options) => {
870
1069
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -951,6 +1150,38 @@ var useForms = (queryParams, options) => {
951
1150
  );
952
1151
  };
953
1152
 
1153
+ // src/query-hooks/use-opening.ts
1154
+ var useOpening = (opening_id, options) => {
1155
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1156
+ const client = useSavvyCalQueryClient(overrideClient);
1157
+ return client.useQuery(
1158
+ "get",
1159
+ "/v1/openings/{opening_id}",
1160
+ {
1161
+ params: {
1162
+ path: { opening_id }
1163
+ }
1164
+ },
1165
+ queryOptions
1166
+ );
1167
+ };
1168
+
1169
+ // src/query-hooks/use-openings.ts
1170
+ var useOpenings = (queryParams, options) => {
1171
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1172
+ const client = useSavvyCalQueryClient(overrideClient);
1173
+ return client.useQuery(
1174
+ "get",
1175
+ "/v1/openings",
1176
+ {
1177
+ params: {
1178
+ query: queryParams
1179
+ }
1180
+ },
1181
+ queryOptions
1182
+ );
1183
+ };
1184
+
954
1185
  // src/query-hooks/use-provider.ts
955
1186
  var useProvider = (provider_id, options) => {
956
1187
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1136,6 +1367,22 @@ var useServiceForms = (service_id, options) => {
1136
1367
  );
1137
1368
  };
1138
1369
 
1370
+ // src/query-hooks/use-service-provider-conferencing.ts
1371
+ var useServiceProviderConferencing = (service_id, provider_id, options) => {
1372
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1373
+ const client = useSavvyCalQueryClient(overrideClient);
1374
+ return client.useQuery(
1375
+ "get",
1376
+ "/v1/services/{service_id}/providers/{provider_id}/conferencing",
1377
+ {
1378
+ params: {
1379
+ path: { provider_id, service_id }
1380
+ }
1381
+ },
1382
+ queryOptions
1383
+ );
1384
+ };
1385
+
1139
1386
  // src/query-hooks/use-service-providers.ts
1140
1387
  var useServiceProviders = (service_id, options) => {
1141
1388
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1184,6 +1431,39 @@ var useServices = (queryParams, options) => {
1184
1431
  queryOptions
1185
1432
  );
1186
1433
  };
1434
+
1435
+ // src/query-hooks/use-user-mapping.ts
1436
+ var useUserMapping = (connected_account_id, provider_id, options) => {
1437
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1438
+ const client = useSavvyCalQueryClient(overrideClient);
1439
+ return client.useQuery(
1440
+ "get",
1441
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
1442
+ {
1443
+ params: {
1444
+ path: { connected_account_id, provider_id }
1445
+ }
1446
+ },
1447
+ queryOptions
1448
+ );
1449
+ };
1450
+
1451
+ // src/query-hooks/use-user-mappings.ts
1452
+ var useUserMappings = (connected_account_id, queryParams, options) => {
1453
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1454
+ const client = useSavvyCalQueryClient(overrideClient);
1455
+ return client.useQuery(
1456
+ "get",
1457
+ "/v1/connected_accounts/{connected_account_id}/user_mappings",
1458
+ {
1459
+ params: {
1460
+ path: { connected_account_id },
1461
+ query: queryParams
1462
+ }
1463
+ },
1464
+ queryOptions
1465
+ );
1466
+ };
1187
1467
  export {
1188
1468
  SavvyCalProvider,
1189
1469
  createQueryClient,
@@ -1200,10 +1480,14 @@ export {
1200
1480
  useBookingIntent,
1201
1481
  useBookingIntentSlots,
1202
1482
  useBookingIntents,
1483
+ useBookingLink,
1484
+ useBookingLinks,
1203
1485
  useCancelAppointment,
1204
1486
  useCancelPublicAppointment,
1205
1487
  useCancellationReason,
1206
1488
  useCancellationReasons,
1489
+ useClearServiceConferencing,
1490
+ useClearServiceProviderConferencing,
1207
1491
  useClient,
1208
1492
  useClientField,
1209
1493
  useClientFields,
@@ -1212,17 +1496,20 @@ export {
1212
1496
  useCompletePublicBookingIntent,
1213
1497
  useConfirmAppointment,
1214
1498
  useConnectedAccount,
1499
+ useConnectedAccountExternalUsers,
1215
1500
  useConnectedAccounts,
1216
1501
  useCreateAccount,
1217
1502
  useCreateAccountUser,
1218
1503
  useCreateAppointment,
1219
1504
  useCreateBlock,
1220
1505
  useCreateBookingIntent,
1506
+ useCreateBookingLink,
1221
1507
  useCreateCancellationReason,
1222
1508
  useCreateClient,
1223
1509
  useCreateClientField,
1224
1510
  useCreateDashboardSession,
1225
1511
  useCreateForm,
1512
+ useCreateOpening,
1226
1513
  useCreateProvider,
1227
1514
  useCreateProviderSchedule,
1228
1515
  useCreatePublicAppointment,
@@ -1234,18 +1521,23 @@ export {
1234
1521
  useCurrentPlatform,
1235
1522
  useDeactivateProvider,
1236
1523
  useDeleteBlock,
1524
+ useDeleteBookingLink,
1237
1525
  useDeleteCancellationReason,
1238
1526
  useDeleteClient,
1239
1527
  useDeleteClientField,
1240
1528
  useDeleteConnectedAccount,
1241
1529
  useDeleteForm,
1530
+ useDeleteOpening,
1242
1531
  useDeleteProviderSchedule,
1243
1532
  useDeleteService,
1244
1533
  useDeleteServiceProvider,
1534
+ useDeleteUserMapping,
1245
1535
  useDetachServiceForm,
1246
1536
  useEarliestPublicServiceSlot,
1247
1537
  useForm,
1248
1538
  useForms,
1539
+ useOpening,
1540
+ useOpenings,
1249
1541
  useProvider,
1250
1542
  useProviderSchedule,
1251
1543
  useProviderSchedules,
@@ -1262,21 +1554,31 @@ export {
1262
1554
  useSavvyCalQueryClient,
1263
1555
  useService,
1264
1556
  useServiceForms,
1557
+ useServiceProviderConferencing,
1265
1558
  useServiceProviders,
1266
1559
  useServiceSlots,
1267
1560
  useServices,
1561
+ useSetServiceConferencing,
1562
+ useSetServiceProviderConferencing,
1563
+ useSetUserMapping,
1268
1564
  useSortServiceForms,
1565
+ useSyncConnectedAccountExternalUsers,
1566
+ useSyncServiceConferencing,
1269
1567
  useUpdateAccount,
1270
1568
  useUpdateAccountUser,
1271
1569
  useUpdateBlock,
1272
1570
  useUpdateBookingIntent,
1571
+ useUpdateBookingLink,
1273
1572
  useUpdateCancellationReason,
1274
1573
  useUpdateClient,
1275
1574
  useUpdateClientField,
1276
1575
  useUpdateConnectedAccount,
1277
1576
  useUpdateForm,
1577
+ useUpdateOpening,
1278
1578
  useUpdateProvider,
1279
1579
  useUpdateProviderSchedule,
1280
1580
  useUpdatePublicBookingIntent,
1281
- useUpdateService
1581
+ useUpdateService,
1582
+ useUserMapping,
1583
+ useUserMappings
1282
1584
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "1.2.9",
3
+ "version": "2.0.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": "2.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",