camstreamerlib 4.0.0-beta.3 → 4.0.0-beta.30

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 (192) hide show
  1. package/README.md +8 -2
  2. package/cjs/CamOverlayAPI.d.ts +47 -26
  3. package/cjs/CamOverlayAPI.js +171 -88
  4. package/cjs/CamOverlayDrawingAPI.d.ts +2 -47
  5. package/cjs/CamOverlayDrawingAPI.js +6 -3
  6. package/cjs/CamOverlayPainter/Frame.d.ts +8 -37
  7. package/cjs/CamOverlayPainter/Frame.js +33 -0
  8. package/cjs/CamOverlayPainter/Painter.d.ts +16 -10
  9. package/cjs/CamOverlayPainter/Painter.js +6 -5
  10. package/cjs/CamOverlayPainter/ResourceManager.d.ts +3 -2
  11. package/cjs/CamOverlayPainter/ResourceManager.js +8 -11
  12. package/cjs/CamScripterAPI.d.ts +33 -16
  13. package/cjs/CamScripterAPI.js +50 -41
  14. package/cjs/CamScripterAPICameraEventsGenerator.d.ts +1 -1
  15. package/cjs/CamScripterAPICameraEventsGenerator.js +6 -3
  16. package/cjs/CamStreamerAPI.d.ts +16 -14
  17. package/cjs/CamStreamerAPI.js +32 -32
  18. package/cjs/CamSwitcherAPI.d.ts +42 -37
  19. package/cjs/CamSwitcherAPI.js +123 -114
  20. package/cjs/CamSwitcherEvents.d.ts +1 -1
  21. package/cjs/PlaneTrackerAPI.d.ts +42 -0
  22. package/cjs/PlaneTrackerAPI.js +211 -0
  23. package/cjs/VapixAPI.d.ts +56 -43
  24. package/cjs/VapixAPI.js +305 -216
  25. package/cjs/VapixEvents.d.ts +1 -1
  26. package/cjs/VapixEvents.js +3 -3
  27. package/cjs/errors/errors.d.ts +3 -0
  28. package/cjs/errors/errors.js +8 -1
  29. package/cjs/events/AxisCameraStationEvents.d.ts +5 -4
  30. package/cjs/events/AxisCameraStationEvents.js +23 -18
  31. package/cjs/events/GenetecAgent.d.ts +6 -3
  32. package/cjs/events/GenetecAgent.js +30 -19
  33. package/cjs/index.d.ts +14 -1
  34. package/cjs/index.js +23 -2
  35. package/cjs/internal/Digest.js +6 -6
  36. package/cjs/internal/ProxyClient.d.ts +8 -9
  37. package/cjs/internal/ProxyClient.js +25 -29
  38. package/cjs/internal/types.d.ts +42 -0
  39. package/cjs/internal/types.js +2 -0
  40. package/cjs/internal/utils.d.ts +4 -1
  41. package/cjs/internal/utils.js +22 -3
  42. package/cjs/internal/versionCompare.d.ts +2 -2
  43. package/cjs/node/DefaultClient.d.ts +5 -6
  44. package/cjs/node/DefaultClient.js +12 -14
  45. package/cjs/node/HttpRequestSender.d.ts +1 -0
  46. package/cjs/node/HttpRequestSender.js +13 -3
  47. package/cjs/node/HttpServer.js +1 -1
  48. package/cjs/node/WsClient.d.ts +2 -1
  49. package/cjs/node/WsEventClient.d.ts +1 -1
  50. package/cjs/node/index.d.ts +2 -0
  51. package/cjs/node/index.js +18 -1
  52. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +3073 -0
  53. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +127 -0
  54. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +114 -0
  55. package/cjs/types/CamOverlayAPI/accuweatherSchema.js +50 -0
  56. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +783 -0
  57. package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +75 -0
  58. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +122 -0
  59. package/cjs/types/CamOverlayAPI/imagesSchema.js +12 -0
  60. package/cjs/types/CamOverlayAPI/index.d.ts +9 -0
  61. package/cjs/types/CamOverlayAPI/index.js +25 -0
  62. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +130 -0
  63. package/cjs/types/CamOverlayAPI/infotickerSchema.js +29 -0
  64. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +166 -0
  65. package/cjs/types/CamOverlayAPI/pipSchema.js +42 -0
  66. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +126 -0
  67. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +28 -0
  68. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +146 -0
  69. package/cjs/types/CamOverlayAPI/ptzSchema.js +15 -0
  70. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +79 -0
  71. package/cjs/types/CamOverlayAPI/screenSharingSchema.js +11 -0
  72. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +79 -0
  73. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +11 -0
  74. package/cjs/types/CamOverlayDrawingAPI.d.ts +58 -0
  75. package/cjs/types/CamOverlayDrawingAPI.js +2 -0
  76. package/cjs/types/CamOverlayPainter.d.ts +74 -0
  77. package/cjs/types/CamOverlayPainter.js +2 -0
  78. package/cjs/types/CamScripterAPI.d.ts +82 -17
  79. package/cjs/types/CamScripterAPI.js +22 -7
  80. package/cjs/types/CamStreamerAPI.d.ts +16 -5
  81. package/cjs/types/CamStreamerAPI.js +5 -1
  82. package/cjs/types/CamSwitcherAPI.d.ts +5 -5
  83. package/cjs/types/CamSwitcherEvents.d.ts +77 -0
  84. package/cjs/types/CamSwitcherEvents.js +8 -0
  85. package/cjs/types/PlaneTrackerAPI.d.ts +8 -0
  86. package/cjs/types/PlaneTrackerAPI.js +2 -0
  87. package/cjs/types/VapixAPI.d.ts +636 -519
  88. package/cjs/types/VapixAPI.js +62 -24
  89. package/cjs/types/common.d.ts +14 -5
  90. package/cjs/web/DefaultClient.d.ts +5 -5
  91. package/cjs/web/DefaultClient.js +22 -10
  92. package/cjs/web/WsClient.js +2 -2
  93. package/esm/CamOverlayAPI.d.ts +47 -26
  94. package/esm/CamOverlayAPI.js +169 -86
  95. package/esm/CamOverlayDrawingAPI.d.ts +2 -47
  96. package/esm/CamOverlayDrawingAPI.js +6 -3
  97. package/esm/CamOverlayPainter/Frame.d.ts +8 -37
  98. package/esm/CamOverlayPainter/Frame.js +33 -0
  99. package/esm/CamOverlayPainter/Painter.d.ts +16 -10
  100. package/esm/CamOverlayPainter/Painter.js +5 -3
  101. package/esm/CamOverlayPainter/ResourceManager.d.ts +3 -2
  102. package/esm/CamOverlayPainter/ResourceManager.js +7 -11
  103. package/esm/CamScripterAPI.d.ts +33 -16
  104. package/esm/CamScripterAPI.js +46 -37
  105. package/esm/CamScripterAPICameraEventsGenerator.d.ts +1 -1
  106. package/esm/CamScripterAPICameraEventsGenerator.js +6 -3
  107. package/esm/CamStreamerAPI.d.ts +16 -14
  108. package/esm/CamStreamerAPI.js +32 -32
  109. package/esm/CamSwitcherAPI.d.ts +42 -37
  110. package/esm/CamSwitcherAPI.js +116 -107
  111. package/esm/CamSwitcherEvents.d.ts +1 -1
  112. package/esm/PlaneTrackerAPI.d.ts +42 -0
  113. package/esm/PlaneTrackerAPI.js +207 -0
  114. package/esm/VapixAPI.d.ts +56 -43
  115. package/esm/VapixAPI.js +297 -208
  116. package/esm/VapixEvents.d.ts +1 -1
  117. package/esm/VapixEvents.js +3 -3
  118. package/esm/errors/errors.d.ts +3 -0
  119. package/esm/errors/errors.js +6 -0
  120. package/esm/events/AxisCameraStationEvents.d.ts +5 -4
  121. package/esm/events/AxisCameraStationEvents.js +18 -13
  122. package/esm/events/GenetecAgent.d.ts +6 -3
  123. package/esm/events/GenetecAgent.js +20 -9
  124. package/esm/index.d.ts +14 -1
  125. package/esm/index.js +14 -1
  126. package/esm/internal/Digest.js +6 -6
  127. package/esm/internal/ProxyClient.d.ts +8 -9
  128. package/esm/internal/ProxyClient.js +25 -29
  129. package/esm/internal/types.d.ts +42 -0
  130. package/esm/internal/types.js +1 -0
  131. package/esm/internal/utils.d.ts +4 -1
  132. package/esm/internal/utils.js +17 -1
  133. package/esm/internal/versionCompare.d.ts +2 -2
  134. package/esm/node/DefaultClient.d.ts +5 -6
  135. package/esm/node/DefaultClient.js +12 -14
  136. package/esm/node/HttpRequestSender.d.ts +1 -0
  137. package/esm/node/HttpRequestSender.js +13 -3
  138. package/esm/node/HttpServer.js +1 -1
  139. package/esm/node/WsClient.d.ts +2 -1
  140. package/esm/node/WsEventClient.d.ts +1 -1
  141. package/esm/node/index.d.ts +2 -0
  142. package/esm/node/index.js +2 -0
  143. package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +3073 -0
  144. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +124 -0
  145. package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +114 -0
  146. package/esm/types/CamOverlayAPI/accuweatherSchema.js +46 -0
  147. package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +783 -0
  148. package/esm/types/CamOverlayAPI/customGraphicsSchema.js +71 -0
  149. package/esm/types/CamOverlayAPI/imagesSchema.d.ts +122 -0
  150. package/esm/types/CamOverlayAPI/imagesSchema.js +8 -0
  151. package/esm/types/CamOverlayAPI/index.d.ts +9 -0
  152. package/esm/types/CamOverlayAPI/index.js +9 -0
  153. package/esm/types/CamOverlayAPI/infotickerSchema.d.ts +130 -0
  154. package/esm/types/CamOverlayAPI/infotickerSchema.js +25 -0
  155. package/esm/types/CamOverlayAPI/pipSchema.d.ts +166 -0
  156. package/esm/types/CamOverlayAPI/pipSchema.js +38 -0
  157. package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +126 -0
  158. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +24 -0
  159. package/esm/types/CamOverlayAPI/ptzSchema.d.ts +146 -0
  160. package/esm/types/CamOverlayAPI/ptzSchema.js +11 -0
  161. package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +79 -0
  162. package/esm/types/CamOverlayAPI/screenSharingSchema.js +7 -0
  163. package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +79 -0
  164. package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +7 -0
  165. package/esm/types/CamOverlayDrawingAPI.d.ts +58 -0
  166. package/esm/types/CamOverlayDrawingAPI.js +1 -0
  167. package/esm/types/CamOverlayPainter.d.ts +74 -0
  168. package/esm/types/CamOverlayPainter.js +1 -0
  169. package/esm/types/CamScripterAPI.d.ts +82 -17
  170. package/esm/types/CamScripterAPI.js +21 -6
  171. package/esm/types/CamStreamerAPI.d.ts +16 -5
  172. package/esm/types/CamStreamerAPI.js +4 -0
  173. package/esm/types/CamSwitcherAPI.d.ts +5 -5
  174. package/esm/types/CamSwitcherEvents.d.ts +77 -0
  175. package/esm/types/CamSwitcherEvents.js +8 -0
  176. package/esm/types/PlaneTrackerAPI.d.ts +8 -0
  177. package/esm/types/PlaneTrackerAPI.js +1 -0
  178. package/esm/types/VapixAPI.d.ts +636 -519
  179. package/esm/types/VapixAPI.js +61 -23
  180. package/esm/types/common.d.ts +14 -5
  181. package/esm/web/DefaultClient.d.ts +5 -5
  182. package/esm/web/DefaultClient.js +22 -10
  183. package/esm/web/WsClient.js +2 -2
  184. package/package.json +9 -8
  185. package/cjs/internal/common.d.ts +0 -39
  186. package/cjs/internal/common.js +0 -27
  187. package/cjs/types/CamOverlayAPI.d.ts +0 -188
  188. package/cjs/types/CamOverlayAPI.js +0 -47
  189. package/esm/internal/common.d.ts +0 -39
  190. package/esm/internal/common.js +0 -20
  191. package/esm/types/CamOverlayAPI.d.ts +0 -188
  192. package/esm/types/CamOverlayAPI.js +0 -44
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ import { customGraphicsSchema } from './customGraphicsSchema';
3
+ import { infoTickerSchema, accuweatherSchema, ptzCompassSchema, imagesSchema, ptzSchema, pipSchema, screenSharingSchema, webCameraSharingSchema, } from './index';
4
+ export const WSResponseSchema = z.object({
5
+ status: z.number(),
6
+ message: z.string(),
7
+ data: z.string(),
8
+ });
9
+ export const coordinateSystemSchema = z.union([
10
+ z.literal('top_left'),
11
+ z.literal('top'),
12
+ z.literal('top_right'),
13
+ z.literal('left'),
14
+ z.literal('center'),
15
+ z.literal('right'),
16
+ z.literal('bottom_left'),
17
+ z.literal('bottom'),
18
+ z.literal('bottom_right'),
19
+ ]);
20
+ export const languageSchema = z.union([
21
+ z.literal('en-us'),
22
+ z.literal('fr-fr'),
23
+ z.literal('ja-jp'),
24
+ z.literal('pt-pt'),
25
+ z.literal('es-es'),
26
+ z.literal('de-de'),
27
+ z.literal('ko-kr'),
28
+ z.literal('zh-hk'),
29
+ z.literal('zh-cn'),
30
+ z.literal('nl-nl'),
31
+ z.literal('cs-cz'),
32
+ z.literal('ru-ru'),
33
+ z.literal('sv-se'),
34
+ ]);
35
+ export const fontSchema = z.union([
36
+ z.literal('classic'),
37
+ z.literal('digital'),
38
+ z.custom((val) => {
39
+ return typeof val === 'string';
40
+ }),
41
+ ]);
42
+ export const weatherUnitSchema = z.union([z.literal('Metric'), z.literal('Imperial')]);
43
+ export const widgetCommonSchema = z.object({
44
+ id: z.number().nonnegative(),
45
+ enabled: z.union([z.literal(0), z.literal(1)]),
46
+ automationType: z.union([
47
+ z.literal('time'),
48
+ z.literal('manual'),
49
+ z.literal('schedule'),
50
+ z.custom((val) => {
51
+ return typeof val === 'string' ? /^input\d+$/.test(val) : false;
52
+ }),
53
+ ]),
54
+ invertInput: z.boolean().optional(),
55
+ cameraList: z.array(z.number()),
56
+ camera: z.number().nonnegative().optional(),
57
+ schedule: z.string().optional(),
58
+ customName: z.string(),
59
+ zIndex: z.number().optional(),
60
+ width: z.number().nonnegative(),
61
+ height: z.number().nonnegative(),
62
+ });
63
+ export const widgetsSchema = z.discriminatedUnion('name', [
64
+ infoTickerSchema,
65
+ accuweatherSchema,
66
+ ptzCompassSchema,
67
+ imagesSchema,
68
+ ptzSchema,
69
+ pipSchema,
70
+ customGraphicsSchema,
71
+ screenSharingSchema,
72
+ webCameraSharingSchema,
73
+ ]);
74
+ export const widgetListSchema = z.object({
75
+ services: z.array(widgetsSchema),
76
+ });
77
+ export const sharingSchema = widgetCommonSchema.extend({
78
+ pos_x: z.number().nonnegative(),
79
+ pos_y: z.number().nonnegative(),
80
+ coordSystem: coordinateSystemSchema,
81
+ screenSize: z.number().positive(),
82
+ fps: z.number(),
83
+ });
84
+ export const overlaySchema = z.object({
85
+ active: z.boolean(),
86
+ coordSystem: coordinateSystemSchema,
87
+ pos_x: z.number(),
88
+ pos_y: z.number(),
89
+ imgPath: z.string(),
90
+ imgName: z.string(),
91
+ duration: z.number(),
92
+ scale: z.number(),
93
+ fps: z.number().optional(),
94
+ });
95
+ export var ImageType;
96
+ (function (ImageType) {
97
+ ImageType[ImageType["PNG"] = 0] = "PNG";
98
+ ImageType[ImageType["JPEG"] = 1] = "JPEG";
99
+ })(ImageType || (ImageType = {}));
100
+ export const storageSchema = z.union([
101
+ z.literal('flash'),
102
+ z.literal('SD0'),
103
+ z.literal('ftp'),
104
+ z.literal('samba'),
105
+ z.literal('url'),
106
+ ]);
107
+ export const storageDataListSchema = z.array(z.object({
108
+ type: storageSchema,
109
+ state: z.string(),
110
+ }));
111
+ export const storageResponseSchema = z.object({
112
+ code: z.number(),
113
+ list: storageDataListSchema,
114
+ });
115
+ export const fileSchema = z.object({
116
+ name: z.string(),
117
+ path: z.string().url(),
118
+ storage: storageSchema,
119
+ });
120
+ export const fileListSchema = z.array(fileSchema);
121
+ export const fileDataSchema = z.object({
122
+ code: z.number(),
123
+ list: fileListSchema,
124
+ });
@@ -0,0 +1,114 @@
1
+ import { TWidget } from './CamOverlayAPI';
2
+ import { z } from 'zod';
3
+ export declare const accuweatherSchema: z.ZodObject<{
4
+ id: z.ZodNumber;
5
+ enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
6
+ automationType: z.ZodUnion<[z.ZodLiteral<"time">, z.ZodLiteral<"manual">, z.ZodLiteral<"schedule">, z.ZodType<`input${number}`, z.ZodTypeDef, `input${number}`>]>;
7
+ invertInput: z.ZodOptional<z.ZodBoolean>;
8
+ cameraList: z.ZodArray<z.ZodNumber, "many">;
9
+ camera: z.ZodOptional<z.ZodNumber>;
10
+ schedule: z.ZodOptional<z.ZodString>;
11
+ customName: z.ZodString;
12
+ zIndex: z.ZodOptional<z.ZodNumber>;
13
+ width: z.ZodNumber;
14
+ height: z.ZodNumber;
15
+ } & {
16
+ name: z.ZodLiteral<"accuweather">;
17
+ location: z.ZodString;
18
+ locationName: z.ZodString;
19
+ title: z.ZodString;
20
+ bgStartColor: z.ZodUnion<[z.ZodLiteral<"237,143,73,0.93">, z.ZodLiteral<"0,0,0,0.75">, z.ZodLiteral<"31,32,73,0.9">, z.ZodLiteral<"76,94,127,0.95">]>;
21
+ bgEndColor: z.ZodUnion<[z.ZodLiteral<"234,181,89,0.93">, z.ZodLiteral<"0,0,0,0.75">, z.ZodLiteral<"73,96,213,0.9">, z.ZodLiteral<"140,150,168,0.95">]>;
22
+ clockType: z.ZodUnion<[z.ZodLiteral<"12h">, z.ZodLiteral<"24h">]>;
23
+ lang: z.ZodUnion<[z.ZodLiteral<"en-us">, z.ZodLiteral<"fr-fr">, z.ZodLiteral<"ja-jp">, z.ZodLiteral<"pt-pt">, z.ZodLiteral<"es-es">, z.ZodLiteral<"de-de">, z.ZodLiteral<"ko-kr">, z.ZodLiteral<"zh-hk">, z.ZodLiteral<"zh-cn">, z.ZodLiteral<"nl-nl">, z.ZodLiteral<"cs-cz">, z.ZodLiteral<"ru-ru">, z.ZodLiteral<"sv-se">]>;
24
+ font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
25
+ units: z.ZodUnion<[z.ZodLiteral<"Metric">, z.ZodLiteral<"Imperial">]>;
26
+ pos_x: z.ZodNumber;
27
+ pos_y: z.ZodNumber;
28
+ coordSystem: z.ZodUnion<[z.ZodLiteral<"top_left">, z.ZodLiteral<"top">, z.ZodLiteral<"top_right">, z.ZodLiteral<"left">, z.ZodLiteral<"center">, z.ZodLiteral<"right">, z.ZodLiteral<"bottom_left">, z.ZodLiteral<"bottom">, z.ZodLiteral<"bottom_right">]>;
29
+ layout: z.ZodUnion<[z.ZodLiteral<"0">, z.ZodLiteral<"1">, z.ZodLiteral<"2">, z.ZodLiteral<"3">, z.ZodLiteral<"4">, z.ZodLiteral<"5">, z.ZodLiteral<"6">, z.ZodLiteral<"7">, z.ZodLiteral<"8">, z.ZodLiteral<"9">, z.ZodLiteral<"10">, z.ZodLiteral<"11">, z.ZodLiteral<"12">, z.ZodLiteral<"13">]>;
30
+ scale: z.ZodNumber;
31
+ }, "strip", z.ZodTypeAny, {
32
+ name: "accuweather";
33
+ enabled: 0 | 1;
34
+ id: number;
35
+ width: number;
36
+ height: number;
37
+ pos_x: number;
38
+ pos_y: number;
39
+ font: string;
40
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
41
+ cameraList: number[];
42
+ customName: string;
43
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
44
+ clockType: "12h" | "24h";
45
+ location: string;
46
+ locationName: string;
47
+ title: string;
48
+ bgStartColor: "237,143,73,0.93" | "0,0,0,0.75" | "31,32,73,0.9" | "76,94,127,0.95";
49
+ bgEndColor: "0,0,0,0.75" | "234,181,89,0.93" | "73,96,213,0.9" | "140,150,168,0.95";
50
+ lang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
51
+ units: "Metric" | "Imperial";
52
+ layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
53
+ scale: number;
54
+ camera?: number | undefined;
55
+ schedule?: string | undefined;
56
+ invertInput?: boolean | undefined;
57
+ zIndex?: number | undefined;
58
+ }, {
59
+ name: "accuweather";
60
+ enabled: 0 | 1;
61
+ id: number;
62
+ width: number;
63
+ height: number;
64
+ pos_x: number;
65
+ pos_y: number;
66
+ font: string;
67
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
68
+ cameraList: number[];
69
+ customName: string;
70
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
71
+ clockType: "12h" | "24h";
72
+ location: string;
73
+ locationName: string;
74
+ title: string;
75
+ bgStartColor: "237,143,73,0.93" | "0,0,0,0.75" | "31,32,73,0.9" | "76,94,127,0.95";
76
+ bgEndColor: "0,0,0,0.75" | "234,181,89,0.93" | "73,96,213,0.9" | "140,150,168,0.95";
77
+ lang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
78
+ units: "Metric" | "Imperial";
79
+ layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
80
+ scale: number;
81
+ camera?: number | undefined;
82
+ schedule?: string | undefined;
83
+ invertInput?: boolean | undefined;
84
+ zIndex?: number | undefined;
85
+ }>;
86
+ export type TAccuweather = z.infer<typeof accuweatherSchema>;
87
+ export declare const isAccuweather: (widget: TWidget) => widget is {
88
+ name: "accuweather";
89
+ enabled: 0 | 1;
90
+ id: number;
91
+ width: number;
92
+ height: number;
93
+ pos_x: number;
94
+ pos_y: number;
95
+ font: string;
96
+ automationType: "time" | "manual" | "schedule" | `input${number}`;
97
+ cameraList: number[];
98
+ customName: string;
99
+ coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
100
+ clockType: "12h" | "24h";
101
+ location: string;
102
+ locationName: string;
103
+ title: string;
104
+ bgStartColor: "237,143,73,0.93" | "0,0,0,0.75" | "31,32,73,0.9" | "76,94,127,0.95";
105
+ bgEndColor: "0,0,0,0.75" | "234,181,89,0.93" | "73,96,213,0.9" | "140,150,168,0.95";
106
+ lang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
107
+ units: "Metric" | "Imperial";
108
+ layout: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13";
109
+ scale: number;
110
+ camera?: number | undefined;
111
+ schedule?: string | undefined;
112
+ invertInput?: boolean | undefined;
113
+ zIndex?: number | undefined;
114
+ };
@@ -0,0 +1,46 @@
1
+ import { allowedWidgetNames } from '../../CamOverlayAPI';
2
+ import { coordinateSystemSchema, fontSchema, languageSchema, weatherUnitSchema, widgetCommonSchema, } from './CamOverlayAPI';
3
+ import { z } from 'zod';
4
+ export const accuweatherSchema = widgetCommonSchema.extend({
5
+ name: z.literal(allowedWidgetNames.accuweather),
6
+ location: z.string(),
7
+ locationName: z.string(),
8
+ title: z.string(),
9
+ bgStartColor: z.union([
10
+ z.literal('237,143,73,0.93'),
11
+ z.literal('0,0,0,0.75'),
12
+ z.literal('31,32,73,0.9'),
13
+ z.literal('76,94,127,0.95'),
14
+ ]),
15
+ bgEndColor: z.union([
16
+ z.literal('234,181,89,0.93'),
17
+ z.literal('0,0,0,0.75'),
18
+ z.literal('73,96,213,0.9'),
19
+ z.literal('140,150,168,0.95'),
20
+ ]),
21
+ clockType: z.union([z.literal('12h'), z.literal('24h')]),
22
+ lang: languageSchema,
23
+ font: fontSchema,
24
+ units: weatherUnitSchema,
25
+ pos_x: z.number(),
26
+ pos_y: z.number(),
27
+ coordSystem: coordinateSystemSchema,
28
+ layout: z.union([
29
+ z.literal('0'),
30
+ z.literal('1'),
31
+ z.literal('2'),
32
+ z.literal('3'),
33
+ z.literal('4'),
34
+ z.literal('5'),
35
+ z.literal('6'),
36
+ z.literal('7'),
37
+ z.literal('8'),
38
+ z.literal('9'),
39
+ z.literal('10'),
40
+ z.literal('11'),
41
+ z.literal('12'),
42
+ z.literal('13'),
43
+ ]),
44
+ scale: z.number().nonnegative(),
45
+ });
46
+ export const isAccuweather = (widget) => widget.name === 'accuweather';