@aptly-as/types 3.8.1 → 3.8.3

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/enums/index.d.ts CHANGED
@@ -168,3 +168,9 @@ export declare enum AptlySlugLevel {
168
168
  Project = 4,
169
169
  Unit = 5
170
170
  }
171
+ export declare enum AptlyDatabase {
172
+ Unknown = "",
173
+ EFO = "efo",
174
+ NRF = "nrf",
175
+ NOBB = "nobb"
176
+ }
package/enums/index.js CHANGED
@@ -188,3 +188,10 @@ export var AptlySlugLevel;
188
188
  AptlySlugLevel[AptlySlugLevel["Project"] = 4] = "Project";
189
189
  AptlySlugLevel[AptlySlugLevel["Unit"] = 5] = "Unit";
190
190
  })(AptlySlugLevel || (AptlySlugLevel = {}));
191
+ export var AptlyDatabase;
192
+ (function (AptlyDatabase) {
193
+ AptlyDatabase["Unknown"] = "";
194
+ AptlyDatabase["EFO"] = "efo";
195
+ AptlyDatabase["NRF"] = "nrf";
196
+ AptlyDatabase["NOBB"] = "nobb";
197
+ })(AptlyDatabase || (AptlyDatabase = {}));
@@ -3,20 +3,19 @@ import { AptlyBaseSchema, AptlyDBCrawlerCleaner, AptlyHistorySchema } from './ex
3
3
  import { AptlyMediaSrcSchema } from './media.js';
4
4
  import { AptlyProducerSchema } from './producer.js';
5
5
  import { AptlyTagSchema } from './tag.js';
6
+ import { AptlyDatabase } from '../enums/index.js';
6
7
  export type AptlyProduct = AptlyProductSchema<string, string>;
7
8
  export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
8
- searchableName: string;
9
9
  organization?: ID;
10
10
  project?: ID;
11
- base?: boolean;
12
11
  extends?: ID | AptlyProductSchema<ID, DATE>;
12
+ database: AptlyDatabase;
13
13
  productNumber: string;
14
14
  itemNumber?: string;
15
- eanNumber?: string;
16
15
  gtin?: string;
17
16
  description: string;
17
+ technicalDescription: string;
18
18
  images: AptlyProductImageSchema<ID, DATE>[];
19
- variants: AptlyProductVariantSchema<ID, DATE>[];
20
19
  products?: (ID | AptlyProductSchema<ID, DATE>)[];
21
20
  url?: string;
22
21
  color?: string;
@@ -33,18 +32,14 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
33
32
  unitCost?: number;
34
33
  netCost?: number;
35
34
  producer?: ID | AptlyProducerSchema<ID, DATE> | null;
36
- supplier?: ID;
35
+ producerName: string;
37
36
  tags: (ID | AptlyTagSchema<ID, DATE>)[];
38
37
  documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
39
38
  createdBy: ID;
40
- stats?: any;
41
39
  importID?: ID;
42
40
  source?: string;
43
41
  title?: string;
44
- likes: {
45
- user: ID;
46
- date: DATE;
47
- }[];
42
+ variants: AptlyProductVariantSchema<ID, DATE>[];
48
43
  created: DATE;
49
44
  }
50
45
  export type AptlyProductImage = AptlyProductImageSchema<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.8.1",
3
+ "version": "3.8.3",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",