@uidu/client 3.18.0 → 3.20.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 (56) hide show
  1. package/CHANGELOG.md +26 -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 +503 -0
  5. package/dist/declarations/src/expenses.d.ts +5 -0
  6. package/dist/declarations/src/field-values.d.ts +34 -0
  7. package/dist/declarations/src/generated/index.d.ts +12104 -4367
  8. package/dist/declarations/src/index.d.ts +17 -3
  9. package/dist/declarations/src/meetings.d.ts +41 -0
  10. package/dist/declarations/src/mutations.d.ts +80 -131
  11. package/dist/declarations/src/reviews.d.ts +195 -0
  12. package/dist/declarations/src/skills.d.ts +34 -0
  13. package/dist/declarations/src/work-sites.d.ts +9 -0
  14. package/dist/uidu-client.cjs.dev.js +469 -31
  15. package/dist/uidu-client.cjs.prod.js +469 -31
  16. package/dist/uidu-client.esm.js +433 -32
  17. package/package.json +1 -1
  18. package/src/calls.ts +37 -0
  19. package/src/candidates.ts +105 -0
  20. package/src/contracts.test.ts +97 -0
  21. package/src/contracts.ts +139 -0
  22. package/src/field-values.ts +95 -0
  23. package/src/generated/index.ts +841 -343
  24. package/src/index.ts +63 -2
  25. package/src/meetings.ts +37 -0
  26. package/src/mutations.test.ts +40 -1
  27. package/src/mutations.ts +122 -60
  28. package/src/queries/calls/ListCallStatuses.graphql +26 -0
  29. package/src/queries/candidates/CandidateFields.graphql +28 -0
  30. package/src/queries/candidates/CandidateMutations.graphql +35 -0
  31. package/src/queries/candidates/CandidateQueries.graphql +94 -0
  32. package/src/queries/contacts/ContactMutations.graphql +0 -13
  33. package/src/queries/contracts/ContractMutations.graphql +108 -0
  34. package/src/queries/contracts/ContractQueries.graphql +84 -0
  35. package/src/queries/courses/CourseMutations.graphql +0 -13
  36. package/src/queries/discardable/DiscardableMutations.graphql +32 -0
  37. package/src/queries/expenses/ListAnalyticAccounts.graphql +4 -0
  38. package/src/queries/field-values/FieldValueFields.graphql +18 -0
  39. package/src/queries/field-values/FieldValueQueries.graphql +43 -0
  40. package/src/queries/forms/FormMutations.graphql +0 -13
  41. package/src/queries/help-center/ChannelMutations.graphql +0 -13
  42. package/src/queries/kb/KbMutations.graphql +0 -26
  43. package/src/queries/meetings/MeetingQueries.graphql +48 -0
  44. package/src/queries/notes/NoteMutations.graphql +0 -13
  45. package/src/queries/people/PeopleMutations.graphql +0 -13
  46. package/src/queries/reviews/ReviewFields.graphql +35 -0
  47. package/src/queries/reviews/ReviewMutations.graphql +32 -0
  48. package/src/queries/reviews/ReviewQueries.graphql +86 -0
  49. package/src/queries/skills/SkillQueries.graphql +53 -0
  50. package/src/queries/spaces/SpaceMutations.graphql +0 -13
  51. package/src/queries/tasks/TaskMutations.graphql +0 -13
  52. package/src/queries/work-sites/ListWorkSites.graphql +32 -0
  53. package/src/recruiting.test.ts +196 -0
  54. package/src/reviews.ts +114 -0
  55. package/src/skills.ts +47 -0
  56. package/src/work-sites.ts +28 -0
@@ -0,0 +1,34 @@
1
+ import type { UiduClient } from "./client.js";
2
+ import { type GetRecordFieldValuesQueryVariables, type ListFieldValueHistoryQueryVariables, type RecordFieldValueFragment } from "./generated/index.js";
3
+ export type RecordFieldValue = RecordFieldValueFragment;
4
+ export type RecordFieldValues = {
5
+ /** The record's GraphQL type, e.g. `Contact`, `Contract`, `Employee`. */
6
+ typename: string;
7
+ id: string;
8
+ /** Current values keyed by field shortname. */
9
+ byShortname: Record<string, unknown>;
10
+ /** Current values with their field and dates. */
11
+ fieldValues: RecordFieldValue[];
12
+ };
13
+ /**
14
+ * The current field values of any record that carries custom fields (contact,
15
+ * employee, contract, work site, application…), by GlobalID; null when the id
16
+ * resolves to nothing or to a type without fields.
17
+ */
18
+ export declare function getRecordFieldValues(client: UiduClient, variables: GetRecordFieldValuesQueryVariables): Promise<RecordFieldValues | null>;
19
+ /**
20
+ * Every value `fieldId` has held on the record `modelId`, oldest first, walking
21
+ * all pages. Pair it with {@link fieldValueAsOf} to answer "what did it say on
22
+ * a given day?".
23
+ */
24
+ export declare function listFieldValueHistory(client: UiduClient, variables: Omit<ListFieldValueHistoryQueryVariables, 'after'>): Promise<RecordFieldValue[]>;
25
+ /**
26
+ * The value that held on `date` (an ISO8601 date, default today) among a
27
+ * field's history: the latest `validFrom` not after the date, ties going to
28
+ * the row written last. Null when nothing held yet.
29
+ *
30
+ * The same rule uidu applies server-side for a record's current value; the
31
+ * GraphQL API takes no as-of argument, so reports read the history with
32
+ * {@link listFieldValueHistory} and pick here.
33
+ */
34
+ export declare function fieldValueAsOf(history: readonly RecordFieldValue[], date?: string): RecordFieldValue | null;