@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/hooks.cjs CHANGED
@@ -68,6 +68,7 @@ var Auth = class {
68
68
  static {
69
69
  __name(this, "Auth");
70
70
  }
71
+ client;
71
72
  constructor(client) {
72
73
  this.client = client;
73
74
  }
@@ -85,6 +86,7 @@ var Oauth = class {
85
86
  static {
86
87
  __name(this, "Oauth");
87
88
  }
89
+ client;
88
90
  constructor(client) {
89
91
  this.client = client;
90
92
  }
@@ -142,6 +144,7 @@ var UserProfile = class {
142
144
  static {
143
145
  __name(this, "UserProfile");
144
146
  }
147
+ client;
145
148
  constructor(client) {
146
149
  this.client = client;
147
150
  }
@@ -224,6 +227,7 @@ var Accounts = class {
224
227
  static {
225
228
  __name(this, "Accounts");
226
229
  }
230
+ client;
227
231
  constructor(client) {
228
232
  this.client = client;
229
233
  }
@@ -417,6 +421,8 @@ var APILogger = class {
417
421
  static {
418
422
  __name(this, "APILogger");
419
423
  }
424
+ config;
425
+ consola;
420
426
  constructor(config = {}) {
421
427
  this.config = { ...DEFAULT_CONFIG, ...config };
422
428
  this.consola = config.consola || (0, import_consola.createConsola)({
@@ -612,10 +618,20 @@ __name(withRetry, "withRetry");
612
618
 
613
619
  // src/_api/generated/cfg_accounts/client.ts
614
620
  var APIClient = class {
621
+ static {
622
+ __name(this, "APIClient");
623
+ }
624
+ baseUrl;
625
+ httpClient;
626
+ logger = null;
627
+ retryConfig = null;
628
+ tokenGetter = null;
629
+ // Sub-clients
630
+ auth;
631
+ oauth;
632
+ user_profile;
633
+ accounts;
615
634
  constructor(baseUrl, options) {
616
- this.logger = null;
617
- this.retryConfig = null;
618
- this.tokenGetter = null;
619
635
  this.baseUrl = baseUrl.replace(/\/$/, "");
620
636
  this.httpClient = options?.httpClient || new FetchAdapter();
621
637
  this.tokenGetter = options?.tokenGetter || null;
@@ -630,9 +646,6 @@ var APIClient = class {
630
646
  this.user_profile = new UserProfile(this);
631
647
  this.accounts = new Accounts(this);
632
648
  }
633
- static {
634
- __name(this, "APIClient");
635
- }
636
649
  /**
637
650
  * Get CSRF token from cookies (for SessionAuthentication).
638
651
  *
@@ -839,6 +852,7 @@ var LocalStorageAdapter = class {
839
852
  static {
840
853
  __name(this, "LocalStorageAdapter");
841
854
  }
855
+ logger;
842
856
  constructor(logger) {
843
857
  this.logger = logger;
844
858
  }
@@ -1661,10 +1675,22 @@ function detectLocale() {
1661
1675
  }
1662
1676
  __name(detectLocale, "detectLocale");
1663
1677
  var API = class {
1678
+ static {
1679
+ __name(this, "API");
1680
+ }
1681
+ baseUrl;
1682
+ _client;
1683
+ _token = null;
1684
+ _refreshToken = null;
1685
+ _locale = null;
1686
+ storage;
1687
+ options;
1688
+ // Sub-clients
1689
+ auth;
1690
+ oauth;
1691
+ user_profile;
1692
+ accounts;
1664
1693
  constructor(baseUrl, options) {
1665
- this._token = null;
1666
- this._refreshToken = null;
1667
- this._locale = null;
1668
1694
  this.baseUrl = baseUrl;
1669
1695
  this.options = options;
1670
1696
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -1683,9 +1709,6 @@ var API = class {
1683
1709
  this.user_profile = this._client.user_profile;
1684
1710
  this.accounts = this._client.accounts;
1685
1711
  }
1686
- static {
1687
- __name(this, "API");
1688
- }
1689
1712
  _loadTokensFromStorage() {
1690
1713
  this._token = this.storage.getItem(TOKEN_KEY);
1691
1714
  this._refreshToken = this.storage.getItem(REFRESH_TOKEN_KEY);