@progressive-development/pd-provider-firebase-functions 1.1.0 → 1.2.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/dist/auth-trash.d.ts +5 -2
- package/dist/auth-trash.d.ts.map +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/history.d.ts +1 -1
- package/dist/history.d.ts.map +1 -1
- package/dist/index.d.ts +22 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/response.d.ts +1 -1
- package/dist/response.d.ts.map +1 -1
- package/dist/trash.d.ts +9 -2
- package/dist/trash.d.ts.map +1 -1
- package/dist/trash.js +4 -1
- package/package.json +1 -1
package/dist/auth-trash.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TrashItem } from './trash';
|
|
1
|
+
import { TrashItem } from './trash.js';
|
|
2
2
|
export interface AuthTrashOptions {
|
|
3
3
|
/**
|
|
4
4
|
* How to determine the Auth UID from the document.
|
|
@@ -23,7 +23,10 @@ export interface AuthTrashOptions {
|
|
|
23
23
|
* @param options - Auth and database options
|
|
24
24
|
* @returns The created trash item
|
|
25
25
|
*/
|
|
26
|
-
export declare function moveToTrashWithAuth<T = unknown>(collection: string, documentId: string, deletedBy: string
|
|
26
|
+
export declare function moveToTrashWithAuth<T = unknown>(collection: string, documentId: string, deletedBy: string | {
|
|
27
|
+
uid: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}, objectType: string, options?: AuthTrashOptions): Promise<TrashItem<T>>;
|
|
27
30
|
/**
|
|
28
31
|
* Restore document from trash AND re-enable the Auth user.
|
|
29
32
|
*
|
package/dist/auth-trash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-trash.d.ts","sourceRoot":"","sources":["../src/auth-trash.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,
|
|
1
|
+
{"version":3,"file":"auth-trash.d.ts","sourceRoot":"","sources":["../src/auth-trash.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,YAAY,CAAC;AAQpB,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAEtC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoCD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,GAAG,OAAO,EACnD,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACjD,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CA0CvB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
package/dist/auth.d.ts
CHANGED
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CASjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,MAAM,EAAE,GACrB,WAAW,CAUb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,EACjB,eAAe,EAAE,MAAM,GACtB,IAAI,CAMN"}
|
package/dist/history.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Timestamp } from 'firebase-admin/firestore';
|
|
2
|
-
import { FieldChanges } from './changes';
|
|
2
|
+
import { FieldChanges } from './changes.js';
|
|
3
3
|
/**
|
|
4
4
|
* Core event categories — fixed in the helper. App-specific semantics go
|
|
5
5
|
* into the free-form `action` field, NOT in here.
|
package/dist/history.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAYjD;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,gDAAgD;IAChD,EAAE,EAAE,SAAS,CAAC;IACd,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,2DAA2D;AAC3D,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;AAS9D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,eAAe,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC,CAmBvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,eAAe,EACtB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAY9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAY,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,YAAY,EAAE,CAAC,CAczB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export type { ApiResponse, AuthContext } from './types';
|
|
2
|
-
export { StatusCode } from './types';
|
|
3
|
-
export { AppError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, EmailAlreadyUsedError, SC_EMAIL_ALREADY_USED, } from './errors';
|
|
4
|
-
export { requireAuth, requireClaims, requireOwnership } from './auth';
|
|
5
|
-
export { success, created, handleError } from './response';
|
|
6
|
-
export { getDb } from './firestore';
|
|
7
|
-
export { getNextCounter } from './counter';
|
|
8
|
-
export type { TrashItem } from './trash';
|
|
9
|
-
export { moveToTrash, restoreFromTrash, permanentDelete, listTrash, getTrashItem, } from './trash';
|
|
10
|
-
export type { AuthTrashOptions } from './auth-trash';
|
|
11
|
-
export { moveToTrashWithAuth, restoreFromTrashWithAuth, permanentDeleteWithAuth, } from './auth-trash';
|
|
12
|
-
export type { FieldChange, FieldChanges, ComputeChangesOptions, } from './changes';
|
|
13
|
-
export { computeChanges } from './changes';
|
|
14
|
-
export type { HistoryEntry, NewHistoryEntry } from './history';
|
|
15
|
-
export { HistoryKind, addHistoryEntry, recordHistory, listHistory, } from './history';
|
|
16
|
-
export type { MailObject, MailTemplate, MailMessage, MailAttachment, StoredMail, } from './mail';
|
|
17
|
-
export { addMailForSend, getMailById, getMailsByField } from './mail';
|
|
18
|
-
export { logger } from './logger';
|
|
19
|
-
export type { LogType, ScriptContextConfig, ScriptContext, } from './script-helpers';
|
|
20
|
-
export { scriptLog, initFirebaseAdmin, createScriptContext, } from './script-helpers';
|
|
21
|
-
export type { ImportTemplatesConfig } from './import-templates';
|
|
22
|
-
export { runImportTemplates } from './import-templates';
|
|
1
|
+
export type { ApiResponse, AuthContext } from './types.js';
|
|
2
|
+
export { StatusCode } from './types.js';
|
|
3
|
+
export { AppError, ValidationError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, EmailAlreadyUsedError, SC_EMAIL_ALREADY_USED, } from './errors.js';
|
|
4
|
+
export { requireAuth, requireClaims, requireOwnership } from './auth.js';
|
|
5
|
+
export { success, created, handleError } from './response.js';
|
|
6
|
+
export { getDb } from './firestore.js';
|
|
7
|
+
export { getNextCounter } from './counter.js';
|
|
8
|
+
export type { TrashItem } from './trash.js';
|
|
9
|
+
export { moveToTrash, restoreFromTrash, permanentDelete, listTrash, getTrashItem, } from './trash.js';
|
|
10
|
+
export type { AuthTrashOptions } from './auth-trash.js';
|
|
11
|
+
export { moveToTrashWithAuth, restoreFromTrashWithAuth, permanentDeleteWithAuth, } from './auth-trash.js';
|
|
12
|
+
export type { FieldChange, FieldChanges, ComputeChangesOptions, } from './changes.js';
|
|
13
|
+
export { computeChanges } from './changes.js';
|
|
14
|
+
export type { HistoryEntry, NewHistoryEntry } from './history.js';
|
|
15
|
+
export { HistoryKind, addHistoryEntry, recordHistory, listHistory, } from './history.js';
|
|
16
|
+
export type { MailObject, MailTemplate, MailMessage, MailAttachment, StoredMail, } from './mail.js';
|
|
17
|
+
export { addMailForSend, getMailById, getMailsByField } from './mail.js';
|
|
18
|
+
export { logger } from './logger.js';
|
|
19
|
+
export type { LogType, ScriptContextConfig, ScriptContext, } from './script-helpers.js';
|
|
20
|
+
export { scriptLog, initFirebaseAdmin, createScriptContext, } from './script-helpers.js';
|
|
21
|
+
export type { ImportTemplatesConfig } from './import-templates.js';
|
|
22
|
+
export { runImportTemplates } from './import-templates.js';
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EACL,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,q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uB,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/response.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiResponse } from './types';
|
|
1
|
+
import { ApiResponse } from './types.js';
|
|
2
2
|
export declare function success<T>(data: T): ApiResponse<T>;
|
|
3
3
|
export declare function created<T>(data: T): ApiResponse<T>;
|
|
4
4
|
export declare function handleError(error: unknown): ApiResponse<{
|
package/dist/response.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,YAAY,CAAC;AAIrD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAElD;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,GACb,WAAW,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAsB9C"}
|
package/dist/trash.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ export interface TrashItem<T = unknown> {
|
|
|
16
16
|
deletedAt: Timestamp;
|
|
17
17
|
/** UID of user who deleted */
|
|
18
18
|
deletedBy: string;
|
|
19
|
+
/** Denormalized display name of the deleting user (survives account
|
|
20
|
+
* deletion; written when moveToTrash receives a stamp object) */
|
|
21
|
+
deletedByName?: string;
|
|
19
22
|
/** The original document data */
|
|
20
23
|
data: T;
|
|
21
24
|
}
|
|
@@ -29,13 +32,17 @@ export interface TrashItem<T = unknown> {
|
|
|
29
32
|
*
|
|
30
33
|
* @param collection - The collection path (e.g., "djRequests")
|
|
31
34
|
* @param documentId - The document ID to trash
|
|
32
|
-
* @param deletedBy - UID of the user
|
|
35
|
+
* @param deletedBy - UID of the deleting user, or a { uid, name } stamp
|
|
36
|
+
* (the name is denormalized into the trash item)
|
|
33
37
|
* @param objectType - Type identifier for filtering (e.g., "djRequest")
|
|
34
38
|
* @param databaseId - Optional named database
|
|
35
39
|
* @returns The created trash item
|
|
36
40
|
* @throws NotFoundError if document doesn't exist
|
|
37
41
|
*/
|
|
38
|
-
export declare function moveToTrash<T = unknown>(collection: string, documentId: string, deletedBy: string
|
|
42
|
+
export declare function moveToTrash<T = unknown>(collection: string, documentId: string, deletedBy: string | {
|
|
43
|
+
uid: string;
|
|
44
|
+
name: string;
|
|
45
|
+
}, objectType: string, databaseId?: string): Promise<TrashItem<T>>;
|
|
39
46
|
/**
|
|
40
47
|
* Restore a document from trash to its original location.
|
|
41
48
|
*
|
package/dist/trash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trash.d.ts","sourceRoot":"","sources":["../src/trash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAcrD;;;GAGG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACpC,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,IAAI,EAAE,CAAC,CAAC;CACT;AASD
|
|
1
|
+
{"version":3,"file":"trash.d.ts","sourceRoot":"","sources":["../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AC,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAiBzB;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAa9B"}
|
package/dist/trash.js
CHANGED
|
@@ -18,7 +18,10 @@ async function moveToTrash(collection, documentId, deletedBy, objectType, databa
|
|
|
18
18
|
originalCollection: collection,
|
|
19
19
|
objectType,
|
|
20
20
|
deletedAt: Timestamp.now(),
|
|
21
|
-
deletedBy,
|
|
21
|
+
deletedBy: typeof deletedBy === "string" ? deletedBy : deletedBy.uid,
|
|
22
|
+
...typeof deletedBy === "object" && {
|
|
23
|
+
deletedByName: deletedBy.name
|
|
24
|
+
},
|
|
22
25
|
data: originalData
|
|
23
26
|
};
|
|
24
27
|
transaction.set(trashRef, trashData);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progressive-development/pd-provider-firebase-functions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Firebase Functions v2 utilities for pd-spa-helper backend",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|