@esri/hub-common 14.107.1 → 14.108.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.
Files changed (65) hide show
  1. package/dist/esm/content/_internal/ContentBusinessRules.js +27 -0
  2. package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
  3. package/dist/esm/discussions/_internal/DiscussionBusinessRules.js +23 -0
  4. package/dist/esm/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
  5. package/dist/esm/events/api/orval/api/orval-events.js +6 -6
  6. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
  7. package/dist/esm/events/api/types.js.map +1 -1
  8. package/dist/esm/groups/_internal/GroupBusinessRules.js +32 -0
  9. package/dist/esm/groups/_internal/GroupBusinessRules.js.map +1 -1
  10. package/dist/esm/initiative-templates/_internal/InitiativeTemplateBusinessRules.js +23 -0
  11. package/dist/esm/initiative-templates/_internal/InitiativeTemplateBusinessRules.js.map +1 -1
  12. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +23 -0
  13. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  14. package/dist/esm/pages/_internal/PageBusinessRules.js +23 -0
  15. package/dist/esm/pages/_internal/PageBusinessRules.js.map +1 -1
  16. package/dist/esm/permissions/_internal/checkAssertion.js +17 -0
  17. package/dist/esm/permissions/_internal/checkAssertion.js.map +1 -1
  18. package/dist/esm/projects/_internal/ProjectBusinessRules.js +23 -0
  19. package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
  20. package/dist/esm/sites/_internal/SiteBusinessRules.js +23 -0
  21. package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
  22. package/dist/esm/surveys/_internal/SurveyBusinessRules.js +23 -0
  23. package/dist/esm/surveys/_internal/SurveyBusinessRules.js.map +1 -1
  24. package/dist/esm/templates/_internal/TemplateBusinessRules.js +23 -0
  25. package/dist/esm/templates/_internal/TemplateBusinessRules.js.map +1 -1
  26. package/dist/node/content/_internal/ContentBusinessRules.js +27 -0
  27. package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
  28. package/dist/node/discussions/_internal/DiscussionBusinessRules.js +23 -0
  29. package/dist/node/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
  30. package/dist/node/events/api/orval/api/orval-events.js +7 -7
  31. package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
  32. package/dist/node/events/api/types.js.map +1 -1
  33. package/dist/node/groups/_internal/GroupBusinessRules.js +32 -0
  34. package/dist/node/groups/_internal/GroupBusinessRules.js.map +1 -1
  35. package/dist/node/initiative-templates/_internal/InitiativeTemplateBusinessRules.js +23 -0
  36. package/dist/node/initiative-templates/_internal/InitiativeTemplateBusinessRules.js.map +1 -1
  37. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +23 -0
  38. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  39. package/dist/node/pages/_internal/PageBusinessRules.js +23 -0
  40. package/dist/node/pages/_internal/PageBusinessRules.js.map +1 -1
  41. package/dist/node/permissions/_internal/checkAssertion.js +17 -0
  42. package/dist/node/permissions/_internal/checkAssertion.js.map +1 -1
  43. package/dist/node/projects/_internal/ProjectBusinessRules.js +23 -0
  44. package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
  45. package/dist/node/sites/_internal/SiteBusinessRules.js +23 -0
  46. package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
  47. package/dist/node/surveys/_internal/SurveyBusinessRules.js +23 -0
  48. package/dist/node/surveys/_internal/SurveyBusinessRules.js.map +1 -1
  49. package/dist/node/templates/_internal/TemplateBusinessRules.js +23 -0
  50. package/dist/node/templates/_internal/TemplateBusinessRules.js.map +1 -1
  51. package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
  52. package/dist/types/discussions/_internal/DiscussionBusinessRules.d.ts +1 -1
  53. package/dist/types/events/api/orval/api/orval-events.d.ts +96 -76
  54. package/dist/types/events/api/types.d.ts +1 -1
  55. package/dist/types/groups/_internal/GroupBusinessRules.d.ts +1 -1
  56. package/dist/types/initiative-templates/_internal/InitiativeTemplateBusinessRules.d.ts +1 -1
  57. package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +1 -1
  58. package/dist/types/pages/_internal/PageBusinessRules.d.ts +1 -1
  59. package/dist/types/permissions/types/IPermissionPolicy.d.ts +1 -1
  60. package/dist/types/permissions/types/PolicyResponse.d.ts +1 -1
  61. package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
  62. package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
  63. package/dist/types/surveys/_internal/SurveyBusinessRules.d.ts +1 -1
  64. package/dist/types/templates/_internal/TemplateBusinessRules.d.ts +1 -1
  65. package/package.json +1 -1
@@ -12,6 +12,7 @@ exports.SurveyPermissions = [
12
12
  "hub:survey:delete",
13
13
  "hub:survey:edit",
14
14
  "hub:survey:view",
15
+ "hub:survey:canChangeAccess",
15
16
  "hub:survey:workspace",
16
17
  "hub:survey:workspace:dashboard",
17
18
  "hub:survey:workspace:details",
@@ -53,6 +54,28 @@ exports.SurveyPermissionPolicies = [
53
54
  dependencies: ["hub:survey"],
54
55
  entityOwner: true,
55
56
  },
57
+ {
58
+ permission: "hub:survey:canChangeAccess",
59
+ dependencies: ["hub:survey"],
60
+ authenticated: true,
61
+ assertions: [
62
+ {
63
+ property: "context:currentUser.privileges",
64
+ type: "contains-some",
65
+ value: [
66
+ "portal:admin:shareToPublic",
67
+ "portal:admin:shareToOrg",
68
+ "portal:user:shareToPublic",
69
+ "portal:user:shareToOrg",
70
+ ],
71
+ },
72
+ {
73
+ property: "entity:itemControl",
74
+ type: "eq",
75
+ value: "admin",
76
+ },
77
+ ],
78
+ },
56
79
  {
57
80
  permission: "hub:survey:workspace",
58
81
  dependencies: ["hub:feature:workspace"],
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyBusinessRules.js","sourceRoot":"","sources":["../../../../src/surveys/_internal/SurveyBusinessRules.ts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C1D;IACD;QACE,UAAU,EAAE,oCAAoC;QAChD,YAAY,EAAE,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;KAC1D;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,CAAC,iBAAiB,CAAC;KAClC;CACF,CAAC"}
1
+ {"version":3,"file":"SurveyBusinessRules.js","sourceRoot":"","sources":["../../../../src/surveys/_internal/SurveyBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,iBAAiB,GAAG;IAC/B,YAAY;IACZ,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,4BAA4B;IAC5B,sBAAsB;IACtB,gCAAgC;IAChC,8BAA8B;IAC9B,+BAA+B;IAC/B,oCAAoC;IACpC,mBAAmB;CACX,CAAC;AAEX;;;GAGG;AACU,QAAA,wBAAwB,GAAwB;IAC3D;QACE,UAAU,EAAE,YAAY;QACxB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,gBAAgB;QAChB,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;KAClC;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,YAAY,EAAE,CAAC,YAAY,CAAC;KAC7B;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,CAAC,YAAY,CAAC;QAC5B,UAAU,EAAE,IAAI;KACjB;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,CAAC,YAAY,CAAC;QAC5B,UAAU,EAAE,IAAI;KACjB;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,CAAC,YAAY,CAAC;QAC5B,WAAW,EAAE,IAAI;KAClB;IACD;QACE,UAAU,EAAE,4BAA4B;QACxC,YAAY,EAAE,CAAC,YAAY,CAAC;QAC5B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE;YACV;gBACE,QAAQ,EAAE,gCAAgC;gBAC1C,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE;oBACL,4BAA4B;oBAC5B,yBAAyB;oBACzB,2BAA2B;oBAC3B,wBAAwB;iBACzB;aACF;YACD;gBACE,QAAQ,EAAE,oBAAoB;gBAC9B,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,OAAO;aACf;SACF;KACF;IACD;QACE,UAAU,EAAE,sBAAsB;QAClC,YAAY,EAAE,CAAC,uBAAuB,CAAC;KACxC;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;KAC1D;IACD;QACE,UAAU,EAAE,8BAA8B;QAC1C,YAAY,EAAE,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;KAC1D;IACD;QACE,UAAU,EAAE,+BAA+B;QAC3C,YAAY,EAAE,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;KAC1D;IACD;QACE,UAAU,EAAE,oCAAoC;QAChD,YAAY,EAAE,CAAC,sBAAsB,EAAE,iBAAiB,CAAC;KAC1D;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,CAAC,iBAAiB,CAAC;KAClC;CACF,CAAC"}
@@ -18,6 +18,7 @@ exports.TemplatePermissions = [
18
18
  "hub:template:edit",
19
19
  "hub:template:manage",
20
20
  "hub:template:view",
21
+ "hub:template:canChangeAccess",
21
22
  "hub:template:workspace",
22
23
  "hub:template:workspace:details",
23
24
  "hub:template:workspace:dashboard",
@@ -60,6 +61,28 @@ exports.TemplatePermissionPolicies = [
60
61
  permission: "hub:template:manage",
61
62
  dependencies: ["hub:template:edit"],
62
63
  },
64
+ {
65
+ permission: "hub:template:canChangeAccess",
66
+ dependencies: ["hub:template"],
67
+ authenticated: true,
68
+ assertions: [
69
+ {
70
+ property: "context:currentUser.privileges",
71
+ type: "contains-some",
72
+ value: [
73
+ "portal:admin:shareToPublic",
74
+ "portal:admin:shareToOrg",
75
+ "portal:user:shareToPublic",
76
+ "portal:user:shareToOrg",
77
+ ],
78
+ },
79
+ {
80
+ property: "entity:itemControl",
81
+ type: "eq",
82
+ value: "admin",
83
+ },
84
+ ],
85
+ },
63
86
  {
64
87
  permission: "hub:template:workspace",
65
88
  dependencies: ["hub:feature:workspace"],
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateBusinessRules.js","sourceRoot":"","sources":["../../../../src/templates/_internal/TemplateBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,uBAAuB,GAAkB,EAAE,CAAC;AAEzD;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IACjC,cAAc;IACd,qBAAqB;IACrB,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,wBAAwB;IACxB,gCAAgC;IAChC,kCAAkC;IAClC,sCAAsC;IACtC,iCAAiC;CACzB,CAAC;AAEX;;;GAGG;AACU,QAAA,0BAA0B,GAAwB;IAC7D;QACE,UAAU,EAAE,cAAc;QAC1B,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD;QACE,UAAU,EAAE,qBAAqB;QACjC,YAAY,EAAE,CAAC,cAAc,CAAC;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;KACvC;IACD;QACE,UAAU,EAAE,qBAAqB;QACjC,YAAY,EAAE,CAAC,cAAc,CAAC;QAC9B,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;KAClB;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,CAAC,cAAc,CAAC;KAC/B;IACD;QACE,UAAU,EAAE,mBAAmB;QAC/B,YAAY,EAAE,CAAC,cAAc,CAAC;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;KACjB;IACD;QACE,UAAU,EAAE,qBAAqB;QACjC,YAAY,EAAE,CAAC,mBAAmB,CAAC;KACpC;IACD;QACE,UAAU,EAAE,wBAAwB;QACpC,YAAY,EAAE,CAAC,uBAAuB,CAAC;KACxC;IACD;QACE,UAAU,EAAE,gCAAgC;QAC5C,YAAY,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;KAChE;IACD;QACE,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;KAChE;IACD;QACE,UAAU,EAAE,sCAAsC;QAClD,YAAY,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;KAChE;IACD;QACE,UAAU,EAAE,iCAAiC;QAC7C,YAAY,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;QAC/D,WAAW,EAAE,IAAI;KAClB;CACF,CAAC"}
1
+ {"version":3,"file":"TemplateBusinessRules.js","sourceRoot":"","sources":["../../../../src/templates/_internal/TemplateBusinessRules.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,uBAAuB,GAAkB,EAAE,CAAC;AAEzD;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IACjC,cAAc;IACd,qBAAqB;IACrB,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;IACnB,8BAA8B;IAC9B,wBAAwB;IACxB,gCAAgC;IAChC,kCAAkC;IAClC,sCAAsC;IACtC,iCAAiC;CACzB,CAAC;AAEX;;;GAGG;AACU,QAAA,0BAA0B,GAAwB;IAC7D;QACE,UAAU,EAAE,cAAc;QAC1B,YAAY,EAAE,CAAC,OAAO,CAAC;QACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD;QACE,UAAU,EAAE,qBAAqB;QACjC,YAAY,EAAE,CAAC,cAAc,CAAC;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;KACvC;IACD;QACE,UAAU,EAAE,qBA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efaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:collaborators", "hub:content:manage"];
11
+ export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:collaborators", "hub:content:manage"];
12
12
  /**
13
13
  * Content permission policies
14
14
  * No need to specify license for permissions that are available to all licenses
@@ -4,7 +4,7 @@ import { IPermissionPolicy } from "../../permissions";
4
4
  * These define the requirements any user must meet to perform related actions
5
5
  * @private
6
6
  */
7
- export declare const DiscussionPermissions: readonly ["hub:discussion", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:discussion:workspace:overview", "hub:discussion:workspace:dashboard", "hub:discussion:workspace:details", "hub:discussion:workspace:settings", "hub:discussion:workspace:collaborators", "hub:discussion:workspace:discussion", "hub:discussion:workspace:metrics", "hub:discussion:manage", "temp:hub:discussion:create"];
7
+ export declare const DiscussionPermissions: readonly ["hub:discussion", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:discussion:canChangeAccess", "hub:discussion:workspace:overview", "hub:discussion:workspace:dashboard", "hub:discussion:workspace:details", "hub:discussion:workspace:settings", "hub:discussion:workspace:collaborators", "hub:discussion:workspace:discussion", "hub:discussion:workspace:metrics", "hub:discussion:manage", "temp:hub:discussion:create"];
8
8
  /**
9
9
  * Discussion permission policies
10
10
  * @private
@@ -31,6 +31,10 @@ export declare type GetEventsParams = {
31
31
  * comma separated string list of event statuses
32
32
  */
33
33
  status?: string;
34
+ /**
35
+ * string to match within an event title
36
+ */
37
+ title?: string;
34
38
  /**
35
39
  * the max amount of events to return
36
40
  */
@@ -40,6 +44,14 @@ export declare type GetEventsParams = {
40
44
  */
41
45
  start?: string;
42
46
  };
47
+ export interface IUpdateRegistration {
48
+ /** Role of the user in the event */
49
+ role?: RegistrationRole;
50
+ /** Status of the registration */
51
+ status?: RegistrationStatus;
52
+ /** Attendance type for this registration */
53
+ type?: EventAttendanceType;
54
+ }
43
55
  export interface ICreateRegistration {
44
56
  /** ArcGIS Online id for a user. Will always be extracted from the token unless service token is used. */
45
57
  agoId?: string;
@@ -71,6 +83,8 @@ export interface IUpdateEvent {
71
83
  addresses?: ICreateAddress[];
72
84
  /** Flag for all day event */
73
85
  allDay?: boolean;
86
+ /** Boolean to indicate if users can register for an event */
87
+ allowRegistration?: boolean;
74
88
  /** Valid ways to attend the event */
75
89
  attendanceType?: EventAttendanceType[];
76
90
  /** Description of the event */
@@ -96,28 +110,9 @@ export interface IUpdateEvent {
96
110
  /** Title of the event */
97
111
  title?: string;
98
112
  }
99
- export declare type IAddressLocation = {
100
- [key: string]: any;
101
- };
102
- export declare type IAddressExtent = {
103
- [key: string]: any;
104
- };
105
- export interface IAddress {
106
- address: string;
107
- address2: string | null;
108
- capacity: number | null;
109
- createdAt: string;
110
- description: string | null;
111
- event?: IEvent;
112
- eventId: string;
113
- extent: IAddressExtent;
114
- geoAddress: string;
115
- geoAddrType: string;
116
- geoScore: number;
117
- id: string;
118
- location: IAddressLocation;
119
- updatedAt: string;
120
- venue: string | null;
113
+ export interface IRegistrationPermission {
114
+ canDelete: boolean;
115
+ canEdit: boolean;
121
116
  }
122
117
  export declare type IEventGeometry = {
123
118
  [key: string]: any;
@@ -125,10 +120,43 @@ export declare type IEventGeometry = {
125
120
  export declare type IEventCatalogItem = {
126
121
  [key: string]: any;
127
122
  };
128
- export declare enum EventStatus {
129
- PLANNED = "PLANNED",
130
- CANCELED = "CANCELED",
131
- REMOVED = "REMOVED"
123
+ export interface IEventPermission {
124
+ canDelete: boolean;
125
+ canEdit: boolean;
126
+ canSetAccessToOrg: boolean;
127
+ canSetAccessToPrivate: boolean;
128
+ canSetAccessToPublic: boolean;
129
+ canSetStatusToCancelled: boolean;
130
+ canSetStatusToRemoved: boolean;
131
+ }
132
+ export interface IEvent {
133
+ access: EventAccess;
134
+ addresses?: IAddress[];
135
+ allDay: boolean;
136
+ allowRegistration: boolean;
137
+ attendanceType: EventAttendanceType[];
138
+ catalog: IEventCatalogItem[] | null;
139
+ createdAt: string;
140
+ createdById: string;
141
+ creator?: IUser;
142
+ description: string | null;
143
+ editGroups: string[] | null;
144
+ endDateTime: string;
145
+ geometry: IEventGeometry;
146
+ id: string;
147
+ notifyAttendees: boolean;
148
+ onlineMeetings?: IOnlineMeeting[];
149
+ orgId: string;
150
+ permission: IEventPermission;
151
+ readGroups: string[] | null;
152
+ recurrence: string | null;
153
+ registrations?: IRegistration[];
154
+ startDateTime: string;
155
+ status: EventStatus;
156
+ summary: string | null;
157
+ timeZone: string;
158
+ title: string;
159
+ updatedAt: string;
132
160
  }
133
161
  export declare enum RegistrationStatus {
134
162
  PENDING = "PENDING",
@@ -141,27 +169,16 @@ export declare enum RegistrationRole {
141
169
  ORGANIZER = "ORGANIZER",
142
170
  ATTENDEE = "ATTENDEE"
143
171
  }
144
- export interface IRegistration {
145
- createdAt: string;
146
- createdBy?: IUser;
147
- createdById: string;
148
- event?: IEvent;
149
- eventId: string;
150
- id: number;
151
- role: RegistrationRole;
152
- status: RegistrationStatus;
153
- type: EventAttendanceType;
154
- updatedAt: string;
155
- user?: IUser;
156
- userId: string;
172
+ export declare enum EventStatus {
173
+ PLANNED = "PLANNED",
174
+ CANCELED = "CANCELED",
175
+ REMOVED = "REMOVED"
157
176
  }
158
177
  export interface IOnlineMeeting {
159
178
  capacity: number | null;
160
179
  createdAt: string;
161
180
  details: string | null;
162
- event?: IEvent;
163
181
  eventId: string;
164
- id: string;
165
182
  updatedAt: string;
166
183
  url: string;
167
184
  }
@@ -176,6 +193,42 @@ export interface IUser {
176
193
  updatedAt: string;
177
194
  username: string;
178
195
  }
196
+ export interface IRegistration {
197
+ createdAt: string;
198
+ createdBy?: IUser;
199
+ createdById: string;
200
+ event?: IEvent;
201
+ eventId: string;
202
+ id: number;
203
+ permission: IRegistrationPermission;
204
+ role: RegistrationRole;
205
+ status: RegistrationStatus;
206
+ type: EventAttendanceType;
207
+ updatedAt: string;
208
+ user?: IUser;
209
+ userId: string;
210
+ }
211
+ export declare type IAddressLocation = {
212
+ [key: string]: any;
213
+ };
214
+ export declare type IAddressExtent = {
215
+ [key: string]: any;
216
+ };
217
+ export interface IAddress {
218
+ address: string;
219
+ address2: string | null;
220
+ capacity: number | null;
221
+ createdAt: string;
222
+ description: string | null;
223
+ eventId: string;
224
+ extent: IAddressExtent;
225
+ geoAddress: string;
226
+ geoAddrType: string;
227
+ geoScore: number;
228
+ location: IAddressLocation;
229
+ updatedAt: string;
230
+ venue: string | null;
231
+ }
179
232
  /**
180
233
  * GeoJSON formatted geometry related to the event
181
234
  */
@@ -194,46 +247,11 @@ export declare enum EventAttendanceType {
194
247
  VIRTUAL = "VIRTUAL",
195
248
  IN_PERSON = "IN_PERSON"
196
249
  }
197
- export interface IUpdateRegistration {
198
- /** Role of the user in the event */
199
- role?: RegistrationRole;
200
- /** Status of the registration */
201
- status?: RegistrationStatus;
202
- /** Attendance type for this registration */
203
- type?: EventAttendanceType;
204
- }
205
250
  export declare enum EventAccess {
206
251
  PRIVATE = "PRIVATE",
207
252
  ORG = "ORG",
208
253
  PUBLIC = "PUBLIC"
209
254
  }
210
- export interface IEvent {
211
- access: EventAccess;
212
- addresses?: IAddress[];
213
- allDay: boolean;
214
- attendanceType: EventAttendanceType[];
215
- catalog: IEventCatalogItem[] | null;
216
- createdAt: string;
217
- createdById: string;
218
- creator?: IUser;
219
- description: string | null;
220
- editGroups: string[] | null;
221
- endDateTime: string;
222
- geometry: IEventGeometry;
223
- id: string;
224
- notifyAttendees: boolean;
225
- onlineMeetings?: IOnlineMeeting[];
226
- orgId: string;
227
- readGroups: string[] | null;
228
- recurrence: string | null;
229
- registrations?: IRegistration[];
230
- startDateTime: string;
231
- status: EventStatus;
232
- summary: string | null;
233
- timeZone: string;
234
- title: string;
235
- updatedAt: string;
236
- }
237
255
  export interface ICreateAddress {
238
256
  /** Street address */
239
257
  address: string;
@@ -255,6 +273,8 @@ export interface ICreateEvent {
255
273
  agoId?: string;
256
274
  /** Flag for all day event */
257
275
  allDay?: boolean;
276
+ /** Boolean to indicate if users can register for an event */
277
+ allowRegistration?: boolean;
258
278
  /** Valid ways to attend the event */
259
279
  attendanceType?: EventAttendanceType[];
260
280
  /** Description of the event */
@@ -1,4 +1,4 @@
1
- export { EventAccess, EventAttendanceType, EventStatus, GetEventsParams, IAddress, IAddressExtent, IAddressLocation, ICreateAddress, ICreateEvent, ICreateEventGeometry, ICreateRegistration, IEvent, IEventCatalogItem, IEventGeometry, IRegistration, IUpdateEvent, IUpdateRegistration, IUser, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
1
+ export { EventAccess, EventAttendanceType, EventStatus, GetEventsParams, IAddress, IAddressExtent, IAddressLocation, ICreateAddress, ICreateEvent, ICreateEventGeometry, ICreateRegistration, IEvent, IEventPermission, IEventCatalogItem, IEventGeometry, IRegistration, IRegistrationPermission, IUpdateEvent, IUpdateRegistration, IUser, RegistrationRole, RegistrationStatus, } from "./orval/api/orval-events";
2
2
  import { IHubRequestOptions } from "../../types";
3
3
  import { ICreateEvent, IUpdateEvent, ICreateRegistration, IUpdateRegistration, GetEventsParams } from "./orval/api/orval-events";
4
4
  /**
@@ -4,7 +4,7 @@ import { IPermissionPolicy } from "../../permissions";
4
4
  * These define the requirements any user must meet to perform related actions
5
5
  * @private
6
6
  */
7
- export declare const GroupPermissions: readonly ["hub:group", "hub:group:create", "hub:group:create:view", "hub:group:create:edit", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:group:workspace", "hub:group:workspace:overview", "hub:group:workspace:dashboard", "hub:group:workspace:details", "hub:group:workspace:discussion", "hub:group:workspace:settings", "hub:group:workspace:collaborators", "hub:group:workspace:content", "hub:group:workspace:members", "hub:group:shareContent", "hub:group:manage"];
7
+ export declare const GroupPermissions: readonly ["hub:group", "hub:group:create", "hub:group:create:view", "hub:group:create:edit", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:group:canChangeAccess", "hub:group:workspace", "hub:group:workspace:overview", "hub:group:workspace:dashboard", "hub:group:workspace:details", "hub:group:workspace:discussion", "hub:group:workspace:settings", "hub:group:workspace:collaborators", "hub:group:workspace:content", "hub:group:workspace:members", "hub:group:shareContent", "hub:group:manage"];
8
8
  /**
9
9
  * Group permission policies
10
10
  * @private
@@ -8,7 +8,7 @@ export declare const InitiativeTemplateDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const InitiativeTemplatePermissions: readonly ["hub:initiativeTemplate", "hub:initiativeTemplate:create", "hub:initiativeTemplate:delete", "hub:initiativeTemplate:edit", "hub:initiativeTemplate:view", "hub:initiativeTemplate:workspace", "hub:initiativeTemplate:workspace:dashboard", "hub:initiativeTemplate:workspace:details", "hub:initiativeTemplate:workspace:collaborators", "hub:initiativeTemplate:workspace:settings", "hub:initiativeTemplate:manage"];
11
+ export declare const InitiativeTemplatePermissions: readonly ["hub:initiativeTemplate", "hub:initiativeTemplate:create", "hub:initiativeTemplate:delete", "hub:initiativeTemplate:edit", "hub:initiativeTemplate:view", "hub:initiativeTemplate:canChangeAccess", "hub:initiativeTemplate:workspace", "hub:initiativeTemplate:workspace:dashboard", "hub:initiativeTemplate:workspace:details", "hub:initiativeTemplate:workspace:collaborators", "hub:initiativeTemplate:workspace:settings", "hub:initiativeTemplate:manage"];
12
12
  /**
13
13
  * Initiative Template policies
14
14
  * @private
@@ -8,7 +8,7 @@ export declare const InitiativeDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:metrics", "hub:initiative:workspace:projects", "hub:initiative:workspace:projects:member", "hub:initiative:workspace:projects:manager", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:workspace:associationGroup:create", "hub:initiative:manage"];
11
+ export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:canChangeAccess", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:metrics", "hub:initiative:workspace:projects", "hub:initiative:workspace:projects:member", "hub:initiative:workspace:projects:manager", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:workspace:associationGroup:create", "hub:initiative:manage"];
12
12
  /**
13
13
  * Initiative permission policies
14
14
  * @private
@@ -8,7 +8,7 @@ export declare const PageDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const PagePermissions: readonly ["hub:page", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view", "hub:page:workspace", "hub:page:workspace:overview", "hub:page:workspace:dashboard", "hub:page:workspace:details", "hub:page:workspace:settings", "hub:page:workspace:collaborators", "hub:page:manage"];
11
+ export declare const PagePermissions: readonly ["hub:page", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view", "hub:page:canChangeAccess", "hub:page:workspace", "hub:page:workspace:overview", "hub:page:workspace:dashboard", "hub:page:workspace:details", "hub:page:workspace:settings", "hub:page:workspace:collaborators", "hub:page:manage"];
12
12
  /**
13
13
  * Page permission policies
14
14
  * @private
@@ -107,4 +107,4 @@ export interface IPolicyAssertion {
107
107
  /**
108
108
  * Assertion types which define the comparison operation to be performed
109
109
  */
110
- export declare type AssertionType = "eq" | "neq" | "gt" | "lt" | "length-gt" | "length-lt" | "contains" | "contains-all" | "without" | "included-in" | "is-group-admin" | "is-group-member" | "is-group-owner" | "starts-with" | "ends-with" | "not-starts-with" | "not-ends-with";
110
+ export declare type AssertionType = "eq" | "neq" | "gt" | "lt" | "length-gt" | "length-lt" | "contains" | "contains-all" | "contains-some" | "without" | "included-in" | "is-group-admin" | "is-not-group-admin" | "is-group-member" | "is-group-owner" | "starts-with" | "ends-with" | "not-starts-with" | "not-ends-with";
@@ -1,4 +1,4 @@
1
1
  /**`
2
2
  * Human readable response from a policy check
3
3
  */
4
- export declare type PolicyResponse = "granted" | "disabled-by-feature-flag" | "disabled-by-entity-flag" | "org-member" | "not-org-member" | "group-member" | "not-group-member" | "not-group-admin" | "is-user" | "not-owner" | "not-licensed" | "not-licensed-available" | "not-available" | "not-granted" | "no-edit-access" | "edit-access" | "invalid-permission" | "invalid-capability" | "privilege-required" | "service-offline" | "service-maintenance" | "service-not-available" | "entity-required" | "not-authenticated" | "not-alpha-org" | "not-beta-org" | "property-missing" | "property-not-array" | "property-has-no-length" | "array-contains-invalid-value" | "array-missing-required-value" | "property-mismatch" | "user-not-group-member" | "user-not-group-manager" | "user-not-group-owner" | "assertion-property-not-found" | "assertion-failed" | "assertion-requires-numeric-values" | "property-match" | "feature-disabled" | "feature-enabled" | "not-in-environment" | "no-policy-exists" | "feature-flag-required";
4
+ export declare type PolicyResponse = "granted" | "disabled-by-feature-flag" | "disabled-by-entity-flag" | "org-member" | "not-org-member" | "group-member" | "not-group-member" | "not-group-admin" | "is-user" | "not-owner" | "not-licensed" | "not-licensed-available" | "not-available" | "not-granted" | "no-edit-access" | "edit-access" | "invalid-permission" | "invalid-capability" | "privilege-required" | "service-offline" | "service-maintenance" | "service-not-available" | "entity-required" | "not-authenticated" | "not-alpha-org" | "not-beta-org" | "property-missing" | "property-not-array" | "property-has-no-length" | "array-contains-invalid-value" | "array-missing-required-value" | "property-mismatch" | "user-not-group-member" | "user-not-group-manager" | "user-not-group-owner" | "user-is-group-manager" | "assertion-property-not-found" | "assertion-failed" | "assertion-requires-numeric-values" | "assertion-requires-array-value" | "property-match" | "feature-disabled" | "feature-enabled" | "not-in-environment" | "no-policy-exists" | "feature-flag-required";
@@ -8,7 +8,7 @@ export declare const ProjectDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:associations", "hub:project:workspace", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:initiatives", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:manage"];
11
+ export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:canChangeAccess", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:associations", "hub:project:workspace", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:initiatives", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:manage"];
12
12
  /**
13
13
  * Project permission policies
14
14
  * @private
@@ -7,7 +7,7 @@ export declare const SiteDefaultFeatures: IFeatureFlags;
7
7
  * Site Permissions
8
8
  * This feeds into the Permissions type
9
9
  */
10
- export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:manage"];
10
+ export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:canChangeAccess", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:manage"];
11
11
  /**
12
12
  * Site permission policies
13
13
  * @private
@@ -4,7 +4,7 @@ import { IPermissionPolicy } from "../../permissions/types/IPermissionPolicy";
4
4
  * These define the requirements any user must meet to perform related actions
5
5
  * @private
6
6
  */
7
- export declare const SurveyPermissions: readonly ["hub:survey", "hub:survey:create", "hub:survey:delete", "hub:survey:edit", "hub:survey:view", "hub:survey:workspace", "hub:survey:workspace:dashboard", "hub:survey:workspace:details", "hub:survey:workspace:settings", "hub:survey:workspace:collaborators", "hub:survey:manage"];
7
+ export declare const SurveyPermissions: readonly ["hub:survey", "hub:survey:create", "hub:survey:delete", "hub:survey:edit", "hub:survey:view", "hub:survey:canChangeAccess", "hub:survey:workspace", "hub:survey:workspace:dashboard", "hub:survey:workspace:details", "hub:survey:workspace:settings", "hub:survey:workspace:collaborators", "hub:survey:manage"];
8
8
  /**
9
9
  * Survey permission policies
10
10
  * @private
@@ -9,7 +9,7 @@ export declare const TemplateDefaultFeatures: IFeatureFlags;
9
9
  * Template permissions: these define the requirements
10
10
  * any user must meet to perform related actions
11
11
  */
12
- export declare const TemplatePermissions: readonly ["hub:template", "hub:template:create", "hub:template:delete", "hub:template:edit", "hub:template:manage", "hub:template:view", "hub:template:workspace", "hub:template:workspace:details", "hub:template:workspace:dashboard", "hub:template:workspace:collaborators", "hub:template:workspace:settings"];
12
+ export declare const TemplatePermissions: readonly ["hub:template", "hub:template:create", "hub:template:delete", "hub:template:edit", "hub:template:manage", "hub:template:view", "hub:template:canChangeAccess", "hub:template:workspace", "hub:template:workspace:details", "hub:template:workspace:dashboard", "hub:template:workspace:collaborators", "hub:template:workspace:settings"];
13
13
  /**
14
14
  * @private
15
15
  * Template permission policies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.107.1",
3
+ "version": "14.108.0",
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",