@djangocfg/api 2.1.287 → 2.1.290

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.cjs CHANGED
@@ -182,6 +182,7 @@ var Auth = class {
182
182
  static {
183
183
  __name(this, "Auth");
184
184
  }
185
+ client;
185
186
  constructor(client) {
186
187
  this.client = client;
187
188
  }
@@ -202,6 +203,7 @@ var Oauth = class {
202
203
  static {
203
204
  __name(this, "Oauth");
204
205
  }
206
+ client;
205
207
  constructor(client) {
206
208
  this.client = client;
207
209
  }
@@ -262,6 +264,7 @@ var UserProfile = class {
262
264
  static {
263
265
  __name(this, "UserProfile");
264
266
  }
267
+ client;
265
268
  constructor(client) {
266
269
  this.client = client;
267
270
  }
@@ -347,6 +350,7 @@ var Accounts = class {
347
350
  static {
348
351
  __name(this, "Accounts");
349
352
  }
353
+ client;
350
354
  constructor(client) {
351
355
  this.client = client;
352
356
  }
@@ -557,6 +561,8 @@ var APILogger = class {
557
561
  static {
558
562
  __name(this, "APILogger");
559
563
  }
564
+ config;
565
+ consola;
560
566
  constructor(config = {}) {
561
567
  this.config = { ...DEFAULT_CONFIG, ...config };
562
568
  this.consola = config.consola || (0, import_consola.createConsola)({
@@ -752,10 +758,20 @@ __name(withRetry, "withRetry");
752
758
 
753
759
  // src/_api/generated/cfg_accounts/client.ts
754
760
  var APIClient = class {
761
+ static {
762
+ __name(this, "APIClient");
763
+ }
764
+ baseUrl;
765
+ httpClient;
766
+ logger = null;
767
+ retryConfig = null;
768
+ tokenGetter = null;
769
+ // Sub-clients
770
+ auth;
771
+ oauth;
772
+ user_profile;
773
+ accounts;
755
774
  constructor(baseUrl, options) {
756
- this.logger = null;
757
- this.retryConfig = null;
758
- this.tokenGetter = null;
759
775
  this.baseUrl = baseUrl.replace(/\/$/, "");
760
776
  this.httpClient = options?.httpClient || new FetchAdapter();
761
777
  this.tokenGetter = options?.tokenGetter || null;
@@ -770,9 +786,6 @@ var APIClient = class {
770
786
  this.user_profile = new UserProfile(this);
771
787
  this.accounts = new Accounts(this);
772
788
  }
773
- static {
774
- __name(this, "APIClient");
775
- }
776
789
  /**
777
790
  * Get CSRF token from cookies (for SessionAuthentication).
778
791
  *
@@ -979,6 +992,7 @@ var LocalStorageAdapter = class {
979
992
  static {
980
993
  __name(this, "LocalStorageAdapter");
981
994
  }
995
+ logger;
982
996
  constructor(logger) {
983
997
  this.logger = logger;
984
998
  }
@@ -1024,6 +1038,7 @@ var CookieStorageAdapter = class {
1024
1038
  static {
1025
1039
  __name(this, "CookieStorageAdapter");
1026
1040
  }
1041
+ logger;
1027
1042
  constructor(logger) {
1028
1043
  this.logger = logger;
1029
1044
  }
@@ -1072,13 +1087,14 @@ var CookieStorageAdapter = class {
1072
1087
  }
1073
1088
  };
1074
1089
  var MemoryStorageAdapter = class {
1075
- constructor(logger) {
1076
- this.storage = /* @__PURE__ */ new Map();
1077
- this.logger = logger;
1078
- }
1079
1090
  static {
1080
1091
  __name(this, "MemoryStorageAdapter");
1081
1092
  }
1093
+ storage = /* @__PURE__ */ new Map();
1094
+ logger;
1095
+ constructor(logger) {
1096
+ this.logger = logger;
1097
+ }
1082
1098
  getItem(key) {
1083
1099
  const value = this.storage.get(key) || null;
1084
1100
  this.logger?.debug(`MemoryStorage.getItem("${key}"): ${value ? "found" : "not found"}`);
@@ -2089,10 +2105,22 @@ function detectLocale() {
2089
2105
  }
2090
2106
  __name(detectLocale, "detectLocale");
2091
2107
  var API = class {
2108
+ static {
2109
+ __name(this, "API");
2110
+ }
2111
+ baseUrl;
2112
+ _client;
2113
+ _token = null;
2114
+ _refreshToken = null;
2115
+ _locale = null;
2116
+ storage;
2117
+ options;
2118
+ // Sub-clients
2119
+ auth;
2120
+ oauth;
2121
+ user_profile;
2122
+ accounts;
2092
2123
  constructor(baseUrl, options) {
2093
- this._token = null;
2094
- this._refreshToken = null;
2095
- this._locale = null;
2096
2124
  this.baseUrl = baseUrl;
2097
2125
  this.options = options;
2098
2126
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -2111,9 +2139,6 @@ var API = class {
2111
2139
  this.user_profile = this._client.user_profile;
2112
2140
  this.accounts = this._client.accounts;
2113
2141
  }
2114
- static {
2115
- __name(this, "API");
2116
- }
2117
2142
  _loadTokensFromStorage() {
2118
2143
  this._token = this.storage.getItem(TOKEN_KEY);
2119
2144
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY);
@@ -2239,6 +2264,7 @@ var CentrifugoAuth = class {
2239
2264
  static {
2240
2265
  __name(this, "CentrifugoAuth");
2241
2266
  }
2267
+ client;
2242
2268
  constructor(client) {
2243
2269
  this.client = client;
2244
2270
  }
@@ -2426,6 +2452,8 @@ var APILogger2 = class {
2426
2452
  static {
2427
2453
  __name(this, "APILogger");
2428
2454
  }
2455
+ config;
2456
+ consola;
2429
2457
  constructor(config = {}) {
2430
2458
  this.config = { ...DEFAULT_CONFIG2, ...config };
2431
2459
  this.consola = config.consola || (0, import_consola6.createConsola)({
@@ -2621,10 +2649,17 @@ __name(withRetry2, "withRetry");
2621
2649
 
2622
2650
  // src/_api/generated/cfg_centrifugo/client.ts
2623
2651
  var APIClient2 = class {
2652
+ static {
2653
+ __name(this, "APIClient");
2654
+ }
2655
+ baseUrl;
2656
+ httpClient;
2657
+ logger = null;
2658
+ retryConfig = null;
2659
+ tokenGetter = null;
2660
+ // Sub-clients
2661
+ centrifugo_auth;
2624
2662
  constructor(baseUrl, options) {
2625
- this.logger = null;
2626
- this.retryConfig = null;
2627
- this.tokenGetter = null;
2628
2663
  this.baseUrl = baseUrl.replace(/\/$/, "");
2629
2664
  this.httpClient = options?.httpClient || new FetchAdapter2();
2630
2665
  this.tokenGetter = options?.tokenGetter || null;
@@ -2636,9 +2671,6 @@ var APIClient2 = class {
2636
2671
  }
2637
2672
  this.centrifugo_auth = new CentrifugoAuth(this);
2638
2673
  }
2639
- static {
2640
- __name(this, "APIClient");
2641
- }
2642
2674
  /**
2643
2675
  * Get CSRF token from cookies (for SessionAuthentication).
2644
2676
  *
@@ -2845,6 +2877,7 @@ var LocalStorageAdapter2 = class {
2845
2877
  static {
2846
2878
  __name(this, "LocalStorageAdapter");
2847
2879
  }
2880
+ logger;
2848
2881
  constructor(logger) {
2849
2882
  this.logger = logger;
2850
2883
  }
@@ -2987,10 +3020,19 @@ function detectLocale2() {
2987
3020
  }
2988
3021
  __name(detectLocale2, "detectLocale");
2989
3022
  var API2 = class {
3023
+ static {
3024
+ __name(this, "API");
3025
+ }
3026
+ baseUrl;
3027
+ _client;
3028
+ _token = null;
3029
+ _refreshToken = null;
3030
+ _locale = null;
3031
+ storage;
3032
+ options;
3033
+ // Sub-clients
3034
+ centrifugo_auth;
2990
3035
  constructor(baseUrl, options) {
2991
- this._token = null;
2992
- this._refreshToken = null;
2993
- this._locale = null;
2994
3036
  this.baseUrl = baseUrl;
2995
3037
  this.options = options;
2996
3038
  const logger = options?.loggerConfig ? new APILogger2(options.loggerConfig) : void 0;
@@ -3006,9 +3048,6 @@ var API2 = class {
3006
3048
  this._injectAuthHeader();
3007
3049
  this.centrifugo_auth = this._client.centrifugo_auth;
3008
3050
  }
3009
- static {
3010
- __name(this, "API");
3011
- }
3012
3051
  _loadTokensFromStorage() {
3013
3052
  this._token = this.storage.getItem(TOKEN_KEY2);
3014
3053
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY2);
@@ -3138,8 +3177,6 @@ var BaseClient = class {
3138
3177
  static {
3139
3178
  __name(this, "BaseClient");
3140
3179
  }
3141
- static {
3142
- this.api = api;
3143
- }
3180
+ static api = api;
3144
3181
  };
3145
3182
  //# sourceMappingURL=index.cjs.map