@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
package/schedule.d.ts ADDED
@@ -0,0 +1,1183 @@
1
+ // Typed schedule API values. IDs are transport IDs; dates are ISO strings;
2
+ // calendar-local dates (shiftDate, fromDate, toDate, preparedThrough) are
3
+ // 'YYYY-MM-DD' keys. Enums come from the engine, which also builds the SDL
4
+ // enums from the same constants.
5
+ import type {
6
+ ScheduleActivityStatusEnum,
7
+ ScheduleActivityTypeEnum,
8
+ ScheduleConstraintTypeEnum,
9
+ ScheduleCriticalityModeEnum,
10
+ ScheduleDiagnosticSeverityEnum,
11
+ ScheduleLagCalendarEnum,
12
+ ScheduleLevelingPriorityRuleEnum,
13
+ ScheduleNotifyChannelEnum,
14
+ ScheduleProgressLogicEnum,
15
+ ScheduleProjectRunKindEnum,
16
+ ScheduleProjectRunStatusEnum,
17
+ ScheduleProjectRunTriggerEnum,
18
+ ScheduleProjectStatusEnum,
19
+ ScheduleRelationshipTypeEnum,
20
+ ScheduleResourceKindEnum,
21
+ ScheduleRuleKindEnum,
22
+ ScheduleRuleSeverityEnum,
23
+ ScheduleShiftCreatedViaEnum,
24
+ ScheduleShiftStatusEnum,
25
+ ScheduleSourceKindEnum,
26
+ ScheduleSourceReviewStatusEnum,
27
+ ScheduleStaffVisibilityEnum,
28
+ ScheduleTaskCreatedViaEnum,
29
+ ScheduleTaskStatusEnum,
30
+ ScheduleTimeOffStatusEnum,
31
+ } from '@jsb188/schedule/types/schedule.d.ts';
32
+
33
+ export type ScheduleResourceKind = ScheduleResourceKindEnum;
34
+ export type ScheduleShiftStatus = ScheduleShiftStatusEnum;
35
+ export type ScheduleShiftCreatedVia = ScheduleShiftCreatedViaEnum;
36
+ export type ScheduleRuleKind = ScheduleRuleKindEnum;
37
+ export type ScheduleRuleSeverity = ScheduleRuleSeverityEnum;
38
+ export type ScheduleNotifyChannel = ScheduleNotifyChannelEnum;
39
+ export type ScheduleStaffVisibility = ScheduleStaffVisibilityEnum;
40
+ export type ScheduleTimeOffStatus = ScheduleTimeOffStatusEnum;
41
+ export type ScheduleTaskStatus = ScheduleTaskStatusEnum;
42
+ export type ScheduleTaskCreatedVia = ScheduleTaskCreatedViaEnum;
43
+ export type ScheduleProjectStatus = ScheduleProjectStatusEnum;
44
+ export type ScheduleActivityType = ScheduleActivityTypeEnum;
45
+ export type ScheduleActivityStatus = ScheduleActivityStatusEnum;
46
+ export type ScheduleRelationshipType = ScheduleRelationshipTypeEnum;
47
+ export type ScheduleConstraintType = ScheduleConstraintTypeEnum;
48
+ export type ScheduleProgressLogic = ScheduleProgressLogicEnum;
49
+ export type ScheduleLagCalendar = ScheduleLagCalendarEnum;
50
+ export type ScheduleCriticalityMode = ScheduleCriticalityModeEnum;
51
+ export type ScheduleLevelingPriorityRule = ScheduleLevelingPriorityRuleEnum;
52
+ export type ScheduleProjectRunKind = ScheduleProjectRunKindEnum;
53
+ export type ScheduleProjectRunStatus = ScheduleProjectRunStatusEnum;
54
+ export type ScheduleProjectRunTrigger = ScheduleProjectRunTriggerEnum;
55
+ export type ScheduleDiagnosticSeverity = ScheduleDiagnosticSeverityEnum;
56
+ export type ScheduleSourceKind = ScheduleSourceKindEnum;
57
+ export type ScheduleSourceReviewStatus = ScheduleSourceReviewStatusEnum;
58
+
59
+ // The SDL spells these two out; the engine has no constant for them
60
+ export type ScheduleImportMode = 'MERGE' | 'REPLACE';
61
+ export type ScheduleImportErrorCode =
62
+ | 'DUPLICATE_CODE'
63
+ | 'UNKNOWN_WBS'
64
+ | 'UNKNOWN_ACTIVITY'
65
+ | 'UNKNOWN_RESOURCE'
66
+ | 'UNKNOWN_WORK_CALENDAR'
67
+ | 'SELF_LINK'
68
+ | 'DUPLICATE_LINK'
69
+ | 'CYCLE'
70
+ | 'INVALID_FIELD'
71
+ | 'PROTECTED_ACTUALS'
72
+ | 'WBS_CYCLE';
73
+
74
+ export type ScheduleDocPermission = 'NONE' | 'VIEW' | 'EDIT';
75
+ export interface ScheduleDocAccessGQL {
76
+ team?: ScheduleDocPermission | null;
77
+ public?: ScheduleDocPermission | null;
78
+ network?: ScheduleDocPermission | null;
79
+ }
80
+ export interface ScheduleDocAccessGrantGQL {
81
+ granteeType: string;
82
+ granteeId: string;
83
+ permission: ScheduleDocPermission;
84
+ }
85
+
86
+ /**
87
+ * Work calendars
88
+ */
89
+
90
+ export interface ScheduleTimeRangeGQL {
91
+ start: string;
92
+ end: string;
93
+ }
94
+ export interface ScheduleTimeRangeInput {
95
+ start: string;
96
+ end: string;
97
+ }
98
+ export interface ScheduleDayHoursGQL {
99
+ weekday: number;
100
+ ranges: Array<ScheduleTimeRangeGQL>;
101
+ }
102
+ export interface ScheduleDayHoursInput {
103
+ weekday: number;
104
+ ranges: Array<ScheduleTimeRangeInput>;
105
+ }
106
+ export interface ScheduleWeekHoursGQL {
107
+ days: Array<ScheduleDayHoursGQL>;
108
+ }
109
+ export interface ScheduleWeekHoursInput {
110
+ days: Array<ScheduleDayHoursInput>;
111
+ }
112
+ export interface ScheduleWorkCalendarExceptionGQL {
113
+ id: string;
114
+ workCalendarId: string;
115
+ date: string;
116
+ ranges: Array<ScheduleTimeRangeGQL>;
117
+ note: string | null;
118
+ }
119
+ export interface ScheduleWorkCalendarGQL {
120
+ id: string;
121
+ organizationId: string;
122
+ key: string | null;
123
+ name: string;
124
+ description: string | null;
125
+ timeZone: string;
126
+ weekHours: ScheduleWeekHoursGQL;
127
+ minutesPerDay: number;
128
+ isDefault: boolean;
129
+ exceptions: Array<ScheduleWorkCalendarExceptionGQL>;
130
+ version: string;
131
+ createdAt: string;
132
+ updatedAt: string;
133
+ }
134
+ export interface CreateScheduleWorkCalendarInput {
135
+ organizationId: string;
136
+ name: string;
137
+ key?: string | null;
138
+ description?: string | null;
139
+ timeZone?: string | null;
140
+ weekHours: ScheduleWeekHoursInput;
141
+ minutesPerDay?: number | null;
142
+ isDefault?: boolean | null;
143
+ }
144
+ export interface UpdateScheduleWorkCalendarInput {
145
+ organizationId: string;
146
+ workCalendarId: string;
147
+ expectedVersion?: string | null;
148
+ name?: string | null;
149
+ description?: string | null;
150
+ timeZone?: string | null;
151
+ weekHours?: ScheduleWeekHoursInput | null;
152
+ minutesPerDay?: number | null;
153
+ isDefault?: boolean | null;
154
+ }
155
+ export interface DeleteScheduleWorkCalendarInput {
156
+ organizationId: string;
157
+ workCalendarId: string;
158
+ }
159
+ export interface SetScheduleWorkCalendarExceptionInput {
160
+ organizationId: string;
161
+ workCalendarId: string;
162
+ date: string;
163
+ ranges?: Array<ScheduleTimeRangeInput> | null;
164
+ note?: string | null;
165
+ }
166
+
167
+ /**
168
+ * Resources (PERSON = a team member with an account; LABOR, EQUIPMENT,
169
+ * MATERIAL and SPACE carry no account) and their dated leveling capacity
170
+ */
171
+
172
+ export interface ScheduleQualificationGQL {
173
+ key: string;
174
+ expiresAt: string | null;
175
+ }
176
+ export interface ScheduleQualificationInput {
177
+ key: string;
178
+ expiresAt?: string | null;
179
+ }
180
+ export interface ScheduleNotifyPrefsGQL {
181
+ channels: Array<ScheduleNotifyChannel>; // SMS only while the person agrees to shift texts
182
+ inherited: boolean; // no choice of their own: each location's default channels apply (these are the usual default)
183
+ }
184
+ export interface ScheduleNotifyPrefsInput {
185
+ channels: Array<ScheduleNotifyChannel>;
186
+ }
187
+ export interface ScheduleResourcePreferencesGQL {
188
+ targetWeeklyMinutes: number | null;
189
+ }
190
+ export interface ScheduleResourcePreferencesInput {
191
+ targetWeeklyMinutes?: number | null;
192
+ }
193
+ export interface ScheduleResourceConfigGQL {
194
+ qualifications: Array<ScheduleQualificationGQL>;
195
+ tags: Array<string>;
196
+ preferences: ScheduleResourcePreferencesGQL;
197
+ }
198
+ export interface ScheduleResourceConfigInput {
199
+ qualifications?: Array<ScheduleQualificationInput> | null;
200
+ tags?: Array<string> | null;
201
+ preferences?: ScheduleResourcePreferencesInput | null;
202
+ }
203
+ export interface ScheduleResourceCapacityGQL {
204
+ id: string;
205
+ resourceId: string;
206
+ startsOn: string;
207
+ endsOn: string | null;
208
+ maxUnitsPerDay: number;
209
+ note: string | null;
210
+ }
211
+ export interface ScheduleResourceGQL {
212
+ id: string;
213
+ organizationId: string;
214
+ siteId: string | null;
215
+ accountId: string | null;
216
+ workCalendarId: string | null;
217
+ kind: ScheduleResourceKind;
218
+ key: string;
219
+ name: string;
220
+ maxUnitsPerDay: number | null;
221
+ capacity: number | null; // SPACE headcount
222
+ unitOfMeasure: string | null;
223
+ canLevel: boolean;
224
+ config: ScheduleResourceConfigGQL | null; // managers (org schedule_edit) only
225
+ ordinal: number;
226
+ viewerNotify: ScheduleNotifyPrefsGQL | null;
227
+ capacityPeriods: Array<ScheduleResourceCapacityGQL>;
228
+ retiredAt: string | null;
229
+ version: string;
230
+ createdAt: string;
231
+ updatedAt: string;
232
+ }
233
+ export interface CreateScheduleResourceInput {
234
+ organizationId: string;
235
+ kind: ScheduleResourceKind;
236
+ key: string;
237
+ name: string;
238
+ siteId?: string | null;
239
+ accountId?: string | null; // required for PERSON, refused otherwise
240
+ workCalendarId?: string | null;
241
+ maxUnitsPerDay?: number | null;
242
+ capacity?: number | null;
243
+ unitOfMeasure?: string | null;
244
+ canLevel?: boolean | null;
245
+ config?: ScheduleResourceConfigInput | null;
246
+ ordinal?: number | null;
247
+ }
248
+ export interface UpdateScheduleResourceInput {
249
+ organizationId: string;
250
+ resourceId: string;
251
+ expectedVersion?: string | null;
252
+ name?: string | null;
253
+ siteId?: string | null;
254
+ workCalendarId?: string | null;
255
+ maxUnitsPerDay?: number | null;
256
+ capacity?: number | null;
257
+ unitOfMeasure?: string | null;
258
+ canLevel?: boolean | null;
259
+ config?: ScheduleResourceConfigInput | null;
260
+ ordinal?: number | null;
261
+ retired?: boolean | null;
262
+ }
263
+ export interface CreateScheduleResourceCapacityInput {
264
+ organizationId: string;
265
+ resourceId: string;
266
+ startsOn: string;
267
+ endsOn?: string | null;
268
+ maxUnitsPerDay: number;
269
+ note?: string | null;
270
+ }
271
+ export interface DeleteScheduleResourceCapacityInput {
272
+ organizationId: string;
273
+ resourceId: string;
274
+ capacityId: string;
275
+ }
276
+ export interface UpdateMyScheduleNotifyPrefsInput {
277
+ organizationId: string;
278
+ notify: ScheduleNotifyPrefsInput;
279
+ smsOptIn?: boolean | null; // the person turned SMS on in this save: their agreement to shift texts
280
+ }
281
+
282
+ /**
283
+ * Roles
284
+ */
285
+
286
+ export interface ScheduleRoleGQL {
287
+ id: string;
288
+ organizationId: string;
289
+ key: string;
290
+ name: string;
291
+ color: string | null;
292
+ requiredQualifications: Array<string>;
293
+ ordinal: number;
294
+ archivedAt: string | null; // archived roles stay on existing shifts
295
+ createdAt: string;
296
+ updatedAt: string;
297
+ }
298
+
299
+ /**
300
+ * Provenance
301
+ */
302
+
303
+ export interface ScheduleSourceGQL {
304
+ kind: ScheduleSourceKind;
305
+ documentId: string | null;
306
+ reference: string | null;
307
+ quote: string | null;
308
+ confidence: number | null;
309
+ reviewStatus: ScheduleSourceReviewStatus | null;
310
+ reviewedByAccountId: string | null;
311
+ reviewedAt: string | null;
312
+ }
313
+ export interface ScheduleSourceInput {
314
+ kind: ScheduleSourceKind;
315
+ documentId?: string | null;
316
+ reference?: string | null;
317
+ quote?: string | null;
318
+ confidence?: number | null;
319
+ }
320
+
321
+ /**
322
+ * Calendars (one location)
323
+ */
324
+
325
+ export interface ScheduleCycleSettingsGQL {
326
+ enabled: boolean;
327
+ weeks: number;
328
+ prepareDaysBefore: number;
329
+ prepareAtHour: number;
330
+ }
331
+ export interface ScheduleInstructionGQL {
332
+ key: string;
333
+ text: string;
334
+ }
335
+ export interface ScheduleRequestPolicyGQL {
336
+ autoApproveClaims: boolean;
337
+ autoApproveDrops: boolean;
338
+ autoApproveCallOuts: boolean;
339
+ autoApproveSwaps: boolean;
340
+ minNoticeHours: number;
341
+ requestExpiryHours: number;
342
+ }
343
+ export interface ScheduleQuietHoursGQL {
344
+ start: string;
345
+ end: string;
346
+ }
347
+ export interface ScheduleOfferDefaultsGQL {
348
+ waveSize: number;
349
+ responseWindowMinutes: number;
350
+ autoApprove: boolean;
351
+ autoOfferOnOpen: boolean;
352
+ quietHours: ScheduleQuietHoursGQL | null;
353
+ }
354
+ export interface ScheduleCalendarNotifyGQL {
355
+ defaultChannels: Array<ScheduleNotifyChannel>;
356
+ }
357
+ export interface ScheduleCalendarSettingsGQL {
358
+ cycle: ScheduleCycleSettingsGQL;
359
+ instructions: Array<ScheduleInstructionGQL> | null; // the calendar's managers only; null for anyone else
360
+ requestPolicy: ScheduleRequestPolicyGQL;
361
+ offerDefaults: ScheduleOfferDefaultsGQL;
362
+ decisionMakers: Array<string> | null; // account ids, [] = the calendar's managers; null for anyone but a manager
363
+ staffVisibility: ScheduleStaffVisibility;
364
+ notify: ScheduleCalendarNotifyGQL;
365
+ }
366
+ export interface ScheduleCalendarGQL {
367
+ revision: string;
368
+ id: string;
369
+ organizationId: string;
370
+ name: string;
371
+ description: string | null;
372
+ timeZone: string;
373
+ siteId: string | null;
374
+ workCalendarId: string | null;
375
+ color: string | null;
376
+ settings: ScheduleCalendarSettingsGQL;
377
+ preparedThrough: string | null;
378
+ ordinal: number;
379
+ access: ScheduleDocAccessGQL | null;
380
+ accessGrants: Array<ScheduleDocAccessGrantGQL> | null;
381
+ viewerPermission: ScheduleDocPermission;
382
+ viewerIsManager: boolean;
383
+ viewerResourceId: string | null;
384
+ version: string;
385
+ deletedAt: string | null;
386
+ createdAt: string;
387
+ updatedAt: string;
388
+ }
389
+
390
+ /**
391
+ * Shifts (one row = one seat; assigneeResourceId null = open)
392
+ */
393
+
394
+ export interface ScheduleShiftGQL {
395
+ id: string;
396
+ organizationId: string;
397
+ calendarId: string;
398
+ shiftDate: string; // calendar-local date of startAt
399
+ startAt: string;
400
+ endAt: string;
401
+ roleId: string | null;
402
+ locationResourceId: string | null;
403
+ assigneeResourceId: string | null;
404
+ unpaidBreakMinutes: number;
405
+ label: string | null;
406
+ note: string | null;
407
+ status: ScheduleShiftStatus;
408
+ createdVia: ScheduleShiftCreatedVia;
409
+ templateItemId: string | null;
410
+ copiedFromShiftId: string | null;
411
+ version: string;
412
+ publishedAt: string | null;
413
+ canceledAt: string | null;
414
+ createdAt: string;
415
+ updatedAt: string;
416
+ }
417
+ // scheduleMyShifts: the seats plus the calendars, roles and locations they name, and the viewer's own staff record
418
+ export interface ScheduleShiftWindowGQL {
419
+ shifts: Array<ScheduleShiftGQL>;
420
+ calendars: Array<ScheduleCalendarGQL>;
421
+ roles: Array<ScheduleRoleGQL>;
422
+ locations: Array<ScheduleResourceGQL>;
423
+ me: ScheduleResourceGQL | null;
424
+ fromDate: string;
425
+ toDate: string;
426
+ }
427
+ // scheduleShifts: one calendar's roster window, the seats plus the roles, rooms and people they name (people also
428
+ // holds the viewer's own staff record, and every person on the schedule for the calendar's managers)
429
+ export interface ScheduleRosterWindowGQL {
430
+ shifts: Array<ScheduleShiftGQL>;
431
+ roles: Array<ScheduleRoleGQL>;
432
+ locations: Array<ScheduleResourceGQL>;
433
+ people: Array<ScheduleResourceGQL>;
434
+ fromDate: string;
435
+ toDate: string;
436
+ }
437
+
438
+ /**
439
+ * Violations and time off
440
+ */
441
+
442
+ export interface ScheduleViolationGQL {
443
+ id: string | null;
444
+ calendarId: string;
445
+ ruleId: string | null;
446
+ shiftId: string | null;
447
+ resourceId: string | null;
448
+ kind: ScheduleRuleKind;
449
+ code: string;
450
+ severity: ScheduleRuleSeverity;
451
+ violationKey: string;
452
+ identityKey: string;
453
+ startAt: string;
454
+ endAt: string;
455
+ degree: number;
456
+ message: string;
457
+ detail: string | null;
458
+ evaluatedAt: string;
459
+ }
460
+ export interface ScheduleTimeOffGQL {
461
+ id: string;
462
+ organizationId: string;
463
+ resourceId: string;
464
+ accountId: string | null;
465
+ requesterAccountId: string | null;
466
+ startAt: string;
467
+ endAt: string;
468
+ allDay: boolean;
469
+ timeZone: string;
470
+ status: ScheduleTimeOffStatus;
471
+ reason: string | null;
472
+ deciderAccountId: string | null;
473
+ decidedAt: string | null;
474
+ decisionNote: string | null;
475
+ version: string;
476
+ conflictingShifts: Array<ScheduleShiftGQL>;
477
+ releasedShiftIds: Array<string>;
478
+ viewerIsRequester: boolean;
479
+ viewerCanDecide: boolean;
480
+ createdAt: string;
481
+ updatedAt: string;
482
+ cursor: string | number[];
483
+ }
484
+
485
+ /**
486
+ * To-dos
487
+ */
488
+
489
+ // One to-do of a location (calendarId) or a project (projectId). dueAt is the
490
+ // local midnight of the due date in timeZone when dueAllDay. priority is the
491
+ // index in SCHEDULE_TASK_PRIORITY_ENUMS (0 NONE ... 3 HIGH).
492
+ export interface ScheduleTaskGQL {
493
+ id: string;
494
+ organizationId: string;
495
+ calendarId: string | null;
496
+ projectId: string | null;
497
+ activityId: string | null;
498
+ shiftId: string | null;
499
+ title: string;
500
+ note: string | null;
501
+ assigneeResourceId: string | null;
502
+ dueAt: string | null;
503
+ dueAllDay: boolean;
504
+ timeZone: string;
505
+ status: ScheduleTaskStatus;
506
+ priority: number;
507
+ completedAt: string | null;
508
+ completedByAccountId: string | null;
509
+ createdVia: ScheduleTaskCreatedVia;
510
+ ordinal: number;
511
+ version: string;
512
+ createdByAccountId: string | null;
513
+ createdAt: string;
514
+ updatedAt: string;
515
+ }
516
+
517
+ /**
518
+ * Projects
519
+ */
520
+
521
+ export interface ScheduleLevelingOptionsGQL {
522
+ enabled: boolean;
523
+ priorityRule: Array<ScheduleLevelingPriorityRule>;
524
+ levelWithinFloat: boolean;
525
+ maxOverallocationPercent: number;
526
+ considerOtherProjects: boolean;
527
+ horizonDays: number;
528
+ }
529
+ export interface ScheduleLevelingOptionsInput {
530
+ enabled?: boolean | null;
531
+ priorityRule?: Array<ScheduleLevelingPriorityRule> | null;
532
+ levelWithinFloat?: boolean | null;
533
+ maxOverallocationPercent?: number | null;
534
+ considerOtherProjects?: boolean | null;
535
+ horizonDays?: number | null;
536
+ }
537
+ export interface ScheduleSchedulingOptionsGQL {
538
+ autoSchedule: boolean;
539
+ progressLogic: ScheduleProgressLogic;
540
+ lagCalendar: ScheduleLagCalendar;
541
+ criticalityMode: ScheduleCriticalityMode;
542
+ criticalFloatThresholdMinutes: number;
543
+ leveling: ScheduleLevelingOptionsGQL;
544
+ }
545
+ export interface ScheduleSchedulingOptionsInput {
546
+ autoSchedule?: boolean | null;
547
+ progressLogic?: ScheduleProgressLogic | null;
548
+ lagCalendar?: ScheduleLagCalendar | null;
549
+ criticalityMode?: ScheduleCriticalityMode | null;
550
+ criticalFloatThresholdMinutes?: number | null;
551
+ leveling?: ScheduleLevelingOptionsInput | null;
552
+ }
553
+ export interface ScheduleProjectGQL {
554
+ id: string;
555
+ organizationId: string;
556
+ siteId: string | null;
557
+ workCalendarId: string;
558
+ currentBaselineId: string | null;
559
+ code: string;
560
+ name: string;
561
+ description: string | null;
562
+ status: ScheduleProjectStatus;
563
+ timeZone: string;
564
+ plannedStartAt: string;
565
+ mustFinishByAt: string | null;
566
+ dataDateAt: string;
567
+ schedulingOptions: ScheduleSchedulingOptionsGQL;
568
+ scheduledFinishAt: string | null;
569
+ lastScheduledAt: string | null;
570
+ networkRevision: string;
571
+ scheduledRevision: string;
572
+ needsReschedule: boolean;
573
+ runSequence: string;
574
+ latestRun: ScheduleProjectRunGQL | null;
575
+ activityCount: number;
576
+ unreviewedCount: number;
577
+ access: ScheduleDocAccessGQL | null;
578
+ accessGrants: Array<ScheduleDocAccessGrantGQL> | null;
579
+ source: ScheduleSourceGQL;
580
+ version: string;
581
+ revision: string;
582
+ viewerPermission: ScheduleDocPermission;
583
+ viewerCanEdit: boolean;
584
+ viewerCanEditAccess: boolean;
585
+ viewerIsManager: boolean;
586
+ deletedAt: string | null;
587
+ createdAt: string;
588
+ updatedAt: string;
589
+ }
590
+ export interface CreateScheduleProjectInput {
591
+ organizationId: string;
592
+ code?: string | null;
593
+ name: string;
594
+ description?: string | null;
595
+ timeZone?: string | null;
596
+ siteId?: string | null;
597
+ workCalendarId?: string | null;
598
+ plannedStartAt: string;
599
+ mustFinishByAt?: string | null;
600
+ dataDateAt?: string | null;
601
+ schedulingOptions?: ScheduleSchedulingOptionsInput | null;
602
+ }
603
+ export interface UpdateScheduleProjectInput {
604
+ organizationId: string;
605
+ projectId: string;
606
+ expectedVersion: string;
607
+ code?: string | null;
608
+ name?: string | null;
609
+ description?: string | null;
610
+ status?: ScheduleProjectStatus | null;
611
+ timeZone?: string | null;
612
+ siteId?: string | null;
613
+ workCalendarId?: string | null;
614
+ plannedStartAt?: string | null;
615
+ mustFinishByAt?: string | null;
616
+ dataDateAt?: string | null;
617
+ schedulingOptions?: ScheduleSchedulingOptionsInput | null;
618
+ }
619
+ export interface DeleteScheduleProjectInput {
620
+ organizationId: string;
621
+ projectId: string;
622
+ expectedVersion: string;
623
+ }
624
+ export interface ScheduleWbsNodeGQL {
625
+ id: string;
626
+ projectId: string;
627
+ parentId: string | null;
628
+ code: string;
629
+ name: string;
630
+ path: string;
631
+ depth: number;
632
+ ordinal: number;
633
+ startAt: string | null;
634
+ finishAt: string | null;
635
+ percentComplete: number | null;
636
+ }
637
+ export interface CreateScheduleWbsNodeInput {
638
+ organizationId: string;
639
+ projectId: string;
640
+ parentId?: string | null;
641
+ code?: string | null;
642
+ name: string;
643
+ ordinal?: number | null;
644
+ }
645
+ export interface UpdateScheduleWbsNodeInput {
646
+ organizationId: string;
647
+ projectId: string;
648
+ wbsId: string;
649
+ parentId?: string | null;
650
+ code?: string | null;
651
+ name?: string | null;
652
+ ordinal?: number | null;
653
+ }
654
+ export interface DeleteScheduleWbsNodeInput {
655
+ organizationId: string;
656
+ projectId: string;
657
+ wbsId: string;
658
+ }
659
+ export interface ScheduleCodeValueGQL {
660
+ typeKey: string;
661
+ valueKey: string;
662
+ }
663
+ export interface ScheduleCodeValueInput {
664
+ typeKey: string;
665
+ valueKey: string;
666
+ }
667
+ export interface ScheduleActivityGQL {
668
+ id: string;
669
+ organizationId: string;
670
+ projectId: string;
671
+ wbsId: string | null;
672
+ workCalendarId: string | null;
673
+ code: string;
674
+ name: string;
675
+ description: string | null;
676
+ type: ScheduleActivityType;
677
+ status: ScheduleActivityStatus;
678
+ plannedDurationMinutes: number;
679
+ remainingDurationMinutes: number;
680
+ percentComplete: number;
681
+ primaryConstraintType: ScheduleConstraintType | null;
682
+ primaryConstraintAt: string | null;
683
+ secondaryConstraintType: ScheduleConstraintType | null;
684
+ secondaryConstraintAt: string | null;
685
+ actualStartAt: string | null;
686
+ actualFinishAt: string | null;
687
+ earlyStartAt: string | null;
688
+ earlyFinishAt: string | null;
689
+ lateStartAt: string | null;
690
+ lateFinishAt: string | null;
691
+ startAt: string | null;
692
+ finishAt: string | null;
693
+ totalFloatMinutes: number | null;
694
+ freeFloatMinutes: number | null;
695
+ isCritical: boolean;
696
+ levelingPriority: number;
697
+ levelingDelayMinutes: number;
698
+ levelingConstrainedByResourceId: string | null;
699
+ codes: Array<ScheduleCodeValueGQL>;
700
+ source: ScheduleSourceGQL;
701
+ ordinal: number;
702
+ version: string;
703
+ createdAt: string;
704
+ updatedAt: string;
705
+ }
706
+ export interface ScheduleActivityInput {
707
+ code?: string | null;
708
+ name: string;
709
+ description?: string | null;
710
+ type?: ScheduleActivityType | null;
711
+ wbsId?: string | null;
712
+ workCalendarId?: string | null;
713
+ plannedDurationMinutes?: number | null;
714
+ primaryConstraintType?: ScheduleConstraintType | null;
715
+ primaryConstraintAt?: string | null;
716
+ secondaryConstraintType?: ScheduleConstraintType | null;
717
+ secondaryConstraintAt?: string | null;
718
+ levelingPriority?: number | null;
719
+ codes?: Array<ScheduleCodeValueInput> | null;
720
+ source?: ScheduleSourceInput | null;
721
+ ordinal?: number | null;
722
+ }
723
+ export interface ScheduleActivityPatchInput {
724
+ code?: string | null;
725
+ name?: string | null;
726
+ description?: string | null;
727
+ type?: ScheduleActivityType | null;
728
+ wbsId?: string | null;
729
+ workCalendarId?: string | null;
730
+ plannedDurationMinutes?: number | null;
731
+ primaryConstraintType?: ScheduleConstraintType | null;
732
+ primaryConstraintAt?: string | null;
733
+ secondaryConstraintType?: ScheduleConstraintType | null;
734
+ secondaryConstraintAt?: string | null;
735
+ levelingPriority?: number | null;
736
+ codes?: Array<ScheduleCodeValueInput> | null;
737
+ ordinal?: number | null;
738
+ actualStartAt?: string | null;
739
+ actualFinishAt?: string | null;
740
+ remainingDurationMinutes?: number | null;
741
+ }
742
+ export interface CreateScheduleActivitiesInput {
743
+ organizationId: string;
744
+ projectId: string;
745
+ activities: Array<ScheduleActivityInput>;
746
+ }
747
+ export interface UpdateScheduleActivityInput {
748
+ organizationId: string;
749
+ projectId: string;
750
+ activityId: string;
751
+ expectedVersion: string;
752
+ patch: ScheduleActivityPatchInput;
753
+ }
754
+ export interface DeleteScheduleActivitiesInput {
755
+ organizationId: string;
756
+ projectId: string;
757
+ activityIds: Array<string>;
758
+ }
759
+ export interface MoveScheduleActivitiesInput {
760
+ organizationId: string;
761
+ projectId: string;
762
+ activityIds: Array<string>;
763
+ wbsId?: string | null;
764
+ afterActivityId?: string | null;
765
+ }
766
+ export interface ReviewScheduleActivitiesInput {
767
+ organizationId: string;
768
+ projectId: string;
769
+ activityIds: Array<string>;
770
+ reviewStatus: ScheduleSourceReviewStatus;
771
+ }
772
+ export interface ScheduleRelationshipGQL {
773
+ id: string;
774
+ projectId: string;
775
+ predecessorId: string;
776
+ successorId: string;
777
+ type: ScheduleRelationshipType;
778
+ lagMinutes: number;
779
+ isDriving: boolean;
780
+ createdAt: string;
781
+ updatedAt: string;
782
+ }
783
+ export interface ScheduleRelationshipInput {
784
+ predecessorId: string;
785
+ successorId: string;
786
+ type?: ScheduleRelationshipType | null;
787
+ lagMinutes?: number | null;
788
+ }
789
+ export interface CreateScheduleRelationshipsInput {
790
+ organizationId: string;
791
+ projectId: string;
792
+ relationships: Array<ScheduleRelationshipInput>;
793
+ }
794
+ export interface ReplaceScheduleActivityPredecessorsInput {
795
+ organizationId: string;
796
+ projectId: string;
797
+ activityId: string;
798
+ expectedActivityVersion: string;
799
+ relationships: Array<Omit<ScheduleRelationshipInput, 'successorId'>>;
800
+ }
801
+ export interface ScheduleActivityPredecessorsPayloadGQL {
802
+ activity: ScheduleActivityGQL;
803
+ relationships: Array<ScheduleRelationshipGQL>;
804
+ }
805
+ export interface ScheduleRelationshipsPayloadGQL {
806
+ relationships: Array<ScheduleRelationshipGQL>;
807
+ cycleActivityIds: Array<string>;
808
+ duplicateCount: number;
809
+ }
810
+ export interface UpdateScheduleRelationshipInput {
811
+ organizationId: string;
812
+ projectId: string;
813
+ relationshipId: string;
814
+ type?: ScheduleRelationshipType | null;
815
+ lagMinutes?: number | null;
816
+ }
817
+ export interface DeleteScheduleRelationshipsInput {
818
+ organizationId: string;
819
+ projectId: string;
820
+ relationshipIds: Array<string>;
821
+ }
822
+ export interface ScheduleActivityAssignmentGQL {
823
+ id: string;
824
+ projectId: string;
825
+ activityId: string;
826
+ resourceId: string;
827
+ plannedUnits: number;
828
+ unitsPerDay: number | null;
829
+ actualUnits: number;
830
+ remainingUnits: number;
831
+ }
832
+ export interface ReplaceScheduleActivityAssignmentInput {
833
+ organizationId: string;
834
+ projectId: string;
835
+ activityId: string;
836
+ resourceId: string;
837
+ plannedUnits: number;
838
+ unitsPerDay?: number | null;
839
+ actualUnits?: number | null;
840
+ remainingUnits?: number | null;
841
+ }
842
+ export interface DeleteScheduleActivityAssignmentInput {
843
+ organizationId: string;
844
+ projectId: string;
845
+ assignmentId: string;
846
+ }
847
+ export interface ScheduleBaselineGQL {
848
+ id: string;
849
+ projectId: string;
850
+ name: string;
851
+ note: string | null;
852
+ dataDateAt: string;
853
+ isCurrent: boolean;
854
+ createdByAccountId: string | null;
855
+ createdAt: string;
856
+ cursor: string | number[];
857
+ }
858
+ export interface ScheduleBaselineActivityGQL {
859
+ plannedStartAt: string | null;
860
+ plannedFinishAt: string | null;
861
+ id: string;
862
+ baselineId: string;
863
+ activityId: string | null;
864
+ code: string;
865
+ name: string;
866
+ startAt: string | null;
867
+ finishAt: string | null;
868
+ plannedDurationMinutes: number;
869
+ totalFloatMinutes: number | null;
870
+ plannedUnits: number;
871
+ percentComplete: number;
872
+ }
873
+ export interface CreateScheduleBaselineInput {
874
+ organizationId: string;
875
+ projectId: string;
876
+ name: string;
877
+ note?: string | null;
878
+ setCurrent?: boolean | null;
879
+ }
880
+ export interface SetScheduleCurrentBaselineInput {
881
+ organizationId: string;
882
+ projectId: string;
883
+ baselineId?: string | null;
884
+ }
885
+ export interface DeleteScheduleBaselineInput {
886
+ organizationId: string;
887
+ projectId: string;
888
+ baselineId: string;
889
+ }
890
+ export interface ScheduleProjectRunProgressGQL {
891
+ stage: string;
892
+ percent: number | null;
893
+ message: string | null;
894
+ updatedAt: string;
895
+ }
896
+ export interface ScheduleProjectRunStatsGQL {
897
+ activityCount: number;
898
+ relationshipCount: number;
899
+ criticalCount: number;
900
+ openStartCount: number;
901
+ openFinishCount: number;
902
+ negativeFloatCount: number;
903
+ constraintOverrideCount: number;
904
+ cycleCount: number;
905
+ longestPathCount: number;
906
+ scheduledFinishAt: string | null;
907
+ earlyFinishAt: string | null;
908
+ leveled: boolean;
909
+ leveledCount: number;
910
+ totalLevelingDelayMinutes: number;
911
+ finishDelayMinutes: number;
912
+ overallocatedResourceDayCount: number;
913
+ levelingExceededFloatCount: number;
914
+ levelingExceededHorizonCount: number;
915
+ diagnosticsTruncated: boolean;
916
+ diagnosticCounts: string;
917
+ }
918
+ export interface ScheduleDiagnosticGQL {
919
+ code: string;
920
+ severity: ScheduleDiagnosticSeverity;
921
+ message: string;
922
+ activityId: string | null;
923
+ relatedActivityId: string | null;
924
+ activityIds: Array<string> | null;
925
+ resourceId: string | null;
926
+ calendarId: string | null;
927
+ fromDate: string | null;
928
+ toDate: string | null;
929
+ demandUnits: number | null;
930
+ availableUnits: number | null;
931
+ minutes: number | null;
932
+ }
933
+ export interface ScheduleProjectRunGQL {
934
+ organizationId: string;
935
+ revision: string;
936
+ scheduledFinishAt: string | null;
937
+ createdAt: string;
938
+ id: string;
939
+ projectId: string;
940
+ sequence: string;
941
+ kind: ScheduleProjectRunKind;
942
+ trigger: ScheduleProjectRunTrigger;
943
+ status: ScheduleProjectRunStatus;
944
+ options: ScheduleSchedulingOptionsGQL;
945
+ networkRevision: string | null;
946
+ dataDateAt: string;
947
+ progress: ScheduleProjectRunProgressGQL | null;
948
+ stats: ScheduleProjectRunStatsGQL | null;
949
+ diagnostics: Array<ScheduleDiagnosticGQL>;
950
+ triggeredByAccountId: string | null;
951
+ cancelRequestedAt: string | null;
952
+ queuedAt: string;
953
+ startedAt: string | null;
954
+ finishedAt: string | null;
955
+ lastError: string | null;
956
+ version: string;
957
+ updatedAt: string;
958
+ cursor: string | number[];
959
+ }
960
+ export interface RunScheduleProjectInput {
961
+ options?: ScheduleSchedulingOptionsInput | null;
962
+ organizationId: string;
963
+ projectId: string;
964
+ kind?: ScheduleProjectRunKind | null;
965
+ dataDateAt?: string | null;
966
+ leveling?: ScheduleLevelingOptionsInput | null;
967
+ }
968
+ export interface CancelScheduleProjectRunInput {
969
+ organizationId: string;
970
+ projectId: string;
971
+ runId: string;
972
+ }
973
+ export interface ScheduleCodeTypeValueGQL {
974
+ key: string;
975
+ label: string;
976
+ color: string | null;
977
+ }
978
+ export interface ScheduleCodeTypeGQL {
979
+ id: string;
980
+ organizationId: string;
981
+ projectId: string | null;
982
+ key: string;
983
+ name: string;
984
+ values: Array<ScheduleCodeTypeValueGQL>;
985
+ ordinal: number;
986
+ }
987
+ export interface ScheduleNetworkFilter {
988
+ wbsId?: string | null;
989
+ criticalOnly?: boolean | null;
990
+ from?: string | null;
991
+ to?: string | null;
992
+ codes?: Array<ScheduleCodeValueInput> | null;
993
+ search?: string | null;
994
+ reviewStatus?: ScheduleSourceReviewStatus | null;
995
+ }
996
+ export interface ScheduleProjectNetworkGQL {
997
+ project: ScheduleProjectGQL;
998
+ wbsNodes: Array<ScheduleWbsNodeGQL>;
999
+ activities: Array<ScheduleActivityGQL>;
1000
+ relationships: Array<ScheduleRelationshipGQL>;
1001
+ assignments: Array<ScheduleActivityAssignmentGQL>;
1002
+ baselineActivities: Array<ScheduleBaselineActivityGQL>;
1003
+ resources: Array<ScheduleResourceGQL>;
1004
+ workCalendars: Array<ScheduleWorkCalendarGQL>;
1005
+ networkRevision: string;
1006
+ totalActivityCount: number;
1007
+ filtered: boolean;
1008
+ truncated: boolean;
1009
+ }
1010
+ export interface ScheduleResourceUsageDayGQL {
1011
+ resourceId: string;
1012
+ date: string;
1013
+ demandUnits: number;
1014
+ externalUnits: number;
1015
+ availableUnits: number | null;
1016
+ overallocated: boolean;
1017
+ }
1018
+ export interface ScheduleImportWbsInput {
1019
+ code: string;
1020
+ parentCode?: string | null;
1021
+ name: string;
1022
+ ordinal?: number | null;
1023
+ }
1024
+ export interface ScheduleImportActivityInput {
1025
+ code: string;
1026
+ wbsCode?: string | null;
1027
+ name: string;
1028
+ type?: ScheduleActivityType | null;
1029
+ workCalendarKey?: string | null;
1030
+ plannedDurationMinutes?: number | null;
1031
+ primaryConstraintType?: ScheduleConstraintType | null;
1032
+ primaryConstraintAt?: string | null;
1033
+ secondaryConstraintType?: ScheduleConstraintType | null;
1034
+ secondaryConstraintAt?: string | null;
1035
+ actualStartAt?: string | null;
1036
+ actualFinishAt?: string | null;
1037
+ levelingPriority?: number | null;
1038
+ codes?: Array<ScheduleCodeValueInput> | null;
1039
+ ordinal?: number | null;
1040
+ source?: ScheduleSourceInput | null;
1041
+ }
1042
+ export interface ScheduleImportRelationshipInput {
1043
+ predecessorCode: string;
1044
+ successorCode: string;
1045
+ type?: ScheduleRelationshipType | null;
1046
+ lagMinutes?: number | null;
1047
+ }
1048
+ export interface ScheduleImportAssignmentInput {
1049
+ activityCode: string;
1050
+ resourceKey: string;
1051
+ plannedUnits?: number | null;
1052
+ unitsPerDay?: number | null;
1053
+ }
1054
+ export interface ScheduleImportPlanInput {
1055
+ organizationId: string;
1056
+ projectId: string;
1057
+ mode: ScheduleImportMode;
1058
+ dryRun?: boolean | null;
1059
+ source?: ScheduleSourceInput | null;
1060
+ wbs?: Array<ScheduleImportWbsInput> | null;
1061
+ activities?: Array<ScheduleImportActivityInput> | null;
1062
+ relationships?: Array<ScheduleImportRelationshipInput> | null;
1063
+ assignments?: Array<ScheduleImportAssignmentInput> | null;
1064
+ }
1065
+ export interface ScheduleImportErrorGQL {
1066
+ code: ScheduleImportErrorCode;
1067
+ section: string;
1068
+ index: number;
1069
+ rowCode: string | null;
1070
+ message: string;
1071
+ }
1072
+ export interface ScheduleImportPayloadGQL {
1073
+ applied: boolean;
1074
+ dryRun: boolean;
1075
+ wbsCreated: number;
1076
+ wbsUpdated: number;
1077
+ activitiesCreated: number;
1078
+ activitiesUpdated: number;
1079
+ activitiesSkipped: number;
1080
+ activitiesDeleted: number;
1081
+ relationshipsCreated: number;
1082
+ assignmentsWritten: number;
1083
+ errors: Array<ScheduleImportErrorGQL>;
1084
+ cycleCodes: Array<string>;
1085
+ dataDateAt: string | null;
1086
+ run: ScheduleProjectRunGQL | null;
1087
+ }
1088
+
1089
+ /**
1090
+ * Query variables. Realtime changes match them by scope key: calendar-scoped
1091
+ * queries carry organizationId and calendarId, org-scoped ones organizationId.
1092
+ */
1093
+
1094
+ export interface ScheduleWorkCalendarsVariables {
1095
+ organizationId: string;
1096
+ }
1097
+ export interface ScheduleResourcesVariables {
1098
+ organizationId: string;
1099
+ kinds?: Array<ScheduleResourceKind> | null;
1100
+ includeRetired?: boolean | null;
1101
+ }
1102
+ export interface ScheduleCodeTypesVariables {
1103
+ organizationId: string;
1104
+ projectId?: string | null;
1105
+ }
1106
+ export interface ScheduleResourceUsageVariables {
1107
+ organizationId: string;
1108
+ projectId: string;
1109
+ resourceIds?: Array<string> | null;
1110
+ from: string;
1111
+ to: string;
1112
+ }
1113
+ export interface ScheduleCalendarsVariables {
1114
+ organizationId: string;
1115
+ }
1116
+ export interface ScheduleShiftsVariables {
1117
+ organizationId: string;
1118
+ calendarId: string;
1119
+ fromDate: string;
1120
+ toDate: string;
1121
+ }
1122
+ export interface ScheduleMyShiftsVariables {
1123
+ organizationId: string;
1124
+ fromDate: string;
1125
+ toDate: string;
1126
+ }
1127
+ export interface ScheduleViolationsVariables {
1128
+ organizationId: string;
1129
+ calendarId: string;
1130
+ fromDate: string;
1131
+ toDate: string;
1132
+ }
1133
+ export interface ScheduleTimeOffListVariables {
1134
+ organizationId: string;
1135
+ resourceIds?: Array<string> | null;
1136
+ statuses?: Array<ScheduleTimeOffStatus> | null;
1137
+ mine?: boolean | null;
1138
+ from?: string | null;
1139
+ to?: string | null;
1140
+ cursor?: string | number[] | null;
1141
+ after?: boolean | null;
1142
+ limit?: number | null;
1143
+ }
1144
+ export interface ScheduleTasksVariables {
1145
+ organizationId: string;
1146
+ calendarId?: string | null;
1147
+ projectId?: string | null;
1148
+ statuses?: Array<ScheduleTaskStatus> | null;
1149
+ }
1150
+ export interface ScheduleMyTasksVariables {
1151
+ organizationId: string;
1152
+ statuses?: Array<ScheduleTaskStatus> | null;
1153
+ }
1154
+ export interface ScheduleProjectsVariables {
1155
+ organizationId: string;
1156
+ statuses?: Array<ScheduleProjectStatus> | null;
1157
+ includeArchived?: boolean | null;
1158
+ search?: string | null;
1159
+ }
1160
+ export interface ScheduleProjectNetworkVariables {
1161
+ projectId: string;
1162
+ filter?: ScheduleNetworkFilter | null;
1163
+ }
1164
+ export interface ScheduleProjectRunsVariables {
1165
+ projectId: string;
1166
+ cursor?: string | number[] | null;
1167
+ after?: boolean | null;
1168
+ limit?: number | null;
1169
+ }
1170
+ export interface ScheduleBaselinesVariables {
1171
+ projectId: string;
1172
+ cursor?: string | number[] | null;
1173
+ after?: boolean | null;
1174
+ limit?: number | null;
1175
+ }
1176
+ export interface ScheduleWorkCalendarVariables {
1177
+ organizationId: string;
1178
+ workCalendarId: string;
1179
+ }
1180
+ export interface ScheduleResourceVariables {
1181
+ organizationId: string;
1182
+ resourceId: string;
1183
+ }