@aptly-as/types 2.2.9 → 2.3.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/core/redirect.d.ts +5 -2
- package/core/redirect.js +3 -0
- package/core/scope.d.ts +3 -1
- package/core/scope.js +3 -1
- package/enums/index.d.ts +1 -0
- package/enums/index.js +1 -0
- package/models/app.d.ts +8 -1
- package/models/app.js +1 -0
- package/models/order.d.ts +25 -1
- package/models/order.js +7 -0
- package/models/project.d.ts +2 -0
- package/models/unit-template.d.ts +1 -0
- package/models/unit.d.ts +1 -0
- package/package.json +1 -1
package/core/redirect.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export declare enum AptlyRedirectAction {
|
|
2
|
-
Sign = "sign"
|
|
2
|
+
Sign = "sign",
|
|
3
|
+
Payment = "payment"
|
|
3
4
|
}
|
|
4
5
|
export declare enum AptlyRedirectActionError {
|
|
5
6
|
SignCancel = "signCancel",
|
|
6
|
-
SignError = "signError"
|
|
7
|
+
SignError = "signError",
|
|
8
|
+
Cancel = "cancel",
|
|
9
|
+
Error = "error"
|
|
7
10
|
}
|
|
8
11
|
export type AptlyRedirectOptions = {
|
|
9
12
|
action: AptlyRedirectAction;
|
package/core/redirect.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export var AptlyRedirectAction;
|
|
2
2
|
(function (AptlyRedirectAction) {
|
|
3
3
|
AptlyRedirectAction["Sign"] = "sign";
|
|
4
|
+
AptlyRedirectAction["Payment"] = "payment";
|
|
4
5
|
})(AptlyRedirectAction || (AptlyRedirectAction = {}));
|
|
5
6
|
export var AptlyRedirectActionError;
|
|
6
7
|
(function (AptlyRedirectActionError) {
|
|
7
8
|
AptlyRedirectActionError["SignCancel"] = "signCancel";
|
|
8
9
|
AptlyRedirectActionError["SignError"] = "signError";
|
|
10
|
+
AptlyRedirectActionError["Cancel"] = "cancel";
|
|
11
|
+
AptlyRedirectActionError["Error"] = "error";
|
|
9
12
|
})(AptlyRedirectActionError || (AptlyRedirectActionError = {}));
|
package/core/scope.d.ts
CHANGED
|
@@ -6,14 +6,15 @@ export declare enum AptlyModules {
|
|
|
6
6
|
Departments = "departments",
|
|
7
7
|
OptionLabels = "optionLabels",
|
|
8
8
|
Pages = "pages",
|
|
9
|
+
Payment = "payment",
|
|
9
10
|
ProductsExtended = "productsExtended",
|
|
10
11
|
Recommendations = "recommendations",
|
|
11
12
|
Subcontractor = "subcontractor",
|
|
12
|
-
ThirdParty = "thirdParty",
|
|
13
13
|
Sign = "sign",
|
|
14
14
|
Support = "support",
|
|
15
15
|
SupportComplaint = "supportComplaint",
|
|
16
16
|
Testing = "testing",
|
|
17
|
+
ThirdParty = "thirdParty",
|
|
17
18
|
UnitExtraOptions = "unitExtraOptions",
|
|
18
19
|
UnitExtraFields = "unitExtraFields"
|
|
19
20
|
}
|
|
@@ -41,6 +42,7 @@ export declare enum AptlyScopes {
|
|
|
41
42
|
OrganizationMembers = "organizationMembers",
|
|
42
43
|
OrganizationOptionLabels = "organizationOptionLabels",
|
|
43
44
|
OrganizationOrders = "organizationOrders",
|
|
45
|
+
OrganizationPayment = "organizationPayment",
|
|
44
46
|
OrganizationPages = "organizationPages",
|
|
45
47
|
OrganizationProducts = "organizationProducts",
|
|
46
48
|
OrganizationProductsExtended = "organizationProductsExtended",
|
package/core/scope.js
CHANGED
|
@@ -7,14 +7,15 @@ export var AptlyModules;
|
|
|
7
7
|
AptlyModules["Departments"] = "departments";
|
|
8
8
|
AptlyModules["OptionLabels"] = "optionLabels";
|
|
9
9
|
AptlyModules["Pages"] = "pages";
|
|
10
|
+
AptlyModules["Payment"] = "payment";
|
|
10
11
|
AptlyModules["ProductsExtended"] = "productsExtended";
|
|
11
12
|
AptlyModules["Recommendations"] = "recommendations";
|
|
12
13
|
AptlyModules["Subcontractor"] = "subcontractor";
|
|
13
|
-
AptlyModules["ThirdParty"] = "thirdParty";
|
|
14
14
|
AptlyModules["Sign"] = "sign";
|
|
15
15
|
AptlyModules["Support"] = "support";
|
|
16
16
|
AptlyModules["SupportComplaint"] = "supportComplaint";
|
|
17
17
|
AptlyModules["Testing"] = "testing";
|
|
18
|
+
AptlyModules["ThirdParty"] = "thirdParty";
|
|
18
19
|
AptlyModules["UnitExtraOptions"] = "unitExtraOptions";
|
|
19
20
|
AptlyModules["UnitExtraFields"] = "unitExtraFields";
|
|
20
21
|
})(AptlyModules || (AptlyModules = {}));
|
|
@@ -43,6 +44,7 @@ export var AptlyScopes;
|
|
|
43
44
|
AptlyScopes["OrganizationMembers"] = "organizationMembers";
|
|
44
45
|
AptlyScopes["OrganizationOptionLabels"] = "organizationOptionLabels";
|
|
45
46
|
AptlyScopes["OrganizationOrders"] = "organizationOrders";
|
|
47
|
+
AptlyScopes["OrganizationPayment"] = "organizationPayment";
|
|
46
48
|
AptlyScopes["OrganizationPages"] = "organizationPages";
|
|
47
49
|
AptlyScopes["OrganizationProducts"] = "organizationProducts";
|
|
48
50
|
AptlyScopes["OrganizationProductsExtended"] = "organizationProductsExtended";
|
package/enums/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare enum AptlyOrderStatus {
|
|
|
9
9
|
SignedByCustomer = "signedByCustomer",
|
|
10
10
|
SignedByOrganization = "signedByOrganization",
|
|
11
11
|
Signed = "signed",
|
|
12
|
+
Payment = "payment",
|
|
12
13
|
FileReceived = "fileReceived",
|
|
13
14
|
Completed = "completed",
|
|
14
15
|
AllPeriodsSigned = "allPeriodsSigned",
|
package/enums/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export var AptlyOrderStatus;
|
|
|
10
10
|
AptlyOrderStatus["SignedByCustomer"] = "signedByCustomer";
|
|
11
11
|
AptlyOrderStatus["SignedByOrganization"] = "signedByOrganization";
|
|
12
12
|
AptlyOrderStatus["Signed"] = "signed";
|
|
13
|
+
AptlyOrderStatus["Payment"] = "payment";
|
|
13
14
|
AptlyOrderStatus["FileReceived"] = "fileReceived";
|
|
14
15
|
AptlyOrderStatus["Completed"] = "completed";
|
|
15
16
|
AptlyOrderStatus["AllPeriodsSigned"] = "allPeriodsSigned";
|
package/models/app.d.ts
CHANGED
|
@@ -19,13 +19,20 @@ export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>
|
|
|
19
19
|
sign?: {
|
|
20
20
|
orderUrl: string;
|
|
21
21
|
};
|
|
22
|
+
payment?: {
|
|
23
|
+
orderUrl: string;
|
|
24
|
+
cancelUrl: string;
|
|
25
|
+
captureUrl: string;
|
|
26
|
+
voidUrl: string;
|
|
27
|
+
};
|
|
22
28
|
}
|
|
23
29
|
export interface AptlyAppSignMethod {
|
|
24
30
|
value: string;
|
|
25
31
|
label: string;
|
|
26
32
|
}
|
|
27
33
|
export declare enum AptlyAppImplementation {
|
|
28
|
-
Sign = "sign"
|
|
34
|
+
Sign = "sign",
|
|
35
|
+
Payment = "payment"
|
|
29
36
|
}
|
|
30
37
|
export declare enum AptlyAppImplementationSetting {
|
|
31
38
|
SignCostPer = "costPerSign",
|
package/models/app.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export var AptlyAppImplementation;
|
|
2
2
|
(function (AptlyAppImplementation) {
|
|
3
3
|
AptlyAppImplementation["Sign"] = "sign";
|
|
4
|
+
AptlyAppImplementation["Payment"] = "payment";
|
|
4
5
|
})(AptlyAppImplementation || (AptlyAppImplementation = {}));
|
|
5
6
|
export var AptlyAppImplementationSetting;
|
|
6
7
|
(function (AptlyAppImplementationSetting) {
|
package/models/order.d.ts
CHANGED
|
@@ -2,10 +2,16 @@ import { AptlyOrderStatus } from '../enums/index.js';
|
|
|
2
2
|
import { AptlyAppImplementationSetting, AptlyAppSchema } from './app.js';
|
|
3
3
|
import { AptlyDocumentSchema } from './document.js';
|
|
4
4
|
import { AptlyOrganizationAppConfigSchema, AptlyOrganizationSchema } from './organization.js';
|
|
5
|
+
import { AptlyProductSchema } from './product.js';
|
|
5
6
|
import { AptlyProject, AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js';
|
|
6
7
|
import { AptlyUnit, AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit.js';
|
|
7
8
|
import { AptlyBaseSchema } from './extends.js';
|
|
8
9
|
import { AptlyUser, AptlyUserSchema } from './user.js';
|
|
10
|
+
export declare enum AptlyOrderPaymentStatus {
|
|
11
|
+
Pending = "PENDING",
|
|
12
|
+
Authorized = "AUTHORIZED",
|
|
13
|
+
Captured = "CAPTURED"
|
|
14
|
+
}
|
|
9
15
|
export type AptlyOrder = AptlyOrderSchema<string, string>;
|
|
10
16
|
export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
11
17
|
orderNumber: string;
|
|
@@ -30,8 +36,24 @@ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DAT
|
|
|
30
36
|
user?: ID | AptlyUserSchema<ID, DATE>;
|
|
31
37
|
at?: DATE;
|
|
32
38
|
};
|
|
39
|
+
payment?: AptlyOrderPaymentSchema<DATE> | null;
|
|
33
40
|
created: DATE;
|
|
34
41
|
}
|
|
42
|
+
export type AptlyOrderPayment = AptlyOrderPaymentSchema<string>;
|
|
43
|
+
export interface AptlyOrderPaymentSchema<DATE> {
|
|
44
|
+
status: AptlyOrderPaymentStatus;
|
|
45
|
+
sessionId: string;
|
|
46
|
+
sessionAt: DATE | null;
|
|
47
|
+
url: string;
|
|
48
|
+
transactionId?: string;
|
|
49
|
+
transactionAt?: DATE;
|
|
50
|
+
captures: {
|
|
51
|
+
amount: number;
|
|
52
|
+
description?: string;
|
|
53
|
+
}[];
|
|
54
|
+
capturedAmount: number;
|
|
55
|
+
capturedAt?: DATE;
|
|
56
|
+
}
|
|
35
57
|
export type AptlyOrderSignee = AptlyOrderSigneeSchema<string, string>;
|
|
36
58
|
export interface AptlyOrderSigneeSchema<ID, DATE> {
|
|
37
59
|
_id: ID;
|
|
@@ -67,13 +89,14 @@ export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
|
|
|
67
89
|
export interface AptlyOrderItemSchema<ID, DATE> {
|
|
68
90
|
_id: ID;
|
|
69
91
|
text?: string;
|
|
70
|
-
product: ID
|
|
92
|
+
product: ID | AptlyProductSchema<ID, DATE>;
|
|
71
93
|
variant: ID;
|
|
72
94
|
producer: ID;
|
|
73
95
|
params: AptlyUnitItemParamSchema<ID, DATE>[];
|
|
74
96
|
quantity: number;
|
|
75
97
|
unitCost: number;
|
|
76
98
|
unitVat?: number;
|
|
99
|
+
vat?: number;
|
|
77
100
|
pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
|
|
78
101
|
}
|
|
79
102
|
export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
|
|
@@ -84,6 +107,7 @@ export interface AptlyOrderItemPricePipelineSchema<ID> {
|
|
|
84
107
|
}
|
|
85
108
|
export declare enum AptlyOrderAction {
|
|
86
109
|
Complete = "complete",
|
|
110
|
+
Payment = "payment",
|
|
87
111
|
SignManually = "sign-manually",
|
|
88
112
|
Sign = "sign"
|
|
89
113
|
}
|
package/models/order.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AptlyAppImplementationSetting } from './app.js';
|
|
2
|
+
export var AptlyOrderPaymentStatus;
|
|
3
|
+
(function (AptlyOrderPaymentStatus) {
|
|
4
|
+
AptlyOrderPaymentStatus["Pending"] = "PENDING";
|
|
5
|
+
AptlyOrderPaymentStatus["Authorized"] = "AUTHORIZED";
|
|
6
|
+
AptlyOrderPaymentStatus["Captured"] = "CAPTURED";
|
|
7
|
+
})(AptlyOrderPaymentStatus || (AptlyOrderPaymentStatus = {}));
|
|
2
8
|
export var AptlyOrderSigneeType;
|
|
3
9
|
(function (AptlyOrderSigneeType) {
|
|
4
10
|
AptlyOrderSigneeType[AptlyOrderSigneeType["Unit"] = 0] = "Unit";
|
|
@@ -7,6 +13,7 @@ export var AptlyOrderSigneeType;
|
|
|
7
13
|
export var AptlyOrderAction;
|
|
8
14
|
(function (AptlyOrderAction) {
|
|
9
15
|
AptlyOrderAction["Complete"] = "complete";
|
|
16
|
+
AptlyOrderAction["Payment"] = "payment";
|
|
10
17
|
AptlyOrderAction["SignManually"] = "sign-manually";
|
|
11
18
|
AptlyOrderAction["Sign"] = "sign";
|
|
12
19
|
})(AptlyOrderAction || (AptlyOrderAction = {}));
|
package/models/project.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AptlyProjectStatus } from '../enums/index.js';
|
|
2
2
|
import { AptlyAlgorithm, AptlyAlgorithmPipeline, AptlyAlgorithmPipelineSchema, AptlyAlgorithmSchema } from './algorithm.js';
|
|
3
|
+
import { AptlyAppSchema } from './app.js';
|
|
3
4
|
import { AptlyOrganizationSchema } from './organization.js';
|
|
4
5
|
import { AptlyModules } from '../core/index.js';
|
|
5
6
|
import { AptlyPeriod, AptlyPeriodSchema } from './period.js';
|
|
@@ -31,6 +32,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>,
|
|
|
31
32
|
developer?: string;
|
|
32
33
|
field?: string;
|
|
33
34
|
address?: AptlyAddress;
|
|
35
|
+
paymentApp?: ID | AptlyAppSchema<ID, DATE> | null;
|
|
34
36
|
created: DATE;
|
|
35
37
|
}
|
|
36
38
|
export type AptlyProjectPeriod = AptlyPeriod;
|
package/models/unit.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export interface AptlyUnitSelectedOptionSchema<ID, DATE> {
|
|
|
95
95
|
export type AptlyUnitOptionItem = AptlyUnitOptionItemSchema<string, string>;
|
|
96
96
|
export interface AptlyUnitOptionItemSchema<ID, DATE> extends AptlyUnitSelectedOptionSchema<ID, DATE> {
|
|
97
97
|
unitCost: number;
|
|
98
|
+
unitVat?: number;
|
|
98
99
|
pickRef?: ID;
|
|
99
100
|
}
|
|
100
101
|
export type AptlyUnitOptionExtraItem = AptlyUnitOptionExtraItemSchema<string, string>;
|