@djangocfg/api 2.1.541 → 2.1.542
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 +1 -2
- package/dist/auth.cjs +99 -111
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +0 -22
- package/dist/auth.d.ts +0 -22
- package/dist/auth.mjs +99 -111
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +3 -99
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +4 -136
- package/dist/clients.d.ts +4 -136
- package/dist/clients.mjs +3 -99
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -4
- package/dist/hooks.d.ts +2 -4
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +3 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -338
- package/dist/index.d.ts +8 -338
- package/dist/index.mjs +3 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpConsentPolicyRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/openapi.json +0 -45
- package/src/_api/generated/_cfg_accounts/schemas/User.ts +0 -2
- package/src/_api/generated/_cfg_accounts/schemas/index.ts +0 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +8 -2
- package/src/_api/generated/index.ts +1 -5
- package/src/_api/generated/openapi.json +0 -135
- package/src/_api/generated/sdk.gen.ts +1 -20
- package/src/_api/generated/types.gen.ts +0 -79
- package/src/_api/index.ts +1 -1
- package/src/clients.ts +2 -4
- package/src/index.ts +0 -2
- package/src/log-control.ts +1 -1
- package/src/server.ts +0 -4
- package/src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts +0 -14
- package/src/_api/generated/_cfg_centrifugo/api.ts +0 -87
- package/src/_api/generated/_cfg_centrifugo/hooks/index.ts +0 -4
- package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +0 -74
- package/src/_api/generated/_cfg_centrifugo/index.ts +0 -29
- package/src/_api/generated/_cfg_centrifugo/openapi.json +0 -136
- package/src/_api/generated/_cfg_centrifugo/schemas/ConnectionTokenResponse.ts +0 -14
- package/src/_api/generated/_cfg_centrifugo/schemas/index.ts +0 -4
- package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +0 -5
- package/src/_api/generated/_cfg_centrifugo/types.gen.ts +0 -5
package/dist/clients.cjs
CHANGED
|
@@ -22,10 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var clients_exports = {};
|
|
23
23
|
__export(clients_exports, {
|
|
24
24
|
AccountsAPI: () => API,
|
|
25
|
-
|
|
26
|
-
TotpAPI: () => API3,
|
|
25
|
+
TotpAPI: () => API2,
|
|
27
26
|
apiAccounts: () => CfgAccountsApi,
|
|
28
|
-
apiCentrifugo: () => CfgCentrifugoApi,
|
|
29
27
|
apiTotp: () => CfgTotpApi
|
|
30
28
|
});
|
|
31
29
|
module.exports = __toCommonJS(clients_exports);
|
|
@@ -2057,27 +2055,6 @@ var CfgAccountsAuth = class {
|
|
|
2057
2055
|
});
|
|
2058
2056
|
}
|
|
2059
2057
|
};
|
|
2060
|
-
var CfgCentrifugo = class {
|
|
2061
|
-
static {
|
|
2062
|
-
__name(this, "CfgCentrifugo");
|
|
2063
|
-
}
|
|
2064
|
-
/**
|
|
2065
|
-
* Get Centrifugo connection token
|
|
2066
|
-
*
|
|
2067
|
-
* Generate JWT token for WebSocket connection to Centrifugo. Token includes user's allowed channels based on their permissions. Requires authentication.
|
|
2068
|
-
*/
|
|
2069
|
-
static cfgCentrifugoAuthTokenRetrieve(options) {
|
|
2070
|
-
return (options?.client ?? client).get({
|
|
2071
|
-
security: [
|
|
2072
|
-
{ name: "X-API-Key", type: "apiKey" },
|
|
2073
|
-
{ scheme: "bearer", type: "http" },
|
|
2074
|
-
{ name: "Authorization", type: "apiKey" }
|
|
2075
|
-
],
|
|
2076
|
-
url: "/cfg/centrifugo/auth/token/",
|
|
2077
|
-
...options
|
|
2078
|
-
});
|
|
2079
|
-
}
|
|
2080
|
-
};
|
|
2081
2058
|
var CfgTotpBackupCodes = class {
|
|
2082
2059
|
static {
|
|
2083
2060
|
__name(this, "CfgTotpBackupCodes");
|
|
@@ -2340,80 +2317,8 @@ var API = class {
|
|
|
2340
2317
|
}
|
|
2341
2318
|
};
|
|
2342
2319
|
|
|
2343
|
-
// src/_api/generated/_cfg_centrifugo/api.ts
|
|
2344
|
-
var API2 = class {
|
|
2345
|
-
static {
|
|
2346
|
-
__name(this, "API");
|
|
2347
|
-
}
|
|
2348
|
-
logger;
|
|
2349
|
-
cfgCentrifugo = CfgCentrifugo;
|
|
2350
|
-
constructor(_baseUrl, opts = {}) {
|
|
2351
|
-
this.logger = new APILogger(opts.logger);
|
|
2352
|
-
if (_baseUrl) auth.setBaseUrl(_baseUrl);
|
|
2353
|
-
if (opts.locale !== void 0) auth.setLocale(opts.locale);
|
|
2354
|
-
if (opts.apiKey !== void 0) auth.setApiKey(opts.apiKey);
|
|
2355
|
-
if (opts.withCredentials !== void 0) auth.setWithCredentials(opts.withCredentials);
|
|
2356
|
-
}
|
|
2357
|
-
// ── Base URL ────────────────────────────────────────────────────────────
|
|
2358
|
-
getBaseUrl() {
|
|
2359
|
-
return auth.getBaseUrl();
|
|
2360
|
-
}
|
|
2361
|
-
setBaseUrl(url) {
|
|
2362
|
-
auth.setBaseUrl(url);
|
|
2363
|
-
}
|
|
2364
|
-
// ── Tokens ──────────────────────────────────────────────────────────────
|
|
2365
|
-
getToken() {
|
|
2366
|
-
return auth.getToken();
|
|
2367
|
-
}
|
|
2368
|
-
setToken(token) {
|
|
2369
|
-
auth.setToken(token);
|
|
2370
|
-
}
|
|
2371
|
-
getRefreshToken() {
|
|
2372
|
-
return auth.getRefreshToken();
|
|
2373
|
-
}
|
|
2374
|
-
setRefreshToken(token) {
|
|
2375
|
-
auth.setRefreshToken(token);
|
|
2376
|
-
}
|
|
2377
|
-
clearToken() {
|
|
2378
|
-
auth.clearTokens();
|
|
2379
|
-
}
|
|
2380
|
-
isAuthenticated() {
|
|
2381
|
-
return auth.isAuthenticated();
|
|
2382
|
-
}
|
|
2383
|
-
// ── Locale / API key ────────────────────────────────────────────────────
|
|
2384
|
-
getLocale() {
|
|
2385
|
-
return auth.getLocale();
|
|
2386
|
-
}
|
|
2387
|
-
setLocale(locale) {
|
|
2388
|
-
auth.setLocale(locale);
|
|
2389
|
-
}
|
|
2390
|
-
getApiKey() {
|
|
2391
|
-
return auth.getApiKey();
|
|
2392
|
-
}
|
|
2393
|
-
setApiKey(key) {
|
|
2394
|
-
auth.setApiKey(key);
|
|
2395
|
-
}
|
|
2396
|
-
// ── 401 handling ────────────────────────────────────────────────────────
|
|
2397
|
-
/** Fired only on terminal 401 (after refresh+retry path is exhausted). */
|
|
2398
|
-
onUnauthorized(cb) {
|
|
2399
|
-
auth.onUnauthorized(cb);
|
|
2400
|
-
}
|
|
2401
|
-
/** Provide a refresh strategy. See `auth.setRefreshHandler` for the contract. */
|
|
2402
|
-
setRefreshHandler(fn) {
|
|
2403
|
-
auth.setRefreshHandler(fn);
|
|
2404
|
-
}
|
|
2405
|
-
/**
|
|
2406
|
-
* Proactively refresh now via the registered handler, sharing the single
|
|
2407
|
-
* 401-recovery flight (rotation + dedup + rotated-token persistence).
|
|
2408
|
-
* See `auth.refreshNow`.
|
|
2409
|
-
*/
|
|
2410
|
-
refreshNow() {
|
|
2411
|
-
return auth.refreshNow();
|
|
2412
|
-
}
|
|
2413
|
-
};
|
|
2414
|
-
|
|
2415
2320
|
// src/_api/generated/_cfg_totp/api.ts
|
|
2416
|
-
var
|
|
2321
|
+
var API2 = class {
|
|
2417
2322
|
static {
|
|
2418
2323
|
__name(this, "API");
|
|
2419
2324
|
}
|
|
@@ -2489,6 +2394,5 @@ var API3 = class {
|
|
|
2489
2394
|
|
|
2490
2395
|
// src/_api/generated/index.ts
|
|
2491
2396
|
var CfgAccountsApi = new API();
|
|
2492
|
-
var
|
|
2493
|
-
var CfgTotpApi = new API3();
|
|
2397
|
+
var CfgTotpApi = new API2();
|
|
2494
2398
|
//# sourceMappingURL=clients.cjs.map
|