@aptly-as/types 3.0.0 → 3.0.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/api.d.ts +1 -0
- package/core/scope.d.ts +2 -0
- package/core/scope.js +2 -0
- package/enums/index.d.ts +1 -1
- package/enums/index.js +1 -1
- package/models/algorithm.d.ts +5 -1
- package/models/algorithm.js +1 -0
- package/models/offer.d.ts +2 -4
- package/models/option.d.ts +2 -3
- package/package.json +1 -1
package/core/api.d.ts
CHANGED
package/core/scope.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare enum AptlyModules {
|
|
|
10
10
|
OptionLabels = "optionLabels",
|
|
11
11
|
Pages = "pages",
|
|
12
12
|
Payment = "payment",
|
|
13
|
+
ProjectProducts = "projectProducts",
|
|
13
14
|
ProductsExtended = "productsExtended",
|
|
14
15
|
Recommendations = "recommendations",
|
|
15
16
|
Signing = "signing",
|
|
@@ -17,6 +18,7 @@ export declare enum AptlyModules {
|
|
|
17
18
|
SupportComplaint = "supportComplaint",
|
|
18
19
|
Testing = "testing",
|
|
19
20
|
ThirdParty = "thirdParty",
|
|
21
|
+
UnitTemplates = "unitTemplates",
|
|
20
22
|
UnitExtraOptions = "unitExtraOptions",
|
|
21
23
|
UnitExtraFields = "unitExtraFields"
|
|
22
24
|
}
|
package/core/scope.js
CHANGED
|
@@ -11,6 +11,7 @@ export var AptlyModules;
|
|
|
11
11
|
AptlyModules["OptionLabels"] = "optionLabels";
|
|
12
12
|
AptlyModules["Pages"] = "pages";
|
|
13
13
|
AptlyModules["Payment"] = "payment";
|
|
14
|
+
AptlyModules["ProjectProducts"] = "projectProducts";
|
|
14
15
|
AptlyModules["ProductsExtended"] = "productsExtended";
|
|
15
16
|
AptlyModules["Recommendations"] = "recommendations";
|
|
16
17
|
AptlyModules["Signing"] = "signing";
|
|
@@ -18,6 +19,7 @@ export var AptlyModules;
|
|
|
18
19
|
AptlyModules["SupportComplaint"] = "supportComplaint";
|
|
19
20
|
AptlyModules["Testing"] = "testing";
|
|
20
21
|
AptlyModules["ThirdParty"] = "thirdParty";
|
|
22
|
+
AptlyModules["UnitTemplates"] = "unitTemplates";
|
|
21
23
|
AptlyModules["UnitExtraOptions"] = "unitExtraOptions";
|
|
22
24
|
AptlyModules["UnitExtraFields"] = "unitExtraFields";
|
|
23
25
|
})(AptlyModules || (AptlyModules = {}));
|
package/enums/index.d.ts
CHANGED
|
@@ -142,8 +142,8 @@ export declare enum AptlyEmailType {
|
|
|
142
142
|
OrderPay = "order-pay",
|
|
143
143
|
OrderPayNotify = "order-pay-notify",
|
|
144
144
|
OrderPayFailed = "order-pay-failed",
|
|
145
|
-
OrderPayDeliver = "order-pay-deliver",
|
|
146
145
|
OrderPayDelivery = "order-pay-delivery",
|
|
146
|
+
OrderPayDeliver = "order-pay-deliver",
|
|
147
147
|
OrderPayed = "order-payed",
|
|
148
148
|
OrderReceipt = "order-receipt",
|
|
149
149
|
OrderCompleted = "order-completed",
|
package/enums/index.js
CHANGED
|
@@ -161,8 +161,8 @@ export var AptlyEmailType;
|
|
|
161
161
|
AptlyEmailType["OrderPay"] = "order-pay";
|
|
162
162
|
AptlyEmailType["OrderPayNotify"] = "order-pay-notify";
|
|
163
163
|
AptlyEmailType["OrderPayFailed"] = "order-pay-failed";
|
|
164
|
-
AptlyEmailType["OrderPayDeliver"] = "order-pay-deliver";
|
|
165
164
|
AptlyEmailType["OrderPayDelivery"] = "order-pay-delivery";
|
|
165
|
+
AptlyEmailType["OrderPayDeliver"] = "order-pay-deliver";
|
|
166
166
|
AptlyEmailType["OrderPayed"] = "order-payed";
|
|
167
167
|
AptlyEmailType["OrderReceipt"] = "order-receipt";
|
|
168
168
|
AptlyEmailType["OrderCompleted"] = "order-completed";
|
package/models/algorithm.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export declare enum AptlyAlgorithmPipelineOperation {
|
|
|
6
6
|
Multiply = "multiply",
|
|
7
7
|
Percent = "percent",
|
|
8
8
|
Fee = "fee",
|
|
9
|
-
Vat = "vat"
|
|
9
|
+
Vat = "vat",
|
|
10
|
+
Allowance = "allowance"
|
|
10
11
|
}
|
|
11
12
|
export declare enum AptlyAlgorithmPipelineApplyTo {
|
|
12
13
|
Root = "root",
|
|
@@ -17,6 +18,9 @@ export type AptlyAlgorithm = AptlyAlgorithmSchema<string>;
|
|
|
17
18
|
export interface AptlyAlgorithmSchema<ID> {
|
|
18
19
|
_id: ID;
|
|
19
20
|
name: string;
|
|
21
|
+
currency?: AptlyCurrency;
|
|
22
|
+
vatCategory?: AptlyVatCategoryCode;
|
|
23
|
+
taxScheme?: AptlyTaxCategoryScheme;
|
|
20
24
|
pipeline: AptlyAlgorithmPipelineSchema<ID>[];
|
|
21
25
|
reversed?: boolean;
|
|
22
26
|
vat?: number;
|
package/models/algorithm.js
CHANGED
|
@@ -7,6 +7,7 @@ export var AptlyAlgorithmPipelineOperation;
|
|
|
7
7
|
AptlyAlgorithmPipelineOperation["Percent"] = "percent";
|
|
8
8
|
AptlyAlgorithmPipelineOperation["Fee"] = "fee";
|
|
9
9
|
AptlyAlgorithmPipelineOperation["Vat"] = "vat";
|
|
10
|
+
AptlyAlgorithmPipelineOperation["Allowance"] = "allowance";
|
|
10
11
|
})(AptlyAlgorithmPipelineOperation || (AptlyAlgorithmPipelineOperation = {}));
|
|
11
12
|
export var AptlyAlgorithmPipelineApplyTo;
|
|
12
13
|
(function (AptlyAlgorithmPipelineApplyTo) {
|
package/models/offer.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AptlyCurrency, AptlyVatCategoryCode } from '../enums/index.js';
|
|
2
1
|
import { AptlyAddress, AptlySearchAddress } from './address.js';
|
|
3
2
|
import { AptlyExtensionAmount } from './algorithm.js';
|
|
4
3
|
import { AptlyCustomer, AptlyCustomerSchema } from './customer.js';
|
|
@@ -12,7 +11,7 @@ import { AptlyProjectSchema } from './project.js';
|
|
|
12
11
|
import { AptlyUnitSchema } from './unit.js';
|
|
13
12
|
import { AptlyUserSchema } from './user.js';
|
|
14
13
|
export type AptlyOffer = AptlyOfferSchema<string, string>;
|
|
15
|
-
export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyExtensionAmount {
|
|
14
|
+
export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, Omit<AptlyExtensionAmount, 'currency'> {
|
|
16
15
|
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
17
16
|
project: ID | AptlyProjectSchema<ID, DATE>;
|
|
18
17
|
unit: ID | AptlyUnitSchema<ID, DATE> | null;
|
|
@@ -25,8 +24,6 @@ export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, A
|
|
|
25
24
|
identification?: string;
|
|
26
25
|
amount?: number;
|
|
27
26
|
algorithm: ID | null;
|
|
28
|
-
currency: AptlyCurrency;
|
|
29
|
-
vatCategory: AptlyVatCategoryCode;
|
|
30
27
|
items: AptlyOfferItemSchema<ID, DATE>[];
|
|
31
28
|
customer: AptlyCustomerSchema<ID, DATE> | null;
|
|
32
29
|
shipping: AptlyAddress | null;
|
|
@@ -41,6 +38,7 @@ export interface AptlyOfferItemSchema<ID, DATE> {
|
|
|
41
38
|
quantity: number;
|
|
42
39
|
amount: number;
|
|
43
40
|
algorithm: ID | null;
|
|
41
|
+
note: string;
|
|
44
42
|
createdAt?: DATE;
|
|
45
43
|
}
|
|
46
44
|
export type AptlyUserOffer = AptlyUserOfferSchema<string, string>;
|
package/models/option.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AptlyQuantityUnitCode } from '../enums/index.js';
|
|
2
2
|
import { AptlyAllowanceChargeSchema, AptlyAllowance, AptlyExtensionAmount, AptlyPrice } from './algorithm.js';
|
|
3
3
|
import { AptlyBaseSchema } from './extends.js';
|
|
4
4
|
import { AptlyItem, AptlyItemType } from './item.js';
|
|
@@ -26,14 +26,13 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
26
26
|
title: string;
|
|
27
27
|
description: string;
|
|
28
28
|
identification: string;
|
|
29
|
+
note: string;
|
|
29
30
|
type: AptlyItemType;
|
|
30
31
|
quantity?: number;
|
|
31
32
|
quantityUnitCode: AptlyQuantityUnitCode;
|
|
32
33
|
quantityCategory: ID | AptlyCategorySchema<ID, DATE> | null;
|
|
33
34
|
quantityCategoryKey?: string;
|
|
34
35
|
amount: number;
|
|
35
|
-
currency: AptlyCurrency;
|
|
36
|
-
vatCategory: AptlyVatCategoryCode;
|
|
37
36
|
amountCategory: ID | AptlyCategorySchema<ID, DATE> | null;
|
|
38
37
|
amountCategoryKey?: string;
|
|
39
38
|
allowance?: AptlyAllowance;
|