@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.cjs +182 -0
- package/dist/index.d.cts +5542 -3289
- package/dist/index.d.ts +5542 -3289
- package/dist/index.js +168 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
useAccounts: () => useAccounts,
|
|
40
40
|
useAppointment: () => useAppointment,
|
|
41
41
|
useAppointments: () => useAppointments,
|
|
42
|
+
useAttachServiceForm: () => useAttachServiceForm,
|
|
42
43
|
useBlock: () => useBlock,
|
|
43
44
|
useBlocks: () => useBlocks,
|
|
44
45
|
useBookingIntent: () => useBookingIntent,
|
|
@@ -48,6 +49,8 @@ __export(index_exports, {
|
|
|
48
49
|
useCancellationReason: () => useCancellationReason,
|
|
49
50
|
useCancellationReasons: () => useCancellationReasons,
|
|
50
51
|
useClient: () => useClient,
|
|
52
|
+
useClientField: () => useClientField,
|
|
53
|
+
useClientFields: () => useClientFields,
|
|
51
54
|
useClients: () => useClients,
|
|
52
55
|
useCompleteBookingIntent: () => useCompleteBookingIntent,
|
|
53
56
|
useCompletePublicBookingIntent: () => useCompletePublicBookingIntent,
|
|
@@ -61,7 +64,9 @@ __export(index_exports, {
|
|
|
61
64
|
useCreateBookingIntent: () => useCreateBookingIntent,
|
|
62
65
|
useCreateCancellationReason: () => useCreateCancellationReason,
|
|
63
66
|
useCreateClient: () => useCreateClient,
|
|
67
|
+
useCreateClientField: () => useCreateClientField,
|
|
64
68
|
useCreateDashboardSession: () => useCreateDashboardSession,
|
|
69
|
+
useCreateForm: () => useCreateForm,
|
|
65
70
|
useCreateProvider: () => useCreateProvider,
|
|
66
71
|
useCreateProviderSchedule: () => useCreateProviderSchedule,
|
|
67
72
|
useCreatePublicAppointment: () => useCreatePublicAppointment,
|
|
@@ -75,11 +80,16 @@ __export(index_exports, {
|
|
|
75
80
|
useDeleteBlock: () => useDeleteBlock,
|
|
76
81
|
useDeleteCancellationReason: () => useDeleteCancellationReason,
|
|
77
82
|
useDeleteClient: () => useDeleteClient,
|
|
83
|
+
useDeleteClientField: () => useDeleteClientField,
|
|
78
84
|
useDeleteConnectedAccount: () => useDeleteConnectedAccount,
|
|
85
|
+
useDeleteForm: () => useDeleteForm,
|
|
79
86
|
useDeleteProviderSchedule: () => useDeleteProviderSchedule,
|
|
80
87
|
useDeleteService: () => useDeleteService,
|
|
81
88
|
useDeleteServiceProvider: () => useDeleteServiceProvider,
|
|
89
|
+
useDetachServiceForm: () => useDetachServiceForm,
|
|
82
90
|
useEarliestPublicServiceSlot: () => useEarliestPublicServiceSlot,
|
|
91
|
+
useForm: () => useForm,
|
|
92
|
+
useForms: () => useForms,
|
|
83
93
|
useProvider: () => useProvider,
|
|
84
94
|
useProviderSchedule: () => useProviderSchedule,
|
|
85
95
|
useProviderSchedules: () => useProviderSchedules,
|
|
@@ -94,16 +104,20 @@ __export(index_exports, {
|
|
|
94
104
|
useSavvyCalFetchClient: () => useSavvyCalFetchClient,
|
|
95
105
|
useSavvyCalQueryClient: () => useSavvyCalQueryClient,
|
|
96
106
|
useService: () => useService,
|
|
107
|
+
useServiceForms: () => useServiceForms,
|
|
97
108
|
useServiceProviders: () => useServiceProviders,
|
|
98
109
|
useServiceSlots: () => useServiceSlots,
|
|
99
110
|
useServices: () => useServices,
|
|
111
|
+
useSortServiceForms: () => useSortServiceForms,
|
|
100
112
|
useUpdateAccount: () => useUpdateAccount,
|
|
101
113
|
useUpdateAccountUser: () => useUpdateAccountUser,
|
|
102
114
|
useUpdateBlock: () => useUpdateBlock,
|
|
103
115
|
useUpdateBookingIntent: () => useUpdateBookingIntent,
|
|
104
116
|
useUpdateCancellationReason: () => useUpdateCancellationReason,
|
|
105
117
|
useUpdateClient: () => useUpdateClient,
|
|
118
|
+
useUpdateClientField: () => useUpdateClientField,
|
|
106
119
|
useUpdateConnectedAccount: () => useUpdateConnectedAccount,
|
|
120
|
+
useUpdateForm: () => useUpdateForm,
|
|
107
121
|
useUpdateProvider: () => useUpdateProvider,
|
|
108
122
|
useUpdateProviderSchedule: () => useUpdateProviderSchedule,
|
|
109
123
|
useUpdatePublicBookingIntent: () => useUpdatePublicBookingIntent,
|
|
@@ -256,6 +270,17 @@ var useAbandonPublicBookingIntent = (options) => {
|
|
|
256
270
|
);
|
|
257
271
|
};
|
|
258
272
|
|
|
273
|
+
// src/mutation-hooks/use-attach-service-form.ts
|
|
274
|
+
var useAttachServiceForm = (options) => {
|
|
275
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
276
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
277
|
+
return client.useMutation(
|
|
278
|
+
"post",
|
|
279
|
+
"/v1/services/{service_id}/forms",
|
|
280
|
+
mutationOptions
|
|
281
|
+
);
|
|
282
|
+
};
|
|
283
|
+
|
|
259
284
|
// src/mutation-hooks/use-cancel-appointment.ts
|
|
260
285
|
var useCancelAppointment = (options) => {
|
|
261
286
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -364,6 +389,13 @@ var useCreateClient = (options) => {
|
|
|
364
389
|
return client.useMutation("post", "/v1/clients", mutationOptions);
|
|
365
390
|
};
|
|
366
391
|
|
|
392
|
+
// src/mutation-hooks/use-create-client-field.ts
|
|
393
|
+
var useCreateClientField = (options) => {
|
|
394
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
395
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
396
|
+
return client.useMutation("post", "/v1/client_fields", mutationOptions);
|
|
397
|
+
};
|
|
398
|
+
|
|
367
399
|
// src/mutation-hooks/use-create-dashboard-session.ts
|
|
368
400
|
var useCreateDashboardSession = (options) => {
|
|
369
401
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -371,6 +403,13 @@ var useCreateDashboardSession = (options) => {
|
|
|
371
403
|
return client.useMutation("post", "/v1/dashboard_sessions", mutationOptions);
|
|
372
404
|
};
|
|
373
405
|
|
|
406
|
+
// src/mutation-hooks/use-create-form.ts
|
|
407
|
+
var useCreateForm = (options) => {
|
|
408
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
409
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
410
|
+
return client.useMutation("post", "/v1/forms", mutationOptions);
|
|
411
|
+
};
|
|
412
|
+
|
|
374
413
|
// src/mutation-hooks/use-create-provider.ts
|
|
375
414
|
var useCreateProvider = (options) => {
|
|
376
415
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -465,6 +504,17 @@ var useDeleteClient = (options) => {
|
|
|
465
504
|
);
|
|
466
505
|
};
|
|
467
506
|
|
|
507
|
+
// src/mutation-hooks/use-delete-client-field.ts
|
|
508
|
+
var useDeleteClientField = (options) => {
|
|
509
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
510
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
511
|
+
return client.useMutation(
|
|
512
|
+
"delete",
|
|
513
|
+
"/v1/client_fields/{client_field_id}",
|
|
514
|
+
mutationOptions
|
|
515
|
+
);
|
|
516
|
+
};
|
|
517
|
+
|
|
468
518
|
// src/mutation-hooks/use-delete-connected-account.ts
|
|
469
519
|
var useDeleteConnectedAccount = (options) => {
|
|
470
520
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -476,6 +526,13 @@ var useDeleteConnectedAccount = (options) => {
|
|
|
476
526
|
);
|
|
477
527
|
};
|
|
478
528
|
|
|
529
|
+
// src/mutation-hooks/use-delete-form.ts
|
|
530
|
+
var useDeleteForm = (options) => {
|
|
531
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
532
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
533
|
+
return client.useMutation("delete", "/v1/forms/{form_id}", mutationOptions);
|
|
534
|
+
};
|
|
535
|
+
|
|
479
536
|
// src/mutation-hooks/use-delete-provider-schedule.ts
|
|
480
537
|
var useDeleteProviderSchedule = (options) => {
|
|
481
538
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -509,6 +566,17 @@ var useDeleteServiceProvider = (options) => {
|
|
|
509
566
|
);
|
|
510
567
|
};
|
|
511
568
|
|
|
569
|
+
// src/mutation-hooks/use-detach-service-form.ts
|
|
570
|
+
var useDetachServiceForm = (options) => {
|
|
571
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
572
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
573
|
+
return client.useMutation(
|
|
574
|
+
"delete",
|
|
575
|
+
"/v1/service_forms/{service_form_id}",
|
|
576
|
+
mutationOptions
|
|
577
|
+
);
|
|
578
|
+
};
|
|
579
|
+
|
|
512
580
|
// src/mutation-hooks/use-reschedule-appointment.ts
|
|
513
581
|
var useRescheduleAppointment = (options) => {
|
|
514
582
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -531,6 +599,17 @@ var useReschedulePublicAppointment = (options) => {
|
|
|
531
599
|
);
|
|
532
600
|
};
|
|
533
601
|
|
|
602
|
+
// src/mutation-hooks/use-sort-service-forms.ts
|
|
603
|
+
var useSortServiceForms = (options) => {
|
|
604
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
605
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
606
|
+
return client.useMutation(
|
|
607
|
+
"post",
|
|
608
|
+
"/v1/services/{service_id}/forms/sort",
|
|
609
|
+
mutationOptions
|
|
610
|
+
);
|
|
611
|
+
};
|
|
612
|
+
|
|
534
613
|
// src/mutation-hooks/use-update-account.ts
|
|
535
614
|
var useUpdateAccount = (options) => {
|
|
536
615
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -589,6 +668,17 @@ var useUpdateClient = (options) => {
|
|
|
589
668
|
);
|
|
590
669
|
};
|
|
591
670
|
|
|
671
|
+
// src/mutation-hooks/use-update-client-field.ts
|
|
672
|
+
var useUpdateClientField = (options) => {
|
|
673
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
674
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
675
|
+
return client.useMutation(
|
|
676
|
+
"patch",
|
|
677
|
+
"/v1/client_fields/{client_field_id}",
|
|
678
|
+
mutationOptions
|
|
679
|
+
);
|
|
680
|
+
};
|
|
681
|
+
|
|
592
682
|
// src/mutation-hooks/use-update-connected-account.ts
|
|
593
683
|
var useUpdateConnectedAccount = (options) => {
|
|
594
684
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -600,6 +690,13 @@ var useUpdateConnectedAccount = (options) => {
|
|
|
600
690
|
);
|
|
601
691
|
};
|
|
602
692
|
|
|
693
|
+
// src/mutation-hooks/use-update-form.ts
|
|
694
|
+
var useUpdateForm = (options) => {
|
|
695
|
+
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
696
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
697
|
+
return client.useMutation("patch", "/v1/forms/{form_id}", mutationOptions);
|
|
698
|
+
};
|
|
699
|
+
|
|
603
700
|
// src/mutation-hooks/use-update-provider.ts
|
|
604
701
|
var useUpdateProvider = (options) => {
|
|
605
702
|
const { client: overrideClient, ...mutationOptions } = options ?? {};
|
|
@@ -820,6 +917,29 @@ var useClient = (client_id, options) => {
|
|
|
820
917
|
);
|
|
821
918
|
};
|
|
822
919
|
|
|
920
|
+
// src/query-hooks/use-client-field.ts
|
|
921
|
+
var useClientField = (client_field_id, options) => {
|
|
922
|
+
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
923
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
924
|
+
return client.useQuery(
|
|
925
|
+
"get",
|
|
926
|
+
"/v1/client_fields/{client_field_id}",
|
|
927
|
+
{
|
|
928
|
+
params: {
|
|
929
|
+
path: { client_field_id }
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
queryOptions
|
|
933
|
+
);
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
// src/query-hooks/use-client-fields.ts
|
|
937
|
+
var useClientFields = (options) => {
|
|
938
|
+
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
939
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
940
|
+
return client.useQuery("get", "/v1/client_fields", {}, queryOptions);
|
|
941
|
+
};
|
|
942
|
+
|
|
823
943
|
// src/query-hooks/use-clients.ts
|
|
824
944
|
var useClients = (queryParams, options) => {
|
|
825
945
|
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
@@ -906,6 +1026,38 @@ var useEarliestPublicServiceSlot = (service_id, queryParams, options) => {
|
|
|
906
1026
|
);
|
|
907
1027
|
};
|
|
908
1028
|
|
|
1029
|
+
// src/query-hooks/use-form.ts
|
|
1030
|
+
var useForm = (form_id, options) => {
|
|
1031
|
+
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
1032
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
1033
|
+
return client.useQuery(
|
|
1034
|
+
"get",
|
|
1035
|
+
"/v1/forms/{form_id}",
|
|
1036
|
+
{
|
|
1037
|
+
params: {
|
|
1038
|
+
path: { form_id }
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
queryOptions
|
|
1042
|
+
);
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
// src/query-hooks/use-forms.ts
|
|
1046
|
+
var useForms = (queryParams, options) => {
|
|
1047
|
+
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
1048
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
1049
|
+
return client.useQuery(
|
|
1050
|
+
"get",
|
|
1051
|
+
"/v1/forms",
|
|
1052
|
+
{
|
|
1053
|
+
params: {
|
|
1054
|
+
query: queryParams
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
queryOptions
|
|
1058
|
+
);
|
|
1059
|
+
};
|
|
1060
|
+
|
|
909
1061
|
// src/query-hooks/use-provider.ts
|
|
910
1062
|
var useProvider = (provider_id, options) => {
|
|
911
1063
|
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
@@ -1058,6 +1210,22 @@ var useService = (service_id, options) => {
|
|
|
1058
1210
|
);
|
|
1059
1211
|
};
|
|
1060
1212
|
|
|
1213
|
+
// src/query-hooks/use-service-forms.ts
|
|
1214
|
+
var useServiceForms = (service_id, options) => {
|
|
1215
|
+
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
1216
|
+
const client = useSavvyCalQueryClient(overrideClient);
|
|
1217
|
+
return client.useQuery(
|
|
1218
|
+
"get",
|
|
1219
|
+
"/v1/services/{service_id}/forms",
|
|
1220
|
+
{
|
|
1221
|
+
params: {
|
|
1222
|
+
path: { service_id }
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
queryOptions
|
|
1226
|
+
);
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1061
1229
|
// src/query-hooks/use-service-providers.ts
|
|
1062
1230
|
var useServiceProviders = (service_id, options) => {
|
|
1063
1231
|
const { client: overrideClient, ...queryOptions } = options ?? {};
|
|
@@ -1117,6 +1285,7 @@ var useServices = (queryParams, options) => {
|
|
|
1117
1285
|
useAccounts,
|
|
1118
1286
|
useAppointment,
|
|
1119
1287
|
useAppointments,
|
|
1288
|
+
useAttachServiceForm,
|
|
1120
1289
|
useBlock,
|
|
1121
1290
|
useBlocks,
|
|
1122
1291
|
useBookingIntent,
|
|
@@ -1126,6 +1295,8 @@ var useServices = (queryParams, options) => {
|
|
|
1126
1295
|
useCancellationReason,
|
|
1127
1296
|
useCancellationReasons,
|
|
1128
1297
|
useClient,
|
|
1298
|
+
useClientField,
|
|
1299
|
+
useClientFields,
|
|
1129
1300
|
useClients,
|
|
1130
1301
|
useCompleteBookingIntent,
|
|
1131
1302
|
useCompletePublicBookingIntent,
|
|
@@ -1139,7 +1310,9 @@ var useServices = (queryParams, options) => {
|
|
|
1139
1310
|
useCreateBookingIntent,
|
|
1140
1311
|
useCreateCancellationReason,
|
|
1141
1312
|
useCreateClient,
|
|
1313
|
+
useCreateClientField,
|
|
1142
1314
|
useCreateDashboardSession,
|
|
1315
|
+
useCreateForm,
|
|
1143
1316
|
useCreateProvider,
|
|
1144
1317
|
useCreateProviderSchedule,
|
|
1145
1318
|
useCreatePublicAppointment,
|
|
@@ -1153,11 +1326,16 @@ var useServices = (queryParams, options) => {
|
|
|
1153
1326
|
useDeleteBlock,
|
|
1154
1327
|
useDeleteCancellationReason,
|
|
1155
1328
|
useDeleteClient,
|
|
1329
|
+
useDeleteClientField,
|
|
1156
1330
|
useDeleteConnectedAccount,
|
|
1331
|
+
useDeleteForm,
|
|
1157
1332
|
useDeleteProviderSchedule,
|
|
1158
1333
|
useDeleteService,
|
|
1159
1334
|
useDeleteServiceProvider,
|
|
1335
|
+
useDetachServiceForm,
|
|
1160
1336
|
useEarliestPublicServiceSlot,
|
|
1337
|
+
useForm,
|
|
1338
|
+
useForms,
|
|
1161
1339
|
useProvider,
|
|
1162
1340
|
useProviderSchedule,
|
|
1163
1341
|
useProviderSchedules,
|
|
@@ -1172,16 +1350,20 @@ var useServices = (queryParams, options) => {
|
|
|
1172
1350
|
useSavvyCalFetchClient,
|
|
1173
1351
|
useSavvyCalQueryClient,
|
|
1174
1352
|
useService,
|
|
1353
|
+
useServiceForms,
|
|
1175
1354
|
useServiceProviders,
|
|
1176
1355
|
useServiceSlots,
|
|
1177
1356
|
useServices,
|
|
1357
|
+
useSortServiceForms,
|
|
1178
1358
|
useUpdateAccount,
|
|
1179
1359
|
useUpdateAccountUser,
|
|
1180
1360
|
useUpdateBlock,
|
|
1181
1361
|
useUpdateBookingIntent,
|
|
1182
1362
|
useUpdateCancellationReason,
|
|
1183
1363
|
useUpdateClient,
|
|
1364
|
+
useUpdateClientField,
|
|
1184
1365
|
useUpdateConnectedAccount,
|
|
1366
|
+
useUpdateForm,
|
|
1185
1367
|
useUpdateProvider,
|
|
1186
1368
|
useUpdateProviderSchedule,
|
|
1187
1369
|
useUpdatePublicBookingIntent,
|