@fragus/sam-types 1.0.99 → 1.1.1
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/package.json +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.ts +1 -0
- package/types/providerDocument.d.ts +24 -0
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
package/types/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Provider documents — support uploads private files to a provider in Superadmin;
|
|
2
|
+
// that provider's admins download them in Admin. Shared DTO contract.
|
|
3
|
+
//
|
|
4
|
+
// Invariant: the Admin view NEVER carries actor fields (who uploaded / who removed).
|
|
5
|
+
// The api mapper decides which view to emit — the front-end does not choose.
|
|
6
|
+
|
|
7
|
+
export interface IProviderDocument {
|
|
8
|
+
id: string // document_uid — the only id the front-ends ever see
|
|
9
|
+
name: string // original filename
|
|
10
|
+
description: string | null
|
|
11
|
+
contentType: string
|
|
12
|
+
size: number // raw bytes
|
|
13
|
+
uploadedAt: string // ISO
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Admin sees the document and its upload date only — no internal staff names.
|
|
17
|
+
export interface IProviderDocumentAdminView extends IProviderDocument {}
|
|
18
|
+
|
|
19
|
+
// Superadmin additionally sees the acting support users and the tombstone state.
|
|
20
|
+
export interface IProviderDocumentSuperadminView extends IProviderDocument {
|
|
21
|
+
uploadedByName: string | null
|
|
22
|
+
deletedAt: string | null
|
|
23
|
+
deletedByName: string | null
|
|
24
|
+
}
|