@savvycal/appointments-react-query 2.0.1 → 2.1.1

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
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/openapi-react-query@0.5.1_@tanstack+react-query@5.90.11_react@19.2.0__openapi-fetch@0.15.0/node_modules/openapi-react-query/dist/index.mjs
1
+ // ../node_modules/.pnpm/openapi-react-query@0.5.1_@tanstack+react-query@5.90.11_react@19.2.0__openapi-fetch@0.15.0/node_modules/openapi-react-query/dist/index.mjs
2
2
  import { useMutation, useSuspenseQuery, useQuery, useInfiniteQuery } from "@tanstack/react-query";
3
3
  function createClient(client) {
4
4
  const queryFn = async ({
@@ -361,6 +361,13 @@ var useCreatePublicBookingIntent = (options) => {
361
361
  );
362
362
  };
363
363
 
364
+ // src/mutation-hooks/use-create-schedule-group.ts
365
+ var useCreateScheduleGroup = (options) => {
366
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
367
+ const client = useSavvyCalQueryClient(overrideClient);
368
+ return client.useMutation("post", "/v1/schedule_groups", mutationOptions);
369
+ };
370
+
364
371
  // src/mutation-hooks/use-create-service.ts
365
372
  var useCreateService = (options) => {
366
373
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -481,6 +488,17 @@ var useDeleteProviderSchedule = (options) => {
481
488
  );
482
489
  };
483
490
 
491
+ // src/mutation-hooks/use-delete-schedule-group.ts
492
+ var useDeleteScheduleGroup = (options) => {
493
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
494
+ const client = useSavvyCalQueryClient(overrideClient);
495
+ return client.useMutation(
496
+ "delete",
497
+ "/v1/schedule_groups/{schedule_group_id}",
498
+ mutationOptions
499
+ );
500
+ };
501
+
484
502
  // src/mutation-hooks/use-delete-service.ts
485
503
  var useDeleteService = (options) => {
486
504
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -755,6 +773,24 @@ var useUpdatePublicBookingIntent = (options) => {
755
773
  );
756
774
  };
757
775
 
776
+ // src/mutation-hooks/use-update-role.ts
777
+ var useUpdateRole = (options) => {
778
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
779
+ const client = useSavvyCalQueryClient(overrideClient);
780
+ return client.useMutation("patch", "/v1/roles/{role_id}", mutationOptions);
781
+ };
782
+
783
+ // src/mutation-hooks/use-update-schedule-group.ts
784
+ var useUpdateScheduleGroup = (options) => {
785
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
786
+ const client = useSavvyCalQueryClient(overrideClient);
787
+ return client.useMutation(
788
+ "patch",
789
+ "/v1/schedule_groups/{schedule_group_id}",
790
+ mutationOptions
791
+ );
792
+ };
793
+
758
794
  // src/mutation-hooks/use-update-service.ts
759
795
  var useUpdateService = (options) => {
760
796
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -1328,6 +1364,22 @@ var usePublicServiceSlots = (service_id, queryParams, options) => {
1328
1364
  );
1329
1365
  };
1330
1366
 
1367
+ // src/query-hooks/use-role.ts
1368
+ var useRole = (role_id, options) => {
1369
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1370
+ const client = useSavvyCalQueryClient(overrideClient);
1371
+ return client.useQuery(
1372
+ "get",
1373
+ "/v1/roles/{role_id}",
1374
+ {
1375
+ params: {
1376
+ path: { role_id }
1377
+ }
1378
+ },
1379
+ queryOptions
1380
+ );
1381
+ };
1382
+
1331
1383
  // src/query-hooks/use-roles.ts
1332
1384
  var useRoles = (options) => {
1333
1385
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1335,6 +1387,29 @@ var useRoles = (options) => {
1335
1387
  return client.useQuery("get", "/v1/roles", {}, queryOptions);
1336
1388
  };
1337
1389
 
1390
+ // src/query-hooks/use-schedule-group.ts
1391
+ var useScheduleGroup = (schedule_group_id, options) => {
1392
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1393
+ const client = useSavvyCalQueryClient(overrideClient);
1394
+ return client.useQuery(
1395
+ "get",
1396
+ "/v1/schedule_groups/{schedule_group_id}",
1397
+ {
1398
+ params: {
1399
+ path: { schedule_group_id }
1400
+ }
1401
+ },
1402
+ queryOptions
1403
+ );
1404
+ };
1405
+
1406
+ // src/query-hooks/use-schedule-groups.ts
1407
+ var useScheduleGroups = (options) => {
1408
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1409
+ const client = useSavvyCalQueryClient(overrideClient);
1410
+ return client.useQuery("get", "/v1/schedule_groups", {}, queryOptions);
1411
+ };
1412
+
1338
1413
  // src/query-hooks/use-service.ts
1339
1414
  var useService = (service_id, options) => {
1340
1415
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1514,6 +1589,7 @@ export {
1514
1589
  useCreateProviderSchedule,
1515
1590
  useCreatePublicAppointment,
1516
1591
  useCreatePublicBookingIntent,
1592
+ useCreateScheduleGroup,
1517
1593
  useCreateService,
1518
1594
  useCreateServiceProvider,
1519
1595
  useCurrentAccount,
@@ -1529,6 +1605,7 @@ export {
1529
1605
  useDeleteForm,
1530
1606
  useDeleteOpening,
1531
1607
  useDeleteProviderSchedule,
1608
+ useDeleteScheduleGroup,
1532
1609
  useDeleteService,
1533
1610
  useDeleteServiceProvider,
1534
1611
  useDeleteUserMapping,
@@ -1549,9 +1626,12 @@ export {
1549
1626
  usePublicServiceSlots,
1550
1627
  useRescheduleAppointment,
1551
1628
  useReschedulePublicAppointment,
1629
+ useRole,
1552
1630
  useRoles,
1553
1631
  useSavvyCalFetchClient,
1554
1632
  useSavvyCalQueryClient,
1633
+ useScheduleGroup,
1634
+ useScheduleGroups,
1555
1635
  useService,
1556
1636
  useServiceForms,
1557
1637
  useServiceProviderConferencing,
@@ -1578,6 +1658,8 @@ export {
1578
1658
  useUpdateProvider,
1579
1659
  useUpdateProviderSchedule,
1580
1660
  useUpdatePublicBookingIntent,
1661
+ useUpdateRole,
1662
+ useUpdateScheduleGroup,
1581
1663
  useUpdateService,
1582
1664
  useUserMapping,
1583
1665
  useUserMappings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
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",
@@ -42,8 +42,8 @@
42
42
  "typescript": "^5.9.3"
43
43
  },
44
44
  "dependencies": {
45
- "openapi-typescript-helpers": "^0.0.15",
46
- "@savvycal/appointments-core": "2.1.0"
45
+ "@savvycal/appointments-core": "2.2.1",
46
+ "openapi-typescript-helpers": "^0.0.15"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",