jmapcloud-types 0.0.1 → 2.0.23-qa.10

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/das.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { components } from "./generated/das-generated"
2
+
1
3
  export interface JAttributeStatistics {
2
4
  id: string
3
5
  name: string
@@ -9,3 +11,43 @@ export interface JAttributeStatistics {
9
11
  }
10
12
 
11
13
  export type JUniqueValue = string | number | null
14
+
15
+ export type ExportFile = Omit<components["schemas"]["ExportFileDTO"], "creationDate"> & { creationDate: Date }
16
+
17
+ export type ExportFormat = "GeoJSON" | "GPKG" | "CSV"
18
+
19
+ export interface AttachmentBaseDTO {
20
+ id: string
21
+ organizationId: string
22
+ dataSourceId: string
23
+ subject?: string
24
+ description?: string
25
+ thumbnail: string
26
+ }
27
+
28
+ export interface AttachmentFileDTO extends AttachmentBaseDTO {
29
+ fileName: string
30
+ fileSize: number
31
+ fileId: string
32
+ mimeType: string
33
+ }
34
+
35
+ export interface AttachmentUrlDTO extends AttachmentBaseDTO {
36
+ url: string
37
+ }
38
+
39
+ export type AttachmentDTO = AttachmentFileDTO | AttachmentUrlDTO
40
+
41
+ export type CreateAttachmentUrlParams = {
42
+ itemId: number
43
+ } & Pick<AttachmentUrlDTO, "subject" | "description" | "url">
44
+
45
+ export type CreateAttachmentFileParams = {
46
+ itemId: number
47
+ } & Pick<AttachmentFileDTO, "subject" | "description"> & {
48
+ file: File
49
+ }
50
+
51
+ export type CreateAttachmentParams = CreateAttachmentFileParams | CreateAttachmentUrlParams
52
+
53
+ export type UpdateAttachmentParams = Partial<Pick<AttachmentUrlDTO, "subject" | "description" | "url"> | Pick<AttachmentFileDTO, "subject" | "description">>