dff-util 1.3.2 → 1.3.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.
- package/README.md +7 -14
- package/dist/main/const-type.d.ts +5 -2
- package/dist/main/http.d.ts +1 -1
- package/dist/main/http.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -265,17 +265,6 @@ export type SessionUser = {
|
|
|
265
265
|
```
|
|
266
266
|
|
|
267
267
|
|
|
268
|
-
## SearchByLimitType
|
|
269
|
-
```
|
|
270
|
-
export type SearchByLimitType = {
|
|
271
|
-
limit: number;
|
|
272
|
-
skip: number;
|
|
273
|
-
query?: Record<string, any>;
|
|
274
|
-
orderBy?: string;
|
|
275
|
-
order: "ASC" | "DESC";
|
|
276
|
-
};
|
|
277
|
-
```
|
|
278
|
-
|
|
279
268
|
## CountryType
|
|
280
269
|
```
|
|
281
270
|
export type CountryType = {
|
|
@@ -348,22 +337,26 @@ export type ResponseType = {
|
|
|
348
337
|
limit?: number;
|
|
349
338
|
};
|
|
350
339
|
|
|
340
|
+
export type KeyValueType = {
|
|
341
|
+
[key: string]: any;
|
|
342
|
+
}
|
|
343
|
+
|
|
351
344
|
export type SearchByType = {
|
|
352
|
-
query?: Record<string, any>;
|
|
353
345
|
orderBy?: string;
|
|
354
346
|
order?: "ASC" | "DESC";
|
|
355
347
|
searchTerm?: string;
|
|
348
|
+
[key: string]: any;
|
|
356
349
|
};
|
|
357
350
|
|
|
358
|
-
|
|
359
351
|
export type SearchByLimitType = {
|
|
360
352
|
limit: number;
|
|
361
353
|
skip: number;
|
|
362
|
-
query?: Record<string, any>;
|
|
363
354
|
orderBy?: string;
|
|
364
355
|
order?: "ASC" | "DESC";
|
|
365
356
|
searchTerm?: string;
|
|
357
|
+
[key: string]: any;
|
|
366
358
|
};
|
|
359
|
+
|
|
367
360
|
```
|
|
368
361
|
|
|
369
362
|
|
|
@@ -28,18 +28,21 @@ export type ResponseType = {
|
|
|
28
28
|
limit?: number;
|
|
29
29
|
};
|
|
30
30
|
export type SearchByType = {
|
|
31
|
-
query?: Record<string, any>;
|
|
32
31
|
orderBy?: string;
|
|
33
32
|
order?: "ASC" | "DESC";
|
|
34
33
|
searchTerm?: string;
|
|
34
|
+
[key: string]: any;
|
|
35
35
|
};
|
|
36
36
|
export type SearchByLimitType = {
|
|
37
37
|
limit: number;
|
|
38
38
|
skip: number;
|
|
39
|
-
query?: Record<string, any>;
|
|
40
39
|
orderBy?: string;
|
|
41
40
|
order?: "ASC" | "DESC";
|
|
42
41
|
searchTerm?: string;
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
};
|
|
44
|
+
export type KeyValueType = {
|
|
45
|
+
[key: string]: any;
|
|
43
46
|
};
|
|
44
47
|
export type CountryType = {
|
|
45
48
|
code: string;
|
package/dist/main/http.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export declare class Http {
|
|
|
31
31
|
static Token(sessionInfo: any, appKey: string, apiKey?: string, type?: RespType): Promise<any>;
|
|
32
32
|
static FormUpload(url: string, file: File, isHeadersAddMultiForm?: boolean, data?: Record<string, any>, headers?: any, method?: 'POST' | 'PUT', type?: RespType): Promise<any>;
|
|
33
33
|
static CloudUpload(fullUrl: string, file: File, headers?: any, method?: 'POST' | 'PUT'): Promise<Response>;
|
|
34
|
-
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<
|
|
34
|
+
static FileDownload(fullUrl: string, params: any, headers?: any, method?: string): Promise<Blob>;
|
|
35
35
|
}
|
package/dist/main/http.js
CHANGED
|
@@ -200,8 +200,7 @@ class Http {
|
|
|
200
200
|
const requestOptions = { method: method, headers: headers };
|
|
201
201
|
const response = yield fetch(fullUrl, requestOptions);
|
|
202
202
|
const blob = yield response.blob();
|
|
203
|
-
|
|
204
|
-
return buffer;
|
|
203
|
+
return blob;
|
|
205
204
|
}
|
|
206
205
|
catch (error) {
|
|
207
206
|
throw { url: fullUrl, requestId: headers['request-id'], error: error };
|