@uidu/client 3.18.0 → 3.19.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/declarations/src/calls.d.ts +9 -1
  3. package/dist/declarations/src/candidates.d.ts +102 -0
  4. package/dist/declarations/src/contracts.d.ts +8 -0
  5. package/dist/declarations/src/field-values.d.ts +34 -0
  6. package/dist/declarations/src/generated/index.d.ts +11792 -5143
  7. package/dist/declarations/src/index.d.ts +17 -3
  8. package/dist/declarations/src/meetings.d.ts +41 -0
  9. package/dist/declarations/src/mutations.d.ts +80 -131
  10. package/dist/declarations/src/reviews.d.ts +195 -0
  11. package/dist/declarations/src/skills.d.ts +34 -0
  12. package/dist/declarations/src/work-sites.d.ts +9 -0
  13. package/dist/uidu-client.cjs.dev.js +402 -31
  14. package/dist/uidu-client.cjs.prod.js +402 -31
  15. package/dist/uidu-client.esm.js +373 -32
  16. package/package.json +1 -1
  17. package/src/calls.ts +37 -0
  18. package/src/candidates.ts +105 -0
  19. package/src/contracts.ts +44 -0
  20. package/src/field-values.ts +95 -0
  21. package/src/generated/index.ts +404 -332
  22. package/src/index.ts +53 -2
  23. package/src/meetings.ts +37 -0
  24. package/src/mutations.test.ts +40 -1
  25. package/src/mutations.ts +122 -60
  26. package/src/queries/calls/ListCallStatuses.graphql +26 -0
  27. package/src/queries/candidates/CandidateFields.graphql +28 -0
  28. package/src/queries/candidates/CandidateMutations.graphql +35 -0
  29. package/src/queries/candidates/CandidateQueries.graphql +94 -0
  30. package/src/queries/contacts/ContactMutations.graphql +0 -13
  31. package/src/queries/contracts/ContractQueries.graphql +67 -0
  32. package/src/queries/courses/CourseMutations.graphql +0 -13
  33. package/src/queries/discardable/DiscardableMutations.graphql +32 -0
  34. package/src/queries/field-values/FieldValueFields.graphql +18 -0
  35. package/src/queries/field-values/FieldValueQueries.graphql +43 -0
  36. package/src/queries/forms/FormMutations.graphql +0 -13
  37. package/src/queries/help-center/ChannelMutations.graphql +0 -13
  38. package/src/queries/kb/KbMutations.graphql +0 -26
  39. package/src/queries/meetings/MeetingQueries.graphql +48 -0
  40. package/src/queries/notes/NoteMutations.graphql +0 -13
  41. package/src/queries/people/PeopleMutations.graphql +0 -13
  42. package/src/queries/reviews/ReviewFields.graphql +35 -0
  43. package/src/queries/reviews/ReviewMutations.graphql +32 -0
  44. package/src/queries/reviews/ReviewQueries.graphql +86 -0
  45. package/src/queries/skills/SkillQueries.graphql +53 -0
  46. package/src/queries/spaces/SpaceMutations.graphql +0 -13
  47. package/src/queries/tasks/TaskMutations.graphql +0 -13
  48. package/src/queries/work-sites/ListWorkSites.graphql +32 -0
  49. package/src/recruiting.test.ts +196 -0
  50. package/src/reviews.ts +114 -0
  51. package/src/skills.ts +47 -0
  52. package/src/work-sites.ts +28 -0
@@ -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 { ListAnalyticAccountsDocument, ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListDonationsDocument, ListEmployeesDocument, ListEmploymentVariationKindsDocument, ListEnrollmentsDocument, ListEventsDocument, ListExpenseReportsDocument, ListFormsDocument, ListGoalsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListOrganizationsDocument, ListPagesDocument, ListStoriesDocument, ListTimeframesDocument, } from "./generated/index.js";
7
+ export { ListAnalyticAccountsDocument, ListApplicationsDocument, ListBookingsDocument, ListCalendarsDocument, ListCalendarEventsDocument, ListCallsDocument, ListCallStatusesDocument, ListContractsDocument, ListFieldValueHistoryDocument, ListMeetingsDocument, ListPoolsDocument, ListReviewTemplatesDocument, ListSkillsDocument, ListWorkSitesDocument, ListCampaignsDocument, ListEmailCampaignsDocument, ListCoursesDocument, ListDealsDocument, ListDonationCampaignsDocument, ListDonationsDocument, ListEmployeesDocument, ListEmploymentVariationKindsDocument, ListEnrollmentsDocument, ListEventsDocument, ListExpenseReportsDocument, ListFormsDocument, ListGoalsDocument, ListKbArticlesDocument, ListKbCollectionsDocument, ListLecturesDocument, ListOrganizationsDocument, 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";
@@ -25,12 +25,26 @@ export { search } from "./search.js";
25
25
  export type { SearchResult } from "./search.js";
26
26
  export { getEvent, listEvents, createAttendance, updateAttendance, createEvent, createEventInstance, updateEventInstance, } from "./events.js";
27
27
  export type { Event } from "./events.js";
28
- export { getCall, listCalls } from "./calls.js";
29
- export type { Call } from "./calls.js";
28
+ export { getCall, listCalls, listCallStatuses } from "./calls.js";
29
+ export type { Call, CallStatus } from "./calls.js";
30
30
  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 { findCandidates, getCandidate, updateCandidate, listPools, createPoolContact, } from "./candidates.js";
35
+ export type { Candidate, CandidateDetail, CandidateSearch, Pool, } from "./candidates.js";
36
+ export { listReviews, getReview, createReview, createReviews, updateReview, listReviewTemplates, } from "./reviews.js";
37
+ export type { Review, ReviewTemplate } from "./reviews.js";
38
+ export { listMeetings, createMeeting } from "./meetings.js";
39
+ export type { Meeting } from "./meetings.js";
40
+ export { listSkills, createSkill } from "./skills.js";
41
+ export type { WorkspaceSkill } from "./skills.js";
42
+ export { listWorkSites } from "./work-sites.js";
43
+ export type { WorkSite } from "./work-sites.js";
44
+ export { listContracts, getContract } from "./contracts.js";
45
+ export type { Contract, ContractDetail } from "./contracts.js";
46
+ export { getRecordFieldValues, listFieldValueHistory, fieldValueAsOf, } from "./field-values.js";
47
+ export type { RecordFieldValue, RecordFieldValues } from "./field-values.js";
34
48
  export { getDonationCampaign, listDonationCampaigns, listDonations, createDonation, createDonationCampaign, } from "./donations.js";
35
49
  export type { Donation, DonationCampaign } from "./donations.js";
36
50
  export { getStory, listStories, createStory } from "./stories.js";
@@ -0,0 +1,41 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateMeetingMutationVariables, type ListMeetingsQueryVariables, type MeetingSummaryFragment } from "./generated/index.js";
3
+ export type Meeting = MeetingSummaryFragment;
4
+ /** The workspace's meetings, filtered and sorted with `params`; page with `first`/`after`. */
5
+ export declare function listMeetings(client: UiduClient, variables?: ListMeetingsQueryVariables): Promise<Meeting[]>;
6
+ /**
7
+ * Create a meeting (`name`, `startsAt`, `endsAt`, `timeZone`, and
8
+ * `relatedAttributes` to link it to an application or a contact). Returns the
9
+ * mutation payload as-is (including any `errors`).
10
+ */
11
+ export declare function createMeeting(client: UiduClient, variables: CreateMeetingMutationVariables): Promise<{
12
+ __typename?: "CreateMeetingPayload";
13
+ meeting?: {
14
+ __typename?: "MeetingEdge";
15
+ node?: {
16
+ __typename?: "Meeting";
17
+ id: string;
18
+ name?: string | null;
19
+ status: import("./generated/index.js").MeetingStatusEnum;
20
+ source: import("./generated/index.js").MeetingSourceEnum;
21
+ startsAt?: any | null;
22
+ endsAt?: any | null;
23
+ timeZone?: string | null;
24
+ durationInSeconds?: number | null;
25
+ recordingUrl?: string | null;
26
+ transcriptUrl?: string | null;
27
+ createdAt: any;
28
+ createdByUser?: {
29
+ __typename?: "User";
30
+ id: string;
31
+ name?: string | null;
32
+ } | null;
33
+ } | null;
34
+ } | null;
35
+ errors: Array<{
36
+ __typename?: "Error";
37
+ key: string;
38
+ name: string;
39
+ type: string;
40
+ }>;
41
+ } | null>;
@@ -1,5 +1,10 @@
1
1
  import type { UiduClient } from "./client.js";
2
- import { type CreateChannelMutationVariables, type CreateChannelKbCollectionMutationVariables, type CreateContactMutationVariables, type CreateCourseMutationVariables, type CreateCompensationMutationVariables, type CreateDealMutationVariables, type CreateEmployeeMutationVariables, type CreateEmployeeCertificationMutationVariables, type CreateEmploymentMutationVariables, type CreateEmploymentTermMutationVariables, type CreateEmploymentVariationKindMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type CreateOrganizationMutationVariables, 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 UpdateEmploymentVariationKindMutationVariables, 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 CreateEmploymentVariationKindMutationVariables, type CreateFormMutationVariables, type CreateKbArticleMutationVariables, type CreateKbCollectionMutationVariables, type CreateOrganizationMutationVariables, type CreateTimeClockMutationVariables, type DeleteCompensationMutationVariables, type DeleteDonationCampaignMutationVariables, type DeleteRecordMutation, type DiscardRecordMutation, type DiscardRecordMutationVariables, type UpdateChannelMutationVariables, type UpdateChannelKbCollectionMutationVariables, type UpdateCompensationMutationVariables, type UpdateCourseMutationVariables, type UpdateDealMutationVariables, type UpdateDonationCampaignMutationVariables, type UpdateEmployeeMutationVariables, type UpdateEmploymentMutationVariables, type UpdateEmploymentTermMutationVariables, type UpdateEmploymentVariationKindMutationVariables, type UpdateEventMutationVariables, type UpdateFormMutationVariables, type UpdateKbArticleMutationVariables, type UpdateKbCollectionMutationVariables, type UpdateNoteMutationVariables, type UpdateSpaceMutationVariables, type UpdateStoryMutationVariables, type UpdateTaskMutationVariables } from "./generated/index.js";
3
+ /** `{ input: { id } }`, plus `permanent: true` to skip the trash. */
4
+ type DeleteRecordVariables = DiscardRecordMutationVariables & {
5
+ permanent?: boolean;
6
+ };
7
+ type RemovePayload = DiscardRecordMutation['discardableDiscard'] | DeleteRecordMutation['discardableDelete'];
3
8
  /**
4
9
  * Create a course from `{ input: { attributes } }`. Returns the payload (with
5
10
  * `errors`) or null.
@@ -35,22 +40,16 @@ export declare function updateCourse(c: UiduClient, v: UpdateCourseMutationVaria
35
40
  }>;
36
41
  } | null>;
37
42
  /**
38
- * Delete a course by `{ input: { id } }`. Returns the payload (with `errors`)
39
- * or null.
43
+ * Move a course to the trash by `{ input: { id } }`, or delete it for good with
44
+ * `permanent: true`. Returns the payload (with `errors`) or null.
40
45
  */
41
- export declare function deleteCourse(c: UiduClient, v: DeleteCourseMutationVariables): Promise<{
42
- __typename?: "DeleteCoursePayload";
43
- course?: {
44
- __typename?: "Course";
46
+ export declare function deleteCourse(c: UiduClient, v: DeleteRecordVariables): Promise<({
47
+ course: {
45
48
  id: string;
46
49
  } | null;
47
- errors: Array<{
48
- __typename?: "Error";
49
- key: string;
50
- name: string;
51
- type: string;
52
- }>;
53
- } | null>;
50
+ } & {
51
+ errors: NonNullable<RemovePayload>["errors"];
52
+ }) | null>;
54
53
  /**
55
54
  * Create a form, questions included via `attributes.formQuestionsAttributes`.
56
55
  * Returns the payload (with `errors`) or null. The new form is at `form.node`.
@@ -89,22 +88,16 @@ export declare function updateForm(c: UiduClient, v: UpdateFormMutationVariables
89
88
  }>;
90
89
  } | null>;
91
90
  /**
92
- * Delete a form by `{ input: { id } }`. Returns the payload (with `errors`) or
93
- * null.
91
+ * Move a form to the trash by `{ input: { id } }`, or delete it for good with
92
+ * `permanent: true`. Returns the payload (with `errors`) or null.
94
93
  */
95
- export declare function deleteForm(c: UiduClient, v: DeleteFormMutationVariables): Promise<{
96
- __typename?: "DeleteFormPayload";
97
- form?: {
98
- __typename?: "Form";
94
+ export declare function deleteForm(c: UiduClient, v: DeleteRecordVariables): Promise<({
95
+ form: {
99
96
  id: string;
100
97
  } | null;
101
- errors: Array<{
102
- __typename?: "Error";
103
- key: string;
104
- name: string;
105
- type: string;
106
- }>;
107
- } | null>;
98
+ } & {
99
+ errors: NonNullable<RemovePayload>["errors"];
100
+ }) | null>;
108
101
  /**
109
102
  * Create a CRM contact from `{ input: { attributes } }`. Returns the payload
110
103
  * (with `errors`) or null.
@@ -123,22 +116,16 @@ export declare function createContact(c: UiduClient, v: CreateContactMutationVar
123
116
  }>;
124
117
  } | null>;
125
118
  /**
126
- * Delete a contact by `{ input: { id } }`. Returns the payload (with `errors`)
127
- * or null.
119
+ * Move a contact to the trash by `{ input: { id } }`, or delete it for good
120
+ * with `permanent: true`. Returns the payload (with `errors`) or null.
128
121
  */
129
- export declare function deleteContact(c: UiduClient, v: DeleteContactMutationVariables): Promise<{
130
- __typename?: "DeleteContactPayload";
131
- contact?: {
132
- __typename?: "Contact";
122
+ export declare function deleteContact(c: UiduClient, v: DeleteRecordVariables): Promise<({
123
+ contact: {
133
124
  id: string;
134
125
  } | null;
135
- errors: Array<{
136
- __typename?: "Error";
137
- key: string;
138
- name: string;
139
- type: string;
140
- }>;
141
- } | null>;
126
+ } & {
127
+ errors: NonNullable<RemovePayload>["errors"];
128
+ }) | null>;
142
129
  /**
143
130
  * Create a deal in a pipeline (`attributes.pipelineId`, `statusId`). Returns
144
131
  * the payload (with `errors`) or null. The new deal is at `deal.node`.
@@ -341,22 +328,17 @@ export declare function updateEmployment(c: UiduClient, v: UpdateEmploymentMutat
341
328
  }>;
342
329
  } | null>;
343
330
  /**
344
- * Delete an employment by `{ input: { id } }` (to end a contract, use
345
- * `terminateEmployment` instead). Returns the payload (with `errors`) or null.
331
+ * Move an employment to the trash by `{ input: { id } }` (to end a contract,
332
+ * use `terminateEmployment` instead), or delete it for good with
333
+ * `permanent: true`. Returns the payload (with `errors`) or null.
346
334
  */
347
- export declare function deleteEmployment(c: UiduClient, v: DeleteEmploymentMutationVariables): Promise<{
348
- __typename?: "DeleteEmploymentPayload";
349
- employment?: {
350
- __typename?: "Employment";
335
+ export declare function deleteEmployment(c: UiduClient, v: DeleteRecordVariables): Promise<({
336
+ employment: {
351
337
  id: string;
352
338
  } | null;
353
- errors: Array<{
354
- __typename?: "Error";
355
- key: string;
356
- name: string;
357
- type: string;
358
- }>;
359
- } | null>;
339
+ } & {
340
+ errors: NonNullable<RemovePayload>["errors"];
341
+ }) | null>;
360
342
  /**
361
343
  * Terminate (cessazione) an employment by closing it with an end date and
362
344
  * reason. Thin semantic wrapper over {@link updateEmployment}.
@@ -668,22 +650,17 @@ export declare function updateKbCollection(c: UiduClient, v: UpdateKbCollectionM
668
650
  }>;
669
651
  } | null>;
670
652
  /**
671
- * Delete a knowledge-base collection by `{ input: { id } }`. Returns the
672
- * payload (with `errors`) or null.
653
+ * Move a knowledge-base collection to the trash by `{ input: { id } }`, or
654
+ * delete it for good with `permanent: true`. Returns the payload (with
655
+ * `errors`) or null.
673
656
  */
674
- export declare function deleteKbCollection(c: UiduClient, v: DeleteKbCollectionMutationVariables): Promise<{
675
- __typename?: "DeleteKbCollectionPayload";
676
- kbCollection?: {
677
- __typename?: "KbCollection";
657
+ export declare function deleteKbCollection(c: UiduClient, v: DeleteRecordVariables): Promise<({
658
+ kbCollection: {
678
659
  id: string;
679
660
  } | null;
680
- errors: Array<{
681
- __typename?: "Error";
682
- key: string;
683
- name: string;
684
- type: string;
685
- }>;
686
- } | null>;
661
+ } & {
662
+ errors: NonNullable<RemovePayload>["errors"];
663
+ }) | null>;
687
664
  /**
688
665
  * Create a knowledge-base article in `attributes.kbCollectionId`. Returns the
689
666
  * payload (with `errors`) or null. The new article is at `kbArticle.node`.
@@ -722,22 +699,17 @@ export declare function updateKbArticle(c: UiduClient, v: UpdateKbArticleMutatio
722
699
  }>;
723
700
  } | null>;
724
701
  /**
725
- * Delete a knowledge-base article by `{ input: { id } }`. Returns the payload
726
- * (with `errors`) or null.
702
+ * Move a knowledge-base article to the trash by `{ input: { id } }`, or delete
703
+ * it for good with `permanent: true`. Returns the payload (with `errors`) or
704
+ * null.
727
705
  */
728
- export declare function deleteKbArticle(c: UiduClient, v: DeleteKbArticleMutationVariables): Promise<{
729
- __typename?: "DeleteKbArticlePayload";
730
- kbArticle?: {
731
- __typename?: "KbArticle";
706
+ export declare function deleteKbArticle(c: UiduClient, v: DeleteRecordVariables): Promise<({
707
+ kbArticle: {
732
708
  id: string;
733
709
  } | null;
734
- errors: Array<{
735
- __typename?: "Error";
736
- key: string;
737
- name: string;
738
- type: string;
739
- }>;
740
- } | null>;
710
+ } & {
711
+ errors: NonNullable<RemovePayload>["errors"];
712
+ }) | null>;
741
713
  /**
742
714
  * Create a help-center channel. Returns the payload (with `errors`) or null.
743
715
  * The new channel is at `channel.node`.
@@ -776,22 +748,16 @@ export declare function updateChannel(c: UiduClient, v: UpdateChannelMutationVar
776
748
  }>;
777
749
  } | null>;
778
750
  /**
779
- * Delete a help-center channel by `{ input: { id } }`. Returns the payload
780
- * (with `errors`) or null.
751
+ * Move a help-center channel to the trash by `{ input: { id } }`, or delete it
752
+ * for good with `permanent: true`. Returns the payload (with `errors`) or null.
781
753
  */
782
- export declare function deleteChannel(c: UiduClient, v: DeleteChannelMutationVariables): Promise<{
783
- __typename?: "DeleteChannelPayload";
784
- channel?: {
785
- __typename?: "Channel";
754
+ export declare function deleteChannel(c: UiduClient, v: DeleteRecordVariables): Promise<({
755
+ channel: {
786
756
  id: string;
787
757
  } | null;
788
- errors: Array<{
789
- __typename?: "Error";
790
- key: string;
791
- name: string;
792
- type: string;
793
- }>;
794
- } | null>;
758
+ } & {
759
+ errors: NonNullable<RemovePayload>["errors"];
760
+ }) | null>;
795
761
  /**
796
762
  * Publish a knowledge-base collection on a help-center channel. Returns the
797
763
  * payload (with `errors`) or null. The new link is at `channelKbCollection`.
@@ -932,22 +898,16 @@ export declare function updateTask(c: UiduClient, v: UpdateTaskMutationVariables
932
898
  }>;
933
899
  } | null>;
934
900
  /**
935
- * Delete a task by `{ input: { id } }`. Returns the payload (with `errors`) or
936
- * null.
901
+ * Move a task to the trash by `{ input: { id } }`, or delete it for good with
902
+ * `permanent: true`. Returns the payload (with `errors`) or null.
937
903
  */
938
- export declare function deleteTask(c: UiduClient, v: DeleteTaskMutationVariables): Promise<{
939
- __typename?: "DeleteTaskPayload";
940
- task?: {
941
- __typename?: "Task";
904
+ export declare function deleteTask(c: UiduClient, v: DeleteRecordVariables): Promise<({
905
+ task: {
942
906
  id: string;
943
907
  } | null;
944
- errors: Array<{
945
- __typename?: "Error";
946
- key: string;
947
- name: string;
948
- type: string;
949
- }>;
950
- } | null>;
908
+ } & {
909
+ errors: NonNullable<RemovePayload>["errors"];
910
+ }) | null>;
951
911
  /**
952
912
  * Update a note: `{ input: { id, attributes } }`. Returns the payload (with
953
913
  * `errors`) or null.
@@ -966,22 +926,16 @@ export declare function updateNote(c: UiduClient, v: UpdateNoteMutationVariables
966
926
  }>;
967
927
  } | null>;
968
928
  /**
969
- * Delete a note by `{ input: { id } }`. Returns the payload (with `errors`) or
970
- * null.
929
+ * Move a note to the trash by `{ input: { id } }`, or delete it for good with
930
+ * `permanent: true`. Returns the payload (with `errors`) or null.
971
931
  */
972
- export declare function deleteNote(c: UiduClient, v: DeleteNoteMutationVariables): Promise<{
973
- __typename?: "DeleteNotePayload";
974
- note?: {
975
- __typename?: "Note";
932
+ export declare function deleteNote(c: UiduClient, v: DeleteRecordVariables): Promise<({
933
+ note: {
976
934
  id: string;
977
935
  } | null;
978
- errors: Array<{
979
- __typename?: "Error";
980
- key: string;
981
- name: string;
982
- type: string;
983
- }>;
984
- } | null>;
936
+ } & {
937
+ errors: NonNullable<RemovePayload>["errors"];
938
+ }) | null>;
985
939
  /**
986
940
  * Update a space: `{ input: { id, attributes } }`. Returns the payload (with
987
941
  * `errors`) or null.
@@ -1000,19 +954,14 @@ export declare function updateSpace(c: UiduClient, v: UpdateSpaceMutationVariabl
1000
954
  }>;
1001
955
  } | null>;
1002
956
  /**
1003
- * Delete a space by `{ input: { id } }`. Returns the payload (with `errors`)
1004
- * or null.
957
+ * Move a space to the trash by `{ input: { id } }`, or delete it for good with
958
+ * `permanent: true`. Returns the payload (with `errors`) or null.
1005
959
  */
1006
- export declare function deleteSpace(c: UiduClient, v: DeleteSpaceMutationVariables): Promise<{
1007
- __typename?: "DeleteSpacePayload";
1008
- space?: {
1009
- __typename?: "Space";
960
+ export declare function deleteSpace(c: UiduClient, v: DeleteRecordVariables): Promise<({
961
+ space: {
1010
962
  id: string;
1011
963
  } | null;
1012
- errors: Array<{
1013
- __typename?: "Error";
1014
- key: string;
1015
- name: string;
1016
- type: string;
1017
- }>;
1018
- } | null>;
964
+ } & {
965
+ errors: NonNullable<RemovePayload>["errors"];
966
+ }) | null>;
967
+ export {};
@@ -0,0 +1,195 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateReviewsMutationVariables, type GetReviewQueryVariables, type ListReviewsQueryVariables, type ListReviewTemplatesQuery, type ListReviewTemplatesQueryVariables, type ReviewAttributes, type ReviewSummaryFragment, type UpdateReviewMutationVariables } from "./generated/index.js";
3
+ export type Review = ReviewSummaryFragment;
4
+ export type ReviewTemplate = NonNullable<NonNullable<NonNullable<NonNullable<ListReviewTemplatesQuery['currentWorkspace']>['reviewTemplates']['edges']>[number]>['node']>;
5
+ /**
6
+ * The reviews of one person or cycle — `ownerId` is the GlobalID of an
7
+ * Employee, a User or a ReviewCycle — as a flat array; page with
8
+ * `first`/`after`.
9
+ */
10
+ export declare function listReviews(client: UiduClient, variables: ListReviewsQueryVariables): Promise<Review[]>;
11
+ /** One review by id, or null. */
12
+ export declare function getReview(client: UiduClient, variables: GetReviewQueryVariables): Promise<Review | null>;
13
+ /**
14
+ * Create one review. Without a cycle pass `reviewTemplateId` (and optionally
15
+ * `dueOn`) with the `userId`; with one pass `reviewCycleId`. Returns the
16
+ * `createReviews` payload as-is (including any `errors`).
17
+ */
18
+ export declare function createReview(client: UiduClient, attributes: ReviewAttributes): Promise<{
19
+ __typename?: "CreateReviewsPayload";
20
+ reviews?: Array<{
21
+ __typename?: "ReviewEdge";
22
+ node?: {
23
+ __typename?: "Review";
24
+ id: string;
25
+ name?: string | null;
26
+ aasmState?: string | null;
27
+ completed?: boolean | null;
28
+ completedAt?: any | null;
29
+ dispatchedAt?: any | null;
30
+ dueOn?: any | null;
31
+ createdAt: any;
32
+ updatedAt: any;
33
+ user: {
34
+ __typename?: "User";
35
+ id: string;
36
+ name?: string | null;
37
+ email?: string | null;
38
+ };
39
+ role?: {
40
+ __typename?: "Circle";
41
+ id: string;
42
+ name?: string | null;
43
+ } | null;
44
+ reviewTemplate: {
45
+ __typename?: "ReviewTemplate";
46
+ id: string;
47
+ name?: string | null;
48
+ kind?: string | null;
49
+ };
50
+ reviewCycle?: {
51
+ __typename?: "ReviewCycle";
52
+ id: string;
53
+ name?: string | null;
54
+ } | null;
55
+ parent?: {
56
+ __typename?: "Review";
57
+ id: string;
58
+ } | null;
59
+ formResponse?: {
60
+ __typename?: "FormResponse";
61
+ id: string;
62
+ } | null;
63
+ } | null;
64
+ }> | null;
65
+ reviewCycle?: {
66
+ __typename?: "ReviewCycle";
67
+ id: string;
68
+ } | null;
69
+ errors: Array<{
70
+ __typename?: "Error";
71
+ key: string;
72
+ name: string;
73
+ type: string;
74
+ }>;
75
+ } | null>;
76
+ /**
77
+ * Create several reviews in one call (`input.attributes` is a list). Returns
78
+ * the mutation payload as-is (including any `errors`).
79
+ */
80
+ export declare function createReviews(client: UiduClient, variables: CreateReviewsMutationVariables): Promise<{
81
+ __typename?: "CreateReviewsPayload";
82
+ reviews?: Array<{
83
+ __typename?: "ReviewEdge";
84
+ node?: {
85
+ __typename?: "Review";
86
+ id: string;
87
+ name?: string | null;
88
+ aasmState?: string | null;
89
+ completed?: boolean | null;
90
+ completedAt?: any | null;
91
+ dispatchedAt?: any | null;
92
+ dueOn?: any | null;
93
+ createdAt: any;
94
+ updatedAt: any;
95
+ user: {
96
+ __typename?: "User";
97
+ id: string;
98
+ name?: string | null;
99
+ email?: string | null;
100
+ };
101
+ role?: {
102
+ __typename?: "Circle";
103
+ id: string;
104
+ name?: string | null;
105
+ } | null;
106
+ reviewTemplate: {
107
+ __typename?: "ReviewTemplate";
108
+ id: string;
109
+ name?: string | null;
110
+ kind?: string | null;
111
+ };
112
+ reviewCycle?: {
113
+ __typename?: "ReviewCycle";
114
+ id: string;
115
+ name?: string | null;
116
+ } | null;
117
+ parent?: {
118
+ __typename?: "Review";
119
+ id: string;
120
+ } | null;
121
+ formResponse?: {
122
+ __typename?: "FormResponse";
123
+ id: string;
124
+ } | null;
125
+ } | null;
126
+ }> | null;
127
+ reviewCycle?: {
128
+ __typename?: "ReviewCycle";
129
+ id: string;
130
+ } | null;
131
+ errors: Array<{
132
+ __typename?: "Error";
133
+ key: string;
134
+ name: string;
135
+ type: string;
136
+ }>;
137
+ } | null>;
138
+ /**
139
+ * Update a review — its `dueOn`, its answers (`formResponseAttributes`) or its
140
+ * skill scores (`skillsAttributes`). Returns the mutation payload as-is
141
+ * (including any `errors`).
142
+ */
143
+ export declare function updateReview(client: UiduClient, variables: UpdateReviewMutationVariables): Promise<{
144
+ __typename?: "UpdateReviewPayload";
145
+ review?: {
146
+ __typename?: "Review";
147
+ id: string;
148
+ name?: string | null;
149
+ aasmState?: string | null;
150
+ completed?: boolean | null;
151
+ completedAt?: any | null;
152
+ dispatchedAt?: any | null;
153
+ dueOn?: any | null;
154
+ createdAt: any;
155
+ updatedAt: any;
156
+ user: {
157
+ __typename?: "User";
158
+ id: string;
159
+ name?: string | null;
160
+ email?: string | null;
161
+ };
162
+ role?: {
163
+ __typename?: "Circle";
164
+ id: string;
165
+ name?: string | null;
166
+ } | null;
167
+ reviewTemplate: {
168
+ __typename?: "ReviewTemplate";
169
+ id: string;
170
+ name?: string | null;
171
+ kind?: string | null;
172
+ };
173
+ reviewCycle?: {
174
+ __typename?: "ReviewCycle";
175
+ id: string;
176
+ name?: string | null;
177
+ } | null;
178
+ parent?: {
179
+ __typename?: "Review";
180
+ id: string;
181
+ } | null;
182
+ formResponse?: {
183
+ __typename?: "FormResponse";
184
+ id: string;
185
+ } | null;
186
+ } | null;
187
+ errors: Array<{
188
+ __typename?: "Error";
189
+ key: string;
190
+ name: string;
191
+ type: string;
192
+ }>;
193
+ } | null>;
194
+ /** The workspace's review templates; page with `first`/`after`. */
195
+ export declare function listReviewTemplates(client: UiduClient, variables?: ListReviewTemplatesQueryVariables): Promise<ReviewTemplate[]>;
@@ -0,0 +1,34 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type CreateSkillMutationVariables, type ListSkillsQuery, type ListSkillsQueryVariables } from "./generated/index.js";
3
+ export type WorkspaceSkill = NonNullable<NonNullable<NonNullable<NonNullable<ListSkillsQuery['currentWorkspace']>['workspaceSkills']['edges']>[number]>['node']>;
4
+ /** The workspace's skill catalog; page with `first`/`after`. */
5
+ export declare function listSkills(client: UiduClient, variables?: ListSkillsQueryVariables): Promise<WorkspaceSkill[]>;
6
+ /**
7
+ * Give someone a skill: `attributes: { skillableId, workspaceSkillId, score? }`
8
+ * (`skillableId` is e.g. a User's GlobalID; `sourceId` a Review, when the
9
+ * skill was assessed in one). Returns the mutation payload as-is (including
10
+ * any `errors`).
11
+ */
12
+ export declare function createSkill(client: UiduClient, variables: CreateSkillMutationVariables): Promise<{
13
+ __typename?: "CreateSkillPayload";
14
+ skill?: {
15
+ __typename?: "SkillEdge";
16
+ node?: {
17
+ __typename?: "Skill";
18
+ id: string;
19
+ score?: number | null;
20
+ body?: any | null;
21
+ workspaceSkill: {
22
+ __typename?: "WorkspaceSkill";
23
+ id: string;
24
+ name?: string | null;
25
+ };
26
+ } | null;
27
+ } | null;
28
+ errors: Array<{
29
+ __typename?: "Error";
30
+ key: string;
31
+ name: string;
32
+ type: string;
33
+ }>;
34
+ } | null>;
@@ -0,0 +1,9 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type ListWorkSitesQuery, type ListWorkSitesQueryVariables } from "./generated/index.js";
3
+ export type WorkSite = NonNullable<NonNullable<NonNullable<NonNullable<ListWorkSitesQuery['currentWorkspace']>['workSites']['edges']>[number]>['node']>;
4
+ /**
5
+ * The workspace's work sites — where people are placed, each with its
6
+ * analytic account, address and custom fields (`fieldValuesByShortname`) — as
7
+ * a flat array; page with `first`/`after`. Requires a Bearer token (`apiKey`).
8
+ */
9
+ export declare function listWorkSites(client: UiduClient, variables?: ListWorkSitesQueryVariables): Promise<WorkSite[]>;