@uns-kit/core 1.0.44 → 1.0.46

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.
@@ -1,4 +1,612 @@
1
1
  import { z } from "zod";
2
+ export declare const mqttChannelSchema: z.ZodEffects<z.ZodObject<{
3
+ host: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
4
+ provider: z.ZodLiteral<"inline">;
5
+ value: z.ZodString;
6
+ }, "strict", z.ZodTypeAny, {
7
+ provider?: "inline";
8
+ value?: string;
9
+ }, {
10
+ provider?: "inline";
11
+ value?: string;
12
+ }>, z.ZodObject<{
13
+ provider: z.ZodLiteral<"external">;
14
+ key: z.ZodString;
15
+ optional: z.ZodOptional<z.ZodBoolean>;
16
+ default: z.ZodOptional<z.ZodString>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ provider?: "external";
19
+ key?: string;
20
+ optional?: boolean;
21
+ default?: string;
22
+ }, {
23
+ provider?: "external";
24
+ key?: string;
25
+ optional?: boolean;
26
+ default?: string;
27
+ }>, z.ZodObject<{
28
+ provider: z.ZodLiteral<"system">;
29
+ family: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">]>>;
30
+ interfaceName: z.ZodOptional<z.ZodString>;
31
+ optional: z.ZodOptional<z.ZodBoolean>;
32
+ default: z.ZodOptional<z.ZodString>;
33
+ }, "strict", z.ZodTypeAny, {
34
+ provider?: "system";
35
+ optional?: boolean;
36
+ default?: string;
37
+ family?: "IPv4" | "IPv6";
38
+ interfaceName?: string;
39
+ }, {
40
+ provider?: "system";
41
+ optional?: boolean;
42
+ default?: string;
43
+ family?: "IPv4" | "IPv6";
44
+ interfaceName?: string;
45
+ }>]>]>>;
46
+ hosts: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
47
+ provider: z.ZodLiteral<"inline">;
48
+ value: z.ZodString;
49
+ }, "strict", z.ZodTypeAny, {
50
+ provider?: "inline";
51
+ value?: string;
52
+ }, {
53
+ provider?: "inline";
54
+ value?: string;
55
+ }>, z.ZodObject<{
56
+ provider: z.ZodLiteral<"external">;
57
+ key: z.ZodString;
58
+ optional: z.ZodOptional<z.ZodBoolean>;
59
+ default: z.ZodOptional<z.ZodString>;
60
+ }, "strict", z.ZodTypeAny, {
61
+ provider?: "external";
62
+ key?: string;
63
+ optional?: boolean;
64
+ default?: string;
65
+ }, {
66
+ provider?: "external";
67
+ key?: string;
68
+ optional?: boolean;
69
+ default?: string;
70
+ }>, z.ZodObject<{
71
+ provider: z.ZodLiteral<"system">;
72
+ family: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">]>>;
73
+ interfaceName: z.ZodOptional<z.ZodString>;
74
+ optional: z.ZodOptional<z.ZodBoolean>;
75
+ default: z.ZodOptional<z.ZodString>;
76
+ }, "strict", z.ZodTypeAny, {
77
+ provider?: "system";
78
+ optional?: boolean;
79
+ default?: string;
80
+ family?: "IPv4" | "IPv6";
81
+ interfaceName?: string;
82
+ }, {
83
+ provider?: "system";
84
+ optional?: boolean;
85
+ default?: string;
86
+ family?: "IPv4" | "IPv6";
87
+ interfaceName?: string;
88
+ }>]>]>, "many">>;
89
+ servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
+ host: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
91
+ provider: z.ZodLiteral<"inline">;
92
+ value: z.ZodString;
93
+ }, "strict", z.ZodTypeAny, {
94
+ provider?: "inline";
95
+ value?: string;
96
+ }, {
97
+ provider?: "inline";
98
+ value?: string;
99
+ }>, z.ZodObject<{
100
+ provider: z.ZodLiteral<"external">;
101
+ key: z.ZodString;
102
+ optional: z.ZodOptional<z.ZodBoolean>;
103
+ default: z.ZodOptional<z.ZodString>;
104
+ }, "strict", z.ZodTypeAny, {
105
+ provider?: "external";
106
+ key?: string;
107
+ optional?: boolean;
108
+ default?: string;
109
+ }, {
110
+ provider?: "external";
111
+ key?: string;
112
+ optional?: boolean;
113
+ default?: string;
114
+ }>, z.ZodObject<{
115
+ provider: z.ZodLiteral<"system">;
116
+ family: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"IPv4">, z.ZodLiteral<"IPv6">]>>;
117
+ interfaceName: z.ZodOptional<z.ZodString>;
118
+ optional: z.ZodOptional<z.ZodBoolean>;
119
+ default: z.ZodOptional<z.ZodString>;
120
+ }, "strict", z.ZodTypeAny, {
121
+ provider?: "system";
122
+ optional?: boolean;
123
+ default?: string;
124
+ family?: "IPv4" | "IPv6";
125
+ interfaceName?: string;
126
+ }, {
127
+ provider?: "system";
128
+ optional?: boolean;
129
+ default?: string;
130
+ family?: "IPv4" | "IPv6";
131
+ interfaceName?: string;
132
+ }>]>]>;
133
+ port: z.ZodOptional<z.ZodNumber>;
134
+ protocol: z.ZodOptional<z.ZodEnum<["mqtt", "mqtts", "ws", "wss", "tcp", "ssl"]>>;
135
+ }, "strict", z.ZodTypeAny, {
136
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
137
+ port?: number;
138
+ host?: string | {
139
+ provider?: "inline";
140
+ value?: string;
141
+ } | {
142
+ provider?: "external";
143
+ key?: string;
144
+ optional?: boolean;
145
+ default?: string;
146
+ } | {
147
+ provider?: "system";
148
+ optional?: boolean;
149
+ default?: string;
150
+ family?: "IPv4" | "IPv6";
151
+ interfaceName?: string;
152
+ };
153
+ }, {
154
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
155
+ port?: number;
156
+ host?: string | {
157
+ provider?: "inline";
158
+ value?: string;
159
+ } | {
160
+ provider?: "external";
161
+ key?: string;
162
+ optional?: boolean;
163
+ default?: string;
164
+ } | {
165
+ provider?: "system";
166
+ optional?: boolean;
167
+ default?: string;
168
+ family?: "IPv4" | "IPv6";
169
+ interfaceName?: string;
170
+ };
171
+ }>, "many">>;
172
+ port: z.ZodOptional<z.ZodNumber>;
173
+ protocol: z.ZodOptional<z.ZodEnum<["mqtt", "mqtts", "ws", "wss", "tcp", "ssl"]>>;
174
+ username: z.ZodOptional<z.ZodString>;
175
+ password: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
176
+ provider: z.ZodLiteral<"env">;
177
+ key: z.ZodString;
178
+ optional: z.ZodOptional<z.ZodBoolean>;
179
+ default: z.ZodOptional<z.ZodString>;
180
+ }, "strict", z.ZodTypeAny, {
181
+ provider?: "env";
182
+ key?: string;
183
+ optional?: boolean;
184
+ default?: string;
185
+ }, {
186
+ provider?: "env";
187
+ key?: string;
188
+ optional?: boolean;
189
+ default?: string;
190
+ }>, z.ZodObject<{
191
+ provider: z.ZodLiteral<"infisical">;
192
+ path: z.ZodString;
193
+ key: z.ZodString;
194
+ optional: z.ZodOptional<z.ZodBoolean>;
195
+ environment: z.ZodOptional<z.ZodString>;
196
+ projectId: z.ZodOptional<z.ZodString>;
197
+ default: z.ZodOptional<z.ZodString>;
198
+ }, "strict", z.ZodTypeAny, {
199
+ provider?: "infisical";
200
+ key?: string;
201
+ optional?: boolean;
202
+ default?: string;
203
+ path?: string;
204
+ environment?: string;
205
+ projectId?: string;
206
+ }, {
207
+ provider?: "infisical";
208
+ key?: string;
209
+ optional?: boolean;
210
+ default?: string;
211
+ path?: string;
212
+ environment?: string;
213
+ projectId?: string;
214
+ }>]>]>>;
215
+ clientId: z.ZodOptional<z.ZodString>;
216
+ clean: z.ZodOptional<z.ZodBoolean>;
217
+ keepalive: z.ZodOptional<z.ZodNumber>;
218
+ connectTimeout: z.ZodOptional<z.ZodNumber>;
219
+ reconnectPeriod: z.ZodOptional<z.ZodNumber>;
220
+ reconnectOnConnackError: z.ZodOptional<z.ZodBoolean>;
221
+ resubscribe: z.ZodOptional<z.ZodBoolean>;
222
+ queueQoSZero: z.ZodOptional<z.ZodBoolean>;
223
+ rejectUnauthorized: z.ZodOptional<z.ZodBoolean>;
224
+ properties: z.ZodOptional<z.ZodObject<{
225
+ sessionExpiryInterval: z.ZodOptional<z.ZodNumber>;
226
+ receiveMaximum: z.ZodOptional<z.ZodNumber>;
227
+ maximumPacketSize: z.ZodOptional<z.ZodNumber>;
228
+ topicAliasMaximum: z.ZodOptional<z.ZodNumber>;
229
+ requestResponseInformation: z.ZodOptional<z.ZodBoolean>;
230
+ requestProblemInformation: z.ZodOptional<z.ZodBoolean>;
231
+ userProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
232
+ }, "strict", z.ZodTypeAny, {
233
+ sessionExpiryInterval?: number;
234
+ receiveMaximum?: number;
235
+ maximumPacketSize?: number;
236
+ topicAliasMaximum?: number;
237
+ requestResponseInformation?: boolean;
238
+ requestProblemInformation?: boolean;
239
+ userProperties?: Record<string, string>;
240
+ }, {
241
+ sessionExpiryInterval?: number;
242
+ receiveMaximum?: number;
243
+ maximumPacketSize?: number;
244
+ topicAliasMaximum?: number;
245
+ requestResponseInformation?: boolean;
246
+ requestProblemInformation?: boolean;
247
+ userProperties?: Record<string, string>;
248
+ }>>;
249
+ ca: z.ZodOptional<z.ZodString>;
250
+ cert: z.ZodOptional<z.ZodString>;
251
+ key: z.ZodOptional<z.ZodString>;
252
+ servername: z.ZodOptional<z.ZodString>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ key?: string;
255
+ hosts?: (string | {
256
+ provider?: "inline";
257
+ value?: string;
258
+ } | {
259
+ provider?: "external";
260
+ key?: string;
261
+ optional?: boolean;
262
+ default?: string;
263
+ } | {
264
+ provider?: "system";
265
+ optional?: boolean;
266
+ default?: string;
267
+ family?: "IPv4" | "IPv6";
268
+ interfaceName?: string;
269
+ })[];
270
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
271
+ servers?: {
272
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
273
+ port?: number;
274
+ host?: string | {
275
+ provider?: "inline";
276
+ value?: string;
277
+ } | {
278
+ provider?: "external";
279
+ key?: string;
280
+ optional?: boolean;
281
+ default?: string;
282
+ } | {
283
+ provider?: "system";
284
+ optional?: boolean;
285
+ default?: string;
286
+ family?: "IPv4" | "IPv6";
287
+ interfaceName?: string;
288
+ };
289
+ }[];
290
+ port?: number;
291
+ properties?: {
292
+ sessionExpiryInterval?: number;
293
+ receiveMaximum?: number;
294
+ maximumPacketSize?: number;
295
+ topicAliasMaximum?: number;
296
+ requestResponseInformation?: boolean;
297
+ requestProblemInformation?: boolean;
298
+ userProperties?: Record<string, string>;
299
+ };
300
+ host?: string | {
301
+ provider?: "inline";
302
+ value?: string;
303
+ } | {
304
+ provider?: "external";
305
+ key?: string;
306
+ optional?: boolean;
307
+ default?: string;
308
+ } | {
309
+ provider?: "system";
310
+ optional?: boolean;
311
+ default?: string;
312
+ family?: "IPv4" | "IPv6";
313
+ interfaceName?: string;
314
+ };
315
+ username?: string;
316
+ password?: string | {
317
+ provider?: "env";
318
+ key?: string;
319
+ optional?: boolean;
320
+ default?: string;
321
+ } | {
322
+ provider?: "infisical";
323
+ key?: string;
324
+ optional?: boolean;
325
+ default?: string;
326
+ path?: string;
327
+ environment?: string;
328
+ projectId?: string;
329
+ };
330
+ clientId?: string;
331
+ clean?: boolean;
332
+ keepalive?: number;
333
+ connectTimeout?: number;
334
+ reconnectPeriod?: number;
335
+ reconnectOnConnackError?: boolean;
336
+ resubscribe?: boolean;
337
+ queueQoSZero?: boolean;
338
+ rejectUnauthorized?: boolean;
339
+ ca?: string;
340
+ cert?: string;
341
+ servername?: string;
342
+ }, {
343
+ key?: string;
344
+ hosts?: (string | {
345
+ provider?: "inline";
346
+ value?: string;
347
+ } | {
348
+ provider?: "external";
349
+ key?: string;
350
+ optional?: boolean;
351
+ default?: string;
352
+ } | {
353
+ provider?: "system";
354
+ optional?: boolean;
355
+ default?: string;
356
+ family?: "IPv4" | "IPv6";
357
+ interfaceName?: string;
358
+ })[];
359
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
360
+ servers?: {
361
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
362
+ port?: number;
363
+ host?: string | {
364
+ provider?: "inline";
365
+ value?: string;
366
+ } | {
367
+ provider?: "external";
368
+ key?: string;
369
+ optional?: boolean;
370
+ default?: string;
371
+ } | {
372
+ provider?: "system";
373
+ optional?: boolean;
374
+ default?: string;
375
+ family?: "IPv4" | "IPv6";
376
+ interfaceName?: string;
377
+ };
378
+ }[];
379
+ port?: number;
380
+ properties?: {
381
+ sessionExpiryInterval?: number;
382
+ receiveMaximum?: number;
383
+ maximumPacketSize?: number;
384
+ topicAliasMaximum?: number;
385
+ requestResponseInformation?: boolean;
386
+ requestProblemInformation?: boolean;
387
+ userProperties?: Record<string, string>;
388
+ };
389
+ host?: string | {
390
+ provider?: "inline";
391
+ value?: string;
392
+ } | {
393
+ provider?: "external";
394
+ key?: string;
395
+ optional?: boolean;
396
+ default?: string;
397
+ } | {
398
+ provider?: "system";
399
+ optional?: boolean;
400
+ default?: string;
401
+ family?: "IPv4" | "IPv6";
402
+ interfaceName?: string;
403
+ };
404
+ username?: string;
405
+ password?: string | {
406
+ provider?: "env";
407
+ key?: string;
408
+ optional?: boolean;
409
+ default?: string;
410
+ } | {
411
+ provider?: "infisical";
412
+ key?: string;
413
+ optional?: boolean;
414
+ default?: string;
415
+ path?: string;
416
+ environment?: string;
417
+ projectId?: string;
418
+ };
419
+ clientId?: string;
420
+ clean?: boolean;
421
+ keepalive?: number;
422
+ connectTimeout?: number;
423
+ reconnectPeriod?: number;
424
+ reconnectOnConnackError?: boolean;
425
+ resubscribe?: boolean;
426
+ queueQoSZero?: boolean;
427
+ rejectUnauthorized?: boolean;
428
+ ca?: string;
429
+ cert?: string;
430
+ servername?: string;
431
+ }>, {
432
+ key?: string;
433
+ hosts?: (string | {
434
+ provider?: "inline";
435
+ value?: string;
436
+ } | {
437
+ provider?: "external";
438
+ key?: string;
439
+ optional?: boolean;
440
+ default?: string;
441
+ } | {
442
+ provider?: "system";
443
+ optional?: boolean;
444
+ default?: string;
445
+ family?: "IPv4" | "IPv6";
446
+ interfaceName?: string;
447
+ })[];
448
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
449
+ servers?: {
450
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
451
+ port?: number;
452
+ host?: string | {
453
+ provider?: "inline";
454
+ value?: string;
455
+ } | {
456
+ provider?: "external";
457
+ key?: string;
458
+ optional?: boolean;
459
+ default?: string;
460
+ } | {
461
+ provider?: "system";
462
+ optional?: boolean;
463
+ default?: string;
464
+ family?: "IPv4" | "IPv6";
465
+ interfaceName?: string;
466
+ };
467
+ }[];
468
+ port?: number;
469
+ properties?: {
470
+ sessionExpiryInterval?: number;
471
+ receiveMaximum?: number;
472
+ maximumPacketSize?: number;
473
+ topicAliasMaximum?: number;
474
+ requestResponseInformation?: boolean;
475
+ requestProblemInformation?: boolean;
476
+ userProperties?: Record<string, string>;
477
+ };
478
+ host?: string | {
479
+ provider?: "inline";
480
+ value?: string;
481
+ } | {
482
+ provider?: "external";
483
+ key?: string;
484
+ optional?: boolean;
485
+ default?: string;
486
+ } | {
487
+ provider?: "system";
488
+ optional?: boolean;
489
+ default?: string;
490
+ family?: "IPv4" | "IPv6";
491
+ interfaceName?: string;
492
+ };
493
+ username?: string;
494
+ password?: string | {
495
+ provider?: "env";
496
+ key?: string;
497
+ optional?: boolean;
498
+ default?: string;
499
+ } | {
500
+ provider?: "infisical";
501
+ key?: string;
502
+ optional?: boolean;
503
+ default?: string;
504
+ path?: string;
505
+ environment?: string;
506
+ projectId?: string;
507
+ };
508
+ clientId?: string;
509
+ clean?: boolean;
510
+ keepalive?: number;
511
+ connectTimeout?: number;
512
+ reconnectPeriod?: number;
513
+ reconnectOnConnackError?: boolean;
514
+ resubscribe?: boolean;
515
+ queueQoSZero?: boolean;
516
+ rejectUnauthorized?: boolean;
517
+ ca?: string;
518
+ cert?: string;
519
+ servername?: string;
520
+ }, {
521
+ key?: string;
522
+ hosts?: (string | {
523
+ provider?: "inline";
524
+ value?: string;
525
+ } | {
526
+ provider?: "external";
527
+ key?: string;
528
+ optional?: boolean;
529
+ default?: string;
530
+ } | {
531
+ provider?: "system";
532
+ optional?: boolean;
533
+ default?: string;
534
+ family?: "IPv4" | "IPv6";
535
+ interfaceName?: string;
536
+ })[];
537
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
538
+ servers?: {
539
+ protocol?: "mqtt" | "mqtts" | "ws" | "wss" | "tcp" | "ssl";
540
+ port?: number;
541
+ host?: string | {
542
+ provider?: "inline";
543
+ value?: string;
544
+ } | {
545
+ provider?: "external";
546
+ key?: string;
547
+ optional?: boolean;
548
+ default?: string;
549
+ } | {
550
+ provider?: "system";
551
+ optional?: boolean;
552
+ default?: string;
553
+ family?: "IPv4" | "IPv6";
554
+ interfaceName?: string;
555
+ };
556
+ }[];
557
+ port?: number;
558
+ properties?: {
559
+ sessionExpiryInterval?: number;
560
+ receiveMaximum?: number;
561
+ maximumPacketSize?: number;
562
+ topicAliasMaximum?: number;
563
+ requestResponseInformation?: boolean;
564
+ requestProblemInformation?: boolean;
565
+ userProperties?: Record<string, string>;
566
+ };
567
+ host?: string | {
568
+ provider?: "inline";
569
+ value?: string;
570
+ } | {
571
+ provider?: "external";
572
+ key?: string;
573
+ optional?: boolean;
574
+ default?: string;
575
+ } | {
576
+ provider?: "system";
577
+ optional?: boolean;
578
+ default?: string;
579
+ family?: "IPv4" | "IPv6";
580
+ interfaceName?: string;
581
+ };
582
+ username?: string;
583
+ password?: string | {
584
+ provider?: "env";
585
+ key?: string;
586
+ optional?: boolean;
587
+ default?: string;
588
+ } | {
589
+ provider?: "infisical";
590
+ key?: string;
591
+ optional?: boolean;
592
+ default?: string;
593
+ path?: string;
594
+ environment?: string;
595
+ projectId?: string;
596
+ };
597
+ clientId?: string;
598
+ clean?: boolean;
599
+ keepalive?: number;
600
+ connectTimeout?: number;
601
+ reconnectPeriod?: number;
602
+ reconnectOnConnackError?: boolean;
603
+ resubscribe?: boolean;
604
+ queueQoSZero?: boolean;
605
+ rejectUnauthorized?: boolean;
606
+ ca?: string;
607
+ cert?: string;
608
+ servername?: string;
609
+ }>;
2
610
  export declare const unsCoreSchema: z.ZodObject<{
3
611
  uns: z.ZodObject<{
4
612
  graphql: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"uns-core-schema.d.ts","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBf,CAAC;AAEZ,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -17,7 +17,7 @@ const mqttConnectPropertiesSchema = z.object({
17
17
  requestProblemInformation: z.boolean().optional(),
18
18
  userProperties: z.record(z.string()).optional(),
19
19
  }).strict();
20
- const mqttChannelSchema = z.object({
20
+ export const mqttChannelSchema = z.object({
21
21
  host: hostValueSchema.optional(),
22
22
  hosts: z.array(hostValueSchema).optional(),
23
23
  servers: z.array(mqttServerSchema).optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEhF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,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AiB;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC1D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\nimport { hostValueSchema } from \"./host-placeholders.js\";\n\nconst mqttProtocolSchema = z.enum([\"mqtt\", \"mqtts\", \"ws\", \"wss\", \"tcp\", \"ssl\"]);\n\nconst mqttServerSchema = z.object({\n host: hostValueSchema,\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n}).strict();\n\nconst mqttConnectPropertiesSchema = z.object({\n sessionExpiryInterval: z.number().int().nonnegative().optional(),\n receiveMaximum: z.number().int().positive().optional(),\n maximumPacketSize: z.number().int().positive().optional(),\n topicAliasMaximum: z.number().int().nonnegative().optional(),\n requestResponseInformation: z.boolean().optional(),\n requestProblemInformation: z.boolean().optional(),\n userProperties: z.record(z.string()).optional(),\n}).strict();\n\nconst mqttChannelSchema = z.object({\n host: hostValueSchema.optional(),\n hosts: z.array(hostValueSchema).optional(),\n servers: z.array(mqttServerSchema).optional(),\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n clean: z.boolean().optional(),\n keepalive: z.number().int().nonnegative().optional(),\n connectTimeout: z.number().int().nonnegative().optional(),\n reconnectPeriod: z.number().int().nonnegative().optional(),\n reconnectOnConnackError: z.boolean().optional(),\n resubscribe: z.boolean().optional(),\n queueQoSZero: z.boolean().optional(),\n rejectUnauthorized: z.boolean().optional(),\n properties: mqttConnectPropertiesSchema.optional(),\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n servername: z.string().optional(),\n}).strict().refine((value) => {\n return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);\n}, {\n message: \"One of host, hosts, or servers must be provided.\",\n});\n\nexport const unsCoreSchema = z.object({\n uns: z.object({\n graphql: z.string().url(),\n rest: z.string().url(),\n email: z.string().email().describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\n password: secretValueSchema.describe(\"Password or secret value paired with the UNS email.\"),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z\n .string()\n .min(1)\n .describe(\"Process name used in MQTT topics and logs.\"),\n handover: z.boolean().default(true),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n }).strict(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z.object({\n provider: z.enum([\"azure-devops\"]).default(\"azure-devops\"),\n organization: z.string().min(1),\n project: z.string().min(1).optional(),\n }).strict().optional(),\n}).strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
1
+ {"version":3,"file":"uns-core-schema.js","sourceRoot":"","sources":["../../src/uns-config/uns-core-schema.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EA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;QAC7C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAC5C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KAC/D,CAAC,CAAC,MAAM,EAAE;IAEX,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACpC,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC1D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["// src/uns-config/uns-core-schema.ts\nimport { z } from \"zod\";\nimport { secretValueSchema } from \"./secret-placeholders.js\";\nimport { hostValueSchema } from \"./host-placeholders.js\";\n\nconst mqttProtocolSchema = z.enum([\"mqtt\", \"mqtts\", \"ws\", \"wss\", \"tcp\", \"ssl\"]);\n\nconst mqttServerSchema = z.object({\n host: hostValueSchema,\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n}).strict();\n\nconst mqttConnectPropertiesSchema = z.object({\n sessionExpiryInterval: z.number().int().nonnegative().optional(),\n receiveMaximum: z.number().int().positive().optional(),\n maximumPacketSize: z.number().int().positive().optional(),\n topicAliasMaximum: z.number().int().nonnegative().optional(),\n requestResponseInformation: z.boolean().optional(),\n requestProblemInformation: z.boolean().optional(),\n userProperties: z.record(z.string()).optional(),\n}).strict();\n\nexport const mqttChannelSchema = z.object({\n host: hostValueSchema.optional(),\n hosts: z.array(hostValueSchema).optional(),\n servers: z.array(mqttServerSchema).optional(),\n port: z.number().int().positive().optional(),\n protocol: mqttProtocolSchema.optional(),\n username: z.string().optional(),\n password: secretValueSchema.optional(),\n clientId: z.string().optional(),\n clean: z.boolean().optional(),\n keepalive: z.number().int().nonnegative().optional(),\n connectTimeout: z.number().int().nonnegative().optional(),\n reconnectPeriod: z.number().int().nonnegative().optional(),\n reconnectOnConnackError: z.boolean().optional(),\n resubscribe: z.boolean().optional(),\n queueQoSZero: z.boolean().optional(),\n rejectUnauthorized: z.boolean().optional(),\n properties: mqttConnectPropertiesSchema.optional(),\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n servername: z.string().optional(),\n}).strict().refine((value) => {\n return !!value.host || (Array.isArray(value.hosts) && value.hosts.length > 0) || (Array.isArray(value.servers) && value.servers.length > 0);\n}, {\n message: \"One of host, hosts, or servers must be provided.\",\n});\n\nexport const unsCoreSchema = z.object({\n uns: z.object({\n graphql: z.string().url(),\n rest: z.string().url(),\n email: z.string().email().describe(\"Email used when authenticating to graphql endpoint of the UNS instance.\"),\n password: secretValueSchema.describe(\"Password or secret value paired with the UNS email.\"),\n instanceMode: z.enum([\"wait\", \"force\", \"handover\"]).default(\"wait\"),\n processName: z\n .string()\n .min(1)\n .describe(\"Process name used in MQTT topics and logs.\"),\n handover: z.boolean().default(true),\n jwksWellKnownUrl: z.string().url().optional(),\n kidWellKnownUrl: z.string().url().optional(),\n env: z.enum([\"dev\", \"staging\", \"test\", \"prod\"]).default(\"dev\"),\n }).strict(),\n\n input: mqttChannelSchema.optional(),\n output: mqttChannelSchema.optional(),\n infra: mqttChannelSchema,\n devops: z.object({\n provider: z.enum([\"azure-devops\"]).default(\"azure-devops\"),\n organization: z.string().min(1),\n project: z.string().min(1).optional(),\n }).strict().optional(),\n}).strict();\n\nexport type UnsCore = z.infer<typeof unsCoreSchema>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/core",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "Core utilities and runtime building blocks for UNS-based realtime transformers.",
5
5
  "type": "module",
6
6
  "license": "MIT",