@extrahorizon/javascript-sdk 8.8.0-dev-113-a18b5d3 → 8.8.0-dev-114-8204b61
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 +5 -0
- package/build/index.cjs.js +1 -1
- package/build/index.mjs +1 -1
- package/build/types/services/types.d.ts +22 -0
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [8.8.0]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `exh.files.create` now accepts a `signal` option to supply an AbortSignal to cancel the file upload
|
|
12
|
+
|
|
8
13
|
## [8.7.1]
|
|
9
14
|
|
|
10
15
|
### Fixed
|
package/build/index.cjs.js
CHANGED
package/build/index.mjs
CHANGED
|
@@ -70,6 +70,28 @@ export interface FileUploadOptions extends OptionsBase {
|
|
|
70
70
|
loaded: number;
|
|
71
71
|
total: number;
|
|
72
72
|
}) => void;
|
|
73
|
+
/**
|
|
74
|
+
* AbortSignal to cancel the file upload.
|
|
75
|
+
*
|
|
76
|
+
* Example usage:
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const controller = new AbortController();
|
|
79
|
+
* const signal = controller.signal;
|
|
80
|
+
*
|
|
81
|
+
* try {
|
|
82
|
+
* await exh.files.create(file, { signal });
|
|
83
|
+
* } catch (error) {
|
|
84
|
+
* if (error instanceof RequestAbortedError) {
|
|
85
|
+
* console.log('File upload was cancelled, ignoring error');
|
|
86
|
+
* return;
|
|
87
|
+
* }
|
|
88
|
+
* throw error; // Handle other errors
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* // To cancel the upload, call:
|
|
92
|
+
* controller.abort();
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
73
95
|
signal?: AbortSignal;
|
|
74
96
|
}
|
|
75
97
|
export declare type PagedResultWithPager<T> = PagedResult<T> & {
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.8.0-dev-
|
|
1
|
+
export declare const version = "8.8.0-dev-114-8204b61";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.8.0-dev-
|
|
3
|
+
"version": "8.8.0-dev-114-8204b61",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|