@uidu/client 3.13.1 → 3.16.0

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.
@@ -4,7 +4,7 @@ export type { UiduClientConfig, UiduErrorOptions } from "./types.js";
4
4
  export { paginate } from "./utils/paginate.js";
5
5
  export type { PaginateOptions } from "./utils/paginate.js";
6
6
  export { normalizeFieldValueContent, normalizeFieldValuesAttributes, } from "./utils/fieldValues.js";
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";
7
+ export { ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListDonationsDocument, 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
10
  export { getSiteByDomain, getSite, getPageBySlug, listSitePages, getSingletonBlock, createSite, } from "./sites.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, createTimeClock, } from "./mutations.js";
19
+ export { createCourse, updateCourse, deleteCourse, createForm, updateForm, deleteForm, createContact, deleteContact, createDeal, updateDeal, createKbCollection, updateKbCollection, deleteKbCollection, createKbArticle, updateKbArticle, deleteKbArticle, createChannel, updateChannel, deleteChannel, createChannelKbCollection, updateChannelKbCollection, updateEvent, updateStory, updateDonationCampaign, deleteDonationCampaign, updateTask, deleteTask, updateNote, deleteNote, updateSpace, deleteSpace, createEmployee, updateEmployee, createEmployeeCertification, createEmployment, updateEmployment, deleteEmployment, terminateEmployment, createEmploymentTerm, updateEmploymentTerm, 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";
@@ -31,8 +31,8 @@ export { getJob, listJobs } from "./jobs.js";
31
31
  export type { Job } from "./jobs.js";
32
32
  export { listApplications, createApplication, updateApplication, completeApplication, } from "./applications.js";
33
33
  export type { Application } from "./applications.js";
34
- export { getDonationCampaign, listDonationCampaigns, createDonation, createDonationCampaign, } from "./donations.js";
35
- export type { DonationCampaign } from "./donations.js";
34
+ export { getDonationCampaign, listDonationCampaigns, listDonations, createDonation, createDonationCampaign, } from "./donations.js";
35
+ export type { Donation, DonationCampaign } from "./donations.js";
36
36
  export { getStory, listStories, createStory } from "./stories.js";
37
37
  export type { Story } from "./stories.js";
38
38
  export { listEmployees, getEmployee, weekStartFor, listOffices, listCircles, listRoles, listKinds, listCcnls, createCcnl, listEmploymentHistory, contractEvents, } from "./people.js";
@@ -1,5 +1,5 @@
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 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";
2
+ import { type CreateChannelMutationVariables, type CreateChannelKbCollectionMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmployeeCertificationMutationVariables, type CreateEmploymentMutationVariables, type CreateEmploymentTermMutationVariables, 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 UpdateChannelKbCollectionMutationVariables, type UpdateCompensationMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEmployeeMutationVariables, type UpdateEmploymentMutationVariables, type UpdateEmploymentTermMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
3
3
  /**
4
4
  * Create a course from `{ input: { attributes } }`. Returns the payload (with
5
5
  * `errors`) or null.
@@ -221,6 +221,41 @@ export declare function updateEmployee(c: UiduClient, v: UpdateEmployeeMutationV
221
221
  type: string;
222
222
  }>;
223
223
  } | null>;
224
+ /**
225
+ * Issue a certification (`attributes.certificationId`) to an employee
226
+ * (`attributes.employeeId`), optionally with its issue date and a generated
227
+ * certificate (`documentId`/`blobId`). Returns the payload (with `errors`) or
228
+ * null. The new record is at `employeeCertification.node`.
229
+ */
230
+ export declare function createEmployeeCertification(c: UiduClient, v: CreateEmployeeCertificationMutationVariables): Promise<{
231
+ __typename?: "CreateEmployeeCertificationPayload";
232
+ employeeCertification?: {
233
+ __typename?: "EmployeeCertificationEdge";
234
+ node?: {
235
+ __typename?: "EmployeeCertification";
236
+ id: string;
237
+ issuedAt: any;
238
+ expiresAt?: any | null;
239
+ validNow: boolean;
240
+ metadata?: any | null;
241
+ employee: {
242
+ __typename?: "Employee";
243
+ id: string;
244
+ };
245
+ certification: {
246
+ __typename?: "Certification";
247
+ id: string;
248
+ name?: string | null;
249
+ };
250
+ } | null;
251
+ } | null;
252
+ errors: Array<{
253
+ __typename?: "Error";
254
+ key: string;
255
+ name: string;
256
+ type: string;
257
+ }>;
258
+ } | null>;
224
259
  /**
225
260
  * Hire: open a new employment (contract) for `attributes.employeeId` with its
226
261
  * start date, kind, role and hours. Returns the payload (with `errors`) or
@@ -300,7 +335,10 @@ export declare function deleteEmployment(c: UiduClient, v: DeleteEmploymentMutat
300
335
  /**
301
336
  * Terminate (cessazione) an employment by closing it with an end date and
302
337
  * reason. Thin semantic wrapper over {@link updateEmployment}.
303
- * `endReason` is one of: resignation, termination, contract_end, retirement, other.
338
+ * `endReason` is one of: resignation, termination, contract_end, retirement,
339
+ * other, resignation_just_cause, dismissal_just_cause,
340
+ * dismissal_subjective_reason, dismissal_objective_reason, collective_dismissal,
341
+ * mutual_agreement, probation_failed, death, business_closure.
304
342
  */
305
343
  export declare function terminateEmployment(c: UiduClient, args: {
306
344
  id: string;
@@ -330,6 +368,91 @@ export declare function terminateEmployment(c: UiduClient, args: {
330
368
  type: string;
331
369
  }>;
332
370
  } | null>;
371
+ /**
372
+ * Open a new employment term under `attributes.employmentId` — a variation of
373
+ * the hours, job title, CCNL or contract kind, effective from `effectiveFrom`
374
+ * (the term in force until then is closed on that date). Returns the payload
375
+ * (with `errors`) or null. The new term is at `employmentTerm.node`.
376
+ */
377
+ export declare function createEmploymentTerm(c: UiduClient, v: CreateEmploymentTermMutationVariables): Promise<{
378
+ __typename?: "CreateEmploymentTermPayload";
379
+ employmentTerm?: {
380
+ __typename?: "EmploymentTermEdge";
381
+ node?: {
382
+ __typename?: "EmploymentTerm";
383
+ id: string;
384
+ effectiveFrom: any;
385
+ effectiveTo?: any | null;
386
+ endDate?: any | null;
387
+ jobTitle?: string | null;
388
+ workingHours?: number | null;
389
+ workingFrequency?: string | null;
390
+ fteRatio?: number | null;
391
+ isInitial: boolean;
392
+ state: string;
393
+ employment: {
394
+ __typename?: "Employment";
395
+ id: string;
396
+ };
397
+ employmentKind?: {
398
+ __typename?: "EmploymentKind";
399
+ id: string;
400
+ name?: string | null;
401
+ } | null;
402
+ ccnl?: {
403
+ __typename?: "Ccnl";
404
+ id: string;
405
+ name?: string | null;
406
+ } | null;
407
+ } | null;
408
+ } | null;
409
+ errors: Array<{
410
+ __typename?: "Error";
411
+ key: string;
412
+ name: string;
413
+ type: string;
414
+ }>;
415
+ } | null>;
416
+ /**
417
+ * Update an employment term: `{ input: { id, attributes } }`. Returns the
418
+ * payload (with `errors`) or null.
419
+ */
420
+ export declare function updateEmploymentTerm(c: UiduClient, v: UpdateEmploymentTermMutationVariables): Promise<{
421
+ __typename?: "UpdateEmploymentTermPayload";
422
+ employmentTerm?: {
423
+ __typename?: "EmploymentTerm";
424
+ id: string;
425
+ effectiveFrom: any;
426
+ effectiveTo?: any | null;
427
+ endDate?: any | null;
428
+ jobTitle?: string | null;
429
+ workingHours?: number | null;
430
+ workingFrequency?: string | null;
431
+ fteRatio?: number | null;
432
+ isInitial: boolean;
433
+ state: string;
434
+ employment: {
435
+ __typename?: "Employment";
436
+ id: string;
437
+ };
438
+ employmentKind?: {
439
+ __typename?: "EmploymentKind";
440
+ id: string;
441
+ name?: string | null;
442
+ } | null;
443
+ ccnl?: {
444
+ __typename?: "Ccnl";
445
+ id: string;
446
+ name?: string | null;
447
+ } | null;
448
+ } | null;
449
+ errors: Array<{
450
+ __typename?: "Error";
451
+ key: string;
452
+ name: string;
453
+ type: string;
454
+ }>;
455
+ } | null>;
333
456
  /**
334
457
  * Record a time-clock punch (`beginsAt`, optional `finishesAt`, `resourceId`).
335
458
  * Returns the payload (with `errors`) or null. The new punch is at
@@ -581,6 +704,60 @@ export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVar
581
704
  type: string;
582
705
  }>;
583
706
  } | null>;
707
+ /**
708
+ * Publish a knowledge-base collection on a help-center channel. Returns the
709
+ * payload (with `errors`) or null. The new link is at `channelKbCollection`.
710
+ */
711
+ export declare function createChannelKbCollection(c: UiduClient, v: CreateChannelKbCollectionMutationVariables): Promise<{
712
+ __typename?: "CreateChannelKbCollectionPayload";
713
+ channelKbCollection?: {
714
+ __typename?: "ChannelKbCollection";
715
+ id: string;
716
+ position: number;
717
+ channel: {
718
+ __typename?: "Channel";
719
+ id: string;
720
+ };
721
+ kbCollection: {
722
+ __typename?: "KbCollection";
723
+ id: string;
724
+ name?: any | null;
725
+ };
726
+ } | null;
727
+ errors: Array<{
728
+ __typename?: "Error";
729
+ key: string;
730
+ name: string;
731
+ type: string;
732
+ }>;
733
+ } | null>;
734
+ /**
735
+ * Update a channel/collection link, e.g. its `position`: `{ input: { id,
736
+ * attributes } }`. Returns the payload (with `errors`) or null.
737
+ */
738
+ export declare function updateChannelKbCollection(c: UiduClient, v: UpdateChannelKbCollectionMutationVariables): Promise<{
739
+ __typename?: "UpdateChannelKbCollectionPayload";
740
+ channelKbCollection?: {
741
+ __typename?: "ChannelKbCollection";
742
+ id: string;
743
+ position: number;
744
+ channel: {
745
+ __typename?: "Channel";
746
+ id: string;
747
+ };
748
+ kbCollection: {
749
+ __typename?: "KbCollection";
750
+ id: string;
751
+ name?: any | null;
752
+ };
753
+ } | null;
754
+ errors: Array<{
755
+ __typename?: "Error";
756
+ key: string;
757
+ name: string;
758
+ type: string;
759
+ }>;
760
+ } | null>;
584
761
  /**
585
762
  * Update an event: `{ input: { id, attributes } }` (create it with
586
763
  * `createEvent`). Returns the payload (with `errors`) or null.