@aptly-as/types 1.3.2 → 1.3.3
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/permission.d.ts +2 -2
- package/core/permission.ts +2 -1
- package/enums/document.d.ts +8 -0
- package/enums/document.js +9 -0
- package/enums/document.js.map +1 -1
- package/enums/document.ts +9 -1
- package/models/extends.d.ts +5 -1
- package/models/extends.ts +5 -1
- package/models/product.d.ts +2 -1
- package/models/product.ts +2 -1
- package/models/recommendation.d.ts +2 -2
- package/models/recommendation.ts +2 -2
- package/models/unit-template.d.ts +9 -4
- package/models/unit-template.ts +9 -4
- package/package.json +1 -1
package/core/permission.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'default';
|
|
1
|
+
export declare type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
|
|
2
2
|
export declare type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
|
|
3
3
|
export declare type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'testing';
|
|
4
4
|
export declare type AptlyPermissionOrganizationModels = 'testingAdmin' | 'admin' | 'content' | 'reports' | 'support' | 'thirdParty' | 'default';
|
|
5
|
-
export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'organization' | 'organizationBooking' | 'organizationClients' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationProducts' | 'organizationReport' | 'organizationStats' | 'organizationLogo' | 'organizationWebhooks' | 'project' | 'projectAlgorithms' | 'projectBooking' | 'projectDocuments' | 'projectInquiry' | 'projectOrders' | 'projectPages' | 'projectPeriods' | 'projectProducts' | 'projectRecommendations' | 'projectReport' | 'projectReportPrice' | 'projectTheme' | 'projectSigning' | 'projectSubcontractor' | 'projectUnits' | 'projectUnitInvites' | 'projectUnitExtraFields' | 'projectUnitExtraOptions' | 'projectUnitTemplates' | 'projectUnitTemplatesAlgorithms' | 'projectUnitTemplatesPrices' | 'projectUpsellTemplates' | 'unit' | 'unitBooking' | 'unitInquiry' | 'unitOrders' | 'unitPages' | 'unitProducts' | 'unitReport';
|
|
5
|
+
export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationBooking' | 'organizationClients' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationProducts' | 'organizationReport' | 'organizationStats' | 'organizationLogo' | 'organizationWebhooks' | 'project' | 'projectAlgorithms' | 'projectBooking' | 'projectDocuments' | 'projectInquiry' | 'projectOrders' | 'projectPages' | 'projectPeriods' | 'projectProducts' | 'projectRecommendations' | 'projectReport' | 'projectReportPrice' | 'projectTheme' | 'projectSigning' | 'projectSubcontractor' | 'projectUnits' | 'projectUnitInvites' | 'projectUnitExtraFields' | 'projectUnitExtraOptions' | 'projectUnitTemplates' | 'projectUnitTemplatesAlgorithms' | 'projectUnitTemplatesPrices' | 'projectUpsellTemplates' | 'unit' | 'unitBooking' | 'unitInquiry' | 'unitOrders' | 'unitPages' | 'unitProducts' | 'unitReport';
|
package/core/permission.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
export type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'default';
|
|
2
|
+
export type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
|
|
3
3
|
|
|
4
4
|
export type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
|
|
5
5
|
|
|
@@ -38,6 +38,7 @@ export type AptlyPermissionModels =
|
|
|
38
38
|
| 'adminTesting'
|
|
39
39
|
| 'adminUsers'
|
|
40
40
|
| 'adminOrganizations'
|
|
41
|
+
| 'beta'
|
|
41
42
|
| 'organization'
|
|
42
43
|
| 'organizationBooking'
|
|
43
44
|
| 'organizationClients'
|
package/enums/document.d.ts
CHANGED
|
@@ -18,3 +18,11 @@ export declare enum AptlyDocumentType {
|
|
|
18
18
|
Contract = "contract",
|
|
19
19
|
Chunk = "chunk"
|
|
20
20
|
}
|
|
21
|
+
export declare enum AptlyHistoryType {
|
|
22
|
+
Added = "added",
|
|
23
|
+
Updated = "updated",
|
|
24
|
+
Deleted = "deleted",
|
|
25
|
+
Moved = "moved",
|
|
26
|
+
Copied = "copied",
|
|
27
|
+
Imported = "imported"
|
|
28
|
+
}
|
package/enums/document.js
CHANGED
|
@@ -21,4 +21,13 @@ var AptlyDocumentType;
|
|
|
21
21
|
AptlyDocumentType["Contract"] = "contract";
|
|
22
22
|
AptlyDocumentType["Chunk"] = "chunk";
|
|
23
23
|
})(AptlyDocumentType = exports.AptlyDocumentType || (exports.AptlyDocumentType = {}));
|
|
24
|
+
var AptlyHistoryType;
|
|
25
|
+
(function (AptlyHistoryType) {
|
|
26
|
+
AptlyHistoryType["Added"] = "added";
|
|
27
|
+
AptlyHistoryType["Updated"] = "updated";
|
|
28
|
+
AptlyHistoryType["Deleted"] = "deleted";
|
|
29
|
+
AptlyHistoryType["Moved"] = "moved";
|
|
30
|
+
AptlyHistoryType["Copied"] = "copied";
|
|
31
|
+
AptlyHistoryType["Imported"] = "imported";
|
|
32
|
+
})(AptlyHistoryType = exports.AptlyHistoryType || (exports.AptlyHistoryType = {}));
|
|
24
33
|
//# sourceMappingURL=document.js.map
|
package/enums/document.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","sourceRoot":"","sources":["document.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["document.ts"],"names":[],"mappings":";;AACA,IAAY,iBAmBX;AAnBD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,8CAAyB,CAAA;IACzB,wDAAmC,CAAA;IACnC,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,sDAAiC,CAAA;IACjC,wCAAmB,CAAA;IACnB,4DAAuC,CAAA;IACvC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;IACrC,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,oCAAe,CAAA;AACjB,CAAC,EAnBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAmB5B;AAED,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B"}
|
package/enums/document.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
export enum AptlyDocumentType {
|
|
4
3
|
Document = 'document',
|
|
5
4
|
UnitPlan = 'unitPlan',
|
|
@@ -19,4 +18,13 @@ export enum AptlyDocumentType {
|
|
|
19
18
|
EndReport = 'endReport',
|
|
20
19
|
Contract = 'contract',
|
|
21
20
|
Chunk = 'chunk',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum AptlyHistoryType {
|
|
24
|
+
Added = 'added',
|
|
25
|
+
Updated = 'updated',
|
|
26
|
+
Deleted = 'deleted',
|
|
27
|
+
Moved = 'moved',
|
|
28
|
+
Copied = 'copied',
|
|
29
|
+
Imported = 'imported',
|
|
22
30
|
}
|
package/models/extends.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AptlyUserSchema } from './user';
|
|
2
|
+
import { AptlyHistoryType } from '../enums';
|
|
1
3
|
export declare type AptlyHistory = AptlyHistorySchema<string, string>;
|
|
2
4
|
export interface AptlyHistorySchema<ID, DATE> {
|
|
3
5
|
locked: boolean;
|
|
@@ -6,10 +8,12 @@ export interface AptlyHistorySchema<ID, DATE> {
|
|
|
6
8
|
}
|
|
7
9
|
export declare type AptlyHistoryHistory = AptlyHistoryHistorySchema<string, string>;
|
|
8
10
|
export interface AptlyHistoryHistorySchema<ID, DATE> {
|
|
11
|
+
_id: ID;
|
|
12
|
+
type: AptlyHistoryType;
|
|
9
13
|
referenceDate: DATE;
|
|
10
14
|
diffDate: DATE;
|
|
11
15
|
diff: object;
|
|
12
|
-
user: ID
|
|
16
|
+
user: ID | Pick<AptlyUserSchema<ID, DATE>, '_id' | 'fullName'>;
|
|
13
17
|
}
|
|
14
18
|
export interface AptlyDBCrawlerCleaner {
|
|
15
19
|
dontClean?: boolean;
|
package/models/extends.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AptlyUserSchema } from './user';
|
|
2
|
+
import { AptlyHistoryType } from '../enums';
|
|
1
3
|
|
|
2
4
|
export type AptlyHistory = AptlyHistorySchema<string, string>;
|
|
3
5
|
export interface AptlyHistorySchema<ID, DATE> {
|
|
@@ -8,10 +10,12 @@ export interface AptlyHistorySchema<ID, DATE> {
|
|
|
8
10
|
|
|
9
11
|
export type AptlyHistoryHistory = AptlyHistoryHistorySchema<string, string>;
|
|
10
12
|
export interface AptlyHistoryHistorySchema<ID, DATE> {
|
|
13
|
+
_id: ID;
|
|
14
|
+
type: AptlyHistoryType;
|
|
11
15
|
referenceDate: DATE;
|
|
12
16
|
diffDate: DATE;
|
|
13
17
|
diff: object;
|
|
14
|
-
user: ID
|
|
18
|
+
user: ID | Pick<AptlyUserSchema<ID, DATE>, '_id' | 'fullName'>;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
export interface AptlyDBCrawlerCleaner {
|
package/models/product.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends';
|
|
2
2
|
import { AptlyMediaSrcSchema } from './media';
|
|
3
|
+
import { AptlyProducerSchema } from './producer';
|
|
3
4
|
export declare type AptlyProduct = AptlyProductSchema<string, string>;
|
|
4
5
|
export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyHistorySchema<ID, DATE> {
|
|
5
6
|
_id: ID;
|
|
@@ -22,7 +23,7 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
|
|
|
22
23
|
height?: string;
|
|
23
24
|
length?: string;
|
|
24
25
|
material?: string;
|
|
25
|
-
producer?: ID
|
|
26
|
+
producer?: ID | AptlyProducerSchema<ID, DATE>;
|
|
26
27
|
supplier?: ID;
|
|
27
28
|
tags: ID[];
|
|
28
29
|
documents: ID[];
|
package/models/product.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends';
|
|
2
2
|
import { AptlyMediaSrcSchema } from './media';
|
|
3
|
+
import { AptlyProducerSchema } from './producer';
|
|
3
4
|
|
|
4
5
|
export type AptlyProduct = AptlyProductSchema<string, string>;
|
|
5
6
|
export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyHistorySchema<ID, DATE> {
|
|
@@ -23,7 +24,7 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
|
|
|
23
24
|
height?: string;
|
|
24
25
|
length?: string;
|
|
25
26
|
material?: string;
|
|
26
|
-
producer?: ID
|
|
27
|
+
producer?: ID | AptlyProducerSchema<ID, DATE>;
|
|
27
28
|
supplier?: ID;
|
|
28
29
|
tags: ID[];
|
|
29
30
|
documents: ID[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AptlyMediaSrcSchema } from './media';
|
|
2
2
|
export declare type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
|
|
3
3
|
export interface AptlyRecommendationSchema<ID, DATE> {
|
|
4
4
|
_id: ID;
|
|
@@ -9,6 +9,6 @@ export interface AptlyRecommendationSchema<ID, DATE> {
|
|
|
9
9
|
color: string;
|
|
10
10
|
text: string;
|
|
11
11
|
image?: string | null;
|
|
12
|
-
imageMedia?:
|
|
12
|
+
imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
|
|
13
13
|
archived?: boolean;
|
|
14
14
|
}
|
package/models/recommendation.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AptlyMediaSrcSchema } from './media';
|
|
2
2
|
|
|
3
3
|
export type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
|
|
4
4
|
export interface AptlyRecommendationSchema<ID, DATE> {
|
|
@@ -10,6 +10,6 @@ export interface AptlyRecommendationSchema<ID, DATE> {
|
|
|
10
10
|
color: string;
|
|
11
11
|
text: string;
|
|
12
12
|
image?: string | null;
|
|
13
|
-
imageMedia?:
|
|
13
|
+
imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
|
|
14
14
|
archived?: boolean;
|
|
15
15
|
}
|
|
@@ -2,6 +2,9 @@ import { AptlyHistorySchema } from './extends';
|
|
|
2
2
|
import { AptlyCategorySectionDisplayType, AptlyUnitTemplateCategorySectionProductMeasureUnitType, AptlyUnitTemplateCategorySectionProductParamKey } from '../enums';
|
|
3
3
|
import { AptlyProductSchema } from './product';
|
|
4
4
|
import { AptlyProducerSchema } from './producer';
|
|
5
|
+
import { AptlyMediaSrcSchema } from './media';
|
|
6
|
+
import { AptlyUpsellTemplateSchema } from './upsell-template';
|
|
7
|
+
import { AptlyProjectAlgorithmSchema, AptlyProjectPeriodSchema } from './project';
|
|
5
8
|
export declare type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
|
|
6
9
|
export interface AptlyUnitTemplateBaseSchema<ID, DATE> {
|
|
7
10
|
_id: ID;
|
|
@@ -33,7 +36,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
|
33
36
|
text?: string;
|
|
34
37
|
isRoom: boolean;
|
|
35
38
|
size?: number;
|
|
36
|
-
upsellTemplate?: ID | null;
|
|
39
|
+
upsellTemplate?: AptlyUpsellTemplateSchema<ID, DATE> | ID | null;
|
|
37
40
|
_order_sections: ID[];
|
|
38
41
|
sections: AptlyUnitTemplateCategorySectionSchema<ID, DATE>[];
|
|
39
42
|
/**
|
|
@@ -53,16 +56,18 @@ export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
|
|
|
53
56
|
packages: AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE>[];
|
|
54
57
|
_order_products: ID[];
|
|
55
58
|
products: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
56
|
-
period: ID;
|
|
59
|
+
period: AptlyProjectPeriodSchema<ID, DATE> | ID;
|
|
57
60
|
}
|
|
58
61
|
export declare type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
|
|
59
62
|
export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
|
|
60
63
|
_id: ID;
|
|
61
64
|
name: string;
|
|
62
65
|
standard: boolean;
|
|
63
|
-
image?: string;
|
|
66
|
+
image?: string | null;
|
|
67
|
+
imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
|
|
64
68
|
description?: string;
|
|
65
69
|
_product_order?: ID[];
|
|
70
|
+
products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
66
71
|
}
|
|
67
72
|
export declare type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
|
|
68
73
|
export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
@@ -79,7 +84,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
79
84
|
consequenceParam?: string;
|
|
80
85
|
amount: number;
|
|
81
86
|
unitCost?: number;
|
|
82
|
-
algorithm: ID;
|
|
87
|
+
algorithm: AptlyProjectAlgorithmSchema<ID, DATE> | ID;
|
|
83
88
|
standard: boolean;
|
|
84
89
|
standardVariant?: ID;
|
|
85
90
|
partOfPackage?: ID;
|
package/models/unit-template.ts
CHANGED
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
} from '../enums';
|
|
6
6
|
import { AptlyProductSchema } from './product';
|
|
7
7
|
import { AptlyProducerSchema } from './producer';
|
|
8
|
+
import { AptlyMediaSrcSchema } from './media';
|
|
9
|
+
import { AptlyUpsellTemplateSchema } from './upsell-template';
|
|
10
|
+
import { AptlyProjectAlgorithmSchema, AptlyProjectPeriodSchema } from './project';
|
|
8
11
|
|
|
9
12
|
export type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
|
|
10
13
|
export interface AptlyUnitTemplateBaseSchema<ID, DATE> {
|
|
@@ -41,7 +44,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
|
41
44
|
text?: string;
|
|
42
45
|
isRoom: boolean;
|
|
43
46
|
size?: number;
|
|
44
|
-
upsellTemplate?: ID | null;
|
|
47
|
+
upsellTemplate?: AptlyUpsellTemplateSchema<ID, DATE> | ID | null;
|
|
45
48
|
_order_sections: ID[];
|
|
46
49
|
sections: AptlyUnitTemplateCategorySectionSchema<ID, DATE>[];
|
|
47
50
|
|
|
@@ -63,7 +66,7 @@ export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
|
|
|
63
66
|
packages: AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE>[];
|
|
64
67
|
_order_products: ID[];
|
|
65
68
|
products: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
66
|
-
period: ID;
|
|
69
|
+
period: AptlyProjectPeriodSchema<ID, DATE> | ID;
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
export type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
|
|
@@ -71,9 +74,11 @@ export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
|
|
|
71
74
|
_id: ID;
|
|
72
75
|
name: string;
|
|
73
76
|
standard: boolean;
|
|
74
|
-
image?: string;
|
|
77
|
+
image?: string | null;
|
|
78
|
+
imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
|
|
75
79
|
description?: string;
|
|
76
80
|
_product_order?: ID[];
|
|
81
|
+
products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
export type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
|
|
@@ -91,7 +96,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
91
96
|
consequenceParam?: string;
|
|
92
97
|
amount: number;
|
|
93
98
|
unitCost?: number;
|
|
94
|
-
algorithm: ID;
|
|
99
|
+
algorithm: AptlyProjectAlgorithmSchema<ID, DATE> | ID;
|
|
95
100
|
standard: boolean;
|
|
96
101
|
standardVariant?: ID;
|
|
97
102
|
partOfPackage?: ID;
|