@djangocfg/api 2.1.289 → 2.1.291

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/index.mjs CHANGED
@@ -83,6 +83,7 @@ var Auth = class {
83
83
  static {
84
84
  __name(this, "Auth");
85
85
  }
86
+ client;
86
87
  constructor(client) {
87
88
  this.client = client;
88
89
  }
@@ -103,6 +104,7 @@ var Oauth = class {
103
104
  static {
104
105
  __name(this, "Oauth");
105
106
  }
107
+ client;
106
108
  constructor(client) {
107
109
  this.client = client;
108
110
  }
@@ -163,6 +165,7 @@ var UserProfile = class {
163
165
  static {
164
166
  __name(this, "UserProfile");
165
167
  }
168
+ client;
166
169
  constructor(client) {
167
170
  this.client = client;
168
171
  }
@@ -248,6 +251,7 @@ var Accounts = class {
248
251
  static {
249
252
  __name(this, "Accounts");
250
253
  }
254
+ client;
251
255
  constructor(client) {
252
256
  this.client = client;
253
257
  }
@@ -458,6 +462,8 @@ var APILogger = class {
458
462
  static {
459
463
  __name(this, "APILogger");
460
464
  }
465
+ config;
466
+ consola;
461
467
  constructor(config = {}) {
462
468
  this.config = { ...DEFAULT_CONFIG, ...config };
463
469
  this.consola = config.consola || createConsola({
@@ -653,10 +659,20 @@ __name(withRetry, "withRetry");
653
659
 
654
660
  // src/_api/generated/cfg_accounts/client.ts
655
661
  var APIClient = class {
662
+ static {
663
+ __name(this, "APIClient");
664
+ }
665
+ baseUrl;
666
+ httpClient;
667
+ logger = null;
668
+ retryConfig = null;
669
+ tokenGetter = null;
670
+ // Sub-clients
671
+ auth;
672
+ oauth;
673
+ user_profile;
674
+ accounts;
656
675
  constructor(baseUrl, options) {
657
- this.logger = null;
658
- this.retryConfig = null;
659
- this.tokenGetter = null;
660
676
  this.baseUrl = baseUrl.replace(/\/$/, "");
661
677
  this.httpClient = options?.httpClient || new FetchAdapter();
662
678
  this.tokenGetter = options?.tokenGetter || null;
@@ -671,9 +687,6 @@ var APIClient = class {
671
687
  this.user_profile = new UserProfile(this);
672
688
  this.accounts = new Accounts(this);
673
689
  }
674
- static {
675
- __name(this, "APIClient");
676
- }
677
690
  /**
678
691
  * Get CSRF token from cookies (for SessionAuthentication).
679
692
  *
@@ -880,6 +893,7 @@ var LocalStorageAdapter = class {
880
893
  static {
881
894
  __name(this, "LocalStorageAdapter");
882
895
  }
896
+ logger;
883
897
  constructor(logger) {
884
898
  this.logger = logger;
885
899
  }
@@ -925,6 +939,7 @@ var CookieStorageAdapter = class {
925
939
  static {
926
940
  __name(this, "CookieStorageAdapter");
927
941
  }
942
+ logger;
928
943
  constructor(logger) {
929
944
  this.logger = logger;
930
945
  }
@@ -973,13 +988,14 @@ var CookieStorageAdapter = class {
973
988
  }
974
989
  };
975
990
  var MemoryStorageAdapter = class {
976
- constructor(logger) {
977
- this.storage = /* @__PURE__ */ new Map();
978
- this.logger = logger;
979
- }
980
991
  static {
981
992
  __name(this, "MemoryStorageAdapter");
982
993
  }
994
+ storage = /* @__PURE__ */ new Map();
995
+ logger;
996
+ constructor(logger) {
997
+ this.logger = logger;
998
+ }
983
999
  getItem(key) {
984
1000
  const value = this.storage.get(key) || null;
985
1001
  this.logger?.debug(`MemoryStorage.getItem("${key}"): ${value ? "found" : "not found"}`);
@@ -1990,10 +2006,22 @@ function detectLocale() {
1990
2006
  }
1991
2007
  __name(detectLocale, "detectLocale");
1992
2008
  var API = class {
2009
+ static {
2010
+ __name(this, "API");
2011
+ }
2012
+ baseUrl;
2013
+ _client;
2014
+ _token = null;
2015
+ _refreshToken = null;
2016
+ _locale = null;
2017
+ storage;
2018
+ options;
2019
+ // Sub-clients
2020
+ auth;
2021
+ oauth;
2022
+ user_profile;
2023
+ accounts;
1993
2024
  constructor(baseUrl, options) {
1994
- this._token = null;
1995
- this._refreshToken = null;
1996
- this._locale = null;
1997
2025
  this.baseUrl = baseUrl;
1998
2026
  this.options = options;
1999
2027
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -2012,9 +2040,6 @@ var API = class {
2012
2040
  this.user_profile = this._client.user_profile;
2013
2041
  this.accounts = this._client.accounts;
2014
2042
  }
2015
- static {
2016
- __name(this, "API");
2017
- }
2018
2043
  _loadTokensFromStorage() {
2019
2044
  this._token = this.storage.getItem(TOKEN_KEY);
2020
2045
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY);
@@ -2140,6 +2165,7 @@ var CentrifugoAuth = class {
2140
2165
  static {
2141
2166
  __name(this, "CentrifugoAuth");
2142
2167
  }
2168
+ client;
2143
2169
  constructor(client) {
2144
2170
  this.client = client;
2145
2171
  }
@@ -2327,6 +2353,8 @@ var APILogger2 = class {
2327
2353
  static {
2328
2354
  __name(this, "APILogger");
2329
2355
  }
2356
+ config;
2357
+ consola;
2330
2358
  constructor(config = {}) {
2331
2359
  this.config = { ...DEFAULT_CONFIG2, ...config };
2332
2360
  this.consola = config.consola || createConsola2({
@@ -2522,10 +2550,17 @@ __name(withRetry2, "withRetry");
2522
2550
 
2523
2551
  // src/_api/generated/cfg_centrifugo/client.ts
2524
2552
  var APIClient2 = class {
2553
+ static {
2554
+ __name(this, "APIClient");
2555
+ }
2556
+ baseUrl;
2557
+ httpClient;
2558
+ logger = null;
2559
+ retryConfig = null;
2560
+ tokenGetter = null;
2561
+ // Sub-clients
2562
+ centrifugo_auth;
2525
2563
  constructor(baseUrl, options) {
2526
- this.logger = null;
2527
- this.retryConfig = null;
2528
- this.tokenGetter = null;
2529
2564
  this.baseUrl = baseUrl.replace(/\/$/, "");
2530
2565
  this.httpClient = options?.httpClient || new FetchAdapter2();
2531
2566
  this.tokenGetter = options?.tokenGetter || null;
@@ -2537,9 +2572,6 @@ var APIClient2 = class {
2537
2572
  }
2538
2573
  this.centrifugo_auth = new CentrifugoAuth(this);
2539
2574
  }
2540
- static {
2541
- __name(this, "APIClient");
2542
- }
2543
2575
  /**
2544
2576
  * Get CSRF token from cookies (for SessionAuthentication).
2545
2577
  *
@@ -2746,6 +2778,7 @@ var LocalStorageAdapter2 = class {
2746
2778
  static {
2747
2779
  __name(this, "LocalStorageAdapter");
2748
2780
  }
2781
+ logger;
2749
2782
  constructor(logger) {
2750
2783
  this.logger = logger;
2751
2784
  }
@@ -2888,10 +2921,19 @@ function detectLocale2() {
2888
2921
  }
2889
2922
  __name(detectLocale2, "detectLocale");
2890
2923
  var API2 = class {
2924
+ static {
2925
+ __name(this, "API");
2926
+ }
2927
+ baseUrl;
2928
+ _client;
2929
+ _token = null;
2930
+ _refreshToken = null;
2931
+ _locale = null;
2932
+ storage;
2933
+ options;
2934
+ // Sub-clients
2935
+ centrifugo_auth;
2891
2936
  constructor(baseUrl, options) {
2892
- this._token = null;
2893
- this._refreshToken = null;
2894
- this._locale = null;
2895
2937
  this.baseUrl = baseUrl;
2896
2938
  this.options = options;
2897
2939
  const logger = options?.loggerConfig ? new APILogger2(options.loggerConfig) : void 0;
@@ -2907,9 +2949,6 @@ var API2 = class {
2907
2949
  this._injectAuthHeader();
2908
2950
  this.centrifugo_auth = this._client.centrifugo_auth;
2909
2951
  }
2910
- static {
2911
- __name(this, "API");
2912
- }
2913
2952
  _loadTokensFromStorage() {
2914
2953
  this._token = this.storage.getItem(TOKEN_KEY2);
2915
2954
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY2);
@@ -3039,9 +3078,7 @@ var BaseClient = class {
3039
3078
  static {
3040
3079
  __name(this, "BaseClient");
3041
3080
  }
3042
- static {
3043
- this.api = api;
3044
- }
3081
+ static api = api;
3045
3082
  };
3046
3083
  export {
3047
3084
  API,