@lpdjs/firestore-repo-service 2.2.5 → 2.2.7

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.
Files changed (37) hide show
  1. package/dist/{create-servers-DmggzSb3.d.cts → create-servers-B3Ls46bx.d.cts} +3 -3
  2. package/dist/{create-servers-D4-NGpKm.d.ts → create-servers-CvVZnihM.d.ts} +3 -3
  3. package/dist/history/index.cjs +2 -0
  4. package/dist/history/index.cjs.map +1 -0
  5. package/dist/history/index.d.cts +127 -0
  6. package/dist/history/index.d.ts +127 -0
  7. package/dist/history/index.js +2 -0
  8. package/dist/history/index.js.map +1 -0
  9. package/dist/{index-DpD4DEqH.d.cts → index-Cw9b1crP.d.cts} +1 -1
  10. package/dist/{index-Cvip2Sgt.d.ts → index-DGB3Oemk.d.ts} +1 -1
  11. package/dist/index.cjs +587 -97
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +19 -10
  14. package/dist/index.d.ts +19 -10
  15. package/dist/index.js +587 -97
  16. package/dist/index.js.map +1 -1
  17. package/dist/{openapi-B3P2F8op.d.ts → openapi-BEf4OuG9.d.ts} +1 -1
  18. package/dist/{openapi-UJJ1aCFk.d.cts → openapi-D8UTm0lu.d.cts} +1 -1
  19. package/dist/read-DMvxeFCg.d.cts +232 -0
  20. package/dist/read-DMvxeFCg.d.ts +232 -0
  21. package/dist/servers/admin/index.cjs +566 -76
  22. package/dist/servers/admin/index.cjs.map +1 -1
  23. package/dist/servers/admin/index.d.cts +4 -2
  24. package/dist/servers/admin/index.d.ts +4 -2
  25. package/dist/servers/admin/index.js +566 -76
  26. package/dist/servers/admin/index.js.map +1 -1
  27. package/dist/servers/crud/index.d.cts +6 -4
  28. package/dist/servers/crud/index.d.ts +6 -4
  29. package/dist/servers/index.cjs +597 -107
  30. package/dist/servers/index.cjs.map +1 -1
  31. package/dist/servers/index.d.cts +7 -6
  32. package/dist/servers/index.d.ts +7 -6
  33. package/dist/servers/index.js +597 -107
  34. package/dist/servers/index.js.map +1 -1
  35. package/dist/{types-Z9Qy8Xmx.d.ts → types-CE1dws32.d.cts} +20 -3
  36. package/dist/{types-Z9Qy8Xmx.d.cts → types-CjexXskS.d.ts} +20 -3
  37. package/package.json +14 -1
@@ -1,4 +1,4 @@
1
- import { s as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-Z9Qy8Xmx.js';
1
+ import { s as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-CjexXskS.js';
2
2
 
3
3
  /**
4
4
  * OpenAPI 3.1 specification generator for the CRUD server.
@@ -1,4 +1,4 @@
1
- import { s as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-Z9Qy8Xmx.cjs';
1
+ import { s as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-CE1dws32.cjs';
2
2
 
3
3
  /**
4
4
  * OpenAPI 3.1 specification generator for the CRUD server.
@@ -0,0 +1,232 @@
1
+ import { Timestamp, DocumentReference } from 'firebase-admin/firestore';
2
+ import { onDocumentWritten } from 'firebase-functions/v2/firestore';
3
+
4
+ /**
5
+ * Types and interfaces for the history (change-log) module.
6
+ *
7
+ * The package writes history entries in **schema v2** (1 Firestore document
8
+ * per `update`/`create`/`delete` event, with a `changes` map keyed by field
9
+ * name). It reads both v1 (legacy: 1 doc per modified field) and v2 by
10
+ * normalising them into a unified {@link HistoryEntry} shape.
11
+ */
12
+
13
+ type HistoryOperation = "create" | "update" | "delete";
14
+ /**
15
+ * Detected JS/Firestore type of a value as stored in a history entry.
16
+ * Matches the values returned by {@link valueType}.
17
+ */
18
+ type HistoryValueType = "string" | "number" | "boolean" | "timestamp" | "date" | "array" | "object" | "null" | "undefined";
19
+ /** A single field change inside a history entry. */
20
+ interface HistoryFieldChange {
21
+ oldValue: unknown;
22
+ newValue: unknown;
23
+ type: {
24
+ old: HistoryValueType;
25
+ new: HistoryValueType;
26
+ };
27
+ }
28
+ /** Captured metadata for a history entry. */
29
+ interface HistoryMeta {
30
+ userId?: string | null;
31
+ userEmail?: string | null;
32
+ reason?: string | null;
33
+ comment?: string | null;
34
+ /** Free-form extra fields copied from the source document. */
35
+ extras?: Record<string, unknown>;
36
+ }
37
+ /**
38
+ * Unified history entry returned by `repo.history.list(...)`.
39
+ * Both v1 and v2 documents are normalised into this shape.
40
+ */
41
+ interface HistoryEntry<T = Record<string, unknown>> {
42
+ /** Stable id of the underlying Firestore history document (the v1+v2 storage doc). */
43
+ historyDocId: string;
44
+ /** Id of the entity this entry belongs to. */
45
+ historyToObjectId: string;
46
+ /** When the change was recorded. */
47
+ historySetAt: Timestamp;
48
+ /** Source schema version. v1 = legacy (1 doc/field), v2 = current (1 doc/update). */
49
+ schemaVersion: 1 | 2;
50
+ /** v2 only — v1 is always normalised to "update". */
51
+ operation: HistoryOperation;
52
+ /** Captured author / context information. */
53
+ meta: HistoryMeta;
54
+ /** Per-field changes. Keys are field names of T. */
55
+ changes: {
56
+ [K in keyof T & string]?: HistoryFieldChange;
57
+ } & {
58
+ [field: string]: HistoryFieldChange;
59
+ };
60
+ }
61
+ /** v2 document layout. */
62
+ interface V2HistoryDoc {
63
+ schemaVersion: 2;
64
+ historyDocId: string;
65
+ historyToObjectId: string;
66
+ historySetAt: Timestamp;
67
+ operation: HistoryOperation;
68
+ meta: HistoryMeta;
69
+ changes: Record<string, HistoryFieldChange>;
70
+ /** Optional TTL marker (Firestore deletes the doc after this date). */
71
+ expiresAt?: Timestamp;
72
+ /** Set when the doc had to be truncated to fit the 1 MiB limit. */
73
+ _truncated?: boolean;
74
+ }
75
+ /** v1 document layout (legacy — read-only support). */
76
+ interface V1HistoryDoc {
77
+ schemaVersion?: undefined;
78
+ historyDocId: string;
79
+ historyToObjectId: string;
80
+ historyUserId?: string;
81
+ historyUserEmail?: string;
82
+ historySetAt: Timestamp;
83
+ field: string;
84
+ changes: {
85
+ oldValue: unknown;
86
+ newValue: unknown;
87
+ };
88
+ types?: {
89
+ oldValue: string;
90
+ newValue: string;
91
+ };
92
+ historyDetails?: Record<string, unknown> | null;
93
+ extraHistoryDetails?: {
94
+ comment?: string;
95
+ reason?: string;
96
+ toKey?: string;
97
+ force?: boolean;
98
+ } | null;
99
+ extraContentKeys?: Record<string, unknown> | null;
100
+ objectType?: string;
101
+ }
102
+ /**
103
+ * Per-repo history configuration. Attached on the repository config under
104
+ * the `history` key. All meta sub-keys must reference fields that exist on
105
+ * the model (compile-time enforced by {@link HistoryConfigForModel}).
106
+ */
107
+ interface HistoryConfigBase {
108
+ /** Master switch — when false/absent, no triggers are generated and no `repo.history` API is exposed. */
109
+ enabled: boolean;
110
+ /** Subcollection name used to store history docs. Default: "history". */
111
+ subcollection?: string;
112
+ /**
113
+ * Optional Firestore TTL configuration. When set, every written history doc
114
+ * gets a Timestamp field (default name: `expiresAt`) at `now + days`.
115
+ * You still need to enable the TTL policy on that field via gcloud / console.
116
+ */
117
+ ttl?: {
118
+ field?: string;
119
+ days: number;
120
+ };
121
+ }
122
+ /**
123
+ * Strongly-typed history config bound to a model `T`.
124
+ *
125
+ * - `meta.*` keys must be keyof T (or string for `extras` entries).
126
+ * - `include` / `exclude` accept keyof T.
127
+ */
128
+ interface HistoryConfigForModel<T> extends HistoryConfigBase {
129
+ meta?: {
130
+ /** Field on T that holds the author user id. */
131
+ userId?: keyof T & string;
132
+ /** Field on T that holds the author email. */
133
+ userEmail?: keyof T & string;
134
+ /** Field on T that holds an optional change reason. */
135
+ reason?: keyof T & string;
136
+ /** Field on T that holds an optional change comment. */
137
+ comment?: keyof T & string;
138
+ /** Free-form extra field names copied verbatim into `meta.extras`. */
139
+ extras?: (keyof T & string)[];
140
+ };
141
+ /** When set, only these top-level fields are diffed. */
142
+ include?: (keyof T & string)[];
143
+ /** Always excluded from the diff (in addition to meta + system keys). */
144
+ exclude?: (keyof T & string)[];
145
+ /**
146
+ * Optional async hook to enrich/mutate an entry before it's written.
147
+ * Return `null` to drop the entry entirely.
148
+ */
149
+ onBeforeWrite?: (entry: V2HistoryDoc, ctx: {
150
+ repoName: string;
151
+ docId: string;
152
+ before: T | null;
153
+ after: T | null;
154
+ }) => V2HistoryDoc | null | Promise<V2HistoryDoc | null>;
155
+ }
156
+ interface HistoryListOptions<T = unknown> {
157
+ /** Max number of normalised entries to return. Default: 50. */
158
+ limit?: number;
159
+ /** Cursor for pagination (use `historySetAt` of the last received entry). */
160
+ cursor?: Timestamp;
161
+ /** Sort direction on `historySetAt`. Default: "desc". */
162
+ direction?: "asc" | "desc";
163
+ /** Restrict to entries that touch any of these fields (post-filter). */
164
+ fields?: (keyof T & string)[];
165
+ /** Restrict to entries with these operations (v2 only — v1 is always "update"). */
166
+ operations?: HistoryOperation[];
167
+ }
168
+ interface HistoryRawListOptions {
169
+ limit?: number;
170
+ cursor?: Timestamp;
171
+ direction?: "asc" | "desc";
172
+ }
173
+ /**
174
+ * Firestore trigger constructors injected by the consumer.
175
+ * Mirrors the DI pattern used by `createSyncTriggers`.
176
+ */
177
+ interface HistoryFirestoreTriggersDep {
178
+ onDocumentWritten: typeof onDocumentWritten;
179
+ }
180
+ /** Per-repo override at the `createHistoryTriggers` call site. */
181
+ interface HistoryTriggerRepoOverride {
182
+ /**
183
+ * Explicit Firestore document path pattern. Required for collection-group
184
+ * repositories whose path cannot be auto-detected.
185
+ * @example "residences/{residenceId}/workshops/{docId}"
186
+ */
187
+ triggerPath?: string;
188
+ }
189
+ interface HistoryTriggersConfig<M = Record<string, any>> {
190
+ deps: HistoryFirestoreTriggersDep;
191
+ /** Defaults applied to every repo unless overridden. */
192
+ defaults?: {
193
+ ttl?: {
194
+ field?: string;
195
+ days: number;
196
+ };
197
+ };
198
+ /** Per-repo overrides keyed by repo name in the mapping. */
199
+ repos?: Partial<Record<keyof M & string, HistoryTriggerRepoOverride>>;
200
+ }
201
+
202
+ /**
203
+ * `repo.history.*` read API.
204
+ *
205
+ * - `list(docId, opts)` → unified, paginated, normalised entries (v1 + v2).
206
+ * - `raw(docId, opts)` → raw Firestore docs (no normalisation).
207
+ * - `byField(docId, field, opts)` / `byOperation(docId, op, opts)` →
208
+ * convenience wrappers.
209
+ * - `recordManual(docId, payload)` → bypass the trigger and write a v2 entry
210
+ * synchronously (use sparingly; prefer trigger-based capture).
211
+ */
212
+
213
+ /**
214
+ * Build the `repo.history` API for a given configured repository.
215
+ * Returns `null` when history is not enabled — the factory then skips
216
+ * exposing the namespace.
217
+ */
218
+ declare function createHistoryMethods<T>(documentRef: (...args: any[]) => DocumentReference, systemKeys: string[], repoName: string, config: HistoryConfigForModel<T> & {
219
+ enabled: boolean;
220
+ }): {
221
+ list: (...args: any[]) => Promise<HistoryEntry<T>[]>;
222
+ raw: (...args: any[]) => Promise<Array<{
223
+ id: string;
224
+ data: V1HistoryDoc | V2HistoryDoc;
225
+ }>>;
226
+ byField: (...args: any[]) => Promise<HistoryEntry<T>[]>;
227
+ byOperation: (...args: any[]) => Promise<HistoryEntry<T>[]>;
228
+ recordManual: (...args: any[]) => Promise<HistoryEntry<T> | null>;
229
+ } | null;
230
+ type HistoryMethods<T> = NonNullable<ReturnType<typeof createHistoryMethods<T>>>;
231
+
232
+ export { type HistoryConfigForModel as H, type V2HistoryDoc as V, type HistoryMethods as a, type HistoryTriggersConfig as b, type HistoryOperation as c, type HistoryFieldChange as d, type HistoryMeta as e, type HistoryValueType as f, type V1HistoryDoc as g, type HistoryEntry as h, createHistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };
@@ -0,0 +1,232 @@
1
+ import { Timestamp, DocumentReference } from 'firebase-admin/firestore';
2
+ import { onDocumentWritten } from 'firebase-functions/v2/firestore';
3
+
4
+ /**
5
+ * Types and interfaces for the history (change-log) module.
6
+ *
7
+ * The package writes history entries in **schema v2** (1 Firestore document
8
+ * per `update`/`create`/`delete` event, with a `changes` map keyed by field
9
+ * name). It reads both v1 (legacy: 1 doc per modified field) and v2 by
10
+ * normalising them into a unified {@link HistoryEntry} shape.
11
+ */
12
+
13
+ type HistoryOperation = "create" | "update" | "delete";
14
+ /**
15
+ * Detected JS/Firestore type of a value as stored in a history entry.
16
+ * Matches the values returned by {@link valueType}.
17
+ */
18
+ type HistoryValueType = "string" | "number" | "boolean" | "timestamp" | "date" | "array" | "object" | "null" | "undefined";
19
+ /** A single field change inside a history entry. */
20
+ interface HistoryFieldChange {
21
+ oldValue: unknown;
22
+ newValue: unknown;
23
+ type: {
24
+ old: HistoryValueType;
25
+ new: HistoryValueType;
26
+ };
27
+ }
28
+ /** Captured metadata for a history entry. */
29
+ interface HistoryMeta {
30
+ userId?: string | null;
31
+ userEmail?: string | null;
32
+ reason?: string | null;
33
+ comment?: string | null;
34
+ /** Free-form extra fields copied from the source document. */
35
+ extras?: Record<string, unknown>;
36
+ }
37
+ /**
38
+ * Unified history entry returned by `repo.history.list(...)`.
39
+ * Both v1 and v2 documents are normalised into this shape.
40
+ */
41
+ interface HistoryEntry<T = Record<string, unknown>> {
42
+ /** Stable id of the underlying Firestore history document (the v1+v2 storage doc). */
43
+ historyDocId: string;
44
+ /** Id of the entity this entry belongs to. */
45
+ historyToObjectId: string;
46
+ /** When the change was recorded. */
47
+ historySetAt: Timestamp;
48
+ /** Source schema version. v1 = legacy (1 doc/field), v2 = current (1 doc/update). */
49
+ schemaVersion: 1 | 2;
50
+ /** v2 only — v1 is always normalised to "update". */
51
+ operation: HistoryOperation;
52
+ /** Captured author / context information. */
53
+ meta: HistoryMeta;
54
+ /** Per-field changes. Keys are field names of T. */
55
+ changes: {
56
+ [K in keyof T & string]?: HistoryFieldChange;
57
+ } & {
58
+ [field: string]: HistoryFieldChange;
59
+ };
60
+ }
61
+ /** v2 document layout. */
62
+ interface V2HistoryDoc {
63
+ schemaVersion: 2;
64
+ historyDocId: string;
65
+ historyToObjectId: string;
66
+ historySetAt: Timestamp;
67
+ operation: HistoryOperation;
68
+ meta: HistoryMeta;
69
+ changes: Record<string, HistoryFieldChange>;
70
+ /** Optional TTL marker (Firestore deletes the doc after this date). */
71
+ expiresAt?: Timestamp;
72
+ /** Set when the doc had to be truncated to fit the 1 MiB limit. */
73
+ _truncated?: boolean;
74
+ }
75
+ /** v1 document layout (legacy — read-only support). */
76
+ interface V1HistoryDoc {
77
+ schemaVersion?: undefined;
78
+ historyDocId: string;
79
+ historyToObjectId: string;
80
+ historyUserId?: string;
81
+ historyUserEmail?: string;
82
+ historySetAt: Timestamp;
83
+ field: string;
84
+ changes: {
85
+ oldValue: unknown;
86
+ newValue: unknown;
87
+ };
88
+ types?: {
89
+ oldValue: string;
90
+ newValue: string;
91
+ };
92
+ historyDetails?: Record<string, unknown> | null;
93
+ extraHistoryDetails?: {
94
+ comment?: string;
95
+ reason?: string;
96
+ toKey?: string;
97
+ force?: boolean;
98
+ } | null;
99
+ extraContentKeys?: Record<string, unknown> | null;
100
+ objectType?: string;
101
+ }
102
+ /**
103
+ * Per-repo history configuration. Attached on the repository config under
104
+ * the `history` key. All meta sub-keys must reference fields that exist on
105
+ * the model (compile-time enforced by {@link HistoryConfigForModel}).
106
+ */
107
+ interface HistoryConfigBase {
108
+ /** Master switch — when false/absent, no triggers are generated and no `repo.history` API is exposed. */
109
+ enabled: boolean;
110
+ /** Subcollection name used to store history docs. Default: "history". */
111
+ subcollection?: string;
112
+ /**
113
+ * Optional Firestore TTL configuration. When set, every written history doc
114
+ * gets a Timestamp field (default name: `expiresAt`) at `now + days`.
115
+ * You still need to enable the TTL policy on that field via gcloud / console.
116
+ */
117
+ ttl?: {
118
+ field?: string;
119
+ days: number;
120
+ };
121
+ }
122
+ /**
123
+ * Strongly-typed history config bound to a model `T`.
124
+ *
125
+ * - `meta.*` keys must be keyof T (or string for `extras` entries).
126
+ * - `include` / `exclude` accept keyof T.
127
+ */
128
+ interface HistoryConfigForModel<T> extends HistoryConfigBase {
129
+ meta?: {
130
+ /** Field on T that holds the author user id. */
131
+ userId?: keyof T & string;
132
+ /** Field on T that holds the author email. */
133
+ userEmail?: keyof T & string;
134
+ /** Field on T that holds an optional change reason. */
135
+ reason?: keyof T & string;
136
+ /** Field on T that holds an optional change comment. */
137
+ comment?: keyof T & string;
138
+ /** Free-form extra field names copied verbatim into `meta.extras`. */
139
+ extras?: (keyof T & string)[];
140
+ };
141
+ /** When set, only these top-level fields are diffed. */
142
+ include?: (keyof T & string)[];
143
+ /** Always excluded from the diff (in addition to meta + system keys). */
144
+ exclude?: (keyof T & string)[];
145
+ /**
146
+ * Optional async hook to enrich/mutate an entry before it's written.
147
+ * Return `null` to drop the entry entirely.
148
+ */
149
+ onBeforeWrite?: (entry: V2HistoryDoc, ctx: {
150
+ repoName: string;
151
+ docId: string;
152
+ before: T | null;
153
+ after: T | null;
154
+ }) => V2HistoryDoc | null | Promise<V2HistoryDoc | null>;
155
+ }
156
+ interface HistoryListOptions<T = unknown> {
157
+ /** Max number of normalised entries to return. Default: 50. */
158
+ limit?: number;
159
+ /** Cursor for pagination (use `historySetAt` of the last received entry). */
160
+ cursor?: Timestamp;
161
+ /** Sort direction on `historySetAt`. Default: "desc". */
162
+ direction?: "asc" | "desc";
163
+ /** Restrict to entries that touch any of these fields (post-filter). */
164
+ fields?: (keyof T & string)[];
165
+ /** Restrict to entries with these operations (v2 only — v1 is always "update"). */
166
+ operations?: HistoryOperation[];
167
+ }
168
+ interface HistoryRawListOptions {
169
+ limit?: number;
170
+ cursor?: Timestamp;
171
+ direction?: "asc" | "desc";
172
+ }
173
+ /**
174
+ * Firestore trigger constructors injected by the consumer.
175
+ * Mirrors the DI pattern used by `createSyncTriggers`.
176
+ */
177
+ interface HistoryFirestoreTriggersDep {
178
+ onDocumentWritten: typeof onDocumentWritten;
179
+ }
180
+ /** Per-repo override at the `createHistoryTriggers` call site. */
181
+ interface HistoryTriggerRepoOverride {
182
+ /**
183
+ * Explicit Firestore document path pattern. Required for collection-group
184
+ * repositories whose path cannot be auto-detected.
185
+ * @example "residences/{residenceId}/workshops/{docId}"
186
+ */
187
+ triggerPath?: string;
188
+ }
189
+ interface HistoryTriggersConfig<M = Record<string, any>> {
190
+ deps: HistoryFirestoreTriggersDep;
191
+ /** Defaults applied to every repo unless overridden. */
192
+ defaults?: {
193
+ ttl?: {
194
+ field?: string;
195
+ days: number;
196
+ };
197
+ };
198
+ /** Per-repo overrides keyed by repo name in the mapping. */
199
+ repos?: Partial<Record<keyof M & string, HistoryTriggerRepoOverride>>;
200
+ }
201
+
202
+ /**
203
+ * `repo.history.*` read API.
204
+ *
205
+ * - `list(docId, opts)` → unified, paginated, normalised entries (v1 + v2).
206
+ * - `raw(docId, opts)` → raw Firestore docs (no normalisation).
207
+ * - `byField(docId, field, opts)` / `byOperation(docId, op, opts)` →
208
+ * convenience wrappers.
209
+ * - `recordManual(docId, payload)` → bypass the trigger and write a v2 entry
210
+ * synchronously (use sparingly; prefer trigger-based capture).
211
+ */
212
+
213
+ /**
214
+ * Build the `repo.history` API for a given configured repository.
215
+ * Returns `null` when history is not enabled — the factory then skips
216
+ * exposing the namespace.
217
+ */
218
+ declare function createHistoryMethods<T>(documentRef: (...args: any[]) => DocumentReference, systemKeys: string[], repoName: string, config: HistoryConfigForModel<T> & {
219
+ enabled: boolean;
220
+ }): {
221
+ list: (...args: any[]) => Promise<HistoryEntry<T>[]>;
222
+ raw: (...args: any[]) => Promise<Array<{
223
+ id: string;
224
+ data: V1HistoryDoc | V2HistoryDoc;
225
+ }>>;
226
+ byField: (...args: any[]) => Promise<HistoryEntry<T>[]>;
227
+ byOperation: (...args: any[]) => Promise<HistoryEntry<T>[]>;
228
+ recordManual: (...args: any[]) => Promise<HistoryEntry<T> | null>;
229
+ } | null;
230
+ type HistoryMethods<T> = NonNullable<ReturnType<typeof createHistoryMethods<T>>>;
231
+
232
+ export { type HistoryConfigForModel as H, type V2HistoryDoc as V, type HistoryMethods as a, type HistoryTriggersConfig as b, type HistoryOperation as c, type HistoryFieldChange as d, type HistoryMeta as e, type HistoryValueType as f, type V1HistoryDoc as g, type HistoryEntry as h, createHistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };