@djangocfg/api 2.1.309 → 2.1.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-server.cjs +18 -7
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +18 -7
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +54 -21
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +54 -21
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +54 -21
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +144 -144
- package/dist/clients.d.ts +144 -144
- package/dist/clients.mjs +54 -21
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +18 -7
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +92 -92
- package/dist/hooks.d.ts +92 -92
- package/dist/hooks.mjs +18 -7
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +36 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +111 -105
- package/dist/index.d.ts +111 -105
- package/dist/index.mjs +36 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/accounts/models.ts +25 -25
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +62 -62
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +24 -24
- package/src/_api/generated/cfg_accounts/client.ts +3 -0
- package/src/_api/generated/cfg_accounts/http.ts +30 -7
- package/src/_api/generated/cfg_centrifugo/client.ts +3 -0
- package/src/_api/generated/cfg_centrifugo/http.ts +30 -7
- package/src/_api/generated/cfg_totp/client.ts +3 -0
- package/src/_api/generated/cfg_totp/http.ts +30 -7
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +18 -18
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +18 -18
package/dist/auth.mjs
CHANGED
|
@@ -444,7 +444,7 @@ var FetchAdapter = class {
|
|
|
444
444
|
__name(this, "FetchAdapter");
|
|
445
445
|
}
|
|
446
446
|
async request(request) {
|
|
447
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
447
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
448
448
|
let finalUrl = url;
|
|
449
449
|
if (params) {
|
|
450
450
|
const searchParams = new URLSearchParams();
|
|
@@ -477,11 +477,21 @@ var FetchAdapter = class {
|
|
|
477
477
|
// Include Django session cookies
|
|
478
478
|
});
|
|
479
479
|
let data = null;
|
|
480
|
-
const contentType = response.headers.get("content-type");
|
|
481
|
-
if (response.status !== 204
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
480
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
481
|
+
if (response.status !== 204) {
|
|
482
|
+
if (responseType === "blob") {
|
|
483
|
+
data = await response.blob();
|
|
484
|
+
} else if (responseType === "text") {
|
|
485
|
+
data = await response.text();
|
|
486
|
+
} else if (responseType === "json") {
|
|
487
|
+
data = await response.json();
|
|
488
|
+
} else if (contentType.includes("application/json")) {
|
|
489
|
+
data = await response.json();
|
|
490
|
+
} else if (contentType.startsWith("text/")) {
|
|
491
|
+
data = await response.text();
|
|
492
|
+
} else {
|
|
493
|
+
data = await response.blob();
|
|
494
|
+
}
|
|
485
495
|
}
|
|
486
496
|
const responseHeaders = {};
|
|
487
497
|
response.headers.forEach((value, key) => {
|
|
@@ -917,7 +927,8 @@ var APIClient = class {
|
|
|
917
927
|
params: options?.params,
|
|
918
928
|
body: options?.body,
|
|
919
929
|
formData: options?.formData,
|
|
920
|
-
binaryBody: options?.binaryBody
|
|
930
|
+
binaryBody: options?.binaryBody,
|
|
931
|
+
responseType: options?.responseType
|
|
921
932
|
});
|
|
922
933
|
const duration = Date.now() - startTime;
|
|
923
934
|
if (response.status >= 400) {
|
|
@@ -1817,7 +1828,7 @@ var FetchAdapter2 = class {
|
|
|
1817
1828
|
__name(this, "FetchAdapter");
|
|
1818
1829
|
}
|
|
1819
1830
|
async request(request) {
|
|
1820
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
1831
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
1821
1832
|
let finalUrl = url;
|
|
1822
1833
|
if (params) {
|
|
1823
1834
|
const searchParams = new URLSearchParams();
|
|
@@ -1850,11 +1861,21 @@ var FetchAdapter2 = class {
|
|
|
1850
1861
|
// Include Django session cookies
|
|
1851
1862
|
});
|
|
1852
1863
|
let data = null;
|
|
1853
|
-
const contentType = response.headers.get("content-type");
|
|
1854
|
-
if (response.status !== 204
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1864
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
1865
|
+
if (response.status !== 204) {
|
|
1866
|
+
if (responseType === "blob") {
|
|
1867
|
+
data = await response.blob();
|
|
1868
|
+
} else if (responseType === "text") {
|
|
1869
|
+
data = await response.text();
|
|
1870
|
+
} else if (responseType === "json") {
|
|
1871
|
+
data = await response.json();
|
|
1872
|
+
} else if (contentType.includes("application/json")) {
|
|
1873
|
+
data = await response.json();
|
|
1874
|
+
} else if (contentType.startsWith("text/")) {
|
|
1875
|
+
data = await response.text();
|
|
1876
|
+
} else {
|
|
1877
|
+
data = await response.blob();
|
|
1878
|
+
}
|
|
1858
1879
|
}
|
|
1859
1880
|
const responseHeaders = {};
|
|
1860
1881
|
response.headers.forEach((value, key) => {
|
|
@@ -2284,7 +2305,8 @@ var APIClient2 = class {
|
|
|
2284
2305
|
params: options?.params,
|
|
2285
2306
|
body: options?.body,
|
|
2286
2307
|
formData: options?.formData,
|
|
2287
|
-
binaryBody: options?.binaryBody
|
|
2308
|
+
binaryBody: options?.binaryBody,
|
|
2309
|
+
responseType: options?.responseType
|
|
2288
2310
|
});
|
|
2289
2311
|
const duration = Date.now() - startTime;
|
|
2290
2312
|
if (response.status >= 400) {
|
|
@@ -2754,7 +2776,7 @@ var FetchAdapter3 = class {
|
|
|
2754
2776
|
__name(this, "FetchAdapter");
|
|
2755
2777
|
}
|
|
2756
2778
|
async request(request) {
|
|
2757
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
2779
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
2758
2780
|
let finalUrl = url;
|
|
2759
2781
|
if (params) {
|
|
2760
2782
|
const searchParams = new URLSearchParams();
|
|
@@ -2787,11 +2809,21 @@ var FetchAdapter3 = class {
|
|
|
2787
2809
|
// Include Django session cookies
|
|
2788
2810
|
});
|
|
2789
2811
|
let data = null;
|
|
2790
|
-
const contentType = response.headers.get("content-type");
|
|
2791
|
-
if (response.status !== 204
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2812
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
2813
|
+
if (response.status !== 204) {
|
|
2814
|
+
if (responseType === "blob") {
|
|
2815
|
+
data = await response.blob();
|
|
2816
|
+
} else if (responseType === "text") {
|
|
2817
|
+
data = await response.text();
|
|
2818
|
+
} else if (responseType === "json") {
|
|
2819
|
+
data = await response.json();
|
|
2820
|
+
} else if (contentType.includes("application/json")) {
|
|
2821
|
+
data = await response.json();
|
|
2822
|
+
} else if (contentType.startsWith("text/")) {
|
|
2823
|
+
data = await response.text();
|
|
2824
|
+
} else {
|
|
2825
|
+
data = await response.blob();
|
|
2826
|
+
}
|
|
2795
2827
|
}
|
|
2796
2828
|
const responseHeaders = {};
|
|
2797
2829
|
response.headers.forEach((value, key) => {
|
|
@@ -3229,7 +3261,8 @@ var APIClient3 = class {
|
|
|
3229
3261
|
params: options?.params,
|
|
3230
3262
|
body: options?.body,
|
|
3231
3263
|
formData: options?.formData,
|
|
3232
|
-
binaryBody: options?.binaryBody
|
|
3264
|
+
binaryBody: options?.binaryBody,
|
|
3265
|
+
responseType: options?.responseType
|
|
3233
3266
|
});
|
|
3234
3267
|
const duration = Date.now() - startTime;
|
|
3235
3268
|
if (response.status >= 400) {
|