slotlock 0.1.1 → 0.3.0
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/CHANGELOG.md +455 -0
- package/CONTRIBUTING.md +55 -19
- package/GOVERNANCE.md +4 -2
- package/MAINTAINERS.md +3 -2
- package/NOTICE +4 -4
- package/README.md +403 -103
- package/SECURITY.md +70 -5
- package/SPEC.md +161 -21
- package/agent-server.d.ts +76 -10
- package/agent-server.js +381 -146
- package/agent-store-backend.d.ts +22 -0
- package/agent-store-backend.js +598 -24
- package/api-keys.d.ts +22 -7
- package/api-keys.js +38 -8
- package/application-api.d.ts +67 -0
- package/application-api.js +552 -0
- package/config.d.ts +93 -0
- package/config.js +192 -0
- package/dashboard.d.ts +10 -1
- package/dashboard.js +23 -5
- package/ddl.d.ts +47 -4
- package/ddl.js +679 -25
- package/engine.js +20 -6
- package/event-schema.d.ts +59 -0
- package/event-schema.js +85 -0
- package/hooks.d.ts +7 -0
- package/hooks.js +13 -0
- package/ical-worker-thread.js +4 -2
- package/ical-worker.d.ts +8 -5
- package/ical-worker.js +9 -2
- package/index.d.ts +12 -8
- package/index.js +7 -5
- package/maintenance.d.ts +67 -0
- package/maintenance.js +213 -0
- package/node-server.d.ts +9 -1
- package/node-server.js +127 -6
- package/openapi.json +6024 -0
- package/package.json +3 -2
- package/rate-limit.d.ts +71 -0
- package/rate-limit.js +718 -0
- package/rest-api.d.ts +33 -18
- package/rest-api.js +141 -63
- package/rules.d.ts +19 -0
- package/rules.js +38 -7
- package/self-host.d.ts +26 -9
- package/self-host.js +427 -47
- package/slotlock-manifest.schema.json +6 -1
- package/slotlock.manifest.json +7 -2
- package/store.d.ts +359 -27
- package/store.js +2077 -296
- package/sync.d.ts +43 -2
- package/sync.js +1950 -277
- package/timezone.d.ts +77 -3
- package/timezone.js +265 -21
- package/types.d.ts +217 -10
- package/weekly-hours.js +2 -2
package/sync.d.ts
CHANGED
|
@@ -89,13 +89,19 @@ export declare class CalendarContractError extends Error {
|
|
|
89
89
|
export declare class CalendarExpansionLimitError extends CalendarContractError {
|
|
90
90
|
constructor();
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Why Slotlock refuses `rule`, in words, or null when it expands it: not RFC 5545 §3.3.10 as
|
|
94
|
+
* canonicalRecurrenceRule reads it, or a shape ical.js expands wrongly (recurShapeProblem).
|
|
95
|
+
*/
|
|
96
|
+
export declare function recurrenceRuleProblem(rule: string): string | null;
|
|
92
97
|
/**
|
|
93
98
|
* A recurrence rule as RFC 5545 §3.3.10 writes it, in ical.js's canonical spelling, or `null`.
|
|
94
99
|
* ical.js accepts more than it should: it drops unknown parts, lets a repeated part replace the
|
|
95
100
|
* first, reads `COUNT=3X` as 3 and `COUNT=0` as no count at all. So every part must be one RFC 5545
|
|
96
101
|
* names, appear once and match its grammar, with FREQ present and never UNTIL and COUNT together,
|
|
97
102
|
* and the parts RFC 5545 forbids for a frequency (BYWEEKNO but YEARLY, BYYEARDAY with DAILY, WEEKLY
|
|
98
|
-
* or MONTHLY, BYMONTHDAY with WEEKLY, a numbered BYDAY but MONTHLY or YEARLY) are refused.
|
|
103
|
+
* or MONTHLY, BYMONTHDAY with WEEKLY, a numbered BYDAY but MONTHLY or YEARLY) are refused. The
|
|
104
|
+
* numeric BY lists come back in ascending order (sortRuleParts).
|
|
99
105
|
*/
|
|
100
106
|
export declare function canonicalRecurrenceRule(rule: string): string | null;
|
|
101
107
|
/**
|
|
@@ -142,8 +148,34 @@ export declare function icalendarPropertyHead(line: string, params: Record<strin
|
|
|
142
148
|
parameters: number;
|
|
143
149
|
end: number;
|
|
144
150
|
};
|
|
145
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Parse VEVENTs with the standards library; event content is deliberately discarded. All or
|
|
153
|
+
* nothing: a series Slotlock cannot read refuses the whole calendar, so a caller that reads the
|
|
154
|
+
* result as the calendar's busy time never takes a refused series' time as free. To keep the rest
|
|
155
|
+
* of a calendar when one series is refused, use parseICalendarFeed.
|
|
156
|
+
*/
|
|
146
157
|
export declare function parseICalendarChanges(input: string, calendarTimezone?: string, expansionWindow?: ICalendarExpansionWindow): ExternalCalendarChange[];
|
|
158
|
+
/** A series a feed holds that Slotlock refused to read, by its UID. */
|
|
159
|
+
export interface ICalendarSeriesRefusal {
|
|
160
|
+
uid: string;
|
|
161
|
+
code: CalendarContractError['code'];
|
|
162
|
+
/** Set when the series needs more work than Slotlock spends (CalendarExpansionLimitError). */
|
|
163
|
+
limit?: true;
|
|
164
|
+
}
|
|
165
|
+
/** What parseICalendarFeed read: every series it could, and the ones it refused. */
|
|
166
|
+
export interface ICalendarFeedRead {
|
|
167
|
+
changes: ExternalCalendarChange[];
|
|
168
|
+
/** Their time is not known: treat it as busy, or the feed's coverage as incomplete. */
|
|
169
|
+
refused: ICalendarSeriesRefusal[];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* parseICalendarChanges, refusing one series at a time: a series Slotlock cannot read (a rule
|
|
173
|
+
* shape ical.js expands wrongly, an event whose end the clocks move before its start, DTEND with
|
|
174
|
+
* DURATION, or one that needs more than its budget) is named in `refused` and the rest of the
|
|
175
|
+
* calendar is read. A calendar that is not one (its size, its time zones, a missing UID, a window
|
|
176
|
+
* past 367 days) is still refused whole, with CalendarContractError.
|
|
177
|
+
*/
|
|
178
|
+
export declare function parseICalendarFeed(input: string, calendarTimezone?: string, expansionWindow?: ICalendarExpansionWindow): ICalendarFeedRead;
|
|
147
179
|
/** Deterministic RFC 5545 + iTIP payload, validated by the installed ical.js implementation. */
|
|
148
180
|
export declare function emitITipCalendar(input: ICalendarEvent, method: ITipMethod): string;
|
|
149
181
|
/** Backwards-compatible feed helper. Cancellation maps to iTIP CANCEL. */
|
|
@@ -178,4 +210,13 @@ export declare function expandCalendarEventSeries(input: CalendarEventContent, w
|
|
|
178
210
|
/** Refuse (CalendarExpansionLimitError) instead of searching from the start without a cursor. */
|
|
179
211
|
resumeOnly?: boolean;
|
|
180
212
|
}): CalendarSeriesExpansion;
|
|
213
|
+
/**
|
|
214
|
+
* Why this Slotlock refuses an event an earlier one stored, in words, or null when it expands it.
|
|
215
|
+
* Maintenance counts such a series as refused on every roll and leaves it its old coverage: a rule
|
|
216
|
+
* shape ical.js expands wrongly (recurrenceRuleProblem), COUNT with a yearly day some years lack, a
|
|
217
|
+
* rule it no longer stores at all, or exceptions that name no occurrence (searched from the series'
|
|
218
|
+
* start to the last of them, within a roll's budget). It writes nothing, so it can be run over
|
|
219
|
+
* stored events before an upgrade.
|
|
220
|
+
*/
|
|
221
|
+
export declare function storedCalendarEventProblem(event: CalendarEventContent): string | null;
|
|
181
222
|
export {};
|