@savvycal/appointments-react-query 0.1.1 → 0.2.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
@@ -86,6 +86,7 @@ __export(index_exports, {
86
86
  useServiceSlots: () => useServiceSlots,
87
87
  useServices: () => useServices,
88
88
  useUpdateAccount: () => useUpdateAccount,
89
+ useUpdateAccountUser: () => useUpdateAccountUser,
89
90
  useUpdateBlock: () => useUpdateBlock,
90
91
  useUpdateCancellationReason: () => useUpdateCancellationReason,
91
92
  useUpdateClient: () => useUpdateClient,
@@ -453,6 +454,13 @@ var useUpdateAccount = (options) => {
453
454
  );
454
455
  };
455
456
 
457
+ // src/mutation-hooks/use-update-account-user.ts
458
+ var useUpdateAccountUser = (options) => {
459
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
460
+ const client = useSavvyCalQueryClient(overrideClient);
461
+ return client.useMutation("patch", "/v1/users/{user_id}", mutationOptions);
462
+ };
463
+
456
464
  // src/mutation-hooks/use-update-block.ts
457
465
  var useUpdateBlock = (options) => {
458
466
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -954,6 +962,7 @@ var useServices = (queryParams, options) => {
954
962
  useServiceSlots,
955
963
  useServices,
956
964
  useUpdateAccount,
965
+ useUpdateAccountUser,
957
966
  useUpdateBlock,
958
967
  useUpdateCancellationReason,
959
968
  useUpdateClient,
package/dist/index.d.cts CHANGED
@@ -51,10 +51,10 @@ type GetResponseData<Path extends keyof paths, Method extends HttpMethod, Media
51
51
  type GetResponseError<Path extends keyof paths, Method extends HttpMethod, Media extends MediaType> = Path extends keyof paths ? Method extends keyof paths[Path] ? paths[Path][Method] extends infer Operation ? Operation extends Record<string, any> ? Required<FetchResponse<Operation, MaybeOptionalInit<paths[Path], Method>, Media>>["error"] : never : never : never : never;
52
52
  type QueryKey<Path extends keyof paths, Method extends HttpMethod, Init = MaybeOptionalInit<paths[Path], Method>> = Init extends undefined ? readonly [Method, Path] : readonly [Method, Path, Init];
53
53
 
54
- interface Options$V extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/cancel"> {
54
+ interface Options$W extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/cancel"> {
55
55
  client?: QueryClient;
56
56
  }
57
- declare const useCancelAppointment: (options?: Options$V) => _tanstack_react_query.UseMutationResult<{
57
+ declare const useCancelAppointment: (options?: Options$W) => _tanstack_react_query.UseMutationResult<{
58
58
  data: {
59
59
  appointment_type: "in_person" | "virtual";
60
60
  cancellation_events: {
@@ -725,10 +725,10 @@ declare const useCancelAppointment: (options?: Options$V) => _tanstack_react_que
725
725
  };
726
726
  }>>;
727
727
 
728
- interface Options$U extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/cancel"> {
728
+ interface Options$V extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/cancel"> {
729
729
  client?: QueryClient;
730
730
  }
731
- declare const useCancelPublicAppointment: (options?: Options$U) => _tanstack_react_query.UseMutationResult<{
731
+ declare const useCancelPublicAppointment: (options?: Options$V) => _tanstack_react_query.UseMutationResult<{
732
732
  data: {
733
733
  cancellation: {
734
734
  allowed: boolean;
@@ -871,10 +871,10 @@ declare const useCancelPublicAppointment: (options?: Options$U) => _tanstack_rea
871
871
  };
872
872
  }>>;
873
873
 
874
- interface Options$T extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/confirm"> {
874
+ interface Options$U extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/confirm"> {
875
875
  client?: QueryClient;
876
876
  }
877
- declare const useConfirmAppointment: (options?: Options$T) => _tanstack_react_query.UseMutationResult<{
877
+ declare const useConfirmAppointment: (options?: Options$U) => _tanstack_react_query.UseMutationResult<{
878
878
  data: {
879
879
  appointment_type: "in_person" | "virtual";
880
880
  cancellation_events: {
@@ -1543,10 +1543,10 @@ declare const useConfirmAppointment: (options?: Options$T) => _tanstack_react_qu
1543
1543
  };
1544
1544
  }>>;
1545
1545
 
1546
- interface Options$S extends MutationOptionsFor<"post", "/v1/accounts"> {
1546
+ interface Options$T extends MutationOptionsFor<"post", "/v1/accounts"> {
1547
1547
  client?: QueryClient;
1548
1548
  }
1549
- declare const useCreateAccount: (options?: Options$S) => _tanstack_react_query.UseMutationResult<{
1549
+ declare const useCreateAccount: (options?: Options$T) => _tanstack_react_query.UseMutationResult<{
1550
1550
  data?: {
1551
1551
  created_at: string;
1552
1552
  id: string;
@@ -1694,11 +1694,12 @@ declare const useCreateAccount: (options?: Options$S) => _tanstack_react_query.U
1694
1694
  };
1695
1695
  }> | undefined>;
1696
1696
 
1697
- interface Options$R extends MutationOptionsFor<"post", "/v1/users"> {
1697
+ interface Options$S extends MutationOptionsFor<"post", "/v1/users"> {
1698
1698
  client?: QueryClient;
1699
1699
  }
1700
- declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_query.UseMutationResult<{
1700
+ declare const useCreateAccountUser: (options?: Options$S) => _tanstack_react_query.UseMutationResult<{
1701
1701
  object: "account_user";
1702
+ passive: boolean;
1702
1703
  roles: {
1703
1704
  id: string;
1704
1705
  name: string;
@@ -1722,6 +1723,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1722
1723
  content: {
1723
1724
  "application/json": {
1724
1725
  object: "account_user";
1726
+ passive: boolean;
1725
1727
  roles: {
1726
1728
  id: string;
1727
1729
  name: string;
@@ -1788,6 +1790,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1788
1790
  first_name: string;
1789
1791
  last_name: string;
1790
1792
  notify: boolean;
1793
+ passive: boolean;
1791
1794
  role_ids?: string[];
1792
1795
  time_zone?: string;
1793
1796
  };
@@ -1801,6 +1804,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1801
1804
  content: {
1802
1805
  "application/json": {
1803
1806
  object: "account_user";
1807
+ passive: boolean;
1804
1808
  roles: {
1805
1809
  id: string;
1806
1810
  name: string;
@@ -1852,10 +1856,10 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1852
1856
  };
1853
1857
  }> | undefined>;
1854
1858
 
1855
- interface Options$Q extends MutationOptionsFor<"post", "/v1/appointments"> {
1859
+ interface Options$R extends MutationOptionsFor<"post", "/v1/appointments"> {
1856
1860
  client?: QueryClient;
1857
1861
  }
1858
- declare const useCreateAppointment: (options?: Options$Q) => _tanstack_react_query.UseMutationResult<{
1862
+ declare const useCreateAppointment: (options?: Options$R) => _tanstack_react_query.UseMutationResult<{
1859
1863
  data: {
1860
1864
  appointment_type: "in_person" | "virtual";
1861
1865
  cancellation_events: {
@@ -2537,10 +2541,10 @@ declare const useCreateAppointment: (options?: Options$Q) => _tanstack_react_que
2537
2541
  };
2538
2542
  }> | undefined>;
2539
2543
 
2540
- interface Options$P extends MutationOptionsFor<"post", "/v1/blocks"> {
2544
+ interface Options$Q extends MutationOptionsFor<"post", "/v1/blocks"> {
2541
2545
  client?: QueryClient;
2542
2546
  }
2543
- declare const useCreateBlock: (options?: Options$P) => _tanstack_react_query.UseMutationResult<{
2547
+ declare const useCreateBlock: (options?: Options$Q) => _tanstack_react_query.UseMutationResult<{
2544
2548
  data: {
2545
2549
  all_day: boolean;
2546
2550
  attachment_type: "location" | "service" | "provider" | "service_provider";
@@ -2729,10 +2733,10 @@ declare const useCreateBlock: (options?: Options$P) => _tanstack_react_query.Use
2729
2733
  };
2730
2734
  }> | undefined>;
2731
2735
 
2732
- interface Options$O extends MutationOptionsFor<"post", "/v1/cancellation_reasons"> {
2736
+ interface Options$P extends MutationOptionsFor<"post", "/v1/cancellation_reasons"> {
2733
2737
  client?: QueryClient;
2734
2738
  }
2735
- declare const useCreateCancellationReason: (options?: Options$O) => _tanstack_react_query.UseMutationResult<{
2739
+ declare const useCreateCancellationReason: (options?: Options$P) => _tanstack_react_query.UseMutationResult<{
2736
2740
  data: Record<string, never>;
2737
2741
  }, openapi_typescript_helpers.ErrorResponse<{
2738
2742
  201: {
@@ -2835,10 +2839,10 @@ declare const useCreateCancellationReason: (options?: Options$O) => _tanstack_re
2835
2839
  };
2836
2840
  }> | undefined>;
2837
2841
 
2838
- interface Options$N extends MutationOptionsFor<"post", "/v1/clients"> {
2842
+ interface Options$O extends MutationOptionsFor<"post", "/v1/clients"> {
2839
2843
  client?: QueryClient;
2840
2844
  }
2841
- declare const useCreateClient: (options?: Options$N) => _tanstack_react_query.UseMutationResult<{
2845
+ declare const useCreateClient: (options?: Options$O) => _tanstack_react_query.UseMutationResult<{
2842
2846
  data: {
2843
2847
  created_at: string;
2844
2848
  email?: string | null;
@@ -2983,10 +2987,10 @@ declare const useCreateClient: (options?: Options$N) => _tanstack_react_query.Us
2983
2987
  };
2984
2988
  }> | undefined>;
2985
2989
 
2986
- interface Options$M extends MutationOptionsFor<"post", "/v1/dashboard_sessions"> {
2990
+ interface Options$N extends MutationOptionsFor<"post", "/v1/dashboard_sessions"> {
2987
2991
  client?: QueryClient;
2988
2992
  }
2989
- declare const useCreateDashboardSession: (options?: Options$M) => _tanstack_react_query.UseMutationResult<{
2993
+ declare const useCreateDashboardSession: (options?: Options$N) => _tanstack_react_query.UseMutationResult<{
2990
2994
  data: {
2991
2995
  created_at: string;
2992
2996
  id: string;
@@ -3111,10 +3115,10 @@ declare const useCreateDashboardSession: (options?: Options$M) => _tanstack_reac
3111
3115
  };
3112
3116
  }> | undefined>;
3113
3117
 
3114
- interface Options$L extends MutationOptionsFor<"post", "/v1/providers"> {
3118
+ interface Options$M extends MutationOptionsFor<"post", "/v1/providers"> {
3115
3119
  client?: QueryClient;
3116
3120
  }
3117
- declare const useCreateProvider: (options?: Options$L) => _tanstack_react_query.UseMutationResult<{
3121
+ declare const useCreateProvider: (options?: Options$M) => _tanstack_react_query.UseMutationResult<{
3118
3122
  data: {
3119
3123
  created_at: string;
3120
3124
  display_name: string;
@@ -3251,10 +3255,10 @@ declare const useCreateProvider: (options?: Options$L) => _tanstack_react_query.
3251
3255
  };
3252
3256
  }> | undefined>;
3253
3257
 
3254
- interface Options$K extends MutationOptionsFor<"post", "/v1/providers/{provider_id}/schedules"> {
3258
+ interface Options$L extends MutationOptionsFor<"post", "/v1/providers/{provider_id}/schedules"> {
3255
3259
  client?: QueryClient;
3256
3260
  }
3257
- declare const useCreateProviderSchedule: (options?: Options$K) => _tanstack_react_query.UseMutationResult<{
3261
+ declare const useCreateProviderSchedule: (options?: Options$L) => _tanstack_react_query.UseMutationResult<{
3258
3262
  data: {
3259
3263
  created_at: string;
3260
3264
  effective_from: string;
@@ -3411,10 +3415,10 @@ declare const useCreateProviderSchedule: (options?: Options$K) => _tanstack_reac
3411
3415
  };
3412
3416
  }> | undefined>;
3413
3417
 
3414
- interface Options$J extends MutationOptionsFor<"post", "/v1/public/appointments"> {
3418
+ interface Options$K extends MutationOptionsFor<"post", "/v1/public/appointments"> {
3415
3419
  client?: QueryClient;
3416
3420
  }
3417
- declare const useCreatePublicAppointment: (options?: Options$J) => _tanstack_react_query.UseMutationResult<{
3421
+ declare const useCreatePublicAppointment: (options?: Options$K) => _tanstack_react_query.UseMutationResult<{
3418
3422
  data: {
3419
3423
  cancellation: {
3420
3424
  allowed: boolean;
@@ -3536,10 +3540,10 @@ declare const useCreatePublicAppointment: (options?: Options$J) => _tanstack_rea
3536
3540
  };
3537
3541
  }> | undefined>;
3538
3542
 
3539
- interface Options$I extends MutationOptionsFor<"post", "/v1/services"> {
3543
+ interface Options$J extends MutationOptionsFor<"post", "/v1/services"> {
3540
3544
  client?: QueryClient;
3541
3545
  }
3542
- declare const useCreateService: (options?: Options$I) => _tanstack_react_query.UseMutationResult<{
3546
+ declare const useCreateService: (options?: Options$J) => _tanstack_react_query.UseMutationResult<{
3543
3547
  data: {
3544
3548
  appointment_type: "in_person" | "virtual";
3545
3549
  booking_policy: {
@@ -3820,10 +3824,10 @@ declare const useCreateService: (options?: Options$I) => _tanstack_react_query.U
3820
3824
  };
3821
3825
  }> | undefined>;
3822
3826
 
3823
- interface Options$H extends MutationOptionsFor<"post", "/v1/services/{service_id}/providers"> {
3827
+ interface Options$I extends MutationOptionsFor<"post", "/v1/services/{service_id}/providers"> {
3824
3828
  client?: QueryClient;
3825
3829
  }
3826
- declare const useCreateServiceProvider: (options?: Options$H) => _tanstack_react_query.UseMutationResult<{
3830
+ declare const useCreateServiceProvider: (options?: Options$I) => _tanstack_react_query.UseMutationResult<{
3827
3831
  data: {
3828
3832
  created_at: string;
3829
3833
  id: string;
@@ -4002,10 +4006,10 @@ declare const useCreateServiceProvider: (options?: Options$H) => _tanstack_react
4002
4006
  };
4003
4007
  }>>;
4004
4008
 
4005
- interface Options$G extends MutationOptionsFor<"delete", "/v1/providers/{provider_id}"> {
4009
+ interface Options$H extends MutationOptionsFor<"delete", "/v1/providers/{provider_id}"> {
4006
4010
  client?: QueryClient;
4007
4011
  }
4008
- declare const useDeactivateProvider: (options?: Options$G) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4012
+ declare const useDeactivateProvider: (options?: Options$H) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4009
4013
  204: {
4010
4014
  headers: {
4011
4015
  [name: string]: unknown;
@@ -4092,10 +4096,10 @@ declare const useDeactivateProvider: (options?: Options$G) => _tanstack_react_qu
4092
4096
  };
4093
4097
  }>>;
4094
4098
 
4095
- interface Options$F extends MutationOptionsFor<"delete", "/v1/blocks/{block_id}"> {
4099
+ interface Options$G extends MutationOptionsFor<"delete", "/v1/blocks/{block_id}"> {
4096
4100
  client?: QueryClient;
4097
4101
  }
4098
- declare const useDeleteBlock: (options?: Options$F) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4102
+ declare const useDeleteBlock: (options?: Options$G) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4099
4103
  204: {
4100
4104
  headers: {
4101
4105
  [name: string]: unknown;
@@ -4182,10 +4186,10 @@ declare const useDeleteBlock: (options?: Options$F) => _tanstack_react_query.Use
4182
4186
  };
4183
4187
  }>>;
4184
4188
 
4185
- interface Options$E extends MutationOptionsFor<"delete", "/v1/cancellation_reasons/{cancellation_reason_id}"> {
4189
+ interface Options$F extends MutationOptionsFor<"delete", "/v1/cancellation_reasons/{cancellation_reason_id}"> {
4186
4190
  client?: QueryClient;
4187
4191
  }
4188
- declare const useDeleteCancellationReason: (options?: Options$E) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4192
+ declare const useDeleteCancellationReason: (options?: Options$F) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4189
4193
  204: {
4190
4194
  headers: {
4191
4195
  [name: string]: unknown;
@@ -4272,10 +4276,10 @@ declare const useDeleteCancellationReason: (options?: Options$E) => _tanstack_re
4272
4276
  };
4273
4277
  }>>;
4274
4278
 
4275
- interface Options$D extends MutationOptionsFor<"delete", "/v1/clients/{client_id}"> {
4279
+ interface Options$E extends MutationOptionsFor<"delete", "/v1/clients/{client_id}"> {
4276
4280
  client?: QueryClient;
4277
4281
  }
4278
- declare const useDeleteClient: (options?: Options$D) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4282
+ declare const useDeleteClient: (options?: Options$E) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4279
4283
  204: {
4280
4284
  headers: {
4281
4285
  [name: string]: unknown;
@@ -4362,10 +4366,10 @@ declare const useDeleteClient: (options?: Options$D) => _tanstack_react_query.Us
4362
4366
  };
4363
4367
  }>>;
4364
4368
 
4365
- interface Options$C extends MutationOptionsFor<"delete", "/v1/provider_schedules/{provider_schedule_id}"> {
4369
+ interface Options$D extends MutationOptionsFor<"delete", "/v1/provider_schedules/{provider_schedule_id}"> {
4366
4370
  client?: QueryClient;
4367
4371
  }
4368
- declare const useDeleteProviderSchedule: (options?: Options$C) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4372
+ declare const useDeleteProviderSchedule: (options?: Options$D) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4369
4373
  204: {
4370
4374
  headers: {
4371
4375
  [name: string]: unknown;
@@ -4452,10 +4456,10 @@ declare const useDeleteProviderSchedule: (options?: Options$C) => _tanstack_reac
4452
4456
  };
4453
4457
  }>>;
4454
4458
 
4455
- interface Options$B extends MutationOptionsFor<"delete", "/v1/services/{service_id}"> {
4459
+ interface Options$C extends MutationOptionsFor<"delete", "/v1/services/{service_id}"> {
4456
4460
  client?: QueryClient;
4457
4461
  }
4458
- declare const useDeleteService: (options?: Options$B) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4462
+ declare const useDeleteService: (options?: Options$C) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4459
4463
  204: {
4460
4464
  headers: {
4461
4465
  [name: string]: unknown;
@@ -4542,10 +4546,10 @@ declare const useDeleteService: (options?: Options$B) => _tanstack_react_query.U
4542
4546
  };
4543
4547
  }>>;
4544
4548
 
4545
- interface Options$A extends MutationOptionsFor<"delete", "/v1/service_providers/{service_provider_id}"> {
4549
+ interface Options$B extends MutationOptionsFor<"delete", "/v1/service_providers/{service_provider_id}"> {
4546
4550
  client?: QueryClient;
4547
4551
  }
4548
- declare const useDeleteServiceProvider: (options?: Options$A) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4552
+ declare const useDeleteServiceProvider: (options?: Options$B) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4549
4553
  204: {
4550
4554
  headers: {
4551
4555
  [name: string]: unknown;
@@ -4632,10 +4636,10 @@ declare const useDeleteServiceProvider: (options?: Options$A) => _tanstack_react
4632
4636
  };
4633
4637
  }>>;
4634
4638
 
4635
- interface Options$z extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/reschedule"> {
4639
+ interface Options$A extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/reschedule"> {
4636
4640
  client?: QueryClient;
4637
4641
  }
4638
- declare const useRescheduleAppointment: (options?: Options$z) => _tanstack_react_query.UseMutationResult<{
4642
+ declare const useRescheduleAppointment: (options?: Options$A) => _tanstack_react_query.UseMutationResult<{
4639
4643
  data: {
4640
4644
  appointment_type: "in_person" | "virtual";
4641
4645
  cancellation_events: {
@@ -5308,10 +5312,10 @@ declare const useRescheduleAppointment: (options?: Options$z) => _tanstack_react
5308
5312
  };
5309
5313
  }>>;
5310
5314
 
5311
- interface Options$y extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/reschedule"> {
5315
+ interface Options$z extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/reschedule"> {
5312
5316
  client?: QueryClient;
5313
5317
  }
5314
- declare const useReschedulePublicAppointment: (options?: Options$y) => _tanstack_react_query.UseMutationResult<{
5318
+ declare const useReschedulePublicAppointment: (options?: Options$z) => _tanstack_react_query.UseMutationResult<{
5315
5319
  data: {
5316
5320
  cancellation: {
5317
5321
  allowed: boolean;
@@ -5456,10 +5460,10 @@ declare const useReschedulePublicAppointment: (options?: Options$y) => _tanstack
5456
5460
  };
5457
5461
  }>>;
5458
5462
 
5459
- interface Options$x extends MutationOptionsFor<"patch", "/v1/accounts/{account_id}"> {
5463
+ interface Options$y extends MutationOptionsFor<"patch", "/v1/accounts/{account_id}"> {
5460
5464
  client?: QueryClient;
5461
5465
  }
5462
- declare const useUpdateAccount: (options?: Options$x) => _tanstack_react_query.UseMutationResult<{
5466
+ declare const useUpdateAccount: (options?: Options$y) => _tanstack_react_query.UseMutationResult<{
5463
5467
  data?: {
5464
5468
  created_at: string;
5465
5469
  id: string;
@@ -5606,6 +5610,190 @@ declare const useUpdateAccount: (options?: Options$x) => _tanstack_react_query.U
5606
5610
  };
5607
5611
  }>>;
5608
5612
 
5613
+ interface Options$x extends MutationOptionsFor<"patch", "/v1/users/{user_id}"> {
5614
+ client?: QueryClient;
5615
+ }
5616
+ declare const useUpdateAccountUser: (options?: Options$x) => _tanstack_react_query.UseMutationResult<{
5617
+ object: "account_user";
5618
+ passive: boolean;
5619
+ roles: {
5620
+ id: string;
5621
+ name: string;
5622
+ object: "role";
5623
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5624
+ }[];
5625
+ user: {
5626
+ created_at: string;
5627
+ email: string;
5628
+ first_name: string;
5629
+ id: string;
5630
+ last_name: string;
5631
+ object: "user";
5632
+ updated_at: string;
5633
+ };
5634
+ }, openapi_typescript_helpers.ErrorResponse<{
5635
+ 200: {
5636
+ headers: {
5637
+ [name: string]: unknown;
5638
+ };
5639
+ content: {
5640
+ "application/json": {
5641
+ object: "account_user";
5642
+ passive: boolean;
5643
+ roles: {
5644
+ id: string;
5645
+ name: string;
5646
+ object: "role";
5647
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5648
+ }[];
5649
+ user: {
5650
+ created_at: string;
5651
+ email: string;
5652
+ first_name: string;
5653
+ id: string;
5654
+ last_name: string;
5655
+ object: "user";
5656
+ updated_at: string;
5657
+ };
5658
+ };
5659
+ };
5660
+ };
5661
+ 401: {
5662
+ headers: {
5663
+ [name: string]: unknown;
5664
+ };
5665
+ content: {
5666
+ "application/json": {
5667
+ errors: {
5668
+ detail: string;
5669
+ status?: string;
5670
+ title?: string;
5671
+ }[];
5672
+ };
5673
+ };
5674
+ };
5675
+ 404: {
5676
+ headers: {
5677
+ [name: string]: unknown;
5678
+ };
5679
+ content: {
5680
+ "application/json": {
5681
+ errors: {
5682
+ detail: string;
5683
+ status?: string;
5684
+ title?: string;
5685
+ }[];
5686
+ };
5687
+ };
5688
+ };
5689
+ 422: {
5690
+ headers: {
5691
+ [name: string]: unknown;
5692
+ };
5693
+ content: {
5694
+ "application/json": {
5695
+ errors: {
5696
+ detail: string;
5697
+ source: {
5698
+ pointer: string;
5699
+ };
5700
+ title: string;
5701
+ }[];
5702
+ };
5703
+ };
5704
+ };
5705
+ }, `${string}/${string}`>, openapi_fetch.FetchOptions<{
5706
+ parameters: {
5707
+ query?: never;
5708
+ header?: {
5709
+ "X-SavvyCal-Account"?: string;
5710
+ };
5711
+ path: {
5712
+ user_id: string;
5713
+ };
5714
+ cookie?: never;
5715
+ };
5716
+ requestBody?: {
5717
+ content: {
5718
+ "application/json": {
5719
+ passive?: boolean;
5720
+ };
5721
+ };
5722
+ };
5723
+ responses: {
5724
+ 200: {
5725
+ headers: {
5726
+ [name: string]: unknown;
5727
+ };
5728
+ content: {
5729
+ "application/json": {
5730
+ object: "account_user";
5731
+ passive: boolean;
5732
+ roles: {
5733
+ id: string;
5734
+ name: string;
5735
+ object: "role";
5736
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5737
+ }[];
5738
+ user: {
5739
+ created_at: string;
5740
+ email: string;
5741
+ first_name: string;
5742
+ id: string;
5743
+ last_name: string;
5744
+ object: "user";
5745
+ updated_at: string;
5746
+ };
5747
+ };
5748
+ };
5749
+ };
5750
+ 401: {
5751
+ headers: {
5752
+ [name: string]: unknown;
5753
+ };
5754
+ content: {
5755
+ "application/json": {
5756
+ errors: {
5757
+ detail: string;
5758
+ status?: string;
5759
+ title?: string;
5760
+ }[];
5761
+ };
5762
+ };
5763
+ };
5764
+ 404: {
5765
+ headers: {
5766
+ [name: string]: unknown;
5767
+ };
5768
+ content: {
5769
+ "application/json": {
5770
+ errors: {
5771
+ detail: string;
5772
+ status?: string;
5773
+ title?: string;
5774
+ }[];
5775
+ };
5776
+ };
5777
+ };
5778
+ 422: {
5779
+ headers: {
5780
+ [name: string]: unknown;
5781
+ };
5782
+ content: {
5783
+ "application/json": {
5784
+ errors: {
5785
+ detail: string;
5786
+ source: {
5787
+ pointer: string;
5788
+ };
5789
+ title: string;
5790
+ }[];
5791
+ };
5792
+ };
5793
+ };
5794
+ };
5795
+ }>>;
5796
+
5609
5797
  interface Options$w extends MutationOptionsFor<"patch", "/v1/blocks/{block_id}"> {
5610
5798
  client?: QueryClient;
5611
5799
  }
@@ -6833,6 +7021,7 @@ interface Options$p extends QueryOptionsFor<"get", "/v1/users"> {
6833
7021
  declare const useAccountUsers: (options?: Options$p) => _tanstack_react_query.UseQueryResult<{
6834
7022
  data?: {
6835
7023
  object: "account_user";
7024
+ passive: boolean;
6836
7025
  roles: {
6837
7026
  id: string;
6838
7027
  name: string;
@@ -6858,6 +7047,7 @@ declare const useAccountUsers: (options?: Options$p) => _tanstack_react_query.Us
6858
7047
  "application/json": {
6859
7048
  data?: {
6860
7049
  object: "account_user";
7050
+ passive: boolean;
6861
7051
  roles: {
6862
7052
  id: string;
6863
7053
  name: string;
@@ -8379,6 +8569,7 @@ interface Options$e extends QueryOptionsFor<"get", "/v1/user"> {
8379
8569
  }
8380
8570
  declare const useCurrentAccountUser: (options?: Options$e) => _tanstack_react_query.UseQueryResult<{
8381
8571
  object: "account_user";
8572
+ passive: boolean;
8382
8573
  roles: {
8383
8574
  id: string;
8384
8575
  name: string;
@@ -8402,6 +8593,7 @@ declare const useCurrentAccountUser: (options?: Options$e) => _tanstack_react_qu
8402
8593
  content: {
8403
8594
  "application/json": {
8404
8595
  object: "account_user";
8596
+ passive: boolean;
8405
8597
  roles: {
8406
8598
  id: string;
8407
8599
  name: string;
@@ -9597,4 +9789,4 @@ declare const useServices: (queryParams?: ServicesParams["query"], options?: Opt
9597
9789
  };
9598
9790
  }, `${string}/${string}`>>;
9599
9791
 
9600
- export { type MutationOptionsFor, type QueryClient, type QueryOptionsFor, SavvyCalProvider, type SavvyCalProviderProps, createQueryClient, useAccountById, useAccountUsers, useAccounts, useAppointment, useAppointments, useBlock, useBlocks, useCancelAppointment, useCancelPublicAppointment, useCancellationReason, useCancellationReasons, useClient, useClients, useConfirmAppointment, useCreateAccount, useCreateAccountUser, useCreateAppointment, useCreateBlock, useCreateCancellationReason, useCreateClient, useCreateDashboardSession, useCreateProvider, useCreateProviderSchedule, useCreatePublicAppointment, useCreateService, useCreateServiceProvider, useCurrentAccount, useCurrentAccountUser, useCurrentPlatform, useDeactivateProvider, useDeleteBlock, useDeleteCancellationReason, useDeleteClient, useDeleteProviderSchedule, useDeleteService, useDeleteServiceProvider, useEarliestPublicServiceSlot, useProvider, useProviderSchedule, useProviderSchedules, useProviders, usePublicAppointment, usePublicCancellationReasons, usePublicServiceSlots, useRescheduleAppointment, useReschedulePublicAppointment, useRoles, useSavvyCalFetchClient, useSavvyCalQueryClient, useService, useServiceProviders, useServiceSlots, useServices, useUpdateAccount, useUpdateBlock, useUpdateCancellationReason, useUpdateClient, useUpdateProvider, useUpdateProviderSchedule, useUpdateService };
9792
+ export { type MutationOptionsFor, type QueryClient, type QueryOptionsFor, SavvyCalProvider, type SavvyCalProviderProps, createQueryClient, useAccountById, useAccountUsers, useAccounts, useAppointment, useAppointments, useBlock, useBlocks, useCancelAppointment, useCancelPublicAppointment, useCancellationReason, useCancellationReasons, useClient, useClients, useConfirmAppointment, useCreateAccount, useCreateAccountUser, useCreateAppointment, useCreateBlock, useCreateCancellationReason, useCreateClient, useCreateDashboardSession, useCreateProvider, useCreateProviderSchedule, useCreatePublicAppointment, useCreateService, useCreateServiceProvider, useCurrentAccount, useCurrentAccountUser, useCurrentPlatform, useDeactivateProvider, useDeleteBlock, useDeleteCancellationReason, useDeleteClient, useDeleteProviderSchedule, useDeleteService, useDeleteServiceProvider, useEarliestPublicServiceSlot, useProvider, useProviderSchedule, useProviderSchedules, useProviders, usePublicAppointment, usePublicCancellationReasons, usePublicServiceSlots, useRescheduleAppointment, useReschedulePublicAppointment, useRoles, useSavvyCalFetchClient, useSavvyCalQueryClient, useService, useServiceProviders, useServiceSlots, useServices, useUpdateAccount, useUpdateAccountUser, useUpdateBlock, useUpdateCancellationReason, useUpdateClient, useUpdateProvider, useUpdateProviderSchedule, useUpdateService };
package/dist/index.d.ts CHANGED
@@ -51,10 +51,10 @@ type GetResponseData<Path extends keyof paths, Method extends HttpMethod, Media
51
51
  type GetResponseError<Path extends keyof paths, Method extends HttpMethod, Media extends MediaType> = Path extends keyof paths ? Method extends keyof paths[Path] ? paths[Path][Method] extends infer Operation ? Operation extends Record<string, any> ? Required<FetchResponse<Operation, MaybeOptionalInit<paths[Path], Method>, Media>>["error"] : never : never : never : never;
52
52
  type QueryKey<Path extends keyof paths, Method extends HttpMethod, Init = MaybeOptionalInit<paths[Path], Method>> = Init extends undefined ? readonly [Method, Path] : readonly [Method, Path, Init];
53
53
 
54
- interface Options$V extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/cancel"> {
54
+ interface Options$W extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/cancel"> {
55
55
  client?: QueryClient;
56
56
  }
57
- declare const useCancelAppointment: (options?: Options$V) => _tanstack_react_query.UseMutationResult<{
57
+ declare const useCancelAppointment: (options?: Options$W) => _tanstack_react_query.UseMutationResult<{
58
58
  data: {
59
59
  appointment_type: "in_person" | "virtual";
60
60
  cancellation_events: {
@@ -725,10 +725,10 @@ declare const useCancelAppointment: (options?: Options$V) => _tanstack_react_que
725
725
  };
726
726
  }>>;
727
727
 
728
- interface Options$U extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/cancel"> {
728
+ interface Options$V extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/cancel"> {
729
729
  client?: QueryClient;
730
730
  }
731
- declare const useCancelPublicAppointment: (options?: Options$U) => _tanstack_react_query.UseMutationResult<{
731
+ declare const useCancelPublicAppointment: (options?: Options$V) => _tanstack_react_query.UseMutationResult<{
732
732
  data: {
733
733
  cancellation: {
734
734
  allowed: boolean;
@@ -871,10 +871,10 @@ declare const useCancelPublicAppointment: (options?: Options$U) => _tanstack_rea
871
871
  };
872
872
  }>>;
873
873
 
874
- interface Options$T extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/confirm"> {
874
+ interface Options$U extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/confirm"> {
875
875
  client?: QueryClient;
876
876
  }
877
- declare const useConfirmAppointment: (options?: Options$T) => _tanstack_react_query.UseMutationResult<{
877
+ declare const useConfirmAppointment: (options?: Options$U) => _tanstack_react_query.UseMutationResult<{
878
878
  data: {
879
879
  appointment_type: "in_person" | "virtual";
880
880
  cancellation_events: {
@@ -1543,10 +1543,10 @@ declare const useConfirmAppointment: (options?: Options$T) => _tanstack_react_qu
1543
1543
  };
1544
1544
  }>>;
1545
1545
 
1546
- interface Options$S extends MutationOptionsFor<"post", "/v1/accounts"> {
1546
+ interface Options$T extends MutationOptionsFor<"post", "/v1/accounts"> {
1547
1547
  client?: QueryClient;
1548
1548
  }
1549
- declare const useCreateAccount: (options?: Options$S) => _tanstack_react_query.UseMutationResult<{
1549
+ declare const useCreateAccount: (options?: Options$T) => _tanstack_react_query.UseMutationResult<{
1550
1550
  data?: {
1551
1551
  created_at: string;
1552
1552
  id: string;
@@ -1694,11 +1694,12 @@ declare const useCreateAccount: (options?: Options$S) => _tanstack_react_query.U
1694
1694
  };
1695
1695
  }> | undefined>;
1696
1696
 
1697
- interface Options$R extends MutationOptionsFor<"post", "/v1/users"> {
1697
+ interface Options$S extends MutationOptionsFor<"post", "/v1/users"> {
1698
1698
  client?: QueryClient;
1699
1699
  }
1700
- declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_query.UseMutationResult<{
1700
+ declare const useCreateAccountUser: (options?: Options$S) => _tanstack_react_query.UseMutationResult<{
1701
1701
  object: "account_user";
1702
+ passive: boolean;
1702
1703
  roles: {
1703
1704
  id: string;
1704
1705
  name: string;
@@ -1722,6 +1723,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1722
1723
  content: {
1723
1724
  "application/json": {
1724
1725
  object: "account_user";
1726
+ passive: boolean;
1725
1727
  roles: {
1726
1728
  id: string;
1727
1729
  name: string;
@@ -1788,6 +1790,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1788
1790
  first_name: string;
1789
1791
  last_name: string;
1790
1792
  notify: boolean;
1793
+ passive: boolean;
1791
1794
  role_ids?: string[];
1792
1795
  time_zone?: string;
1793
1796
  };
@@ -1801,6 +1804,7 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1801
1804
  content: {
1802
1805
  "application/json": {
1803
1806
  object: "account_user";
1807
+ passive: boolean;
1804
1808
  roles: {
1805
1809
  id: string;
1806
1810
  name: string;
@@ -1852,10 +1856,10 @@ declare const useCreateAccountUser: (options?: Options$R) => _tanstack_react_que
1852
1856
  };
1853
1857
  }> | undefined>;
1854
1858
 
1855
- interface Options$Q extends MutationOptionsFor<"post", "/v1/appointments"> {
1859
+ interface Options$R extends MutationOptionsFor<"post", "/v1/appointments"> {
1856
1860
  client?: QueryClient;
1857
1861
  }
1858
- declare const useCreateAppointment: (options?: Options$Q) => _tanstack_react_query.UseMutationResult<{
1862
+ declare const useCreateAppointment: (options?: Options$R) => _tanstack_react_query.UseMutationResult<{
1859
1863
  data: {
1860
1864
  appointment_type: "in_person" | "virtual";
1861
1865
  cancellation_events: {
@@ -2537,10 +2541,10 @@ declare const useCreateAppointment: (options?: Options$Q) => _tanstack_react_que
2537
2541
  };
2538
2542
  }> | undefined>;
2539
2543
 
2540
- interface Options$P extends MutationOptionsFor<"post", "/v1/blocks"> {
2544
+ interface Options$Q extends MutationOptionsFor<"post", "/v1/blocks"> {
2541
2545
  client?: QueryClient;
2542
2546
  }
2543
- declare const useCreateBlock: (options?: Options$P) => _tanstack_react_query.UseMutationResult<{
2547
+ declare const useCreateBlock: (options?: Options$Q) => _tanstack_react_query.UseMutationResult<{
2544
2548
  data: {
2545
2549
  all_day: boolean;
2546
2550
  attachment_type: "location" | "service" | "provider" | "service_provider";
@@ -2729,10 +2733,10 @@ declare const useCreateBlock: (options?: Options$P) => _tanstack_react_query.Use
2729
2733
  };
2730
2734
  }> | undefined>;
2731
2735
 
2732
- interface Options$O extends MutationOptionsFor<"post", "/v1/cancellation_reasons"> {
2736
+ interface Options$P extends MutationOptionsFor<"post", "/v1/cancellation_reasons"> {
2733
2737
  client?: QueryClient;
2734
2738
  }
2735
- declare const useCreateCancellationReason: (options?: Options$O) => _tanstack_react_query.UseMutationResult<{
2739
+ declare const useCreateCancellationReason: (options?: Options$P) => _tanstack_react_query.UseMutationResult<{
2736
2740
  data: Record<string, never>;
2737
2741
  }, openapi_typescript_helpers.ErrorResponse<{
2738
2742
  201: {
@@ -2835,10 +2839,10 @@ declare const useCreateCancellationReason: (options?: Options$O) => _tanstack_re
2835
2839
  };
2836
2840
  }> | undefined>;
2837
2841
 
2838
- interface Options$N extends MutationOptionsFor<"post", "/v1/clients"> {
2842
+ interface Options$O extends MutationOptionsFor<"post", "/v1/clients"> {
2839
2843
  client?: QueryClient;
2840
2844
  }
2841
- declare const useCreateClient: (options?: Options$N) => _tanstack_react_query.UseMutationResult<{
2845
+ declare const useCreateClient: (options?: Options$O) => _tanstack_react_query.UseMutationResult<{
2842
2846
  data: {
2843
2847
  created_at: string;
2844
2848
  email?: string | null;
@@ -2983,10 +2987,10 @@ declare const useCreateClient: (options?: Options$N) => _tanstack_react_query.Us
2983
2987
  };
2984
2988
  }> | undefined>;
2985
2989
 
2986
- interface Options$M extends MutationOptionsFor<"post", "/v1/dashboard_sessions"> {
2990
+ interface Options$N extends MutationOptionsFor<"post", "/v1/dashboard_sessions"> {
2987
2991
  client?: QueryClient;
2988
2992
  }
2989
- declare const useCreateDashboardSession: (options?: Options$M) => _tanstack_react_query.UseMutationResult<{
2993
+ declare const useCreateDashboardSession: (options?: Options$N) => _tanstack_react_query.UseMutationResult<{
2990
2994
  data: {
2991
2995
  created_at: string;
2992
2996
  id: string;
@@ -3111,10 +3115,10 @@ declare const useCreateDashboardSession: (options?: Options$M) => _tanstack_reac
3111
3115
  };
3112
3116
  }> | undefined>;
3113
3117
 
3114
- interface Options$L extends MutationOptionsFor<"post", "/v1/providers"> {
3118
+ interface Options$M extends MutationOptionsFor<"post", "/v1/providers"> {
3115
3119
  client?: QueryClient;
3116
3120
  }
3117
- declare const useCreateProvider: (options?: Options$L) => _tanstack_react_query.UseMutationResult<{
3121
+ declare const useCreateProvider: (options?: Options$M) => _tanstack_react_query.UseMutationResult<{
3118
3122
  data: {
3119
3123
  created_at: string;
3120
3124
  display_name: string;
@@ -3251,10 +3255,10 @@ declare const useCreateProvider: (options?: Options$L) => _tanstack_react_query.
3251
3255
  };
3252
3256
  }> | undefined>;
3253
3257
 
3254
- interface Options$K extends MutationOptionsFor<"post", "/v1/providers/{provider_id}/schedules"> {
3258
+ interface Options$L extends MutationOptionsFor<"post", "/v1/providers/{provider_id}/schedules"> {
3255
3259
  client?: QueryClient;
3256
3260
  }
3257
- declare const useCreateProviderSchedule: (options?: Options$K) => _tanstack_react_query.UseMutationResult<{
3261
+ declare const useCreateProviderSchedule: (options?: Options$L) => _tanstack_react_query.UseMutationResult<{
3258
3262
  data: {
3259
3263
  created_at: string;
3260
3264
  effective_from: string;
@@ -3411,10 +3415,10 @@ declare const useCreateProviderSchedule: (options?: Options$K) => _tanstack_reac
3411
3415
  };
3412
3416
  }> | undefined>;
3413
3417
 
3414
- interface Options$J extends MutationOptionsFor<"post", "/v1/public/appointments"> {
3418
+ interface Options$K extends MutationOptionsFor<"post", "/v1/public/appointments"> {
3415
3419
  client?: QueryClient;
3416
3420
  }
3417
- declare const useCreatePublicAppointment: (options?: Options$J) => _tanstack_react_query.UseMutationResult<{
3421
+ declare const useCreatePublicAppointment: (options?: Options$K) => _tanstack_react_query.UseMutationResult<{
3418
3422
  data: {
3419
3423
  cancellation: {
3420
3424
  allowed: boolean;
@@ -3536,10 +3540,10 @@ declare const useCreatePublicAppointment: (options?: Options$J) => _tanstack_rea
3536
3540
  };
3537
3541
  }> | undefined>;
3538
3542
 
3539
- interface Options$I extends MutationOptionsFor<"post", "/v1/services"> {
3543
+ interface Options$J extends MutationOptionsFor<"post", "/v1/services"> {
3540
3544
  client?: QueryClient;
3541
3545
  }
3542
- declare const useCreateService: (options?: Options$I) => _tanstack_react_query.UseMutationResult<{
3546
+ declare const useCreateService: (options?: Options$J) => _tanstack_react_query.UseMutationResult<{
3543
3547
  data: {
3544
3548
  appointment_type: "in_person" | "virtual";
3545
3549
  booking_policy: {
@@ -3820,10 +3824,10 @@ declare const useCreateService: (options?: Options$I) => _tanstack_react_query.U
3820
3824
  };
3821
3825
  }> | undefined>;
3822
3826
 
3823
- interface Options$H extends MutationOptionsFor<"post", "/v1/services/{service_id}/providers"> {
3827
+ interface Options$I extends MutationOptionsFor<"post", "/v1/services/{service_id}/providers"> {
3824
3828
  client?: QueryClient;
3825
3829
  }
3826
- declare const useCreateServiceProvider: (options?: Options$H) => _tanstack_react_query.UseMutationResult<{
3830
+ declare const useCreateServiceProvider: (options?: Options$I) => _tanstack_react_query.UseMutationResult<{
3827
3831
  data: {
3828
3832
  created_at: string;
3829
3833
  id: string;
@@ -4002,10 +4006,10 @@ declare const useCreateServiceProvider: (options?: Options$H) => _tanstack_react
4002
4006
  };
4003
4007
  }>>;
4004
4008
 
4005
- interface Options$G extends MutationOptionsFor<"delete", "/v1/providers/{provider_id}"> {
4009
+ interface Options$H extends MutationOptionsFor<"delete", "/v1/providers/{provider_id}"> {
4006
4010
  client?: QueryClient;
4007
4011
  }
4008
- declare const useDeactivateProvider: (options?: Options$G) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4012
+ declare const useDeactivateProvider: (options?: Options$H) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4009
4013
  204: {
4010
4014
  headers: {
4011
4015
  [name: string]: unknown;
@@ -4092,10 +4096,10 @@ declare const useDeactivateProvider: (options?: Options$G) => _tanstack_react_qu
4092
4096
  };
4093
4097
  }>>;
4094
4098
 
4095
- interface Options$F extends MutationOptionsFor<"delete", "/v1/blocks/{block_id}"> {
4099
+ interface Options$G extends MutationOptionsFor<"delete", "/v1/blocks/{block_id}"> {
4096
4100
  client?: QueryClient;
4097
4101
  }
4098
- declare const useDeleteBlock: (options?: Options$F) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4102
+ declare const useDeleteBlock: (options?: Options$G) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4099
4103
  204: {
4100
4104
  headers: {
4101
4105
  [name: string]: unknown;
@@ -4182,10 +4186,10 @@ declare const useDeleteBlock: (options?: Options$F) => _tanstack_react_query.Use
4182
4186
  };
4183
4187
  }>>;
4184
4188
 
4185
- interface Options$E extends MutationOptionsFor<"delete", "/v1/cancellation_reasons/{cancellation_reason_id}"> {
4189
+ interface Options$F extends MutationOptionsFor<"delete", "/v1/cancellation_reasons/{cancellation_reason_id}"> {
4186
4190
  client?: QueryClient;
4187
4191
  }
4188
- declare const useDeleteCancellationReason: (options?: Options$E) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4192
+ declare const useDeleteCancellationReason: (options?: Options$F) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4189
4193
  204: {
4190
4194
  headers: {
4191
4195
  [name: string]: unknown;
@@ -4272,10 +4276,10 @@ declare const useDeleteCancellationReason: (options?: Options$E) => _tanstack_re
4272
4276
  };
4273
4277
  }>>;
4274
4278
 
4275
- interface Options$D extends MutationOptionsFor<"delete", "/v1/clients/{client_id}"> {
4279
+ interface Options$E extends MutationOptionsFor<"delete", "/v1/clients/{client_id}"> {
4276
4280
  client?: QueryClient;
4277
4281
  }
4278
- declare const useDeleteClient: (options?: Options$D) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4282
+ declare const useDeleteClient: (options?: Options$E) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4279
4283
  204: {
4280
4284
  headers: {
4281
4285
  [name: string]: unknown;
@@ -4362,10 +4366,10 @@ declare const useDeleteClient: (options?: Options$D) => _tanstack_react_query.Us
4362
4366
  };
4363
4367
  }>>;
4364
4368
 
4365
- interface Options$C extends MutationOptionsFor<"delete", "/v1/provider_schedules/{provider_schedule_id}"> {
4369
+ interface Options$D extends MutationOptionsFor<"delete", "/v1/provider_schedules/{provider_schedule_id}"> {
4366
4370
  client?: QueryClient;
4367
4371
  }
4368
- declare const useDeleteProviderSchedule: (options?: Options$C) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4372
+ declare const useDeleteProviderSchedule: (options?: Options$D) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4369
4373
  204: {
4370
4374
  headers: {
4371
4375
  [name: string]: unknown;
@@ -4452,10 +4456,10 @@ declare const useDeleteProviderSchedule: (options?: Options$C) => _tanstack_reac
4452
4456
  };
4453
4457
  }>>;
4454
4458
 
4455
- interface Options$B extends MutationOptionsFor<"delete", "/v1/services/{service_id}"> {
4459
+ interface Options$C extends MutationOptionsFor<"delete", "/v1/services/{service_id}"> {
4456
4460
  client?: QueryClient;
4457
4461
  }
4458
- declare const useDeleteService: (options?: Options$B) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4462
+ declare const useDeleteService: (options?: Options$C) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4459
4463
  204: {
4460
4464
  headers: {
4461
4465
  [name: string]: unknown;
@@ -4542,10 +4546,10 @@ declare const useDeleteService: (options?: Options$B) => _tanstack_react_query.U
4542
4546
  };
4543
4547
  }>>;
4544
4548
 
4545
- interface Options$A extends MutationOptionsFor<"delete", "/v1/service_providers/{service_provider_id}"> {
4549
+ interface Options$B extends MutationOptionsFor<"delete", "/v1/service_providers/{service_provider_id}"> {
4546
4550
  client?: QueryClient;
4547
4551
  }
4548
- declare const useDeleteServiceProvider: (options?: Options$A) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4552
+ declare const useDeleteServiceProvider: (options?: Options$B) => _tanstack_react_query.UseMutationResult<string, openapi_typescript_helpers.ErrorResponse<{
4549
4553
  204: {
4550
4554
  headers: {
4551
4555
  [name: string]: unknown;
@@ -4632,10 +4636,10 @@ declare const useDeleteServiceProvider: (options?: Options$A) => _tanstack_react
4632
4636
  };
4633
4637
  }>>;
4634
4638
 
4635
- interface Options$z extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/reschedule"> {
4639
+ interface Options$A extends MutationOptionsFor<"post", "/v1/appointments/{appointment_id}/reschedule"> {
4636
4640
  client?: QueryClient;
4637
4641
  }
4638
- declare const useRescheduleAppointment: (options?: Options$z) => _tanstack_react_query.UseMutationResult<{
4642
+ declare const useRescheduleAppointment: (options?: Options$A) => _tanstack_react_query.UseMutationResult<{
4639
4643
  data: {
4640
4644
  appointment_type: "in_person" | "virtual";
4641
4645
  cancellation_events: {
@@ -5308,10 +5312,10 @@ declare const useRescheduleAppointment: (options?: Options$z) => _tanstack_react
5308
5312
  };
5309
5313
  }>>;
5310
5314
 
5311
- interface Options$y extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/reschedule"> {
5315
+ interface Options$z extends MutationOptionsFor<"post", "/v1/public/appointments/{appointment_id}/reschedule"> {
5312
5316
  client?: QueryClient;
5313
5317
  }
5314
- declare const useReschedulePublicAppointment: (options?: Options$y) => _tanstack_react_query.UseMutationResult<{
5318
+ declare const useReschedulePublicAppointment: (options?: Options$z) => _tanstack_react_query.UseMutationResult<{
5315
5319
  data: {
5316
5320
  cancellation: {
5317
5321
  allowed: boolean;
@@ -5456,10 +5460,10 @@ declare const useReschedulePublicAppointment: (options?: Options$y) => _tanstack
5456
5460
  };
5457
5461
  }>>;
5458
5462
 
5459
- interface Options$x extends MutationOptionsFor<"patch", "/v1/accounts/{account_id}"> {
5463
+ interface Options$y extends MutationOptionsFor<"patch", "/v1/accounts/{account_id}"> {
5460
5464
  client?: QueryClient;
5461
5465
  }
5462
- declare const useUpdateAccount: (options?: Options$x) => _tanstack_react_query.UseMutationResult<{
5466
+ declare const useUpdateAccount: (options?: Options$y) => _tanstack_react_query.UseMutationResult<{
5463
5467
  data?: {
5464
5468
  created_at: string;
5465
5469
  id: string;
@@ -5606,6 +5610,190 @@ declare const useUpdateAccount: (options?: Options$x) => _tanstack_react_query.U
5606
5610
  };
5607
5611
  }>>;
5608
5612
 
5613
+ interface Options$x extends MutationOptionsFor<"patch", "/v1/users/{user_id}"> {
5614
+ client?: QueryClient;
5615
+ }
5616
+ declare const useUpdateAccountUser: (options?: Options$x) => _tanstack_react_query.UseMutationResult<{
5617
+ object: "account_user";
5618
+ passive: boolean;
5619
+ roles: {
5620
+ id: string;
5621
+ name: string;
5622
+ object: "role";
5623
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5624
+ }[];
5625
+ user: {
5626
+ created_at: string;
5627
+ email: string;
5628
+ first_name: string;
5629
+ id: string;
5630
+ last_name: string;
5631
+ object: "user";
5632
+ updated_at: string;
5633
+ };
5634
+ }, openapi_typescript_helpers.ErrorResponse<{
5635
+ 200: {
5636
+ headers: {
5637
+ [name: string]: unknown;
5638
+ };
5639
+ content: {
5640
+ "application/json": {
5641
+ object: "account_user";
5642
+ passive: boolean;
5643
+ roles: {
5644
+ id: string;
5645
+ name: string;
5646
+ object: "role";
5647
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5648
+ }[];
5649
+ user: {
5650
+ created_at: string;
5651
+ email: string;
5652
+ first_name: string;
5653
+ id: string;
5654
+ last_name: string;
5655
+ object: "user";
5656
+ updated_at: string;
5657
+ };
5658
+ };
5659
+ };
5660
+ };
5661
+ 401: {
5662
+ headers: {
5663
+ [name: string]: unknown;
5664
+ };
5665
+ content: {
5666
+ "application/json": {
5667
+ errors: {
5668
+ detail: string;
5669
+ status?: string;
5670
+ title?: string;
5671
+ }[];
5672
+ };
5673
+ };
5674
+ };
5675
+ 404: {
5676
+ headers: {
5677
+ [name: string]: unknown;
5678
+ };
5679
+ content: {
5680
+ "application/json": {
5681
+ errors: {
5682
+ detail: string;
5683
+ status?: string;
5684
+ title?: string;
5685
+ }[];
5686
+ };
5687
+ };
5688
+ };
5689
+ 422: {
5690
+ headers: {
5691
+ [name: string]: unknown;
5692
+ };
5693
+ content: {
5694
+ "application/json": {
5695
+ errors: {
5696
+ detail: string;
5697
+ source: {
5698
+ pointer: string;
5699
+ };
5700
+ title: string;
5701
+ }[];
5702
+ };
5703
+ };
5704
+ };
5705
+ }, `${string}/${string}`>, openapi_fetch.FetchOptions<{
5706
+ parameters: {
5707
+ query?: never;
5708
+ header?: {
5709
+ "X-SavvyCal-Account"?: string;
5710
+ };
5711
+ path: {
5712
+ user_id: string;
5713
+ };
5714
+ cookie?: never;
5715
+ };
5716
+ requestBody?: {
5717
+ content: {
5718
+ "application/json": {
5719
+ passive?: boolean;
5720
+ };
5721
+ };
5722
+ };
5723
+ responses: {
5724
+ 200: {
5725
+ headers: {
5726
+ [name: string]: unknown;
5727
+ };
5728
+ content: {
5729
+ "application/json": {
5730
+ object: "account_user";
5731
+ passive: boolean;
5732
+ roles: {
5733
+ id: string;
5734
+ name: string;
5735
+ object: "role";
5736
+ type: "admin" | "staff" | "developer" | "superuser" | "custom";
5737
+ }[];
5738
+ user: {
5739
+ created_at: string;
5740
+ email: string;
5741
+ first_name: string;
5742
+ id: string;
5743
+ last_name: string;
5744
+ object: "user";
5745
+ updated_at: string;
5746
+ };
5747
+ };
5748
+ };
5749
+ };
5750
+ 401: {
5751
+ headers: {
5752
+ [name: string]: unknown;
5753
+ };
5754
+ content: {
5755
+ "application/json": {
5756
+ errors: {
5757
+ detail: string;
5758
+ status?: string;
5759
+ title?: string;
5760
+ }[];
5761
+ };
5762
+ };
5763
+ };
5764
+ 404: {
5765
+ headers: {
5766
+ [name: string]: unknown;
5767
+ };
5768
+ content: {
5769
+ "application/json": {
5770
+ errors: {
5771
+ detail: string;
5772
+ status?: string;
5773
+ title?: string;
5774
+ }[];
5775
+ };
5776
+ };
5777
+ };
5778
+ 422: {
5779
+ headers: {
5780
+ [name: string]: unknown;
5781
+ };
5782
+ content: {
5783
+ "application/json": {
5784
+ errors: {
5785
+ detail: string;
5786
+ source: {
5787
+ pointer: string;
5788
+ };
5789
+ title: string;
5790
+ }[];
5791
+ };
5792
+ };
5793
+ };
5794
+ };
5795
+ }>>;
5796
+
5609
5797
  interface Options$w extends MutationOptionsFor<"patch", "/v1/blocks/{block_id}"> {
5610
5798
  client?: QueryClient;
5611
5799
  }
@@ -6833,6 +7021,7 @@ interface Options$p extends QueryOptionsFor<"get", "/v1/users"> {
6833
7021
  declare const useAccountUsers: (options?: Options$p) => _tanstack_react_query.UseQueryResult<{
6834
7022
  data?: {
6835
7023
  object: "account_user";
7024
+ passive: boolean;
6836
7025
  roles: {
6837
7026
  id: string;
6838
7027
  name: string;
@@ -6858,6 +7047,7 @@ declare const useAccountUsers: (options?: Options$p) => _tanstack_react_query.Us
6858
7047
  "application/json": {
6859
7048
  data?: {
6860
7049
  object: "account_user";
7050
+ passive: boolean;
6861
7051
  roles: {
6862
7052
  id: string;
6863
7053
  name: string;
@@ -8379,6 +8569,7 @@ interface Options$e extends QueryOptionsFor<"get", "/v1/user"> {
8379
8569
  }
8380
8570
  declare const useCurrentAccountUser: (options?: Options$e) => _tanstack_react_query.UseQueryResult<{
8381
8571
  object: "account_user";
8572
+ passive: boolean;
8382
8573
  roles: {
8383
8574
  id: string;
8384
8575
  name: string;
@@ -8402,6 +8593,7 @@ declare const useCurrentAccountUser: (options?: Options$e) => _tanstack_react_qu
8402
8593
  content: {
8403
8594
  "application/json": {
8404
8595
  object: "account_user";
8596
+ passive: boolean;
8405
8597
  roles: {
8406
8598
  id: string;
8407
8599
  name: string;
@@ -9597,4 +9789,4 @@ declare const useServices: (queryParams?: ServicesParams["query"], options?: Opt
9597
9789
  };
9598
9790
  }, `${string}/${string}`>>;
9599
9791
 
9600
- export { type MutationOptionsFor, type QueryClient, type QueryOptionsFor, SavvyCalProvider, type SavvyCalProviderProps, createQueryClient, useAccountById, useAccountUsers, useAccounts, useAppointment, useAppointments, useBlock, useBlocks, useCancelAppointment, useCancelPublicAppointment, useCancellationReason, useCancellationReasons, useClient, useClients, useConfirmAppointment, useCreateAccount, useCreateAccountUser, useCreateAppointment, useCreateBlock, useCreateCancellationReason, useCreateClient, useCreateDashboardSession, useCreateProvider, useCreateProviderSchedule, useCreatePublicAppointment, useCreateService, useCreateServiceProvider, useCurrentAccount, useCurrentAccountUser, useCurrentPlatform, useDeactivateProvider, useDeleteBlock, useDeleteCancellationReason, useDeleteClient, useDeleteProviderSchedule, useDeleteService, useDeleteServiceProvider, useEarliestPublicServiceSlot, useProvider, useProviderSchedule, useProviderSchedules, useProviders, usePublicAppointment, usePublicCancellationReasons, usePublicServiceSlots, useRescheduleAppointment, useReschedulePublicAppointment, useRoles, useSavvyCalFetchClient, useSavvyCalQueryClient, useService, useServiceProviders, useServiceSlots, useServices, useUpdateAccount, useUpdateBlock, useUpdateCancellationReason, useUpdateClient, useUpdateProvider, useUpdateProviderSchedule, useUpdateService };
9792
+ export { type MutationOptionsFor, type QueryClient, type QueryOptionsFor, SavvyCalProvider, type SavvyCalProviderProps, createQueryClient, useAccountById, useAccountUsers, useAccounts, useAppointment, useAppointments, useBlock, useBlocks, useCancelAppointment, useCancelPublicAppointment, useCancellationReason, useCancellationReasons, useClient, useClients, useConfirmAppointment, useCreateAccount, useCreateAccountUser, useCreateAppointment, useCreateBlock, useCreateCancellationReason, useCreateClient, useCreateDashboardSession, useCreateProvider, useCreateProviderSchedule, useCreatePublicAppointment, useCreateService, useCreateServiceProvider, useCurrentAccount, useCurrentAccountUser, useCurrentPlatform, useDeactivateProvider, useDeleteBlock, useDeleteCancellationReason, useDeleteClient, useDeleteProviderSchedule, useDeleteService, useDeleteServiceProvider, useEarliestPublicServiceSlot, useProvider, useProviderSchedule, useProviderSchedules, useProviders, usePublicAppointment, usePublicCancellationReasons, usePublicServiceSlots, useRescheduleAppointment, useReschedulePublicAppointment, useRoles, useSavvyCalFetchClient, useSavvyCalQueryClient, useService, useServiceProviders, useServiceSlots, useServices, useUpdateAccount, useUpdateAccountUser, useUpdateBlock, useUpdateCancellationReason, useUpdateClient, useUpdateProvider, useUpdateProviderSchedule, useUpdateService };
package/dist/index.js CHANGED
@@ -358,6 +358,13 @@ var useUpdateAccount = (options) => {
358
358
  );
359
359
  };
360
360
 
361
+ // src/mutation-hooks/use-update-account-user.ts
362
+ var useUpdateAccountUser = (options) => {
363
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
364
+ const client = useSavvyCalQueryClient(overrideClient);
365
+ return client.useMutation("patch", "/v1/users/{user_id}", mutationOptions);
366
+ };
367
+
361
368
  // src/mutation-hooks/use-update-block.ts
362
369
  var useUpdateBlock = (options) => {
363
370
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -858,6 +865,7 @@ export {
858
865
  useServiceSlots,
859
866
  useServices,
860
867
  useUpdateAccount,
868
+ useUpdateAccountUser,
861
869
  useUpdateBlock,
862
870
  useUpdateCancellationReason,
863
871
  useUpdateClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "0.1.1",
3
+ "version": "0.2.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": "0.2.0"
46
+ "@savvycal/appointments-core": "0.4.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",