@djangocfg/api 2.1.308 → 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.cjs
CHANGED
|
@@ -505,7 +505,7 @@ var FetchAdapter = class {
|
|
|
505
505
|
__name(this, "FetchAdapter");
|
|
506
506
|
}
|
|
507
507
|
async request(request) {
|
|
508
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
508
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
509
509
|
let finalUrl = url;
|
|
510
510
|
if (params) {
|
|
511
511
|
const searchParams = new URLSearchParams();
|
|
@@ -538,11 +538,21 @@ var FetchAdapter = class {
|
|
|
538
538
|
// Include Django session cookies
|
|
539
539
|
});
|
|
540
540
|
let data = null;
|
|
541
|
-
const contentType = response.headers.get("content-type");
|
|
542
|
-
if (response.status !== 204
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
541
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
542
|
+
if (response.status !== 204) {
|
|
543
|
+
if (responseType === "blob") {
|
|
544
|
+
data = await response.blob();
|
|
545
|
+
} else if (responseType === "text") {
|
|
546
|
+
data = await response.text();
|
|
547
|
+
} else if (responseType === "json") {
|
|
548
|
+
data = await response.json();
|
|
549
|
+
} else if (contentType.includes("application/json")) {
|
|
550
|
+
data = await response.json();
|
|
551
|
+
} else if (contentType.startsWith("text/")) {
|
|
552
|
+
data = await response.text();
|
|
553
|
+
} else {
|
|
554
|
+
data = await response.blob();
|
|
555
|
+
}
|
|
546
556
|
}
|
|
547
557
|
const responseHeaders = {};
|
|
548
558
|
response.headers.forEach((value, key) => {
|
|
@@ -978,7 +988,8 @@ var APIClient = class {
|
|
|
978
988
|
params: options?.params,
|
|
979
989
|
body: options?.body,
|
|
980
990
|
formData: options?.formData,
|
|
981
|
-
binaryBody: options?.binaryBody
|
|
991
|
+
binaryBody: options?.binaryBody,
|
|
992
|
+
responseType: options?.responseType
|
|
982
993
|
});
|
|
983
994
|
const duration = Date.now() - startTime;
|
|
984
995
|
if (response.status >= 400) {
|
|
@@ -1878,7 +1889,7 @@ var FetchAdapter2 = class {
|
|
|
1878
1889
|
__name(this, "FetchAdapter");
|
|
1879
1890
|
}
|
|
1880
1891
|
async request(request) {
|
|
1881
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
1892
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
1882
1893
|
let finalUrl = url;
|
|
1883
1894
|
if (params) {
|
|
1884
1895
|
const searchParams = new URLSearchParams();
|
|
@@ -1911,11 +1922,21 @@ var FetchAdapter2 = class {
|
|
|
1911
1922
|
// Include Django session cookies
|
|
1912
1923
|
});
|
|
1913
1924
|
let data = null;
|
|
1914
|
-
const contentType = response.headers.get("content-type");
|
|
1915
|
-
if (response.status !== 204
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1925
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
1926
|
+
if (response.status !== 204) {
|
|
1927
|
+
if (responseType === "blob") {
|
|
1928
|
+
data = await response.blob();
|
|
1929
|
+
} else if (responseType === "text") {
|
|
1930
|
+
data = await response.text();
|
|
1931
|
+
} else if (responseType === "json") {
|
|
1932
|
+
data = await response.json();
|
|
1933
|
+
} else if (contentType.includes("application/json")) {
|
|
1934
|
+
data = await response.json();
|
|
1935
|
+
} else if (contentType.startsWith("text/")) {
|
|
1936
|
+
data = await response.text();
|
|
1937
|
+
} else {
|
|
1938
|
+
data = await response.blob();
|
|
1939
|
+
}
|
|
1919
1940
|
}
|
|
1920
1941
|
const responseHeaders = {};
|
|
1921
1942
|
response.headers.forEach((value, key) => {
|
|
@@ -2345,7 +2366,8 @@ var APIClient2 = class {
|
|
|
2345
2366
|
params: options?.params,
|
|
2346
2367
|
body: options?.body,
|
|
2347
2368
|
formData: options?.formData,
|
|
2348
|
-
binaryBody: options?.binaryBody
|
|
2369
|
+
binaryBody: options?.binaryBody,
|
|
2370
|
+
responseType: options?.responseType
|
|
2349
2371
|
});
|
|
2350
2372
|
const duration = Date.now() - startTime;
|
|
2351
2373
|
if (response.status >= 400) {
|
|
@@ -2815,7 +2837,7 @@ var FetchAdapter3 = class {
|
|
|
2815
2837
|
__name(this, "FetchAdapter");
|
|
2816
2838
|
}
|
|
2817
2839
|
async request(request) {
|
|
2818
|
-
const { method, url, headers, body, params, formData, binaryBody } = request;
|
|
2840
|
+
const { method, url, headers, body, params, formData, binaryBody, responseType } = request;
|
|
2819
2841
|
let finalUrl = url;
|
|
2820
2842
|
if (params) {
|
|
2821
2843
|
const searchParams = new URLSearchParams();
|
|
@@ -2848,11 +2870,21 @@ var FetchAdapter3 = class {
|
|
|
2848
2870
|
// Include Django session cookies
|
|
2849
2871
|
});
|
|
2850
2872
|
let data = null;
|
|
2851
|
-
const contentType = response.headers.get("content-type");
|
|
2852
|
-
if (response.status !== 204
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2873
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
2874
|
+
if (response.status !== 204) {
|
|
2875
|
+
if (responseType === "blob") {
|
|
2876
|
+
data = await response.blob();
|
|
2877
|
+
} else if (responseType === "text") {
|
|
2878
|
+
data = await response.text();
|
|
2879
|
+
} else if (responseType === "json") {
|
|
2880
|
+
data = await response.json();
|
|
2881
|
+
} else if (contentType.includes("application/json")) {
|
|
2882
|
+
data = await response.json();
|
|
2883
|
+
} else if (contentType.startsWith("text/")) {
|
|
2884
|
+
data = await response.text();
|
|
2885
|
+
} else {
|
|
2886
|
+
data = await response.blob();
|
|
2887
|
+
}
|
|
2856
2888
|
}
|
|
2857
2889
|
const responseHeaders = {};
|
|
2858
2890
|
response.headers.forEach((value, key) => {
|
|
@@ -3290,7 +3322,8 @@ var APIClient3 = class {
|
|
|
3290
3322
|
params: options?.params,
|
|
3291
3323
|
body: options?.body,
|
|
3292
3324
|
formData: options?.formData,
|
|
3293
|
-
binaryBody: options?.binaryBody
|
|
3325
|
+
binaryBody: options?.binaryBody,
|
|
3326
|
+
responseType: options?.responseType
|
|
3294
3327
|
});
|
|
3295
3328
|
const duration = Date.now() - startTime;
|
|
3296
3329
|
if (response.status >= 400) {
|