@esri/hub-common 14.184.2 → 14.186.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/core/schemas/internal/events/EventGalleryCardSchema.js +2 -2
- package/dist/esm/core/schemas/internal/events/EventGalleryCardSchema.js.map +1 -1
- package/dist/esm/events/_internal/EventSchemaCreate.js +8 -0
- package/dist/esm/events/_internal/EventSchemaCreate.js.map +1 -1
- package/dist/esm/events/_internal/EventSchemaEdit.js +8 -2
- package/dist/esm/events/_internal/EventSchemaEdit.js.map +1 -1
- package/dist/esm/events/_internal/EventUiSchemaCreate.js +2 -0
- package/dist/esm/events/_internal/EventUiSchemaCreate.js.map +1 -1
- package/dist/esm/events/_internal/EventUiSchemaEdit.js +6 -2
- package/dist/esm/events/_internal/EventUiSchemaEdit.js.map +1 -1
- package/dist/esm/events/_internal/PropertyMapper.js +2 -0
- package/dist/esm/events/_internal/PropertyMapper.js.map +1 -1
- package/dist/esm/events/_internal/buildEventAssociations.js +23 -0
- package/dist/esm/events/_internal/buildEventAssociations.js.map +1 -0
- package/dist/esm/events/_internal/buildReferencedContentSchema.js +61 -0
- package/dist/esm/events/_internal/buildReferencedContentSchema.js.map +1 -0
- package/dist/esm/events/defaults.js +2 -1
- package/dist/esm/events/defaults.js.map +1 -1
- package/dist/esm/events/edit.js +6 -1
- package/dist/esm/events/edit.js.map +1 -1
- package/dist/esm/events/fetch.js +3 -1
- package/dist/esm/events/fetch.js.map +1 -1
- package/dist/esm/newsletters/api/orval/api/orval-newsletters.js +9 -0
- package/dist/esm/newsletters/api/orval/api/orval-newsletters.js.map +1 -1
- package/dist/esm/search/_internal/hubEventsHelpers/processFilters.js +9 -0
- package/dist/esm/search/_internal/hubEventsHelpers/processFilters.js.map +1 -1
- package/dist/esm/search/_internal/hubEventsHelpers/processOptions.js +3 -0
- package/dist/esm/search/_internal/hubEventsHelpers/processOptions.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchEvents.js +23 -17
- package/dist/esm/search/_internal/hubSearchEvents.js.map +1 -1
- package/dist/node/core/schemas/internal/events/EventGalleryCardSchema.js +2 -2
- package/dist/node/core/schemas/internal/events/EventGalleryCardSchema.js.map +1 -1
- package/dist/node/events/_internal/EventSchemaCreate.js +8 -0
- package/dist/node/events/_internal/EventSchemaCreate.js.map +1 -1
- package/dist/node/events/_internal/EventSchemaEdit.js +8 -2
- package/dist/node/events/_internal/EventSchemaEdit.js.map +1 -1
- package/dist/node/events/_internal/EventUiSchemaCreate.js +2 -0
- package/dist/node/events/_internal/EventUiSchemaCreate.js.map +1 -1
- package/dist/node/events/_internal/EventUiSchemaEdit.js +6 -2
- package/dist/node/events/_internal/EventUiSchemaEdit.js.map +1 -1
- package/dist/node/events/_internal/PropertyMapper.js +2 -0
- package/dist/node/events/_internal/PropertyMapper.js.map +1 -1
- package/dist/node/events/_internal/buildEventAssociations.js +27 -0
- package/dist/node/events/_internal/buildEventAssociations.js.map +1 -0
- package/dist/node/events/_internal/buildReferencedContentSchema.js +65 -0
- package/dist/node/events/_internal/buildReferencedContentSchema.js.map +1 -0
- package/dist/node/events/defaults.js +2 -1
- package/dist/node/events/defaults.js.map +1 -1
- package/dist/node/events/edit.js +6 -1
- package/dist/node/events/edit.js.map +1 -1
- package/dist/node/events/fetch.js +3 -1
- package/dist/node/events/fetch.js.map +1 -1
- package/dist/node/newsletters/api/orval/api/orval-newsletters.js +10 -1
- package/dist/node/newsletters/api/orval/api/orval-newsletters.js.map +1 -1
- package/dist/node/search/_internal/hubEventsHelpers/processFilters.js +9 -0
- package/dist/node/search/_internal/hubEventsHelpers/processFilters.js.map +1 -1
- package/dist/node/search/_internal/hubEventsHelpers/processOptions.js +3 -0
- package/dist/node/search/_internal/hubEventsHelpers/processOptions.js.map +1 -1
- package/dist/node/search/_internal/hubSearchEvents.js +23 -17
- package/dist/node/search/_internal/hubSearchEvents.js.map +1 -1
- package/dist/types/core/types/IHubEvent.d.ts +9 -2
- package/dist/types/events/_internal/buildEventAssociations.d.ts +6 -0
- package/dist/types/events/_internal/buildReferencedContentSchema.d.ts +3 -0
- package/dist/types/events/edit.d.ts +1 -1
- package/dist/types/newsletters/api/orval/api/orval-newsletters.d.ts +46 -18
- package/dist/types/search/_internal/hubSearchEvents.d.ts +22 -16
- package/package.json +1 -1
|
@@ -8,22 +8,28 @@ const processFilters_1 = require("./hubEventsHelpers/processFilters");
|
|
|
8
8
|
/**
|
|
9
9
|
* Searches for events against the Events 3 API using the given `query` and `options`.
|
|
10
10
|
* Currently supported filters include:
|
|
11
|
-
* access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'access'>;
|
|
12
|
-
* canEdit: boolean
|
|
13
|
-
* entityId: string | string[];
|
|
14
|
-
* entityType: string | string[];
|
|
15
|
-
* id: string | string[];
|
|
16
|
-
* userId: string;
|
|
17
|
-
* term: string;
|
|
18
|
-
* categories: string | string[];
|
|
19
|
-
* tags: string | string[];
|
|
20
|
-
* group: string | string[];
|
|
21
|
-
* readGroupId: string | string[];
|
|
22
|
-
* editGroupId: string | string[];
|
|
23
|
-
* attendanceType: 'virtual' | 'in_person' | Array<'virtual' | 'in_person'>;
|
|
24
|
-
* owner: string | string[];
|
|
25
|
-
* status: 'planned' | 'canceled' | 'removed' | Array<'planned' | 'canceled' | 'removed'>;
|
|
26
|
-
* startDateRange: IDateRange<string | number
|
|
11
|
+
* - access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'access'>;
|
|
12
|
+
* - canEdit: boolean
|
|
13
|
+
* - entityId: string | string[];
|
|
14
|
+
* - entityType: string | string[];
|
|
15
|
+
* - id: string | string[];
|
|
16
|
+
* - userId: string;
|
|
17
|
+
* - term: string;
|
|
18
|
+
* - categories: string | string[];
|
|
19
|
+
* - tags: string | string[];
|
|
20
|
+
* - group: string | string[];
|
|
21
|
+
* - readGroupId: string | string[];
|
|
22
|
+
* - editGroupId: string | string[];
|
|
23
|
+
* - attendanceType: 'virtual' | 'in_person' | Array<'virtual' | 'in_person'>;
|
|
24
|
+
* - owner: string | string[];
|
|
25
|
+
* - status: 'planned' | 'canceled' | 'removed' | Array<'planned' | 'canceled' | 'removed'>;
|
|
26
|
+
* - startDateRange: IDateRange<string | number>;
|
|
27
|
+
* - endDateRange: IDateRange<string | number>;
|
|
28
|
+
* Currently supported sort fields include:
|
|
29
|
+
* - created
|
|
30
|
+
* - modified
|
|
31
|
+
* - title
|
|
32
|
+
* - startDate
|
|
27
33
|
* @param query An IQuery object
|
|
28
34
|
* @param options An IHubSearchOptions object
|
|
29
35
|
* @returns a promise that resolves a <IHubSearchResponse<IHubSearchResult> object
|
|
@@ -31,7 +37,7 @@ const processFilters_1 = require("./hubEventsHelpers/processFilters");
|
|
|
31
37
|
async function hubSearchEvents(query, options) {
|
|
32
38
|
const processedFilters = await processFilters_1.processFilters(query.filters, options.requestOptions);
|
|
33
39
|
const processedOptions = processOptions_1.processOptions(options);
|
|
34
|
-
const data = Object.assign(Object.assign(Object.assign({}, processedFilters), processedOptions), { include: "creator
|
|
40
|
+
const data = Object.assign(Object.assign(Object.assign({}, processedFilters), processedOptions), { include: "creator" });
|
|
35
41
|
const { items, nextStart, total } = await events_1.getEvents(Object.assign(Object.assign({}, options.requestOptions), { data }));
|
|
36
42
|
const results = await Promise.all(items.map((event) => eventToSearchResult_1.eventToSearchResult(event, options)));
|
|
37
43
|
const hasNext = nextStart > -1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hubSearchEvents.js","sourceRoot":"","sources":["../../../../src/search/_internal/hubSearchEvents.ts"],"names":[],"mappings":";;;AAIA,oDAAoD;AAEpD,gFAA6E;AAC7E,sEAAmE;AACnE,sEAAmE;AAEnE
|
|
1
|
+
{"version":3,"file":"hubSearchEvents.js","sourceRoot":"","sources":["../../../../src/search/_internal/hubSearchEvents.ts"],"names":[],"mappings":";;;AAIA,oDAAoD;AAEpD,gFAA6E;AAC7E,sEAAmE;AACnE,sEAAmE;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACI,KAAK,UAAU,eAAe,CACnC,KAAa,EACb,OAA0B;IAE1B,MAAM,gBAAgB,GAAG,MAAM,+BAAc,CAC3C,KAAK,CAAC,OAAO,EACb,OAAO,CAAC,cAAc,CACvB,CAAC;IACF,MAAM,gBAAgB,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,IAAI,iDACL,gBAAgB,GAChB,gBAAgB,KACnB,OAAO,EAAE,SAAS,GACnB,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,kBAAS,iCAC9C,OAAO,CAAC,cAAc,KACzB,IAAI,IACJ,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yCAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAC1D,CAAC;IACF,MAAM,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC;IAC/B,OAAO;QACL,KAAK;QACL,OAAO;QACP,OAAO;QACP,IAAI,EAAE,GAAG,EAAE;YACT,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;aACvE;YACD,OAAO,eAAe,CAAC,KAAK,kCACvB,OAAO,KACV,KAAK,EAAE,SAAS,IAChB,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AApCD,0CAoCC"}
|
|
@@ -121,9 +121,16 @@ export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug,
|
|
|
121
121
|
*/
|
|
122
122
|
readGroupIds: string[];
|
|
123
123
|
/**
|
|
124
|
-
* A collection of
|
|
124
|
+
* A collection of content ids explicitly referenced by the event
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
referencedContentIds: string[];
|
|
127
|
+
/**
|
|
128
|
+
* A collection of objects containing the ids & types for entities referenced by the event
|
|
129
|
+
*/
|
|
130
|
+
referencedContentIdsByType: Array<{
|
|
131
|
+
entityId: string;
|
|
132
|
+
entityType: string;
|
|
133
|
+
}>;
|
|
127
134
|
/**
|
|
128
135
|
* The start date of the event
|
|
129
136
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IHubRequestOptions } from "../../types";
|
|
2
|
+
import { ICreateEventAssociation } from "../api";
|
|
3
|
+
export declare function buildEventAssociations(referencedContentIdsByType: Array<{
|
|
4
|
+
entityId: string;
|
|
5
|
+
entityType: string;
|
|
6
|
+
}>, referencedContentIds: string[], hubRequestOptions: IHubRequestOptions): Promise<ICreateEventAssociation[]>;
|
|
@@ -14,7 +14,7 @@ export interface IHubCreateEventRegistration {
|
|
|
14
14
|
*
|
|
15
15
|
* @param partialEvent a partial event
|
|
16
16
|
* @param requestOptions user request options
|
|
17
|
-
* @returns promise that resolves
|
|
17
|
+
* @returns promise that resolves an IHubEvent
|
|
18
18
|
*/
|
|
19
19
|
export declare function createHubEvent(partialEvent: Partial<IHubEvent>, requestOptions: IHubRequestOptions): Promise<IHubEvent>;
|
|
20
20
|
/**
|
|
@@ -96,6 +96,9 @@ export interface INotificationSpec {
|
|
|
96
96
|
* Metadata for the subscription
|
|
97
97
|
*/
|
|
98
98
|
export declare type ICreateSubscriptionMetadata = ICreateEventMetadata | ICreateTelemetryReportMetadata;
|
|
99
|
+
export declare enum SubscriptionEntityType {
|
|
100
|
+
DISCUSSION = "DISCUSSION"
|
|
101
|
+
}
|
|
99
102
|
export declare enum DeliveryMethod {
|
|
100
103
|
EMAIL = "EMAIL"
|
|
101
104
|
}
|
|
@@ -105,37 +108,35 @@ export declare enum Cadence {
|
|
|
105
108
|
WEEKLY = "WEEKLY",
|
|
106
109
|
MONTHLY = "MONTHLY"
|
|
107
110
|
}
|
|
111
|
+
export declare enum SystemNotificationSpecNames {
|
|
112
|
+
TELEMETRY_REPORT = "TELEMETRY_REPORT",
|
|
113
|
+
EVENT = "EVENT",
|
|
114
|
+
DISCUSSION_ON_ENTITY = "DISCUSSION_ON_ENTITY"
|
|
115
|
+
}
|
|
116
|
+
export declare enum SubscriptionActions {
|
|
117
|
+
DISCUSSION_POST_PENDING = "DISCUSSION_POST_PENDING"
|
|
118
|
+
}
|
|
108
119
|
export interface IUpdateSubscription {
|
|
120
|
+
/** An array of actions representing user selections that further customize the subscription behavior */
|
|
121
|
+
actions?: SubscriptionActions[];
|
|
109
122
|
/** Flag to opt user in or out of subscription */
|
|
110
123
|
active?: boolean;
|
|
111
124
|
/** Frequency of the subscription */
|
|
112
125
|
cadence?: Cadence;
|
|
113
126
|
/** Delivery method for subscription, ie email or text */
|
|
114
127
|
deliveryMethod?: DeliveryMethod;
|
|
128
|
+
/** The AGO id of the entity associated with the subscription */
|
|
129
|
+
entityId?: string;
|
|
130
|
+
/** The type of entity associated with the subscription entityId */
|
|
131
|
+
entityType?: SubscriptionEntityType;
|
|
115
132
|
/** Last delivered datetime string of the subscription in ISO 8601 format */
|
|
116
133
|
lastDelivery?: string;
|
|
117
134
|
/** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
|
|
118
135
|
userId?: string;
|
|
119
136
|
}
|
|
120
|
-
export interface ISubscription {
|
|
121
|
-
active: boolean;
|
|
122
|
-
cadence: Cadence;
|
|
123
|
-
createdAt: string;
|
|
124
|
-
deliveryMethod: DeliveryMethod;
|
|
125
|
-
id: number;
|
|
126
|
-
lastDelivery: string;
|
|
127
|
-
metadata: ISubscriptionMetadata;
|
|
128
|
-
notificationSpec?: INotificationSpec;
|
|
129
|
-
notificationSpecId: number;
|
|
130
|
-
updatedAt: string;
|
|
131
|
-
user?: IUser;
|
|
132
|
-
userId: string;
|
|
133
|
-
}
|
|
134
|
-
export declare enum SystemNotificationSpecNames {
|
|
135
|
-
TELEMETRY_REPORT = "TELEMETRY_REPORT",
|
|
136
|
-
EVENT = "EVENT"
|
|
137
|
-
}
|
|
138
137
|
export interface ISubscribe {
|
|
138
|
+
/** An array of actions representing user selections that further customize the subscription behavior */
|
|
139
|
+
actions?: SubscriptionActions[];
|
|
139
140
|
/** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
|
|
140
141
|
agoId?: string;
|
|
141
142
|
/** Frequency of the subscription */
|
|
@@ -146,6 +147,10 @@ export interface ISubscribe {
|
|
|
146
147
|
deliveryMethod: DeliveryMethod;
|
|
147
148
|
/** Email for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
148
149
|
email?: string;
|
|
150
|
+
/** The AGO id of the entity associated with the subscription */
|
|
151
|
+
entityId?: string;
|
|
152
|
+
/** The type of entity associated with the subscription entityId */
|
|
153
|
+
entityType?: SubscriptionEntityType;
|
|
149
154
|
/** First name for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
150
155
|
firstName?: string;
|
|
151
156
|
/** Last name for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
@@ -159,11 +164,34 @@ export interface ISubscribe {
|
|
|
159
164
|
/** Username for the subscriber. Will always be extracted from the token unless service token is used. */
|
|
160
165
|
username?: string;
|
|
161
166
|
}
|
|
167
|
+
export interface ISubscription {
|
|
168
|
+
actions: SubscriptionActions[];
|
|
169
|
+
active: boolean;
|
|
170
|
+
cadence: Cadence;
|
|
171
|
+
createdAt: string;
|
|
172
|
+
deliveryMethod: DeliveryMethod;
|
|
173
|
+
entityId: string;
|
|
174
|
+
entityType: SubscriptionEntityType;
|
|
175
|
+
id: number;
|
|
176
|
+
lastDelivery: string;
|
|
177
|
+
metadata: ISubscriptionMetadata;
|
|
178
|
+
notificationSpec?: INotificationSpec;
|
|
179
|
+
notificationSpecId: number;
|
|
180
|
+
updatedAt: string;
|
|
181
|
+
user?: IUser;
|
|
182
|
+
userId: string;
|
|
183
|
+
}
|
|
162
184
|
export interface ICreateSubscription {
|
|
185
|
+
/** An array of actions representing user selections that further customize the subscription behavior */
|
|
186
|
+
actions?: SubscriptionActions[];
|
|
163
187
|
/** Frequency of the subscription */
|
|
164
188
|
cadence: Cadence;
|
|
165
189
|
/** Delivery method for subscription, ie email or text */
|
|
166
190
|
deliveryMethod: DeliveryMethod;
|
|
191
|
+
/** The AGO id of the entity associated with the subscription */
|
|
192
|
+
entityId?: string;
|
|
193
|
+
/** The type of entity associated with the subscription entityId */
|
|
194
|
+
entityType?: SubscriptionEntityType;
|
|
167
195
|
/** Metadata for the subscription */
|
|
168
196
|
metadata: ICreateSubscriptionMetadata;
|
|
169
197
|
/** Notification spec name for the subscription */
|
|
@@ -5,22 +5,28 @@ import { IHubSearchResult } from "../types/IHubSearchResult";
|
|
|
5
5
|
/**
|
|
6
6
|
* Searches for events against the Events 3 API using the given `query` and `options`.
|
|
7
7
|
* Currently supported filters include:
|
|
8
|
-
* access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'access'>;
|
|
9
|
-
* canEdit: boolean
|
|
10
|
-
* entityId: string | string[];
|
|
11
|
-
* entityType: string | string[];
|
|
12
|
-
* id: string | string[];
|
|
13
|
-
* userId: string;
|
|
14
|
-
* term: string;
|
|
15
|
-
* categories: string | string[];
|
|
16
|
-
* tags: string | string[];
|
|
17
|
-
* group: string | string[];
|
|
18
|
-
* readGroupId: string | string[];
|
|
19
|
-
* editGroupId: string | string[];
|
|
20
|
-
* attendanceType: 'virtual' | 'in_person' | Array<'virtual' | 'in_person'>;
|
|
21
|
-
* owner: string | string[];
|
|
22
|
-
* status: 'planned' | 'canceled' | 'removed' | Array<'planned' | 'canceled' | 'removed'>;
|
|
23
|
-
* startDateRange: IDateRange<string | number
|
|
8
|
+
* - access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'access'>;
|
|
9
|
+
* - canEdit: boolean
|
|
10
|
+
* - entityId: string | string[];
|
|
11
|
+
* - entityType: string | string[];
|
|
12
|
+
* - id: string | string[];
|
|
13
|
+
* - userId: string;
|
|
14
|
+
* - term: string;
|
|
15
|
+
* - categories: string | string[];
|
|
16
|
+
* - tags: string | string[];
|
|
17
|
+
* - group: string | string[];
|
|
18
|
+
* - readGroupId: string | string[];
|
|
19
|
+
* - editGroupId: string | string[];
|
|
20
|
+
* - attendanceType: 'virtual' | 'in_person' | Array<'virtual' | 'in_person'>;
|
|
21
|
+
* - owner: string | string[];
|
|
22
|
+
* - status: 'planned' | 'canceled' | 'removed' | Array<'planned' | 'canceled' | 'removed'>;
|
|
23
|
+
* - startDateRange: IDateRange<string | number>;
|
|
24
|
+
* - endDateRange: IDateRange<string | number>;
|
|
25
|
+
* Currently supported sort fields include:
|
|
26
|
+
* - created
|
|
27
|
+
* - modified
|
|
28
|
+
* - title
|
|
29
|
+
* - startDate
|
|
24
30
|
* @param query An IQuery object
|
|
25
31
|
* @param options An IHubSearchOptions object
|
|
26
32
|
* @returns a promise that resolves a <IHubSearchResponse<IHubSearchResult> object
|