authula 0.7.13 → 0.7.15
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/README.md +7 -2
- package/dist/{index-cq14Wq4Z.d.ts → index-DVhn7FFt.d.ts} +107 -107
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.d.ts +1841 -1064
- package/dist/plugins/index.js +716 -110
- package/dist/plugins/index.js.map +1 -1
- package/package.json +32 -26
package/dist/plugins/index.js
CHANGED
|
@@ -31,7 +31,7 @@ function wrapGenerated(mod, client) {
|
|
|
31
31
|
args[optionsIdx] = {
|
|
32
32
|
...typeof existing === "object" && existing !== null ? existing : {},
|
|
33
33
|
request: {
|
|
34
|
-
...existing?.request
|
|
34
|
+
...existing?.request,
|
|
35
35
|
...ctx
|
|
36
36
|
}
|
|
37
37
|
};
|
|
@@ -59,6 +59,13 @@ function wrapGenerated(mod, client) {
|
|
|
59
59
|
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/gen/endpoints/access-control/access-control.ts
|
|
62
|
+
/**
|
|
63
|
+
* Generated by orval 🍺
|
|
64
|
+
* Do not edit manually.
|
|
65
|
+
* Authula API
|
|
66
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
67
|
+
* OpenAPI spec version: 0.1.0
|
|
68
|
+
*/
|
|
62
69
|
var access_control_exports = /* @__PURE__ */ __exportAll({
|
|
63
70
|
addRolePermission: () => addRolePermission,
|
|
64
71
|
assignUserRole: () => assignUserRole,
|
|
@@ -67,18 +74,25 @@ var access_control_exports = /* @__PURE__ */ __exportAll({
|
|
|
67
74
|
createRole: () => createRole,
|
|
68
75
|
deletePermission: () => deletePermission,
|
|
69
76
|
deleteRole: () => deleteRole,
|
|
77
|
+
getAddRolePermissionMutationKey: () => getAddRolePermissionMutationKey,
|
|
70
78
|
getAddRolePermissionMutationOptions: () => getAddRolePermissionMutationOptions,
|
|
71
79
|
getAddRolePermissionUrl: () => getAddRolePermissionUrl,
|
|
80
|
+
getAssignUserRoleMutationKey: () => getAssignUserRoleMutationKey,
|
|
72
81
|
getAssignUserRoleMutationOptions: () => getAssignUserRoleMutationOptions,
|
|
73
82
|
getAssignUserRoleUrl: () => getAssignUserRoleUrl,
|
|
83
|
+
getCheckUserPermissionsMutationKey: () => getCheckUserPermissionsMutationKey,
|
|
74
84
|
getCheckUserPermissionsMutationOptions: () => getCheckUserPermissionsMutationOptions,
|
|
75
85
|
getCheckUserPermissionsUrl: () => getCheckUserPermissionsUrl,
|
|
86
|
+
getCreatePermissionMutationKey: () => getCreatePermissionMutationKey,
|
|
76
87
|
getCreatePermissionMutationOptions: () => getCreatePermissionMutationOptions,
|
|
77
88
|
getCreatePermissionUrl: () => getCreatePermissionUrl,
|
|
89
|
+
getCreateRoleMutationKey: () => getCreateRoleMutationKey,
|
|
78
90
|
getCreateRoleMutationOptions: () => getCreateRoleMutationOptions,
|
|
79
91
|
getCreateRoleUrl: () => getCreateRoleUrl,
|
|
92
|
+
getDeletePermissionMutationKey: () => getDeletePermissionMutationKey,
|
|
80
93
|
getDeletePermissionMutationOptions: () => getDeletePermissionMutationOptions,
|
|
81
94
|
getDeletePermissionUrl: () => getDeletePermissionUrl,
|
|
95
|
+
getDeleteRoleMutationKey: () => getDeleteRoleMutationKey,
|
|
82
96
|
getDeleteRoleMutationOptions: () => getDeleteRoleMutationOptions,
|
|
83
97
|
getDeleteRoleUrl: () => getDeleteRoleUrl,
|
|
84
98
|
getGetPermissionByKeyQueryKey: () => getGetPermissionByKeyQueryKey,
|
|
@@ -110,18 +124,24 @@ var access_control_exports = /* @__PURE__ */ __exportAll({
|
|
|
110
124
|
getListUserRolesUrl: () => getListUserRolesUrl,
|
|
111
125
|
getPermission: () => getPermission,
|
|
112
126
|
getPermissionByKey: () => getPermissionByKey,
|
|
127
|
+
getRemoveRolePermissionMutationKey: () => getRemoveRolePermissionMutationKey,
|
|
113
128
|
getRemoveRolePermissionMutationOptions: () => getRemoveRolePermissionMutationOptions,
|
|
114
129
|
getRemoveRolePermissionUrl: () => getRemoveRolePermissionUrl,
|
|
130
|
+
getRemoveUserRoleMutationKey: () => getRemoveUserRoleMutationKey,
|
|
115
131
|
getRemoveUserRoleMutationOptions: () => getRemoveUserRoleMutationOptions,
|
|
116
132
|
getRemoveUserRoleUrl: () => getRemoveUserRoleUrl,
|
|
133
|
+
getReplaceRolePermissionsMutationKey: () => getReplaceRolePermissionsMutationKey,
|
|
117
134
|
getReplaceRolePermissionsMutationOptions: () => getReplaceRolePermissionsMutationOptions,
|
|
118
135
|
getReplaceRolePermissionsUrl: () => getReplaceRolePermissionsUrl,
|
|
136
|
+
getReplaceUserRolesMutationKey: () => getReplaceUserRolesMutationKey,
|
|
119
137
|
getReplaceUserRolesMutationOptions: () => getReplaceUserRolesMutationOptions,
|
|
120
138
|
getReplaceUserRolesUrl: () => getReplaceUserRolesUrl,
|
|
121
139
|
getRole: () => getRole,
|
|
122
140
|
getRoleByName: () => getRoleByName,
|
|
141
|
+
getUpdatePermissionMutationKey: () => getUpdatePermissionMutationKey,
|
|
123
142
|
getUpdatePermissionMutationOptions: () => getUpdatePermissionMutationOptions,
|
|
124
143
|
getUpdatePermissionUrl: () => getUpdatePermissionUrl,
|
|
144
|
+
getUpdateRoleMutationKey: () => getUpdateRoleMutationKey,
|
|
125
145
|
getUpdateRoleMutationOptions: () => getUpdateRoleMutationOptions,
|
|
126
146
|
getUpdateRoleUrl: () => getUpdateRoleUrl,
|
|
127
147
|
getUserPermissions: () => getUserPermissions,
|
|
@@ -215,18 +235,27 @@ const getCreatePermissionUrl = () => {
|
|
|
215
235
|
* @summary Create permission
|
|
216
236
|
*/
|
|
217
237
|
const createPermission = async (createPermissionRequest, options) => {
|
|
238
|
+
const getHeaders = (h) => {
|
|
239
|
+
if (!h) return {};
|
|
240
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
241
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
242
|
+
const headers = {};
|
|
243
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
244
|
+
return headers;
|
|
245
|
+
};
|
|
218
246
|
return customFetch(getCreatePermissionUrl(), {
|
|
219
247
|
...options,
|
|
220
248
|
method: "POST",
|
|
221
249
|
headers: {
|
|
222
250
|
"Content-Type": "application/json",
|
|
223
|
-
...options?.headers
|
|
251
|
+
...getHeaders(options?.headers)
|
|
224
252
|
},
|
|
225
253
|
body: JSON.stringify(createPermissionRequest)
|
|
226
254
|
});
|
|
227
255
|
};
|
|
256
|
+
const getCreatePermissionMutationKey = () => ["createPermission"];
|
|
228
257
|
const getCreatePermissionMutationOptions = (options) => {
|
|
229
|
-
const mutationKey =
|
|
258
|
+
const mutationKey = getCreatePermissionMutationKey();
|
|
230
259
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
231
260
|
...options,
|
|
232
261
|
mutation: {
|
|
@@ -341,8 +370,9 @@ const deletePermission = async (permissionId, options) => {
|
|
|
341
370
|
method: "DELETE"
|
|
342
371
|
});
|
|
343
372
|
};
|
|
373
|
+
const getDeletePermissionMutationKey = () => ["deletePermission"];
|
|
344
374
|
const getDeletePermissionMutationOptions = (options) => {
|
|
345
|
-
const mutationKey =
|
|
375
|
+
const mutationKey = getDeletePermissionMutationKey();
|
|
346
376
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
347
377
|
...options,
|
|
348
378
|
mutation: {
|
|
@@ -376,18 +406,27 @@ const getUpdatePermissionUrl = (permissionId) => {
|
|
|
376
406
|
* @summary Update permission
|
|
377
407
|
*/
|
|
378
408
|
const updatePermission = async (permissionId, updatePermissionRequest, options) => {
|
|
409
|
+
const getHeaders = (h) => {
|
|
410
|
+
if (!h) return {};
|
|
411
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
412
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
413
|
+
const headers = {};
|
|
414
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
415
|
+
return headers;
|
|
416
|
+
};
|
|
379
417
|
return customFetch(getUpdatePermissionUrl(permissionId), {
|
|
380
418
|
...options,
|
|
381
419
|
method: "PATCH",
|
|
382
420
|
headers: {
|
|
383
421
|
"Content-Type": "application/json",
|
|
384
|
-
...options?.headers
|
|
422
|
+
...getHeaders(options?.headers)
|
|
385
423
|
},
|
|
386
424
|
body: JSON.stringify(updatePermissionRequest)
|
|
387
425
|
});
|
|
388
426
|
};
|
|
427
|
+
const getUpdatePermissionMutationKey = () => ["updatePermission"];
|
|
389
428
|
const getUpdatePermissionMutationOptions = (options) => {
|
|
390
|
-
const mutationKey =
|
|
429
|
+
const mutationKey = getUpdatePermissionMutationKey();
|
|
391
430
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
392
431
|
...options,
|
|
393
432
|
mutation: {
|
|
@@ -458,18 +497,27 @@ const getCreateRoleUrl = () => {
|
|
|
458
497
|
* @summary Create role
|
|
459
498
|
*/
|
|
460
499
|
const createRole = async (createRoleRequest, options) => {
|
|
500
|
+
const getHeaders = (h) => {
|
|
501
|
+
if (!h) return {};
|
|
502
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
503
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
504
|
+
const headers = {};
|
|
505
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
506
|
+
return headers;
|
|
507
|
+
};
|
|
461
508
|
return customFetch(getCreateRoleUrl(), {
|
|
462
509
|
...options,
|
|
463
510
|
method: "POST",
|
|
464
511
|
headers: {
|
|
465
512
|
"Content-Type": "application/json",
|
|
466
|
-
...options?.headers
|
|
513
|
+
...getHeaders(options?.headers)
|
|
467
514
|
},
|
|
468
515
|
body: JSON.stringify(createRoleRequest)
|
|
469
516
|
});
|
|
470
517
|
};
|
|
518
|
+
const getCreateRoleMutationKey = () => ["createRole"];
|
|
471
519
|
const getCreateRoleMutationOptions = (options) => {
|
|
472
|
-
const mutationKey =
|
|
520
|
+
const mutationKey = getCreateRoleMutationKey();
|
|
473
521
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
474
522
|
...options,
|
|
475
523
|
mutation: {
|
|
@@ -584,8 +632,9 @@ const deleteRole = async (roleId, options) => {
|
|
|
584
632
|
method: "DELETE"
|
|
585
633
|
});
|
|
586
634
|
};
|
|
635
|
+
const getDeleteRoleMutationKey = () => ["deleteRole"];
|
|
587
636
|
const getDeleteRoleMutationOptions = (options) => {
|
|
588
|
-
const mutationKey =
|
|
637
|
+
const mutationKey = getDeleteRoleMutationKey();
|
|
589
638
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
590
639
|
...options,
|
|
591
640
|
mutation: {
|
|
@@ -619,18 +668,27 @@ const getUpdateRoleUrl = (roleId) => {
|
|
|
619
668
|
* @summary Update role
|
|
620
669
|
*/
|
|
621
670
|
const updateRole = async (roleId, updateRoleRequest, options) => {
|
|
671
|
+
const getHeaders = (h) => {
|
|
672
|
+
if (!h) return {};
|
|
673
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
674
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
675
|
+
const headers = {};
|
|
676
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
677
|
+
return headers;
|
|
678
|
+
};
|
|
622
679
|
return customFetch(getUpdateRoleUrl(roleId), {
|
|
623
680
|
...options,
|
|
624
681
|
method: "PATCH",
|
|
625
682
|
headers: {
|
|
626
683
|
"Content-Type": "application/json",
|
|
627
|
-
...options?.headers
|
|
684
|
+
...getHeaders(options?.headers)
|
|
628
685
|
},
|
|
629
686
|
body: JSON.stringify(updateRoleRequest)
|
|
630
687
|
});
|
|
631
688
|
};
|
|
689
|
+
const getUpdateRoleMutationKey = () => ["updateRole"];
|
|
632
690
|
const getUpdateRoleMutationOptions = (options) => {
|
|
633
|
-
const mutationKey =
|
|
691
|
+
const mutationKey = getUpdateRoleMutationKey();
|
|
634
692
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
635
693
|
...options,
|
|
636
694
|
mutation: {
|
|
@@ -702,18 +760,27 @@ const getReplaceRolePermissionsUrl = (roleId) => {
|
|
|
702
760
|
* @summary Replace role permissions
|
|
703
761
|
*/
|
|
704
762
|
const replaceRolePermissions = async (roleId, replaceRolePermissionsRequest, options) => {
|
|
763
|
+
const getHeaders = (h) => {
|
|
764
|
+
if (!h) return {};
|
|
765
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
766
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
767
|
+
const headers = {};
|
|
768
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
769
|
+
return headers;
|
|
770
|
+
};
|
|
705
771
|
return customFetch(getReplaceRolePermissionsUrl(roleId), {
|
|
706
772
|
...options,
|
|
707
773
|
method: "PUT",
|
|
708
774
|
headers: {
|
|
709
775
|
"Content-Type": "application/json",
|
|
710
|
-
...options?.headers
|
|
776
|
+
...getHeaders(options?.headers)
|
|
711
777
|
},
|
|
712
778
|
body: JSON.stringify(replaceRolePermissionsRequest)
|
|
713
779
|
});
|
|
714
780
|
};
|
|
781
|
+
const getReplaceRolePermissionsMutationKey = () => ["replaceRolePermissions"];
|
|
715
782
|
const getReplaceRolePermissionsMutationOptions = (options) => {
|
|
716
|
-
const mutationKey =
|
|
783
|
+
const mutationKey = getReplaceRolePermissionsMutationKey();
|
|
717
784
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
718
785
|
...options,
|
|
719
786
|
mutation: {
|
|
@@ -747,18 +814,27 @@ const getAddRolePermissionUrl = (roleId) => {
|
|
|
747
814
|
* @summary Assign permission to role
|
|
748
815
|
*/
|
|
749
816
|
const addRolePermission = async (roleId, addRolePermissionRequest, options) => {
|
|
817
|
+
const getHeaders = (h) => {
|
|
818
|
+
if (!h) return {};
|
|
819
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
820
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
821
|
+
const headers = {};
|
|
822
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
823
|
+
return headers;
|
|
824
|
+
};
|
|
750
825
|
return customFetch(getAddRolePermissionUrl(roleId), {
|
|
751
826
|
...options,
|
|
752
827
|
method: "POST",
|
|
753
828
|
headers: {
|
|
754
829
|
"Content-Type": "application/json",
|
|
755
|
-
...options?.headers
|
|
830
|
+
...getHeaders(options?.headers)
|
|
756
831
|
},
|
|
757
832
|
body: JSON.stringify(addRolePermissionRequest)
|
|
758
833
|
});
|
|
759
834
|
};
|
|
835
|
+
const getAddRolePermissionMutationKey = () => ["addRolePermission"];
|
|
760
836
|
const getAddRolePermissionMutationOptions = (options) => {
|
|
761
|
-
const mutationKey =
|
|
837
|
+
const mutationKey = getAddRolePermissionMutationKey();
|
|
762
838
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
763
839
|
...options,
|
|
764
840
|
mutation: {
|
|
@@ -797,8 +873,9 @@ const removeRolePermission = async (roleId, permissionId, options) => {
|
|
|
797
873
|
method: "DELETE"
|
|
798
874
|
});
|
|
799
875
|
};
|
|
876
|
+
const getRemoveRolePermissionMutationKey = () => ["removeRolePermission"];
|
|
800
877
|
const getRemoveRolePermissionMutationOptions = (options) => {
|
|
801
|
-
const mutationKey =
|
|
878
|
+
const mutationKey = getRemoveRolePermissionMutationKey();
|
|
802
879
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
803
880
|
...options,
|
|
804
881
|
mutation: {
|
|
@@ -870,18 +947,27 @@ const getCheckUserPermissionsUrl = (userId) => {
|
|
|
870
947
|
* @summary Check user permissions
|
|
871
948
|
*/
|
|
872
949
|
const checkUserPermissions = async (userId, checkUserPermissionsRequest, options) => {
|
|
950
|
+
const getHeaders = (h) => {
|
|
951
|
+
if (!h) return {};
|
|
952
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
953
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
954
|
+
const headers = {};
|
|
955
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
956
|
+
return headers;
|
|
957
|
+
};
|
|
873
958
|
return customFetch(getCheckUserPermissionsUrl(userId), {
|
|
874
959
|
...options,
|
|
875
960
|
method: "POST",
|
|
876
961
|
headers: {
|
|
877
962
|
"Content-Type": "application/json",
|
|
878
|
-
...options?.headers
|
|
963
|
+
...getHeaders(options?.headers)
|
|
879
964
|
},
|
|
880
965
|
body: JSON.stringify(checkUserPermissionsRequest)
|
|
881
966
|
});
|
|
882
967
|
};
|
|
968
|
+
const getCheckUserPermissionsMutationKey = () => ["checkUserPermissions"];
|
|
883
969
|
const getCheckUserPermissionsMutationOptions = (options) => {
|
|
884
|
-
const mutationKey =
|
|
970
|
+
const mutationKey = getCheckUserPermissionsMutationKey();
|
|
885
971
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
886
972
|
...options,
|
|
887
973
|
mutation: {
|
|
@@ -953,18 +1039,27 @@ const getReplaceUserRolesUrl = (userId) => {
|
|
|
953
1039
|
* @summary Replace user roles
|
|
954
1040
|
*/
|
|
955
1041
|
const replaceUserRoles = async (userId, replaceUserRolesRequest, options) => {
|
|
1042
|
+
const getHeaders = (h) => {
|
|
1043
|
+
if (!h) return {};
|
|
1044
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1045
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1046
|
+
const headers = {};
|
|
1047
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1048
|
+
return headers;
|
|
1049
|
+
};
|
|
956
1050
|
return customFetch(getReplaceUserRolesUrl(userId), {
|
|
957
1051
|
...options,
|
|
958
1052
|
method: "PUT",
|
|
959
1053
|
headers: {
|
|
960
1054
|
"Content-Type": "application/json",
|
|
961
|
-
...options?.headers
|
|
1055
|
+
...getHeaders(options?.headers)
|
|
962
1056
|
},
|
|
963
1057
|
body: JSON.stringify(replaceUserRolesRequest)
|
|
964
1058
|
});
|
|
965
1059
|
};
|
|
1060
|
+
const getReplaceUserRolesMutationKey = () => ["replaceUserRoles"];
|
|
966
1061
|
const getReplaceUserRolesMutationOptions = (options) => {
|
|
967
|
-
const mutationKey =
|
|
1062
|
+
const mutationKey = getReplaceUserRolesMutationKey();
|
|
968
1063
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
969
1064
|
...options,
|
|
970
1065
|
mutation: {
|
|
@@ -998,18 +1093,27 @@ const getAssignUserRoleUrl = (userId) => {
|
|
|
998
1093
|
* @summary Assign role to user
|
|
999
1094
|
*/
|
|
1000
1095
|
const assignUserRole = async (userId, assignUserRoleRequest, options) => {
|
|
1096
|
+
const getHeaders = (h) => {
|
|
1097
|
+
if (!h) return {};
|
|
1098
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1099
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1100
|
+
const headers = {};
|
|
1101
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1102
|
+
return headers;
|
|
1103
|
+
};
|
|
1001
1104
|
return customFetch(getAssignUserRoleUrl(userId), {
|
|
1002
1105
|
...options,
|
|
1003
1106
|
method: "POST",
|
|
1004
1107
|
headers: {
|
|
1005
1108
|
"Content-Type": "application/json",
|
|
1006
|
-
...options?.headers
|
|
1109
|
+
...getHeaders(options?.headers)
|
|
1007
1110
|
},
|
|
1008
1111
|
body: JSON.stringify(assignUserRoleRequest)
|
|
1009
1112
|
});
|
|
1010
1113
|
};
|
|
1114
|
+
const getAssignUserRoleMutationKey = () => ["assignUserRole"];
|
|
1011
1115
|
const getAssignUserRoleMutationOptions = (options) => {
|
|
1012
|
-
const mutationKey =
|
|
1116
|
+
const mutationKey = getAssignUserRoleMutationKey();
|
|
1013
1117
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1014
1118
|
...options,
|
|
1015
1119
|
mutation: {
|
|
@@ -1048,8 +1152,9 @@ const removeUserRole = async (userId, roleId, options) => {
|
|
|
1048
1152
|
method: "DELETE"
|
|
1049
1153
|
});
|
|
1050
1154
|
};
|
|
1155
|
+
const getRemoveUserRoleMutationKey = () => ["removeUserRole"];
|
|
1051
1156
|
const getRemoveUserRoleMutationOptions = (options) => {
|
|
1052
|
-
const mutationKey =
|
|
1157
|
+
const mutationKey = getRemoveUserRoleMutationKey();
|
|
1053
1158
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1054
1159
|
...options,
|
|
1055
1160
|
mutation: {
|
|
@@ -1088,12 +1193,21 @@ var AccessControlPlugin = class {
|
|
|
1088
1193
|
|
|
1089
1194
|
//#endregion
|
|
1090
1195
|
//#region src/gen/endpoints/admin-accounts/admin-accounts.ts
|
|
1196
|
+
/**
|
|
1197
|
+
* Generated by orval 🍺
|
|
1198
|
+
* Do not edit manually.
|
|
1199
|
+
* Authula API
|
|
1200
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
1201
|
+
* OpenAPI spec version: 0.1.0
|
|
1202
|
+
*/
|
|
1091
1203
|
var admin_accounts_exports = /* @__PURE__ */ __exportAll({
|
|
1092
1204
|
createAccount: () => createAccount,
|
|
1093
1205
|
deleteAccount: () => deleteAccount,
|
|
1094
1206
|
getAccount: () => getAccount,
|
|
1207
|
+
getCreateAccountMutationKey: () => getCreateAccountMutationKey,
|
|
1095
1208
|
getCreateAccountMutationOptions: () => getCreateAccountMutationOptions,
|
|
1096
1209
|
getCreateAccountUrl: () => getCreateAccountUrl,
|
|
1210
|
+
getDeleteAccountMutationKey: () => getDeleteAccountMutationKey,
|
|
1097
1211
|
getDeleteAccountMutationOptions: () => getDeleteAccountMutationOptions,
|
|
1098
1212
|
getDeleteAccountUrl: () => getDeleteAccountUrl,
|
|
1099
1213
|
getGetAccountQueryKey: () => getGetAccountQueryKey,
|
|
@@ -1102,6 +1216,7 @@ var admin_accounts_exports = /* @__PURE__ */ __exportAll({
|
|
|
1102
1216
|
getListUserAccountsQueryKey: () => getListUserAccountsQueryKey,
|
|
1103
1217
|
getListUserAccountsQueryOptions: () => getListUserAccountsQueryOptions,
|
|
1104
1218
|
getListUserAccountsUrl: () => getListUserAccountsUrl,
|
|
1219
|
+
getUpdateAccountMutationKey: () => getUpdateAccountMutationKey,
|
|
1105
1220
|
getUpdateAccountMutationOptions: () => getUpdateAccountMutationOptions,
|
|
1106
1221
|
getUpdateAccountUrl: () => getUpdateAccountUrl,
|
|
1107
1222
|
listUserAccounts: () => listUserAccounts,
|
|
@@ -1175,8 +1290,9 @@ const deleteAccount = async (id, options) => {
|
|
|
1175
1290
|
method: "DELETE"
|
|
1176
1291
|
});
|
|
1177
1292
|
};
|
|
1293
|
+
const getDeleteAccountMutationKey = () => ["deleteAccount"];
|
|
1178
1294
|
const getDeleteAccountMutationOptions = (options) => {
|
|
1179
|
-
const mutationKey =
|
|
1295
|
+
const mutationKey = getDeleteAccountMutationKey();
|
|
1180
1296
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1181
1297
|
...options,
|
|
1182
1298
|
mutation: {
|
|
@@ -1210,18 +1326,27 @@ const getUpdateAccountUrl = (id) => {
|
|
|
1210
1326
|
* @summary Update account
|
|
1211
1327
|
*/
|
|
1212
1328
|
const updateAccount = async (id, updateAccountRequest, options) => {
|
|
1329
|
+
const getHeaders = (h) => {
|
|
1330
|
+
if (!h) return {};
|
|
1331
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1332
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1333
|
+
const headers = {};
|
|
1334
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1335
|
+
return headers;
|
|
1336
|
+
};
|
|
1213
1337
|
return customFetch(getUpdateAccountUrl(id), {
|
|
1214
1338
|
...options,
|
|
1215
1339
|
method: "PATCH",
|
|
1216
1340
|
headers: {
|
|
1217
1341
|
"Content-Type": "application/json",
|
|
1218
|
-
...options?.headers
|
|
1342
|
+
...getHeaders(options?.headers)
|
|
1219
1343
|
},
|
|
1220
1344
|
body: JSON.stringify(updateAccountRequest)
|
|
1221
1345
|
});
|
|
1222
1346
|
};
|
|
1347
|
+
const getUpdateAccountMutationKey = () => ["updateAccount"];
|
|
1223
1348
|
const getUpdateAccountMutationOptions = (options) => {
|
|
1224
|
-
const mutationKey =
|
|
1349
|
+
const mutationKey = getUpdateAccountMutationKey();
|
|
1225
1350
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1226
1351
|
...options,
|
|
1227
1352
|
mutation: {
|
|
@@ -1293,18 +1418,27 @@ const getCreateAccountUrl = (userId) => {
|
|
|
1293
1418
|
* @summary Create account
|
|
1294
1419
|
*/
|
|
1295
1420
|
const createAccount = async (userId, createAccountRequest, options) => {
|
|
1421
|
+
const getHeaders = (h) => {
|
|
1422
|
+
if (!h) return {};
|
|
1423
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1424
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1425
|
+
const headers = {};
|
|
1426
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1427
|
+
return headers;
|
|
1428
|
+
};
|
|
1296
1429
|
return customFetch(getCreateAccountUrl(userId), {
|
|
1297
1430
|
...options,
|
|
1298
1431
|
method: "POST",
|
|
1299
1432
|
headers: {
|
|
1300
1433
|
"Content-Type": "application/json",
|
|
1301
|
-
...options?.headers
|
|
1434
|
+
...getHeaders(options?.headers)
|
|
1302
1435
|
},
|
|
1303
1436
|
body: JSON.stringify(createAccountRequest)
|
|
1304
1437
|
});
|
|
1305
1438
|
};
|
|
1439
|
+
const getCreateAccountMutationKey = () => ["createAccount"];
|
|
1306
1440
|
const getCreateAccountMutationOptions = (options) => {
|
|
1307
|
-
const mutationKey =
|
|
1441
|
+
const mutationKey = getCreateAccountMutationKey();
|
|
1308
1442
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1309
1443
|
...options,
|
|
1310
1444
|
mutation: {
|
|
@@ -1333,6 +1467,13 @@ const useCreateAccount = (options, queryClient) => {
|
|
|
1333
1467
|
|
|
1334
1468
|
//#endregion
|
|
1335
1469
|
//#region src/gen/endpoints/admin-impersonation/admin-impersonation.ts
|
|
1470
|
+
/**
|
|
1471
|
+
* Generated by orval 🍺
|
|
1472
|
+
* Do not edit manually.
|
|
1473
|
+
* Authula API
|
|
1474
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
1475
|
+
* OpenAPI spec version: 0.1.0
|
|
1476
|
+
*/
|
|
1336
1477
|
var admin_impersonation_exports = /* @__PURE__ */ __exportAll({
|
|
1337
1478
|
getGetImpersonationQueryKey: () => getGetImpersonationQueryKey,
|
|
1338
1479
|
getGetImpersonationQueryOptions: () => getGetImpersonationQueryOptions,
|
|
@@ -1341,8 +1482,10 @@ var admin_impersonation_exports = /* @__PURE__ */ __exportAll({
|
|
|
1341
1482
|
getListImpersonationsQueryKey: () => getListImpersonationsQueryKey,
|
|
1342
1483
|
getListImpersonationsQueryOptions: () => getListImpersonationsQueryOptions,
|
|
1343
1484
|
getListImpersonationsUrl: () => getListImpersonationsUrl,
|
|
1485
|
+
getStartImpersonationMutationKey: () => getStartImpersonationMutationKey,
|
|
1344
1486
|
getStartImpersonationMutationOptions: () => getStartImpersonationMutationOptions,
|
|
1345
1487
|
getStartImpersonationUrl: () => getStartImpersonationUrl,
|
|
1488
|
+
getStopImpersonationMutationKey: () => getStopImpersonationMutationKey,
|
|
1346
1489
|
getStopImpersonationMutationOptions: () => getStopImpersonationMutationOptions,
|
|
1347
1490
|
getStopImpersonationUrl: () => getStopImpersonationUrl,
|
|
1348
1491
|
listImpersonations: () => listImpersonations,
|
|
@@ -1410,18 +1553,27 @@ const getStartImpersonationUrl = () => {
|
|
|
1410
1553
|
* @summary Start impersonation
|
|
1411
1554
|
*/
|
|
1412
1555
|
const startImpersonation = async (startImpersonationRequest, options) => {
|
|
1556
|
+
const getHeaders = (h) => {
|
|
1557
|
+
if (!h) return {};
|
|
1558
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1559
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1560
|
+
const headers = {};
|
|
1561
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1562
|
+
return headers;
|
|
1563
|
+
};
|
|
1413
1564
|
return customFetch(getStartImpersonationUrl(), {
|
|
1414
1565
|
...options,
|
|
1415
1566
|
method: "POST",
|
|
1416
1567
|
headers: {
|
|
1417
1568
|
"Content-Type": "application/json",
|
|
1418
|
-
...options?.headers
|
|
1569
|
+
...getHeaders(options?.headers)
|
|
1419
1570
|
},
|
|
1420
1571
|
body: JSON.stringify(startImpersonationRequest)
|
|
1421
1572
|
});
|
|
1422
1573
|
};
|
|
1574
|
+
const getStartImpersonationMutationKey = () => ["startImpersonation"];
|
|
1423
1575
|
const getStartImpersonationMutationOptions = (options) => {
|
|
1424
|
-
const mutationKey =
|
|
1576
|
+
const mutationKey = getStartImpersonationMutationKey();
|
|
1425
1577
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1426
1578
|
...options,
|
|
1427
1579
|
mutation: {
|
|
@@ -1498,8 +1650,9 @@ const stopImpersonation = async (impersonationId, options) => {
|
|
|
1498
1650
|
method: "POST"
|
|
1499
1651
|
});
|
|
1500
1652
|
};
|
|
1653
|
+
const getStopImpersonationMutationKey = () => ["stopImpersonation"];
|
|
1501
1654
|
const getStopImpersonationMutationOptions = (options) => {
|
|
1502
|
-
const mutationKey =
|
|
1655
|
+
const mutationKey = getStopImpersonationMutationKey();
|
|
1503
1656
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1504
1657
|
...options,
|
|
1505
1658
|
mutation: {
|
|
@@ -1528,11 +1681,20 @@ const useStopImpersonation = (options, queryClient) => {
|
|
|
1528
1681
|
|
|
1529
1682
|
//#endregion
|
|
1530
1683
|
//#region src/gen/endpoints/admin-session-state/admin-session-state.ts
|
|
1684
|
+
/**
|
|
1685
|
+
* Generated by orval 🍺
|
|
1686
|
+
* Do not edit manually.
|
|
1687
|
+
* Authula API
|
|
1688
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
1689
|
+
* OpenAPI spec version: 0.1.0
|
|
1690
|
+
*/
|
|
1531
1691
|
var admin_session_state_exports = /* @__PURE__ */ __exportAll({
|
|
1532
1692
|
createSessionState: () => createSessionState,
|
|
1533
1693
|
deleteSessionState: () => deleteSessionState,
|
|
1694
|
+
getCreateSessionStateMutationKey: () => getCreateSessionStateMutationKey,
|
|
1534
1695
|
getCreateSessionStateMutationOptions: () => getCreateSessionStateMutationOptions,
|
|
1535
1696
|
getCreateSessionStateUrl: () => getCreateSessionStateUrl,
|
|
1697
|
+
getDeleteSessionStateMutationKey: () => getDeleteSessionStateMutationKey,
|
|
1536
1698
|
getDeleteSessionStateMutationOptions: () => getDeleteSessionStateMutationOptions,
|
|
1537
1699
|
getDeleteSessionStateUrl: () => getDeleteSessionStateUrl,
|
|
1538
1700
|
getGetSessionStateQueryKey: () => getGetSessionStateQueryKey,
|
|
@@ -1541,9 +1703,11 @@ var admin_session_state_exports = /* @__PURE__ */ __exportAll({
|
|
|
1541
1703
|
getListRevokedSessionStatesQueryKey: () => getListRevokedSessionStatesQueryKey,
|
|
1542
1704
|
getListRevokedSessionStatesQueryOptions: () => getListRevokedSessionStatesQueryOptions,
|
|
1543
1705
|
getListRevokedSessionStatesUrl: () => getListRevokedSessionStatesUrl,
|
|
1706
|
+
getRevokeSessionMutationKey: () => getRevokeSessionMutationKey,
|
|
1544
1707
|
getRevokeSessionMutationOptions: () => getRevokeSessionMutationOptions,
|
|
1545
1708
|
getRevokeSessionUrl: () => getRevokeSessionUrl,
|
|
1546
1709
|
getSessionState: () => getSessionState,
|
|
1710
|
+
getUpdateSessionStateMutationKey: () => getUpdateSessionStateMutationKey,
|
|
1547
1711
|
getUpdateSessionStateMutationOptions: () => getUpdateSessionStateMutationOptions,
|
|
1548
1712
|
getUpdateSessionStateUrl: () => getUpdateSessionStateUrl,
|
|
1549
1713
|
listRevokedSessionStates: () => listRevokedSessionStates,
|
|
@@ -1613,18 +1777,27 @@ const getRevokeSessionUrl = (sessionId) => {
|
|
|
1613
1777
|
* @summary Revoke session
|
|
1614
1778
|
*/
|
|
1615
1779
|
const revokeSession = async (sessionId, revokeSessionRequest, options) => {
|
|
1780
|
+
const getHeaders = (h) => {
|
|
1781
|
+
if (!h) return {};
|
|
1782
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1783
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1784
|
+
const headers = {};
|
|
1785
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1786
|
+
return headers;
|
|
1787
|
+
};
|
|
1616
1788
|
return customFetch(getRevokeSessionUrl(sessionId), {
|
|
1617
1789
|
...options,
|
|
1618
1790
|
method: "POST",
|
|
1619
1791
|
headers: {
|
|
1620
1792
|
"Content-Type": "application/json",
|
|
1621
|
-
...options?.headers
|
|
1793
|
+
...getHeaders(options?.headers)
|
|
1622
1794
|
},
|
|
1623
1795
|
body: JSON.stringify(revokeSessionRequest)
|
|
1624
1796
|
});
|
|
1625
1797
|
};
|
|
1798
|
+
const getRevokeSessionMutationKey = () => ["revokeSession"];
|
|
1626
1799
|
const getRevokeSessionMutationOptions = (options) => {
|
|
1627
|
-
const mutationKey =
|
|
1800
|
+
const mutationKey = getRevokeSessionMutationKey();
|
|
1628
1801
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1629
1802
|
...options,
|
|
1630
1803
|
mutation: {
|
|
@@ -1696,18 +1869,27 @@ const getCreateSessionStateUrl = (sessionId) => {
|
|
|
1696
1869
|
* @summary Create session state
|
|
1697
1870
|
*/
|
|
1698
1871
|
const createSessionState = async (sessionId, createSessionStateRequest, options) => {
|
|
1872
|
+
const getHeaders = (h) => {
|
|
1873
|
+
if (!h) return {};
|
|
1874
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1875
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1876
|
+
const headers = {};
|
|
1877
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1878
|
+
return headers;
|
|
1879
|
+
};
|
|
1699
1880
|
return customFetch(getCreateSessionStateUrl(sessionId), {
|
|
1700
1881
|
...options,
|
|
1701
1882
|
method: "POST",
|
|
1702
1883
|
headers: {
|
|
1703
1884
|
"Content-Type": "application/json",
|
|
1704
|
-
...options?.headers
|
|
1885
|
+
...getHeaders(options?.headers)
|
|
1705
1886
|
},
|
|
1706
1887
|
body: JSON.stringify(createSessionStateRequest)
|
|
1707
1888
|
});
|
|
1708
1889
|
};
|
|
1890
|
+
const getCreateSessionStateMutationKey = () => ["createSessionState"];
|
|
1709
1891
|
const getCreateSessionStateMutationOptions = (options) => {
|
|
1710
|
-
const mutationKey =
|
|
1892
|
+
const mutationKey = getCreateSessionStateMutationKey();
|
|
1711
1893
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1712
1894
|
...options,
|
|
1713
1895
|
mutation: {
|
|
@@ -1746,8 +1928,9 @@ const deleteSessionState = async (sessionId, options) => {
|
|
|
1746
1928
|
method: "DELETE"
|
|
1747
1929
|
});
|
|
1748
1930
|
};
|
|
1931
|
+
const getDeleteSessionStateMutationKey = () => ["deleteSessionState"];
|
|
1749
1932
|
const getDeleteSessionStateMutationOptions = (options) => {
|
|
1750
|
-
const mutationKey =
|
|
1933
|
+
const mutationKey = getDeleteSessionStateMutationKey();
|
|
1751
1934
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1752
1935
|
...options,
|
|
1753
1936
|
mutation: {
|
|
@@ -1781,18 +1964,27 @@ const getUpdateSessionStateUrl = (sessionId) => {
|
|
|
1781
1964
|
* @summary Update session state
|
|
1782
1965
|
*/
|
|
1783
1966
|
const updateSessionState = async (sessionId, upsertSessionStateRequest, options) => {
|
|
1967
|
+
const getHeaders = (h) => {
|
|
1968
|
+
if (!h) return {};
|
|
1969
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
1970
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
1971
|
+
const headers = {};
|
|
1972
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
1973
|
+
return headers;
|
|
1974
|
+
};
|
|
1784
1975
|
return customFetch(getUpdateSessionStateUrl(sessionId), {
|
|
1785
1976
|
...options,
|
|
1786
1977
|
method: "PATCH",
|
|
1787
1978
|
headers: {
|
|
1788
1979
|
"Content-Type": "application/json",
|
|
1789
|
-
...options?.headers
|
|
1980
|
+
...getHeaders(options?.headers)
|
|
1790
1981
|
},
|
|
1791
1982
|
body: JSON.stringify(upsertSessionStateRequest)
|
|
1792
1983
|
});
|
|
1793
1984
|
};
|
|
1985
|
+
const getUpdateSessionStateMutationKey = () => ["updateSessionState"];
|
|
1794
1986
|
const getUpdateSessionStateMutationOptions = (options) => {
|
|
1795
|
-
const mutationKey =
|
|
1987
|
+
const mutationKey = getUpdateSessionStateMutationKey();
|
|
1796
1988
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1797
1989
|
...options,
|
|
1798
1990
|
mutation: {
|
|
@@ -1821,14 +2013,24 @@ const useUpdateSessionState = (options, queryClient) => {
|
|
|
1821
2013
|
|
|
1822
2014
|
//#endregion
|
|
1823
2015
|
//#region src/gen/endpoints/admin-user-state/admin-user-state.ts
|
|
2016
|
+
/**
|
|
2017
|
+
* Generated by orval 🍺
|
|
2018
|
+
* Do not edit manually.
|
|
2019
|
+
* Authula API
|
|
2020
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
2021
|
+
* OpenAPI spec version: 0.1.0
|
|
2022
|
+
*/
|
|
1824
2023
|
var admin_user_state_exports = /* @__PURE__ */ __exportAll({
|
|
1825
2024
|
banUser: () => banUser,
|
|
1826
2025
|
createUserState: () => createUserState,
|
|
1827
2026
|
deleteUserState: () => deleteUserState,
|
|
2027
|
+
getBanUserMutationKey: () => getBanUserMutationKey,
|
|
1828
2028
|
getBanUserMutationOptions: () => getBanUserMutationOptions,
|
|
1829
2029
|
getBanUserUrl: () => getBanUserUrl,
|
|
2030
|
+
getCreateUserStateMutationKey: () => getCreateUserStateMutationKey,
|
|
1830
2031
|
getCreateUserStateMutationOptions: () => getCreateUserStateMutationOptions,
|
|
1831
2032
|
getCreateUserStateUrl: () => getCreateUserStateUrl,
|
|
2033
|
+
getDeleteUserStateMutationKey: () => getDeleteUserStateMutationKey,
|
|
1832
2034
|
getDeleteUserStateMutationOptions: () => getDeleteUserStateMutationOptions,
|
|
1833
2035
|
getDeleteUserStateUrl: () => getDeleteUserStateUrl,
|
|
1834
2036
|
getGetUserStateQueryKey: () => getGetUserStateQueryKey,
|
|
@@ -1840,8 +2042,10 @@ var admin_user_state_exports = /* @__PURE__ */ __exportAll({
|
|
|
1840
2042
|
getListUserSessionsQueryKey: () => getListUserSessionsQueryKey,
|
|
1841
2043
|
getListUserSessionsQueryOptions: () => getListUserSessionsQueryOptions,
|
|
1842
2044
|
getListUserSessionsUrl: () => getListUserSessionsUrl,
|
|
2045
|
+
getUnbanUserMutationKey: () => getUnbanUserMutationKey,
|
|
1843
2046
|
getUnbanUserMutationOptions: () => getUnbanUserMutationOptions,
|
|
1844
2047
|
getUnbanUserUrl: () => getUnbanUserUrl,
|
|
2048
|
+
getUpdateUserStateMutationKey: () => getUpdateUserStateMutationKey,
|
|
1845
2049
|
getUpdateUserStateMutationOptions: () => getUpdateUserStateMutationOptions,
|
|
1846
2050
|
getUpdateUserStateUrl: () => getUpdateUserStateUrl,
|
|
1847
2051
|
getUserState: () => getUserState,
|
|
@@ -1915,18 +2119,27 @@ const getBanUserUrl = (userId) => {
|
|
|
1915
2119
|
* @summary Ban user
|
|
1916
2120
|
*/
|
|
1917
2121
|
const banUser = async (userId, banUserRequest, options) => {
|
|
2122
|
+
const getHeaders = (h) => {
|
|
2123
|
+
if (!h) return {};
|
|
2124
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2125
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2126
|
+
const headers = {};
|
|
2127
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2128
|
+
return headers;
|
|
2129
|
+
};
|
|
1918
2130
|
return customFetch(getBanUserUrl(userId), {
|
|
1919
2131
|
...options,
|
|
1920
2132
|
method: "POST",
|
|
1921
2133
|
headers: {
|
|
1922
2134
|
"Content-Type": "application/json",
|
|
1923
|
-
...options?.headers
|
|
2135
|
+
...getHeaders(options?.headers)
|
|
1924
2136
|
},
|
|
1925
2137
|
body: JSON.stringify(banUserRequest)
|
|
1926
2138
|
});
|
|
1927
2139
|
};
|
|
2140
|
+
const getBanUserMutationKey = () => ["banUser"];
|
|
1928
2141
|
const getBanUserMutationOptions = (options) => {
|
|
1929
|
-
const mutationKey =
|
|
2142
|
+
const mutationKey = getBanUserMutationKey();
|
|
1930
2143
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
1931
2144
|
...options,
|
|
1932
2145
|
mutation: {
|
|
@@ -2036,18 +2249,27 @@ const getCreateUserStateUrl = (userId) => {
|
|
|
2036
2249
|
* @summary Create user state
|
|
2037
2250
|
*/
|
|
2038
2251
|
const createUserState = async (userId, createUserStateRequest, options) => {
|
|
2252
|
+
const getHeaders = (h) => {
|
|
2253
|
+
if (!h) return {};
|
|
2254
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2255
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2256
|
+
const headers = {};
|
|
2257
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2258
|
+
return headers;
|
|
2259
|
+
};
|
|
2039
2260
|
return customFetch(getCreateUserStateUrl(userId), {
|
|
2040
2261
|
...options,
|
|
2041
2262
|
method: "POST",
|
|
2042
2263
|
headers: {
|
|
2043
2264
|
"Content-Type": "application/json",
|
|
2044
|
-
...options?.headers
|
|
2265
|
+
...getHeaders(options?.headers)
|
|
2045
2266
|
},
|
|
2046
2267
|
body: JSON.stringify(createUserStateRequest)
|
|
2047
2268
|
});
|
|
2048
2269
|
};
|
|
2270
|
+
const getCreateUserStateMutationKey = () => ["createUserState"];
|
|
2049
2271
|
const getCreateUserStateMutationOptions = (options) => {
|
|
2050
|
-
const mutationKey =
|
|
2272
|
+
const mutationKey = getCreateUserStateMutationKey();
|
|
2051
2273
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2052
2274
|
...options,
|
|
2053
2275
|
mutation: {
|
|
@@ -2086,8 +2308,9 @@ const deleteUserState = async (userId, options) => {
|
|
|
2086
2308
|
method: "DELETE"
|
|
2087
2309
|
});
|
|
2088
2310
|
};
|
|
2311
|
+
const getDeleteUserStateMutationKey = () => ["deleteUserState"];
|
|
2089
2312
|
const getDeleteUserStateMutationOptions = (options) => {
|
|
2090
|
-
const mutationKey =
|
|
2313
|
+
const mutationKey = getDeleteUserStateMutationKey();
|
|
2091
2314
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2092
2315
|
...options,
|
|
2093
2316
|
mutation: {
|
|
@@ -2121,18 +2344,27 @@ const getUpdateUserStateUrl = (userId) => {
|
|
|
2121
2344
|
* @summary Update user state
|
|
2122
2345
|
*/
|
|
2123
2346
|
const updateUserState = async (userId, upsertUserStateRequest, options) => {
|
|
2347
|
+
const getHeaders = (h) => {
|
|
2348
|
+
if (!h) return {};
|
|
2349
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2350
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2351
|
+
const headers = {};
|
|
2352
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2353
|
+
return headers;
|
|
2354
|
+
};
|
|
2124
2355
|
return customFetch(getUpdateUserStateUrl(userId), {
|
|
2125
2356
|
...options,
|
|
2126
2357
|
method: "PATCH",
|
|
2127
2358
|
headers: {
|
|
2128
2359
|
"Content-Type": "application/json",
|
|
2129
|
-
...options?.headers
|
|
2360
|
+
...getHeaders(options?.headers)
|
|
2130
2361
|
},
|
|
2131
2362
|
body: JSON.stringify(upsertUserStateRequest)
|
|
2132
2363
|
});
|
|
2133
2364
|
};
|
|
2365
|
+
const getUpdateUserStateMutationKey = () => ["updateUserState"];
|
|
2134
2366
|
const getUpdateUserStateMutationOptions = (options) => {
|
|
2135
|
-
const mutationKey =
|
|
2367
|
+
const mutationKey = getUpdateUserStateMutationKey();
|
|
2136
2368
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2137
2369
|
...options,
|
|
2138
2370
|
mutation: {
|
|
@@ -2171,8 +2403,9 @@ const unbanUser = async (userId, options) => {
|
|
|
2171
2403
|
method: "POST"
|
|
2172
2404
|
});
|
|
2173
2405
|
};
|
|
2406
|
+
const getUnbanUserMutationKey = () => ["unbanUser"];
|
|
2174
2407
|
const getUnbanUserMutationOptions = (options) => {
|
|
2175
|
-
const mutationKey =
|
|
2408
|
+
const mutationKey = getUnbanUserMutationKey();
|
|
2176
2409
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2177
2410
|
...options,
|
|
2178
2411
|
mutation: {
|
|
@@ -2201,11 +2434,20 @@ const useUnbanUser = (options, queryClient) => {
|
|
|
2201
2434
|
|
|
2202
2435
|
//#endregion
|
|
2203
2436
|
//#region src/gen/endpoints/admin-users/admin-users.ts
|
|
2437
|
+
/**
|
|
2438
|
+
* Generated by orval 🍺
|
|
2439
|
+
* Do not edit manually.
|
|
2440
|
+
* Authula API
|
|
2441
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
2442
|
+
* OpenAPI spec version: 0.1.0
|
|
2443
|
+
*/
|
|
2204
2444
|
var admin_users_exports = /* @__PURE__ */ __exportAll({
|
|
2205
2445
|
createUser: () => createUser,
|
|
2206
2446
|
deleteUser: () => deleteUser,
|
|
2447
|
+
getCreateUserMutationKey: () => getCreateUserMutationKey,
|
|
2207
2448
|
getCreateUserMutationOptions: () => getCreateUserMutationOptions,
|
|
2208
2449
|
getCreateUserUrl: () => getCreateUserUrl,
|
|
2450
|
+
getDeleteUserMutationKey: () => getDeleteUserMutationKey,
|
|
2209
2451
|
getDeleteUserMutationOptions: () => getDeleteUserMutationOptions,
|
|
2210
2452
|
getDeleteUserUrl: () => getDeleteUserUrl,
|
|
2211
2453
|
getGetUserQueryKey: () => getGetUserQueryKey,
|
|
@@ -2214,6 +2456,7 @@ var admin_users_exports = /* @__PURE__ */ __exportAll({
|
|
|
2214
2456
|
getListUsersQueryKey: () => getListUsersQueryKey,
|
|
2215
2457
|
getListUsersQueryOptions: () => getListUsersQueryOptions,
|
|
2216
2458
|
getListUsersUrl: () => getListUsersUrl,
|
|
2459
|
+
getUpdateUserMutationKey: () => getUpdateUserMutationKey,
|
|
2217
2460
|
getUpdateUserMutationOptions: () => getUpdateUserMutationOptions,
|
|
2218
2461
|
getUpdateUserUrl: () => getUpdateUserUrl,
|
|
2219
2462
|
getUser: () => getUser,
|
|
@@ -2287,18 +2530,27 @@ const getCreateUserUrl = () => {
|
|
|
2287
2530
|
* @summary Create user
|
|
2288
2531
|
*/
|
|
2289
2532
|
const createUser = async (createUserRequest, options) => {
|
|
2533
|
+
const getHeaders = (h) => {
|
|
2534
|
+
if (!h) return {};
|
|
2535
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2536
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2537
|
+
const headers = {};
|
|
2538
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2539
|
+
return headers;
|
|
2540
|
+
};
|
|
2290
2541
|
return customFetch(getCreateUserUrl(), {
|
|
2291
2542
|
...options,
|
|
2292
2543
|
method: "POST",
|
|
2293
2544
|
headers: {
|
|
2294
2545
|
"Content-Type": "application/json",
|
|
2295
|
-
...options?.headers
|
|
2546
|
+
...getHeaders(options?.headers)
|
|
2296
2547
|
},
|
|
2297
2548
|
body: JSON.stringify(createUserRequest)
|
|
2298
2549
|
});
|
|
2299
2550
|
};
|
|
2551
|
+
const getCreateUserMutationKey = () => ["createUser"];
|
|
2300
2552
|
const getCreateUserMutationOptions = (options) => {
|
|
2301
|
-
const mutationKey =
|
|
2553
|
+
const mutationKey = getCreateUserMutationKey();
|
|
2302
2554
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2303
2555
|
...options,
|
|
2304
2556
|
mutation: {
|
|
@@ -2375,8 +2627,9 @@ const deleteUser = async (userId, options) => {
|
|
|
2375
2627
|
method: "DELETE"
|
|
2376
2628
|
});
|
|
2377
2629
|
};
|
|
2630
|
+
const getDeleteUserMutationKey = () => ["deleteUser"];
|
|
2378
2631
|
const getDeleteUserMutationOptions = (options) => {
|
|
2379
|
-
const mutationKey =
|
|
2632
|
+
const mutationKey = getDeleteUserMutationKey();
|
|
2380
2633
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2381
2634
|
...options,
|
|
2382
2635
|
mutation: {
|
|
@@ -2410,18 +2663,27 @@ const getUpdateUserUrl = (userId) => {
|
|
|
2410
2663
|
* @summary Update user
|
|
2411
2664
|
*/
|
|
2412
2665
|
const updateUser = async (userId, updateUserRequest, options) => {
|
|
2666
|
+
const getHeaders = (h) => {
|
|
2667
|
+
if (!h) return {};
|
|
2668
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2669
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2670
|
+
const headers = {};
|
|
2671
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2672
|
+
return headers;
|
|
2673
|
+
};
|
|
2413
2674
|
return customFetch(getUpdateUserUrl(userId), {
|
|
2414
2675
|
...options,
|
|
2415
2676
|
method: "PATCH",
|
|
2416
2677
|
headers: {
|
|
2417
2678
|
"Content-Type": "application/json",
|
|
2418
|
-
...options?.headers
|
|
2679
|
+
...getHeaders(options?.headers)
|
|
2419
2680
|
},
|
|
2420
2681
|
body: JSON.stringify(updateUserRequest)
|
|
2421
2682
|
});
|
|
2422
2683
|
};
|
|
2684
|
+
const getUpdateUserMutationKey = () => ["updateUser"];
|
|
2423
2685
|
const getUpdateUserMutationOptions = (options) => {
|
|
2424
|
-
const mutationKey =
|
|
2686
|
+
const mutationKey = getUpdateUserMutationKey();
|
|
2425
2687
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2426
2688
|
...options,
|
|
2427
2689
|
mutation: {
|
|
@@ -2466,12 +2728,21 @@ var AdminPlugin = class {
|
|
|
2466
2728
|
|
|
2467
2729
|
//#endregion
|
|
2468
2730
|
//#region src/gen/endpoints/api-keys/api-keys.ts
|
|
2731
|
+
/**
|
|
2732
|
+
* Generated by orval 🍺
|
|
2733
|
+
* Do not edit manually.
|
|
2734
|
+
* Authula API
|
|
2735
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
2736
|
+
* OpenAPI spec version: 0.1.0
|
|
2737
|
+
*/
|
|
2469
2738
|
var api_keys_exports = /* @__PURE__ */ __exportAll({
|
|
2470
2739
|
createApiKey: () => createApiKey,
|
|
2471
2740
|
deleteApiKey: () => deleteApiKey,
|
|
2472
2741
|
getApiKey: () => getApiKey,
|
|
2742
|
+
getCreateApiKeyMutationKey: () => getCreateApiKeyMutationKey,
|
|
2473
2743
|
getCreateApiKeyMutationOptions: () => getCreateApiKeyMutationOptions,
|
|
2474
2744
|
getCreateApiKeyUrl: () => getCreateApiKeyUrl,
|
|
2745
|
+
getDeleteApiKeyMutationKey: () => getDeleteApiKeyMutationKey,
|
|
2475
2746
|
getDeleteApiKeyMutationOptions: () => getDeleteApiKeyMutationOptions,
|
|
2476
2747
|
getDeleteApiKeyUrl: () => getDeleteApiKeyUrl,
|
|
2477
2748
|
getGetApiKeyQueryKey: () => getGetApiKeyQueryKey,
|
|
@@ -2480,8 +2751,10 @@ var api_keys_exports = /* @__PURE__ */ __exportAll({
|
|
|
2480
2751
|
getListApiKeysQueryKey: () => getListApiKeysQueryKey,
|
|
2481
2752
|
getListApiKeysQueryOptions: () => getListApiKeysQueryOptions,
|
|
2482
2753
|
getListApiKeysUrl: () => getListApiKeysUrl,
|
|
2754
|
+
getUpdateApiKeyMutationKey: () => getUpdateApiKeyMutationKey,
|
|
2483
2755
|
getUpdateApiKeyMutationOptions: () => getUpdateApiKeyMutationOptions,
|
|
2484
2756
|
getUpdateApiKeyUrl: () => getUpdateApiKeyUrl,
|
|
2757
|
+
getVerifyApiKeyMutationKey: () => getVerifyApiKeyMutationKey,
|
|
2485
2758
|
getVerifyApiKeyMutationOptions: () => getVerifyApiKeyMutationOptions,
|
|
2486
2759
|
getVerifyApiKeyUrl: () => getVerifyApiKeyUrl,
|
|
2487
2760
|
listApiKeys: () => listApiKeys,
|
|
@@ -2556,18 +2829,27 @@ const getCreateApiKeyUrl = () => {
|
|
|
2556
2829
|
* @summary Create API key
|
|
2557
2830
|
*/
|
|
2558
2831
|
const createApiKey = async (createApiKeyRequest, options) => {
|
|
2832
|
+
const getHeaders = (h) => {
|
|
2833
|
+
if (!h) return {};
|
|
2834
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2835
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2836
|
+
const headers = {};
|
|
2837
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2838
|
+
return headers;
|
|
2839
|
+
};
|
|
2559
2840
|
return customFetch(getCreateApiKeyUrl(), {
|
|
2560
2841
|
...options,
|
|
2561
2842
|
method: "POST",
|
|
2562
2843
|
headers: {
|
|
2563
2844
|
"Content-Type": "application/json",
|
|
2564
|
-
...options?.headers
|
|
2845
|
+
...getHeaders(options?.headers)
|
|
2565
2846
|
},
|
|
2566
2847
|
body: JSON.stringify(createApiKeyRequest)
|
|
2567
2848
|
});
|
|
2568
2849
|
};
|
|
2850
|
+
const getCreateApiKeyMutationKey = () => ["createApiKey"];
|
|
2569
2851
|
const getCreateApiKeyMutationOptions = (options) => {
|
|
2570
|
-
const mutationKey =
|
|
2852
|
+
const mutationKey = getCreateApiKeyMutationKey();
|
|
2571
2853
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2572
2854
|
...options,
|
|
2573
2855
|
mutation: {
|
|
@@ -2601,18 +2883,27 @@ const getVerifyApiKeyUrl = () => {
|
|
|
2601
2883
|
* @summary Verify API key
|
|
2602
2884
|
*/
|
|
2603
2885
|
const verifyApiKey = async (verifyApiKeyRequest, options) => {
|
|
2886
|
+
const getHeaders = (h) => {
|
|
2887
|
+
if (!h) return {};
|
|
2888
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
2889
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
2890
|
+
const headers = {};
|
|
2891
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
2892
|
+
return headers;
|
|
2893
|
+
};
|
|
2604
2894
|
return customFetch(getVerifyApiKeyUrl(), {
|
|
2605
2895
|
...options,
|
|
2606
2896
|
method: "POST",
|
|
2607
2897
|
headers: {
|
|
2608
2898
|
"Content-Type": "application/json",
|
|
2609
|
-
...options?.headers
|
|
2899
|
+
...getHeaders(options?.headers)
|
|
2610
2900
|
},
|
|
2611
2901
|
body: JSON.stringify(verifyApiKeyRequest)
|
|
2612
2902
|
});
|
|
2613
2903
|
};
|
|
2904
|
+
const getVerifyApiKeyMutationKey = () => ["verifyApiKey"];
|
|
2614
2905
|
const getVerifyApiKeyMutationOptions = (options) => {
|
|
2615
|
-
const mutationKey =
|
|
2906
|
+
const mutationKey = getVerifyApiKeyMutationKey();
|
|
2616
2907
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2617
2908
|
...options,
|
|
2618
2909
|
mutation: {
|
|
@@ -2689,8 +2980,9 @@ const deleteApiKey = async (id, options) => {
|
|
|
2689
2980
|
method: "DELETE"
|
|
2690
2981
|
});
|
|
2691
2982
|
};
|
|
2983
|
+
const getDeleteApiKeyMutationKey = () => ["deleteApiKey"];
|
|
2692
2984
|
const getDeleteApiKeyMutationOptions = (options) => {
|
|
2693
|
-
const mutationKey =
|
|
2985
|
+
const mutationKey = getDeleteApiKeyMutationKey();
|
|
2694
2986
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2695
2987
|
...options,
|
|
2696
2988
|
mutation: {
|
|
@@ -2724,18 +3016,27 @@ const getUpdateApiKeyUrl = (id) => {
|
|
|
2724
3016
|
* @summary Update API key
|
|
2725
3017
|
*/
|
|
2726
3018
|
const updateApiKey = async (id, updateApiKeyRequest, options) => {
|
|
3019
|
+
const getHeaders = (h) => {
|
|
3020
|
+
if (!h) return {};
|
|
3021
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3022
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3023
|
+
const headers = {};
|
|
3024
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3025
|
+
return headers;
|
|
3026
|
+
};
|
|
2727
3027
|
return customFetch(getUpdateApiKeyUrl(id), {
|
|
2728
3028
|
...options,
|
|
2729
3029
|
method: "PATCH",
|
|
2730
3030
|
headers: {
|
|
2731
3031
|
"Content-Type": "application/json",
|
|
2732
|
-
...options?.headers
|
|
3032
|
+
...getHeaders(options?.headers)
|
|
2733
3033
|
},
|
|
2734
3034
|
body: JSON.stringify(updateApiKeyRequest)
|
|
2735
3035
|
});
|
|
2736
3036
|
};
|
|
3037
|
+
const getUpdateApiKeyMutationKey = () => ["updateApiKey"];
|
|
2737
3038
|
const getUpdateApiKeyMutationOptions = (options) => {
|
|
2738
|
-
const mutationKey =
|
|
3039
|
+
const mutationKey = getUpdateApiKeyMutationKey();
|
|
2739
3040
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2740
3041
|
...options,
|
|
2741
3042
|
mutation: {
|
|
@@ -2825,11 +3126,19 @@ var BearerPlugin = class {
|
|
|
2825
3126
|
|
|
2826
3127
|
//#endregion
|
|
2827
3128
|
//#region src/gen/endpoints/core/core.ts
|
|
3129
|
+
/**
|
|
3130
|
+
* Generated by orval 🍺
|
|
3131
|
+
* Do not edit manually.
|
|
3132
|
+
* Authula API
|
|
3133
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
3134
|
+
* OpenAPI spec version: 0.1.0
|
|
3135
|
+
*/
|
|
2828
3136
|
var core_exports = /* @__PURE__ */ __exportAll({
|
|
2829
3137
|
getGetMeQueryKey: () => getGetMeQueryKey,
|
|
2830
3138
|
getGetMeQueryOptions: () => getGetMeQueryOptions,
|
|
2831
3139
|
getGetMeUrl: () => getGetMeUrl,
|
|
2832
3140
|
getMe: () => getMe,
|
|
3141
|
+
getSignOutMutationKey: () => getSignOutMutationKey,
|
|
2833
3142
|
getSignOutMutationOptions: () => getSignOutMutationOptions,
|
|
2834
3143
|
getSignOutUrl: () => getSignOutUrl,
|
|
2835
3144
|
signOut: () => signOut,
|
|
@@ -2889,22 +3198,31 @@ const getSignOutUrl = () => {
|
|
|
2889
3198
|
return `/sign-out`;
|
|
2890
3199
|
};
|
|
2891
3200
|
/**
|
|
2892
|
-
* Signs out the authenticated user.
|
|
3201
|
+
* Signs out the authenticated user. With no body, revokes the session that authenticated the request (400 if the request carries no session id). Pass session_id to revoke one of your own sessions (404 if it does not exist, 403 if it belongs to another user), or sign_out_all to revoke every session.
|
|
2893
3202
|
* @summary Sign out
|
|
2894
3203
|
*/
|
|
2895
3204
|
const signOut = async (signOutRequest, options) => {
|
|
3205
|
+
const getHeaders = (h) => {
|
|
3206
|
+
if (!h) return {};
|
|
3207
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3208
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3209
|
+
const headers = {};
|
|
3210
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3211
|
+
return headers;
|
|
3212
|
+
};
|
|
2896
3213
|
return customFetch(getSignOutUrl(), {
|
|
2897
3214
|
...options,
|
|
2898
3215
|
method: "POST",
|
|
2899
3216
|
headers: {
|
|
2900
3217
|
"Content-Type": "application/json",
|
|
2901
|
-
...options?.headers
|
|
3218
|
+
...getHeaders(options?.headers)
|
|
2902
3219
|
},
|
|
2903
3220
|
body: JSON.stringify(signOutRequest)
|
|
2904
3221
|
});
|
|
2905
3222
|
};
|
|
3223
|
+
const getSignOutMutationKey = () => ["signOut"];
|
|
2906
3224
|
const getSignOutMutationOptions = (options) => {
|
|
2907
|
-
const mutationKey =
|
|
3225
|
+
const mutationKey = getSignOutMutationKey();
|
|
2908
3226
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
2909
3227
|
...options,
|
|
2910
3228
|
mutation: {
|
|
@@ -2967,18 +3285,31 @@ var CSRFPlugin = class {
|
|
|
2967
3285
|
|
|
2968
3286
|
//#endregion
|
|
2969
3287
|
//#region src/gen/endpoints/email-password-plugin/email-password-plugin.ts
|
|
3288
|
+
/**
|
|
3289
|
+
* Generated by orval 🍺
|
|
3290
|
+
* Do not edit manually.
|
|
3291
|
+
* Authula API
|
|
3292
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
3293
|
+
* OpenAPI spec version: 0.1.0
|
|
3294
|
+
*/
|
|
2970
3295
|
var email_password_plugin_exports = /* @__PURE__ */ __exportAll({
|
|
2971
3296
|
changePassword: () => changePassword,
|
|
3297
|
+
getChangePasswordMutationKey: () => getChangePasswordMutationKey,
|
|
2972
3298
|
getChangePasswordMutationOptions: () => getChangePasswordMutationOptions,
|
|
2973
3299
|
getChangePasswordUrl: () => getChangePasswordUrl,
|
|
3300
|
+
getRequestEmailChangeMutationKey: () => getRequestEmailChangeMutationKey,
|
|
2974
3301
|
getRequestEmailChangeMutationOptions: () => getRequestEmailChangeMutationOptions,
|
|
2975
3302
|
getRequestEmailChangeUrl: () => getRequestEmailChangeUrl,
|
|
3303
|
+
getRequestPasswordResetMutationKey: () => getRequestPasswordResetMutationKey,
|
|
2976
3304
|
getRequestPasswordResetMutationOptions: () => getRequestPasswordResetMutationOptions,
|
|
2977
3305
|
getRequestPasswordResetUrl: () => getRequestPasswordResetUrl,
|
|
3306
|
+
getSendEmailVerificationMutationKey: () => getSendEmailVerificationMutationKey,
|
|
2978
3307
|
getSendEmailVerificationMutationOptions: () => getSendEmailVerificationMutationOptions,
|
|
2979
3308
|
getSendEmailVerificationUrl: () => getSendEmailVerificationUrl,
|
|
3309
|
+
getSignInMutationKey: () => getSignInMutationKey,
|
|
2980
3310
|
getSignInMutationOptions: () => getSignInMutationOptions,
|
|
2981
3311
|
getSignInUrl: () => getSignInUrl,
|
|
3312
|
+
getSignUpMutationKey: () => getSignUpMutationKey,
|
|
2982
3313
|
getSignUpMutationOptions: () => getSignUpMutationOptions,
|
|
2983
3314
|
getSignUpUrl: () => getSignUpUrl,
|
|
2984
3315
|
getVerifyEmailQueryKey: () => getVerifyEmailQueryKey,
|
|
@@ -3018,18 +3349,27 @@ const getChangePasswordUrl = () => {
|
|
|
3018
3349
|
* @summary Change password
|
|
3019
3350
|
*/
|
|
3020
3351
|
const changePassword = async (changePasswordRequest, options) => {
|
|
3352
|
+
const getHeaders = (h) => {
|
|
3353
|
+
if (!h) return {};
|
|
3354
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3355
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3356
|
+
const headers = {};
|
|
3357
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3358
|
+
return headers;
|
|
3359
|
+
};
|
|
3021
3360
|
return customFetch(getChangePasswordUrl(), {
|
|
3022
3361
|
...options,
|
|
3023
3362
|
method: "POST",
|
|
3024
3363
|
headers: {
|
|
3025
3364
|
"Content-Type": "application/json",
|
|
3026
|
-
...options?.headers
|
|
3365
|
+
...getHeaders(options?.headers)
|
|
3027
3366
|
},
|
|
3028
3367
|
body: JSON.stringify(changePasswordRequest)
|
|
3029
3368
|
});
|
|
3030
3369
|
};
|
|
3370
|
+
const getChangePasswordMutationKey = () => ["changePassword"];
|
|
3031
3371
|
const getChangePasswordMutationOptions = (options) => {
|
|
3032
|
-
const mutationKey =
|
|
3372
|
+
const mutationKey = getChangePasswordMutationKey();
|
|
3033
3373
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3034
3374
|
...options,
|
|
3035
3375
|
mutation: {
|
|
@@ -3063,18 +3403,27 @@ const getRequestEmailChangeUrl = () => {
|
|
|
3063
3403
|
* @summary Request email change
|
|
3064
3404
|
*/
|
|
3065
3405
|
const requestEmailChange = async (requestEmailChangeRequest, options) => {
|
|
3406
|
+
const getHeaders = (h) => {
|
|
3407
|
+
if (!h) return {};
|
|
3408
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3409
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3410
|
+
const headers = {};
|
|
3411
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3412
|
+
return headers;
|
|
3413
|
+
};
|
|
3066
3414
|
return customFetch(getRequestEmailChangeUrl(), {
|
|
3067
3415
|
...options,
|
|
3068
3416
|
method: "POST",
|
|
3069
3417
|
headers: {
|
|
3070
3418
|
"Content-Type": "application/json",
|
|
3071
|
-
...options?.headers
|
|
3419
|
+
...getHeaders(options?.headers)
|
|
3072
3420
|
},
|
|
3073
3421
|
body: JSON.stringify(requestEmailChangeRequest)
|
|
3074
3422
|
});
|
|
3075
3423
|
};
|
|
3424
|
+
const getRequestEmailChangeMutationKey = () => ["requestEmailChange"];
|
|
3076
3425
|
const getRequestEmailChangeMutationOptions = (options) => {
|
|
3077
|
-
const mutationKey =
|
|
3426
|
+
const mutationKey = getRequestEmailChangeMutationKey();
|
|
3078
3427
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3079
3428
|
...options,
|
|
3080
3429
|
mutation: {
|
|
@@ -3108,18 +3457,27 @@ const getRequestPasswordResetUrl = () => {
|
|
|
3108
3457
|
* @summary Request password reset
|
|
3109
3458
|
*/
|
|
3110
3459
|
const requestPasswordReset = async (requestPasswordResetRequest, options) => {
|
|
3460
|
+
const getHeaders = (h) => {
|
|
3461
|
+
if (!h) return {};
|
|
3462
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3463
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3464
|
+
const headers = {};
|
|
3465
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3466
|
+
return headers;
|
|
3467
|
+
};
|
|
3111
3468
|
return customFetch(getRequestPasswordResetUrl(), {
|
|
3112
3469
|
...options,
|
|
3113
3470
|
method: "POST",
|
|
3114
3471
|
headers: {
|
|
3115
3472
|
"Content-Type": "application/json",
|
|
3116
|
-
...options?.headers
|
|
3473
|
+
...getHeaders(options?.headers)
|
|
3117
3474
|
},
|
|
3118
3475
|
body: JSON.stringify(requestPasswordResetRequest)
|
|
3119
3476
|
});
|
|
3120
3477
|
};
|
|
3478
|
+
const getRequestPasswordResetMutationKey = () => ["requestPasswordReset"];
|
|
3121
3479
|
const getRequestPasswordResetMutationOptions = (options) => {
|
|
3122
|
-
const mutationKey =
|
|
3480
|
+
const mutationKey = getRequestPasswordResetMutationKey();
|
|
3123
3481
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3124
3482
|
...options,
|
|
3125
3483
|
mutation: {
|
|
@@ -3153,18 +3511,27 @@ const getSendEmailVerificationUrl = () => {
|
|
|
3153
3511
|
* @summary Send email verification
|
|
3154
3512
|
*/
|
|
3155
3513
|
const sendEmailVerification = async (sendEmailVerificationRequest, options) => {
|
|
3514
|
+
const getHeaders = (h) => {
|
|
3515
|
+
if (!h) return {};
|
|
3516
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3517
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3518
|
+
const headers = {};
|
|
3519
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3520
|
+
return headers;
|
|
3521
|
+
};
|
|
3156
3522
|
return customFetch(getSendEmailVerificationUrl(), {
|
|
3157
3523
|
...options,
|
|
3158
3524
|
method: "POST",
|
|
3159
3525
|
headers: {
|
|
3160
3526
|
"Content-Type": "application/json",
|
|
3161
|
-
...options?.headers
|
|
3527
|
+
...getHeaders(options?.headers)
|
|
3162
3528
|
},
|
|
3163
3529
|
body: JSON.stringify(sendEmailVerificationRequest)
|
|
3164
3530
|
});
|
|
3165
3531
|
};
|
|
3532
|
+
const getSendEmailVerificationMutationKey = () => ["sendEmailVerification"];
|
|
3166
3533
|
const getSendEmailVerificationMutationOptions = (options) => {
|
|
3167
|
-
const mutationKey =
|
|
3534
|
+
const mutationKey = getSendEmailVerificationMutationKey();
|
|
3168
3535
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3169
3536
|
...options,
|
|
3170
3537
|
mutation: {
|
|
@@ -3198,18 +3565,27 @@ const getSignInUrl = () => {
|
|
|
3198
3565
|
* @summary Sign in
|
|
3199
3566
|
*/
|
|
3200
3567
|
const signIn = async (signInRequest, options) => {
|
|
3568
|
+
const getHeaders = (h) => {
|
|
3569
|
+
if (!h) return {};
|
|
3570
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3571
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3572
|
+
const headers = {};
|
|
3573
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3574
|
+
return headers;
|
|
3575
|
+
};
|
|
3201
3576
|
return customFetch(getSignInUrl(), {
|
|
3202
3577
|
...options,
|
|
3203
3578
|
method: "POST",
|
|
3204
3579
|
headers: {
|
|
3205
3580
|
"Content-Type": "application/json",
|
|
3206
|
-
...options?.headers
|
|
3581
|
+
...getHeaders(options?.headers)
|
|
3207
3582
|
},
|
|
3208
3583
|
body: JSON.stringify(signInRequest)
|
|
3209
3584
|
});
|
|
3210
3585
|
};
|
|
3586
|
+
const getSignInMutationKey = () => ["signIn"];
|
|
3211
3587
|
const getSignInMutationOptions = (options) => {
|
|
3212
|
-
const mutationKey =
|
|
3588
|
+
const mutationKey = getSignInMutationKey();
|
|
3213
3589
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3214
3590
|
...options,
|
|
3215
3591
|
mutation: {
|
|
@@ -3243,18 +3619,27 @@ const getSignUpUrl = () => {
|
|
|
3243
3619
|
* @summary Register new user
|
|
3244
3620
|
*/
|
|
3245
3621
|
const signUp = async (signUpRequest, options) => {
|
|
3622
|
+
const getHeaders = (h) => {
|
|
3623
|
+
if (!h) return {};
|
|
3624
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3625
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3626
|
+
const headers = {};
|
|
3627
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3628
|
+
return headers;
|
|
3629
|
+
};
|
|
3246
3630
|
return customFetch(getSignUpUrl(), {
|
|
3247
3631
|
...options,
|
|
3248
3632
|
method: "POST",
|
|
3249
3633
|
headers: {
|
|
3250
3634
|
"Content-Type": "application/json",
|
|
3251
|
-
...options?.headers
|
|
3635
|
+
...getHeaders(options?.headers)
|
|
3252
3636
|
},
|
|
3253
3637
|
body: JSON.stringify(signUpRequest)
|
|
3254
3638
|
});
|
|
3255
3639
|
};
|
|
3640
|
+
const getSignUpMutationKey = () => ["signUp"];
|
|
3256
3641
|
const getSignUpMutationOptions = (options) => {
|
|
3257
|
-
const mutationKey =
|
|
3642
|
+
const mutationKey = getSignUpMutationKey();
|
|
3258
3643
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3259
3644
|
...options,
|
|
3260
3645
|
mutation: {
|
|
@@ -3329,11 +3714,19 @@ var EmailPasswordPlugin = class {
|
|
|
3329
3714
|
|
|
3330
3715
|
//#endregion
|
|
3331
3716
|
//#region src/gen/endpoints/jwt-plugin/jwt-plugin.ts
|
|
3717
|
+
/**
|
|
3718
|
+
* Generated by orval 🍺
|
|
3719
|
+
* Do not edit manually.
|
|
3720
|
+
* Authula API
|
|
3721
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
3722
|
+
* OpenAPI spec version: 0.1.0
|
|
3723
|
+
*/
|
|
3332
3724
|
var jwt_plugin_exports = /* @__PURE__ */ __exportAll({
|
|
3333
3725
|
getGetJWKSQueryKey: () => getGetJWKSQueryKey,
|
|
3334
3726
|
getGetJWKSQueryOptions: () => getGetJWKSQueryOptions,
|
|
3335
3727
|
getGetJWKSUrl: () => getGetJWKSUrl,
|
|
3336
3728
|
getJWKS: () => getJWKS,
|
|
3729
|
+
getRefreshTokenMutationKey: () => getRefreshTokenMutationKey,
|
|
3337
3730
|
getRefreshTokenMutationOptions: () => getRefreshTokenMutationOptions,
|
|
3338
3731
|
getRefreshTokenUrl: () => getRefreshTokenUrl,
|
|
3339
3732
|
refreshToken: () => refreshToken,
|
|
@@ -3397,18 +3790,27 @@ const getRefreshTokenUrl = () => {
|
|
|
3397
3790
|
* @summary Refresh JWT token
|
|
3398
3791
|
*/
|
|
3399
3792
|
const refreshToken = async (refreshTokenRequest, options) => {
|
|
3793
|
+
const getHeaders = (h) => {
|
|
3794
|
+
if (!h) return {};
|
|
3795
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3796
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3797
|
+
const headers = {};
|
|
3798
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3799
|
+
return headers;
|
|
3800
|
+
};
|
|
3400
3801
|
return customFetch(getRefreshTokenUrl(), {
|
|
3401
3802
|
...options,
|
|
3402
3803
|
method: "POST",
|
|
3403
3804
|
headers: {
|
|
3404
3805
|
"Content-Type": "application/json",
|
|
3405
|
-
...options?.headers
|
|
3806
|
+
...getHeaders(options?.headers)
|
|
3406
3807
|
},
|
|
3407
3808
|
body: JSON.stringify(refreshTokenRequest)
|
|
3408
3809
|
});
|
|
3409
3810
|
};
|
|
3811
|
+
const getRefreshTokenMutationKey = () => ["refreshToken"];
|
|
3410
3812
|
const getRefreshTokenMutationOptions = (options) => {
|
|
3411
|
-
const mutationKey =
|
|
3813
|
+
const mutationKey = getRefreshTokenMutationKey();
|
|
3412
3814
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3413
3815
|
...options,
|
|
3414
3816
|
mutation: {
|
|
@@ -3447,10 +3849,19 @@ var JWTPlugin = class {
|
|
|
3447
3849
|
|
|
3448
3850
|
//#endregion
|
|
3449
3851
|
//#region src/gen/endpoints/magic-link-plugin/magic-link-plugin.ts
|
|
3852
|
+
/**
|
|
3853
|
+
* Generated by orval 🍺
|
|
3854
|
+
* Do not edit manually.
|
|
3855
|
+
* Authula API
|
|
3856
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
3857
|
+
* OpenAPI spec version: 0.1.0
|
|
3858
|
+
*/
|
|
3450
3859
|
var magic_link_plugin_exports = /* @__PURE__ */ __exportAll({
|
|
3451
3860
|
exchangeMagicLink: () => exchangeMagicLink,
|
|
3861
|
+
getExchangeMagicLinkMutationKey: () => getExchangeMagicLinkMutationKey,
|
|
3452
3862
|
getExchangeMagicLinkMutationOptions: () => getExchangeMagicLinkMutationOptions,
|
|
3453
3863
|
getExchangeMagicLinkUrl: () => getExchangeMagicLinkUrl,
|
|
3864
|
+
getSignInWithMagicLinkMutationKey: () => getSignInWithMagicLinkMutationKey,
|
|
3454
3865
|
getSignInWithMagicLinkMutationOptions: () => getSignInWithMagicLinkMutationOptions,
|
|
3455
3866
|
getSignInWithMagicLinkUrl: () => getSignInWithMagicLinkUrl,
|
|
3456
3867
|
getVerifyMagicLinkQueryKey: () => getVerifyMagicLinkQueryKey,
|
|
@@ -3482,18 +3893,27 @@ const getExchangeMagicLinkUrl = () => {
|
|
|
3482
3893
|
* @summary Exchange magic link token for session
|
|
3483
3894
|
*/
|
|
3484
3895
|
const exchangeMagicLink = async (magicLinkExchangeRequest, options) => {
|
|
3896
|
+
const getHeaders = (h) => {
|
|
3897
|
+
if (!h) return {};
|
|
3898
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3899
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3900
|
+
const headers = {};
|
|
3901
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3902
|
+
return headers;
|
|
3903
|
+
};
|
|
3485
3904
|
return customFetch(getExchangeMagicLinkUrl(), {
|
|
3486
3905
|
...options,
|
|
3487
3906
|
method: "POST",
|
|
3488
3907
|
headers: {
|
|
3489
3908
|
"Content-Type": "application/json",
|
|
3490
|
-
...options?.headers
|
|
3909
|
+
...getHeaders(options?.headers)
|
|
3491
3910
|
},
|
|
3492
3911
|
body: JSON.stringify(magicLinkExchangeRequest)
|
|
3493
3912
|
});
|
|
3494
3913
|
};
|
|
3914
|
+
const getExchangeMagicLinkMutationKey = () => ["exchangeMagicLink"];
|
|
3495
3915
|
const getExchangeMagicLinkMutationOptions = (options) => {
|
|
3496
|
-
const mutationKey =
|
|
3916
|
+
const mutationKey = getExchangeMagicLinkMutationKey();
|
|
3497
3917
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3498
3918
|
...options,
|
|
3499
3919
|
mutation: {
|
|
@@ -3527,18 +3947,27 @@ const getSignInWithMagicLinkUrl = () => {
|
|
|
3527
3947
|
* @summary Sign in with magic link
|
|
3528
3948
|
*/
|
|
3529
3949
|
const signInWithMagicLink = async (magicLinkSignInRequest, options) => {
|
|
3950
|
+
const getHeaders = (h) => {
|
|
3951
|
+
if (!h) return {};
|
|
3952
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
3953
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
3954
|
+
const headers = {};
|
|
3955
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
3956
|
+
return headers;
|
|
3957
|
+
};
|
|
3530
3958
|
return customFetch(getSignInWithMagicLinkUrl(), {
|
|
3531
3959
|
...options,
|
|
3532
3960
|
method: "POST",
|
|
3533
3961
|
headers: {
|
|
3534
3962
|
"Content-Type": "application/json",
|
|
3535
|
-
...options?.headers
|
|
3963
|
+
...getHeaders(options?.headers)
|
|
3536
3964
|
},
|
|
3537
3965
|
body: JSON.stringify(magicLinkSignInRequest)
|
|
3538
3966
|
});
|
|
3539
3967
|
};
|
|
3968
|
+
const getSignInWithMagicLinkMutationKey = () => ["signInWithMagicLink"];
|
|
3540
3969
|
const getSignInWithMagicLinkMutationOptions = (options) => {
|
|
3541
|
-
const mutationKey =
|
|
3970
|
+
const mutationKey = getSignInWithMagicLinkMutationKey();
|
|
3542
3971
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3543
3972
|
...options,
|
|
3544
3973
|
mutation: {
|
|
@@ -3619,6 +4048,13 @@ var MagicLinkPlugin = class {
|
|
|
3619
4048
|
|
|
3620
4049
|
//#endregion
|
|
3621
4050
|
//#region src/gen/endpoints/oauth2-plugin/oauth2-plugin.ts
|
|
4051
|
+
/**
|
|
4052
|
+
* Generated by orval 🍺
|
|
4053
|
+
* Do not edit manually.
|
|
4054
|
+
* Authula API
|
|
4055
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
4056
|
+
* OpenAPI spec version: 0.1.0
|
|
4057
|
+
*/
|
|
3622
4058
|
var oauth2_plugin_exports = /* @__PURE__ */ __exportAll({
|
|
3623
4059
|
getOauthAuthorizeQueryKey: () => getOauthAuthorizeQueryKey,
|
|
3624
4060
|
getOauthAuthorizeQueryOptions: () => getOauthAuthorizeQueryOptions,
|
|
@@ -3741,11 +4177,20 @@ var OAuth2Plugin = class {
|
|
|
3741
4177
|
|
|
3742
4178
|
//#endregion
|
|
3743
4179
|
//#region src/gen/endpoints/organizations/organizations.ts
|
|
4180
|
+
/**
|
|
4181
|
+
* Generated by orval 🍺
|
|
4182
|
+
* Do not edit manually.
|
|
4183
|
+
* Authula API
|
|
4184
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
4185
|
+
* OpenAPI spec version: 0.1.0
|
|
4186
|
+
*/
|
|
3744
4187
|
var organizations_exports = /* @__PURE__ */ __exportAll({
|
|
3745
4188
|
createOrganization: () => createOrganization,
|
|
3746
4189
|
deleteOrganization: () => deleteOrganization,
|
|
4190
|
+
getCreateOrganizationMutationKey: () => getCreateOrganizationMutationKey,
|
|
3747
4191
|
getCreateOrganizationMutationOptions: () => getCreateOrganizationMutationOptions,
|
|
3748
4192
|
getCreateOrganizationUrl: () => getCreateOrganizationUrl,
|
|
4193
|
+
getDeleteOrganizationMutationKey: () => getDeleteOrganizationMutationKey,
|
|
3749
4194
|
getDeleteOrganizationMutationOptions: () => getDeleteOrganizationMutationOptions,
|
|
3750
4195
|
getDeleteOrganizationUrl: () => getDeleteOrganizationUrl,
|
|
3751
4196
|
getGetOrganizationQueryKey: () => getGetOrganizationQueryKey,
|
|
@@ -3755,6 +4200,7 @@ var organizations_exports = /* @__PURE__ */ __exportAll({
|
|
|
3755
4200
|
getListOrganizationsQueryOptions: () => getListOrganizationsQueryOptions,
|
|
3756
4201
|
getListOrganizationsUrl: () => getListOrganizationsUrl,
|
|
3757
4202
|
getOrganization: () => getOrganization,
|
|
4203
|
+
getUpdateOrganizationMutationKey: () => getUpdateOrganizationMutationKey,
|
|
3758
4204
|
getUpdateOrganizationMutationOptions: () => getUpdateOrganizationMutationOptions,
|
|
3759
4205
|
getUpdateOrganizationUrl: () => getUpdateOrganizationUrl,
|
|
3760
4206
|
listOrganizations: () => listOrganizations,
|
|
@@ -3827,18 +4273,27 @@ const getCreateOrganizationUrl = () => {
|
|
|
3827
4273
|
* @summary Create organization
|
|
3828
4274
|
*/
|
|
3829
4275
|
const createOrganization = async (createOrganizationRequest, options) => {
|
|
4276
|
+
const getHeaders = (h) => {
|
|
4277
|
+
if (!h) return {};
|
|
4278
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4279
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
4280
|
+
const headers = {};
|
|
4281
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
4282
|
+
return headers;
|
|
4283
|
+
};
|
|
3830
4284
|
return customFetch(getCreateOrganizationUrl(), {
|
|
3831
4285
|
...options,
|
|
3832
4286
|
method: "POST",
|
|
3833
4287
|
headers: {
|
|
3834
4288
|
"Content-Type": "application/json",
|
|
3835
|
-
...options?.headers
|
|
4289
|
+
...getHeaders(options?.headers)
|
|
3836
4290
|
},
|
|
3837
4291
|
body: JSON.stringify(createOrganizationRequest)
|
|
3838
4292
|
});
|
|
3839
4293
|
};
|
|
4294
|
+
const getCreateOrganizationMutationKey = () => ["createOrganization"];
|
|
3840
4295
|
const getCreateOrganizationMutationOptions = (options) => {
|
|
3841
|
-
const mutationKey =
|
|
4296
|
+
const mutationKey = getCreateOrganizationMutationKey();
|
|
3842
4297
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3843
4298
|
...options,
|
|
3844
4299
|
mutation: {
|
|
@@ -3915,8 +4370,9 @@ const deleteOrganization = async (organizationId, options) => {
|
|
|
3915
4370
|
method: "DELETE"
|
|
3916
4371
|
});
|
|
3917
4372
|
};
|
|
4373
|
+
const getDeleteOrganizationMutationKey = () => ["deleteOrganization"];
|
|
3918
4374
|
const getDeleteOrganizationMutationOptions = (options) => {
|
|
3919
|
-
const mutationKey =
|
|
4375
|
+
const mutationKey = getDeleteOrganizationMutationKey();
|
|
3920
4376
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3921
4377
|
...options,
|
|
3922
4378
|
mutation: {
|
|
@@ -3950,18 +4406,27 @@ const getUpdateOrganizationUrl = (organizationId) => {
|
|
|
3950
4406
|
* @summary Update organization
|
|
3951
4407
|
*/
|
|
3952
4408
|
const updateOrganization = async (organizationId, updateOrganizationRequest, options) => {
|
|
4409
|
+
const getHeaders = (h) => {
|
|
4410
|
+
if (!h) return {};
|
|
4411
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4412
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
4413
|
+
const headers = {};
|
|
4414
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
4415
|
+
return headers;
|
|
4416
|
+
};
|
|
3953
4417
|
return customFetch(getUpdateOrganizationUrl(organizationId), {
|
|
3954
4418
|
...options,
|
|
3955
4419
|
method: "PATCH",
|
|
3956
4420
|
headers: {
|
|
3957
4421
|
"Content-Type": "application/json",
|
|
3958
|
-
...options?.headers
|
|
4422
|
+
...getHeaders(options?.headers)
|
|
3959
4423
|
},
|
|
3960
4424
|
body: JSON.stringify(updateOrganizationRequest)
|
|
3961
4425
|
});
|
|
3962
4426
|
};
|
|
4427
|
+
const getUpdateOrganizationMutationKey = () => ["updateOrganization"];
|
|
3963
4428
|
const getUpdateOrganizationMutationOptions = (options) => {
|
|
3964
|
-
const mutationKey =
|
|
4429
|
+
const mutationKey = getUpdateOrganizationMutationKey();
|
|
3965
4430
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
3966
4431
|
...options,
|
|
3967
4432
|
mutation: {
|
|
@@ -3990,11 +4455,20 @@ const useUpdateOrganization = (options, queryClient) => {
|
|
|
3990
4455
|
|
|
3991
4456
|
//#endregion
|
|
3992
4457
|
//#region src/gen/endpoints/organization-invitations/organization-invitations.ts
|
|
4458
|
+
/**
|
|
4459
|
+
* Generated by orval 🍺
|
|
4460
|
+
* Do not edit manually.
|
|
4461
|
+
* Authula API
|
|
4462
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
4463
|
+
* OpenAPI spec version: 0.1.0
|
|
4464
|
+
*/
|
|
3993
4465
|
var organization_invitations_exports = /* @__PURE__ */ __exportAll({
|
|
3994
4466
|
acceptOrganizationInvitation: () => acceptOrganizationInvitation,
|
|
3995
4467
|
createOrganizationInvitation: () => createOrganizationInvitation,
|
|
4468
|
+
getAcceptOrganizationInvitationMutationKey: () => getAcceptOrganizationInvitationMutationKey,
|
|
3996
4469
|
getAcceptOrganizationInvitationMutationOptions: () => getAcceptOrganizationInvitationMutationOptions,
|
|
3997
4470
|
getAcceptOrganizationInvitationUrl: () => getAcceptOrganizationInvitationUrl,
|
|
4471
|
+
getCreateOrganizationInvitationMutationKey: () => getCreateOrganizationInvitationMutationKey,
|
|
3998
4472
|
getCreateOrganizationInvitationMutationOptions: () => getCreateOrganizationInvitationMutationOptions,
|
|
3999
4473
|
getCreateOrganizationInvitationUrl: () => getCreateOrganizationInvitationUrl,
|
|
4000
4474
|
getGetOrganizationInvitationQueryKey: () => getGetOrganizationInvitationQueryKey,
|
|
@@ -4004,8 +4478,10 @@ var organization_invitations_exports = /* @__PURE__ */ __exportAll({
|
|
|
4004
4478
|
getListOrganizationInvitationsQueryOptions: () => getListOrganizationInvitationsQueryOptions,
|
|
4005
4479
|
getListOrganizationInvitationsUrl: () => getListOrganizationInvitationsUrl,
|
|
4006
4480
|
getOrganizationInvitation: () => getOrganizationInvitation,
|
|
4481
|
+
getRejectOrganizationInvitationMutationKey: () => getRejectOrganizationInvitationMutationKey,
|
|
4007
4482
|
getRejectOrganizationInvitationMutationOptions: () => getRejectOrganizationInvitationMutationOptions,
|
|
4008
4483
|
getRejectOrganizationInvitationUrl: () => getRejectOrganizationInvitationUrl,
|
|
4484
|
+
getRevokeOrganizationInvitationMutationKey: () => getRevokeOrganizationInvitationMutationKey,
|
|
4009
4485
|
getRevokeOrganizationInvitationMutationOptions: () => getRevokeOrganizationInvitationMutationOptions,
|
|
4010
4486
|
getRevokeOrganizationInvitationUrl: () => getRevokeOrganizationInvitationUrl,
|
|
4011
4487
|
listOrganizationInvitations: () => listOrganizationInvitations,
|
|
@@ -4086,18 +4562,27 @@ const getCreateOrganizationInvitationUrl = (organizationId, params) => {
|
|
|
4086
4562
|
* @summary Create invitation
|
|
4087
4563
|
*/
|
|
4088
4564
|
const createOrganizationInvitation = async (organizationId, createOrganizationInvitationRequest, params, options) => {
|
|
4565
|
+
const getHeaders = (h) => {
|
|
4566
|
+
if (!h) return {};
|
|
4567
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4568
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
4569
|
+
const headers = {};
|
|
4570
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
4571
|
+
return headers;
|
|
4572
|
+
};
|
|
4089
4573
|
return customFetch(getCreateOrganizationInvitationUrl(organizationId, params), {
|
|
4090
4574
|
...options,
|
|
4091
4575
|
method: "POST",
|
|
4092
4576
|
headers: {
|
|
4093
4577
|
"Content-Type": "application/json",
|
|
4094
|
-
...options?.headers
|
|
4578
|
+
...getHeaders(options?.headers)
|
|
4095
4579
|
},
|
|
4096
4580
|
body: JSON.stringify(createOrganizationInvitationRequest)
|
|
4097
4581
|
});
|
|
4098
4582
|
};
|
|
4583
|
+
const getCreateOrganizationInvitationMutationKey = () => ["createOrganizationInvitation"];
|
|
4099
4584
|
const getCreateOrganizationInvitationMutationOptions = (options) => {
|
|
4100
|
-
const mutationKey =
|
|
4585
|
+
const mutationKey = getCreateOrganizationInvitationMutationKey();
|
|
4101
4586
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4102
4587
|
...options,
|
|
4103
4588
|
mutation: {
|
|
@@ -4174,18 +4659,27 @@ const getAcceptOrganizationInvitationUrl = (organizationId, invitationId, params
|
|
|
4174
4659
|
* @summary Accept invitation
|
|
4175
4660
|
*/
|
|
4176
4661
|
const acceptOrganizationInvitation = async (organizationId, invitationId, acceptOrganizationInvitationQuery, params, options) => {
|
|
4662
|
+
const getHeaders = (h) => {
|
|
4663
|
+
if (!h) return {};
|
|
4664
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4665
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
4666
|
+
const headers = {};
|
|
4667
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
4668
|
+
return headers;
|
|
4669
|
+
};
|
|
4177
4670
|
return customFetch(getAcceptOrganizationInvitationUrl(organizationId, invitationId, params), {
|
|
4178
4671
|
...options,
|
|
4179
4672
|
method: "PATCH",
|
|
4180
4673
|
headers: {
|
|
4181
4674
|
"Content-Type": "application/json",
|
|
4182
|
-
...options?.headers
|
|
4675
|
+
...getHeaders(options?.headers)
|
|
4183
4676
|
},
|
|
4184
4677
|
body: JSON.stringify(acceptOrganizationInvitationQuery)
|
|
4185
4678
|
});
|
|
4186
4679
|
};
|
|
4680
|
+
const getAcceptOrganizationInvitationMutationKey = () => ["acceptOrganizationInvitation"];
|
|
4187
4681
|
const getAcceptOrganizationInvitationMutationOptions = (options) => {
|
|
4188
|
-
const mutationKey =
|
|
4682
|
+
const mutationKey = getAcceptOrganizationInvitationMutationKey();
|
|
4189
4683
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4190
4684
|
...options,
|
|
4191
4685
|
mutation: {
|
|
@@ -4224,8 +4718,9 @@ const rejectOrganizationInvitation = async (organizationId, invitationId, option
|
|
|
4224
4718
|
method: "PATCH"
|
|
4225
4719
|
});
|
|
4226
4720
|
};
|
|
4721
|
+
const getRejectOrganizationInvitationMutationKey = () => ["rejectOrganizationInvitation"];
|
|
4227
4722
|
const getRejectOrganizationInvitationMutationOptions = (options) => {
|
|
4228
|
-
const mutationKey =
|
|
4723
|
+
const mutationKey = getRejectOrganizationInvitationMutationKey();
|
|
4229
4724
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4230
4725
|
...options,
|
|
4231
4726
|
mutation: {
|
|
@@ -4264,8 +4759,9 @@ const revokeOrganizationInvitation = async (organizationId, invitationId, option
|
|
|
4264
4759
|
method: "PATCH"
|
|
4265
4760
|
});
|
|
4266
4761
|
};
|
|
4762
|
+
const getRevokeOrganizationInvitationMutationKey = () => ["revokeOrganizationInvitation"];
|
|
4267
4763
|
const getRevokeOrganizationInvitationMutationOptions = (options) => {
|
|
4268
|
-
const mutationKey =
|
|
4764
|
+
const mutationKey = getRevokeOrganizationInvitationMutationKey();
|
|
4269
4765
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4270
4766
|
...options,
|
|
4271
4767
|
mutation: {
|
|
@@ -4294,11 +4790,20 @@ const useRevokeOrganizationInvitation = (options, queryClient) => {
|
|
|
4294
4790
|
|
|
4295
4791
|
//#endregion
|
|
4296
4792
|
//#region src/gen/endpoints/organization-members/organization-members.ts
|
|
4793
|
+
/**
|
|
4794
|
+
* Generated by orval 🍺
|
|
4795
|
+
* Do not edit manually.
|
|
4796
|
+
* Authula API
|
|
4797
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
4798
|
+
* OpenAPI spec version: 0.1.0
|
|
4799
|
+
*/
|
|
4297
4800
|
var organization_members_exports = /* @__PURE__ */ __exportAll({
|
|
4298
4801
|
addOrganizationMember: () => addOrganizationMember,
|
|
4299
4802
|
deleteOrganizationMember: () => deleteOrganizationMember,
|
|
4803
|
+
getAddOrganizationMemberMutationKey: () => getAddOrganizationMemberMutationKey,
|
|
4300
4804
|
getAddOrganizationMemberMutationOptions: () => getAddOrganizationMemberMutationOptions,
|
|
4301
4805
|
getAddOrganizationMemberUrl: () => getAddOrganizationMemberUrl,
|
|
4806
|
+
getDeleteOrganizationMemberMutationKey: () => getDeleteOrganizationMemberMutationKey,
|
|
4302
4807
|
getDeleteOrganizationMemberMutationOptions: () => getDeleteOrganizationMemberMutationOptions,
|
|
4303
4808
|
getDeleteOrganizationMemberUrl: () => getDeleteOrganizationMemberUrl,
|
|
4304
4809
|
getGetOrganizationMemberByUserIDQueryKey: () => getGetOrganizationMemberByUserIDQueryKey,
|
|
@@ -4312,6 +4817,7 @@ var organization_members_exports = /* @__PURE__ */ __exportAll({
|
|
|
4312
4817
|
getListOrganizationMembersUrl: () => getListOrganizationMembersUrl,
|
|
4313
4818
|
getOrganizationMember: () => getOrganizationMember,
|
|
4314
4819
|
getOrganizationMemberByUserID: () => getOrganizationMemberByUserID,
|
|
4820
|
+
getUpdateOrganizationMemberMutationKey: () => getUpdateOrganizationMemberMutationKey,
|
|
4315
4821
|
getUpdateOrganizationMemberMutationOptions: () => getUpdateOrganizationMemberMutationOptions,
|
|
4316
4822
|
getUpdateOrganizationMemberUrl: () => getUpdateOrganizationMemberUrl,
|
|
4317
4823
|
listOrganizationMembers: () => listOrganizationMembers,
|
|
@@ -4386,18 +4892,27 @@ const getAddOrganizationMemberUrl = (organizationId) => {
|
|
|
4386
4892
|
* @summary Add member
|
|
4387
4893
|
*/
|
|
4388
4894
|
const addOrganizationMember = async (organizationId, addOrganizationMemberRequest, options) => {
|
|
4895
|
+
const getHeaders = (h) => {
|
|
4896
|
+
if (!h) return {};
|
|
4897
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
4898
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
4899
|
+
const headers = {};
|
|
4900
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
4901
|
+
return headers;
|
|
4902
|
+
};
|
|
4389
4903
|
return customFetch(getAddOrganizationMemberUrl(organizationId), {
|
|
4390
4904
|
...options,
|
|
4391
4905
|
method: "POST",
|
|
4392
4906
|
headers: {
|
|
4393
4907
|
"Content-Type": "application/json",
|
|
4394
|
-
...options?.headers
|
|
4908
|
+
...getHeaders(options?.headers)
|
|
4395
4909
|
},
|
|
4396
4910
|
body: JSON.stringify(addOrganizationMemberRequest)
|
|
4397
4911
|
});
|
|
4398
4912
|
};
|
|
4913
|
+
const getAddOrganizationMemberMutationKey = () => ["addOrganizationMember"];
|
|
4399
4914
|
const getAddOrganizationMemberMutationOptions = (options) => {
|
|
4400
|
-
const mutationKey =
|
|
4915
|
+
const mutationKey = getAddOrganizationMemberMutationKey();
|
|
4401
4916
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4402
4917
|
...options,
|
|
4403
4918
|
mutation: {
|
|
@@ -4512,8 +5027,9 @@ const deleteOrganizationMember = async (organizationId, memberId, options) => {
|
|
|
4512
5027
|
method: "DELETE"
|
|
4513
5028
|
});
|
|
4514
5029
|
};
|
|
5030
|
+
const getDeleteOrganizationMemberMutationKey = () => ["deleteOrganizationMember"];
|
|
4515
5031
|
const getDeleteOrganizationMemberMutationOptions = (options) => {
|
|
4516
|
-
const mutationKey =
|
|
5032
|
+
const mutationKey = getDeleteOrganizationMemberMutationKey();
|
|
4517
5033
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4518
5034
|
...options,
|
|
4519
5035
|
mutation: {
|
|
@@ -4547,18 +5063,27 @@ const getUpdateOrganizationMemberUrl = (organizationId, memberId) => {
|
|
|
4547
5063
|
* @summary Update member
|
|
4548
5064
|
*/
|
|
4549
5065
|
const updateOrganizationMember = async (organizationId, memberId, updateOrganizationMemberRequest, options) => {
|
|
5066
|
+
const getHeaders = (h) => {
|
|
5067
|
+
if (!h) return {};
|
|
5068
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5069
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5070
|
+
const headers = {};
|
|
5071
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5072
|
+
return headers;
|
|
5073
|
+
};
|
|
4550
5074
|
return customFetch(getUpdateOrganizationMemberUrl(organizationId, memberId), {
|
|
4551
5075
|
...options,
|
|
4552
5076
|
method: "PATCH",
|
|
4553
5077
|
headers: {
|
|
4554
5078
|
"Content-Type": "application/json",
|
|
4555
|
-
...options?.headers
|
|
5079
|
+
...getHeaders(options?.headers)
|
|
4556
5080
|
},
|
|
4557
5081
|
body: JSON.stringify(updateOrganizationMemberRequest)
|
|
4558
5082
|
});
|
|
4559
5083
|
};
|
|
5084
|
+
const getUpdateOrganizationMemberMutationKey = () => ["updateOrganizationMember"];
|
|
4560
5085
|
const getUpdateOrganizationMemberMutationOptions = (options) => {
|
|
4561
|
-
const mutationKey =
|
|
5086
|
+
const mutationKey = getUpdateOrganizationMemberMutationKey();
|
|
4562
5087
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4563
5088
|
...options,
|
|
4564
5089
|
mutation: {
|
|
@@ -4587,11 +5112,20 @@ const useUpdateOrganizationMember = (options, queryClient) => {
|
|
|
4587
5112
|
|
|
4588
5113
|
//#endregion
|
|
4589
5114
|
//#region src/gen/endpoints/organization-teams/organization-teams.ts
|
|
5115
|
+
/**
|
|
5116
|
+
* Generated by orval 🍺
|
|
5117
|
+
* Do not edit manually.
|
|
5118
|
+
* Authula API
|
|
5119
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
5120
|
+
* OpenAPI spec version: 0.1.0
|
|
5121
|
+
*/
|
|
4590
5122
|
var organization_teams_exports = /* @__PURE__ */ __exportAll({
|
|
4591
5123
|
createOrganizationTeam: () => createOrganizationTeam,
|
|
4592
5124
|
deleteOrganizationTeam: () => deleteOrganizationTeam,
|
|
5125
|
+
getCreateOrganizationTeamMutationKey: () => getCreateOrganizationTeamMutationKey,
|
|
4593
5126
|
getCreateOrganizationTeamMutationOptions: () => getCreateOrganizationTeamMutationOptions,
|
|
4594
5127
|
getCreateOrganizationTeamUrl: () => getCreateOrganizationTeamUrl,
|
|
5128
|
+
getDeleteOrganizationTeamMutationKey: () => getDeleteOrganizationTeamMutationKey,
|
|
4595
5129
|
getDeleteOrganizationTeamMutationOptions: () => getDeleteOrganizationTeamMutationOptions,
|
|
4596
5130
|
getDeleteOrganizationTeamUrl: () => getDeleteOrganizationTeamUrl,
|
|
4597
5131
|
getGetOrganizationTeamQueryKey: () => getGetOrganizationTeamQueryKey,
|
|
@@ -4601,6 +5135,7 @@ var organization_teams_exports = /* @__PURE__ */ __exportAll({
|
|
|
4601
5135
|
getListOrganizationTeamsQueryOptions: () => getListOrganizationTeamsQueryOptions,
|
|
4602
5136
|
getListOrganizationTeamsUrl: () => getListOrganizationTeamsUrl,
|
|
4603
5137
|
getOrganizationTeam: () => getOrganizationTeam,
|
|
5138
|
+
getUpdateOrganizationTeamMutationKey: () => getUpdateOrganizationTeamMutationKey,
|
|
4604
5139
|
getUpdateOrganizationTeamMutationOptions: () => getUpdateOrganizationTeamMutationOptions,
|
|
4605
5140
|
getUpdateOrganizationTeamUrl: () => getUpdateOrganizationTeamUrl,
|
|
4606
5141
|
listOrganizationTeams: () => listOrganizationTeams,
|
|
@@ -4674,18 +5209,27 @@ const getCreateOrganizationTeamUrl = (organizationId) => {
|
|
|
4674
5209
|
* @summary Create team
|
|
4675
5210
|
*/
|
|
4676
5211
|
const createOrganizationTeam = async (organizationId, createOrganizationTeamRequest, options) => {
|
|
5212
|
+
const getHeaders = (h) => {
|
|
5213
|
+
if (!h) return {};
|
|
5214
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5215
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5216
|
+
const headers = {};
|
|
5217
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5218
|
+
return headers;
|
|
5219
|
+
};
|
|
4677
5220
|
return customFetch(getCreateOrganizationTeamUrl(organizationId), {
|
|
4678
5221
|
...options,
|
|
4679
5222
|
method: "POST",
|
|
4680
5223
|
headers: {
|
|
4681
5224
|
"Content-Type": "application/json",
|
|
4682
|
-
...options?.headers
|
|
5225
|
+
...getHeaders(options?.headers)
|
|
4683
5226
|
},
|
|
4684
5227
|
body: JSON.stringify(createOrganizationTeamRequest)
|
|
4685
5228
|
});
|
|
4686
5229
|
};
|
|
5230
|
+
const getCreateOrganizationTeamMutationKey = () => ["createOrganizationTeam"];
|
|
4687
5231
|
const getCreateOrganizationTeamMutationOptions = (options) => {
|
|
4688
|
-
const mutationKey =
|
|
5232
|
+
const mutationKey = getCreateOrganizationTeamMutationKey();
|
|
4689
5233
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4690
5234
|
...options,
|
|
4691
5235
|
mutation: {
|
|
@@ -4762,8 +5306,9 @@ const deleteOrganizationTeam = async (organizationId, teamId, options) => {
|
|
|
4762
5306
|
method: "DELETE"
|
|
4763
5307
|
});
|
|
4764
5308
|
};
|
|
5309
|
+
const getDeleteOrganizationTeamMutationKey = () => ["deleteOrganizationTeam"];
|
|
4765
5310
|
const getDeleteOrganizationTeamMutationOptions = (options) => {
|
|
4766
|
-
const mutationKey =
|
|
5311
|
+
const mutationKey = getDeleteOrganizationTeamMutationKey();
|
|
4767
5312
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4768
5313
|
...options,
|
|
4769
5314
|
mutation: {
|
|
@@ -4797,18 +5342,27 @@ const getUpdateOrganizationTeamUrl = (organizationId, teamId) => {
|
|
|
4797
5342
|
* @summary Update team
|
|
4798
5343
|
*/
|
|
4799
5344
|
const updateOrganizationTeam = async (organizationId, teamId, updateOrganizationTeamRequest, options) => {
|
|
5345
|
+
const getHeaders = (h) => {
|
|
5346
|
+
if (!h) return {};
|
|
5347
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5348
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5349
|
+
const headers = {};
|
|
5350
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5351
|
+
return headers;
|
|
5352
|
+
};
|
|
4800
5353
|
return customFetch(getUpdateOrganizationTeamUrl(organizationId, teamId), {
|
|
4801
5354
|
...options,
|
|
4802
5355
|
method: "PATCH",
|
|
4803
5356
|
headers: {
|
|
4804
5357
|
"Content-Type": "application/json",
|
|
4805
|
-
...options?.headers
|
|
5358
|
+
...getHeaders(options?.headers)
|
|
4806
5359
|
},
|
|
4807
5360
|
body: JSON.stringify(updateOrganizationTeamRequest)
|
|
4808
5361
|
});
|
|
4809
5362
|
};
|
|
5363
|
+
const getUpdateOrganizationTeamMutationKey = () => ["updateOrganizationTeam"];
|
|
4810
5364
|
const getUpdateOrganizationTeamMutationOptions = (options) => {
|
|
4811
|
-
const mutationKey =
|
|
5365
|
+
const mutationKey = getUpdateOrganizationTeamMutationKey();
|
|
4812
5366
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4813
5367
|
...options,
|
|
4814
5368
|
mutation: {
|
|
@@ -4837,11 +5391,20 @@ const useUpdateOrganizationTeam = (options, queryClient) => {
|
|
|
4837
5391
|
|
|
4838
5392
|
//#endregion
|
|
4839
5393
|
//#region src/gen/endpoints/organization-team-members/organization-team-members.ts
|
|
5394
|
+
/**
|
|
5395
|
+
* Generated by orval 🍺
|
|
5396
|
+
* Do not edit manually.
|
|
5397
|
+
* Authula API
|
|
5398
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
5399
|
+
* OpenAPI spec version: 0.1.0
|
|
5400
|
+
*/
|
|
4840
5401
|
var organization_team_members_exports = /* @__PURE__ */ __exportAll({
|
|
4841
5402
|
addOrganizationTeamMember: () => addOrganizationTeamMember,
|
|
4842
5403
|
deleteOrganizationTeamMember: () => deleteOrganizationTeamMember,
|
|
5404
|
+
getAddOrganizationTeamMemberMutationKey: () => getAddOrganizationTeamMemberMutationKey,
|
|
4843
5405
|
getAddOrganizationTeamMemberMutationOptions: () => getAddOrganizationTeamMemberMutationOptions,
|
|
4844
5406
|
getAddOrganizationTeamMemberUrl: () => getAddOrganizationTeamMemberUrl,
|
|
5407
|
+
getDeleteOrganizationTeamMemberMutationKey: () => getDeleteOrganizationTeamMemberMutationKey,
|
|
4845
5408
|
getDeleteOrganizationTeamMemberMutationOptions: () => getDeleteOrganizationTeamMemberMutationOptions,
|
|
4846
5409
|
getDeleteOrganizationTeamMemberUrl: () => getDeleteOrganizationTeamMemberUrl,
|
|
4847
5410
|
getGetOrganizationTeamMemberQueryKey: () => getGetOrganizationTeamMemberQueryKey,
|
|
@@ -4920,18 +5483,27 @@ const getAddOrganizationTeamMemberUrl = (organizationId, teamId) => {
|
|
|
4920
5483
|
* @summary Add team member
|
|
4921
5484
|
*/
|
|
4922
5485
|
const addOrganizationTeamMember = async (organizationId, teamId, addOrganizationTeamMemberRequest, options) => {
|
|
5486
|
+
const getHeaders = (h) => {
|
|
5487
|
+
if (!h) return {};
|
|
5488
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5489
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5490
|
+
const headers = {};
|
|
5491
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5492
|
+
return headers;
|
|
5493
|
+
};
|
|
4923
5494
|
return customFetch(getAddOrganizationTeamMemberUrl(organizationId, teamId), {
|
|
4924
5495
|
...options,
|
|
4925
5496
|
method: "POST",
|
|
4926
5497
|
headers: {
|
|
4927
5498
|
"Content-Type": "application/json",
|
|
4928
|
-
...options?.headers
|
|
5499
|
+
...getHeaders(options?.headers)
|
|
4929
5500
|
},
|
|
4930
5501
|
body: JSON.stringify(addOrganizationTeamMemberRequest)
|
|
4931
5502
|
});
|
|
4932
5503
|
};
|
|
5504
|
+
const getAddOrganizationTeamMemberMutationKey = () => ["addOrganizationTeamMember"];
|
|
4933
5505
|
const getAddOrganizationTeamMemberMutationOptions = (options) => {
|
|
4934
|
-
const mutationKey =
|
|
5506
|
+
const mutationKey = getAddOrganizationTeamMemberMutationKey();
|
|
4935
5507
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
4936
5508
|
...options,
|
|
4937
5509
|
mutation: {
|
|
@@ -5008,8 +5580,9 @@ const deleteOrganizationTeamMember = async (organizationId, teamId, memberId, op
|
|
|
5008
5580
|
method: "DELETE"
|
|
5009
5581
|
});
|
|
5010
5582
|
};
|
|
5583
|
+
const getDeleteOrganizationTeamMemberMutationKey = () => ["deleteOrganizationTeamMember"];
|
|
5011
5584
|
const getDeleteOrganizationTeamMemberMutationOptions = (options) => {
|
|
5012
|
-
const mutationKey =
|
|
5585
|
+
const mutationKey = getDeleteOrganizationTeamMemberMutationKey();
|
|
5013
5586
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5014
5587
|
...options,
|
|
5015
5588
|
mutation: {
|
|
@@ -5053,22 +5626,34 @@ var OrganizationsPlugin = class {
|
|
|
5053
5626
|
|
|
5054
5627
|
//#endregion
|
|
5055
5628
|
//#region src/gen/endpoints/totp-plugin/totp-plugin.ts
|
|
5629
|
+
/**
|
|
5630
|
+
* Generated by orval 🍺
|
|
5631
|
+
* Do not edit manually.
|
|
5632
|
+
* Authula API
|
|
5633
|
+
* Authula API - An open-source authentication solution that scales with you.
|
|
5634
|
+
* OpenAPI spec version: 0.1.0
|
|
5635
|
+
*/
|
|
5056
5636
|
var totp_plugin_exports = /* @__PURE__ */ __exportAll({
|
|
5057
5637
|
disableTotp: () => disableTotp,
|
|
5058
5638
|
enableTotp: () => enableTotp,
|
|
5059
5639
|
generateTotpBackupCodes: () => generateTotpBackupCodes,
|
|
5640
|
+
getDisableTotpMutationKey: () => getDisableTotpMutationKey,
|
|
5060
5641
|
getDisableTotpMutationOptions: () => getDisableTotpMutationOptions,
|
|
5061
5642
|
getDisableTotpUrl: () => getDisableTotpUrl,
|
|
5643
|
+
getEnableTotpMutationKey: () => getEnableTotpMutationKey,
|
|
5062
5644
|
getEnableTotpMutationOptions: () => getEnableTotpMutationOptions,
|
|
5063
5645
|
getEnableTotpUrl: () => getEnableTotpUrl,
|
|
5646
|
+
getGenerateTotpBackupCodesMutationKey: () => getGenerateTotpBackupCodesMutationKey,
|
|
5064
5647
|
getGenerateTotpBackupCodesMutationOptions: () => getGenerateTotpBackupCodesMutationOptions,
|
|
5065
5648
|
getGenerateTotpBackupCodesUrl: () => getGenerateTotpBackupCodesUrl,
|
|
5066
5649
|
getGetTotpURIQueryKey: () => getGetTotpURIQueryKey,
|
|
5067
5650
|
getGetTotpURIQueryOptions: () => getGetTotpURIQueryOptions,
|
|
5068
5651
|
getGetTotpURIUrl: () => getGetTotpURIUrl,
|
|
5069
5652
|
getTotpURI: () => getTotpURI,
|
|
5653
|
+
getVerifyTotpBackupCodeMutationKey: () => getVerifyTotpBackupCodeMutationKey,
|
|
5070
5654
|
getVerifyTotpBackupCodeMutationOptions: () => getVerifyTotpBackupCodeMutationOptions,
|
|
5071
5655
|
getVerifyTotpBackupCodeUrl: () => getVerifyTotpBackupCodeUrl,
|
|
5656
|
+
getVerifyTotpMutationKey: () => getVerifyTotpMutationKey,
|
|
5072
5657
|
getVerifyTotpMutationOptions: () => getVerifyTotpMutationOptions,
|
|
5073
5658
|
getVerifyTotpUrl: () => getVerifyTotpUrl,
|
|
5074
5659
|
useDisableTotp: () => useDisableTotp,
|
|
@@ -5105,8 +5690,9 @@ const disableTotp = async (options) => {
|
|
|
5105
5690
|
method: "POST"
|
|
5106
5691
|
});
|
|
5107
5692
|
};
|
|
5693
|
+
const getDisableTotpMutationKey = () => ["disableTotp"];
|
|
5108
5694
|
const getDisableTotpMutationOptions = (options) => {
|
|
5109
|
-
const mutationKey =
|
|
5695
|
+
const mutationKey = getDisableTotpMutationKey();
|
|
5110
5696
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5111
5697
|
...options,
|
|
5112
5698
|
mutation: {
|
|
@@ -5144,8 +5730,9 @@ const enableTotp = async (options) => {
|
|
|
5144
5730
|
method: "POST"
|
|
5145
5731
|
});
|
|
5146
5732
|
};
|
|
5733
|
+
const getEnableTotpMutationKey = () => ["enableTotp"];
|
|
5147
5734
|
const getEnableTotpMutationOptions = (options) => {
|
|
5148
|
-
const mutationKey =
|
|
5735
|
+
const mutationKey = getEnableTotpMutationKey();
|
|
5149
5736
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5150
5737
|
...options,
|
|
5151
5738
|
mutation: {
|
|
@@ -5183,8 +5770,9 @@ const generateTotpBackupCodes = async (options) => {
|
|
|
5183
5770
|
method: "POST"
|
|
5184
5771
|
});
|
|
5185
5772
|
};
|
|
5773
|
+
const getGenerateTotpBackupCodesMutationKey = () => ["generateTotpBackupCodes"];
|
|
5186
5774
|
const getGenerateTotpBackupCodesMutationOptions = (options) => {
|
|
5187
|
-
const mutationKey =
|
|
5775
|
+
const mutationKey = getGenerateTotpBackupCodesMutationKey();
|
|
5188
5776
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5189
5777
|
...options,
|
|
5190
5778
|
mutation: {
|
|
@@ -5254,18 +5842,27 @@ const getVerifyTotpUrl = () => {
|
|
|
5254
5842
|
* @summary Verify TOTP code
|
|
5255
5843
|
*/
|
|
5256
5844
|
const verifyTotp = async (verifyTOTPRequest, options) => {
|
|
5845
|
+
const getHeaders = (h) => {
|
|
5846
|
+
if (!h) return {};
|
|
5847
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5848
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5849
|
+
const headers = {};
|
|
5850
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5851
|
+
return headers;
|
|
5852
|
+
};
|
|
5257
5853
|
return customFetch(getVerifyTotpUrl(), {
|
|
5258
5854
|
...options,
|
|
5259
5855
|
method: "POST",
|
|
5260
5856
|
headers: {
|
|
5261
5857
|
"Content-Type": "application/json",
|
|
5262
|
-
...options?.headers
|
|
5858
|
+
...getHeaders(options?.headers)
|
|
5263
5859
|
},
|
|
5264
5860
|
body: JSON.stringify(verifyTOTPRequest)
|
|
5265
5861
|
});
|
|
5266
5862
|
};
|
|
5863
|
+
const getVerifyTotpMutationKey = () => ["verifyTotp"];
|
|
5267
5864
|
const getVerifyTotpMutationOptions = (options) => {
|
|
5268
|
-
const mutationKey =
|
|
5865
|
+
const mutationKey = getVerifyTotpMutationKey();
|
|
5269
5866
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5270
5867
|
...options,
|
|
5271
5868
|
mutation: {
|
|
@@ -5299,18 +5896,27 @@ const getVerifyTotpBackupCodeUrl = () => {
|
|
|
5299
5896
|
* @summary Verify backup code
|
|
5300
5897
|
*/
|
|
5301
5898
|
const verifyTotpBackupCode = async (verifyBackupCodeRequest, options) => {
|
|
5899
|
+
const getHeaders = (h) => {
|
|
5900
|
+
if (!h) return {};
|
|
5901
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
5902
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
5903
|
+
const headers = {};
|
|
5904
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
5905
|
+
return headers;
|
|
5906
|
+
};
|
|
5302
5907
|
return customFetch(getVerifyTotpBackupCodeUrl(), {
|
|
5303
5908
|
...options,
|
|
5304
5909
|
method: "POST",
|
|
5305
5910
|
headers: {
|
|
5306
5911
|
"Content-Type": "application/json",
|
|
5307
|
-
...options?.headers
|
|
5912
|
+
...getHeaders(options?.headers)
|
|
5308
5913
|
},
|
|
5309
5914
|
body: JSON.stringify(verifyBackupCodeRequest)
|
|
5310
5915
|
});
|
|
5311
5916
|
};
|
|
5917
|
+
const getVerifyTotpBackupCodeMutationKey = () => ["verifyTotpBackupCode"];
|
|
5312
5918
|
const getVerifyTotpBackupCodeMutationOptions = (options) => {
|
|
5313
|
-
const mutationKey =
|
|
5919
|
+
const mutationKey = getVerifyTotpBackupCodeMutationKey();
|
|
5314
5920
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : {
|
|
5315
5921
|
...options,
|
|
5316
5922
|
mutation: {
|