@progress/sitefinity-webservices-sdk 1.0.4 → 1.1.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/.eslintrc.js +30 -9
- package/config/helpers.ts +8 -0
- package/config/webpack.common.ts +39 -0
- package/config/webpack.dev.ts +37 -0
- package/config/webpack.prod.ts +17 -0
- package/dist/docs/assets/highlight.css +17 -3
- package/dist/docs/assets/main.js +4 -2
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +430 -619
- package/dist/docs/classes/BlobBuilder.BlobBuilder.html +135 -0
- package/dist/docs/classes/Data.Data.html +385 -0
- package/dist/docs/classes/Expression.BinaryExpression.html +184 -1
- package/dist/docs/classes/Expression.ComplexExpression.html +139 -1
- package/dist/docs/classes/Expression.ExpressionBase.html +125 -1
- package/dist/docs/classes/OrderProperty.OrderProperty.html +130 -0
- package/dist/docs/classes/Query.Query.html +353 -0
- package/dist/docs/classes/QueryBase.QueryBase.html +185 -0
- package/dist/docs/classes/QueryBuilder.QueryBuilder.html +190 -0
- package/dist/docs/classes/Requests_BatchRequest.BatchRequest.html +731 -17
- package/dist/docs/classes/Requests_BatchRequest.Transaction.html +330 -17
- package/dist/docs/classes/Requests_ExecutableRequest.ExecutableRequest.html +342 -1
- package/dist/docs/classes/Requests_Request.CommitChunksRequest.html +303 -0
- package/dist/docs/classes/Requests_Request.CreateRelatedRequest.html +310 -1
- package/dist/docs/classes/Requests_Request.CreateRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.DeleteRelatedByIdRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.DeleteRelatedRequest.html +302 -1
- package/dist/docs/classes/Requests_Request.DeleteRequest.html +300 -1
- package/dist/docs/classes/Requests_Request.GetByIdRequest.html +300 -1
- package/dist/docs/classes/Requests_Request.GetRelatedByIdRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.GetRelatedRequest.html +302 -1
- package/dist/docs/classes/Requests_Request.GetRequest.html +295 -1
- package/dist/docs/classes/Requests_Request.UpdateRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.UploadChunkRequest.html +352 -0
- package/dist/docs/classes/Requests_Request.UploadRequest.html +329 -1
- package/dist/docs/classes/Requests_RequestBase.RequestBase.html +275 -1
- package/dist/docs/classes/Requests_RequestFactory.RequestFactory.html +342 -1
- package/dist/docs/classes/Sitefinity.Sitefinity.html +186 -0
- package/dist/docs/classes/WhereQuery.WhereQuery.html +410 -0
- package/dist/docs/classes/chunk_upload_chunk_upload_sdk.ChunkUploadSdk.html +229 -0
- package/dist/docs/classes/chunk_upload_chunked_file_upload_utilities.ChunkedFileUploadUtilities.html +129 -0
- package/dist/docs/classes/utils.utils.html +301 -0
- package/dist/docs/index.html +56 -2
- package/dist/docs/interfaces/Data.CreateRelatedRequestOptions.html +157 -1
- package/dist/docs/interfaces/Data.CreateRequestOptions.html +155 -1
- package/dist/docs/interfaces/Data.OperationsRequestOptions.html +145 -1
- package/dist/docs/interfaces/Data.PropertyRequestOptions.html +151 -1
- package/dist/docs/interfaces/Data.RequestOptionsBase.html +136 -1
- package/dist/docs/interfaces/Data.SingleRelatedItemRequestOptions.html +157 -1
- package/dist/docs/interfaces/Data.UpdateRequestOptions.html +157 -1
- package/dist/docs/interfaces/Data.UploadRequestOptions.html +169 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRelatedRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRequestOptions.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchPropertyRequestOptions.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsBase.html +145 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsExtended.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleItemRequestOptions.html +145 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleRelatedItemRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchUpdateRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_ExecutableRequest.ResponseHandlers.html +96 -5
- package/dist/docs/interfaces/Requests_Request.CommitChunksRequestOptionsExtended.html +215 -0
- package/dist/docs/interfaces/Requests_Request.PostRequestOptionsExtended.html +161 -1
- package/dist/docs/interfaces/Requests_Request.PutRequestOptionsExtended.html +161 -1
- package/dist/docs/interfaces/Requests_Request.RelatedByIdRequestOptionsExtended.html +169 -1
- package/dist/docs/interfaces/Requests_Request.RelatedRequestOptionsExtended.html +165 -1
- package/dist/docs/interfaces/Requests_Request.UploadChunkRequestOptionsExtended.html +210 -0
- package/dist/docs/interfaces/Requests_Request.UploadRequestOptionsExtended.html +180 -1
- package/dist/docs/interfaces/Requests_RequestBase.RequestOptionsBaseExtended.html +150 -1
- package/dist/docs/interfaces/Sitefinity.SDKOptions.html +128 -9
- package/dist/docs/interfaces/Sitefinity.Token.html +92 -1
- package/dist/docs/interfaces/Sitefinity.TypeOptions.html +144 -13
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadInfoDTO.html +157 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadResult.html +109 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CleanUpChunksRequestOptions.html +171 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CommitChunksRequestOptions.html +204 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.GetChunkUploadInfoRequestOptions.html +166 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.UploadChunkRequestOptions.html +201 -0
- package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.ChunkFileResult.html +99 -0
- package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.FileUploadChunk.html +92 -0
- package/dist/docs/modules/BlobBuilder.html +71 -1
- package/dist/docs/modules/Data.html +90 -1
- package/dist/docs/modules/Expression.html +75 -1
- package/dist/docs/modules/OrderProperty.html +71 -1
- package/dist/docs/modules/Query.html +71 -1
- package/dist/docs/modules/QueryBase.html +71 -1
- package/dist/docs/modules/QueryBuilder.html +71 -1
- package/dist/docs/modules/Requests_BatchRequest.html +92 -1
- package/dist/docs/modules/Requests_ExecutableRequest.html +76 -1
- package/dist/docs/modules/Requests_Request.html +112 -1
- package/dist/docs/modules/Requests_RequestBase.html +76 -1
- package/dist/docs/modules/Requests_RequestFactory.html +71 -1
- package/dist/docs/modules/Sitefinity.html +80 -1
- package/dist/docs/modules/WhereQuery.html +71 -1
- package/dist/docs/modules/chunk_upload_chunk_upload_sdk.html +86 -0
- package/dist/docs/modules/chunk_upload_chunked_file_upload_utilities.html +78 -0
- package/dist/docs/modules/constants.html +81 -1
- package/dist/docs/modules/utils.html +71 -1
- package/dist/docs/modules.html +78 -1
- package/dist/docs/variables/constants.CONTENT_TYPES.html +74 -0
- package/dist/docs/variables/constants.EXPRESSION_TYPE.html +102 -0
- package/dist/docs/variables/constants.HEADER_NAMES.html +100 -0
- package/dist/docs/variables/constants.HTTP_METHODS.html +82 -0
- package/dist/docs/variables/constants.ODATA_PARAMS.html +88 -0
- package/dist/docs/variables/constants.SF_PARAMS.html +82 -0
- package/dist/samples.html +235 -36
- package/dist/sitefinity-webservices-sdk.d.ts +0 -1
- package/dist/sitefinity-webservices-sdk.js +473 -117
- package/dist/sitefinity-webservices-sdk.js.map +1 -1
- package/dist/sitefinity-webservices-sdk.min.js +1 -2
- package/dist/src/Data.d.ts +10 -0
- package/dist/src/Data.spec.d.ts +1 -0
- package/dist/src/Query.d.ts +3 -3
- package/dist/src/Requests/ExecutableRequest.d.ts +3 -1
- package/dist/src/Requests/Request.d.ts +42 -0
- package/dist/src/Requests/RequestBase.d.ts +1 -2
- package/dist/src/Requests/RequestFactory.d.ts +3 -1
- package/dist/src/Requests/request.spec.d.ts +1 -0
- package/dist/src/Sitefinity.d.ts +2 -2
- package/dist/src/Sitefinity.spec.d.ts +1 -0
- package/dist/src/WhereQuery.d.ts +2 -2
- package/dist/src/chunk-upload/chunk-upload.sdk.d.ts +290 -0
- package/dist/src/chunk-upload/chunk-upload.sdk.spec.d.ts +1 -0
- package/dist/src/chunk-upload/chunked-file-upload.utilities.d.ts +13 -0
- package/dist/src/constants.d.ts +5 -0
- package/package-lock.json +3166 -6687
- package/package.json +24 -22
- package/sitefinity-webservices-sdk.ts +0 -1
- package/src/Data.spec.ts +12 -12
- package/src/Data.ts +19 -4
- package/src/OrderProperty.ts +7 -7
- package/src/Query.ts +4 -4
- package/src/QueryBase.ts +4 -4
- package/src/QueryBuilder.ts +38 -38
- package/src/Requests/BatchRequest.ts +25 -25
- package/src/Requests/ExecutableRequest.ts +30 -24
- package/src/Requests/Request.ts +109 -2
- package/src/Requests/RequestBase.ts +3 -4
- package/src/Requests/RequestFactory.ts +9 -1
- package/src/Requests/request.spec.ts +10 -10
- package/src/Sitefinity.spec.ts +6 -6
- package/src/Sitefinity.ts +5 -5
- package/src/WhereQuery.ts +2 -2
- package/src/chunk-upload/chunk-upload.sdk.spec.ts +340 -0
- package/src/chunk-upload/chunk-upload.sdk.ts +436 -0
- package/src/chunk-upload/chunked-file-upload.utilities.ts +64 -0
- package/src/constants.ts +35 -30
- package/src/utils.ts +10 -10
- package/template.html +189 -36
- package/tsconfig.json +11 -3
- package/type.txt +1 -1
- package/config/helpers.js +0 -10
- package/config/webpack.common.js +0 -39
- package/config/webpack.dev.js +0 -19
- package/config/webpack.prod.js +0 -25
- package/dist/docs/assets/icons.css +0 -1043
- package/dist/docs/assets/icons.png +0 -0
- package/dist/docs/assets/icons@2x.png +0 -0
- package/dist/docs/classes/BlobBuilder.BlobBuilder-1.html +0 -7
- package/dist/docs/classes/Data.Data-1.html +0 -65
- package/dist/docs/classes/OrderProperty.OrderProperty-1.html +0 -1
- package/dist/docs/classes/Query.Query-1.html +0 -33
- package/dist/docs/classes/QueryBase.QueryBase-1.html +0 -7
- package/dist/docs/classes/QueryBuilder.QueryBuilder-1.html +0 -1
- package/dist/docs/classes/Sitefinity.Sitefinity-1.html +0 -5
- package/dist/docs/classes/WhereQuery.WhereQuery-1.html +0 -31
- package/dist/docs/classes/utils.utils-1.html +0 -1
- package/dist/sitefinity-webservices-sdk.min.js.LICENSE.txt +0 -14
- package/version.txt +0 -1
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { CreateRequestOptions } from "../Data";
|
|
2
|
+
import { RequestFactory } from "../Requests/RequestFactory";
|
|
3
|
+
import { TypeOptions } from "../Sitefinity";
|
|
4
|
+
import { ChunkFileResult } from "./chunked-file-upload.utilities";
|
|
5
|
+
/**
|
|
6
|
+
* @description Entry point for all chunk upload related tasks
|
|
7
|
+
* @export
|
|
8
|
+
* @class ChunkUploadSdk
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChunkUploadSdk {
|
|
11
|
+
private urlOptions;
|
|
12
|
+
private factory;
|
|
13
|
+
constructor(urlOptions: TypeOptions, factory: RequestFactory);
|
|
14
|
+
/**
|
|
15
|
+
* @description Gets the needed information to start uploading chunks to the server
|
|
16
|
+
* @param {GetChunkUploadInfoRequestOptions} parameters
|
|
17
|
+
* @memberof ChunkUploadSdk
|
|
18
|
+
*/
|
|
19
|
+
getChunkUploadInfo(parameters: GetChunkUploadInfoRequestOptions): void;
|
|
20
|
+
/**
|
|
21
|
+
* @description Sends a single chunk request to the server
|
|
22
|
+
* @param {UploadChunkRequestOptions} parameters
|
|
23
|
+
* @memberof ChunkUploadSdk
|
|
24
|
+
*/
|
|
25
|
+
uploadChunk(parameters: UploadChunkRequestOptions): void;
|
|
26
|
+
/**
|
|
27
|
+
* @description Sends the commit chunks request to the server
|
|
28
|
+
* @param {CommitChunksRequestOptions} parameters
|
|
29
|
+
* @memberof ChunkUploadSdk
|
|
30
|
+
*/
|
|
31
|
+
commitChunks(parameters: CommitChunksRequestOptions): void;
|
|
32
|
+
/**
|
|
33
|
+
* @description This request is intended to be used when something in the chunk upload process fails to delete the sent chunks
|
|
34
|
+
* @param {CleanUpChunksRequestOptions} parameters
|
|
35
|
+
* @memberof ChunkUploadSdk
|
|
36
|
+
*/
|
|
37
|
+
cleanUpChunks(parameters: CleanUpChunksRequestOptions): void;
|
|
38
|
+
/**
|
|
39
|
+
* Chunks the provided file. If the file is a base64 string this method will convert it to a blob and then chunk it.
|
|
40
|
+
*
|
|
41
|
+
* @param {(Blob | string)} file
|
|
42
|
+
* @param {number} chunkSize
|
|
43
|
+
* @param {string} contentTypeMime
|
|
44
|
+
* @return {*} {ChunkFileResult}
|
|
45
|
+
* @memberof ChunkUploadService
|
|
46
|
+
*/
|
|
47
|
+
chunkFile(file: Blob | string, chunkSize: number, contentTypeMime: string): ChunkFileResult;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @description This interface shows the minimum data needed to create a single chunk upload request
|
|
51
|
+
* @export
|
|
52
|
+
* @interface UploadChunkRequestOptions
|
|
53
|
+
* @extends {CreateRequestOptions}
|
|
54
|
+
*/
|
|
55
|
+
export interface UploadChunkRequestOptions extends CreateRequestOptions {
|
|
56
|
+
/**
|
|
57
|
+
* @description the data needed to construct the request
|
|
58
|
+
* @type {{
|
|
59
|
+
* fileMimeType: string;
|
|
60
|
+
* chunkedFileUploadSessionId: string;
|
|
61
|
+
* chunkSize: number;
|
|
62
|
+
* chunkOrdinal: number;
|
|
63
|
+
* numberOfChunks: number;
|
|
64
|
+
* positionOfChunkInQueue?: number;
|
|
65
|
+
* chunkBlob: Blob;
|
|
66
|
+
* blobStorageProviderName: string;
|
|
67
|
+
* }}
|
|
68
|
+
* @memberof UploadChunkRequestOptions
|
|
69
|
+
*/
|
|
70
|
+
data: {
|
|
71
|
+
/**
|
|
72
|
+
* @description the file's mime type
|
|
73
|
+
* @type {string}
|
|
74
|
+
*/
|
|
75
|
+
fileMimeType: string;
|
|
76
|
+
/**
|
|
77
|
+
* @description the current chunk upload session Id
|
|
78
|
+
* @type {string}
|
|
79
|
+
*/
|
|
80
|
+
chunkedFileUploadSessionId: string;
|
|
81
|
+
/**
|
|
82
|
+
* @description the chunk size in bytes
|
|
83
|
+
* @type {number}
|
|
84
|
+
*/
|
|
85
|
+
chunkSize: number;
|
|
86
|
+
/**
|
|
87
|
+
* @description the chunk's ordinal
|
|
88
|
+
* @type {number}
|
|
89
|
+
*/
|
|
90
|
+
chunkOrdinal: number;
|
|
91
|
+
/**
|
|
92
|
+
* @description the total number of chunks
|
|
93
|
+
* @type {number}
|
|
94
|
+
*/
|
|
95
|
+
numberOfChunks: number;
|
|
96
|
+
/**
|
|
97
|
+
* @description Optional. The position of the chunk in the request queue, this property is used to calculate the progress of the upload
|
|
98
|
+
* @type {number}
|
|
99
|
+
*/
|
|
100
|
+
positionOfChunkInQueue?: number;
|
|
101
|
+
/**
|
|
102
|
+
* @description The chunk data
|
|
103
|
+
* @type {Blob}
|
|
104
|
+
*/
|
|
105
|
+
chunkBlob: Blob;
|
|
106
|
+
/**
|
|
107
|
+
* @description the target blob storage provider's name
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
blobStorageProviderName: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @description This interface shows the minimum data needed to create a commit chunks request
|
|
115
|
+
* @export
|
|
116
|
+
* @interface CommitChunksRequestOptions
|
|
117
|
+
* @extends {CreateRequestOptions}
|
|
118
|
+
*/
|
|
119
|
+
export interface CommitChunksRequestOptions extends CreateRequestOptions {
|
|
120
|
+
/**
|
|
121
|
+
* @description the data needed to construct the request
|
|
122
|
+
* @type {{
|
|
123
|
+
* chunkedFileUploadSessionId: string;
|
|
124
|
+
* contentType: string;
|
|
125
|
+
* fileTotalSize: number;
|
|
126
|
+
* numberOfChunks: number;
|
|
127
|
+
* name: string;
|
|
128
|
+
* blobStorageProviderName: string;
|
|
129
|
+
* uploadProperties: { [key: string]: string };
|
|
130
|
+
* itemId?: string;
|
|
131
|
+
* }}
|
|
132
|
+
* @memberof CommitChunksRequestOptions
|
|
133
|
+
*/
|
|
134
|
+
data: {
|
|
135
|
+
/**
|
|
136
|
+
* @description the current chunk upload session Id
|
|
137
|
+
* @type {string}
|
|
138
|
+
*/
|
|
139
|
+
chunkedFileUploadSessionId: string;
|
|
140
|
+
/**
|
|
141
|
+
* @description the file's mime type
|
|
142
|
+
* @type {string}
|
|
143
|
+
*/
|
|
144
|
+
contentType: string;
|
|
145
|
+
/**
|
|
146
|
+
* @description the total size of the file
|
|
147
|
+
* @type {number}
|
|
148
|
+
*/
|
|
149
|
+
fileTotalSize: number;
|
|
150
|
+
/**
|
|
151
|
+
* @description the total number of chunks
|
|
152
|
+
* @type {number}
|
|
153
|
+
*/
|
|
154
|
+
numberOfChunks: number;
|
|
155
|
+
/**
|
|
156
|
+
* @description the file's name
|
|
157
|
+
* @type {string}
|
|
158
|
+
*/
|
|
159
|
+
name: string;
|
|
160
|
+
/**
|
|
161
|
+
* @description the target blob storage provider's name
|
|
162
|
+
* @type {string}
|
|
163
|
+
*/
|
|
164
|
+
blobStorageProviderName: string;
|
|
165
|
+
/**
|
|
166
|
+
* @description the properties of the uploaded file like the Title, UrlName, etc
|
|
167
|
+
* @type {{ [key: string]: string }}
|
|
168
|
+
*/
|
|
169
|
+
uploadProperties: {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* @description Optional. Used when updating a media item, can be null when used to create a new media file.
|
|
174
|
+
* @type {string}
|
|
175
|
+
*/
|
|
176
|
+
itemId?: string;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @description This interface shows the minimum data needed to create request to get the chunk upload information for the current library from the server
|
|
181
|
+
* @export
|
|
182
|
+
* @interface GetChunkUploadInfoRequestOptions
|
|
183
|
+
* @extends {CreateRequestOptions}
|
|
184
|
+
*/
|
|
185
|
+
export interface GetChunkUploadInfoRequestOptions extends CreateRequestOptions {
|
|
186
|
+
/**
|
|
187
|
+
* @description the data needed to construct the request
|
|
188
|
+
* @type {{
|
|
189
|
+
* libraryId: string;
|
|
190
|
+
* }}
|
|
191
|
+
* @memberof GetChunkUploadInfoRequestOptions
|
|
192
|
+
*/
|
|
193
|
+
data: {
|
|
194
|
+
/**
|
|
195
|
+
* @description the parent library (not folder) in which the file will be uploaded to
|
|
196
|
+
* @type {string}
|
|
197
|
+
*/
|
|
198
|
+
libraryId: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @description This interface show the minimum data needed to create a request to delete all chunk from a chunk upload session
|
|
203
|
+
* @export
|
|
204
|
+
* @interface CleanUpChunksRequestOptions
|
|
205
|
+
* @extends {CreateRequestOptions}
|
|
206
|
+
*/
|
|
207
|
+
export interface CleanUpChunksRequestOptions extends CreateRequestOptions {
|
|
208
|
+
/**
|
|
209
|
+
* @description the data needed to construct the request
|
|
210
|
+
* @type {{
|
|
211
|
+
* chunkedFileUploadSessionId: string;
|
|
212
|
+
* blobStorageProviderName: string;
|
|
213
|
+
* }}
|
|
214
|
+
* @memberof CleanUpChunksRequestOptions
|
|
215
|
+
*/
|
|
216
|
+
data: {
|
|
217
|
+
/**
|
|
218
|
+
* @description the current chunk upload session Id
|
|
219
|
+
* @type {string}
|
|
220
|
+
*/
|
|
221
|
+
chunkedFileUploadSessionId: string;
|
|
222
|
+
/**
|
|
223
|
+
* @description the target blob storage provider's name
|
|
224
|
+
* @type {string}
|
|
225
|
+
*/
|
|
226
|
+
blobStorageProviderName: string;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @description This is a data transfer object that shows the information provided by the getChunkUploadInfo request
|
|
231
|
+
* @export
|
|
232
|
+
* @interface ChunkUploadInfoDTO
|
|
233
|
+
*/
|
|
234
|
+
export interface ChunkUploadInfoDTO {
|
|
235
|
+
/**
|
|
236
|
+
* @description shows wether the current blob storage provider supports uploading in chunks
|
|
237
|
+
* @type {boolean}
|
|
238
|
+
* @memberof ChunkUploadInfoDTO
|
|
239
|
+
*/
|
|
240
|
+
ProviderSupportsChunkUpload: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* @description the target blob storage provider's name
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof ChunkUploadInfoDTO
|
|
245
|
+
*/
|
|
246
|
+
BlobStorageProviderName: string;
|
|
247
|
+
/**
|
|
248
|
+
* @description the current chunk upload session Id
|
|
249
|
+
* @type {string}
|
|
250
|
+
* @memberof ChunkUploadInfoDTO
|
|
251
|
+
*/
|
|
252
|
+
ChunkedFileUploadSessionId: string;
|
|
253
|
+
/**
|
|
254
|
+
* @description the chunk size in bytes
|
|
255
|
+
* @type {number}
|
|
256
|
+
* @memberof ChunkUploadInfoDTO
|
|
257
|
+
*/
|
|
258
|
+
ChunkSize: number;
|
|
259
|
+
/**
|
|
260
|
+
* @description the maximum amount of time a chunk should be retired
|
|
261
|
+
* @type {number}
|
|
262
|
+
* @memberof ChunkUploadInfoDTO
|
|
263
|
+
*/
|
|
264
|
+
MaxRetryCountForChunk: number;
|
|
265
|
+
/**
|
|
266
|
+
* @description the maximum simultaneous requests that should be sent to the server
|
|
267
|
+
* @type {number}
|
|
268
|
+
* @memberof ChunkUploadInfoDTO
|
|
269
|
+
*/
|
|
270
|
+
MaxSimultaneousChunkUploadRequestsPerSession: number;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* @description A DTO containing the data that the server responds with when a chunk is uploaded
|
|
274
|
+
* @export
|
|
275
|
+
* @interface ChunkUploadResult
|
|
276
|
+
*/
|
|
277
|
+
export interface ChunkUploadResult {
|
|
278
|
+
/**
|
|
279
|
+
* @description indicates whether the chunk has been successfully uploaded
|
|
280
|
+
* @type {boolean}
|
|
281
|
+
* @memberof ChunkUploadResult
|
|
282
|
+
*/
|
|
283
|
+
SuccessfullyUploaded: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* @description the current chunk upload session Id
|
|
286
|
+
* @type {string}
|
|
287
|
+
* @memberof ChunkUploadResult
|
|
288
|
+
*/
|
|
289
|
+
ChunkedFileUploadSessionId: string;
|
|
290
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class ChunkedFileUploadUtilities {
|
|
2
|
+
chunkFile(file: Blob | string, chunkSize: number, contentTypeMime: string): ChunkFileResult;
|
|
3
|
+
private base64ToBlob;
|
|
4
|
+
}
|
|
5
|
+
export interface FileUploadChunk {
|
|
6
|
+
ordinal: number;
|
|
7
|
+
content: Blob;
|
|
8
|
+
}
|
|
9
|
+
export interface ChunkFileResult {
|
|
10
|
+
chunks: Array<FileUploadChunk>;
|
|
11
|
+
totalChunksCount: number;
|
|
12
|
+
fileTotalSize: number;
|
|
13
|
+
}
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -42,6 +42,11 @@ export declare const HEADER_NAMES: {
|
|
|
42
42
|
serviceRequest: string;
|
|
43
43
|
choicesBinaryRepresentation: string;
|
|
44
44
|
integrationMode: string;
|
|
45
|
+
chunkOrdinal: string;
|
|
46
|
+
chunkSize: string;
|
|
47
|
+
fileSize: string;
|
|
48
|
+
chunkedFileUploadSessionId: string;
|
|
49
|
+
blobStorageProviderName: string;
|
|
45
50
|
};
|
|
46
51
|
export declare const HTTP_METHODS: {
|
|
47
52
|
get: string;
|