diff --git a/package-lock.json b/package-lock.json index 85c97060974..33190f95f5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22688,10 +22688,9 @@ }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._baseindexof": { "version": "3.1.0", - "dev": true, + "extraneous": true, "inBundle": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._baseuniq": { "version": "4.6.0", @@ -22706,24 +22705,21 @@ }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._bindcallback": { "version": "3.0.1", - "dev": true, + "extraneous": true, "inBundle": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._cacheindexof": { "version": "3.0.2", - "dev": true, + "extraneous": true, "inBundle": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._createcache": { "version": "3.1.2", - "dev": true, + "extraneous": true, "inBundle": true, "license": "MIT", - "peer": true, "dependencies": { "lodash._getnative": "^3.0.0" } @@ -22737,10 +22733,9 @@ }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._getnative": { "version": "3.9.1", - "dev": true, + "extraneous": true, "inBundle": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash._root": { "version": "3.0.1", @@ -22758,10 +22753,9 @@ }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash.restparam": { "version": "3.6.1", - "dev": true, + "extraneous": true, "inBundle": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/cz-lerna-changelog/node_modules/npm/node_modules/lodash.union": { "version": "4.6.0", @@ -83471,8 +83465,7 @@ "lodash._baseindexof": { "version": "3.1.0", "bundled": true, - "dev": true, - "peer": true + "extraneous": true }, "lodash._baseuniq": { "version": "4.6.0", @@ -83487,20 +83480,17 @@ "lodash._bindcallback": { "version": "3.0.1", "bundled": true, - "dev": true, - "peer": true + "extraneous": true }, "lodash._cacheindexof": { "version": "3.0.2", "bundled": true, - "dev": true, - "peer": true + "extraneous": true }, "lodash._createcache": { "version": "3.1.2", "bundled": true, - "dev": true, - "peer": true, + "extraneous": true, "requires": { "lodash._getnative": "^3.0.0" } @@ -83514,8 +83504,7 @@ "lodash._getnative": { "version": "3.9.1", "bundled": true, - "dev": true, - "peer": true + "extraneous": true }, "lodash._root": { "version": "3.0.1", @@ -83532,8 +83521,7 @@ "lodash.restparam": { "version": "3.6.1", "bundled": true, - "dev": true, - "peer": true + "extraneous": true }, "lodash.union": { "version": "4.6.0", diff --git a/packages/common/src/events/api/orval/api/orval-events.ts b/packages/common/src/events/api/orval/api/orval-events.ts index 74dab37a39f..284cd7c40a4 100644 --- a/packages/common/src/events/api/orval/api/orval-events.ts +++ b/packages/common/src/events/api/orval/api/orval-events.ts @@ -24,6 +24,10 @@ export type GetEventsParams = { * earliest ISO8601 start date-time for the events */ startDateTimeAfter?: string; + /** + * Comma separated sting list of AttendanceTypes + */ + attendanceTypes?: string; /** * the max amount of events to return */ @@ -51,8 +55,42 @@ export interface ICreateRegistration { username?: string; } +/** + * GeoJSON formatted geometry related to the event + */ +export type IUpdateEventGeometry = { [key: string]: any }; + export interface IUpdateEvent { - [key: string]: any; + /** Access level of the event */ + access?: EventAccess; + /** Addresses for the event */ + addresses?: ICreateAddress[]; + /** Flag for all day event */ + allDay?: boolean; + /** Valid ways to attend the event */ + attendanceType?: EventAttendanceType[]; + /** Description of the event */ + description?: string; + /** Groups with edit access to the event */ + editGroups?: string[]; + /** ISO8601 end date-time for the event */ + endDateTime?: string; + /** GeoJSON formatted geometry related to the event */ + geometry?: IUpdateEventGeometry; + /** Flag to notify attendees */ + notifyAttendees?: boolean; + /** Online meetings for the event */ + onlineMeetings?: ICreateOnlineMeeting[]; + /** Groups with read access to the event */ + readGroups?: string[]; + /** ISO8601 start date-time for the event */ + startDateTime?: string; + /** Summary of the event */ + summary?: string; + /** IANA time zone for the event */ + timeZone?: string; + /** Title of the event */ + title?: string; } export type IAddressLocation = { [key: string]: any }; @@ -159,7 +197,13 @@ export enum EventAttendanceType { VIRTUAL = "VIRTUAL", IN_PERSON = "IN_PERSON", } +export enum EventAccess { + PRIVATE = "PRIVATE", + ORG = "ORG", + PUBLIC = "PUBLIC", +} export interface IEvent { + access: EventAccess; addresses?: IAddress[]; allDay: boolean; attendanceType: EventAttendanceType[]; @@ -168,11 +212,14 @@ export interface IEvent { createdById: string; creator?: IUser; description: string | null; + editGroups: string[] | null; endDateTime: string; geometry: IEventGeometry; id: string; notifyAttendees: boolean; onlineMeetings?: IOnlineMeeting[]; + orgId: string; + readGroups: string[] | null; recurrence: string | null; registrations?: IRegistration[]; startDateTime: string; @@ -197,6 +244,8 @@ export interface ICreateAddress { } export interface ICreateEvent { + /** Access level of the event */ + access?: EventAccess; /** Addresses for the event. Required if attendanceType includes IN_PERSON */ addresses?: ICreateAddress[]; /** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */ @@ -207,6 +256,8 @@ export interface ICreateEvent { attendanceType?: EventAttendanceType[]; /** Description of the event */ description?: string; + /** Groups with edit access to the event */ + editGroups?: string[]; /** Email for the subscriber. Will always be extracted from the token unless service token is used. */ email?: string; /** ISO8601 end date-time for the event */ @@ -221,6 +272,8 @@ export interface ICreateEvent { notifyAttendees?: boolean; /** Online meetings for the event. Required if attendanceType includes VIRTUAL */ onlineMeetings?: ICreateOnlineMeeting[]; + /** Groups with read access to the event */ + readGroups?: string[]; /** ISO8601 start date-time for the event */ startDateTime: string; /** Summary of the event */ diff --git a/packages/common/src/events/api/types.ts b/packages/common/src/events/api/types.ts index b945d5f9b1d..f59a5551dc1 100644 --- a/packages/common/src/events/api/types.ts +++ b/packages/common/src/events/api/types.ts @@ -1,4 +1,5 @@ export { + EventAccess, EventAttendanceType, EventStatus, GetEventsParams, diff --git a/packages/common/test/events/api/events.test.ts b/packages/common/test/events/api/events.test.ts index 64629c9127d..114fd39863f 100644 --- a/packages/common/test/events/api/events.test.ts +++ b/packages/common/test/events/api/events.test.ts @@ -13,6 +13,7 @@ import { EventAttendanceType, EventStatus, } from "../../../src/events/api"; +import { EventAccess } from "../../../src/events/api/types"; import * as authenticateRequestModule from "../../../src/events/api/utils/authenticate-request"; import * as orvalModule from "../../../src/events/api/orval/api/orval-events"; @@ -36,6 +37,7 @@ describe("Events", () => { const options: ICreateEventParams = { data: { + access: EventAccess.ORG, addresses: [ { address: "111 Crunchy Street Bend, OR 97703", @@ -51,6 +53,7 @@ describe("Events", () => { EventAttendanceType.VIRTUAL, ], description: "a description", + editGroups: ["111"], endDateTime: "2023-12-19T19:52:13.584Z", geometry: { type: "Feature", @@ -65,6 +68,7 @@ describe("Events", () => { details: "Tacos online are here", }, ], + readGroups: ["111"], startDateTime: "2023-12-01T19:52:13.584Z", summary: "a summary", timeZone: "America/Los_Angeles",