@aptly-as/types 3.0.23 → 3.0.25
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/signage.d.ts +5 -5
- package/core/webhook-event-data.d.ts +2 -1
- package/enums/index.d.ts +3 -1
- package/enums/index.js +2 -0
- package/models/plan-payment.d.ts +31 -0
- package/models/plan-payment.js +1 -0
- package/models/plan.d.ts +52 -0
- package/models/plan.js +11 -0
- package/package.json +1 -1
package/core/signage.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { AptlySignageSignerRef } from '../enums/index.js';
|
|
|
2
2
|
export type AptlySignage = AptlySignageSchema<string, string>;
|
|
3
3
|
export interface AptlySignageSchema<ID, DATE> {
|
|
4
4
|
hasReceivedFile: boolean;
|
|
5
|
-
documentId
|
|
6
|
-
document
|
|
7
|
-
signedFile
|
|
5
|
+
documentId?: string;
|
|
6
|
+
document?: ID;
|
|
7
|
+
signedFile?: ID;
|
|
8
8
|
signed: boolean;
|
|
9
|
-
documentCreationDate
|
|
10
|
-
expireDate
|
|
9
|
+
documentCreationDate?: DATE;
|
|
10
|
+
expireDate?: DATE;
|
|
11
11
|
signers: AptlySignageSignerSchema<ID, DATE>[];
|
|
12
12
|
}
|
|
13
13
|
export type AptlySignageSigner = AptlySignageSignerSchema<string, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AptlyDocumentSchema, AptlyOrderSchema, AptlyOrganizationSchema, AptlyPaymentSchema, AptlyPaymentSettlement, AptlyProjectSchema, AptlyUnitSchema } from '../models/index.js';
|
|
1
|
+
import { AptlyDocumentSchema, AptlyOfferSchema, AptlyOrderSchema, AptlyOrganizationSchema, AptlyPaymentSchema, AptlyPaymentSettlement, AptlyProjectSchema, AptlyUnitSchema } from '../models/index.js';
|
|
2
2
|
export declare namespace AptlyWebhookEventData {
|
|
3
3
|
type Organization<ID, DATE> = Pick<AptlyOrganizationSchema<ID, DATE>, '_id' | 'name' | 'logoMedia' | 'logo'>;
|
|
4
4
|
type Project<ID, DATE> = Pick<AptlyProjectSchema<ID, DATE>, '_id' | 'name' | 'theme'>;
|
|
@@ -32,6 +32,7 @@ export declare namespace AptlyWebhookEventData {
|
|
|
32
32
|
project: Project<ID, DATE>;
|
|
33
33
|
unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name' | 'shipping' | 'users'>;
|
|
34
34
|
order: AptlyOrderSchema<ID, DATE>;
|
|
35
|
+
offer?: Pick<AptlyOfferSchema<ID, DATE>, '_id' | 'name'>;
|
|
35
36
|
receiptUrl?: string;
|
|
36
37
|
signedReceiptUrl?: string;
|
|
37
38
|
}
|
package/enums/index.d.ts
CHANGED
|
@@ -114,7 +114,9 @@ export declare enum AptlyOrganizationType {
|
|
|
114
114
|
Electrician = "electrician",
|
|
115
115
|
Plumber = "plumber",
|
|
116
116
|
Producer = "producer",
|
|
117
|
-
Integration = "integration"
|
|
117
|
+
Integration = "integration",
|
|
118
|
+
PropertyDeveloper = "property-developer",
|
|
119
|
+
Builder = "builder"
|
|
118
120
|
}
|
|
119
121
|
export declare enum AptlyOrganizationStatus {
|
|
120
122
|
NewBusiness = 0,
|
package/enums/index.js
CHANGED
|
@@ -132,6 +132,8 @@ export var AptlyOrganizationType;
|
|
|
132
132
|
AptlyOrganizationType["Plumber"] = "plumber";
|
|
133
133
|
AptlyOrganizationType["Producer"] = "producer";
|
|
134
134
|
AptlyOrganizationType["Integration"] = "integration";
|
|
135
|
+
AptlyOrganizationType["PropertyDeveloper"] = "property-developer";
|
|
136
|
+
AptlyOrganizationType["Builder"] = "builder";
|
|
135
137
|
})(AptlyOrganizationType || (AptlyOrganizationType = {}));
|
|
136
138
|
export var AptlyOrganizationStatus;
|
|
137
139
|
(function (AptlyOrganizationStatus) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AptlyCurrency, AptlyQuantityUnitCode } from '../enums/index.js';
|
|
2
|
+
import { AptlyAddress } from './address.js';
|
|
3
|
+
import { AptlyPrice } from './algorithm.js';
|
|
4
|
+
import { AptlyCustomerSchema } from './customer.js';
|
|
5
|
+
import { AptlyItemSchema } from './item.js';
|
|
6
|
+
import { AptlyOrganizationSchema } from './organization.js';
|
|
7
|
+
export type AptlyPlanPayment = AptlyPlanPaymentSchema<string, string>;
|
|
8
|
+
export interface AptlyPlanPaymentSchema<ID, DATE> {
|
|
9
|
+
_id: ID;
|
|
10
|
+
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
11
|
+
offers: ID[];
|
|
12
|
+
from: DATE;
|
|
13
|
+
to: DATE;
|
|
14
|
+
amount: number;
|
|
15
|
+
vatAmount: number;
|
|
16
|
+
customer: AptlyCustomerSchema<ID, DATE>;
|
|
17
|
+
billing: AptlyAddress;
|
|
18
|
+
items: AptlyPlanPaymentItemSchema<ID, DATE>[];
|
|
19
|
+
createdAt: DATE;
|
|
20
|
+
}
|
|
21
|
+
export type AptlyPlanPaymentItem = AptlyPlanPaymentItemSchema<string, string>;
|
|
22
|
+
export interface AptlyPlanPaymentItemSchema<ID, DATE> {
|
|
23
|
+
_id: ID;
|
|
24
|
+
item: AptlyItemSchema<ID, DATE>;
|
|
25
|
+
invoicedQuantity: number;
|
|
26
|
+
quantityUnitCode: AptlyQuantityUnitCode;
|
|
27
|
+
price: AptlyPrice;
|
|
28
|
+
extensionAmount: number;
|
|
29
|
+
extensionVatAmount: number;
|
|
30
|
+
currency: AptlyCurrency;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/models/plan.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AptlyBaseSchema } from './extends.js';
|
|
2
|
+
import { AptlyModuleSchema } from './module.js';
|
|
3
|
+
import { AptlyOrganizationSchema } from './organization.js';
|
|
4
|
+
export declare enum AptlyPlanRecurring {
|
|
5
|
+
None = 0,
|
|
6
|
+
Monthly = 1,
|
|
7
|
+
Yearly = 12
|
|
8
|
+
}
|
|
9
|
+
export declare enum AptlyPlanTier {
|
|
10
|
+
Free = 0,
|
|
11
|
+
Subscription = 1
|
|
12
|
+
}
|
|
13
|
+
export type AptlyPlan = AptlyPlanSchema<string, string>;
|
|
14
|
+
export interface AptlyPlanSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
15
|
+
tier: AptlyPlanTier;
|
|
16
|
+
slug: string;
|
|
17
|
+
description: string;
|
|
18
|
+
modules: (ID | AptlyModuleSchema<ID, DATE>)[];
|
|
19
|
+
listed: boolean;
|
|
20
|
+
organization: ID | AptlyOrganizationSchema<ID, DATE> | null;
|
|
21
|
+
copiedPlan: ID | null;
|
|
22
|
+
recurring: AptlyPlanRecurring;
|
|
23
|
+
recurringAt: DATE | null;
|
|
24
|
+
subscription: {
|
|
25
|
+
monthly: number;
|
|
26
|
+
yearly: number;
|
|
27
|
+
};
|
|
28
|
+
lastPaymentAt: DATE | null;
|
|
29
|
+
nextPaymentAt: DATE | null;
|
|
30
|
+
user: {
|
|
31
|
+
freeQuantity: number;
|
|
32
|
+
monthly: number;
|
|
33
|
+
yearly: number;
|
|
34
|
+
};
|
|
35
|
+
unit: {
|
|
36
|
+
freeQuantity: number;
|
|
37
|
+
amount: number;
|
|
38
|
+
};
|
|
39
|
+
offer: {
|
|
40
|
+
freeQuantity: number;
|
|
41
|
+
monthlyQuantity: number;
|
|
42
|
+
amount: number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export type AptlyPlanInstalled = AptlyPlanInstalledSchema<string, string>;
|
|
46
|
+
export interface AptlyPlanInstalledSchema<ID, DATE> extends AptlyPlanSchema<ID, DATE> {
|
|
47
|
+
listed: false;
|
|
48
|
+
lastPaymentAt: DATE;
|
|
49
|
+
recurringAt: DATE;
|
|
50
|
+
organization: ID;
|
|
51
|
+
copiedPlan: ID;
|
|
52
|
+
}
|
package/models/plan.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var AptlyPlanRecurring;
|
|
2
|
+
(function (AptlyPlanRecurring) {
|
|
3
|
+
AptlyPlanRecurring[AptlyPlanRecurring["None"] = 0] = "None";
|
|
4
|
+
AptlyPlanRecurring[AptlyPlanRecurring["Monthly"] = 1] = "Monthly";
|
|
5
|
+
AptlyPlanRecurring[AptlyPlanRecurring["Yearly"] = 12] = "Yearly";
|
|
6
|
+
})(AptlyPlanRecurring || (AptlyPlanRecurring = {}));
|
|
7
|
+
export var AptlyPlanTier;
|
|
8
|
+
(function (AptlyPlanTier) {
|
|
9
|
+
AptlyPlanTier[AptlyPlanTier["Free"] = 0] = "Free";
|
|
10
|
+
AptlyPlanTier[AptlyPlanTier["Subscription"] = 1] = "Subscription";
|
|
11
|
+
})(AptlyPlanTier || (AptlyPlanTier = {}));
|