@esri/hub-common 14.108.3 → 14.109.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.
Files changed (30) hide show
  1. package/dist/esm/content/fetchItemJobRecords.js +46 -0
  2. package/dist/esm/content/fetchItemJobRecords.js.map +1 -0
  3. package/dist/esm/content/index.js +1 -0
  4. package/dist/esm/content/index.js.map +1 -1
  5. package/dist/esm/content/types.js +12 -0
  6. package/dist/esm/content/types.js.map +1 -1
  7. package/dist/esm/events/api/orval/api/orval-events.js +12 -0
  8. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
  9. package/dist/esm/events/api/types.js +1 -1
  10. package/dist/esm/events/api/types.js.map +1 -1
  11. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js +4 -3
  12. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js.map +1 -1
  13. package/dist/node/content/fetchItemJobRecords.js +50 -0
  14. package/dist/node/content/fetchItemJobRecords.js.map +1 -0
  15. package/dist/node/content/index.js +1 -0
  16. package/dist/node/content/index.js.map +1 -1
  17. package/dist/node/content/types.js +13 -0
  18. package/dist/node/content/types.js.map +1 -1
  19. package/dist/node/events/api/orval/api/orval-events.js +13 -1
  20. package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
  21. package/dist/node/events/api/types.js +2 -0
  22. package/dist/node/events/api/types.js.map +1 -1
  23. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js +4 -3
  24. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.js.map +1 -1
  25. package/dist/types/content/fetchItemJobRecords.d.ts +10 -0
  26. package/dist/types/content/index.d.ts +1 -0
  27. package/dist/types/content/types.d.ts +55 -0
  28. package/dist/types/events/api/orval/api/orval-events.d.ts +37 -1
  29. package/dist/types/events/api/types.d.ts +1 -1
  30. package/package.json +1 -1
@@ -0,0 +1,46 @@
1
+ import HubError from "../HubError";
2
+ import { JobRecordType, } from "./types";
3
+ /**
4
+ * Fetches job records for a specific item.
5
+ *
6
+ * @param id - The ID of the item.
7
+ * @param options - The options for fetching job records.
8
+ * @returns A promise that resolves to an array of job records.
9
+ * @throws {HubError} If any unimplemented options are provided.
10
+ */
11
+ export async function fetchItemJobRecords(id, options) {
12
+ const unimplementedOptions = [
13
+ "types",
14
+ "statuses",
15
+ ];
16
+ if (unimplementedOptions.some((option) => options[option])) {
17
+ throw new HubError("fetchItemJobRecords", `The following options are not yet implemented: ${unimplementedOptions.join(", ")}`);
18
+ }
19
+ const { context } = options;
20
+ const requestUrl = `${context.hubUrl}/api/download/v1/items/${id}/errors${getQueryString(options)}`;
21
+ const { errors: rawErrors } = await fetch(requestUrl).then((response) => response.json());
22
+ // TODO: account for additional row types once the API supports them
23
+ return rawErrors.map(rowToDownloadJobRecord);
24
+ }
25
+ function getQueryString(options) {
26
+ const params = new URLSearchParams();
27
+ options.from && params.append("fromDate", options.from);
28
+ options.to && params.append("toDate", options.to);
29
+ options.limit && params.append("limit", options.limit.toString());
30
+ const result = params.toString();
31
+ return result && `?${result}`;
32
+ }
33
+ function rowToDownloadJobRecord(row) {
34
+ return {
35
+ type: JobRecordType.DOWNLOAD,
36
+ message: row.message,
37
+ created: new Date(row.timestamp).getTime(),
38
+ layerId: row.layerId,
39
+ // implement the rest of the fields once the API supports them
40
+ id: null,
41
+ status: null,
42
+ messageId: null,
43
+ modified: null,
44
+ };
45
+ }
46
+ //# sourceMappingURL=fetchItemJobRecords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchItemJobRecords.js","sourceRoot":"","sources":["../../../src/content/fetchItemJobRecords.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAIL,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,EAAU,EACV,OAAoC;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O;QACL,IAAI,EAAE,aAAa,CAAC,QAAQ;QAC5B,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;QAC1C,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,8DAA8D;QAC9D,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ,CAAC"}
@@ -10,4 +10,5 @@ export * from "./search";
10
10
  export * from "./slugs";
11
11
  export * from "./types";
12
12
  export * from "./hostedServiceUtils";
13
+ export * from "./fetchItemJobRecords";
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
@@ -1 +1,13 @@
1
+ export var JobRecordType;
2
+ (function (JobRecordType) {
3
+ JobRecordType["DOWNLOAD"] = "download";
4
+ JobRecordType["UPDATE"] = "update";
5
+ })(JobRecordType || (JobRecordType = {}));
6
+ export var JobRecordStatus;
7
+ (function (JobRecordStatus) {
8
+ JobRecordStatus["SUCCESS"] = "success";
9
+ JobRecordStatus["ERROR"] = "error";
10
+ JobRecordStatus["WARNING"] = "warning";
11
+ JobRecordStatus["INFO"] = "info";
12
+ })(JobRecordStatus || (JobRecordStatus = {}));
1
13
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content/types.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,gCAAa,CAAA;AACf,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B"}
@@ -1,4 +1,16 @@
1
1
  import { customClient } from "../custom-client";
2
+ export var SortOrder;
3
+ (function (SortOrder) {
4
+ SortOrder["asc"] = "asc";
5
+ SortOrder["desc"] = "desc";
6
+ })(SortOrder || (SortOrder = {}));
7
+ export var EventSort;
8
+ (function (EventSort) {
9
+ EventSort["title"] = "title";
10
+ EventSort["startDateTime"] = "startDateTime";
11
+ EventSort["createdAt"] = "createdAt";
12
+ EventSort["updatedAt"] = "updatedAt";
13
+ })(EventSort || (EventSort = {}));
2
14
  export var RegistrationStatus;
3
15
  (function (RegistrationStatus) {
4
16
  RegistrationStatus["PENDING"] = "PENDING";
@@ -1 +1 @@
1
- {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA6JhD,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;AACrB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AACD,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AACD,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAwED,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;AACzB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AACD,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AA6DD,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,YAA0B,EAC1B,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,uBAAuB;QAC5B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,YAAY;KACnB,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,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AAY,CACjB,EAAE,GAAG,EAAE,8BAA8B,EAAE,MAAM,EAAE,KAAK,EAAE,EACtD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,EAAU,EACV,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgIhD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AACD,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACzB,CAAC,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EF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,EAAU,EACV,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB;QACE,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,YAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export { EventAccess, EventAttendanceType, EventStatus, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
1
+ export { EventAccess, EventAttendanceType, EventStatus, RegistrationRole, RegistrationStatus, SortOrder, EventSort, } from "./orval/api/orval-events";
2
2
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,WAAW,EAkBX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,WAAW,EAkBX,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,SAAS,GACV,MAAM,0BAA0B,CAAC"}
@@ -8,6 +8,7 @@
8
8
  */
9
9
  export async function ogcItemToDiscussionPostResult(ogcItem) {
10
10
  return {
11
+ // Base IHubSearchResult properties
11
12
  id: ogcItem.id,
12
13
  name: ogcItem.properties.title,
13
14
  summary: ogcItem.properties.body,
@@ -15,13 +16,13 @@ export async function ogcItemToDiscussionPostResult(ogcItem) {
15
16
  createdDateSource: "properties.createdAt",
16
17
  updatedDate: new Date(ogcItem.properties.updatedAt),
17
18
  updatedDateSource: "properties.updatedAt",
18
- type: ogcItem.properties.postType,
19
+ type: "post",
19
20
  owner: ogcItem.properties.creator,
20
- location: ogcItem.properties.geometry,
21
+ location: null,
21
22
  created: new Date(ogcItem.properties.createdAt),
22
23
  modified: new Date(ogcItem.properties.updatedAt),
23
24
  title: ogcItem.properties.title,
24
- rawResult: ogcItem.properties,
25
+ rawResult: ogcItem,
25
26
  access: null,
26
27
  family: null,
27
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ogcItemToDiscussionPostResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAiB;IAEjB,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC9B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;QAChC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;QACjC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;QACjC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;QACrC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC/C,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAChD,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC/B,SAAS,EAAE,OAAO,CAAC,UAAU;QAC7B,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACO,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"ogcItemToDiscussionPostResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAiB;IAEjB,OAAO;QACL,mCAAmC;QACnC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC9B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;QAChC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;QACjC,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC/C,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAChD,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC/B,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACO,CAAC;AACxB,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchItemJobRecords = void 0;
4
+ const HubError_1 = require("../HubError");
5
+ const types_1 = require("./types");
6
+ /**
7
+ * Fetches job records for a specific item.
8
+ *
9
+ * @param id - The ID of the item.
10
+ * @param options - The options for fetching job records.
11
+ * @returns A promise that resolves to an array of job records.
12
+ * @throws {HubError} If any unimplemented options are provided.
13
+ */
14
+ async function fetchItemJobRecords(id, options) {
15
+ const unimplementedOptions = [
16
+ "types",
17
+ "statuses",
18
+ ];
19
+ if (unimplementedOptions.some((option) => options[option])) {
20
+ throw new HubError_1.default("fetchItemJobRecords", `The following options are not yet implemented: ${unimplementedOptions.join(", ")}`);
21
+ }
22
+ const { context } = options;
23
+ const requestUrl = `${context.hubUrl}/api/download/v1/items/${id}/errors${getQueryString(options)}`;
24
+ const { errors: rawErrors } = await fetch(requestUrl).then((response) => response.json());
25
+ // TODO: account for additional row types once the API supports them
26
+ return rawErrors.map(rowToDownloadJobRecord);
27
+ }
28
+ exports.fetchItemJobRecords = fetchItemJobRecords;
29
+ function getQueryString(options) {
30
+ const params = new URLSearchParams();
31
+ options.from && params.append("fromDate", options.from);
32
+ options.to && params.append("toDate", options.to);
33
+ options.limit && params.append("limit", options.limit.toString());
34
+ const result = params.toString();
35
+ return result && `?${result}`;
36
+ }
37
+ function rowToDownloadJobRecord(row) {
38
+ return {
39
+ type: types_1.JobRecordType.DOWNLOAD,
40
+ message: row.message,
41
+ created: new Date(row.timestamp).getTime(),
42
+ layerId: row.layerId,
43
+ // implement the rest of the fields once the API supports them
44
+ id: null,
45
+ status: null,
46
+ messageId: null,
47
+ modified: null,
48
+ };
49
+ }
50
+ //# sourceMappingURL=fetchItemJobRecords.js.map
@@ -0,0 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E,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAElE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAEjC,OAAO,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;AAChC,CAAC;AAED,SAAS,sBAAsB,CAC7B,GAA2B;IAE3B,OAAO;QACL,IAAI,EAAE,qBAAa,CAAC,QAAQ;QAC5B,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;QAC1C,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,8DAA8D;QAC9D,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ,CAAC"}
@@ -13,4 +13,5 @@ tslib_1.__exportStar(require("./search"), exports);
13
13
  tslib_1.__exportStar(require("./slugs"), exports);
14
14
  tslib_1.__exportStar(require("./types"), exports);
15
15
  tslib_1.__exportStar(require("./hostedServiceUtils"), exports);
16
+ tslib_1.__exportStar(require("./fetchItemJobRecords"), exports);
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,uDAA6B;AAC7B,oDAA0B;AAC1B,yDAA+B;AAC/B,iDAAuB;AACvB,kDAAwB;AACxB,uDAA6B;AAC7B,uDAA6B;AAC7B,mDAAyB;AACzB,kDAAwB;AACxB,kDAAwB;AACxB,+DAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,uDAA6B;AAC7B,oDAA0B;AAC1B,yDAA+B;AAC/B,iDAAuB;AACvB,kDAAwB;AACxB,uDAA6B;AAC7B,uDAA6B;AAC7B,mDAAyB;AACzB,kDAAwB;AACxB,kDAAwB;AACxB,+DAAqC;AACrC,gEAAsC"}
@@ -1,3 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JobRecordStatus = exports.JobRecordType = void 0;
4
+ var JobRecordType;
5
+ (function (JobRecordType) {
6
+ JobRecordType["DOWNLOAD"] = "download";
7
+ JobRecordType["UPDATE"] = "update";
8
+ })(JobRecordType = exports.JobRecordType || (exports.JobRecordType = {}));
9
+ var JobRecordStatus;
10
+ (function (JobRecordStatus) {
11
+ JobRecordStatus["SUCCESS"] = "success";
12
+ JobRecordStatus["ERROR"] = "error";
13
+ JobRecordStatus["WARNING"] = "warning";
14
+ JobRecordStatus["INFO"] = "info";
15
+ })(JobRecordStatus = exports.JobRecordStatus || (exports.JobRecordStatus = {}));
3
16
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/content/types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,gCAAa,CAAA;AACf,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
@@ -1,7 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteRegistration = exports.updateRegistration = exports.getRegistration = exports.getRegistrations = exports.createRegistration = exports.deleteEvent = exports.updateEvent = exports.getEvent = exports.getEvents = exports.createEvent = exports.EventAccess = exports.EventAttendanceType = exports.EventStatus = exports.RegistrationRole = exports.RegistrationStatus = void 0;
3
+ exports.deleteRegistration = exports.updateRegistration = exports.getRegistration = exports.getRegistrations = exports.createRegistration = exports.deleteEvent = exports.updateEvent = exports.getEvent = exports.getEvents = exports.createEvent = exports.EventAccess = exports.EventAttendanceType = exports.EventStatus = exports.RegistrationRole = exports.RegistrationStatus = exports.EventSort = exports.SortOrder = void 0;
4
4
  const custom_client_1 = require("../custom-client");
5
+ var SortOrder;
6
+ (function (SortOrder) {
7
+ SortOrder["asc"] = "asc";
8
+ SortOrder["desc"] = "desc";
9
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
10
+ var EventSort;
11
+ (function (EventSort) {
12
+ EventSort["title"] = "title";
13
+ EventSort["startDateTime"] = "startDateTime";
14
+ EventSort["createdAt"] = "createdAt";
15
+ EventSort["updatedAt"] = "updatedAt";
16
+ })(EventSort = exports.EventSort || (exports.EventSort = {}));
5
17
  var RegistrationStatus;
6
18
  (function (RegistrationStatus) {
7
19
  RegistrationStatus["PENDING"] = "PENDING";
@@ -1 +1 @@
1
- {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;AAQA,oDAAgD;AA6JhD,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;AACrB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AACD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AACD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,GAAX,mBAAW,KA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,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;AAQA,oDAAgD;AAgIhD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AACD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACzB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB;AAoDD,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;AACrB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AACD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AACD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAwED,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;AACzB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AACD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0BAAW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kB,GAAG,CAChC,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB;QACE,GAAG,EAAE,8BAA8B;QACnC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,gBAAgB,GAAG,CAC9B,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,8BAA8B,EAAE,MAAM,EAAE,KAAK,EAAE,EACtD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,eAAe,GAAG,CAC7B,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB;QACE,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -6,4 +6,6 @@ Object.defineProperty(exports, "EventAttendanceType", { enumerable: true, get: f
6
6
  Object.defineProperty(exports, "EventStatus", { enumerable: true, get: function () { return orval_events_1.EventStatus; } });
7
7
  Object.defineProperty(exports, "RegistrationRole", { enumerable: true, get: function () { return orval_events_1.RegistrationRole; } });
8
8
  Object.defineProperty(exports, "RegistrationStatus", { enumerable: true, get: function () { return orval_events_1.RegistrationStatus; } });
9
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return orval_events_1.SortOrder; } });
10
+ Object.defineProperty(exports, "EventSort", { enumerable: true, get: function () { return orval_events_1.EventSort; } });
9
11
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":";;AAAA,yDAuBkC;AAtBhC,2GAAA,WAAW,OAAA;AACX,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AAkBX,gHAAA,gBAAgB,OAAA;AAChB,kHAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":";;AAAA,yDAyBkC;AAxBhC,2GAAA,WAAW,OAAA;AACX,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AAkBX,gHAAA,gBAAgB,OAAA;AAChB,kHAAA,kBAAkB,OAAA;AAClB,yGAAA,SAAS,OAAA;AACT,yGAAA,SAAS,OAAA"}
@@ -11,6 +11,7 @@ exports.ogcItemToDiscussionPostResult = void 0;
11
11
  */
12
12
  async function ogcItemToDiscussionPostResult(ogcItem) {
13
13
  return {
14
+ // Base IHubSearchResult properties
14
15
  id: ogcItem.id,
15
16
  name: ogcItem.properties.title,
16
17
  summary: ogcItem.properties.body,
@@ -18,13 +19,13 @@ async function ogcItemToDiscussionPostResult(ogcItem) {
18
19
  createdDateSource: "properties.createdAt",
19
20
  updatedDate: new Date(ogcItem.properties.updatedAt),
20
21
  updatedDateSource: "properties.updatedAt",
21
- type: ogcItem.properties.postType,
22
+ type: "post",
22
23
  owner: ogcItem.properties.creator,
23
- location: ogcItem.properties.geometry,
24
+ location: null,
24
25
  created: new Date(ogcItem.properties.createdAt),
25
26
  modified: new Date(ogcItem.properties.updatedAt),
26
27
  title: ogcItem.properties.title,
27
- rawResult: ogcItem.properties,
28
+ rawResult: ogcItem,
28
29
  access: null,
29
30
  family: null,
30
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ogcItemToDiscussionPostResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.ts"],"names":[],"mappings":";;;AAIA;;;;;;;GAOG;AACI,KAAK,UAAU,6BAA6B,CACjD,OAAiB;IAEjB,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC9B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;QAChC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;QACjC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;QACjC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;QACrC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC/C,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAChD,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC/B,SAAS,EAAE,OAAO,CAAC,UAAU;QAC7B,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACO,CAAC;AACxB,CAAC;AArBD,sEAqBC"}
1
+ {"version":3,"file":"ogcItemToDiscussionPostResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToDiscussionPostResult.ts"],"names":[],"mappings":";;;AAGA;;;;;;;GAOG;AACI,KAAK,UAAU,6BAA6B,CACjD,OAAiB;IAEjB,OAAO;QACL,mCAAmC;QACnC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC9B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;QAChC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,WAAW,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QACnD,iBAAiB,EAAE,sBAAsB;QACzC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;QACjC,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAC/C,QAAQ,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;QAChD,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;QAC/B,SAAS,EAAE,OAAO;QAClB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;KACO,CAAC;AACxB,CAAC;AAtBD,sEAsBC"}
@@ -0,0 +1,10 @@
1
+ import { IHubJobRecord, IHubJobRecordRequestOptions } from "./types";
2
+ /**
3
+ * Fetches job records for a specific item.
4
+ *
5
+ * @param id - The ID of the item.
6
+ * @param options - The options for fetching job records.
7
+ * @returns A promise that resolves to an array of job records.
8
+ * @throws {HubError} If any unimplemented options are provided.
9
+ */
10
+ export declare function fetchItemJobRecords(id: string, options: IHubJobRecordRequestOptions): Promise<IHubJobRecord[]>;
@@ -10,3 +10,4 @@ export * from "./search";
10
10
  export * from "./slugs";
11
11
  export * from "./types";
12
12
  export * from "./hostedServiceUtils";
13
+ export * from "./fetchItemJobRecords";
@@ -1,7 +1,62 @@
1
1
  import { ResourceObject } from "jsonapi-typescript";
2
+ import { IArcGISContext } from "../ArcGISContext";
2
3
  /**
3
4
  * JSONAPI dataset resource returned by the Hub API
4
5
  */
5
6
  export declare type DatasetResource = ResourceObject<"dataset", {
6
7
  [k: string]: any;
7
8
  }>;
9
+ export declare enum JobRecordType {
10
+ DOWNLOAD = "download",
11
+ UPDATE = "update"
12
+ }
13
+ export declare enum JobRecordStatus {
14
+ SUCCESS = "success",
15
+ ERROR = "error",
16
+ WARNING = "warning",
17
+ INFO = "info"
18
+ }
19
+ /**
20
+ * Represents a job record from the Hub API
21
+ */
22
+ export interface IHubJobRecord {
23
+ /** Unique entry id */
24
+ id: string;
25
+ /** Type of job record */
26
+ type: JobRecordType;
27
+ /** Status of the job record */
28
+ status: JobRecordStatus;
29
+ /** wellknown message id */
30
+ messageId: string;
31
+ /** untranslated plaintext message */
32
+ message: string;
33
+ /** Timestamp of when the job record was created */
34
+ created: number;
35
+ /** Timestamp of when the job record was last modified */
36
+ modified: number;
37
+ }
38
+ /**
39
+ * Represents a download job record from the Hub API
40
+ */
41
+ export interface IHubDownloadJobRecord extends IHubJobRecord {
42
+ type: JobRecordType.DOWNLOAD;
43
+ /** The layer associated with the download */
44
+ layerId?: string;
45
+ }
46
+ /**
47
+ * Request options for fetching job records
48
+ */
49
+ export interface IHubJobRecordRequestOptions {
50
+ /** Context object from consuming application */
51
+ context: IArcGISContext;
52
+ /** Job types to be included in the results */
53
+ types?: JobRecordType[];
54
+ /** Job statuses to be included in the results */
55
+ statuses?: JobRecordStatus[];
56
+ /** ISO Date string indicating the start date for the search */
57
+ from?: string;
58
+ /** ISO Date string indicating the end date of the search */
59
+ to?: string;
60
+ /** Total number of records to return */
61
+ limit?: number;
62
+ }
@@ -24,13 +24,21 @@ export declare type GetEventsParams = {
24
24
  */
25
25
  startDateTimeAfter?: string;
26
26
  /**
27
- * Comma separated sting list of AttendanceTypes
27
+ * Comma separated string list of AttendanceTypes
28
28
  */
29
29
  attendanceTypes?: string;
30
+ /**
31
+ * Comma separated string list of categories
32
+ */
33
+ categories?: string;
30
34
  /**
31
35
  * comma separated string list of event statuses
32
36
  */
33
37
  status?: string;
38
+ /**
39
+ * Comma separated string list of tags
40
+ */
41
+ tags?: string;
34
42
  /**
35
43
  * string to match within an event title
36
44
  */
@@ -43,6 +51,14 @@ export declare type GetEventsParams = {
43
51
  * the index to start at
44
52
  */
45
53
  start?: string;
54
+ /**
55
+ * Event property to sort results by
56
+ */
57
+ sortBy?: EventSort;
58
+ /**
59
+ * sort results order desc or asc
60
+ */
61
+ sortOrder?: SortOrder;
46
62
  };
47
63
  export interface IUpdateRegistration {
48
64
  /** Role of the user in the event */
@@ -87,6 +103,8 @@ export interface IUpdateEvent {
87
103
  allowRegistration?: boolean;
88
104
  /** Valid ways to attend the event */
89
105
  attendanceType?: EventAttendanceType[];
106
+ /** categories for the event */
107
+ categories?: string[];
90
108
  /** Description of the event */
91
109
  description?: string;
92
110
  /** Groups with edit access to the event */
@@ -105,11 +123,23 @@ export interface IUpdateEvent {
105
123
  startDateTime?: string;
106
124
  /** Summary of the event */
107
125
  summary?: string;
126
+ /** Tags for the event */
127
+ tags?: string[];
108
128
  /** IANA time zone for the event */
109
129
  timeZone?: string;
110
130
  /** Title of the event */
111
131
  title?: string;
112
132
  }
133
+ export declare enum SortOrder {
134
+ asc = "asc",
135
+ desc = "desc"
136
+ }
137
+ export declare enum EventSort {
138
+ title = "title",
139
+ startDateTime = "startDateTime",
140
+ createdAt = "createdAt",
141
+ updatedAt = "updatedAt"
142
+ }
113
143
  export interface IRegistrationPermission {
114
144
  canDelete: boolean;
115
145
  canEdit: boolean;
@@ -136,6 +166,7 @@ export interface IEvent {
136
166
  allowRegistration: boolean;
137
167
  attendanceType: EventAttendanceType[];
138
168
  catalog: IEventCatalogItem[] | null;
169
+ categories: string[];
139
170
  createdAt: string;
140
171
  createdById: string;
141
172
  creator?: IUser;
@@ -154,6 +185,7 @@ export interface IEvent {
154
185
  startDateTime: string;
155
186
  status: EventStatus;
156
187
  summary: string | null;
188
+ tags: string[];
157
189
  timeZone: string;
158
190
  title: string;
159
191
  updatedAt: string;
@@ -277,6 +309,8 @@ export interface ICreateEvent {
277
309
  allowRegistration?: boolean;
278
310
  /** Valid ways to attend the event */
279
311
  attendanceType?: EventAttendanceType[];
312
+ /** categories for the event */
313
+ categories?: string[];
280
314
  /** Description of the event */
281
315
  description?: string;
282
316
  /** Groups with edit access to the event */
@@ -301,6 +335,8 @@ export interface ICreateEvent {
301
335
  startDateTime: string;
302
336
  /** Summary of the event */
303
337
  summary?: string;
338
+ /** Tags for the event */
339
+ tags?: string[];
304
340
  /** IANA time zone for the event */
305
341
  timeZone: string;
306
342
  /** Title of the event */
@@ -1,4 +1,4 @@
1
- export { EventAccess, EventAttendanceType, EventStatus, GetEventsParams, IAddress, IAddressExtent, IAddressLocation, ICreateAddress, ICreateEvent, ICreateEventGeometry, ICreateRegistration, IEvent, IEventPermission, IEventCatalogItem, IEventGeometry, IRegistration, IRegistrationPermission, IUpdateEvent, IUpdateRegistration, IUser, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
1
+ export { EventAccess, EventAttendanceType, EventStatus, GetEventsParams, IAddress, IAddressExtent, IAddressLocation, ICreateAddress, ICreateEvent, ICreateEventGeometry, ICreateRegistration, IEvent, IEventPermission, IEventCatalogItem, IEventGeometry, IRegistration, IRegistrationPermission, IUpdateEvent, IUpdateRegistration, IUser, RegistrationRole, RegistrationStatus, SortOrder, EventSort, } from "./orval/api/orval-events";
2
2
  import { IHubRequestOptions } from "../../types";
3
3
  import { ICreateEvent, IUpdateEvent, ICreateRegistration, IUpdateRegistration, GetEventsParams } from "./orval/api/orval-events";
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.108.3",
3
+ "version": "14.109.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",