@vonq/hapi-elements-types 1.17.0 → 1.19.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/_window/api.types.ts +14 -1
- package/_window/auth.types.ts +2 -2
- package/_window/routing.types.ts +1 -0
- package/_window/service.types.ts +13 -0
- package/_window/state.types.ts +38 -13
- package/_window/utils.types.ts +17 -2
- package/_window/window.ts +36 -3
- package/alert/enums.ts +2 -1
- package/alert/types.ts +5 -3
- package/ats/state.types.ts +5 -2
- package/ats/types.ts +13 -7
- package/basket/state.types.ts +5 -2
- package/basket/utils.types.ts +7 -0
- package/basket/validations.types.ts +7 -0
- package/campaign/api.types.ts +11 -0
- package/campaign/service.types.ts +33 -2
- package/campaign/state.types.ts +2 -1
- package/campaign/types.ts +87 -18
- package/campaign/utils.types.ts +21 -0
- package/campaign/validations.types.ts +1 -1
- package/common/enums.ts +4 -0
- package/common/events/EventCommand/enums.ts +2 -2
- package/common/types.ts +100 -0
- package/common/validator/types.ts +1 -0
- package/contract/service.types.ts +5 -7
- package/contract/types.ts +2 -76
- package/contract/validations.types.ts +6 -0
- package/language/qa.types.ts +1 -4
- package/language/state.types.ts +0 -16
- package/language/validations.types.ts +0 -4
- package/modal/enums.ts +5 -1
- package/modal/service.types.ts +0 -1
- package/modal/types.ts +32 -4
- package/modal/utils.types.ts +10 -0
- package/orderJourney/enums.ts +2 -0
- package/orderJourney/qa.types.ts +0 -3
- package/orderJourney/service.types.ts +20 -0
- package/orderJourney/state.types.ts +11 -1
- package/orderJourney/types.ts +37 -0
- package/orderJourney/validations.types.ts +3 -0
- package/package.json +1 -1
- package/product/api.types.ts +20 -1
- package/product/enums.ts +8 -0
- package/product/service.types.ts +23 -1
- package/product/state.types.ts +6 -0
- package/product/types.ts +23 -16
- package/product/utils.types.ts +3 -0
- package/product/validations.types.ts +3 -2
- package/routing/utils.types.ts +14 -0
- package/talentMindCompany/api.types.ts +18 -0
- package/talentMindCompany/service.types.ts +15 -0
- package/talentMindCompany/state.types.ts +5 -0
- package/talentMindCompany/types.ts +6 -0
- package/talentMindCompany/validations.types.ts +5 -0
- package/talentMindEvaluation/api.types.ts +25 -0
- package/talentMindEvaluation/service.types.ts +25 -0
- package/talentMindEvaluation/state.types.ts +6 -0
- package/talentMindEvaluation/types.ts +15 -0
- package/talentMindEvaluation/validations.types.ts +5 -0
- package/talentMindJob/api.types.ts +26 -0
- package/talentMindJob/service.types.ts +28 -0
- package/talentMindJob/state.types.ts +6 -0
- package/talentMindJob/types.ts +12 -0
- package/talentMindJob/validations.types.ts +5 -0
- package/talentMindResume/api.types.ts +30 -0
- package/talentMindResume/service.types.ts +34 -0
- package/talentMindResume/state.types.ts +6 -0
- package/talentMindResume/types.ts +119 -0
- package/talentMindResume/validations.types.ts +5 -0
- package/theming/types.ts +1 -0
- package/wallet/service.types.ts +6 -1
- package/wallet/state.types.ts +3 -1
- package/wallet/types.ts +7 -2
- package/wallet/validations.types.ts +15 -3
@@ -0,0 +1,10 @@
|
|
1
|
+
import { WindowHapiUtils } from "../_window/utils.types"
|
2
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
3
|
+
import { ModalKeys } from "./enums"
|
4
|
+
|
5
|
+
export type WindowHapiUtilsModal = WindowHapiModuleWithConstructorArgs<
|
6
|
+
{
|
7
|
+
modalKeys: typeof ModalKeys
|
8
|
+
},
|
9
|
+
{ readonly utils: WindowHapiUtils }
|
10
|
+
>
|
package/orderJourney/enums.ts
CHANGED
@@ -12,6 +12,7 @@ export enum OrderJourneyStepKey {
|
|
12
12
|
postingWorkingLocation = "posting-working-location",
|
13
13
|
postingURLs = "posting-urls",
|
14
14
|
contractChannelPostingRequirements = "contract-channel-posting-requirements",
|
15
|
+
productChannelPostingRequirements = "product-channel-posting-requirements",
|
15
16
|
postingUTMCodes = "posting-utm-codes",
|
16
17
|
orderReview = "order-review",
|
17
18
|
paymentMethod = "payment-method",
|
@@ -22,4 +23,5 @@ export enum OrderJourneyPaymentMethod {
|
|
22
23
|
atsManaged = "ats_managed",
|
23
24
|
wallet = "wallet",
|
24
25
|
purchaseOrder = "purchase_order",
|
26
|
+
directCharge = "direct_charge",
|
25
27
|
}
|
package/orderJourney/qa.types.ts
CHANGED
@@ -8,9 +8,6 @@ export type WindowHapiQAOrderJourney = WindowHapiModuleWithConstructorArgs<
|
|
8
8
|
setEnabledPaymentMethods: (
|
9
9
|
methods: OrderJourneyPaymentMethod[],
|
10
10
|
) => OrderJourneyPaymentMethod[]
|
11
|
-
setPaymentMethodActive: (
|
12
|
-
method: OrderJourneyPaymentMethod | null,
|
13
|
-
) => OrderJourneyPaymentMethod | null
|
14
11
|
},
|
15
12
|
{ readonly qa: WindowHapiQA }
|
16
13
|
>
|
@@ -10,11 +10,13 @@ import { OrderJourneyStepKey } from "./enums"
|
|
10
10
|
|
11
11
|
export type OrderJourneyServiceSwitchToNextStepHandler = () => Promise<void>
|
12
12
|
export type OrderJourneyServiceSwitchToPreviousStepHandler = () => Promise<void>
|
13
|
+
export type OrderJourneyServiceRestartJourneyHandler = () => void
|
13
14
|
|
14
15
|
export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
|
15
16
|
{
|
16
17
|
switchToNextStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToNextStepHandler>
|
17
18
|
switchToPreviousStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToPreviousStepHandler>
|
19
|
+
restartJourney: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceRestartJourneyHandler>
|
18
20
|
getValidators: () => Record<string, NestedValidatorKeys>
|
19
21
|
getErrorMessages: () => Record<string, Record<string, any> | undefined>
|
20
22
|
getBlurredFields: () => Record<string, Record<string, any> | undefined>
|
@@ -49,6 +51,24 @@ export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
|
|
49
51
|
>,
|
50
52
|
) => void
|
51
53
|
setContractStepsSubmittedSteps: (steps: Record<string, boolean>) => void
|
54
|
+
setContractStepsValidators: (
|
55
|
+
validators: NestedValidatorKeys,
|
56
|
+
replaceAsIs: boolean,
|
57
|
+
) => void
|
58
|
+
setProductStepsBlurredFields: (
|
59
|
+
fields: Record<string, Record<string, boolean>>,
|
60
|
+
) => Record<string, UseValidatorResult> | null
|
61
|
+
setProductStepsErrorMessages: (
|
62
|
+
messages: Record<
|
63
|
+
string,
|
64
|
+
Record<string, MessageDescriptor | boolean>
|
65
|
+
>,
|
66
|
+
) => void
|
67
|
+
setProductStepsSubmittedSteps: (steps: Record<string, boolean>) => void
|
68
|
+
setProductStepsValidators: (
|
69
|
+
validators: NestedValidatorKeys,
|
70
|
+
replaceAsIs: boolean,
|
71
|
+
) => void
|
52
72
|
getSetters: (
|
53
73
|
steps: Record<string, boolean>,
|
54
74
|
) => Record<string, (step: OrderJourneyStep) => any>
|
@@ -5,6 +5,8 @@ import {
|
|
5
5
|
OrderJourneyUTMStepData,
|
6
6
|
OrderJourneyUTMStepValidations,
|
7
7
|
OrderJourneyOrderReviewStepData,
|
8
|
+
OrderJourneyProductStep,
|
9
|
+
OrderJourneyOrderErrors,
|
8
10
|
} from "./types"
|
9
11
|
import { MessageDescriptor } from "react-intl"
|
10
12
|
import { NestedValidatorKeys, UseValidatorResult } from "../common/types"
|
@@ -25,7 +27,7 @@ export type OrderJourneyState = {
|
|
25
27
|
paymentMethodsAvailable: OrderJourneyPaymentMethod[]
|
26
28
|
paymentMethodsEnabled: OrderJourneyPaymentMethod[]
|
27
29
|
hidePrefilledFields: boolean
|
28
|
-
orderErrors:
|
30
|
+
orderErrors: OrderJourneyOrderErrors | null
|
29
31
|
/* Onboarding */
|
30
32
|
onboardingStep: OrderJourneyStep
|
31
33
|
onboardingStepData: Record<string, any>
|
@@ -85,6 +87,14 @@ export type OrderJourneyState = {
|
|
85
87
|
contractStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
|
86
88
|
contractStepsData: Record<string, Record<string, any>>
|
87
89
|
contractStepsValidations: Record<string, UseValidatorResult> | null
|
90
|
+
/* Product Fields */
|
91
|
+
productSteps: OrderJourneyProductStep[]
|
92
|
+
productStepsBlurredFields: Record<string, Record<string, boolean>>
|
93
|
+
productStepsSubmittedSteps: Record<string, boolean>
|
94
|
+
productStepsErrorMessages: Record<string, Record<string, MessageDescriptor>>
|
95
|
+
productStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
|
96
|
+
productStepsData: Record<string, Record<string, any>>
|
97
|
+
productStepsValidations: Record<string, UseValidatorResult> | null
|
88
98
|
/* UTM Codes */
|
89
99
|
utmCodesStep: OrderJourneyStep
|
90
100
|
utmCodesStepData: OrderJourneyUTMStepData
|
package/orderJourney/types.ts
CHANGED
@@ -31,6 +31,11 @@ export type OrderJourneyContractStep = Omit<
|
|
31
31
|
"blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
|
32
32
|
>
|
33
33
|
|
34
|
+
export type OrderJourneyProductStep = Omit<
|
35
|
+
OrderJourneyStep,
|
36
|
+
"blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
|
37
|
+
>
|
38
|
+
|
34
39
|
export type UTMMap = {
|
35
40
|
value: string
|
36
41
|
mapToName: boolean
|
@@ -61,4 +66,36 @@ export type OrderJourneyUTMStepValidations = {
|
|
61
66
|
|
62
67
|
export type OrderJourneyOrderReviewStepData = {
|
63
68
|
accordionsOpen: OrderJourneyStepKey[]
|
69
|
+
accordionsEnabled: OrderJourneyStepKey[]
|
70
|
+
}
|
71
|
+
|
72
|
+
export type OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid =
|
73
|
+
{
|
74
|
+
errors: {
|
75
|
+
orderedProducts: Record<string, any>[]
|
76
|
+
orderedProductsSpecs: Partial<{
|
77
|
+
credentials: Record<string, any>
|
78
|
+
posting_requirements: Record<string, any>
|
79
|
+
postingRequirements?: string[]
|
80
|
+
}>[]
|
81
|
+
walletId?: string
|
82
|
+
}
|
83
|
+
has_errors: boolean
|
84
|
+
}
|
85
|
+
|
86
|
+
export type OrderJourneyOrderErrorsCampaignIsInvalid = {
|
87
|
+
postingDetails: Record<string, any>
|
88
|
+
recruiterInfo: Record<string, any>
|
89
|
+
targetGroup: Record<string, any>
|
90
|
+
orderedProducts: string[]
|
91
|
+
walletId: string
|
64
92
|
}
|
93
|
+
|
94
|
+
// HAPI Backend validation works in this order:
|
95
|
+
// - it validates the campaign first, if campaign itself is not valid, it does not validate the posting requirements at all
|
96
|
+
// - if campaign is valid, then it validates posting requirements
|
97
|
+
// because of this, the response BE sends changes
|
98
|
+
// backend does not validate the entire form in one go
|
99
|
+
export type OrderJourneyOrderErrors =
|
100
|
+
| OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid
|
101
|
+
| OrderJourneyOrderErrorsCampaignIsInvalid
|
@@ -36,6 +36,9 @@ export type ZodOrderJourneyOrderReviewStepData = ZodObject<{
|
|
36
36
|
accordionsOpen: ZodArray<
|
37
37
|
ZodUnion<[ZodNativeEnum<typeof OrderJourneyStepKey>, ZodString]>
|
38
38
|
>
|
39
|
+
accordionsEnabled: ZodArray<
|
40
|
+
ZodUnion<[ZodNativeEnum<typeof OrderJourneyStepKey>, ZodString]>
|
41
|
+
>
|
39
42
|
}>
|
40
43
|
export type WindowHapiValidationsOrderJourney = {
|
41
44
|
supportedStepKeys: OrderJourneyStepKey[]
|
package/package.json
CHANGED
package/product/api.types.ts
CHANGED
@@ -5,12 +5,17 @@ import {
|
|
5
5
|
ProductJobFunction,
|
6
6
|
ProductJobTitle,
|
7
7
|
ProductLocation,
|
8
|
+
ProductOrderDeliveryTime,
|
8
9
|
ProductSupportingContractsComplete,
|
9
10
|
ProductSupportingContractsPartial,
|
10
11
|
ProductWithSupportForContractsFilters,
|
11
12
|
} from "./types"
|
12
13
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
13
|
-
import {
|
14
|
+
import {
|
15
|
+
PaginatedAPIResponseV1,
|
16
|
+
PaginationLimitOffset,
|
17
|
+
PostingRequirement,
|
18
|
+
} from "../common/types"
|
14
19
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
15
20
|
|
16
21
|
export type WindowHapiAPIProductConfigs = {
|
@@ -23,6 +28,9 @@ export type WindowHapiAPIProductConfigs = {
|
|
23
28
|
getJobFunctions: AxiosRequestConfig
|
24
29
|
getJobTitles: AxiosRequestConfig
|
25
30
|
getLocations: AxiosRequestConfig
|
31
|
+
calculateDeliveryTime: AxiosRequestConfig
|
32
|
+
getPostingRequirementOptions: AxiosRequestConfig
|
33
|
+
getPostingRequirements: AxiosRequestConfig
|
26
34
|
}
|
27
35
|
export type WindowHapiAPIProductRequests = {
|
28
36
|
getProduct: (productId: number | string) => Promise<Product>
|
@@ -42,12 +50,23 @@ export type WindowHapiAPIProductRequests = {
|
|
42
50
|
filters?: ProductWithSupportForContractsFilters,
|
43
51
|
limitOffset?: PaginationLimitOffset,
|
44
52
|
) => Promise<PaginatedAPIResponseV1<ProductSupportingContractsPartial>>
|
53
|
+
getPostingRequirementOptions: (
|
54
|
+
productId: string,
|
55
|
+
fieldName: string,
|
56
|
+
autocompleteRequestOptions: Record<string, string | string[]>,
|
57
|
+
) => Promise<any>
|
58
|
+
getPostingRequirements: (
|
59
|
+
productId: string | number,
|
60
|
+
) => Promise<PostingRequirement[]>
|
45
61
|
getIndustries: () => Promise<ProductIndustry[]>
|
46
62
|
getJobFunctions: () => Promise<ProductJobFunction[]>
|
47
63
|
getJobTitles: (
|
48
64
|
text?: string,
|
49
65
|
) => Promise<PaginatedAPIResponseV1<ProductJobTitle>>
|
50
66
|
getLocations: (searchParam: string) => Promise<ProductLocation[]>
|
67
|
+
calculateDeliveryTime: (
|
68
|
+
productIds: (string | number)[],
|
69
|
+
) => Promise<ProductOrderDeliveryTime>
|
51
70
|
}
|
52
71
|
export type WindowHapiAPIProduct = WindowHapiModuleWithConstructorArgs<
|
53
72
|
WindowHapiAPIModule<
|
package/product/enums.ts
CHANGED
@@ -10,3 +10,11 @@ export enum ProductPriceCurrency {
|
|
10
10
|
"GBP" = "GBP",
|
11
11
|
"AUD" = "AUD",
|
12
12
|
}
|
13
|
+
|
14
|
+
export enum ProductSortBy {
|
15
|
+
"recommendedFirst" = "recommendedFirst",
|
16
|
+
"createdNewestToOldest" = "created.desc",
|
17
|
+
"createdOldestToNewest" = "created.asc",
|
18
|
+
"priceHighToLow" = "list_price.desc",
|
19
|
+
"priceLowToHigh" = "list_price.asc",
|
20
|
+
}
|
package/product/service.types.ts
CHANGED
@@ -12,13 +12,19 @@ import {
|
|
12
12
|
ProductSupportingContractsComplete,
|
13
13
|
ProductSupportingContractsPartial,
|
14
14
|
} from "./types"
|
15
|
-
import {
|
15
|
+
import {
|
16
|
+
PaginatedAPIResponseV1,
|
17
|
+
PaginationResponseV1,
|
18
|
+
PostingRequirement,
|
19
|
+
PostingRequirementsAutocompleteRequestOption,
|
20
|
+
} from "../common/types"
|
16
21
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
17
22
|
|
18
23
|
export type ProductServiceGetFilteredProductsHandler = (
|
19
24
|
meta?: PaginationResponseV1 | null,
|
20
25
|
filters?: Partial<ProductFilterQueryParams>,
|
21
26
|
) => Promise<Product[]>
|
27
|
+
export type ProductServiceLoadMoreProductsHandler = () => Promise<Product[]>
|
22
28
|
export type ProductServiceGetProductWithContractsSupportByIdHandler = (
|
23
29
|
id: string | number,
|
24
30
|
) => Promise<ProductSupportingContractsComplete>
|
@@ -51,8 +57,22 @@ export type ProductServiceGetIndustriesHandler = () => Promise<
|
|
51
57
|
ProductIndustry[]
|
52
58
|
>
|
53
59
|
|
60
|
+
export type ProductServiceSetArbitraryJobTitle = (text: string) => void
|
61
|
+
|
62
|
+
export type ProductServiceGetProductPostingRequirementOptionsHandler = (
|
63
|
+
productId: string,
|
64
|
+
fieldName: string,
|
65
|
+
autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
|
66
|
+
) => Promise<any>
|
67
|
+
|
68
|
+
export type ProductServiceGetProductPostingRequirementsHandler = (
|
69
|
+
productId: string | number,
|
70
|
+
) => Promise<PostingRequirement[]>
|
71
|
+
|
54
72
|
export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
|
55
73
|
{
|
74
|
+
loadMoreProducts: HapiServiceFunctionWithLifecycleHooks<ProductServiceLoadMoreProductsHandler>
|
75
|
+
setArbitraryJobTitle: ProductServiceSetArbitraryJobTitle
|
56
76
|
getProductWithContractsSupportById: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductWithContractsSupportByIdHandler>
|
57
77
|
getProductsWithContractsSupport: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductsWithContractsSupportHandler>
|
58
78
|
getFilteredProducts: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetFilteredProductsHandler>
|
@@ -63,6 +83,8 @@ export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
|
|
63
83
|
getJobTitles: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobTitlesHandler>
|
64
84
|
getJobFunctions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobFunctionsHandler>
|
65
85
|
getIndustries: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetIndustriesHandler>
|
86
|
+
getProductPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementOptionsHandler>
|
87
|
+
getProductPostingRequirements: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementsHandler>
|
66
88
|
},
|
67
89
|
{ readonly service: WindowHapiService }
|
68
90
|
>
|
package/product/state.types.ts
CHANGED
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
ProductSupportingContractsPartial,
|
8
8
|
} from "./types"
|
9
9
|
import { PaginationResponseV1 } from "../common/types"
|
10
|
+
import { ProductPriceCurrency, ProductSortBy } from "./enums"
|
10
11
|
|
11
12
|
export type ProductState = {
|
12
13
|
/* Products */
|
@@ -19,6 +20,11 @@ export type ProductState = {
|
|
19
20
|
productsAreLoading: boolean
|
20
21
|
productNameInput: string
|
21
22
|
jobRegionsIdsSelected: number[]
|
23
|
+
filtersAccordionIsOpen: boolean
|
24
|
+
/* Product Price Display Currency */
|
25
|
+
displayCurrency: ProductPriceCurrency
|
26
|
+
/* Sort By */
|
27
|
+
searchSortBy: ProductSortBy
|
22
28
|
/* Locations */
|
23
29
|
jobRegions: ProductLocation[]
|
24
30
|
/* Job Titles */
|
package/product/types.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { ProductFilterRecommendations, ProductPriceCurrency } from "./enums"
|
2
1
|
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
} from "
|
2
|
+
ProductFilterRecommendations,
|
3
|
+
ProductPriceCurrency,
|
4
|
+
ProductSortBy,
|
5
|
+
} from "./enums"
|
6
|
+
import { ContractCredential } from "../contract/types"
|
7
|
+
import { Facet, PostingRequirement } from "../common"
|
7
8
|
|
8
9
|
export type ProductRange = "hours" | "days" | "weeks" | "months"
|
9
10
|
|
@@ -61,6 +62,8 @@ export type Product = {
|
|
61
62
|
vonq_price: ProductPrice[]
|
62
63
|
time_to_process: ProductDuration
|
63
64
|
time_to_setup: ProductDuration
|
65
|
+
is_recommended?: boolean
|
66
|
+
has_posting_requirements: boolean
|
64
67
|
} & ProductLogos &
|
65
68
|
ProductType
|
66
69
|
|
@@ -112,6 +115,12 @@ export type ProductLocation = {
|
|
112
115
|
within?: ProductLocation
|
113
116
|
} & ProductLocationPartial
|
114
117
|
|
118
|
+
export type ProductOrderDeliveryTime = {
|
119
|
+
days_to_process: number
|
120
|
+
days_to_setup: number
|
121
|
+
total_days: number
|
122
|
+
}
|
123
|
+
|
115
124
|
export type ProductFilterQueryParams = {
|
116
125
|
productNameInput: string
|
117
126
|
locationsIdsSelected: number[]
|
@@ -121,6 +130,7 @@ export type ProductFilterQueryParams = {
|
|
121
130
|
filterProductRecommendations: ProductFilterRecommendations
|
122
131
|
filterMyContractSupportedOnly: boolean
|
123
132
|
searchTextInput: string
|
133
|
+
searchSortBy: ProductSortBy
|
124
134
|
}
|
125
135
|
|
126
136
|
export type ProductSearchFilters = {
|
@@ -136,15 +146,7 @@ export type ProductSearchFilters = {
|
|
136
146
|
mcEnabled?: boolean
|
137
147
|
name?: string
|
138
148
|
recommended?: boolean
|
139
|
-
sortBy?:
|
140
|
-
| "relevant"
|
141
|
-
| "recent"
|
142
|
-
| "order_frequency.desc"
|
143
|
-
| "order_frequency.asc"
|
144
|
-
| "created.desc"
|
145
|
-
| "created.asc"
|
146
|
-
| "list_price.desc"
|
147
|
-
| "list_price.asc"
|
149
|
+
sortBy?: ProductSortBy
|
148
150
|
}
|
149
151
|
|
150
152
|
export type ProductWithSupportForContractsFilters = {
|
@@ -153,10 +155,10 @@ export type ProductWithSupportForContractsFilters = {
|
|
153
155
|
export type ProductSupportingContractsComplete = ProductLogos &
|
154
156
|
ProductSupportingContractsPartial & {
|
155
157
|
contract_credentials: ContractCredential[]
|
156
|
-
contract_facets?:
|
158
|
+
contract_facets?: Facet[]
|
157
159
|
feed_url: string | null
|
158
160
|
manual_setup_required: boolean
|
159
|
-
posting_requirements:
|
161
|
+
posting_requirements: PostingRequirement[]
|
160
162
|
setup_instructions: string //html;
|
161
163
|
}
|
162
164
|
|
@@ -164,3 +166,8 @@ export type ProductUserProvidedFilters = Omit<
|
|
164
166
|
ProductFilterQueryParams,
|
165
167
|
"filterProductRecommendations" | "filterMyContractSupportedOnly"
|
166
168
|
>
|
169
|
+
|
170
|
+
export type ProductPostingRequirementsAutocompleteRequestOption = {
|
171
|
+
key: string
|
172
|
+
value: string | string[]
|
173
|
+
}
|
package/product/utils.types.ts
CHANGED
@@ -2,9 +2,12 @@ import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
|
|
2
2
|
import { PaginationResponseV1 } from "../common/types"
|
3
3
|
import { WindowHapiUtils } from "../_window/utils.types"
|
4
4
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
5
|
+
import { ProductPriceCurrency, ProductSortBy } from "./enums"
|
5
6
|
|
6
7
|
export type WindowHapiUtilsProduct = WindowHapiModuleWithConstructorArgs<
|
7
8
|
{
|
9
|
+
currencyKeys: typeof ProductPriceCurrency
|
10
|
+
sortByKeys: typeof ProductSortBy
|
8
11
|
getUserProvidedFilters: () => ProductUserProvidedFilters
|
9
12
|
getProductsQueryParams: (
|
10
13
|
params: Partial<ProductFilterQueryParams>,
|
@@ -26,8 +26,8 @@ export type ZodProductChannel = ZodObject<{
|
|
26
26
|
}>
|
27
27
|
|
28
28
|
export type ZodProductDuration = ZodObject<{
|
29
|
-
range: ZodString
|
30
|
-
period: ZodNumber
|
29
|
+
range: ZodNullable<ZodString>
|
30
|
+
period: ZodNullable<ZodNumber>
|
31
31
|
}>
|
32
32
|
|
33
33
|
export type ZodProductIndustry = ZodObject<{
|
@@ -109,6 +109,7 @@ export type ZodProduct = ZodObject<{
|
|
109
109
|
industries: ZodProductIndustries
|
110
110
|
job_functions: ZodProductJobFunctions
|
111
111
|
locations: ZodProductLocationsPartial
|
112
|
+
is_recommended: ZodOptional<ZodBoolean>
|
112
113
|
mc_enabled: ZodBoolean
|
113
114
|
mc_only: ZodBoolean
|
114
115
|
product_id: ZodString
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { WindowHapiUtils } from "../_window/utils.types"
|
2
|
+
import {
|
3
|
+
WindowHapiModuleWithConstructorArgs,
|
4
|
+
WindowHapiRoutingQueryParams,
|
5
|
+
} from "../_window"
|
6
|
+
|
7
|
+
export type WindowHapiUtilsRouter = WindowHapiModuleWithConstructorArgs<
|
8
|
+
{
|
9
|
+
convertSearchStringToQueryParams: (
|
10
|
+
searchString?: string,
|
11
|
+
) => WindowHapiRoutingQueryParams
|
12
|
+
},
|
13
|
+
{ readonly utils: WindowHapiUtils }
|
14
|
+
>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { RawAxiosRequestConfig } from "axios"
|
2
|
+
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
|
+
|
5
|
+
export type WindowHapiAPITalentMindCompanyConfigs = {
|
6
|
+
getCompanies: RawAxiosRequestConfig
|
7
|
+
}
|
8
|
+
export type WindowHapiAPITalentMindCompanyRequests = {
|
9
|
+
getCompanies: () => Promise<any>
|
10
|
+
}
|
11
|
+
export type WindowHapiAPITalentMindCompany =
|
12
|
+
WindowHapiModuleWithConstructorArgs<
|
13
|
+
WindowHapiAPIModule<
|
14
|
+
WindowHapiAPITalentMindCompanyRequests,
|
15
|
+
WindowHapiAPITalentMindCompanyConfigs
|
16
|
+
>,
|
17
|
+
{ readonly api: WindowHapiAPI }
|
18
|
+
>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import {
|
2
|
+
HapiServiceFunctionWithLifecycleHooks,
|
3
|
+
WindowHapiService,
|
4
|
+
} from "../_window/service.types"
|
5
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
6
|
+
|
7
|
+
export type TalentMindCompanyServiceGetCompaniesHandler = () => Promise<any>
|
8
|
+
|
9
|
+
export type WindowHapiServiceTalentMindCompany =
|
10
|
+
WindowHapiModuleWithConstructorArgs<
|
11
|
+
{
|
12
|
+
getCompanies: HapiServiceFunctionWithLifecycleHooks<TalentMindCompanyServiceGetCompaniesHandler>
|
13
|
+
},
|
14
|
+
{ readonly service: WindowHapiService }
|
15
|
+
>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { RawAxiosRequestConfig } from "axios"
|
2
|
+
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
|
+
import { TalentMindCreateEvaluationForm, TalentMindEvaluation } from "./types"
|
5
|
+
|
6
|
+
export type WindowHapiAPITalentMindEvaluationConfigs = {
|
7
|
+
getEvaluations: RawAxiosRequestConfig
|
8
|
+
getEvaluation: RawAxiosRequestConfig
|
9
|
+
createEvaluation: RawAxiosRequestConfig
|
10
|
+
}
|
11
|
+
export type WindowHapiAPITalentMindEvaluationRequests = {
|
12
|
+
getEvaluations: () => Promise<TalentMindEvaluation[]>
|
13
|
+
getEvaluation: () => Promise<TalentMindEvaluation>
|
14
|
+
createEvaluation: (
|
15
|
+
form: TalentMindCreateEvaluationForm,
|
16
|
+
) => Promise<TalentMindEvaluation>
|
17
|
+
}
|
18
|
+
export type WindowHapiAPITalentMindEvaluation =
|
19
|
+
WindowHapiModuleWithConstructorArgs<
|
20
|
+
WindowHapiAPIModule<
|
21
|
+
WindowHapiAPITalentMindEvaluationRequests,
|
22
|
+
WindowHapiAPITalentMindEvaluationConfigs
|
23
|
+
>,
|
24
|
+
{ readonly api: WindowHapiAPI }
|
25
|
+
>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import {
|
2
|
+
HapiServiceFunctionWithLifecycleHooks,
|
3
|
+
WindowHapiService,
|
4
|
+
} from "../_window/service.types"
|
5
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
6
|
+
import { TalentMindCreateEvaluationForm, TalentMindEvaluation } from "./types"
|
7
|
+
|
8
|
+
export type TalentMindEvaluationServiceGetEvaluationsHandler = () => Promise<
|
9
|
+
TalentMindEvaluation[]
|
10
|
+
>
|
11
|
+
export type TalentMindEvaluationServiceGetEvaluationHandler =
|
12
|
+
() => Promise<TalentMindEvaluation>
|
13
|
+
export type TalentMindEvaluationServiceCreateEvaluationHandler = (
|
14
|
+
resumeForm: TalentMindCreateEvaluationForm,
|
15
|
+
) => Promise<TalentMindEvaluation>
|
16
|
+
|
17
|
+
export type WindowHapiServiceTalentMindEvaluation =
|
18
|
+
WindowHapiModuleWithConstructorArgs<
|
19
|
+
{
|
20
|
+
getEvaluations: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceGetEvaluationsHandler>
|
21
|
+
getEvaluation: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceGetEvaluationHandler>
|
22
|
+
createEvaluation: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceCreateEvaluationHandler>
|
23
|
+
},
|
24
|
+
{ readonly service: WindowHapiService }
|
25
|
+
>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export type TalentMindEvaluation = {
|
2
|
+
id: number
|
3
|
+
is_qualified: false
|
4
|
+
followup_questions: string[] | null
|
5
|
+
job: number
|
6
|
+
resume: number
|
7
|
+
score: number
|
8
|
+
strengths: string[] | null
|
9
|
+
weaknesses: string[] | null
|
10
|
+
}
|
11
|
+
|
12
|
+
export type TalentMindCreateEvaluationForm = {
|
13
|
+
resume: number | null
|
14
|
+
job: number | null
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { RawAxiosRequestConfig } from "axios"
|
2
|
+
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
|
+
import { TalentMindCreateJobForm, TalentMindJob } from "./types"
|
5
|
+
|
6
|
+
export type WindowHapiAPITalentMindJobConfigs = {
|
7
|
+
getJobs: RawAxiosRequestConfig
|
8
|
+
getJob: RawAxiosRequestConfig
|
9
|
+
createJob: RawAxiosRequestConfig
|
10
|
+
updateJob: RawAxiosRequestConfig
|
11
|
+
deleteJob: RawAxiosRequestConfig
|
12
|
+
}
|
13
|
+
export type WindowHapiAPITalentMindJobRequests = {
|
14
|
+
getJobs: () => Promise<TalentMindJob[]>
|
15
|
+
getJob: () => Promise<TalentMindJob>
|
16
|
+
createJob: (jobForm: TalentMindCreateJobForm) => Promise<TalentMindJob>
|
17
|
+
updateJob: () => Promise<TalentMindJob>
|
18
|
+
deleteJob: (jobId: number) => Promise<any>
|
19
|
+
}
|
20
|
+
export type WindowHapiAPITalentMindJob = WindowHapiModuleWithConstructorArgs<
|
21
|
+
WindowHapiAPIModule<
|
22
|
+
WindowHapiAPITalentMindJobRequests,
|
23
|
+
WindowHapiAPITalentMindJobConfigs
|
24
|
+
>,
|
25
|
+
{ readonly api: WindowHapiAPI }
|
26
|
+
>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import {
|
2
|
+
HapiServiceFunctionWithLifecycleHooks,
|
3
|
+
WindowHapiService,
|
4
|
+
} from "../_window/service.types"
|
5
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
6
|
+
import { TalentMindCreateJobForm, TalentMindJob } from "../talentMindJob/types"
|
7
|
+
|
8
|
+
export type TalentMindJobServiceGetJobsHandler = () => Promise<any>
|
9
|
+
export type TalentMindJobServiceGetJobHandler = () => Promise<TalentMindJob>
|
10
|
+
export type TalentMindJobServiceCreateJobHandler = (
|
11
|
+
resumeForm: TalentMindCreateJobForm,
|
12
|
+
) => Promise<TalentMindJob>
|
13
|
+
export type TalentMindJobServiceUpdateJobHandler = () => Promise<TalentMindJob>
|
14
|
+
export type TalentMindJobServiceDeleteJobHandler = (
|
15
|
+
resumeId: number,
|
16
|
+
) => Promise<void>
|
17
|
+
|
18
|
+
export type WindowHapiServiceTalentMindJob =
|
19
|
+
WindowHapiModuleWithConstructorArgs<
|
20
|
+
{
|
21
|
+
getJobs: HapiServiceFunctionWithLifecycleHooks<TalentMindJobServiceGetJobsHandler>
|
22
|
+
getJob: HapiServiceFunctionWithLifecycleHooks<TalentMindJobServiceGetJobHandler>
|
23
|
+
createJob: HapiServiceFunctionWithLifecycleHooks<TalentMindJobServiceCreateJobHandler>
|
24
|
+
updateJob: HapiServiceFunctionWithLifecycleHooks<TalentMindJobServiceUpdateJobHandler>
|
25
|
+
deleteJob: HapiServiceFunctionWithLifecycleHooks<TalentMindJobServiceDeleteJobHandler>
|
26
|
+
},
|
27
|
+
{ readonly service: WindowHapiService }
|
28
|
+
>
|