@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.
- package/audience.d.ts +343 -0
- package/cache/config.ts +98 -50
- package/cache/index.chat-activity.test.ts +119 -0
- package/cache/index.chat.test.ts +92 -0
- package/cache/index.helpers.ts +96 -0
- package/cache/index.regression.test.ts +149 -0
- package/cache/index.test.ts +1017 -127
- package/cache/index.ts +1256 -1269
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +800 -0
- package/cache/store.ts +395 -0
- package/cache/value.helpers.ts +17 -0
- package/client/draft-persistence-indexed-db.ts +413 -0
- package/client/draft-persistence.ts +152 -0
- package/client/index.ts +3 -0
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +870 -164
- package/deno.lock +187 -0
- package/deno.test.json +10 -4
- package/gql/eagerQueryMap.ts +12 -0
- package/gql/fragments/accountAuthFragments.ts +5 -0
- package/gql/fragments/accountFragments.ts +0 -3
- package/gql/fragments/accountSessionFragments.ts +16 -0
- package/gql/fragments/agentMemoryFragments.ts +23 -0
- package/gql/fragments/agentNoteFragments.ts +150 -0
- package/gql/fragments/aiChatFragments.ts +42 -0
- package/gql/fragments/audienceFragments.ts +141 -0
- package/gql/fragments/campaignFragments.ts +566 -0
- package/gql/fragments/dataTableFragments.ts +50 -192
- package/gql/fragments/emailFragments.ts +32 -17
- package/gql/fragments/fieldDocFragments.ts +264 -0
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/logFragments.ts +101 -69
- package/gql/fragments/organizationFragments.ts +53 -5
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +667 -0
- package/gql/fragments/sheetFragments.ts +304 -63
- package/gql/fragments/storageFragments.ts +45 -0
- package/gql/fragments/workflowFragments.ts +41 -5
- package/gql/mutations/accountMutations.ts +0 -2
- package/gql/mutations/agentMemoryMutations.ts +68 -0
- package/gql/mutations/agentNoteMutations.ts +62 -0
- package/gql/mutations/aiChatMutations.ts +49 -4
- package/gql/mutations/audienceMutations.ts +71 -0
- package/gql/mutations/authMutations.ts +203 -18
- package/gql/mutations/billingMutations.ts +17 -27
- package/gql/mutations/campaignMutations.ts +258 -0
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +19 -54
- package/gql/mutations/fieldDocMutations.ts +173 -0
- package/gql/mutations/index.ts +10 -2
- package/gql/mutations/logMutations.ts +6 -29
- package/gql/mutations/organizationMutations.ts +19 -4
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +1121 -0
- package/gql/mutations/sheetMutations.ts +221 -60
- package/gql/mutations/storageMutations.ts +19 -0
- package/gql/mutations/workflowMutations.ts +60 -0
- package/gql/queries/agentMemoryQueries.ts +28 -0
- package/gql/queries/agentNoteQueries.ts +89 -0
- package/gql/queries/aiChatQueries.ts +70 -2
- package/gql/queries/audienceQueries.ts +128 -0
- package/gql/queries/authQueries.ts +47 -0
- package/gql/queries/billingQueries.ts +118 -6
- package/gql/queries/campaignQueries.ts +236 -0
- package/gql/queries/dataTableQueries.ts +61 -13
- package/gql/queries/emailQueries.ts +26 -17
- package/gql/queries/emailReplyReportQueries.ts +76 -0
- package/gql/queries/fieldDocQueries.ts +166 -0
- package/gql/queries/inboundContactQueries.ts +4 -0
- package/gql/queries/index.ts +10 -2
- package/gql/queries/logQueries.ts +68 -30
- package/gql/queries/organizationQueries.ts +65 -1
- package/gql/queries/qrCodeQueries.ts +20 -0
- package/gql/queries/scheduleQueries.ts +691 -0
- package/gql/queries/sheetQueries.ts +244 -26
- package/gql/queries/storageQueries.ts +38 -0
- package/gql/queries/workflowQueries.ts +77 -2
- package/hooks/index.helpers.test.ts +50 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +2254 -982
- package/hooks/use-account-mtn.ts +76 -81
- package/hooks/use-agentMemory-mtn.ts +71 -0
- package/hooks/use-agentMemory-qry.ts +56 -0
- package/hooks/use-agentNote-mtn.ts +82 -0
- package/hooks/use-agentNote-qry.ts +190 -0
- package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +72 -0
- package/hooks/use-aiChat-mtn.ts +220 -141
- package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +341 -237
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-app-qry.ts +12 -9
- package/hooks/use-audience-mtn.ts +194 -0
- package/hooks/use-audience-qry.helpers.test.ts +80 -0
- package/hooks/use-audience-qry.helpers.ts +63 -0
- package/hooks/use-audience-qry.ts +330 -0
- package/hooks/use-auth-mtn.ts +435 -252
- package/hooks/use-auth-qry.ts +51 -0
- package/hooks/use-billing-mtn.ts +31 -0
- package/hooks/use-billing-qry.ts +76 -0
- package/hooks/use-campaign-generation-recovery.ts +53 -0
- package/hooks/use-campaign-mtn.ts +436 -0
- package/hooks/use-campaign-qry.helpers.ts +40 -0
- package/hooks/use-campaign-qry.ts +834 -0
- package/hooks/use-dataTable-mtn.ts +37 -46
- package/hooks/use-dataTable-qry.ts +102 -128
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +56 -86
- package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
- package/hooks/use-fieldDoc-mtn.ts +262 -0
- package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
- package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
- package/hooks/use-fieldDoc-qry.ts +212 -0
- package/hooks/use-inboundContact-mtn.ts +19 -16
- package/hooks/use-inboundContact-qry.ts +62 -56
- package/hooks/use-integration-mtn.ts +56 -38
- package/hooks/use-integration-qry.ts +24 -9
- package/hooks/use-log-mtn.ts +88 -59
- package/hooks/use-log-qry.ts +150 -73
- package/hooks/use-organization-mtn.ts +334 -277
- package/hooks/use-organization-qry.ts +155 -129
- package/hooks/use-publicFormEmail-mtn.ts +27 -0
- package/hooks/use-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +589 -0
- package/hooks/use-schedule-qry.ts +738 -0
- package/hooks/use-schedule-reactive.ts +486 -0
- package/hooks/use-sheet-mtn.ts +157 -79
- package/hooks/use-sheet-qry.ts +221 -92
- package/hooks/use-storage-mtn.ts +81 -41
- package/hooks/use-storage-qry.ts +128 -14
- package/hooks/use-workflow-mtn.ts +72 -0
- package/hooks/use-workflow-qry.ts +184 -47
- package/libs/ai-chat-outgoing.helpers.ts +153 -0
- package/libs/ai-chat-outgoing.ts +11 -0
- package/libs/ai-chat-outgoing.types.ts +25 -0
- package/libs/ai-chat-run-realtime.ts +20 -0
- package/libs/ai-chat-submission-realtime.ts +150 -0
- package/libs/fragment-realtime-sequence.ts +55 -0
- package/libs/fragment-recovery.test.ts +326 -0
- package/libs/fragment-recovery.ts +325 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/orchestrator-realtime.helpers.test.ts +229 -0
- package/libs/orchestrator-realtime.helpers.ts +317 -0
- package/libs/orchestrator-realtime.ts +433 -0
- package/libs/request-cache-regression.test.ts +122 -0
- package/libs/request-managed-session.test.ts +574 -0
- package/libs/request-no-store.test.ts +419 -0
- package/libs/sheet-command-batch.ts +44 -0
- package/libs/sheet-view-realtime-router.test.ts +214 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/libs/sse-ticket.test.ts +26 -0
- package/loaders/campaign.test.ts +186 -0
- package/loaders/campaign.ts +110 -0
- package/loaders/emailPreference.ts +75 -0
- package/loaders/rest.ts +12 -0
- package/package.json +119 -71
- package/schedule.d.ts +1790 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +70 -106
- package/tests/agent-note-detail-cache.test.ts +120 -0
- package/tests/agent-note-search.test.ts +444 -0
- package/tsconfig.json +11 -10
- package/types.d.ts +77 -26
- package/utils.ts +78 -49
- package/gql/fragments/billingFragments.ts +0 -25
- package/gql/fragments/productFragments.ts +0 -39
- package/gql/fragments/reportFragments.ts +0 -90
- package/gql/queries/productQueries.ts +0 -31
- package/gql/queries/reportQueries.ts +0 -134
- package/hooks/use-product-qry.ts +0 -67
- package/hooks/use-report-qry.ts +0 -153
|
@@ -0,0 +1,738 @@
|
|
|
1
|
+
import { useQuery } from '@jsb188/graphql/client';
|
|
2
|
+
import * as documents from '../gql/queries/scheduleQueries.ts';
|
|
3
|
+
import type * as Schedule from '../schedule.d.ts';
|
|
4
|
+
import type { UseQueryParams } from '../types.d.ts';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Read scheduleWorkCalendars with top-level variables aligned to server reset targets.
|
|
8
|
+
*/
|
|
9
|
+
export function useScheduleWorkCalendars(
|
|
10
|
+
p:
|
|
11
|
+
| Partial<Schedule.ScheduleWorkCalendarsVariables>
|
|
12
|
+
| string
|
|
13
|
+
| null
|
|
14
|
+
| undefined,
|
|
15
|
+
params: UseQueryParams = {},
|
|
16
|
+
) {
|
|
17
|
+
const variables: Partial<Schedule.ScheduleWorkCalendarsVariables> =
|
|
18
|
+
typeof p === 'string' ? { organizationId: p } : p || {};
|
|
19
|
+
const { data, ...rest } = useQuery(documents.scheduleWorkCalendarsQry, {
|
|
20
|
+
...params,
|
|
21
|
+
variables: { ...variables, ...params.variables },
|
|
22
|
+
skip: !variables.organizationId || !!params.skip,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
...rest,
|
|
26
|
+
scheduleWorkCalendars: (data?.scheduleWorkCalendars ??
|
|
27
|
+
null) as Array<Schedule.ScheduleWorkCalendarGQL> | null,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Read scheduleResources with top-level variables aligned to server reset targets.
|
|
33
|
+
*/
|
|
34
|
+
export function useScheduleResources(
|
|
35
|
+
p: Partial<Schedule.ScheduleResourcesVariables>,
|
|
36
|
+
params: UseQueryParams = {},
|
|
37
|
+
) {
|
|
38
|
+
const variables: Partial<Schedule.ScheduleResourcesVariables> = p;
|
|
39
|
+
const { data, ...rest } = useQuery(documents.scheduleResourcesQry, {
|
|
40
|
+
...params,
|
|
41
|
+
variables: { ...variables, ...params.variables },
|
|
42
|
+
skip: !variables.organizationId || !!params.skip,
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
...rest,
|
|
46
|
+
scheduleResources: (data?.scheduleResources ??
|
|
47
|
+
null) as Array<Schedule.ScheduleResourceGQL> | null,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* Read scheduleCodeTypes with top-level variables aligned to server reset targets.
|
|
53
|
+
*/
|
|
54
|
+
export function useScheduleCodeTypes(
|
|
55
|
+
p: Partial<Schedule.ScheduleCodeTypesVariables> | string | null | undefined,
|
|
56
|
+
params: UseQueryParams = {},
|
|
57
|
+
) {
|
|
58
|
+
const variables: Partial<Schedule.ScheduleCodeTypesVariables> =
|
|
59
|
+
typeof p === 'string' ? { organizationId: p } : p || {};
|
|
60
|
+
const { data, ...rest } = useQuery(documents.scheduleCodeTypesQry, {
|
|
61
|
+
...params,
|
|
62
|
+
variables: { ...variables, ...params.variables },
|
|
63
|
+
skip: !variables.organizationId || !!params.skip,
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
...rest,
|
|
67
|
+
scheduleCodeTypes: (data?.scheduleCodeTypes ??
|
|
68
|
+
null) as Array<Schedule.ScheduleCodeTypeGQL> | null,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* Read scheduleResourceUsage with top-level variables aligned to server reset targets.
|
|
74
|
+
*/
|
|
75
|
+
export function useScheduleResourceUsage(
|
|
76
|
+
p: Partial<Schedule.ScheduleResourceUsageVariables>,
|
|
77
|
+
params: UseQueryParams = {},
|
|
78
|
+
) {
|
|
79
|
+
const variables: Partial<Schedule.ScheduleResourceUsageVariables> = p;
|
|
80
|
+
const { data, ...rest } = useQuery(documents.scheduleResourceUsageQry, {
|
|
81
|
+
...params,
|
|
82
|
+
variables: { ...variables, ...params.variables },
|
|
83
|
+
skip:
|
|
84
|
+
!variables.organizationId ||
|
|
85
|
+
!variables.projectId ||
|
|
86
|
+
!variables.from ||
|
|
87
|
+
!variables.to ||
|
|
88
|
+
!!params.skip,
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
...rest,
|
|
92
|
+
scheduleResourceUsage: (data?.scheduleResourceUsage ??
|
|
93
|
+
null) as Array<Schedule.ScheduleResourceUsageDayGQL> | null,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* Read scheduleCalendars with top-level variables aligned to server reset targets.
|
|
99
|
+
*/
|
|
100
|
+
export function useScheduleCalendars(
|
|
101
|
+
p: Partial<Schedule.ScheduleCalendarsVariables> | string | null | undefined,
|
|
102
|
+
params: UseQueryParams = {},
|
|
103
|
+
) {
|
|
104
|
+
const variables: Partial<Schedule.ScheduleCalendarsVariables> =
|
|
105
|
+
typeof p === 'string' ? { organizationId: p } : p || {};
|
|
106
|
+
const { data, ...rest } = useQuery(documents.scheduleCalendarsQry, {
|
|
107
|
+
...params,
|
|
108
|
+
variables: { ...variables, ...params.variables },
|
|
109
|
+
skip: !variables.organizationId || !!params.skip,
|
|
110
|
+
});
|
|
111
|
+
return {
|
|
112
|
+
...rest,
|
|
113
|
+
scheduleCalendars: (data?.scheduleCalendars ??
|
|
114
|
+
null) as Array<Schedule.ScheduleCalendarGQL> | null,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* Read scheduleCalendar with top-level variables aligned to server reset targets.
|
|
120
|
+
*/
|
|
121
|
+
export function useScheduleCalendar(
|
|
122
|
+
p: Partial<Schedule.ScheduleCalendarVariables>,
|
|
123
|
+
params: UseQueryParams = {},
|
|
124
|
+
) {
|
|
125
|
+
const variables: Partial<Schedule.ScheduleCalendarVariables> = p;
|
|
126
|
+
const { data, ...rest } = useQuery(documents.scheduleCalendarQry, {
|
|
127
|
+
...params,
|
|
128
|
+
variables: { ...variables, ...params.variables },
|
|
129
|
+
skip: !variables.calendarId || !!params.skip,
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
...rest,
|
|
133
|
+
scheduleCalendar: (data?.scheduleCalendar ??
|
|
134
|
+
null) as Schedule.ScheduleCalendarGQL | null,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
* Read scheduleOccurrences with top-level variables aligned to server reset targets.
|
|
140
|
+
*/
|
|
141
|
+
export function useScheduleOccurrences(
|
|
142
|
+
p: Partial<Schedule.ScheduleOccurrencesVariables>,
|
|
143
|
+
params: UseQueryParams = {},
|
|
144
|
+
) {
|
|
145
|
+
const variables: Partial<Schedule.ScheduleOccurrencesVariables> = p;
|
|
146
|
+
const { data, ...rest } = useQuery(documents.scheduleOccurrencesQry, {
|
|
147
|
+
...params,
|
|
148
|
+
variables: { ...variables, ...params.variables },
|
|
149
|
+
skip:
|
|
150
|
+
!variables.organizationId ||
|
|
151
|
+
!variables.calendarId ||
|
|
152
|
+
!variables.from ||
|
|
153
|
+
!variables.to ||
|
|
154
|
+
!!params.skip,
|
|
155
|
+
});
|
|
156
|
+
return {
|
|
157
|
+
...rest,
|
|
158
|
+
scheduleOccurrences: (data?.scheduleOccurrences ??
|
|
159
|
+
null) as Schedule.ScheduleOccurrenceWindowGQL | null,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
* Read scheduleOccurrence with top-level variables aligned to server reset targets.
|
|
165
|
+
*/
|
|
166
|
+
export function useScheduleOccurrence(
|
|
167
|
+
p: Partial<Schedule.ScheduleOccurrenceVariables>,
|
|
168
|
+
params: UseQueryParams = {},
|
|
169
|
+
) {
|
|
170
|
+
const variables: Partial<Schedule.ScheduleOccurrenceVariables> = p;
|
|
171
|
+
const { data, ...rest } = useQuery(documents.scheduleOccurrenceQry, {
|
|
172
|
+
...params,
|
|
173
|
+
variables: { ...variables, ...params.variables },
|
|
174
|
+
skip: !variables.organizationId || !variables.occurrenceId || !!params.skip,
|
|
175
|
+
});
|
|
176
|
+
return {
|
|
177
|
+
...rest,
|
|
178
|
+
scheduleOccurrence: (data?.scheduleOccurrence ??
|
|
179
|
+
null) as Schedule.ScheduleOccurrenceGQL | null,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/*
|
|
184
|
+
* Read scheduleMyShifts with top-level variables aligned to server reset targets.
|
|
185
|
+
*/
|
|
186
|
+
export function useScheduleMyShifts(
|
|
187
|
+
p: Partial<Schedule.ScheduleMyShiftsVariables>,
|
|
188
|
+
params: UseQueryParams = {},
|
|
189
|
+
) {
|
|
190
|
+
const variables: Partial<Schedule.ScheduleMyShiftsVariables> = p;
|
|
191
|
+
const { data, ...rest } = useQuery(documents.scheduleMyShiftsQry, {
|
|
192
|
+
...params,
|
|
193
|
+
variables: { ...variables, ...params.variables },
|
|
194
|
+
skip:
|
|
195
|
+
!variables.organizationId ||
|
|
196
|
+
!variables.from ||
|
|
197
|
+
!variables.to ||
|
|
198
|
+
!!params.skip,
|
|
199
|
+
});
|
|
200
|
+
return {
|
|
201
|
+
...rest,
|
|
202
|
+
scheduleMyShifts: (data?.scheduleMyShifts ??
|
|
203
|
+
null) as Schedule.ScheduleOccurrenceWindowGQL | null,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
* Read scheduleOpenShifts with top-level variables aligned to server reset targets.
|
|
209
|
+
*/
|
|
210
|
+
export function useScheduleOpenShifts(
|
|
211
|
+
p: Partial<Schedule.ScheduleOpenShiftsVariables>,
|
|
212
|
+
params: UseQueryParams = {},
|
|
213
|
+
) {
|
|
214
|
+
const variables: Partial<Schedule.ScheduleOpenShiftsVariables> = p;
|
|
215
|
+
const { data, ...rest } = useQuery(documents.scheduleOpenShiftsQry, {
|
|
216
|
+
...params,
|
|
217
|
+
variables: { ...variables, ...params.variables },
|
|
218
|
+
skip:
|
|
219
|
+
!variables.organizationId ||
|
|
220
|
+
!variables.from ||
|
|
221
|
+
!variables.to ||
|
|
222
|
+
!!params.skip,
|
|
223
|
+
});
|
|
224
|
+
return {
|
|
225
|
+
...rest,
|
|
226
|
+
scheduleOpenShifts: (data?.scheduleOpenShifts ??
|
|
227
|
+
null) as Array<Schedule.ScheduleOpenShiftGQL> | null,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/*
|
|
232
|
+
* Read scheduleShiftEligibility with top-level variables aligned to server reset targets.
|
|
233
|
+
*/
|
|
234
|
+
export function useScheduleShiftEligibility(
|
|
235
|
+
p: Partial<Schedule.ScheduleShiftEligibilityVariables>,
|
|
236
|
+
params: UseQueryParams = {},
|
|
237
|
+
) {
|
|
238
|
+
const variables: Partial<Schedule.ScheduleShiftEligibilityVariables> = p;
|
|
239
|
+
const { data, ...rest } = useQuery(documents.scheduleShiftEligibilityQry, {
|
|
240
|
+
...params,
|
|
241
|
+
variables: { ...variables, ...params.variables },
|
|
242
|
+
skip: !variables.organizationId || !variables.occurrenceId || !!params.skip,
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
...rest,
|
|
246
|
+
scheduleShiftEligibility: (data?.scheduleShiftEligibility ??
|
|
247
|
+
null) as Schedule.ScheduleEligibilityGQL | null,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/*
|
|
252
|
+
* Read scheduleShiftCandidates with top-level variables aligned to server reset targets.
|
|
253
|
+
*/
|
|
254
|
+
export function useScheduleShiftCandidates(
|
|
255
|
+
p: Partial<Schedule.ScheduleShiftCandidatesVariables>,
|
|
256
|
+
params: UseQueryParams = {},
|
|
257
|
+
) {
|
|
258
|
+
const variables: Partial<Schedule.ScheduleShiftCandidatesVariables> = p;
|
|
259
|
+
const { data, ...rest } = useQuery(documents.scheduleShiftCandidatesQry, {
|
|
260
|
+
...params,
|
|
261
|
+
variables: { ...variables, ...params.variables },
|
|
262
|
+
skip: !variables.organizationId || !variables.occurrenceId || !!params.skip,
|
|
263
|
+
});
|
|
264
|
+
return {
|
|
265
|
+
...rest,
|
|
266
|
+
scheduleShiftCandidates: (data?.scheduleShiftCandidates ??
|
|
267
|
+
null) as Array<Schedule.ScheduleShiftCandidateGQL> | null,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/*
|
|
272
|
+
* Read scheduleSeriesList with top-level variables aligned to server reset targets.
|
|
273
|
+
*/
|
|
274
|
+
export function useScheduleSeriesList(
|
|
275
|
+
p: Partial<Schedule.ScheduleSeriesListVariables>,
|
|
276
|
+
params: UseQueryParams = {},
|
|
277
|
+
) {
|
|
278
|
+
const variables: Partial<Schedule.ScheduleSeriesListVariables> = p;
|
|
279
|
+
const { data, ...rest } = useQuery(documents.scheduleSeriesListQry, {
|
|
280
|
+
...params,
|
|
281
|
+
variables: { ...variables, ...params.variables },
|
|
282
|
+
skip: !variables.organizationId || !variables.calendarId || !!params.skip,
|
|
283
|
+
});
|
|
284
|
+
return {
|
|
285
|
+
...rest,
|
|
286
|
+
scheduleSeriesList: (data?.scheduleSeriesList ??
|
|
287
|
+
null) as Array<Schedule.ScheduleSeriesGQL> | null,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/*
|
|
292
|
+
* Read scheduleDemands with top-level variables aligned to server reset targets.
|
|
293
|
+
*/
|
|
294
|
+
export function useScheduleDemands(
|
|
295
|
+
p: Partial<Schedule.ScheduleDemandsVariables>,
|
|
296
|
+
params: UseQueryParams = {},
|
|
297
|
+
) {
|
|
298
|
+
const variables: Partial<Schedule.ScheduleDemandsVariables> = p;
|
|
299
|
+
const { data, ...rest } = useQuery(documents.scheduleDemandsQry, {
|
|
300
|
+
...params,
|
|
301
|
+
variables: { ...variables, ...params.variables },
|
|
302
|
+
skip:
|
|
303
|
+
!variables.organizationId ||
|
|
304
|
+
!variables.calendarId ||
|
|
305
|
+
!variables.from ||
|
|
306
|
+
!variables.to ||
|
|
307
|
+
!!params.skip,
|
|
308
|
+
});
|
|
309
|
+
return {
|
|
310
|
+
...rest,
|
|
311
|
+
scheduleDemands: (data?.scheduleDemands ??
|
|
312
|
+
null) as Array<Schedule.ScheduleDemandGQL> | null,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/*
|
|
317
|
+
* Read scheduleRules with top-level variables aligned to server reset targets.
|
|
318
|
+
*/
|
|
319
|
+
export function useScheduleRules(
|
|
320
|
+
p: Partial<Schedule.ScheduleRulesVariables> | string | null | undefined,
|
|
321
|
+
params: UseQueryParams = {},
|
|
322
|
+
) {
|
|
323
|
+
const variables: Partial<Schedule.ScheduleRulesVariables> =
|
|
324
|
+
typeof p === 'string' ? { organizationId: p } : p || {};
|
|
325
|
+
const { data, ...rest } = useQuery(documents.scheduleRulesQry, {
|
|
326
|
+
...params,
|
|
327
|
+
variables: { ...variables, ...params.variables },
|
|
328
|
+
skip: !variables.organizationId || !!params.skip,
|
|
329
|
+
});
|
|
330
|
+
return {
|
|
331
|
+
...rest,
|
|
332
|
+
scheduleRules: (data?.scheduleRules ??
|
|
333
|
+
null) as Array<Schedule.ScheduleRuleGQL> | null,
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/*
|
|
338
|
+
* Read scheduleViolations with top-level variables aligned to server reset targets.
|
|
339
|
+
*/
|
|
340
|
+
export function useScheduleViolations(
|
|
341
|
+
p: Partial<Schedule.ScheduleViolationsVariables>,
|
|
342
|
+
params: UseQueryParams = {},
|
|
343
|
+
) {
|
|
344
|
+
const variables: Partial<Schedule.ScheduleViolationsVariables> = p;
|
|
345
|
+
const { data, ...rest } = useQuery(documents.scheduleViolationsQry, {
|
|
346
|
+
...params,
|
|
347
|
+
variables: { ...variables, ...params.variables },
|
|
348
|
+
skip:
|
|
349
|
+
!variables.organizationId ||
|
|
350
|
+
!variables.calendarId ||
|
|
351
|
+
!variables.from ||
|
|
352
|
+
!variables.to ||
|
|
353
|
+
!!params.skip,
|
|
354
|
+
});
|
|
355
|
+
return {
|
|
356
|
+
...rest,
|
|
357
|
+
scheduleViolations: (data?.scheduleViolations ??
|
|
358
|
+
null) as Array<Schedule.ScheduleViolationGQL> | null,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/*
|
|
363
|
+
* Read schedulePublishPreflight with top-level variables aligned to server reset targets.
|
|
364
|
+
*/
|
|
365
|
+
export function useSchedulePublishPreflight(
|
|
366
|
+
p: Partial<Schedule.SchedulePublishPreflightVariables>,
|
|
367
|
+
params: UseQueryParams = {},
|
|
368
|
+
) {
|
|
369
|
+
const variables: Partial<Schedule.SchedulePublishPreflightVariables> = p;
|
|
370
|
+
const { data, ...rest } = useQuery(documents.schedulePublishPreflightQry, {
|
|
371
|
+
...params,
|
|
372
|
+
variables: { ...variables, ...params.variables },
|
|
373
|
+
skip:
|
|
374
|
+
!variables.organizationId ||
|
|
375
|
+
!variables.calendarId ||
|
|
376
|
+
!variables.from ||
|
|
377
|
+
!variables.to ||
|
|
378
|
+
!!params.skip,
|
|
379
|
+
});
|
|
380
|
+
return {
|
|
381
|
+
...rest,
|
|
382
|
+
schedulePublishPreflight: (data?.schedulePublishPreflight ??
|
|
383
|
+
null) as Schedule.SchedulePublishPreflightGQL | null,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/*
|
|
388
|
+
* Read schedulePublications with top-level variables aligned to server reset targets.
|
|
389
|
+
*/
|
|
390
|
+
export function useSchedulePublications(
|
|
391
|
+
p: Partial<Schedule.SchedulePublicationsVariables>,
|
|
392
|
+
params: UseQueryParams = {},
|
|
393
|
+
) {
|
|
394
|
+
const variables: Partial<Schedule.SchedulePublicationsVariables> = p;
|
|
395
|
+
const { data, ...rest } = useQuery(documents.schedulePublicationsQry, {
|
|
396
|
+
...params,
|
|
397
|
+
variables: { ...variables, ...params.variables },
|
|
398
|
+
skip: !variables.organizationId || !variables.calendarId || !!params.skip,
|
|
399
|
+
});
|
|
400
|
+
return {
|
|
401
|
+
...rest,
|
|
402
|
+
schedulePublications: (data?.schedulePublications ??
|
|
403
|
+
null) as Array<Schedule.SchedulePublicationGQL> | null,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/*
|
|
408
|
+
* Read scheduleRequests with top-level variables aligned to server reset targets.
|
|
409
|
+
*/
|
|
410
|
+
export function useScheduleRequests(
|
|
411
|
+
p: Partial<Schedule.ScheduleRequestsVariables>,
|
|
412
|
+
params: UseQueryParams = {},
|
|
413
|
+
) {
|
|
414
|
+
const variables: Partial<Schedule.ScheduleRequestsVariables> = p;
|
|
415
|
+
const { data, ...rest } = useQuery(documents.scheduleRequestsQry, {
|
|
416
|
+
...params,
|
|
417
|
+
variables: { ...variables, ...params.variables },
|
|
418
|
+
skip: !variables.organizationId || !!params.skip,
|
|
419
|
+
});
|
|
420
|
+
return {
|
|
421
|
+
...rest,
|
|
422
|
+
scheduleRequests: (data?.scheduleRequests ??
|
|
423
|
+
null) as Array<Schedule.ScheduleRequestGQL> | null,
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/*
|
|
428
|
+
* Read scheduleRequest with top-level variables aligned to server reset targets.
|
|
429
|
+
*/
|
|
430
|
+
export function useScheduleRequest(
|
|
431
|
+
p: Partial<Schedule.ScheduleRequestVariables>,
|
|
432
|
+
params: UseQueryParams = {},
|
|
433
|
+
) {
|
|
434
|
+
const variables: Partial<Schedule.ScheduleRequestVariables> = p;
|
|
435
|
+
const { data, ...rest } = useQuery(documents.scheduleRequestQry, {
|
|
436
|
+
...params,
|
|
437
|
+
variables: { ...variables, ...params.variables },
|
|
438
|
+
skip: !variables.organizationId || !variables.requestId || !!params.skip,
|
|
439
|
+
});
|
|
440
|
+
return {
|
|
441
|
+
...rest,
|
|
442
|
+
scheduleRequest: (data?.scheduleRequest ??
|
|
443
|
+
null) as Schedule.ScheduleRequestGQL | null,
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/*
|
|
448
|
+
* Read scheduleTimeOffList with top-level variables aligned to server reset targets.
|
|
449
|
+
*/
|
|
450
|
+
export function useScheduleTimeOffList(
|
|
451
|
+
p: Partial<Schedule.ScheduleTimeOffListVariables>,
|
|
452
|
+
params: UseQueryParams = {},
|
|
453
|
+
) {
|
|
454
|
+
const variables: Partial<Schedule.ScheduleTimeOffListVariables> = p;
|
|
455
|
+
const { data, ...rest } = useQuery(documents.scheduleTimeOffListQry, {
|
|
456
|
+
...params,
|
|
457
|
+
variables: { ...variables, ...params.variables },
|
|
458
|
+
skip: !variables.organizationId || !!params.skip,
|
|
459
|
+
});
|
|
460
|
+
return {
|
|
461
|
+
...rest,
|
|
462
|
+
scheduleTimeOffList: (data?.scheduleTimeOffList ??
|
|
463
|
+
null) as Array<Schedule.ScheduleTimeOffGQL> | null,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/*
|
|
468
|
+
* Read scheduleProjects with top-level variables aligned to server reset targets.
|
|
469
|
+
*/
|
|
470
|
+
export function useScheduleProjects(
|
|
471
|
+
p: Partial<Schedule.ScheduleProjectsVariables> | string | null | undefined,
|
|
472
|
+
params: UseQueryParams = {},
|
|
473
|
+
) {
|
|
474
|
+
const variables: Partial<Schedule.ScheduleProjectsVariables> =
|
|
475
|
+
typeof p === 'string' ? { organizationId: p } : p || {};
|
|
476
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectsQry, {
|
|
477
|
+
...params,
|
|
478
|
+
variables: { ...variables, ...params.variables },
|
|
479
|
+
skip: !variables.organizationId || !!params.skip,
|
|
480
|
+
});
|
|
481
|
+
return {
|
|
482
|
+
...rest,
|
|
483
|
+
scheduleProjects: (data?.scheduleProjects ??
|
|
484
|
+
null) as Array<Schedule.ScheduleProjectGQL> | null,
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/*
|
|
489
|
+
* Read scheduleProject with top-level variables aligned to server reset targets.
|
|
490
|
+
*/
|
|
491
|
+
export function useScheduleProject(
|
|
492
|
+
p: Partial<Schedule.ScheduleProjectVariables> | string | null | undefined,
|
|
493
|
+
params: UseQueryParams = {},
|
|
494
|
+
) {
|
|
495
|
+
const variables: Partial<Schedule.ScheduleProjectVariables> =
|
|
496
|
+
typeof p === 'string' ? { projectId: p } : p || {};
|
|
497
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectQry, {
|
|
498
|
+
...params,
|
|
499
|
+
variables: { ...variables, ...params.variables },
|
|
500
|
+
skip: !variables.projectId || !!params.skip,
|
|
501
|
+
});
|
|
502
|
+
return {
|
|
503
|
+
...rest,
|
|
504
|
+
scheduleProject: (data?.scheduleProject ??
|
|
505
|
+
null) as Schedule.ScheduleProjectGQL | null,
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/*
|
|
510
|
+
* Read scheduleProjectNetwork with top-level variables aligned to server reset targets.
|
|
511
|
+
*/
|
|
512
|
+
export function useScheduleProjectNetwork(
|
|
513
|
+
p:
|
|
514
|
+
| Partial<Schedule.ScheduleProjectNetworkVariables>
|
|
515
|
+
| string
|
|
516
|
+
| null
|
|
517
|
+
| undefined,
|
|
518
|
+
params: UseQueryParams = {},
|
|
519
|
+
) {
|
|
520
|
+
const variables: Partial<Schedule.ScheduleProjectNetworkVariables> =
|
|
521
|
+
typeof p === 'string' ? { projectId: p } : p || {};
|
|
522
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectNetworkQry, {
|
|
523
|
+
...params,
|
|
524
|
+
variables: { ...variables, ...params.variables },
|
|
525
|
+
skip: !variables.projectId || !!params.skip,
|
|
526
|
+
});
|
|
527
|
+
return {
|
|
528
|
+
...rest,
|
|
529
|
+
scheduleProjectNetwork: (data?.scheduleProjectNetwork ??
|
|
530
|
+
null) as Schedule.ScheduleProjectNetworkGQL | null,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/*
|
|
535
|
+
* Read scheduleProjectRuns with top-level variables aligned to server reset targets.
|
|
536
|
+
*/
|
|
537
|
+
export function useScheduleProjectRuns(
|
|
538
|
+
p: Partial<Schedule.ScheduleProjectRunsVariables> | string | null | undefined,
|
|
539
|
+
params: UseQueryParams = {},
|
|
540
|
+
) {
|
|
541
|
+
const variables: Partial<Schedule.ScheduleProjectRunsVariables> =
|
|
542
|
+
typeof p === 'string' ? { projectId: p } : p || {};
|
|
543
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectRunsQry, {
|
|
544
|
+
...params,
|
|
545
|
+
variables: { ...variables, ...params.variables },
|
|
546
|
+
skip: !variables.projectId || !!params.skip,
|
|
547
|
+
});
|
|
548
|
+
return {
|
|
549
|
+
...rest,
|
|
550
|
+
scheduleProjectRuns: (data?.scheduleProjectRuns ??
|
|
551
|
+
null) as Array<Schedule.ScheduleProjectRunGQL> | null,
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/*
|
|
556
|
+
* Read scheduleProjectRun with top-level variables aligned to server reset targets.
|
|
557
|
+
*/
|
|
558
|
+
export function useScheduleProjectRun(
|
|
559
|
+
p: Partial<Schedule.ScheduleProjectRunVariables>,
|
|
560
|
+
params: UseQueryParams = {},
|
|
561
|
+
) {
|
|
562
|
+
const variables: Partial<Schedule.ScheduleProjectRunVariables> = p;
|
|
563
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectRunQry, {
|
|
564
|
+
...params,
|
|
565
|
+
variables: { ...variables, ...params.variables },
|
|
566
|
+
skip: !variables.projectId || !variables.runId || !!params.skip,
|
|
567
|
+
});
|
|
568
|
+
return {
|
|
569
|
+
...rest,
|
|
570
|
+
scheduleProjectRun: (data?.scheduleProjectRun ??
|
|
571
|
+
null) as Schedule.ScheduleProjectRunGQL | null,
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/*
|
|
576
|
+
* Read scheduleBaselines with top-level variables aligned to server reset targets.
|
|
577
|
+
*/
|
|
578
|
+
export function useScheduleBaselines(
|
|
579
|
+
p: Partial<Schedule.ScheduleBaselinesVariables> | string | null | undefined,
|
|
580
|
+
params: UseQueryParams = {},
|
|
581
|
+
) {
|
|
582
|
+
const variables: Partial<Schedule.ScheduleBaselinesVariables> =
|
|
583
|
+
typeof p === 'string' ? { projectId: p } : p || {};
|
|
584
|
+
const { data, ...rest } = useQuery(documents.scheduleBaselinesQry, {
|
|
585
|
+
...params,
|
|
586
|
+
variables: { ...variables, ...params.variables },
|
|
587
|
+
skip: !variables.projectId || !!params.skip,
|
|
588
|
+
});
|
|
589
|
+
return {
|
|
590
|
+
...rest,
|
|
591
|
+
scheduleBaselines: (data?.scheduleBaselines ??
|
|
592
|
+
null) as Array<Schedule.ScheduleBaselineGQL> | null,
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/*
|
|
597
|
+
* Read scheduleBaselineActivities with top-level variables aligned to server reset targets.
|
|
598
|
+
*/
|
|
599
|
+
export function useScheduleBaselineActivities(
|
|
600
|
+
p: Partial<Schedule.ScheduleBaselineActivitiesVariables>,
|
|
601
|
+
params: UseQueryParams = {},
|
|
602
|
+
) {
|
|
603
|
+
const variables: Partial<Schedule.ScheduleBaselineActivitiesVariables> = p;
|
|
604
|
+
const { data, ...rest } = useQuery(documents.scheduleBaselineActivitiesQry, {
|
|
605
|
+
...params,
|
|
606
|
+
variables: { ...variables, ...params.variables },
|
|
607
|
+
skip: !variables.projectId || !variables.baselineId || !!params.skip,
|
|
608
|
+
});
|
|
609
|
+
return {
|
|
610
|
+
...rest,
|
|
611
|
+
scheduleBaselineActivities: (data?.scheduleBaselineActivities ??
|
|
612
|
+
null) as Array<Schedule.ScheduleBaselineActivityGQL> | null,
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/*
|
|
617
|
+
* Read scheduleBaselineVariance with top-level variables aligned to server reset targets.
|
|
618
|
+
*/
|
|
619
|
+
export function useScheduleBaselineVariance(
|
|
620
|
+
p: Partial<Schedule.ScheduleBaselineVarianceVariables>,
|
|
621
|
+
params: UseQueryParams = {},
|
|
622
|
+
) {
|
|
623
|
+
const variables: Partial<Schedule.ScheduleBaselineVarianceVariables> = p;
|
|
624
|
+
const { data, ...rest } = useQuery(documents.scheduleBaselineVarianceQry, {
|
|
625
|
+
...params,
|
|
626
|
+
variables: { ...variables, ...params.variables },
|
|
627
|
+
skip: !variables.projectId || !!params.skip,
|
|
628
|
+
});
|
|
629
|
+
return {
|
|
630
|
+
...rest,
|
|
631
|
+
scheduleBaselineVariance: (data?.scheduleBaselineVariance ??
|
|
632
|
+
null) as Schedule.ScheduleBaselineVarianceGQL | null,
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/*
|
|
637
|
+
* Read scheduleWorkCalendar with top-level variables aligned to server reset targets.
|
|
638
|
+
*/
|
|
639
|
+
export function useScheduleWorkCalendar(
|
|
640
|
+
p: Partial<Schedule.ScheduleWorkCalendarVariables>,
|
|
641
|
+
params: UseQueryParams = {},
|
|
642
|
+
) {
|
|
643
|
+
const variables: Partial<Schedule.ScheduleWorkCalendarVariables> = p;
|
|
644
|
+
const { data, ...rest } = useQuery(documents.scheduleWorkCalendarQry, {
|
|
645
|
+
...params,
|
|
646
|
+
variables: { ...variables, ...params.variables },
|
|
647
|
+
skip:
|
|
648
|
+
!variables.organizationId || !variables.workCalendarId || !!params.skip,
|
|
649
|
+
});
|
|
650
|
+
return {
|
|
651
|
+
...rest,
|
|
652
|
+
scheduleWorkCalendar: (data?.scheduleWorkCalendar ??
|
|
653
|
+
null) as Schedule.ScheduleWorkCalendarGQL | null | null,
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/*
|
|
658
|
+
* Read scheduleResource with top-level variables aligned to server reset targets.
|
|
659
|
+
*/
|
|
660
|
+
export function useScheduleResource(
|
|
661
|
+
p: Partial<Schedule.ScheduleResourceVariables>,
|
|
662
|
+
params: UseQueryParams = {},
|
|
663
|
+
) {
|
|
664
|
+
const variables: Partial<Schedule.ScheduleResourceVariables> = p;
|
|
665
|
+
const { data, ...rest } = useQuery(documents.scheduleResourceQry, {
|
|
666
|
+
...params,
|
|
667
|
+
variables: { ...variables, ...params.variables },
|
|
668
|
+
skip: !variables.organizationId || !variables.resourceId || !!params.skip,
|
|
669
|
+
});
|
|
670
|
+
return {
|
|
671
|
+
...rest,
|
|
672
|
+
scheduleResource: (data?.scheduleResource ??
|
|
673
|
+
null) as Schedule.ScheduleResourceGQL | null | null,
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/*
|
|
678
|
+
* Read scheduleSeries with top-level variables aligned to server reset targets.
|
|
679
|
+
*/
|
|
680
|
+
export function useScheduleSeries(
|
|
681
|
+
p: Partial<Schedule.ScheduleSeriesVariables>,
|
|
682
|
+
params: UseQueryParams = {},
|
|
683
|
+
) {
|
|
684
|
+
const variables: Partial<Schedule.ScheduleSeriesVariables> = p;
|
|
685
|
+
const { data, ...rest } = useQuery(documents.scheduleSeriesQry, {
|
|
686
|
+
...params,
|
|
687
|
+
variables: { ...variables, ...params.variables },
|
|
688
|
+
skip: !variables.organizationId || !variables.seriesId || !!params.skip,
|
|
689
|
+
});
|
|
690
|
+
return {
|
|
691
|
+
...rest,
|
|
692
|
+
scheduleSeries: (data?.scheduleSeries ??
|
|
693
|
+
null) as Schedule.ScheduleSeriesGQL | null | null,
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/*
|
|
698
|
+
* Read scheduleCalendarAccessGrants with top-level variables aligned to server reset targets.
|
|
699
|
+
*/
|
|
700
|
+
export function useScheduleCalendarAccessGrants(
|
|
701
|
+
p: Partial<Schedule.ScheduleCalendarAccessGrantsVariables>,
|
|
702
|
+
params: UseQueryParams = {},
|
|
703
|
+
) {
|
|
704
|
+
const variables: Partial<Schedule.ScheduleCalendarAccessGrantsVariables> = p;
|
|
705
|
+
const { data, ...rest } = useQuery(
|
|
706
|
+
documents.scheduleCalendarAccessGrantsQry,
|
|
707
|
+
{
|
|
708
|
+
...params,
|
|
709
|
+
variables: { ...variables, ...params.variables },
|
|
710
|
+
skip: !variables.organizationId || !variables.calendarId || !!params.skip,
|
|
711
|
+
},
|
|
712
|
+
);
|
|
713
|
+
return {
|
|
714
|
+
...rest,
|
|
715
|
+
scheduleCalendarAccessGrants: (data?.scheduleCalendarAccessGrants ??
|
|
716
|
+
null) as Array<Schedule.ScheduleDocAccessGrantGQL> | null,
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/*
|
|
721
|
+
* Read scheduleProjectAccessGrants with top-level variables aligned to server reset targets.
|
|
722
|
+
*/
|
|
723
|
+
export function useScheduleProjectAccessGrants(
|
|
724
|
+
p: Partial<Schedule.ScheduleProjectAccessGrantsVariables>,
|
|
725
|
+
params: UseQueryParams = {},
|
|
726
|
+
) {
|
|
727
|
+
const variables: Partial<Schedule.ScheduleProjectAccessGrantsVariables> = p;
|
|
728
|
+
const { data, ...rest } = useQuery(documents.scheduleProjectAccessGrantsQry, {
|
|
729
|
+
...params,
|
|
730
|
+
variables: { ...variables, ...params.variables },
|
|
731
|
+
skip: !variables.organizationId || !variables.projectId || !!params.skip,
|
|
732
|
+
});
|
|
733
|
+
return {
|
|
734
|
+
...rest,
|
|
735
|
+
scheduleProjectAccessGrants: (data?.scheduleProjectAccessGrants ??
|
|
736
|
+
null) as Array<Schedule.ScheduleDocAccessGrantGQL> | null,
|
|
737
|
+
};
|
|
738
|
+
}
|