@ckeditor/ckeditor5-cloud-services 44.1.0-alpha.5 → 44.2.0-alpha.0
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/LICENSE.md +1 -1
- package/build/cloud-services.js +2 -2
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +2 -2
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/package.json +25 -5
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/cloudservices.d.ts +1 -1
- package/src/cloudservices.js +15 -3
- package/src/cloudservicesconfig.d.ts +1 -1
- package/src/cloudservicesconfig.js +1 -1
- package/src/cloudservicescore.d.ts +1 -1
- package/src/cloudservicescore.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/token/token.d.ts +1 -1
- package/src/token/token.js +1 -1
- package/src/uploadgateway/fileuploader.d.ts +1 -1
- package/src/uploadgateway/fileuploader.js +1 -1
- package/src/uploadgateway/uploadgateway.d.ts +1 -1
- package/src/uploadgateway/uploadgateway.js +1 -1
- package/dist/augmentation.d.ts +0 -23
- package/dist/cloudservices.d.ts +0 -92
- package/dist/cloudservicesconfig.d.ts +0 -131
- package/dist/cloudservicescore.d.ts +0 -44
- package/dist/index.d.ts +0 -18
- package/dist/token/token.d.ts +0 -117
- package/dist/uploadgateway/fileuploader.d.ts +0 -98
- package/dist/uploadgateway/uploadgateway.d.ts +0 -51
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module cloud-services/uploadgateway/uploadgateway
|
|
11
|
-
*/
|
|
12
|
-
import FileUploader from './fileuploader.js';
|
|
13
|
-
import type { InitializedToken } from '../token/token.js';
|
|
14
|
-
/**
|
|
15
|
-
* UploadGateway abstracts file uploads to CKEditor Cloud Services.
|
|
16
|
-
*/
|
|
17
|
-
export default class UploadGateway {
|
|
18
|
-
/**
|
|
19
|
-
* CKEditor Cloud Services access token.
|
|
20
|
-
*/
|
|
21
|
-
private readonly _token;
|
|
22
|
-
/**
|
|
23
|
-
* CKEditor Cloud Services API address.
|
|
24
|
-
*/
|
|
25
|
-
private readonly _apiAddress;
|
|
26
|
-
/**
|
|
27
|
-
* Creates `UploadGateway` instance.
|
|
28
|
-
*
|
|
29
|
-
* @param token Token used for authentication.
|
|
30
|
-
* @param apiAddress API address.
|
|
31
|
-
*/
|
|
32
|
-
constructor(token: InitializedToken, apiAddress: string);
|
|
33
|
-
/**
|
|
34
|
-
* Creates a {@link module:cloud-services/uploadgateway/fileuploader~FileUploader} instance that wraps
|
|
35
|
-
* file upload process. The file is being sent at a time when the
|
|
36
|
-
* {@link module:cloud-services/uploadgateway/fileuploader~FileUploader#send} method is called.
|
|
37
|
-
*
|
|
38
|
-
* ```ts
|
|
39
|
-
* const token = await Token.create( 'https://token-endpoint' );
|
|
40
|
-
* new UploadGateway( token, 'https://example.org' )
|
|
41
|
-
* .upload( 'FILE' )
|
|
42
|
-
* .onProgress( ( data ) => console.log( data ) )
|
|
43
|
-
* .send()
|
|
44
|
-
* .then( ( response ) => console.log( response ) );
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* @param {Blob|String} fileOrData A blob object or a data string encoded with Base64.
|
|
48
|
-
* @returns {module:cloud-services/uploadgateway/fileuploader~FileUploader} Returns `FileUploader` instance.
|
|
49
|
-
*/
|
|
50
|
-
upload(fileOrData: string | Blob): FileUploader;
|
|
51
|
-
}
|