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/agent-store-backend.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type SlotlockAgentCalendarBackend, type SlotlockAgentInvocationContext } from './agent-server.js';
|
|
2
|
+
import type { SlotlockApplicationBackend } from './application-api.js';
|
|
2
3
|
import { type SlotlockStore } from './store.js';
|
|
3
4
|
import type { SlotlockCalendarEvent, SlotlockResource, WeeklyAvailabilityRule } from './types.js';
|
|
4
5
|
export interface SlotlockStoreAgentBackendOptions {
|
|
@@ -18,3 +19,24 @@ export interface SlotlockStoreAgentBackendOptions {
|
|
|
18
19
|
export declare function projectSlotlockCalendarEvent(event: SlotlockCalendarEvent): Record<string, unknown>;
|
|
19
20
|
/** Bind the protocol server to the production store without giving a request control of tenancy. */
|
|
20
21
|
export declare function createSlotlockStoreAgentBackend(store: SlotlockStore, options: SlotlockStoreAgentBackendOptions): SlotlockAgentCalendarBackend;
|
|
22
|
+
export interface SlotlockStoreApplicationBackendOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Refuse a new resource (409 `resource_limit_reached`) once the tenant has this many, 1-100,000.
|
|
25
|
+
* An existing external reference is still updated. Unset: no limit.
|
|
26
|
+
*/
|
|
27
|
+
maxTenantResources?: number;
|
|
28
|
+
/** Batches of each maintenance task one `slotlock_run_maintenance` call runs, 1-100 (default 10). */
|
|
29
|
+
maintenanceBatches?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Let an admin key erase its own tenant (`slotlock_erase_tenant`), everything it has and every
|
|
32
|
+
* key it holds, with its tenant reference as confirmation. Off unless true: erasure cannot be
|
|
33
|
+
* undone, and an operator may owe a tenant's data a retention or review first.
|
|
34
|
+
*/
|
|
35
|
+
tenantErasure?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Serve the application API (application-api.ts) from the production store, in the principal's
|
|
39
|
+
* tenant. Every resource an operation names must be the tenant's, or it is not found; holds are
|
|
40
|
+
* reservations under the tenant's row-level security, so another tenant's hold is not found either.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createSlotlockStoreApplicationBackend(store: SlotlockStore, options?: SlotlockStoreApplicationBackendOptions): SlotlockApplicationBackend;
|