@savvycal/appointments-react-query 0.4.0 → 1.0.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.js CHANGED
@@ -145,6 +145,17 @@ var useAbandonPublicBookingIntent = (options) => {
145
145
  );
146
146
  };
147
147
 
148
+ // src/mutation-hooks/use-attach-service-form.ts
149
+ var useAttachServiceForm = (options) => {
150
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
151
+ const client = useSavvyCalQueryClient(overrideClient);
152
+ return client.useMutation(
153
+ "post",
154
+ "/v1/services/{service_id}/forms",
155
+ mutationOptions
156
+ );
157
+ };
158
+
148
159
  // src/mutation-hooks/use-cancel-appointment.ts
149
160
  var useCancelAppointment = (options) => {
150
161
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -253,6 +264,13 @@ var useCreateClient = (options) => {
253
264
  return client.useMutation("post", "/v1/clients", mutationOptions);
254
265
  };
255
266
 
267
+ // src/mutation-hooks/use-create-client-field.ts
268
+ var useCreateClientField = (options) => {
269
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
270
+ const client = useSavvyCalQueryClient(overrideClient);
271
+ return client.useMutation("post", "/v1/client_fields", mutationOptions);
272
+ };
273
+
256
274
  // src/mutation-hooks/use-create-dashboard-session.ts
257
275
  var useCreateDashboardSession = (options) => {
258
276
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -260,6 +278,13 @@ var useCreateDashboardSession = (options) => {
260
278
  return client.useMutation("post", "/v1/dashboard_sessions", mutationOptions);
261
279
  };
262
280
 
281
+ // src/mutation-hooks/use-create-form.ts
282
+ var useCreateForm = (options) => {
283
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
284
+ const client = useSavvyCalQueryClient(overrideClient);
285
+ return client.useMutation("post", "/v1/forms", mutationOptions);
286
+ };
287
+
263
288
  // src/mutation-hooks/use-create-provider.ts
264
289
  var useCreateProvider = (options) => {
265
290
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -354,6 +379,17 @@ var useDeleteClient = (options) => {
354
379
  );
355
380
  };
356
381
 
382
+ // src/mutation-hooks/use-delete-client-field.ts
383
+ var useDeleteClientField = (options) => {
384
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
385
+ const client = useSavvyCalQueryClient(overrideClient);
386
+ return client.useMutation(
387
+ "delete",
388
+ "/v1/client_fields/{client_field_id}",
389
+ mutationOptions
390
+ );
391
+ };
392
+
357
393
  // src/mutation-hooks/use-delete-connected-account.ts
358
394
  var useDeleteConnectedAccount = (options) => {
359
395
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -365,6 +401,13 @@ var useDeleteConnectedAccount = (options) => {
365
401
  );
366
402
  };
367
403
 
404
+ // src/mutation-hooks/use-delete-form.ts
405
+ var useDeleteForm = (options) => {
406
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
407
+ const client = useSavvyCalQueryClient(overrideClient);
408
+ return client.useMutation("delete", "/v1/forms/{form_id}", mutationOptions);
409
+ };
410
+
368
411
  // src/mutation-hooks/use-delete-provider-schedule.ts
369
412
  var useDeleteProviderSchedule = (options) => {
370
413
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -398,6 +441,17 @@ var useDeleteServiceProvider = (options) => {
398
441
  );
399
442
  };
400
443
 
444
+ // src/mutation-hooks/use-detach-service-form.ts
445
+ var useDetachServiceForm = (options) => {
446
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
447
+ const client = useSavvyCalQueryClient(overrideClient);
448
+ return client.useMutation(
449
+ "delete",
450
+ "/v1/service_forms/{service_form_id}",
451
+ mutationOptions
452
+ );
453
+ };
454
+
401
455
  // src/mutation-hooks/use-reschedule-appointment.ts
402
456
  var useRescheduleAppointment = (options) => {
403
457
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -420,6 +474,17 @@ var useReschedulePublicAppointment = (options) => {
420
474
  );
421
475
  };
422
476
 
477
+ // src/mutation-hooks/use-sort-service-forms.ts
478
+ var useSortServiceForms = (options) => {
479
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
480
+ const client = useSavvyCalQueryClient(overrideClient);
481
+ return client.useMutation(
482
+ "post",
483
+ "/v1/services/{service_id}/forms/sort",
484
+ mutationOptions
485
+ );
486
+ };
487
+
423
488
  // src/mutation-hooks/use-update-account.ts
424
489
  var useUpdateAccount = (options) => {
425
490
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -478,6 +543,17 @@ var useUpdateClient = (options) => {
478
543
  );
479
544
  };
480
545
 
546
+ // src/mutation-hooks/use-update-client-field.ts
547
+ var useUpdateClientField = (options) => {
548
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
549
+ const client = useSavvyCalQueryClient(overrideClient);
550
+ return client.useMutation(
551
+ "patch",
552
+ "/v1/client_fields/{client_field_id}",
553
+ mutationOptions
554
+ );
555
+ };
556
+
481
557
  // src/mutation-hooks/use-update-connected-account.ts
482
558
  var useUpdateConnectedAccount = (options) => {
483
559
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -489,6 +565,13 @@ var useUpdateConnectedAccount = (options) => {
489
565
  );
490
566
  };
491
567
 
568
+ // src/mutation-hooks/use-update-form.ts
569
+ var useUpdateForm = (options) => {
570
+ const { client: overrideClient, ...mutationOptions } = options ?? {};
571
+ const client = useSavvyCalQueryClient(overrideClient);
572
+ return client.useMutation("patch", "/v1/forms/{form_id}", mutationOptions);
573
+ };
574
+
492
575
  // src/mutation-hooks/use-update-provider.ts
493
576
  var useUpdateProvider = (options) => {
494
577
  const { client: overrideClient, ...mutationOptions } = options ?? {};
@@ -709,6 +792,29 @@ var useClient = (client_id, options) => {
709
792
  );
710
793
  };
711
794
 
795
+ // src/query-hooks/use-client-field.ts
796
+ var useClientField = (client_field_id, options) => {
797
+ const { client: overrideClient, ...queryOptions } = options ?? {};
798
+ const client = useSavvyCalQueryClient(overrideClient);
799
+ return client.useQuery(
800
+ "get",
801
+ "/v1/client_fields/{client_field_id}",
802
+ {
803
+ params: {
804
+ path: { client_field_id }
805
+ }
806
+ },
807
+ queryOptions
808
+ );
809
+ };
810
+
811
+ // src/query-hooks/use-client-fields.ts
812
+ var useClientFields = (options) => {
813
+ const { client: overrideClient, ...queryOptions } = options ?? {};
814
+ const client = useSavvyCalQueryClient(overrideClient);
815
+ return client.useQuery("get", "/v1/client_fields", {}, queryOptions);
816
+ };
817
+
712
818
  // src/query-hooks/use-clients.ts
713
819
  var useClients = (queryParams, options) => {
714
820
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -795,6 +901,38 @@ var useEarliestPublicServiceSlot = (service_id, queryParams, options) => {
795
901
  );
796
902
  };
797
903
 
904
+ // src/query-hooks/use-form.ts
905
+ var useForm = (form_id, options) => {
906
+ const { client: overrideClient, ...queryOptions } = options ?? {};
907
+ const client = useSavvyCalQueryClient(overrideClient);
908
+ return client.useQuery(
909
+ "get",
910
+ "/v1/forms/{form_id}",
911
+ {
912
+ params: {
913
+ path: { form_id }
914
+ }
915
+ },
916
+ queryOptions
917
+ );
918
+ };
919
+
920
+ // src/query-hooks/use-forms.ts
921
+ var useForms = (queryParams, options) => {
922
+ const { client: overrideClient, ...queryOptions } = options ?? {};
923
+ const client = useSavvyCalQueryClient(overrideClient);
924
+ return client.useQuery(
925
+ "get",
926
+ "/v1/forms",
927
+ {
928
+ params: {
929
+ query: queryParams
930
+ }
931
+ },
932
+ queryOptions
933
+ );
934
+ };
935
+
798
936
  // src/query-hooks/use-provider.ts
799
937
  var useProvider = (provider_id, options) => {
800
938
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -947,6 +1085,22 @@ var useService = (service_id, options) => {
947
1085
  );
948
1086
  };
949
1087
 
1088
+ // src/query-hooks/use-service-forms.ts
1089
+ var useServiceForms = (service_id, options) => {
1090
+ const { client: overrideClient, ...queryOptions } = options ?? {};
1091
+ const client = useSavvyCalQueryClient(overrideClient);
1092
+ return client.useQuery(
1093
+ "get",
1094
+ "/v1/services/{service_id}/forms",
1095
+ {
1096
+ params: {
1097
+ path: { service_id }
1098
+ }
1099
+ },
1100
+ queryOptions
1101
+ );
1102
+ };
1103
+
950
1104
  // src/query-hooks/use-service-providers.ts
951
1105
  var useServiceProviders = (service_id, options) => {
952
1106
  const { client: overrideClient, ...queryOptions } = options ?? {};
@@ -1005,6 +1159,7 @@ export {
1005
1159
  useAccounts,
1006
1160
  useAppointment,
1007
1161
  useAppointments,
1162
+ useAttachServiceForm,
1008
1163
  useBlock,
1009
1164
  useBlocks,
1010
1165
  useBookingIntent,
@@ -1014,6 +1169,8 @@ export {
1014
1169
  useCancellationReason,
1015
1170
  useCancellationReasons,
1016
1171
  useClient,
1172
+ useClientField,
1173
+ useClientFields,
1017
1174
  useClients,
1018
1175
  useCompleteBookingIntent,
1019
1176
  useCompletePublicBookingIntent,
@@ -1027,7 +1184,9 @@ export {
1027
1184
  useCreateBookingIntent,
1028
1185
  useCreateCancellationReason,
1029
1186
  useCreateClient,
1187
+ useCreateClientField,
1030
1188
  useCreateDashboardSession,
1189
+ useCreateForm,
1031
1190
  useCreateProvider,
1032
1191
  useCreateProviderSchedule,
1033
1192
  useCreatePublicAppointment,
@@ -1041,11 +1200,16 @@ export {
1041
1200
  useDeleteBlock,
1042
1201
  useDeleteCancellationReason,
1043
1202
  useDeleteClient,
1203
+ useDeleteClientField,
1044
1204
  useDeleteConnectedAccount,
1205
+ useDeleteForm,
1045
1206
  useDeleteProviderSchedule,
1046
1207
  useDeleteService,
1047
1208
  useDeleteServiceProvider,
1209
+ useDetachServiceForm,
1048
1210
  useEarliestPublicServiceSlot,
1211
+ useForm,
1212
+ useForms,
1049
1213
  useProvider,
1050
1214
  useProviderSchedule,
1051
1215
  useProviderSchedules,
@@ -1060,16 +1224,20 @@ export {
1060
1224
  useSavvyCalFetchClient,
1061
1225
  useSavvyCalQueryClient,
1062
1226
  useService,
1227
+ useServiceForms,
1063
1228
  useServiceProviders,
1064
1229
  useServiceSlots,
1065
1230
  useServices,
1231
+ useSortServiceForms,
1066
1232
  useUpdateAccount,
1067
1233
  useUpdateAccountUser,
1068
1234
  useUpdateBlock,
1069
1235
  useUpdateBookingIntent,
1070
1236
  useUpdateCancellationReason,
1071
1237
  useUpdateClient,
1238
+ useUpdateClientField,
1072
1239
  useUpdateConnectedAccount,
1240
+ useUpdateForm,
1073
1241
  useUpdateProvider,
1074
1242
  useUpdateProviderSchedule,
1075
1243
  useUpdatePublicBookingIntent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvycal/appointments-react-query",
3
- "version": "0.4.0",
3
+ "version": "1.0.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.14.0"
46
+ "@savvycal/appointments-core": "1.0.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@tanstack/react-query": "^5.0.0",