@hiofu/apply-sdk 0.1.1 → 0.1.4
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/README.md +144 -80
- package/dist/{chunk-XEXQY3NM.js → chunk-MFY3F4OY.js} +210 -8
- package/dist/{client-BD0-Mbnq.d.cts → client-Ct5xyQMk.d.cts} +153 -5
- package/dist/{client-BD0-Mbnq.d.ts → client-Ct5xyQMk.d.ts} +153 -5
- package/dist/index.cjs +360 -19
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.global.js +1 -1
- package/dist/index.js +190 -29
- package/dist/react.cjs +358 -7
- package/dist/react.d.cts +307 -3
- package/dist/react.d.ts +307 -3
- package/dist/react.js +170 -2
- package/package.json +2 -2
|
@@ -28,8 +28,8 @@ interface HiofuTokenSet {
|
|
|
28
28
|
interface HiofuApplyRole {
|
|
29
29
|
/** Partner-owned stable role/job identifier. */
|
|
30
30
|
externalRoleId: string;
|
|
31
|
-
/** Partner-owned stable employer/company identifier. */
|
|
32
|
-
externalEmployerId
|
|
31
|
+
/** Partner-owned stable employer/company identifier, optional for direct HIOFU-domain integrations. */
|
|
32
|
+
externalEmployerId?: string;
|
|
33
33
|
title: string;
|
|
34
34
|
description?: string;
|
|
35
35
|
department?: string;
|
|
@@ -45,8 +45,8 @@ interface HiofuApplyRole {
|
|
|
45
45
|
interface HiofuApplyOptions {
|
|
46
46
|
jobId: string;
|
|
47
47
|
jobTitle: string;
|
|
48
|
-
employerId
|
|
49
|
-
employerName
|
|
48
|
+
employerId?: string;
|
|
49
|
+
employerName?: string;
|
|
50
50
|
scopes?: HiofuScope[];
|
|
51
51
|
variationId?: string;
|
|
52
52
|
/** Optional richer partner role payload used by Apply Rail role mapping. */
|
|
@@ -257,6 +257,154 @@ type HiofuEvent = {
|
|
|
257
257
|
type: "apply_error";
|
|
258
258
|
error: Error;
|
|
259
259
|
};
|
|
260
|
+
interface HiofuManagementConfig {
|
|
261
|
+
/** Employer/admin bearer token from HIOFU. Keep this on your server or internal tool. */
|
|
262
|
+
accessToken?: string;
|
|
263
|
+
/** Override for sandbox or internal environments. Defaults to https://api.hiofu.com/api */
|
|
264
|
+
apiBase?: string;
|
|
265
|
+
/** Optional fetch credentials mode. Defaults to `include` when no access token is supplied. */
|
|
266
|
+
credentials?: RequestCredentials;
|
|
267
|
+
/** Optional shared headers for all management requests. */
|
|
268
|
+
headers?: HeadersInit;
|
|
269
|
+
}
|
|
270
|
+
type HiofuManagementEnvironmentMode = "test" | "live";
|
|
271
|
+
type HiofuManagementRoleStatus = "draft" | "hiring" | "paused" | "closed";
|
|
272
|
+
type HiofuManagementVerificationSensitivity = "low" | "medium" | "high";
|
|
273
|
+
interface HiofuManagementPaginationMeta {
|
|
274
|
+
page: number;
|
|
275
|
+
limit: number;
|
|
276
|
+
total: number;
|
|
277
|
+
totalPages: number;
|
|
278
|
+
hasNext: boolean;
|
|
279
|
+
hasPrev: boolean;
|
|
280
|
+
}
|
|
281
|
+
interface HiofuManagementPaginatedResult<T> {
|
|
282
|
+
message: string;
|
|
283
|
+
data: T[];
|
|
284
|
+
meta: HiofuManagementPaginationMeta;
|
|
285
|
+
}
|
|
286
|
+
interface HiofuManagementRoleDimensionSkill {
|
|
287
|
+
name: string;
|
|
288
|
+
canonicalName?: string;
|
|
289
|
+
ontologyConceptId?: string;
|
|
290
|
+
ontologyId?: string;
|
|
291
|
+
ontologyFramework?: "lightcast" | "esco" | "sfia" | "onet" | "hiofu" | "custom";
|
|
292
|
+
ontologyVersion?: string;
|
|
293
|
+
importance: "required" | "preferred" | "nice_to_have";
|
|
294
|
+
}
|
|
295
|
+
interface HiofuManagementRoleDimension {
|
|
296
|
+
name: string;
|
|
297
|
+
weight: number;
|
|
298
|
+
skills: HiofuManagementRoleDimensionSkill[];
|
|
299
|
+
}
|
|
300
|
+
interface HiofuManagementRole {
|
|
301
|
+
id: string;
|
|
302
|
+
employerId: string;
|
|
303
|
+
title: string;
|
|
304
|
+
department: string | null;
|
|
305
|
+
description: string | null;
|
|
306
|
+
status: HiofuManagementRoleStatus;
|
|
307
|
+
dimensions: HiofuManagementRoleDimension[] | null;
|
|
308
|
+
verificationSensitivity: string;
|
|
309
|
+
locations: string[];
|
|
310
|
+
jobTypes: string[];
|
|
311
|
+
salaryMin: number | null;
|
|
312
|
+
salaryMax: number | null;
|
|
313
|
+
salaryCurrency: string | null;
|
|
314
|
+
experienceMin: number | null;
|
|
315
|
+
experienceMax: number | null;
|
|
316
|
+
createdAt: string;
|
|
317
|
+
updatedAt: string;
|
|
318
|
+
}
|
|
319
|
+
interface HiofuManagementRoleListItem extends HiofuManagementRole {
|
|
320
|
+
candidateCount: number;
|
|
321
|
+
avgMatch: number;
|
|
322
|
+
interviewCount: number;
|
|
323
|
+
}
|
|
324
|
+
interface HiofuManagementListRolesParams {
|
|
325
|
+
page?: number;
|
|
326
|
+
limit?: number;
|
|
327
|
+
search?: string;
|
|
328
|
+
status?: HiofuManagementRoleStatus;
|
|
329
|
+
}
|
|
330
|
+
interface HiofuManagementCreateRoleInput {
|
|
331
|
+
title: string;
|
|
332
|
+
department?: string;
|
|
333
|
+
description?: string;
|
|
334
|
+
dimensions?: HiofuManagementRoleDimension[];
|
|
335
|
+
verificationSensitivity?: HiofuManagementVerificationSensitivity;
|
|
336
|
+
locations?: string[];
|
|
337
|
+
jobTypes?: string[];
|
|
338
|
+
salaryMin?: number;
|
|
339
|
+
salaryMax?: number;
|
|
340
|
+
salaryCurrency?: string;
|
|
341
|
+
experienceMin?: number;
|
|
342
|
+
experienceMax?: number;
|
|
343
|
+
}
|
|
344
|
+
type HiofuManagementUpdateRoleInput = Partial<HiofuManagementCreateRoleInput>;
|
|
345
|
+
interface HiofuManagementRoleMapping {
|
|
346
|
+
id: string;
|
|
347
|
+
externalEmployerId: string | null;
|
|
348
|
+
externalRoleId: string;
|
|
349
|
+
organizationId: string;
|
|
350
|
+
employerRoleId: string;
|
|
351
|
+
title: string;
|
|
352
|
+
description: string | null;
|
|
353
|
+
locations: string[];
|
|
354
|
+
isActive: boolean;
|
|
355
|
+
updatedAt: string;
|
|
356
|
+
employerRole: {
|
|
357
|
+
id: string;
|
|
358
|
+
title: string;
|
|
359
|
+
status: string;
|
|
360
|
+
} | null;
|
|
361
|
+
}
|
|
362
|
+
interface HiofuManagementRedirectUri {
|
|
363
|
+
id: string;
|
|
364
|
+
uri: string;
|
|
365
|
+
createdAt: string;
|
|
366
|
+
}
|
|
367
|
+
interface HiofuManagementEnvironment {
|
|
368
|
+
id: string;
|
|
369
|
+
mode: HiofuManagementEnvironmentMode;
|
|
370
|
+
clientId: string;
|
|
371
|
+
isActive: boolean;
|
|
372
|
+
totalApiCalls: number;
|
|
373
|
+
totalAuthorizations: number;
|
|
374
|
+
lastUsedAt: string | null;
|
|
375
|
+
redirectUris: HiofuManagementRedirectUri[];
|
|
376
|
+
roleMappings: HiofuManagementRoleMapping[];
|
|
377
|
+
}
|
|
378
|
+
interface HiofuManagementDeveloperSettings {
|
|
379
|
+
organization: {
|
|
380
|
+
organizationId: string;
|
|
381
|
+
organizationName: string | null;
|
|
382
|
+
organizationSlug: string | null;
|
|
383
|
+
};
|
|
384
|
+
partner: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
slug: string;
|
|
388
|
+
status: string;
|
|
389
|
+
allowedScopes: string[];
|
|
390
|
+
defaultScopes: string[];
|
|
391
|
+
} | null;
|
|
392
|
+
environments: HiofuManagementEnvironment[];
|
|
393
|
+
}
|
|
394
|
+
interface HiofuManagementSaveRoleMappingInput {
|
|
395
|
+
mode: HiofuManagementEnvironmentMode;
|
|
396
|
+
externalRoleId: string;
|
|
397
|
+
externalEmployerId?: string;
|
|
398
|
+
employerRoleId: string;
|
|
399
|
+
title?: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
locations?: string[];
|
|
402
|
+
metadata?: Record<string, unknown>;
|
|
403
|
+
}
|
|
404
|
+
interface HiofuManagementAddRedirectUriInput {
|
|
405
|
+
mode: HiofuManagementEnvironmentMode;
|
|
406
|
+
uri: string;
|
|
407
|
+
}
|
|
260
408
|
|
|
261
409
|
declare const DEFAULT_AUTHORIZE_SCOPES: HiofuScope[];
|
|
262
410
|
declare const DEFAULT_APPLY_SCOPES: HiofuScope[];
|
|
@@ -276,4 +424,4 @@ declare class HiofuClient {
|
|
|
276
424
|
logout(): Promise<void>;
|
|
277
425
|
}
|
|
278
426
|
|
|
279
|
-
export { DEFAULT_APPLY_SCOPES as D, HiofuClient as H, type HiofuScope as a, type HiofuApplyResult as b, type HiofuConfig as c, type HiofuEvent as d, type
|
|
427
|
+
export { DEFAULT_APPLY_SCOPES as D, HiofuClient as H, type HiofuScope as a, type HiofuApplyResult as b, type HiofuConfig as c, type HiofuEvent as d, type HiofuManagementConfig as e, type HiofuManagementListRolesParams as f, type HiofuManagementPaginatedResult as g, type HiofuManagementRoleListItem as h, type HiofuManagementRole as i, type HiofuManagementCreateRoleInput as j, type HiofuManagementUpdateRoleInput as k, type HiofuManagementRoleStatus as l, type HiofuManagementDeveloperSettings as m, type HiofuManagementSaveRoleMappingInput as n, type HiofuManagementAddRedirectUriInput as o, type HiofuApplyOptions as p, type HiofuTokenSet as q, DEFAULT_AUTHORIZE_SCOPES as r, type HiofuApplyRole as s, type HiofuManagementEnvironment as t, type HiofuManagementEnvironmentMode as u, type HiofuManagementRedirectUri as v, type HiofuManagementRoleDimension as w, type HiofuManagementRoleDimensionSkill as x, type HiofuManagementRoleMapping as y, type HiofuPartner as z };
|
|
@@ -28,8 +28,8 @@ interface HiofuTokenSet {
|
|
|
28
28
|
interface HiofuApplyRole {
|
|
29
29
|
/** Partner-owned stable role/job identifier. */
|
|
30
30
|
externalRoleId: string;
|
|
31
|
-
/** Partner-owned stable employer/company identifier. */
|
|
32
|
-
externalEmployerId
|
|
31
|
+
/** Partner-owned stable employer/company identifier, optional for direct HIOFU-domain integrations. */
|
|
32
|
+
externalEmployerId?: string;
|
|
33
33
|
title: string;
|
|
34
34
|
description?: string;
|
|
35
35
|
department?: string;
|
|
@@ -45,8 +45,8 @@ interface HiofuApplyRole {
|
|
|
45
45
|
interface HiofuApplyOptions {
|
|
46
46
|
jobId: string;
|
|
47
47
|
jobTitle: string;
|
|
48
|
-
employerId
|
|
49
|
-
employerName
|
|
48
|
+
employerId?: string;
|
|
49
|
+
employerName?: string;
|
|
50
50
|
scopes?: HiofuScope[];
|
|
51
51
|
variationId?: string;
|
|
52
52
|
/** Optional richer partner role payload used by Apply Rail role mapping. */
|
|
@@ -257,6 +257,154 @@ type HiofuEvent = {
|
|
|
257
257
|
type: "apply_error";
|
|
258
258
|
error: Error;
|
|
259
259
|
};
|
|
260
|
+
interface HiofuManagementConfig {
|
|
261
|
+
/** Employer/admin bearer token from HIOFU. Keep this on your server or internal tool. */
|
|
262
|
+
accessToken?: string;
|
|
263
|
+
/** Override for sandbox or internal environments. Defaults to https://api.hiofu.com/api */
|
|
264
|
+
apiBase?: string;
|
|
265
|
+
/** Optional fetch credentials mode. Defaults to `include` when no access token is supplied. */
|
|
266
|
+
credentials?: RequestCredentials;
|
|
267
|
+
/** Optional shared headers for all management requests. */
|
|
268
|
+
headers?: HeadersInit;
|
|
269
|
+
}
|
|
270
|
+
type HiofuManagementEnvironmentMode = "test" | "live";
|
|
271
|
+
type HiofuManagementRoleStatus = "draft" | "hiring" | "paused" | "closed";
|
|
272
|
+
type HiofuManagementVerificationSensitivity = "low" | "medium" | "high";
|
|
273
|
+
interface HiofuManagementPaginationMeta {
|
|
274
|
+
page: number;
|
|
275
|
+
limit: number;
|
|
276
|
+
total: number;
|
|
277
|
+
totalPages: number;
|
|
278
|
+
hasNext: boolean;
|
|
279
|
+
hasPrev: boolean;
|
|
280
|
+
}
|
|
281
|
+
interface HiofuManagementPaginatedResult<T> {
|
|
282
|
+
message: string;
|
|
283
|
+
data: T[];
|
|
284
|
+
meta: HiofuManagementPaginationMeta;
|
|
285
|
+
}
|
|
286
|
+
interface HiofuManagementRoleDimensionSkill {
|
|
287
|
+
name: string;
|
|
288
|
+
canonicalName?: string;
|
|
289
|
+
ontologyConceptId?: string;
|
|
290
|
+
ontologyId?: string;
|
|
291
|
+
ontologyFramework?: "lightcast" | "esco" | "sfia" | "onet" | "hiofu" | "custom";
|
|
292
|
+
ontologyVersion?: string;
|
|
293
|
+
importance: "required" | "preferred" | "nice_to_have";
|
|
294
|
+
}
|
|
295
|
+
interface HiofuManagementRoleDimension {
|
|
296
|
+
name: string;
|
|
297
|
+
weight: number;
|
|
298
|
+
skills: HiofuManagementRoleDimensionSkill[];
|
|
299
|
+
}
|
|
300
|
+
interface HiofuManagementRole {
|
|
301
|
+
id: string;
|
|
302
|
+
employerId: string;
|
|
303
|
+
title: string;
|
|
304
|
+
department: string | null;
|
|
305
|
+
description: string | null;
|
|
306
|
+
status: HiofuManagementRoleStatus;
|
|
307
|
+
dimensions: HiofuManagementRoleDimension[] | null;
|
|
308
|
+
verificationSensitivity: string;
|
|
309
|
+
locations: string[];
|
|
310
|
+
jobTypes: string[];
|
|
311
|
+
salaryMin: number | null;
|
|
312
|
+
salaryMax: number | null;
|
|
313
|
+
salaryCurrency: string | null;
|
|
314
|
+
experienceMin: number | null;
|
|
315
|
+
experienceMax: number | null;
|
|
316
|
+
createdAt: string;
|
|
317
|
+
updatedAt: string;
|
|
318
|
+
}
|
|
319
|
+
interface HiofuManagementRoleListItem extends HiofuManagementRole {
|
|
320
|
+
candidateCount: number;
|
|
321
|
+
avgMatch: number;
|
|
322
|
+
interviewCount: number;
|
|
323
|
+
}
|
|
324
|
+
interface HiofuManagementListRolesParams {
|
|
325
|
+
page?: number;
|
|
326
|
+
limit?: number;
|
|
327
|
+
search?: string;
|
|
328
|
+
status?: HiofuManagementRoleStatus;
|
|
329
|
+
}
|
|
330
|
+
interface HiofuManagementCreateRoleInput {
|
|
331
|
+
title: string;
|
|
332
|
+
department?: string;
|
|
333
|
+
description?: string;
|
|
334
|
+
dimensions?: HiofuManagementRoleDimension[];
|
|
335
|
+
verificationSensitivity?: HiofuManagementVerificationSensitivity;
|
|
336
|
+
locations?: string[];
|
|
337
|
+
jobTypes?: string[];
|
|
338
|
+
salaryMin?: number;
|
|
339
|
+
salaryMax?: number;
|
|
340
|
+
salaryCurrency?: string;
|
|
341
|
+
experienceMin?: number;
|
|
342
|
+
experienceMax?: number;
|
|
343
|
+
}
|
|
344
|
+
type HiofuManagementUpdateRoleInput = Partial<HiofuManagementCreateRoleInput>;
|
|
345
|
+
interface HiofuManagementRoleMapping {
|
|
346
|
+
id: string;
|
|
347
|
+
externalEmployerId: string | null;
|
|
348
|
+
externalRoleId: string;
|
|
349
|
+
organizationId: string;
|
|
350
|
+
employerRoleId: string;
|
|
351
|
+
title: string;
|
|
352
|
+
description: string | null;
|
|
353
|
+
locations: string[];
|
|
354
|
+
isActive: boolean;
|
|
355
|
+
updatedAt: string;
|
|
356
|
+
employerRole: {
|
|
357
|
+
id: string;
|
|
358
|
+
title: string;
|
|
359
|
+
status: string;
|
|
360
|
+
} | null;
|
|
361
|
+
}
|
|
362
|
+
interface HiofuManagementRedirectUri {
|
|
363
|
+
id: string;
|
|
364
|
+
uri: string;
|
|
365
|
+
createdAt: string;
|
|
366
|
+
}
|
|
367
|
+
interface HiofuManagementEnvironment {
|
|
368
|
+
id: string;
|
|
369
|
+
mode: HiofuManagementEnvironmentMode;
|
|
370
|
+
clientId: string;
|
|
371
|
+
isActive: boolean;
|
|
372
|
+
totalApiCalls: number;
|
|
373
|
+
totalAuthorizations: number;
|
|
374
|
+
lastUsedAt: string | null;
|
|
375
|
+
redirectUris: HiofuManagementRedirectUri[];
|
|
376
|
+
roleMappings: HiofuManagementRoleMapping[];
|
|
377
|
+
}
|
|
378
|
+
interface HiofuManagementDeveloperSettings {
|
|
379
|
+
organization: {
|
|
380
|
+
organizationId: string;
|
|
381
|
+
organizationName: string | null;
|
|
382
|
+
organizationSlug: string | null;
|
|
383
|
+
};
|
|
384
|
+
partner: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
slug: string;
|
|
388
|
+
status: string;
|
|
389
|
+
allowedScopes: string[];
|
|
390
|
+
defaultScopes: string[];
|
|
391
|
+
} | null;
|
|
392
|
+
environments: HiofuManagementEnvironment[];
|
|
393
|
+
}
|
|
394
|
+
interface HiofuManagementSaveRoleMappingInput {
|
|
395
|
+
mode: HiofuManagementEnvironmentMode;
|
|
396
|
+
externalRoleId: string;
|
|
397
|
+
externalEmployerId?: string;
|
|
398
|
+
employerRoleId: string;
|
|
399
|
+
title?: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
locations?: string[];
|
|
402
|
+
metadata?: Record<string, unknown>;
|
|
403
|
+
}
|
|
404
|
+
interface HiofuManagementAddRedirectUriInput {
|
|
405
|
+
mode: HiofuManagementEnvironmentMode;
|
|
406
|
+
uri: string;
|
|
407
|
+
}
|
|
260
408
|
|
|
261
409
|
declare const DEFAULT_AUTHORIZE_SCOPES: HiofuScope[];
|
|
262
410
|
declare const DEFAULT_APPLY_SCOPES: HiofuScope[];
|
|
@@ -276,4 +424,4 @@ declare class HiofuClient {
|
|
|
276
424
|
logout(): Promise<void>;
|
|
277
425
|
}
|
|
278
426
|
|
|
279
|
-
export { DEFAULT_APPLY_SCOPES as D, HiofuClient as H, type HiofuScope as a, type HiofuApplyResult as b, type HiofuConfig as c, type HiofuEvent as d, type
|
|
427
|
+
export { DEFAULT_APPLY_SCOPES as D, HiofuClient as H, type HiofuScope as a, type HiofuApplyResult as b, type HiofuConfig as c, type HiofuEvent as d, type HiofuManagementConfig as e, type HiofuManagementListRolesParams as f, type HiofuManagementPaginatedResult as g, type HiofuManagementRoleListItem as h, type HiofuManagementRole as i, type HiofuManagementCreateRoleInput as j, type HiofuManagementUpdateRoleInput as k, type HiofuManagementRoleStatus as l, type HiofuManagementDeveloperSettings as m, type HiofuManagementSaveRoleMappingInput as n, type HiofuManagementAddRedirectUriInput as o, type HiofuApplyOptions as p, type HiofuTokenSet as q, DEFAULT_AUTHORIZE_SCOPES as r, type HiofuApplyRole as s, type HiofuManagementEnvironment as t, type HiofuManagementEnvironmentMode as u, type HiofuManagementRedirectUri as v, type HiofuManagementRoleDimension as w, type HiofuManagementRoleDimensionSkill as x, type HiofuManagementRoleMapping as y, type HiofuPartner as z };
|