@aptly-as/types 3.8.6 → 3.9.0

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
@@ -172,5 +172,6 @@ export declare enum AptlyDatabase {
172
172
  Unknown = "",
173
173
  EFO = "efo",
174
174
  NRF = "nrf",
175
- NOBB = "nobb"
175
+ NOBB = "nobb",
176
+ Aptly = "aptly"
176
177
  }
package/enums/index.js CHANGED
@@ -194,4 +194,5 @@ export var AptlyDatabase;
194
194
  AptlyDatabase["EFO"] = "efo";
195
195
  AptlyDatabase["NRF"] = "nrf";
196
196
  AptlyDatabase["NOBB"] = "nobb";
197
+ AptlyDatabase["Aptly"] = "aptly";
197
198
  })(AptlyDatabase || (AptlyDatabase = {}));
package/models/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export * from './period.js';
29
29
  export * from './pick.js';
30
30
  export * from './plan.js';
31
31
  export * from './plan-payment.js';
32
+ export * from './price.js';
32
33
  export * from './price-file.js';
33
34
  export * from './producer.js';
34
35
  export * from './product.js';
package/models/index.js CHANGED
@@ -29,6 +29,7 @@ export * from './period.js';
29
29
  export * from './pick.js';
30
30
  export * from './plan.js';
31
31
  export * from './plan-payment.js';
32
+ export * from './price.js';
32
33
  export * from './price-file.js';
33
34
  export * from './producer.js';
34
35
  export * from './product.js';
@@ -12,15 +12,13 @@ import { AptlyProjectSchema } from './project.js';
12
12
  import { AptlyCategorySchema } from './category.js';
13
13
  import { AptlyUnitSchema } from './unit.js';
14
14
  import { AptlyDocumentSchema } from './document';
15
- import { AptlyWholesalerSchema } from './wholesaler';
15
+ import { AptlyDatabase } from '../enums';
16
16
  export type AptlyOption = AptlyOptionSchema<string, string>;
17
17
  export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
18
18
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
19
19
  project: ID | AptlyProjectSchema<ID, DATE>;
20
20
  unit: ID | AptlyUnitSchema<ID, DATE> | null;
21
- wholesaler: ID | AptlyWholesalerSchema<ID, DATE> | null;
22
21
  product: ID | AptlyProductSchema<ID, DATE> | null;
23
- producer: ID | AptlyProducerSchema<ID, DATE> | null;
24
22
  offer: ID | AptlyOfferSchema<ID, DATE> | null;
25
23
  category: ID | null;
26
24
  option: ID | AptlyOptionSchema<ID, DATE> | null;
@@ -31,13 +29,18 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
31
29
  variants: (ID | AptlyOptionSchema<ID, DATE>)[];
32
30
  lines: AptlyOptionLineSchema<ID, DATE>[];
33
31
  documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
32
+ producer: ID | AptlyProducerSchema<ID, DATE> | null;
33
+ producerName: string;
34
+ tags: string[];
34
35
  title: string;
35
36
  description: string;
36
- identificationSource: AptlyOptionIdentificationSource;
37
+ database: AptlyDatabase;
37
38
  identification: string;
39
+ gtin: string;
38
40
  note: string;
39
41
  index: number;
40
42
  type: AptlyItemType;
43
+ baseQuantity?: number;
41
44
  quantity?: number;
42
45
  quantityUnitCode: AptlyQuantityUnitCode;
43
46
  quantityCategory: ID | AptlyCategorySchema<ID, DATE> | null;
@@ -47,6 +47,7 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
47
47
  installedModules: AptlyModuleItemSchema<ID, DATE>[];
48
48
  status?: AptlyOrganizationStatus;
49
49
  type?: AptlyOrganizationType[];
50
+ algorithm: ID | null;
50
51
  paymentApp?: ID | AptlyAppSchema<ID, DATE> | null;
51
52
  signApp?: ID | AptlyAppSchema<ID, DATE> | null;
52
53
  signMembers?: (ID | AptlyUserSchema<ID, DATE>)[];
@@ -0,0 +1,13 @@
1
+ import { AptlyBaseSchema } from './extends';
2
+ import { AptlyDatabase } from '../enums';
3
+ export type AptlyPriceRow = AptlyPriceSchema<string, string>;
4
+ export interface AptlyPriceSchema<ID, DATE> extends Pick<AptlyBaseSchema<ID, DATE>, '_id' | 'createdAt' | 'updatedAt'> {
5
+ _id: ID;
6
+ organization: null;
7
+ wholesaler: ID;
8
+ database: AptlyDatabase;
9
+ identification: string;
10
+ amount: number;
11
+ updatedAt: DATE;
12
+ createdAt: DATE;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.8.6",
3
+ "version": "3.9.0",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",