@djangocfg/api 2.1.261 → 2.1.263
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 +9 -0
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +9 -0
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +27 -0
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +27 -0
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +65 -1
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +145 -122
- package/dist/clients.d.ts +145 -122
- package/dist/clients.mjs +65 -1
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +47 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +91 -68
- package/dist/hooks.d.ts +91 -68
- package/dist/hooks.mjs +47 -1
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +56 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -89
- package/dist/index.d.ts +89 -89
- package/dist/index.mjs +56 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +46 -2
- package/src/_api/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +3 -2
- package/src/_api/generated/cfg_accounts/accounts/models.ts +12 -12
- package/src/_api/generated/cfg_accounts/accounts__oauth/client.ts +1 -1
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +55 -55
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +23 -23
- package/src/_api/generated/cfg_accounts/client.ts +8 -0
- package/src/_api/generated/cfg_accounts/errors.ts +5 -0
- package/src/_api/generated/cfg_centrifugo/client.ts +8 -0
- package/src/_api/generated/cfg_centrifugo/errors.ts +5 -0
- package/src/_api/generated/cfg_totp/client.ts +8 -0
- package/src/_api/generated/cfg_totp/errors.ts +5 -0
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +14 -14
- package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +25 -25
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
package/dist/auth.cjs
CHANGED
|
@@ -600,6 +600,9 @@ var APIError = class extends Error {
|
|
|
600
600
|
if (details.detail) {
|
|
601
601
|
return Array.isArray(details.detail) ? details.detail.join(", ") : String(details.detail);
|
|
602
602
|
}
|
|
603
|
+
if (details.error) {
|
|
604
|
+
return String(details.error);
|
|
605
|
+
}
|
|
603
606
|
if (details.message) {
|
|
604
607
|
return String(details.message);
|
|
605
608
|
}
|
|
@@ -938,6 +941,12 @@ var APIClient = class {
|
|
|
938
941
|
if (!options?.formData && !options?.binaryBody && !headers["Content-Type"]) {
|
|
939
942
|
headers["Content-Type"] = "application/json";
|
|
940
943
|
}
|
|
944
|
+
if (!headers["Authorization"]) {
|
|
945
|
+
const token = this.getToken();
|
|
946
|
+
if (token) {
|
|
947
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
941
950
|
if (this.logger) {
|
|
942
951
|
this.logger.logRequest({
|
|
943
952
|
method,
|
|
@@ -1944,6 +1953,9 @@ var APIError2 = class extends Error {
|
|
|
1944
1953
|
if (details.detail) {
|
|
1945
1954
|
return Array.isArray(details.detail) ? details.detail.join(", ") : String(details.detail);
|
|
1946
1955
|
}
|
|
1956
|
+
if (details.error) {
|
|
1957
|
+
return String(details.error);
|
|
1958
|
+
}
|
|
1947
1959
|
if (details.message) {
|
|
1948
1960
|
return String(details.message);
|
|
1949
1961
|
}
|
|
@@ -2279,6 +2291,12 @@ var APIClient2 = class {
|
|
|
2279
2291
|
if (!options?.formData && !options?.binaryBody && !headers["Content-Type"]) {
|
|
2280
2292
|
headers["Content-Type"] = "application/json";
|
|
2281
2293
|
}
|
|
2294
|
+
if (!headers["Authorization"]) {
|
|
2295
|
+
const token = this.getToken();
|
|
2296
|
+
if (token) {
|
|
2297
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2282
2300
|
if (this.logger) {
|
|
2283
2301
|
this.logger.logRequest({
|
|
2284
2302
|
method,
|
|
@@ -2861,6 +2879,9 @@ var APIError3 = class extends Error {
|
|
|
2861
2879
|
if (details.detail) {
|
|
2862
2880
|
return Array.isArray(details.detail) ? details.detail.join(", ") : String(details.detail);
|
|
2863
2881
|
}
|
|
2882
|
+
if (details.error) {
|
|
2883
|
+
return String(details.error);
|
|
2884
|
+
}
|
|
2864
2885
|
if (details.message) {
|
|
2865
2886
|
return String(details.message);
|
|
2866
2887
|
}
|
|
@@ -3200,6 +3221,12 @@ var APIClient3 = class {
|
|
|
3200
3221
|
if (!options?.formData && !options?.binaryBody && !headers["Content-Type"]) {
|
|
3201
3222
|
headers["Content-Type"] = "application/json";
|
|
3202
3223
|
}
|
|
3224
|
+
if (!headers["Authorization"]) {
|
|
3225
|
+
const token = this.getToken();
|
|
3226
|
+
if (token) {
|
|
3227
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3203
3230
|
if (this.logger) {
|
|
3204
3231
|
this.logger.logRequest({
|
|
3205
3232
|
method,
|