@commercetools/sdk-client-v2 1.2.0 → 1.4.1
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/CHANGELOG.md +29 -0
- package/README.md +2 -2
- package/dist/commercetools-sdk-client-v2.browser.cjs.js +162 -121
- package/dist/commercetools-sdk-client-v2.browser.esm.js +162 -122
- package/dist/commercetools-sdk-client-v2.cjs.dev.js +162 -121
- package/dist/commercetools-sdk-client-v2.cjs.prod.js +162 -121
- package/dist/commercetools-sdk-client-v2.esm.js +162 -122
- package/dist/commercetools-sdk-client-v2.umd.js +1 -1
- package/dist/declarations/src/client-builder/ClientBuilder.d.ts +3 -3
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/declarations/src/sdk-client/client.d.ts +2 -1
- package/dist/declarations/src/sdk-middleware-http/http.d.ts +1 -1
- package/dist/declarations/src/sdk-middleware-user-agent/user-agent.d.ts +2 -2
- package/dist/declarations/src/types/sdk.d.ts +17 -10
- package/package.json +6 -5
|
@@ -163,7 +163,11 @@ export type AuthMiddlewareOptions = {
|
|
|
163
163
|
scopes?: Array<string>
|
|
164
164
|
// For internal usage only
|
|
165
165
|
oauthUri?: string
|
|
166
|
-
|
|
166
|
+
/**
|
|
167
|
+
* fix until we understand how to
|
|
168
|
+
* type the new node-fetch version
|
|
169
|
+
*/
|
|
170
|
+
fetch?: any
|
|
167
171
|
tokenCache?: TokenCache
|
|
168
172
|
}
|
|
169
173
|
|
|
@@ -179,7 +183,7 @@ export type AuthOptions = {
|
|
|
179
183
|
}
|
|
180
184
|
headers?: JsonObject<string>
|
|
181
185
|
scopes?: Array<string>
|
|
182
|
-
fetch?:
|
|
186
|
+
fetch?: any
|
|
183
187
|
}
|
|
184
188
|
|
|
185
189
|
export type CustomAuthOptions = {
|
|
@@ -194,7 +198,7 @@ export type CustomAuthOptions = {
|
|
|
194
198
|
}
|
|
195
199
|
headers?: JsonObject<string>
|
|
196
200
|
scopes?: Array<string>
|
|
197
|
-
fetch?:
|
|
201
|
+
fetch?: any
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
export type TokenInfo = {
|
|
@@ -217,7 +221,7 @@ export type AnonymousAuthMiddlewareOptions = {
|
|
|
217
221
|
scopes?: Array<string>
|
|
218
222
|
// For internal usage only
|
|
219
223
|
oauthUri?: string
|
|
220
|
-
fetch?:
|
|
224
|
+
fetch?: any
|
|
221
225
|
tokenCache?: TokenCache
|
|
222
226
|
}
|
|
223
227
|
|
|
@@ -231,7 +235,7 @@ export type RefreshAuthMiddlewareOptions = {
|
|
|
231
235
|
refreshToken: string
|
|
232
236
|
// For internal usage only
|
|
233
237
|
oauthUri?: string
|
|
234
|
-
fetch?:
|
|
238
|
+
fetch?: any
|
|
235
239
|
}
|
|
236
240
|
|
|
237
241
|
export type Task = {
|
|
@@ -273,12 +277,12 @@ type requestBaseOptions = {
|
|
|
273
277
|
tokenCacheKey?: TokenCacheOptions
|
|
274
278
|
}
|
|
275
279
|
export type executeRequestOptions = requestBaseOptions & {
|
|
276
|
-
fetcher:
|
|
280
|
+
fetcher: any
|
|
277
281
|
}
|
|
278
282
|
|
|
279
283
|
export type AuthMiddlewareBaseOptions = requestBaseOptions & {
|
|
280
284
|
request: MiddlewareRequest
|
|
281
|
-
fetch?:
|
|
285
|
+
fetch?: any
|
|
282
286
|
}
|
|
283
287
|
|
|
284
288
|
export type UserAuthOptions = {
|
|
@@ -302,7 +306,7 @@ export type PasswordAuthMiddlewareOptions = {
|
|
|
302
306
|
scopes?: Array<string>
|
|
303
307
|
// For internal usage only
|
|
304
308
|
oauthUri?: string
|
|
305
|
-
fetch?:
|
|
309
|
+
fetch?: any
|
|
306
310
|
}
|
|
307
311
|
|
|
308
312
|
export type HttpMiddlewareOptions = {
|
|
@@ -311,6 +315,7 @@ export type HttpMiddlewareOptions = {
|
|
|
311
315
|
includeHeaders?: boolean
|
|
312
316
|
includeResponseHeaders?: boolean
|
|
313
317
|
includeOriginalRequest?: boolean
|
|
318
|
+
includeRequestInErrorResponse?: boolean
|
|
314
319
|
maskSensitiveHeaderData?: boolean
|
|
315
320
|
timeout?: number
|
|
316
321
|
enableRetry?: boolean
|
|
@@ -319,8 +324,9 @@ export type HttpMiddlewareOptions = {
|
|
|
319
324
|
retryDelay?: number
|
|
320
325
|
backoff?: boolean
|
|
321
326
|
maxDelay?: number
|
|
327
|
+
retryCodes?: Array<number | string>,
|
|
322
328
|
}
|
|
323
|
-
fetch?:
|
|
329
|
+
fetch?: any
|
|
324
330
|
abortController?: AbortController // deprecated
|
|
325
331
|
getAbortController?: () => AbortController
|
|
326
332
|
}
|
|
@@ -480,12 +486,13 @@ export type ApiRequestBuilder = {
|
|
|
480
486
|
|
|
481
487
|
/* HTTP User Agent */
|
|
482
488
|
export type HttpUserAgentOptions = {
|
|
483
|
-
name
|
|
489
|
+
name?: string
|
|
484
490
|
version?: string
|
|
485
491
|
libraryName?: string
|
|
486
492
|
libraryVersion?: string
|
|
487
493
|
contactUrl?: string
|
|
488
494
|
contactEmail?: string
|
|
495
|
+
customAgent?: string
|
|
489
496
|
}
|
|
490
497
|
|
|
491
498
|
/* Sync Actions */
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/sdk-client-v2",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "commercetools TypeScript SDK client.",
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "commercetools Composable Commerce TypeScript SDK client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commercetools",
|
|
7
|
+
"composable commerce",
|
|
7
8
|
"sdk",
|
|
8
9
|
"typescript",
|
|
9
10
|
"client",
|
|
@@ -44,10 +45,10 @@
|
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"abort-controller": "3.0.0",
|
|
46
47
|
"common-tags": "1.8.2",
|
|
47
|
-
"dotenv": "16.0.
|
|
48
|
-
"jest": "
|
|
48
|
+
"dotenv": "16.0.1",
|
|
49
|
+
"jest": "28.1.1",
|
|
49
50
|
"nock": "12.0.3",
|
|
50
|
-
"organize-imports-cli": "0.
|
|
51
|
+
"organize-imports-cli": "0.10.0"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
54
|
"organize_imports": "find src -type f -name '*.ts' | xargs organize-imports-cli",
|