@aptly-as/types 1.7.7 → 1.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/README.md +1 -1
- package/core/api.js +0 -1
- package/core/app.js +0 -1
- package/core/cloudinary.d.ts +2 -10
- package/core/cloudinary.js +0 -1
- package/core/error.js +0 -1
- package/core/fields.js +0 -1
- package/core/index.js +0 -1
- package/core/permission.js +0 -1
- package/core/scope.js +0 -1
- package/core/signage.js +0 -1
- package/core/webhook-event-data.js +0 -1
- package/enums/document.js +0 -1
- package/enums/fields.js +0 -1
- package/enums/index.js +0 -1
- package/enums/unit-template.js +0 -1
- package/enums/webhook.js +0 -1
- package/index.js +0 -1
- package/models/algorithm.js +0 -1
- package/models/app.js +0 -1
- package/models/availability.d.ts +34 -0
- package/models/availability.js +2 -0
- package/models/booking.d.ts +8 -5
- package/models/booking.js +0 -1
- package/models/client.js +0 -1
- package/models/department.js +0 -1
- package/models/document.d.ts +9 -5
- package/models/document.js +0 -1
- package/models/extends.js +0 -1
- package/models/index.js +0 -1
- package/models/inquiry.js +0 -1
- package/models/media.js +0 -1
- package/models/notification-trigger.js +0 -1
- package/models/option-label.d.ts +2 -2
- package/models/option-label.js +0 -1
- package/models/order.d.ts +9 -6
- package/models/order.js +0 -1
- package/models/organization.d.ts +2 -2
- package/models/organization.js +0 -1
- package/models/page.js +0 -1
- package/models/producer.d.ts +3 -2
- package/models/producer.js +0 -1
- package/models/product-stats.js +0 -1
- package/models/product.d.ts +3 -3
- package/models/product.js +0 -1
- package/models/project.d.ts +2 -2
- package/models/project.js +0 -1
- package/models/queue-download.js +0 -1
- package/models/recommendation.js +0 -1
- package/models/supplier.js +0 -1
- package/models/tag.js +0 -1
- package/models/unit-email.js +0 -1
- package/models/unit-template.d.ts +6 -3
- package/models/unit-template.js +0 -1
- package/models/unit.d.ts +39 -20
- package/models/unit.js +0 -1
- package/models/upsell-template.d.ts +2 -2
- package/models/upsell-template.js +0 -1
- package/models/user.js +0 -1
- package/models/webhook-event.js +0 -1
- package/models/webhook.js +0 -1
- package/package.json +43 -41
package/README.md
CHANGED
package/core/api.js
CHANGED
package/core/app.js
CHANGED
package/core/cloudinary.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
public_id: string;
|
|
4
|
-
url: string;
|
|
5
|
-
secure_url: string;
|
|
6
|
-
format: string;
|
|
7
|
-
resource_type: AptlyCloudinaryResourceType;
|
|
8
|
-
original_filename: string;
|
|
9
|
-
bytes: number;
|
|
10
|
-
}
|
|
1
|
+
import * as cloudinary from 'cloudinary';
|
|
2
|
+
export declare type AptlyCloudinaryFile = cloudinary.UploadApiResponse;
|
package/core/cloudinary.js
CHANGED
package/core/error.js
CHANGED
package/core/fields.js
CHANGED
package/core/index.js
CHANGED
package/core/permission.js
CHANGED
|
@@ -100,4 +100,3 @@ var AptlyPermissionModel;
|
|
|
100
100
|
AptlyPermissionModel["UnitProducts"] = "unitProducts";
|
|
101
101
|
AptlyPermissionModel["UnitReport"] = "unitReport";
|
|
102
102
|
})(AptlyPermissionModel = exports.AptlyPermissionModel || (exports.AptlyPermissionModel = {}));
|
|
103
|
-
//# sourceMappingURL=permission.js.map
|
package/core/scope.js
CHANGED
package/core/signage.js
CHANGED
package/enums/document.js
CHANGED
package/enums/fields.js
CHANGED
package/enums/index.js
CHANGED
package/enums/unit-template.js
CHANGED
|
@@ -13,4 +13,3 @@ var AptlyUnitTemplateCategorySectionProductMeasureUnitType;
|
|
|
13
13
|
AptlyUnitTemplateCategorySectionProductMeasureUnitType["KVM"] = "kvm";
|
|
14
14
|
AptlyUnitTemplateCategorySectionProductMeasureUnitType["LM"] = "lm";
|
|
15
15
|
})(AptlyUnitTemplateCategorySectionProductMeasureUnitType = exports.AptlyUnitTemplateCategorySectionProductMeasureUnitType || (exports.AptlyUnitTemplateCategorySectionProductMeasureUnitType = {}));
|
|
16
|
-
//# sourceMappingURL=unit-template.js.map
|
package/enums/webhook.js
CHANGED
|
@@ -25,4 +25,3 @@ var AptlyWebhookEventStatus;
|
|
|
25
25
|
AptlyWebhookEventStatus["Retry"] = "retry";
|
|
26
26
|
AptlyWebhookEventStatus["Failed"] = "failed";
|
|
27
27
|
})(AptlyWebhookEventStatus = exports.AptlyWebhookEventStatus || (exports.AptlyWebhookEventStatus = {}));
|
|
28
|
-
//# sourceMappingURL=webhook.js.map
|
package/index.js
CHANGED
package/models/algorithm.js
CHANGED
|
@@ -14,4 +14,3 @@ var AptlyAlgorithmPipelineApplyTo;
|
|
|
14
14
|
AptlyAlgorithmPipelineApplyTo["Root"] = "root";
|
|
15
15
|
AptlyAlgorithmPipelineApplyTo["PreviousStep"] = "previousStep";
|
|
16
16
|
})(AptlyAlgorithmPipelineApplyTo = exports.AptlyAlgorithmPipelineApplyTo || (exports.AptlyAlgorithmPipelineApplyTo = {}));
|
|
17
|
-
//# sourceMappingURL=algorithm.js.map
|
package/models/app.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AptlyUserSchema } from './user.js';
|
|
2
|
+
export interface IAvailabilitySchema<ID, DATE> {
|
|
3
|
+
organization?: ID;
|
|
4
|
+
project: ID;
|
|
5
|
+
archived?: boolean;
|
|
6
|
+
calendars: IAvailabilityCalendarSchema<ID, DATE>[];
|
|
7
|
+
}
|
|
8
|
+
export interface IAvailabilityCalendarSchema<ID, DATE> {
|
|
9
|
+
_id: ID;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
fee?: number;
|
|
13
|
+
location: {
|
|
14
|
+
name: string;
|
|
15
|
+
formatted_address?: string;
|
|
16
|
+
geometry?: {
|
|
17
|
+
location: {
|
|
18
|
+
lat: number;
|
|
19
|
+
lng: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
attendees: AptlyUserSchema<ID, DATE>[];
|
|
24
|
+
userAvailability?: (ID | AptlyUserSchema<ID, DATE>)[];
|
|
25
|
+
endAvailabilityAt?: Date;
|
|
26
|
+
availableTimes: IAvailabilityCalendarAvailableTimeSchema<ID, DATE>[];
|
|
27
|
+
}
|
|
28
|
+
export interface IAvailabilityCalendarAvailableTimeSchema<ID, DATE> {
|
|
29
|
+
user?: ID;
|
|
30
|
+
from: DATE;
|
|
31
|
+
to: DATE;
|
|
32
|
+
booked: boolean;
|
|
33
|
+
booking: ID;
|
|
34
|
+
}
|
package/models/booking.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { AptlyOrganizationSchema } from './organization.js';
|
|
2
|
+
import { AptlyProjectSchema } from './project.js';
|
|
3
|
+
import { AptlyUnitSchema } from './unit.js';
|
|
1
4
|
export declare type AptlyBooking = AptlyBookingSchema<string, string>;
|
|
2
5
|
export interface AptlyBookingSchema<ID, DATE> {
|
|
3
6
|
_id: ID;
|
|
4
|
-
project: ID
|
|
5
|
-
unit: ID
|
|
7
|
+
project: ID | AptlyProjectSchema<ID, DATE>;
|
|
8
|
+
unit: ID | AptlyUnitSchema<ID, DATE>;
|
|
6
9
|
user: ID;
|
|
7
10
|
availability: ID;
|
|
8
11
|
calendar: ID;
|
|
@@ -13,8 +16,8 @@ export interface AptlyBookingSchema<ID, DATE> {
|
|
|
13
16
|
export declare type AptlyAvailability = AptlyAvailabilitySchema<string, string>;
|
|
14
17
|
export interface AptlyAvailabilitySchema<ID, DATE> {
|
|
15
18
|
_id: ID;
|
|
16
|
-
organization?: ID
|
|
17
|
-
project: ID
|
|
19
|
+
organization?: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
20
|
+
project: ID | AptlyProjectSchema<ID, DATE>;
|
|
18
21
|
archived?: boolean;
|
|
19
22
|
calendars: AptlyAvailabilityCalendarSchema<ID, DATE>[];
|
|
20
23
|
}
|
|
@@ -41,7 +44,7 @@ export interface AptlyAvailabilityCalendarSchema<ID, DATE> {
|
|
|
41
44
|
}
|
|
42
45
|
export declare type AptlyAvailabilityCalendarAvailableTimes = AptlyAvailabilityCalendarAvailableTimesSchema<string, string>;
|
|
43
46
|
export interface AptlyAvailabilityCalendarAvailableTimesSchema<ID, DATE> {
|
|
44
|
-
|
|
47
|
+
_id: ID;
|
|
45
48
|
from: DATE;
|
|
46
49
|
to: DATE;
|
|
47
50
|
booked: boolean;
|
package/models/booking.js
CHANGED
package/models/client.js
CHANGED
package/models/department.js
CHANGED
package/models/document.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
|
|
|
5
5
|
mime: string;
|
|
6
6
|
_type: AptlyDocumentType;
|
|
7
7
|
data: string;
|
|
8
|
-
organization?:
|
|
9
|
-
project?:
|
|
10
|
-
unit?:
|
|
11
|
-
product?:
|
|
8
|
+
organization?: ID;
|
|
9
|
+
project?: ID;
|
|
10
|
+
unit?: ID;
|
|
11
|
+
product?: ID;
|
|
12
12
|
text?: string;
|
|
13
13
|
size: number;
|
|
14
14
|
thirdPartyUploader: string | null;
|
|
@@ -16,8 +16,12 @@ export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
|
|
|
16
16
|
external_url?: string;
|
|
17
17
|
public_id?: string;
|
|
18
18
|
boligmappaStatus?: AptlyDocumentSchemaBoligmappaStatusSchema<ID>[];
|
|
19
|
-
chunks?: ID[];
|
|
19
|
+
chunks?: (AptlyDocumentSchema<ID, DATE> | ID)[];
|
|
20
20
|
isPasswordProtected?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Used in frontend.
|
|
23
|
+
*/
|
|
24
|
+
downloadToken?: string;
|
|
21
25
|
/**
|
|
22
26
|
* @deprecated use createdAt
|
|
23
27
|
*/
|
package/models/document.js
CHANGED
package/models/extends.js
CHANGED
package/models/index.js
CHANGED
package/models/inquiry.js
CHANGED
package/models/media.js
CHANGED
package/models/option-label.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AptlyBaseSchema } from './extends';
|
|
2
2
|
export declare type AptlyOptionLabel = AptlyOptionLabelSchema<string, string>;
|
|
3
3
|
export interface AptlyOptionLabelSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
4
|
-
organization?:
|
|
5
|
-
project?:
|
|
4
|
+
organization?: ID;
|
|
5
|
+
project?: ID;
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated use createdAt
|
|
8
8
|
*/
|
package/models/option-label.js
CHANGED
package/models/order.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { AptlyOrderStatus } from '../enums';
|
|
2
|
-
import {
|
|
2
|
+
import { AptlyOrganizationSchema } from './organization.js';
|
|
3
|
+
import { AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js';
|
|
4
|
+
import { AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit';
|
|
3
5
|
import { AptlyBaseSchema } from './extends';
|
|
6
|
+
import { AptlyUserSchema } from './user.js';
|
|
4
7
|
export declare type AptlyOrder = AptlyOrderSchema<string, string>;
|
|
5
8
|
export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
6
9
|
orderNumber: string;
|
|
7
|
-
organization: ID
|
|
8
|
-
project: ID
|
|
9
|
-
period: ID
|
|
10
|
-
unit: ID
|
|
11
|
-
signers: ID[];
|
|
10
|
+
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
11
|
+
project: ID | AptlyProjectSchema<ID, DATE>;
|
|
12
|
+
period: ID | AptlyProjectPeriodSchema<ID, DATE>;
|
|
13
|
+
unit: ID | AptlyUnitSchema<ID, DATE>;
|
|
14
|
+
signers: (ID | AptlyUserSchema<ID, DATE>)[];
|
|
12
15
|
status: AptlyOrderStatus;
|
|
13
16
|
receipt: ID;
|
|
14
17
|
attachments: ID[];
|
package/models/order.js
CHANGED
package/models/organization.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AptlyPermissionModulesModels, AptlyPermissionOrganizationModels, AptlyScope, AptlySignageSchema } from '../core';
|
|
2
2
|
import { AptlyUserSchema } from './user';
|
|
3
3
|
import { AptlyMediaSrc } from './media';
|
|
4
|
-
import { AptlyBaseSchema } from './extends';
|
|
4
|
+
import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
|
|
5
5
|
import { AptlyDepartmentGeneric } from './department';
|
|
6
6
|
import { AptlyProducerSchema } from './producer';
|
|
7
7
|
import { AptlyAppSchema } from './app';
|
|
8
8
|
import { AptlyAlgorithmSchema } from './algorithm';
|
|
9
9
|
export declare type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
10
|
-
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
10
|
+
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
11
11
|
slug: string;
|
|
12
12
|
logo?: string | null;
|
|
13
13
|
logoMedia?: AptlyMediaSrc | null;
|
package/models/organization.js
CHANGED
package/models/page.js
CHANGED
package/models/producer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AptlyBaseSchema } from './extends';
|
|
1
|
+
import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
|
|
2
2
|
import { AptlyMediaSrc } from './media';
|
|
3
3
|
export declare type AptlyProducer = AptlyProducerSchema<string, string>;
|
|
4
|
-
export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
4
|
+
export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
5
5
|
email: string;
|
|
6
6
|
logo: string | null;
|
|
7
7
|
logoMedia?: AptlyMediaSrc | null;
|
|
@@ -9,6 +9,7 @@ export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
|
|
|
9
9
|
organization?: ID;
|
|
10
10
|
createdBy: ID;
|
|
11
11
|
tags: ID[];
|
|
12
|
+
featured: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* @deprecated not used
|
|
14
15
|
*/
|
package/models/producer.js
CHANGED
package/models/product-stats.js
CHANGED
package/models/product.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AptlyBaseSchema, AptlyDBCrawlerCleaner } from './extends';
|
|
1
|
+
import { AptlyBaseSchema, AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends';
|
|
2
2
|
import { AptlyMediaSrcSchema } from './media';
|
|
3
3
|
import { AptlyProducerSchema } from './producer';
|
|
4
4
|
export declare type AptlyProduct = AptlyProductSchema<string, string>;
|
|
5
|
-
export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE> {
|
|
5
|
+
export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
6
6
|
searchableName: string;
|
|
7
7
|
organization?: ID;
|
|
8
8
|
project?: ID;
|
|
9
|
-
extends?: ID
|
|
9
|
+
extends?: ID | AptlyProductSchema<ID, DATE>;
|
|
10
10
|
productNumber: string;
|
|
11
11
|
description: string;
|
|
12
12
|
images: AptlyProductImageSchema<ID, DATE>[];
|
package/models/product.js
CHANGED
package/models/project.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AptlyOrganizationSchema } from './organization';
|
|
2
2
|
import { AptlyPermissionModulesModels } from '../core';
|
|
3
3
|
import { AptlyUserSchema } from './user';
|
|
4
|
-
import { AptlyBaseSchema } from './extends';
|
|
4
|
+
import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
|
|
5
5
|
import { AptlyDocumentSchema } from './document';
|
|
6
6
|
import { AptlyUnitOptionExtraItemSchema } from './unit';
|
|
7
7
|
import { AptlyMediaSrc } from './media';
|
|
8
8
|
export declare type AptlyProject = AptlyProjectSchema<string, string>;
|
|
9
|
-
export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
9
|
+
export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
10
10
|
organization: AptlyOrganizationSchema<ID, DATE> | ID;
|
|
11
11
|
template?: ID | null;
|
|
12
12
|
/**
|
package/models/project.js
CHANGED
package/models/queue-download.js
CHANGED
package/models/recommendation.js
CHANGED
package/models/supplier.js
CHANGED
package/models/tag.js
CHANGED
package/models/unit-email.js
CHANGED
|
@@ -80,8 +80,8 @@ export declare type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateC
|
|
|
80
80
|
export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
81
81
|
_id: ID;
|
|
82
82
|
_orderID: ID;
|
|
83
|
-
product?:
|
|
84
|
-
producer?:
|
|
83
|
+
product?: AptlyProductSchema<ID, DATE>;
|
|
84
|
+
producer?: AptlyProducerSchema<ID, DATE>;
|
|
85
85
|
availableProducts: ID[];
|
|
86
86
|
variantPrices: AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID>[];
|
|
87
87
|
text?: string;
|
|
@@ -91,7 +91,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
91
91
|
consequenceParam?: string;
|
|
92
92
|
amount: number;
|
|
93
93
|
unitCost?: number;
|
|
94
|
-
algorithm:
|
|
94
|
+
algorithm: ID | AptlyProjectAlgorithmSchema<ID>;
|
|
95
95
|
standard: boolean;
|
|
96
96
|
standardVariant?: ID;
|
|
97
97
|
partOfPackage?: ID;
|
|
@@ -114,6 +114,9 @@ export interface AptlyUnitTemplateCategorySectionProductParamSchema<ID, VALUE =
|
|
|
114
114
|
_id: ID;
|
|
115
115
|
key: AptlyUnitTemplateCategorySectionProductParamKey;
|
|
116
116
|
value: VALUE;
|
|
117
|
+
categoryName?: string;
|
|
118
|
+
sectionNames?: string[];
|
|
119
|
+
sectionName?: string;
|
|
117
120
|
}
|
|
118
121
|
export declare type AptlyUnitTemplateCategorySectionProductVariantPrice = AptlyUnitTemplateCategorySectionProductVariantPriceSchema<string>;
|
|
119
122
|
export interface AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID> {
|
package/models/unit-template.js
CHANGED
package/models/unit.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { AptlyProducerSchema } from './producer.js';
|
|
2
|
+
import { AptlyProductSchema } from './product.js';
|
|
1
3
|
import { AptlyProjectSchema } from './project';
|
|
2
4
|
import { AptlyHistorySchema } from './extends';
|
|
3
|
-
import { AptlyUnitTemplateBaseSchema, AptlyUnitTemplateSchema } from './unit-template';
|
|
5
|
+
import { AptlyUnitTemplateBaseSchema, AptlyUnitTemplateCategorySchema, AptlyUnitTemplateCategorySectionSchema, AptlyUnitTemplateSchema } from './unit-template';
|
|
4
6
|
import { AptlyIntegration, AptlyUnitItemParamKey, AptlyUnitStatus } from '../enums';
|
|
5
7
|
import { AptlyUserSchema } from './user';
|
|
6
8
|
import { AptlyOrganizationSchema } from './organization';
|
|
7
9
|
export declare type AptlyUnit = AptlyUnitSchema<string, string>;
|
|
8
|
-
export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyUnitEditData
|
|
10
|
+
export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyUnitEditData<DATE>, AptlyHistorySchema<ID, DATE> {
|
|
9
11
|
status: AptlyUnitStatus;
|
|
10
12
|
rooms: AptlyUnitRoomSchema<ID>[];
|
|
11
|
-
selectedOptions:
|
|
13
|
+
selectedOptions: AptlyUnitSelectedOptionSchema<ID, DATE>[];
|
|
12
14
|
items: AptlyUnitOptionItemSchema<ID, DATE>[];
|
|
13
15
|
revertedOptions?: AptlyUnitOptionItemSchema<ID, DATE>[];
|
|
14
16
|
revertedItems?: AptlyUnitOptionItemSchema<ID, DATE>[];
|
|
@@ -17,7 +19,7 @@ export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<I
|
|
|
17
19
|
productOverrides: AptlyUnitProductOverrideSchema<ID>[];
|
|
18
20
|
ordersToSign: ID[];
|
|
19
21
|
categoriesRead: ID[];
|
|
20
|
-
spec:
|
|
22
|
+
spec: AptlyUnitSpec;
|
|
21
23
|
buildStep: number;
|
|
22
24
|
documents: ID[];
|
|
23
25
|
unitPlans: {
|
|
@@ -37,7 +39,6 @@ export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<I
|
|
|
37
39
|
overridePeriod?: ID;
|
|
38
40
|
overridePeriods?: AptlyUnitOverridePeriodSchema<ID, DATE>[];
|
|
39
41
|
integrations: AptlyUnitIntegrationSchema<ID>[];
|
|
40
|
-
handoverDate?: DATE | null;
|
|
41
42
|
tree: any[];
|
|
42
43
|
/**
|
|
43
44
|
* @deprecated use createdAt
|
|
@@ -51,13 +52,13 @@ export interface AptlyUnitOverridePeriodSchema<ID, DATE> {
|
|
|
51
52
|
close: DATE;
|
|
52
53
|
}
|
|
53
54
|
export declare type AptlyUnitItemBase = AptlyUnitItemBaseSchema<string, string>;
|
|
54
|
-
interface AptlyUnitItemBaseSchema<ID, DATE> {
|
|
55
|
+
export interface AptlyUnitItemBaseSchema<ID, DATE> {
|
|
55
56
|
_id: ID;
|
|
56
|
-
product: ID
|
|
57
|
+
product: ID | AptlyProductSchema<ID, DATE>;
|
|
57
58
|
variant: ID;
|
|
58
|
-
producer: ID
|
|
59
|
-
category?: ID
|
|
60
|
-
section?: ID
|
|
59
|
+
producer: ID | AptlyProducerSchema<ID, DATE>;
|
|
60
|
+
category?: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
|
|
61
|
+
section?: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
|
|
61
62
|
period?: ID;
|
|
62
63
|
quantity: number;
|
|
63
64
|
standard?: boolean;
|
|
@@ -68,13 +69,13 @@ interface AptlyUnitItemBaseSchema<ID, DATE> {
|
|
|
68
69
|
params: AptlyUnitItemParamSchema<ID>[];
|
|
69
70
|
baseCost?: number;
|
|
70
71
|
}
|
|
71
|
-
export declare type AptlyUnitOption =
|
|
72
|
-
export interface
|
|
72
|
+
export declare type AptlyUnitOption = AptlyUnitSelectedOptionSchema<string, string>;
|
|
73
|
+
export interface AptlyUnitSelectedOptionSchema<ID, DATE> {
|
|
73
74
|
_id: ID;
|
|
74
|
-
category: ID
|
|
75
|
-
section: ID
|
|
75
|
+
category: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
|
|
76
|
+
section: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
|
|
76
77
|
sectionProductRef: ID;
|
|
77
|
-
product: ID
|
|
78
|
+
product: ID | AptlyProductSchema<ID, DATE>;
|
|
78
79
|
variant: ID;
|
|
79
80
|
period: ID;
|
|
80
81
|
quantity: number;
|
|
@@ -83,14 +84,18 @@ export interface AptlyUnitOptionSchema<ID, DATE> {
|
|
|
83
84
|
confirmDate?: DATE;
|
|
84
85
|
params: AptlyUnitItemParamSchema<ID>[];
|
|
85
86
|
package?: ID;
|
|
87
|
+
standard?: boolean;
|
|
88
|
+
text?: string;
|
|
89
|
+
producer?: ID;
|
|
90
|
+
baseCost?: number;
|
|
86
91
|
}
|
|
87
92
|
export declare type AptlyUnitOptionItem = AptlyUnitOptionItemSchema<string, string>;
|
|
88
|
-
export interface AptlyUnitOptionItemSchema<ID, DATE> extends
|
|
93
|
+
export interface AptlyUnitOptionItemSchema<ID, DATE> extends AptlyUnitSelectedOptionSchema<ID, DATE> {
|
|
89
94
|
unitCost: number;
|
|
90
|
-
|
|
95
|
+
pickRef?: ID;
|
|
91
96
|
}
|
|
92
97
|
export declare type AptlyUnitOptionExtraItem = AptlyUnitOptionExtraItemSchema<string, string>;
|
|
93
|
-
export interface AptlyUnitOptionExtraItemSchema<ID, DATE> extends
|
|
98
|
+
export interface AptlyUnitOptionExtraItemSchema<ID, DATE> extends AptlyUnitOptionItemSchema<ID, DATE> {
|
|
94
99
|
_id: ID;
|
|
95
100
|
unitCost: number;
|
|
96
101
|
addToNextOrder?: boolean;
|
|
@@ -100,12 +105,25 @@ export interface AptlyUnitOptionExtraItemSchema<ID, DATE> extends Partial<AptlyU
|
|
|
100
105
|
projectItemRef?: ID;
|
|
101
106
|
revertedOption?: boolean;
|
|
102
107
|
revertItemRef?: ID;
|
|
108
|
+
/** @deprecated. Not sure this is used */
|
|
109
|
+
document?: ID;
|
|
110
|
+
/** @deprecated. Not sure this is used */
|
|
111
|
+
prerequisites?: {
|
|
112
|
+
totalCost?: number;
|
|
113
|
+
};
|
|
114
|
+
/** @deprecated. Not sure this is used */
|
|
115
|
+
thirdPartyUploader?: string;
|
|
116
|
+
/** @deprecated. Not sure this is used */
|
|
117
|
+
cost: number;
|
|
118
|
+
/** @deprecated. Cant se this is used anymore */
|
|
119
|
+
customTitle?: string;
|
|
103
120
|
}
|
|
104
121
|
export declare type AptlyUnitItemParam<VALUE> = AptlyUnitItemParamSchema<string, VALUE>;
|
|
105
122
|
export interface AptlyUnitItemParamSchema<ID, VALUE = any> {
|
|
106
123
|
_id: ID;
|
|
107
124
|
key: AptlyUnitItemParamKey;
|
|
108
125
|
value: VALUE;
|
|
126
|
+
downloadToken?: string;
|
|
109
127
|
}
|
|
110
128
|
export declare type AptlyUnitRoom = AptlyUnitRoomSchema<string>;
|
|
111
129
|
export interface AptlyUnitRoomSchema<ID> {
|
|
@@ -144,7 +162,7 @@ export interface AptlyUnitProductOverrideVariantPriceSchema<ID> {
|
|
|
144
162
|
variant: ID;
|
|
145
163
|
price: number;
|
|
146
164
|
}
|
|
147
|
-
export interface
|
|
165
|
+
export interface AptlyUnitSpec {
|
|
148
166
|
categories: {
|
|
149
167
|
name: string;
|
|
150
168
|
isRoom: boolean;
|
|
@@ -170,7 +188,7 @@ export interface AptlyUnitIntegrationSchema<ID> {
|
|
|
170
188
|
plantId?: string;
|
|
171
189
|
tags?: string[];
|
|
172
190
|
}
|
|
173
|
-
interface AptlyUnitEditData {
|
|
191
|
+
interface AptlyUnitEditData<DATE> {
|
|
174
192
|
address?: string;
|
|
175
193
|
zipCode?: string;
|
|
176
194
|
city?: string;
|
|
@@ -201,6 +219,7 @@ interface AptlyUnitEditData {
|
|
|
201
219
|
postboxKeys?: number;
|
|
202
220
|
electricKeys?: number;
|
|
203
221
|
balconyKeys?: number;
|
|
222
|
+
handoverDate?: DATE | null;
|
|
204
223
|
}
|
|
205
224
|
export interface AptlyUnitInviteSchema<ID, DATE> {
|
|
206
225
|
_id: ID;
|
package/models/unit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AptlyBaseSchema } from './extends';
|
|
1
|
+
import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
|
|
2
2
|
export declare type AptlyUpsellTemplate = AptlyUpsellTemplateSchema<string, string>;
|
|
3
|
-
export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
3
|
+
export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
4
4
|
image?: string | null;
|
|
5
5
|
imageMedia?: string | null;
|
|
6
6
|
videoEmbed?: string;
|
package/models/user.js
CHANGED
package/models/webhook-event.js
CHANGED
package/models/webhook.js
CHANGED
package/package.json
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aptly-as/types",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Aptly types and enums",
|
|
5
|
-
"main": "./index.js",
|
|
6
|
-
"types": "./index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"build
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@aptly-as/types",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "Aptly types and enums",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"module": "./index.js",
|
|
8
|
+
"author": "Emil A. Olsen <emil@aptly.as>",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">14.0.0"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"start": "yarn build:watch",
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"build:watch": "tsc --watch --incremental",
|
|
16
|
+
"postversion": "git push && git push --tags",
|
|
17
|
+
"prepublish": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"cloudinary": "^1.32.0",
|
|
22
|
+
"husky": "^7.0.4",
|
|
23
|
+
"lint-staged": "^12.3.4",
|
|
24
|
+
"prettier": "^2.5.1",
|
|
25
|
+
"typescript": "^4.2.4"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/aptly-as/types.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"typescript",
|
|
33
|
+
"aptly",
|
|
34
|
+
"types"
|
|
35
|
+
],
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/aptly-as/types/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/aptly-as/types#readme",
|
|
40
|
+
"lint-staged": {
|
|
41
|
+
"**/*": "prettier --write --ignore-unknown"
|
|
42
|
+
}
|
|
43
|
+
}
|