@aptly-as/types 1.7.7 → 1.8.1
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 +5 -2
- package/core/permission.d.ts +7 -7
- package/core/permission.js +0 -1
- package/core/scope.d.ts +2 -2
- package/core/scope.js +0 -1
- package/core/signage.d.ts +2 -2
- 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 +5 -2
- package/enums/unit-template.js +0 -1
- package/enums/webhook.js +0 -1
- package/index.js +5 -2
- package/models/algorithm.d.ts +2 -2
- package/models/algorithm.js +0 -1
- package/models/app.d.ts +4 -4
- package/models/app.js +0 -1
- package/models/availability.d.ts +34 -0
- package/models/availability.js +2 -0
- package/models/booking.d.ts +12 -9
- package/models/booking.js +0 -1
- package/models/client.d.ts +1 -1
- package/models/client.js +0 -1
- package/models/department.d.ts +3 -3
- package/models/department.js +0 -1
- package/models/document.d.ts +11 -7
- package/models/document.js +0 -1
- package/models/extends.d.ts +2 -2
- package/models/extends.js +0 -1
- package/models/index.js +5 -2
- package/models/inquiry.d.ts +3 -3
- package/models/inquiry.js +0 -1
- package/models/media.d.ts +3 -3
- package/models/media.js +0 -1
- package/models/notification-trigger.d.ts +1 -1
- package/models/notification-trigger.js +0 -1
- package/models/option-label.d.ts +3 -3
- package/models/option-label.js +0 -1
- package/models/order.d.ts +14 -11
- package/models/order.js +0 -1
- package/models/organization.d.ts +7 -7
- package/models/organization.js +0 -1
- package/models/page.d.ts +2 -2
- package/models/page.js +0 -1
- package/models/producer.d.ts +4 -3
- package/models/producer.js +0 -1
- package/models/product-stats.d.ts +1 -1
- package/models/product-stats.js +0 -1
- package/models/product.d.ts +7 -7
- package/models/product.js +0 -1
- package/models/project.d.ts +8 -8
- package/models/project.js +0 -1
- package/models/queue-download.d.ts +1 -1
- package/models/queue-download.js +0 -1
- package/models/recommendation.d.ts +1 -1
- package/models/recommendation.js +0 -1
- package/models/supplier.d.ts +1 -1
- package/models/supplier.js +0 -1
- package/models/tag.d.ts +1 -1
- package/models/tag.js +0 -1
- package/models/unit-email.d.ts +1 -1
- package/models/unit-email.js +0 -1
- package/models/unit-template.d.ts +16 -13
- package/models/unit-template.js +0 -1
- package/models/unit.d.ts +53 -34
- package/models/unit.js +0 -1
- package/models/upsell-template.d.ts +3 -3
- package/models/upsell-template.js +0 -1
- package/models/user.d.ts +1 -1
- package/models/user.js +0 -1
- package/models/webhook-event.d.ts +3 -3
- package/models/webhook-event.js +0 -1
- package/models/webhook.d.ts +1 -1
- package/models/webhook.js +0 -1
- package/package.json +43 -41
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';
|
|
4
|
-
|
|
6
|
+
import { AptlyUserSchema } from './user.js';
|
|
7
|
+
export 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[];
|
|
@@ -21,13 +24,13 @@ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DAT
|
|
|
21
24
|
*/
|
|
22
25
|
created: DATE;
|
|
23
26
|
}
|
|
24
|
-
export
|
|
27
|
+
export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
|
|
25
28
|
export interface AptlyOrderPricePipelineItemSchema<ID> {
|
|
26
29
|
_id: ID;
|
|
27
30
|
label: string;
|
|
28
31
|
value: number;
|
|
29
32
|
}
|
|
30
|
-
export
|
|
33
|
+
export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
|
|
31
34
|
export interface AptlyOrderSignageSchema<ID, DATE> {
|
|
32
35
|
hasReceivedFile: boolean;
|
|
33
36
|
signed: boolean;
|
|
@@ -40,7 +43,7 @@ export interface AptlyOrderSignageSchema<ID, DATE> {
|
|
|
40
43
|
organizationSignedAt?: DATE;
|
|
41
44
|
customerSignedAt?: DATE;
|
|
42
45
|
}
|
|
43
|
-
export
|
|
46
|
+
export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
|
|
44
47
|
export interface AptlyOrderItemSchema<ID, DATE> {
|
|
45
48
|
_id: ID;
|
|
46
49
|
text?: string;
|
|
@@ -52,7 +55,7 @@ export interface AptlyOrderItemSchema<ID, DATE> {
|
|
|
52
55
|
unitCost: number;
|
|
53
56
|
pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
|
|
54
57
|
}
|
|
55
|
-
export
|
|
58
|
+
export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
|
|
56
59
|
export interface AptlyOrderItemPricePipelineSchema<ID> {
|
|
57
60
|
_id: ID;
|
|
58
61
|
label: string;
|
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
|
-
export
|
|
10
|
-
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
9
|
+
export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
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;
|
|
@@ -37,14 +37,14 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
37
37
|
*/
|
|
38
38
|
created: DATE;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
|
|
41
41
|
export interface AptlyOrganizationIntegrationsSchema<ID> {
|
|
42
42
|
_id: ID;
|
|
43
43
|
integration: string;
|
|
44
44
|
apiKey: string;
|
|
45
45
|
organization: string;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
|
|
48
48
|
export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
49
49
|
_id: ID;
|
|
50
50
|
user: AptlyUserSchema<ID, DATE> | ID;
|
|
@@ -52,7 +52,7 @@ export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
|
52
52
|
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
|
|
53
53
|
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
|
|
56
56
|
export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
57
57
|
_id: ID;
|
|
58
58
|
code: string;
|
|
@@ -67,7 +67,7 @@ export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
|
67
67
|
claimTime?: DATE;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
|
|
71
71
|
export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
72
72
|
app: ID | AptlyAppSchema<ID, DATE>;
|
|
73
73
|
scope: AptlyScope[];
|
package/models/organization.js
CHANGED
package/models/page.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AptlyPageSectionType } from '../enums';
|
|
2
2
|
import { AptlyBaseSchema } from './extends';
|
|
3
|
-
export
|
|
3
|
+
export type AptlyPage = AptlyPageSchema<string, string>;
|
|
4
4
|
export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
5
5
|
slug: string;
|
|
6
6
|
project: ID;
|
|
@@ -22,7 +22,7 @@ export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
22
22
|
*/
|
|
23
23
|
showInMenu: boolean;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type AptlyPageSection = AptlyPageSectionSchema<string, string>;
|
|
26
26
|
export interface AptlyPageSectionSchema<ID, VALUE = any> {
|
|
27
27
|
_id: ID;
|
|
28
28
|
name: string;
|
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
|
-
export
|
|
4
|
-
export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
3
|
+
export type AptlyProducer = AptlyProducerSchema<string, string>;
|
|
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AptlyBaseSchema } from './extends';
|
|
2
|
-
export
|
|
2
|
+
export type AptlyProductStats = AptlyProductStatsSchema<string, string>;
|
|
3
3
|
export interface AptlyProductStatsSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
|
|
4
4
|
product: ID;
|
|
5
5
|
project: ID;
|
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
|
-
export
|
|
5
|
-
export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE> {
|
|
4
|
+
export type AptlyProduct = AptlyProductSchema<string, string>;
|
|
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>[];
|
|
@@ -43,13 +43,13 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
|
|
|
43
43
|
*/
|
|
44
44
|
created: DATE;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export type AptlyProductImage = AptlyProductImageSchema<string, string>;
|
|
47
47
|
export interface AptlyProductImageSchema<ID, DATE> extends AptlyMediaSrcSchema<ID, DATE> {
|
|
48
48
|
image: string;
|
|
49
49
|
description?: string;
|
|
50
50
|
featured?: boolean;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
52
|
+
export type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
|
|
53
53
|
export interface AptlyProductVariantSchema<ID, DATE> {
|
|
54
54
|
_id: ID;
|
|
55
55
|
title?: string;
|
|
@@ -67,7 +67,7 @@ export interface AptlyProductVariantSchema<ID, DATE> {
|
|
|
67
67
|
height?: string;
|
|
68
68
|
length?: string;
|
|
69
69
|
}
|
|
70
|
-
export
|
|
70
|
+
export type AptlyProductImport = AptlyProductImportSchema<string, string>;
|
|
71
71
|
export interface AptlyProductImportSchema<ID, DATE> extends Partial<Omit<AptlyProductSchema<ID, DATE>, 'images' | 'documents'>> {
|
|
72
72
|
images: string[];
|
|
73
73
|
documents: string[];
|
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
|
-
export
|
|
9
|
-
export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
8
|
+
export type AptlyProject = AptlyProjectSchema<string, string>;
|
|
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
|
/**
|
|
@@ -29,7 +29,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
|
|
|
29
29
|
*/
|
|
30
30
|
created: DATE;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type AptlyProjectPeriod = AptlyProjectPeriodSchema<string, string>;
|
|
33
33
|
export interface AptlyProjectPeriodSchema<ID, DATE> {
|
|
34
34
|
_id: ID;
|
|
35
35
|
name: string;
|
|
@@ -40,7 +40,7 @@ export interface AptlyProjectPeriodSchema<ID, DATE> {
|
|
|
40
40
|
/**
|
|
41
41
|
* @deprecated use AptlyAlgorithm instead
|
|
42
42
|
*/
|
|
43
|
-
export
|
|
43
|
+
export type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
|
|
44
44
|
/**
|
|
45
45
|
* @deprecated use AptlyAlgorithm instead
|
|
46
46
|
*/
|
|
@@ -54,7 +54,7 @@ export interface AptlyProjectAlgorithmSchema<ID> {
|
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated use AptlyAlgorithmPipeline instead
|
|
56
56
|
*/
|
|
57
|
-
export
|
|
57
|
+
export type AptlyProjectAlgorithmPipeline = AptlyProjectAlgorithmPipelineSchema<string>;
|
|
58
58
|
/**
|
|
59
59
|
* @deprecated use AptlyAlgorithmPipeline instead
|
|
60
60
|
*/
|
|
@@ -109,13 +109,13 @@ export interface AptlyProjectThemePalette {
|
|
|
109
109
|
disabled?: string;
|
|
110
110
|
lightContrast?: string;
|
|
111
111
|
}
|
|
112
|
-
export
|
|
112
|
+
export type AptlyProjectIntegration = AptlyProjectIntegrationSchema<string>;
|
|
113
113
|
export interface AptlyProjectIntegrationSchema<ID> {
|
|
114
114
|
integration: ID;
|
|
115
115
|
integrationName: string;
|
|
116
116
|
project: string;
|
|
117
117
|
}
|
|
118
|
-
export
|
|
118
|
+
export type AptlyProjectNotify = AptlyProjectNotifySchema<string, string>;
|
|
119
119
|
interface AptlyProjectNotifySchema<ID, DATE> {
|
|
120
120
|
_id: ID;
|
|
121
121
|
user: AptlyUserSchema<ID, DATE> | ID;
|
package/models/project.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AptlyQueueDownloadStatus, AptlyQueueDownloadType } from '../enums/index
|
|
|
2
2
|
import { AptlyDocumentSchema } from './document';
|
|
3
3
|
import { AptlyMediaSchema } from './media';
|
|
4
4
|
import { AptlyBaseSchema } from './extends';
|
|
5
|
-
export
|
|
5
|
+
export type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
|
|
6
6
|
export interface AptlyQueueDownloadSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
7
7
|
url: string;
|
|
8
8
|
type: AptlyQueueDownloadType;
|
package/models/queue-download.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AptlyMediaSrcSchema } from './media';
|
|
2
2
|
import { AptlyBaseSchema } from './extends';
|
|
3
|
-
export
|
|
3
|
+
export type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
|
|
4
4
|
export interface AptlyRecommendationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
5
5
|
organization?: ID;
|
|
6
6
|
project?: ID;
|
package/models/recommendation.js
CHANGED
package/models/supplier.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AptlyMediaSrc } from './media';
|
|
2
2
|
import { AptlyBaseSchema } from './extends';
|
|
3
|
-
export
|
|
3
|
+
export type AptlySupplier = AptlySupplierSchema<string, string>;
|
|
4
4
|
export interface AptlySupplierSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
5
5
|
email?: string;
|
|
6
6
|
logo: string | null;
|
package/models/supplier.js
CHANGED
package/models/tag.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AptlyBaseSchema } from './extends';
|
|
2
|
-
export
|
|
2
|
+
export type AptlyTag = AptlyTagSchema<string, string>;
|
|
3
3
|
export interface AptlyTagSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated use createdAt
|
package/models/tag.js
CHANGED
package/models/unit-email.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AptlyUnitSchema } from './unit';
|
|
|
4
4
|
import { AptlyInquirySchema } from './inquiry';
|
|
5
5
|
import { AptlyBookingSchema } from './booking';
|
|
6
6
|
import { AptlyBaseSchema } from './extends';
|
|
7
|
-
export
|
|
7
|
+
export type AptlyUnitEmail = AptlyUnitEmailSchema<string, string>;
|
|
8
8
|
export interface AptlyUnitEmailSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
9
9
|
type: AptlyUnitEmailType;
|
|
10
10
|
to: string[];
|
package/models/unit-email.js
CHANGED
|
@@ -5,12 +5,12 @@ import { AptlyProducerSchema } from './producer';
|
|
|
5
5
|
import { AptlyMediaSrcSchema } from './media';
|
|
6
6
|
import { AptlyUpsellTemplateSchema } from './upsell-template';
|
|
7
7
|
import { AptlyProjectAlgorithmSchema, AptlyProjectPeriodSchema } from './project';
|
|
8
|
-
export
|
|
8
|
+
export type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
|
|
9
9
|
export interface AptlyUnitTemplateBaseSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
10
10
|
_order_categories: ID[];
|
|
11
11
|
categories: AptlyUnitTemplateCategorySchema<ID, DATE>[];
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type AptlyUnitTemplate = AptlyUnitTemplateSchema<string, string>;
|
|
14
14
|
export interface AptlyUnitTemplateSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
|
|
15
15
|
name: string;
|
|
16
16
|
description?: string;
|
|
@@ -22,13 +22,13 @@ export interface AptlyUnitTemplateSchema<ID, DATE> extends AptlyUnitTemplateBase
|
|
|
22
22
|
*/
|
|
23
23
|
blueprints: AptlyUnitTemplateBlueprintSchema<ID>[];
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type AptlyUnitTemplateBlueprint = AptlyUnitTemplateBlueprintSchema<string>;
|
|
26
26
|
export interface AptlyUnitTemplateBlueprintSchema<ID> {
|
|
27
27
|
_id: ID;
|
|
28
28
|
image: string;
|
|
29
29
|
featured: boolean;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type AptlyUnitTemplateCategory = AptlyUnitTemplateCategorySchema<string, string>;
|
|
32
32
|
export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
33
33
|
_id: ID;
|
|
34
34
|
_orderID: ID;
|
|
@@ -44,7 +44,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
|
44
44
|
*/
|
|
45
45
|
sameAs?: ID;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type AptlyUnitTemplateCategorySection = AptlyUnitTemplateCategorySectionSchema<string, string>;
|
|
48
48
|
export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
|
|
49
49
|
_id: ID;
|
|
50
50
|
_orderID: ID;
|
|
@@ -59,7 +59,7 @@ export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
|
|
|
59
59
|
products: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
60
60
|
period: AptlyProjectPeriodSchema<ID, DATE> | ID;
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
|
|
63
63
|
export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
|
|
64
64
|
_id: ID;
|
|
65
65
|
name: string;
|
|
@@ -70,18 +70,18 @@ export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
|
|
|
70
70
|
_product_order?: ID[];
|
|
71
71
|
products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
72
72
|
}
|
|
73
|
-
export
|
|
73
|
+
export type AptlyUnitTemplateCategorySectionAssortment = AptlyUnitTemplateCategorySectionAssortmentSchema<string, string>;
|
|
74
74
|
export interface AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE> {
|
|
75
75
|
_id: ID;
|
|
76
76
|
createdAt: DATE;
|
|
77
77
|
color: string;
|
|
78
78
|
}
|
|
79
|
-
export
|
|
79
|
+
export type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
|
|
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;
|
|
@@ -109,13 +109,16 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
109
109
|
*/
|
|
110
110
|
measureUnitType: AptlyUnitTemplateCategorySectionProductMeasureUnitType;
|
|
111
111
|
}
|
|
112
|
-
export
|
|
112
|
+
export type AptlyUnitTemplateCategorySectionProductParam<VALUE> = AptlyUnitTemplateCategorySectionProductParamSchema<string, VALUE>;
|
|
113
113
|
export interface AptlyUnitTemplateCategorySectionProductParamSchema<ID, VALUE = any> {
|
|
114
114
|
_id: ID;
|
|
115
115
|
key: AptlyUnitTemplateCategorySectionProductParamKey;
|
|
116
116
|
value: VALUE;
|
|
117
|
+
categoryName?: string;
|
|
118
|
+
sectionNames?: string[];
|
|
119
|
+
sectionName?: string;
|
|
117
120
|
}
|
|
118
|
-
export
|
|
121
|
+
export type AptlyUnitTemplateCategorySectionProductVariantPrice = AptlyUnitTemplateCategorySectionProductVariantPriceSchema<string>;
|
|
119
122
|
export interface AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID> {
|
|
120
123
|
variant: ID;
|
|
121
124
|
price: number;
|
package/models/unit-template.js
CHANGED