@jsb188/graphql 1.1.11 → 1.1.13

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 (174) hide show
  1. package/LICENSE +21 -0
  2. package/audience.d.ts +205 -0
  3. package/cache/config.ts +65 -28
  4. package/cache/index.helpers.ts +96 -0
  5. package/cache/index.ts +364 -808
  6. package/cache/mounted-queries.ts +33 -0
  7. package/cache/optimistic-ui-runtime.ts +46 -0
  8. package/cache/optimistic-ui.ts +401 -0
  9. package/cache/persist.ts +107 -22
  10. package/cache/realtime-fence.ts +47 -0
  11. package/cache/realtime-live.ts +17 -0
  12. package/cache/store.ts +22 -64
  13. package/cache/value.helpers.ts +17 -0
  14. package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
  15. package/{drafts/index.ts → client/draft-persistence.ts} +13 -39
  16. package/client/index.ts +4 -2
  17. package/client/request.helpers.ts +14 -0
  18. package/client/request.ts +122 -232
  19. package/client/storage-asset.ts +58 -0
  20. package/gql/fragments/accountAuthFragments.ts +0 -4
  21. package/gql/fragments/agentMemoryFragments.ts +5 -1
  22. package/gql/fragments/agentNoteFragments.ts +156 -0
  23. package/gql/fragments/aiChatFragments.ts +35 -11
  24. package/gql/fragments/aiChatLinkFragments.ts +8 -0
  25. package/gql/fragments/audienceFragments.ts +76 -0
  26. package/gql/fragments/dataTableFragments.ts +48 -80
  27. package/gql/fragments/emailFragments.ts +49 -21
  28. package/gql/fragments/emailOutreachFragments.ts +281 -0
  29. package/gql/fragments/fieldDocFragments.ts +222 -40
  30. package/gql/fragments/inboundContactFragments.ts +2 -0
  31. package/gql/fragments/libraryFragments.ts +120 -0
  32. package/gql/fragments/logFragments.ts +93 -2
  33. package/gql/fragments/organizationFragments.ts +12 -0
  34. package/gql/fragments/qrCodeFragments.ts +29 -0
  35. package/gql/fragments/scheduleFragments.ts +574 -145
  36. package/gql/fragments/sheetFragments.ts +86 -424
  37. package/gql/fragments/storageFragments.ts +25 -1
  38. package/gql/fragments/workWaitFragments.ts +13 -0
  39. package/gql/fragments/workflowFragments.ts +32 -4
  40. package/gql/mutations/agentMemoryMutations.ts +32 -0
  41. package/gql/mutations/agentNoteMutations.ts +64 -0
  42. package/gql/mutations/aiChatLinkMutations.ts +13 -0
  43. package/gql/mutations/aiChatMutations.ts +34 -4
  44. package/gql/mutations/audienceMutations.ts +58 -0
  45. package/gql/mutations/authMutations.ts +24 -28
  46. package/gql/mutations/billingMutations.ts +24 -0
  47. package/gql/mutations/contactMutations.ts +23 -0
  48. package/gql/mutations/dataTableMutations.ts +18 -75
  49. package/gql/mutations/emailMutations.ts +22 -0
  50. package/gql/mutations/emailOutreachMutations.ts +139 -0
  51. package/gql/mutations/fieldDocMutations.ts +162 -13
  52. package/gql/mutations/index.ts +10 -5
  53. package/gql/mutations/organizationMutations.ts +6 -0
  54. package/gql/mutations/qrCodeMutations.ts +20 -0
  55. package/gql/mutations/scheduleMutations.ts +389 -417
  56. package/gql/mutations/sheetMutations.ts +62 -118
  57. package/gql/mutations/storageMutations.ts +1 -1
  58. package/gql/mutations/workflowMutations.ts +94 -0
  59. package/gql/queries/agentMemoryQueries.ts +12 -2
  60. package/gql/queries/agentNoteQueries.ts +86 -0
  61. package/gql/queries/aiChatQueries.ts +63 -12
  62. package/gql/queries/audienceQueries.ts +104 -0
  63. package/gql/queries/authQueries.ts +20 -4
  64. package/gql/queries/billingQueries.ts +114 -9
  65. package/gql/queries/dataTableQueries.ts +43 -75
  66. package/gql/queries/emailOutreachQueries.ts +282 -0
  67. package/gql/queries/emailQueries.ts +48 -64
  68. package/gql/queries/emailReplyReportQueries.ts +127 -0
  69. package/gql/queries/fieldDocQueries.ts +128 -98
  70. package/gql/queries/inboundContactQueries.ts +15 -4
  71. package/gql/queries/index.ts +5 -3
  72. package/gql/queries/libraryQueries.ts +112 -0
  73. package/gql/queries/logQueries.ts +86 -12
  74. package/gql/queries/organizationQueries.ts +44 -12
  75. package/gql/queries/qrCodeQueries.ts +27 -0
  76. package/gql/queries/scheduleQueries.ts +401 -278
  77. package/gql/queries/sheetQueries.ts +94 -165
  78. package/gql/queries/storageQueries.ts +11 -4
  79. package/gql/queries/workflowQueries.ts +61 -12
  80. package/gql/reactivity.ts +98 -0
  81. package/gql/recordReads.ts +171 -0
  82. package/hooks/index.helpers.ts +52 -0
  83. package/hooks/index.ts +920 -715
  84. package/hooks/use-agentMemory-mtn.ts +29 -31
  85. package/hooks/use-agentMemory-qry.ts +15 -3
  86. package/hooks/use-agentNote-mtn.ts +89 -0
  87. package/hooks/use-agentNote-qry.ts +162 -0
  88. package/hooks/use-agentNote-recovery.helpers.ts +58 -0
  89. package/hooks/use-agentNote-recovery.ts +57 -0
  90. package/hooks/use-aiChat-mtn.ts +104 -115
  91. package/hooks/use-aiChat-qry.helpers.ts +124 -0
  92. package/hooks/use-aiChat-qry.ts +254 -387
  93. package/hooks/use-aiChat-stream-mtn.ts +14 -0
  94. package/hooks/use-audience-mtn.ts +170 -0
  95. package/hooks/use-audience-qry.helpers.ts +39 -0
  96. package/hooks/use-audience-qry.ts +245 -0
  97. package/hooks/use-auth-mtn.ts +30 -1
  98. package/hooks/use-billing-mtn.ts +31 -0
  99. package/hooks/use-billing-qry.ts +76 -0
  100. package/hooks/use-dataTable-mtn.ts +23 -115
  101. package/hooks/use-dataTable-qry.ts +69 -914
  102. package/hooks/use-email-mtn.ts +26 -0
  103. package/hooks/use-email-qry.helpers.ts +37 -0
  104. package/hooks/use-email-qry.ts +44 -174
  105. package/hooks/use-emailOutreach-mtn.ts +211 -0
  106. package/hooks/use-emailOutreach-qry.helpers.ts +25 -0
  107. package/hooks/use-emailOutreach-qry.ts +367 -0
  108. package/hooks/use-emailOutreachReplyReport-qry.ts +46 -0
  109. package/hooks/use-fieldDoc-mtn.ts +244 -32
  110. package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
  111. package/hooks/use-fieldDoc-qry.ts +134 -102
  112. package/hooks/use-inboundContact-qry.ts +7 -9
  113. package/hooks/use-library-qry.ts +233 -0
  114. package/hooks/use-log-mtn.ts +25 -12
  115. package/hooks/use-log-qry.ts +99 -46
  116. package/hooks/use-organization-qry.ts +16 -60
  117. package/hooks/use-qrCode-mtn.ts +40 -0
  118. package/hooks/use-qrCode-qry.ts +78 -0
  119. package/hooks/use-schedule-mtn.ts +231 -348
  120. package/hooks/use-schedule-qry.ts +208 -139
  121. package/hooks/use-schedule-reactive.ts +218 -0
  122. package/hooks/use-sheet-mtn.ts +91 -199
  123. package/hooks/use-sheet-qry.ts +88 -237
  124. package/hooks/use-storage-qry.ts +84 -61
  125. package/hooks/use-workflow-mtn.ts +84 -23
  126. package/hooks/use-workflow-qry.ts +60 -61
  127. package/libs/ai-chat-link-events.ts +78 -0
  128. package/libs/ai-chat-outgoing.helpers.ts +153 -0
  129. package/libs/ai-chat-outgoing.ts +11 -0
  130. package/libs/ai-chat-outgoing.types.ts +25 -0
  131. package/libs/ai-chat-run-realtime.ts +20 -0
  132. package/libs/ai-chat-submission-realtime.ts +150 -0
  133. package/libs/data-changes.helpers.ts +161 -0
  134. package/libs/data-changes.ts +382 -0
  135. package/libs/fragment-realtime-sequence.ts +55 -0
  136. package/libs/open-sheet.ts +138 -0
  137. package/libs/record-read.ts +327 -0
  138. package/libs/sheet-command-batch.ts +45 -0
  139. package/libs/sheet-realtime-packet.ts +53 -0
  140. package/libs/sheet-view-realtime-router.ts +99 -0
  141. package/loaders/emailPreference.ts +69 -0
  142. package/loaders/rest.ts +12 -0
  143. package/package.json +77 -25
  144. package/schedule.d.ts +1183 -0
  145. package/sse.helpers.ts +19 -0
  146. package/sse.ts +26 -115
  147. package/types.d.ts +48 -25
  148. package/cache/index.test.ts +0 -881
  149. package/client/data-table-realtime-subscriptions.test.ts +0 -740
  150. package/client/data-table-realtime-subscriptions.ts +0 -955
  151. package/client/data-table-realtime.test.ts +0 -792
  152. package/client/data-table-realtime.ts +0 -1218
  153. package/client/fragment-realtime-sequence.ts +0 -52
  154. package/client/open-sheet.ts +0 -137
  155. package/client/request-managed-session.test.ts +0 -574
  156. package/client/request-no-store.test.ts +0 -157
  157. package/client/sse-ticket.test.ts +0 -26
  158. package/deno.lock +0 -170
  159. package/deno.test.json +0 -10
  160. package/gql/fragments/agentDocFragments.ts +0 -46
  161. package/gql/fragments/billingFragments.ts +0 -14
  162. package/gql/fragments/campaignFragments.ts +0 -277
  163. package/gql/mutations/agentDocMutations.ts +0 -177
  164. package/gql/mutations/campaignMutations.ts +0 -215
  165. package/gql/queries/agentDocQueries.ts +0 -120
  166. package/gql/queries/appQueries.ts +0 -14
  167. package/gql/queries/campaignQueries.ts +0 -127
  168. package/hooks/use-agentDoc-mtn.ts +0 -285
  169. package/hooks/use-agentDoc-qry.ts +0 -208
  170. package/hooks/use-app-qry.ts +0 -22
  171. package/hooks/use-campaign-mtn.ts +0 -377
  172. package/hooks/use-campaign-qry.ts +0 -257
  173. package/loaders/campaign.ts +0 -137
  174. package/tsconfig.json +0 -13
@@ -1,155 +1,584 @@
1
- // NOTE: Each selection set must stay exactly aligned with the server's
2
- // realtime emit for the same table (mapDataToGraphQLFragment in
3
- // server/src/utils/graphql-data.ts: 'schedule_calendars', 'schedule_resources',
4
- // 'schedule_series', 'schedule_occurrences', 'schedule_requests') so
5
- // useReactiveFragment merges a patch cleanly instead of blanking fields.
6
- //
7
- // Per-viewer facts are never emitted over WS — the organization room is not an
8
- // authorization cohort — so viewerPermission and viewerCanEditAccess are
9
- // selected by the calendar QUERY, not by this fragment.
1
+ // One fragment per schedule row type; every query and mutation selects a row
2
+ // through its fragment. Shared row selections exclude viewer permissions and
3
+ // private notification preferences.
4
+ // Keep server realtime projections (SCHEDULE_PROJECTIONS in
5
+ // server/src/utils/graphql-data.helpers.ts) aligned with these fields.
6
+ // Value types without an id (eligibility, usage days, variance rows, windows
7
+ // and payloads) stay inline: the cache keys a fragment by its id.
10
8
 
11
9
  export const scheduleCalendarFragment = `fragment scheduleCalendarFragment on ScheduleCalendar {
12
- id
13
- organizationId
10
+ revision
11
+ id
12
+ organizationId
13
+ name
14
+ description
15
+ timeZone
16
+ siteId
17
+ workCalendarId
18
+ color
19
+ settings {
20
+ cycle {
21
+ enabled
22
+ weeks
23
+ prepareDaysBefore
24
+ prepareAtHour
25
+ }
26
+ instructions {
27
+ key
28
+ text
29
+ }
30
+ requestPolicy {
31
+ autoApproveClaims
32
+ autoApproveDrops
33
+ autoApproveCallOuts
34
+ autoApproveSwaps
35
+ minNoticeHours
36
+ requestExpiryHours
37
+ }
38
+ offerDefaults {
39
+ waveSize
40
+ responseWindowMinutes
41
+ autoApprove
42
+ autoOfferOnOpen
43
+ quietHours {
44
+ start
45
+ end
46
+ }
47
+ }
48
+ decisionMakers
49
+ staffVisibility
50
+ notify {
51
+ defaultChannels
52
+ }
53
+ }
54
+ preparedThrough
55
+ ordinal
56
+ access {
57
+ team public network
58
+ }
59
+ version
60
+ deletedAt
61
+ createdAt
62
+ updatedAt
63
+ }`;
14
64
 
15
- kind
16
- name
17
- description
18
- timeZone
19
- siteId
20
- color
21
- ordinal
65
+ export const scheduleWorkCalendarExceptionFragment = `fragment scheduleWorkCalendarExceptionFragment on ScheduleWorkCalendarException {
66
+ id
67
+ workCalendarId
68
+ date
69
+ ranges {
70
+ start
71
+ end
72
+ }
73
+ note
74
+ }`;
22
75
 
23
- access {
24
- team
25
- public
26
- network
27
- }
76
+ export const scheduleWorkCalendarFragment = `fragment scheduleWorkCalendarFragment on ScheduleWorkCalendar {
77
+ id
78
+ organizationId
79
+ key
80
+ name
81
+ description
82
+ timeZone
83
+ weekHours {
84
+ days {
85
+ weekday
86
+ ranges {
87
+ start
88
+ end
89
+ }
90
+ }
91
+ }
92
+ minutesPerDay
93
+ isDefault
94
+ version
95
+ createdAt
96
+ updatedAt
97
+ }`;
28
98
 
29
- deletedAt
30
- createdAt
31
- updatedAt
99
+ export const scheduleResourceCapacityFragment = `fragment scheduleResourceCapacityFragment on ScheduleResourceCapacity {
100
+ id
101
+ resourceId
102
+ startsOn
103
+ endsOn
104
+ maxUnitsPerDay
105
+ note
32
106
  }`;
33
107
 
34
108
  export const scheduleResourceFragment = `fragment scheduleResourceFragment on ScheduleResource {
35
- id
36
- organizationId
37
- siteId
38
-
39
- kind
40
- key
41
- name
42
- capacity
43
- config
44
- ordinal
45
-
46
- retiredAt
47
- createdAt
48
- updatedAt
49
- }`;
50
-
51
- export const scheduleSeriesFragment = `fragment scheduleSeriesFragment on ScheduleSeries {
52
- id
53
- organizationId
54
- calendarId
55
- resourceId
56
-
57
- kind
58
- title
59
- note
60
- location
61
- recurrence
62
- timeZone
63
- startsAt
64
- endsAt
65
- durationMinutes
66
- allDay
67
- slotTemplate
68
- active
69
-
70
- createdAt
71
- updatedAt
72
- }`;
73
-
74
- // "slots" and "assignments" are emitted only when the server attached them, so
75
- // a fragment patch can never blank a hydrated list with an empty one.
76
- export const scheduleOccurrenceFragment = `fragment scheduleOccurrenceFragment on ScheduleOccurrence {
77
- id
78
- organizationId
79
- calendarId
80
- seriesId
81
- resourceId
82
- siteId
83
-
84
- kind
85
- title
86
- note
87
- location
88
- startAt
89
- endAt
90
- timeZone
91
- allDay
92
- status
93
- detached
94
- version
95
-
96
- slots {
97
- id
98
- occurrenceId
99
- key
100
- label
101
- requiredCount
102
- predicate
103
- ordinal
104
- }
105
-
106
- assignments {
107
- id
108
- organizationId
109
- occurrenceId
110
- slotId
111
- actorType
112
- actorAccountId
113
- actorOrganizationId
114
- actorContactId
115
- status
116
- startAt
117
- endAt
118
- assignedByAccountId
119
- releasedAt
120
- }
121
-
122
- publishedAt
123
- canceledAt
124
- deletedAt
125
- createdAt
126
- updatedAt
127
- }`;
128
-
129
- // The open-shift board and the approval queue both race on this row, so it is
130
- // a fragment rather than an inline selection: a claim has to patch every
131
- // mounted board in place the instant it lands.
109
+ id
110
+ organizationId
111
+ siteId
112
+ accountId
113
+ workCalendarId
114
+ kind
115
+ key
116
+ name
117
+ maxUnitsPerDay
118
+ capacity
119
+ unitOfMeasure
120
+ canLevel
121
+ config {
122
+ qualifications {
123
+ key
124
+ expiresAt
125
+ }
126
+ tags
127
+ preferences {
128
+ targetWeeklyMinutes
129
+ }
130
+ }
131
+ ordinal
132
+ retiredAt
133
+ version
134
+ createdAt
135
+ updatedAt
136
+ }`;
137
+
138
+ export const scheduleRoleFragment = `fragment scheduleRoleFragment on ScheduleRole {
139
+ id
140
+ organizationId
141
+ key
142
+ name
143
+ color
144
+ requiredQualifications
145
+ ordinal
146
+ archivedAt
147
+ createdAt
148
+ updatedAt
149
+ }`;
150
+
151
+ export const scheduleShiftFragment = `fragment scheduleShiftFragment on ScheduleShift {
152
+ id
153
+ organizationId
154
+ calendarId
155
+ shiftDate
156
+ startAt
157
+ endAt
158
+ roleId
159
+ locationResourceId
160
+ assigneeResourceId
161
+ unpaidBreakMinutes
162
+ label
163
+ note
164
+ status
165
+ createdVia
166
+ templateItemId
167
+ copiedFromShiftId
168
+ version
169
+ publishedAt
170
+ canceledAt
171
+ createdAt
172
+ updatedAt
173
+ }`;
174
+
175
+ export const scheduleShiftChangeFragment = `fragment scheduleShiftChangeFragment on ScheduleShiftChange {
176
+ id
177
+ shiftId
178
+ kind
179
+ via
180
+ fromResourceId
181
+ toResourceId
182
+ previousValues {
183
+ startAt
184
+ endAt
185
+ shiftDate
186
+ roleId
187
+ locationResourceId
188
+ unpaidBreakMinutes
189
+ label
190
+ note
191
+ }
192
+ nextValues {
193
+ startAt
194
+ endAt
195
+ shiftDate
196
+ roleId
197
+ locationResourceId
198
+ unpaidBreakMinutes
199
+ label
200
+ note
201
+ }
202
+ requestId
203
+ actorAccountId
204
+ createdAt
205
+ }`;
206
+
132
207
  export const scheduleRequestFragment = `fragment scheduleRequestFragment on ScheduleRequest {
133
- id
134
- organizationId
135
- calendarId
136
-
137
- kind
138
- status
139
- requesterAccountId
140
- sourceAssignmentId
141
- targetAssignmentId
142
- targetOccurrenceId
143
- claimedByAccountId
144
- startAt
145
- endAt
146
- reason
147
- autoApproved
148
- decidedByAccountId
149
- decidedAt
150
- decisionNote
151
- expiresAt
152
-
153
- createdAt
154
- updatedAt
208
+ id
209
+ organizationId
210
+ calendarId
211
+ kind
212
+ status
213
+ requesterResourceId
214
+ requesterAccountId
215
+ shiftId
216
+ targetShiftId
217
+ counterpartyResourceId
218
+ proposedStartAt
219
+ proposedEndAt
220
+ subjectStartAt
221
+ via
222
+ reason
223
+ counterpartyRespondedAt
224
+ autoApproved
225
+ deciderAccountId
226
+ decidedAt
227
+ decisionNote
228
+ expiresAt
229
+ closedAt
230
+ version
231
+ createdAt
232
+ updatedAt
233
+ cursor
234
+ }`;
235
+
236
+ export const scheduleTimeOffFragment = `fragment scheduleTimeOffFragment on ScheduleTimeOff {
237
+ id
238
+ organizationId
239
+ resourceId
240
+ accountId
241
+ requesterAccountId
242
+ startAt
243
+ endAt
244
+ allDay
245
+ timeZone
246
+ status
247
+ reason
248
+ deciderAccountId
249
+ decidedAt
250
+ decisionNote
251
+ version
252
+ createdAt
253
+ updatedAt
254
+ cursor
255
+ }`;
256
+
257
+ export const scheduleTaskFragment = `fragment scheduleTaskFragment on ScheduleTask {
258
+ id
259
+ organizationId
260
+ calendarId
261
+ projectId
262
+ activityId
263
+ shiftId
264
+ title
265
+ note
266
+ assigneeResourceId
267
+ dueAt
268
+ dueAllDay
269
+ timeZone
270
+ status
271
+ priority
272
+ completedAt
273
+ completedByAccountId
274
+ createdVia
275
+ ordinal
276
+ version
277
+ createdByAccountId
278
+ createdAt
279
+ updatedAt
280
+ }`;
281
+
282
+ export const scheduleViolationFragment = `fragment scheduleViolationFragment on ScheduleViolation {
283
+ id
284
+ calendarId
285
+ ruleId
286
+ shiftId
287
+ resourceId
288
+ kind
289
+ code
290
+ severity
291
+ violationKey
292
+ identityKey
293
+ startAt
294
+ endAt
295
+ degree
296
+ message
297
+ detail
298
+ evaluatedAt
299
+ }`;
300
+
301
+ export const schedulePublicationFragment = `fragment schedulePublicationFragment on SchedulePublication {
302
+ id
303
+ calendarId
304
+ windowStart
305
+ windowEnd
306
+ shiftCount
307
+ acknowledgedWarningCount
308
+ acknowledgedViolationKeys
309
+ publishedByAccountId
310
+ publishedAt
311
+ notificationId
312
+ cursor
313
+ }`;
314
+
315
+ export const scheduleProjectFragment = `fragment scheduleProjectFragment on ScheduleProject {
316
+ id
317
+ organizationId
318
+ siteId
319
+ workCalendarId
320
+ currentBaselineId
321
+ code
322
+ name
323
+ description
324
+ status
325
+ timeZone
326
+ plannedStartAt
327
+ mustFinishByAt
328
+ dataDateAt
329
+ schedulingOptions {
330
+ autoSchedule
331
+ progressLogic
332
+ lagCalendar
333
+ criticalityMode
334
+ criticalFloatThresholdMinutes
335
+ leveling {
336
+ enabled
337
+ priorityRule
338
+ levelWithinFloat
339
+ maxOverallocationPercent
340
+ considerOtherProjects
341
+ horizonDays
342
+ }
343
+ }
344
+ scheduledFinishAt
345
+ lastScheduledAt
346
+ networkRevision
347
+ scheduledRevision
348
+ needsReschedule
349
+ runSequence
350
+ latestRun {
351
+ ...scheduleProjectRunFragment
352
+ }
353
+ access {
354
+ team public network
355
+ }
356
+ source {
357
+ kind
358
+ documentId
359
+ reference
360
+ quote
361
+ confidence
362
+ reviewStatus
363
+ reviewedByAccountId
364
+ reviewedAt
365
+ }
366
+ version
367
+ revision
368
+ deletedAt
369
+ createdAt
370
+ updatedAt
371
+ }`;
372
+
373
+ export const scheduleWbsNodeFragment = `fragment scheduleWbsNodeFragment on ScheduleWbsNode {
374
+ id
375
+ projectId
376
+ parentId
377
+ code
378
+ name
379
+ path
380
+ depth
381
+ ordinal
382
+ startAt
383
+ finishAt
384
+ percentComplete
385
+ }`;
386
+
387
+ export const scheduleActivityFragment = `fragment scheduleActivityFragment on ScheduleActivity {
388
+ id
389
+ organizationId
390
+ projectId
391
+ wbsId
392
+ workCalendarId
393
+ code
394
+ name
395
+ description
396
+ type
397
+ status
398
+ plannedDurationMinutes
399
+ remainingDurationMinutes
400
+ percentComplete
401
+ primaryConstraintType
402
+ primaryConstraintAt
403
+ secondaryConstraintType
404
+ secondaryConstraintAt
405
+ actualStartAt
406
+ actualFinishAt
407
+ earlyStartAt
408
+ earlyFinishAt
409
+ lateStartAt
410
+ lateFinishAt
411
+ startAt
412
+ finishAt
413
+ totalFloatMinutes
414
+ freeFloatMinutes
415
+ isCritical
416
+ levelingPriority
417
+ levelingDelayMinutes
418
+ levelingConstrainedByResourceId
419
+ codes {
420
+ typeKey
421
+ valueKey
422
+ }
423
+ source {
424
+ kind
425
+ documentId
426
+ reference
427
+ quote
428
+ confidence
429
+ reviewStatus
430
+ reviewedByAccountId
431
+ reviewedAt
432
+ }
433
+ ordinal
434
+ version
435
+ createdAt
436
+ updatedAt
437
+ }`;
438
+
439
+ export const scheduleRelationshipFragment = `fragment scheduleRelationshipFragment on ScheduleRelationship {
440
+ id
441
+ projectId
442
+ predecessorId
443
+ successorId
444
+ type
445
+ lagMinutes
446
+ isDriving
447
+ createdAt
448
+ updatedAt
449
+ }`;
450
+
451
+ export const scheduleActivityAssignmentFragment = `fragment scheduleActivityAssignmentFragment on ScheduleActivityAssignment {
452
+ id
453
+ projectId
454
+ activityId
455
+ resourceId
456
+ plannedUnits
457
+ unitsPerDay
458
+ actualUnits
459
+ remainingUnits
460
+ }`;
461
+
462
+ export const scheduleProjectRunFragment = `fragment scheduleProjectRunFragment on ScheduleProjectRun {
463
+ organizationId
464
+ revision
465
+ scheduledFinishAt
466
+ createdAt
467
+ id
468
+ projectId
469
+ sequence
470
+ kind
471
+ trigger
472
+ status
473
+ options {
474
+ autoSchedule
475
+ progressLogic
476
+ lagCalendar
477
+ criticalityMode
478
+ criticalFloatThresholdMinutes
479
+ leveling {
480
+ enabled
481
+ priorityRule
482
+ levelWithinFloat
483
+ maxOverallocationPercent
484
+ considerOtherProjects
485
+ horizonDays
486
+ }
487
+ }
488
+ networkRevision
489
+ dataDateAt
490
+ progress {
491
+ stage
492
+ percent
493
+ message
494
+ updatedAt
495
+ }
496
+ stats {
497
+ activityCount
498
+ relationshipCount
499
+ criticalCount
500
+ openStartCount
501
+ openFinishCount
502
+ negativeFloatCount
503
+ constraintOverrideCount
504
+ cycleCount
505
+ longestPathCount
506
+ scheduledFinishAt
507
+ earlyFinishAt
508
+ leveled
509
+ leveledCount
510
+ totalLevelingDelayMinutes
511
+ finishDelayMinutes
512
+ overallocatedResourceDayCount
513
+ levelingExceededFloatCount
514
+ levelingExceededHorizonCount
515
+ diagnosticsTruncated
516
+ diagnosticCounts
517
+ }
518
+ diagnostics {
519
+ code
520
+ severity
521
+ message
522
+ activityId
523
+ relatedActivityId
524
+ activityIds
525
+ resourceId
526
+ calendarId
527
+ fromDate
528
+ toDate
529
+ demandUnits
530
+ availableUnits
531
+ minutes
532
+ }
533
+ triggeredByAccountId
534
+ cancelRequestedAt
535
+ queuedAt
536
+ startedAt
537
+ finishedAt
538
+ lastError
539
+ version
540
+ updatedAt
541
+ cursor
542
+ }`;
543
+
544
+ export const scheduleBaselineFragment = `fragment scheduleBaselineFragment on ScheduleBaseline {
545
+ id
546
+ projectId
547
+ name
548
+ note
549
+ dataDateAt
550
+ isCurrent
551
+ createdByAccountId
552
+ createdAt
553
+ cursor
554
+ }`;
555
+
556
+ export const scheduleBaselineActivityFragment = `fragment scheduleBaselineActivityFragment on ScheduleBaselineActivity {
557
+ plannedStartAt
558
+ plannedFinishAt
559
+ id
560
+ baselineId
561
+ activityId
562
+ code
563
+ name
564
+ startAt
565
+ finishAt
566
+ plannedDurationMinutes
567
+ totalFloatMinutes
568
+ plannedUnits
569
+ percentComplete
570
+ }`;
571
+
572
+ export const scheduleCodeTypeFragment = `fragment scheduleCodeTypeFragment on ScheduleCodeType {
573
+ id
574
+ organizationId
575
+ projectId
576
+ key
577
+ name
578
+ values {
579
+ key
580
+ label
581
+ color
582
+ }
583
+ ordinal
155
584
  }`;