@esri/hub-common 9.19.0 → 9.20.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.
@@ -13,6 +13,7 @@ export * from "./is-domain-used-elsewhere";
13
13
  export * from "./is-valid-domain";
14
14
  export * from "./lookup-domain";
15
15
  export * from "./remove-domain";
16
+ export * from "./remove-domains-by-site-id";
16
17
  export * from "./update-domain";
17
18
  export * from "./_ensure-safe-domain-length";
18
19
  export * from "./ensure-unique-domain-name";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { _getAuthHeader } from "./_get-auth-header";
2
+ import { _getDomainServiceUrl } from "./_get-domain-service-url";
3
+ import { _checkStatusAndParseJson } from "./_check-status-and-parse-json";
4
+ /**
5
+ * Remove all domain entries by site id.
6
+ * User must be a member of the org that owns the domain entry.
7
+ * @param {int} domainSiteId of the domain entries to remove
8
+ * @param {IHubRequestOptions} hubRequestOptions`dom
9
+ */
10
+ export function removeDomainsBySiteId(domainSiteId, hubRequestOptions) {
11
+ // TODO: Can remove this if no longer required
12
+ if (hubRequestOptions.isPortal) {
13
+ throw new Error(`removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item`);
14
+ }
15
+ const headers = _getAuthHeader(hubRequestOptions);
16
+ headers["Content-Type"] = "application/json";
17
+ const url = `${_getDomainServiceUrl(hubRequestOptions.hubApiUrl)}/?siteId=${domainSiteId}`;
18
+ return fetch(url, { method: "DELETE", headers, mode: "cors" }).then(_checkStatusAndParseJson);
19
+ }
20
+ //# sourceMappingURL=remove-domains-by-site-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-domains-by-site-id.js","sourceRoot":"","sources":["../../../../src/sites/domains/remove-domains-by-site-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAAoB,EACpB,iBAAqC;IAErC,8CAA8C;IAC9C,IAAI,iBAAiB,CAAC,QAAQ,EAAE;QAC9B,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;KACH;IAED,MAAM,OAAO,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAClD,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAE7C,MAAM,GAAG,GAAG,GAAG,oBAAoB,CACjC,iBAAiB,CAAC,SAAS,CAC5B,YAAY,YAAY,EAAE,CAAC;IAE5B,OAAO,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CACjE,wBAAwB,CACzB,CAAC;AACJ,CAAC"}
@@ -13,6 +13,7 @@ export * from "./is-domain-used-elsewhere";
13
13
  export * from "./is-valid-domain";
14
14
  export * from "./lookup-domain";
15
15
  export * from "./remove-domain";
16
+ export * from "./remove-domains-by-site-id";
16
17
  export * from "./update-domain";
17
18
  export * from "./_ensure-safe-domain-length";
18
19
  export * from "./ensure-unique-domain-name";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { _getAuthHeader } from "./_get-auth-header";
2
+ import { _getDomainServiceUrl } from "./_get-domain-service-url";
3
+ import { _checkStatusAndParseJson } from "./_check-status-and-parse-json";
4
+ /**
5
+ * Remove all domain entries by site id.
6
+ * User must be a member of the org that owns the domain entry.
7
+ * @param {int} domainSiteId of the domain entries to remove
8
+ * @param {IHubRequestOptions} hubRequestOptions`dom
9
+ */
10
+ export function removeDomainsBySiteId(domainSiteId, hubRequestOptions) {
11
+ // TODO: Can remove this if no longer required
12
+ if (hubRequestOptions.isPortal) {
13
+ throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");
14
+ }
15
+ var headers = _getAuthHeader(hubRequestOptions);
16
+ headers["Content-Type"] = "application/json";
17
+ var url = _getDomainServiceUrl(hubRequestOptions.hubApiUrl) + "/?siteId=" + domainSiteId;
18
+ return fetch(url, { method: "DELETE", headers: headers, mode: "cors" }).then(_checkStatusAndParseJson);
19
+ }
20
+ //# sourceMappingURL=remove-domains-by-site-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-domains-by-site-id.js","sourceRoot":"","sources":["../../../../src/sites/domains/remove-domains-by-site-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAAoB,EACpB,iBAAqC;IAErC,8CAA8C;IAC9C,IAAI,iBAAiB,CAAC,QAAQ,EAAE;QAC9B,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;KACH;IAED,IAAM,OAAO,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAClD,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAE7C,IAAM,GAAG,GAAM,oBAAoB,CACjC,iBAAiB,CAAC,SAAS,CAC5B,iBAAY,YAAc,CAAC;IAE5B,OAAO,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,SAAA,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CACjE,wBAAwB,CACzB,CAAC;AACJ,CAAC"}
@@ -16,6 +16,7 @@ tslib_1.__exportStar(require("./is-domain-used-elsewhere"), exports);
16
16
  tslib_1.__exportStar(require("./is-valid-domain"), exports);
17
17
  tslib_1.__exportStar(require("./lookup-domain"), exports);
18
18
  tslib_1.__exportStar(require("./remove-domain"), exports);
19
+ tslib_1.__exportStar(require("./remove-domains-by-site-id"), exports);
19
20
  tslib_1.__exportStar(require("./update-domain"), exports);
20
21
  tslib_1.__exportStar(require("./_ensure-safe-domain-length"), exports);
21
22
  tslib_1.__exportStar(require("./ensure-unique-domain-name"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C;AAC/C,6DAAmC;AACnC,oEAA0C;AAC1C,2DAAiC;AACjC,uDAA6B;AAC7B,0DAAgC;AAChC,iEAAuC;AACvC,iEAAuC;AACvC,mEAAyC;AACzC,0EAAgD;AAChD,sEAA4C;AAC5C,qEAA2C;AAC3C,4DAAkC;AAClC,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,uEAA6C;AAC7C,sEAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sites/domains/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C;AAC/C,6DAAmC;AACnC,oEAA0C;AAC1C,2DAAiC;AACjC,uDAA6B;AAC7B,0DAAgC;AAChC,iEAAuC;AACvC,iEAAuC;AACvC,mEAAyC;AACzC,0EAAgD;AAChD,sEAA4C;AAC5C,qEAA2C;AAC3C,4DAAkC;AAClC,0DAAgC;AAChC,0DAAgC;AAChC,sEAA4C;AAC5C,0DAAgC;AAChC,uEAA6C;AAC7C,sEAA4C"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeDomainsBySiteId = void 0;
4
+ const _get_auth_header_1 = require("./_get-auth-header");
5
+ const _get_domain_service_url_1 = require("./_get-domain-service-url");
6
+ const _check_status_and_parse_json_1 = require("./_check-status-and-parse-json");
7
+ /**
8
+ * Remove all domain entries by site id.
9
+ * User must be a member of the org that owns the domain entry.
10
+ * @param {int} domainSiteId of the domain entries to remove
11
+ * @param {IHubRequestOptions} hubRequestOptions`dom
12
+ */
13
+ function removeDomainsBySiteId(domainSiteId, hubRequestOptions) {
14
+ // TODO: Can remove this if no longer required
15
+ if (hubRequestOptions.isPortal) {
16
+ throw new Error(`removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item`);
17
+ }
18
+ const headers = _get_auth_header_1._getAuthHeader(hubRequestOptions);
19
+ headers["Content-Type"] = "application/json";
20
+ const url = `${_get_domain_service_url_1._getDomainServiceUrl(hubRequestOptions.hubApiUrl)}/?siteId=${domainSiteId}`;
21
+ return fetch(url, { method: "DELETE", headers, mode: "cors" }).then(_check_status_and_parse_json_1._checkStatusAndParseJson);
22
+ }
23
+ exports.removeDomainsBySiteId = removeDomainsBySiteId;
24
+ //# sourceMappingURL=remove-domains-by-site-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-domains-by-site-id.js","sourceRoot":"","sources":["../../../../src/sites/domains/remove-domains-by-site-id.ts"],"names":[],"mappings":";;;AACA,yDAAoD;AACpD,uEAAiE;AACjE,iFAA0E;AAE1E;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,YAAoB,EACpB,iBAAqC;IAErC,8CAA8C;IAC9C,IAAI,iBAAiB,CAAC,QAAQ,EAAE;QAC9B,MAAM,IAAI,KAAK,CACb,kHAAkH,CACnH,CAAC;KACH;IAED,MAAM,OAAO,GAAG,iCAAc,CAAC,iBAAiB,CAAC,CAAC;IAClD,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAE7C,MAAM,GAAG,GAAG,GAAG,8CAAoB,CACjC,iBAAiB,CAAC,SAAS,CAC5B,YAAY,YAAY,EAAE,CAAC;IAE5B,OAAO,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CACjE,uDAAwB,CACzB,CAAC;AACJ,CAAC;AArBD,sDAqBC"}
@@ -13,6 +13,7 @@ export * from "./is-domain-used-elsewhere";
13
13
  export * from "./is-valid-domain";
14
14
  export * from "./lookup-domain";
15
15
  export * from "./remove-domain";
16
+ export * from "./remove-domains-by-site-id";
16
17
  export * from "./update-domain";
17
18
  export * from "./_ensure-safe-domain-length";
18
19
  export * from "./ensure-unique-domain-name";
@@ -0,0 +1,8 @@
1
+ import { IHubRequestOptions } from "../../types";
2
+ /**
3
+ * Remove all domain entries by site id.
4
+ * User must be a member of the org that owns the domain entry.
5
+ * @param {int} domainSiteId of the domain entries to remove
6
+ * @param {IHubRequestOptions} hubRequestOptions`dom
7
+ */
8
+ export declare function removeDomainsBySiteId(domainSiteId: string, hubRequestOptions: IHubRequestOptions): Promise<any>;
@@ -1,5 +1,5 @@
1
1
  /* @preserve
2
- * @esri/hub-common - v9.18.0 - Tue Feb 22 2022 17:58:02 GMT+0000 (Coordinated Universal Time)
2
+ * @esri/hub-common - v9.19.0 - Fri Feb 25 2022 14:52:42 GMT+0000 (Coordinated Universal Time)
3
3
  * Copyright (c) 2022 Environmental Systems Research Institute, Inc.
4
4
  * Apache-2.0
5
5
  */
@@ -12176,6 +12176,23 @@
12176
12176
  return fetch(url, { method: "DELETE", headers: headers, mode: "cors" }).then(_checkStatusAndParseJson);
12177
12177
  }
12178
12178
 
12179
+ /**
12180
+ * Remove all domain entries by site id.
12181
+ * User must be a member of the org that owns the domain entry.
12182
+ * @param {int} domainSiteId of the domain entries to remove
12183
+ * @param {IHubRequestOptions} hubRequestOptions`dom
12184
+ */
12185
+ function removeDomainsBySiteId(domainSiteId, hubRequestOptions) {
12186
+ // TODO: Can remove this if no longer required
12187
+ if (hubRequestOptions.isPortal) {
12188
+ throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");
12189
+ }
12190
+ var headers = _getAuthHeader(hubRequestOptions);
12191
+ headers["Content-Type"] = "application/json";
12192
+ var url = _getDomainServiceUrl(hubRequestOptions.hubApiUrl) + "/?siteId=" + domainSiteId;
12193
+ return fetch(url, { method: "DELETE", headers: headers, mode: "cors" }).then(_checkStatusAndParseJson);
12194
+ }
12195
+
12179
12196
  /**
12180
12197
  * Update an entry in the domain system
12181
12198
  * @param {IHubDomain} domainEntry Doman object to be updated
@@ -13250,6 +13267,7 @@
13250
13267
  exports.relativeDateToDateRange = relativeDateToDateRange;
13251
13268
  exports.removeContextFromSlug = removeContextFromSlug;
13252
13269
  exports.removeDomain = removeDomain;
13270
+ exports.removeDomainsBySiteId = removeDomainsBySiteId;
13253
13271
  exports.removeEmptyProps = removeEmptyProps;
13254
13272
  exports.replaceItemId = replaceItemId;
13255
13273
  exports.runRevertableTask = runRevertableTask;