@dereekb/firebase 13.41.0 → 13.43.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/eslint/index.esm.js +145 -170
- package/eslint/package.json +3 -3
- package/index.esm.js +7207 -2997
- package/package.json +5 -5
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +4 -0
- package/src/lib/common/storage/context.d.ts +9 -1
- package/src/lib/common/storage/driver/accessor.d.ts +12 -0
- package/src/lib/common/storage/index.d.ts +1 -0
- package/src/lib/common/storage/storage.url.d.ts +69 -0
- package/src/lib/model/calendar/calendar.action.d.ts +34 -0
- package/src/lib/model/calendar/calendar.api.d.ts +147 -0
- package/src/lib/model/calendar/calendar.api.error.d.ts +24 -0
- package/src/lib/model/calendar/calendar.d.ts +460 -0
- package/src/lib/model/calendar/calendar.expand.d.ts +95 -0
- package/src/lib/model/calendar/calendar.ics.d.ts +322 -0
- package/src/lib/model/calendar/calendar.id.d.ts +110 -0
- package/src/lib/model/calendar/calendar.processing.d.ts +77 -0
- package/src/lib/model/calendar/calendar.query.d.ts +76 -0
- package/src/lib/model/calendar/calendar.schedule.d.ts +82 -0
- package/src/lib/model/calendar/calendar.type.d.ts +188 -0
- package/src/lib/model/calendar/calendar.util.d.ts +485 -0
- package/src/lib/model/calendar/index.d.ts +12 -0
- package/src/lib/model/formspace/formspace.access.d.ts +139 -0
- package/src/lib/model/formspace/formspace.action.d.ts +34 -0
- package/src/lib/model/formspace/formspace.api.d.ts +216 -0
- package/src/lib/model/formspace/formspace.api.error.d.ts +71 -0
- package/src/lib/model/formspace/formspace.d.ts +390 -0
- package/src/lib/model/formspace/formspace.id.d.ts +60 -0
- package/src/lib/model/formspace/formspace.permission.d.ts +47 -0
- package/src/lib/model/formspace/formspace.processing.d.ts +86 -0
- package/src/lib/model/formspace/formspace.query.d.ts +110 -0
- package/src/lib/model/formspace/formspace.task.d.ts +75 -0
- package/src/lib/model/formspace/formspace.type.d.ts +267 -0
- package/src/lib/model/formspace/formspace.upload.d.ts +204 -0
- package/src/lib/model/formspace/formspace.util.d.ts +348 -0
- package/src/lib/model/formspace/index.d.ts +13 -0
- package/src/lib/model/index.d.ts +2 -0
- package/src/lib/model/notification/notification.message.d.ts +83 -0
- package/src/lib/model/notification/notification.query.d.ts +41 -0
- package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +36 -0
- package/src/lib/model/storagefile/storagefile.api.d.ts +42 -2
- package/src/lib/model/storagefile/storagefile.create.d.ts +14 -3
- package/src/lib/model/storagefile/storagefile.file.d.ts +42 -2
- package/src/lib/model/storagefile/storagefile.query.d.ts +36 -0
- package/src/lib/model/storagefile/storagefile.upload.d.ts +30 -0
- package/src/lib/model/system/index.d.ts +1 -0
- package/src/lib/model/system/system.scheduler.d.ts +235 -0
- package/test/index.esm.js +24 -1
- package/test/package.json +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.43.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@dereekb/date": "13.
|
|
26
|
-
"@dereekb/model": "13.
|
|
27
|
-
"@dereekb/rxjs": "13.
|
|
28
|
-
"@dereekb/util": "13.
|
|
25
|
+
"@dereekb/date": "13.43.0",
|
|
26
|
+
"@dereekb/model": "13.43.0",
|
|
27
|
+
"@dereekb/rxjs": "13.43.0",
|
|
28
|
+
"@dereekb/util": "13.43.0",
|
|
29
29
|
"@firebase/rules-unit-testing": "5.0.0",
|
|
30
30
|
"@marcbachmann/cel-js": "^7.6.1",
|
|
31
31
|
"@typescript-eslint/parser": "8.59.3",
|
|
@@ -1520,6 +1520,10 @@ export interface FirestoreLatLngStringConfig extends DefaultMapConfiguredFiresto
|
|
|
1520
1520
|
*/
|
|
1521
1521
|
export declare function firestoreLatLngString(config?: FirestoreLatLngStringConfig): FirestoreModelFieldMapFunctionsConfig<`${number},${number}`, `${number},${number}`>;
|
|
1522
1522
|
export type FirestoreTimezoneStringConfig = DefaultMapConfiguredFirestoreFieldConfig<TimezoneString, TimezoneString>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Default value of a {@link firestoreTimezoneString} field that carries no explicit default.
|
|
1525
|
+
*/
|
|
1526
|
+
export declare const DEFAULT_FIRESTORE_TIMEZONE_STRING_VALUE: TimezoneString;
|
|
1523
1527
|
/**
|
|
1524
1528
|
* Default configuration for a TimezoneString.
|
|
1525
1529
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FirebaseStorageAccessor } from './driver/accessor';
|
|
2
2
|
import { type FirebaseStorageDrivers } from './driver/driver';
|
|
3
|
-
import { type StorageBucketId } from './storage';
|
|
3
|
+
import { type StorageBucketId, type StoragePathFactory } from './storage';
|
|
4
4
|
import { type FirebaseStorage } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* Central context for Firebase Cloud Storage operations within `@dereekb/firebase`.
|
|
@@ -13,6 +13,14 @@ import { type FirebaseStorage } from './types';
|
|
|
13
13
|
export interface FirebaseStorageContext<F extends FirebaseStorage = FirebaseStorage> extends FirebaseStorageAccessor {
|
|
14
14
|
readonly storage: F;
|
|
15
15
|
readonly drivers: FirebaseStorageDrivers;
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes a {@link StoragePathInput} into the full {@link StoragePath} this context would use for it,
|
|
18
|
+
* applying the context's default bucket.
|
|
19
|
+
*
|
|
20
|
+
* Exposed so a caller that needs the resolved bucket and path — rather than an accessor — does not have to
|
|
21
|
+
* build a file accessor just to read its `storagePath` back off.
|
|
22
|
+
*/
|
|
23
|
+
readonly storagePath: StoragePathFactory;
|
|
16
24
|
}
|
|
17
25
|
/**
|
|
18
26
|
* Factory that creates a {@link FirebaseStorageContext} from a {@link FirebaseStorage} instance and optional configuration.
|
|
@@ -42,6 +42,18 @@ export interface FirebaseStorageAccessorFile<R = unknown> extends StoragePathRef
|
|
|
42
42
|
* This is consistent between the client and server implementations.
|
|
43
43
|
*/
|
|
44
44
|
getDownloadUrl(): Promise<StorageDownloadUrl>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the permanent, anonymously-readable url for the file WITHOUT checking that it exists.
|
|
47
|
+
*
|
|
48
|
+
* Unlike {@link getDownloadUrl}, this is a pure derivation of the file's bucket and path, so it can be
|
|
49
|
+
* called BEFORE the bytes are uploaded — which is what lets a publisher embed the url in the very content
|
|
50
|
+
* it is about to write.
|
|
51
|
+
*
|
|
52
|
+
* The url only actually resolves once the object exists AND has been made public (see {@link makePublic}).
|
|
53
|
+
*
|
|
54
|
+
* Generally a server-only implementation.
|
|
55
|
+
*/
|
|
56
|
+
getPublicUrl?(): StorageDownloadUrl;
|
|
45
57
|
/**
|
|
46
58
|
* Returns a signed/temporary url
|
|
47
59
|
*/
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type StoragePath } from './storage';
|
|
2
|
+
import { type StorageDownloadUrl } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @module storage.url
|
|
5
|
+
*
|
|
6
|
+
* Derivation of a storage object's PUBLIC url from its bucket and path alone.
|
|
7
|
+
*
|
|
8
|
+
* Exists so the same string can be produced on either side of the wire. The server already mints it through
|
|
9
|
+
* `@google-cloud/storage`'s `File.publicUrl()`, but a client holding only a bucket and a path has no way to
|
|
10
|
+
* reach that — and no reason to pay a callable for a url that is a pure function of what it already knows.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Origin (protocol and host, with no trailing slash) that serves GCS-native public object urls.
|
|
14
|
+
*
|
|
15
|
+
* @semanticType
|
|
16
|
+
* @semanticTopic url
|
|
17
|
+
* @semanticTopic string
|
|
18
|
+
* @semanticTopic dereekb-firebase:storage
|
|
19
|
+
*/
|
|
20
|
+
export type StoragePublicUrlApiEndpoint = string;
|
|
21
|
+
/**
|
|
22
|
+
* The production origin that serves public objects.
|
|
23
|
+
*
|
|
24
|
+
* Note this is NOT the Firebase Storage host (`firebasestorage.googleapis.com`), which serves the
|
|
25
|
+
* rules-enforced `/v0/b/<bucket>/o/<object>` API instead. The two are distinct channels: this one is
|
|
26
|
+
* authorized by the object's ACL and security rules never apply to it.
|
|
27
|
+
*/
|
|
28
|
+
export declare const GOOGLE_CLOUD_STORAGE_PUBLIC_URL_API_ENDPOINT: StoragePublicUrlApiEndpoint;
|
|
29
|
+
/**
|
|
30
|
+
* Input for {@link storagePublicDownloadUrl}.
|
|
31
|
+
*/
|
|
32
|
+
export interface StoragePublicDownloadUrlInput {
|
|
33
|
+
/**
|
|
34
|
+
* Origin that serves the object. Use {@link GOOGLE_CLOUD_STORAGE_PUBLIC_URL_API_ENDPOINT} in production,
|
|
35
|
+
* or the storage emulator's own origin when emulating.
|
|
36
|
+
*/
|
|
37
|
+
readonly apiEndpoint: StoragePublicUrlApiEndpoint;
|
|
38
|
+
/**
|
|
39
|
+
* Bucket and path of the object.
|
|
40
|
+
*/
|
|
41
|
+
readonly storagePath: StoragePath;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Derives the permanent, anonymously-readable url for a storage object.
|
|
45
|
+
*
|
|
46
|
+
* Mirrors `@google-cloud/storage`'s `File.publicUrl()` exactly — `<endpoint>/<bucket>/<encoded name>` — so a
|
|
47
|
+
* url derived here is byte-identical to the one the server records. The path is encoded whole rather than
|
|
48
|
+
* per-segment, which is what preserves the leading slash this workspace's `StoragePath` values carry
|
|
49
|
+
* (`/cal/<id>.ics` encodes to `%2Fcal%2F<id>.ics`, naming an object whose own name leads with a slash).
|
|
50
|
+
*
|
|
51
|
+
* This is a pure derivation, so it can be called before the bytes exist. The url only actually resolves
|
|
52
|
+
* once the object exists AND is public — an object ACL grant on an ordinary bucket, or an
|
|
53
|
+
* `allUsers:objectViewer` IAM binding on a bucket with uniform bucket-level access.
|
|
54
|
+
*
|
|
55
|
+
* @param input - The origin and the object's bucket and path.
|
|
56
|
+
* @returns The object's public download url.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* storagePublicDownloadUrl({
|
|
61
|
+
* apiEndpoint: GOOGLE_CLOUD_STORAGE_PUBLIC_URL_API_ENDPOINT,
|
|
62
|
+
* storagePath: { bucketId: 'my-bucket.appspot.com', pathString: '/cal/0mfR2xk8SqVe1Nb7.ics' }
|
|
63
|
+
* });
|
|
64
|
+
* // 'https://storage.googleapis.com/my-bucket.appspot.com/%2Fcal%2F0mfR2xk8SqVe1Nb7.ics'
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @__NO_SIDE_EFFECTS__
|
|
68
|
+
*/
|
|
69
|
+
export declare function storagePublicDownloadUrl(input: StoragePublicDownloadUrlInput): StorageDownloadUrl;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type AsyncFirebaseFunctionCreateAction, type AsyncFirebaseFunctionDeleteAction, type AsyncFirebaseFunctionUpdateAction, type FirebaseFunctionCreateAction, type FirebaseFunctionDeleteAction, type FirebaseFunctionUpdateAction } from '../../common';
|
|
2
|
+
import { type CalendarDocument } from './calendar';
|
|
3
|
+
/**
|
|
4
|
+
* @module calendar.action
|
|
5
|
+
*
|
|
6
|
+
* Type aliases for Calendar server action functions, following the same pattern as the StorageFile and
|
|
7
|
+
* Notification actions. See `@dereekb/firebase-server/model` for the implementations.
|
|
8
|
+
*
|
|
9
|
+
* @template P - the parameter type for the action
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Synchronous create action targeting a {@link CalendarDocument}.
|
|
13
|
+
*/
|
|
14
|
+
export type CalendarCreateAction<P extends object> = FirebaseFunctionCreateAction<P, CalendarDocument>;
|
|
15
|
+
/**
|
|
16
|
+
* Async create action targeting a {@link CalendarDocument}.
|
|
17
|
+
*/
|
|
18
|
+
export type AsyncCalendarCreateAction<P extends object> = AsyncFirebaseFunctionCreateAction<P, CalendarDocument>;
|
|
19
|
+
/**
|
|
20
|
+
* Synchronous update action targeting a {@link CalendarDocument}.
|
|
21
|
+
*/
|
|
22
|
+
export type CalendarUpdateAction<P extends object> = FirebaseFunctionUpdateAction<P, CalendarDocument>;
|
|
23
|
+
/**
|
|
24
|
+
* Async update action targeting a {@link CalendarDocument}.
|
|
25
|
+
*/
|
|
26
|
+
export type AsyncCalendarUpdateAction<P extends object> = AsyncFirebaseFunctionUpdateAction<P, CalendarDocument>;
|
|
27
|
+
/**
|
|
28
|
+
* Synchronous delete action targeting a {@link CalendarDocument}.
|
|
29
|
+
*/
|
|
30
|
+
export type CalendarDeleteAction<P extends object> = FirebaseFunctionDeleteAction<P, CalendarDocument>;
|
|
31
|
+
/**
|
|
32
|
+
* Async delete action targeting a {@link CalendarDocument}.
|
|
33
|
+
*/
|
|
34
|
+
export type AsyncCalendarDeleteAction<P extends object> = AsyncFirebaseFunctionDeleteAction<P, CalendarDocument>;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { type Type } from 'arktype';
|
|
2
|
+
import { type Maybe } from '@dereekb/util';
|
|
3
|
+
import { type TargetModelParams } from '../../common';
|
|
4
|
+
import { type FirebaseFunctionTypeConfigMap, type ModelFirebaseCrudFunction, type ModelFirebaseCrudFunctionConfigMap, type ModelFirebaseFunctionMap } from '../../client';
|
|
5
|
+
import { type CalendarTypes } from './calendar';
|
|
6
|
+
import { type CalendarType } from './calendar.id';
|
|
7
|
+
/**
|
|
8
|
+
* @module calendar.api
|
|
9
|
+
*
|
|
10
|
+
* The Calendar exposes exactly ONE callable — `calendar/update/rotateIcs`. A published .ics url is a
|
|
11
|
+
* permanent zero-auth bearer credential, and rotating it is the only revocation such a url has, so it has to
|
|
12
|
+
* be reachable by the owner who minted it rather than buried in an admin tool.
|
|
13
|
+
*
|
|
14
|
+
* Event mutation is deliberately NOT part of that surface — a caller already holds a transaction and an
|
|
15
|
+
* accessor when it decides to touch a calendar, so it merges the `calendar.util.ts` templates into its own
|
|
16
|
+
* write instead.
|
|
17
|
+
*
|
|
18
|
+
* The publish-side sweeps (`syncCalendar`, `syncAllFlaggedCalendars`, `flagStaleCalendarsForSync`) stay
|
|
19
|
+
* internal to the scheduled processor. Their arktypes live here only because
|
|
20
|
+
* `firebaseServerActionTransformFunctionFactory` needs one per action.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Parameters for syncing a single Calendar: pruning it and queueing its ICS for regeneration.
|
|
24
|
+
*/
|
|
25
|
+
export interface SyncCalendarParams extends TargetModelParams {
|
|
26
|
+
}
|
|
27
|
+
export declare const syncCalendarParamsType: Type<SyncCalendarParams>;
|
|
28
|
+
/**
|
|
29
|
+
* Result of syncing a single Calendar.
|
|
30
|
+
*/
|
|
31
|
+
export interface SyncCalendarResult {
|
|
32
|
+
/**
|
|
33
|
+
* True if a new ICS StorageFile was created, false if the existing one was re-flagged.
|
|
34
|
+
*/
|
|
35
|
+
readonly createdIcsStorageFile: boolean;
|
|
36
|
+
readonly prunedEventCount: number;
|
|
37
|
+
readonly prunedRecurringEventCount: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Parameters for rotating a Calendar's published ICS link.
|
|
41
|
+
*/
|
|
42
|
+
export interface RotateCalendarIcsParams extends TargetModelParams {
|
|
43
|
+
}
|
|
44
|
+
export declare const rotateCalendarIcsParamsType: Type<RotateCalendarIcsParams>;
|
|
45
|
+
/**
|
|
46
|
+
* Result of rotating a Calendar's published ICS link.
|
|
47
|
+
*/
|
|
48
|
+
export interface RotateCalendarIcsResult {
|
|
49
|
+
/**
|
|
50
|
+
* True if an existing ICS StorageFile was flagged for delete, revoking the url that named it.
|
|
51
|
+
*
|
|
52
|
+
* False when the calendar had never published one, in which case the rotation is a no-op that still
|
|
53
|
+
* queues a first publish.
|
|
54
|
+
*/
|
|
55
|
+
readonly revokedIcsStorageFile: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* True if the immediate re-sync minted the replacement ICS StorageFile.
|
|
58
|
+
*/
|
|
59
|
+
readonly createdIcsStorageFile: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* True if the expedited publish finished, meaning the replacement url is already live in `Calendar.iu`.
|
|
62
|
+
*
|
|
63
|
+
* False means only that the publish did not complete INLINE — the replacement is still queued and the
|
|
64
|
+
* regular sweep will publish it. Rotation itself has already succeeded either way, so a caller treats this
|
|
65
|
+
* as "is the new link ready to show yet", never as a failure.
|
|
66
|
+
*/
|
|
67
|
+
readonly publishedIcs: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Parameters for sweeping every Calendar flagged for sync.
|
|
71
|
+
*/
|
|
72
|
+
export interface SyncAllFlaggedCalendarsParams {
|
|
73
|
+
}
|
|
74
|
+
export declare const syncAllFlaggedCalendarsParamsType: Type<SyncAllFlaggedCalendarsParams>;
|
|
75
|
+
/**
|
|
76
|
+
* Result of the flagged-calendar sweep.
|
|
77
|
+
*/
|
|
78
|
+
export interface SyncAllFlaggedCalendarsResult {
|
|
79
|
+
readonly calendarsVisited: number;
|
|
80
|
+
readonly calendarsSyncedCount: number;
|
|
81
|
+
readonly calendarsFailedCount: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Parameters for the backstop sweep that re-flags Calendars whose published ICS has gone stale.
|
|
85
|
+
*/
|
|
86
|
+
export interface FlagStaleCalendarsForSyncParams {
|
|
87
|
+
/**
|
|
88
|
+
* Restricts the sweep to a single type. All registered types are swept when absent.
|
|
89
|
+
*/
|
|
90
|
+
readonly calendarType?: Maybe<CalendarType>;
|
|
91
|
+
}
|
|
92
|
+
export declare const flagStaleCalendarsForSyncParamsType: Type<FlagStaleCalendarsForSyncParams>;
|
|
93
|
+
/**
|
|
94
|
+
* Result of the backstop sweep.
|
|
95
|
+
*/
|
|
96
|
+
export interface FlagStaleCalendarsForSyncResult {
|
|
97
|
+
readonly calendarsVisited: number;
|
|
98
|
+
readonly calendarsFlaggedCount: number;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Custom (non-CRUD) function type map for Calendar. Empty — the only callable is a CRUD update.
|
|
102
|
+
*/
|
|
103
|
+
export type CalendarFunctionTypeMap = {};
|
|
104
|
+
export declare const calendarFunctionTypeConfigMap: FirebaseFunctionTypeConfigMap<CalendarFunctionTypeMap>;
|
|
105
|
+
/**
|
|
106
|
+
* CRUD function configuration map for the Calendar model.
|
|
107
|
+
*
|
|
108
|
+
* Intentionally minimal. See the module docblock for why rotation is the only operation here.
|
|
109
|
+
*/
|
|
110
|
+
export type CalendarModelCrudFunctionsConfig = {
|
|
111
|
+
readonly calendar: {
|
|
112
|
+
update: {
|
|
113
|
+
/**
|
|
114
|
+
* Rotates the calendar's public ICS link, revoking the previous one.
|
|
115
|
+
*
|
|
116
|
+
* Flags the current ICS StorageFile for delete and clears the calendar's pointer + url, then re-syncs
|
|
117
|
+
* so a fresh StorageFile — and therefore a fresh url — is minted. Existing subscribers to the old url
|
|
118
|
+
* break by design; that is the revocation.
|
|
119
|
+
*/
|
|
120
|
+
rotateIcs: [RotateCalendarIcsParams, RotateCalendarIcsResult];
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export declare const calendarModelCrudFunctionsConfig: ModelFirebaseCrudFunctionConfigMap<CalendarModelCrudFunctionsConfig, CalendarTypes>;
|
|
125
|
+
/**
|
|
126
|
+
* Client-side callable function map factory for the Calendar's CRUD operations.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const functions = calendarFunctionMap(callableFactory);
|
|
131
|
+
* const result = await functions.calendar.updateCalendar.rotateIcs({ key: 'cal/pr_abc123' });
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export declare const calendarFunctionMap: import("../..").ModelFirebaseFunctionMapFactory<CalendarFunctionTypeMap, CalendarModelCrudFunctionsConfig>;
|
|
135
|
+
/**
|
|
136
|
+
* Abstract class defining the callable Calendar cloud functions.
|
|
137
|
+
*
|
|
138
|
+
* Register it in an app's functions config map to make it injectable. Use {@link calendarFunctionMap} to
|
|
139
|
+
* create the client-side callable map.
|
|
140
|
+
*/
|
|
141
|
+
export declare abstract class CalendarFunctions implements ModelFirebaseFunctionMap<CalendarFunctionTypeMap, CalendarModelCrudFunctionsConfig> {
|
|
142
|
+
abstract calendar: {
|
|
143
|
+
updateCalendar: {
|
|
144
|
+
rotateIcs: ModelFirebaseCrudFunction<RotateCalendarIcsParams, RotateCalendarIcsResult>;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module calendar.api.error
|
|
3
|
+
*
|
|
4
|
+
* Error codes raised by the Calendar publish pipeline.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Thrown when the Calendar module has no ICS domain configured.
|
|
8
|
+
*
|
|
9
|
+
* The UID factory deliberately has no random fallback — a UID that changes between publishes makes every
|
|
10
|
+
* client create a duplicate event rather than update the one it holds — so a missing domain is a hard error
|
|
11
|
+
* rather than something to paper over at emit time.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CALENDAR_ICS_DOMAIN_NOT_CONFIGURED_ERROR_CODE = "CALENDAR_ICS_DOMAIN_NOT_CONFIGURED";
|
|
14
|
+
/**
|
|
15
|
+
* Thrown when a Calendar's ICS StorageFile could not be resolved or created.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CALENDAR_ICS_STORAGE_FILE_UNAVAILABLE_ERROR_CODE = "CALENDAR_ICS_STORAGE_FILE_UNAVAILABLE";
|
|
18
|
+
/**
|
|
19
|
+
* Thrown when a Calendar's ICS link is rotated again before its throttle window has passed.
|
|
20
|
+
*
|
|
21
|
+
* Rotation is destructive to subscribers — the old url dies and every client holding it breaks — so it is
|
|
22
|
+
* rate-limited. See `calendarNextIcsRotateAt()` for the window both sides derive.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CALENDAR_ICS_ROTATE_THROTTLED_ERROR_CODE = "CALENDAR_ICS_ROTATE_THROTTLED";
|