@playkit-js/playkit-js-providers 2.40.3-canary.0-442924e → 2.40.4-canary.0-b3e5269
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/analytics-service/package.json +1 -1
- package/bookmark-service/package.json +1 -1
- package/dist/analytics-service.d.ts +160 -0
- package/dist/bookmark-service.d.ts +157 -0
- package/dist/ott-provider.d.ts +543 -0
- package/dist/{index.d.ts → ovp-provider.d.ts} +73 -120
- package/dist/playkit-analytics-service.js +1 -1
- package/dist/playkit-bookmark-service.js +1 -1
- package/dist/playkit-ott-provider.js +1 -1
- package/dist/playkit-ovp-provider.js +1 -1
- package/dist/playkit-stats-service.js +1 -1
- package/dist/stats-service.d.ts +159 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +390 -0
- package/ott-provider/package.json +1 -1
- package/ovp-provider/package.json +1 -1
- package/package.json +14 -7
- package/src/types/index.ts +0 -8
- package/stats-service/package.json +1 -1
- package/types/package.json +5 -0
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
declare type AdapterDataConfig = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
value: string;
|
|
4
|
+
objectType?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare class BaseProvider<MI> {
|
|
9
|
+
private _partnerId;
|
|
10
|
+
private _widgetId?;
|
|
11
|
+
private _ks;
|
|
12
|
+
private _uiConfId?;
|
|
13
|
+
_dataLoader: DataLoaderManager;
|
|
14
|
+
private _playerVersion;
|
|
15
|
+
_logger: any;
|
|
16
|
+
protected _isAnonymous: boolean;
|
|
17
|
+
_networkRetryConfig: ProviderNetworkRetryParameters;
|
|
18
|
+
get partnerId(): number;
|
|
19
|
+
get widgetId(): string;
|
|
20
|
+
get defaultWidgetId(): string;
|
|
21
|
+
get uiConfId(): number | undefined;
|
|
22
|
+
get ks(): string;
|
|
23
|
+
set ks(value: string);
|
|
24
|
+
get playerVersion(): string;
|
|
25
|
+
get isAnonymous(): boolean;
|
|
26
|
+
constructor(options: ProviderOptionsObject, playerVersion: string);
|
|
27
|
+
getMediaConfig(mediaInfo: MI): Promise<ProviderMediaConfigObject>;
|
|
28
|
+
getPlaylistConfig(playlistInfo: ProviderPlaylistInfoObject): Promise<ProviderPlaylistObject>;
|
|
29
|
+
getEntryListConfig(entryListInfo: ProviderEntryListObject): Promise<ProviderPlaylistObject>;
|
|
30
|
+
protected _verifyHasSources(sources: ProviderMediaConfigSourcesObject): void;
|
|
31
|
+
get LogLevel(): LogLevelType;
|
|
32
|
+
getLogLevel(name?: string): any;
|
|
33
|
+
setLogLevel(level: any, name?: string): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare const ContextType: {
|
|
37
|
+
[type: string]: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
declare class DataLoaderManager {
|
|
41
|
+
/**
|
|
42
|
+
* @member - Loaders response map index
|
|
43
|
+
* @type {Map<string,Array<number>>}
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
private _loadersResponseMap;
|
|
47
|
+
/**
|
|
48
|
+
* @member - Loaders multi request
|
|
49
|
+
* @type {MultiRequestBuilder}
|
|
50
|
+
* @protected
|
|
51
|
+
*/
|
|
52
|
+
protected _multiRequest: MultiRequestBuilder;
|
|
53
|
+
/**
|
|
54
|
+
* @member - Loaders multi response
|
|
55
|
+
* @type {MultiRequestResult}
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
private _multiResponse;
|
|
59
|
+
/**
|
|
60
|
+
* @member - Loaders to execute
|
|
61
|
+
* @type {Map<string,Function>}
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
private _loaders;
|
|
65
|
+
private _networkRetryConfig;
|
|
66
|
+
constructor(networkRetryConfig: ProviderNetworkRetryParameters);
|
|
67
|
+
/**
|
|
68
|
+
* Add loader to execution loaders map
|
|
69
|
+
* @function
|
|
70
|
+
* @param {Function} loader Loader to add
|
|
71
|
+
* @param {Object} params Loader params
|
|
72
|
+
* @param {string} ks ks
|
|
73
|
+
* @returns {void}
|
|
74
|
+
*/
|
|
75
|
+
add(loader: {
|
|
76
|
+
new (...params: any[]): ILoader;
|
|
77
|
+
id: string;
|
|
78
|
+
}, params: any, ks?: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Get data from all loaders using multi request
|
|
81
|
+
* @param {boolean} requestsMustSucceed whether all of the requests must succeed or not
|
|
82
|
+
* @function
|
|
83
|
+
* @returns {Promise} Promise
|
|
84
|
+
*/
|
|
85
|
+
fetchData(requestsMustSucceed?: boolean): Promise<any>;
|
|
86
|
+
/**
|
|
87
|
+
* Prepare fetched data
|
|
88
|
+
* @function
|
|
89
|
+
* @param {MultiRequestResult} response - The multi request result
|
|
90
|
+
* @returns {Object} - The prepared data
|
|
91
|
+
*/
|
|
92
|
+
prepareData(response: MultiRequestResult): any;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class DocumentSource {
|
|
96
|
+
/**
|
|
97
|
+
* @member - media source id
|
|
98
|
+
* @type {string}
|
|
99
|
+
*/
|
|
100
|
+
id: string;
|
|
101
|
+
/**
|
|
102
|
+
* @member - media source url
|
|
103
|
+
* @type {string}
|
|
104
|
+
*/
|
|
105
|
+
url: string;
|
|
106
|
+
/**
|
|
107
|
+
* @member - thumbnail url
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
thumbnailUrl: string;
|
|
111
|
+
/**
|
|
112
|
+
* @member - media source mimetype
|
|
113
|
+
* @type {string}
|
|
114
|
+
*/
|
|
115
|
+
mimetype: string;
|
|
116
|
+
constructor(entry: any);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare interface ILoader {
|
|
120
|
+
requests: Array<RequestBuilder>;
|
|
121
|
+
response: any;
|
|
122
|
+
isValid(): boolean;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class ImageSource {
|
|
126
|
+
/**
|
|
127
|
+
* @member - media source id
|
|
128
|
+
* @type {string}
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* @member - media source url
|
|
133
|
+
* @type {string}
|
|
134
|
+
*/
|
|
135
|
+
url: string;
|
|
136
|
+
/**
|
|
137
|
+
* @member - media source mimetype
|
|
138
|
+
* @type {string}
|
|
139
|
+
*/
|
|
140
|
+
mimetype: string;
|
|
141
|
+
constructor(entry: any);
|
|
142
|
+
/**
|
|
143
|
+
* Extract the base thumbnail url.
|
|
144
|
+
* @param {string} url - dataUrl.
|
|
145
|
+
* @returns {string} - The base thumbnail url.
|
|
146
|
+
*/
|
|
147
|
+
static extractBaseThumbnailUrl(url: string): string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
declare type loggerFunctionType = {
|
|
151
|
+
VERSION: string;
|
|
152
|
+
DEBUG: LogLevelObject;
|
|
153
|
+
ERROR: LogLevelObject;
|
|
154
|
+
INFO: LogLevelObject;
|
|
155
|
+
OFF: LogLevelObject;
|
|
156
|
+
TIME: LogLevelObject;
|
|
157
|
+
TRACE: LogLevelObject;
|
|
158
|
+
WARN: LogLevelObject;
|
|
159
|
+
createDefaultHandler: () => any;
|
|
160
|
+
debug: () => any;
|
|
161
|
+
enabledFor: () => any;
|
|
162
|
+
error: () => any;
|
|
163
|
+
get: () => any;
|
|
164
|
+
getLevel: () => any;
|
|
165
|
+
info: () => any;
|
|
166
|
+
log: () => any;
|
|
167
|
+
setHandler: () => any;
|
|
168
|
+
setLevel: () => any;
|
|
169
|
+
time: () => any;
|
|
170
|
+
timeEnd: () => any;
|
|
171
|
+
trace: () => any;
|
|
172
|
+
useDefaults: () => any;
|
|
173
|
+
warn: () => any;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
declare type LoggerType = {
|
|
177
|
+
getLogger: loggerFunctionType;
|
|
178
|
+
LogLevel: LogLevelType;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
declare type LogLevelObject = {
|
|
182
|
+
value: number;
|
|
183
|
+
name: string;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
declare type LogLevelType = {
|
|
187
|
+
[level: string]: LogLevelObject;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export declare const MediaType: {
|
|
191
|
+
[type: string]: string;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
declare class MultiRequestBuilder extends RequestBuilder {
|
|
195
|
+
private static _logger;
|
|
196
|
+
/**
|
|
197
|
+
* @memberof - MultiRequestBuilder
|
|
198
|
+
* @type {Array<RequestBuilder>}
|
|
199
|
+
*/
|
|
200
|
+
requests: Array<RequestBuilder>;
|
|
201
|
+
/**
|
|
202
|
+
* Adds request to requests array
|
|
203
|
+
* @function add
|
|
204
|
+
* @param {RequestBuilder} request The request
|
|
205
|
+
* @returns {MultiRequestBuilder} The multiRequest
|
|
206
|
+
*/
|
|
207
|
+
add(request: RequestBuilder): MultiRequestBuilder;
|
|
208
|
+
/**
|
|
209
|
+
* Executes a multi request
|
|
210
|
+
* @function execute
|
|
211
|
+
* @param {boolean} requestsMustSucceed whether all of the requests must succeed or not
|
|
212
|
+
* @returns {Promise} The multirequest execution promise
|
|
213
|
+
*/
|
|
214
|
+
execute(requestsMustSucceed?: boolean): Promise<any>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare class MultiRequestResult {
|
|
218
|
+
private static _logger;
|
|
219
|
+
/**
|
|
220
|
+
* @memberof MultiRequestResult
|
|
221
|
+
* @type {boolean}
|
|
222
|
+
*/
|
|
223
|
+
success: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @memberof MultiRequestResult
|
|
226
|
+
* @type {Object}
|
|
227
|
+
*/
|
|
228
|
+
results: Array<ServiceResult>;
|
|
229
|
+
/**
|
|
230
|
+
* @constructor
|
|
231
|
+
* @param {Object} response data
|
|
232
|
+
* @param {boolean} requestsMustSucceed whether all of the requests must succeed
|
|
233
|
+
*/
|
|
234
|
+
constructor(response: any, requestsMustSucceed?: boolean);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export declare const NAME: string;
|
|
238
|
+
|
|
239
|
+
declare type OTTProviderMediaInfoObject = OVPProviderMediaInfoObject & {
|
|
240
|
+
mediaType: string;
|
|
241
|
+
contextType: string;
|
|
242
|
+
protocol?: string;
|
|
243
|
+
fileIds?: string;
|
|
244
|
+
streamerType?: string;
|
|
245
|
+
urlType?: string;
|
|
246
|
+
adapterData?: AdapterDataConfig;
|
|
247
|
+
assetReferenceType?: string;
|
|
248
|
+
formats?: Array<string>;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
declare type OVPProviderMediaInfoObject = {
|
|
252
|
+
entryId?: string;
|
|
253
|
+
referenceId?: string;
|
|
254
|
+
ks?: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
declare type PKExternalCaptionObject = {
|
|
258
|
+
url: string;
|
|
259
|
+
label: string;
|
|
260
|
+
language: string;
|
|
261
|
+
default?: boolean;
|
|
262
|
+
type?: string;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
export declare class Provider extends BaseProvider<OTTProviderMediaInfoObject> {
|
|
266
|
+
/**
|
|
267
|
+
* @constructor
|
|
268
|
+
* @param {ProviderOptionsObject} options - provider options
|
|
269
|
+
* @param {string} playerVersion - player version
|
|
270
|
+
*/
|
|
271
|
+
constructor(options: ProviderOptionsObject, playerVersion: string);
|
|
272
|
+
get env(): any;
|
|
273
|
+
/**
|
|
274
|
+
* Gets the backend media config.
|
|
275
|
+
* @param {OTTProviderMediaInfoObject} mediaInfo - ott media info
|
|
276
|
+
* @returns {Promise<ProviderMediaConfigObject>} - The provider media config
|
|
277
|
+
*/
|
|
278
|
+
getMediaConfig(mediaInfo: OTTProviderMediaInfoObject): Promise<ProviderMediaConfigObject>;
|
|
279
|
+
private _parseDataFromResponse;
|
|
280
|
+
/**
|
|
281
|
+
* Gets the playlist config from entry list.
|
|
282
|
+
* @param {ProviderEntryListObject} entryListInfo - ott entry list info
|
|
283
|
+
* @returns {Promise<ProviderPlaylistObject>} - The provider playlist config
|
|
284
|
+
*/
|
|
285
|
+
getEntryListConfig(entryListInfo: ProviderEntryListObject): Promise<ProviderPlaylistObject>;
|
|
286
|
+
private _parseEntryListDataFromResponse;
|
|
287
|
+
private _getDefaultSourcesObject;
|
|
288
|
+
private _getSourcesObject;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare type ProviderDrmDataObject = {
|
|
292
|
+
licenseUrl: string;
|
|
293
|
+
scheme: string;
|
|
294
|
+
certificate?: string;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare type ProviderEntryListObject = {
|
|
298
|
+
entries: Array<ProviderMediaInfoObject>;
|
|
299
|
+
ks?: string;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
declare type ProviderEnvConfigObject = {
|
|
303
|
+
serviceUrl: string;
|
|
304
|
+
cdnUrl?: string;
|
|
305
|
+
analyticsServiceUrl?: string;
|
|
306
|
+
useApiCaptions?: boolean;
|
|
307
|
+
replaceHostOnlyManifestUrls?: boolean;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
declare type ProviderFilterOptionsObject = {
|
|
311
|
+
redirectFromEntryId?: boolean;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
declare type ProviderMediaConfigMetadataObject = {
|
|
315
|
+
name: string;
|
|
316
|
+
description?: string;
|
|
317
|
+
mediaType?: string;
|
|
318
|
+
contextType?: string;
|
|
319
|
+
metas?: any;
|
|
320
|
+
tags?: any;
|
|
321
|
+
epgId?: string;
|
|
322
|
+
recordingId?: string;
|
|
323
|
+
updatedAt?: number;
|
|
324
|
+
creatorId?: string;
|
|
325
|
+
views?: number;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
declare type ProviderMediaConfigObject = {
|
|
329
|
+
session: ProviderMediaConfigSessionObject;
|
|
330
|
+
sources: ProviderMediaConfigSourcesObject;
|
|
331
|
+
plugins: {
|
|
332
|
+
[plugin: string]: any;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
declare type ProviderMediaConfigSessionObject = {
|
|
337
|
+
partnerId: number;
|
|
338
|
+
uiConfId?: number;
|
|
339
|
+
ks?: string;
|
|
340
|
+
isAnonymous?: boolean;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
declare type ProviderMediaConfigSourcesObject = {
|
|
344
|
+
dash: Array<ProviderMediaSourceObject>;
|
|
345
|
+
hls: Array<ProviderMediaSourceObject>;
|
|
346
|
+
progressive: Array<ProviderMediaSourceObject>;
|
|
347
|
+
image: Array<ImageSource>;
|
|
348
|
+
document: Array<DocumentSource>;
|
|
349
|
+
duration?: number;
|
|
350
|
+
type: string;
|
|
351
|
+
id?: string;
|
|
352
|
+
poster?: string | Array<any>;
|
|
353
|
+
dvr: boolean;
|
|
354
|
+
vr?: any;
|
|
355
|
+
metadata: ProviderMediaConfigMetadataObject;
|
|
356
|
+
captions?: Array<PKExternalCaptionObject>;
|
|
357
|
+
downloadUrl?: string;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
declare type ProviderMediaInfoObject = OVPProviderMediaInfoObject | OTTProviderMediaInfoObject;
|
|
361
|
+
|
|
362
|
+
declare type ProviderMediaSourceObject = {
|
|
363
|
+
id: string;
|
|
364
|
+
url: string;
|
|
365
|
+
mimetype: string;
|
|
366
|
+
bandwidth?: number;
|
|
367
|
+
width?: number;
|
|
368
|
+
height?: number;
|
|
369
|
+
label?: string;
|
|
370
|
+
drmData?: Array<ProviderDrmDataObject>;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
declare type ProviderNetworkRetryParameters = {
|
|
374
|
+
async: boolean;
|
|
375
|
+
timeout?: number;
|
|
376
|
+
maxAttempts?: number;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
declare type ProviderOptionsObject = {
|
|
380
|
+
partnerId: number;
|
|
381
|
+
widgetId?: string;
|
|
382
|
+
logger?: LoggerType;
|
|
383
|
+
ks?: string;
|
|
384
|
+
uiConfId?: number;
|
|
385
|
+
env?: ProviderEnvConfigObject;
|
|
386
|
+
networkRetryParameters?: ProviderNetworkRetryParameters;
|
|
387
|
+
filterOptions?: ProviderFilterOptionsObject;
|
|
388
|
+
ignoreServerConfig?: boolean;
|
|
389
|
+
loadThumbnailWithKs?: boolean;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
declare type ProviderPlaylistInfoObject = {
|
|
393
|
+
playlistId: string;
|
|
394
|
+
ks?: string;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
declare type ProviderPlaylistItemObject = {
|
|
398
|
+
sources: ProviderMediaConfigSourcesObject;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
declare type ProviderPlaylistMetadataObject = {
|
|
402
|
+
name: string;
|
|
403
|
+
description: string;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
declare type ProviderPlaylistObject = {
|
|
407
|
+
id: string;
|
|
408
|
+
metadata: ProviderPlaylistMetadataObject;
|
|
409
|
+
poster: string;
|
|
410
|
+
items: Array<ProviderPlaylistItemObject>;
|
|
411
|
+
playlistLastEntryId?: string;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
declare class RequestBuilder {
|
|
415
|
+
/**
|
|
416
|
+
* @member - Service name
|
|
417
|
+
* @type {string}
|
|
418
|
+
*/
|
|
419
|
+
service: string;
|
|
420
|
+
/**
|
|
421
|
+
* @member - Service action
|
|
422
|
+
* @type {string}
|
|
423
|
+
*/
|
|
424
|
+
action: string;
|
|
425
|
+
/**
|
|
426
|
+
* @member - Service params
|
|
427
|
+
* @type {any}
|
|
428
|
+
*/
|
|
429
|
+
params: any;
|
|
430
|
+
/**
|
|
431
|
+
* @memberof - Service headers
|
|
432
|
+
* @type {Map<string, string>}
|
|
433
|
+
*/
|
|
434
|
+
headers: Map<string, string>;
|
|
435
|
+
/**
|
|
436
|
+
* @memberof - Service URL
|
|
437
|
+
* @type {string}
|
|
438
|
+
*/
|
|
439
|
+
url: string;
|
|
440
|
+
/**
|
|
441
|
+
* @memberof - Service method (POST,GET,DELETE etc..)
|
|
442
|
+
* @type {string}
|
|
443
|
+
*/
|
|
444
|
+
method: string;
|
|
445
|
+
/**
|
|
446
|
+
* @memberof - Service tag
|
|
447
|
+
* @type {string}
|
|
448
|
+
*/
|
|
449
|
+
tag: string;
|
|
450
|
+
/**
|
|
451
|
+
* @memberof - the response headers of the arra
|
|
452
|
+
* @type {Array<string>}
|
|
453
|
+
*/
|
|
454
|
+
responseHeaders: Array<string>;
|
|
455
|
+
/**
|
|
456
|
+
* @description network retry configuration
|
|
457
|
+
* @memberof RequestBuilder
|
|
458
|
+
* @type {ProviderNetworkRetryParameters}
|
|
459
|
+
*/
|
|
460
|
+
retryConfig: ProviderNetworkRetryParameters;
|
|
461
|
+
/**
|
|
462
|
+
* @description number of xhr attempts for the same multi - request.
|
|
463
|
+
* @memberof RequestBuilder
|
|
464
|
+
* @type {number}
|
|
465
|
+
* @private
|
|
466
|
+
*/
|
|
467
|
+
private _attemptCounter;
|
|
468
|
+
/**
|
|
469
|
+
* @description hold the promise result of the XHR request(s) - if all tries fails, it rejects with the error.
|
|
470
|
+
* @memberof RequestBuilder
|
|
471
|
+
* @type {Object}
|
|
472
|
+
* @private
|
|
473
|
+
*/
|
|
474
|
+
private _requestPromise;
|
|
475
|
+
/**
|
|
476
|
+
* @constructor
|
|
477
|
+
* @param {Map<string, string>} headers The request headers
|
|
478
|
+
*/
|
|
479
|
+
constructor(headers?: Map<string, string>);
|
|
480
|
+
/**
|
|
481
|
+
* Builds restful service URL
|
|
482
|
+
* @function getUrl
|
|
483
|
+
* @param {string} serviceUrl - The service base URL
|
|
484
|
+
* @returns {string} The service URL
|
|
485
|
+
*/
|
|
486
|
+
getUrl(serviceUrl: string): string;
|
|
487
|
+
/**
|
|
488
|
+
* Executes service
|
|
489
|
+
* @function doHttpRequest
|
|
490
|
+
* @returns {Promise.<any>} Service response as promise
|
|
491
|
+
*/
|
|
492
|
+
doHttpRequest(): Promise<any>;
|
|
493
|
+
private _createXHR;
|
|
494
|
+
private _getResponseHeaders;
|
|
495
|
+
private _handleError;
|
|
496
|
+
private _createError;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
declare class ServiceError {
|
|
500
|
+
/**
|
|
501
|
+
* @member - The error code
|
|
502
|
+
* @type {string}
|
|
503
|
+
*/
|
|
504
|
+
code: string;
|
|
505
|
+
/**
|
|
506
|
+
* @member - The error message
|
|
507
|
+
* @type {string}
|
|
508
|
+
*/
|
|
509
|
+
message: string;
|
|
510
|
+
/**
|
|
511
|
+
* @constructor
|
|
512
|
+
* @param {string} code - The result code
|
|
513
|
+
* @param {string} message - The result message
|
|
514
|
+
*/
|
|
515
|
+
constructor(code: string, message: string);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
declare class ServiceResult {
|
|
519
|
+
/**
|
|
520
|
+
* @member - Is service returned an error
|
|
521
|
+
* @type {boolean}
|
|
522
|
+
*/
|
|
523
|
+
hasError: boolean;
|
|
524
|
+
/**
|
|
525
|
+
* @member - The service error
|
|
526
|
+
* @type {ServiceError}
|
|
527
|
+
*/
|
|
528
|
+
error: ServiceError;
|
|
529
|
+
/**
|
|
530
|
+
* @member - The service result data
|
|
531
|
+
* @type {Object}
|
|
532
|
+
*/
|
|
533
|
+
data: any;
|
|
534
|
+
/**
|
|
535
|
+
* @constructor
|
|
536
|
+
* @param {Object} response - Service response
|
|
537
|
+
*/
|
|
538
|
+
constructor(response: any);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export declare const VERSION: string;
|
|
542
|
+
|
|
543
|
+
export { }
|