@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.99",
2
+ "version": "1.1.1",
3
3
  "name": "@fragus/sam-types",
4
4
  "description": "Typescript interfaces for all types used to communicate between SAM client(s) and the SAM API",
5
5
  "author": "Fragus",
package/types/index.d.ts CHANGED
@@ -217,3 +217,4 @@ export * from './pinLookup';
217
217
  export * from './ISendEmail';
218
218
  export * from './emailCampaign';
219
219
  export * from './contractProviderFlags';
220
+ export * from './providerDocument';
package/types/index.ts CHANGED
@@ -236,3 +236,4 @@ export * from './pinLookup'
236
236
  export * from './ISendEmail'
237
237
  export * from './emailCampaign'
238
238
  export * from './contractProviderFlags'
239
+ export * from './providerDocument'
@@ -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
+ }