@aptly-as/types 3.6.0 → 3.6.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.
@@ -2,13 +2,14 @@ import type { CompleteMultipartUploadOutput } from '@aws-sdk/client-s3';
2
2
  import { AptlyDocumentAccess, AptlyDocumentType } from '../enums/index.js';
3
3
  import { AptlyBaseSchema, AptlyDBCrawlerCleaner } from './extends.js';
4
4
  import { AptlyProductSchema } from './product.js';
5
+ import { AptlyOrganizationSchema } from './organization';
5
6
  export type AptlyDocument = AptlyDocumentSchema<string, string>;
6
7
  export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'>, AptlyDBCrawlerCleaner {
7
8
  mime: string;
8
9
  access?: AptlyDocumentAccess;
9
10
  _type: AptlyDocumentType;
10
11
  data: string;
11
- organization: ID | null;
12
+ organization: ID | AptlyOrganizationSchema<ID, DATE> | null;
12
13
  project: ID | null;
13
14
  unit: ID | null;
14
15
  offer: ID | null;
@@ -23,12 +24,24 @@ export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
23
24
  uploadSignature?: string;
24
25
  boligmappaStatus?: AptlyDocumentSchemaBoligmappaStatusSchema<ID>[];
25
26
  chunks?: (AptlyDocumentSchema<ID, DATE> | ID)[];
26
- s3?: AptlyDocumentS3;
27
+ s3: AptlyDocumentS3;
28
+ previews: AptlyDocumentPreviewSchema<ID, DATE>[];
27
29
  isPasswordProtected?: boolean;
28
30
  expires?: DATE | null;
29
31
  downloadToken?: string;
32
+ previewUrl?: string;
30
33
  created: DATE;
31
34
  }
35
+ export interface AptlyDocumentPreviewSchema<ID, DATE> {
36
+ _id: ID;
37
+ contentType: string;
38
+ name: string;
39
+ height: number;
40
+ width: number;
41
+ size: number;
42
+ s3: AptlyDocumentS3;
43
+ createdAt: DATE;
44
+ }
32
45
  export type AptlyDocumentS3 = Pick<CompleteMultipartUploadOutput, 'Bucket' | 'Key' | 'Location' | 'ETag' | 'Expiration'>;
33
46
  export type AptlyDocumentSchemaBoligmappaStatus = AptlyDocumentSchemaBoligmappaStatusSchema<string>;
34
47
  export interface AptlyDocumentSchemaBoligmappaStatusSchema<ID> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",