@aptly-as/types 3.7.4 → 3.8.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/scope.d.ts +1 -0
- package/core/scope.js +1 -0
- package/enums/document.d.ts +1 -0
- package/enums/document.js +1 -0
- package/models/document.d.ts +0 -2
- package/models/index.d.ts +2 -0
- package/models/index.js +2 -0
- package/models/offer.d.ts +13 -0
- package/models/option.d.ts +10 -0
- package/models/option.js +8 -1
- package/models/payment.d.ts +0 -1
- package/models/price-file.d.ts +18 -0
- package/models/price-file.js +10 -0
- package/models/wholesaler.d.ts +4 -0
- package/models/wholesaler.js +1 -0
- package/package.json +1 -1
package/core/scope.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare enum AptlyScopes {
|
|
|
42
42
|
AdminTesting = "adminTesting",
|
|
43
43
|
AdminUsers = "adminUsers",
|
|
44
44
|
AdminOrganizations = "adminOrganizations",
|
|
45
|
+
AdminWholesalers = "adminWholesalers",
|
|
45
46
|
Beta = "beta",
|
|
46
47
|
Organization = "organization",
|
|
47
48
|
OrganizationAlgorithms = "organizationAlgorithms",
|
package/core/scope.js
CHANGED
|
@@ -44,6 +44,7 @@ export var AptlyScopes;
|
|
|
44
44
|
AptlyScopes["AdminTesting"] = "adminTesting";
|
|
45
45
|
AptlyScopes["AdminUsers"] = "adminUsers";
|
|
46
46
|
AptlyScopes["AdminOrganizations"] = "adminOrganizations";
|
|
47
|
+
AptlyScopes["AdminWholesalers"] = "adminWholesalers";
|
|
47
48
|
AptlyScopes["Beta"] = "beta";
|
|
48
49
|
AptlyScopes["Organization"] = "organization";
|
|
49
50
|
AptlyScopes["OrganizationAlgorithms"] = "organizationAlgorithms";
|
package/enums/document.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare enum AptlyDocumentType {
|
|
|
23
23
|
OrderAttachment = "orderAttachment",
|
|
24
24
|
PaymentReceipt = "payment-receipt",
|
|
25
25
|
PaymentReport = "payment-report",
|
|
26
|
+
Price = "price",
|
|
26
27
|
ProductAttachment = "productAttachment",
|
|
27
28
|
Prospect = "prospect",
|
|
28
29
|
Public = "public",
|
package/enums/document.js
CHANGED
|
@@ -24,6 +24,7 @@ export var AptlyDocumentType;
|
|
|
24
24
|
AptlyDocumentType["OrderAttachment"] = "orderAttachment";
|
|
25
25
|
AptlyDocumentType["PaymentReceipt"] = "payment-receipt";
|
|
26
26
|
AptlyDocumentType["PaymentReport"] = "payment-report";
|
|
27
|
+
AptlyDocumentType["Price"] = "price";
|
|
27
28
|
AptlyDocumentType["ProductAttachment"] = "productAttachment";
|
|
28
29
|
AptlyDocumentType["Prospect"] = "prospect";
|
|
29
30
|
AptlyDocumentType["Public"] = "public";
|
package/models/document.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
|
|
|
12
12
|
organization: ID | AptlyOrganizationSchema<ID, DATE> | null;
|
|
13
13
|
project: ID | null;
|
|
14
14
|
unit: ID | null;
|
|
15
|
-
offer: ID | null;
|
|
16
|
-
option: ID | null;
|
|
17
15
|
product: ID | AptlyProductSchema<ID, DATE> | null;
|
|
18
16
|
text?: string;
|
|
19
17
|
size: number;
|
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-file.js';
|
|
32
33
|
export * from './producer.js';
|
|
33
34
|
export * from './product.js';
|
|
34
35
|
export * from './product-stats.js';
|
|
@@ -45,3 +46,4 @@ export * from './upsell-template.js';
|
|
|
45
46
|
export * from './user.js';
|
|
46
47
|
export * from './webhook.js';
|
|
47
48
|
export * from './webhook-event.js';
|
|
49
|
+
export * from './wholesaler.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-file.js';
|
|
32
33
|
export * from './producer.js';
|
|
33
34
|
export * from './product.js';
|
|
34
35
|
export * from './product-stats.js';
|
|
@@ -45,3 +46,4 @@ export * from './upsell-template.js';
|
|
|
45
46
|
export * from './user.js';
|
|
46
47
|
export * from './webhook.js';
|
|
47
48
|
export * from './webhook-event.js';
|
|
49
|
+
export * from './wholesaler.js';
|
package/models/offer.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { AptlyProjectSchema } from './project.js';
|
|
|
12
12
|
import { AptlyUnitSchema } from './unit.js';
|
|
13
13
|
import { AptlyUserSchema } from './user.js';
|
|
14
14
|
import { AptlyCategorySchema } from './category';
|
|
15
|
+
import { AptlyApp, AptlyAppSchema } from './app';
|
|
15
16
|
export type AptlyOffer = AptlyOfferSchema<string, string>;
|
|
16
17
|
export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, Omit<AptlyExtensionAmount, 'currency'> {
|
|
17
18
|
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
@@ -20,6 +21,7 @@ export interface AptlyOfferSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, O
|
|
|
20
21
|
order: ID | AptlyOrderSchema<ID, DATE> | null;
|
|
21
22
|
document: ID | AptlyDocumentSchema<ID, DATE> | null;
|
|
22
23
|
categories: (ID | AptlyCategorySchema<ID, DATE>)[];
|
|
24
|
+
app: ID | AptlyAppSchema<ID, DATE> | null;
|
|
23
25
|
createdBy: Populated<AptlyUserSchema<ID, DATE>> | null;
|
|
24
26
|
expiresAt: DATE | null;
|
|
25
27
|
sentAt: DATE | null;
|
|
@@ -57,14 +59,17 @@ export interface AptlyUserOfferSchema<ID, DATE> extends Omit<AptlyOfferSchema<ID
|
|
|
57
59
|
}
|
|
58
60
|
export interface AptlyOfferSendUnitBody {
|
|
59
61
|
unit: string;
|
|
62
|
+
app?: AptlyApp | string | null;
|
|
60
63
|
}
|
|
61
64
|
export interface AptlyOfferSendPrivateBody extends Omit<AptlyCustomer, 'fullName' | 'user'> {
|
|
62
65
|
unit: string | null;
|
|
63
66
|
address: AptlySearchAddress | null;
|
|
67
|
+
app?: AptlyApp | string | null;
|
|
64
68
|
}
|
|
65
69
|
export interface AptlyOfferSendCompanyBody extends Omit<AptlyCustomer, 'fullName' | 'user'> {
|
|
66
70
|
company: Pick<AptlyOrganization, 'name' | 'vat' | 'address'>;
|
|
67
71
|
address: AptlyAddress;
|
|
72
|
+
app?: AptlyApp | string | null;
|
|
68
73
|
}
|
|
69
74
|
export type AptlyPublicOfferCheckout = AptlyPublicOfferCheckoutSchema<string, string>;
|
|
70
75
|
export interface AptlyPublicOfferCheckoutSchema<ID, DATE> extends AptlyExtensionAmount {
|
|
@@ -73,7 +78,9 @@ export interface AptlyPublicOfferCheckoutSchema<ID, DATE> extends AptlyExtension
|
|
|
73
78
|
options: AptlyOptionPopulatedSchema<ID, DATE>[];
|
|
74
79
|
organization: Pick<AptlyOrganizationSchema<ID, DATE>, 'name'>;
|
|
75
80
|
project: Pick<AptlyProjectSchema<ID, DATE>, 'name' | 'paymentApp' | 'signApp'>;
|
|
81
|
+
unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name'> | null;
|
|
76
82
|
order?: Pick<AptlyOrderSchema<ID, DATE>, '_id' | 'status' | 'paymentSession'>;
|
|
83
|
+
app: Pick<AptlyAppSchema<ID, DATE>, '_id' | 'name' | 'implements'> | null;
|
|
77
84
|
actions: {
|
|
78
85
|
payment?: {
|
|
79
86
|
active: boolean;
|
|
@@ -88,3 +95,9 @@ export interface AptlyPublicOfferCheckoutSchema<ID, DATE> extends AptlyExtension
|
|
|
88
95
|
total: AptlyLegalMonetaryTotal;
|
|
89
96
|
allowanceCharges: AptlyAllowanceChargeSchema<ID, boolean>[];
|
|
90
97
|
}
|
|
98
|
+
export interface AptlyPublicOfferAcceptBody {
|
|
99
|
+
customer: AptlyCustomer;
|
|
100
|
+
shipping: AptlyAddress;
|
|
101
|
+
billing: AptlyAddress | null;
|
|
102
|
+
redirectUri: string;
|
|
103
|
+
}
|
package/models/option.d.ts
CHANGED
|
@@ -12,11 +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
16
|
export type AptlyOption = AptlyOptionSchema<string, string>;
|
|
16
17
|
export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
17
18
|
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
18
19
|
project: ID | AptlyProjectSchema<ID, DATE>;
|
|
19
20
|
unit: ID | AptlyUnitSchema<ID, DATE> | null;
|
|
21
|
+
wholesaler: ID | AptlyWholesalerSchema<ID, DATE> | null;
|
|
20
22
|
product: ID | AptlyProductSchema<ID, DATE> | null;
|
|
21
23
|
producer: ID | AptlyProducerSchema<ID, DATE> | null;
|
|
22
24
|
offer: ID | AptlyOfferSchema<ID, DATE> | null;
|
|
@@ -31,6 +33,7 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
31
33
|
documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
|
|
32
34
|
title: string;
|
|
33
35
|
description: string;
|
|
36
|
+
identificationSource: AptlyOptionIdentificationSource;
|
|
34
37
|
identification: string;
|
|
35
38
|
note: string;
|
|
36
39
|
index: number;
|
|
@@ -46,6 +49,13 @@ export interface AptlyOptionSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
46
49
|
allowance?: AptlyAllowance | null;
|
|
47
50
|
allowanceCharge: AptlyAllowanceChargeItemSchema<ID, boolean>[];
|
|
48
51
|
}
|
|
52
|
+
export declare enum AptlyOptionIdentificationSource {
|
|
53
|
+
Unknown = "",
|
|
54
|
+
EFO = "efo",
|
|
55
|
+
NRF = "nrf",
|
|
56
|
+
Nobb = "nobb",
|
|
57
|
+
Producer = "producer"
|
|
58
|
+
}
|
|
49
59
|
export type AptlyOptionLine = AptlyOptionLineSchema<string, string>;
|
|
50
60
|
export interface AptlyOptionLineSchema<ID, DATE> {
|
|
51
61
|
_id: ID;
|
package/models/option.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var AptlyOptionIdentificationSource;
|
|
2
|
+
(function (AptlyOptionIdentificationSource) {
|
|
3
|
+
AptlyOptionIdentificationSource["Unknown"] = "";
|
|
4
|
+
AptlyOptionIdentificationSource["EFO"] = "efo";
|
|
5
|
+
AptlyOptionIdentificationSource["NRF"] = "nrf";
|
|
6
|
+
AptlyOptionIdentificationSource["Nobb"] = "nobb";
|
|
7
|
+
AptlyOptionIdentificationSource["Producer"] = "producer";
|
|
8
|
+
})(AptlyOptionIdentificationSource || (AptlyOptionIdentificationSource = {}));
|
package/models/payment.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AptlyBaseSchema } from './extends';
|
|
2
|
+
import { AptlyDocumentSchema } from './document';
|
|
3
|
+
import { AptlyWholesalerSchema } from './wholesaler';
|
|
4
|
+
export declare enum AptlyPriceFileStatus {
|
|
5
|
+
UPLOADED = "uploaded",
|
|
6
|
+
UPDATING = "updating",
|
|
7
|
+
COMPLETE = "complete"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AptlyPriceFileFormat {
|
|
10
|
+
EFO_NELFO_4 = "EFO/NELFO_4.0"
|
|
11
|
+
}
|
|
12
|
+
export type AptlyPriceFile = AptlyPriceFileSchema<string, string>;
|
|
13
|
+
export interface AptlyPriceFileSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
14
|
+
wholesaler: ID | AptlyWholesalerSchema<ID, DATE>;
|
|
15
|
+
format: AptlyPriceFileFormat;
|
|
16
|
+
status: AptlyPriceFileStatus;
|
|
17
|
+
document: ID | AptlyDocumentSchema<ID, DATE>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var AptlyPriceFileStatus;
|
|
2
|
+
(function (AptlyPriceFileStatus) {
|
|
3
|
+
AptlyPriceFileStatus["UPLOADED"] = "uploaded";
|
|
4
|
+
AptlyPriceFileStatus["UPDATING"] = "updating";
|
|
5
|
+
AptlyPriceFileStatus["COMPLETE"] = "complete";
|
|
6
|
+
})(AptlyPriceFileStatus || (AptlyPriceFileStatus = {}));
|
|
7
|
+
export var AptlyPriceFileFormat;
|
|
8
|
+
(function (AptlyPriceFileFormat) {
|
|
9
|
+
AptlyPriceFileFormat["EFO_NELFO_4"] = "EFO/NELFO_4.0";
|
|
10
|
+
})(AptlyPriceFileFormat || (AptlyPriceFileFormat = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|