@vonq/hapi-elements-types 1.17.0 → 1.18.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/service.types.ts +13 -0
- package/_window/state.types.ts +38 -13
- package/_window/utils.types.ts +4 -2
- package/_window/window.ts +36 -3
- package/alert/enums.ts +1 -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 +2 -1
- package/basket/utils.types.ts +4 -0
- package/campaign/service.types.ts +1 -0
- package/campaign/types.ts +26 -5
- 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 +3 -0
- package/common/validator/types.ts +1 -0
- package/contract/types.ts +7 -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 +4 -1
- package/modal/service.types.ts +0 -1
- package/modal/types.ts +8 -0
- package/modal/utils.types.ts +10 -0
- package/orderJourney/enums.ts +1 -0
- package/orderJourney/qa.types.ts +0 -3
- package/package.json +1 -1
- package/product/api.types.ts +5 -0
- package/product/service.types.ts +3 -0
- package/product/state.types.ts +3 -0
- package/product/types.ts +6 -0
- package/product/utils.types.ts +2 -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/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
package/_window/api.types.ts
CHANGED
@@ -11,11 +11,15 @@ import { WindowHapiAPIContract } from "../contract/api.types"
|
|
11
11
|
import { WindowHapiAPIProduct } from "../product/api.types"
|
12
12
|
import { WindowHapiAPIWallet } from "../wallet/api.types"
|
13
13
|
import {
|
14
|
-
WindowHapiModuleWithConstructorArgs,
|
15
14
|
WindowHapiClassInterface,
|
15
|
+
WindowHapiModuleWithConstructorArgs,
|
16
16
|
} from "./window"
|
17
17
|
import { WindowHapiLogger } from "../common/logger/types"
|
18
18
|
import { ATSUserTokenResponse } from "../ats"
|
19
|
+
import { WindowHapiAPITalentMindCompany } from "../talentMindCompany/api.types"
|
20
|
+
import { WindowHapiAPITalentMindResume } from "../talentMindResume/api.types"
|
21
|
+
import { WindowHapiAPITalentMindJob } from "../talentMindJob/api.types"
|
22
|
+
import { WindowHapiAPITalentMindEvaluation } from "../talentMindEvaluation/api.types"
|
19
23
|
|
20
24
|
export type WindowHapiAPIModule<ModuleType, ModuleConfig> = {
|
21
25
|
logger: WindowHapiLogger
|
@@ -59,6 +63,7 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
|
|
59
63
|
refreshJWTToken: WindowHapiAPIRefreshJWTTokenHandler
|
60
64
|
validateJWTToken: WindowHapiAPIValidateJWTTokenHandler
|
61
65
|
baseURL: string
|
66
|
+
talentMindBaseUrl: string
|
62
67
|
setBaseURL: (url: string) => void
|
63
68
|
setBaseConfig: (params: Record<string, Record<string, string>>) => void
|
64
69
|
baseTimeout: number
|
@@ -77,12 +82,20 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
|
|
77
82
|
[WindowHapiModuleName.product]: WindowHapiAPIProduct
|
78
83
|
[WindowHapiModuleName.campaign]: WindowHapiAPICampaign
|
79
84
|
[WindowHapiModuleName.ats]: WindowHapiAPIATS
|
85
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
|
86
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
|
87
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
|
88
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
|
80
89
|
modules: {
|
81
90
|
[WindowHapiModuleName.contract]: WindowHapiAPIContract
|
82
91
|
[WindowHapiModuleName.wallet]: WindowHapiAPIWallet
|
83
92
|
[WindowHapiModuleName.product]: WindowHapiAPIProduct
|
84
93
|
[WindowHapiModuleName.campaign]: WindowHapiAPICampaign
|
85
94
|
[WindowHapiModuleName.ats]: WindowHapiAPIATS
|
95
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
|
96
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
|
97
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
|
98
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
|
86
99
|
}
|
87
100
|
},
|
88
101
|
{ readonly core: WindowHapiClassInterface }
|
package/_window/auth.types.ts
CHANGED
@@ -2,13 +2,13 @@ import {
|
|
2
2
|
WindowHapiModuleWithConstructorArgs,
|
3
3
|
WindowHapiClassInterface,
|
4
4
|
} from "./window"
|
5
|
+
import { ProductPriceCurrency } from "../product"
|
5
6
|
|
6
7
|
export type WindowHapiAuth = WindowHapiModuleWithConstructorArgs<
|
7
8
|
{
|
8
|
-
partnerId: string | undefined
|
9
|
-
clientId: string | undefined
|
10
9
|
partnerToken: string | undefined // used for impersonation
|
11
10
|
clientToken: string | undefined
|
11
|
+
walletCurrency: ProductPriceCurrency | undefined
|
12
12
|
},
|
13
13
|
{ readonly core: WindowHapiClassInterface }
|
14
14
|
>
|
package/_window/service.types.ts
CHANGED
@@ -14,6 +14,10 @@ import {
|
|
14
14
|
} from "./window"
|
15
15
|
import { WindowHapiLogger } from "../common/logger/types"
|
16
16
|
import { WindowHapiServiceOrderJourney } from "../orderJourney/service.types"
|
17
|
+
import { WindowHapiServiceTalentMindCompany } from "../talentMindCompany/service.types"
|
18
|
+
import { WindowHapiServiceTalentMindJob } from "../talentMindJob/service.types"
|
19
|
+
import { WindowHapiServiceTalentMindResume } from "../talentMindResume/service.types"
|
20
|
+
import { WindowHapiServiceTalentMindEvaluation } from "../talentMindEvaluation/service.types"
|
17
21
|
|
18
22
|
export type HapiServiceFunctionLifecycleHookCallbackHandler = () =>
|
19
23
|
| void
|
@@ -36,6 +40,7 @@ export type HapiServiceBase = {
|
|
36
40
|
__serviceName: WindowHapiModuleName
|
37
41
|
logger: WindowHapiLogger
|
38
42
|
init: () => void
|
43
|
+
initListeners: () => void
|
39
44
|
propertiesThatShouldNotBeDocumented: string[]
|
40
45
|
}
|
41
46
|
export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
|
@@ -50,6 +55,10 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
|
|
50
55
|
[WindowHapiModuleName.orderJourney]: WindowHapiServiceOrderJourney
|
51
56
|
[WindowHapiModuleName.ui]: WindowHapiServiceUI
|
52
57
|
[WindowHapiModuleName.ats]: WindowHapiServiceATS
|
58
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiServiceTalentMindCompany
|
59
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
|
60
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
|
61
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
|
53
62
|
services: {
|
54
63
|
[WindowHapiModuleName.alert]: WindowHapiServiceAlert
|
55
64
|
[WindowHapiModuleName.basket]: WindowHapiServiceBasket
|
@@ -61,6 +70,10 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
|
|
61
70
|
[WindowHapiModuleName.orderJourney]: WindowHapiServiceOrderJourney
|
62
71
|
[WindowHapiModuleName.ui]: WindowHapiServiceUI
|
63
72
|
[WindowHapiModuleName.ats]: WindowHapiServiceATS
|
73
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiServiceTalentMindCompany
|
74
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
|
75
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
|
76
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
|
64
77
|
}
|
65
78
|
|
66
79
|
decorateFunctionWithLifecycleEvents: <HandlerType extends Function>(
|
package/_window/state.types.ts
CHANGED
@@ -13,8 +13,8 @@ import { WindowHapiEventCommandCallbackHandler } from "../common/events/types"
|
|
13
13
|
import { WindowHapiModuleName } from "../common/enums"
|
14
14
|
import { ATSState } from "../ats/state.types"
|
15
15
|
import {
|
16
|
-
WindowHapiModuleWithConstructorArgs,
|
17
16
|
WindowHapiClassInterface,
|
17
|
+
WindowHapiModuleWithConstructorArgs,
|
18
18
|
} from "./window"
|
19
19
|
import { WindowHapiValidationsCommon } from "../common/validations.types"
|
20
20
|
import { WindowHapiValidationsBasket } from "../basket/validations.types"
|
@@ -26,6 +26,14 @@ import { WindowHapiValidationsTheming } from "../theming/validations.types"
|
|
26
26
|
import { WindowHapiValidationsOrderJourney } from "../orderJourney/validations.types"
|
27
27
|
import { WindowHapiValidationsWallet } from "../wallet/validations.types"
|
28
28
|
import { WindowHapiValidations } from "./validation.types"
|
29
|
+
import { TalentMindCompanyState } from "../talentMindCompany/state.types"
|
30
|
+
import { TalentMindJobState } from "../talentMindJob/state.types"
|
31
|
+
import { TalentMindResumeState } from "../talentMindResume/state.types"
|
32
|
+
import { TalentMindEvaluationState } from "../talentMindEvaluation/state.types"
|
33
|
+
import { WindowHapiValidationsTalentMindResume } from "../talentMindResume/validations.types"
|
34
|
+
import { WindowHapiValidationsTalentMindJob } from "../talentMindJob/validations.types"
|
35
|
+
import { WindowHapiValidationsTalentMindCompany } from "../talentMindCompany/validations.types"
|
36
|
+
import { WindowHapiValidationsTalentMindEvaluation } from "../talentMindEvaluation/validations.types"
|
29
37
|
|
30
38
|
export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
|
31
39
|
{
|
@@ -41,23 +49,32 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
|
|
41
49
|
[WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
|
42
50
|
[WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
|
43
51
|
[WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
|
52
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
|
53
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
|
54
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
|
55
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
|
44
56
|
basePropertiesThatShouldNotBeDocumented: string[]
|
45
57
|
handleDefaultStateFromQueryParams: (params: string | string[]) => void
|
58
|
+
rehydrateInitialState: (initialState: Record<string, any>) => void
|
46
59
|
onBeforeStateChange: () => void
|
47
60
|
onAfterStateChange: () => void
|
48
61
|
stores: {
|
49
|
-
alert: WindowHapiStateModule<AlertState>
|
50
|
-
basket: WindowHapiStateModule<BasketState>
|
51
|
-
campaign: WindowHapiStateModule<CampaignState>
|
52
|
-
contract: WindowHapiStateModule<ContractState>
|
53
|
-
debugging: WindowHapiStateModule<DebuggingState>
|
54
|
-
language: WindowHapiStateModule<LanguageState>
|
55
|
-
product: WindowHapiStateModule<ProductState>
|
56
|
-
theming: WindowHapiStateModule<ThemingState>
|
57
|
-
orderJourney: WindowHapiStateModule<OrderJourneyState>
|
58
|
-
wallet: WindowHapiStateModule<WalletState>
|
59
|
-
modal: WindowHapiStateModule<ModalState>
|
60
|
-
ats: WindowHapiStateModule<ATSState>
|
62
|
+
[WindowHapiModuleName.alert]: WindowHapiStateModule<AlertState>
|
63
|
+
[WindowHapiModuleName.basket]: WindowHapiStateModule<BasketState>
|
64
|
+
[WindowHapiModuleName.campaign]: WindowHapiStateModule<CampaignState>
|
65
|
+
[WindowHapiModuleName.contract]: WindowHapiStateModule<ContractState>
|
66
|
+
[WindowHapiModuleName.debugging]: WindowHapiStateModule<DebuggingState>
|
67
|
+
[WindowHapiModuleName.language]: WindowHapiStateModule<LanguageState>
|
68
|
+
[WindowHapiModuleName.product]: WindowHapiStateModule<ProductState>
|
69
|
+
[WindowHapiModuleName.theming]: WindowHapiStateModule<ThemingState>
|
70
|
+
[WindowHapiModuleName.orderJourney]: WindowHapiStateModule<OrderJourneyState>
|
71
|
+
[WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
|
72
|
+
[WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
|
73
|
+
[WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
|
74
|
+
[WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
|
75
|
+
[WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
|
76
|
+
[WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
|
77
|
+
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
|
61
78
|
}
|
62
79
|
toJSON: Record<string, any>
|
63
80
|
},
|
@@ -77,6 +94,10 @@ export type WindowHapiStatesJSON = {
|
|
77
94
|
[WindowHapiModuleName.wallet]: WalletState
|
78
95
|
[WindowHapiModuleName.modal]: ModalState
|
79
96
|
[WindowHapiModuleName.ats]: ATSState
|
97
|
+
[WindowHapiModuleName.talentMindCompany]: TalentMindCompanyState
|
98
|
+
[WindowHapiModuleName.talentMindJob]: TalentMindJobState
|
99
|
+
[WindowHapiModuleName.talentMindResume]: TalentMindResumeState
|
100
|
+
[WindowHapiModuleName.talentMindEvaluation]: TalentMindEvaluationState
|
80
101
|
}
|
81
102
|
|
82
103
|
export type WindowHapiStateBase<T> = {
|
@@ -110,6 +131,10 @@ export type StateValidationKey =
|
|
110
131
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTheming}`
|
111
132
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsOrderJourney}`
|
112
133
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsWallet}`
|
134
|
+
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindResume}`
|
135
|
+
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindJob}`
|
136
|
+
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindCompany}`
|
137
|
+
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindEvaluation}`
|
113
138
|
|
114
139
|
export type StateValidations<State> = {
|
115
140
|
[P in keyof State]: StateValidationKey | undefined
|
package/_window/utils.types.ts
CHANGED
@@ -5,10 +5,10 @@ import { WindowHapiUtilsCampaign } from "../campaign/utils.types"
|
|
5
5
|
import { WindowHapiUtilsBasket } from "../basket/utils.types"
|
6
6
|
import { WindowHapiUtilsOrderJourney } from "../orderJourney/utils.types"
|
7
7
|
import {
|
8
|
-
WindowHapiModuleWithConstructorArgs,
|
9
8
|
WindowHapiClassInterface,
|
9
|
+
WindowHapiModuleWithConstructorArgs,
|
10
10
|
} from "./window"
|
11
|
-
import {
|
11
|
+
import { WindowHapiUtilsModal } from "../modal/utils.types"
|
12
12
|
|
13
13
|
export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
14
14
|
{
|
@@ -29,6 +29,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
|
29
29
|
campaign: WindowHapiUtilsCampaign
|
30
30
|
basket: WindowHapiUtilsBasket
|
31
31
|
orderJourney: WindowHapiUtilsOrderJourney
|
32
|
+
modal: WindowHapiUtilsModal
|
32
33
|
|
33
34
|
utilities: {
|
34
35
|
[WindowHapiModuleName.basket]: WindowHapiUtilsBasket
|
@@ -36,6 +37,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
|
36
37
|
[WindowHapiModuleName.contract]: WindowHapiUtilsContract
|
37
38
|
[WindowHapiModuleName.product]: WindowHapiUtilsProduct
|
38
39
|
[WindowHapiModuleName.orderJourney]: WindowHapiUtilsOrderJourney
|
40
|
+
[WindowHapiModuleName.modal]: WindowHapiUtilsModal
|
39
41
|
}
|
40
42
|
},
|
41
43
|
{ readonly core: WindowHapiClassInterface }
|
package/_window/window.ts
CHANGED
@@ -17,6 +17,7 @@ import {
|
|
17
17
|
WindowHapiSubmoduleName,
|
18
18
|
} from "../common"
|
19
19
|
import { DebugPanelPosition } from "./config.types"
|
20
|
+
import { ProductPriceCurrency } from "../product/enums"
|
20
21
|
|
21
22
|
export type WindowHapiModuleWithConstructorArgs<Module, ConstructorArgs> =
|
22
23
|
Module & ConstructorArgs
|
@@ -81,20 +82,37 @@ export type WindowHapiQASubmodule = WindowHapiModuleWithConstructorArgs<
|
|
81
82
|
{ readonly core: WindowHapiClassInterface }
|
82
83
|
>
|
83
84
|
|
85
|
+
export type WindowHapiInjectorConfig = {
|
86
|
+
apiHost: string
|
87
|
+
partnerToken: string //used for impersonation purposes
|
88
|
+
clientToken: string
|
89
|
+
appOrigin: string
|
90
|
+
docsOrigin: string
|
91
|
+
enableLogs: boolean
|
92
|
+
enableRemoteLogs: boolean
|
93
|
+
useJWTAuthHeaders: boolean
|
94
|
+
addModal: boolean
|
95
|
+
addAlertBar: boolean
|
96
|
+
addDebugPanel: boolean
|
97
|
+
debugPanelPosition: DebugPanelPosition
|
98
|
+
testMode: boolean
|
99
|
+
debugMode: boolean
|
100
|
+
walletCurrency: ProductPriceCurrency
|
101
|
+
}
|
102
|
+
|
84
103
|
export type WindowHapiConfigSubmodule = {
|
104
|
+
talentMindApiHost: string
|
85
105
|
apiHost: string
|
86
106
|
initialState: RecursivePartial<any>
|
87
|
-
partnerId: string
|
88
107
|
partnerToken: string
|
89
|
-
clientId: string
|
90
108
|
clientToken: string
|
91
109
|
loadingSpinnerDefaultFillColor: string
|
92
110
|
appOrigin: string
|
93
111
|
docsOrigin: string
|
94
112
|
enableLogs: boolean
|
113
|
+
enableRemoteLogs: boolean
|
95
114
|
webComponents: HapiWebComponent[]
|
96
115
|
isInvalidToken: boolean
|
97
|
-
isAllowedToUseDevelopmentEnvironment: boolean
|
98
116
|
useJWTAuthHeaders: boolean
|
99
117
|
addModal: boolean
|
100
118
|
addAlertBar: boolean
|
@@ -106,6 +124,8 @@ export type WindowHapiConfigSubmodule = {
|
|
106
124
|
testMode: boolean
|
107
125
|
debugMode: boolean
|
108
126
|
htmlTemplates: Record<string, string>
|
127
|
+
walletCurrency: ProductPriceCurrency
|
128
|
+
isUsingGETMethod: boolean
|
109
129
|
}
|
110
130
|
|
111
131
|
export type WindowHapiClassInterface = {
|
@@ -124,7 +144,9 @@ export type WindowHapiClassInterface = {
|
|
124
144
|
instance: WindowHapiInstance
|
125
145
|
qa: WindowHapiQASubmodule
|
126
146
|
isProduction: boolean
|
147
|
+
isReady: boolean
|
127
148
|
enableLogs: boolean
|
149
|
+
enableRemoteLogs: boolean
|
128
150
|
}
|
129
151
|
|
130
152
|
export type WindowHapi = {
|
@@ -143,3 +165,14 @@ export type WindowHapi = {
|
|
143
165
|
[WindowHapiSubmoduleName.events]: WindowHapiEventsSubmodule
|
144
166
|
[WindowHapiSubmoduleName.instance]: WindowHapiInstance
|
145
167
|
}
|
168
|
+
|
169
|
+
export type WindowHapiInjector = {
|
170
|
+
hapiInjector: {
|
171
|
+
setConfig<K extends keyof WindowHapiInjectorConfig>(
|
172
|
+
key: K,
|
173
|
+
value: WindowHapiInjectorConfig[K],
|
174
|
+
): WindowHapiInjectorConfig
|
175
|
+
inject: () => Promise<void>
|
176
|
+
}
|
177
|
+
hapiInjectorConfig: WindowHapiInjectorConfig
|
178
|
+
}
|
package/alert/enums.ts
CHANGED
@@ -5,7 +5,7 @@ export enum AlertKey {
|
|
5
5
|
contractCreateSuccess = "contract-created",
|
6
6
|
contractGroupCreateSuccess = "contract-group-created",
|
7
7
|
campaignTakeOfflineSuccess = "campaign-take-offline-success",
|
8
|
-
"
|
8
|
+
"campaignCopyProductsContractsDeletedWarning" = "campaign-copy-contract-warning",
|
9
9
|
campaignOrderSuccess = "campaign-order-success",
|
10
10
|
campaignCopySuccess = "campaign-copy-success",
|
11
11
|
buttonCopySuccess = "copy-button-success",
|
package/alert/types.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ToastOptions } from "react-toastify/dist/types"
|
2
2
|
import { AlertKey } from "./enums"
|
3
3
|
import { AnyNonFunction } from "../common/types"
|
4
|
+
import { ProductPriceCurrency } from "../product/enums"
|
4
5
|
|
5
6
|
export type AlertOptions = ToastOptions & {
|
6
7
|
shouldShowDismiss?: boolean
|
@@ -23,7 +24,8 @@ export type BackendErrorMessageAlertProps = {
|
|
23
24
|
}
|
24
25
|
|
25
26
|
export type WalletTopUpSuccessAlertProps = {
|
26
|
-
|
27
|
+
amount: number
|
28
|
+
currency: ProductPriceCurrency
|
27
29
|
}
|
28
30
|
|
29
31
|
export type UTMCodesSuccessAlertProps = {
|
@@ -36,7 +38,7 @@ export type CampaignOrderSuccessAlertProps = {}
|
|
36
38
|
|
37
39
|
export type CampaignCopySuccessAlertProps = {}
|
38
40
|
|
39
|
-
export type
|
41
|
+
export type CampaignCopyProductsContractsDeletedWarningAlertProps = {}
|
40
42
|
|
41
43
|
export type CampaignTakeOfflineSuccessAlertProps = {}
|
42
44
|
|
@@ -46,7 +48,7 @@ export type ProductRemoveFromBasketWarningAlertProps = {}
|
|
46
48
|
|
47
49
|
export type AlertProps = AnyNonFunction<
|
48
50
|
| ContractCreateSuccessAlertProps
|
49
|
-
|
|
51
|
+
| CampaignCopyProductsContractsDeletedWarningAlertProps
|
50
52
|
| ContractRemoveSuccessAlertProps
|
51
53
|
| ContractGroupCreateSuccessAlertProps
|
52
54
|
| BackendErrorMessageAlertProps
|
package/ats/state.types.ts
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
import { ATSSettings,
|
1
|
+
import { ATSSettings, ATSUserData, ATSUserPaymentSetting } from "./types"
|
2
|
+
import { ProductPriceCurrency } from "../product"
|
2
3
|
|
3
4
|
export type ATSState = {
|
4
5
|
userSettings: ATSSettings | null
|
5
6
|
userData: ATSUserData | null
|
6
|
-
|
7
|
+
supportedCurrencies: ProductPriceCurrency[]
|
8
|
+
walletCurrencyPaymentSettings: ATSUserPaymentSetting | null
|
9
|
+
maxPurchaseOrderAmount: number | null
|
7
10
|
}
|
package/ats/types.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { WalletPaymentIntentPaymentMethod } from "../wallet/types"
|
2
|
+
import { ProductPriceCurrency } from "../product/enums"
|
2
3
|
|
3
4
|
export type ATSUserPaymentSetting = {
|
4
|
-
currency:
|
5
|
+
currency: ProductPriceCurrency
|
5
6
|
max_outstanding_balance: string
|
6
7
|
max_purchase_order: string
|
7
8
|
min_topup: string
|
@@ -15,6 +16,7 @@ export type ATSUserSettings = {
|
|
15
16
|
ats_managed_payment: boolean
|
16
17
|
can_pay_with_purchase_order: boolean
|
17
18
|
can_use_wallets: boolean
|
19
|
+
can_pay_with_direct_charge: boolean
|
18
20
|
invoice_currency: string | null
|
19
21
|
}
|
20
22
|
export type ATSSettings = {
|
@@ -23,14 +25,18 @@ export type ATSSettings = {
|
|
23
25
|
}
|
24
26
|
|
25
27
|
export type ATSUserData = {
|
26
|
-
customer_id: string
|
27
|
-
id: string
|
28
|
+
customer_id: string
|
29
|
+
id: string
|
28
30
|
ats: {
|
29
|
-
id: string
|
30
|
-
hapi_partner_id: string
|
31
|
-
name: string
|
31
|
+
id: string
|
32
|
+
hapi_partner_id: string
|
33
|
+
name: string
|
32
34
|
}
|
33
|
-
|
35
|
+
settings: {
|
36
|
+
ats_user_jwt_expiration: number
|
37
|
+
ats_user_jwt_allow_renewal: boolean
|
38
|
+
}
|
39
|
+
}
|
34
40
|
|
35
41
|
export type ATSUserTokenResponse = {
|
36
42
|
token: string
|
package/basket/state.types.ts
CHANGED
package/basket/utils.types.ts
CHANGED
@@ -39,6 +39,10 @@ export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
|
|
39
39
|
basketProducts: (Contract | Product)[],
|
40
40
|
) => (Product | Contract)[]
|
41
41
|
getBasketProductMetaFromCampaignForm: (form: Campaign) => any[]
|
42
|
+
getProductsTotal: (
|
43
|
+
products: (Product | Contract)[],
|
44
|
+
currency: ProductPriceCurrency,
|
45
|
+
) => number
|
42
46
|
},
|
43
47
|
{ readonly utils: WindowHapiUtils }
|
44
48
|
>
|
@@ -44,6 +44,7 @@ export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
|
44
44
|
getSeniorities: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetSenioritiesHandler>
|
45
45
|
orderCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceOrderCampaignHandler>
|
46
46
|
copyCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceCopyCampaignHandler>
|
47
|
+
onAfterOrderCampaignSuccess: () => void
|
47
48
|
},
|
48
49
|
{ readonly service: WindowHapiService }
|
49
50
|
>
|
package/campaign/types.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
import { ProductDuration, ProductIndustry } from "../product/types"
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
ContractPostingRequirement,
|
4
|
+
ContractPostingRequirementOptionRequiresField,
|
5
|
+
} from "../contract/types"
|
3
6
|
import { ProductPriceCurrency } from "../product/enums"
|
4
7
|
import { EmploymentType, SalaryPeriod } from "./enums"
|
5
8
|
import { OrderJourneyPaymentMethod } from "../orderJourney"
|
@@ -17,6 +20,20 @@ export type CampaignProductSpecs = {
|
|
17
20
|
statusDescription: string | null
|
18
21
|
}
|
19
22
|
|
23
|
+
export type CampaignProductStatus = {
|
24
|
+
productId: string
|
25
|
+
status: CampaignStatus
|
26
|
+
statusDescription: string | null
|
27
|
+
statusRawError: string | null
|
28
|
+
statusSolution: string | null
|
29
|
+
}
|
30
|
+
|
31
|
+
export type CampaignDetail = {
|
32
|
+
status: CampaignStatus
|
33
|
+
orderedProductsStatuses: CampaignProductStatus[]
|
34
|
+
campaignId: string
|
35
|
+
}
|
36
|
+
|
20
37
|
export type CampaignPostingDetailsContactInfo = {
|
21
38
|
emailAddress?: string | null
|
22
39
|
name?: string | null
|
@@ -97,7 +114,11 @@ export type CampaignTotalPrice = {
|
|
97
114
|
currency: ProductPriceCurrency
|
98
115
|
}
|
99
116
|
|
100
|
-
export type CampaignStatus =
|
117
|
+
export type CampaignStatus =
|
118
|
+
| "in progress"
|
119
|
+
| "offline"
|
120
|
+
| "online"
|
121
|
+
| "not processed"
|
101
122
|
|
102
123
|
export type CampaignDetailsStatusOrderedProductStatus = {
|
103
124
|
productId: string
|
@@ -177,7 +198,7 @@ export type CampaignCreateFormPostingDetails = {
|
|
177
198
|
|
178
199
|
export type CampaignCreateForm = {
|
179
200
|
companyId: string
|
180
|
-
currency: ProductPriceCurrency
|
201
|
+
currency: ProductPriceCurrency | null
|
181
202
|
campaignName?: string | null
|
182
203
|
poNumber: string | null
|
183
204
|
orderReference?: string
|
@@ -208,7 +229,6 @@ export type CampaignOrderRequestBody = {
|
|
208
229
|
targetGroup: CampaignTargetGroup
|
209
230
|
orderedProducts: string[]
|
210
231
|
orderedProductsSpecs: CampaignOrderRequestBodyOrderedProductsSpec[]
|
211
|
-
currency: string
|
212
232
|
}
|
213
233
|
|
214
234
|
export type CampaignTaxonomyNameWithLanguage = {
|
@@ -236,7 +256,8 @@ export type TaxonomyEmploymentTypes = {
|
|
236
256
|
}
|
237
257
|
export type TransformedPostingRequirementOption = {
|
238
258
|
value?: string
|
239
|
-
|
259
|
+
data?: any[]
|
260
|
+
requires?: ContractPostingRequirementOptionRequiresField[] | null
|
240
261
|
label: string
|
241
262
|
}
|
242
263
|
export type TransformedPostingRequirement = Omit<
|
@@ -131,7 +131,7 @@ export type ZodCampaignCreateFormOrderedProductSpecs = ZodRecord<
|
|
131
131
|
>
|
132
132
|
|
133
133
|
export type ZodCampaign = ZodObject<{
|
134
|
-
currency: ZodString
|
134
|
+
currency: ZodNullable<ZodString>
|
135
135
|
campaignId: ZodString
|
136
136
|
campaignName: ZodNullable<ZodString>
|
137
137
|
companyId: ZodString
|
package/common/enums.ts
CHANGED
@@ -33,6 +33,10 @@ export enum WindowHapiModuleName {
|
|
33
33
|
alert = "alert",
|
34
34
|
modal = "modal",
|
35
35
|
"ui" = "ui",
|
36
|
+
talentMindCompany = "talentMindCompany",
|
37
|
+
talentMindJob = "talentMindJob",
|
38
|
+
talentMindResume = "talentMindResume",
|
39
|
+
talentMindEvaluation = "talentMindEvaluation",
|
36
40
|
}
|
37
41
|
|
38
42
|
export enum WindowHapiSDKModuleName {
|
@@ -12,14 +12,14 @@ export enum WindowHapiEventCommandName {
|
|
12
12
|
serviceFinish = "service:finish",
|
13
13
|
|
14
14
|
/* Config */
|
15
|
-
configSetPartnerId = "config:partnerId",
|
16
15
|
configSetPartnerToken = "config:partnerToken", // used for impersonation purposes
|
17
|
-
configSetClientId = "config:clientId",
|
18
16
|
configSetAreLogsEnabled = "config:areLogsEnabled",
|
17
|
+
configSetWalletCurrency = "config:setWalletCurrency",
|
19
18
|
|
20
19
|
/* App */
|
21
20
|
appLoad = "app:load",
|
22
21
|
appReady = "app:ready",
|
22
|
+
appHydrated = "app:hydrated",
|
23
23
|
|
24
24
|
/* API */
|
25
25
|
apiRequest = "api:request",
|
package/common/types.ts
CHANGED
@@ -100,10 +100,13 @@ export type HapiWebComponent = {
|
|
100
100
|
isUserJourney?: boolean
|
101
101
|
webComponentCSS?: Record<string, any> //React.CSSProperties
|
102
102
|
attributes?: Record<string, string>
|
103
|
+
shouldAutoResize?: boolean
|
103
104
|
qaFunctionToMockId?: Record<string, string> //some widgets have attributes like <widget campaign-id=IDHERE> and they show 404 inside demo pages and documentation so this will map to window.hapiQA function that will grab that id. example below
|
104
105
|
/* mock id example
|
105
106
|
{
|
106
107
|
"campaignId": "campaign.getRandomCampaignId" //campaignId being the path parameter like [campaignId].tsx
|
107
108
|
}
|
108
109
|
*/
|
110
|
+
enableNextJSDivScroll?: boolean
|
111
|
+
loadingLazyIframe?: boolean
|
109
112
|
}
|
package/contract/types.ts
CHANGED
@@ -78,6 +78,12 @@ export type ContractPostingRequirement = {
|
|
78
78
|
rules?: ContractPostingRequirementRule[] | null
|
79
79
|
}
|
80
80
|
|
81
|
+
export type ContractPostingRequirementOptionRequiresField = {
|
82
|
+
field: {
|
83
|
+
name: string
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
81
87
|
export type ContractPostingRequirementOption = {
|
82
88
|
default?: string
|
83
89
|
key: string
|
@@ -86,6 +92,7 @@ export type ContractPostingRequirementOption = {
|
|
86
92
|
labels?: Record<"default", string>
|
87
93
|
sort: string
|
88
94
|
parent?: string
|
95
|
+
requires: ContractPostingRequirementOptionRequiresField[] | null
|
89
96
|
}
|
90
97
|
|
91
98
|
export type ContractPurchasePrice = {
|
package/language/qa.types.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { ProductPriceCurrency } from "../product/enums"
|
2
1
|
import { LanguageStoreTranslations } from "./state.types"
|
3
2
|
import { WindowHapiQA } from "../_window/qa.types"
|
4
3
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
@@ -6,9 +5,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
|
6
5
|
export type WindowHapiQALanguage = WindowHapiModuleWithConstructorArgs<
|
7
6
|
{
|
8
7
|
setLocale: (locale: string) => string
|
9
|
-
|
10
|
-
currency: ProductPriceCurrency,
|
11
|
-
) => ProductPriceCurrency
|
8
|
+
|
12
9
|
setTranslationByLocaleAndKey: (
|
13
10
|
locale: string,
|
14
11
|
key: string,
|
package/language/state.types.ts
CHANGED
@@ -1,25 +1,9 @@
|
|
1
|
-
import { ProductPriceCurrency } from "../product/enums"
|
2
|
-
|
3
1
|
export type LanguageStoreLocaleTranslations = Record<string, string>
|
4
2
|
export type LanguageStoreTranslations = Record<
|
5
3
|
string,
|
6
4
|
LanguageStoreLocaleTranslations
|
7
5
|
>
|
8
6
|
export type LanguageState = {
|
9
|
-
/**
|
10
|
-
* Locale of the user (navigator language) in RFC 5646 that can be changed via setLocale function
|
11
|
-
*/
|
12
7
|
locale: string
|
13
|
-
/**
|
14
|
-
* An object containing key-value parts where the key is the i18n key such as `test.example-string` and the value is the actual translation. Translations will be loaded by current locale and fallbacks will be used from American English defaults we have.
|
15
|
-
*/
|
16
8
|
translations: LanguageStoreTranslations
|
17
|
-
/**
|
18
|
-
* Current Display Currency of all the widgets
|
19
|
-
*/
|
20
|
-
displayCurrency: ProductPriceCurrency
|
21
|
-
/**
|
22
|
-
* Array of supported currencies. **This value changes automatically when user scrolls and should not be set from outside**
|
23
|
-
*/
|
24
|
-
supportedCurrencies: ProductPriceCurrency[]
|
25
9
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ZodRecord, ZodString } from "zod"
|
2
|
-
import { ProductPriceCurrency } from "../product/enums"
|
3
2
|
|
4
3
|
export type ZodTranslations = ZodRecord<
|
5
4
|
ZodString,
|
@@ -7,7 +6,4 @@ export type ZodTranslations = ZodRecord<
|
|
7
6
|
>
|
8
7
|
export type WindowHapiValidationsLanguage = {
|
9
8
|
translations: ZodTranslations
|
10
|
-
supportedCurrencies: ProductPriceCurrency[]
|
11
|
-
supportedCurrenciesRegex: RegExp
|
12
|
-
displayCurrency: ZodString
|
13
9
|
}
|