@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.
@@ -26,6 +26,7 @@ var Auth = class {
26
26
  static {
27
27
  __name(this, "Auth");
28
28
  }
29
+ client;
29
30
  constructor(client) {
30
31
  this.client = client;
31
32
  }
@@ -43,6 +44,7 @@ var Oauth = class {
43
44
  static {
44
45
  __name(this, "Oauth");
45
46
  }
47
+ client;
46
48
  constructor(client) {
47
49
  this.client = client;
48
50
  }
@@ -100,6 +102,7 @@ var UserProfile = class {
100
102
  static {
101
103
  __name(this, "UserProfile");
102
104
  }
105
+ client;
103
106
  constructor(client) {
104
107
  this.client = client;
105
108
  }
@@ -182,6 +185,7 @@ var Accounts = class {
182
185
  static {
183
186
  __name(this, "Accounts");
184
187
  }
188
+ client;
185
189
  constructor(client) {
186
190
  this.client = client;
187
191
  }
@@ -375,6 +379,8 @@ var APILogger = class {
375
379
  static {
376
380
  __name(this, "APILogger");
377
381
  }
382
+ config;
383
+ consola;
378
384
  constructor(config = {}) {
379
385
  this.config = { ...DEFAULT_CONFIG, ...config };
380
386
  this.consola = config.consola || createConsola({
@@ -570,10 +576,20 @@ __name(withRetry, "withRetry");
570
576
 
571
577
  // src/_api/generated/cfg_accounts/client.ts
572
578
  var APIClient = class {
579
+ static {
580
+ __name(this, "APIClient");
581
+ }
582
+ baseUrl;
583
+ httpClient;
584
+ logger = null;
585
+ retryConfig = null;
586
+ tokenGetter = null;
587
+ // Sub-clients
588
+ auth;
589
+ oauth;
590
+ user_profile;
591
+ accounts;
573
592
  constructor(baseUrl, options) {
574
- this.logger = null;
575
- this.retryConfig = null;
576
- this.tokenGetter = null;
577
593
  this.baseUrl = baseUrl.replace(/\/$/, "");
578
594
  this.httpClient = options?.httpClient || new FetchAdapter();
579
595
  this.tokenGetter = options?.tokenGetter || null;
@@ -588,9 +604,6 @@ var APIClient = class {
588
604
  this.user_profile = new UserProfile(this);
589
605
  this.accounts = new Accounts(this);
590
606
  }
591
- static {
592
- __name(this, "APIClient");
593
- }
594
607
  /**
595
608
  * Get CSRF token from cookies (for SessionAuthentication).
596
609
  *
@@ -797,6 +810,7 @@ var LocalStorageAdapter = class {
797
810
  static {
798
811
  __name(this, "LocalStorageAdapter");
799
812
  }
813
+ logger;
800
814
  constructor(logger2) {
801
815
  this.logger = logger2;
802
816
  }
@@ -1064,10 +1078,22 @@ function detectLocale() {
1064
1078
  }
1065
1079
  __name(detectLocale, "detectLocale");
1066
1080
  var API = class {
1081
+ static {
1082
+ __name(this, "API");
1083
+ }
1084
+ baseUrl;
1085
+ _client;
1086
+ _token = null;
1087
+ _refreshToken = null;
1088
+ _locale = null;
1089
+ storage;
1090
+ options;
1091
+ // Sub-clients
1092
+ auth;
1093
+ oauth;
1094
+ user_profile;
1095
+ accounts;
1067
1096
  constructor(baseUrl, options) {
1068
- this._token = null;
1069
- this._refreshToken = null;
1070
- this._locale = null;
1071
1097
  this.baseUrl = baseUrl;
1072
1098
  this.options = options;
1073
1099
  const logger2 = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -1086,9 +1112,6 @@ var API = class {
1086
1112
  this.user_profile = this._client.user_profile;
1087
1113
  this.accounts = this._client.accounts;
1088
1114
  }
1089
- static {
1090
- __name(this, "API");
1091
- }
1092
1115
  _loadTokensFromStorage() {
1093
1116
  this._token = this.storage.getItem(TOKEN_KEY);
1094
1117
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY);
@@ -1229,6 +1252,8 @@ var APILogger2 = class {
1229
1252
  static {
1230
1253
  __name(this, "APILogger");
1231
1254
  }
1255
+ config;
1256
+ consola;
1232
1257
  constructor(config = {}) {
1233
1258
  this.config = { ...DEFAULT_CONFIG2, ...config };
1234
1259
  this.consola = config.consola || createConsola2({
@@ -1386,14 +1411,6 @@ var api = new API(
1386
1411
  storage: new LocalStorageAdapter()
1387
1412
  }
1388
1413
  );
1389
- var BaseClient = class {
1390
- static {
1391
- __name(this, "BaseClient");
1392
- }
1393
- static {
1394
- this.api = api;
1395
- }
1396
- };
1397
1414
 
1398
1415
  // src/auth/utils/logger.ts
1399
1416
  import { createConsola as createConsola3 } from "consola";