@uidu/client 3.13.0 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/declarations/src/actions.d.ts +10 -0
- package/dist/declarations/src/benefit-enrollments.d.ts +5 -0
- package/dist/declarations/src/benefits.d.ts +5 -0
- package/dist/declarations/src/bookings.d.ts +22 -0
- package/dist/declarations/src/calls.d.ts +8 -0
- package/dist/declarations/src/campaigns.d.ts +12 -0
- package/dist/declarations/src/client.d.ts +13 -1
- package/dist/declarations/src/cms.d.ts +32 -0
- package/dist/declarations/src/contacts.d.ts +16 -0
- package/dist/declarations/src/courses.d.ts +23 -0
- package/dist/declarations/src/donations.d.ts +19 -0
- package/dist/declarations/src/events.d.ts +19 -0
- package/dist/declarations/src/forms.d.ts +19 -0
- package/dist/declarations/src/generated/index.d.ts +10 -10
- package/dist/declarations/src/goals.d.ts +4 -0
- package/dist/declarations/src/help-center.d.ts +4 -0
- package/dist/declarations/src/kb.d.ts +15 -0
- package/dist/declarations/src/models.d.ts +54 -0
- package/dist/declarations/src/mutations.d.ts +155 -0
- package/dist/declarations/src/notes.d.ts +4 -0
- package/dist/declarations/src/people.d.ts +8 -0
- package/dist/declarations/src/search.d.ts +7 -0
- package/dist/declarations/src/spaces.d.ts +4 -0
- package/dist/declarations/src/stories.d.ts +11 -0
- package/dist/declarations/src/system.d.ts +4 -0
- package/dist/declarations/src/tasks.d.ts +4 -0
- package/dist/declarations/src/types.d.ts +4 -0
- package/dist/uidu-client.cjs.dev.js +532 -8
- package/dist/uidu-client.cjs.prod.js +532 -8
- package/dist/uidu-client.esm.js +532 -8
- package/package.json +1 -1
- package/src/actions.ts +10 -6
- package/src/benefit-enrollments.ts +5 -0
- package/src/benefits.ts +5 -0
- package/src/bookings.ts +22 -0
- package/src/calls.ts +8 -0
- package/src/campaigns.ts +12 -0
- package/src/client.ts +13 -1
- package/src/cms.ts +32 -0
- package/src/contacts.ts +16 -0
- package/src/courses.ts +23 -0
- package/src/donations.ts +19 -0
- package/src/events.ts +19 -0
- package/src/forms.ts +19 -0
- package/src/generated/index.ts +2 -2
- package/src/goals.ts +4 -0
- package/src/help-center.ts +4 -0
- package/src/kb.ts +15 -0
- package/src/models.ts +54 -0
- package/src/mutations.ts +155 -0
- package/src/notes.ts +4 -0
- package/src/people.ts +8 -0
- package/src/queries/cms/GetPage.graphql +1 -0
- package/src/search.ts +7 -0
- package/src/spaces.ts +4 -0
- package/src/stories.ts +11 -0
- package/src/system.ts +4 -0
- package/src/tasks.ts +4 -0
- package/src/types.ts +4 -0
|
@@ -23,6 +23,9 @@ export type ModelItem = ModelItemFieldsFragment;
|
|
|
23
23
|
export declare function listModels(client: UiduClient, variables: {
|
|
24
24
|
workspaceAppId: string;
|
|
25
25
|
}): Promise<Model[]>;
|
|
26
|
+
/**
|
|
27
|
+
* One model with its fields, or null when the id is not a Model.
|
|
28
|
+
*/
|
|
26
29
|
export declare function getModel(client: UiduClient, variables: {
|
|
27
30
|
id: string;
|
|
28
31
|
}): Promise<Model | null>;
|
|
@@ -34,6 +37,10 @@ export declare function listModelItems(client: UiduClient, variables: {
|
|
|
34
37
|
modelId: string;
|
|
35
38
|
params?: SearchParams;
|
|
36
39
|
}): Promise<ModelItem[]>;
|
|
40
|
+
/**
|
|
41
|
+
* One model item with its values and its `model.id`, or null when the id is
|
|
42
|
+
* not a ModelItem.
|
|
43
|
+
*/
|
|
37
44
|
export declare function getModelItem(client: UiduClient, variables: {
|
|
38
45
|
id: string;
|
|
39
46
|
}): Promise<(ModelItem & {
|
|
@@ -41,6 +48,12 @@ export declare function getModelItem(client: UiduClient, variables: {
|
|
|
41
48
|
id: string;
|
|
42
49
|
};
|
|
43
50
|
}) | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Create a model in a WorkspaceApp (`attributes.modelableId`, `name`,
|
|
53
|
+
* `namePlural`). Returns the payload (with `errors`) or null.
|
|
54
|
+
*
|
|
55
|
+
* To find-or-create a model and its fields in one call, use `ensureModel`.
|
|
56
|
+
*/
|
|
44
57
|
export declare function createModel(client: UiduClient, variables: CreateModelMutationVariables): Promise<{
|
|
45
58
|
__typename?: "CreateModelPayload";
|
|
46
59
|
model?: {
|
|
@@ -72,6 +85,10 @@ export declare function createModel(client: UiduClient, variables: CreateModelMu
|
|
|
72
85
|
type: string;
|
|
73
86
|
}>;
|
|
74
87
|
} | null>;
|
|
88
|
+
/**
|
|
89
|
+
* Rename or reconfigure a model: `{ input: { id, attributes } }`. Returns the
|
|
90
|
+
* payload (with `errors`) or null.
|
|
91
|
+
*/
|
|
75
92
|
export declare function updateModel(client: UiduClient, variables: UpdateModelMutationVariables): Promise<{
|
|
76
93
|
__typename?: "UpdateModelPayload";
|
|
77
94
|
model?: {
|
|
@@ -132,6 +149,10 @@ export declare function createField(client: UiduClient, variables: CreateFieldMu
|
|
|
132
149
|
type: string;
|
|
133
150
|
}>;
|
|
134
151
|
} | null>;
|
|
152
|
+
/**
|
|
153
|
+
* Update a field (name, `required`, preferences…): `{ input: { id, attributes
|
|
154
|
+
* } }`. Returns the payload (with `errors`) or null.
|
|
155
|
+
*/
|
|
135
156
|
export declare function updateField(client: UiduClient, variables: UpdateFieldMutationVariables): Promise<{
|
|
136
157
|
__typename?: "UpdateFieldPayload";
|
|
137
158
|
field?: {
|
|
@@ -157,6 +178,10 @@ export declare function updateField(client: UiduClient, variables: UpdateFieldMu
|
|
|
157
178
|
type: string;
|
|
158
179
|
}>;
|
|
159
180
|
} | null>;
|
|
181
|
+
/**
|
|
182
|
+
* Delete a field from its model by `{ input: { id } }`. Returns the payload
|
|
183
|
+
* (with `errors`) or null.
|
|
184
|
+
*/
|
|
160
185
|
export declare function deleteField(client: UiduClient, variables: DeleteFieldMutationVariables): Promise<{
|
|
161
186
|
__typename?: "DeleteFieldPayload";
|
|
162
187
|
field?: {
|
|
@@ -170,6 +195,10 @@ export declare function deleteField(client: UiduClient, variables: DeleteFieldMu
|
|
|
170
195
|
type: string;
|
|
171
196
|
}>;
|
|
172
197
|
} | null>;
|
|
198
|
+
/**
|
|
199
|
+
* Add an option to a select-kind field (`attributes.fieldId`, `name`,
|
|
200
|
+
* `color`). Returns the payload (with `errors`) or null.
|
|
201
|
+
*/
|
|
173
202
|
export declare function createFieldOption(client: UiduClient, variables: CreateFieldOptionMutationVariables): Promise<{
|
|
174
203
|
__typename?: "CreateFieldOptionPayload";
|
|
175
204
|
fieldOption?: {
|
|
@@ -186,6 +215,10 @@ export declare function createFieldOption(client: UiduClient, variables: CreateF
|
|
|
186
215
|
type: string;
|
|
187
216
|
}>;
|
|
188
217
|
} | null>;
|
|
218
|
+
/**
|
|
219
|
+
* Update a select option: `{ input: { id, attributes } }`. Returns the payload
|
|
220
|
+
* (with `errors`) or null.
|
|
221
|
+
*/
|
|
189
222
|
export declare function updateFieldOption(client: UiduClient, variables: UpdateFieldOptionMutationVariables): Promise<{
|
|
190
223
|
__typename?: "UpdateFieldOptionPayload";
|
|
191
224
|
fieldOption?: {
|
|
@@ -202,6 +235,10 @@ export declare function updateFieldOption(client: UiduClient, variables: UpdateF
|
|
|
202
235
|
type: string;
|
|
203
236
|
}>;
|
|
204
237
|
} | null>;
|
|
238
|
+
/**
|
|
239
|
+
* Delete a select option by `{ input: { id } }`. Returns the payload (with
|
|
240
|
+
* `errors`) or null.
|
|
241
|
+
*/
|
|
205
242
|
export declare function deleteFieldOption(client: UiduClient, variables: DeleteFieldOptionMutationVariables): Promise<{
|
|
206
243
|
__typename?: "DeleteFieldOptionPayload";
|
|
207
244
|
fieldOption?: {
|
|
@@ -236,6 +273,11 @@ export declare function createModelItem(client: UiduClient, variables: CreateMod
|
|
|
236
273
|
type: string;
|
|
237
274
|
}>;
|
|
238
275
|
} | null>;
|
|
276
|
+
/**
|
|
277
|
+
* Update an item: `{ input: { id, attributes: { fieldValuesAttributes } } }`,
|
|
278
|
+
* built with `toFieldValuesAttributes`. Returns the payload (with `errors`) or
|
|
279
|
+
* null.
|
|
280
|
+
*/
|
|
239
281
|
export declare function updateModelItem(client: UiduClient, variables: UpdateModelItemMutationVariables): Promise<{
|
|
240
282
|
__typename?: "UpdateModelItemPayload";
|
|
241
283
|
modelItem?: {
|
|
@@ -253,6 +295,10 @@ export declare function updateModelItem(client: UiduClient, variables: UpdateMod
|
|
|
253
295
|
type: string;
|
|
254
296
|
}>;
|
|
255
297
|
} | null>;
|
|
298
|
+
/**
|
|
299
|
+
* Delete an item by `{ input: { id } }`. Returns the payload (with `errors`)
|
|
300
|
+
* or null.
|
|
301
|
+
*/
|
|
256
302
|
export declare function deleteModelItem(client: UiduClient, variables: DeleteModelItemMutationVariables): Promise<{
|
|
257
303
|
__typename?: "DeleteModelItemPayload";
|
|
258
304
|
modelItem?: {
|
|
@@ -266,6 +312,10 @@ export declare function deleteModelItem(client: UiduClient, variables: DeleteMod
|
|
|
266
312
|
type: string;
|
|
267
313
|
}>;
|
|
268
314
|
} | null>;
|
|
315
|
+
/**
|
|
316
|
+
* Set a single value by its FieldValue id: `{ input: { id, attributes: {
|
|
317
|
+
* content: { value } } } }`. Returns the payload (with `errors`) or null.
|
|
318
|
+
*/
|
|
269
319
|
export declare function updateFieldValue(client: UiduClient, variables: UpdateFieldValueMutationVariables): Promise<{
|
|
270
320
|
__typename?: "UpdateFieldValuePayload";
|
|
271
321
|
fieldValue?: {
|
|
@@ -280,6 +330,10 @@ export declare function updateFieldValue(client: UiduClient, variables: UpdateFi
|
|
|
280
330
|
type: string;
|
|
281
331
|
}>;
|
|
282
332
|
} | null>;
|
|
333
|
+
/**
|
|
334
|
+
* Clear a single value by its FieldValue id; `deleteLinkedRecord: true` also
|
|
335
|
+
* deletes the record it links to. Returns the payload (with `errors`) or null.
|
|
336
|
+
*/
|
|
283
337
|
export declare function deleteFieldValue(client: UiduClient, variables: DeleteFieldValueMutationVariables): Promise<{
|
|
284
338
|
__typename?: "DeleteFieldValuePayload";
|
|
285
339
|
fieldValue?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateChannelMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmploymentMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type CreateTimeClockMutationVariables, type DeleteChannelMutationVariables, type DeleteContactMutationVariables, type DeleteCourseMutationVariables, type DeleteCompensationMutationVariables, type DeleteDonationCampaignMutationVariables, type DeleteEmploymentMutationVariables, type DeleteFormMutationVariables, type DeleteKbArticleMutationVariables, type DeleteKbCollectionMutationVariables, type DeleteNoteMutationVariables, type DeleteSpaceMutationVariables, type DeleteTaskMutationVariables, type UpdateChannelMutationVariables, type UpdateCompensationMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEmployeeMutationVariables, type UpdateEmploymentMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a course from `{ input: { attributes } }`. Returns the payload (with
|
|
5
|
+
* `errors`) or null.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createCourse(c: UiduClient, v: CreateCourseMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateCoursePayload";
|
|
5
9
|
course?: {
|
|
@@ -13,6 +17,10 @@ export declare function createCourse(c: UiduClient, v: CreateCourseMutationVaria
|
|
|
13
17
|
type: string;
|
|
14
18
|
}>;
|
|
15
19
|
} | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Update a course: `{ input: { id, attributes } }`. Returns the payload (with
|
|
22
|
+
* `errors`) or null.
|
|
23
|
+
*/
|
|
16
24
|
export declare function updateCourse(c: UiduClient, v: UpdateCourseMutationVariables): Promise<{
|
|
17
25
|
__typename?: "UpdateCoursePayload";
|
|
18
26
|
course?: {
|
|
@@ -26,6 +34,10 @@ export declare function updateCourse(c: UiduClient, v: UpdateCourseMutationVaria
|
|
|
26
34
|
type: string;
|
|
27
35
|
}>;
|
|
28
36
|
} | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Delete a course by `{ input: { id } }`. Returns the payload (with `errors`)
|
|
39
|
+
* or null.
|
|
40
|
+
*/
|
|
29
41
|
export declare function deleteCourse(c: UiduClient, v: DeleteCourseMutationVariables): Promise<{
|
|
30
42
|
__typename?: "DeleteCoursePayload";
|
|
31
43
|
course?: {
|
|
@@ -39,6 +51,10 @@ export declare function deleteCourse(c: UiduClient, v: DeleteCourseMutationVaria
|
|
|
39
51
|
type: string;
|
|
40
52
|
}>;
|
|
41
53
|
} | null>;
|
|
54
|
+
/**
|
|
55
|
+
* Create a form, questions included via `attributes.formQuestionsAttributes`.
|
|
56
|
+
* Returns the payload (with `errors`) or null. The new form is at `form.node`.
|
|
57
|
+
*/
|
|
42
58
|
export declare function createForm(c: UiduClient, v: CreateFormMutationVariables): Promise<{
|
|
43
59
|
__typename?: "CreateFormPayload";
|
|
44
60
|
form?: {
|
|
@@ -55,6 +71,10 @@ export declare function createForm(c: UiduClient, v: CreateFormMutationVariables
|
|
|
55
71
|
type: string;
|
|
56
72
|
}>;
|
|
57
73
|
} | null>;
|
|
74
|
+
/**
|
|
75
|
+
* Update a form: `{ input: { id, attributes } }`. Returns the payload (with
|
|
76
|
+
* `errors`) or null.
|
|
77
|
+
*/
|
|
58
78
|
export declare function updateForm(c: UiduClient, v: UpdateFormMutationVariables): Promise<{
|
|
59
79
|
__typename?: "UpdateFormPayload";
|
|
60
80
|
form?: {
|
|
@@ -68,6 +88,10 @@ export declare function updateForm(c: UiduClient, v: UpdateFormMutationVariables
|
|
|
68
88
|
type: string;
|
|
69
89
|
}>;
|
|
70
90
|
} | null>;
|
|
91
|
+
/**
|
|
92
|
+
* Delete a form by `{ input: { id } }`. Returns the payload (with `errors`) or
|
|
93
|
+
* null.
|
|
94
|
+
*/
|
|
71
95
|
export declare function deleteForm(c: UiduClient, v: DeleteFormMutationVariables): Promise<{
|
|
72
96
|
__typename?: "DeleteFormPayload";
|
|
73
97
|
form?: {
|
|
@@ -81,6 +105,10 @@ export declare function deleteForm(c: UiduClient, v: DeleteFormMutationVariables
|
|
|
81
105
|
type: string;
|
|
82
106
|
}>;
|
|
83
107
|
} | null>;
|
|
108
|
+
/**
|
|
109
|
+
* Create a CRM contact from `{ input: { attributes } }`. Returns the payload
|
|
110
|
+
* (with `errors`) or null.
|
|
111
|
+
*/
|
|
84
112
|
export declare function createContact(c: UiduClient, v: CreateContactMutationVariables): Promise<{
|
|
85
113
|
__typename?: "CreateContactPayload";
|
|
86
114
|
contact?: {
|
|
@@ -94,6 +122,10 @@ export declare function createContact(c: UiduClient, v: CreateContactMutationVar
|
|
|
94
122
|
type: string;
|
|
95
123
|
}>;
|
|
96
124
|
} | null>;
|
|
125
|
+
/**
|
|
126
|
+
* Delete a contact by `{ input: { id } }`. Returns the payload (with `errors`)
|
|
127
|
+
* or null.
|
|
128
|
+
*/
|
|
97
129
|
export declare function deleteContact(c: UiduClient, v: DeleteContactMutationVariables): Promise<{
|
|
98
130
|
__typename?: "DeleteContactPayload";
|
|
99
131
|
contact?: {
|
|
@@ -107,6 +139,10 @@ export declare function deleteContact(c: UiduClient, v: DeleteContactMutationVar
|
|
|
107
139
|
type: string;
|
|
108
140
|
}>;
|
|
109
141
|
} | null>;
|
|
142
|
+
/**
|
|
143
|
+
* Create a deal in a pipeline (`attributes.pipelineId`, `statusId`). Returns
|
|
144
|
+
* the payload (with `errors`) or null. The new deal is at `deal.node`.
|
|
145
|
+
*/
|
|
110
146
|
export declare function createDeal(c: UiduClient, v: CreateDealMutationVariables): Promise<{
|
|
111
147
|
__typename?: "CreateDealPayload";
|
|
112
148
|
deal?: {
|
|
@@ -123,6 +159,10 @@ export declare function createDeal(c: UiduClient, v: CreateDealMutationVariables
|
|
|
123
159
|
type: string;
|
|
124
160
|
}>;
|
|
125
161
|
} | null>;
|
|
162
|
+
/**
|
|
163
|
+
* Update a deal, e.g. move it to another `statusId`: `{ input: { id,
|
|
164
|
+
* attributes } }`. Returns the payload (with `errors`) or null.
|
|
165
|
+
*/
|
|
126
166
|
export declare function updateDeal(c: UiduClient, v: UpdateDealMutationVariables): Promise<{
|
|
127
167
|
__typename?: "UpdateDealPayload";
|
|
128
168
|
deal?: {
|
|
@@ -136,6 +176,10 @@ export declare function updateDeal(c: UiduClient, v: UpdateDealMutationVariables
|
|
|
136
176
|
type: string;
|
|
137
177
|
}>;
|
|
138
178
|
} | null>;
|
|
179
|
+
/**
|
|
180
|
+
* Create the HR record for a workspace user (`attributes.userId`). Returns the
|
|
181
|
+
* payload (with `errors`) or null. The new employee is at `employee.node`.
|
|
182
|
+
*/
|
|
139
183
|
export declare function createEmployee(c: UiduClient, v: CreateEmployeeMutationVariables): Promise<{
|
|
140
184
|
__typename?: "CreateEmployeePayload";
|
|
141
185
|
employee?: {
|
|
@@ -159,6 +203,10 @@ export declare function createEmployee(c: UiduClient, v: CreateEmployeeMutationV
|
|
|
159
203
|
type: string;
|
|
160
204
|
}>;
|
|
161
205
|
} | null>;
|
|
206
|
+
/**
|
|
207
|
+
* Update an employee's HR record (code, kiosk PIN, time-clock flags): `{
|
|
208
|
+
* input: { id, attributes } }`. Returns the payload (with `errors`) or null.
|
|
209
|
+
*/
|
|
162
210
|
export declare function updateEmployee(c: UiduClient, v: UpdateEmployeeMutationVariables): Promise<{
|
|
163
211
|
__typename?: "UpdateEmployeePayload";
|
|
164
212
|
employee?: {
|
|
@@ -173,6 +221,11 @@ export declare function updateEmployee(c: UiduClient, v: UpdateEmployeeMutationV
|
|
|
173
221
|
type: string;
|
|
174
222
|
}>;
|
|
175
223
|
} | null>;
|
|
224
|
+
/**
|
|
225
|
+
* Hire: open a new employment (contract) for `attributes.employeeId` with its
|
|
226
|
+
* start date, kind, role and hours. Returns the payload (with `errors`) or
|
|
227
|
+
* null. The new employment is at `employment.node`.
|
|
228
|
+
*/
|
|
176
229
|
export declare function createEmployment(c: UiduClient, v: CreateEmploymentMutationVariables): Promise<{
|
|
177
230
|
__typename?: "CreateEmploymentPayload";
|
|
178
231
|
employment?: {
|
|
@@ -199,6 +252,10 @@ export declare function createEmployment(c: UiduClient, v: CreateEmploymentMutat
|
|
|
199
252
|
type: string;
|
|
200
253
|
}>;
|
|
201
254
|
} | null>;
|
|
255
|
+
/**
|
|
256
|
+
* Update an employment: `{ input: { id, attributes } }`; to end one, prefer
|
|
257
|
+
* `terminateEmployment`. Returns the payload (with `errors`) or null.
|
|
258
|
+
*/
|
|
202
259
|
export declare function updateEmployment(c: UiduClient, v: UpdateEmploymentMutationVariables): Promise<{
|
|
203
260
|
__typename?: "UpdateEmploymentPayload";
|
|
204
261
|
employment?: {
|
|
@@ -223,6 +280,10 @@ export declare function updateEmployment(c: UiduClient, v: UpdateEmploymentMutat
|
|
|
223
280
|
type: string;
|
|
224
281
|
}>;
|
|
225
282
|
} | null>;
|
|
283
|
+
/**
|
|
284
|
+
* Delete an employment by `{ input: { id } }` (to end a contract, use
|
|
285
|
+
* `terminateEmployment` instead). Returns the payload (with `errors`) or null.
|
|
286
|
+
*/
|
|
226
287
|
export declare function deleteEmployment(c: UiduClient, v: DeleteEmploymentMutationVariables): Promise<{
|
|
227
288
|
__typename?: "DeleteEmploymentPayload";
|
|
228
289
|
employment?: {
|
|
@@ -269,6 +330,11 @@ export declare function terminateEmployment(c: UiduClient, args: {
|
|
|
269
330
|
type: string;
|
|
270
331
|
}>;
|
|
271
332
|
} | null>;
|
|
333
|
+
/**
|
|
334
|
+
* Record a time-clock punch (`beginsAt`, optional `finishesAt`, `resourceId`).
|
|
335
|
+
* Returns the payload (with `errors`) or null. The new punch is at
|
|
336
|
+
* `timeClock.node`.
|
|
337
|
+
*/
|
|
272
338
|
export declare function createTimeClock(c: UiduClient, v: CreateTimeClockMutationVariables): Promise<{
|
|
273
339
|
__typename?: "CreateTimeClockPayload";
|
|
274
340
|
timeClock?: {
|
|
@@ -288,6 +354,11 @@ export declare function createTimeClock(c: UiduClient, v: CreateTimeClockMutatio
|
|
|
288
354
|
type: string;
|
|
289
355
|
}>;
|
|
290
356
|
} | null>;
|
|
357
|
+
/**
|
|
358
|
+
* Add a pay item to an employment (`attributes.employmentId`, `amount`,
|
|
359
|
+
* `currency`, `frequency`, `effectiveFrom`). Returns the payload (with
|
|
360
|
+
* `errors`) or null. The new item is at `compensation.node`.
|
|
361
|
+
*/
|
|
291
362
|
export declare function createCompensation(c: UiduClient, v: CreateCompensationMutationVariables): Promise<{
|
|
292
363
|
__typename?: "CreateCompensationPayload";
|
|
293
364
|
compensation?: {
|
|
@@ -309,6 +380,10 @@ export declare function createCompensation(c: UiduClient, v: CreateCompensationM
|
|
|
309
380
|
type: string;
|
|
310
381
|
}>;
|
|
311
382
|
} | null>;
|
|
383
|
+
/**
|
|
384
|
+
* Update a pay item: `{ input: { id, attributes } }`. Returns the payload
|
|
385
|
+
* (with `errors`) or null.
|
|
386
|
+
*/
|
|
312
387
|
export declare function updateCompensation(c: UiduClient, v: UpdateCompensationMutationVariables): Promise<{
|
|
313
388
|
__typename?: "UpdateCompensationPayload";
|
|
314
389
|
compensation?: {
|
|
@@ -327,6 +402,10 @@ export declare function updateCompensation(c: UiduClient, v: UpdateCompensationM
|
|
|
327
402
|
type: string;
|
|
328
403
|
}>;
|
|
329
404
|
} | null>;
|
|
405
|
+
/**
|
|
406
|
+
* Delete a pay item by `{ input: { id } }`. Returns the payload (with
|
|
407
|
+
* `errors`) or null.
|
|
408
|
+
*/
|
|
330
409
|
export declare function deleteCompensation(c: UiduClient, v: DeleteCompensationMutationVariables): Promise<{
|
|
331
410
|
__typename?: "DeleteCompensationPayload";
|
|
332
411
|
compensation?: {
|
|
@@ -340,6 +419,10 @@ export declare function deleteCompensation(c: UiduClient, v: DeleteCompensationM
|
|
|
340
419
|
type: string;
|
|
341
420
|
}>;
|
|
342
421
|
} | null>;
|
|
422
|
+
/**
|
|
423
|
+
* Create a knowledge-base collection. Returns the payload (with `errors`) or
|
|
424
|
+
* null. The new collection is at `kbCollection.node`.
|
|
425
|
+
*/
|
|
343
426
|
export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables): Promise<{
|
|
344
427
|
__typename?: "CreateKbCollectionPayload";
|
|
345
428
|
kbCollection?: {
|
|
@@ -356,6 +439,10 @@ export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionM
|
|
|
356
439
|
type: string;
|
|
357
440
|
}>;
|
|
358
441
|
} | null>;
|
|
442
|
+
/**
|
|
443
|
+
* Update a knowledge-base collection: `{ input: { id, attributes } }`. Returns
|
|
444
|
+
* the payload (with `errors`) or null.
|
|
445
|
+
*/
|
|
359
446
|
export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionMutationVariables): Promise<{
|
|
360
447
|
__typename?: "UpdateKbCollectionPayload";
|
|
361
448
|
kbCollection?: {
|
|
@@ -369,6 +456,10 @@ export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionM
|
|
|
369
456
|
type: string;
|
|
370
457
|
}>;
|
|
371
458
|
} | null>;
|
|
459
|
+
/**
|
|
460
|
+
* Delete a knowledge-base collection by `{ input: { id } }`. Returns the
|
|
461
|
+
* payload (with `errors`) or null.
|
|
462
|
+
*/
|
|
372
463
|
export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionMutationVariables): Promise<{
|
|
373
464
|
__typename?: "DeleteKbCollectionPayload";
|
|
374
465
|
kbCollection?: {
|
|
@@ -382,6 +473,10 @@ export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionM
|
|
|
382
473
|
type: string;
|
|
383
474
|
}>;
|
|
384
475
|
} | null>;
|
|
476
|
+
/**
|
|
477
|
+
* Create a knowledge-base article in `attributes.kbCollectionId`. Returns the
|
|
478
|
+
* payload (with `errors`) or null. The new article is at `kbArticle.node`.
|
|
479
|
+
*/
|
|
385
480
|
export declare function createKbArticle(c: UiduClient, v: CreateKbArticleMutationVariables): Promise<{
|
|
386
481
|
__typename?: "CreateKbArticlePayload";
|
|
387
482
|
kbArticle?: {
|
|
@@ -398,6 +493,10 @@ export declare function createKbArticle(c: UiduClient, v: CreateKbArticleMutatio
|
|
|
398
493
|
type: string;
|
|
399
494
|
}>;
|
|
400
495
|
} | null>;
|
|
496
|
+
/**
|
|
497
|
+
* Update a knowledge-base article: `{ input: { id, attributes } }`. Returns
|
|
498
|
+
* the payload (with `errors`) or null.
|
|
499
|
+
*/
|
|
401
500
|
export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutationVariables): Promise<{
|
|
402
501
|
__typename?: "UpdateKbArticlePayload";
|
|
403
502
|
kbArticle?: {
|
|
@@ -411,6 +510,10 @@ export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutatio
|
|
|
411
510
|
type: string;
|
|
412
511
|
}>;
|
|
413
512
|
} | null>;
|
|
513
|
+
/**
|
|
514
|
+
* Delete a knowledge-base article by `{ input: { id } }`. Returns the payload
|
|
515
|
+
* (with `errors`) or null.
|
|
516
|
+
*/
|
|
414
517
|
export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutationVariables): Promise<{
|
|
415
518
|
__typename?: "DeleteKbArticlePayload";
|
|
416
519
|
kbArticle?: {
|
|
@@ -424,6 +527,10 @@ export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutatio
|
|
|
424
527
|
type: string;
|
|
425
528
|
}>;
|
|
426
529
|
} | null>;
|
|
530
|
+
/**
|
|
531
|
+
* Create a help-center channel. Returns the payload (with `errors`) or null.
|
|
532
|
+
* The new channel is at `channel.node`.
|
|
533
|
+
*/
|
|
427
534
|
export declare function createChannel(c: UiduClient, v: CreateChannelMutationVariables): Promise<{
|
|
428
535
|
__typename?: "CreateChannelPayload";
|
|
429
536
|
channel?: {
|
|
@@ -440,6 +547,10 @@ export declare function createChannel(c: UiduClient, v: CreateChannelMutationVar
|
|
|
440
547
|
type: string;
|
|
441
548
|
}>;
|
|
442
549
|
} | null>;
|
|
550
|
+
/**
|
|
551
|
+
* Update a help-center channel: `{ input: { id, attributes } }`. Returns the
|
|
552
|
+
* payload (with `errors`) or null.
|
|
553
|
+
*/
|
|
443
554
|
export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVariables): Promise<{
|
|
444
555
|
__typename?: "UpdateChannelPayload";
|
|
445
556
|
channel?: {
|
|
@@ -453,6 +564,10 @@ export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVar
|
|
|
453
564
|
type: string;
|
|
454
565
|
}>;
|
|
455
566
|
} | null>;
|
|
567
|
+
/**
|
|
568
|
+
* Delete a help-center channel by `{ input: { id } }`. Returns the payload
|
|
569
|
+
* (with `errors`) or null.
|
|
570
|
+
*/
|
|
456
571
|
export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVariables): Promise<{
|
|
457
572
|
__typename?: "DeleteChannelPayload";
|
|
458
573
|
channel?: {
|
|
@@ -466,6 +581,10 @@ export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVar
|
|
|
466
581
|
type: string;
|
|
467
582
|
}>;
|
|
468
583
|
} | null>;
|
|
584
|
+
/**
|
|
585
|
+
* Update an event: `{ input: { id, attributes } }` (create it with
|
|
586
|
+
* `createEvent`). Returns the payload (with `errors`) or null.
|
|
587
|
+
*/
|
|
469
588
|
export declare function updateEvent(c: UiduClient, v: UpdateEventMutationVariables): Promise<{
|
|
470
589
|
__typename?: "UpdateEventPayload";
|
|
471
590
|
event?: {
|
|
@@ -479,6 +598,10 @@ export declare function updateEvent(c: UiduClient, v: UpdateEventMutationVariabl
|
|
|
479
598
|
type: string;
|
|
480
599
|
}>;
|
|
481
600
|
} | null>;
|
|
601
|
+
/**
|
|
602
|
+
* Update a story: `{ input: { id, attributes } }` (create it with
|
|
603
|
+
* `createStory`). Returns the payload (with `errors`) or null.
|
|
604
|
+
*/
|
|
482
605
|
export declare function updateStory(c: UiduClient, v: UpdateStoryMutationVariables): Promise<{
|
|
483
606
|
__typename?: "UpdateStoryPayload";
|
|
484
607
|
story?: {
|
|
@@ -492,6 +615,10 @@ export declare function updateStory(c: UiduClient, v: UpdateStoryMutationVariabl
|
|
|
492
615
|
type: string;
|
|
493
616
|
}>;
|
|
494
617
|
} | null>;
|
|
618
|
+
/**
|
|
619
|
+
* Update a donation campaign: `{ input: { id, attributes } }`. Returns the
|
|
620
|
+
* payload (with `errors`) or null.
|
|
621
|
+
*/
|
|
495
622
|
export declare function updateDonationCampaign(c: UiduClient, v: UpdateDonationCampaignMutationVariables): Promise<{
|
|
496
623
|
__typename?: "UpdateDonationCampaignPayload";
|
|
497
624
|
donationCampaign?: {
|
|
@@ -505,6 +632,10 @@ export declare function updateDonationCampaign(c: UiduClient, v: UpdateDonationC
|
|
|
505
632
|
type: string;
|
|
506
633
|
}>;
|
|
507
634
|
} | null>;
|
|
635
|
+
/**
|
|
636
|
+
* Delete a donation campaign by `{ input: { id } }`. Returns the payload (with
|
|
637
|
+
* `errors`) or null.
|
|
638
|
+
*/
|
|
508
639
|
export declare function deleteDonationCampaign(c: UiduClient, v: DeleteDonationCampaignMutationVariables): Promise<{
|
|
509
640
|
__typename?: "DeleteDonationCampaignPayload";
|
|
510
641
|
donationCampaign?: {
|
|
@@ -518,6 +649,10 @@ export declare function deleteDonationCampaign(c: UiduClient, v: DeleteDonationC
|
|
|
518
649
|
type: string;
|
|
519
650
|
}>;
|
|
520
651
|
} | null>;
|
|
652
|
+
/**
|
|
653
|
+
* Update a task, e.g. its `statusId` or dates: `{ input: { id, attributes }
|
|
654
|
+
* }`. Returns the payload (with `errors`) or null.
|
|
655
|
+
*/
|
|
521
656
|
export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables): Promise<{
|
|
522
657
|
__typename?: "UpdateTaskPayload";
|
|
523
658
|
task?: {
|
|
@@ -531,6 +666,10 @@ export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables
|
|
|
531
666
|
type: string;
|
|
532
667
|
}>;
|
|
533
668
|
} | null>;
|
|
669
|
+
/**
|
|
670
|
+
* Delete a task by `{ input: { id } }`. Returns the payload (with `errors`) or
|
|
671
|
+
* null.
|
|
672
|
+
*/
|
|
534
673
|
export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables): Promise<{
|
|
535
674
|
__typename?: "DeleteTaskPayload";
|
|
536
675
|
task?: {
|
|
@@ -544,6 +683,10 @@ export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables
|
|
|
544
683
|
type: string;
|
|
545
684
|
}>;
|
|
546
685
|
} | null>;
|
|
686
|
+
/**
|
|
687
|
+
* Update a note: `{ input: { id, attributes } }`. Returns the payload (with
|
|
688
|
+
* `errors`) or null.
|
|
689
|
+
*/
|
|
547
690
|
export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables): Promise<{
|
|
548
691
|
__typename?: "UpdateNotePayload";
|
|
549
692
|
note?: {
|
|
@@ -557,6 +700,10 @@ export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables
|
|
|
557
700
|
type: string;
|
|
558
701
|
}>;
|
|
559
702
|
} | null>;
|
|
703
|
+
/**
|
|
704
|
+
* Delete a note by `{ input: { id } }`. Returns the payload (with `errors`) or
|
|
705
|
+
* null.
|
|
706
|
+
*/
|
|
560
707
|
export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables): Promise<{
|
|
561
708
|
__typename?: "DeleteNotePayload";
|
|
562
709
|
note?: {
|
|
@@ -570,6 +717,10 @@ export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables
|
|
|
570
717
|
type: string;
|
|
571
718
|
}>;
|
|
572
719
|
} | null>;
|
|
720
|
+
/**
|
|
721
|
+
* Update a space: `{ input: { id, attributes } }`. Returns the payload (with
|
|
722
|
+
* `errors`) or null.
|
|
723
|
+
*/
|
|
573
724
|
export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariables): Promise<{
|
|
574
725
|
__typename?: "UpdateSpacePayload";
|
|
575
726
|
space?: {
|
|
@@ -583,6 +734,10 @@ export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariabl
|
|
|
583
734
|
type: string;
|
|
584
735
|
}>;
|
|
585
736
|
} | null>;
|
|
737
|
+
/**
|
|
738
|
+
* Delete a space by `{ input: { id } }`. Returns the payload (with `errors`)
|
|
739
|
+
* or null.
|
|
740
|
+
*/
|
|
586
741
|
export declare function deleteSpace(c: UiduClient, v: DeleteSpaceMutationVariables): Promise<{
|
|
587
742
|
__typename?: "DeleteSpacePayload";
|
|
588
743
|
space?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateNoteMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a note. Returns the payload (with `errors`) or null; the new note is
|
|
5
|
+
* at `note.node`.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createNote(client: UiduClient, variables: CreateNoteMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateNotePayload";
|
|
5
9
|
note?: {
|
|
@@ -5,6 +5,10 @@ export type Circle = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable
|
|
|
5
5
|
export type Office = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListOfficesQuery['currentWorkspace']>['offices']>['edges']>[number]>['node']>;
|
|
6
6
|
/** A `Kind` record — CCNLs (national collective labor contracts) are Kinds. */
|
|
7
7
|
export type Kind = NonNullable<NonNullable<NonNullable<NonNullable<NonNullable<ListKindsQuery['currentWorkspace']>['kinds']>['edges']>[number]>['node']>;
|
|
8
|
+
/**
|
|
9
|
+
* The workspace's employees with their current employment, as a flat array;
|
|
10
|
+
* page with `first`/`after`.
|
|
11
|
+
*/
|
|
8
12
|
export declare function listEmployees(client: UiduClient, variables?: ListEmployeesQueryVariables): Promise<{
|
|
9
13
|
__typename?: "Employee";
|
|
10
14
|
id: string;
|
|
@@ -30,6 +34,10 @@ export declare function listEmployees(client: UiduClient, variables?: ListEmploy
|
|
|
30
34
|
} | null;
|
|
31
35
|
} | null;
|
|
32
36
|
}[]>;
|
|
37
|
+
/**
|
|
38
|
+
* One employee with current employment, today's time clocks and the shifts of
|
|
39
|
+
* the week starting `weekStartingAt` (see `weekStartFor`), or null.
|
|
40
|
+
*/
|
|
33
41
|
export declare function getEmployee(client: UiduClient, variables: GetEmployeeQueryVariables): Promise<Employee | null>;
|
|
34
42
|
/**
|
|
35
43
|
* Compute the Monday of the week containing `date` as an ISO8601 date string.
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type SearchQuery, type SearchQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type SearchResult = NonNullable<NonNullable<SearchQuery['currentWorkspace']>['search']>;
|
|
4
|
+
/**
|
|
5
|
+
* Search the workspace index, optionally limited to `models`, with filters and
|
|
6
|
+
* sorting in `params`; page with `first`/`after`.
|
|
7
|
+
*
|
|
8
|
+
* Returns the connection itself, not a flat array: `edges`, `pageInfo`,
|
|
9
|
+
* `totalCount`, `term`, `took`. Each node only carries `__typename` and `id`.
|
|
10
|
+
*/
|
|
4
11
|
export declare function search(client: UiduClient, variables: SearchQueryVariables): Promise<SearchResult | null>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateSpaceMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a space, the container tasks live in. Returns the payload (with
|
|
5
|
+
* `errors`) or null; the new space is at `space.node`.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createSpace(client: UiduClient, variables: CreateSpaceMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateSpacePayload";
|
|
5
9
|
space?: {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateStoryMutationVariables, type GetStoryQuery, type GetStoryQueryVariables, type ListStoriesQueryVariables } from "./generated/index.js";
|
|
3
3
|
export type Story = NonNullable<NonNullable<GetStoryQuery['currentWorkspace']>['story']>;
|
|
4
|
+
/**
|
|
5
|
+
* One story with its rich-text `body`, or null.
|
|
6
|
+
*/
|
|
4
7
|
export declare function getStory(client: UiduClient, variables: GetStoryQueryVariables): Promise<Story | null>;
|
|
8
|
+
/**
|
|
9
|
+
* The workspace's stories as a flat array of summaries (no `body`); page with
|
|
10
|
+
* `first`/`after`.
|
|
11
|
+
*/
|
|
5
12
|
export declare function listStories(client: UiduClient, variables?: ListStoriesQueryVariables): Promise<{
|
|
6
13
|
__typename?: "Story";
|
|
7
14
|
id: string;
|
|
@@ -12,6 +19,10 @@ export declare function listStories(client: UiduClient, variables?: ListStoriesQ
|
|
|
12
19
|
publishedAt?: any | null;
|
|
13
20
|
publicPath?: string | null;
|
|
14
21
|
}[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Create a story; returns the payload as-is, `{ errors, story }`, validation
|
|
24
|
+
* failures included.
|
|
25
|
+
*/
|
|
15
26
|
export declare function createStory(client: UiduClient, variables: CreateStoryMutationVariables): Promise<{
|
|
16
27
|
__typename?: "CreateStoryPayload";
|
|
17
28
|
story?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateWorkspaceMutationVariables, type GenerateWorkspaceApiCredentialsMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a workspace owned by the authenticated account (`attributes.name`,
|
|
5
|
+
* `subdomain`…). Returns the payload (with `errors`) or null.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createWorkspace(client: UiduClient, variables: CreateWorkspaceMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateWorkspacePayload";
|
|
5
9
|
workspace?: {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { UiduClient } from "./client.js";
|
|
2
2
|
import { type CreateTaskMutationVariables } from "./generated/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a task, usually in a space (`attributes.spaceId`). Returns the
|
|
5
|
+
* payload (with `errors`) or null.
|
|
6
|
+
*/
|
|
3
7
|
export declare function createTask(client: UiduClient, variables: CreateTaskMutationVariables): Promise<{
|
|
4
8
|
__typename?: "CreateTaskPayload";
|
|
5
9
|
task?: {
|
|
@@ -18,6 +18,10 @@ export interface UiduErrorOptions {
|
|
|
18
18
|
graphQLErrors?: ReadonlyArray<unknown>;
|
|
19
19
|
cause?: unknown;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* What `UiduClient` throws: `code` is `GRAPHQL_ERROR` (with `graphQLErrors`),
|
|
23
|
+
* `NETWORK_ERROR`, `TOKEN_ERROR` or `CONFIG_ERROR`.
|
|
24
|
+
*/
|
|
21
25
|
export declare class UiduError extends Error {
|
|
22
26
|
readonly code: string;
|
|
23
27
|
readonly graphQLErrors: ReadonlyArray<unknown>;
|