@3e/sqa-common 6.0.5-9 → 6.0.6-3

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.
Files changed (3) hide show
  1. package/index.d.ts +1207 -2
  2. package/package.json +1 -1
  3. package/sqa_common.js +890 -875
package/index.d.ts CHANGED
@@ -1,4 +1,1209 @@
1
+ /**
2
+ * Type declarations for the @3e/sqa-common module
3
+ */
1
4
  declare module '@3e/sqa-common' {
2
- var any: any;
3
- export = { sqa };
5
+ export type TimezoneValue =
6
+ | 'Asia/Aden'
7
+ | 'America/Cuiaba'
8
+ | 'Etc/GMT+9'
9
+ | 'Etc/GMT+8'
10
+ | 'Africa/Nairobi'
11
+ | 'America/Marigot'
12
+ | 'Asia/Aqtau'
13
+ | 'Pacific/Kwajalein'
14
+ | 'America/El_Salvador'
15
+ | 'Asia/Pontianak'
16
+ | 'Africa/Cairo'
17
+ | 'Pacific/Pago_Pago'
18
+ | 'Africa/Mbabane'
19
+ | 'Asia/Kuching'
20
+ | 'Pacific/Honolulu'
21
+ | 'Pacific/Rarotonga'
22
+ | 'America/Guatemala'
23
+ | 'Australia/Hobart'
24
+ | 'Europe/London'
25
+ | 'America/Belize'
26
+ | 'America/Panama'
27
+ | 'Asia/Chungking'
28
+ | 'America/Managua'
29
+ | 'America/Indiana/Petersburg'
30
+ | 'Asia/Yerevan'
31
+ | 'Europe/Brussels'
32
+ | 'GMT'
33
+ | 'Europe/Warsaw'
34
+ | 'America/Chicago'
35
+ | 'Asia/Kashgar'
36
+ | 'Chile/Continental'
37
+ | 'Pacific/Yap'
38
+ | 'CET'
39
+ | 'Etc/GMT-1'
40
+ | 'Etc/GMT-0'
41
+ | 'Europe/Jersey'
42
+ | 'America/Tegucigalpa'
43
+ | 'Etc/GMT-5'
44
+ | 'Europe/Istanbul'
45
+ | 'America/Eirunepe'
46
+ | 'Etc/GMT-4'
47
+ | 'America/Miquelon'
48
+ | 'Etc/GMT-3'
49
+ | 'Europe/Luxembourg'
50
+ | 'Etc/GMT-2'
51
+ | 'Etc/GMT-9'
52
+ | 'America/Argentina/Catamarca'
53
+ | 'Etc/GMT-8'
54
+ | 'Etc/GMT-7'
55
+ | 'Etc/GMT-6'
56
+ | 'Europe/Zaporozhye'
57
+ | 'Canada/Yukon'
58
+ | 'Canada/Atlantic'
59
+ | 'Atlantic/St_Helena'
60
+ | 'Australia/Tasmania'
61
+ | 'Libya'
62
+ | 'Europe/Guernsey'
63
+ | 'America/Grand_Turk'
64
+ | 'Asia/Samarkand'
65
+ | 'America/Argentina/Cordoba'
66
+ | 'Asia/Phnom_Penh'
67
+ | 'Africa/Kigali'
68
+ | 'Asia/Almaty'
69
+ | 'US/Alaska'
70
+ | 'Asia/Dubai'
71
+ | 'Europe/Isle_of_Man'
72
+ | 'America/Araguaina'
73
+ | 'Cuba'
74
+ | 'Asia/Novosibirsk'
75
+ | 'America/Argentina/Salta'
76
+ | 'Etc/GMT+3'
77
+ | 'Africa/Tunis'
78
+ | 'Etc/GMT+2'
79
+ | 'Etc/GMT+1'
80
+ | 'Pacific/Fakaofo'
81
+ | 'Africa/Tripoli'
82
+ | 'Etc/GMT+0'
83
+ | 'Israel'
84
+ | 'Africa/Banjul'
85
+ | 'Etc/GMT+7'
86
+ | 'Indian/Comoro'
87
+ | 'Etc/GMT+6'
88
+ | 'Etc/GMT+5'
89
+ | 'Etc/GMT+4'
90
+ | 'Pacific/Port_Moresby'
91
+ | 'US/Arizona'
92
+ | 'Antarctica/Syowa'
93
+ | 'Indian/Reunion'
94
+ | 'Pacific/Palau'
95
+ | 'Europe/Kaliningrad'
96
+ | 'America/Montevideo'
97
+ | 'Africa/Windhoek'
98
+ | 'Asia/Karachi'
99
+ | 'Africa/Mogadishu'
100
+ | 'Australia/Perth'
101
+ | 'Brazil/East'
102
+ | 'Etc/GMT'
103
+ | 'Asia/Chita'
104
+ | 'Pacific/Easter'
105
+ | 'Antarctica/Davis'
106
+ | 'Antarctica/McMurdo'
107
+ | 'Asia/Macao'
108
+ | 'America/Manaus'
109
+ | 'Africa/Freetown'
110
+ | 'Europe/Bucharest'
111
+ | 'Asia/Tomsk'
112
+ | 'America/Argentina/Mendoza'
113
+ | 'Asia/Macau'
114
+ | 'Europe/Malta'
115
+ | 'Mexico/BajaSur'
116
+ | 'Pacific/Tahiti'
117
+ | 'Africa/Asmera'
118
+ | 'Europe/Busingen'
119
+ | 'America/Argentina/Rio_Gallegos'
120
+ | 'Africa/Malabo'
121
+ | 'Europe/Skopje'
122
+ | 'America/Catamarca'
123
+ | 'America/Godthab'
124
+ | 'Europe/Sarajevo'
125
+ | 'Australia/ACT'
126
+ | 'GB-Eire'
127
+ | 'Africa/Lagos'
128
+ | 'America/Cordoba'
129
+ | 'Europe/Rome'
130
+ | 'Asia/Dacca'
131
+ | 'Indian/Mauritius'
132
+ | 'Pacific/Samoa'
133
+ | 'America/Regina'
134
+ | 'America/Fort_Wayne'
135
+ | 'America/Dawson_Creek'
136
+ | 'Africa/Algiers'
137
+ | 'Europe/Mariehamn'
138
+ | 'America/St_Johns'
139
+ | 'America/St_Thomas'
140
+ | 'Europe/Zurich'
141
+ | 'America/Anguilla'
142
+ | 'Asia/Dili'
143
+ | 'America/Denver'
144
+ | 'Africa/Bamako'
145
+ | 'Europe/Saratov'
146
+ | 'GB'
147
+ | 'Mexico/General'
148
+ | 'Pacific/Wallis'
149
+ | 'Europe/Gibraltar'
150
+ | 'Africa/Conakry'
151
+ | 'Africa/Lubumbashi'
152
+ | 'Asia/Istanbul'
153
+ | 'America/Havana'
154
+ | 'NZ-CHAT'
155
+ | 'Asia/Choibalsan'
156
+ | 'America/Porto_Acre'
157
+ | 'Asia/Omsk'
158
+ | 'Europe/Vaduz'
159
+ | 'US/Michigan'
160
+ | 'Asia/Dhaka'
161
+ | 'America/Barbados'
162
+ | 'Europe/Tiraspol'
163
+ | 'Atlantic/Cape_Verde'
164
+ | 'Asia/Yekaterinburg'
165
+ | 'America/Louisville'
166
+ | 'Pacific/Johnston'
167
+ | 'Pacific/Chatham'
168
+ | 'Europe/Ljubljana'
169
+ | 'America/Sao_Paulo'
170
+ | 'Asia/Jayapura'
171
+ | 'America/Curacao'
172
+ | 'Asia/Dushanbe'
173
+ | 'America/Guyana'
174
+ | 'America/Guayaquil'
175
+ | 'America/Martinique'
176
+ | 'Portugal'
177
+ | 'Europe/Berlin'
178
+ | 'Europe/Moscow'
179
+ | 'Europe/Chisinau'
180
+ | 'America/Puerto_Rico'
181
+ | 'America/Rankin_Inlet'
182
+ | 'Pacific/Ponape'
183
+ | 'Europe/Stockholm'
184
+ | 'Europe/Budapest'
185
+ | 'America/Argentina/Jujuy'
186
+ | 'Australia/Eucla'
187
+ | 'Asia/Shanghai'
188
+ | 'Universal'
189
+ | 'Europe/Zagreb'
190
+ | 'America/Port_of_Spain'
191
+ | 'Europe/Helsinki'
192
+ | 'Asia/Beirut'
193
+ | 'Asia/Tel_Aviv'
194
+ | 'Pacific/Bougainville'
195
+ | 'US/Central'
196
+ | 'Africa/Sao_Tome'
197
+ | 'Indian/Chagos'
198
+ | 'America/Cayenne'
199
+ | 'Asia/Yakutsk'
200
+ | 'Pacific/Galapagos'
201
+ | 'Australia/North'
202
+ | 'Europe/Paris'
203
+ | 'Africa/Ndjamena'
204
+ | 'Pacific/Fiji'
205
+ | 'America/Rainy_River'
206
+ | 'Indian/Maldives'
207
+ | 'Australia/Yancowinna'
208
+ | 'SystemV/AST4'
209
+ | 'Asia/Oral'
210
+ | 'America/Yellowknife'
211
+ | 'Pacific/Enderbury'
212
+ | 'America/Juneau'
213
+ | 'Australia/Victoria'
214
+ | 'America/Indiana/Vevay'
215
+ | 'Asia/Tashkent'
216
+ | 'Asia/Jakarta'
217
+ | 'Africa/Ceuta'
218
+ | 'Asia/Barnaul'
219
+ | 'America/Recife'
220
+ | 'America/Buenos_Aires'
221
+ | 'America/Noronha'
222
+ | 'America/Swift_Current'
223
+ | 'Australia/Adelaide'
224
+ | 'America/Metlakatla'
225
+ | 'Africa/Djibouti'
226
+ | 'America/Paramaribo'
227
+ | 'Asia/Qostanay'
228
+ | 'Europe/Simferopol'
229
+ | 'Europe/Sofia'
230
+ | 'Africa/Nouakchott'
231
+ | 'Europe/Prague'
232
+ | 'America/Indiana/Vincennes'
233
+ | 'Antarctica/Mawson'
234
+ | 'America/Kralendijk'
235
+ | 'Antarctica/Troll'
236
+ | 'Europe/Samara'
237
+ | 'Indian/Christmas'
238
+ | 'America/Antigua'
239
+ | 'Pacific/Gambier'
240
+ | 'America/Indianapolis'
241
+ | 'America/Inuvik'
242
+ | 'America/Iqaluit'
243
+ | 'Pacific/Funafuti'
244
+ | 'UTC'
245
+ | 'Antarctica/Macquarie'
246
+ | 'Canada/Pacific'
247
+ | 'America/Moncton'
248
+ | 'Africa/Gaborone'
249
+ | 'Pacific/Chuuk'
250
+ | 'Asia/Pyongyang'
251
+ | 'America/St_Vincent'
252
+ | 'Asia/Gaza'
253
+ | 'Etc/Universal'
254
+ | 'PST8PDT'
255
+ | 'Atlantic/Faeroe'
256
+ | 'Asia/Qyzylorda'
257
+ | 'Canada/Newfoundland'
258
+ | 'America/Kentucky/Louisville'
259
+ | 'America/Yakutat'
260
+ | 'Asia/Ho_Chi_Minh'
261
+ | 'Antarctica/Casey'
262
+ | 'Europe/Copenhagen'
263
+ | 'Africa/Asmara'
264
+ | 'Atlantic/Azores'
265
+ | 'Europe/Vienna'
266
+ | 'ROK'
267
+ | 'Pacific/Pitcairn'
268
+ | 'America/Mazatlan'
269
+ | 'Australia/Queensland'
270
+ | 'Pacific/Nauru'
271
+ | 'Europe/Tirane'
272
+ | 'Asia/Kolkata'
273
+ | 'SystemV/MST7'
274
+ | 'Australia/Canberra'
275
+ | 'MET'
276
+ | 'Australia/Broken_Hill'
277
+ | 'Europe/Riga'
278
+ | 'America/Dominica'
279
+ | 'Africa/Abidjan'
280
+ | 'America/Mendoza'
281
+ | 'America/Santarem'
282
+ | 'Kwajalein'
283
+ | 'America/Asuncion'
284
+ | 'Asia/Ulan_Bator'
285
+ | 'NZ'
286
+ | 'America/Boise'
287
+ | 'Australia/Currie'
288
+ | 'EST5EDT'
289
+ | 'Pacific/Guam'
290
+ | 'Pacific/Wake'
291
+ | 'Atlantic/Bermuda'
292
+ | 'America/Costa_Rica'
293
+ | 'America/Dawson'
294
+ | 'Asia/Chongqing'
295
+ | 'Eire'
296
+ | 'Europe/Amsterdam'
297
+ | 'America/Indiana/Knox'
298
+ | 'America/North_Dakota/Beulah'
299
+ | 'Africa/Accra'
300
+ | 'Atlantic/Faroe'
301
+ | 'Mexico/BajaNorte'
302
+ | 'America/Maceio'
303
+ | 'Etc/UCT'
304
+ | 'Pacific/Apia'
305
+ | 'GMT0'
306
+ | 'America/Atka'
307
+ | 'Pacific/Niue'
308
+ | 'Australia/Lord_Howe'
309
+ | 'Europe/Dublin'
310
+ | 'Pacific/Truk'
311
+ | 'MST7MDT'
312
+ | 'America/Monterrey'
313
+ | 'America/Nassau'
314
+ | 'America/Jamaica'
315
+ | 'Asia/Bishkek'
316
+ | 'America/Atikokan'
317
+ | 'Atlantic/Stanley'
318
+ | 'Australia/NSW'
319
+ | 'US/Hawaii'
320
+ | 'SystemV/CST6'
321
+ | 'Indian/Mahe'
322
+ | 'Asia/Aqtobe'
323
+ | 'America/Sitka'
324
+ | 'Asia/Vladivostok'
325
+ | 'Africa/Libreville'
326
+ | 'Africa/Maputo'
327
+ | 'Zulu'
328
+ | 'America/Kentucky/Monticello'
329
+ | 'Africa/El_Aaiun'
330
+ | 'Africa/Ouagadougou'
331
+ | 'America/Coral_Harbour'
332
+ | 'Pacific/Marquesas'
333
+ | 'Brazil/West'
334
+ | 'America/Aruba'
335
+ | 'America/North_Dakota/Center'
336
+ | 'America/Cayman'
337
+ | 'Asia/Ulaanbaatar'
338
+ | 'Asia/Baghdad'
339
+ | 'Europe/San_Marino'
340
+ | 'America/Indiana/Tell_City'
341
+ | 'America/Tijuana'
342
+ | 'Pacific/Saipan'
343
+ | 'SystemV/YST9'
344
+ | 'Africa/Douala'
345
+ | 'America/Chihuahua'
346
+ | 'America/Ojinaga'
347
+ | 'Asia/Hovd'
348
+ | 'America/Anchorage'
349
+ | 'Chile/EasterIsland'
350
+ | 'America/Halifax'
351
+ | 'Antarctica/Rothera'
352
+ | 'America/Indiana/Indianapolis'
353
+ | 'US/Mountain'
354
+ | 'Asia/Damascus'
355
+ | 'America/Argentina/San_Luis'
356
+ | 'America/Santiago'
357
+ | 'Asia/Baku'
358
+ | 'America/Argentina/Ushuaia'
359
+ | 'Atlantic/Reykjavik'
360
+ | 'Africa/Brazzaville'
361
+ | 'Africa/Porto-Novo'
362
+ | 'America/La_Paz'
363
+ | 'Antarctica/DumontDUrville'
364
+ | 'Asia/Taipei'
365
+ | 'Antarctica/South_Pole'
366
+ | 'Asia/Manila'
367
+ | 'Asia/Bangkok'
368
+ | 'Africa/Dar_es_Salaam'
369
+ | 'Poland'
370
+ | 'Atlantic/Madeira'
371
+ | 'Antarctica/Palmer'
372
+ | 'America/Thunder_Bay'
373
+ | 'Africa/Addis_Ababa'
374
+ | 'Asia/Yangon'
375
+ | 'Europe/Uzhgorod'
376
+ | 'Brazil/DeNoronha'
377
+ | 'Asia/Ashkhabad'
378
+ | 'Etc/Zulu'
379
+ | 'America/Indiana/Marengo'
380
+ | 'America/Creston'
381
+ | 'America/Punta_Arenas'
382
+ | 'America/Mexico_City'
383
+ | 'Antarctica/Vostok'
384
+ | 'Asia/Jerusalem'
385
+ | 'Europe/Andorra'
386
+ | 'US/Samoa'
387
+ | 'PRC'
388
+ | 'Asia/Vientiane'
389
+ | 'Pacific/Kiritimati'
390
+ | 'America/Matamoros'
391
+ | 'America/Blanc-Sablon'
392
+ | 'Asia/Riyadh'
393
+ | 'Iceland'
394
+ | 'Pacific/Pohnpei'
395
+ | 'Asia/Ujung_Pandang'
396
+ | 'Atlantic/South_Georgia'
397
+ | 'Europe/Lisbon'
398
+ | 'Asia/Harbin'
399
+ | 'Europe/Oslo'
400
+ | 'Asia/Novokuznetsk'
401
+ | 'CST6CDT'
402
+ | 'Atlantic/Canary'
403
+ | 'America/Knox_IN'
404
+ | 'Asia/Kuwait'
405
+ | 'SystemV/HST10'
406
+ | 'Pacific/Efate'
407
+ | 'Africa/Lome'
408
+ | 'America/Bogota'
409
+ | 'America/Menominee'
410
+ | 'America/Adak'
411
+ | 'Pacific/Norfolk'
412
+ | 'Europe/Kirov'
413
+ | 'America/Resolute'
414
+ | 'Pacific/Tarawa'
415
+ | 'Africa/Kampala'
416
+ | 'Asia/Krasnoyarsk'
417
+ | 'Greenwich'
418
+ | 'SystemV/EST5'
419
+ | 'America/Edmonton'
420
+ | 'Europe/Podgorica'
421
+ | 'Australia/South'
422
+ | 'Canada/Central'
423
+ | 'Africa/Bujumbura'
424
+ | 'America/Santo_Domingo'
425
+ | 'US/Eastern'
426
+ | 'Europe/Minsk'
427
+ | 'Pacific/Auckland'
428
+ | 'Africa/Casablanca'
429
+ | 'America/Glace_Bay'
430
+ | 'Canada/Eastern'
431
+ | 'Asia/Qatar'
432
+ | 'Europe/Kiev'
433
+ | 'Singapore'
434
+ | 'Asia/Magadan'
435
+ | 'SystemV/PST8'
436
+ | 'America/Port-au-Prince'
437
+ | 'Europe/Belfast'
438
+ | 'America/St_Barthelemy'
439
+ | 'Asia/Ashgabat'
440
+ | 'Africa/Luanda'
441
+ | 'America/Nipigon'
442
+ | 'Atlantic/Jan_Mayen'
443
+ | 'Brazil/Acre'
444
+ | 'Asia/Muscat'
445
+ | 'Asia/Bahrain'
446
+ | 'Europe/Vilnius'
447
+ | 'America/Fortaleza'
448
+ | 'Etc/GMT0'
449
+ | 'US/East-Indiana'
450
+ | 'America/Hermosillo'
451
+ | 'America/Cancun'
452
+ | 'Africa/Maseru'
453
+ | 'Pacific/Kosrae'
454
+ | 'Africa/Kinshasa'
455
+ | 'Asia/Kathmandu'
456
+ | 'Asia/Seoul'
457
+ | 'Australia/Sydney'
458
+ | 'America/Lima'
459
+ | 'Australia/LHI'
460
+ | 'America/St_Lucia'
461
+ | 'Europe/Madrid'
462
+ | 'America/Bahia_Banderas'
463
+ | 'America/Montserrat'
464
+ | 'Asia/Brunei'
465
+ | 'America/Santa_Isabel'
466
+ | 'Canada/Mountain'
467
+ | 'America/Cambridge_Bay'
468
+ | 'Asia/Colombo'
469
+ | 'Australia/West'
470
+ | 'Indian/Antananarivo'
471
+ | 'Australia/Brisbane'
472
+ | 'Indian/Mayotte'
473
+ | 'US/Indiana-Starke'
474
+ | 'Asia/Urumqi'
475
+ | 'US/Aleutian'
476
+ | 'Europe/Volgograd'
477
+ | 'America/Lower_Princes'
478
+ | 'America/Vancouver'
479
+ | 'Africa/Blantyre'
480
+ | 'America/Rio_Branco'
481
+ | 'America/Danmarkshavn'
482
+ | 'America/Detroit'
483
+ | 'America/Thule'
484
+ | 'Africa/Lusaka'
485
+ | 'Asia/Hong_Kong'
486
+ | 'Iran'
487
+ | 'America/Argentina/La_Rioja'
488
+ | 'Africa/Dakar'
489
+ | 'SystemV/CST6CDT'
490
+ | 'America/Tortola'
491
+ | 'America/Porto_Velho'
492
+ | 'Asia/Sakhalin'
493
+ | 'Etc/GMT+10'
494
+ | 'America/Scoresbysund'
495
+ | 'Asia/Kamchatka'
496
+ | 'Asia/Thimbu'
497
+ | 'Africa/Harare'
498
+ | 'Etc/GMT+12'
499
+ | 'Etc/GMT+11'
500
+ | 'Navajo'
501
+ | 'America/Nome'
502
+ | 'Europe/Tallinn'
503
+ | 'Turkey'
504
+ | 'Africa/Khartoum'
505
+ | 'Africa/Johannesburg'
506
+ | 'Africa/Bangui'
507
+ | 'Europe/Belgrade'
508
+ | 'Jamaica'
509
+ | 'Africa/Bissau'
510
+ | 'Asia/Tehran'
511
+ | 'WET'
512
+ | 'Europe/Astrakhan'
513
+ | 'Africa/Juba'
514
+ | 'America/Campo_Grande'
515
+ | 'America/Belem'
516
+ | 'Etc/Greenwich'
517
+ | 'Asia/Saigon'
518
+ | 'America/Ensenada'
519
+ | 'Pacific/Midway'
520
+ | 'America/Jujuy'
521
+ | 'Africa/Timbuktu'
522
+ | 'America/Bahia'
523
+ | 'America/Goose_Bay'
524
+ | 'America/Virgin'
525
+ | 'America/Pangnirtung'
526
+ | 'Asia/Katmandu'
527
+ | 'America/Phoenix'
528
+ | 'Africa/Niamey'
529
+ | 'America/Whitehorse'
530
+ | 'Pacific/Noumea'
531
+ | 'Asia/Tbilisi'
532
+ | 'America/Montreal'
533
+ | 'Asia/Makassar'
534
+ | 'America/Argentina/San_Juan'
535
+ | 'Hongkong'
536
+ | 'UCT'
537
+ | 'Asia/Nicosia'
538
+ | 'America/Indiana/Winamac'
539
+ | 'SystemV/MST7MDT'
540
+ | 'America/Argentina/ComodRivadavia'
541
+ | 'America/Boa_Vista'
542
+ | 'America/Grenada'
543
+ | 'Asia/Atyrau'
544
+ | 'Australia/Darwin'
545
+ | 'Asia/Khandyga'
546
+ | 'Asia/Kuala_Lumpur'
547
+ | 'Asia/Famagusta'
548
+ | 'Asia/Thimphu'
549
+ | 'Asia/Rangoon'
550
+ | 'Europe/Bratislava'
551
+ | 'Asia/Calcutta'
552
+ | 'America/Argentina/Tucuman'
553
+ | 'Asia/Kabul'
554
+ | 'Indian/Cocos'
555
+ | 'Japan'
556
+ | 'Pacific/Tongatapu'
557
+ | 'America/New_York'
558
+ | 'Etc/GMT-12'
559
+ | 'Etc/GMT-11'
560
+ | 'America/Nuuk'
561
+ | 'Etc/GMT-10'
562
+ | 'SystemV/YST9YDT'
563
+ | 'Europe/Ulyanovsk'
564
+ | 'Etc/GMT-14'
565
+ | 'Etc/GMT-13'
566
+ | 'W-SU'
567
+ | 'America/Merida'
568
+ | 'EET'
569
+ | 'America/Rosario'
570
+ | 'Canada/Saskatchewan'
571
+ | 'America/St_Kitts'
572
+ | 'Arctic/Longyearbyen'
573
+ | 'America/Fort_Nelson'
574
+ | 'America/Caracas'
575
+ | 'America/Guadeloupe'
576
+ | 'Asia/Hebron'
577
+ | 'Indian/Kerguelen'
578
+ | 'SystemV/PST8PDT'
579
+ | 'Africa/Monrovia'
580
+ | 'Asia/Ust-Nera'
581
+ | 'Egypt'
582
+ | 'Asia/Srednekolymsk'
583
+ | 'America/North_Dakota/New_Salem'
584
+ | 'Asia/Anadyr'
585
+ | 'Australia/Melbourne'
586
+ | 'Asia/Irkutsk'
587
+ | 'America/Shiprock'
588
+ | 'America/Winnipeg'
589
+ | 'Europe/Vatican'
590
+ | 'Asia/Amman'
591
+ | 'Etc/UTC'
592
+ | 'SystemV/AST4ADT'
593
+ | 'Asia/Tokyo'
594
+ | 'America/Toronto'
595
+ | 'Asia/Singapore'
596
+ | 'Australia/Lindeman'
597
+ | 'America/Los_Angeles'
598
+ | 'SystemV/EST5EDT'
599
+ | 'Pacific/Majuro'
600
+ | 'America/Argentina/Buenos_Aires'
601
+ | 'Europe/Nicosia'
602
+ | 'Pacific/Guadalcanal'
603
+ | 'Europe/Athens'
604
+ | 'US/Pacific'
605
+ | 'Europe/Monaco'
606
+
607
+ export type ErrorStatus = 400 | 401 | 403 | 409 | 500 | 503 | 501
608
+ export type OKStatus = 200 | 201 | 202 | 205
609
+
610
+ export interface Artifact {
611
+ type: string
612
+ version: string
613
+ }
614
+
615
+ export interface EmptySection {
616
+ id: string
617
+ body: []
618
+ class: 'Section'
619
+ }
620
+
621
+ export interface Timezone {
622
+ value: TimezoneValue
623
+ label: string
624
+ }
625
+
626
+ export type TimezoneMode = 'user' | 'plant'
627
+
628
+ export interface ConfigSection {
629
+ id: 'config'
630
+ view: {
631
+ id: 'view'
632
+ label: string
633
+ view_type: ViewType
634
+ parameters: {_ref: ['parameters']; class: 'Section'; _schema: '_ref'}
635
+ description: string
636
+ color_scheme: string
637
+ data_set_sets: {
638
+ _ref: ['data_set_sets']
639
+ class: 'Section'
640
+ _schema: '_ref'
641
+ }
642
+ }
643
+ class: 'SQView'
644
+ }
645
+
646
+ export interface BasicParametersSection {
647
+ id: 'parameters'
648
+ body: [
649
+ {
650
+ id: 'Period'
651
+ class: 'Parameter'
652
+ parameter: {class: 'Period'; label: 'Period'; initial: Period}
653
+ },
654
+ {
655
+ id: 'Granularity'
656
+ class: 'Parameter'
657
+ parameter: {
658
+ class: 'Granularity'
659
+ label: 'Granularity'
660
+ initial: Granularity
661
+ }
662
+ },
663
+ ]
664
+ class: 'Section'
665
+ }
666
+
667
+ export type Section = BasicParametersSection | ConfigSection | EmptySection
668
+
669
+ export interface SQView {
670
+ version: string
671
+ artifact: Artifact
672
+ body: Section[]
673
+ }
674
+
675
+ export interface ApiConfig extends RequestInit {
676
+ token?: string
677
+ body?: any
678
+ }
679
+
680
+ export type ApiFn = (
681
+ endpoint: string,
682
+ config?: ApiConfig,
683
+ ) => Promise<
684
+ {status: ErrorStatus} | {body: Record<string, any>; status: OKStatus}
685
+ >
686
+
687
+ export type TokenThunk = () => Promise<
688
+ {status: OKStatus; body: {token: string}} | {status: ErrorStatus}
689
+ >
690
+
691
+ export interface InitialisationConfig {
692
+ apiFn: ApiFn
693
+ }
694
+
695
+ export type PeriodTimeMode = 'absolute' | 'local'
696
+
697
+ export type ViewType =
698
+ | 'time-chart'
699
+ | 'object-chart'
700
+ | 'object-heatmap'
701
+ | 'scatter-chart'
702
+ | 'object-table'
703
+ | 'time-table'
704
+ | 'kpis'
705
+
706
+ export type Granularity =
707
+ | '1 minute'
708
+ | '5 minutes'
709
+ | '10 minutes'
710
+ | '15 minutes'
711
+ | '30 minutes'
712
+ | '1 hour'
713
+ | '1 day'
714
+ | '1 week'
715
+ | '1 month'
716
+ | '3 months'
717
+ | '1 year'
718
+
719
+ export type Period =
720
+ | 'last-7-days'
721
+ | 'last-week'
722
+ | 'since-beginning'
723
+ | 'last-12-months'
724
+ | 'year-to-date'
725
+ | 'today'
726
+ | 'current-month'
727
+ | 'last-month'
728
+ | 'forecast-4-days'
729
+ | 'tomorrow'
730
+ | 'last-24-hours'
731
+ | 'last-30-days'
732
+ | 'last-7x24-hours'
733
+ | 'last-3x24-hours'
734
+ | 'last-15-minutes'
735
+ | 'last-3-days'
736
+ | 'last-year'
737
+ | 'yesterday'
738
+ | 'forecast-10-days'
739
+ | 'custom'
740
+
741
+ export type LevelValue =
742
+ | 'site-group'
743
+ | 'site'
744
+ | 'ac-node'
745
+ | 'ac-input'
746
+ | 'ac-phase'
747
+ | 'connection'
748
+ | 'dc-input'
749
+ | 'dc-node'
750
+ | 'inverter'
751
+ | 'inverter-device'
752
+ | 'logger'
753
+ | 'mppt'
754
+ | 'module-group'
755
+ | 'power-unit'
756
+ | 'sensor'
757
+ | 'strings'
758
+ | 'tracker'
759
+
760
+ export type RepresentationValue =
761
+ | 'line'
762
+ | 'line-and-marker'
763
+ | 'marker'
764
+ | 'spline'
765
+ | 'column'
766
+ | 'area'
767
+
768
+ export type StackingOptionValue = 'no' | 'normal' | 'percent'
769
+
770
+ export type StackingOption = {value: StackingOptionValue; label: string}
771
+
772
+ export type Representation = {
773
+ value: RepresentationValue
774
+ label: string
775
+ }
776
+
777
+ export type Level = {
778
+ value: LevelValue
779
+ label: string
780
+ }
781
+
782
+ /**
783
+ * Logical device type
784
+ */
785
+ export type LDType = {
786
+ value: string
787
+ label: string
788
+ }
789
+
790
+ /**
791
+ * Containers (Actually physical plants)
792
+ */
793
+ export type Container = {
794
+ value: string
795
+ label: string
796
+ }
797
+
798
+ export type Template = {
799
+ value: string
800
+ label: string
801
+ }
802
+
803
+ export interface EmptyViewOptions {
804
+ viewType: ViewType
805
+ label: string
806
+ /**
807
+ * @default "15-minutes"
808
+ */
809
+ granularity?: Granularity
810
+ /**
811
+ * @default "last-24-hours"
812
+ */
813
+ period?: Period
814
+ }
815
+
816
+ export interface VisualisationOptions {
817
+ showLegend: boolean
818
+ showTitle: boolean
819
+ }
820
+
821
+ /**
822
+ * ISO local datetime string (YYYY-MM-DDTHH:mm:ss.SSS).
823
+ */
824
+ export type ISODateString = string
825
+
826
+ export type ColorSchemeValue = 'scheme_blrd' | 'scheme_ylrdbl'
827
+
828
+ export type ColorScheme = {
829
+ value: ColorSchemeValue
830
+ label: string
831
+ type?: string
832
+ stops?: [number, string][]
833
+ }
834
+
835
+ export interface Visualization {
836
+ data: {
837
+ datasets: []
838
+ date_from: ISODateString
839
+ date_to: ISODateString
840
+ period_time_mode: string
841
+ clock_or_calendar_mode: string
842
+ granularity: Granularity
843
+ }
844
+ options: VisualisationOptions
845
+ info: {title: string; type: ViewType; color_scheme: ColorSchemeValue}
846
+ values: {}
847
+ disableIncrementalUpdates: boolean
848
+ spec: {
849
+ series: []
850
+ time: {timezone: string}
851
+ legend: {enabled: boolean}
852
+ title: boolean
853
+ chart: {_SQ_: {type: ViewType}; zoomType: string; animation: boolean}
854
+ yAxis: []
855
+ credits: {enabled: boolean}
856
+ display: 'highcharts'
857
+ $schema: 'https://highcharts/7.2'
858
+ xAxis: {
859
+ type: string
860
+ min: number
861
+ max: number
862
+ tickInterval: null //TODO: better types
863
+ }
864
+ tooltip: {
865
+ borderRadius: number
866
+ borderColor: string
867
+ formatter: () => string
868
+ borderWidth: number
869
+ valueDecimals: number
870
+ style: {
871
+ fontFamily: string
872
+ fontSize: string
873
+ lineHeight: string
874
+ }
875
+ useHTML: boolean
876
+ split: boolean
877
+ shared: boolean
878
+ shadow: {color: string; offsetY: number; opacity: number; width: number}
879
+ backgroundColor: string
880
+ enabled: boolean
881
+ }
882
+ }
883
+ }
884
+
885
+ /**
886
+ * Options for representing the dataset
887
+ */
888
+ export interface DatasetOptions {
889
+ graphicalRepresentation: string
890
+ id: string
891
+ colorSetting: string
892
+ }
893
+
894
+ export interface DatasetTemplateSpec {
895
+ selectedLevel: string
896
+ selectedContainer?: string
897
+ selectedTemplate: string
898
+ }
899
+
900
+ export type Dataset = any //TODO: Better types here
901
+
902
+ /**
903
+ * Type definitions for all the API
904
+ */
905
+ interface CommonLib {
906
+ /**
907
+ * Initialise the SQA Common library with a `apiFn` function.
908
+ * Make sure to call `wrapRefresh` before calling this function
909
+ * @param config
910
+ */
911
+ init(config: InitialisationConfig): Promise<void>
912
+
913
+ /**
914
+ * Wraps the `apiFn` with retry capabilities and refreshes token that was
915
+ * received with the `getToken` thunk
916
+ * @param apiFn - The function to call the SQA endpoints
917
+ * @param getToken - function with no arguments that returns the JWT token
918
+ */
919
+ wrapRefresh(
920
+ apiFn: ApiFn,
921
+ getToken: TokenThunk,
922
+ ): {apiFn: ApiFn; resetFn: () => void}
923
+
924
+ /**
925
+ *
926
+ */
927
+ logout(): void
928
+
929
+ /**
930
+ * Returns configuration for a new empty view
931
+ * @param viewOptions - parameters for the view
932
+ */
933
+ newEmptyView(viewOptions: EmptyViewOptions): SQView
934
+
935
+ /**
936
+ * Get title of the view
937
+ * @param view - the SQView
938
+ */
939
+ getTitle(view: SQView): string
940
+
941
+ /**
942
+ * Set title of the view. Returns updated SQView
943
+ * @param view - the SQView
944
+ * @param value - the new title
945
+ */
946
+ setTitle(view: SQView, value: string): SQView
947
+
948
+ /**
949
+ * Get description of the view
950
+ * @param view - the SQView
951
+ */
952
+ getDescription(view: SQView): string
953
+
954
+ /**
955
+ * Set description of a view. Returns updated SQView
956
+ * @param view - the SQView
957
+ * @param description - the new description
958
+ */
959
+ setDescription(view: SQView, description: string): SQView
960
+
961
+ /**
962
+ * Get colorScheme of the view
963
+ * @param view - the SQView
964
+ */
965
+ getColorScheme(view: SQView): string
966
+
967
+ /**
968
+ * Set colorScheme of a view. Returns updated SQView
969
+ * @param view - the SQView
970
+ * @param colorScheme - the new description
971
+ */
972
+ setColorScheme(view: SQView, colorScheme: ColorSchemeValue): SQView
973
+
974
+ /**
975
+ * Constructs an initial visualization for the view. Returns a promise
976
+ * @param view - the SQView
977
+ * @param options - creation options
978
+ */
979
+ getVisualization(
980
+ view: SQView,
981
+ options: VisualisationOptions,
982
+ ): Promise<Visualization>
983
+
984
+ /**
985
+ * Populates a visualization with data, using the default `append-data` to append each page.
986
+ * @param visualisation - the visualization to be populated
987
+ * @param callback - A callback that will be called when the operation is complete
988
+ */
989
+ populateVisualisation(
990
+ visualisation: Visualization,
991
+ callback: (data: any) => void,
992
+ ): Promise<void>
993
+
994
+ /**
995
+ * Returns the granularity for the view
996
+ * @param view
997
+ */
998
+ getGranularityParameter(view: SQView): Granularity
999
+
1000
+ /**
1001
+ * Returns the granularity for the view
1002
+ * @param view
1003
+ */
1004
+ setGranularityParameter(view: SQView): Granularity
1005
+
1006
+ /**
1007
+ * Returns the object parameters for a view
1008
+ * @param view
1009
+ */
1010
+ getObjectParameters(view: SQView): {
1011
+ id: string
1012
+ label: string
1013
+ ldType: LDType
1014
+ container: Container
1015
+ value: string
1016
+ }
1017
+
1018
+ /**
1019
+ * Sets the object parameter with the given id
1020
+ * @param view - SQView
1021
+ * @param id - The ID of the parameter //TODO: Get list of possible parameters
1022
+ * @param value - Value of the parameter
1023
+ */
1024
+ setObjectParameters(view: SQView, id: string, value: string): SQView
1025
+
1026
+ DataTimezoneModes: [
1027
+ {value: 'user'; label: 'Display data in my own timezone'},
1028
+ {value: 'plant'; label: 'Display data in the timezone of the plant'},
1029
+ ]
1030
+
1031
+ ShowNullAsOptions: [
1032
+ {value: 'no'; label: 'No'},
1033
+ {value: 'normal'; label: 'Normal'},
1034
+ {value: 'percent'; label: 'Percent'},
1035
+ ]
1036
+
1037
+ /**
1038
+ * A collection of all timezones in the format {label, value}
1039
+ */
1040
+ Timezones: Timezone[]
1041
+
1042
+ /**
1043
+ * Sets the user timezone
1044
+ * @param timezone - The value for the new timezone
1045
+ */
1046
+ setUserTimezone(timezone: TimezoneValue): void
1047
+
1048
+ /**
1049
+ * Sets the data timezone mode to either user or plant
1050
+ * @param mode - the timezone mode ('user' | 'data')
1051
+ */
1052
+ setDataTimezoneMode(mode: TimezoneMode): void
1053
+
1054
+ /**
1055
+ * Returns current available colorSchemes
1056
+ */
1057
+ getColorSchemes(): ColorScheme[]
1058
+
1059
+ /**
1060
+ * Array with available levels
1061
+ *
1062
+ * !! Only usable after `init` has been called
1063
+ */
1064
+ getLevels: Level[]
1065
+
1066
+ StackingOptions: StackingOption[]
1067
+
1068
+ Representations: Representation[]
1069
+
1070
+ /**
1071
+ *
1072
+ * Gets the container logical devices types to populate
1073
+ * @param level - level means container
1074
+ */
1075
+ getContainerLdTypes(level: LevelValue): LDType[]
1076
+
1077
+ /**
1078
+ * Based on the selected level and the Selected Logical Device type, returns
1079
+ * available Plants
1080
+ * @param selectedLevel
1081
+ * @param selectedContainerLdType
1082
+ */
1083
+ getContainers(
1084
+ selectedLevel: LevelValue,
1085
+ selectedContainerLdType: LDType,
1086
+ ): Container[]
1087
+
1088
+ /**
1089
+ * Get all available templates for the current selection
1090
+ * @param selectedLevel
1091
+ * @param selectedContainer
1092
+ */
1093
+ getTemplates(selectedLevel: Level, selectedContainer: Container): Template[]
1094
+
1095
+ /**
1096
+ * Sets the unit scaling for a view.
1097
+ * All indicators with that unit will be modified. Returns the updated view
1098
+ * @param view - The SQView
1099
+ * @param unitKey - the
1100
+ * @param unitScaling
1101
+ */
1102
+ setUnitScaling(
1103
+ view: SQView,
1104
+ unitKey: string,
1105
+ unitScaling: {min?: number; max?: number},
1106
+ ): SQView
1107
+
1108
+ /**
1109
+ * Gets the unit axis scaling for the given unit
1110
+ * @param view - The SQView
1111
+ * @param unitKey - the
1112
+ */
1113
+ getUnitScaling(
1114
+ view: SQView,
1115
+ unitKey: string,
1116
+ ): {
1117
+ min: number
1118
+ max: number
1119
+ }
1120
+
1121
+ /**
1122
+ * Sets the start date of the period
1123
+ * @param view - SQView
1124
+ * @param value - ISODateString(YYYY-MM-DDTHH:mm:ss.SSS).
1125
+ */
1126
+ setPeriodStart(view: SQView, value: ISODateString): SQView
1127
+
1128
+ /**
1129
+ * Sets the end date of the period
1130
+ * @param view - SQView
1131
+ * @param value - ISODateString(YYYY-MM-DDTHH:mm:ss.SSS).
1132
+ */
1133
+ setPeriodEnd(view: SQView, value: ISODateString): SQView
1134
+
1135
+ /**
1136
+ * Sets the period of the view to the next period. This will automatically make it a `custom` period
1137
+ * @param view - The View
1138
+ */
1139
+ setNextPeriod(view: SQView): SQView
1140
+
1141
+ /**
1142
+ * Sets the period of the view to the previous period. This will automatically make it a `custom` period type
1143
+ * @param view - The View
1144
+ */
1145
+ setPreviousPeriod(view: SQView): SQView
1146
+
1147
+ /**
1148
+ * Set the period type for the view
1149
+ * @param view - SQView
1150
+ * @param value - the new period
1151
+ */
1152
+ setPeriodParameter(view: SQView, value: Period): SQView
1153
+
1154
+ /**
1155
+ * Get the period for the view
1156
+ * @param view - SQView
1157
+ */
1158
+ getPeriodParameter(view: SQView): Period
1159
+
1160
+ /**
1161
+ * Sets the time mode for the period (absolute/local)
1162
+ * @param view
1163
+ * @param periodTimeMode
1164
+ */
1165
+ setPeriodTimeMode(view: SQView, periodTimeMode: PeriodTimeMode): SQView
1166
+
1167
+ /**
1168
+ * Returns the period for the view with all related data
1169
+ * @param view
1170
+ */
1171
+ getPeriodParameterWithRange(view: SQView): {
1172
+ period: Period
1173
+ start: ISODateString
1174
+ end: ISODateString
1175
+ periodTimeMode: PeriodTimeMode
1176
+ }
1177
+
1178
+ getDatasets(view: SQView): Dataset[]
1179
+
1180
+ /**
1181
+ * Adds a dataset to the view using a fixed set of objects.
1182
+ * Removes any duplicate object indicator pairs
1183
+ * @param view - The SQView
1184
+ * @param objects - Selected Logical Device(s)
1185
+ * @param indicators - Selected indicators
1186
+ * @param options
1187
+ */
1188
+ addEnumDataset(
1189
+ view: SQView,
1190
+ objects: LDType,
1191
+ indicators: [string],
1192
+ options: DatasetOptions,
1193
+ ): SQView
1194
+
1195
+ addTemplateDataset(
1196
+ view: SQView,
1197
+ spec: DatasetTemplateSpec,
1198
+ indicators: [string],
1199
+ opts: DatasetOptions,
1200
+ ): SQView
1201
+ }
1202
+
1203
+ export const sqa: {
1204
+ common: CommonLib
1205
+ }
1206
+
1207
+ export default sqa
4
1208
  }
1209
+