@aptly-as/types 3.6.0 → 3.6.2

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/models/offer.d.ts CHANGED
@@ -11,6 +11,7 @@ import { AptlyPickSchema } from './pick.js';
11
11
  import { AptlyProjectSchema } from './project.js';
12
12
  import { AptlyUnitSchema } from './unit.js';
13
13
  import { AptlyUserSchema } from './user.js';
14
+ import { AptlyCategorySchema } from './category';
14
15
  export type AptlyOffer = AptlyOfferSchema<string, string>;
15
16
  export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, Omit<AptlyExtensionAmount, 'currency'> {
16
17
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
@@ -18,6 +19,7 @@ export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, O
18
19
  unit: ID | AptlyUnitSchema<ID, DATE> | null;
19
20
  order: ID | AptlyOrderSchema<ID, DATE> | null;
20
21
  document: ID | AptlyDocumentSchema<ID, DATE> | null;
22
+ categories: (ID | AptlyCategorySchema<ID, DATE>)[];
21
23
  createdBy: Populated<AptlyUserSchema<ID, DATE>> | null;
22
24
  expiresAt: DATE | null;
23
25
  sentAt: DATE | null;
@@ -20,6 +20,8 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
20
20
  product: ID | AptlyProductSchema<ID, DATE> | null;
21
21
  producer: ID | AptlyProducerSchema<ID, DATE> | null;
22
22
  offer: ID | AptlyOfferSchema<ID, DATE> | null;
23
+ category: ID | AptlyCategorySchema<ID, DATE> | null;
24
+ partOfCategory: ID | AptlyCategorySchema<ID, DATE> | null;
23
25
  option: ID | AptlyOptionSchema<ID, DATE> | null;
24
26
  offerItem: ID | null;
25
27
  period: ID | AptlyPeriodSchema<ID, DATE> | null;
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.2",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",