@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/clients.cjs
CHANGED
|
@@ -291,7 +291,7 @@ var FetchAdapter = class {
|
|
|
291
291
|
__name(this, "FetchAdapter");
|
|
292
292
|
}
|
|
293
293
|
async request(request) {
|
|
294
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
294
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
295
295
|
let finalUrl = url;
|
|
296
296
|
if (params) {
|
|
297
297
|
const searchParams = new URLSearchParams();
|
|
@@ -324,11 +324,21 @@ var FetchAdapter = class {
|
|
|
324
324
|
// Include Django session cookies
|
|
325
325
|
});
|
|
326
326
|
let data = null;
|
|
327
|
-
const contentType = response.headers.get("content-type");
|
|
328
|
-
if (response.status !== 204
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
327
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
328
|
+
if (response.status !== 204) {
|
|
329
|
+
if (responseType === "blob") {
|
|
330
|
+
data = await response.blob();
|
|
331
|
+
} else if (responseType === "text") {
|
|
332
|
+
data = await response.text();
|
|
333
|
+
} else if (responseType === "json") {
|
|
334
|
+
data = await response.json();
|
|
335
|
+
} else if (contentType.includes("application/json")) {
|
|
336
|
+
data = await response.json();
|
|
337
|
+
} else if (contentType.startsWith("text/")) {
|
|
338
|
+
data = await response.text();
|
|
339
|
+
} else {
|
|
340
|
+
data = await response.blob();
|
|
341
|
+
}
|
|
332
342
|
}
|
|
333
343
|
const responseHeaders = {};
|
|
334
344
|
response.headers.forEach((value, key) => {
|
|
@@ -764,7 +774,8 @@ var APIClient = class {
|
|
|
764
774
|
params: options?.params,
|
|
765
775
|
body: options?.body,
|
|
766
776
|
formData: options?.formData,
|
|
767
|
-
binaryBody: options?.binaryBody
|
|
777
|
+
binaryBody: options?.binaryBody,
|
|
778
|
+
responseType: options?.responseType
|
|
768
779
|
});
|
|
769
780
|
const duration = Date.now() - startTime;
|
|
770
781
|
if (response.status >= 400) {
|
|
@@ -1975,7 +1986,7 @@ var FetchAdapter2 = class {
|
|
|
1975
1986
|
__name(this, "FetchAdapter");
|
|
1976
1987
|
}
|
|
1977
1988
|
async request(request) {
|
|
1978
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
1989
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
1979
1990
|
let finalUrl = url;
|
|
1980
1991
|
if (params) {
|
|
1981
1992
|
const searchParams = new URLSearchParams();
|
|
@@ -2008,11 +2019,21 @@ var FetchAdapter2 = class {
|
|
|
2008
2019
|
// Include Django session cookies
|
|
2009
2020
|
});
|
|
2010
2021
|
let data = null;
|
|
2011
|
-
const contentType = response.headers.get("content-type");
|
|
2012
|
-
if (response.status !== 204
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2022
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
2023
|
+
if (response.status !== 204) {
|
|
2024
|
+
if (responseType === "blob") {
|
|
2025
|
+
data = await response.blob();
|
|
2026
|
+
} else if (responseType === "text") {
|
|
2027
|
+
data = await response.text();
|
|
2028
|
+
} else if (responseType === "json") {
|
|
2029
|
+
data = await response.json();
|
|
2030
|
+
} else if (contentType.includes("application/json")) {
|
|
2031
|
+
data = await response.json();
|
|
2032
|
+
} else if (contentType.startsWith("text/")) {
|
|
2033
|
+
data = await response.text();
|
|
2034
|
+
} else {
|
|
2035
|
+
data = await response.blob();
|
|
2036
|
+
}
|
|
2016
2037
|
}
|
|
2017
2038
|
const responseHeaders = {};
|
|
2018
2039
|
response.headers.forEach((value, key) => {
|
|
@@ -2442,7 +2463,8 @@ var APIClient2 = class {
|
|
|
2442
2463
|
params: options?.params,
|
|
2443
2464
|
body: options?.body,
|
|
2444
2465
|
formData: options?.formData,
|
|
2445
|
-
binaryBody: options?.binaryBody
|
|
2466
|
+
binaryBody: options?.binaryBody,
|
|
2467
|
+
responseType: options?.responseType
|
|
2446
2468
|
});
|
|
2447
2469
|
const duration = Date.now() - startTime;
|
|
2448
2470
|
if (response.status >= 400) {
|
|
@@ -2994,7 +3016,7 @@ var FetchAdapter3 = class {
|
|
|
2994
3016
|
__name(this, "FetchAdapter");
|
|
2995
3017
|
}
|
|
2996
3018
|
async request(request) {
|
|
2997
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
3019
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
2998
3020
|
let finalUrl = url;
|
|
2999
3021
|
if (params) {
|
|
3000
3022
|
const searchParams = new URLSearchParams();
|
|
@@ -3027,11 +3049,21 @@ var FetchAdapter3 = class {
|
|
|
3027
3049
|
// Include Django session cookies
|
|
3028
3050
|
});
|
|
3029
3051
|
let data = null;
|
|
3030
|
-
const contentType = response.headers.get("content-type");
|
|
3031
|
-
if (response.status !== 204
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3052
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
3053
|
+
if (response.status !== 204) {
|
|
3054
|
+
if (responseType === "blob") {
|
|
3055
|
+
data = await response.blob();
|
|
3056
|
+
} else if (responseType === "text") {
|
|
3057
|
+
data = await response.text();
|
|
3058
|
+
} else if (responseType === "json") {
|
|
3059
|
+
data = await response.json();
|
|
3060
|
+
} else if (contentType.includes("application/json")) {
|
|
3061
|
+
data = await response.json();
|
|
3062
|
+
} else if (contentType.startsWith("text/")) {
|
|
3063
|
+
data = await response.text();
|
|
3064
|
+
} else {
|
|
3065
|
+
data = await response.blob();
|
|
3066
|
+
}
|
|
3035
3067
|
}
|
|
3036
3068
|
const responseHeaders = {};
|
|
3037
3069
|
response.headers.forEach((value, key) => {
|
|
@@ -3469,7 +3501,8 @@ var APIClient3 = class {
|
|
|
3469
3501
|
params: options?.params,
|
|
3470
3502
|
body: options?.body,
|
|
3471
3503
|
formData: options?.formData,
|
|
3472
|
-
binaryBody: options?.binaryBody
|
|
3504
|
+
binaryBody: options?.binaryBody,
|
|
3505
|
+
responseType: options?.responseType
|
|
3473
3506
|
});
|
|
3474
3507
|
const duration = Date.now() - startTime;
|
|
3475
3508
|
if (response.status >= 400) {
|