@uidu/client 3.20.0 → 3.22.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @uidu/client
2
2
 
3
+ ## 3.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5155877: Recruiting: a pool contact is a referral. `createPoolContact` takes `sourceId` (a referring Organization or a User), `sourceChannel` and `referredOn`; `getPool` and the payloads return them; `updatePoolContact` corrects a referral.
8
+
9
+ ## 3.21.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 70fd345: Recruiting: `listCandidates` lists the workspace's candidates with their custom fields, filtered by pool, source and last interaction. `listReviews` without `ownerId` now lists every review in the workspace, with or without a cycle, filtered by person, template, `dueOn` and `completedAt`. `getReview` returns `pdfUrl`, the review printed to PDF.
14
+ - bf1e6c8: Recruiting: `createCandidate`, `getPool`, `deletePoolContact`, `getMeeting` and `updateMeeting`. A candidate's `source` is now the record they came through (an Application, Pool, Organization or User, as uidu returns it since the polymorphic source landed), with `sourceChannel` saying how — the previous string `source` no longer matches the API.
15
+
3
16
  ## 3.20.0
4
17
 
5
18
  ### Minor Changes
@@ -1,18 +1,27 @@
1
1
  import type { UiduClient } from "./client.js";
2
- import { type CreatePoolContactMutationVariables, type FindCandidatesQuery, type FindCandidatesQueryVariables, type GetCandidateQuery, type GetCandidateQueryVariables, type ListPoolsQuery, type ListPoolsQueryVariables, type UpdateCandidateMutationVariables } from "./generated/index.js";
2
+ import { type CreateCandidateMutationVariables, type CreatePoolContactMutationVariables, type DeletePoolContactMutationVariables, type FindCandidatesQuery, type FindCandidatesQueryVariables, type GetCandidateQuery, type GetCandidateQueryVariables, type GetPoolQuery, type GetPoolQueryVariables, type ListCandidatesQuery, type ListCandidatesQueryVariables, type ListPoolsQuery, type ListPoolsQueryVariables, type UpdateCandidateMutationVariables, type UpdatePoolContactMutationVariables } from "./generated/index.js";
3
3
  export type CandidateSearch = NonNullable<NonNullable<FindCandidatesQuery['currentWorkspace']>['findCandidates']>;
4
4
  export type Candidate = CandidateSearch['candidates'][number];
5
5
  export type CandidateDetail = Extract<NonNullable<GetCandidateQuery['node']>, {
6
6
  __typename: 'Candidate';
7
7
  }>;
8
8
  export type Pool = NonNullable<NonNullable<NonNullable<NonNullable<ListPoolsQuery['currentWorkspace']>['pools']['edges']>[number]>['node']>;
9
+ export type CandidateListItem = NonNullable<NonNullable<NonNullable<NonNullable<ListCandidatesQuery['currentWorkspace']>['candidates']['edges']>[number]>['node']>;
10
+ export type PoolDetail = NonNullable<NonNullable<GetPoolQuery['currentWorkspace']>['pool']>;
11
+ export type PoolContact = NonNullable<NonNullable<NonNullable<PoolDetail['poolContacts']['edges']>[number]>['node']>;
12
+ /**
13
+ * The workspace's candidates with their custom fields, filtered with
14
+ * `params.filters` — `poolIds` (in), `source` (in, the GlobalIDs of the
15
+ * Application, Pool, Organization or User they came through) and
16
+ * `lastInteractionAt` (`>=`, `<=`, `between`); page with `first`/`after`.
17
+ */
18
+ export declare function listCandidates(client: UiduClient, variables?: ListCandidatesQueryVariables): Promise<CandidateListItem[]>;
9
19
  /**
10
20
  * Rank the talent pool against a description (`term`) — and, with `callId`,
11
21
  * that call's applications too — and return the `candidates`, `applications`
12
22
  * and per-record `evidence`, or null when the viewer may not search.
13
23
  *
14
- * This is the only way to list candidates: the workspace has no plain
15
- * `candidates` connection. A blank `term` with a `callId` uses the call's own
24
+ * For a plain filtered list use {@link listCandidates}. A blank `term` with a `callId` uses the call's own
16
25
  * words; `near` + `withinKm` keep only those living close enough, and
17
26
  * `eligibleFor` only those of an age the contract allows.
18
27
  */
@@ -23,7 +32,77 @@ export declare function findCandidates(client: UiduClient, variables?: FindCandi
23
32
  */
24
33
  export declare function getCandidate(client: UiduClient, variables: GetCandidateQueryVariables): Promise<CandidateDetail | null>;
25
34
  /**
26
- * Update a candidate: pool consent (`poolConsentAt`), `source`, or
35
+ * Add someone to the talent pool as a candidate: `attributes: { userId,
36
+ * sourceChannel?, sourceId?, poolConsentAt?, fieldValues? }`, where `sourceId`
37
+ * is the GlobalID of the Application, Pool, Organization or User they came
38
+ * through. Returns the mutation payload as-is (including any `errors`).
39
+ */
40
+ export declare function createCandidate(client: UiduClient, variables: CreateCandidateMutationVariables): Promise<{
41
+ __typename?: "CreateCandidatePayload";
42
+ candidates?: {
43
+ __typename?: "CandidateConnection";
44
+ edges?: Array<{
45
+ __typename?: "CandidateEdge";
46
+ node?: {
47
+ __typename?: "Candidate";
48
+ id: string;
49
+ name?: string | null;
50
+ cvHeadline?: string | null;
51
+ cvSummary?: string | null;
52
+ sourceChannel: import("./generated/index.js").CandidateSourceEnum;
53
+ poolConsent: boolean;
54
+ poolConsentAt?: any | null;
55
+ retainUntil?: any | null;
56
+ retentionMonths: number;
57
+ lastInteractionAt?: any | null;
58
+ createdAt: any;
59
+ updatedAt: any;
60
+ source?: {
61
+ __typename: "Application";
62
+ id: string;
63
+ } | {
64
+ __typename: "Organization";
65
+ id: string;
66
+ name?: string | null;
67
+ } | {
68
+ __typename: "Pool";
69
+ id: string;
70
+ name?: string | null;
71
+ } | {
72
+ __typename: "User";
73
+ id: string;
74
+ name?: string | null;
75
+ } | null;
76
+ contact?: {
77
+ __typename?: "Contact";
78
+ id: string;
79
+ name?: string | null;
80
+ email?: string | null;
81
+ } | null;
82
+ user: {
83
+ __typename?: "User";
84
+ id: string;
85
+ name?: string | null;
86
+ email?: string | null;
87
+ };
88
+ pools: Array<{
89
+ __typename?: "Pool";
90
+ id: string;
91
+ name?: string | null;
92
+ }>;
93
+ } | null;
94
+ } | null> | null;
95
+ } | null;
96
+ errors: Array<{
97
+ __typename?: "Error";
98
+ key: string;
99
+ name: string;
100
+ type: string;
101
+ }>;
102
+ } | null>;
103
+ /**
104
+ * Update a candidate: pool consent (`poolConsentAt`), where they came from
105
+ * (`sourceChannel` + `sourceId`), custom `fieldValues`, or
27
106
  * `extendRetention: true` to push `retainUntil` out by another retention
28
107
  * period. Returns the mutation payload as-is (including any `errors`).
29
108
  */
@@ -35,7 +114,7 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
35
114
  name?: string | null;
36
115
  cvHeadline?: string | null;
37
116
  cvSummary?: string | null;
38
- source: import("./generated/index.js").CandidateSourceEnum;
117
+ sourceChannel: import("./generated/index.js").CandidateSourceEnum;
39
118
  poolConsent: boolean;
40
119
  poolConsentAt?: any | null;
41
120
  retainUntil?: any | null;
@@ -43,6 +122,22 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
43
122
  lastInteractionAt?: any | null;
44
123
  createdAt: any;
45
124
  updatedAt: any;
125
+ source?: {
126
+ __typename: "Application";
127
+ id: string;
128
+ } | {
129
+ __typename: "Organization";
130
+ id: string;
131
+ name?: string | null;
132
+ } | {
133
+ __typename: "Pool";
134
+ id: string;
135
+ name?: string | null;
136
+ } | {
137
+ __typename: "User";
138
+ id: string;
139
+ name?: string | null;
140
+ } | null;
46
141
  contact?: {
47
142
  __typename?: "Contact";
48
143
  id: string;
@@ -71,8 +166,17 @@ export declare function updateCandidate(client: UiduClient, variables: UpdateCan
71
166
  /** The workspace's talent pools with how many contacts each holds; page with `first`/`after`. */
72
167
  export declare function listPools(client: UiduClient, variables?: ListPoolsQueryVariables): Promise<Pool[]>;
73
168
  /**
74
- * Add a contact to a pool (`attributes: { poolId, contactId }`). Returns the
75
- * mutation payload as-is (including any `errors`).
169
+ * One talent pool by GlobalID with a page of the contacts in it (`first` /
170
+ * `after`), or null.
171
+ */
172
+ export declare function getPool(client: UiduClient, variables: GetPoolQueryVariables): Promise<PoolDetail | null>;
173
+ /**
174
+ * Refer a contact to a pool (`attributes: { poolId, contactId, sourceId?,
175
+ * sourceChannel?, referredOn? }`). Each call is one referral, so the same
176
+ * person may enter the same pool more than once: `sourceId` is who sent them
177
+ * (the GlobalID of a referring Organization or of a User), `sourceChannel` a
178
+ * short slug like an application's, `referredOn` the day (`YYYY-MM-DD`, today
179
+ * when left out). Returns the mutation payload as-is (including any `errors`).
76
180
  */
77
181
  export declare function createPoolContact(client: UiduClient, variables: CreatePoolContactMutationVariables): Promise<{
78
182
  __typename?: "CreatePoolContactPayload";
@@ -81,6 +185,22 @@ export declare function createPoolContact(client: UiduClient, variables: CreateP
81
185
  node?: {
82
186
  __typename?: "PoolContact";
83
187
  id: string;
188
+ createdAt: any;
189
+ sourceChannel?: string | null;
190
+ referredOn?: any | null;
191
+ source?: {
192
+ __typename: "Application";
193
+ } | {
194
+ __typename: "Organization";
195
+ id: string;
196
+ name?: string | null;
197
+ } | {
198
+ __typename: "Pool";
199
+ } | {
200
+ __typename: "User";
201
+ id: string;
202
+ name?: string | null;
203
+ } | null;
84
204
  pool: {
85
205
  __typename?: "Pool";
86
206
  id: string;
@@ -90,6 +210,7 @@ export declare function createPoolContact(client: UiduClient, variables: CreateP
90
210
  __typename?: "Contact";
91
211
  id: string;
92
212
  name?: string | null;
213
+ email?: string | null;
93
214
  };
94
215
  } | null;
95
216
  } | null;
@@ -100,3 +221,61 @@ export declare function createPoolContact(client: UiduClient, variables: CreateP
100
221
  type: string;
101
222
  }>;
102
223
  } | null>;
224
+ /**
225
+ * Correct a referral, by the PoolContact's GlobalID (`id`, `attributes: {
226
+ * sourceId?, sourceChannel?, referredOn? }`). Returns the mutation payload
227
+ * as-is (including any `errors`).
228
+ */
229
+ export declare function updatePoolContact(client: UiduClient, variables: UpdatePoolContactMutationVariables): Promise<{
230
+ __typename?: "UpdatePoolContactPayload";
231
+ poolContact?: {
232
+ __typename?: "PoolContact";
233
+ id: string;
234
+ createdAt: any;
235
+ sourceChannel?: string | null;
236
+ referredOn?: any | null;
237
+ source?: {
238
+ __typename: "Application";
239
+ } | {
240
+ __typename: "Organization";
241
+ id: string;
242
+ name?: string | null;
243
+ } | {
244
+ __typename: "Pool";
245
+ } | {
246
+ __typename: "User";
247
+ id: string;
248
+ name?: string | null;
249
+ } | null;
250
+ pool: {
251
+ __typename?: "Pool";
252
+ id: string;
253
+ name?: string | null;
254
+ };
255
+ contact: {
256
+ __typename?: "Contact";
257
+ id: string;
258
+ name?: string | null;
259
+ email?: string | null;
260
+ };
261
+ } | null;
262
+ errors: Array<{
263
+ __typename?: "Error";
264
+ key: string;
265
+ name: string;
266
+ type: string;
267
+ }>;
268
+ } | null>;
269
+ /**
270
+ * Take a contact out of a pool, by the PoolContact's GlobalID. Returns the
271
+ * mutation payload as-is (including any `errors`).
272
+ */
273
+ export declare function deletePoolContact(client: UiduClient, variables: DeletePoolContactMutationVariables): Promise<{
274
+ __typename?: "DeletePoolContactPayload";
275
+ errors: Array<{
276
+ __typename?: "Error";
277
+ key: string;
278
+ name: string;
279
+ type: string;
280
+ }>;
281
+ } | null>;