@savvycal/appointments-react-query 0.1.2 → 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 ?? {};
@@ -358,6 +369,13 @@ var useUpdateAccount = (options) => {
358
369
  );
359
370
  };
360
371
 
372
+ // src/mutation-hooks/use-update-account-user.ts
373
+ var useUpdateAccountUser = (options) => {
374
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
375
+ const client = useSavvyCalQueryClient(overrideClient);
376
+ return client.useMutation("patch", "/v1/users/{user_id}", mutationOptions);
377
+ };
378
+
361
379
  // src/mutation-hooks/use-update-block.ts
362
380
  var useUpdateBlock = (options) => {
363
381
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -387,6 +405,17 @@ var useUpdateClient = (options) => {
387
405
  );
388
406
  };
389
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
+
390
419
  // src/mutation-hooks/use-update-provider.ts
391
420
  var useUpdateProvider = (options) => {
392
421
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -579,6 +608,38 @@ var useClients = (queryParams, options) => {
579
608
  );
580
609
  };
581
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
+
582
643
  // src/query-hooks/use-current-account.ts
583
644
  var useCurrentAccount = (options) => {
584
645
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -818,6 +879,8 @@ export {
818
879
  useClient,
819
880
  useClients,
820
881
  useConfirmAppointment,
882
+ useConnectedAccount,
883
+ useConnectedAccounts,
821
884
  useCreateAccount,
822
885
  useCreateAccountUser,
823
886
  useCreateAppointment,
@@ -837,6 +900,7 @@ export {
837
900
  useDeleteBlock,
838
901
  useDeleteCancellationReason,
839
902
  useDeleteClient,
903
+ useDeleteConnectedAccount,
840
904
  useDeleteProviderSchedule,
841
905
  useDeleteService,
842
906
  useDeleteServiceProvider,
@@ -858,9 +922,11 @@ export {
858
922
  useServiceSlots,
859
923
  useServices,
860
924
  useUpdateAccount,
925
+ useUpdateAccountUser,
861
926
  useUpdateBlock,
862
927
  useUpdateCancellationReason,
863
928
  useUpdateClient,
929
+ useUpdateConnectedAccount,
864
930
  useUpdateProvider,
865
931
  useUpdateProviderSchedule,
866
932
  useUpdateService
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "0.1.2",
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.3.0"
46
+ "@savvycal/appointments-core": "0.5.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",