@aptly-as/types 3.13.0 → 3.14.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.
@@ -1,5 +1,6 @@
1
1
  export declare enum AptlyCounterModel {
2
2
  Offer = "offers",
3
+ Order = "orders",
3
4
  Payment = "payments"
4
5
  }
5
6
  export interface AptlyCounterSchema<ID, DATE> {
package/models/counter.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export var AptlyCounterModel;
2
2
  (function (AptlyCounterModel) {
3
3
  AptlyCounterModel["Offer"] = "offers";
4
+ AptlyCounterModel["Order"] = "orders";
4
5
  AptlyCounterModel["Payment"] = "payments";
5
6
  })(AptlyCounterModel || (AptlyCounterModel = {}));
package/models/item.d.ts CHANGED
@@ -21,7 +21,8 @@ export declare enum AptlyItemType {
21
21
  Resource = "resource",
22
22
  Material = "material",
23
23
  Category = "category",
24
- Package = "package"
24
+ Package = "package",
25
+ PackageEnd = "package-end"
25
26
  }
26
27
  export interface AptlyItemStandardIdentification {
27
28
  scheme: AptlyInternationalCodeDesignator;
package/models/item.js CHANGED
@@ -7,4 +7,5 @@ export var AptlyItemType;
7
7
  AptlyItemType["Material"] = "material";
8
8
  AptlyItemType["Category"] = "category";
9
9
  AptlyItemType["Package"] = "package";
10
+ AptlyItemType["PackageEnd"] = "package-end";
10
11
  })(AptlyItemType || (AptlyItemType = {}));
@@ -16,8 +16,8 @@ import { AptlyDatabase } from '../enums';
16
16
  import { AptlyWholesalerSchema } from './wholesaler.js';
17
17
  export type AptlyOption = AptlyOptionSchema<string, string>;
18
18
  export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
19
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
20
- project: ID | AptlyProjectSchema<ID, DATE>;
19
+ organization: ID | AptlyOrganizationSchema<ID, DATE> | null;
20
+ project: ID | AptlyProjectSchema<ID, DATE> | null;
21
21
  unit: ID | AptlyUnitSchema<ID, DATE> | null;
22
22
  product: ID | AptlyProductSchema<ID, DATE> | null;
23
23
  offer: ID | AptlyOfferSchema<ID, DATE> | null;
package/models/order.d.ts CHANGED
@@ -24,7 +24,8 @@ export declare enum AptlyOrderPaymentStatus {
24
24
  Expired = "EXPIRED"
25
25
  }
26
26
  export type AptlyOrder = AptlyOrderSchema<string, string>;
27
- export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
27
+ export interface AptlyOrderSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
28
+ number: number;
28
29
  orderNumber: string;
29
30
  invoiceNumber?: number;
30
31
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
@@ -53,7 +54,7 @@ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DAT
53
54
  shipping?: AptlyAddress;
54
55
  billing?: AptlyAddress;
55
56
  pricePipeline: AptlyOrderPricePipelineItemSchema<ID>[];
56
- signees?: AptlyOrderSigneeSchema<ID, DATE>[];
57
+ signees: AptlyOrderSigneeSchema<ID, DATE>[];
57
58
  emailText?: string;
58
59
  approved?: {
59
60
  action?: AptlyOrderAction;
@@ -61,7 +62,7 @@ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DAT
61
62
  at?: DATE;
62
63
  };
63
64
  paymentSession?: AptlyOrderPaymentSessionSchema<ID, DATE> | null;
64
- payment?: ID | AptlyPaymentSchema<ID, DATE>;
65
+ payment?: ID | AptlyPaymentSchema<ID, DATE> | null;
65
66
  shippingDate?: DATE;
66
67
  shippingDescription?: string;
67
68
  signedAt?: DATE | null;
@@ -19,7 +19,7 @@ export type AptlyOrganizationContentSchema<ID, DATE> = Pick<AptlyOrganizationSch
19
19
  export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
20
20
  export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
21
21
  slug: string;
22
- number?: string;
22
+ number: string;
23
23
  vat?: string;
24
24
  logo?: string | null;
25
25
  logoMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
package/models/pick.d.ts CHANGED
@@ -35,7 +35,7 @@ export interface AptlyPickSchema<ID, DATE> extends Pick<AptlyBaseSchema<ID, DATE
35
35
  price: AptlyPrice | null;
36
36
  algorithm: ID | null;
37
37
  documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
38
- pipeline: AptlyAlgorithmPipelineDataItemSchema<ID>[];
38
+ pipeline?: AptlyAlgorithmPipelineDataItemSchema<ID>[];
39
39
  confirmedAt: DATE | null;
40
40
  }
41
41
  export type AptlyPickConfirmed = AptlyPickConfirmedSchema<string, string>;
@@ -6,8 +6,8 @@ import { AptlyProducerSchema } from './producer.js';
6
6
  import { AptlyDatabase, AptlyQuantityUnitCode } from '../enums/index.js';
7
7
  export type AptlyProduct = AptlyProductSchema<string, string>;
8
8
  export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
9
- organization?: ID;
10
- project?: ID;
9
+ organization?: ID | null;
10
+ project?: ID | null;
11
11
  extends?: ID | AptlyProductSchema<ID, DATE>;
12
12
  status: AptlyProductStatus;
13
13
  database: AptlyDatabase;
@@ -43,7 +43,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>,
43
43
  paymentApp?: ID | AptlyAppSchema<ID, DATE> | null;
44
44
  invites?: AptlyProjectInviteSchema<ID, DATE>[];
45
45
  signApp?: ID | AptlyAppSchema<ID, DATE> | null;
46
- signMembers?: (ID | AptlyUserSchema<ID, DATE>)[];
46
+ signMembers: (ID | AptlyUserSchema<ID, DATE>)[];
47
47
  scope?: AptlyScopeSchema;
48
48
  created: DATE;
49
49
  }
@@ -16,7 +16,7 @@ export interface AptlyUnitEmailSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
16
16
  references: string;
17
17
  inReplyTo: string[];
18
18
  hasSendError: boolean;
19
- sendErrors?: AptlyUnitEmailSendErrorSchema<ID, DATE>[];
19
+ sendErrors: AptlyUnitEmailSendErrorSchema<ID, DATE>[];
20
20
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
21
21
  project: ID | AptlyProjectSchema<ID, DATE>;
22
22
  unit: ID | AptlyUnitSchema<ID, DATE>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -10,10 +10,10 @@
10
10
  "devDependencies": {
11
11
  "@aws-sdk/client-s3": "^3.598.0",
12
12
  "cloudinary": "^1.41.3",
13
- "husky": "^9.0.11",
14
- "lint-staged": "^15.2.7",
15
- "prettier": "^3.3.2",
16
- "typescript": "^5.4.5"
13
+ "husky": "^9.1.7",
14
+ "lint-staged": "^16.3.3",
15
+ "prettier": "^3.8.1",
16
+ "typescript": "^5.9.3"
17
17
  },
18
18
  "repository": {
19
19
  "type": "git",