camstreamerlib 4.0.0-beta.85 → 4.0.0-beta.87
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/cjs/CamStreamerAPI.d.ts +298 -3
- package/cjs/CamStreamerAPI.js +21 -0
- package/cjs/PlaneTrackerAPI.d.ts +3 -1
- package/cjs/PlaneTrackerAPI.js +7 -0
- package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +2331 -9
- package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +135 -0
- package/cjs/types/CamStreamerAPI/hlsSchema.d.ts +135 -0
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.d.ts +135 -3
- package/cjs/types/CamStreamerAPI/mpegDvbSchema.js +0 -1
- package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +24 -24
- package/cjs/types/CamStreamerAPI/rtmpSchema.d.ts +135 -0
- package/cjs/types/CamStreamerAPI/sdCardSchema.d.ts +135 -0
- package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +275 -0
- package/cjs/types/CamStreamerAPI/streamCommonTypes.js +24 -1
- package/cjs/types/CamStreamerAPI/windySchema.d.ts +135 -0
- package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +135 -0
- package/cjs/types/ws/PlaneTrackerEvents.d.ts +69 -3
- package/cjs/types/ws/PlaneTrackerEvents.js +11 -0
- package/esm/CamStreamerAPI.js +22 -1
- package/esm/PlaneTrackerAPI.js +8 -1
- package/esm/types/CamStreamerAPI/mpegDvbSchema.js +0 -1
- package/esm/types/CamStreamerAPI/streamCommonTypes.js +23 -0
- package/esm/types/ws/PlaneTrackerEvents.js +11 -0
- package/package.json +1 -1
- package/types/CamStreamerAPI.d.ts +298 -3
- package/types/PlaneTrackerAPI.d.ts +3 -1
- package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +2331 -9
- package/types/types/CamStreamerAPI/facebookSchema.d.ts +135 -0
- package/types/types/CamStreamerAPI/hlsSchema.d.ts +135 -0
- package/types/types/CamStreamerAPI/mpegDvbSchema.d.ts +135 -3
- package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +24 -24
- package/types/types/CamStreamerAPI/rtmpSchema.d.ts +135 -0
- package/types/types/CamStreamerAPI/sdCardSchema.d.ts +135 -0
- package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +275 -0
- package/types/types/CamStreamerAPI/windySchema.d.ts +135 -0
- package/types/types/CamStreamerAPI/youtubeSchema.d.ts +135 -0
- package/types/types/ws/PlaneTrackerEvents.d.ts +69 -3
package/cjs/CamStreamerAPI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProxyClient } from './internal/ProxyClient';
|
|
2
|
-
import { IClient, TResponse } from './internal/types';
|
|
2
|
+
import { IClient, TBlobResponse, TResponse } from './internal/types';
|
|
3
3
|
import { TAudioFile, TAudioFileStorageType, TStream, TStreamList } from './types/CamStreamerAPI/CamStreamerAPI';
|
|
4
4
|
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
5
5
|
import { TOldStream, TOldStringStream } from './types/CamStreamerAPI/oldStreamSchema';
|
|
@@ -16,12 +16,54 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
16
16
|
id: number;
|
|
17
17
|
active: boolean;
|
|
18
18
|
title: string;
|
|
19
|
+
trigger: {
|
|
20
|
+
type: "manual";
|
|
21
|
+
ioPort: string | null;
|
|
22
|
+
} | {
|
|
23
|
+
type: "onetime";
|
|
24
|
+
startTime: number;
|
|
25
|
+
stopTime: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: "recurrent";
|
|
28
|
+
schedule: {
|
|
29
|
+
start: {
|
|
30
|
+
day: number;
|
|
31
|
+
timeS: number;
|
|
32
|
+
};
|
|
33
|
+
stop: {
|
|
34
|
+
day: number;
|
|
35
|
+
timeS: number;
|
|
36
|
+
};
|
|
37
|
+
isActive: boolean;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
19
40
|
} | {
|
|
20
41
|
type: "hls";
|
|
21
42
|
enabled: boolean;
|
|
22
43
|
id: number;
|
|
23
44
|
active: boolean;
|
|
24
45
|
title: string;
|
|
46
|
+
trigger: {
|
|
47
|
+
type: "manual";
|
|
48
|
+
ioPort: string | null;
|
|
49
|
+
} | {
|
|
50
|
+
type: "onetime";
|
|
51
|
+
startTime: number;
|
|
52
|
+
stopTime: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: "recurrent";
|
|
55
|
+
schedule: {
|
|
56
|
+
start: {
|
|
57
|
+
day: number;
|
|
58
|
+
timeS: number;
|
|
59
|
+
};
|
|
60
|
+
stop: {
|
|
61
|
+
day: number;
|
|
62
|
+
timeS: number;
|
|
63
|
+
};
|
|
64
|
+
isActive: boolean;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
25
67
|
} | {
|
|
26
68
|
type: "mpeg_dvb";
|
|
27
69
|
port: number;
|
|
@@ -29,6 +71,27 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
29
71
|
id: number;
|
|
30
72
|
active: boolean;
|
|
31
73
|
title: string;
|
|
74
|
+
trigger: {
|
|
75
|
+
type: "manual";
|
|
76
|
+
ioPort: string | null;
|
|
77
|
+
} | {
|
|
78
|
+
type: "onetime";
|
|
79
|
+
startTime: number;
|
|
80
|
+
stopTime: number;
|
|
81
|
+
} | {
|
|
82
|
+
type: "recurrent";
|
|
83
|
+
schedule: {
|
|
84
|
+
start: {
|
|
85
|
+
day: number;
|
|
86
|
+
timeS: number;
|
|
87
|
+
};
|
|
88
|
+
stop: {
|
|
89
|
+
day: number;
|
|
90
|
+
timeS: number;
|
|
91
|
+
};
|
|
92
|
+
isActive: boolean;
|
|
93
|
+
}[];
|
|
94
|
+
};
|
|
32
95
|
ipAddress: string;
|
|
33
96
|
standard: "DVB" | "ATSC";
|
|
34
97
|
nullPacketsPaddingEnabled: boolean;
|
|
@@ -41,7 +104,6 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
41
104
|
pcrPeriodMs: number;
|
|
42
105
|
providerName: string;
|
|
43
106
|
serviceName: string;
|
|
44
|
-
triggerType: "manual" | "onetime" | "recurrent" | "io" | "nonstop";
|
|
45
107
|
statusCameraLed: boolean;
|
|
46
108
|
statusCameraOutput: string;
|
|
47
109
|
saveToSdCard: boolean;
|
|
@@ -51,24 +113,108 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
51
113
|
id: number;
|
|
52
114
|
active: boolean;
|
|
53
115
|
title: string;
|
|
116
|
+
trigger: {
|
|
117
|
+
type: "manual";
|
|
118
|
+
ioPort: string | null;
|
|
119
|
+
} | {
|
|
120
|
+
type: "onetime";
|
|
121
|
+
startTime: number;
|
|
122
|
+
stopTime: number;
|
|
123
|
+
} | {
|
|
124
|
+
type: "recurrent";
|
|
125
|
+
schedule: {
|
|
126
|
+
start: {
|
|
127
|
+
day: number;
|
|
128
|
+
timeS: number;
|
|
129
|
+
};
|
|
130
|
+
stop: {
|
|
131
|
+
day: number;
|
|
132
|
+
timeS: number;
|
|
133
|
+
};
|
|
134
|
+
isActive: boolean;
|
|
135
|
+
}[];
|
|
136
|
+
};
|
|
54
137
|
} | {
|
|
55
138
|
type: "sd_card";
|
|
56
139
|
enabled: boolean;
|
|
57
140
|
id: number;
|
|
58
141
|
active: boolean;
|
|
59
142
|
title: string;
|
|
143
|
+
trigger: {
|
|
144
|
+
type: "manual";
|
|
145
|
+
ioPort: string | null;
|
|
146
|
+
} | {
|
|
147
|
+
type: "onetime";
|
|
148
|
+
startTime: number;
|
|
149
|
+
stopTime: number;
|
|
150
|
+
} | {
|
|
151
|
+
type: "recurrent";
|
|
152
|
+
schedule: {
|
|
153
|
+
start: {
|
|
154
|
+
day: number;
|
|
155
|
+
timeS: number;
|
|
156
|
+
};
|
|
157
|
+
stop: {
|
|
158
|
+
day: number;
|
|
159
|
+
timeS: number;
|
|
160
|
+
};
|
|
161
|
+
isActive: boolean;
|
|
162
|
+
}[];
|
|
163
|
+
};
|
|
60
164
|
} | {
|
|
61
165
|
type: "windy";
|
|
62
166
|
enabled: boolean;
|
|
63
167
|
id: number;
|
|
64
168
|
active: boolean;
|
|
65
169
|
title: string;
|
|
170
|
+
trigger: {
|
|
171
|
+
type: "manual";
|
|
172
|
+
ioPort: string | null;
|
|
173
|
+
} | {
|
|
174
|
+
type: "onetime";
|
|
175
|
+
startTime: number;
|
|
176
|
+
stopTime: number;
|
|
177
|
+
} | {
|
|
178
|
+
type: "recurrent";
|
|
179
|
+
schedule: {
|
|
180
|
+
start: {
|
|
181
|
+
day: number;
|
|
182
|
+
timeS: number;
|
|
183
|
+
};
|
|
184
|
+
stop: {
|
|
185
|
+
day: number;
|
|
186
|
+
timeS: number;
|
|
187
|
+
};
|
|
188
|
+
isActive: boolean;
|
|
189
|
+
}[];
|
|
190
|
+
};
|
|
66
191
|
} | {
|
|
67
192
|
type: "youtube";
|
|
68
193
|
enabled: boolean;
|
|
69
194
|
id: number;
|
|
70
195
|
active: boolean;
|
|
71
196
|
title: string;
|
|
197
|
+
trigger: {
|
|
198
|
+
type: "manual";
|
|
199
|
+
ioPort: string | null;
|
|
200
|
+
} | {
|
|
201
|
+
type: "onetime";
|
|
202
|
+
startTime: number;
|
|
203
|
+
stopTime: number;
|
|
204
|
+
} | {
|
|
205
|
+
type: "recurrent";
|
|
206
|
+
schedule: {
|
|
207
|
+
start: {
|
|
208
|
+
day: number;
|
|
209
|
+
timeS: number;
|
|
210
|
+
};
|
|
211
|
+
stop: {
|
|
212
|
+
day: number;
|
|
213
|
+
timeS: number;
|
|
214
|
+
};
|
|
215
|
+
isActive: boolean;
|
|
216
|
+
}[];
|
|
217
|
+
};
|
|
72
218
|
})[]>;
|
|
73
219
|
setStreamList(streamList: TStreamList['streamList'], options?: THttpRequestOptions): Promise<void>;
|
|
74
220
|
getStream(streamId: number, options?: THttpRequestOptions): Promise<{
|
|
@@ -77,12 +223,54 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
77
223
|
id: number;
|
|
78
224
|
active: boolean;
|
|
79
225
|
title: string;
|
|
226
|
+
trigger: {
|
|
227
|
+
type: "manual";
|
|
228
|
+
ioPort: string | null;
|
|
229
|
+
} | {
|
|
230
|
+
type: "onetime";
|
|
231
|
+
startTime: number;
|
|
232
|
+
stopTime: number;
|
|
233
|
+
} | {
|
|
234
|
+
type: "recurrent";
|
|
235
|
+
schedule: {
|
|
236
|
+
start: {
|
|
237
|
+
day: number;
|
|
238
|
+
timeS: number;
|
|
239
|
+
};
|
|
240
|
+
stop: {
|
|
241
|
+
day: number;
|
|
242
|
+
timeS: number;
|
|
243
|
+
};
|
|
244
|
+
isActive: boolean;
|
|
245
|
+
}[];
|
|
246
|
+
};
|
|
80
247
|
} | {
|
|
81
248
|
type: "hls";
|
|
82
249
|
enabled: boolean;
|
|
83
250
|
id: number;
|
|
84
251
|
active: boolean;
|
|
85
252
|
title: string;
|
|
253
|
+
trigger: {
|
|
254
|
+
type: "manual";
|
|
255
|
+
ioPort: string | null;
|
|
256
|
+
} | {
|
|
257
|
+
type: "onetime";
|
|
258
|
+
startTime: number;
|
|
259
|
+
stopTime: number;
|
|
260
|
+
} | {
|
|
261
|
+
type: "recurrent";
|
|
262
|
+
schedule: {
|
|
263
|
+
start: {
|
|
264
|
+
day: number;
|
|
265
|
+
timeS: number;
|
|
266
|
+
};
|
|
267
|
+
stop: {
|
|
268
|
+
day: number;
|
|
269
|
+
timeS: number;
|
|
270
|
+
};
|
|
271
|
+
isActive: boolean;
|
|
272
|
+
}[];
|
|
273
|
+
};
|
|
86
274
|
} | {
|
|
87
275
|
type: "mpeg_dvb";
|
|
88
276
|
port: number;
|
|
@@ -90,6 +278,27 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
90
278
|
id: number;
|
|
91
279
|
active: boolean;
|
|
92
280
|
title: string;
|
|
281
|
+
trigger: {
|
|
282
|
+
type: "manual";
|
|
283
|
+
ioPort: string | null;
|
|
284
|
+
} | {
|
|
285
|
+
type: "onetime";
|
|
286
|
+
startTime: number;
|
|
287
|
+
stopTime: number;
|
|
288
|
+
} | {
|
|
289
|
+
type: "recurrent";
|
|
290
|
+
schedule: {
|
|
291
|
+
start: {
|
|
292
|
+
day: number;
|
|
293
|
+
timeS: number;
|
|
294
|
+
};
|
|
295
|
+
stop: {
|
|
296
|
+
day: number;
|
|
297
|
+
timeS: number;
|
|
298
|
+
};
|
|
299
|
+
isActive: boolean;
|
|
300
|
+
}[];
|
|
301
|
+
};
|
|
93
302
|
ipAddress: string;
|
|
94
303
|
standard: "DVB" | "ATSC";
|
|
95
304
|
nullPacketsPaddingEnabled: boolean;
|
|
@@ -102,7 +311,6 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
102
311
|
pcrPeriodMs: number;
|
|
103
312
|
providerName: string;
|
|
104
313
|
serviceName: string;
|
|
105
|
-
triggerType: "manual" | "onetime" | "recurrent" | "io" | "nonstop";
|
|
106
314
|
statusCameraLed: boolean;
|
|
107
315
|
statusCameraOutput: string;
|
|
108
316
|
saveToSdCard: boolean;
|
|
@@ -112,24 +320,108 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
112
320
|
id: number;
|
|
113
321
|
active: boolean;
|
|
114
322
|
title: string;
|
|
323
|
+
trigger: {
|
|
324
|
+
type: "manual";
|
|
325
|
+
ioPort: string | null;
|
|
326
|
+
} | {
|
|
327
|
+
type: "onetime";
|
|
328
|
+
startTime: number;
|
|
329
|
+
stopTime: number;
|
|
330
|
+
} | {
|
|
331
|
+
type: "recurrent";
|
|
332
|
+
schedule: {
|
|
333
|
+
start: {
|
|
334
|
+
day: number;
|
|
335
|
+
timeS: number;
|
|
336
|
+
};
|
|
337
|
+
stop: {
|
|
338
|
+
day: number;
|
|
339
|
+
timeS: number;
|
|
340
|
+
};
|
|
341
|
+
isActive: boolean;
|
|
342
|
+
}[];
|
|
343
|
+
};
|
|
115
344
|
} | {
|
|
116
345
|
type: "sd_card";
|
|
117
346
|
enabled: boolean;
|
|
118
347
|
id: number;
|
|
119
348
|
active: boolean;
|
|
120
349
|
title: string;
|
|
350
|
+
trigger: {
|
|
351
|
+
type: "manual";
|
|
352
|
+
ioPort: string | null;
|
|
353
|
+
} | {
|
|
354
|
+
type: "onetime";
|
|
355
|
+
startTime: number;
|
|
356
|
+
stopTime: number;
|
|
357
|
+
} | {
|
|
358
|
+
type: "recurrent";
|
|
359
|
+
schedule: {
|
|
360
|
+
start: {
|
|
361
|
+
day: number;
|
|
362
|
+
timeS: number;
|
|
363
|
+
};
|
|
364
|
+
stop: {
|
|
365
|
+
day: number;
|
|
366
|
+
timeS: number;
|
|
367
|
+
};
|
|
368
|
+
isActive: boolean;
|
|
369
|
+
}[];
|
|
370
|
+
};
|
|
121
371
|
} | {
|
|
122
372
|
type: "windy";
|
|
123
373
|
enabled: boolean;
|
|
124
374
|
id: number;
|
|
125
375
|
active: boolean;
|
|
126
376
|
title: string;
|
|
377
|
+
trigger: {
|
|
378
|
+
type: "manual";
|
|
379
|
+
ioPort: string | null;
|
|
380
|
+
} | {
|
|
381
|
+
type: "onetime";
|
|
382
|
+
startTime: number;
|
|
383
|
+
stopTime: number;
|
|
384
|
+
} | {
|
|
385
|
+
type: "recurrent";
|
|
386
|
+
schedule: {
|
|
387
|
+
start: {
|
|
388
|
+
day: number;
|
|
389
|
+
timeS: number;
|
|
390
|
+
};
|
|
391
|
+
stop: {
|
|
392
|
+
day: number;
|
|
393
|
+
timeS: number;
|
|
394
|
+
};
|
|
395
|
+
isActive: boolean;
|
|
396
|
+
}[];
|
|
397
|
+
};
|
|
127
398
|
} | {
|
|
128
399
|
type: "youtube";
|
|
129
400
|
enabled: boolean;
|
|
130
401
|
id: number;
|
|
131
402
|
active: boolean;
|
|
132
403
|
title: string;
|
|
404
|
+
trigger: {
|
|
405
|
+
type: "manual";
|
|
406
|
+
ioPort: string | null;
|
|
407
|
+
} | {
|
|
408
|
+
type: "onetime";
|
|
409
|
+
startTime: number;
|
|
410
|
+
stopTime: number;
|
|
411
|
+
} | {
|
|
412
|
+
type: "recurrent";
|
|
413
|
+
schedule: {
|
|
414
|
+
start: {
|
|
415
|
+
day: number;
|
|
416
|
+
timeS: number;
|
|
417
|
+
};
|
|
418
|
+
stop: {
|
|
419
|
+
day: number;
|
|
420
|
+
timeS: number;
|
|
421
|
+
};
|
|
422
|
+
isActive: boolean;
|
|
423
|
+
}[];
|
|
424
|
+
};
|
|
133
425
|
}>;
|
|
134
426
|
setStream(streamId: number, streamData: Partial<TStream>, options?: THttpRequestOptions): Promise<void>;
|
|
135
427
|
isStreaming(streamId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
@@ -147,7 +439,10 @@ export declare class CamStreamerAPI<Client extends IClient<TResponse, any>> {
|
|
|
147
439
|
type: "SD0";
|
|
148
440
|
SD0: string;
|
|
149
441
|
})[]>;
|
|
442
|
+
getFileFromCamera(path: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
150
443
|
private _getJson;
|
|
444
|
+
private _getBlob;
|
|
445
|
+
private parseBlobResponse;
|
|
151
446
|
private _postUrlEncoded;
|
|
152
447
|
private _postJsonEncoded;
|
|
153
448
|
private _post;
|
package/cjs/CamStreamerAPI.js
CHANGED
|
@@ -105,6 +105,9 @@ class CamStreamerAPI {
|
|
|
105
105
|
const res = await this._getJson(`${BASE_PATH}/upload_audio.cgi`, { action: 'get_storage' }, options);
|
|
106
106
|
return CamStreamerAPI_1.storageListSchema.parse(res.data);
|
|
107
107
|
}
|
|
108
|
+
async getFileFromCamera(path, options) {
|
|
109
|
+
return await this._getBlob(`${BASE_PATH}/audio.cgi`, { path }, options);
|
|
110
|
+
}
|
|
108
111
|
async _getJson(path, parameters, options) {
|
|
109
112
|
const agent = this.getClient(options?.proxyParams);
|
|
110
113
|
const res = await agent.get({ path, parameters, timeout: options?.timeout });
|
|
@@ -115,6 +118,24 @@ class CamStreamerAPI {
|
|
|
115
118
|
throw new errors_1.ErrorWithResponse(res);
|
|
116
119
|
}
|
|
117
120
|
}
|
|
121
|
+
async _getBlob(path, parameters, options) {
|
|
122
|
+
const agent = this.getClient(options?.proxyParams);
|
|
123
|
+
const res = await agent.get({ path, parameters, timeout: options?.timeout });
|
|
124
|
+
if (res.ok) {
|
|
125
|
+
return await this.parseBlobResponse(res);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
throw new errors_1.ErrorWithResponse(res);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
async parseBlobResponse(response) {
|
|
132
|
+
try {
|
|
133
|
+
return (await response.blob());
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
throw new errors_1.ParsingBlobError(err);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
118
139
|
async _postUrlEncoded(path, parameters, options, headers) {
|
|
119
140
|
const data = (0, utils_1.paramToUrl)(parameters);
|
|
120
141
|
const baseHeaders = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
package/cjs/PlaneTrackerAPI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
|
|
2
|
-
import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
2
|
+
import { ICAO, TApiUser, TBlackList, TCameraSettings, TExportDataType, TGetIcaoByOption, TImportDataType, TPriorityList, TTrackingMode, TTypePriorityList, TWhiteList, TZones } from './types/PlaneTrackerAPI';
|
|
3
3
|
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
4
4
|
import { ProxyClient } from './internal/ProxyClient';
|
|
5
5
|
export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
|
|
@@ -194,6 +194,8 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> {
|
|
|
194
194
|
getIcao(by: TGetIcaoByOption, value: string, options?: THttpRequestOptions): Promise<string>;
|
|
195
195
|
getPriorityList(options?: THttpRequestOptions): Promise<string[]>;
|
|
196
196
|
setPriorityList(priorityList: TPriorityList['priorityList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
197
|
+
getTypePriorityList(options?: THttpRequestOptions): Promise<string[]>;
|
|
198
|
+
setTypePriorityList(typePriorityList: TTypePriorityList['typePriorityList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
197
199
|
getWhiteList(options?: THttpRequestOptions): Promise<string[]>;
|
|
198
200
|
setWhiteList(whiteList: TWhiteList['whiteList'], options?: THttpRequestOptions): Promise<TResponse>;
|
|
199
201
|
getBlackList(options?: THttpRequestOptions): Promise<string[]>;
|
package/cjs/PlaneTrackerAPI.js
CHANGED
|
@@ -125,6 +125,13 @@ class PlaneTrackerAPI {
|
|
|
125
125
|
async setPriorityList(priorityList, options) {
|
|
126
126
|
return await this._postJsonEncoded(`${BASE_PATH}/package/setPriorityList.cgi`, { priorityList }, this.apiUser, options);
|
|
127
127
|
}
|
|
128
|
+
async getTypePriorityList(options) {
|
|
129
|
+
const res = await this._getJson(`${BASE_PATH}/package/getTypePriorityList.cgi`, undefined, options);
|
|
130
|
+
return PlaneTrackerAPI_1.typePriorityListSchema.parse(res).typePriorityList;
|
|
131
|
+
}
|
|
132
|
+
async setTypePriorityList(typePriorityList, options) {
|
|
133
|
+
return await this._postJsonEncoded(`${BASE_PATH}/package/setTypePriorityList.cgi`, { typePriorityList }, this.apiUser, options);
|
|
134
|
+
}
|
|
128
135
|
async getWhiteList(options) {
|
|
129
136
|
const res = await this._getJson(`${BASE_PATH}/package/getWhiteList.cgi`, undefined, options);
|
|
130
137
|
return PlaneTrackerAPI_1.whiteListSchema.parse(res).whiteList;
|