@aptly-as/types 1.2.1 → 1.3.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/enums/index.d.ts +10 -0
- package/enums/index.js +12 -0
- package/enums/index.js.map +1 -1
- package/enums/index.ts +12 -0
- package/models/document.d.ts +1 -0
- package/models/document.ts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/models/index.js.map +1 -1
- package/models/index.ts +1 -0
- package/models/option-label.d.ts +2 -1
- package/models/option-label.ts +2 -1
- package/models/page.d.ts +2 -1
- package/models/page.ts +2 -1
- package/models/product.d.ts +1 -0
- package/models/product.ts +1 -0
- package/models/queue-download.d.ts +20 -0
- package/models/queue-download.js +3 -0
- package/models/queue-download.js.map +1 -0
- package/models/queue-download.ts +24 -0
- package/models/recommendation.d.ts +5 -2
- package/models/recommendation.ts +5 -2
- package/models/unit-template.d.ts +7 -5
- package/models/unit-template.ts +7 -5
- package/models/upsell-template.d.ts +7 -2
- package/models/upsell-template.ts +7 -2
- package/package.json +9 -8
package/enums/index.d.ts
CHANGED
|
@@ -82,3 +82,13 @@ export declare enum AptlyErrorCode {
|
|
|
82
82
|
InvalidFields = "invalid-fields",
|
|
83
83
|
SessionExpired = "session-expired"
|
|
84
84
|
}
|
|
85
|
+
export declare enum AptlyQueueDownloadType {
|
|
86
|
+
Document = "document",
|
|
87
|
+
Image = "image"
|
|
88
|
+
}
|
|
89
|
+
export declare enum AptlyQueueDownloadStatus {
|
|
90
|
+
Queued = "queued",
|
|
91
|
+
Downloading = "downloading",
|
|
92
|
+
Downloaded = "downloaded",
|
|
93
|
+
Error = "error"
|
|
94
|
+
}
|
package/enums/index.js
CHANGED
|
@@ -100,4 +100,16 @@ var AptlyErrorCode;
|
|
|
100
100
|
AptlyErrorCode["InvalidFields"] = "invalid-fields";
|
|
101
101
|
AptlyErrorCode["SessionExpired"] = "session-expired";
|
|
102
102
|
})(AptlyErrorCode = exports.AptlyErrorCode || (exports.AptlyErrorCode = {}));
|
|
103
|
+
var AptlyQueueDownloadType;
|
|
104
|
+
(function (AptlyQueueDownloadType) {
|
|
105
|
+
AptlyQueueDownloadType["Document"] = "document";
|
|
106
|
+
AptlyQueueDownloadType["Image"] = "image";
|
|
107
|
+
})(AptlyQueueDownloadType = exports.AptlyQueueDownloadType || (exports.AptlyQueueDownloadType = {}));
|
|
108
|
+
var AptlyQueueDownloadStatus;
|
|
109
|
+
(function (AptlyQueueDownloadStatus) {
|
|
110
|
+
AptlyQueueDownloadStatus["Queued"] = "queued";
|
|
111
|
+
AptlyQueueDownloadStatus["Downloading"] = "downloading";
|
|
112
|
+
AptlyQueueDownloadStatus["Downloaded"] = "downloaded";
|
|
113
|
+
AptlyQueueDownloadStatus["Error"] = "error";
|
|
114
|
+
})(AptlyQueueDownloadStatus = exports.AptlyQueueDownloadStatus || (exports.AptlyQueueDownloadStatus = {}));
|
|
103
115
|
//# sourceMappingURL=index.js.map
|
package/enums/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AACA,gCAA2B;AAC3B,qCAAgC;AAChC,+BAA0B;AAE1B,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,+CAA2B,CAAA;IAC3B,yDAAqC,CAAA;IACrC,iEAA6C,CAAA;IAC7C,qCAAiB,CAAA;IACjB,iDAA6B,CAAA;IAC7B,yDAAqC,CAAA;IACrC,uCAAmB,CAAA;AACrB,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAED,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,yDAAiC,CAAA;IACjC,uCAAe,CAAA;IACf,2CAAmB,CAAA;IACnB,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,uCAAe,CAAA;IACf,yCAAiB,CAAA;AACnB,CAAC,EARW,oBAAoB,GAApB,4B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CAAqB,CAAA;IACrB,uCAAiB,CAAA;AACnB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AAED,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,oDAAqB,CAAA;IACrB,wDAAyB,CAAA;IACzB,wDAAyB,CAAA;IACzB,0DAA2B,CAAA;AAC7B,CAAC,EALW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAKtC;AAED,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,oCAAW,CAAA;IACX,wCAAe,CAAA;IACf,8CAAqB,CAAA;AACvB,CAAC,EALW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAKhC;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,sDAA6B,CAAA;IAC7B,8CAAqB,CAAA;IACrB,wCAAe,CAAA;AACjB,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,kDAAgC,CAAA;IAChC,oDAAkC,CAAA;AACpC,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,+CAAqB,CAAA;IACrB,yCAAe,CAAA;AACjB,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAED,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,6CAAiB,CAAA;IACjB,uDAA2B,CAAA;IAC3B,qDAAyB,CAAA;IACzB,2CAAe,CAAA;AACjB,CAAC,EALW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAKnC"}
|
package/enums/index.ts
CHANGED
|
@@ -95,4 +95,16 @@ export enum AptlySignageSignerRef {
|
|
|
95
95
|
export enum AptlyErrorCode {
|
|
96
96
|
InvalidFields = 'invalid-fields',
|
|
97
97
|
SessionExpired = 'session-expired'
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export enum AptlyQueueDownloadType {
|
|
101
|
+
Document = 'document',
|
|
102
|
+
Image = 'image',
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export enum AptlyQueueDownloadStatus {
|
|
106
|
+
Queued = 'queued',
|
|
107
|
+
Downloading = 'downloading',
|
|
108
|
+
Downloaded = 'downloaded',
|
|
109
|
+
Error = 'error',
|
|
98
110
|
}
|
package/models/document.d.ts
CHANGED
package/models/document.ts
CHANGED
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __export(require("./producer"));
|
|
|
18
18
|
__export(require("./product"));
|
|
19
19
|
__export(require("./product-stats"));
|
|
20
20
|
__export(require("./project"));
|
|
21
|
+
__export(require("./queue-download"));
|
|
21
22
|
__export(require("./recommendation"));
|
|
22
23
|
__export(require("./supplier"));
|
|
23
24
|
__export(require("./tag"));
|
package/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AACA,+BAA0B;AAC1B,8BAAyB;AACzB,gCAA2B;AAC3B,+BAA0B;AAC1B,+BAA0B;AAC1B,6BAAwB;AACxB,4CAAuC;AACvC,oCAA+B;AAC/B,6BAAwB;AACxB,oCAA+B;AAC/B,4BAAuB;AACvB,gCAA2B;AAC3B,+BAA0B;AAC1B,qCAAgC;AAChC,+BAA0B;AAC1B,sCAAiC;AACjC,gCAA2B;AAC3B,2BAAsB;AACtB,4BAAuB;AACvB,qCAAgC;AAChC,kCAA6B;AAC7B,uCAAkC;AAClC,4BAAuB;AACvB,+BAA0B;AAC1B,qCAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AACA,+BAA0B;AAC1B,8BAAyB;AACzB,gCAA2B;AAC3B,+BAA0B;AAC1B,+BAA0B;AAC1B,6BAAwB;AACxB,4CAAuC;AACvC,oCAA+B;AAC/B,6BAAwB;AACxB,oCAA+B;AAC/B,4BAAuB;AACvB,gCAA2B;AAC3B,+BAA0B;AAC1B,qCAAgC;AAChC,+BAA0B;AAC1B,sCAAiC;AACjC,sCAAiC;AACjC,gCAA2B;AAC3B,2BAAsB;AACtB,4BAAuB;AACvB,qCAAgC;AAChC,kCAA6B;AAC7B,uCAAkC;AAClC,4BAAuB;AACvB,+BAA0B;AAC1B,qCAAgC"}
|
package/models/index.ts
CHANGED
package/models/option-label.d.ts
CHANGED
package/models/option-label.ts
CHANGED
package/models/page.d.ts
CHANGED
|
@@ -5,12 +5,13 @@ export interface AptlyPageSchema<ID, DATE> {
|
|
|
5
5
|
slug: string;
|
|
6
6
|
name: string;
|
|
7
7
|
project: ID;
|
|
8
|
+
organization: ID;
|
|
8
9
|
showInMenu: boolean;
|
|
9
10
|
summary: string;
|
|
10
11
|
icon?: string;
|
|
11
12
|
legacy?: string;
|
|
12
13
|
image?: string;
|
|
13
|
-
upsellTemplate
|
|
14
|
+
upsellTemplate?: ID | null;
|
|
14
15
|
sections: AptlyPageSectionSchema<ID, DATE>[];
|
|
15
16
|
archived?: boolean;
|
|
16
17
|
}
|
package/models/page.ts
CHANGED
|
@@ -6,12 +6,13 @@ export interface AptlyPageSchema<ID, DATE> {
|
|
|
6
6
|
slug: string;
|
|
7
7
|
name: string;
|
|
8
8
|
project: ID;
|
|
9
|
+
organization: ID;
|
|
9
10
|
showInMenu: boolean;
|
|
10
11
|
summary: string;
|
|
11
12
|
icon?: string;
|
|
12
13
|
legacy?: string; // Deprecated
|
|
13
14
|
image?: string; // Deprecated
|
|
14
|
-
upsellTemplate
|
|
15
|
+
upsellTemplate?: ID | null;
|
|
15
16
|
sections: AptlyPageSectionSchema<ID, DATE>[];
|
|
16
17
|
archived?: boolean;
|
|
17
18
|
}
|
package/models/product.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
|
|
|
13
13
|
description: string;
|
|
14
14
|
images: AptlyProductImageSchema<ID, DATE>[];
|
|
15
15
|
variants: AptlyProductVariantSchema<ID, DATE>[];
|
|
16
|
+
url?: string;
|
|
16
17
|
color?: string;
|
|
17
18
|
colorLabel?: string;
|
|
18
19
|
series?: string;
|
package/models/product.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
|
|
|
14
14
|
description: string;
|
|
15
15
|
images: AptlyProductImageSchema<ID, DATE>[];
|
|
16
16
|
variants: AptlyProductVariantSchema<ID, DATE>[];
|
|
17
|
+
url?: string;
|
|
17
18
|
color?: string;
|
|
18
19
|
colorLabel?: string;
|
|
19
20
|
series?: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AptlyQueueDownloadStatus, AptlyQueueDownloadType } from '../enums/index';
|
|
2
|
+
import { AptlyDocumentSchema } from './document';
|
|
3
|
+
import { AptlyMediaSchema } from './media';
|
|
4
|
+
export declare type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
|
|
5
|
+
export interface AptlyQueueDownloadSchema<ID, DATE> {
|
|
6
|
+
_id: ID;
|
|
7
|
+
url: string;
|
|
8
|
+
type: AptlyQueueDownloadType;
|
|
9
|
+
status: AptlyQueueDownloadStatus;
|
|
10
|
+
error?: string;
|
|
11
|
+
organization?: ID;
|
|
12
|
+
project?: ID;
|
|
13
|
+
unit?: ID;
|
|
14
|
+
product?: ID;
|
|
15
|
+
productVariant?: ID;
|
|
16
|
+
document?: Partial<Pick<AptlyDocumentSchema<ID, DATE>, '_type' | 'name'>> | null;
|
|
17
|
+
media?: Partial<Pick<AptlyMediaSchema<ID, DATE>, 'name'>> | null;
|
|
18
|
+
createdAt: DATE;
|
|
19
|
+
updatedAt: DATE;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue-download.js","sourceRoot":"","sources":["queue-download.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AptlyQueueDownloadStatus, AptlyQueueDownloadType } from '../enums/index';
|
|
2
|
+
import { AptlyDocumentSchema } from './document';
|
|
3
|
+
import { AptlyMediaSchema } from './media';
|
|
4
|
+
|
|
5
|
+
export type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
|
|
6
|
+
export interface AptlyQueueDownloadSchema<ID, DATE> {
|
|
7
|
+
_id: ID;
|
|
8
|
+
url: string;
|
|
9
|
+
type: AptlyQueueDownloadType;
|
|
10
|
+
status: AptlyQueueDownloadStatus;
|
|
11
|
+
error?: string;
|
|
12
|
+
|
|
13
|
+
organization?: ID;
|
|
14
|
+
project?: ID;
|
|
15
|
+
unit?: ID;
|
|
16
|
+
product?: ID;
|
|
17
|
+
productVariant?: ID;
|
|
18
|
+
|
|
19
|
+
document?: Partial<Pick<AptlyDocumentSchema<ID, DATE>, '_type' | 'name'>> | null;
|
|
20
|
+
media?: Partial<Pick<AptlyMediaSchema<ID, DATE>, 'name'>> | null;
|
|
21
|
+
|
|
22
|
+
createdAt: DATE;
|
|
23
|
+
updatedAt: DATE;
|
|
24
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { AptlyMediaSrc } from './media';
|
|
1
2
|
export declare type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
|
|
2
3
|
export interface AptlyRecommendationSchema<ID, DATE> {
|
|
3
4
|
_id: ID;
|
|
4
|
-
|
|
5
|
+
organization?: ID;
|
|
6
|
+
project?: ID;
|
|
5
7
|
title: string;
|
|
6
8
|
name: string;
|
|
7
9
|
color: string;
|
|
8
10
|
text: string;
|
|
9
|
-
image
|
|
11
|
+
image?: string | null;
|
|
12
|
+
imageMedia?: AptlyMediaSrc | null;
|
|
10
13
|
archived?: boolean;
|
|
11
14
|
}
|
package/models/recommendation.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { AptlyMediaSrc } from './media';
|
|
1
2
|
|
|
2
3
|
export type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
|
|
3
4
|
export interface AptlyRecommendationSchema<ID, DATE> {
|
|
4
5
|
_id: ID;
|
|
5
|
-
|
|
6
|
+
organization?: ID;
|
|
7
|
+
project?: ID;
|
|
6
8
|
title: string;
|
|
7
9
|
name: string;
|
|
8
10
|
color: string;
|
|
9
11
|
text: string;
|
|
10
|
-
image
|
|
12
|
+
image?: string | null;
|
|
13
|
+
imageMedia?: AptlyMediaSrc | null;
|
|
11
14
|
archived?: boolean;
|
|
12
15
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AptlyHistorySchema } from './extends';
|
|
2
2
|
import { AptlyCategorySectionDisplayType, AptlyUnitTemplateCategorySectionProductMeasureUnitType, AptlyUnitTemplateCategorySectionProductParamKey } from '../enums';
|
|
3
|
+
import { AptlyProductSchema } from './product';
|
|
4
|
+
import { AptlyProducerSchema } from './producer';
|
|
3
5
|
export declare type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
|
|
4
6
|
export interface AptlyUnitTemplateBaseSchema<ID, DATE> {
|
|
5
7
|
_id: ID;
|
|
@@ -31,7 +33,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
|
31
33
|
text?: string;
|
|
32
34
|
isRoom: boolean;
|
|
33
35
|
size?: number;
|
|
34
|
-
upsellTemplate?: ID;
|
|
36
|
+
upsellTemplate?: ID | null;
|
|
35
37
|
_order_sections: ID[];
|
|
36
38
|
sections: AptlyUnitTemplateCategorySectionSchema<ID, DATE>[];
|
|
37
39
|
/**
|
|
@@ -66,8 +68,8 @@ export declare type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateC
|
|
|
66
68
|
export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
67
69
|
_id: ID;
|
|
68
70
|
_orderID: ID;
|
|
69
|
-
product?: ID
|
|
70
|
-
producer?: ID
|
|
71
|
+
product?: ID | AptlyProductSchema<ID, DATE>;
|
|
72
|
+
producer?: ID | AptlyProducerSchema<ID, DATE>;
|
|
71
73
|
availableProducts: ID[];
|
|
72
74
|
variantPrices: AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID>[];
|
|
73
75
|
text?: string;
|
|
@@ -81,12 +83,12 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
81
83
|
standard: boolean;
|
|
82
84
|
standardVariant?: ID;
|
|
83
85
|
partOfPackage?: ID;
|
|
84
|
-
supplier?: ID;
|
|
86
|
+
supplier?: ID | null;
|
|
85
87
|
customTitle?: string;
|
|
86
88
|
customDescription?: string;
|
|
87
89
|
notifyWhenPicked?: boolean;
|
|
88
90
|
onlyShowInSelection?: boolean;
|
|
89
|
-
recommendation?: ID;
|
|
91
|
+
recommendation?: ID | null;
|
|
90
92
|
labels?: ID[];
|
|
91
93
|
params: AptlyUnitTemplateCategorySectionProductParamSchema<ID>[];
|
|
92
94
|
/**
|
package/models/unit-template.ts
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
AptlyCategorySectionDisplayType, AptlyUnitTemplateCategorySectionProductMeasureUnitType,
|
|
4
4
|
AptlyUnitTemplateCategorySectionProductParamKey
|
|
5
5
|
} from '../enums';
|
|
6
|
+
import { AptlyProductSchema } from './product';
|
|
7
|
+
import { AptlyProducerSchema } from './producer';
|
|
6
8
|
|
|
7
9
|
export type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
|
|
8
10
|
export interface AptlyUnitTemplateBaseSchema<ID, DATE> {
|
|
@@ -39,7 +41,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
|
|
|
39
41
|
text?: string;
|
|
40
42
|
isRoom: boolean;
|
|
41
43
|
size?: number;
|
|
42
|
-
upsellTemplate?: ID;
|
|
44
|
+
upsellTemplate?: ID | null;
|
|
43
45
|
_order_sections: ID[];
|
|
44
46
|
sections: AptlyUnitTemplateCategorySectionSchema<ID, DATE>[];
|
|
45
47
|
|
|
@@ -78,8 +80,8 @@ export type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategoryS
|
|
|
78
80
|
export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
79
81
|
_id: ID;
|
|
80
82
|
_orderID: ID;
|
|
81
|
-
product?: ID
|
|
82
|
-
producer?: ID
|
|
83
|
+
product?: ID | AptlyProductSchema<ID, DATE>;
|
|
84
|
+
producer?: ID | AptlyProducerSchema<ID, DATE>;
|
|
83
85
|
availableProducts: ID[];
|
|
84
86
|
variantPrices: AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID>[];
|
|
85
87
|
text?: string;
|
|
@@ -93,12 +95,12 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
93
95
|
standard: boolean;
|
|
94
96
|
standardVariant?: ID;
|
|
95
97
|
partOfPackage?: ID;
|
|
96
|
-
supplier?: ID;
|
|
98
|
+
supplier?: ID | null;
|
|
97
99
|
customTitle?: string;
|
|
98
100
|
customDescription?: string;
|
|
99
101
|
notifyWhenPicked?: boolean;
|
|
100
102
|
onlyShowInSelection?: boolean;
|
|
101
|
-
recommendation?: ID;
|
|
103
|
+
recommendation?: ID | null;
|
|
102
104
|
labels?: ID[];
|
|
103
105
|
params: AptlyUnitTemplateCategorySectionProductParamSchema<ID>[];
|
|
104
106
|
|
|
@@ -3,12 +3,17 @@ export declare type AptlyUpsellTemplate = AptlyUpsellTemplateSchema<string, stri
|
|
|
3
3
|
export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyHistorySchema<ID, DATE> {
|
|
4
4
|
_id: ID;
|
|
5
5
|
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated not used.. Only for frontend
|
|
8
|
+
*/
|
|
6
9
|
description: string;
|
|
7
|
-
image?: string;
|
|
10
|
+
image?: string | null;
|
|
11
|
+
imageMedia?: string | null;
|
|
8
12
|
videoEmbed?: string;
|
|
9
13
|
text?: string;
|
|
10
14
|
links: ID[];
|
|
11
|
-
|
|
15
|
+
organization?: ID;
|
|
16
|
+
project?: ID;
|
|
12
17
|
created: DATE;
|
|
13
18
|
archived: boolean;
|
|
14
19
|
}
|
|
@@ -4,12 +4,17 @@ export type AptlyUpsellTemplate = AptlyUpsellTemplateSchema<string, string>;
|
|
|
4
4
|
export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyHistorySchema<ID, DATE> {
|
|
5
5
|
_id: ID;
|
|
6
6
|
name: string;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated not used.. Only for frontend
|
|
9
|
+
*/
|
|
7
10
|
description: string;
|
|
8
|
-
image?: string;
|
|
11
|
+
image?: string | null;
|
|
12
|
+
imageMedia?: string | null;
|
|
9
13
|
videoEmbed?: string;
|
|
10
14
|
text?: string;
|
|
11
15
|
links: ID[];
|
|
12
|
-
|
|
16
|
+
organization?: ID;
|
|
17
|
+
project?: ID;
|
|
13
18
|
created: DATE;
|
|
14
19
|
archived: boolean;
|
|
15
20
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptly-as/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Aptly types and enums",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
|
+
"author": "Emil A. Olsen <emil@aptly.as>",
|
|
7
8
|
"engines": {
|
|
8
9
|
"node": ">14.0.0"
|
|
9
10
|
},
|
|
@@ -18,6 +19,10 @@
|
|
|
18
19
|
"postversion": "git push && git push --tags",
|
|
19
20
|
"prepublish": "npm run build"
|
|
20
21
|
},
|
|
22
|
+
"dependencies": {},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^4.2.4"
|
|
25
|
+
},
|
|
21
26
|
"repository": {
|
|
22
27
|
"type": "git",
|
|
23
28
|
"url": "git+https://github.com/aptly-as/types.git"
|
|
@@ -27,11 +32,10 @@
|
|
|
27
32
|
"aptly",
|
|
28
33
|
"types"
|
|
29
34
|
],
|
|
30
|
-
"author": "Emil A. Olsen",
|
|
31
35
|
"bugs": {
|
|
32
|
-
"url": "https://github.com/aptly-as/
|
|
36
|
+
"url": "https://github.com/aptly-as/types/issues"
|
|
33
37
|
},
|
|
34
|
-
"homepage": "https://github.com/aptly-as/
|
|
38
|
+
"homepage": "https://github.com/aptly-as/types#readme",
|
|
35
39
|
"files": [
|
|
36
40
|
"core",
|
|
37
41
|
"enums",
|
|
@@ -40,8 +44,5 @@
|
|
|
40
44
|
"index.d.ts",
|
|
41
45
|
"index.js",
|
|
42
46
|
"index.js.map"
|
|
43
|
-
]
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"typescript": "^4.2.4"
|
|
46
|
-
}
|
|
47
|
+
]
|
|
47
48
|
}
|