@esri/hub-common 14.223.0 → 14.224.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/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/sites/feed-configuration.js +3 -3
- package/dist/esm/sites/feed-configuration.js.map +1 -1
- package/dist/esm/sites/feeds/_internal/defaults.js +56 -0
- package/dist/esm/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js +11 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js +25 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/previewFeed.js +35 -0
- package/dist/esm/sites/feeds/previewFeed.js.map +1 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js +20 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/types.js +1 -0
- package/dist/esm/sites/feeds/types.js.map +1 -0
- package/dist/esm/sites/index.js +4 -0
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/sites/feed-configuration.js +9 -9
- package/dist/node/sites/feed-configuration.js.map +1 -1
- package/dist/node/sites/feeds/_internal/defaults.js +60 -0
- package/dist/node/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js +15 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/node/sites/feeds/getFeedTemplate.js +29 -0
- package/dist/node/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/node/sites/feeds/previewFeed.js +39 -0
- package/dist/node/sites/feeds/previewFeed.js.map +1 -0
- package/dist/node/sites/feeds/setFeedTemplate.js +24 -0
- package/dist/node/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/node/sites/feeds/types.js +3 -0
- package/dist/node/sites/feeds/types.js.map +1 -0
- package/dist/node/sites/index.js +4 -0
- package/dist/node/sites/index.js.map +1 -1
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
- package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
- package/dist/types/sites/feed-configuration.d.ts +2 -0
- package/dist/types/sites/feeds/_internal/defaults.d.ts +5 -0
- package/dist/types/sites/feeds/_internal/getMajorVersion.d.ts +8 -0
- package/dist/types/sites/feeds/getFeedTemplate.d.ts +15 -0
- package/dist/types/sites/feeds/previewFeed.d.ts +19 -0
- package/dist/types/sites/feeds/setFeedTemplate.d.ts +17 -0
- package/dist/types/sites/feeds/types.d.ts +21 -0
- package/dist/types/sites/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -26,7 +26,6 @@ export const ContentPermissions = [
|
|
|
26
26
|
"hub:content:manage",
|
|
27
27
|
"hub:content:canRecordDownloadErrors",
|
|
28
28
|
"hub:content:downloads:displayErrors",
|
|
29
|
-
"temp:hub:content:downloads:unifiedList",
|
|
30
29
|
"hub:content:document:create",
|
|
31
30
|
];
|
|
32
31
|
/**
|
|
@@ -132,10 +131,6 @@ export const ContentPermissionPolicies = [
|
|
|
132
131
|
availability: ["alpha"],
|
|
133
132
|
environments: ["qaext", "devext"],
|
|
134
133
|
},
|
|
135
|
-
{
|
|
136
|
-
permission: "temp:hub:content:downloads:unifiedList",
|
|
137
|
-
availability: ["flag"],
|
|
138
|
-
},
|
|
139
134
|
// Specific permission for creating documents
|
|
140
135
|
{
|
|
141
136
|
permission: "hub:content:document:create",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,yCAAyC;IACzC,qCAAqC;IACrC,oBAAoB;IACpB,qCAAqC;IACrC,qCAAqC;IACrC,
|
|
1
|
+
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,yCAAyC;IACzC,qCAAqC;IACrC,oBAAoB;IACpB,qCAAqC;IACrC,qCAAqC;IACrC,6BAA6B;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,aAAa;QACzB,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;K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EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,yCAAyC;QACrD,YAAY,EAAE,CAAC,gCAAgC,CAAC;QAChD,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC;QAC/C,QAAQ,EAAE,CAAC,eAAe,CAAC;KAC5B;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,YAAY,EAAE,CAAC,kBAAkB,CAAC;KACnC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;IACD,6CAA6C;IAC7C;QACE,UAAU,EAAE,6BAA6B;QACzC,YAAY,EAAE,CAAC,oBAAoB,CAAC;KACrC;CACF,CAAC"}
|
|
@@ -43,6 +43,7 @@ export const SitePermissions = [
|
|
|
43
43
|
"hub:site:workspace:projects",
|
|
44
44
|
"hub:site:workspace:initiatives",
|
|
45
45
|
"hub:site:manage",
|
|
46
|
+
"temp:hub:site:workspace:feeds",
|
|
46
47
|
];
|
|
47
48
|
/**
|
|
48
49
|
* Site permission policies
|
|
@@ -222,6 +223,10 @@ export const SitesPermissionPolicies = [
|
|
|
222
223
|
permission: "hub:site:manage",
|
|
223
224
|
dependencies: ["hub:site:edit"],
|
|
224
225
|
},
|
|
226
|
+
{
|
|
227
|
+
permission: "temp:hub:site:workspace:feeds",
|
|
228
|
+
availability: ["flag"],
|
|
229
|
+
},
|
|
225
230
|
];
|
|
226
231
|
/**
|
|
227
232
|
* Site versioning include list
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteBusinessRules.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkB;IAChD,iBAAiB,EAAE,KAAK;IACxB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,KAAK;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,8BAA8B,EAAE,IAAI;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,0BAA0B;IAC1B,iBAAiB;IACjB,kBAAkB;IAClB,sBAAsB;IACtB,yBAAyB;IACzB,8BAA8B;IAC9B,oBAAoB;IACpB,6BAA6B;IAC7B,8BAA8B;IAC9B,4BAA4B;IAC5B,6BAA6B;IAC7B,kCAAkC;IAClC,4BAA4B;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,qCAAqC;IACrC,sCAAsC;IACtC,qCAAqC;IACrC,+BAA+B;IAC/B,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,gCAAgC;IAChC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"SiteBusinessRules.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteBusinessRules.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkB;IAChD,iBAAiB,EAAE,KAAK;IACxB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,KAAK;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,8BAA8B,EAAE,IAAI;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU;IACV,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,0BAA0B;IAC1B,iBAAiB;IACjB,kBAAkB;IAClB,sBAAsB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CAAC;QACrD,YAAY,EAAE,CAAC,OAAO,CAAC;KACxB;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QACrD,YAAY,EAAE,CAAC,OAAO,CAAC;KACxB;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,YAAY,EAAE,CAAC,eAAe,CAAC;KAChC;IACD;QACE,UAAU,EAAE,+BAA+B;QAC3C,YAAY,EAAE,CAAC,MAAM,CAAC;KACvB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,oBAAoB;IACpB,mBAAmB;IACnB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { getMajorVersion } from "./feeds/_internal/getMajorVersion";
|
|
1
2
|
/**
|
|
3
|
+
* DEPRECATED: This will be removed in the next breaking version. use `getFeedTemplate()` instead
|
|
2
4
|
* Returns feed configuration from a site model
|
|
3
5
|
*
|
|
4
6
|
* @param {IModel} site - site model
|
|
@@ -18,6 +20,7 @@ export function getFeedConfiguration(site, format, version) {
|
|
|
18
20
|
throw new Error("Unsupported feed format");
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
23
|
+
* DEPRECATED: This will be removed in the next breaking version. Use `setFeedTemplate()` instead;
|
|
21
24
|
* Returns feed configuration from a site model
|
|
22
25
|
*
|
|
23
26
|
* @param {IModel} site - site model
|
|
@@ -79,7 +82,4 @@ function setRssConfig(site, version, config) {
|
|
|
79
82
|
}
|
|
80
83
|
throw new Error("Unsupported RSS Version");
|
|
81
84
|
}
|
|
82
|
-
function getMajorVersion(version) {
|
|
83
|
-
return version.split(".")[0];
|
|
84
|
-
}
|
|
85
85
|
//# sourceMappingURL=feed-configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed-configuration.js","sourceRoot":"","sources":["../../../src/sites/feed-configuration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feed-configuration.js","sourceRoot":"","sources":["../../../src/sites/feed-configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIpE;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAkB,EAClB,OAAe;IAEf,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACvC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACvC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACpC;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAkB,EAClB,OAAe,EACf,UAA+B;IAE/B,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO;KACR;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO;KACR;IAED,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACxC,OAAO;KACR;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,OAAe;IACpD,IAAI,eAAe,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAA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,CAAC,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC;QAC9B,OAAO;KACR;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the default templates for each supported major version of each feed format
|
|
3
|
+
*/
|
|
4
|
+
export function getDefaultTemplates() {
|
|
5
|
+
return {
|
|
6
|
+
"dcat-us": {
|
|
7
|
+
"1": DCAT_US_1X_DEFAULT,
|
|
8
|
+
},
|
|
9
|
+
"dcat-ap": {
|
|
10
|
+
"2": DCAT_AP_2XX_DEFAULT,
|
|
11
|
+
},
|
|
12
|
+
rss: {
|
|
13
|
+
"2": RSS_2X_DEFAULT,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const DCAT_US_1X_DEFAULT = {
|
|
18
|
+
title: "{{name}}",
|
|
19
|
+
description: "{{description}}",
|
|
20
|
+
keyword: "{{tags}}",
|
|
21
|
+
issued: "{{created:toISO}}",
|
|
22
|
+
modified: "{{modified:toISO}}",
|
|
23
|
+
publisher: {
|
|
24
|
+
name: "{{source}}",
|
|
25
|
+
},
|
|
26
|
+
contactPoint: {
|
|
27
|
+
fn: "{{owner}}",
|
|
28
|
+
hasEmail: "{{orgContactEmail}}",
|
|
29
|
+
},
|
|
30
|
+
spatial: "{{extent}}",
|
|
31
|
+
};
|
|
32
|
+
const DCAT_AP_2XX_DEFAULT = {
|
|
33
|
+
"dct:title": "{{name}}",
|
|
34
|
+
"dct:description": "{{description}}",
|
|
35
|
+
"dcat:contactPoint": {
|
|
36
|
+
"vcard:fn": "{{owner}}",
|
|
37
|
+
"vcard:hasEmail": "{{orgContactEmail}}",
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const RSS_2X_DEFAULT = {
|
|
41
|
+
channel: {
|
|
42
|
+
title: "{{name}}",
|
|
43
|
+
description: "{{searchDescription}}",
|
|
44
|
+
link: "{{siteUrl}}",
|
|
45
|
+
language: "{{culture}}",
|
|
46
|
+
category: "{{categories}}",
|
|
47
|
+
item: {
|
|
48
|
+
title: "{{name}}",
|
|
49
|
+
description: "{{searchDescription}}",
|
|
50
|
+
author: "{{orgContactEmail}}",
|
|
51
|
+
category: "{{categories}}",
|
|
52
|
+
pubDate: "{{created:toUTC}}",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../src/sites/feeds/_internal/defaults.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,SAAS,EAAE;YACT,GAAG,EAAE,kBAAkB;SACxB;QACD,SAAS,EAAE;YACT,GAAG,EAAE,mBAAmB;SACzB;QACD,GAAG,EAAE;YACH,GAAG,EAAE,cAAc;SACpB;KACF,CAAC;AACJ,CAAC;AAED,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,mBAAmB;IAC3B,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE;QACT,IAAI,EAAE,YAAY;KACnB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,WAAW;QACf,QAAQ,EAAE,qBAAqB;KAChC;IACD,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,WAAW,EAAE,UAAU;IACvB,iBAAiB,EAAE,iBAAiB;IACpC,mBAAmB,EAAE;QACnB,UAAU,EAAE,WAAW;QACvB,gBAAgB,EAAE,qBAAqB;KACxC;CACF,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE;QACP,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,gBAAgB;QAC1B,IAAI,EAAE;YACJ,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,uBAAuB;YACpC,MAAM,EAAE,qBAAqB;YAC7B,QAAQ,EAAE,gBAAgB;YAC1B,OAAO,EAAE,mBAAmB;SAC7B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* Get the major version from a semantic version string
|
|
4
|
+
*
|
|
5
|
+
* @param version dot delimited semantic version
|
|
6
|
+
* @returns the major version of the semantic version
|
|
7
|
+
*/
|
|
8
|
+
export function getMajorVersion(version) {
|
|
9
|
+
return version.split(".")[0];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=getMajorVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMajorVersion.js","sourceRoot":"","sources":["../../../../../src/sites/feeds/_internal/getMajorVersion.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cloneObject } from "../../util";
|
|
2
|
+
import { getMajorVersion } from "./_internal/getMajorVersion";
|
|
3
|
+
import { getFeedConfiguration } from "../feed-configuration";
|
|
4
|
+
import { getDefaultTemplates } from "./_internal/defaults";
|
|
5
|
+
/**
|
|
6
|
+
* Get the feed template for a given feed format and version, accounting
|
|
7
|
+
* for version fallbacks and default templates as necessary.
|
|
8
|
+
* @param opts.feedConfig - the raw feeds configuration object
|
|
9
|
+
* @param opts.format - the feed format
|
|
10
|
+
* @param opts.version - the feed version
|
|
11
|
+
* @returns a feed template object
|
|
12
|
+
*/
|
|
13
|
+
export function getFeedTemplate(opts) {
|
|
14
|
+
const { feedsConfig, format, version } = opts;
|
|
15
|
+
// TODO: Remove once we have successfully removed the old feed configuration helpers
|
|
16
|
+
const mockedSite = { data: { feeds: feedsConfig } };
|
|
17
|
+
const configuredTemplate = getFeedConfiguration(mockedSite, format, version);
|
|
18
|
+
return configuredTemplate || getDefaultTemplate(format, version);
|
|
19
|
+
}
|
|
20
|
+
function getDefaultTemplate(format, version) {
|
|
21
|
+
const majorVersion = getMajorVersion(version);
|
|
22
|
+
const defaultTemplates = getDefaultTemplates();
|
|
23
|
+
return cloneObject(defaultTemplates[format][majorVersion]);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=getFeedTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFeedTemplate.js","sourceRoot":"","sources":["../../../../src/sites/feeds/getFeedTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAS3D;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,IAA6B;IAE7B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAE9C,oFAAoF;IACpF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAuB,CAAC;IACzE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE7E,OAAO,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,kBAAkB,CACzB,MAAkB,EAClB,OAAe;IAEf,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAE/C,OAAO,WAAW,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview a feed using the provided template and context
|
|
3
|
+
* @param opts.format - the feed format
|
|
4
|
+
* @param opts.version - the feed version
|
|
5
|
+
* @param opts.previewTemplate - the feed template to preview
|
|
6
|
+
* @param opts.previewHubId - the Hub ID to preview the feed for
|
|
7
|
+
* @param opts.context - the ArcGIS context
|
|
8
|
+
* @returns the previewed feed as a string
|
|
9
|
+
*/
|
|
10
|
+
export async function previewFeed(opts) {
|
|
11
|
+
const { format, version, previewHubId, context } = opts;
|
|
12
|
+
const stringifiedTemplate = JSON.stringify(opts.previewTemplate);
|
|
13
|
+
const baseUrl = `${context.hubUrl}/api/feed/${format}/${version}`;
|
|
14
|
+
const searchParams = new URLSearchParams();
|
|
15
|
+
searchParams.set("id", previewHubId);
|
|
16
|
+
// The feeds api has different query parameters for rss and dcat feeds
|
|
17
|
+
const isRSS = format === "rss";
|
|
18
|
+
searchParams.set(isRSS ? "rssConfig" : "dcatConfig", stringifiedTemplate);
|
|
19
|
+
const response = await fetch(`${baseUrl}?${searchParams.toString()}`);
|
|
20
|
+
if (!response.ok) {
|
|
21
|
+
throw new Error(`Failed to preview feed: ${response.statusText}`);
|
|
22
|
+
}
|
|
23
|
+
let preview;
|
|
24
|
+
if (isRSS) {
|
|
25
|
+
// RSS feeds are returned as XML text rather than JSON
|
|
26
|
+
const asText = await response.text();
|
|
27
|
+
preview = decodeURIComponent(asText);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const asJson = await response.json();
|
|
31
|
+
preview = JSON.stringify(asJson, null, 2);
|
|
32
|
+
}
|
|
33
|
+
return preview;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=previewFeed.js.map
|
|
@@ -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AAE,IAAI,EAAE,CAAC,CAAC,CAAC;KAC3C;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cloneObject } from "../../util";
|
|
2
|
+
import { setFeedConfiguration } from "../feed-configuration";
|
|
3
|
+
/**
|
|
4
|
+
* Sets the feed template for a given feed format and version. Always use this function
|
|
5
|
+
* to update feed templates rather than interacting with the feeds configuration object directly.
|
|
6
|
+
* @param opts.feedsConfig - the raw feeds configuration object
|
|
7
|
+
* @param opts.format - the feed format
|
|
8
|
+
* @param opts.version - the feed version
|
|
9
|
+
* @param opts.updatedTemplate - the updated feed template
|
|
10
|
+
* @returns a new feeds configuration object with the updated template
|
|
11
|
+
*/
|
|
12
|
+
export function setFeedTemplate(opts) {
|
|
13
|
+
const { feedsConfig, format, version, updatedTemplate } = opts;
|
|
14
|
+
const updatedConfig = cloneObject(feedsConfig);
|
|
15
|
+
// TODO: Remove once we have successfully removed the old feed configuration helpers
|
|
16
|
+
const mockedSite = { data: { feeds: updatedConfig } };
|
|
17
|
+
setFeedConfiguration(mockedSite, format, version, updatedTemplate);
|
|
18
|
+
return updatedConfig;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=setFeedTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setFeedTemplate.js","sourceRoot":"","sources":["../../../../src/sites/feeds/setFeedTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAU7D;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,IAA6B;IAE7B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAC/D,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;IAE/C,oFAAoF;IACpF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,EAAuB,CAAC;IAC3E,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sites/feeds/types.ts"],"names":[],"mappings":""}
|
package/dist/esm/sites/index.js
CHANGED
|
@@ -19,6 +19,10 @@ export * from "./themes";
|
|
|
19
19
|
export * from "./upgrade-site-schema";
|
|
20
20
|
export * from "./feed-configuration";
|
|
21
21
|
export * from "./reharvestSiteCatalog";
|
|
22
|
+
export * from "./feeds/getFeedTemplate";
|
|
23
|
+
export * from "./feeds/setFeedTemplate";
|
|
24
|
+
export * from "./feeds/previewFeed";
|
|
25
|
+
export * from "./feeds/types";
|
|
22
26
|
// No longer exported b/c site app registration is now handled
|
|
23
27
|
// by the domain service due to requirement to send signed HMAC request
|
|
24
28
|
// export * from "./registerSiteAsApplication";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,yDAAyD;AACzD,kCAAkC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,yDAAyD;AACzD,kCAAkC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
|
|
@@ -29,7 +29,6 @@ exports.ContentPermissions = [
|
|
|
29
29
|
"hub:content:manage",
|
|
30
30
|
"hub:content:canRecordDownloadErrors",
|
|
31
31
|
"hub:content:downloads:displayErrors",
|
|
32
|
-
"temp:hub:content:downloads:unifiedList",
|
|
33
32
|
"hub:content:document:create",
|
|
34
33
|
];
|
|
35
34
|
/**
|
|
@@ -135,10 +134,6 @@ exports.ContentPermissionPolicies = [
|
|
|
135
134
|
availability: ["alpha"],
|
|
136
135
|
environments: ["qaext", "devext"],
|
|
137
136
|
},
|
|
138
|
-
{
|
|
139
|
-
permission: "temp:hub:content:downloads:unifiedList",
|
|
140
|
-
availability: ["flag"],
|
|
141
|
-
},
|
|
142
137
|
// Specific permission for creating documents
|
|
143
138
|
{
|
|
144
139
|
permission: "hub:content:document:create",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,yCAAyC;IACzC,qCAAqC;IACrC,oBAAoB;IACpB,qCAAqC;IACrC,qCAAqC;IACrC,
|
|
1
|
+
{"version":3,"file":"ContentBusinessRules.js","sourceRoot":"","sources":["../../../../src/content/_internal/ContentBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,sBAAsB,GAAkB;AACnD,mEAAmE;CACpE,CAAC;AAEF;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,6BAA6B;IAC7B,uBAAuB;IACvB,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,kCAAkC;IAClC,gCAAgC;IAChC,yCAAyC;IACzC,qCAAqC;IACrC,oBAAoB;IACpB,qCAAqC;IACrC,qCAAqC;IACrC,6BAA6B;CACrB,CAAC;AAEX;;;;GAIG;AACU,QAAA,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,aAAa;QACzB,QAAQ,EAAE,CAAC,QAAQ,CAAC;K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D;IACD;QACE,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,yCAAyC;QACrD,YAAY,EAAE,CAAC,gCAAgC,CAAC;QAChD,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC;QAC/C,QAAQ,EAAE,CAAC,eAAe,CAAC;KAC5B;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC5D;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,YAAY,EAAE,CAAC,kBAAkB,CAAC;KACnC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;IACD;QACE,UAAU,EAAE,qCAAqC;QACjD,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,YAAY,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAClC;IACD,6CAA6C;IAC7C;QACE,UAAU,EAAE,6BAA6B;QACzC,YAAY,EAAE,CAAC,oBAAoB,CAAC;KACrC;CACF,CAAC"}
|
|
@@ -46,6 +46,7 @@ exports.SitePermissions = [
|
|
|
46
46
|
"hub:site:workspace:projects",
|
|
47
47
|
"hub:site:workspace:initiatives",
|
|
48
48
|
"hub:site:manage",
|
|
49
|
+
"temp:hub:site:workspace:feeds",
|
|
49
50
|
];
|
|
50
51
|
/**
|
|
51
52
|
* Site permission policies
|
|
@@ -225,6 +226,10 @@ exports.SitesPermissionPolicies = [
|
|
|
225
226
|
permission: "hub:site:manage",
|
|
226
227
|
dependencies: ["hub:site:edit"],
|
|
227
228
|
},
|
|
229
|
+
{
|
|
230
|
+
permission: "temp:hub:site:workspace:feeds",
|
|
231
|
+
availability: ["flag"],
|
|
232
|
+
},
|
|
228
233
|
];
|
|
229
234
|
/**
|
|
230
235
|
* Site versioning include list
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteBusinessRules.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,mBAAmB,GAAkB;IAChD,iBAAiB,EAAE,KAAK;IACxB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,KAAK;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,8BAA8B,EAAE,IAAI;CACrC,CAAC;AAEF;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,UAAU;IACV,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,0BAA0B;IAC1B,iBAAiB;IACjB,kBAAkB;IAClB,sBAAsB;IACtB,yBAAyB;IACzB,8BAA8B;IAC9B,oBAAoB;IACpB,6BAA6B;IAC7B,8BAA8B;IAC9B,4BAA4B;IAC5B,6BAA6B;IAC7B,kCAAkC;IAClC,4BAA4B;IAC5B,4BAA4B;IAC5B,8BAA8B;IAC9B,qCAAqC;IACrC,sCAAsC;IACtC,qCAAqC;IACrC,+BAA+B;IAC/B,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,gCAAgC;IAChC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"SiteBusinessRules.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,mBAAmB,GAAkB;IAChD,iBAAiB,EAAE,KAAK;IACxB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,KAAK;IAC7B,yBAAyB,EAAE,IAAI;IAC/B,8BAA8B,EAAE,IAAI;CACrC,CAAC;AAEF;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,UAAU;IACV,iBAAiB;IACjB,iBAAi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AC;KACtD;IACD;QACE,UAAU,EAAE,6BAA6B;QACzC,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QACrD,YAAY,EAAE,CAAC,OAAO,CAAC;KACxB;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;QACrD,YAAY,EAAE,CAAC,OAAO,CAAC;KACxB;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,YAAY,EAAE,CAAC,eAAe,CAAC;KAChC;IACD;QACE,UAAU,EAAE,+BAA+B;QAC3C,YAAY,EAAE,CAAC,MAAM,CAAC;KACvB;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,sBAAsB,GAAG;IACpC,oBAAoB;IACpB,mBAAmB;IACnB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setFeedConfiguration = exports.getFeedConfiguration = void 0;
|
|
4
|
+
const getMajorVersion_1 = require("./feeds/_internal/getMajorVersion");
|
|
4
5
|
/**
|
|
6
|
+
* DEPRECATED: This will be removed in the next breaking version. use `getFeedTemplate()` instead
|
|
5
7
|
* Returns feed configuration from a site model
|
|
6
8
|
*
|
|
7
9
|
* @param {IModel} site - site model
|
|
@@ -22,6 +24,7 @@ function getFeedConfiguration(site, format, version) {
|
|
|
22
24
|
}
|
|
23
25
|
exports.getFeedConfiguration = getFeedConfiguration;
|
|
24
26
|
/**
|
|
27
|
+
* DEPRECATED: This will be removed in the next breaking version. Use `setFeedTemplate()` instead;
|
|
25
28
|
* Returns feed configuration from a site model
|
|
26
29
|
*
|
|
27
30
|
* @param {IModel} site - site model
|
|
@@ -46,45 +49,42 @@ function setFeedConfiguration(site, format, version, feedConfig) {
|
|
|
46
49
|
}
|
|
47
50
|
exports.setFeedConfiguration = setFeedConfiguration;
|
|
48
51
|
function getDcatApConfig(site, version) {
|
|
49
|
-
if (getMajorVersion(version) === "2") {
|
|
52
|
+
if (getMajorVersion_1.getMajorVersion(version) === "2") {
|
|
50
53
|
return site.data.feeds.dcatAP2XX || site.data.feeds.dcatAP201;
|
|
51
54
|
}
|
|
52
55
|
throw new Error("Unsupported DCAT AP version");
|
|
53
56
|
}
|
|
54
57
|
function getDcatUsConfig(site, version) {
|
|
55
|
-
if (getMajorVersion(version) === "1") {
|
|
58
|
+
if (getMajorVersion_1.getMajorVersion(version) === "1") {
|
|
56
59
|
return site.data.feeds.dcatUS1X || site.data.feeds.dcatUS11;
|
|
57
60
|
}
|
|
58
61
|
throw new Error("Unsupported DCAT US version");
|
|
59
62
|
}
|
|
60
63
|
function getRssConfig(site, version) {
|
|
61
|
-
if (getMajorVersion(version) === "2") {
|
|
64
|
+
if (getMajorVersion_1.getMajorVersion(version) === "2") {
|
|
62
65
|
return site.data.feeds.rss2;
|
|
63
66
|
}
|
|
64
67
|
throw new Error("Unsupported RSS version");
|
|
65
68
|
}
|
|
66
69
|
function setDcatApConfig(site, version, config) {
|
|
67
|
-
if (getMajorVersion(version) === "2") {
|
|
70
|
+
if (getMajorVersion_1.getMajorVersion(version) === "2") {
|
|
68
71
|
site.data.feeds.dcatAP2XX = config;
|
|
69
72
|
return;
|
|
70
73
|
}
|
|
71
74
|
throw new Error("Unsupported DCAT AP Version");
|
|
72
75
|
}
|
|
73
76
|
function setDcatUsConfig(site, version, config) {
|
|
74
|
-
if (getMajorVersion(version) === "1") {
|
|
77
|
+
if (getMajorVersion_1.getMajorVersion(version) === "1") {
|
|
75
78
|
site.data.feeds.dcatUS1X = config;
|
|
76
79
|
return;
|
|
77
80
|
}
|
|
78
81
|
throw new Error("Unsupported DCAT US Version");
|
|
79
82
|
}
|
|
80
83
|
function setRssConfig(site, version, config) {
|
|
81
|
-
if (getMajorVersion(version) === "2") {
|
|
84
|
+
if (getMajorVersion_1.getMajorVersion(version) === "2") {
|
|
82
85
|
site.data.feeds.rss2 = config;
|
|
83
86
|
return;
|
|
84
87
|
}
|
|
85
88
|
throw new Error("Unsupported RSS Version");
|
|
86
89
|
}
|
|
87
|
-
function getMajorVersion(version) {
|
|
88
|
-
return version.split(".")[0];
|
|
89
|
-
}
|
|
90
90
|
//# sourceMappingURL=feed-configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed-configuration.js","sourceRoot":"","sources":["../../../src/sites/feed-configuration.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"feed-configuration.js","sourceRoot":"","sources":["../../../src/sites/feed-configuration.ts"],"names":[],"mappings":";;;AACA,uEAAoE;AAIpE;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAClC,IAAY,EACZ,MAAkB,EAClB,OAAe;IAEf,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACvC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACvC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,OAAO,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACpC;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC;AAlBD,oDAkBC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,IAAY,EACZ,MAAkB,EAClB,OAAe,EACf,UAA+B;IAE/B,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO;KACR;IAED,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO;KACR;IAED,IAAI,MAAM,KAAK,KAAK,EAAE;QACpB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,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,KAAK,GAAG,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAClC,OAAO;KACR;IAED,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,YAAY,CACnB,IAAY,EACZ,OAAe,EACf,MAA2B;IAE3B,IAAI,iCAAe,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC;QAC9B,OAAO;KACR;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultTemplates = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the default templates for each supported major version of each feed format
|
|
6
|
+
*/
|
|
7
|
+
function getDefaultTemplates() {
|
|
8
|
+
return {
|
|
9
|
+
"dcat-us": {
|
|
10
|
+
"1": DCAT_US_1X_DEFAULT,
|
|
11
|
+
},
|
|
12
|
+
"dcat-ap": {
|
|
13
|
+
"2": DCAT_AP_2XX_DEFAULT,
|
|
14
|
+
},
|
|
15
|
+
rss: {
|
|
16
|
+
"2": RSS_2X_DEFAULT,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.getDefaultTemplates = getDefaultTemplates;
|
|
21
|
+
const DCAT_US_1X_DEFAULT = {
|
|
22
|
+
title: "{{name}}",
|
|
23
|
+
description: "{{description}}",
|
|
24
|
+
keyword: "{{tags}}",
|
|
25
|
+
issued: "{{created:toISO}}",
|
|
26
|
+
modified: "{{modified:toISO}}",
|
|
27
|
+
publisher: {
|
|
28
|
+
name: "{{source}}",
|
|
29
|
+
},
|
|
30
|
+
contactPoint: {
|
|
31
|
+
fn: "{{owner}}",
|
|
32
|
+
hasEmail: "{{orgContactEmail}}",
|
|
33
|
+
},
|
|
34
|
+
spatial: "{{extent}}",
|
|
35
|
+
};
|
|
36
|
+
const DCAT_AP_2XX_DEFAULT = {
|
|
37
|
+
"dct:title": "{{name}}",
|
|
38
|
+
"dct:description": "{{description}}",
|
|
39
|
+
"dcat:contactPoint": {
|
|
40
|
+
"vcard:fn": "{{owner}}",
|
|
41
|
+
"vcard:hasEmail": "{{orgContactEmail}}",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const RSS_2X_DEFAULT = {
|
|
45
|
+
channel: {
|
|
46
|
+
title: "{{name}}",
|
|
47
|
+
description: "{{searchDescription}}",
|
|
48
|
+
link: "{{siteUrl}}",
|
|
49
|
+
language: "{{culture}}",
|
|
50
|
+
category: "{{categories}}",
|
|
51
|
+
item: {
|
|
52
|
+
title: "{{name}}",
|
|
53
|
+
description: "{{searchDescription}}",
|
|
54
|
+
author: "{{orgContactEmail}}",
|
|
55
|
+
category: "{{categories}}",
|
|
56
|
+
pubDate: "{{created:toUTC}}",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../../../src/sites/feeds/_internal/defaults.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,mBAAmB;IACjC,OAAO;QACL,SAAS,EAAE;YACT,GAAG,EAAE,kBAAkB;SACxB;QACD,SAAS,EAAE;YACT,GAAG,EAAE,mBAAmB;SACzB;QACD,GAAG,EAAE;YACH,GAAG,EAAE,cAAc;SACpB;KACF,CAAC;AACJ,CAAC;AAZD,kDAYC;AAED,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,mBAAmB;IAC3B,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE;QACT,IAAI,EAAE,YAAY;KACnB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,WAAW;QACf,QAAQ,EAAE,qBAAqB;KAChC;IACD,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,WAAW,EAAE,UAAU;IACvB,iBAAiB,EAAE,iBAAiB;IACpC,mBAAmB,EAAE;QACnB,UAAU,EAAE,WAAW;QACvB,gBAAgB,EAAE,qBAAqB;KACxC;CACF,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE;QACP,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,gBAAgB;QAC1B,IAAI,EAAE;YACJ,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,uBAAuB;YACpC,MAAM,EAAE,qBAAqB;YAC7B,QAAQ,EAAE,gBAAgB;YAC1B,OAAO,EAAE,mBAAmB;SAC7B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMajorVersion = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* Get the major version from a semantic version string
|
|
7
|
+
*
|
|
8
|
+
* @param version dot delimited semantic version
|
|
9
|
+
* @returns the major version of the semantic version
|
|
10
|
+
*/
|
|
11
|
+
function getMajorVersion(version) {
|
|
12
|
+
return version.split(".")[0];
|
|
13
|
+
}
|
|
14
|
+
exports.getMajorVersion = getMajorVersion;
|
|
15
|
+
//# sourceMappingURL=getMajorVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMajorVersion.js","sourceRoot":"","sources":["../../../../../src/sites/feeds/_internal/getMajorVersion.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,OAAe;IAC7C,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFeedTemplate = void 0;
|
|
4
|
+
const util_1 = require("../../util");
|
|
5
|
+
const getMajorVersion_1 = require("./_internal/getMajorVersion");
|
|
6
|
+
const feed_configuration_1 = require("../feed-configuration");
|
|
7
|
+
const defaults_1 = require("./_internal/defaults");
|
|
8
|
+
/**
|
|
9
|
+
* Get the feed template for a given feed format and version, accounting
|
|
10
|
+
* for version fallbacks and default templates as necessary.
|
|
11
|
+
* @param opts.feedConfig - the raw feeds configuration object
|
|
12
|
+
* @param opts.format - the feed format
|
|
13
|
+
* @param opts.version - the feed version
|
|
14
|
+
* @returns a feed template object
|
|
15
|
+
*/
|
|
16
|
+
function getFeedTemplate(opts) {
|
|
17
|
+
const { feedsConfig, format, version } = opts;
|
|
18
|
+
// TODO: Remove once we have successfully removed the old feed configuration helpers
|
|
19
|
+
const mockedSite = { data: { feeds: feedsConfig } };
|
|
20
|
+
const configuredTemplate = feed_configuration_1.getFeedConfiguration(mockedSite, format, version);
|
|
21
|
+
return configuredTemplate || getDefaultTemplate(format, version);
|
|
22
|
+
}
|
|
23
|
+
exports.getFeedTemplate = getFeedTemplate;
|
|
24
|
+
function getDefaultTemplate(format, version) {
|
|
25
|
+
const majorVersion = getMajorVersion_1.getMajorVersion(version);
|
|
26
|
+
const defaultTemplates = defaults_1.getDefaultTemplates();
|
|
27
|
+
return util_1.cloneObject(defaultTemplates[format][majorVersion]);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=getFeedTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFeedTemplate.js","sourceRoot":"","sources":["../../../../src/sites/feeds/getFeedTemplate.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AACzC,iEAA8D;AAC9D,8DAA6D;AAC7D,mDAA2D;AAS3D;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC7B,IAA6B;IAE7B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAE9C,oFAAoF;IACpF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAuB,CAAC;IACzE,MAAM,kBAAkB,GAAG,yCAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE7E,OAAO,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC;AAVD,0CAUC;AAED,SAAS,kBAAkB,CACzB,MAAkB,EAClB,OAAe;IAEf,MAAM,YAAY,GAAG,iCAAe,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,gBAAgB,GAAG,8BAAmB,EAAE,CAAC;IAE/C,OAAO,kBAAW,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.previewFeed = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Preview a feed using the provided template and context
|
|
6
|
+
* @param opts.format - the feed format
|
|
7
|
+
* @param opts.version - the feed version
|
|
8
|
+
* @param opts.previewTemplate - the feed template to preview
|
|
9
|
+
* @param opts.previewHubId - the Hub ID to preview the feed for
|
|
10
|
+
* @param opts.context - the ArcGIS context
|
|
11
|
+
* @returns the previewed feed as a string
|
|
12
|
+
*/
|
|
13
|
+
async function previewFeed(opts) {
|
|
14
|
+
const { format, version, previewHubId, context } = opts;
|
|
15
|
+
const stringifiedTemplate = JSON.stringify(opts.previewTemplate);
|
|
16
|
+
const baseUrl = `${context.hubUrl}/api/feed/${format}/${version}`;
|
|
17
|
+
const searchParams = new URLSearchParams();
|
|
18
|
+
searchParams.set("id", previewHubId);
|
|
19
|
+
// The feeds api has different query parameters for rss and dcat feeds
|
|
20
|
+
const isRSS = format === "rss";
|
|
21
|
+
searchParams.set(isRSS ? "rssConfig" : "dcatConfig", stringifiedTemplate);
|
|
22
|
+
const response = await fetch(`${baseUrl}?${searchParams.toString()}`);
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
throw new Error(`Failed to preview feed: ${response.statusText}`);
|
|
25
|
+
}
|
|
26
|
+
let preview;
|
|
27
|
+
if (isRSS) {
|
|
28
|
+
// RSS feeds are returned as XML text rather than JSON
|
|
29
|
+
const asText = await response.text();
|
|
30
|
+
preview = decodeURIComponent(asText);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const asJson = await response.json();
|
|
34
|
+
preview = JSON.stringify(asJson, null, 2);
|
|
35
|
+
}
|
|
36
|
+
return preview;
|
|
37
|
+
}
|
|
38
|
+
exports.previewFeed = previewFeed;
|
|
39
|
+
//# sourceMappingURL=previewFeed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewFeed.js","sourceRoot":"","sources":["../../../../src/sites/feeds/previewFeed.ts"],"names":[],"mappings":";;;AAWA;;;;;;;;GAQG;AACI,KAAK,UAAU,WAAW,CAAC,IAAyB;IACzD,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACxD,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,MAAM,aAAa,MAAM,IAAI,OAAO,EAAE,CAAC;IAElE,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAErC,sEAAsE;IACtE,MAAM,KAAK,GAAG,MAAM,KAAK,KAAK,CAAC;IAC/B,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;IAE1E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACtE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,2BAA2B,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;KACnE;IAED,IAAI,OAAe,CAAC;IACpB,IAAI,KAAK,EAAE;QACT,sDAAsD;QACtD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrC,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;KACtC;SAAM;QACL,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;KAC3C;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AA7BD,kCA6BC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setFeedTemplate = void 0;
|
|
4
|
+
const util_1 = require("../../util");
|
|
5
|
+
const feed_configuration_1 = require("../feed-configuration");
|
|
6
|
+
/**
|
|
7
|
+
* Sets the feed template for a given feed format and version. Always use this function
|
|
8
|
+
* to update feed templates rather than interacting with the feeds configuration object directly.
|
|
9
|
+
* @param opts.feedsConfig - the raw feeds configuration object
|
|
10
|
+
* @param opts.format - the feed format
|
|
11
|
+
* @param opts.version - the feed version
|
|
12
|
+
* @param opts.updatedTemplate - the updated feed template
|
|
13
|
+
* @returns a new feeds configuration object with the updated template
|
|
14
|
+
*/
|
|
15
|
+
function setFeedTemplate(opts) {
|
|
16
|
+
const { feedsConfig, format, version, updatedTemplate } = opts;
|
|
17
|
+
const updatedConfig = util_1.cloneObject(feedsConfig);
|
|
18
|
+
// TODO: Remove once we have successfully removed the old feed configuration helpers
|
|
19
|
+
const mockedSite = { data: { feeds: updatedConfig } };
|
|
20
|
+
feed_configuration_1.setFeedConfiguration(mockedSite, format, version, updatedTemplate);
|
|
21
|
+
return updatedConfig;
|
|
22
|
+
}
|
|
23
|
+
exports.setFeedTemplate = setFeedTemplate;
|
|
24
|
+
//# sourceMappingURL=setFeedTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setFeedTemplate.js","sourceRoot":"","sources":["../../../../src/sites/feeds/setFeedTemplate.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AACzC,8DAA6D;AAU7D;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC7B,IAA6B;IAE7B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAC/D,MAAM,aAAa,GAAG,kBAAW,CAAC,WAAW,CAAC,CAAC;IAE/C,oFAAoF;IACpF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,EAAuB,CAAC;IAC3E,yCAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,aAAa,CAAC;AACvB,CAAC;AAVD,0CAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sites/feeds/types.ts"],"names":[],"mappings":""}
|
package/dist/node/sites/index.js
CHANGED
|
@@ -22,6 +22,10 @@ tslib_1.__exportStar(require("./themes"), exports);
|
|
|
22
22
|
tslib_1.__exportStar(require("./upgrade-site-schema"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./feed-configuration"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./reharvestSiteCatalog"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./feeds/getFeedTemplate"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./feeds/setFeedTemplate"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./feeds/previewFeed"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./feeds/types"), exports);
|
|
25
29
|
// No longer exported b/c site app registration is now handled
|
|
26
30
|
// by the domain service due to requirement to send signed HMAC request
|
|
27
31
|
// export * from "./registerSiteAsApplication";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAC9D,yDAAyD;AACzD,kCAAkC;AAClC,wEAA8C;AAC9C,2EAAiD;AACjD,uFAA6D;AAC7D,gFAAsD;AACtD,wEAA8C;AAC9C,0FAAgE;AAChE,wFAA8D;AAC9D,oDAA0B;AAC1B,mDAAyB;AACzB,2DAAiC;AACjC,2DAAiC;AACjC,oDAA0B;AAC1B,qDAA2B;AAC3B,gEAAsC;AACtC,mDAAyB;AACzB,gEAAsC;AACtC,+DAAqC;AACrC,iEAAuC;AACvC,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAC9D,yDAAyD;AACzD,kCAAkC;AAClC,wEAA8C;AAC9C,2EAAiD;AACjD,uFAA6D;AAC7D,gFAAsD;AACtD,wEAA8C;AAC9C,0FAAgE;AAChE,wFAA8D;AAC9D,oDAA0B;AAC1B,mDAAyB;AACzB,2DAAiC;AACjC,2DAAiC;AACjC,oDAA0B;AAC1B,qDAA2B;AAC3B,gEAAsC;AACtC,mDAAyB;AACzB,gEAAsC;AACtC,+DAAqC;AACrC,iEAAuC;AACvC,kEAAwC;AACxC,kEAAwC;AACxC,8DAAoC;AACpC,wDAA8B;AAC9B,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
|
|
@@ -8,7 +8,7 @@ export declare const ContentDefaultFeatures: IFeatureFlags;
|
|
|
8
8
|
* These define the requirements any user must meet to perform related actions
|
|
9
9
|
* @private
|
|
10
10
|
*/
|
|
11
|
-
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "
|
|
11
|
+
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "hub:content:document:create"];
|
|
12
12
|
/**
|
|
13
13
|
* Content permission policies
|
|
14
14
|
* No need to specify license for permissions that are available to all licenses
|
|
@@ -7,7 +7,7 @@ export declare const SiteDefaultFeatures: IFeatureFlags;
|
|
|
7
7
|
* Site Permissions
|
|
8
8
|
* This feeds into the Permissions type
|
|
9
9
|
*/
|
|
10
|
-
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:canChangeAccess", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:workspace:pages", "hub:site:workspace:events", "hub:site:workspace:projects", "hub:site:workspace:initiatives", "hub:site:manage"];
|
|
10
|
+
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:canChangeAccess", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:workspace:pages", "hub:site:workspace:events", "hub:site:workspace:projects", "hub:site:workspace:initiatives", "hub:site:manage", "temp:hub:site:workspace:feeds"];
|
|
11
11
|
/**
|
|
12
12
|
* Site permission policies
|
|
13
13
|
* @private
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IModel } from "../types";
|
|
2
2
|
declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
3
3
|
/**
|
|
4
|
+
* DEPRECATED: This will be removed in the next breaking version. use `getFeedTemplate()` instead
|
|
4
5
|
* Returns feed configuration from a site model
|
|
5
6
|
*
|
|
6
7
|
* @param {IModel} site - site model
|
|
@@ -9,6 +10,7 @@ declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function getFeedConfiguration(site: IModel, format: FeedFormat, version: string): any;
|
|
11
12
|
/**
|
|
13
|
+
* DEPRECATED: This will be removed in the next breaking version. Use `setFeedTemplate()` instead;
|
|
12
14
|
* Returns feed configuration from a site model
|
|
13
15
|
*
|
|
14
16
|
* @param {IModel} site - site model
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FeedFormat, IFeedsConfiguration } from "./types";
|
|
2
|
+
export interface IGetFeedTemplateOptions {
|
|
3
|
+
feedsConfig: IFeedsConfiguration;
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get the feed template for a given feed format and version, accounting
|
|
9
|
+
* for version fallbacks and default templates as necessary.
|
|
10
|
+
* @param opts.feedConfig - the raw feeds configuration object
|
|
11
|
+
* @param opts.format - the feed format
|
|
12
|
+
* @param opts.version - the feed version
|
|
13
|
+
* @returns a feed template object
|
|
14
|
+
*/
|
|
15
|
+
export declare function getFeedTemplate(opts: IGetFeedTemplateOptions): Record<string, any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { FeedFormat } from "./types";
|
|
3
|
+
export interface IPreviewFeedOptions {
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
previewTemplate: Record<string, any>;
|
|
7
|
+
previewHubId: string;
|
|
8
|
+
context: IArcGISContext;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Preview a feed using the provided template and context
|
|
12
|
+
* @param opts.format - the feed format
|
|
13
|
+
* @param opts.version - the feed version
|
|
14
|
+
* @param opts.previewTemplate - the feed template to preview
|
|
15
|
+
* @param opts.previewHubId - the Hub ID to preview the feed for
|
|
16
|
+
* @param opts.context - the ArcGIS context
|
|
17
|
+
* @returns the previewed feed as a string
|
|
18
|
+
*/
|
|
19
|
+
export declare function previewFeed(opts: IPreviewFeedOptions): Promise<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FeedFormat, IFeedsConfiguration } from "./types";
|
|
2
|
+
export interface ISetFeedTemplateOptions {
|
|
3
|
+
feedsConfig: IFeedsConfiguration;
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
updatedTemplate: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Sets the feed template for a given feed format and version. Always use this function
|
|
10
|
+
* to update feed templates rather than interacting with the feeds configuration object directly.
|
|
11
|
+
* @param opts.feedsConfig - the raw feeds configuration object
|
|
12
|
+
* @param opts.format - the feed format
|
|
13
|
+
* @param opts.version - the feed version
|
|
14
|
+
* @param opts.updatedTemplate - the updated feed template
|
|
15
|
+
* @returns a new feeds configuration object with the updated template
|
|
16
|
+
*/
|
|
17
|
+
export declare function setFeedTemplate(opts: ISetFeedTemplateOptions): Record<string, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the feed format types that are supported in Hub
|
|
3
|
+
*/
|
|
4
|
+
export declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration object for feeds. Stores feed templates for various feed formats and versions
|
|
7
|
+
* as well as miscellaneous configuration options. Always interact with this object through the
|
|
8
|
+
* configuration helpers (getFeedTemplate(), setFeedTemplate(), etc.) when possible.
|
|
9
|
+
*/
|
|
10
|
+
export interface IFeedsConfiguration extends IWithFeedTemplatePaths {
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the feeds capability as a whole has been disabled
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare type IWithFeedTemplatePaths = Partial<Record<FeedTemplatePath, Record<string, any>>>;
|
|
17
|
+
declare type FeedTemplatePath = DcatUSTemplatePaths | DcatAPTemplatePaths | RssTemplatePaths;
|
|
18
|
+
declare type DcatUSTemplatePaths = "dcatUS11" | "dcatUS1X";
|
|
19
|
+
declare type DcatAPTemplatePaths = "dcatAP201" | "dcatAP2XX";
|
|
20
|
+
declare type RssTemplatePaths = "rss2";
|
|
21
|
+
export {};
|
|
@@ -16,3 +16,7 @@ export * from "./themes";
|
|
|
16
16
|
export * from "./upgrade-site-schema";
|
|
17
17
|
export * from "./feed-configuration";
|
|
18
18
|
export * from "./reharvestSiteCatalog";
|
|
19
|
+
export * from "./feeds/getFeedTemplate";
|
|
20
|
+
export * from "./feeds/setFeedTemplate";
|
|
21
|
+
export * from "./feeds/previewFeed";
|
|
22
|
+
export * from "./feeds/types";
|