@esri/hub-common 14.92.3 → 14.93.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/events/api/events.js +15 -17
- package/dist/esm/events/api/events.js.map +1 -1
- package/dist/esm/events/api/orval/api/orval-events.js +26 -29
- package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/esm/events/api/orval/custom-client.js +2 -2
- package/dist/esm/events/api/orval/custom-client.js.map +1 -1
- package/dist/esm/events/api/registrations.js +5 -17
- package/dist/esm/events/api/registrations.js.map +1 -1
- package/dist/esm/events/api/types.js +1 -6
- package/dist/esm/events/api/types.js.map +1 -1
- package/dist/node/events/api/events.js +16 -17
- package/dist/node/events/api/events.js.map +1 -1
- package/dist/node/events/api/orval/api/orval-events.js +27 -30
- package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/node/events/api/orval/custom-client.js +2 -2
- package/dist/node/events/api/orval/custom-client.js.map +1 -1
- package/dist/node/events/api/registrations.js +5 -17
- package/dist/node/events/api/registrations.js.map +1 -1
- package/dist/node/events/api/types.js +2 -6
- package/dist/node/events/api/types.js.map +1 -1
- package/dist/types/events/api/events.d.ts +11 -4
- package/dist/types/events/api/orval/api/orval-events.d.ts +112 -53
- package/dist/types/events/api/orval/custom-client.d.ts +4 -8
- package/dist/types/events/api/registrations.d.ts +4 -4
- package/dist/types/events/api/types.d.ts +5 -2
- package/package.json +1 -1
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import { authenticateRequest } from "./utils/authenticate-request";
|
|
2
|
-
import { createEvent as _createEvent, getEvent as _getEvent, deleteEvent as _deleteEvent, } from "./orval/api/orval-events";
|
|
2
|
+
import { createEvent as _createEvent, getEvents as _getEvents, getEvent as _getEvent, deleteEvent as _deleteEvent, } from "./orval/api/orval-events";
|
|
3
3
|
/**
|
|
4
4
|
* create an event
|
|
5
5
|
*
|
|
6
6
|
* @param {ICreateEventParams} options
|
|
7
|
-
* @return {
|
|
7
|
+
* @return {Promise<IEvent>}
|
|
8
8
|
*/
|
|
9
9
|
export async function createEvent(options) {
|
|
10
10
|
options.token = await authenticateRequest(options);
|
|
11
11
|
return _createEvent(options.data, options);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// return _getEvents(options.data);
|
|
24
|
-
// }
|
|
13
|
+
/**
|
|
14
|
+
* get events
|
|
15
|
+
*
|
|
16
|
+
* @param {IGetEventsParams} options
|
|
17
|
+
* @return {Promise<IEvent[]>}
|
|
18
|
+
*/
|
|
19
|
+
export async function getEvents(options) {
|
|
20
|
+
options.token = await authenticateRequest(options);
|
|
21
|
+
return _getEvents(options.data, options);
|
|
22
|
+
}
|
|
25
23
|
/**
|
|
26
24
|
* get an event
|
|
27
25
|
*
|
|
28
26
|
* @param {ICreateEventParams} options
|
|
29
|
-
* @return {
|
|
27
|
+
* @return {Promise<IEvent>}
|
|
30
28
|
*/
|
|
31
29
|
export async function getEvent(options) {
|
|
32
30
|
options.token = await authenticateRequest(options);
|
|
@@ -37,7 +35,7 @@ export async function getEvent(options) {
|
|
|
37
35
|
// *
|
|
38
36
|
// * @param {IUpdateEventParams} options
|
|
39
37
|
// * todo: update return type when defined
|
|
40
|
-
// * @return {
|
|
38
|
+
// * @return {Promise<IEvent>}
|
|
41
39
|
// */
|
|
42
40
|
// export async function updateEvent(
|
|
43
41
|
// options: IUpdateEventParams
|
|
@@ -50,7 +48,7 @@ export async function getEvent(options) {
|
|
|
50
48
|
* delete an event
|
|
51
49
|
*
|
|
52
50
|
* @param {IDeleteEventParams} options
|
|
53
|
-
* @return {
|
|
51
|
+
* @return {Promise<IEvent>}
|
|
54
52
|
*/
|
|
55
53
|
export async function deleteEvent(options) {
|
|
56
54
|
options.token = await authenticateRequest(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../src/events/api/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../src/events/api/events.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,WAAW,IAAI,YAAY,EAC3B,SAAS,IAAI,UAAU,EACvB,QAAQ,IAAI,SAAS,EAErB,WAAW,IAAI,YAAY,GAC5B,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAyB;IACvD,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,OAAwB;IACrD,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM;AACN,qBAAqB;AACrB,KAAK;AACL,yCAAyC;AACzC,6CAA6C;AAC7C,+BAA+B;AAC/B,MAAM;AACN,qCAAqC;AACrC,gCAAgC;AAChC,6CAA6C;AAC7C,qBAAqB;AACrB,wDAAwD;AACxD,iEAAiE;AACjE,IAAI;AAEJ;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { customClient } from "../custom-client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
PLANNED
|
|
5
|
-
CANCELED
|
|
6
|
-
REMOVED
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
PENDING
|
|
11
|
-
ACCEPTED
|
|
12
|
-
DECLINED
|
|
13
|
-
BLOCKED
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
OWNER
|
|
18
|
-
ORGANIZER
|
|
19
|
-
ATTENDEE
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
VIRTUAL
|
|
24
|
-
IN_PERSON
|
|
25
|
-
};
|
|
2
|
+
export var EventStatus;
|
|
3
|
+
(function (EventStatus) {
|
|
4
|
+
EventStatus["PLANNED"] = "PLANNED";
|
|
5
|
+
EventStatus["CANCELED"] = "CANCELED";
|
|
6
|
+
EventStatus["REMOVED"] = "REMOVED";
|
|
7
|
+
})(EventStatus || (EventStatus = {}));
|
|
8
|
+
export var RegistrationStatus;
|
|
9
|
+
(function (RegistrationStatus) {
|
|
10
|
+
RegistrationStatus["PENDING"] = "PENDING";
|
|
11
|
+
RegistrationStatus["ACCEPTED"] = "ACCEPTED";
|
|
12
|
+
RegistrationStatus["DECLINED"] = "DECLINED";
|
|
13
|
+
RegistrationStatus["BLOCKED"] = "BLOCKED";
|
|
14
|
+
})(RegistrationStatus || (RegistrationStatus = {}));
|
|
15
|
+
export var RegistrationRole;
|
|
16
|
+
(function (RegistrationRole) {
|
|
17
|
+
RegistrationRole["OWNER"] = "OWNER";
|
|
18
|
+
RegistrationRole["ORGANIZER"] = "ORGANIZER";
|
|
19
|
+
RegistrationRole["ATTENDEE"] = "ATTENDEE";
|
|
20
|
+
})(RegistrationRole || (RegistrationRole = {}));
|
|
21
|
+
export var EventAttendanceType;
|
|
22
|
+
(function (EventAttendanceType) {
|
|
23
|
+
EventAttendanceType["VIRTUAL"] = "VIRTUAL";
|
|
24
|
+
EventAttendanceType["IN_PERSON"] = "IN_PERSON";
|
|
25
|
+
})(EventAttendanceType || (EventAttendanceType = {}));
|
|
26
26
|
export const createEvent = (iCreateEvent, options) => {
|
|
27
27
|
return customClient({
|
|
28
28
|
url: `/api/events/v1/events`,
|
|
@@ -31,8 +31,8 @@ export const createEvent = (iCreateEvent, options) => {
|
|
|
31
31
|
data: iCreateEvent,
|
|
32
32
|
}, options);
|
|
33
33
|
};
|
|
34
|
-
export const getEvents = (options) => {
|
|
35
|
-
return customClient({ url: `/api/events/v1/events`, method: "GET" }, options);
|
|
34
|
+
export const getEvents = (params, options) => {
|
|
35
|
+
return customClient({ url: `/api/events/v1/events`, method: "GET", params }, options);
|
|
36
36
|
};
|
|
37
37
|
export const getEvent = (id, options) => {
|
|
38
38
|
return customClient({ url: `/api/events/v1/events/${id}`, method: "GET" }, options);
|
|
@@ -73,7 +73,4 @@ export const updateRegistration = (id, iUpdateRegistration, options) => {
|
|
|
73
73
|
export const deleteRegistration = (id, options) => {
|
|
74
74
|
return customClient({ url: `/api/events/v1/registrations/${id}`, method: "DELETE" }, options);
|
|
75
75
|
};
|
|
76
|
-
export const confirmRegistration = (options) => {
|
|
77
|
-
return customClient({ url: `/api/events/v1/registrations/confirmation`, method: "GET" }, options);
|
|
78
|
-
};
|
|
79
76
|
//# sourceMappingURL=orval-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":"AAQA,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AE,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"}
|
|
@@ -26,9 +26,9 @@ function removeTrailingSlash(hubApiUrl = "https://hub.arcgis.com") {
|
|
|
26
26
|
return hubApiUrl.replace(/\/$/, "");
|
|
27
27
|
}
|
|
28
28
|
function combineParams(orvalParams, options) {
|
|
29
|
-
const headers = Object.assign(Object.assign({}, orvalParams.headers), options.headers);
|
|
29
|
+
const headers = new Headers(Object.assign(Object.assign({}, orvalParams.headers), options.headers));
|
|
30
30
|
if (options.token) {
|
|
31
|
-
headers.Authorization
|
|
31
|
+
headers.set("Authorization", options.token);
|
|
32
32
|
}
|
|
33
33
|
const params = Object.assign(Object.assign({}, orvalParams.params), options.params);
|
|
34
34
|
return { headers, params };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-client.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/custom-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-client.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/custom-client.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,KAAK,U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,GAAG,IAAI,OAAO,iCACtB,WAAW,CAAC,OAAO,GACnB,OAAO,CAAC,OAAO,EAClB,CAAC;IACH,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;KAC7C;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"}
|
|
@@ -4,7 +4,7 @@ import { createRegistration as _createRegistration, getRegistration as _getRegis
|
|
|
4
4
|
* create an event registration
|
|
5
5
|
*
|
|
6
6
|
* @param {ICreateEventParams} options
|
|
7
|
-
* @return {
|
|
7
|
+
* @return {Promise<IRegistration>}
|
|
8
8
|
*/
|
|
9
9
|
export async function createRegistration(options) {
|
|
10
10
|
options.token = await authenticateRequest(options);
|
|
@@ -14,7 +14,7 @@ export async function createRegistration(options) {
|
|
|
14
14
|
// * get registrations
|
|
15
15
|
// *
|
|
16
16
|
// * @param {IGetRegistrationsParams} options
|
|
17
|
-
// * @return {
|
|
17
|
+
// * @return {Promise<IRegistration[]>} // paged response?
|
|
18
18
|
// */
|
|
19
19
|
// export async function getRegistrations(
|
|
20
20
|
// options: IGetRegistrationsParams
|
|
@@ -26,7 +26,7 @@ export async function createRegistration(options) {
|
|
|
26
26
|
* get a registration
|
|
27
27
|
*
|
|
28
28
|
* @param {IGetRegistrationParams} options
|
|
29
|
-
* @return {
|
|
29
|
+
* @return {Promise<IRegistration>}
|
|
30
30
|
*/
|
|
31
31
|
export async function getRegistration(options) {
|
|
32
32
|
options.token = await authenticateRequest(options);
|
|
@@ -36,7 +36,7 @@ export async function getRegistration(options) {
|
|
|
36
36
|
* update a registration
|
|
37
37
|
*
|
|
38
38
|
* @param {IUpdateRegistrationParams} options
|
|
39
|
-
* @return {
|
|
39
|
+
* @return {Promise<IRegistration>}
|
|
40
40
|
*/
|
|
41
41
|
export async function updateRegistration(options) {
|
|
42
42
|
options.token = await authenticateRequest(options);
|
|
@@ -46,22 +46,10 @@ export async function updateRegistration(options) {
|
|
|
46
46
|
* delete a registration
|
|
47
47
|
*
|
|
48
48
|
* @param {IDeleteRegistrationParams} options
|
|
49
|
-
* @return {
|
|
49
|
+
* @return {Promise<IRegistration>}
|
|
50
50
|
*/
|
|
51
51
|
export async function deleteRegistration(options) {
|
|
52
52
|
options.token = await authenticateRequest(options);
|
|
53
53
|
return _deleteRegistration(options.registrationId, options);
|
|
54
54
|
}
|
|
55
|
-
// /**
|
|
56
|
-
// * confirm a registration
|
|
57
|
-
// *
|
|
58
|
-
// * @param {IConfirmRegistrationParams} options
|
|
59
|
-
// * @return {*} {Promise<IRegistration>}
|
|
60
|
-
// */
|
|
61
|
-
// export async function confirmRegistration(
|
|
62
|
-
// options: IConfirmRegistrationParams
|
|
63
|
-
// ): Promise<IRegistration> {
|
|
64
|
-
// options.token = await authenticateRequest(options);
|
|
65
|
-
// return _confirmRegistration(options);
|
|
66
|
-
// }
|
|
67
55
|
//# sourceMappingURL=registrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registrations.js","sourceRoot":"","sources":["../../../../src/events/api/registrations.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,kBAAkB,IAAI,mBAAmB,EAEzC,eAAe,IAAI,gBAAgB,EACnC,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,
|
|
1
|
+
{"version":3,"file":"registrations.js","sourceRoot":"","sources":["../../../../src/events/api/registrations.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,kBAAkB,IAAI,mBAAmB,EAEzC,eAAe,IAAI,gBAAgB,EACnC,kBAAkB,IAAI,mBAAmB,EACzC,kBAAkB,IAAI,mBAAmB,GAC1C,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM;AACN,uBAAuB;AACvB,KAAK;AACL,8CAA8C;AAC9C,2DAA2D;AAC3D,MAAM;AACN,0CAA0C;AAC1C,qCAAqC;AACrC,gCAAgC;AAChC,wDAAwD;AACxD,qDAAqD;AACrD,IAAI;AAEJ;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAA+B;IAE/B,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,gBAAgB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAkC;IAElC,OAAO,CAAC,KAAK,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
// ICreateEventLocationsItem,
|
|
3
|
-
EventAttendanceType, } from "./orval/api/orval-events";
|
|
4
|
-
// export interface IConfirmRegistrationParams extends IEventsRequestOptions {
|
|
5
|
-
// data: any;
|
|
6
|
-
// }
|
|
1
|
+
export { EventAttendanceType, EventStatus, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
|
|
7
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,WAAW,EAgBX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteEvent = exports.getEvent = exports.createEvent = void 0;
|
|
3
|
+
exports.deleteEvent = exports.getEvent = exports.getEvents = exports.createEvent = void 0;
|
|
4
4
|
const authenticate_request_1 = require("./utils/authenticate-request");
|
|
5
5
|
const orval_events_1 = require("./orval/api/orval-events");
|
|
6
6
|
/**
|
|
7
7
|
* create an event
|
|
8
8
|
*
|
|
9
9
|
* @param {ICreateEventParams} options
|
|
10
|
-
* @return {
|
|
10
|
+
* @return {Promise<IEvent>}
|
|
11
11
|
*/
|
|
12
12
|
async function createEvent(options) {
|
|
13
13
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
14
14
|
return orval_events_1.createEvent(options.data, options);
|
|
15
15
|
}
|
|
16
16
|
exports.createEvent = createEvent;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// }
|
|
17
|
+
/**
|
|
18
|
+
* get events
|
|
19
|
+
*
|
|
20
|
+
* @param {IGetEventsParams} options
|
|
21
|
+
* @return {Promise<IEvent[]>}
|
|
22
|
+
*/
|
|
23
|
+
async function getEvents(options) {
|
|
24
|
+
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
25
|
+
return orval_events_1.getEvents(options.data, options);
|
|
26
|
+
}
|
|
27
|
+
exports.getEvents = getEvents;
|
|
29
28
|
/**
|
|
30
29
|
* get an event
|
|
31
30
|
*
|
|
32
31
|
* @param {ICreateEventParams} options
|
|
33
|
-
* @return {
|
|
32
|
+
* @return {Promise<IEvent>}
|
|
34
33
|
*/
|
|
35
34
|
async function getEvent(options) {
|
|
36
35
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
@@ -42,7 +41,7 @@ exports.getEvent = getEvent;
|
|
|
42
41
|
// *
|
|
43
42
|
// * @param {IUpdateEventParams} options
|
|
44
43
|
// * todo: update return type when defined
|
|
45
|
-
// * @return {
|
|
44
|
+
// * @return {Promise<IEvent>}
|
|
46
45
|
// */
|
|
47
46
|
// export async function updateEvent(
|
|
48
47
|
// options: IUpdateEventParams
|
|
@@ -55,7 +54,7 @@ exports.getEvent = getEvent;
|
|
|
55
54
|
* delete an event
|
|
56
55
|
*
|
|
57
56
|
* @param {IDeleteEventParams} options
|
|
58
|
-
* @return {
|
|
57
|
+
* @return {Promise<IEvent>}
|
|
59
58
|
*/
|
|
60
59
|
async function deleteEvent(options) {
|
|
61
60
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../src/events/api/events.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../../src/events/api/events.ts"],"names":[],"mappings":";;;AAQA,uEAAmE;AACnE,2DAMkC;AAElC;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,0BAAY,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AALD,kCAKC;AAED;;;;;GAKG;AACI,KAAK,UAAU,SAAS,CAAC,OAAyB;IACvD,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,wBAAU,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC;AAHD,8BAGC;AAED;;;;;GAKG;AACI,KAAK,UAAU,QAAQ,CAAC,OAAwB;IACrD,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,uBAAS,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAHD,4BAGC;AAED,MAAM;AACN,qBAAqB;AACrB,KAAK;AACL,yCAAyC;AACzC,6CAA6C;AAC7C,+BAA+B;AAC/B,MAAM;AACN,qCAAqC;AACrC,gCAAgC;AAChC,6CAA6C;AAC7C,qBAAqB;AACrB,wDAAwD;AACxD,iEAAiE;AACjE,IAAI;AAEJ;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,OAAO,CAAC,KAAK,GAAG,MAAM,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,0BAAY,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AALD,kCAKC"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deleteRegistration = exports.updateRegistration = exports.getRegistration = exports.getRegistrations = exports.createRegistration = exports.deleteEvent = exports.updateEvent = exports.getEvent = exports.getEvents = exports.createEvent = exports.EventAttendanceType = exports.RegistrationRole = exports.RegistrationStatus = exports.EventStatus = void 0;
|
|
4
4
|
const custom_client_1 = require("../custom-client");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
PLANNED
|
|
8
|
-
CANCELED
|
|
9
|
-
REMOVED
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
PENDING
|
|
14
|
-
ACCEPTED
|
|
15
|
-
DECLINED
|
|
16
|
-
BLOCKED
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
OWNER
|
|
21
|
-
ORGANIZER
|
|
22
|
-
ATTENDEE
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
VIRTUAL
|
|
27
|
-
IN_PERSON
|
|
28
|
-
};
|
|
5
|
+
var EventStatus;
|
|
6
|
+
(function (EventStatus) {
|
|
7
|
+
EventStatus["PLANNED"] = "PLANNED";
|
|
8
|
+
EventStatus["CANCELED"] = "CANCELED";
|
|
9
|
+
EventStatus["REMOVED"] = "REMOVED";
|
|
10
|
+
})(EventStatus = exports.EventStatus || (exports.EventStatus = {}));
|
|
11
|
+
var RegistrationStatus;
|
|
12
|
+
(function (RegistrationStatus) {
|
|
13
|
+
RegistrationStatus["PENDING"] = "PENDING";
|
|
14
|
+
RegistrationStatus["ACCEPTED"] = "ACCEPTED";
|
|
15
|
+
RegistrationStatus["DECLINED"] = "DECLINED";
|
|
16
|
+
RegistrationStatus["BLOCKED"] = "BLOCKED";
|
|
17
|
+
})(RegistrationStatus = exports.RegistrationStatus || (exports.RegistrationStatus = {}));
|
|
18
|
+
var RegistrationRole;
|
|
19
|
+
(function (RegistrationRole) {
|
|
20
|
+
RegistrationRole["OWNER"] = "OWNER";
|
|
21
|
+
RegistrationRole["ORGANIZER"] = "ORGANIZER";
|
|
22
|
+
RegistrationRole["ATTENDEE"] = "ATTENDEE";
|
|
23
|
+
})(RegistrationRole = exports.RegistrationRole || (exports.RegistrationRole = {}));
|
|
24
|
+
var EventAttendanceType;
|
|
25
|
+
(function (EventAttendanceType) {
|
|
26
|
+
EventAttendanceType["VIRTUAL"] = "VIRTUAL";
|
|
27
|
+
EventAttendanceType["IN_PERSON"] = "IN_PERSON";
|
|
28
|
+
})(EventAttendanceType = exports.EventAttendanceType || (exports.EventAttendanceType = {}));
|
|
29
29
|
exports.createEvent = (iCreateEvent, options) => {
|
|
30
30
|
return custom_client_1.customClient({
|
|
31
31
|
url: `/api/events/v1/events`,
|
|
@@ -34,8 +34,8 @@ exports.createEvent = (iCreateEvent, options) => {
|
|
|
34
34
|
data: iCreateEvent,
|
|
35
35
|
}, options);
|
|
36
36
|
};
|
|
37
|
-
exports.getEvents = (options) => {
|
|
38
|
-
return custom_client_1.customClient({ url: `/api/events/v1/events`, method: "GET" }, options);
|
|
37
|
+
exports.getEvents = (params, options) => {
|
|
38
|
+
return custom_client_1.customClient({ url: `/api/events/v1/events`, method: "GET", params }, options);
|
|
39
39
|
};
|
|
40
40
|
exports.getEvent = (id, options) => {
|
|
41
41
|
return custom_client_1.customClient({ url: `/api/events/v1/events/${id}`, method: "GET" }, options);
|
|
@@ -76,7 +76,4 @@ exports.updateRegistration = (id, iUpdateRegistration, options) => {
|
|
|
76
76
|
exports.deleteRegistration = (id, options) => {
|
|
77
77
|
return custom_client_1.customClient({ url: `/api/events/v1/registrations/${id}`, method: "DELETE" }, options);
|
|
78
78
|
};
|
|
79
|
-
exports.confirmRegistration = (options) => {
|
|
80
|
-
return custom_client_1.customClient({ url: `/api/events/v1/registrations/confirmation`, method: "GET" }, options);
|
|
81
|
-
};
|
|
82
79
|
//# sourceMappingURL=orval-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;AAQA,oDAAgD;AA0DhD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AACD,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;AAwDD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;AACzB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AA6EY,QAAA,WAAW,GAAG,CACzB,YAA0B,EAC1B,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,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;AAEW,QAAA,SAAS,GAAG,CACvB,MAAwB,EACxB,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,uBAAuB,EAAE,M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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"}
|
|
@@ -30,9 +30,9 @@ function removeTrailingSlash(hubApiUrl = "https://hub.arcgis.com") {
|
|
|
30
30
|
return hubApiUrl.replace(/\/$/, "");
|
|
31
31
|
}
|
|
32
32
|
function combineParams(orvalParams, options) {
|
|
33
|
-
const headers = Object.assign(Object.assign({}, orvalParams.headers), options.headers);
|
|
33
|
+
const headers = new Headers(Object.assign(Object.assign({}, orvalParams.headers), options.headers));
|
|
34
34
|
if (options.token) {
|
|
35
|
-
headers.Authorization
|
|
35
|
+
headers.set("Authorization", options.token);
|
|
36
36
|
}
|
|
37
37
|
const params = Object.assign(Object.assign({}, orvalParams.params), options.params);
|
|
38
38
|
return { headers, params };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-client.js","sourceRoot":"","sources":["../../../../../src/events/api/orval/custom-client.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"custom-client.js","sourceRoot":"","sources":["../../../../../src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AAC;AAED,SAAS,aAAa,CAAC,WAAyB,EAAE,OAAsB;IACtE,MAAM,OAAO,GAAG,IAAI,OAAO,iCACtB,WAAW,CAAC,OAAO,GACnB,OAAO,CAAC,OAAO,EAClB,CAAC;IACH,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;KAC7C;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"}
|
|
@@ -7,7 +7,7 @@ const orval_events_1 = require("./orval/api/orval-events");
|
|
|
7
7
|
* create an event registration
|
|
8
8
|
*
|
|
9
9
|
* @param {ICreateEventParams} options
|
|
10
|
-
* @return {
|
|
10
|
+
* @return {Promise<IRegistration>}
|
|
11
11
|
*/
|
|
12
12
|
async function createRegistration(options) {
|
|
13
13
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
@@ -18,7 +18,7 @@ exports.createRegistration = createRegistration;
|
|
|
18
18
|
// * get registrations
|
|
19
19
|
// *
|
|
20
20
|
// * @param {IGetRegistrationsParams} options
|
|
21
|
-
// * @return {
|
|
21
|
+
// * @return {Promise<IRegistration[]>} // paged response?
|
|
22
22
|
// */
|
|
23
23
|
// export async function getRegistrations(
|
|
24
24
|
// options: IGetRegistrationsParams
|
|
@@ -30,7 +30,7 @@ exports.createRegistration = createRegistration;
|
|
|
30
30
|
* get a registration
|
|
31
31
|
*
|
|
32
32
|
* @param {IGetRegistrationParams} options
|
|
33
|
-
* @return {
|
|
33
|
+
* @return {Promise<IRegistration>}
|
|
34
34
|
*/
|
|
35
35
|
async function getRegistration(options) {
|
|
36
36
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
@@ -41,7 +41,7 @@ exports.getRegistration = getRegistration;
|
|
|
41
41
|
* update a registration
|
|
42
42
|
*
|
|
43
43
|
* @param {IUpdateRegistrationParams} options
|
|
44
|
-
* @return {
|
|
44
|
+
* @return {Promise<IRegistration>}
|
|
45
45
|
*/
|
|
46
46
|
async function updateRegistration(options) {
|
|
47
47
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
@@ -52,23 +52,11 @@ exports.updateRegistration = updateRegistration;
|
|
|
52
52
|
* delete a registration
|
|
53
53
|
*
|
|
54
54
|
* @param {IDeleteRegistrationParams} options
|
|
55
|
-
* @return {
|
|
55
|
+
* @return {Promise<IRegistration>}
|
|
56
56
|
*/
|
|
57
57
|
async function deleteRegistration(options) {
|
|
58
58
|
options.token = await authenticate_request_1.authenticateRequest(options);
|
|
59
59
|
return orval_events_1.deleteRegistration(options.registrationId, options);
|
|
60
60
|
}
|
|
61
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
62
|
//# sourceMappingURL=registrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registrations.js","sourceRoot":"","sources":["../../../../src/events/api/registrations.ts"],"names":[],"mappings":";;;AAOA,uEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"registrations.js","sourceRoot":"","sources":["../../../../src/events/api/registrations.ts"],"names":[],"mappings":";;;AAOA,uEAAmE;AACnE,2DAMkC;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,2DAA2D;AAC3D,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"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var orval_events_1 = require("./orval/api/orval-events");
|
|
4
|
+
Object.defineProperty(exports, "EventAttendanceType", { enumerable: true, get: function () { return orval_events_1.EventAttendanceType; } });
|
|
4
5
|
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
6
|
Object.defineProperty(exports, "RegistrationRole", { enumerable: true, get: function () { return orval_events_1.RegistrationRole; } });
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "EventAttendanceType", { enumerable: true, get: function () { return orval_events_1.EventAttendanceType; } });
|
|
9
|
-
// export interface IConfirmRegistrationParams extends IEventsRequestOptions {
|
|
10
|
-
// data: any;
|
|
11
|
-
// }
|
|
7
|
+
Object.defineProperty(exports, "RegistrationStatus", { enumerable: true, get: function () { return orval_events_1.RegistrationStatus; } });
|
|
12
8
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/events/api/types.ts"],"names":[],"mappings":";;AAAA,yDAoBkC;AAnBhC,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AAgBX,gHAAA,gBAAgB,OAAA;AAChB,kHAAA,kBAAkB,OAAA"}
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { IEvent, ICreateEventParams, IGetEventParams, IDeleteEventParams } from "./types";
|
|
1
|
+
import { IEvent, ICreateEventParams, IGetEventParams, IGetEventsParams, IDeleteEventParams } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* create an event
|
|
4
4
|
*
|
|
5
5
|
* @param {ICreateEventParams} options
|
|
6
|
-
* @return {
|
|
6
|
+
* @return {Promise<IEvent>}
|
|
7
7
|
*/
|
|
8
8
|
export declare function createEvent(options: ICreateEventParams): Promise<IEvent>;
|
|
9
|
+
/**
|
|
10
|
+
* get events
|
|
11
|
+
*
|
|
12
|
+
* @param {IGetEventsParams} options
|
|
13
|
+
* @return {Promise<IEvent[]>}
|
|
14
|
+
*/
|
|
15
|
+
export declare function getEvents(options: IGetEventsParams): Promise<IEvent[]>;
|
|
9
16
|
/**
|
|
10
17
|
* get an event
|
|
11
18
|
*
|
|
12
19
|
* @param {ICreateEventParams} options
|
|
13
|
-
* @return {
|
|
20
|
+
* @return {Promise<IEvent>}
|
|
14
21
|
*/
|
|
15
22
|
export declare function getEvent(options: IGetEventParams): Promise<IEvent>;
|
|
16
23
|
/**
|
|
17
24
|
* delete an event
|
|
18
25
|
*
|
|
19
26
|
* @param {IDeleteEventParams} options
|
|
20
|
-
* @return {
|
|
27
|
+
* @return {Promise<IEvent>}
|
|
21
28
|
*/
|
|
22
29
|
export declare function deleteEvent(options: IDeleteEventParams): Promise<IEvent>;
|
|
@@ -6,57 +6,80 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { AsyncReturnType } from "../async-return-type";
|
|
8
8
|
import { customClient } from "../custom-client";
|
|
9
|
+
export declare type GetEventsParams = {
|
|
10
|
+
/**
|
|
11
|
+
* Include registrations with each event
|
|
12
|
+
*/
|
|
13
|
+
includeRegistrations?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Include creator with each event
|
|
16
|
+
*/
|
|
17
|
+
includeCreator?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* latest ISO8601 start date-time for the events
|
|
20
|
+
*/
|
|
21
|
+
startDateTimeBefore?: string;
|
|
22
|
+
/**
|
|
23
|
+
* earliest ISO8601 start date-time for the events
|
|
24
|
+
*/
|
|
25
|
+
startDateTimeAfter?: string;
|
|
26
|
+
/**
|
|
27
|
+
* the max amount of events to return
|
|
28
|
+
*/
|
|
29
|
+
num?: number;
|
|
30
|
+
/**
|
|
31
|
+
* the index to start at
|
|
32
|
+
*/
|
|
33
|
+
start?: number;
|
|
34
|
+
};
|
|
9
35
|
export interface IUpdateEvent {
|
|
10
36
|
[key: string]: any;
|
|
11
37
|
}
|
|
12
|
-
export declare type
|
|
38
|
+
export declare type IAddressLocation = {
|
|
13
39
|
[key: string]: any;
|
|
14
40
|
};
|
|
15
|
-
export declare type
|
|
41
|
+
export declare type IAddressExtent = {
|
|
16
42
|
[key: string]: any;
|
|
17
43
|
};
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
readonly CANCELED: "CANCELED";
|
|
22
|
-
readonly REMOVED: "REMOVED";
|
|
23
|
-
};
|
|
24
|
-
export interface IEvent {
|
|
25
|
-
allDay: boolean;
|
|
26
|
-
attendanceType: EventAttendanceType[];
|
|
44
|
+
export interface IAddress {
|
|
45
|
+
address: string;
|
|
46
|
+
address2: string | null;
|
|
27
47
|
capacity: number | null;
|
|
28
|
-
catalog: IEventCatalogItem[] | null;
|
|
29
48
|
createdAt: string;
|
|
30
|
-
createdById: string;
|
|
31
|
-
creator?: IUser;
|
|
32
49
|
description: string | null;
|
|
33
|
-
|
|
50
|
+
event?: IEvent;
|
|
51
|
+
eventId: string;
|
|
52
|
+
extent: IAddressExtent;
|
|
53
|
+
geoAddress: string;
|
|
54
|
+
geoAddrType: string;
|
|
55
|
+
geoScore: number;
|
|
34
56
|
id: string;
|
|
35
|
-
|
|
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;
|
|
57
|
+
location: IAddressLocation;
|
|
45
58
|
updatedAt: string;
|
|
59
|
+
venue: string | null;
|
|
46
60
|
}
|
|
47
|
-
export declare type
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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";
|
|
61
|
+
export declare type IEventGeometry = {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
} | null;
|
|
64
|
+
export declare type IEventCatalogItem = {
|
|
65
|
+
[key: string]: any;
|
|
59
66
|
};
|
|
67
|
+
export declare enum EventStatus {
|
|
68
|
+
PLANNED = "PLANNED",
|
|
69
|
+
CANCELED = "CANCELED",
|
|
70
|
+
REMOVED = "REMOVED"
|
|
71
|
+
}
|
|
72
|
+
export declare enum RegistrationStatus {
|
|
73
|
+
PENDING = "PENDING",
|
|
74
|
+
ACCEPTED = "ACCEPTED",
|
|
75
|
+
DECLINED = "DECLINED",
|
|
76
|
+
BLOCKED = "BLOCKED"
|
|
77
|
+
}
|
|
78
|
+
export declare enum RegistrationRole {
|
|
79
|
+
OWNER = "OWNER",
|
|
80
|
+
ORGANIZER = "ORGANIZER",
|
|
81
|
+
ATTENDEE = "ATTENDEE"
|
|
82
|
+
}
|
|
60
83
|
export interface IUpdateRegistration {
|
|
61
84
|
/** Role of the user in the event */
|
|
62
85
|
role?: RegistrationRole;
|
|
@@ -92,6 +115,7 @@ export interface IUser {
|
|
|
92
115
|
}
|
|
93
116
|
export interface IRegistration {
|
|
94
117
|
createdAt: string;
|
|
118
|
+
createdBy?: IUser;
|
|
95
119
|
createdById: string;
|
|
96
120
|
event?: IEvent;
|
|
97
121
|
eventId: string;
|
|
@@ -102,23 +126,60 @@ export interface IRegistration {
|
|
|
102
126
|
user?: IUser;
|
|
103
127
|
userId: string;
|
|
104
128
|
}
|
|
105
|
-
|
|
129
|
+
/**
|
|
130
|
+
* GeoJSON formatted geometry related to the event
|
|
131
|
+
*/
|
|
132
|
+
export declare type ICreateEventGeometry = {
|
|
106
133
|
[key: string]: any;
|
|
107
134
|
};
|
|
108
|
-
export declare
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
135
|
+
export declare enum EventAttendanceType {
|
|
136
|
+
VIRTUAL = "VIRTUAL",
|
|
137
|
+
IN_PERSON = "IN_PERSON"
|
|
138
|
+
}
|
|
139
|
+
export interface IEvent {
|
|
140
|
+
addresses?: IAddress[];
|
|
141
|
+
allDay: boolean;
|
|
142
|
+
attendanceType: EventAttendanceType[];
|
|
143
|
+
catalog: IEventCatalogItem[] | null;
|
|
144
|
+
createdAt: string;
|
|
145
|
+
createdById: string;
|
|
146
|
+
creator?: IUser;
|
|
147
|
+
description: string | null;
|
|
148
|
+
endDateTime: string;
|
|
149
|
+
geometry: IEventGeometry;
|
|
150
|
+
id: string;
|
|
151
|
+
notifyAttendees: boolean;
|
|
152
|
+
onlineLocations: string[];
|
|
153
|
+
recurrence: string | null;
|
|
154
|
+
registrations?: IRegistration[];
|
|
155
|
+
startDateTime: string;
|
|
156
|
+
status: EventStatus;
|
|
157
|
+
summary: string | null;
|
|
158
|
+
timeZone: string;
|
|
159
|
+
title: string;
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
}
|
|
162
|
+
export interface ICreateAddress {
|
|
163
|
+
/** Street address */
|
|
164
|
+
address: string;
|
|
165
|
+
/** Secondary address information (room, etc) */
|
|
166
|
+
address2?: string;
|
|
167
|
+
/** Capacity of this location. Minimum value is 1 */
|
|
168
|
+
capacity?: number;
|
|
169
|
+
/** Description for the address */
|
|
170
|
+
description?: string;
|
|
171
|
+
/** Venue information for the address */
|
|
172
|
+
venue?: string;
|
|
173
|
+
}
|
|
113
174
|
export interface ICreateEvent {
|
|
175
|
+
/** Addresses for the event. Required if attendanceType includes IN_PERSON */
|
|
176
|
+
addresses?: ICreateAddress[];
|
|
114
177
|
/** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
|
|
115
178
|
agoId?: string;
|
|
116
179
|
/** Flag for all day event */
|
|
117
180
|
allDay?: boolean;
|
|
118
|
-
/**
|
|
119
|
-
attendanceType
|
|
120
|
-
/** Capacity of the event. Minimum value is 1 */
|
|
121
|
-
capacity?: number;
|
|
181
|
+
/** Valid ways to attend the event */
|
|
182
|
+
attendanceType?: EventAttendanceType[];
|
|
122
183
|
/** Description of the event */
|
|
123
184
|
description?: string;
|
|
124
185
|
/** Email for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
@@ -127,10 +188,10 @@ export interface ICreateEvent {
|
|
|
127
188
|
endDateTime: string;
|
|
128
189
|
/** First name for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
129
190
|
firstName?: string;
|
|
191
|
+
/** GeoJSON formatted geometry related to the event */
|
|
192
|
+
geometry?: ICreateEventGeometry;
|
|
130
193
|
/** Last name for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
131
194
|
lastName?: string;
|
|
132
|
-
/** Array of geojson objects for the event locations */
|
|
133
|
-
locations?: ICreateEventLocationsItem[];
|
|
134
195
|
/** Flag to notify attendees */
|
|
135
196
|
notifyAttendees?: boolean;
|
|
136
197
|
/** Online locations for the event */
|
|
@@ -138,7 +199,7 @@ export interface ICreateEvent {
|
|
|
138
199
|
/** ISO8601 start date-time for the event */
|
|
139
200
|
startDateTime: string;
|
|
140
201
|
/** Summary of the event */
|
|
141
|
-
summary
|
|
202
|
+
summary?: string;
|
|
142
203
|
/** IANA time zone for the event */
|
|
143
204
|
timeZone: string;
|
|
144
205
|
/** Title of the event */
|
|
@@ -148,7 +209,7 @@ export interface ICreateEvent {
|
|
|
148
209
|
}
|
|
149
210
|
declare type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
150
211
|
export declare const createEvent: (iCreateEvent: ICreateEvent, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
|
|
151
|
-
export declare const getEvents: (options?: SecondParameter<typeof customClient>) => Promise<IEvent[]>;
|
|
212
|
+
export declare const getEvents: (params?: GetEventsParams, options?: SecondParameter<typeof customClient>) => Promise<IEvent[]>;
|
|
152
213
|
export declare const getEvent: (id: string, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
|
|
153
214
|
export declare const updateEvent: (id: string, iUpdateEvent: IUpdateEvent, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
|
|
154
215
|
export declare const deleteEvent: (id: string, options?: SecondParameter<typeof customClient>) => Promise<IEvent>;
|
|
@@ -157,7 +218,6 @@ export declare const getRegistrations: (options?: SecondParameter<typeof customC
|
|
|
157
218
|
export declare const getRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
158
219
|
export declare const updateRegistration: (id: number, iUpdateRegistration: IUpdateRegistration, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
159
220
|
export declare const deleteRegistration: (id: number, options?: SecondParameter<typeof customClient>) => Promise<IRegistration>;
|
|
160
|
-
export declare const confirmRegistration: (options?: SecondParameter<typeof customClient>) => Promise<void>;
|
|
161
221
|
export declare type CreateEventResult = NonNullable<AsyncReturnType<typeof createEvent>>;
|
|
162
222
|
export declare type GetEventsResult = NonNullable<AsyncReturnType<typeof getEvents>>;
|
|
163
223
|
export declare type GetEventResult = NonNullable<AsyncReturnType<typeof getEvent>>;
|
|
@@ -168,5 +228,4 @@ export declare type GetRegistrationsResult = NonNullable<AsyncReturnType<typeof
|
|
|
168
228
|
export declare type GetRegistrationResult = NonNullable<AsyncReturnType<typeof getRegistration>>;
|
|
169
229
|
export declare type UpdateRegistrationResult = NonNullable<AsyncReturnType<typeof updateRegistration>>;
|
|
170
230
|
export declare type DeleteRegistrationResult = NonNullable<AsyncReturnType<typeof deleteRegistration>>;
|
|
171
|
-
export declare type ConfirmRegistrationResult = NonNullable<AsyncReturnType<typeof confirmRegistration>>;
|
|
172
231
|
export {};
|
|
@@ -2,25 +2,21 @@
|
|
|
2
2
|
* Generated and copied from the [events service](https://github.com/ArcGIS/hub-newsletters/blob/master/orval/custom-client.ts)
|
|
3
3
|
* Do not edit manually
|
|
4
4
|
*/
|
|
5
|
-
interface IHeaders {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}
|
|
8
5
|
export interface IOrvalParams {
|
|
9
6
|
url: string;
|
|
10
7
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
11
|
-
headers?:
|
|
12
|
-
params?: Record<string,
|
|
8
|
+
headers?: HeadersInit;
|
|
9
|
+
params?: Record<string, any>;
|
|
13
10
|
data?: Record<string, any>;
|
|
14
11
|
}
|
|
15
12
|
export interface ICustomParams {
|
|
16
13
|
hubApiUrl?: string;
|
|
17
14
|
token?: string;
|
|
18
|
-
headers?:
|
|
19
|
-
params?: Record<string,
|
|
15
|
+
headers?: HeadersInit;
|
|
16
|
+
params?: Record<string, any>;
|
|
20
17
|
data?: Record<string, any>;
|
|
21
18
|
mode?: RequestMode;
|
|
22
19
|
cache?: RequestCache;
|
|
23
20
|
credentials?: RequestCredentials;
|
|
24
21
|
}
|
|
25
22
|
export declare function customClient<T>(orvalParams: IOrvalParams, customParams: ICustomParams): Promise<T>;
|
|
26
|
-
export {};
|
|
@@ -3,27 +3,27 @@ import { IRegistration, ICreateRegistrationParams, IDeleteRegistrationParams, IG
|
|
|
3
3
|
* create an event registration
|
|
4
4
|
*
|
|
5
5
|
* @param {ICreateEventParams} options
|
|
6
|
-
* @return {
|
|
6
|
+
* @return {Promise<IRegistration>}
|
|
7
7
|
*/
|
|
8
8
|
export declare function createRegistration(options: ICreateRegistrationParams): Promise<IRegistration>;
|
|
9
9
|
/**
|
|
10
10
|
* get a registration
|
|
11
11
|
*
|
|
12
12
|
* @param {IGetRegistrationParams} options
|
|
13
|
-
* @return {
|
|
13
|
+
* @return {Promise<IRegistration>}
|
|
14
14
|
*/
|
|
15
15
|
export declare function getRegistration(options: IGetRegistrationParams): Promise<IRegistration>;
|
|
16
16
|
/**
|
|
17
17
|
* update a registration
|
|
18
18
|
*
|
|
19
19
|
* @param {IUpdateRegistrationParams} options
|
|
20
|
-
* @return {
|
|
20
|
+
* @return {Promise<IRegistration>}
|
|
21
21
|
*/
|
|
22
22
|
export declare function updateRegistration(options: IUpdateRegistrationParams): Promise<IRegistration>;
|
|
23
23
|
/**
|
|
24
24
|
* delete a registration
|
|
25
25
|
*
|
|
26
26
|
* @param {IDeleteRegistrationParams} options
|
|
27
|
-
* @return {
|
|
27
|
+
* @return {Promise<IRegistration>}
|
|
28
28
|
*/
|
|
29
29
|
export declare function deleteRegistration(options: IDeleteRegistrationParams): Promise<IRegistration>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { EventAttendanceType, EventStatus, GetEventsParams, IAddress, IAddressExtent, IAddressLocation, ICreateAddress, ICreateEvent, ICreateEventGeometry, ICreateRegistration, IEvent, IEventCatalogItem, IEventGeometry, IRegistration, IUpdateEvent, IUpdateRegistration, IUser, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
|
|
2
2
|
import { IHubRequestOptions } from "../../types";
|
|
3
|
-
import { ICreateEvent, IUpdateEvent, ICreateRegistration, IUpdateRegistration } from "./orval/api/orval-events";
|
|
3
|
+
import { ICreateEvent, IUpdateEvent, ICreateRegistration, IUpdateRegistration, GetEventsParams } from "./orval/api/orval-events";
|
|
4
4
|
/**
|
|
5
5
|
* options for making requests against the Events API
|
|
6
6
|
*
|
|
@@ -19,6 +19,9 @@ export interface IEventsRequestOptions extends Omit<IHubRequestOptions, "httpMet
|
|
|
19
19
|
export interface ICreateEventParams extends IEventsRequestOptions {
|
|
20
20
|
data: ICreateEvent;
|
|
21
21
|
}
|
|
22
|
+
export interface IGetEventsParams extends IEventsRequestOptions {
|
|
23
|
+
data: GetEventsParams;
|
|
24
|
+
}
|
|
22
25
|
export interface IGetEventParams extends IEventsRequestOptions {
|
|
23
26
|
eventId: string;
|
|
24
27
|
}
|