@esri/hub-common 13.16.0 → 13.17.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/dist/esm/core/schemas/shared/HubItemEntitySchema.js +31 -0
- package/dist/esm/core/schemas/shared/HubItemEntitySchema.js.map +1 -0
- package/dist/esm/core/schemas/shared/subschemas.js +27 -6
- package/dist/esm/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/esm/discussions/_internal/DiscussionSchema.js +3 -40
- package/dist/esm/discussions/_internal/DiscussionSchema.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +2 -26
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +5 -45
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/sites/_internal/SiteSchema.js +2 -26
- package/dist/esm/sites/_internal/SiteSchema.js.map +1 -1
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js +34 -0
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js.map +1 -0
- package/dist/node/core/schemas/shared/subschemas.js +28 -7
- package/dist/node/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/node/discussions/_internal/DiscussionSchema.js +3 -40
- package/dist/node/discussions/_internal/DiscussionSchema.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +2 -26
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +5 -45
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/sites/_internal/SiteSchema.js +2 -26
- package/dist/node/sites/_internal/SiteSchema.js.map +1 -1
- package/dist/types/core/schemas/shared/HubItemEntitySchema.d.ts +7 -0
- package/dist/types/core/schemas/shared/subschemas.d.ts +34 -11
- package/dist/types/core/traits/IWithViewSettings.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ENTITY_ACCESS_SCHEMA, ENTITY_CATEGORIES_SCHEMA, ENTITY_FEATURED_CONTENT_SCHEMA, ENTITY_IMAGE_SCHEMA, ENTITY_IS_DISCUSSABLE_SCHEMA, ENTITY_LOCATION_SCHEMA, ENTITY_NAME_SCHEMA, ENTITY_SUMMARY_SCHEMA, ENTITY_TAGS_SCHEMA, ENTITY_TIMELINE_SCHEMA, } from "./subschemas";
|
|
2
|
+
/**
|
|
3
|
+
* Defines a default schema for an IHubItemEntity's editiable fields.
|
|
4
|
+
* All item entity schemas should leverage this base schema.
|
|
5
|
+
* Reference the Project or Initiative schemas as an example
|
|
6
|
+
*/
|
|
7
|
+
export const HubItemEntitySchema = {
|
|
8
|
+
type: "object",
|
|
9
|
+
required: ["name"],
|
|
10
|
+
properties: {
|
|
11
|
+
name: ENTITY_NAME_SCHEMA,
|
|
12
|
+
summary: ENTITY_SUMMARY_SCHEMA,
|
|
13
|
+
description: { type: "string" },
|
|
14
|
+
access: ENTITY_ACCESS_SCHEMA,
|
|
15
|
+
location: ENTITY_LOCATION_SCHEMA,
|
|
16
|
+
tags: ENTITY_TAGS_SCHEMA,
|
|
17
|
+
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
18
|
+
isDiscussable: ENTITY_IS_DISCUSSABLE_SCHEMA,
|
|
19
|
+
view: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
featuredContentIds: ENTITY_FEATURED_CONTENT_SCHEMA,
|
|
23
|
+
featuredImage: ENTITY_IMAGE_SCHEMA,
|
|
24
|
+
featuredImageAltText: { type: "string" },
|
|
25
|
+
featuredImageName: { type: "string" },
|
|
26
|
+
timeline: ENTITY_TIMELINE_SCHEMA,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=HubItemEntitySchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HubItemEntitySchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/HubItemEntitySchema.ts"],"names":[],"mappings":"AACA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAyB;IACvD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACV,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,qBAAqB;QAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,MAAM,EAAE,oBAAoB;QAC5B,QAAQ,EAAE,sBAAsB;QAChC,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,wBAAwB;QACpC,aAAa,EAAE,4BAA4B;QAC3C,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE,8BAA8B;gBAClD,aAAa,EAAE,mBAAmB;gBAClC,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxC,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACrC,QAAQ,EAAE,sBAAsB;aACjC;SACF;KACF;CACsB,CAAC"}
|
|
@@ -28,14 +28,35 @@ export const ENTITY_CATEGORIES_SCHEMA = {
|
|
|
28
28
|
type: "string",
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
|
-
export const
|
|
31
|
+
export const ENTITY_IS_DISCUSSABLE_SCHEMA = {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
enum: [true, false],
|
|
34
|
+
default: true,
|
|
35
|
+
};
|
|
36
|
+
export const ENTITY_FEATURED_CONTENT_SCHEMA = {
|
|
37
|
+
type: "array",
|
|
38
|
+
maxItems: 4,
|
|
39
|
+
items: {
|
|
40
|
+
type: "string",
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const ENTITY_LOCATION_SCHEMA = {
|
|
44
|
+
type: "object",
|
|
45
|
+
default: { type: "none" },
|
|
46
|
+
};
|
|
47
|
+
export const ENTITY_IMAGE_SCHEMA = {
|
|
32
48
|
type: "object",
|
|
33
49
|
properties: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
base64: { type: "string" },
|
|
51
|
+
format: { type: "string" },
|
|
52
|
+
fileName: { type: "string" },
|
|
53
|
+
blob: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
type: { type: "string" },
|
|
57
|
+
size: { type: "number" },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
39
60
|
},
|
|
40
61
|
};
|
|
41
62
|
export const ENTITY_TIMELINE_SCHEMA = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subschemas.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/subschemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;IAClC,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB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F;CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HubItemEntitySchema } from "../../core/schemas/shared/HubItemEntitySchema";
|
|
2
2
|
export const DiscussionEditorTypes = [
|
|
3
3
|
"hub:discussion:edit",
|
|
4
4
|
"hub:discussion:create",
|
|
@@ -6,45 +6,8 @@ export const DiscussionEditorTypes = [
|
|
|
6
6
|
/**
|
|
7
7
|
* defines the JSON schema for a Discussion's editable fields
|
|
8
8
|
*/
|
|
9
|
-
export const DiscussionSchema = {
|
|
10
|
-
required: ["name"],
|
|
11
|
-
type: "object",
|
|
12
|
-
properties: {
|
|
13
|
-
name: ENTITY_NAME_SCHEMA,
|
|
14
|
-
prompt: {
|
|
9
|
+
export const DiscussionSchema = Object.assign(Object.assign({}, HubItemEntitySchema), { properties: Object.assign(Object.assign({}, HubItemEntitySchema.properties), { prompt: {
|
|
15
10
|
type: "string",
|
|
16
11
|
default: "We want to hear from you!",
|
|
17
|
-
}
|
|
18
|
-
summary: {
|
|
19
|
-
type: "string",
|
|
20
|
-
},
|
|
21
|
-
description: {
|
|
22
|
-
type: "string",
|
|
23
|
-
},
|
|
24
|
-
location: {
|
|
25
|
-
type: "object",
|
|
26
|
-
},
|
|
27
|
-
tags: ENTITY_TAGS_SCHEMA,
|
|
28
|
-
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
29
|
-
isDiscussable: {
|
|
30
|
-
type: "boolean",
|
|
31
|
-
enum: [true, false],
|
|
32
|
-
default: true,
|
|
33
|
-
},
|
|
34
|
-
view: {
|
|
35
|
-
type: "object",
|
|
36
|
-
properties: {
|
|
37
|
-
featuredImage: {
|
|
38
|
-
type: "object",
|
|
39
|
-
},
|
|
40
|
-
featuredImageName: {
|
|
41
|
-
type: "string",
|
|
42
|
-
},
|
|
43
|
-
featuredImageAltText: {
|
|
44
|
-
type: "string",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
|
12
|
+
} }) });
|
|
50
13
|
//# sourceMappingURL=DiscussionSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAGpF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;CACf,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyB,gCACjD,mBAAmB,KACtB,UAAU,kCACL,mBAAmB,CAAC,UAAU,KACjC,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B;SACrC,MAEoB,CAAC"}
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HubItemEntitySchema } from "../../core/schemas/shared/HubItemEntitySchema";
|
|
2
2
|
export const InitiativeEditorTypes = ["hub:initiative:edit"];
|
|
3
3
|
/**
|
|
4
4
|
* defines the JSON schema for a Hub Initiative's editable fields
|
|
5
5
|
*/
|
|
6
|
-
export const InitiativeSchema = {
|
|
7
|
-
required: ["name"],
|
|
8
|
-
type: "object",
|
|
9
|
-
properties: {
|
|
10
|
-
name: ENTITY_NAME_SCHEMA,
|
|
11
|
-
summary: {
|
|
12
|
-
type: "string",
|
|
13
|
-
},
|
|
14
|
-
description: {
|
|
15
|
-
type: "string",
|
|
16
|
-
},
|
|
17
|
-
access: ENTITY_ACCESS_SCHEMA,
|
|
18
|
-
groups: {
|
|
19
|
-
type: "array",
|
|
20
|
-
items: {
|
|
21
|
-
type: "string",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
location: {
|
|
25
|
-
type: "object",
|
|
26
|
-
},
|
|
27
|
-
tags: ENTITY_TAGS_SCHEMA,
|
|
28
|
-
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
6
|
+
export const InitiativeSchema = Object.assign({}, HubItemEntitySchema);
|
|
31
7
|
//# sourceMappingURL=InitiativeSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAGpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,qBAAqB,CAAU,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyB,kBACjD,mBAAmB,CACC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PROJECT_STATUSES } from "../../core";
|
|
2
|
-
import {
|
|
2
|
+
import { HubItemEntitySchema } from "../../core/schemas/shared/HubItemEntitySchema";
|
|
3
3
|
export const ProjectEditorTypes = [
|
|
4
4
|
"hub:project:create",
|
|
5
5
|
"hub:project:edit",
|
|
@@ -7,52 +7,12 @@ export const ProjectEditorTypes = [
|
|
|
7
7
|
/**
|
|
8
8
|
* defines the JSON schema for a Hub Project's editable fields
|
|
9
9
|
*/
|
|
10
|
-
export const ProjectSchema = {
|
|
11
|
-
required: ["name"],
|
|
12
|
-
type: "object",
|
|
13
|
-
properties: {
|
|
14
|
-
name: ENTITY_NAME_SCHEMA,
|
|
15
|
-
summary: ENTITY_SUMMARY_SCHEMA,
|
|
16
|
-
description: {
|
|
17
|
-
type: "string",
|
|
18
|
-
},
|
|
19
|
-
access: ENTITY_ACCESS_SCHEMA,
|
|
20
|
-
groups: {
|
|
10
|
+
export const ProjectSchema = Object.assign(Object.assign({}, HubItemEntitySchema), { properties: Object.assign(Object.assign({}, HubItemEntitySchema.properties), { groups: {
|
|
21
11
|
type: "array",
|
|
22
|
-
items: {
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
status: {
|
|
12
|
+
items: { type: "string" },
|
|
13
|
+
}, status: {
|
|
27
14
|
type: "string",
|
|
28
15
|
default: PROJECT_STATUSES.notStarted,
|
|
29
16
|
enum: Object.keys(PROJECT_STATUSES),
|
|
30
|
-
}
|
|
31
|
-
location: {
|
|
32
|
-
type: "object",
|
|
33
|
-
default: { type: "none" },
|
|
34
|
-
},
|
|
35
|
-
tags: ENTITY_TAGS_SCHEMA,
|
|
36
|
-
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
37
|
-
view: {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
featuredContentIds: {
|
|
41
|
-
type: "array",
|
|
42
|
-
maxItems: 4,
|
|
43
|
-
items: {
|
|
44
|
-
type: "string",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
featuredImage: {
|
|
48
|
-
type: "object",
|
|
49
|
-
},
|
|
50
|
-
featuredImageAltText: {
|
|
51
|
-
type: "string",
|
|
52
|
-
},
|
|
53
|
-
timeline: ENTITY_TIMELINE_SCHEMA,
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
17
|
+
} }) });
|
|
58
18
|
//# sourceMappingURL=ProjectSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAwB,MAAM,YAAY,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAwB,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAGpF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAyB,gCAC9C,mBAAmB,KACtB,UAAU,kCACL,mBAAmB,CAAC,UAAU,KACjC,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,gBAAgB,CAAC,UAAU;YACpC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACpC,MAEoB,CAAC"}
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HubItemEntitySchema } from "../../core/schemas/shared/HubItemEntitySchema";
|
|
2
2
|
export const SiteEditorTypes = ["hub:site:edit"];
|
|
3
3
|
/**
|
|
4
4
|
* defines the JSON schema for a Hub Site's editable fields
|
|
5
5
|
*/
|
|
6
|
-
export const SiteSchema = {
|
|
7
|
-
required: ["name"],
|
|
8
|
-
type: "object",
|
|
9
|
-
properties: {
|
|
10
|
-
name: ENTITY_NAME_SCHEMA,
|
|
11
|
-
summary: {
|
|
12
|
-
type: "string",
|
|
13
|
-
},
|
|
14
|
-
description: {
|
|
15
|
-
type: "string",
|
|
16
|
-
},
|
|
17
|
-
access: ENTITY_ACCESS_SCHEMA,
|
|
18
|
-
groups: {
|
|
19
|
-
type: "array",
|
|
20
|
-
items: {
|
|
21
|
-
type: "string",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
location: {
|
|
25
|
-
type: "object",
|
|
26
|
-
},
|
|
27
|
-
tags: ENTITY_TAGS_SCHEMA,
|
|
28
|
-
categories: ENTITY_CATEGORIES_SCHEMA,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
6
|
+
export const SiteSchema = Object.assign({}, HubItemEntitySchema);
|
|
31
7
|
//# sourceMappingURL=SiteSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteSchema.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteSchema.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"SiteSchema.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAGpF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,eAAe,CAAU,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyB,kBAC3C,mBAAmB,CACC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HubItemEntitySchema = void 0;
|
|
4
|
+
const subschemas_1 = require("./subschemas");
|
|
5
|
+
/**
|
|
6
|
+
* Defines a default schema for an IHubItemEntity's editiable fields.
|
|
7
|
+
* All item entity schemas should leverage this base schema.
|
|
8
|
+
* Reference the Project or Initiative schemas as an example
|
|
9
|
+
*/
|
|
10
|
+
exports.HubItemEntitySchema = {
|
|
11
|
+
type: "object",
|
|
12
|
+
required: ["name"],
|
|
13
|
+
properties: {
|
|
14
|
+
name: subschemas_1.ENTITY_NAME_SCHEMA,
|
|
15
|
+
summary: subschemas_1.ENTITY_SUMMARY_SCHEMA,
|
|
16
|
+
description: { type: "string" },
|
|
17
|
+
access: subschemas_1.ENTITY_ACCESS_SCHEMA,
|
|
18
|
+
location: subschemas_1.ENTITY_LOCATION_SCHEMA,
|
|
19
|
+
tags: subschemas_1.ENTITY_TAGS_SCHEMA,
|
|
20
|
+
categories: subschemas_1.ENTITY_CATEGORIES_SCHEMA,
|
|
21
|
+
isDiscussable: subschemas_1.ENTITY_IS_DISCUSSABLE_SCHEMA,
|
|
22
|
+
view: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
featuredContentIds: subschemas_1.ENTITY_FEATURED_CONTENT_SCHEMA,
|
|
26
|
+
featuredImage: subschemas_1.ENTITY_IMAGE_SCHEMA,
|
|
27
|
+
featuredImageAltText: { type: "string" },
|
|
28
|
+
featuredImageName: { type: "string" },
|
|
29
|
+
timeline: subschemas_1.ENTITY_TIMELINE_SCHEMA,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=HubItemEntitySchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HubItemEntitySchema.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/HubItemEntitySchema.ts"],"names":[],"mappings":";;;AACA,6CAWsB;AAEtB;;;;GAIG;AACU,QAAA,mBAAmB,GAAyB;IACvD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACV,IAAI,EAAE,+BAAkB;QACxB,OAAO,EAAE,kCAAqB;QAC9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,MAAM,EAAE,iCAAoB;QAC5B,QAAQ,EAAE,mCAAsB;QAChC,IAAI,EAAE,+BAAkB;QACxB,UAAU,EAAE,qCAAwB;QACpC,aAAa,EAAE,yCAA4B;QAC3C,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,kBAAkB,EAAE,2CAA8B;gBAClD,aAAa,EAAE,gCAAmB;gBAClC,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxC,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACrC,QAAQ,EAAE,mCAAsB;aACjC;SACF;KACF;CACsB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* re-used subschemas in your schema definitions
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ENTITY_TIMELINE_SCHEMA = exports.
|
|
7
|
+
exports.ENTITY_TIMELINE_SCHEMA = exports.ENTITY_IMAGE_SCHEMA = exports.ENTITY_LOCATION_SCHEMA = exports.ENTITY_FEATURED_CONTENT_SCHEMA = exports.ENTITY_IS_DISCUSSABLE_SCHEMA = exports.ENTITY_CATEGORIES_SCHEMA = exports.ENTITY_TAGS_SCHEMA = exports.ENTITY_ACCESS_SCHEMA = exports.ENTITY_SUMMARY_SCHEMA = exports.ENTITY_NAME_SCHEMA = void 0;
|
|
8
8
|
exports.ENTITY_NAME_SCHEMA = {
|
|
9
9
|
type: "string",
|
|
10
10
|
minLength: 1,
|
|
@@ -31,14 +31,35 @@ exports.ENTITY_CATEGORIES_SCHEMA = {
|
|
|
31
31
|
type: "string",
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
exports.
|
|
34
|
+
exports.ENTITY_IS_DISCUSSABLE_SCHEMA = {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
enum: [true, false],
|
|
37
|
+
default: true,
|
|
38
|
+
};
|
|
39
|
+
exports.ENTITY_FEATURED_CONTENT_SCHEMA = {
|
|
40
|
+
type: "array",
|
|
41
|
+
maxItems: 4,
|
|
42
|
+
items: {
|
|
43
|
+
type: "string",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
exports.ENTITY_LOCATION_SCHEMA = {
|
|
47
|
+
type: "object",
|
|
48
|
+
default: { type: "none" },
|
|
49
|
+
};
|
|
50
|
+
exports.ENTITY_IMAGE_SCHEMA = {
|
|
35
51
|
type: "object",
|
|
36
52
|
properties: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
base64: { type: "string" },
|
|
54
|
+
format: { type: "string" },
|
|
55
|
+
fileName: { type: "string" },
|
|
56
|
+
blob: {
|
|
57
|
+
type: "object",
|
|
58
|
+
properties: {
|
|
59
|
+
type: { type: "string" },
|
|
60
|
+
size: { type: "number" },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
42
63
|
},
|
|
43
64
|
};
|
|
44
65
|
exports.ENTITY_TIMELINE_SCHEMA = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subschemas.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/subschemas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;CACf,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACnC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,IAAI;CAChB,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;IAClC,OAAO,EAAE,SAAS;CACnB,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;KACf;CACF,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;KACf;CACF,CAAC;AAEW,QAAA,
|
|
1
|
+
{"version":3,"file":"subschemas.js","sourceRoot":"","sources":["../../../../../src/core/schemas/shared/subschemas.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;CACf,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACnC,IAAI,EAAE,QAAQ;IACd,S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UAAU,EAAE;QACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAChC,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,oDAAoD;oBACpD,uCAAuC;oBACvC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7B,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACpC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1B,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,kDAAkD;4BAClD,2BAA2B;4BAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;yBAC1B;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiscussionSchema = exports.DiscussionEditorTypes = void 0;
|
|
4
|
-
const
|
|
4
|
+
const HubItemEntitySchema_1 = require("../../core/schemas/shared/HubItemEntitySchema");
|
|
5
5
|
exports.DiscussionEditorTypes = [
|
|
6
6
|
"hub:discussion:edit",
|
|
7
7
|
"hub:discussion:create",
|
|
@@ -9,45 +9,8 @@ exports.DiscussionEditorTypes = [
|
|
|
9
9
|
/**
|
|
10
10
|
* defines the JSON schema for a Discussion's editable fields
|
|
11
11
|
*/
|
|
12
|
-
exports.DiscussionSchema = {
|
|
13
|
-
required: ["name"],
|
|
14
|
-
type: "object",
|
|
15
|
-
properties: {
|
|
16
|
-
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
17
|
-
prompt: {
|
|
12
|
+
exports.DiscussionSchema = Object.assign(Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema), { properties: Object.assign(Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema.properties), { prompt: {
|
|
18
13
|
type: "string",
|
|
19
14
|
default: "We want to hear from you!",
|
|
20
|
-
}
|
|
21
|
-
summary: {
|
|
22
|
-
type: "string",
|
|
23
|
-
},
|
|
24
|
-
description: {
|
|
25
|
-
type: "string",
|
|
26
|
-
},
|
|
27
|
-
location: {
|
|
28
|
-
type: "object",
|
|
29
|
-
},
|
|
30
|
-
tags: shared_1.ENTITY_TAGS_SCHEMA,
|
|
31
|
-
categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
|
|
32
|
-
isDiscussable: {
|
|
33
|
-
type: "boolean",
|
|
34
|
-
enum: [true, false],
|
|
35
|
-
default: true,
|
|
36
|
-
},
|
|
37
|
-
view: {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
featuredImage: {
|
|
41
|
-
type: "object",
|
|
42
|
-
},
|
|
43
|
-
featuredImageName: {
|
|
44
|
-
type: "string",
|
|
45
|
-
},
|
|
46
|
-
featuredImageAltText: {
|
|
47
|
-
type: "string",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
15
|
+
} }) });
|
|
53
16
|
//# sourceMappingURL=DiscussionSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"DiscussionSchema.js","sourceRoot":"","sources":["../../../../src/discussions/_internal/DiscussionSchema.ts"],"names":[],"mappings":";;;AACA,uFAAoF;AAGvE,QAAA,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;CACf,CAAC;AAEX;;GAEG;AACU,QAAA,gBAAgB,GAAyB,gCACjD,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B;SACrC,MAEoB,CAAC"}
|
|
@@ -1,34 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InitiativeSchema = exports.InitiativeEditorTypes = void 0;
|
|
4
|
-
const
|
|
4
|
+
const HubItemEntitySchema_1 = require("../../core/schemas/shared/HubItemEntitySchema");
|
|
5
5
|
exports.InitiativeEditorTypes = ["hub:initiative:edit"];
|
|
6
6
|
/**
|
|
7
7
|
* defines the JSON schema for a Hub Initiative's editable fields
|
|
8
8
|
*/
|
|
9
|
-
exports.InitiativeSchema = {
|
|
10
|
-
required: ["name"],
|
|
11
|
-
type: "object",
|
|
12
|
-
properties: {
|
|
13
|
-
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
14
|
-
summary: {
|
|
15
|
-
type: "string",
|
|
16
|
-
},
|
|
17
|
-
description: {
|
|
18
|
-
type: "string",
|
|
19
|
-
},
|
|
20
|
-
access: shared_1.ENTITY_ACCESS_SCHEMA,
|
|
21
|
-
groups: {
|
|
22
|
-
type: "array",
|
|
23
|
-
items: {
|
|
24
|
-
type: "string",
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
location: {
|
|
28
|
-
type: "object",
|
|
29
|
-
},
|
|
30
|
-
tags: shared_1.ENTITY_TAGS_SCHEMA,
|
|
31
|
-
categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
9
|
+
exports.InitiativeSchema = Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema);
|
|
34
10
|
//# sourceMappingURL=InitiativeSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":";;;AACA,uFAAoF;AAGvE,QAAA,qBAAqB,GAAG,CAAC,qBAAqB,CAAU,CAAC;AAEtE;;GAEG;AACU,QAAA,gBAAgB,GAAyB,kBACjD,yCAAmB,CACC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProjectSchema = exports.ProjectEditorTypes = void 0;
|
|
4
4
|
const core_1 = require("../../core");
|
|
5
|
-
const
|
|
5
|
+
const HubItemEntitySchema_1 = require("../../core/schemas/shared/HubItemEntitySchema");
|
|
6
6
|
exports.ProjectEditorTypes = [
|
|
7
7
|
"hub:project:create",
|
|
8
8
|
"hub:project:edit",
|
|
@@ -10,52 +10,12 @@ exports.ProjectEditorTypes = [
|
|
|
10
10
|
/**
|
|
11
11
|
* defines the JSON schema for a Hub Project's editable fields
|
|
12
12
|
*/
|
|
13
|
-
exports.ProjectSchema = {
|
|
14
|
-
required: ["name"],
|
|
15
|
-
type: "object",
|
|
16
|
-
properties: {
|
|
17
|
-
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
18
|
-
summary: shared_1.ENTITY_SUMMARY_SCHEMA,
|
|
19
|
-
description: {
|
|
20
|
-
type: "string",
|
|
21
|
-
},
|
|
22
|
-
access: shared_1.ENTITY_ACCESS_SCHEMA,
|
|
23
|
-
groups: {
|
|
13
|
+
exports.ProjectSchema = Object.assign(Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema), { properties: Object.assign(Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema.properties), { groups: {
|
|
24
14
|
type: "array",
|
|
25
|
-
items: {
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
status: {
|
|
15
|
+
items: { type: "string" },
|
|
16
|
+
}, status: {
|
|
30
17
|
type: "string",
|
|
31
18
|
default: core_1.PROJECT_STATUSES.notStarted,
|
|
32
19
|
enum: Object.keys(core_1.PROJECT_STATUSES),
|
|
33
|
-
}
|
|
34
|
-
location: {
|
|
35
|
-
type: "object",
|
|
36
|
-
default: { type: "none" },
|
|
37
|
-
},
|
|
38
|
-
tags: shared_1.ENTITY_TAGS_SCHEMA,
|
|
39
|
-
categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
|
|
40
|
-
view: {
|
|
41
|
-
type: "object",
|
|
42
|
-
properties: {
|
|
43
|
-
featuredContentIds: {
|
|
44
|
-
type: "array",
|
|
45
|
-
maxItems: 4,
|
|
46
|
-
items: {
|
|
47
|
-
type: "string",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
featuredImage: {
|
|
51
|
-
type: "object",
|
|
52
|
-
},
|
|
53
|
-
featuredImageAltText: {
|
|
54
|
-
type: "string",
|
|
55
|
-
},
|
|
56
|
-
timeline: shared_1.ENTITY_TIMELINE_SCHEMA,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
};
|
|
20
|
+
} }) });
|
|
61
21
|
//# sourceMappingURL=ProjectSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"ProjectSchema.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectSchema.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,uFAAoF;AAGvE,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAEX;;GAEG;AACU,QAAA,aAAa,GAAyB,gCAC9C,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAgB,CAAC,UAAU;YACpC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAgB,CAAC;SACpC,MAEoB,CAAC"}
|
|
@@ -1,34 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SiteSchema = exports.SiteEditorTypes = void 0;
|
|
4
|
-
const
|
|
4
|
+
const HubItemEntitySchema_1 = require("../../core/schemas/shared/HubItemEntitySchema");
|
|
5
5
|
exports.SiteEditorTypes = ["hub:site:edit"];
|
|
6
6
|
/**
|
|
7
7
|
* defines the JSON schema for a Hub Site's editable fields
|
|
8
8
|
*/
|
|
9
|
-
exports.SiteSchema = {
|
|
10
|
-
required: ["name"],
|
|
11
|
-
type: "object",
|
|
12
|
-
properties: {
|
|
13
|
-
name: shared_1.ENTITY_NAME_SCHEMA,
|
|
14
|
-
summary: {
|
|
15
|
-
type: "string",
|
|
16
|
-
},
|
|
17
|
-
description: {
|
|
18
|
-
type: "string",
|
|
19
|
-
},
|
|
20
|
-
access: shared_1.ENTITY_ACCESS_SCHEMA,
|
|
21
|
-
groups: {
|
|
22
|
-
type: "array",
|
|
23
|
-
items: {
|
|
24
|
-
type: "string",
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
location: {
|
|
28
|
-
type: "object",
|
|
29
|
-
},
|
|
30
|
-
tags: shared_1.ENTITY_TAGS_SCHEMA,
|
|
31
|
-
categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
9
|
+
exports.SiteSchema = Object.assign({}, HubItemEntitySchema_1.HubItemEntitySchema);
|
|
34
10
|
//# sourceMappingURL=SiteSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteSchema.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteSchema.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"SiteSchema.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteSchema.ts"],"names":[],"mappings":";;;AACA,uFAAoF;AAGvE,QAAA,eAAe,GAAG,CAAC,eAAe,CAAU,CAAC;AAE1D;;GAEG;AACU,QAAA,UAAU,GAAyB,kBAC3C,yCAAmB,CACC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Defines a default schema for an IHubItemEntity's editiable fields.
|
|
4
|
+
* All item entity schemas should leverage this base schema.
|
|
5
|
+
* Reference the Project or Initiative schemas as an example
|
|
6
|
+
*/
|
|
7
|
+
export declare const HubItemEntitySchema: IConfigurationSchema;
|
|
@@ -28,23 +28,46 @@ export declare const ENTITY_CATEGORIES_SCHEMA: {
|
|
|
28
28
|
type: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const ENTITY_IS_DISCUSSABLE_SCHEMA: {
|
|
32
|
+
type: string;
|
|
33
|
+
enum: boolean[];
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare const ENTITY_FEATURED_CONTENT_SCHEMA: {
|
|
37
|
+
type: string;
|
|
38
|
+
maxItems: number;
|
|
39
|
+
items: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const ENTITY_LOCATION_SCHEMA: {
|
|
44
|
+
type: string;
|
|
45
|
+
default: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const ENTITY_IMAGE_SCHEMA: {
|
|
32
50
|
type: string;
|
|
33
51
|
properties: {
|
|
34
|
-
|
|
52
|
+
base64: {
|
|
35
53
|
type: string;
|
|
36
54
|
};
|
|
37
|
-
|
|
38
|
-
type: string
|
|
39
|
-
};
|
|
40
|
-
xmin: {
|
|
41
|
-
type: string[];
|
|
55
|
+
format: {
|
|
56
|
+
type: string;
|
|
42
57
|
};
|
|
43
|
-
|
|
44
|
-
type: string
|
|
58
|
+
fileName: {
|
|
59
|
+
type: string;
|
|
45
60
|
};
|
|
46
|
-
|
|
47
|
-
type: string
|
|
61
|
+
blob: {
|
|
62
|
+
type: string;
|
|
63
|
+
properties: {
|
|
64
|
+
type: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
size: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
48
71
|
};
|
|
49
72
|
};
|
|
50
73
|
};
|
|
@@ -20,6 +20,10 @@ export interface IWithViewSettings {
|
|
|
20
20
|
* alt text of an entity's featured image
|
|
21
21
|
*/
|
|
22
22
|
featuredImageAltText?: string;
|
|
23
|
+
/**
|
|
24
|
+
* name of an entity's featured image
|
|
25
|
+
*/
|
|
26
|
+
featuredImageName?: string;
|
|
23
27
|
/**
|
|
24
28
|
* whether the entity should render it's location on a map
|
|
25
29
|
*/
|