@aptly-as/types 3.10.1 → 3.10.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.
package/core/job.d.ts CHANGED
@@ -3,7 +3,8 @@ export declare enum AptlyJobQueue {
3
3
  Documents = "documents",
4
4
  Orders = "orders",
5
5
  Units = "units",
6
- Inquiries = "inquiries"
6
+ Inquiries = "inquiries",
7
+ PriceFiles = "price-files"
7
8
  }
8
9
  export declare enum AptlyJobName {
9
10
  ZipDocuments = "zip-documents",
package/core/job.js CHANGED
@@ -4,6 +4,7 @@ export var AptlyJobQueue;
4
4
  AptlyJobQueue["Orders"] = "orders";
5
5
  AptlyJobQueue["Units"] = "units";
6
6
  AptlyJobQueue["Inquiries"] = "inquiries";
7
+ AptlyJobQueue["PriceFiles"] = "price-files";
7
8
  })(AptlyJobQueue || (AptlyJobQueue = {}));
8
9
  export var AptlyJobName;
9
10
  (function (AptlyJobName) {
package/core/scope.d.ts CHANGED
@@ -12,6 +12,7 @@ export declare enum AptlyModules {
12
12
  OptionLabels = "optionLabels",
13
13
  Pages = "pages",
14
14
  Payment = "payment",
15
+ Prices = "prices",
15
16
  Projects = "projects",
16
17
  ProjectProducts = "projectProducts",
17
18
  ProductsExtended = "productsExtended",
@@ -60,6 +61,7 @@ export declare enum AptlyScopes {
60
61
  OrganizationOrders = "organizationOrders",
61
62
  OrganizationPayment = "organizationPayment",
62
63
  OrganizationPages = "organizationPages",
64
+ OrganizationPrices = "organizationPrices",
63
65
  OrganizationProjects = "organizationProjects",
64
66
  OrganizationProducts = "organizationProducts",
65
67
  OrganizationProductsExtended = "organizationProductsExtended",
package/core/scope.js CHANGED
@@ -13,6 +13,7 @@ export var AptlyModules;
13
13
  AptlyModules["OptionLabels"] = "optionLabels";
14
14
  AptlyModules["Pages"] = "pages";
15
15
  AptlyModules["Payment"] = "payment";
16
+ AptlyModules["Prices"] = "prices";
16
17
  AptlyModules["Projects"] = "projects";
17
18
  AptlyModules["ProjectProducts"] = "projectProducts";
18
19
  AptlyModules["ProductsExtended"] = "productsExtended";
@@ -62,6 +63,7 @@ export var AptlyScopes;
62
63
  AptlyScopes["OrganizationOrders"] = "organizationOrders";
63
64
  AptlyScopes["OrganizationPayment"] = "organizationPayment";
64
65
  AptlyScopes["OrganizationPages"] = "organizationPages";
66
+ AptlyScopes["OrganizationPrices"] = "organizationPrices";
65
67
  AptlyScopes["OrganizationProjects"] = "organizationProjects";
66
68
  AptlyScopes["OrganizationProducts"] = "organizationProducts";
67
69
  AptlyScopes["OrganizationProductsExtended"] = "organizationProductsExtended";
@@ -13,6 +13,7 @@ import { AptlyCategorySchema } from './category.js';
13
13
  import { AptlyUnitSchema } from './unit.js';
14
14
  import { AptlyDocumentSchema } from './document';
15
15
  import { AptlyDatabase } from '../enums';
16
+ import { AptlyWholesalerSchema } from './wholesaler.js';
16
17
  export type AptlyOption = AptlyOptionSchema<string, string>;
17
18
  export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
18
19
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
@@ -45,6 +46,7 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
45
46
  quantityUnitCode: AptlyQuantityUnitCode;
46
47
  quantityCategory: ID | AptlyCategorySchema<ID, DATE> | null;
47
48
  quantityCategoryKey?: string;
49
+ wholesaler: ID | AptlyWholesalerSchema<ID, DATE> | null;
48
50
  amount: number;
49
51
  amountCategory: ID | AptlyCategorySchema<ID, DATE> | null;
50
52
  amountCategoryKey?: string;
@@ -62,7 +64,8 @@ export declare enum AptlyOptionIdentificationSource {
62
64
  export type AptlyOptionLine = AptlyOptionLineSchema<string, string>;
63
65
  export interface AptlyOptionLineSchema<ID, DATE> {
64
66
  _id: ID;
65
- option: ID | AptlyOptionSchema<ID, DATE>;
67
+ option: ID | AptlyOptionSchema<ID, DATE> | null;
68
+ product: ID | AptlyProductSchema<ID, DATE> | null;
66
69
  quantity: number;
67
70
  }
68
71
  export type AptlyOptionPopulated = AptlyOptionPopulatedSchema<string, string>;
@@ -15,4 +15,5 @@ export interface AptlyPriceFileSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE
15
15
  format: AptlyPriceFileFormat;
16
16
  status: AptlyPriceFileStatus;
17
17
  document: ID | AptlyDocumentSchema<ID, DATE>;
18
+ algorithm: ID | null;
18
19
  }
package/models/price.d.ts CHANGED
@@ -3,11 +3,18 @@ import { AptlyDatabase } from '../enums';
3
3
  export type AptlyPriceRow = AptlyPriceSchema<string, string>;
4
4
  export interface AptlyPriceSchema<ID, DATE> extends Pick<AptlyBaseSchema<ID, DATE>, '_id' | 'createdAt' | 'updatedAt'> {
5
5
  _id: ID;
6
- organization: null;
6
+ organization: ID | null;
7
+ product: ID | null;
7
8
  wholesaler: ID;
8
9
  database: AptlyDatabase;
9
10
  identification: string;
10
11
  amount: number;
12
+ algorithm: ID | null;
11
13
  updatedAt: DATE;
12
14
  createdAt: DATE;
13
15
  }
16
+ export interface AptlyPriceImport {
17
+ wholesaler: string;
18
+ database: AptlyDatabase;
19
+ action: 'add' | 'edit';
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",