@commercetools/ts-client 0.0.0-beta.3 → 0.0.0-beta.4

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.
@@ -728,7 +728,7 @@ function createLoggerMiddleware$1(options) {
728
728
 
729
729
  var packageJson = {
730
730
  name: "@commercetools/ts-client",
731
- version: "0.0.0-beta.2",
731
+ version: "0.0.0-beta.3",
732
732
  engines: {
733
733
  node: ">=14"
734
734
  },
@@ -718,7 +718,7 @@ function createLoggerMiddleware$1(options) {
718
718
 
719
719
  var packageJson = {
720
720
  name: "@commercetools/ts-client",
721
- version: "0.0.0-beta.2",
721
+ version: "0.0.0-beta.3",
722
722
  engines: {
723
723
  node: ">=14"
724
724
  },
@@ -728,7 +728,7 @@ function createLoggerMiddleware$1(options) {
728
728
 
729
729
  var packageJson = {
730
730
  name: "@commercetools/ts-client",
731
- version: "0.0.0-beta.2",
731
+ version: "0.0.0-beta.3",
732
732
  engines: {
733
733
  node: ">=14"
734
734
  },
@@ -728,7 +728,7 @@ function createLoggerMiddleware$1(options) {
728
728
 
729
729
  var packageJson = {
730
730
  name: "@commercetools/ts-client",
731
- version: "0.0.0-beta.2",
731
+ version: "0.0.0-beta.3",
732
732
  engines: {
733
733
  node: ">=14"
734
734
  },
@@ -718,7 +718,7 @@ function createLoggerMiddleware$1(options) {
718
718
 
719
719
  var packageJson = {
720
720
  name: "@commercetools/ts-client",
721
- version: "0.0.0-beta.2",
721
+ version: "0.0.0-beta.3",
722
722
  engines: {
723
723
  node: ">=14"
724
724
  },
@@ -1,5 +1,4 @@
1
1
  import { Buffer } from 'buffer/'
2
- import fetch from 'node-fetch'
3
2
 
4
3
  export type Nullable<T> = T | null
5
4
  export type JsonObject<T = unknown> = { [key: string]: T }
@@ -8,8 +7,8 @@ export type MiddlewareRequest = ClientRequest
8
7
  export type Middleware = (next: Next) => (request: MiddlewareRequest) => Promise<MiddlewareResponse>
9
8
 
10
9
  export type MiddlewareResponse = {
11
- resolve(response: JsonObject): void;
12
- reject(error: JsonObject): void;
10
+ resolve: Function;
11
+ reject: Function;
13
12
  body?: JsonObject;
14
13
  error?: HttpErrorType;
15
14
  statusCode: number;
@@ -44,8 +43,8 @@ export interface ClientRequest {
44
43
  queryParams?: VariableMap
45
44
  body?: string | Buffer
46
45
  response?: ClientResponse
47
- resolve?: (response: JsonObject) => void;
48
- reject?: (error: JsonObject) => void;
46
+ resolve?: Function;
47
+ reject?: Function;
49
48
  [key: string]: any
50
49
  }
51
50
 
@@ -100,7 +99,7 @@ export type AuthMiddlewareOptions = {
100
99
  scopes?: Array<string>
101
100
  // For internal usage only
102
101
  oauthUri?: string
103
- httpClient?: fetch | Function
102
+ httpClient?: Function
104
103
  tokenCache?: TokenCache
105
104
  }
106
105
 
@@ -140,7 +139,7 @@ export type RefreshAuthMiddlewareOptions = {
140
139
  tokenCache?: TokenCache,
141
140
  // For internal usage only
142
141
  oauthUri?: string
143
- httpClient?: any
142
+ httpClient?: Function
144
143
  }
145
144
 
146
145
  export type RequestStateStore = {
@@ -162,13 +161,13 @@ type requestBaseOptions = {
162
161
 
163
162
  export type executeRequestOptions = requestBaseOptions & {
164
163
  next: Next
165
- httpClient: any
164
+ httpClient: Function
166
165
  userOption?: AuthMiddlewareOptions | PasswordAuthMiddlewareOptions
167
166
  }
168
167
 
169
168
  export type AuthMiddlewareBaseOptions = requestBaseOptions & {
170
169
  request: MiddlewareRequest
171
- httpClient?: any
170
+ httpClient?: Function
172
171
  }
173
172
 
174
173
  export type RequestState = boolean
@@ -195,7 +194,7 @@ export type PasswordAuthMiddlewareOptions = {
195
194
  tokenCache?: TokenCache,
196
195
  // For internal usage only
197
196
  oauthUri?: string
198
- httpClient?: any
197
+ httpClient?: Function
199
198
  }
200
199
 
201
200
  export type TokenInfo = {
@@ -236,7 +235,7 @@ export type HttpMiddlewareOptions = {
236
235
  export type HttpOptions = {
237
236
  url: string
238
237
  clientOptions: IClientOptions
239
- httpClient: any
238
+ httpClient: Function
240
239
  }
241
240
 
242
241
  export type LogLevel = 'INFO' | 'ERROR'
@@ -289,7 +288,7 @@ export type IClientOptions = {
289
288
  body?: string | Buffer
290
289
  timeout?: number
291
290
  abortController?: AbortController
292
- [k: string | number | symbol]: unknown
291
+ [k: string | number]: unknown
293
292
  }
294
293
 
295
294
  export type HttpClientConfig = IClientOptions & {
@@ -306,9 +305,9 @@ export type TResponse = {
306
305
  errors?: any
307
306
  error?: string
308
307
  message: string
309
- [k: string | number | symbol]: any
308
+ [k: string | number]: any
310
309
  }
311
- [k: string | number | symbol]: any
310
+ [k: string | number]: any
312
311
  }
313
312
 
314
313
  export type Client = {
@@ -325,7 +324,7 @@ export type ProcessOptions = { accumulate?: boolean; total?: number }
325
324
  export type ErrorMiddlewareOptions = {}
326
325
  export type SuccessResult = {
327
326
  body: {
328
- results: Record<string | number | symbol, Record<string, any>>;
327
+ results: Record<string | number, Record<string, any>>;
329
328
  count: number;
330
329
  };
331
330
  statusCode: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/ts-client",
3
- "version": "0.0.0-beta.3",
3
+ "version": "0.0.0-beta.4",
4
4
  "engines": {
5
5
  "node": ">=14"
6
6
  },