@vonq/hapi-elements-types 1.38.0 → 1.39.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/ats/types.ts +4 -1
- package/campaign/api.types.ts +11 -0
- package/campaign/service.types.ts +12 -0
- package/campaign/state.types.ts +11 -0
- package/campaign/types.ts +31 -0
- package/experimental/api.types.ts +0 -55
- package/experimental/service.types.ts +0 -44
- package/experimental/state.types.ts +0 -12
- package/experimental/types.ts +1 -30
- package/package.json +1 -1
package/ats/types.ts
CHANGED
@@ -24,7 +24,10 @@ export type ATSUserSettings = {
|
|
24
24
|
can_use_wallets: boolean
|
25
25
|
can_pay_with_direct_charge: boolean
|
26
26
|
invoice_currency: string | null
|
27
|
-
|
27
|
+
smartfill: {
|
28
|
+
vacancy_fields: boolean | null
|
29
|
+
posting_requirements: boolean | null
|
30
|
+
}
|
28
31
|
}
|
29
32
|
export type ATSSettings = {
|
30
33
|
payment_settings: ATSUserPaymentSetting[]
|
package/campaign/api.types.ts
CHANGED
@@ -4,6 +4,9 @@ import {
|
|
4
4
|
CampaignEditRequestBody,
|
5
5
|
CampaignIdResponse,
|
6
6
|
CampaignOrderRequestBody,
|
7
|
+
CampaignPostingRequirementsSuggestionCreateRequest,
|
8
|
+
CampaignPostingRequirementsSuggestionCreateRequestResponse,
|
9
|
+
CampaignPostingRequirementsSuggestionsGetRequestResponse,
|
7
10
|
CampaignPostingRequirementsValidateRequestBody,
|
8
11
|
CampaignSetProductStatusRequestBody,
|
9
12
|
TaxonomyEducationAndSeniorityLevel,
|
@@ -25,6 +28,8 @@ export type WindowHapiAPICampaignConfigs = {
|
|
25
28
|
validateCampaignPostingRequirements: AxiosRequestConfig
|
26
29
|
saveCampaign: AxiosRequestConfig
|
27
30
|
setProductStatus: AxiosRequestConfig
|
31
|
+
getSuggestionOfPostingRequirements: AxiosRequestConfig
|
32
|
+
createSuggestionOfPostingRequirements: AxiosRequestConfig
|
28
33
|
}
|
29
34
|
export type WindowHapiAPICampaignRequests = {
|
30
35
|
getCampaigns: (
|
@@ -60,6 +65,12 @@ export type WindowHapiAPICampaignRequests = {
|
|
60
65
|
campaignId: string,
|
61
66
|
requestBody: CampaignSetProductStatusRequestBody,
|
62
67
|
) => Promise<CampaignIdResponse>
|
68
|
+
getSuggestionOfPostingRequirements: (
|
69
|
+
suggestionId: string,
|
70
|
+
) => Promise<CampaignPostingRequirementsSuggestionsGetRequestResponse>
|
71
|
+
createSuggestionOfPostingRequirements: (
|
72
|
+
payload: CampaignPostingRequirementsSuggestionCreateRequest,
|
73
|
+
) => Promise<CampaignPostingRequirementsSuggestionCreateRequestResponse>
|
63
74
|
}
|
64
75
|
export type WindowHapiAPICampaign = WindowHapiModuleWithConstructorArgs<
|
65
76
|
WindowHapiAPIModule<
|
@@ -9,6 +9,9 @@ import {
|
|
9
9
|
CampaignEditForm,
|
10
10
|
CampaignIdResponse,
|
11
11
|
CampaignOrderRequestBody,
|
12
|
+
CampaignPostingRequirementsSuggestionCreateRequest,
|
13
|
+
CampaignPostingRequirementsSuggestionCreateRequestResponse,
|
14
|
+
CampaignPostingRequirementsSuggestionsGetRequestResponse,
|
12
15
|
CampaignSetProductStatusRequestBody,
|
13
16
|
TaxonomyEducationAndSeniorityLevel,
|
14
17
|
TaxonomyEmploymentTypes,
|
@@ -75,6 +78,13 @@ export type CampaignServiceSetProductStatusHandler = (
|
|
75
78
|
export type CampaignServiceGetEmploymentTypesHandler = () => Promise<
|
76
79
|
TaxonomyEmploymentTypes[]
|
77
80
|
>
|
81
|
+
export type CampaignServiceCreateSuggestionOfPostingRequirementsHandler = (
|
82
|
+
contractIds: (string | number)[],
|
83
|
+
) => Promise<CampaignPostingRequirementsSuggestionCreateRequestResponse>
|
84
|
+
export type CampaignServiceGetSuggestionOfPostingRequirementsHandler = (
|
85
|
+
taskId: string,
|
86
|
+
) => Promise<CampaignPostingRequirementsSuggestionsGetRequestResponse>
|
87
|
+
|
78
88
|
export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
79
89
|
{
|
80
90
|
getCampaigns: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsHandler>
|
@@ -100,6 +110,8 @@ export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
|
100
110
|
getEditCampaignRequestBody: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEditCampaignRequestBodyHandler>
|
101
111
|
setProductStatus: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSetProductStatusHandler>
|
102
112
|
getEmploymentTypes: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEmploymentTypesHandler>
|
113
|
+
createSuggestionOfPostingRequirements: HapiServiceFunctionWithLifecycleHooks<CampaignServiceCreateSuggestionOfPostingRequirementsHandler>
|
114
|
+
getSuggestionOfPostingRequirements: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetSuggestionOfPostingRequirementsHandler>
|
103
115
|
},
|
104
116
|
{ readonly service: WindowHapiService }
|
105
117
|
>
|
package/campaign/state.types.ts
CHANGED
@@ -3,6 +3,7 @@ import {
|
|
3
3
|
CampaignCreateForm,
|
4
4
|
CampaignCreateFormDraft,
|
5
5
|
CampaignEditForm,
|
6
|
+
CampaignPostingRequirementsSuggestionStatus,
|
6
7
|
TaxonomyEducationAndSeniorityLevel,
|
7
8
|
TaxonomyEmploymentTypes,
|
8
9
|
TaxonomySeniority,
|
@@ -25,4 +26,14 @@ export type CampaignState = {
|
|
25
26
|
senioritiesAreLoading: boolean
|
26
27
|
/* Employment Types */
|
27
28
|
employmentTypes: TaxonomyEmploymentTypes[]
|
29
|
+
/* Posting Requirements Suggestions */
|
30
|
+
postingRequirementsSuggestionsPollingIntervalsMap: Record<string, number>
|
31
|
+
postingRequirementsSuggestionsPollingMap: Record<string, string[]>
|
32
|
+
postingRequirementsSuggestionsPollingStatusMap: Record<
|
33
|
+
string,
|
34
|
+
{
|
35
|
+
createdAt: string
|
36
|
+
status: CampaignPostingRequirementsSuggestionStatus
|
37
|
+
}
|
38
|
+
>
|
28
39
|
}
|
package/campaign/types.ts
CHANGED
@@ -359,3 +359,34 @@ export type CampaignSetProductStatusRequestBody = {
|
|
359
359
|
export type CampaignIdResponse = {
|
360
360
|
campaignId: string
|
361
361
|
}
|
362
|
+
|
363
|
+
export type CampaignPostingRequirementsSuggestionCreateRequest = {
|
364
|
+
contract_ids: (string | number)[]
|
365
|
+
context: {
|
366
|
+
structured: Record<string, any>
|
367
|
+
unstructured: string
|
368
|
+
}
|
369
|
+
}
|
370
|
+
|
371
|
+
export type CampaignPostingRequirementsSuggestionCreateRequestResponse = {
|
372
|
+
smartfill_task_id: string
|
373
|
+
}
|
374
|
+
|
375
|
+
export type CampaignPostingRequirementsSuggestionStatus =
|
376
|
+
| "queued"
|
377
|
+
| "started"
|
378
|
+
| "completed"
|
379
|
+
| "errored"
|
380
|
+
|
381
|
+
export type CampaignPostingRequirementsSuggestionsGetRequestResponse = {
|
382
|
+
id: string
|
383
|
+
status: CampaignPostingRequirementsSuggestionStatus
|
384
|
+
smartfills: {
|
385
|
+
contract_id: string
|
386
|
+
channel_id: string
|
387
|
+
status: CampaignPostingRequirementsSuggestionStatus
|
388
|
+
created_at: string
|
389
|
+
updated_at: string
|
390
|
+
prefill_data: Record<string, any>
|
391
|
+
}[]
|
392
|
+
}
|
@@ -1,28 +1,13 @@
|
|
1
|
-
import { RawAxiosRequestConfig } from "axios"
|
2
1
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
3
2
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
3
|
import { AxiosRequestConfig } from "axios/index"
|
5
4
|
import { PostingRequirement } from "../common"
|
6
|
-
import {
|
7
|
-
ExperimentalSuggestionCreateRequestData,
|
8
|
-
ExperimentalSuggestionGetResponseData,
|
9
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
10
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData,
|
11
|
-
ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
|
12
|
-
ExperimentalSuggestionVacancyFieldsGetResponseData,
|
13
|
-
} from "./types"
|
14
5
|
|
15
6
|
export type WindowHapiAPIExperimentalConfigs = {
|
16
|
-
getExperimental: RawAxiosRequestConfig
|
17
7
|
getPostingRequirementOptions: AxiosRequestConfig
|
18
8
|
getPostingRequirements: AxiosRequestConfig
|
19
|
-
getSuggestionOfPostingRequirements: AxiosRequestConfig
|
20
|
-
getSuggestionOfVacancyFields: AxiosRequestConfig
|
21
|
-
createSuggestionOfPostingRequirements: AxiosRequestConfig
|
22
|
-
createSuggestionOfVacancyFields: AxiosRequestConfig
|
23
9
|
}
|
24
10
|
export type WindowHapiAPIExperimentalRequests = {
|
25
|
-
getExperimental: () => Promise<any>
|
26
11
|
getPostingRequirementOptions: (
|
27
12
|
productId: string,
|
28
13
|
fieldName: string,
|
@@ -31,46 +16,6 @@ export type WindowHapiAPIExperimentalRequests = {
|
|
31
16
|
getPostingRequirements: (
|
32
17
|
productId: string | number,
|
33
18
|
) => Promise<PostingRequirement[]>
|
34
|
-
createSuggestionOfPostingRequirements: (
|
35
|
-
payload: ExperimentalSuggestionCreateRequestData<ExperimentalSuggestionPostingRequirementsCreateRequestPayload>,
|
36
|
-
) => Promise<
|
37
|
-
ExperimentalSuggestionGetResponseData<
|
38
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
39
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData
|
40
|
-
>
|
41
|
-
>
|
42
|
-
createSuggestionOfPostingRequirementsV2: (
|
43
|
-
facets: PostingRequirement[],
|
44
|
-
description: string,
|
45
|
-
extras: Record<string, any>,
|
46
|
-
) => Promise<any>
|
47
|
-
getSuggestionOfPostingRequirementsV2: (
|
48
|
-
taskId: string | number,
|
49
|
-
) => Promise<any>
|
50
|
-
createSuggestionOfVacancyFields: (
|
51
|
-
payload: ExperimentalSuggestionCreateRequestData<ExperimentalSuggestionVacancyFieldsCreateRequestPayload>,
|
52
|
-
) => Promise<
|
53
|
-
ExperimentalSuggestionGetResponseData<
|
54
|
-
ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
|
55
|
-
ExperimentalSuggestionVacancyFieldsGetResponseData
|
56
|
-
>
|
57
|
-
>
|
58
|
-
getSuggestionOfPostingRequirements: (
|
59
|
-
suggestionId: string,
|
60
|
-
) => Promise<
|
61
|
-
ExperimentalSuggestionGetResponseData<
|
62
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
63
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData
|
64
|
-
>
|
65
|
-
>
|
66
|
-
getSuggestionOfVacancyFields: (
|
67
|
-
suggestionId: string,
|
68
|
-
) => Promise<
|
69
|
-
ExperimentalSuggestionGetResponseData<
|
70
|
-
ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
|
71
|
-
ExperimentalSuggestionVacancyFieldsGetResponseData
|
72
|
-
>
|
73
|
-
>
|
74
19
|
}
|
75
20
|
export type WindowHapiAPIExperimental = WindowHapiModuleWithConstructorArgs<
|
76
21
|
WindowHapiAPIModule<
|
@@ -10,11 +10,6 @@ import {
|
|
10
10
|
UseValidatorResult,
|
11
11
|
} from "../common"
|
12
12
|
import { MessageDescriptor } from "react-intl"
|
13
|
-
import {
|
14
|
-
ExperimentalSuggestionGetResponseData,
|
15
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
16
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData,
|
17
|
-
} from "."
|
18
13
|
|
19
14
|
export type ExperimentalServiceGetProductPostingRequirementOptionsHandler = (
|
20
15
|
productId: string,
|
@@ -26,49 +21,10 @@ export type ExperimentalServiceGetProductPostingRequirementsHandler = (
|
|
26
21
|
productId: string | number,
|
27
22
|
) => Promise<PostingRequirement[]>
|
28
23
|
|
29
|
-
export type ExperimentalServiceCreateSuggestionOfPostingRequirementsHandler = (
|
30
|
-
contractId: string,
|
31
|
-
textInput?: string,
|
32
|
-
) => Promise<
|
33
|
-
ExperimentalSuggestionGetResponseData<
|
34
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
35
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData
|
36
|
-
>
|
37
|
-
>
|
38
|
-
|
39
|
-
export type ExperimentalServiceGetSuggestionOfPostingRequirementsHandler = (
|
40
|
-
suggestionId: string,
|
41
|
-
) => Promise<
|
42
|
-
ExperimentalSuggestionGetResponseData<
|
43
|
-
ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
|
44
|
-
ExperimentalSuggestionPostingRequirementsGetResponseData
|
45
|
-
>
|
46
|
-
>
|
47
|
-
|
48
24
|
export type WindowHapiServiceExperimental = WindowHapiModuleWithConstructorArgs<
|
49
25
|
{
|
50
|
-
getExperimental: HapiServiceFunctionWithLifecycleHooks<
|
51
|
-
() => Promise<any>
|
52
|
-
>
|
53
26
|
getProductPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ExperimentalServiceGetProductPostingRequirementOptionsHandler>
|
54
27
|
getProductPostingRequirements: HapiServiceFunctionWithLifecycleHooks<ExperimentalServiceGetProductPostingRequirementsHandler>
|
55
|
-
createSuggestionOfPostingRequirementsV2: (
|
56
|
-
contractId: string | number,
|
57
|
-
customDescription?: string,
|
58
|
-
customExtras?: Record<string, any>,
|
59
|
-
hardcodedPrefills?: {
|
60
|
-
requirements: Record<string, any>
|
61
|
-
requirementsLabels: Record<string, any>
|
62
|
-
},
|
63
|
-
) => Promise<any>
|
64
|
-
getSuggestionOfPostingRequirementsV2: (
|
65
|
-
contractId: string | number,
|
66
|
-
taskId: string | number,
|
67
|
-
hardcodedPrefills?: {
|
68
|
-
requirements: Record<string, any>
|
69
|
-
requirementsLabels: Record<string, any>
|
70
|
-
},
|
71
|
-
) => Promise<any>
|
72
28
|
setProductStepsBlurredFields: (
|
73
29
|
fields: Record<string, Record<string, boolean>>,
|
74
30
|
) => Record<string, UseValidatorResult> | null
|
@@ -10,18 +10,6 @@ export type ExperimentalState = {
|
|
10
10
|
snakeScore: number
|
11
11
|
snakeSpeed: number
|
12
12
|
snakeInterval: number
|
13
|
-
postingRequirementsSuggestionsPollingIntervalsMap: Record<
|
14
|
-
string | number,
|
15
|
-
string | number
|
16
|
-
>
|
17
|
-
postingRequirementsSuggestionsPollingMap: Record<string, string[]>
|
18
|
-
postingRequirementsSuggestionsPollingStatusMap: Record<
|
19
|
-
string,
|
20
|
-
{
|
21
|
-
createdAt: string
|
22
|
-
status: string
|
23
|
-
}
|
24
|
-
>
|
25
13
|
/* Product Fields */
|
26
14
|
productSteps: OrderJourneyProductStep[]
|
27
15
|
productStepsBlurredFields: Record<string, Record<string, boolean>>
|
package/experimental/types.ts
CHANGED
@@ -1,36 +1,7 @@
|
|
1
1
|
import { RecursivePartial } from "../common"
|
2
|
-
import { Campaign
|
2
|
+
import { Campaign } from "../campaign"
|
3
3
|
import { OrderJourneyStep } from "../orderJourney"
|
4
4
|
|
5
|
-
export type ExperimentalSuggestionResponseStatus =
|
6
|
-
| "new"
|
7
|
-
| "pending"
|
8
|
-
| "error"
|
9
|
-
| "done"
|
10
|
-
|
11
|
-
export type ExperimentalSuggestionCreateRequestData<P> = {
|
12
|
-
contract_id?: string
|
13
|
-
payload: P
|
14
|
-
}
|
15
|
-
|
16
|
-
export type ExperimentalSuggestionGetResponseData<P, R> = {
|
17
|
-
id: string
|
18
|
-
status: ExperimentalSuggestionResponseStatus
|
19
|
-
contract_id?: string
|
20
|
-
type: "posting_requirements" | "vacancy_fields" | "primary_taxonomy"
|
21
|
-
payload: P
|
22
|
-
response: R
|
23
|
-
}
|
24
|
-
|
25
|
-
export type ExperimentalSuggestionPostingRequirementsCreateRequestPayload = {
|
26
|
-
job_data?: string
|
27
|
-
} & RecursivePartial<CampaignOrderRequestBody>
|
28
|
-
|
29
|
-
export type ExperimentalSuggestionPostingRequirementsGetResponseData = Record<
|
30
|
-
string,
|
31
|
-
string | null | number | any[]
|
32
|
-
>
|
33
|
-
|
34
5
|
export type ExperimentalSuggestionVacancyFieldsCreateRequestPayload = {
|
35
6
|
description: string
|
36
7
|
}
|
package/package.json
CHANGED