@uidu/client 3.12.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/declarations/src/actions.d.ts +10 -0
  3. package/dist/declarations/src/applications.d.ts +56 -3
  4. package/dist/declarations/src/benefit-enrollments.d.ts +5 -0
  5. package/dist/declarations/src/benefits.d.ts +5 -0
  6. package/dist/declarations/src/bookings.d.ts +22 -0
  7. package/dist/declarations/src/calls.d.ts +8 -0
  8. package/dist/declarations/src/campaigns.d.ts +12 -0
  9. package/dist/declarations/src/client.d.ts +13 -1
  10. package/dist/declarations/src/cms.d.ts +32 -0
  11. package/dist/declarations/src/contacts.d.ts +16 -0
  12. package/dist/declarations/src/courses.d.ts +23 -0
  13. package/dist/declarations/src/donations.d.ts +19 -0
  14. package/dist/declarations/src/events.d.ts +19 -0
  15. package/dist/declarations/src/forms.d.ts +19 -0
  16. package/dist/declarations/src/generated/index.d.ts +2893 -176
  17. package/dist/declarations/src/goals.d.ts +4 -0
  18. package/dist/declarations/src/help-center.d.ts +4 -0
  19. package/dist/declarations/src/index.d.ts +3 -3
  20. package/dist/declarations/src/kb.d.ts +15 -0
  21. package/dist/declarations/src/models.d.ts +54 -0
  22. package/dist/declarations/src/mutations.d.ts +175 -1
  23. package/dist/declarations/src/notes.d.ts +4 -0
  24. package/dist/declarations/src/people.d.ts +8 -0
  25. package/dist/declarations/src/search.d.ts +7 -0
  26. package/dist/declarations/src/sites.d.ts +23 -1
  27. package/dist/declarations/src/spaces.d.ts +4 -0
  28. package/dist/declarations/src/stories.d.ts +11 -0
  29. package/dist/declarations/src/system.d.ts +4 -0
  30. package/dist/declarations/src/tasks.d.ts +4 -0
  31. package/dist/declarations/src/types.d.ts +4 -0
  32. package/dist/uidu-client.cjs.dev.js +585 -10
  33. package/dist/uidu-client.cjs.prod.js +585 -10
  34. package/dist/uidu-client.esm.js +582 -11
  35. package/package.json +1 -1
  36. package/src/actions.ts +10 -6
  37. package/src/applications.test.ts +42 -0
  38. package/src/applications.ts +31 -2
  39. package/src/benefit-enrollments.ts +5 -0
  40. package/src/benefits.ts +5 -0
  41. package/src/bookings.ts +22 -0
  42. package/src/calls.ts +8 -0
  43. package/src/campaigns.ts +12 -0
  44. package/src/client.ts +13 -1
  45. package/src/cms.ts +32 -0
  46. package/src/contacts.ts +16 -0
  47. package/src/courses.ts +23 -0
  48. package/src/donations.ts +19 -0
  49. package/src/events.ts +19 -0
  50. package/src/forms.ts +19 -0
  51. package/src/generated/index.ts +2528 -172
  52. package/src/goals.ts +4 -0
  53. package/src/help-center.ts +4 -0
  54. package/src/index.ts +8 -1
  55. package/src/kb.ts +15 -0
  56. package/src/models.ts +54 -0
  57. package/src/mutations.ts +162 -0
  58. package/src/notes.ts +4 -0
  59. package/src/people.ts +8 -0
  60. package/src/queries/applications/UpdateApplication.graphql +17 -0
  61. package/src/queries/cms/GetPage.graphql +1 -0
  62. package/src/queries/people/TimeClockMutations.graphql +17 -0
  63. package/src/queries/sites/CreateSite.graphql +15 -0
  64. package/src/search.ts +7 -0
  65. package/src/sites.test.ts +26 -0
  66. package/src/sites.ts +17 -0
  67. package/src/spaces.ts +4 -0
  68. package/src/stories.ts +11 -0
  69. package/src/system.ts +4 -0
  70. package/src/tasks.ts +4 -0
  71. package/src/types.ts +4 -0
@@ -32,6 +32,10 @@ export declare function listGoals(client: UiduClient, variables?: ListGoalsQuery
32
32
  }[]>;
33
33
  /** One goal with its key results (`subgoals`). */
34
34
  export declare function getGoal(client: UiduClient, variables: GetGoalQueryVariables): Promise<Goal | null>;
35
+ /**
36
+ * The workspace's timeframes (the periods goals run over, `active` marks the
37
+ * current ones) as a flat array; page with `first`/`after`.
38
+ */
35
39
  export declare function listTimeframes(client: UiduClient, variables?: ListTimeframesQueryVariables): Promise<{
36
40
  __typename?: "Timeframe";
37
41
  id: string;
@@ -1,6 +1,10 @@
1
1
  import type { UiduClient } from "./client.js";
2
2
  import { type GetChannelQuery, type GetChannelQueryVariables, type ListChannelsQueryVariables } from "./generated/index.js";
3
3
  export type Channel = NonNullable<NonNullable<GetChannelQuery['currentWorkspace']>['channel']>;
4
+ /**
5
+ * One help center channel with its collections and their articles in a single
6
+ * request (the last 100 of each), or null.
7
+ */
4
8
  export declare function getChannel(client: UiduClient, variables: GetChannelQueryVariables): Promise<Channel | null>;
5
9
  /**
6
10
  * The workspace's help center channels. `isDefault` marks the one the
@@ -7,7 +7,7 @@ export { normalizeFieldValueContent, normalizeFieldValuesAttributes, } from "./u
7
7
  export { ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListEmployeesDocument, ListEnrollmentsDocument, ListEventsDocument, ListFormsDocument, ListGoalsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListPagesDocument, ListStoriesDocument, ListTimeframesDocument, } from "./generated/index.js";
8
8
  export { getPage, listPages, getTemplate, createProject, createPage, createPageBlock, createFieldValue, listProjects, } from "./cms.js";
9
9
  export type { Page, Template } from "./cms.js";
10
- export { getSiteByDomain, getSite, getPageBySlug, listSitePages, getSingletonBlock, } from "./sites.js";
10
+ export { getSiteByDomain, getSite, getPageBySlug, listSitePages, getSingletonBlock, createSite, } from "./sites.js";
11
11
  export type { Site, SiteModel, SiteFields, SiteBlock, SitePage, SitePageSummary, } from "./sites.js";
12
12
  export { createWorkspace, generateWorkspaceApiCredentials } from "./system.js";
13
13
  export { createSpace } from "./spaces.js";
@@ -16,7 +16,7 @@ export { createNote } from "./notes.js";
16
16
  export { executeAction } from "./actions.js";
17
17
  export { createBenefit } from "./benefits.js";
18
18
  export { createBenefitEnrollment } from "./benefit-enrollments.js";
19
- export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, createCompensation, updateCompensation, deleteCompensation, } from "./mutations.js";
19
+ export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, createCompensation, updateCompensation, deleteCompensation, createTimeClock, } from "./mutations.js";
20
20
  export { getForm, listForms, createFormResponse, updateFormResponse, } from "./forms.js";
21
21
  export type { Form } from "./forms.js";
22
22
  export { getChannel, listChannels } from "./help-center.js";
@@ -29,7 +29,7 @@ export { getCall, listCalls } from "./calls.js";
29
29
  export type { Call } from "./calls.js";
30
30
  export { getJob, listJobs } from "./jobs.js";
31
31
  export type { Job } from "./jobs.js";
32
- export { listApplications, createApplication } from "./applications.js";
32
+ export { listApplications, createApplication, updateApplication, completeApplication, } from "./applications.js";
33
33
  export type { Application } from "./applications.js";
34
34
  export { getDonationCampaign, listDonationCampaigns, createDonation, createDonationCampaign, } from "./donations.js";
35
35
  export type { DonationCampaign } from "./donations.js";
@@ -2,7 +2,15 @@ import type { UiduClient } from "./client.js";
2
2
  import { type GetKbArticleQuery, type GetKbArticleQueryVariables, type GetKbCollectionQuery, type GetKbCollectionQueryVariables, type ListKbArticlesQueryVariables, type ListKbCollectionsQueryVariables } from "./generated/index.js";
3
3
  export type KbArticle = NonNullable<NonNullable<GetKbArticleQuery['currentWorkspace']>['kbArticle']>;
4
4
  export type KbCollection = NonNullable<NonNullable<GetKbCollectionQuery['currentWorkspace']>['kbCollection']>;
5
+ /**
6
+ * One knowledge-base article with its rich-text `body` and its collection, or
7
+ * null.
8
+ */
5
9
  export declare function getKbArticle(client: UiduClient, variables: GetKbArticleQueryVariables): Promise<KbArticle | null>;
10
+ /**
11
+ * Knowledge-base articles across every collection, as a flat array; page with
12
+ * `first`/`after` (or `last`/`before`).
13
+ */
6
14
  export declare function listKbArticles(client: UiduClient, variables?: ListKbArticlesQueryVariables): Promise<{
7
15
  __typename?: "KbArticle";
8
16
  id: string;
@@ -17,7 +25,14 @@ export declare function listKbArticles(client: UiduClient, variables?: ListKbArt
17
25
  name?: any | null;
18
26
  } | null;
19
27
  }[]>;
28
+ /**
29
+ * One knowledge-base collection with its first 50 articles, or null.
30
+ */
20
31
  export declare function getKbCollection(client: UiduClient, variables: GetKbCollectionQueryVariables): Promise<KbCollection | null>;
32
+ /**
33
+ * The workspace's knowledge-base collections as a flat array; page with
34
+ * `first`/`after` (or `last`/`before`).
35
+ */
21
36
  export declare function listKbCollections(client: UiduClient, variables?: ListKbCollectionsQueryVariables): Promise<{
22
37
  __typename?: "KbCollection";
23
38
  id: string;
@@ -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
- import { type CreateChannelMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmploymentMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, 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";
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,35 @@ 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
+ */
338
+ export declare function createTimeClock(c: UiduClient, v: CreateTimeClockMutationVariables): Promise<{
339
+ __typename?: "CreateTimeClockPayload";
340
+ timeClock?: {
341
+ __typename?: "TimeClockEdge";
342
+ node?: {
343
+ __typename?: "TimeClock";
344
+ id: string;
345
+ beginsAt?: any | null;
346
+ finishesAt?: any | null;
347
+ kind?: number | null;
348
+ } | null;
349
+ } | null;
350
+ errors: Array<{
351
+ __typename?: "Error";
352
+ key: string;
353
+ name: string;
354
+ type: string;
355
+ }>;
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
+ */
272
362
  export declare function createCompensation(c: UiduClient, v: CreateCompensationMutationVariables): Promise<{
273
363
  __typename?: "CreateCompensationPayload";
274
364
  compensation?: {
@@ -290,6 +380,10 @@ export declare function createCompensation(c: UiduClient, v: CreateCompensationM
290
380
  type: string;
291
381
  }>;
292
382
  } | null>;
383
+ /**
384
+ * Update a pay item: `{ input: { id, attributes } }`. Returns the payload
385
+ * (with `errors`) or null.
386
+ */
293
387
  export declare function updateCompensation(c: UiduClient, v: UpdateCompensationMutationVariables): Promise<{
294
388
  __typename?: "UpdateCompensationPayload";
295
389
  compensation?: {
@@ -308,6 +402,10 @@ export declare function updateCompensation(c: UiduClient, v: UpdateCompensationM
308
402
  type: string;
309
403
  }>;
310
404
  } | null>;
405
+ /**
406
+ * Delete a pay item by `{ input: { id } }`. Returns the payload (with
407
+ * `errors`) or null.
408
+ */
311
409
  export declare function deleteCompensation(c: UiduClient, v: DeleteCompensationMutationVariables): Promise<{
312
410
  __typename?: "DeleteCompensationPayload";
313
411
  compensation?: {
@@ -321,6 +419,10 @@ export declare function deleteCompensation(c: UiduClient, v: DeleteCompensationM
321
419
  type: string;
322
420
  }>;
323
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
+ */
324
426
  export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionMutationVariables): Promise<{
325
427
  __typename?: "CreateKbCollectionPayload";
326
428
  kbCollection?: {
@@ -337,6 +439,10 @@ export declare function createKbCollection(c: UiduClient, v: CreateKbCollectionM
337
439
  type: string;
338
440
  }>;
339
441
  } | null>;
442
+ /**
443
+ * Update a knowledge-base collection: `{ input: { id, attributes } }`. Returns
444
+ * the payload (with `errors`) or null.
445
+ */
340
446
  export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionMutationVariables): Promise<{
341
447
  __typename?: "UpdateKbCollectionPayload";
342
448
  kbCollection?: {
@@ -350,6 +456,10 @@ export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionM
350
456
  type: string;
351
457
  }>;
352
458
  } | null>;
459
+ /**
460
+ * Delete a knowledge-base collection by `{ input: { id } }`. Returns the
461
+ * payload (with `errors`) or null.
462
+ */
353
463
  export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionMutationVariables): Promise<{
354
464
  __typename?: "DeleteKbCollectionPayload";
355
465
  kbCollection?: {
@@ -363,6 +473,10 @@ export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionM
363
473
  type: string;
364
474
  }>;
365
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
+ */
366
480
  export declare function createKbArticle(c: UiduClient, v: CreateKbArticleMutationVariables): Promise<{
367
481
  __typename?: "CreateKbArticlePayload";
368
482
  kbArticle?: {
@@ -379,6 +493,10 @@ export declare function createKbArticle(c: UiduClient, v: CreateKbArticleMutatio
379
493
  type: string;
380
494
  }>;
381
495
  } | null>;
496
+ /**
497
+ * Update a knowledge-base article: `{ input: { id, attributes } }`. Returns
498
+ * the payload (with `errors`) or null.
499
+ */
382
500
  export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutationVariables): Promise<{
383
501
  __typename?: "UpdateKbArticlePayload";
384
502
  kbArticle?: {
@@ -392,6 +510,10 @@ export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutatio
392
510
  type: string;
393
511
  }>;
394
512
  } | null>;
513
+ /**
514
+ * Delete a knowledge-base article by `{ input: { id } }`. Returns the payload
515
+ * (with `errors`) or null.
516
+ */
395
517
  export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutationVariables): Promise<{
396
518
  __typename?: "DeleteKbArticlePayload";
397
519
  kbArticle?: {
@@ -405,6 +527,10 @@ export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutatio
405
527
  type: string;
406
528
  }>;
407
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
+ */
408
534
  export declare function createChannel(c: UiduClient, v: CreateChannelMutationVariables): Promise<{
409
535
  __typename?: "CreateChannelPayload";
410
536
  channel?: {
@@ -421,6 +547,10 @@ export declare function createChannel(c: UiduClient, v: CreateChannelMutationVar
421
547
  type: string;
422
548
  }>;
423
549
  } | null>;
550
+ /**
551
+ * Update a help-center channel: `{ input: { id, attributes } }`. Returns the
552
+ * payload (with `errors`) or null.
553
+ */
424
554
  export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVariables): Promise<{
425
555
  __typename?: "UpdateChannelPayload";
426
556
  channel?: {
@@ -434,6 +564,10 @@ export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVar
434
564
  type: string;
435
565
  }>;
436
566
  } | null>;
567
+ /**
568
+ * Delete a help-center channel by `{ input: { id } }`. Returns the payload
569
+ * (with `errors`) or null.
570
+ */
437
571
  export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVariables): Promise<{
438
572
  __typename?: "DeleteChannelPayload";
439
573
  channel?: {
@@ -447,6 +581,10 @@ export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVar
447
581
  type: string;
448
582
  }>;
449
583
  } | null>;
584
+ /**
585
+ * Update an event: `{ input: { id, attributes } }` (create it with
586
+ * `createEvent`). Returns the payload (with `errors`) or null.
587
+ */
450
588
  export declare function updateEvent(c: UiduClient, v: UpdateEventMutationVariables): Promise<{
451
589
  __typename?: "UpdateEventPayload";
452
590
  event?: {
@@ -460,6 +598,10 @@ export declare function updateEvent(c: UiduClient, v: UpdateEventMutationVariabl
460
598
  type: string;
461
599
  }>;
462
600
  } | null>;
601
+ /**
602
+ * Update a story: `{ input: { id, attributes } }` (create it with
603
+ * `createStory`). Returns the payload (with `errors`) or null.
604
+ */
463
605
  export declare function updateStory(c: UiduClient, v: UpdateStoryMutationVariables): Promise<{
464
606
  __typename?: "UpdateStoryPayload";
465
607
  story?: {
@@ -473,6 +615,10 @@ export declare function updateStory(c: UiduClient, v: UpdateStoryMutationVariabl
473
615
  type: string;
474
616
  }>;
475
617
  } | null>;
618
+ /**
619
+ * Update a donation campaign: `{ input: { id, attributes } }`. Returns the
620
+ * payload (with `errors`) or null.
621
+ */
476
622
  export declare function updateDonationCampaign(c: UiduClient, v: UpdateDonationCampaignMutationVariables): Promise<{
477
623
  __typename?: "UpdateDonationCampaignPayload";
478
624
  donationCampaign?: {
@@ -486,6 +632,10 @@ export declare function updateDonationCampaign(c: UiduClient, v: UpdateDonationC
486
632
  type: string;
487
633
  }>;
488
634
  } | null>;
635
+ /**
636
+ * Delete a donation campaign by `{ input: { id } }`. Returns the payload (with
637
+ * `errors`) or null.
638
+ */
489
639
  export declare function deleteDonationCampaign(c: UiduClient, v: DeleteDonationCampaignMutationVariables): Promise<{
490
640
  __typename?: "DeleteDonationCampaignPayload";
491
641
  donationCampaign?: {
@@ -499,6 +649,10 @@ export declare function deleteDonationCampaign(c: UiduClient, v: DeleteDonationC
499
649
  type: string;
500
650
  }>;
501
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
+ */
502
656
  export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables): Promise<{
503
657
  __typename?: "UpdateTaskPayload";
504
658
  task?: {
@@ -512,6 +666,10 @@ export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables
512
666
  type: string;
513
667
  }>;
514
668
  } | null>;
669
+ /**
670
+ * Delete a task by `{ input: { id } }`. Returns the payload (with `errors`) or
671
+ * null.
672
+ */
515
673
  export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables): Promise<{
516
674
  __typename?: "DeleteTaskPayload";
517
675
  task?: {
@@ -525,6 +683,10 @@ export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables
525
683
  type: string;
526
684
  }>;
527
685
  } | null>;
686
+ /**
687
+ * Update a note: `{ input: { id, attributes } }`. Returns the payload (with
688
+ * `errors`) or null.
689
+ */
528
690
  export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables): Promise<{
529
691
  __typename?: "UpdateNotePayload";
530
692
  note?: {
@@ -538,6 +700,10 @@ export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables
538
700
  type: string;
539
701
  }>;
540
702
  } | null>;
703
+ /**
704
+ * Delete a note by `{ input: { id } }`. Returns the payload (with `errors`) or
705
+ * null.
706
+ */
541
707
  export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables): Promise<{
542
708
  __typename?: "DeleteNotePayload";
543
709
  note?: {
@@ -551,6 +717,10 @@ export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables
551
717
  type: string;
552
718
  }>;
553
719
  } | null>;
720
+ /**
721
+ * Update a space: `{ input: { id, attributes } }`. Returns the payload (with
722
+ * `errors`) or null.
723
+ */
554
724
  export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariables): Promise<{
555
725
  __typename?: "UpdateSpacePayload";
556
726
  space?: {
@@ -564,6 +734,10 @@ export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariabl
564
734
  type: string;
565
735
  }>;
566
736
  } | null>;
737
+ /**
738
+ * Delete a space by `{ input: { id } }`. Returns the payload (with `errors`)
739
+ * or null.
740
+ */
567
741
  export declare function deleteSpace(c: UiduClient, v: DeleteSpaceMutationVariables): Promise<{
568
742
  __typename?: "DeleteSpacePayload";
569
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.