@esri/hub-common 14.37.0 → 14.38.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.
@@ -12,6 +12,7 @@ export * from "./site-schema-version";
12
12
  export * from "./themes";
13
13
  export * from "./upgrade-site-schema";
14
14
  export * from "./feed-configuration";
15
+ export * from "./reharvestSiteCatalog";
15
16
  // No longer exported b/c site app registration is now handled
16
17
  // by the domain service due to requirement to send signed HMAC request
17
18
  // export * from "./registerSiteAsApplication";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,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,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,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"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Trigger a manual update to reharvest each public item within a site's catalog.
3
+ * This should only be used when search metadata has gotten out of sync despite
4
+ * the nightly reharvest.
5
+ *
6
+ * @param siteId site's catalog to reharvest
7
+ * @param context
8
+ * @returns Job info for each group whose content is being harvested
9
+ */
10
+ export async function reharvestSiteCatalog(siteId, context) {
11
+ const apiHost = context.hubUrl;
12
+ const url = `${apiHost}/api/v3/jobs/site/${siteId}/harvest`;
13
+ const options = {
14
+ method: "POST",
15
+ headers: {
16
+ "content-type": "application/json",
17
+ authorization: context.hubRequestOptions.authentication.token,
18
+ },
19
+ };
20
+ return fetch(url, options).then((result) => result.json());
21
+ }
22
+ //# sourceMappingURL=reharvestSiteCatalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reharvestSiteCatalog.js","sourceRoot":"","sources":["../../../src/sites/reharvestSiteCatalog.ts"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,OAAuB;IAEvB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/B,MAAM,GAAG,GAAG,GAAG,OAAO,qBAAqB,MAAM,UAAU,CAAC;IAC5D,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK;SAC9D;KACF,CAAC;IACF,OAAO,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC"}
@@ -15,6 +15,7 @@ tslib_1.__exportStar(require("./site-schema-version"), exports);
15
15
  tslib_1.__exportStar(require("./themes"), exports);
16
16
  tslib_1.__exportStar(require("./upgrade-site-schema"), exports);
17
17
  tslib_1.__exportStar(require("./feed-configuration"), exports);
18
+ tslib_1.__exportStar(require("./reharvestSiteCatalog"), exports);
18
19
  // No longer exported b/c site app registration is now handled
19
20
  // by the domain service due to requirement to send signed HMAC request
20
21
  // export * from "./registerSiteAsApplication";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,2EAAiD;AACjD,uFAA6D;AAC7D,gFAAsD;AACtD,oDAA0B;AAC1B,mDAAyB;AACzB,2DAAiC;AACjC,2DAAiC;AACjC,oDAA0B;AAC1B,qDAA2B;AAC3B,gEAAsC;AACtC,mDAAyB;AACzB,gEAAsC;AACtC,+DAAqC;AACrC,8DAA8D;AAC9D,uEAAuE;AACvE,+CAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sites/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,2EAAiD;AACjD,uFAA6D;AAC7D,gFAAsD;AACtD,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"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reharvestSiteCatalog = void 0;
4
+ /**
5
+ * Trigger a manual update to reharvest each public item within a site's catalog.
6
+ * This should only be used when search metadata has gotten out of sync despite
7
+ * the nightly reharvest.
8
+ *
9
+ * @param siteId site's catalog to reharvest
10
+ * @param context
11
+ * @returns Job info for each group whose content is being harvested
12
+ */
13
+ async function reharvestSiteCatalog(siteId, context) {
14
+ const apiHost = context.hubUrl;
15
+ const url = `${apiHost}/api/v3/jobs/site/${siteId}/harvest`;
16
+ const options = {
17
+ method: "POST",
18
+ headers: {
19
+ "content-type": "application/json",
20
+ authorization: context.hubRequestOptions.authentication.token,
21
+ },
22
+ };
23
+ return fetch(url, options).then((result) => result.json());
24
+ }
25
+ exports.reharvestSiteCatalog = reharvestSiteCatalog;
26
+ //# sourceMappingURL=reharvestSiteCatalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reharvestSiteCatalog.js","sourceRoot":"","sources":["../../../src/sites/reharvestSiteCatalog.ts"],"names":[],"mappings":";;;AAiBA;;;;;;;;GAQG;AACI,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,OAAuB;IAEvB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/B,MAAM,GAAG,GAAG,GAAG,OAAO,qBAAqB,MAAM,UAAU,CAAC;IAC5D,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK;SAC9D;KACF,CAAC;IACF,OAAO,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC;AAdD,oDAcC"}
@@ -12,3 +12,4 @@ export * from "./site-schema-version";
12
12
  export * from "./themes";
13
13
  export * from "./upgrade-site-schema";
14
14
  export * from "./feed-configuration";
15
+ export * from "./reharvestSiteCatalog";
@@ -0,0 +1,26 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ interface IGroupReharvestInfo {
3
+ /**
4
+ * Catalog group being harvested
5
+ */
6
+ groupId: string;
7
+ /**
8
+ * Internal job id
9
+ */
10
+ jobId: string;
11
+ /**
12
+ * HTTP status code of the job
13
+ */
14
+ status: number;
15
+ }
16
+ /**
17
+ * Trigger a manual update to reharvest each public item within a site's catalog.
18
+ * This should only be used when search metadata has gotten out of sync despite
19
+ * the nightly reharvest.
20
+ *
21
+ * @param siteId site's catalog to reharvest
22
+ * @param context
23
+ * @returns Job info for each group whose content is being harvested
24
+ */
25
+ export declare function reharvestSiteCatalog(siteId: string, context: IArcGISContext): Promise<IGroupReharvestInfo[]>;
26
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.37.0",
3
+ "version": "14.38.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",