@savvycal/appointments-react-query 0.2.0 → 0.2.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
@@ -292,6 +292,17 @@ var useDeleteClient = (options) => {
292
292
  );
293
293
  };
294
294
 
295
+ // src/mutation-hooks/use-delete-connected-account.ts
296
+ var useDeleteConnectedAccount = (options) => {
297
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
298
+ const client = useSavvyCalQueryClient(overrideClient);
299
+ return client.useMutation(
300
+ "delete",
301
+ "/v1/connected_accounts/{connected_account_id}",
302
+ mutationOptions
303
+ );
304
+ };
305
+
295
306
  // src/mutation-hooks/use-delete-provider-schedule.ts
296
307
  var useDeleteProviderSchedule = (options) => {
297
308
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -394,6 +405,17 @@ var useUpdateClient = (options) => {
394
405
  );
395
406
  };
396
407
 
408
+ // src/mutation-hooks/use-update-connected-account.ts
409
+ var useUpdateConnectedAccount = (options) => {
410
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
411
+ const client = useSavvyCalQueryClient(overrideClient);
412
+ return client.useMutation(
413
+ "patch",
414
+ "/v1/connected_accounts/{connected_account_id}",
415
+ mutationOptions
416
+ );
417
+ };
418
+
397
419
  // src/mutation-hooks/use-update-provider.ts
398
420
  var useUpdateProvider = (options) => {
399
421
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -586,6 +608,38 @@ var useClients = (queryParams, options) => {
586
608
  );
587
609
  };
588
610
 
611
+ // src/query-hooks/use-connected-account.ts
612
+ var useConnectedAccount = (connected_account_id, options) => {
613
+ const { client: overrideClient, ...queryOptions } = options ?? {};
614
+ const client = useSavvyCalQueryClient(overrideClient);
615
+ return client.useQuery(
616
+ "get",
617
+ "/v1/connected_accounts/{connected_account_id}",
618
+ {
619
+ params: {
620
+ path: { connected_account_id }
621
+ }
622
+ },
623
+ queryOptions
624
+ );
625
+ };
626
+
627
+ // src/query-hooks/use-connected-accounts.ts
628
+ var useConnectedAccounts = (queryParams, options) => {
629
+ const { client: overrideClient, ...queryOptions } = options ?? {};
630
+ const client = useSavvyCalQueryClient(overrideClient);
631
+ return client.useQuery(
632
+ "get",
633
+ "/v1/connected_accounts",
634
+ {
635
+ params: {
636
+ query: queryParams
637
+ }
638
+ },
639
+ queryOptions
640
+ );
641
+ };
642
+
589
643
  // src/query-hooks/use-current-account.ts
590
644
  var useCurrentAccount = (options) => {
591
645
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -825,6 +879,8 @@ export {
825
879
  useClient,
826
880
  useClients,
827
881
  useConfirmAppointment,
882
+ useConnectedAccount,
883
+ useConnectedAccounts,
828
884
  useCreateAccount,
829
885
  useCreateAccountUser,
830
886
  useCreateAppointment,
@@ -844,6 +900,7 @@ export {
844
900
  useDeleteBlock,
845
901
  useDeleteCancellationReason,
846
902
  useDeleteClient,
903
+ useDeleteConnectedAccount,
847
904
  useDeleteProviderSchedule,
848
905
  useDeleteService,
849
906
  useDeleteServiceProvider,
@@ -869,6 +926,7 @@ export {
869
926
  useUpdateBlock,
870
927
  useUpdateCancellationReason,
871
928
  useUpdateClient,
929
+ useUpdateConnectedAccount,
872
930
  useUpdateProvider,
873
931
  useUpdateProviderSchedule,
874
932
  useUpdateService
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "0.2.0",
3
+ "version": "0.2.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",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "openapi-typescript-helpers": "^0.0.15",
46
- "@savvycal/appointments-core": "0.4.0"
46
+ "@savvycal/appointments-core": "0.5.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",