@ticatec/restful_service_api 0.6.0 → 0.6.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/dist/FileService.d.ts +3 -3
- package/dist/RestService.d.ts +2 -2
- package/dist/UploadCallback.d.ts +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/FileService.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type UploadCallback from "./UploadCallback";
|
|
2
|
-
import type { UploadProgress } from "./UploadCallback";
|
|
3
|
-
import type { DataProcessor } from "./RestService";
|
|
1
|
+
import type UploadCallback from "./UploadCallback.js";
|
|
2
|
+
import type { UploadProgress } from "./UploadCallback.js";
|
|
3
|
+
import type { DataProcessor } from "./RestService.js";
|
|
4
4
|
/**
|
|
5
5
|
* File service interface for file upload and download operations
|
|
6
6
|
*/
|
package/dist/RestService.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ export type PostInterceptor = (data: any) => Promise<any>;
|
|
|
31
31
|
/**
|
|
32
32
|
* Error handler function type for handling request errors
|
|
33
33
|
* @param ex The error object
|
|
34
|
-
* @returns
|
|
34
|
+
* @returns Optional boolean or void. Errors always reject the returned Promise.
|
|
35
35
|
*/
|
|
36
|
-
export type ErrorHandler = (ex: Error) => boolean;
|
|
36
|
+
export type ErrorHandler = (ex: Error) => boolean | void;
|
|
37
37
|
/**
|
|
38
38
|
* RESTful API request options
|
|
39
39
|
*/
|
package/dist/UploadCallback.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import ApiError from "./ApiError";
|
|
2
|
-
import type { ApiErrorPayload } from "./ApiError";
|
|
3
|
-
import RestService from "./RestService";
|
|
4
|
-
import FileService from "./FileService";
|
|
5
|
-
import { ErrorHandler, PostInterceptor, PreInterceptor, DataProcessor } from "./RestService";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { RestfulOptions } from "./RestService";
|
|
1
|
+
import ApiError from "./ApiError.js";
|
|
2
|
+
import type { ApiErrorPayload } from "./ApiError.js";
|
|
3
|
+
import RestService from "./RestService.js";
|
|
4
|
+
import FileService from "./FileService.js";
|
|
5
|
+
import type { ErrorHandler, PostInterceptor, PreInterceptor, DataProcessor, PreInterceptorResult, RestfulOptions } from "./RestService.js";
|
|
6
|
+
import { CONTENT_TYPE_NAME, TYPE_JSON, TYPE_HTML, TYPE_TEXT } from "./RestService.js";
|
|
7
|
+
import type UploadCallback from "./UploadCallback.js";
|
|
8
|
+
import type { UploadProgress, ProgressUpdate, OnCompleted, OnUploaded } from "./UploadCallback.js";
|
|
10
9
|
export default RestService;
|
|
11
10
|
export { ApiError };
|
|
12
11
|
export type { ApiErrorPayload };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ApiError from "./ApiError";
|
|
2
|
-
import { CONTENT_TYPE_NAME, TYPE_JSON, TYPE_HTML, TYPE_TEXT } from "./RestService";
|
|
1
|
+
import ApiError from "./ApiError.js";
|
|
2
|
+
import { CONTENT_TYPE_NAME, TYPE_JSON, TYPE_HTML, TYPE_TEXT } from "./RestService.js";
|
|
3
3
|
export { ApiError };
|
|
4
4
|
export { CONTENT_TYPE_NAME, TYPE_JSON, TYPE_HTML, TYPE_TEXT };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@ticatec/restful_service_api",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"description": "A lightweight TypeScript RESTful API client for browsers with error handling. (ESM only, v0.6.0+)",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|