@jsb188/graphql 1.1.10 → 1.1.12

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 (176) hide show
  1. package/audience.d.ts +343 -0
  2. package/cache/config.ts +98 -50
  3. package/cache/index.chat-activity.test.ts +119 -0
  4. package/cache/index.chat.test.ts +92 -0
  5. package/cache/index.helpers.ts +96 -0
  6. package/cache/index.regression.test.ts +149 -0
  7. package/cache/index.test.ts +1017 -127
  8. package/cache/index.ts +1256 -1269
  9. package/cache/optimistic-ui-runtime.ts +46 -0
  10. package/cache/optimistic-ui.ts +401 -0
  11. package/cache/persist.ts +800 -0
  12. package/cache/store.ts +395 -0
  13. package/cache/value.helpers.ts +17 -0
  14. package/client/draft-persistence-indexed-db.ts +413 -0
  15. package/client/draft-persistence.ts +152 -0
  16. package/client/index.ts +3 -0
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +870 -164
  19. package/deno.lock +187 -0
  20. package/deno.test.json +10 -4
  21. package/gql/eagerQueryMap.ts +12 -0
  22. package/gql/fragments/accountAuthFragments.ts +5 -0
  23. package/gql/fragments/accountFragments.ts +0 -3
  24. package/gql/fragments/accountSessionFragments.ts +16 -0
  25. package/gql/fragments/agentMemoryFragments.ts +23 -0
  26. package/gql/fragments/agentNoteFragments.ts +150 -0
  27. package/gql/fragments/aiChatFragments.ts +42 -0
  28. package/gql/fragments/audienceFragments.ts +141 -0
  29. package/gql/fragments/campaignFragments.ts +566 -0
  30. package/gql/fragments/dataTableFragments.ts +50 -192
  31. package/gql/fragments/emailFragments.ts +32 -17
  32. package/gql/fragments/fieldDocFragments.ts +264 -0
  33. package/gql/fragments/inboundContactFragments.ts +2 -0
  34. package/gql/fragments/logFragments.ts +101 -69
  35. package/gql/fragments/organizationFragments.ts +53 -5
  36. package/gql/fragments/qrCodeFragments.ts +29 -0
  37. package/gql/fragments/scheduleFragments.ts +667 -0
  38. package/gql/fragments/sheetFragments.ts +304 -63
  39. package/gql/fragments/storageFragments.ts +45 -0
  40. package/gql/fragments/workflowFragments.ts +41 -5
  41. package/gql/mutations/accountMutations.ts +0 -2
  42. package/gql/mutations/agentMemoryMutations.ts +68 -0
  43. package/gql/mutations/agentNoteMutations.ts +62 -0
  44. package/gql/mutations/aiChatMutations.ts +49 -4
  45. package/gql/mutations/audienceMutations.ts +71 -0
  46. package/gql/mutations/authMutations.ts +203 -18
  47. package/gql/mutations/billingMutations.ts +17 -27
  48. package/gql/mutations/campaignMutations.ts +258 -0
  49. package/gql/mutations/contactMutations.ts +23 -0
  50. package/gql/mutations/dataTableMutations.ts +19 -54
  51. package/gql/mutations/fieldDocMutations.ts +173 -0
  52. package/gql/mutations/index.ts +10 -2
  53. package/gql/mutations/logMutations.ts +6 -29
  54. package/gql/mutations/organizationMutations.ts +19 -4
  55. package/gql/mutations/qrCodeMutations.ts +20 -0
  56. package/gql/mutations/scheduleMutations.ts +1121 -0
  57. package/gql/mutations/sheetMutations.ts +221 -60
  58. package/gql/mutations/storageMutations.ts +19 -0
  59. package/gql/mutations/workflowMutations.ts +60 -0
  60. package/gql/queries/agentMemoryQueries.ts +28 -0
  61. package/gql/queries/agentNoteQueries.ts +89 -0
  62. package/gql/queries/aiChatQueries.ts +70 -2
  63. package/gql/queries/audienceQueries.ts +128 -0
  64. package/gql/queries/authQueries.ts +47 -0
  65. package/gql/queries/billingQueries.ts +118 -6
  66. package/gql/queries/campaignQueries.ts +236 -0
  67. package/gql/queries/dataTableQueries.ts +61 -13
  68. package/gql/queries/emailQueries.ts +26 -17
  69. package/gql/queries/emailReplyReportQueries.ts +76 -0
  70. package/gql/queries/fieldDocQueries.ts +166 -0
  71. package/gql/queries/inboundContactQueries.ts +4 -0
  72. package/gql/queries/index.ts +10 -2
  73. package/gql/queries/logQueries.ts +68 -30
  74. package/gql/queries/organizationQueries.ts +65 -1
  75. package/gql/queries/qrCodeQueries.ts +20 -0
  76. package/gql/queries/scheduleQueries.ts +691 -0
  77. package/gql/queries/sheetQueries.ts +244 -26
  78. package/gql/queries/storageQueries.ts +38 -0
  79. package/gql/queries/workflowQueries.ts +77 -2
  80. package/hooks/index.helpers.test.ts +50 -0
  81. package/hooks/index.helpers.ts +52 -0
  82. package/hooks/index.ts +2254 -982
  83. package/hooks/use-account-mtn.ts +76 -81
  84. package/hooks/use-agentMemory-mtn.ts +71 -0
  85. package/hooks/use-agentMemory-qry.ts +56 -0
  86. package/hooks/use-agentNote-mtn.ts +82 -0
  87. package/hooks/use-agentNote-qry.ts +190 -0
  88. package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
  89. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  90. package/hooks/use-agentNote-recovery.ts +72 -0
  91. package/hooks/use-aiChat-mtn.ts +220 -141
  92. package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
  93. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  94. package/hooks/use-aiChat-qry.ts +341 -237
  95. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  96. package/hooks/use-app-qry.ts +12 -9
  97. package/hooks/use-audience-mtn.ts +194 -0
  98. package/hooks/use-audience-qry.helpers.test.ts +80 -0
  99. package/hooks/use-audience-qry.helpers.ts +63 -0
  100. package/hooks/use-audience-qry.ts +330 -0
  101. package/hooks/use-auth-mtn.ts +435 -252
  102. package/hooks/use-auth-qry.ts +51 -0
  103. package/hooks/use-billing-mtn.ts +31 -0
  104. package/hooks/use-billing-qry.ts +76 -0
  105. package/hooks/use-campaign-generation-recovery.ts +53 -0
  106. package/hooks/use-campaign-mtn.ts +436 -0
  107. package/hooks/use-campaign-qry.helpers.ts +40 -0
  108. package/hooks/use-campaign-qry.ts +834 -0
  109. package/hooks/use-dataTable-mtn.ts +37 -46
  110. package/hooks/use-dataTable-qry.ts +102 -128
  111. package/hooks/use-email-qry.helpers.ts +37 -0
  112. package/hooks/use-email-qry.ts +56 -86
  113. package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
  114. package/hooks/use-fieldDoc-mtn.ts +262 -0
  115. package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
  116. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  117. package/hooks/use-fieldDoc-qry.ts +212 -0
  118. package/hooks/use-inboundContact-mtn.ts +19 -16
  119. package/hooks/use-inboundContact-qry.ts +62 -56
  120. package/hooks/use-integration-mtn.ts +56 -38
  121. package/hooks/use-integration-qry.ts +24 -9
  122. package/hooks/use-log-mtn.ts +88 -59
  123. package/hooks/use-log-qry.ts +150 -73
  124. package/hooks/use-organization-mtn.ts +334 -277
  125. package/hooks/use-organization-qry.ts +155 -129
  126. package/hooks/use-publicFormEmail-mtn.ts +27 -0
  127. package/hooks/use-qrCode-mtn.ts +40 -0
  128. package/hooks/use-qrCode-qry.ts +78 -0
  129. package/hooks/use-schedule-mtn.ts +589 -0
  130. package/hooks/use-schedule-qry.ts +738 -0
  131. package/hooks/use-schedule-reactive.ts +486 -0
  132. package/hooks/use-sheet-mtn.ts +157 -79
  133. package/hooks/use-sheet-qry.ts +221 -92
  134. package/hooks/use-storage-mtn.ts +81 -41
  135. package/hooks/use-storage-qry.ts +128 -14
  136. package/hooks/use-workflow-mtn.ts +72 -0
  137. package/hooks/use-workflow-qry.ts +184 -47
  138. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  139. package/libs/ai-chat-outgoing.ts +11 -0
  140. package/libs/ai-chat-outgoing.types.ts +25 -0
  141. package/libs/ai-chat-run-realtime.ts +20 -0
  142. package/libs/ai-chat-submission-realtime.ts +150 -0
  143. package/libs/fragment-realtime-sequence.ts +55 -0
  144. package/libs/fragment-recovery.test.ts +326 -0
  145. package/libs/fragment-recovery.ts +325 -0
  146. package/libs/open-sheet.ts +138 -0
  147. package/libs/orchestrator-realtime.helpers.test.ts +229 -0
  148. package/libs/orchestrator-realtime.helpers.ts +317 -0
  149. package/libs/orchestrator-realtime.ts +433 -0
  150. package/libs/request-cache-regression.test.ts +122 -0
  151. package/libs/request-managed-session.test.ts +574 -0
  152. package/libs/request-no-store.test.ts +419 -0
  153. package/libs/sheet-command-batch.ts +44 -0
  154. package/libs/sheet-view-realtime-router.test.ts +214 -0
  155. package/libs/sheet-view-realtime-router.ts +99 -0
  156. package/libs/sse-ticket.test.ts +26 -0
  157. package/loaders/campaign.test.ts +186 -0
  158. package/loaders/campaign.ts +110 -0
  159. package/loaders/emailPreference.ts +75 -0
  160. package/loaders/rest.ts +12 -0
  161. package/package.json +119 -71
  162. package/schedule.d.ts +1790 -0
  163. package/sse.helpers.ts +19 -0
  164. package/sse.ts +70 -106
  165. package/tests/agent-note-detail-cache.test.ts +120 -0
  166. package/tests/agent-note-search.test.ts +444 -0
  167. package/tsconfig.json +11 -10
  168. package/types.d.ts +77 -26
  169. package/utils.ts +78 -49
  170. package/gql/fragments/billingFragments.ts +0 -25
  171. package/gql/fragments/productFragments.ts +0 -39
  172. package/gql/fragments/reportFragments.ts +0 -90
  173. package/gql/queries/productQueries.ts +0 -31
  174. package/gql/queries/reportQueries.ts +0 -134
  175. package/hooks/use-product-qry.ts +0 -67
  176. package/hooks/use-report-qry.ts +0 -153
@@ -0,0 +1,691 @@
1
+ import { gql } from 'graphql-tag';
2
+ import {
3
+ scheduleActivityFragment,
4
+ scheduleCalendarFragment,
5
+ scheduleOccurrenceFragment,
6
+ scheduleProjectFragment,
7
+ scheduleProjectRunFragment,
8
+ schedulePublicationFragment,
9
+ scheduleRelationshipFragment,
10
+ scheduleRequestFragment,
11
+ scheduleResourceFragment,
12
+ scheduleSeriesFragment,
13
+ scheduleTimeOffFragment,
14
+ scheduleViolationFragment,
15
+ scheduleWorkCalendarFragment,
16
+ } from '../fragments/scheduleFragments.ts';
17
+
18
+ export const scheduleWorkCalendarsQry = gql`
19
+ query scheduleWorkCalendars($organizationId: GenericID!) {
20
+ scheduleWorkCalendars(organizationId: $organizationId) {
21
+ ...scheduleWorkCalendarFragment
22
+ exceptions {
23
+ id
24
+ workCalendarId
25
+ date
26
+ ranges {
27
+ start
28
+ end
29
+ }
30
+ note
31
+ }
32
+ }
33
+ }
34
+ ${scheduleWorkCalendarFragment}
35
+ `;
36
+
37
+ export const scheduleResourcesQry = gql`
38
+ query scheduleResources($organizationId: GenericID!, $kind: ScheduleResourceKind, $includeRetired: Boolean, $search: String) {
39
+ scheduleResources(organizationId: $organizationId, kind: $kind, includeRetired: $includeRetired, search: $search) {
40
+ ...scheduleResourceFragment
41
+ viewerNotify {
42
+ channels
43
+ }
44
+ availability {
45
+ id
46
+ resourceId
47
+ startsOn
48
+ endsOn
49
+ maxUnitsPerDay
50
+ note
51
+ }
52
+ }
53
+ }
54
+ ${scheduleResourceFragment}
55
+ `;
56
+
57
+ export const scheduleCodeTypesQry = gql`
58
+ query scheduleCodeTypes($organizationId: GenericID!, $projectId: GenericID) {
59
+ scheduleCodeTypes(organizationId: $organizationId, projectId: $projectId) {
60
+ id
61
+ organizationId
62
+ projectId
63
+ key
64
+ name
65
+ values {
66
+ key
67
+ label
68
+ color
69
+ }
70
+ ordinal
71
+ }
72
+ }
73
+
74
+ `;
75
+
76
+ export const scheduleResourceUsageQry = gql`
77
+ query scheduleResourceUsage($organizationId: GenericID!, $projectId: GenericID!, $resourceIds: [GenericID!], $from: String!, $to: String!) {
78
+ scheduleResourceUsage(organizationId: $organizationId, projectId: $projectId, resourceIds: $resourceIds, from: $from, to: $to) {
79
+ resourceId
80
+ date
81
+ demandUnits
82
+ externalUnits
83
+ availableUnits
84
+ overallocated
85
+ }
86
+ }
87
+
88
+ `;
89
+
90
+ export const scheduleCalendarsQry = gql`
91
+ query scheduleCalendars($organizationId: GenericID!) {
92
+ scheduleCalendars(organizationId: $organizationId) {
93
+ ...scheduleCalendarFragment
94
+ viewerPermission
95
+ viewerCanEdit
96
+ viewerCanEditAccess
97
+ viewerIsManager
98
+ viewerResourceId
99
+ }
100
+ }
101
+ ${scheduleCalendarFragment}
102
+ `;
103
+
104
+ export const scheduleCalendarQry = gql`
105
+ query scheduleCalendar($calendarId: GenericID!) {
106
+ scheduleCalendar(calendarId: $calendarId) {
107
+ ...scheduleCalendarFragment
108
+ viewerPermission
109
+ viewerCanEdit
110
+ viewerCanEditAccess
111
+ viewerIsManager
112
+ viewerResourceId
113
+ }
114
+ }
115
+ ${scheduleCalendarFragment}
116
+ `;
117
+
118
+ export const scheduleOccurrencesQry = gql`
119
+ query scheduleOccurrences($organizationId: GenericID!, $calendarId: GenericID!, $from: DateTime!, $to: DateTime!, $publishedOnly: Boolean, $mineOnly: Boolean, $kinds: [ScheduleOccurrenceKind!]) {
120
+ scheduleOccurrences(organizationId: $organizationId, calendarId: $calendarId, from: $from, to: $to, publishedOnly: $publishedOnly, mineOnly: $mineOnly, kinds: $kinds) {
121
+ occurrences {
122
+ ...scheduleOccurrenceFragment
123
+ }
124
+ hasMore
125
+ from
126
+ to
127
+ }
128
+ }
129
+ ${scheduleOccurrenceFragment}
130
+ `;
131
+
132
+ export const scheduleOccurrenceQry = gql`
133
+ query scheduleOccurrence($organizationId: GenericID!, $occurrenceId: GenericID!) {
134
+ scheduleOccurrence(organizationId: $organizationId, occurrenceId: $occurrenceId) {
135
+ ...scheduleOccurrenceFragment
136
+ }
137
+ }
138
+ ${scheduleOccurrenceFragment}
139
+ `;
140
+
141
+ export const scheduleMyShiftsQry = gql`
142
+ query scheduleMyShifts($organizationId: GenericID!, $from: DateTime!, $to: DateTime!) {
143
+ scheduleMyShifts(organizationId: $organizationId, from: $from, to: $to) {
144
+ occurrences {
145
+ ...scheduleOccurrenceFragment
146
+ }
147
+ hasMore
148
+ from
149
+ to
150
+ }
151
+ }
152
+ ${scheduleOccurrenceFragment}
153
+ `;
154
+
155
+ export const scheduleOpenShiftsQry = gql`
156
+ query scheduleOpenShifts($organizationId: GenericID!, $calendarId: GenericID, $from: DateTime!, $to: DateTime!, $forMe: Boolean) {
157
+ scheduleOpenShifts(organizationId: $organizationId, calendarId: $calendarId, from: $from, to: $to, forMe: $forMe) {
158
+ occurrence {
159
+ ...scheduleOccurrenceFragment
160
+ }
161
+ slotKey
162
+ openCount
163
+ eligibility {
164
+ eligible
165
+ slotKey
166
+ reasons {
167
+ code
168
+ severity
169
+ ruleId
170
+ startAt
171
+ endAt
172
+ message
173
+ }
174
+ }
175
+ }
176
+ }
177
+ ${scheduleOccurrenceFragment}
178
+ `;
179
+
180
+ export const scheduleShiftEligibilityQry = gql`
181
+ query scheduleShiftEligibility($organizationId: GenericID!, $occurrenceId: GenericID!, $slotKey: String, $resourceId: GenericID) {
182
+ scheduleShiftEligibility(organizationId: $organizationId, occurrenceId: $occurrenceId, slotKey: $slotKey, resourceId: $resourceId) {
183
+ eligible
184
+ slotKey
185
+ reasons {
186
+ code
187
+ severity
188
+ ruleId
189
+ startAt
190
+ endAt
191
+ message
192
+ }
193
+ }
194
+ }
195
+
196
+ `;
197
+
198
+ export const scheduleShiftCandidatesQry = gql`
199
+ query scheduleShiftCandidates($organizationId: GenericID!, $occurrenceId: GenericID!, $slotKey: String) {
200
+ scheduleShiftCandidates(organizationId: $organizationId, occurrenceId: $occurrenceId, slotKey: $slotKey) {
201
+ resource {
202
+ ...scheduleResourceFragment
203
+ viewerNotify {
204
+ channels
205
+ }
206
+ availability {
207
+ id
208
+ resourceId
209
+ startsOn
210
+ endsOn
211
+ maxUnitsPerDay
212
+ note
213
+ }
214
+ }
215
+ eligibility {
216
+ eligible
217
+ slotKey
218
+ reasons {
219
+ code
220
+ severity
221
+ ruleId
222
+ startAt
223
+ endAt
224
+ message
225
+ }
226
+ }
227
+ }
228
+ }
229
+ ${scheduleResourceFragment}
230
+ `;
231
+
232
+ export const scheduleSeriesListQry = gql`
233
+ query scheduleSeriesList($organizationId: GenericID!, $calendarId: GenericID!, $includeInactive: Boolean) {
234
+ scheduleSeriesList(organizationId: $organizationId, calendarId: $calendarId, includeInactive: $includeInactive) {
235
+ ...scheduleSeriesFragment
236
+ }
237
+ }
238
+ ${scheduleSeriesFragment}
239
+ `;
240
+
241
+ export const scheduleDemandsQry = gql`
242
+ query scheduleDemands($organizationId: GenericID!, $calendarId: GenericID!, $from: DateTime!, $to: DateTime!) {
243
+ scheduleDemands(organizationId: $organizationId, calendarId: $calendarId, from: $from, to: $to) {
244
+ id
245
+ calendarId
246
+ resourceId
247
+ key
248
+ quantity
249
+ startAt
250
+ endAt
251
+ note
252
+ }
253
+ }
254
+
255
+ `;
256
+
257
+ export const scheduleRulesQry = gql`
258
+ query scheduleRules($organizationId: GenericID!, $calendarId: GenericID) {
259
+ scheduleRules(organizationId: $organizationId, calendarId: $calendarId) {
260
+ key
261
+ id
262
+ organizationId
263
+ calendarId
264
+ resourceId
265
+ kind
266
+ label
267
+ config {
268
+ ratios {
269
+ key
270
+ childrenPerAdult
271
+ }
272
+ predicate {
273
+ roles
274
+ qualifications
275
+ tags
276
+ }
277
+ minAdults
278
+ windowDays
279
+ maxMinutes
280
+ minRestMinutes
281
+ }
282
+ severity
283
+ active
284
+ ordinal
285
+ }
286
+ }
287
+
288
+ `;
289
+
290
+ export const scheduleViolationsQry = gql`
291
+ query scheduleViolations($organizationId: GenericID!, $calendarId: GenericID!, $from: DateTime!, $to: DateTime!) {
292
+ scheduleViolations(organizationId: $organizationId, calendarId: $calendarId, from: $from, to: $to) {
293
+ ...scheduleViolationFragment
294
+ }
295
+ }
296
+ ${scheduleViolationFragment}
297
+ `;
298
+
299
+ export const schedulePublishPreflightQry = gql`
300
+ query schedulePublishPreflight($organizationId: GenericID!, $calendarId: GenericID!, $from: DateTime!, $to: DateTime!) {
301
+ schedulePublishPreflight(organizationId: $organizationId, calendarId: $calendarId, from: $from, to: $to) {
302
+ draftCount
303
+ blockingCount
304
+ warningKeys
305
+ violations {
306
+ ...scheduleViolationFragment
307
+ }
308
+ diagnostics {
309
+ code
310
+ message
311
+ resourceId
312
+ ruleId
313
+ }
314
+ }
315
+ }
316
+ ${scheduleViolationFragment}
317
+ `;
318
+
319
+ export const schedulePublicationsQry = gql`
320
+ query schedulePublications($organizationId: GenericID!, $calendarId: GenericID!, $cursor: Cursor, $after: Boolean, $limit: Int) {
321
+ schedulePublications(organizationId: $organizationId, calendarId: $calendarId, cursor: $cursor, after: $after, limit: $limit) {
322
+ ...schedulePublicationFragment
323
+ viewerAcknowledgedAt
324
+ }
325
+ }
326
+ ${schedulePublicationFragment}
327
+ `;
328
+
329
+ export const scheduleRequestsQry = gql`
330
+ query scheduleRequests($organizationId: GenericID!, $calendarId: GenericID, $kinds: [ScheduleRequestKind!], $statuses: [ScheduleRequestStatus!], $involvingMe: Boolean, $from: DateTime, $to: DateTime, $cursor: Cursor, $after: Boolean, $limit: Int) {
331
+ scheduleRequests(organizationId: $organizationId, calendarId: $calendarId, kinds: $kinds, statuses: $statuses, involvingMe: $involvingMe, from: $from, to: $to, cursor: $cursor, after: $after, limit: $limit) {
332
+ ...scheduleRequestFragment
333
+ occurrence {
334
+ ...scheduleOccurrenceFragment
335
+ }
336
+ targetOccurrence {
337
+ ...scheduleOccurrenceFragment
338
+ }
339
+ eligibility {
340
+ eligible
341
+ slotKey
342
+ reasons {
343
+ code
344
+ severity
345
+ ruleId
346
+ startAt
347
+ endAt
348
+ message
349
+ }
350
+ }
351
+ viewerIsRequester
352
+ viewerIsCounterparty
353
+ viewerCanDecide
354
+ }
355
+ }
356
+ ${scheduleRequestFragment}
357
+ ${scheduleOccurrenceFragment}
358
+ `;
359
+
360
+ export const scheduleRequestQry = gql`
361
+ query scheduleRequest($organizationId: GenericID!, $requestId: GenericID!) {
362
+ scheduleRequest(organizationId: $organizationId, requestId: $requestId) {
363
+ ...scheduleRequestFragment
364
+ occurrence {
365
+ ...scheduleOccurrenceFragment
366
+ }
367
+ targetOccurrence {
368
+ ...scheduleOccurrenceFragment
369
+ }
370
+ eligibility {
371
+ eligible
372
+ slotKey
373
+ reasons {
374
+ code
375
+ severity
376
+ ruleId
377
+ startAt
378
+ endAt
379
+ message
380
+ }
381
+ }
382
+ viewerIsRequester
383
+ viewerIsCounterparty
384
+ viewerCanDecide
385
+ }
386
+ }
387
+ ${scheduleRequestFragment}
388
+ ${scheduleOccurrenceFragment}
389
+ `;
390
+
391
+ export const scheduleTimeOffListQry = gql`
392
+ query scheduleTimeOffList($organizationId: GenericID!, $resourceIds: [GenericID!], $statuses: [ScheduleTimeOffStatus!], $mine: Boolean, $from: DateTime, $to: DateTime, $cursor: Cursor, $after: Boolean, $limit: Int) {
393
+ scheduleTimeOffList(organizationId: $organizationId, resourceIds: $resourceIds, statuses: $statuses, mine: $mine, from: $from, to: $to, cursor: $cursor, after: $after, limit: $limit) {
394
+ ...scheduleTimeOffFragment
395
+ conflictingAssignments {
396
+ ...scheduleOccurrenceFragment
397
+ }
398
+ releasedAssignmentIds
399
+ viewerIsRequester
400
+ viewerCanDecide
401
+ }
402
+ }
403
+ ${scheduleTimeOffFragment}
404
+ ${scheduleOccurrenceFragment}
405
+ `;
406
+
407
+ export const scheduleProjectsQry = gql`
408
+ query scheduleProjects($organizationId: GenericID!, $statuses: [ScheduleProjectStatus!], $includeArchived: Boolean, $search: String) {
409
+ scheduleProjects(organizationId: $organizationId, statuses: $statuses, includeArchived: $includeArchived, search: $search) {
410
+ ...scheduleProjectFragment
411
+ activityCount
412
+ unreviewedCount
413
+ viewerPermission
414
+ viewerCanEdit
415
+ viewerCanEditAccess
416
+ viewerIsManager
417
+ }
418
+ }
419
+ ${scheduleProjectFragment}
420
+ ${scheduleProjectRunFragment}
421
+ `;
422
+
423
+ export const scheduleProjectQry = gql`
424
+ query scheduleProject($projectId: GenericID!) {
425
+ scheduleProject(projectId: $projectId) {
426
+ ...scheduleProjectFragment
427
+ activityCount
428
+ unreviewedCount
429
+ viewerPermission
430
+ viewerCanEdit
431
+ viewerCanEditAccess
432
+ viewerIsManager
433
+ }
434
+ }
435
+ ${scheduleProjectFragment}
436
+ ${scheduleProjectRunFragment}
437
+ `;
438
+
439
+ export const scheduleProjectNetworkQry = gql`
440
+ query scheduleProjectNetwork($projectId: GenericID!, $filter: ScheduleNetworkFilter) {
441
+ scheduleProjectNetwork(projectId: $projectId, filter: $filter) {
442
+ project {
443
+ ...scheduleProjectFragment
444
+ activityCount
445
+ unreviewedCount
446
+ viewerPermission
447
+ viewerCanEdit
448
+ viewerCanEditAccess
449
+ viewerIsManager
450
+ }
451
+ wbsNodes {
452
+ id
453
+ projectId
454
+ parentId
455
+ code
456
+ name
457
+ path
458
+ depth
459
+ ordinal
460
+ startAt
461
+ finishAt
462
+ percentComplete
463
+ }
464
+ activities {
465
+ ...scheduleActivityFragment
466
+ }
467
+ relationships {
468
+ ...scheduleRelationshipFragment
469
+ }
470
+ assignments {
471
+ id
472
+ projectId
473
+ activityId
474
+ resourceId
475
+ plannedUnits
476
+ unitsPerDay
477
+ actualUnits
478
+ remainingUnits
479
+ }
480
+ baselineActivities {
481
+ plannedStartAt
482
+ plannedFinishAt
483
+ id
484
+ baselineId
485
+ activityId
486
+ code
487
+ name
488
+ startAt
489
+ finishAt
490
+ plannedDurationMinutes
491
+ totalFloatMinutes
492
+ plannedUnits
493
+ percentComplete
494
+ }
495
+ resources {
496
+ ...scheduleResourceFragment
497
+ viewerNotify {
498
+ channels
499
+ }
500
+ availability {
501
+ id
502
+ resourceId
503
+ startsOn
504
+ endsOn
505
+ maxUnitsPerDay
506
+ note
507
+ }
508
+ }
509
+ workCalendars {
510
+ ...scheduleWorkCalendarFragment
511
+ exceptions {
512
+ id
513
+ workCalendarId
514
+ date
515
+ ranges {
516
+ start
517
+ end
518
+ }
519
+ note
520
+ }
521
+ }
522
+ networkRevision
523
+ totalActivityCount
524
+ filtered
525
+ truncated
526
+ }
527
+ }
528
+ ${scheduleProjectFragment}
529
+ ${scheduleActivityFragment}
530
+ ${scheduleRelationshipFragment}
531
+ ${scheduleResourceFragment}
532
+ ${scheduleWorkCalendarFragment}
533
+ ${scheduleProjectRunFragment}
534
+ `;
535
+
536
+ export const scheduleProjectRunsQry = gql`
537
+ query scheduleProjectRuns($projectId: GenericID!, $cursor: Cursor, $after: Boolean, $limit: Int) {
538
+ scheduleProjectRuns(projectId: $projectId, cursor: $cursor, after: $after, limit: $limit) {
539
+ ...scheduleProjectRunFragment
540
+ }
541
+ }
542
+ ${scheduleProjectRunFragment}
543
+ `;
544
+
545
+ export const scheduleProjectRunQry = gql`
546
+ query scheduleProjectRun($projectId: GenericID!, $runId: GenericID!) {
547
+ scheduleProjectRun(projectId: $projectId, runId: $runId) {
548
+ ...scheduleProjectRunFragment
549
+ }
550
+ }
551
+ ${scheduleProjectRunFragment}
552
+ `;
553
+
554
+ export const scheduleBaselinesQry = gql`
555
+ query scheduleBaselines($projectId: GenericID!, $cursor: Cursor, $after: Boolean, $limit: Int) {
556
+ scheduleBaselines(projectId: $projectId, cursor: $cursor, after: $after, limit: $limit) {
557
+ id
558
+ projectId
559
+ name
560
+ note
561
+ dataDateAt
562
+ isCurrent
563
+ createdByAccountId
564
+ createdAt
565
+ cursor
566
+ }
567
+ }
568
+
569
+ `;
570
+
571
+ export const scheduleBaselineActivitiesQry = gql`
572
+ query scheduleBaselineActivities($projectId: GenericID!, $baselineId: GenericID!) {
573
+ scheduleBaselineActivities(projectId: $projectId, baselineId: $baselineId) {
574
+ plannedStartAt
575
+ plannedFinishAt
576
+ id
577
+ baselineId
578
+ activityId
579
+ code
580
+ name
581
+ startAt
582
+ finishAt
583
+ plannedDurationMinutes
584
+ totalFloatMinutes
585
+ plannedUnits
586
+ percentComplete
587
+ }
588
+ }
589
+
590
+ `;
591
+
592
+ export const scheduleBaselineVarianceQry = gql`
593
+ query scheduleBaselineVariance($projectId: GenericID!, $baselineId: GenericID) {
594
+ scheduleBaselineVariance(projectId: $projectId, baselineId: $baselineId) {
595
+ baseline {
596
+ id
597
+ projectId
598
+ name
599
+ note
600
+ dataDateAt
601
+ isCurrent
602
+ createdByAccountId
603
+ createdAt
604
+ cursor
605
+ }
606
+ rows {
607
+ activityId
608
+ code
609
+ baselineStartAt
610
+ baselineFinishAt
611
+ startAt
612
+ finishAt
613
+ startVarianceMinutes
614
+ finishVarianceMinutes
615
+ durationVarianceMinutes
616
+ floatVarianceMinutes
617
+ }
618
+ slippedCount
619
+ addedCount
620
+ removedCount
621
+ finishVarianceMinutes
622
+ }
623
+ }
624
+
625
+ `;
626
+
627
+ export const scheduleWorkCalendarQry = gql`
628
+ query scheduleWorkCalendar($organizationId: GenericID!, $workCalendarId: GenericID!) {
629
+ scheduleWorkCalendar(organizationId: $organizationId, workCalendarId: $workCalendarId) {
630
+ ...scheduleWorkCalendarFragment
631
+ exceptions {
632
+ id
633
+ workCalendarId
634
+ date
635
+ ranges {
636
+ start
637
+ end
638
+ }
639
+ note
640
+ }
641
+ }
642
+ }
643
+ ${scheduleWorkCalendarFragment}
644
+ `;
645
+
646
+ export const scheduleResourceQry = gql`
647
+ query scheduleResource($organizationId: GenericID!, $resourceId: GenericID!) {
648
+ scheduleResource(organizationId: $organizationId, resourceId: $resourceId) {
649
+ ...scheduleResourceFragment
650
+ viewerNotify {
651
+ channels
652
+ }
653
+ availability {
654
+ id
655
+ resourceId
656
+ startsOn
657
+ endsOn
658
+ maxUnitsPerDay
659
+ note
660
+ }
661
+ }
662
+ }
663
+ ${scheduleResourceFragment}
664
+ `;
665
+
666
+ export const scheduleSeriesQry = gql`
667
+ query scheduleSeries($organizationId: GenericID!, $seriesId: GenericID!) {
668
+ scheduleSeries(organizationId: $organizationId, seriesId: $seriesId) {
669
+ ...scheduleSeriesFragment
670
+ }
671
+ }
672
+ ${scheduleSeriesFragment}
673
+ `;
674
+
675
+ export const scheduleCalendarAccessGrantsQry = gql`
676
+ query scheduleCalendarAccessGrants($organizationId: GenericID!, $calendarId: GenericID!) {
677
+ scheduleCalendarAccessGrants(organizationId: $organizationId, calendarId: $calendarId) {
678
+ granteeType granteeId permission
679
+ }
680
+ }
681
+
682
+ `;
683
+
684
+ export const scheduleProjectAccessGrantsQry = gql`
685
+ query scheduleProjectAccessGrants($organizationId: GenericID!, $projectId: GenericID!) {
686
+ scheduleProjectAccessGrants(organizationId: $organizationId, projectId: $projectId) {
687
+ granteeType granteeId permission
688
+ }
689
+ }
690
+
691
+ `;