@esri/hub-common 28.2.0 → 28.3.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/core/schemas/internal/addDynamicSlugValidation.js +19 -11
  2. package/dist/esm/core/schemas/internal/addDynamicSlugValidation.js.map +1 -1
  3. package/dist/esm/core/schemas/internal/follow/FollowCardUiSchema.js +20 -22
  4. package/dist/esm/core/schemas/internal/follow/FollowCardUiSchema.js.map +1 -1
  5. package/dist/esm/core/schemas/internal/getSlugSchemaElement.js +6 -7
  6. package/dist/esm/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
  7. package/dist/esm/events/api/orval/api/orval-events.js +12 -0
  8. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
  9. package/dist/esm/events/api/registrations.js +11 -1
  10. package/dist/esm/events/api/registrations.js.map +1 -1
  11. package/dist/esm/events/api/types.js.map +1 -1
  12. package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +30 -8
  13. package/dist/esm/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
  14. package/dist/esm/items/_internal/slugs.js +15 -0
  15. package/dist/esm/items/_internal/slugs.js.map +1 -1
  16. package/dist/esm/items/slugs.js +3 -3
  17. package/dist/esm/items/slugs.js.map +1 -1
  18. package/dist/esm/pages/HubPages.js +9 -6
  19. package/dist/esm/pages/HubPages.js.map +1 -1
  20. package/dist/esm/permissions/HubPermissionPolicies.js +14 -2
  21. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  22. package/dist/node/core/schemas/internal/addDynamicSlugValidation.js +19 -11
  23. package/dist/node/core/schemas/internal/addDynamicSlugValidation.js.map +1 -1
  24. package/dist/node/core/schemas/internal/follow/FollowCardUiSchema.js +20 -22
  25. package/dist/node/core/schemas/internal/follow/FollowCardUiSchema.js.map +1 -1
  26. package/dist/node/core/schemas/internal/getSlugSchemaElement.js +6 -7
  27. package/dist/node/core/schemas/internal/getSlugSchemaElement.js.map +1 -1
  28. package/dist/node/events/api/orval/api/orval-events.js +14 -1
  29. package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
  30. package/dist/node/events/api/registrations.js +11 -0
  31. package/dist/node/events/api/registrations.js.map +1 -1
  32. package/dist/node/events/api/types.js.map +1 -1
  33. package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js +30 -8
  34. package/dist/node/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.js.map +1 -1
  35. package/dist/node/items/_internal/slugs.js +16 -0
  36. package/dist/node/items/_internal/slugs.js.map +1 -1
  37. package/dist/node/items/slugs.js +3 -3
  38. package/dist/node/items/slugs.js.map +1 -1
  39. package/dist/node/pages/HubPages.js +8 -5
  40. package/dist/node/pages/HubPages.js.map +1 -1
  41. package/dist/node/permissions/HubPermissionPolicies.js +14 -2
  42. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  43. package/dist/types/core/schemas/internal/addDynamicSlugValidation.d.ts +2 -2
  44. package/dist/types/core/schemas/internal/follow/FollowCardUiSchema.d.ts +1 -3
  45. package/dist/types/core/types/types.d.ts +1 -1
  46. package/dist/types/events/api/orval/api/orval-events.d.ts +76 -54
  47. package/dist/types/events/api/registrations.d.ts +8 -1
  48. package/dist/types/events/api/types.d.ts +5 -2
  49. package/dist/types/items/_internal/slugs.d.ts +6 -0
  50. package/dist/types/items/slugs.d.ts +3 -2
  51. package/package.json +1 -1
@@ -5,6 +5,56 @@
5
5
  * OpenAPI spec version: 0.0.1
6
6
  */
7
7
  import { customClient } from "../custom-client";
8
+ export type GetRegistrationsParams = {
9
+ /**
10
+ * Event id being registered for
11
+ */
12
+ eventId?: string;
13
+ /**
14
+ * ArcGIS Online id for a user
15
+ */
16
+ userId?: string;
17
+ /**
18
+ * comma separated string list of registration roles
19
+ */
20
+ role?: string;
21
+ /**
22
+ * comma separated string list of registration statuses
23
+ */
24
+ status?: string;
25
+ /**
26
+ * comma separated string list of registration types
27
+ */
28
+ type?: string;
29
+ /**
30
+ * latest ISO8601 updatedAt for the registrations
31
+ */
32
+ updatedAtBefore?: string;
33
+ /**
34
+ * earliest ISO8601 updatedAt for the registrations
35
+ */
36
+ updatedAtAfter?: string;
37
+ /**
38
+ * filter to be matched to firstName, lastName, or username
39
+ */
40
+ name?: string;
41
+ /**
42
+ * the max amount of registrations to return
43
+ */
44
+ num?: string;
45
+ /**
46
+ * the index to start at
47
+ */
48
+ start?: string;
49
+ /**
50
+ * property to sort results by
51
+ */
52
+ sortBy?: RegistrationSort;
53
+ /**
54
+ * sort order desc or asc
55
+ */
56
+ sortOrder?: EventSortOrder;
57
+ };
8
58
  export type GetEventParams = {
9
59
  /**
10
60
  * Comma-separated list of relations to include (e.g. resources)
@@ -23,6 +73,18 @@ export declare enum RegistrationSort {
23
73
  lastName = "lastName",
24
74
  username = "username"
25
75
  }
76
+ export interface IInviteRegistrations {
77
+ /** Event id to invite registrants to */
78
+ eventId: string;
79
+ /** Array of user agoIds to invite (max 25) */
80
+ inviteeIds: string[];
81
+ /** Role for the registrants */
82
+ role?: RegistrationRole;
83
+ /** Registration status to assign to invitees */
84
+ status?: RegistrationStatus;
85
+ /** Attendance type for the registrations */
86
+ type: EventAttendanceType;
87
+ }
26
88
  /**
27
89
  * Type of the event resource
28
90
  */
@@ -147,56 +209,6 @@ export declare enum EventSortOrder {
147
209
  asc = "asc",
148
210
  desc = "desc"
149
211
  }
150
- export type GetRegistrationsParams = {
151
- /**
152
- * Event id being registered for
153
- */
154
- eventId?: string;
155
- /**
156
- * ArcGIS Online id for a user
157
- */
158
- userId?: string;
159
- /**
160
- * comma separated string list of registration roles
161
- */
162
- role?: string;
163
- /**
164
- * comma separated string list of registration statuses
165
- */
166
- status?: string;
167
- /**
168
- * comma separated string list of registration types
169
- */
170
- type?: string;
171
- /**
172
- * latest ISO8601 updatedAt for the registrations
173
- */
174
- updatedAtBefore?: string;
175
- /**
176
- * earliest ISO8601 updatedAt for the registrations
177
- */
178
- updatedAtAfter?: string;
179
- /**
180
- * filter to be matched to firstName, lastName, or username
181
- */
182
- name?: string;
183
- /**
184
- * the max amount of registrations to return
185
- */
186
- num?: string;
187
- /**
188
- * the index to start at
189
- */
190
- start?: string;
191
- /**
192
- * property to sort results by
193
- */
194
- sortBy?: RegistrationSort;
195
- /**
196
- * sort order desc or asc
197
- */
198
- sortOrder?: EventSortOrder;
199
- };
200
212
  export declare enum EventSort {
201
213
  title = "title",
202
214
  startDateTime = "startDateTime",
@@ -414,9 +426,11 @@ export interface IEventLocation {
414
426
  /** @nullable */
415
427
  placeAddr: string | null;
416
428
  /** @nullable */
429
+ placeAddr2: string | null;
430
+ /** @nullable */
417
431
  placeName: string | null;
418
432
  /** @nullable */
419
- postal: number | null;
433
+ postal: string | null;
420
434
  /** @nullable */
421
435
  region: string | null;
422
436
  /** @nullable */
@@ -580,7 +594,8 @@ export declare enum EventLocationType {
580
594
  none = "none",
581
595
  custom = "custom",
582
596
  org = "org",
583
- item = "item"
597
+ item = "item",
598
+ address = "address"
584
599
  }
585
600
  export interface ICreateLocationSpatialReference {
586
601
  latestVcsWkid?: number;
@@ -605,10 +620,12 @@ export interface ICreateEventLocation {
605
620
  nbrhd?: string;
606
621
  /** Place address */
607
622
  placeAddr?: string;
623
+ /** Place address 2 (e.g. building number, room number, or other directions) */
624
+ placeAddr2?: string;
608
625
  /** Place name */
609
626
  placeName?: string;
610
- /** Postal */
611
- postal?: number;
627
+ /** Postal code */
628
+ postal?: string;
612
629
  /** Region */
613
630
  region?: string;
614
631
  /** Spatial reference */
@@ -686,6 +703,10 @@ export declare const createRegistration: (iCreateRegistration: ICreateRegistrati
686
703
  * Get a list of registrations matching request criteria.
687
704
  */
688
705
  export declare const getRegistrations: (params?: GetRegistrationsParams, options?: SecondParameter<typeof customClient>) => Promise<IPagedRegistrationResponse>;
706
+ /**
707
+ * Invite users to register for an event. Requires event edit permission.
708
+ */
709
+ export declare const inviteRegistrations: (iInviteRegistrations: IInviteRegistrations, options?: SecondParameter<typeof customClient>) => Promise<IRegistration[]>;
689
710
  /**
690
711
  * Get a registration by id.
691
712
  */
@@ -707,6 +728,7 @@ export type CreateEventResourceResult = NonNullable<Awaited<ReturnType<typeof cr
707
728
  export type DeleteEventResourceResult = NonNullable<Awaited<ReturnType<typeof deleteEventResource>>>;
708
729
  export type CreateRegistrationResult = NonNullable<Awaited<ReturnType<typeof createRegistration>>>;
709
730
  export type GetRegistrationsResult = NonNullable<Awaited<ReturnType<typeof getRegistrations>>>;
731
+ export type InviteRegistrationsResult = NonNullable<Awaited<ReturnType<typeof inviteRegistrations>>>;
710
732
  export type GetRegistrationResult = NonNullable<Awaited<ReturnType<typeof getRegistration>>>;
711
733
  export type UpdateRegistrationResult = NonNullable<Awaited<ReturnType<typeof updateRegistration>>>;
712
734
  export type DeleteRegistrationResult = NonNullable<Awaited<ReturnType<typeof deleteRegistration>>>;
@@ -1,4 +1,4 @@
1
- import { IRegistration, ICreateRegistrationParams, IDeleteRegistrationParams, IGetRegistrationParams, IUpdateRegistrationParams, IGetRegistrationsParams, IPagedRegistrationResponse } from "./types";
1
+ import { IRegistration, ICreateRegistrationParams, IDeleteRegistrationParams, IGetRegistrationParams, IUpdateRegistrationParams, IGetRegistrationsParams, IInviteRegistrationsParams, IPagedRegistrationResponse } from "./types";
2
2
  /**
3
3
  * create an event registration
4
4
  *
@@ -34,3 +34,10 @@ export declare function updateRegistration(options: IUpdateRegistrationParams):
34
34
  * @return {Promise<IRegistration>}
35
35
  */
36
36
  export declare function deleteRegistration(options: IDeleteRegistrationParams): Promise<IRegistration>;
37
+ /**
38
+ * invite users to register for an event
39
+ *
40
+ * @param {IInviteRegistrationsParams} options
41
+ * @return {Promise<IRegistration[]>}
42
+ */
43
+ export declare function inviteRegistrations(options: IInviteRegistrationsParams): Promise<IRegistration[]>;
@@ -1,6 +1,6 @@
1
- export { EventAssociationEntityType, EventAccess, EventAttendanceType, EventStatus, ISearchEvents, IEventAssociation, ICreateEventAssociation, IOnlineMeeting, ICreateOnlineMeeting, ICreateEvent, ICreateRegistration, IEvent, IEventPermission, IEventLocation, IEventLocationGeometriesItem, ILocationSpatialReference, IEventLocationSpatialReference, ICreateLocationSpatialReference, IEventRegistrationCount, ICreateEventLocation, ICreateEventLocationGeometriesItem, IRegistration, IRegistrationPermission, IUpdateEvent, IUpdateRegistration, GetRegistrationsParams, GetEventParams, IUser, RegistrationRole, RegistrationStatus, RegistrationSort, EventSortOrder, EventSort, EventLocationType, IPagedRegistrationResponse, IPagedEventResponse, CreateEventResourceDto, CreateEventResourceDtoResourceType, CreateEventResourceDtoMimeType, GetEventsInclude, EventsSearchFormat, IUpdateEventOnlineMeeting, IUpdateEventLocation, IUpdateEventCapabilities, ICreateEventCapabilities, IEventCapabilities, ICreateEventLocationProperty, IEventResourcesItem, ISearchEventsGeometry, } from "./orval/api/orval-events";
1
+ export { EventAssociationEntityType, EventAccess, EventAttendanceType, EventStatus, ISearchEvents, IEventAssociation, ICreateEventAssociation, IOnlineMeeting, ICreateOnlineMeeting, ICreateEvent, ICreateRegistration, IEvent, IEventPermission, IEventLocation, IEventLocationGeometriesItem, ILocationSpatialReference, IEventLocationSpatialReference, ICreateLocationSpatialReference, IEventRegistrationCount, ICreateEventLocation, ICreateEventLocationGeometriesItem, IRegistration, IRegistrationPermission, IUpdateEvent, IUpdateRegistration, GetRegistrationsParams, GetEventParams, IUser, RegistrationRole, RegistrationStatus, RegistrationSort, EventSortOrder, EventSort, EventLocationType, IInviteRegistrations, IPagedRegistrationResponse, IPagedEventResponse, CreateEventResourceDto, CreateEventResourceDtoResourceType, CreateEventResourceDtoMimeType, GetEventsInclude, EventsSearchFormat, IUpdateEventOnlineMeeting, IUpdateEventLocation, IUpdateEventCapabilities, ICreateEventCapabilities, IEventCapabilities, ICreateEventLocationProperty, IEventResourcesItem, ISearchEventsGeometry, } from "./orval/api/orval-events";
2
2
  import { IHubRequestOptions } from "../../hub-types";
3
- import { ICreateEvent, IUpdateEvent, ISearchEvents, ICreateRegistration, IUpdateRegistration, GetRegistrationsParams, CreateEventResourceDto } from "./orval/api/orval-events";
3
+ import { ICreateEvent, IUpdateEvent, ISearchEvents, ICreateRegistration, IUpdateRegistration, IInviteRegistrations, GetRegistrationsParams, CreateEventResourceDto } from "./orval/api/orval-events";
4
4
  /**
5
5
  * options for making requests against the Events API
6
6
  *
@@ -49,6 +49,9 @@ export interface IUpdateRegistrationParams extends IEventsRequestOptions {
49
49
  export interface IDeleteRegistrationParams extends IEventsRequestOptions {
50
50
  registrationId: string;
51
51
  }
52
+ export interface IInviteRegistrationsParams extends IEventsRequestOptions {
53
+ data: IInviteRegistrations;
54
+ }
52
55
  export interface ICreateEventResourceParams extends IEventsRequestOptions {
53
56
  eventId: string;
54
57
  data: CreateEventResourceDto;
@@ -1,4 +1,10 @@
1
+ import { IWithSlug } from "../../core/traits/IWithSlug";
1
2
  export declare const TYPEKEYWORD_SLUG_PREFIX = "slug";
3
+ /**
4
+ * Construct a slug for an entity, ensuring it is properly namespaced with the org key
5
+ * and truncated to fit within typekeyword limits
6
+ */
7
+ export declare function constructEntitySlug(entity: IWithSlug): string;
2
8
  /**
3
9
  * truncate a slug, namespaced to an org and accounting for the 256 character limit
4
10
  * of individual typekeywords.
@@ -2,8 +2,9 @@ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
2
  import type { IItem } from "@esri/arcgis-rest-portal";
3
3
  /**
4
4
  * Create a slug, namespaced to an org and accounting for the 256 character limit
5
- * of individual typekeywords. Typically used to lookup items by a human readable name in urls
6
- *
5
+ * of individual typekeywords. Slugs are typically used to lookup items by a
6
+ * human readable name in urls. There is no means to ensure they are unique,
7
+ * so they should be used in conjunction with an id or other unique identifier.
7
8
  * @param title
8
9
  * @param orgKey
9
10
  * @returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "28.2.0",
3
+ "version": "28.3.1",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",