@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.
- package/CHANGELOG.md +26 -0
- package/dist/declarations/src/calls.d.ts +9 -1
- package/dist/declarations/src/candidates.d.ts +102 -0
- package/dist/declarations/src/contracts.d.ts +503 -0
- package/dist/declarations/src/expenses.d.ts +5 -0
- package/dist/declarations/src/field-values.d.ts +34 -0
- package/dist/declarations/src/generated/index.d.ts +12104 -4367
- package/dist/declarations/src/index.d.ts +17 -3
- package/dist/declarations/src/meetings.d.ts +41 -0
- package/dist/declarations/src/mutations.d.ts +80 -131
- package/dist/declarations/src/reviews.d.ts +195 -0
- package/dist/declarations/src/skills.d.ts +34 -0
- package/dist/declarations/src/work-sites.d.ts +9 -0
- package/dist/uidu-client.cjs.dev.js +469 -31
- package/dist/uidu-client.cjs.prod.js +469 -31
- package/dist/uidu-client.esm.js +433 -32
- package/package.json +1 -1
- package/src/calls.ts +37 -0
- package/src/candidates.ts +105 -0
- package/src/contracts.test.ts +97 -0
- package/src/contracts.ts +139 -0
- package/src/field-values.ts +95 -0
- package/src/generated/index.ts +841 -343
- package/src/index.ts +63 -2
- package/src/meetings.ts +37 -0
- package/src/mutations.test.ts +40 -1
- package/src/mutations.ts +122 -60
- package/src/queries/calls/ListCallStatuses.graphql +26 -0
- package/src/queries/candidates/CandidateFields.graphql +28 -0
- package/src/queries/candidates/CandidateMutations.graphql +35 -0
- package/src/queries/candidates/CandidateQueries.graphql +94 -0
- package/src/queries/contacts/ContactMutations.graphql +0 -13
- package/src/queries/contracts/ContractMutations.graphql +108 -0
- package/src/queries/contracts/ContractQueries.graphql +84 -0
- package/src/queries/courses/CourseMutations.graphql +0 -13
- package/src/queries/discardable/DiscardableMutations.graphql +32 -0
- package/src/queries/expenses/ListAnalyticAccounts.graphql +4 -0
- package/src/queries/field-values/FieldValueFields.graphql +18 -0
- package/src/queries/field-values/FieldValueQueries.graphql +43 -0
- package/src/queries/forms/FormMutations.graphql +0 -13
- package/src/queries/help-center/ChannelMutations.graphql +0 -13
- package/src/queries/kb/KbMutations.graphql +0 -26
- package/src/queries/meetings/MeetingQueries.graphql +48 -0
- package/src/queries/notes/NoteMutations.graphql +0 -13
- package/src/queries/people/PeopleMutations.graphql +0 -13
- package/src/queries/reviews/ReviewFields.graphql +35 -0
- package/src/queries/reviews/ReviewMutations.graphql +32 -0
- package/src/queries/reviews/ReviewQueries.graphql +86 -0
- package/src/queries/skills/SkillQueries.graphql +53 -0
- package/src/queries/spaces/SpaceMutations.graphql +0 -13
- package/src/queries/tasks/TaskMutations.graphql +0 -13
- package/src/queries/work-sites/ListWorkSites.graphql +32 -0
- package/src/recruiting.test.ts +196 -0
- package/src/reviews.ts +114 -0
- package/src/skills.ts +47 -0
- 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;
|