@esri/hub-common 14.89.1 → 14.90.1

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 (51) hide show
  1. package/dist/esm/events/api/events.js +59 -0
  2. package/dist/esm/events/api/events.js.map +1 -0
  3. package/dist/esm/events/api/index.js +4 -0
  4. package/dist/esm/events/api/index.js.map +1 -0
  5. package/dist/esm/events/api/orval/api/orval-events.js +79 -0
  6. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -0
  7. package/dist/esm/events/api/orval/async-return-type.js +1 -0
  8. package/dist/esm/events/api/orval/async-return-type.js.map +1 -0
  9. package/dist/esm/events/api/orval/custom-client.js +44 -0
  10. package/dist/esm/events/api/orval/custom-client.js.map +1 -0
  11. package/dist/esm/events/api/registrations.js +67 -0
  12. package/dist/esm/events/api/registrations.js.map +1 -0
  13. package/dist/esm/events/api/types.js +7 -0
  14. package/dist/esm/events/api/types.js.map +1 -0
  15. package/dist/esm/events/api/utils/authenticate-request.js +15 -0
  16. package/dist/esm/events/api/utils/authenticate-request.js.map +1 -0
  17. package/dist/esm/events/index.js +2 -0
  18. package/dist/esm/events/index.js.map +1 -0
  19. package/dist/esm/items/slugs.js +42 -25
  20. package/dist/esm/items/slugs.js.map +1 -1
  21. package/dist/node/events/api/events.js +65 -0
  22. package/dist/node/events/api/events.js.map +1 -0
  23. package/dist/node/events/api/index.js +7 -0
  24. package/dist/node/events/api/index.js.map +1 -0
  25. package/dist/node/events/api/orval/api/orval-events.js +82 -0
  26. package/dist/node/events/api/orval/api/orval-events.js.map +1 -0
  27. package/dist/node/events/api/orval/async-return-type.js +3 -0
  28. package/dist/node/events/api/orval/async-return-type.js.map +1 -0
  29. package/dist/node/events/api/orval/custom-client.js +48 -0
  30. package/dist/node/events/api/orval/custom-client.js.map +1 -0
  31. package/dist/node/events/api/registrations.js +74 -0
  32. package/dist/node/events/api/registrations.js.map +1 -0
  33. package/dist/node/events/api/types.js +12 -0
  34. package/dist/node/events/api/types.js.map +1 -0
  35. package/dist/node/events/api/utils/authenticate-request.js +19 -0
  36. package/dist/node/events/api/utils/authenticate-request.js.map +1 -0
  37. package/dist/node/events/index.js +5 -0
  38. package/dist/node/events/index.js.map +1 -0
  39. package/dist/node/items/slugs.js +42 -25
  40. package/dist/node/items/slugs.js.map +1 -1
  41. package/dist/types/events/api/events.d.ts +22 -0
  42. package/dist/types/events/api/index.d.ts +3 -0
  43. package/dist/types/events/api/orval/api/orval-events.d.ts +172 -0
  44. package/dist/types/events/api/orval/async-return-type.d.ts +7 -0
  45. package/dist/types/events/api/orval/custom-client.d.ts +26 -0
  46. package/dist/types/events/api/registrations.d.ts +29 -0
  47. package/dist/types/events/api/types.d.ts +44 -0
  48. package/dist/types/events/api/utils/authenticate-request.d.ts +9 -0
  49. package/dist/types/events/index.d.ts +1 -0
  50. package/dist/types/items/slugs.d.ts +6 -5
  51. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customClient = void 0;
4
+ async function customClient(orvalParams, customParams) {
5
+ const { url, method, data } = orvalParams;
6
+ const { mode, cache, credentials } = customParams;
7
+ const { headers, params } = combineParams(orvalParams, customParams);
8
+ const baseUrl = removeTrailingSlash(customParams.hubApiUrl);
9
+ const requestUrl = `${baseUrl}${url}?${new URLSearchParams(params)}`;
10
+ const requestOptions = {
11
+ headers,
12
+ method,
13
+ cache,
14
+ credentials,
15
+ mode,
16
+ };
17
+ if (data) {
18
+ requestOptions.body = JSON.stringify(data);
19
+ }
20
+ const res = await fetch(requestUrl, requestOptions);
21
+ const { statusText, status } = res;
22
+ if (res.ok) {
23
+ return res.json();
24
+ }
25
+ const error = await res.json();
26
+ throw new RemoteServerError(statusText, requestUrl, status, JSON.stringify(error.message));
27
+ }
28
+ exports.customClient = customClient;
29
+ function removeTrailingSlash(hubApiUrl = "https://hub.arcgis.com") {
30
+ return hubApiUrl.replace(/\/$/, "");
31
+ }
32
+ function combineParams(orvalParams, options) {
33
+ const headers = Object.assign(Object.assign({}, orvalParams.headers), options.headers);
34
+ if (options.token) {
35
+ headers.Authorization = options.token;
36
+ }
37
+ const params = Object.assign(Object.assign({}, orvalParams.params), options.params);
38
+ return { headers, params };
39
+ }
40
+ class RemoteServerError extends Error {
41
+ constructor(message, url, status, error) {
42
+ super(message);
43
+ this.status = status;
44
+ this.url = url;
45
+ this.error = error;
46
+ }
47
+ }
48
+ //# sourceMappingURL=custom-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-client.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/custom-client.ts"],"names":[],"mappings":";;;AA2BO,KAAK,UAAU,YAAY,CAChC,WAAyB,EACzB,YAA2B;IAE3B,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;IAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;IAClD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAErE,MAAM,OAAO,GAAG,mBAAmB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,GAAG,OAAO,GAAG,GAAG,IAAI,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;IAErE,MAAM,cAAc,GAAgB;QAClC,OAAO;QACP,MAAM;QACN,KAAK;QACL,WAAW;QACX,IAAI;KACL,CAAC;IACF,IAAI,IAAI,EAAE;QACR,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC5C;IAED,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACpD,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAEnC,IAAI,GAAG,CAAC,EAAE,EAAE;QACV,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;KACnB;IAED,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAC/B,MAAM,IAAI,iBAAiB,CACzB,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAC9B,CAAC;AACJ,CAAC;AApCD,oCAoCC;AAED,SAAS,mBAAmB,CAAC,SAAS,GAAG,wBAAwB;IAC/D,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,aAAa,CAAC,WAAyB,EAAE,OAAsB;IACtE,MAAM,OAAO,mCACR,WAAW,CAAC,OAAO,GACnB,OAAO,CAAC,OAAO,CACnB,CAAC;IACF,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;KACvC;IAED,MAAM,MAAM,mCACP,WAAW,CAAC,MAAM,GAClB,OAAO,CAAC,MAAM,CAClB,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,iBAAkB,SAAQ,KAAK;IAKnC,YAAY,OAAe,EAAE,GAAW,EAAE,MAAc,EAAE,KAAa;QACrE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteRegistration = exports.updateRegistration = exports.getRegistration = exports.createRegistration = void 0;
4
+ const authenticate_request_1 = require("./utils/authenticate-request");
5
+ const orval_events_1 = require("./orval/api/orval-events");
6
+ /**
7
+ * create an event registration
8
+ *
9
+ * @param {ICreateEventParams} options
10
+ * @return {*} {Promise<IRegistration>}
11
+ */
12
+ async function createRegistration(options) {
13
+ options.token = await authenticate_request_1.authenticateRequest(options);
14
+ return orval_events_1.createRegistration(options.data, options);
15
+ }
16
+ exports.createRegistration = createRegistration;
17
+ // /**
18
+ // * get registrations
19
+ // *
20
+ // * @param {IGetRegistrationsParams} options
21
+ // * @return {*} {Promise<IRegistration[]>} // paged response?
22
+ // */
23
+ // export async function getRegistrations(
24
+ // options: IGetRegistrationsParams
25
+ // ): Promise<IRegistration[]> {
26
+ // options.token = await authenticateRequest(options);
27
+ // return _getRegistrations(options.data, options);
28
+ // }
29
+ /**
30
+ * get a registration
31
+ *
32
+ * @param {IGetRegistrationParams} options
33
+ * @return {*} {Promise<IRegistration>}
34
+ */
35
+ async function getRegistration(options) {
36
+ options.token = await authenticate_request_1.authenticateRequest(options);
37
+ return orval_events_1.getRegistration(options.registrationId, options);
38
+ }
39
+ exports.getRegistration = getRegistration;
40
+ /**
41
+ * update a registration
42
+ *
43
+ * @param {IUpdateRegistrationParams} options
44
+ * @return {*} {Promise<IRegistration>}
45
+ */
46
+ async function updateRegistration(options) {
47
+ options.token = await authenticate_request_1.authenticateRequest(options);
48
+ return orval_events_1.updateRegistration(options.registrationId, options.data, options);
49
+ }
50
+ exports.updateRegistration = updateRegistration;
51
+ /**
52
+ * delete a registration
53
+ *
54
+ * @param {IDeleteRegistrationParams} options
55
+ * @return {*} {Promise<IRegistration>}
56
+ */
57
+ async function deleteRegistration(options) {
58
+ options.token = await authenticate_request_1.authenticateRequest(options);
59
+ return orval_events_1.deleteRegistration(options.registrationId, options);
60
+ }
61
+ exports.deleteRegistration = deleteRegistration;
62
+ // /**
63
+ // * confirm a registration
64
+ // *
65
+ // * @param {IConfirmRegistrationParams} options
66
+ // * @return {*} {Promise<IRegistration>}
67
+ // */
68
+ // export async function confirmRegistration(
69
+ // options: IConfirmRegistrationParams
70
+ // ): Promise<IRegistration> {
71
+ // options.token = await authenticateRequest(options);
72
+ // return _confirmRegistration(options);
73
+ // }
74
+ //# sourceMappingURL=registrations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registrations.js","sourceRoot":"","sources":["../../../../src/events/api/registrations.ts"],"names":[],"mappings":";;;AAOA,uEAAmE;AACnE,2DAOkC;AAElC;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AALD,gDAKC;AAED,MAAM;AACN,uBAAuB;AACvB,KAAK;AACL,8CAA8C;AAC9C,gEAAgE;AAChE,MAAM;AACN,0CAA0C;AAC1C,qCAAqC;AACrC,gCAAgC;AAChC,wDAAwD;AACxD,qDAAqD;AACrD,IAAI;AAEJ;;;;;GAKG;AACI,KAAK,UAAU,eAAe,CACnC,OAA+B;IAE/B,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,8BAAgB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AALD,0CAKC;AAED;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AALD,gDAKC;AAED;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AALD,gDAKC;AAED,MAAM;AACN,4BAA4B;AAC5B,KAAK;AACL,iDAAiD;AACjD,2CAA2C;AAC3C,MAAM;AACN,6CAA6C;AAC7C,wCAAwC;AACxC,8BAA8B;AAC9B,wDAAwD;AACxD,0CAA0C;AAC1C,IAAI"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var orval_events_1 = require("./orval/api/orval-events");
4
+ Object.defineProperty(exports, "EventStatus", { enumerable: true, get: function () { return orval_events_1.EventStatus; } });
5
+ Object.defineProperty(exports, "RegistrationStatus", { enumerable: true, get: function () { return orval_events_1.RegistrationStatus; } });
6
+ Object.defineProperty(exports, "RegistrationRole", { enumerable: true, get: function () { return orval_events_1.RegistrationRole; } });
7
+ // ICreateEventLocationsItem,
8
+ Object.defineProperty(exports, "EventAttendanceType", { enumerable: true, get: function () { return orval_events_1.EventAttendanceType; } });
9
+ // export interface IConfirmRegistrationParams extends IEventsRequestOptions {
10
+ // data: any;
11
+ // }
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":";;AAAA,yDAakC;AAThC,2GAAA,WAAW,OAAA;AACX,kHAAA,kBAAkB,OAAA;AAClB,gHAAA,gBAAgB,OAAA;AAGhB,6BAA6B;AAC7B,mHAAA,mBAAmB,OAAA;AA+DrB,8EAA8E;AAC9E,eAAe;AACf,IAAI"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authenticateRequest = void 0;
4
+ /**
5
+ * return a token created using options.authentication or set on options.token
6
+ *
7
+ * @export
8
+ * @param {IDiscussionsRequestOptions} options
9
+ * @return {*} {Promise<string>}
10
+ */
11
+ function authenticateRequest(options) {
12
+ const { token, authentication } = options;
13
+ if (authentication) {
14
+ return authentication.getToken(authentication.portal);
15
+ }
16
+ return Promise.resolve(token);
17
+ }
18
+ exports.authenticateRequest = authenticateRequest;
19
+ //# sourceMappingURL=authenticate-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authenticate-request.js","sourceRoot":"","sources":["../../../../../src/events/api/utils/authenticate-request.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,OAA8B;IAE9B,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IAE1C,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;KACvD;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC;AAVD,kDAUC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./api"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/events/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB"}
@@ -4,33 +4,56 @@ exports.getUniqueSlug = exports.findItemsBySlug = exports.getItemBySlug = export
4
4
  const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
5
5
  const utils_1 = require("../utils");
6
6
  const slugConverters_1 = require("./_internal/slugConverters");
7
+ const TYPEKEYWORD_SLUG_PREFIX = "slug";
8
+ const TYPEKEYWORD_MAX_LENGTH = 256;
7
9
  /**
8
- * Create a slug, namespaced to an org
9
- * Typically used to lookup items by a human readable name in urls
10
+ * Create a slug, namespaced to an org and accounting for the 256 character limit
11
+ * of individual typekeywords. Typically used to lookup items by a human readable name in urls
10
12
  *
11
13
  * @param title
12
14
  * @param orgKey
13
15
  * @returns
14
16
  */
15
17
  function constructSlug(title, orgKey) {
16
- return `${orgKey.toLowerCase()}|${utils_1.slugify(title)}`;
18
+ // typekeywords have a max length of 256 characters, so we use the slug
19
+ // format that gets persisted in typekeywords as our basis
20
+ return ([
21
+ // add the typekeyword slug prefix
22
+ TYPEKEYWORD_SLUG_PREFIX,
23
+ // add the orgKey segment
24
+ orgKey.toLowerCase(),
25
+ // add the slugified title segment
26
+ utils_1.slugify(title),
27
+ ]
28
+ .join("|")
29
+ // allow some padding at the end for incrementing so we don't wind up w/ weird, inconsistent slugs
30
+ // when the increment goes from single to multiple digits, i.e. avoid producing the following when
31
+ // deduping:
32
+ // slug|qa-pre-a-hub|some-really-really-...-really-long
33
+ // slug|qa-pre-a-hub|some-really-really-...-really-lo-1
34
+ // slug|qa-pre-a-hub|some-really-really-...-really-l-11
35
+ // slug|qa-pre-a-hub|some-really-really-...-really-100
36
+ .substring(0, TYPEKEYWORD_MAX_LENGTH - 4)
37
+ // removing tailing hyphens
38
+ .replace(/-+$/, "")
39
+ // remove typekeyword slug prefix, it's re-added in setSlugKeyword
40
+ .replace(new RegExp(`^${TYPEKEYWORD_SLUG_PREFIX}\\|`), ""));
17
41
  }
18
42
  exports.constructSlug = constructSlug;
19
43
  /**
20
44
  * Adds/Updates the slug typekeyword
21
45
  * Returns a new array of keywords
22
- * @param typeKeywords
23
- * @param slug
24
- * @returns
46
+ *
47
+ * @param typeKeywords A collection of typekeywords
48
+ * @param slug The slug to add/update
49
+ * @returns An updated collection of typekeywords
25
50
  */
26
51
  function setSlugKeyword(typeKeywords, slug) {
27
52
  // remove slug entry from array
28
- const removed = typeKeywords.filter((entry) => {
29
- return !entry.startsWith("slug|");
30
- });
53
+ const updatedTypekeywords = typeKeywords.filter((entry) => !entry.startsWith(`${TYPEKEYWORD_SLUG_PREFIX}|`));
31
54
  // now add it
32
- removed.push(`slug|${slug}`);
33
- return removed;
55
+ updatedTypekeywords.push([TYPEKEYWORD_SLUG_PREFIX, slug].join("|"));
56
+ return updatedTypekeywords;
34
57
  }
35
58
  exports.setSlugKeyword = setSlugKeyword;
36
59
  /**
@@ -73,8 +96,11 @@ exports.getItemBySlug = getItemBySlug;
73
96
  * @returns
74
97
  */
75
98
  function findItemsBySlug(slugInfo, requestOptions) {
99
+ const filter = slugInfo.slug.startsWith(`${TYPEKEYWORD_SLUG_PREFIX}|`)
100
+ ? slugInfo.slug
101
+ : [TYPEKEYWORD_SLUG_PREFIX, slugInfo.slug].join("|");
76
102
  const opts = {
77
- filter: `typekeywords:"slug|${slugInfo.slug}"`,
103
+ filter: `typekeywords:"${filter}"`,
78
104
  };
79
105
  if (requestOptions.authentication) {
80
106
  opts.authentication = requestOptions.authentication;
@@ -111,20 +137,11 @@ exports.findItemsBySlug = findItemsBySlug;
111
137
  * @returns
112
138
  */
113
139
  function getUniqueSlug(slugInfo, requestOptions, step = 0) {
114
- let combinedSlug = slugInfo.slug;
115
- if (step) {
116
- combinedSlug = `${slugInfo.slug}-${step}`;
117
- }
140
+ const combinedSlug = step ? [slugInfo.slug, step].join("-") : slugInfo.slug;
118
141
  return findItemsBySlug({ slug: combinedSlug, exclude: slugInfo.existingId }, requestOptions)
119
- .then((results) => {
120
- if (results.length) {
121
- step++;
122
- return getUniqueSlug(slugInfo, requestOptions, step);
123
- }
124
- else {
125
- return combinedSlug;
126
- }
127
- })
142
+ .then((results) => !results.length
143
+ ? combinedSlug
144
+ : getUniqueSlug(slugInfo, requestOptions, step + 1))
128
145
  .catch((e) => {
129
146
  throw Error(`Error in getUniqueSlug ${e}`);
130
147
  });
@@ -1 +1 @@
1
- {"version":3,"file":"slugs.js","sourceRoot":"","sources":["../../../src/items/slugs.ts"],"names":[],"mappings":";;;AAAA,iEAAgF;AAGhF,oCAAmC;AACnC,+DAAkE;AAElE;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,KAAa,EAAE,MAAc;IACzD,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,eAAO,CAAC,KAAK,CAAC,EAAE,CAAC;AACrD,CAAC;AAFD,sCAEC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,YAAsB,EAAE,IAAY;IACjE,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WG;AACH,SAAgB,aAAa,CAC3B,QAGC,EACD,cAA+B,EAC/B,OAAe,CAAC;IAEhB,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5E,OAAO,eAAe,CACpB,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,EACpD,cAAc,CACf;SACE,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAChB,CAAC,OAAO,CAAC,MAAM;QACb,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,GAAG,CAAC,CAAC,CACtD;SACA,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACX,MAAM,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC;AArBD,sCAqBC"}
@@ -0,0 +1,22 @@
1
+ import { IEvent, ICreateEventParams, IGetEventParams, IDeleteEventParams } from "./types";
2
+ /**
3
+ * create an event
4
+ *
5
+ * @param {ICreateEventParams} options
6
+ * @return {*}
7
+ */
8
+ export declare function createEvent(options: ICreateEventParams): Promise<IEvent>;
9
+ /**
10
+ * get an event
11
+ *
12
+ * @param {ICreateEventParams} options
13
+ * @return {*} {Promise<IGetEventEventResponse>}
14
+ */
15
+ export declare function getEvent(options: IGetEventParams): Promise<IEvent>;
16
+ /**
17
+ * delete an event
18
+ *
19
+ * @param {IDeleteEventParams} options
20
+ * @return {*} {Promise<IEvent>}
21
+ */
22
+ export declare function deleteEvent(options: IDeleteEventParams): Promise<IEvent>;
@@ -0,0 +1,3 @@
1
+ export * from "./events";
2
+ export * from "./registrations";
3
+ export * from "./types";
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Generated by orval v6.24.0 🍺
3
+ * Do not edit manually.
4
+ * Hub Events Service
5
+ * OpenAPI spec version: 0.0.1
6
+ */
7
+ import { AsyncReturnType } from "../async-return-type";
8
+ import { customClient } from "../custom-client";
9
+ export interface IUpdateEvent {
10
+ [key: string]: any;
11
+ }
12
+ export declare type IEventLocationsItem = {
13
+ [key: string]: any;
14
+ };
15
+ export declare type IEventCatalogItem = {
16
+ [key: string]: any;
17
+ };
18
+ export declare type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
19
+ export declare const EventStatus: {
20
+ readonly PLANNED: "PLANNED";
21
+ readonly CANCELED: "CANCELED";
22
+ readonly REMOVED: "REMOVED";
23
+ };
24
+ export interface IEvent {
25
+ allDay: boolean;
26
+ attendanceType: EventAttendanceType[];
27
+ capacity: number | null;
28
+ catalog: IEventCatalogItem[] | null;
29
+ createdAt: string;
30
+ createdById: string;
31
+ creator?: IUser;
32
+ description: string | null;
33
+ endDateTime: string;
34
+ id: string;
35
+ locations: IEventLocationsItem[] | null;
36
+ notifyAttendees: boolean;
37
+ onlineLocations: string[];
38
+ recurrence: string | null;
39
+ registrations?: IRegistration[];
40
+ startDateTime: string;
41
+ status: EventStatus;
42
+ summary: string;
43
+ timeZone: string;
44
+ title: string;
45
+ updatedAt: string;
46
+ }
47
+ export declare type RegistrationStatus = (typeof RegistrationStatus)[keyof typeof RegistrationStatus];
48
+ export declare const RegistrationStatus: {
49
+ readonly PENDING: "PENDING";
50
+ readonly ACCEPTED: "ACCEPTED";
51
+ readonly DECLINED: "DECLINED";
52
+ readonly BLOCKED: "BLOCKED";
53
+ };
54
+ export declare type RegistrationRole = (typeof RegistrationRole)[keyof typeof RegistrationRole];
55
+ export declare const RegistrationRole: {
56
+ readonly OWNER: "OWNER";
57
+ readonly ORGANIZER: "ORGANIZER";
58
+ readonly ATTENDEE: "ATTENDEE";
59
+ };
60
+ export interface IUpdateRegistration {
61
+ /** Role of the user in the event */
62
+ role?: RegistrationRole;
63
+ /** Status of the registration */
64
+ status?: RegistrationStatus;
65
+ }
66
+ export interface ICreateRegistration {
67
+ /** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
68
+ agoId?: string;
69
+ /** Email for the subscriber. Will always be extracted from the token unless service token is used. */
70
+ email?: string;
71
+ /** Event id being registered for */
72
+ eventId: string;
73
+ /** First name for the subscriber. Will always be extracted from the token unless service token is used. */
74
+ firstName?: string;
75
+ /** Last name for the subscriber. Will always be extracted from the token unless service token is used. */
76
+ lastName?: string;
77
+ /** Role of the user in the event */
78
+ role?: RegistrationRole;
79
+ /** Username for the subscriber. Will always be extracted from the token unless service token is used. */
80
+ username?: string;
81
+ }
82
+ export interface IUser {
83
+ agoId: string;
84
+ createdAt: string;
85
+ deleted: boolean;
86
+ email: string;
87
+ firstName: string;
88
+ lastName: string;
89
+ optedOut: boolean;
90
+ updatedAt: string;
91
+ username: string;
92
+ }
93
+ export interface IRegistration {
94
+ createdAt: string;
95
+ createdById: string;
96
+ event?: IEvent;
97
+ eventId: string;
98
+ id: number;
99
+ role: RegistrationRole;
100
+ status: RegistrationStatus;
101
+ updatedAt: string;
102
+ user?: IUser;
103
+ userId: string;
104
+ }
105
+ export declare type ICreateEventLocationsItem = {
106
+ [key: string]: any;
107
+ };
108
+ export declare type EventAttendanceType = (typeof EventAttendanceType)[keyof typeof EventAttendanceType];
109
+ export declare const EventAttendanceType: {
110
+ readonly VIRTUAL: "VIRTUAL";
111
+ readonly IN_PERSON: "IN_PERSON";
112
+ };
113
+ export interface ICreateEvent {
114
+ /** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
115
+ agoId?: string;
116
+ /** Flag for all day event */
117
+ allDay?: boolean;
118
+ /** Type of event */
119
+ attendanceType: EventAttendanceType[];
120
+ /** Capacity of the event. Minimum value is 1 */
121
+ capacity?: number;
122
+ /** Description of the event */
123
+ description?: string;
124
+ /** Email for the subscriber. Will always be extracted from the token unless service token is used. */
125
+ email?: string;
126
+ /** ISO8601 end date-time for the event */
127
+ endDateTime: string;
128
+ /** First name for the subscriber. Will always be extracted from the token unless service token is used. */
129
+ firstName?: string;
130
+ /** Last name for the subscriber. Will always be extracted from the token unless service token is used. */
131
+ lastName?: string;
132
+ /** Array of geojson objects for the event locations */
133
+ locations?: ICreateEventLocationsItem[];
134
+ /** Flag to notify attendees */
135
+ notifyAttendees?: boolean;
136
+ /** Online locations for the event */
137
+ onlineLocations?: string[];
138
+ /** ISO8601 start date-time for the event */
139
+ startDateTime: string;
140
+ /** Summary of the event */
141
+ summary: string;
142
+ /** IANA time zone for the event */
143
+ timeZone: string;
144
+ /** Title of the event */
145
+ title: string;
146
+ /** Username for the subscriber. Will always be extracted from the token unless service token is used. */
147
+ username?: string;
148
+ }
149
+ declare type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
150
+ export declare const createEvent: (iCreateEvent: ICreateEvent, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
151
+ export declare const getEvents: (options?: SecondParameter<typeof customClient>) => Promise<IEvent[]>;
152
+ export declare const getEvent: (id: string, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
153
+ export declare const updateEvent: (id: string, iUpdateEvent: IUpdateEvent, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
154
+ export declare const deleteEvent: (id: string, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
155
+ export declare const createRegistration: (iCreateRegistration: ICreateRegistration, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
156
+ export declare const getRegistrations: (options?: SecondParameter<typeof customClient>) => Promise<IRegistration[]>;
157
+ export declare const getRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
158
+ export declare const updateRegistration: (id: number, iUpdateRegistration: IUpdateRegistration, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
159
+ export declare const deleteRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
160
+ export declare const confirmRegistration: (options?: SecondParameter<typeof customClient>) => Promise<void>;
161
+ export declare type CreateEventResult = NonNullable<AsyncReturnType<typeof createEvent>>;
162
+ export declare type GetEventsResult = NonNullable<AsyncReturnType<typeof getEvents>>;
163
+ export declare type GetEventResult = NonNullable<AsyncReturnType<typeof getEvent>>;
164
+ export declare type UpdateEventResult = NonNullable<AsyncReturnType<typeof updateEvent>>;
165
+ export declare type DeleteEventResult = NonNullable<AsyncReturnType<typeof deleteEvent>>;
166
+ export declare type CreateRegistrationResult = NonNullable<AsyncReturnType<typeof createRegistration>>;
167
+ export declare type GetRegistrationsResult = NonNullable<AsyncReturnType<typeof getRegistrations>>;
168
+ export declare type GetRegistrationResult = NonNullable<AsyncReturnType<typeof getRegistration>>;
169
+ export declare type UpdateRegistrationResult = NonNullable<AsyncReturnType<typeof updateRegistration>>;
170
+ export declare type DeleteRegistrationResult = NonNullable<AsyncReturnType<typeof deleteRegistration>>;
171
+ export declare type ConfirmRegistrationResult = NonNullable<AsyncReturnType<typeof confirmRegistration>>;
172
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Orval generates return types for functions using utility type Awaited
3
+ * This was introduced in Typescript 4.5, but hub.js is using Typescript 3
4
+ *
5
+ * Replaces Awaited<ReturnType<T>> with AsyncReturnType<T>
6
+ */
7
+ export declare type AsyncReturnType<T extends (...args: any) => any> = T extends (...args: any) => Promise<infer U> ? U : T extends (...args: any) => infer U ? U : any;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Generated and copied from the [events service](https://github.com/ArcGIS/hub-newsletters/blob/master/orval/custom-client.ts)
3
+ * Do not edit manually
4
+ */
5
+ interface IHeaders {
6
+ [key: string]: string;
7
+ }
8
+ export interface IOrvalParams {
9
+ url: string;
10
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
11
+ headers?: IHeaders;
12
+ params?: Record<string, string>;
13
+ data?: Record<string, any>;
14
+ }
15
+ export interface ICustomParams {
16
+ hubApiUrl?: string;
17
+ token?: string;
18
+ headers?: IHeaders;
19
+ params?: Record<string, string>;
20
+ data?: Record<string, any>;
21
+ mode?: RequestMode;
22
+ cache?: RequestCache;
23
+ credentials?: RequestCredentials;
24
+ }
25
+ export declare function customClient<T>(orvalParams: IOrvalParams, customParams: ICustomParams): Promise<T>;
26
+ export {};
@@ -0,0 +1,29 @@
1
+ import { IRegistration, ICreateRegistrationParams, IDeleteRegistrationParams, IGetRegistrationParams, IUpdateRegistrationParams } from "./types";
2
+ /**
3
+ * create an event registration
4
+ *
5
+ * @param {ICreateEventParams} options
6
+ * @return {*} {Promise<IRegistration>}
7
+ */
8
+ export declare function createRegistration(options: ICreateRegistrationParams): Promise<IRegistration>;
9
+ /**
10
+ * get a registration
11
+ *
12
+ * @param {IGetRegistrationParams} options
13
+ * @return {*} {Promise<IRegistration>}
14
+ */
15
+ export declare function getRegistration(options: IGetRegistrationParams): Promise<IRegistration>;
16
+ /**
17
+ * update a registration
18
+ *
19
+ * @param {IUpdateRegistrationParams} options
20
+ * @return {*} {Promise<IRegistration>}
21
+ */
22
+ export declare function updateRegistration(options: IUpdateRegistrationParams): Promise<IRegistration>;
23
+ /**
24
+ * delete a registration
25
+ *
26
+ * @param {IDeleteRegistrationParams} options
27
+ * @return {*} {Promise<IRegistration>}
28
+ */
29
+ export declare function deleteRegistration(options: IDeleteRegistrationParams): Promise<IRegistration>;
@@ -0,0 +1,44 @@
1
+ export { IUpdateRegistration, ICreateRegistration, IUpdateEvent, EventStatus, RegistrationStatus, RegistrationRole, IUser, IRegistration, EventAttendanceType, IEvent, ICreateEvent, } from "./orval/api/orval-events";
2
+ import { IHubRequestOptions } from "../../types";
3
+ import { ICreateEvent, IUpdateEvent, ICreateRegistration, IUpdateRegistration } from "./orval/api/orval-events";
4
+ /**
5
+ * options for making requests against the Events API
6
+ *
7
+ * @export
8
+ * @interface IEventsRequestOptions
9
+ * @extends IHubRequestOptions
10
+ */
11
+ export interface IEventsRequestOptions extends Omit<IHubRequestOptions, "httpMethod" | "isPortal">, Pick<RequestInit, "mode" | "cache" | "credentials"> {
12
+ httpMethod?: "GET" | "POST" | "PATCH" | "DELETE";
13
+ isPortal?: boolean;
14
+ token?: string;
15
+ data?: {
16
+ [key: string]: any;
17
+ };
18
+ }
19
+ export interface ICreateEventParams extends IEventsRequestOptions {
20
+ data: ICreateEvent;
21
+ }
22
+ export interface IGetEventParams extends IEventsRequestOptions {
23
+ eventId: string;
24
+ }
25
+ export interface IUpdateEventParams extends IEventsRequestOptions {
26
+ eventId: string;
27
+ data: IUpdateEvent;
28
+ }
29
+ export interface IDeleteEventParams extends IEventsRequestOptions {
30
+ eventId: string;
31
+ }
32
+ export interface ICreateRegistrationParams extends IEventsRequestOptions {
33
+ data: ICreateRegistration;
34
+ }
35
+ export interface IGetRegistrationParams extends IEventsRequestOptions {
36
+ registrationId: number;
37
+ }
38
+ export interface IUpdateRegistrationParams extends IEventsRequestOptions {
39
+ registrationId: number;
40
+ data: IUpdateRegistration;
41
+ }
42
+ export interface IDeleteRegistrationParams extends IEventsRequestOptions {
43
+ registrationId: number;
44
+ }
@@ -0,0 +1,9 @@
1
+ import { IEventsRequestOptions } from "../types";
2
+ /**
3
+ * return a token created using options.authentication or set on options.token
4
+ *
5
+ * @export
6
+ * @param {IDiscussionsRequestOptions} options
7
+ * @return {*} {Promise<string>}
8
+ */
9
+ export declare function authenticateRequest(options: IEventsRequestOptions): Promise<string>;
@@ -0,0 +1 @@
1
+ export * from "./api";