@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.cjs CHANGED
@@ -45,6 +45,8 @@ __export(index_exports, {
45
45
  useBookingIntent: () => useBookingIntent,
46
46
  useBookingIntentSlots: () => useBookingIntentSlots,
47
47
  useBookingIntents: () => useBookingIntents,
48
+ useBookingLink: () => useBookingLink,
49
+ useBookingLinks: () => useBookingLinks,
48
50
  useCancelAppointment: () => useCancelAppointment,
49
51
  useCancelPublicAppointment: () => useCancelPublicAppointment,
50
52
  useCancellationReason: () => useCancellationReason,
@@ -57,17 +59,20 @@ __export(index_exports, {
57
59
  useCompletePublicBookingIntent: () => useCompletePublicBookingIntent,
58
60
  useConfirmAppointment: () => useConfirmAppointment,
59
61
  useConnectedAccount: () => useConnectedAccount,
62
+ useConnectedAccountExternalUsers: () => useConnectedAccountExternalUsers,
60
63
  useConnectedAccounts: () => useConnectedAccounts,
61
64
  useCreateAccount: () => useCreateAccount,
62
65
  useCreateAccountUser: () => useCreateAccountUser,
63
66
  useCreateAppointment: () => useCreateAppointment,
64
67
  useCreateBlock: () => useCreateBlock,
65
68
  useCreateBookingIntent: () => useCreateBookingIntent,
69
+ useCreateBookingLink: () => useCreateBookingLink,
66
70
  useCreateCancellationReason: () => useCreateCancellationReason,
67
71
  useCreateClient: () => useCreateClient,
68
72
  useCreateClientField: () => useCreateClientField,
69
73
  useCreateDashboardSession: () => useCreateDashboardSession,
70
74
  useCreateForm: () => useCreateForm,
75
+ useCreateOpening: () => useCreateOpening,
71
76
  useCreateProvider: () => useCreateProvider,
72
77
  useCreateProviderSchedule: () => useCreateProviderSchedule,
73
78
  useCreatePublicAppointment: () => useCreatePublicAppointment,
@@ -79,18 +84,23 @@ __export(index_exports, {
79
84
  useCurrentPlatform: () => useCurrentPlatform,
80
85
  useDeactivateProvider: () => useDeactivateProvider,
81
86
  useDeleteBlock: () => useDeleteBlock,
87
+ useDeleteBookingLink: () => useDeleteBookingLink,
82
88
  useDeleteCancellationReason: () => useDeleteCancellationReason,
83
89
  useDeleteClient: () => useDeleteClient,
84
90
  useDeleteClientField: () => useDeleteClientField,
85
91
  useDeleteConnectedAccount: () => useDeleteConnectedAccount,
86
92
  useDeleteForm: () => useDeleteForm,
93
+ useDeleteOpening: () => useDeleteOpening,
87
94
  useDeleteProviderSchedule: () => useDeleteProviderSchedule,
88
95
  useDeleteService: () => useDeleteService,
89
96
  useDeleteServiceProvider: () => useDeleteServiceProvider,
97
+ useDeleteUserMapping: () => useDeleteUserMapping,
90
98
  useDetachServiceForm: () => useDetachServiceForm,
91
99
  useEarliestPublicServiceSlot: () => useEarliestPublicServiceSlot,
92
100
  useForm: () => useForm,
93
101
  useForms: () => useForms,
102
+ useOpening: () => useOpening,
103
+ useOpenings: () => useOpenings,
94
104
  useProvider: () => useProvider,
95
105
  useProviderSchedule: () => useProviderSchedule,
96
106
  useProviderSchedules: () => useProviderSchedules,
@@ -110,20 +120,26 @@ __export(index_exports, {
110
120
  useServiceProviders: () => useServiceProviders,
111
121
  useServiceSlots: () => useServiceSlots,
112
122
  useServices: () => useServices,
123
+ useSetUserMapping: () => useSetUserMapping,
113
124
  useSortServiceForms: () => useSortServiceForms,
125
+ useSyncConnectedAccountExternalUsers: () => useSyncConnectedAccountExternalUsers,
114
126
  useUpdateAccount: () => useUpdateAccount,
115
127
  useUpdateAccountUser: () => useUpdateAccountUser,
116
128
  useUpdateBlock: () => useUpdateBlock,
117
129
  useUpdateBookingIntent: () => useUpdateBookingIntent,
130
+ useUpdateBookingLink: () => useUpdateBookingLink,
118
131
  useUpdateCancellationReason: () => useUpdateCancellationReason,
119
132
  useUpdateClient: () => useUpdateClient,
120
133
  useUpdateClientField: () => useUpdateClientField,
121
134
  useUpdateConnectedAccount: () => useUpdateConnectedAccount,
122
135
  useUpdateForm: () => useUpdateForm,
136
+ useUpdateOpening: () => useUpdateOpening,
123
137
  useUpdateProvider: () => useUpdateProvider,
124
138
  useUpdateProviderSchedule: () => useUpdateProviderSchedule,
125
139
  useUpdatePublicBookingIntent: () => useUpdatePublicBookingIntent,
126
- useUpdateService: () => useUpdateService
140
+ useUpdateService: () => useUpdateService,
141
+ useUserMapping: () => useUserMapping,
142
+ useUserMappings: () => useUserMappings
127
143
  });
128
144
  module.exports = __toCommonJS(index_exports);
129
145
 
@@ -373,6 +389,13 @@ var useCreateBookingIntent = (options) => {
373
389
  return client.useMutation("post", "/v1/booking_intents", mutationOptions);
374
390
  };
375
391
 
392
+ // src/mutation-hooks/use-create-booking-link.ts
393
+ var useCreateBookingLink = (options) => {
394
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
395
+ const client = useSavvyCalQueryClient(overrideClient);
396
+ return client.useMutation("post", "/v1/booking_links", mutationOptions);
397
+ };
398
+
376
399
  // src/mutation-hooks/use-create-cancellation-reason.ts
377
400
  var useCreateCancellationReason = (options) => {
378
401
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -412,6 +435,17 @@ var useCreateForm = (options) => {
412
435
  return client.useMutation("post", "/v1/forms", mutationOptions);
413
436
  };
414
437
 
438
+ // src/mutation-hooks/use-create-opening.ts
439
+ var useCreateOpening = (options) => {
440
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
441
+ const client = useSavvyCalQueryClient(overrideClient);
442
+ return client.useMutation(
443
+ "post",
444
+ "/v1/providers/{provider_id}/openings",
445
+ mutationOptions
446
+ );
447
+ };
448
+
415
449
  // src/mutation-hooks/use-create-provider.ts
416
450
  var useCreateProvider = (options) => {
417
451
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -484,6 +518,17 @@ var useDeleteBlock = (options) => {
484
518
  return client.useMutation("delete", "/v1/blocks/{block_id}", mutationOptions);
485
519
  };
486
520
 
521
+ // src/mutation-hooks/use-delete-booking-link.ts
522
+ var useDeleteBookingLink = (options) => {
523
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
524
+ const client = useSavvyCalQueryClient(overrideClient);
525
+ return client.useMutation(
526
+ "delete",
527
+ "/v1/booking_links/{booking_link_id}",
528
+ mutationOptions
529
+ );
530
+ };
531
+
487
532
  // src/mutation-hooks/use-delete-cancellation-reason.ts
488
533
  var useDeleteCancellationReason = (options) => {
489
534
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -535,6 +580,17 @@ var useDeleteForm = (options) => {
535
580
  return client.useMutation("delete", "/v1/forms/{form_id}", mutationOptions);
536
581
  };
537
582
 
583
+ // src/mutation-hooks/use-delete-opening.ts
584
+ var useDeleteOpening = (options) => {
585
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
586
+ const client = useSavvyCalQueryClient(overrideClient);
587
+ return client.useMutation(
588
+ "delete",
589
+ "/v1/openings/{opening_id}",
590
+ mutationOptions
591
+ );
592
+ };
593
+
538
594
  // src/mutation-hooks/use-delete-provider-schedule.ts
539
595
  var useDeleteProviderSchedule = (options) => {
540
596
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -568,6 +624,17 @@ var useDeleteServiceProvider = (options) => {
568
624
  );
569
625
  };
570
626
 
627
+ // src/mutation-hooks/use-delete-user-mapping.ts
628
+ var useDeleteUserMapping = (options) => {
629
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
630
+ const client = useSavvyCalQueryClient(overrideClient);
631
+ return client.useMutation(
632
+ "delete",
633
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
634
+ mutationOptions
635
+ );
636
+ };
637
+
571
638
  // src/mutation-hooks/use-detach-service-form.ts
572
639
  var useDetachServiceForm = (options) => {
573
640
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -601,6 +668,17 @@ var useReschedulePublicAppointment = (options) => {
601
668
  );
602
669
  };
603
670
 
671
+ // src/mutation-hooks/use-set-user-mapping.ts
672
+ var useSetUserMapping = (options) => {
673
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
674
+ const client = useSavvyCalQueryClient(overrideClient);
675
+ return client.useMutation(
676
+ "put",
677
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
678
+ mutationOptions
679
+ );
680
+ };
681
+
604
682
  // src/mutation-hooks/use-sort-service-forms.ts
605
683
  var useSortServiceForms = (options) => {
606
684
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -612,6 +690,17 @@ var useSortServiceForms = (options) => {
612
690
  );
613
691
  };
614
692
 
693
+ // src/mutation-hooks/use-sync-connected-account-external-users.ts
694
+ var useSyncConnectedAccountExternalUsers = (options) => {
695
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
696
+ const client = useSavvyCalQueryClient(overrideClient);
697
+ return client.useMutation(
698
+ "post",
699
+ "/v1/connected_accounts/{connected_account_id}/external_users/sync",
700
+ mutationOptions
701
+ );
702
+ };
703
+
615
704
  // src/mutation-hooks/use-update-account.ts
616
705
  var useUpdateAccount = (options) => {
617
706
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -648,6 +737,17 @@ var useUpdateBookingIntent = (options) => {
648
737
  );
649
738
  };
650
739
 
740
+ // src/mutation-hooks/use-update-booking-link.ts
741
+ var useUpdateBookingLink = (options) => {
742
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
743
+ const client = useSavvyCalQueryClient(overrideClient);
744
+ return client.useMutation(
745
+ "patch",
746
+ "/v1/booking_links/{booking_link_id}",
747
+ mutationOptions
748
+ );
749
+ };
750
+
651
751
  // src/mutation-hooks/use-update-cancellation-reason.ts
652
752
  var useUpdateCancellationReason = (options) => {
653
753
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -699,6 +799,17 @@ var useUpdateForm = (options) => {
699
799
  return client.useMutation("patch", "/v1/forms/{form_id}", mutationOptions);
700
800
  };
701
801
 
802
+ // src/mutation-hooks/use-update-opening.ts
803
+ var useUpdateOpening = (options) => {
804
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
805
+ const client = useSavvyCalQueryClient(overrideClient);
806
+ return client.useMutation(
807
+ "patch",
808
+ "/v1/openings/{opening_id}",
809
+ mutationOptions
810
+ );
811
+ };
812
+
702
813
  // src/mutation-hooks/use-update-provider.ts
703
814
  var useUpdateProvider = (options) => {
704
815
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -897,6 +1008,38 @@ var useBookingIntents = (queryParams, options) => {
897
1008
  );
898
1009
  };
899
1010
 
1011
+ // src/query-hooks/use-booking-link.ts
1012
+ var useBookingLink = (booking_link_id, options) => {
1013
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1014
+ const client = useSavvyCalQueryClient(overrideClient);
1015
+ return client.useQuery(
1016
+ "get",
1017
+ "/v1/booking_links/{booking_link_id}",
1018
+ {
1019
+ params: {
1020
+ path: { booking_link_id }
1021
+ }
1022
+ },
1023
+ queryOptions
1024
+ );
1025
+ };
1026
+
1027
+ // src/query-hooks/use-booking-links.ts
1028
+ var useBookingLinks = (queryParams, options) => {
1029
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1030
+ const client = useSavvyCalQueryClient(overrideClient);
1031
+ return client.useQuery(
1032
+ "get",
1033
+ "/v1/booking_links",
1034
+ {
1035
+ params: {
1036
+ query: queryParams
1037
+ }
1038
+ },
1039
+ queryOptions
1040
+ );
1041
+ };
1042
+
900
1043
  // src/query-hooks/use-cancellation-reason.ts
901
1044
  var useCancellationReason = (cancellation_reason_id, options) => {
902
1045
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -992,6 +1135,23 @@ var useConnectedAccount = (connected_account_id, options) => {
992
1135
  );
993
1136
  };
994
1137
 
1138
+ // src/query-hooks/use-connected-account-external-users.ts
1139
+ var useConnectedAccountExternalUsers = (connected_account_id, queryParams, options) => {
1140
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1141
+ const client = useSavvyCalQueryClient(overrideClient);
1142
+ return client.useQuery(
1143
+ "get",
1144
+ "/v1/connected_accounts/{connected_account_id}/external_users",
1145
+ {
1146
+ params: {
1147
+ path: { connected_account_id },
1148
+ query: queryParams
1149
+ }
1150
+ },
1151
+ queryOptions
1152
+ );
1153
+ };
1154
+
995
1155
  // src/query-hooks/use-connected-accounts.ts
996
1156
  var useConnectedAccounts = (queryParams, options) => {
997
1157
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1078,6 +1238,38 @@ var useForms = (queryParams, options) => {
1078
1238
  );
1079
1239
  };
1080
1240
 
1241
+ // src/query-hooks/use-opening.ts
1242
+ var useOpening = (opening_id, options) => {
1243
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1244
+ const client = useSavvyCalQueryClient(overrideClient);
1245
+ return client.useQuery(
1246
+ "get",
1247
+ "/v1/openings/{opening_id}",
1248
+ {
1249
+ params: {
1250
+ path: { opening_id }
1251
+ }
1252
+ },
1253
+ queryOptions
1254
+ );
1255
+ };
1256
+
1257
+ // src/query-hooks/use-openings.ts
1258
+ var useOpenings = (queryParams, options) => {
1259
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1260
+ const client = useSavvyCalQueryClient(overrideClient);
1261
+ return client.useQuery(
1262
+ "get",
1263
+ "/v1/openings",
1264
+ {
1265
+ params: {
1266
+ query: queryParams
1267
+ }
1268
+ },
1269
+ queryOptions
1270
+ );
1271
+ };
1272
+
1081
1273
  // src/query-hooks/use-provider.ts
1082
1274
  var useProvider = (provider_id, options) => {
1083
1275
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1311,6 +1503,39 @@ var useServices = (queryParams, options) => {
1311
1503
  queryOptions
1312
1504
  );
1313
1505
  };
1506
+
1507
+ // src/query-hooks/use-user-mapping.ts
1508
+ var useUserMapping = (connected_account_id, provider_id, options) => {
1509
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1510
+ const client = useSavvyCalQueryClient(overrideClient);
1511
+ return client.useQuery(
1512
+ "get",
1513
+ "/v1/connected_accounts/{connected_account_id}/user_mappings/{provider_id}",
1514
+ {
1515
+ params: {
1516
+ path: { connected_account_id, provider_id }
1517
+ }
1518
+ },
1519
+ queryOptions
1520
+ );
1521
+ };
1522
+
1523
+ // src/query-hooks/use-user-mappings.ts
1524
+ var useUserMappings = (connected_account_id, queryParams, options) => {
1525
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1526
+ const client = useSavvyCalQueryClient(overrideClient);
1527
+ return client.useQuery(
1528
+ "get",
1529
+ "/v1/connected_accounts/{connected_account_id}/user_mappings",
1530
+ {
1531
+ params: {
1532
+ path: { connected_account_id },
1533
+ query: queryParams
1534
+ }
1535
+ },
1536
+ queryOptions
1537
+ );
1538
+ };
1314
1539
  // Annotate the CommonJS export names for ESM import in node:
1315
1540
  0 && (module.exports = {
1316
1541
  SavvyCalProvider,
@@ -1328,6 +1553,8 @@ var useServices = (queryParams, options) => {
1328
1553
  useBookingIntent,
1329
1554
  useBookingIntentSlots,
1330
1555
  useBookingIntents,
1556
+ useBookingLink,
1557
+ useBookingLinks,
1331
1558
  useCancelAppointment,
1332
1559
  useCancelPublicAppointment,
1333
1560
  useCancellationReason,
@@ -1340,17 +1567,20 @@ var useServices = (queryParams, options) => {
1340
1567
  useCompletePublicBookingIntent,
1341
1568
  useConfirmAppointment,
1342
1569
  useConnectedAccount,
1570
+ useConnectedAccountExternalUsers,
1343
1571
  useConnectedAccounts,
1344
1572
  useCreateAccount,
1345
1573
  useCreateAccountUser,
1346
1574
  useCreateAppointment,
1347
1575
  useCreateBlock,
1348
1576
  useCreateBookingIntent,
1577
+ useCreateBookingLink,
1349
1578
  useCreateCancellationReason,
1350
1579
  useCreateClient,
1351
1580
  useCreateClientField,
1352
1581
  useCreateDashboardSession,
1353
1582
  useCreateForm,
1583
+ useCreateOpening,
1354
1584
  useCreateProvider,
1355
1585
  useCreateProviderSchedule,
1356
1586
  useCreatePublicAppointment,
@@ -1362,18 +1592,23 @@ var useServices = (queryParams, options) => {
1362
1592
  useCurrentPlatform,
1363
1593
  useDeactivateProvider,
1364
1594
  useDeleteBlock,
1595
+ useDeleteBookingLink,
1365
1596
  useDeleteCancellationReason,
1366
1597
  useDeleteClient,
1367
1598
  useDeleteClientField,
1368
1599
  useDeleteConnectedAccount,
1369
1600
  useDeleteForm,
1601
+ useDeleteOpening,
1370
1602
  useDeleteProviderSchedule,
1371
1603
  useDeleteService,
1372
1604
  useDeleteServiceProvider,
1605
+ useDeleteUserMapping,
1373
1606
  useDetachServiceForm,
1374
1607
  useEarliestPublicServiceSlot,
1375
1608
  useForm,
1376
1609
  useForms,
1610
+ useOpening,
1611
+ useOpenings,
1377
1612
  useProvider,
1378
1613
  useProviderSchedule,
1379
1614
  useProviderSchedules,
@@ -1393,18 +1628,24 @@ var useServices = (queryParams, options) => {
1393
1628
  useServiceProviders,
1394
1629
  useServiceSlots,
1395
1630
  useServices,
1631
+ useSetUserMapping,
1396
1632
  useSortServiceForms,
1633
+ useSyncConnectedAccountExternalUsers,
1397
1634
  useUpdateAccount,
1398
1635
  useUpdateAccountUser,
1399
1636
  useUpdateBlock,
1400
1637
  useUpdateBookingIntent,
1638
+ useUpdateBookingLink,
1401
1639
  useUpdateCancellationReason,
1402
1640
  useUpdateClient,
1403
1641
  useUpdateClientField,
1404
1642
  useUpdateConnectedAccount,
1405
1643
  useUpdateForm,
1644
+ useUpdateOpening,
1406
1645
  useUpdateProvider,
1407
1646
  useUpdateProviderSchedule,
1408
1647
  useUpdatePublicBookingIntent,
1409
- useUpdateService
1648
+ useUpdateService,
1649
+ useUserMapping,
1650
+ useUserMappings
1410
1651
  });