@reqquest/ui 1.11.0 → 1.12.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.
@@ -1,4 +1,7 @@
1
1
  type Access {
2
+ """Current user is permitted to create announcements."""
3
+ createAnnouncement: Boolean!
4
+
2
5
  """
3
6
  Current user may create a new app request on behalf of another user and should be shown the Create App Request button on the reviewer dashboard or main app request list.
4
7
  """
@@ -19,6 +22,12 @@ type Access {
19
22
  """
20
23
  createRole: Boolean!
21
24
 
25
+ """Current user is permitted to delete announcements."""
26
+ deleteAnnouncement: Boolean!
27
+
28
+ """Current user is permitted to update announcements."""
29
+ updateAnnouncement: Boolean!
30
+
22
31
  """The current user, if any."""
23
32
  user: AccessUser
24
33
 
@@ -276,6 +285,87 @@ input AccessUserIdentifierInput {
276
285
  label: String!
277
286
  }
278
287
 
288
+ """
289
+ A site-wide announcement shown to users, optionally limited to a date range.
290
+ """
291
+ type Announcement {
292
+ """The content of the announcement in HTML."""
293
+ body: String!
294
+
295
+ """
296
+ Whether the announcement has been turned on. A disabled announcement never displays, regardless of its date range.
297
+ """
298
+ enabled: Boolean!
299
+
300
+ """
301
+ The announcement will not display after this date. Null means it displays until it is disabled.
302
+ """
303
+ end: DateTime
304
+ id: ID!
305
+
306
+ """URL the announcement directs the user to for more information."""
307
+ link: String
308
+
309
+ """The text to display for the link."""
310
+ linkText: String
311
+
312
+ """
313
+ The announcement will not display before this date. Null means it displays as soon as it is enabled.
314
+ """
315
+ start: DateTime
316
+
317
+ """Short headline for the announcement."""
318
+ subject: String!
319
+
320
+ """The type of announcement, toggleable or date range"""
321
+ type: String!
322
+ }
323
+
324
+ input AnnouncementFilters {
325
+ """
326
+ Return only the announcements that should be displayed at this moment: enabled OR within their date range.
327
+ """
328
+ active: Boolean
329
+
330
+ """Return only enabled (true) or only disabled (false) announcements."""
331
+ enabled: Boolean
332
+
333
+ """Return the announcements with these IDs."""
334
+ ids: [ID!]
335
+ }
336
+
337
+ input AnnouncementUpdate {
338
+ """
339
+ The content of the announcement in HTML. Unsafe markup is stripped on save.
340
+ """
341
+ body: String
342
+
343
+ """Whether the announcement has been turned on."""
344
+ enabled: Boolean = false
345
+
346
+ """
347
+ The announcement will not display after this date. Null means it displays until it is disabled.
348
+ """
349
+ end: DateTime
350
+
351
+ """URL the announcement directs the user to for more information."""
352
+ link: String
353
+
354
+ """The text to display for the link. Required when a link is given."""
355
+ linkText: String
356
+
357
+ """
358
+ The announcement will not display before this date. Null means it displays as soon as it is enabled.
359
+ """
360
+ start: DateTime
361
+
362
+ """Short headline for the announcement."""
363
+ subject: String
364
+
365
+ """The type of announcement, toggleable or date range"""
366
+ type: String
367
+ }
368
+
279
369
  """
280
370
  Represents a group of applications all being applied for at the same time. As part of the request, multiple applications will be created and either eliminated as ineligible or submitted for approval.
281
371
  """
@@ -955,6 +1045,11 @@ The specific instance of a requirement on a particular application. Stores the s
955
1045
  type ApplicationRequirement {
956
1046
  application: Application!
957
1047
 
1048
+ """
1049
+ The prompt keys the requirement named as responsible for its current status. Used to attach status indicators to the specific answers at fault instead of every prompt the requirement consults. Null when the requirement did not name any, in which case all of its prompts are implicated.
1050
+ """
1051
+ blame: [String!]
1052
+
958
1053
  """
959
1054
  The configuration data for this requirement in the app request's period.
960
1055
  """
@@ -1314,10 +1409,16 @@ type Mutation {
1314
1409
  """
1315
1410
  completeReview(appRequestId: ID!): ValidatedAppRequestResponse!
1316
1411
 
1412
+ """Create a new site-wide announcement."""
1413
+ createAnnouncement(announcement: AnnouncementUpdate!, validateOnly: Boolean): ValidatedAnnouncementResponse!
1414
+
1317
1415
  """Create a new app request."""
1318
1416
  createAppRequest(login: String!, periodId: ID!, validateOnly: Boolean): ValidatedAppRequestResponse!
1319
1417
  createPeriod(copyPeriodId: String, period: PeriodUpdate!, validateOnly: Boolean): ValidatedPeriodResponse!
1320
1418
 
1419
+ """Delete an existing site-wide announcement."""
1420
+ deleteAnnouncement(announcementId: ID!): ValidatedResponse!
1421
+
1321
1422
  """Delete an existing note."""
1322
1423
  deleteNote(noteId: ID!): Boolean!
1323
1424
  deletePeriod(periodId: ID!): ValidatedResponse!
@@ -1368,6 +1469,9 @@ type Mutation {
1368
1469
 
1369
1470
  """Toggle an existing note's persistent status."""
1370
1471
  togglePersistence(noteId: ID!): ValidatedNoteResponse!
1472
+
1473
+ """Update an existing site-wide announcement."""
1474
+ updateAnnouncement(announcement: AnnouncementUpdate!, announcementId: ID!, validateOnly: Boolean): ValidatedAnnouncementResponse!
1371
1475
  updateConfiguration(data: JsonData!, key: String!, periodId: ID!, validateOnly: Boolean): ValidatedConfigurationResponse!
1372
1476
 
1373
1477
  """Update the content of an existing note."""
@@ -1726,6 +1830,11 @@ type Query {
1726
1830
  access: Access!
1727
1831
  accessUsers(filter: AccessUserFilter, paged: Pagination): [AccessUser!]!
1728
1832
 
1833
+ """
1834
+ Retrieve site-wide announcements. Applicants only ever see currently active announcements; users with the Announcement view control see them all.
1835
+ """
1836
+ announcements(filter: AnnouncementFilters): [Announcement!]!
1837
+
1729
1838
  """
1730
1839
  The activity log for this app request. This is a list of actions taken on the app request, such as submission, updating prompts, make an offer, add a note, etc. It will be sorted by the date of the activity in descending order.
1731
1840
  """
@@ -1845,6 +1954,11 @@ type RequirementPrompt {
1845
1954
  A human readable title for the prompt in the navigation. You probably want it to be shorter than the full title. If not provided, the title will be used.
1846
1955
  """
1847
1956
  navTitle: String!
1957
+
1958
+ """
1959
+ True when this row exists only because its requirement listed the prompt in `promptKeysNoDisplay` - a dependency it reads but does not own. Such a row must not be rendered beneath that requirement; the prompt is displayed under the requirement that does own it. This is not derivable from `visibility`: a no-display row is UNREACHABLE, but so is a prompt whose own requirement resolved before reaching it, and that one is still the requirement's to show.
1960
+ """
1961
+ noDisplay: Boolean!
1848
1962
  optOut: Boolean!
1849
1963
 
1850
1964
  """
@@ -1965,6 +2079,19 @@ type RoleActions {
1965
2079
  update: Boolean!
1966
2080
  }
1967
2081
 
2082
+ type ValidatedAnnouncementResponse {
2083
+ """
2084
+ The created or updated announcement. Null when validateOnly was true or when validation errors prevented the operation.
2085
+ """
2086
+ announcement: Announcement
2087
+ messages: [MutationMessage!]!
2088
+
2089
+ """
2090
+ True if the mutation succeeded (e.g. saved data or passed validation), even if there were warnings.
2091
+ """
2092
+ success: Boolean!
2093
+ }
2094
+
1968
2095
  type ValidatedAppRequestResponse {
1969
2096
  appRequest: AppRequest
1970
2097
  messages: [MutationMessage!]!
@@ -86,6 +86,12 @@ export const isAccessUserIdentifier = (obj) => {
86
86
  throw new Error('__typename is missing in "isAccessUserIdentifier"');
87
87
  return AccessUserIdentifier_possibleTypes.includes(obj.__typename);
88
88
  };
89
+ const Announcement_possibleTypes = ['Announcement'];
90
+ export const isAnnouncement = (obj) => {
91
+ if (!obj?.__typename)
92
+ throw new Error('__typename is missing in "isAnnouncement"');
93
+ return Announcement_possibleTypes.includes(obj.__typename);
94
+ };
89
95
  const AppRequest_possibleTypes = ['AppRequest'];
90
96
  export const isAppRequest = (obj) => {
91
97
  if (!obj?.__typename)
@@ -290,6 +296,12 @@ export const isRoleActions = (obj) => {
290
296
  throw new Error('__typename is missing in "isRoleActions"');
291
297
  return RoleActions_possibleTypes.includes(obj.__typename);
292
298
  };
299
+ const ValidatedAnnouncementResponse_possibleTypes = ['ValidatedAnnouncementResponse'];
300
+ export const isValidatedAnnouncementResponse = (obj) => {
301
+ if (!obj?.__typename)
302
+ throw new Error('__typename is missing in "isValidatedAnnouncementResponse"');
303
+ return ValidatedAnnouncementResponse_possibleTypes.includes(obj.__typename);
304
+ };
293
305
  const ValidatedAppRequestResponse_possibleTypes = ['ValidatedAppRequestResponse'];
294
306
  export const isValidatedAppRequestResponse = (obj) => {
295
307
  if (!obj?.__typename)
@@ -2,10 +2,13 @@ declare const _default: {
2
2
  scalars: number[];
3
3
  types: {
4
4
  Access: {
5
+ createAnnouncement: number[];
5
6
  createAppRequestOther: number[];
6
7
  createAppRequestSelf: number[];
7
8
  createPeriod: number[];
8
9
  createRole: number[];
10
+ deleteAnnouncement: number[];
11
+ updateAnnouncement: number[];
9
12
  user: number[];
10
13
  viewAppRequestList: number[];
11
14
  viewApplicantDashboard: number[];
@@ -160,6 +163,35 @@ declare const _default: {
160
163
  label: number[];
161
164
  __typename: number[];
162
165
  };
166
+ Announcement: {
167
+ body: number[];
168
+ enabled: number[];
169
+ end: number[];
170
+ id: number[];
171
+ link: number[];
172
+ linkText: number[];
173
+ start: number[];
174
+ subject: number[];
175
+ type: number[];
176
+ __typename: number[];
177
+ };
178
+ AnnouncementFilters: {
179
+ active: number[];
180
+ enabled: number[];
181
+ ids: number[];
182
+ __typename: number[];
183
+ };
184
+ AnnouncementUpdate: {
185
+ body: number[];
186
+ enabled: number[];
187
+ end: number[];
188
+ link: number[];
189
+ linkText: number[];
190
+ start: number[];
191
+ subject: number[];
192
+ type: number[];
193
+ __typename: number[];
194
+ };
163
195
  AppRequest: {
164
196
  actions: number[];
165
197
  applicant: number[];
@@ -352,6 +384,7 @@ declare const _default: {
352
384
  ApplicationPhase: {};
353
385
  ApplicationRequirement: {
354
386
  application: number[];
387
+ blame: number[];
355
388
  configurationData: number[];
356
389
  description: number[];
357
390
  id: number[];
@@ -478,6 +511,10 @@ declare const _default: {
478
511
  completeReview: (number | {
479
512
  appRequestId: (string | number)[];
480
513
  })[];
514
+ createAnnouncement: (number | {
515
+ announcement: (string | number)[];
516
+ validateOnly: number[];
517
+ })[];
481
518
  createAppRequest: (number | {
482
519
  login: (string | number)[];
483
520
  periodId: (string | number)[];
@@ -488,6 +525,9 @@ declare const _default: {
488
525
  period: (string | number)[];
489
526
  validateOnly: number[];
490
527
  })[];
528
+ deleteAnnouncement: (number | {
529
+ announcementId: (string | number)[];
530
+ })[];
491
531
  deleteNote: (number | {
492
532
  noteId: (string | number)[];
493
533
  })[];
@@ -558,6 +598,11 @@ declare const _default: {
558
598
  togglePersistence: (number | {
559
599
  noteId: (string | number)[];
560
600
  })[];
601
+ updateAnnouncement: (number | {
602
+ announcement: (string | number)[];
603
+ announcementId: (string | number)[];
604
+ validateOnly: number[];
605
+ })[];
561
606
  updateConfiguration: (number | {
562
607
  data: (string | number)[];
563
608
  key: (string | number)[];
@@ -735,6 +780,9 @@ declare const _default: {
735
780
  filter: number[];
736
781
  paged: number[];
737
782
  })[];
783
+ announcements: (number | {
784
+ filter: number[];
785
+ })[];
738
786
  appRequestActivity: (number | {
739
787
  filters: number[];
740
788
  id: (string | number)[];
@@ -790,6 +838,7 @@ declare const _default: {
790
838
  key: number[];
791
839
  moot: number[];
792
840
  navTitle: number[];
841
+ noDisplay: number[];
793
842
  optOut: number[];
794
843
  preloadData: (number | {
795
844
  schemaVersion: number[];
@@ -824,6 +873,12 @@ declare const _default: {
824
873
  __typename: number[];
825
874
  };
826
875
  String: {};
876
+ ValidatedAnnouncementResponse: {
877
+ announcement: number[];
878
+ messages: number[];
879
+ success: number[];
880
+ __typename: number[];
881
+ };
827
882
  ValidatedAppRequestResponse: {
828
883
  appRequest: number[];
829
884
  messages: number[];