@medusajs/js-sdk 1.0.0-rc-20241018141633 → 1.0.0-rc-20241022152047

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/dist/admin/api-key.d.ts +144 -1
  2. package/dist/admin/api-key.d.ts.map +1 -1
  3. package/dist/admin/api-key.js +143 -0
  4. package/dist/admin/api-key.js.map +1 -1
  5. package/dist/admin/campaign.d.ts +135 -0
  6. package/dist/admin/campaign.d.ts.map +1 -1
  7. package/dist/admin/campaign.js +135 -0
  8. package/dist/admin/campaign.js.map +1 -1
  9. package/dist/admin/claim.d.ts +542 -20
  10. package/dist/admin/claim.d.ts.map +1 -1
  11. package/dist/admin/claim.js +523 -7
  12. package/dist/admin/claim.js.map +1 -1
  13. package/dist/admin/currency.d.ts +80 -1
  14. package/dist/admin/currency.d.ts.map +1 -1
  15. package/dist/admin/currency.js +81 -2
  16. package/dist/admin/currency.js.map +1 -1
  17. package/dist/admin/customer-group.d.ts +152 -2
  18. package/dist/admin/customer-group.d.ts.map +1 -1
  19. package/dist/admin/customer-group.js +150 -0
  20. package/dist/admin/customer-group.js.map +1 -1
  21. package/dist/admin/customer.d.ts +135 -13
  22. package/dist/admin/customer.d.ts.map +1 -1
  23. package/dist/admin/customer.js +130 -0
  24. package/dist/admin/customer.js.map +1 -1
  25. package/dist/admin/exchange.d.ts +471 -20
  26. package/dist/admin/exchange.d.ts.map +1 -1
  27. package/dist/admin/exchange.js +455 -30
  28. package/dist/admin/exchange.js.map +1 -1
  29. package/dist/admin/fulfillment-provider.d.ts +47 -0
  30. package/dist/admin/fulfillment-provider.d.ts.map +1 -1
  31. package/dist/admin/fulfillment-provider.js +47 -0
  32. package/dist/admin/fulfillment-provider.js.map +1 -1
  33. package/dist/admin/fulfillment-set.d.ts +122 -0
  34. package/dist/admin/fulfillment-set.d.ts.map +1 -1
  35. package/dist/admin/fulfillment-set.js +122 -0
  36. package/dist/admin/fulfillment-set.js.map +1 -1
  37. package/dist/admin/fulfillment.d.ts +74 -0
  38. package/dist/admin/fulfillment.d.ts.map +1 -1
  39. package/dist/admin/fulfillment.js +75 -0
  40. package/dist/admin/fulfillment.js.map +1 -1
  41. package/dist/admin/inventory-item.d.ts +252 -1
  42. package/dist/admin/inventory-item.d.ts.map +1 -1
  43. package/dist/admin/inventory-item.js +251 -0
  44. package/dist/admin/inventory-item.js.map +1 -1
  45. package/dist/admin/invite.d.ts +170 -15
  46. package/dist/admin/invite.d.ts.map +1 -1
  47. package/dist/admin/invite.js +162 -0
  48. package/dist/admin/invite.js.map +1 -1
  49. package/dist/admin/order.d.ts +1 -0
  50. package/dist/admin/order.d.ts.map +1 -1
  51. package/dist/admin/order.js +6 -0
  52. package/dist/admin/order.js.map +1 -1
  53. package/dist/auth/index.d.ts +156 -0
  54. package/dist/auth/index.d.ts.map +1 -1
  55. package/dist/auth/index.js +152 -1
  56. package/dist/auth/index.js.map +1 -1
  57. package/dist/client.d.ts +1 -1
  58. package/dist/client.d.ts.map +1 -1
  59. package/dist/client.js +2 -1
  60. package/dist/client.js.map +1 -1
  61. package/dist/esm/admin/api-key.d.ts +144 -1
  62. package/dist/esm/admin/api-key.d.ts.map +1 -1
  63. package/dist/esm/admin/api-key.js +143 -0
  64. package/dist/esm/admin/api-key.js.map +1 -1
  65. package/dist/esm/admin/campaign.d.ts +135 -0
  66. package/dist/esm/admin/campaign.d.ts.map +1 -1
  67. package/dist/esm/admin/campaign.js +135 -0
  68. package/dist/esm/admin/campaign.js.map +1 -1
  69. package/dist/esm/admin/claim.d.ts +542 -20
  70. package/dist/esm/admin/claim.d.ts.map +1 -1
  71. package/dist/esm/admin/claim.js +523 -9
  72. package/dist/esm/admin/claim.js.map +1 -1
  73. package/dist/esm/admin/currency.d.ts +80 -1
  74. package/dist/esm/admin/currency.d.ts.map +1 -1
  75. package/dist/esm/admin/currency.js +81 -2
  76. package/dist/esm/admin/currency.js.map +1 -1
  77. package/dist/esm/admin/customer-group.d.ts +152 -2
  78. package/dist/esm/admin/customer-group.d.ts.map +1 -1
  79. package/dist/esm/admin/customer-group.js +150 -0
  80. package/dist/esm/admin/customer-group.js.map +1 -1
  81. package/dist/esm/admin/customer.d.ts +135 -13
  82. package/dist/esm/admin/customer.d.ts.map +1 -1
  83. package/dist/esm/admin/customer.js +130 -0
  84. package/dist/esm/admin/customer.js.map +1 -1
  85. package/dist/esm/admin/exchange.d.ts +471 -20
  86. package/dist/esm/admin/exchange.d.ts.map +1 -1
  87. package/dist/esm/admin/exchange.js +455 -38
  88. package/dist/esm/admin/exchange.js.map +1 -1
  89. package/dist/esm/admin/fulfillment-provider.d.ts +47 -0
  90. package/dist/esm/admin/fulfillment-provider.d.ts.map +1 -1
  91. package/dist/esm/admin/fulfillment-provider.js +47 -0
  92. package/dist/esm/admin/fulfillment-provider.js.map +1 -1
  93. package/dist/esm/admin/fulfillment-set.d.ts +122 -0
  94. package/dist/esm/admin/fulfillment-set.d.ts.map +1 -1
  95. package/dist/esm/admin/fulfillment-set.js +122 -0
  96. package/dist/esm/admin/fulfillment-set.js.map +1 -1
  97. package/dist/esm/admin/fulfillment.d.ts +74 -0
  98. package/dist/esm/admin/fulfillment.d.ts.map +1 -1
  99. package/dist/esm/admin/fulfillment.js +75 -0
  100. package/dist/esm/admin/fulfillment.js.map +1 -1
  101. package/dist/esm/admin/inventory-item.d.ts +252 -1
  102. package/dist/esm/admin/inventory-item.d.ts.map +1 -1
  103. package/dist/esm/admin/inventory-item.js +251 -0
  104. package/dist/esm/admin/inventory-item.js.map +1 -1
  105. package/dist/esm/admin/invite.d.ts +170 -15
  106. package/dist/esm/admin/invite.d.ts.map +1 -1
  107. package/dist/esm/admin/invite.js +162 -0
  108. package/dist/esm/admin/invite.js.map +1 -1
  109. package/dist/esm/admin/order.d.ts +1 -0
  110. package/dist/esm/admin/order.d.ts.map +1 -1
  111. package/dist/esm/admin/order.js +8 -0
  112. package/dist/esm/admin/order.js.map +1 -1
  113. package/dist/esm/auth/index.d.ts +156 -0
  114. package/dist/esm/auth/index.d.ts.map +1 -1
  115. package/dist/esm/auth/index.js +152 -1
  116. package/dist/esm/auth/index.js.map +1 -1
  117. package/dist/esm/client.d.ts +1 -1
  118. package/dist/esm/client.d.ts.map +1 -1
  119. package/dist/esm/client.js +2 -1
  120. package/dist/esm/client.js.map +1 -1
  121. package/dist/esm/store/index.d.ts +973 -83
  122. package/dist/esm/store/index.d.ts.map +1 -1
  123. package/dist/esm/store/index.js +946 -0
  124. package/dist/esm/store/index.js.map +1 -1
  125. package/dist/esm/types.d.ts +6 -1
  126. package/dist/esm/types.d.ts.map +1 -1
  127. package/dist/store/index.d.ts +973 -83
  128. package/dist/store/index.d.ts.map +1 -1
  129. package/dist/store/index.js +946 -0
  130. package/dist/store/index.js.map +1 -1
  131. package/dist/types.d.ts +6 -1
  132. package/dist/types.d.ts.map +1 -1
  133. package/package.json +2 -2
@@ -9,6 +9,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  export class Auth {
11
11
  constructor(client, config) {
12
+ /**
13
+ * This method is used to retrieve a registration JWT token for a user, customer, or custom actor type. It sends a request to the
14
+ * [Retrieve Registration Token API route](https://docs.medusajs.com/v2/api/store#auth_postactor_typeauth_provider_register).
15
+ *
16
+ * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
17
+ * @param method - The authentication provider to use. For example, `emailpass` or `google`.
18
+ * @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
19
+ * you pass the email and password.
20
+ * @returns The JWT token used for registration later.
21
+ *
22
+ * @example
23
+ * sdk.auth.register(
24
+ * "customer",
25
+ * "emailpass",
26
+ * {
27
+ * email: "customer@gmail.com",
28
+ * password: "supersecret"
29
+ * }
30
+ * ).then((token) => {
31
+ * console.log(token)
32
+ * })
33
+ */
12
34
  this.register = (actor, method, payload) => __awaiter(this, void 0, void 0, function* () {
13
35
  const { token } = yield this.client.fetch(`/auth/${actor}/${method}/register`, {
14
36
  method: "POST",
@@ -17,6 +39,34 @@ export class Auth {
17
39
  this.client.setToken(token);
18
40
  return token;
19
41
  });
42
+ /**
43
+ * This method retrieves the JWT authenticated token for an admin user, customer, or custom
44
+ * actor type. It sends a request to the [Authenticate API Route](https://docs.medusajs.com/v2/api/admin#auth_postactor_typeauth_provider).
45
+ *
46
+ * If the `auth.type` of the SDK is set to `session`, this method will also send a request to the
47
+ * [Set Authentication Session API route](https://docs.medusajs.com/v2/api/admin#auth_postsession).
48
+ *
49
+ * Subsequent requests using the SDK will automatically have the necessary authentication headers / session
50
+ * set.
51
+ *
52
+ * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
53
+ * @param method - The authentication provider to use. For example, `emailpass` or `google`.
54
+ * @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
55
+ * you pass the email and password.
56
+ * @returns The authentication JWT token
57
+ *
58
+ * @example
59
+ * sdk.auth.login(
60
+ * "customer",
61
+ * "emailpass",
62
+ * {
63
+ * email: "customer@gmail.com",
64
+ * password: "supersecret"
65
+ * }
66
+ * ).then((token) => {
67
+ * console.log(token)
68
+ * })
69
+ */
20
70
  this.login = (actor, method, payload) => __awaiter(this, void 0, void 0, function* () {
21
71
  // There will either be token or location returned from the backend.
22
72
  const { token, location } = yield this.client.fetch(`/auth/${actor}/${method}`, {
@@ -31,7 +81,31 @@ export class Auth {
31
81
  yield this.setToken_(token);
32
82
  return token;
33
83
  });
34
- // The callback expects all query parameters from the Oauth callback to be passed to the backend, and the provider is in charge of parsing and validating them
84
+ /**
85
+ * This method is used to validate an Oauth callback from a third-party service, such as Google, for an admin user, customer, or custom actor types.
86
+ * It sends a request to the [Validate Authentication Callback](https://docs.medusajs.com/v2/api/admin#auth_postactor_typeauth_providercallback).
87
+ *
88
+ * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
89
+ * @param method - The authentication provider to use. For example, `google`.
90
+ * @param query - The query parameters from the Oauth callback, which should be passed to the API route.
91
+ * @returns The authentication JWT token
92
+ *
93
+ * @example
94
+ * sdk.auth.callback(
95
+ * "customer",
96
+ * "google",
97
+ * {
98
+ * code: "123",
99
+ * }
100
+ * ).then((token) => {
101
+ * console.log(token)
102
+ * })
103
+ *
104
+ *
105
+ * @privateRemarks
106
+ * The callback expects all query parameters from the Oauth callback to be passed to
107
+ * the backend, and the provider is in charge of parsing and validating them
108
+ */
35
109
  this.callback = (actor, method, query) => __awaiter(this, void 0, void 0, function* () {
36
110
  const { token } = yield this.client.fetch(`/auth/${actor}/${method}/callback`, {
37
111
  method: "GET",
@@ -40,6 +114,18 @@ export class Auth {
40
114
  yield this.setToken_(token);
41
115
  return token;
42
116
  });
117
+ /**
118
+ * This method refreshes a JWT authentication token, which is useful after validating the Oauth callback
119
+ * with {@link callback}. It sends a request to the [Refresh Authentication Token API route](https://docs.medusajs.com/v2/api/admin#auth_postadminauthtokenrefresh).
120
+ *
121
+ * @returns The refreshed JWT authentication token.
122
+ *
123
+ * @example
124
+ * sdk.auth.refresh()
125
+ * .then((token) => {
126
+ * console.log(token)
127
+ * })
128
+ */
43
129
  this.refresh = () => __awaiter(this, void 0, void 0, function* () {
44
130
  const { token } = yield this.client.fetch("/auth/token/refresh", {
45
131
  method: "POST",
@@ -49,6 +135,16 @@ export class Auth {
49
135
  yield this.setToken_(token);
50
136
  return token;
51
137
  });
138
+ /**
139
+ * This method deletes the authentication session of the currently logged-in user to log them out.
140
+ * It sends a request to the [Delete Authentication Session API route](https://docs.medusajs.com/v2/api/admin#auth_deletesession).
141
+ *
142
+ * @example
143
+ * sdk.auth.logout()
144
+ * .then(() => {
145
+ * // user is logged out
146
+ * })
147
+ */
52
148
  this.logout = () => __awaiter(this, void 0, void 0, function* () {
53
149
  var _a, _b;
54
150
  if (((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.type) === "session") {
@@ -58,6 +154,30 @@ export class Auth {
58
154
  }
59
155
  this.client.clearToken();
60
156
  });
157
+ /**
158
+ * This method requests a reset password token for an admin user, customer, or custom actor type.
159
+ * It sends a request to the [Generate Reset Password Token API route](https://docs.medusajs.com/v2/api/admin#auth_postactor_typeauth_providerresetpassword).
160
+ *
161
+ * To reset the password later using the token delivered to the user, use the {@link updateProvider} method.
162
+ *
163
+ * Related guide: [How to allow customers to reset their passwords in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password).
164
+ *
165
+ * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
166
+ * @param provider - The authentication provider to use. For example, `emailpass`.
167
+ * @param body - The data required to identify the user.
168
+ *
169
+ * @example
170
+ * sdk.auth.resetPassword(
171
+ * "customer",
172
+ * "emailpass",
173
+ * {
174
+ * identifier: "customer@gmail.com"
175
+ * }
176
+ * )
177
+ * .then(() => {
178
+ * // user receives token
179
+ * })
180
+ */
61
181
  this.resetPassword = (actor, provider, body) => __awaiter(this, void 0, void 0, function* () {
62
182
  yield this.client.fetch(`/auth/${actor}/${provider}/reset-password`, {
63
183
  method: "POST",
@@ -65,12 +185,43 @@ export class Auth {
65
185
  headers: { accept: "text/plain" }, // 201 Created response
66
186
  });
67
187
  });
188
+ /**
189
+ * This method is used to update user-related data authentication data.
190
+ *
191
+ * More specifically, use this method when updating the password of an admin user, customer, or
192
+ * custom actor type after requesting to reset their password with {@link resetPassword}.
193
+ *
194
+ * This method sends a request to [this API route](https://docs.medusajs.com/v2/api/admin#auth_postactor_typeauth_providerupdate).
195
+ *
196
+ * Related guide: [How to allow customers to reset their passwords in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/reset-password).
197
+ *
198
+ * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
199
+ * @param provider - The authentication provider to use. For example, `emailpass`.
200
+ * @param body - The data necessary to update the user's authentication data. When resetting the user's password,
201
+ * send the `email` and `password` properties.
202
+ *
203
+ * @example
204
+ * sdk.auth.updateProvider(
205
+ * "customer",
206
+ * "emailpass",
207
+ * {
208
+ * email: "customer@gmail.com",
209
+ * password: "supersecret"
210
+ * }
211
+ * )
212
+ * .then(() => {
213
+ * // password updated
214
+ * })
215
+ */
68
216
  this.updateProvider = (actor, provider, body) => __awaiter(this, void 0, void 0, function* () {
69
217
  yield this.client.fetch(`/auth/${actor}/${provider}/update`, {
70
218
  method: "POST",
71
219
  body,
72
220
  });
73
221
  });
222
+ /**
223
+ * @ignore
224
+ */
74
225
  this.setToken_ = (token) => __awaiter(this, void 0, void 0, function* () {
75
226
  var _a, _b;
76
227
  // By default we just set the token in the configured storage, if configured to use sessions we convert it into session storage instead.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,IAAI;IAIf,YAAY,MAAc,EAAE,MAAc;QAK1C,aAAQ,GAAG,CACT,KAAa,EACb,MAAc,EACd,OAA+C,EAC/C,EAAE;YACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CACvC,SAAS,KAAK,IAAI,MAAM,WAAW,EACnC;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,OAAO;aACd,CACF,CAAA;YAED,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAE3B,OAAO,KAAK,CAAA;QACd,CAAC,CAAA,CAAA;QAED,UAAK,GAAG,CACN,KAAa,EACb,MAAc,EACd,OAAyE,EACzE,EAAE;YACF,oEAAoE;YACpE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAGhD,SAAS,KAAK,IAAI,MAAM,EAAE,EAAE;gBAC7B,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,OAAO;aACd,CAAC,CAAA;YAEF,gFAAgF;YAChF,4EAA4E;YAC5E,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,EAAE,QAAQ,EAAE,CAAA;YACrB,CAAC;YAED,MAAM,IAAI,CAAC,SAAS,CAAC,KAAe,CAAC,CAAA;YACrC,OAAO,KAAe,CAAA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MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE;oBACvC,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,KAAK,EAAE,EAAE;iBAC9C,CAAC,CAAA;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC,CAAA,CAAA;QAtRC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CAqRF"}
@@ -52,7 +52,7 @@ export declare class Client {
52
52
  protected setToken_: (token: string) => void;
53
53
  protected getToken_: () => string | null | undefined;
54
54
  protected getTokenStorageInfo_: () => {
55
- storageMethod: "session" | "local" | "memory";
55
+ storageMethod: "session" | "local" | "memory" | "nostore";
56
56
  storageKey: string;
57
57
  };
58
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,UAAU,EACV,mBAAmB,EAEpB,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,sBAAsB,0BAA0B,CAAA;AA6D7D,qBAAa,UAAW,SAAQ,KAAK;IACnC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;gBAElB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAKlE;AAED,qBAAa,MAAM;IACV,MAAM,EAAE,WAAW,CAAA;IAC1B,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,uBAAuB,CAAsB;IACrD,OAAO,CAAC,KAAK,CAAK;gBAEN,MAAM,EAAE,MAAM;IAiB1B;;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AO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;IAEtB,OAAO,CAAC,uBAAuB,CAAsB;IACrD,OAAO,CAAC,KAAK,CAAK;gBAEN,MAAM,EAAE,MAAM;IAiB1B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,CAAC,SAAS,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC;IAIrE;;;;;;;;;OASG;IACG,WAAW,CACf,KAAK,EAAE,UAAU,EACjB,IAAI,CAAC,EAAE,SAAS,GACf,OAAO,CAAC,mBAAmB,CAAC;IAiB/B,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,UAAU;IAIV,SAAS,CAAC,WAAW;IAkBrB,SAAS,CAAC,UAAU,IAAI,WAAW;IA2DnC,SAAS,CAAC,gBAAgB,QAAO;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,EAAE,CAI9D;IAED,SAAS,CAAC,wBAAwB,QAC9B;QAAE,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,EAAE,CAIL;IAED,SAAS,CAAC,aAAa,QAAO;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,EAAE,CAQ3D;IAED,SAAS,CAAC,SAAS,UAAW,MAAM,UAgBnC;IAED,SAAS,CAAC,SAAS,kCAelB;IAED,SAAS,CAAC,oBAAoB;;;MAqB7B;CACF"}
@@ -111,7 +111,8 @@ export class Client {
111
111
  var _a, _b;
112
112
  const hasLocal = hasStorage("localStorage");
113
113
  const hasSession = hasStorage("sessionStorage");
114
- const storageMethod = ((_a = this.config.auth) === null || _a === void 0 ? void 0 : _a.jwtTokenStorageMethod) || (hasLocal ? "local" : "memory");
114
+ const storageMethod = ((_a = this.config.auth) === null || _a === void 0 ? void 0 : _a.jwtTokenStorageMethod) ||
115
+ (hasLocal ? "local" : "nostore");
115
116
  const storageKey = ((_b = this.config.auth) === null || _b === void 0 ? void 0 : _b.jwtTokenStorageKey) || this.DEFAULT_JWT_STORAGE_KEY;
116
117
  if (!hasLocal && storageMethod === "local") {
117
118
  throw new Error("Local JWT storage is only available in the browser");
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAU3C,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAA;AAE7D,MAAM,UAAU,GAAG,CAAC,OAA0C,EAAE,EAAE;IAChE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,OAAO,IAAI,MAAM,CAAA;IAC1B,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IAC/B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC3C,uCACK,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,KACxC,aAAa,EAAE,YAAY,IAC5B;AACH,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CACvB,IAA2B,EAC3B,OAAgB,EAChB,MAAc,EACW,EAAE;;IAC3B,IAAI,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA;IACrB,IAAI,IAAI,KAAI,MAAA,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,0CAAE,QAAQ,CAAC,kBAAkB,CAAC,CAA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