@lpdjs/firestore-repo-service 3.0.13 → 3.0.15
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/actor-context-DQZgWqj3.d.cts +117 -0
- package/dist/actor-context-DQZgWqj3.d.ts +117 -0
- package/dist/{create-servers-LyRLAOh3.d.cts → create-servers-B5Z5v2SP.d.cts} +11 -5
- package/dist/{create-servers-Db1xUY2N.d.ts → create-servers-p1-jJNTG.d.ts} +11 -5
- package/dist/history/index.cjs +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +67 -7
- package/dist/history/index.d.ts +67 -7
- package/dist/history/index.js +1 -1
- package/dist/history/index.js.map +1 -1
- package/dist/index.cjs +81 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -14
- package/dist/index.d.ts +20 -14
- package/dist/index.js +81 -81
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/{openapi-QVpqnnes.d.cts → openapi-B9utXiEH.d.cts} +1 -1
- package/dist/{openapi-CNIA7QRw.d.ts → openapi-Bsqq2zgh.d.ts} +1 -1
- package/dist/{queue-BEB-ujA3.d.ts → queue-NFod6hTT.d.ts} +1 -1
- package/dist/{queue-CpHe6M5j.d.cts → queue-zw2B7GPx.d.cts} +1 -1
- package/dist/{read-15-TcgCz.d.ts → read-BPov7lws.d.ts} +30 -7
- package/dist/{read-B15YaPyR.d.cts → read-Dfah1PPl.d.cts} +30 -7
- package/dist/{rules-Cafrkb9v.d.ts → rules-18wH7Uak.d.ts} +1 -1
- package/dist/{rules-Bu2NB7Eb.d.cts → rules-oSXoV4Js.d.cts} +1 -1
- package/dist/servers/admin/index.cjs +5 -5
- package/dist/servers/admin/index.cjs.map +1 -1
- package/dist/servers/admin/index.d.cts +5 -4
- package/dist/servers/admin/index.d.ts +5 -4
- package/dist/servers/admin/index.js +5 -5
- package/dist/servers/admin/index.js.map +1 -1
- package/dist/servers/crud/index.cjs +2 -2
- package/dist/servers/crud/index.cjs.map +1 -1
- package/dist/servers/crud/index.d.cts +10 -9
- package/dist/servers/crud/index.d.ts +10 -9
- package/dist/servers/crud/index.js +2 -2
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/hono/index.cjs +14 -14
- package/dist/servers/hono/index.cjs.map +1 -1
- package/dist/servers/hono/index.d.cts +11 -3
- package/dist/servers/hono/index.d.ts +11 -3
- package/dist/servers/hono/index.js +14 -14
- package/dist/servers/hono/index.js.map +1 -1
- package/dist/servers/index.cjs +94 -94
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +13 -12
- package/dist/servers/index.d.ts +13 -12
- package/dist/servers/index.js +94 -94
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/bigquery.d.cts +2 -2
- package/dist/sync/bigquery.d.ts +2 -2
- package/dist/sync/index.cjs +55 -55
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +6 -6
- package/dist/sync/index.d.ts +6 -6
- package/dist/sync/index.js +55 -55
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/meilisearch.cjs +2 -2
- package/dist/sync/meilisearch.cjs.map +1 -1
- package/dist/sync/meilisearch.d.cts +2 -2
- package/dist/sync/meilisearch.d.ts +2 -2
- package/dist/sync/meilisearch.js +2 -2
- package/dist/sync/meilisearch.js.map +1 -1
- package/dist/{types-o-9qoExc.d.cts → types-BDTx8VPg.d.cts} +8 -0
- package/dist/{types-CNseHqF7.d.cts → types-BGh5_2fl.d.cts} +4 -4
- package/dist/{types-DGQURFSq.d.ts → types-B_FrzmO4.d.ts} +1 -1
- package/dist/{types-DmXW_fVz.d.ts → types-Cc6lelk1.d.ts} +4 -4
- package/dist/{types--RamYGF1.d.cts → types-D6zvWzRt.d.cts} +96 -2
- package/dist/{types--RamYGF1.d.ts → types-D6zvWzRt.d.ts} +96 -2
- package/dist/{types-VVuLlmfc.d.cts → types-D78FPJeF.d.cts} +1 -1
- package/dist/{types-B51LYvQZ.d.cts → types-Dc3lX99O.d.cts} +20 -19
- package/dist/{types-Ci0dGbuW.d.ts → types-DgFJLwAu.d.ts} +20 -19
- package/dist/{types-D3W_RaDA.d.ts → types-w1rEqs0Z.d.ts} +8 -0
- package/package.json +1 -1
package/dist/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lpdjs/firestore-repo-service (v3.0.
|
|
1
|
+
# @lpdjs/firestore-repo-service (v3.0.15) — full documentation
|
|
2
2
|
|
|
3
3
|
> ⚡ Type-safe Firestore ORM with auto-generated repositories, advanced queries, relations with typed select, pagination with include, batch/bulk operations, aggregations and transactions.
|
|
4
4
|
|
package/dist/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lpdjs/firestore-repo-service (v3.0.
|
|
1
|
+
# @lpdjs/firestore-repo-service (v3.0.15)
|
|
2
2
|
|
|
3
3
|
> ⚡ Type-safe Firestore ORM with auto-generated repositories, advanced queries, relations with typed select, pagination with include, batch/bulk operations, aggregations and transactions.
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentReference } from 'firebase-admin/firestore';
|
|
2
|
-
import { a as HistoryListOptions, b as HistoryEntry, c as HistoryRawListOptions, V as V1HistoryDoc, d as V2HistoryDoc, e as HistoryOperation, f as HistoryMeta, g as HistoryConfigForModel } from './types
|
|
2
|
+
import { a as HistoryListOptions, b as HistoryEntry, c as HistoryRawListOptions, V as V1HistoryDoc, d as V2HistoryDoc, e as HistoryOperation, f as HistoryMeta, g as HistoryCustomData, h as HistoryCustomInput, i as HistoryConfigForModel } from './types-D6zvWzRt.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `repo.history.*` read API.
|
|
@@ -124,11 +124,11 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
124
124
|
* Convenience wrapper around {@link list} filtering on the operation type.
|
|
125
125
|
*
|
|
126
126
|
* @param args - `[...pathArgs, operation, options?]` where `operation` is
|
|
127
|
-
* `"create" | "update" | "delete"`.
|
|
127
|
+
* `"create" | "update" | "delete" | "custom"`.
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
130
|
* ```ts
|
|
131
|
-
* await repos.residences.history!.byOperation("residence_123", "
|
|
131
|
+
* await repos.residences.history!.byOperation("residence_123", "custom");
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
134
|
byOperation(...args: [...PathArgs, HistoryOperation, HistoryListOptions<T>?]): Promise<HistoryEntry<T>[]>;
|
|
@@ -138,17 +138,17 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
138
138
|
* Useful when:
|
|
139
139
|
* - You already have richer business context than the trigger can extract
|
|
140
140
|
* (e.g. inside an HTTP handler that knows the authenticated user).
|
|
141
|
-
* - You want to record
|
|
142
|
-
* `meta.reason = "exported-to-pdf"`).
|
|
141
|
+
* - You want to record a diff manually alongside explicit `meta` or `custom`.
|
|
143
142
|
*
|
|
144
143
|
* Honours the same `include` / `exclude` / meta auto-exclusion rules as
|
|
145
|
-
* the trigger. Returns `null` when
|
|
144
|
+
* the trigger. Returns `null` when `operation === "update"` and the diff is
|
|
145
|
+
* empty (no changes recorded).
|
|
146
146
|
*
|
|
147
147
|
* > ⚠️ Use sparingly — combining manual records with the trigger can
|
|
148
148
|
* > produce duplicate entries if both fire for the same write.
|
|
149
149
|
*
|
|
150
150
|
* @param args - `[...pathArgs, payload]` where `payload` is
|
|
151
|
-
* `{ operation, before?, after?, meta? }`.
|
|
151
|
+
* `{ operation, before?, after?, meta?, custom? }`.
|
|
152
152
|
*/
|
|
153
153
|
recordManual(...args: [
|
|
154
154
|
...PathArgs,
|
|
@@ -157,8 +157,31 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
157
157
|
before?: T | null;
|
|
158
158
|
after?: T | null;
|
|
159
159
|
meta?: HistoryMeta;
|
|
160
|
+
custom?: HistoryCustomData;
|
|
160
161
|
}
|
|
161
162
|
]): Promise<HistoryEntry<T> | null>;
|
|
163
|
+
/**
|
|
164
|
+
* Record a custom business action (`operation: "custom"`) independent of
|
|
165
|
+
* model fields (e.g. manual invoice creation, PDF export, email sent).
|
|
166
|
+
*
|
|
167
|
+
* Automatically resolves the current actor from `AsyncLocalStorage` (Hono
|
|
168
|
+
* request / `withActor`, falling back to `history.fallbackActor`) and merges
|
|
169
|
+
* any explicit `meta` overrides on top.
|
|
170
|
+
*
|
|
171
|
+
* @param args - `[...pathArgs, payload]` where `payload` is
|
|
172
|
+
* `{ title, description?, key?, display?, data?, meta? }`.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* await repos.pros.history!.recordCustom(proId, {
|
|
177
|
+
* key: "invoice_create_manually",
|
|
178
|
+
* title: "Création de la facture",
|
|
179
|
+
* description: "Facture #F-2026-042 créée manuellement",
|
|
180
|
+
* data: { invoiceId: "inv_123", amount: 150 },
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
recordCustom(...args: [...PathArgs, HistoryCustomInput]): Promise<HistoryEntry<T> | null>;
|
|
162
185
|
}
|
|
163
186
|
|
|
164
187
|
export { createHistoryMethods as c };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentReference } from 'firebase-admin/firestore';
|
|
2
|
-
import { a as HistoryListOptions, b as HistoryEntry, c as HistoryRawListOptions, V as V1HistoryDoc, d as V2HistoryDoc, e as HistoryOperation, f as HistoryMeta, g as HistoryConfigForModel } from './types
|
|
2
|
+
import { a as HistoryListOptions, b as HistoryEntry, c as HistoryRawListOptions, V as V1HistoryDoc, d as V2HistoryDoc, e as HistoryOperation, f as HistoryMeta, g as HistoryCustomData, h as HistoryCustomInput, i as HistoryConfigForModel } from './types-D6zvWzRt.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `repo.history.*` read API.
|
|
@@ -124,11 +124,11 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
124
124
|
* Convenience wrapper around {@link list} filtering on the operation type.
|
|
125
125
|
*
|
|
126
126
|
* @param args - `[...pathArgs, operation, options?]` where `operation` is
|
|
127
|
-
* `"create" | "update" | "delete"`.
|
|
127
|
+
* `"create" | "update" | "delete" | "custom"`.
|
|
128
128
|
*
|
|
129
129
|
* @example
|
|
130
130
|
* ```ts
|
|
131
|
-
* await repos.residences.history!.byOperation("residence_123", "
|
|
131
|
+
* await repos.residences.history!.byOperation("residence_123", "custom");
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
134
|
byOperation(...args: [...PathArgs, HistoryOperation, HistoryListOptions<T>?]): Promise<HistoryEntry<T>[]>;
|
|
@@ -138,17 +138,17 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
138
138
|
* Useful when:
|
|
139
139
|
* - You already have richer business context than the trigger can extract
|
|
140
140
|
* (e.g. inside an HTTP handler that knows the authenticated user).
|
|
141
|
-
* - You want to record
|
|
142
|
-
* `meta.reason = "exported-to-pdf"`).
|
|
141
|
+
* - You want to record a diff manually alongside explicit `meta` or `custom`.
|
|
143
142
|
*
|
|
144
143
|
* Honours the same `include` / `exclude` / meta auto-exclusion rules as
|
|
145
|
-
* the trigger. Returns `null` when
|
|
144
|
+
* the trigger. Returns `null` when `operation === "update"` and the diff is
|
|
145
|
+
* empty (no changes recorded).
|
|
146
146
|
*
|
|
147
147
|
* > ⚠️ Use sparingly — combining manual records with the trigger can
|
|
148
148
|
* > produce duplicate entries if both fire for the same write.
|
|
149
149
|
*
|
|
150
150
|
* @param args - `[...pathArgs, payload]` where `payload` is
|
|
151
|
-
* `{ operation, before?, after?, meta? }`.
|
|
151
|
+
* `{ operation, before?, after?, meta?, custom? }`.
|
|
152
152
|
*/
|
|
153
153
|
recordManual(...args: [
|
|
154
154
|
...PathArgs,
|
|
@@ -157,8 +157,31 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
|
|
|
157
157
|
before?: T | null;
|
|
158
158
|
after?: T | null;
|
|
159
159
|
meta?: HistoryMeta;
|
|
160
|
+
custom?: HistoryCustomData;
|
|
160
161
|
}
|
|
161
162
|
]): Promise<HistoryEntry<T> | null>;
|
|
163
|
+
/**
|
|
164
|
+
* Record a custom business action (`operation: "custom"`) independent of
|
|
165
|
+
* model fields (e.g. manual invoice creation, PDF export, email sent).
|
|
166
|
+
*
|
|
167
|
+
* Automatically resolves the current actor from `AsyncLocalStorage` (Hono
|
|
168
|
+
* request / `withActor`, falling back to `history.fallbackActor`) and merges
|
|
169
|
+
* any explicit `meta` overrides on top.
|
|
170
|
+
*
|
|
171
|
+
* @param args - `[...pathArgs, payload]` where `payload` is
|
|
172
|
+
* `{ title, description?, key?, display?, data?, meta? }`.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* await repos.pros.history!.recordCustom(proId, {
|
|
177
|
+
* key: "invoice_create_manually",
|
|
178
|
+
* title: "Création de la facture",
|
|
179
|
+
* description: "Facture #F-2026-042 créée manuellement",
|
|
180
|
+
* data: { invoiceId: "inv_123", amount: 150 },
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
recordCustom(...args: [...PathArgs, HistoryCustomInput]): Promise<HistoryEntry<T> | null>;
|
|
162
185
|
}
|
|
163
186
|
|
|
164
187
|
export { createHistoryMethods as c };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as AuthUser } from './firebase-auth-nG3prKoj.js';
|
|
2
|
-
import { D as DeepDiffReturn, k as RulesMap, f as CrudUpdateRuleContext } from './types-
|
|
2
|
+
import { D as DeepDiffReturn, k as RulesMap, f as CrudUpdateRuleContext } from './types-Cc6lelk1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Computes a typed diff between the existing document (`before`) and the incoming partial changes (`changesInput`).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as AuthUser } from './firebase-auth-nG3prKoj.cjs';
|
|
2
|
-
import { D as DeepDiffReturn, k as RulesMap, f as CrudUpdateRuleContext } from './types-
|
|
2
|
+
import { D as DeepDiffReturn, k as RulesMap, f as CrudUpdateRuleContext } from './types-BGh5_2fl.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Computes a typed diff between the existing document (`before`) and the incoming partial changes (`changesInput`).
|