@camstack/types 1.2.362 → 1.2.364
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/dist/capabilities/backup.cap.d.ts +14 -0
- package/dist/capabilities/calendar-source.cap.d.ts +26 -0
- package/dist/capabilities/device-manager.cap.d.ts +9 -93
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/local-network.cap.d.ts +5 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +20074 -0
- package/dist/client.mjs +20061 -1
- package/dist/device/icon-catalog.d.ts +97 -0
- package/dist/device/icon-catalog.generated.d.ts +266 -0
- package/dist/device/icon-synonyms.d.ts +26 -0
- package/dist/device/index.d.ts +4 -2
- package/dist/device/location-icon.d.ts +17 -128
- package/dist/device/site-zone.d.ts +3 -25
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +62526 -43952
- package/dist/index.mjs +62512 -43941
- package/dist/interfaces/addon.d.ts +37 -0
- package/dist/interfaces/config-ui.d.ts +7 -8
- package/package.json +1 -1
- package/dist/device/display-icon-vocabulary.d.ts +0 -113
|
@@ -619,6 +619,20 @@ export declare const backupCapability: {
|
|
|
619
619
|
lastError: z.ZodOptional<z.ZodString>;
|
|
620
620
|
nextRunAt: z.ZodOptional<z.ZodNumber>;
|
|
621
621
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
622
|
+
/**
|
|
623
|
+
* The database files that exist on this hub right now (the owner's open
|
|
624
|
+
* files), so the selection UI can offer all of them and mark a file that
|
|
625
|
+
* is not created yet. `answered: false` = the owner did not answer, which
|
|
626
|
+
* is not the same as "none exist".
|
|
627
|
+
*/
|
|
628
|
+
readonly listAvailableDatabases: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
629
|
+
answered: z.ZodBoolean;
|
|
630
|
+
databases: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
631
|
+
events: "events";
|
|
632
|
+
history: "history";
|
|
633
|
+
settings: "settings";
|
|
634
|
+
}>>>;
|
|
635
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
622
636
|
/**
|
|
623
637
|
* Create or replace a schedule. An empty / absent `id` mints a new
|
|
624
638
|
* one; a present `id` replaces in place. `cron` is validated
|
|
@@ -24,6 +24,18 @@ export declare const CalendarInfoSchema: z.ZodObject<{
|
|
|
24
24
|
enabled: z.ZodBoolean;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
26
|
export type CalendarInfo = z.infer<typeof CalendarInfoSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* Time contract of {@link CalendarEvent}.
|
|
29
|
+
*
|
|
30
|
+
* - Timed event: `startMs` / `endMs` are real instants; `endMs` is exclusive.
|
|
31
|
+
* - All-day event (`allDay: true`): the event is a run of calendar DATES, not
|
|
32
|
+
* instants. `startMs` is UTC midnight of the first date and `endMs` is UTC
|
|
33
|
+
* midnight of the day AFTER the last date (RFC 5545 exclusive DTEND), so a
|
|
34
|
+
* one-day event spans exactly 24 h. Every provider produces that and no
|
|
35
|
+
* consumer may read the instants in a local timezone: use
|
|
36
|
+
* {@link calendarEventLocalSpan}. Reading UTC midnight as local time put an
|
|
37
|
+
* all-day event on the following day for any viewer ahead of UTC.
|
|
38
|
+
*/
|
|
27
39
|
export declare const CalendarEventSchema: z.ZodObject<{
|
|
28
40
|
id: z.ZodString;
|
|
29
41
|
calendarId: z.ZodString;
|
|
@@ -74,3 +86,17 @@ export declare const calendarSourceCapability: {
|
|
|
74
86
|
};
|
|
75
87
|
};
|
|
76
88
|
export type ICalendarSourceProvider = InferProvider<typeof calendarSourceCapability>;
|
|
89
|
+
/** A half-open `[startMs, endMs)` interval of local instants. */
|
|
90
|
+
export interface CalendarLocalSpan {
|
|
91
|
+
readonly startMs: number;
|
|
92
|
+
readonly endMs: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The interval an event occupies on the viewer's local clock, end exclusive.
|
|
96
|
+
* A timed event is returned as is; an all-day event's UTC dates are re-read as
|
|
97
|
+
* local calendar dates (local midnight to local midnight, DST-safe). A
|
|
98
|
+
* degenerate all-day end (`<=` start) is widened to one day.
|
|
99
|
+
*/
|
|
100
|
+
export declare function calendarEventLocalSpan(ev: Pick<CalendarEvent, 'startMs' | 'endMs' | 'allDay'>): CalendarLocalSpan;
|
|
101
|
+
/** Does the event touch the local calendar day starting at `dayStartMs`? */
|
|
102
|
+
export declare function calendarEventOnLocalDay(ev: Pick<CalendarEvent, 'startMs' | 'endMs' | 'allDay'>, dayStartMs: number): boolean;
|