@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/hooks.mjs CHANGED
@@ -21,6 +21,7 @@ var Auth = class {
21
21
  static {
22
22
  __name(this, "Auth");
23
23
  }
24
+ client;
24
25
  constructor(client) {
25
26
  this.client = client;
26
27
  }
@@ -38,6 +39,7 @@ var Oauth = class {
38
39
  static {
39
40
  __name(this, "Oauth");
40
41
  }
42
+ client;
41
43
  constructor(client) {
42
44
  this.client = client;
43
45
  }
@@ -95,6 +97,7 @@ var UserProfile = class {
95
97
  static {
96
98
  __name(this, "UserProfile");
97
99
  }
100
+ client;
98
101
  constructor(client) {
99
102
  this.client = client;
100
103
  }
@@ -177,6 +180,7 @@ var Accounts = class {
177
180
  static {
178
181
  __name(this, "Accounts");
179
182
  }
183
+ client;
180
184
  constructor(client) {
181
185
  this.client = client;
182
186
  }
@@ -370,6 +374,8 @@ var APILogger = class {
370
374
  static {
371
375
  __name(this, "APILogger");
372
376
  }
377
+ config;
378
+ consola;
373
379
  constructor(config = {}) {
374
380
  this.config = { ...DEFAULT_CONFIG, ...config };
375
381
  this.consola = config.consola || createConsola({
@@ -565,10 +571,20 @@ __name(withRetry, "withRetry");
565
571
 
566
572
  // src/_api/generated/cfg_accounts/client.ts
567
573
  var APIClient = class {
574
+ static {
575
+ __name(this, "APIClient");
576
+ }
577
+ baseUrl;
578
+ httpClient;
579
+ logger = null;
580
+ retryConfig = null;
581
+ tokenGetter = null;
582
+ // Sub-clients
583
+ auth;
584
+ oauth;
585
+ user_profile;
586
+ accounts;
568
587
  constructor(baseUrl, options) {
569
- this.logger = null;
570
- this.retryConfig = null;
571
- this.tokenGetter = null;
572
588
  this.baseUrl = baseUrl.replace(/\/$/, "");
573
589
  this.httpClient = options?.httpClient || new FetchAdapter();
574
590
  this.tokenGetter = options?.tokenGetter || null;
@@ -583,9 +599,6 @@ var APIClient = class {
583
599
  this.user_profile = new UserProfile(this);
584
600
  this.accounts = new Accounts(this);
585
601
  }
586
- static {
587
- __name(this, "APIClient");
588
- }
589
602
  /**
590
603
  * Get CSRF token from cookies (for SessionAuthentication).
591
604
  *
@@ -792,6 +805,7 @@ var LocalStorageAdapter = class {
792
805
  static {
793
806
  __name(this, "LocalStorageAdapter");
794
807
  }
808
+ logger;
795
809
  constructor(logger) {
796
810
  this.logger = logger;
797
811
  }
@@ -1614,10 +1628,22 @@ function detectLocale() {
1614
1628
  }
1615
1629
  __name(detectLocale, "detectLocale");
1616
1630
  var API = class {
1631
+ static {
1632
+ __name(this, "API");
1633
+ }
1634
+ baseUrl;
1635
+ _client;
1636
+ _token = null;
1637
+ _refreshToken = null;
1638
+ _locale = null;
1639
+ storage;
1640
+ options;
1641
+ // Sub-clients
1642
+ auth;
1643
+ oauth;
1644
+ user_profile;
1645
+ accounts;
1617
1646
  constructor(baseUrl, options) {
1618
- this._token = null;
1619
- this._refreshToken = null;
1620
- this._locale = null;
1621
1647
  this.baseUrl = baseUrl;
1622
1648
  this.options = options;
1623
1649
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -1636,9 +1662,6 @@ var API = class {
1636
1662
  this.user_profile = this._client.user_profile;
1637
1663
  this.accounts = this._client.accounts;
1638
1664
  }
1639
- static {
1640
- __name(this, "API");
1641
- }
1642
1665
  _loadTokensFromStorage() {
1643
1666
  this._token = this.storage.getItem(TOKEN_KEY);
1644
1667
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY);