@ibm-aspera/sdk 0.2.2
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/.editorconfig +13 -0
- package/.eslintrc.js +128 -0
- package/.github/CODE_OF_CONDUCT.md +128 -0
- package/.github/CONTRIBUTING.md +147 -0
- package/.github/workflows/ci.yml +36 -0
- package/.github/workflows/documentation.yml +43 -0
- package/.github/workflows/npm_upload.yml +30 -0
- package/.husky/pre-commit +4 -0
- package/CHANGELOG.md +124 -0
- package/LICENSE +201 -0
- package/README.md +25 -0
- package/dist/commonjs/app/core.d.ts +219 -0
- package/dist/commonjs/app/core.js +546 -0
- package/dist/commonjs/app/installer.d.ts +9 -0
- package/dist/commonjs/app/installer.js +50 -0
- package/dist/commonjs/constants/constants.d.ts +6 -0
- package/dist/commonjs/constants/constants.js +9 -0
- package/dist/commonjs/constants/messages.d.ts +29 -0
- package/dist/commonjs/constants/messages.js +32 -0
- package/dist/commonjs/helpers/client/client.d.ts +5 -0
- package/dist/commonjs/helpers/client/client.js +7 -0
- package/dist/commonjs/helpers/client/http-client.d.ts +42 -0
- package/dist/commonjs/helpers/client/http-client.js +84 -0
- package/dist/commonjs/helpers/client/safari-client.d.ts +99 -0
- package/dist/commonjs/helpers/client/safari-client.js +252 -0
- package/dist/commonjs/helpers/helpers.d.ts +84 -0
- package/dist/commonjs/helpers/helpers.js +197 -0
- package/dist/commonjs/helpers/http.d.ts +16 -0
- package/dist/commonjs/helpers/http.js +42 -0
- package/dist/commonjs/helpers/ws.d.ts +62 -0
- package/dist/commonjs/helpers/ws.js +182 -0
- package/dist/commonjs/index.d.ts +41 -0
- package/dist/commonjs/index.js +99 -0
- package/dist/commonjs/models/aspera-sdk.model.d.ts +213 -0
- package/dist/commonjs/models/aspera-sdk.model.js +288 -0
- package/dist/commonjs/models/models.d.ts +640 -0
- package/dist/commonjs/models/models.js +2 -0
- package/dist/js/aspera-sdk.js +3 -0
- package/dist/js/aspera-sdk.js.LICENSE.txt +7 -0
- package/dist/js/aspera-sdk.js.map +1 -0
- package/docs/DEVELOPMENT.md +38 -0
- package/jest.config.js +15 -0
- package/jest.setup.js +0 -0
- package/package.json +50 -0
- package/src/app/core.ts +610 -0
- package/src/app/installer.ts +53 -0
- package/src/constants/constants.ts +16 -0
- package/src/constants/messages.ts +29 -0
- package/src/helpers/client/client.ts +11 -0
- package/src/helpers/client/http-client.ts +92 -0
- package/src/helpers/client/safari-client.ts +318 -0
- package/src/helpers/helpers.ts +200 -0
- package/src/helpers/http.ts +39 -0
- package/src/helpers/ws.ts +215 -0
- package/src/index.html +404 -0
- package/src/index.ts +104 -0
- package/src/models/aspera-sdk.model.ts +360 -0
- package/src/models/models.ts +669 -0
- package/tests/client.spec.ts +52 -0
- package/tests/core.spec.ts +13 -0
- package/tests/helpers.spec.ts +124 -0
- package/tests/http.spec.ts +14 -0
- package/tests/installer.spec.ts +135 -0
- package/tests/mocks.ts +11 -0
- package/tsconfig.json +10 -0
- package/tsconfig.module.json +15 -0
- package/typedoc.js +17 -0
- package/webpack.config.js +53 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
export interface PromiseObject {
|
|
2
|
+
promise: Promise<any>;
|
|
3
|
+
resolver: (response?: any) => void;
|
|
4
|
+
rejecter: (response?: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ErrorResponse {
|
|
7
|
+
error: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
debugData?: any;
|
|
10
|
+
}
|
|
11
|
+
export interface FileFilter {
|
|
12
|
+
name: string;
|
|
13
|
+
extensions: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface FileDialogOptions {
|
|
16
|
+
/** The title of the file dialog */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Allow user to select multiple files */
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
/** The file types to filter by */
|
|
21
|
+
filters?: FileFilter[];
|
|
22
|
+
}
|
|
23
|
+
export interface FolderDialogOptions {
|
|
24
|
+
/** The title of the folder dialog */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Allow user to select multiple folders */
|
|
27
|
+
multiple?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Options related to fetching the latest Aspera installer information.
|
|
31
|
+
*
|
|
32
|
+
* These options allow clients to customize where the installer information is fetched from
|
|
33
|
+
* (e.g. when self-hosting) as well as which installer information is returned back to the caller.
|
|
34
|
+
*/
|
|
35
|
+
export interface InstallerOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Custom URL to fetch Aspera installers from. Generally this is only
|
|
38
|
+
* needed when self-hosting the installers rather than using the installers
|
|
39
|
+
* hosted on CloudFront.
|
|
40
|
+
*
|
|
41
|
+
* This URL should point to the directory containing the `latest.json` file that
|
|
42
|
+
* contains the installer information.
|
|
43
|
+
*
|
|
44
|
+
* Example: `https://example.com/aspera/sdk/downloads`
|
|
45
|
+
*/
|
|
46
|
+
endpoint?: string;
|
|
47
|
+
/**
|
|
48
|
+
* If `true`, the response will contain the installer info for all platforms.
|
|
49
|
+
* By default, only the installer info for the user's detected platform is returned.
|
|
50
|
+
*/
|
|
51
|
+
all?: true;
|
|
52
|
+
}
|
|
53
|
+
/** Data response containing the file(s) and folder(s) selected or dropped by the user. */
|
|
54
|
+
export interface DataTransferResponse {
|
|
55
|
+
dataTransfer: {
|
|
56
|
+
files: BrowserStyleFile[];
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface BrowserStyleFile {
|
|
60
|
+
/** Last modified date of the file in milliseconds since the UNIX epoch */
|
|
61
|
+
lastModified: number;
|
|
62
|
+
/** Absolute path of the file */
|
|
63
|
+
name: string;
|
|
64
|
+
/** Size in bytes of the file */
|
|
65
|
+
size: number;
|
|
66
|
+
/** Mime type of the file */
|
|
67
|
+
type: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ModifyTransferOptions {
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated Use `lock_min_rate_kbps` instead.
|
|
72
|
+
*/
|
|
73
|
+
lock_min_rate?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* If `true`, lock the minimum transfer rate to the value set for `min_rate_kbps`.
|
|
76
|
+
* If `false`, users can adjust the transfer rate up to the value set for `target_rate_cap_kbps`.
|
|
77
|
+
*/
|
|
78
|
+
lock_min_rate_kbps?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Lock the rate policy to the value set for `rate_policy`.
|
|
81
|
+
*/
|
|
82
|
+
lock_rate_policy?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Use `lock_target_rate_kbps` instead.
|
|
85
|
+
*/
|
|
86
|
+
lock_target_rate?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* If `true`, lock the target transfer rate to the default value set for `target_rate_kbps`.
|
|
89
|
+
* If `false`, users can adjust the transfer rate up to the value set for `target_rate_cap_kbps`.
|
|
90
|
+
*/
|
|
91
|
+
lock_target_rate_kbps?: boolean;
|
|
92
|
+
min_rate_kbps?: number;
|
|
93
|
+
/**
|
|
94
|
+
* The congestion control behavior to use when sharing bandwidth.
|
|
95
|
+
*
|
|
96
|
+
* - `fixed` - Transfer at the target rate regardless of actual network capacity. Do not share bandwidth. Not recommended.
|
|
97
|
+
* - `high` - When sharing bandwidth, transfer at twice the rate of a transfer using "fair" policy.
|
|
98
|
+
* - `fair` - Share bandwidth equally with other traffic.
|
|
99
|
+
* - `low` - Use only unutilized bandwidth.
|
|
100
|
+
*/
|
|
101
|
+
rate_policy?: 'fixed' | 'fair' | 'high' | 'low';
|
|
102
|
+
/** Ideal transfer rate, in kilobits per second. */
|
|
103
|
+
target_rate_kbps?: number;
|
|
104
|
+
/** Maximum target rate for incoming transfers, in kilobits per second. */
|
|
105
|
+
target_rate_cap_kbps?: number;
|
|
106
|
+
}
|
|
107
|
+
export interface ResumeTransferOptions {
|
|
108
|
+
remote_user?: string;
|
|
109
|
+
remote_password?: string;
|
|
110
|
+
token?: string;
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Use `content_protection_password` instead.
|
|
113
|
+
*/
|
|
114
|
+
content_protection_passphrase?: string;
|
|
115
|
+
content_protection_password?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface CustomBrandingOptions {
|
|
118
|
+
/** Display name for the branding template. This name is presented to the end user in the app settings when switching between different templates. */
|
|
119
|
+
name: string;
|
|
120
|
+
/** Custom theme template. */
|
|
121
|
+
theme: CustomTheme;
|
|
122
|
+
}
|
|
123
|
+
export interface AsperaSdkSpec {
|
|
124
|
+
/**
|
|
125
|
+
* By default, the destination of a download is relative to the user's download directory setting.
|
|
126
|
+
* Setting this value to `true` overrides this behavior, using absolute paths instead. This is useful
|
|
127
|
+
* if you want to allow users to download files to a specific directory.
|
|
128
|
+
*/
|
|
129
|
+
use_absolute_destination_path?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Base64 encoded preview image for the transfer. This image is displayed in the IBM Aspera transfer monitor
|
|
132
|
+
* alongside the transfer.
|
|
133
|
+
*/
|
|
134
|
+
preview_base64?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface Path {
|
|
137
|
+
/** Source path for the transfer */
|
|
138
|
+
source: string;
|
|
139
|
+
/** Destination path for the transfer */
|
|
140
|
+
destination?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface FaspProxy {
|
|
143
|
+
/** URL of proxy server */
|
|
144
|
+
url?: string;
|
|
145
|
+
/** Username for the proxy user */
|
|
146
|
+
usename?: string;
|
|
147
|
+
/** assword for the proxy user */
|
|
148
|
+
password?: string;
|
|
149
|
+
}
|
|
150
|
+
export type OverwritePolicy = 'none' | 'always' | 'diff' | 'older' | 'diff+older';
|
|
151
|
+
export type ResumePolicy = 'none' | 'attributes' | 'sparse_checksum' | 'full_checksum';
|
|
152
|
+
export interface TransferSpec {
|
|
153
|
+
/**
|
|
154
|
+
* The type of authentication to use.
|
|
155
|
+
* @deprecated Either set the `token` or `remote_password` fields instead.
|
|
156
|
+
*/
|
|
157
|
+
authentication?: 'token' | 'password';
|
|
158
|
+
/**
|
|
159
|
+
* The algorithm used to encrypt data sent during a transfer.
|
|
160
|
+
* @default "aes-128"
|
|
161
|
+
*/
|
|
162
|
+
cipher?: 'aes128' | 'aes192' | 'aes256' | 'aes128cfb' | 'aes192cfb' | 'aes256cfb' | 'aes128gcm' | 'aes192gcm' | 'aes256gcm' | 'none';
|
|
163
|
+
/**
|
|
164
|
+
* Enable content protection (encryption-at-rest). For uploads, set to `encrypt` to transfer
|
|
165
|
+
* files and store them on the server with the extension “.aspera-env”. To download and decrypt
|
|
166
|
+
* encrypted files, set to `decrypt`. `content_protection_password` must be specified if this option is set.
|
|
167
|
+
*/
|
|
168
|
+
content_protection?: 'encrypt' | 'decrypt';
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Use `content_protection_password` instead.
|
|
171
|
+
*/
|
|
172
|
+
content_protection_passphrase?: string;
|
|
173
|
+
/** Password to encrypt or decrypt files when using `content_protection`. */
|
|
174
|
+
content_protection_password?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Data to associate with the transfer. The cookie is reported to both client and server-side applications monitoring transfers.
|
|
177
|
+
* It is often used by applications to identify associated transfers.
|
|
178
|
+
*/
|
|
179
|
+
cookie?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Creates the destination directory if it does not already exist.
|
|
182
|
+
* When enabling this option, the destination path is assumed to be a directory path.
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
create_dir?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Before transfer, delete files that exist at the destination but not at the source.
|
|
188
|
+
* The source and destination arguments must be directories that have matching names.
|
|
189
|
+
* Objects on the destination that have the same name but different type or size as objects
|
|
190
|
+
* on the source are not deleted.
|
|
191
|
+
*/
|
|
192
|
+
delete_before_transfer?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* The transfer destination file path. If destinations are specified in `paths`, this value is prepended to each destination.
|
|
195
|
+
* Note that the download destination paths are relative to the user's Aspera SDK download directory setting.
|
|
196
|
+
*/
|
|
197
|
+
destination_root?: string;
|
|
198
|
+
/** Root ID at the destination */
|
|
199
|
+
destination_root_id?: string;
|
|
200
|
+
/** Delete the source directory after the assets are transferred */
|
|
201
|
+
delete_source?: boolean;
|
|
202
|
+
/** Directon of transfer, whether send (upload) or receive (download) */
|
|
203
|
+
direction?: 'send' | 'receive';
|
|
204
|
+
/**
|
|
205
|
+
* Exclude files (but not directories) that are newer than a specific time from the transfer, based on when the file was last modified.
|
|
206
|
+
* Express in ISO 8601 format (for exanple, 2006-01-02T15:04:05Z) or as number of seconds elapsed since 00:00:00 UTC on 1 January 1970.
|
|
207
|
+
*/
|
|
208
|
+
exclude_newer_than?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Exclude files (but not directories) that are older than a specific time from the transfer, based on when the file was last modified.
|
|
211
|
+
* Express in ISO 8601 format (for exanple, 2006-01-02T15:04:05Z) or as number of seconds elapsed since 00:00:00 UTC on 1 January 1970.
|
|
212
|
+
*/
|
|
213
|
+
exclude_older_than?: string;
|
|
214
|
+
/**
|
|
215
|
+
* The UDP port for the transfer. The default value is satisfactory for most situations. However, it can be changed to satisfy firewall requirements.
|
|
216
|
+
* @default 33001
|
|
217
|
+
*/
|
|
218
|
+
fasp_port?: number;
|
|
219
|
+
/** Proxy for communications between the remote server and the (local) client */
|
|
220
|
+
fasp_proxy?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Attempts to perform an HTTP transfer if a fasp™ transfer cannot be performed.
|
|
223
|
+
* @default false
|
|
224
|
+
*/
|
|
225
|
+
http_fallback?: boolean;
|
|
226
|
+
/** Port used for HTTP fallback server */
|
|
227
|
+
http_fallback_port?: number;
|
|
228
|
+
/** Port used for HTTPS fallback server */
|
|
229
|
+
https_fallback_port?: number;
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated Use `lock_min_rate_kbps` instead.
|
|
232
|
+
*/
|
|
233
|
+
lock_min_rate?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* If `true`, lock the minimum transfer rate to the value set for `min_rate_kbps`.
|
|
236
|
+
* If `false`, users can adjust the transfer rate up to the value set for `target_rate_cap_kbps`.
|
|
237
|
+
* @default false
|
|
238
|
+
*/
|
|
239
|
+
lock_min_rate_kbps?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* If true, lock the rate policy to the default value
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
lock_rate_policy?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* @deprecated Use `lock_target_rate_kbps` instead.
|
|
247
|
+
*/
|
|
248
|
+
lock_target_rate?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* If `true`, lock the target transfer rate to the default value set for `target_rate_kbps`.
|
|
251
|
+
* If `false`, users can adjust the transfer rate up to the value set for `target_rate_cap_kbps`.
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
lock_target_rate_kbps?: boolean;
|
|
255
|
+
/** Moves source files to directory after they are transferred correctly */
|
|
256
|
+
move_after_transfer?: string;
|
|
257
|
+
/** Split files across multiple ascp sessions to enable faster transfers. */
|
|
258
|
+
multi_session?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Split files across multiple ascp sessions if their size is greater than or equal to the specified value.
|
|
261
|
+
* @default 0 (no files are split)
|
|
262
|
+
*/
|
|
263
|
+
multi_session_threshold?: number;
|
|
264
|
+
/**
|
|
265
|
+
* Overwrite destination files with the source files of the same name.
|
|
266
|
+
*
|
|
267
|
+
* - `none` - Never overwrite the file. However, if the parent folder is not empty, its access, modify, and change times may still be updated.
|
|
268
|
+
* - `always` - Always overwrite the file. The destination file will be overwritten even if it is identical to the source.
|
|
269
|
+
* - `diff` - Overwrite the file if it is different from the source, depending on the `resume_policy` property.
|
|
270
|
+
* - `older` - Overwrite the file if its timestamp is older than the source timestamp.
|
|
271
|
+
* - `diff+older` - Overwrite the file if it is older and different than the source, depending on the `resume_policy` property.
|
|
272
|
+
*
|
|
273
|
+
* If the overwrite_policy is `diff` or `diff+older`, difference is determined by `resume_policy`. If `resume_policy` is empty or none is specified,
|
|
274
|
+
* the source and destination files are always considered different and the destination file is always overwritten. If `resume_policy` is `attributes`,
|
|
275
|
+
* the source and destination files are compared based on file attributes (currently file size). If `sparse_checksum`, the source and destination files
|
|
276
|
+
* are compared based on sparse checksum. If `full_checksum`, the source and destination files are compared based on full checksum.
|
|
277
|
+
* @default diff
|
|
278
|
+
*/
|
|
279
|
+
overwrite?: OverwritePolicy;
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated Use `overwrite` instead.
|
|
282
|
+
*/
|
|
283
|
+
overwrite_policy?: OverwritePolicy;
|
|
284
|
+
/**
|
|
285
|
+
* A list of the file and directory paths to transfer. Use `destination_root` to specify the destination directory.
|
|
286
|
+
* It is recommended to always specify both the `source` and `destination` properties for each path.
|
|
287
|
+
*/
|
|
288
|
+
paths?: Path[];
|
|
289
|
+
/** Calculate total size before transfer */
|
|
290
|
+
precalculate_job_size?: boolean;
|
|
291
|
+
/** Preserve the time the file was last accessed (read or write access) on the source. */
|
|
292
|
+
preserve_access_time?: boolean;
|
|
293
|
+
/** Preserve timestamp for when a file is created */
|
|
294
|
+
preserve_creation_time?: boolean;
|
|
295
|
+
/** Preserve the time the object was last modified (write access) on the source. */
|
|
296
|
+
preserve_modification_time?: boolean;
|
|
297
|
+
/** Preserve file timestamps */
|
|
298
|
+
preserve_times?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* The congestion control behavior to use when sharing bandwidth.
|
|
301
|
+
*
|
|
302
|
+
* - `fixed` - Transfer at the target rate regardless of actual network capacity. Do not share bandwidth. Not recommended.
|
|
303
|
+
* - `high` - When sharing bandwidth, transfer at twice the rate of a transfer using "fair" policy.
|
|
304
|
+
* - `fair` - Share bandwidth equally with other traffic.
|
|
305
|
+
* - `low` - Use only unutilized bandwidth.
|
|
306
|
+
* @default fair
|
|
307
|
+
*/
|
|
308
|
+
rate_policy?: 'fixed' | 'fair' | 'high' | 'low';
|
|
309
|
+
/** Access key for the remote server */
|
|
310
|
+
remote_access_key?: string;
|
|
311
|
+
/** The fully qualified domain name or IP address of the transfer server. */
|
|
312
|
+
remote_host?: string;
|
|
313
|
+
/** Password for the remote user */
|
|
314
|
+
remote_password?: string;
|
|
315
|
+
/** Remote user’s username */
|
|
316
|
+
remote_user?: string;
|
|
317
|
+
/** Remove files at the source of the transfer after the transfer completes successfully */
|
|
318
|
+
remove_after_transfer?: boolean;
|
|
319
|
+
/** Remove empty subdirectories at the source of the transfer */
|
|
320
|
+
remove_empty_directories?: boolean;
|
|
321
|
+
/** Remove empty source subdirectories and remove the source directory itself, if empty */
|
|
322
|
+
remove_empty_source_dir?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* @deprecated Use `resume_policy` instead.
|
|
325
|
+
*/
|
|
326
|
+
resume?: ResumePolicy;
|
|
327
|
+
/**
|
|
328
|
+
* If a transfer is interrupted or fails to finish, this policy directs the transfer to resume without retransferring the files.
|
|
329
|
+
*
|
|
330
|
+
* - `none` – always re-transfer the entire file.
|
|
331
|
+
* - `attributes` – compare file attributes and resume if they match, and re-transfer if they do not.
|
|
332
|
+
* - `sparse_checksum` – compare file attributes and the sparse file checksums; resume if they match, and re-transfer if they do not.
|
|
333
|
+
* - `full_checksum` – compare file attributes and the full file checksums; resume if they match, and re-transfer if they do not.
|
|
334
|
+
* @default 2
|
|
335
|
+
*/
|
|
336
|
+
resume_policy?: ResumePolicy;
|
|
337
|
+
/** Total time committed to retrying the transfer */
|
|
338
|
+
retry_duration?: number;
|
|
339
|
+
/**
|
|
340
|
+
* @deprecated Use `save_before_overwrite` instead.
|
|
341
|
+
*/
|
|
342
|
+
'save-before-overwrite'?: boolean;
|
|
343
|
+
/** Rename the file instead of overwriting it. `resume_policy` must be set to `none` for this to take effect. */
|
|
344
|
+
save_before_overwrite?: boolean;
|
|
345
|
+
/** Don’t check for duplicate files at the destination. */
|
|
346
|
+
skip_duplicate_check?: boolean;
|
|
347
|
+
/** All assets other than files, directories and symbolic links are considered special. A transfer will fail if the user attempts to transfer special assets.
|
|
348
|
+
* If `true`, ascp skips special assets and proceeds with the transfer of all other assets.
|
|
349
|
+
*/
|
|
350
|
+
skip_special_files?: boolean;
|
|
351
|
+
/** A path to prepend to the source paths specified in `paths`. If this is not specified, then `paths` should contain absolute paths. */
|
|
352
|
+
source_root?: string;
|
|
353
|
+
source_root_id?: string;
|
|
354
|
+
/** The folder name below which the directory structure is preserved (base64 encoded) */
|
|
355
|
+
src_base64?: string;
|
|
356
|
+
/**
|
|
357
|
+
* TCP port that initiates the transfer session
|
|
358
|
+
* @default 33001
|
|
359
|
+
*/
|
|
360
|
+
ssh_port?: number;
|
|
361
|
+
/** Private key for SSH */
|
|
362
|
+
ssh_private_key?: string;
|
|
363
|
+
/** Private key passphrase for SSH */
|
|
364
|
+
ssh_private_key_passphrase?: string;
|
|
365
|
+
/** The method for processing symbolic links. */
|
|
366
|
+
symlink_policy?: 'follow' | 'copy' | 'copy+force' | 'skip';
|
|
367
|
+
/** Tags to include in the transfer */
|
|
368
|
+
tags?: any;
|
|
369
|
+
/** Tags to include in the transfer (base64 encoded) */
|
|
370
|
+
tags64?: string;
|
|
371
|
+
/** Maximum target rate for incoming transfers, in kilobits per second. */
|
|
372
|
+
target_rate_cap_kbps?: number;
|
|
373
|
+
/** Ideal transfer rate, in kilobits per second. There is no default value. */
|
|
374
|
+
target_rate_kbps?: number;
|
|
375
|
+
/** Title of the transfer */
|
|
376
|
+
title?: string;
|
|
377
|
+
/** Used for token-based authorization, which involves the server-side application generating a token that gives the client rights to transfer a predetermined set of files. */
|
|
378
|
+
token?: string;
|
|
379
|
+
/** Use ascp4 as the transfer engine. */
|
|
380
|
+
use_ascp4?: boolean;
|
|
381
|
+
}
|
|
382
|
+
export type TransferStatus = 'failed' | 'completed' | 'running' | 'queued' | 'removed' | 'canceled' | 'orphaned' | 'paused';
|
|
383
|
+
export interface AsperaSdkTransfer {
|
|
384
|
+
/** The ID of the transfer */
|
|
385
|
+
uuid: string;
|
|
386
|
+
/** The transferSpec that started the transfer (secrets redacted) */
|
|
387
|
+
transfer_spec: TransferSpec;
|
|
388
|
+
/** ISO date string when transfer was started */
|
|
389
|
+
/** The name of the current file being transferred */
|
|
390
|
+
current_file: string;
|
|
391
|
+
/** The count of files being transferred */
|
|
392
|
+
file_counts: {
|
|
393
|
+
/** Number of files attempted */
|
|
394
|
+
attempted: number;
|
|
395
|
+
/** Number of files completed */
|
|
396
|
+
completed: number;
|
|
397
|
+
/** Number of files failed */
|
|
398
|
+
failed: number;
|
|
399
|
+
/** Number of files skipped */
|
|
400
|
+
skipped: number;
|
|
401
|
+
};
|
|
402
|
+
/** ISO date string when transfer finished (empty string if not finished) */
|
|
403
|
+
end_time: string;
|
|
404
|
+
/** The path opened in Explorer/Finder when user clicks 'Open Containing Folder' in the application */
|
|
405
|
+
explorer_path: string;
|
|
406
|
+
/** The status of the transfer */
|
|
407
|
+
status: TransferStatus;
|
|
408
|
+
/** The transfer error description if the status is error */
|
|
409
|
+
error_desc: string;
|
|
410
|
+
/** The transfer error code (SSH or HTTP) if the status is error */
|
|
411
|
+
error_code: number;
|
|
412
|
+
/** The number of bytes written to storage for this transfer */
|
|
413
|
+
bytes_written: number;
|
|
414
|
+
/** The number of bytes expected to be written to storage for this transfer */
|
|
415
|
+
bytes_expected: number;
|
|
416
|
+
/** The current calculated rate of the fasp transfer */
|
|
417
|
+
calculated_rate_kbps: number;
|
|
418
|
+
/** The time the transfer has been running in microseconds */
|
|
419
|
+
elapsed_usec: number;
|
|
420
|
+
/** The percentage of the transfer 0 - 1 (0.6 = 60%) */
|
|
421
|
+
percentage: number;
|
|
422
|
+
/** Remaining time in microseconds */
|
|
423
|
+
/** The title of the transfer */
|
|
424
|
+
title: string;
|
|
425
|
+
}
|
|
426
|
+
export interface InstallerInfo {
|
|
427
|
+
/** Platform */
|
|
428
|
+
platform: 'macos' | 'windows' | 'linux';
|
|
429
|
+
/** Architecture */
|
|
430
|
+
arch: string;
|
|
431
|
+
/** Installer type e.g. dmg, msi, etc. */
|
|
432
|
+
type: string;
|
|
433
|
+
/** Download URL */
|
|
434
|
+
url: string;
|
|
435
|
+
/** Version */
|
|
436
|
+
version: string;
|
|
437
|
+
}
|
|
438
|
+
export interface InstallerInfoResponse {
|
|
439
|
+
/** List of installers */
|
|
440
|
+
entries: InstallerInfo[];
|
|
441
|
+
}
|
|
442
|
+
export type WebsocketTopics = 'subscribe_transfer_activity' | 'transfer_activity';
|
|
443
|
+
export type WebsocketEvent = 'CLOSED' | 'RECONNECT';
|
|
444
|
+
export type SafariExtensionEvent = 'ENABLED' | 'DISABLED';
|
|
445
|
+
export interface WebsocketMessage {
|
|
446
|
+
jsonrpc: '2.0';
|
|
447
|
+
method: WebsocketTopics;
|
|
448
|
+
params: any;
|
|
449
|
+
id: number;
|
|
450
|
+
}
|
|
451
|
+
export interface CustomThemeItems {
|
|
452
|
+
/** Font family for typography */
|
|
453
|
+
typographyFontFamily?: string;
|
|
454
|
+
/** Header Background color */
|
|
455
|
+
headerBackground?: string;
|
|
456
|
+
/** Header text and icon color */
|
|
457
|
+
headerTextIcon?: string;
|
|
458
|
+
/** Header clickable items background color while active */
|
|
459
|
+
headerActiveItemBackground?: string;
|
|
460
|
+
/** Header clickable item icon color while active */
|
|
461
|
+
headerActiveItemColor?: string;
|
|
462
|
+
/** Header hover item icon background */
|
|
463
|
+
headerHoverItemBackground?: string;
|
|
464
|
+
headerAccentBorders?: string;
|
|
465
|
+
/** Left nav background */
|
|
466
|
+
leftNavBackground?: string;
|
|
467
|
+
/** Left nav text color */
|
|
468
|
+
leftNavTextColor?: string;
|
|
469
|
+
/** Left nav active background */
|
|
470
|
+
leftNavActiveItemBackground?: string;
|
|
471
|
+
/** Left nav active accent (left color) */
|
|
472
|
+
leftNavActiveItemAccent?: string;
|
|
473
|
+
/** Left nav hover background */
|
|
474
|
+
leftNavActiveItemHover?: string;
|
|
475
|
+
/** Login panel background color */
|
|
476
|
+
loginPanelBackgroundColor?: string;
|
|
477
|
+
/** Login panel text color */
|
|
478
|
+
loginPanelTextColor?: string;
|
|
479
|
+
/** Login in panel announcement background color */
|
|
480
|
+
loginInPanelAnnouncementBackgroundColor?: string;
|
|
481
|
+
/** Login in panel announcement text color */
|
|
482
|
+
loginInPanelAnnouncementTextColor?: string;
|
|
483
|
+
/** Login floating announcement background color */
|
|
484
|
+
loginAnnouncementBackgroundColor?: string;
|
|
485
|
+
/** Login floating announcement text color */
|
|
486
|
+
loginAnnouncementBackgroundTextColor?: string;
|
|
487
|
+
/** Button primary background */
|
|
488
|
+
buttonPrimaryBackground?: string;
|
|
489
|
+
/** Button primary text */
|
|
490
|
+
buttonPrimaryText?: string;
|
|
491
|
+
/** Button primary hover background */
|
|
492
|
+
buttonPrimaryBackgroundHover?: string;
|
|
493
|
+
/** Button primary active background */
|
|
494
|
+
buttonPrimaryBackgroundActive?: string;
|
|
495
|
+
/** Button secondary background */
|
|
496
|
+
buttonSecondaryBackground?: string;
|
|
497
|
+
/** Button secondary text */
|
|
498
|
+
buttonSecondaryText?: string;
|
|
499
|
+
/** Button secondary hover background */
|
|
500
|
+
buttonSecondaryBackgroundHover?: string;
|
|
501
|
+
/** Button secondary active background */
|
|
502
|
+
buttonSecondaryBackgroundActive?: string;
|
|
503
|
+
/** Button tertiary border */
|
|
504
|
+
buttonTertiaryBorder?: string;
|
|
505
|
+
/** Button tertiary text */
|
|
506
|
+
buttonTertiaryText?: string;
|
|
507
|
+
/** Button tertiary text for active and hover states */
|
|
508
|
+
buttonTertiaryTextHoverActive?: string;
|
|
509
|
+
/** Button tertiary hover background */
|
|
510
|
+
buttonTertiaryBackgroundHover?: string;
|
|
511
|
+
/** Button tertiary active background */
|
|
512
|
+
buttonTertiaryBackgroundActive?: string;
|
|
513
|
+
'$background'?: string;
|
|
514
|
+
'$background-hover'?: string;
|
|
515
|
+
'$background-active'?: string;
|
|
516
|
+
'$background-selected'?: string;
|
|
517
|
+
'$background-selected-hover'?: string;
|
|
518
|
+
'$background-inverse'?: string;
|
|
519
|
+
'$background-inverse-hover'?: string;
|
|
520
|
+
'$background-brand'?: string;
|
|
521
|
+
'$layer-01'?: string;
|
|
522
|
+
'$layer-02'?: string;
|
|
523
|
+
'$layer-03'?: string;
|
|
524
|
+
'$layer-hover-01'?: string;
|
|
525
|
+
'$layer-hover-02'?: string;
|
|
526
|
+
'$layer-hover-03'?: string;
|
|
527
|
+
'$layer-active-01'?: string;
|
|
528
|
+
'$layer-active-02'?: string;
|
|
529
|
+
'$layer-active-03'?: string;
|
|
530
|
+
'$layer-selected-01'?: string;
|
|
531
|
+
'$layer-selected-02'?: string;
|
|
532
|
+
'$layer-selected-03'?: string;
|
|
533
|
+
'$layer-selected-hover-01'?: string;
|
|
534
|
+
'$layer-selected-hover-02'?: string;
|
|
535
|
+
'$layer-selected-hover-03'?: string;
|
|
536
|
+
'$layer-selected-inverse'?: string;
|
|
537
|
+
'$layer-selected-disabled'?: string;
|
|
538
|
+
'$layer-accent-01'?: string;
|
|
539
|
+
'$layer-accent-02'?: string;
|
|
540
|
+
'$layer-accent-03'?: string;
|
|
541
|
+
'$layer-accent-hover-01'?: string;
|
|
542
|
+
'$layer-accent-hover-02'?: string;
|
|
543
|
+
'$layer-accent-hover-03'?: string;
|
|
544
|
+
'$layer-accent-active-01'?: string;
|
|
545
|
+
'$layer-accent-active-02'?: string;
|
|
546
|
+
'$layer-accent-active-03'?: string;
|
|
547
|
+
'$field-01'?: string;
|
|
548
|
+
'$field-02'?: string;
|
|
549
|
+
'$field-03'?: string;
|
|
550
|
+
'$field-hover-01'?: string;
|
|
551
|
+
'$field-hover-02'?: string;
|
|
552
|
+
'$field-hover-03'?: string;
|
|
553
|
+
'$border-interactive'?: string;
|
|
554
|
+
'$border-subtle-00'?: string;
|
|
555
|
+
'$border-subtle-01'?: string;
|
|
556
|
+
'$border-subtle-02'?: string;
|
|
557
|
+
'$border-subtle-03'?: string;
|
|
558
|
+
'$border-subtle-selected-01'?: string;
|
|
559
|
+
'$border-subtle-selected-02'?: string;
|
|
560
|
+
'$border-subtle-selected-03'?: string;
|
|
561
|
+
'$border-strong-01'?: string;
|
|
562
|
+
'$border-strong-02'?: string;
|
|
563
|
+
'$border-strong-03'?: string;
|
|
564
|
+
'$border-tile-01'?: string;
|
|
565
|
+
'$border-tile-02'?: string;
|
|
566
|
+
'$border-tile-03'?: string;
|
|
567
|
+
'$border-inverse'?: string;
|
|
568
|
+
'$border-disabled'?: string;
|
|
569
|
+
'$text-primary'?: string;
|
|
570
|
+
'$text-secondary'?: string;
|
|
571
|
+
'$text-placeholder'?: string;
|
|
572
|
+
'$text-on-color'?: string;
|
|
573
|
+
'$text-on-color-disabled'?: string;
|
|
574
|
+
'$text-helper'?: string;
|
|
575
|
+
'$text-error'?: string;
|
|
576
|
+
'$text-inverse'?: string;
|
|
577
|
+
'$text-disabled'?: string;
|
|
578
|
+
'$link-primary'?: string;
|
|
579
|
+
'$link-primary-hover'?: string;
|
|
580
|
+
'$link-secondary'?: string;
|
|
581
|
+
'$link-inverse'?: string;
|
|
582
|
+
'$link-visited'?: string;
|
|
583
|
+
'$icon-primary'?: string;
|
|
584
|
+
'$icon-secondary'?: string;
|
|
585
|
+
'$icon-on-color'?: string;
|
|
586
|
+
'$icon-on-color-disabled'?: string;
|
|
587
|
+
'$icon-interactive'?: string;
|
|
588
|
+
'$icon-inverse'?: string;
|
|
589
|
+
'$icon-disabled'?: string;
|
|
590
|
+
/** These are ignored if core buttons are set for similar values */
|
|
591
|
+
'$button-primary'?: string;
|
|
592
|
+
/** These are ignored if core buttons are set for similar values */
|
|
593
|
+
'$button-primary-hover'?: string;
|
|
594
|
+
/** These are ignored if core buttons are set for similar values */
|
|
595
|
+
'$button-primary-active'?: string;
|
|
596
|
+
/** These are ignored if core buttons are set for similar values */
|
|
597
|
+
'$button-secondary'?: string;
|
|
598
|
+
/** These are ignored if core buttons are set for similar values */
|
|
599
|
+
'$button-secondary-hover'?: string;
|
|
600
|
+
/** These are ignored if core buttons are set for similar values */
|
|
601
|
+
'$button-secondary-active'?: string;
|
|
602
|
+
/** These are ignored if core buttons are set for similar values */
|
|
603
|
+
'$button-tertiary'?: string;
|
|
604
|
+
/** These are ignored if core buttons are set for similar values */
|
|
605
|
+
'$button-tertiary-hover'?: string;
|
|
606
|
+
/** These are ignored if core buttons are set for similar values */
|
|
607
|
+
'$button-tertiary-active'?: string;
|
|
608
|
+
'$button-danger-primary'?: string;
|
|
609
|
+
'$button-danger-secondary'?: string;
|
|
610
|
+
'$button-danger-hover'?: string;
|
|
611
|
+
'$button-danger-active'?: string;
|
|
612
|
+
'$button-separator'?: string;
|
|
613
|
+
'$button-disabled'?: string;
|
|
614
|
+
'$support-error'?: string;
|
|
615
|
+
'$support-success'?: string;
|
|
616
|
+
'$support-warning'?: string;
|
|
617
|
+
'$support-info'?: string;
|
|
618
|
+
'$support-error-inverse'?: string;
|
|
619
|
+
'$support-success-inverse'?: string;
|
|
620
|
+
'$support-warning-inverse'?: string;
|
|
621
|
+
'$support-info-inverse'?: string;
|
|
622
|
+
'$focus'?: string;
|
|
623
|
+
'$focus-inset'?: string;
|
|
624
|
+
'$focus-inverse'?: string;
|
|
625
|
+
'$interactive'?: string;
|
|
626
|
+
'$highlight'?: string;
|
|
627
|
+
'$toggle-off'?: string;
|
|
628
|
+
'$overlay'?: string;
|
|
629
|
+
'$skeleton-element'?: string;
|
|
630
|
+
'$skeleton-background'?: string;
|
|
631
|
+
}
|
|
632
|
+
export interface CustomTheme {
|
|
633
|
+
g10: CustomThemeItems;
|
|
634
|
+
g100: CustomThemeItems;
|
|
635
|
+
disableLightDarkMode?: boolean;
|
|
636
|
+
}
|
|
637
|
+
export interface InitOptions {
|
|
638
|
+
appId?: string;
|
|
639
|
+
supportMultipleUsers?: boolean;
|
|
640
|
+
}
|