@vonq/hapi-elements-types 1.21.0 → 1.23.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 +12 -13
- package/_window/index.ts.bak +16 -0
- package/_window/sdk.types.ts +5 -2
- package/_window/service.types.ts +6 -16
- package/_window/state.types.ts +0 -24
- package/_window/utils.types.ts +3 -0
- package/_window/window.ts +2 -1
- package/alert/index.ts +4 -4
- package/alert/index.ts.bak +6 -0
- package/ats/index.ts +4 -4
- package/ats/index.ts.bak +6 -0
- package/ats/types.ts +7 -1
- package/basket/index.ts +5 -5
- package/basket/index.ts.bak +7 -0
- package/basket/service.types.ts +1 -1
- package/basket/utils.types.ts +6 -2
- package/campaign/api.types.ts +5 -1
- package/campaign/enums.ts +0 -3
- package/campaign/index.ts +8 -8
- package/campaign/index.ts.bak +10 -0
- package/campaign/service.types.ts +14 -0
- package/campaign/types.ts +31 -21
- package/campaign/utils.types.ts +1 -0
- package/campaign/validations.types.ts +15 -1
- package/common/enums.ts +0 -4
- package/common/events/EventCommand/index.ts.bak +4 -0
- package/common/events/index.ts.bak +4 -0
- package/common/index.ts +7 -5
- package/common/index.ts.bak +7 -0
- package/common/logger/index.ts +4 -0
- package/common/types.ts +16 -1
- package/common/validations.types.ts +2 -0
- package/common/validator/index.ts +3 -0
- package/contract/api.types.ts +1 -0
- package/contract/index.ts +7 -7
- package/contract/index.ts.bak +9 -0
- package/contract/service.types.ts +7 -1
- package/contract/state.types.ts +1 -0
- package/contract/types.ts +2 -0
- package/contract/validations.types.ts +1 -0
- package/debugging/index.ts +3 -2
- package/debugging/index.ts.bak +4 -0
- package/index.ts +16 -16
- package/index.ts.bak +18 -0
- package/language/enums.ts +5 -0
- package/language/index.ts +6 -3
- package/language/index.ts.bak +5 -0
- package/language/service.types.ts +7 -0
- package/language/state.types.ts +3 -1
- package/language/utils.types.ts +11 -0
- package/modal/enums.ts +3 -3
- package/modal/index.ts +5 -4
- package/modal/index.ts.bak +6 -0
- package/modal/types.ts +11 -8
- package/orderJourney/index.ts +7 -6
- package/orderJourney/index.ts.bak +8 -0
- package/orderJourney/qa.types.ts +3 -1
- package/orderJourney/service.types.ts +2 -8
- package/orderJourney/state.types.ts +31 -7
- package/orderJourney/types.ts +107 -8
- package/orderJourney/validations.types.ts +13 -2
- package/package.json +2 -3
- package/product/index.ts +8 -8
- package/product/index.ts.bak +10 -0
- package/product/types.ts +6 -1
- package/product/validations.types.ts +1 -0
- package/routing/index.ts +2 -1
- package/routing/index.ts.bak +3 -0
- package/theming/index.ts +4 -4
- package/theming/index.ts.bak +6 -0
- package/theming/types.ts +44 -0
- package/theming/validations.types.ts +16 -0
- package/ui/index.ts.bak +3 -0
- package/wallet/index.ts +5 -5
- package/wallet/index.ts.bak +7 -0
- package/wallet/state.types.ts +1 -1
- package/wallet/types.ts +6 -1
- package/talentMindCompany/api.types.ts +0 -18
- package/talentMindCompany/service.types.ts +0 -15
- package/talentMindCompany/state.types.ts +0 -5
- package/talentMindCompany/types.ts +0 -6
- package/talentMindCompany/validations.types.ts +0 -5
- package/talentMindEvaluation/api.types.ts +0 -25
- package/talentMindEvaluation/service.types.ts +0 -25
- package/talentMindEvaluation/state.types.ts +0 -6
- package/talentMindEvaluation/types.ts +0 -15
- package/talentMindEvaluation/validations.types.ts +0 -5
- package/talentMindJob/api.types.ts +0 -26
- package/talentMindJob/service.types.ts +0 -28
- package/talentMindJob/state.types.ts +0 -6
- package/talentMindJob/types.ts +0 -12
- package/talentMindJob/validations.types.ts +0 -5
- package/talentMindResume/api.types.ts +0 -30
- package/talentMindResume/service.types.ts +0 -34
- package/talentMindResume/state.types.ts +0 -6
- package/talentMindResume/types.ts +0 -119
- package/talentMindResume/validations.types.ts +0 -5
- package/tsconfig.json +0 -36
package/_window/api.types.ts
CHANGED
@@ -16,12 +16,9 @@ import {
|
|
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"
|
23
19
|
|
24
20
|
export type WindowHapiAPIModule<ModuleType, ModuleConfig> = {
|
21
|
+
propertiesThatShouldNotBeDocumented: string[]
|
25
22
|
logger: WindowHapiLogger
|
26
23
|
configs: ModuleConfig
|
27
24
|
setBaseURL: (url: string) => void
|
@@ -49,6 +46,17 @@ export type WindowHapiAPIValidateJWTTokenHandler = () => Promise<boolean>
|
|
49
46
|
export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
|
50
47
|
{
|
51
48
|
/* Common */
|
49
|
+
setClassBaseConfig: <T>(
|
50
|
+
klass: any,
|
51
|
+
config: Record<string, RawAxiosRequestConfig>,
|
52
|
+
) => void
|
53
|
+
setClassResourceConfig: <T>(
|
54
|
+
klass: any,
|
55
|
+
resourceKey: string,
|
56
|
+
config: RawAxiosRequestConfig,
|
57
|
+
) => void
|
58
|
+
propertiesThatShouldNotBeDocumented: string[]
|
59
|
+
mergePropertiesThatShouldNotBeDocumented: (klass: any) => void
|
52
60
|
request: <T = any, R = AxiosResponse<T>, D = any>(
|
53
61
|
config: Partial<HapiRequestConfig<D>>,
|
54
62
|
) => Promise<R>
|
@@ -63,7 +71,6 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
|
|
63
71
|
refreshJWTToken: WindowHapiAPIRefreshJWTTokenHandler
|
64
72
|
validateJWTToken: WindowHapiAPIValidateJWTTokenHandler
|
65
73
|
baseURL: string
|
66
|
-
talentMindBaseUrl: string
|
67
74
|
setBaseURL: (url: string) => void
|
68
75
|
setBaseConfig: (params: Record<string, Record<string, string>>) => void
|
69
76
|
baseTimeout: number
|
@@ -82,20 +89,12 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
|
|
82
89
|
[WindowHapiModuleName.product]: WindowHapiAPIProduct
|
83
90
|
[WindowHapiModuleName.campaign]: WindowHapiAPICampaign
|
84
91
|
[WindowHapiModuleName.ats]: WindowHapiAPIATS
|
85
|
-
[WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
|
86
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
|
87
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
|
88
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
|
89
92
|
modules: {
|
90
93
|
[WindowHapiModuleName.contract]: WindowHapiAPIContract
|
91
94
|
[WindowHapiModuleName.wallet]: WindowHapiAPIWallet
|
92
95
|
[WindowHapiModuleName.product]: WindowHapiAPIProduct
|
93
96
|
[WindowHapiModuleName.campaign]: WindowHapiAPICampaign
|
94
97
|
[WindowHapiModuleName.ats]: WindowHapiAPIATS
|
95
|
-
[WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
|
96
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
|
97
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
|
98
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
|
99
98
|
}
|
100
99
|
},
|
101
100
|
{ readonly core: WindowHapiClassInterface }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// created from 'create-ts-index'
|
2
|
+
|
3
|
+
export * from './api.types';
|
4
|
+
export * from './auth.types';
|
5
|
+
export * from './config.types';
|
6
|
+
export * from './events.types';
|
7
|
+
export * from './instances.types';
|
8
|
+
export * from './qa.types';
|
9
|
+
export * from './routing.types';
|
10
|
+
export * from './sdk.types';
|
11
|
+
export * from './service.types';
|
12
|
+
export * from './state.types';
|
13
|
+
export * from './ui.types';
|
14
|
+
export * from './utils.types';
|
15
|
+
export * from './validation.types';
|
16
|
+
export * from './window';
|
package/_window/sdk.types.ts
CHANGED
@@ -44,6 +44,8 @@ import { ATSState, WindowHapiAPIATS, WindowHapiServiceATS } from "../ats"
|
|
44
44
|
import { WindowHapiServiceOrderJourney } from "../orderJourney/service.types"
|
45
45
|
import { WindowHapiQA } from "./qa.types"
|
46
46
|
import { WindowHapiServiceDebugging } from "../debugging/service.types"
|
47
|
+
import { WindowHapiServiceLanguage } from "../language/service.types"
|
48
|
+
import { WindowHapiUtilsLanguage } from "../language/utils.types"
|
47
49
|
|
48
50
|
export type WindowHapiSDKModule<
|
49
51
|
APIModule,
|
@@ -94,9 +96,10 @@ export type WindowHapiSDKDebugging = WindowHapiSDKModule<
|
|
94
96
|
>
|
95
97
|
export type WindowHapiSDKLanguage = WindowHapiSDKModule<
|
96
98
|
undefined,
|
97
|
-
|
99
|
+
WindowHapiServiceLanguage,
|
98
100
|
WindowHapiValidationsLanguage,
|
99
|
-
WindowHapiStateModule<LanguageState
|
101
|
+
WindowHapiStateModule<LanguageState>,
|
102
|
+
WindowHapiUtilsLanguage
|
100
103
|
>
|
101
104
|
export type WindowHapiSDKOrderJourney = WindowHapiSDKModule<
|
102
105
|
undefined,
|
package/_window/service.types.ts
CHANGED
@@ -14,16 +14,12 @@ 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"
|
21
17
|
import { WindowHapiServiceDebugging } from "../debugging/service.types"
|
18
|
+
import { WindowHapiServiceLanguage } from "../language/service.types"
|
22
19
|
|
23
|
-
export type HapiServiceFunctionLifecycleHookCallbackHandler = (
|
24
|
-
|
25
|
-
|
26
|
-
| Promise<void | never>
|
20
|
+
export type HapiServiceFunctionLifecycleHookCallbackHandler = (
|
21
|
+
...args: any[]
|
22
|
+
) => void | never | Promise<void | never>
|
27
23
|
|
28
24
|
export type HapiServiceFunctionLifecycleHookHandler = (
|
29
25
|
callback: HapiServiceFunctionLifecycleHookCallbackHandler,
|
@@ -59,10 +55,7 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
|
|
59
55
|
[WindowHapiModuleName.ui]: WindowHapiServiceUI
|
60
56
|
[WindowHapiModuleName.ats]: WindowHapiServiceATS
|
61
57
|
[WindowHapiModuleName.debugging]: WindowHapiServiceDebugging
|
62
|
-
[WindowHapiModuleName.
|
63
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
|
64
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
|
65
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
|
58
|
+
[WindowHapiModuleName.language]: WindowHapiServiceLanguage
|
66
59
|
services: {
|
67
60
|
[WindowHapiModuleName.alert]: WindowHapiServiceAlert
|
68
61
|
[WindowHapiModuleName.basket]: WindowHapiServiceBasket
|
@@ -75,10 +68,7 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
|
|
75
68
|
[WindowHapiModuleName.ui]: WindowHapiServiceUI
|
76
69
|
[WindowHapiModuleName.ats]: WindowHapiServiceATS
|
77
70
|
[WindowHapiModuleName.debugging]: WindowHapiServiceDebugging
|
78
|
-
[WindowHapiModuleName.
|
79
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
|
80
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
|
81
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
|
71
|
+
[WindowHapiModuleName.language]: WindowHapiServiceLanguage
|
82
72
|
}
|
83
73
|
|
84
74
|
decorateFunctionWithLifecycleEvents: <HandlerType extends Function>(
|
package/_window/state.types.ts
CHANGED
@@ -26,14 +26,6 @@ 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"
|
37
29
|
|
38
30
|
export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
|
39
31
|
{
|
@@ -49,10 +41,6 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
|
|
49
41
|
[WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
|
50
42
|
[WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
|
51
43
|
[WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
|
52
|
-
[WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
|
53
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
|
54
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
|
55
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
|
56
44
|
basePropertiesThatShouldNotBeDocumented: string[]
|
57
45
|
handleDefaultStateFromQueryParams: (params: string | string[]) => void
|
58
46
|
rehydrateInitialState: (
|
@@ -74,10 +62,6 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
|
|
74
62
|
[WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
|
75
63
|
[WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
|
76
64
|
[WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
|
77
|
-
[WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
|
78
|
-
[WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
|
79
|
-
[WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
|
80
|
-
[WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
|
81
65
|
}
|
82
66
|
toJSON: Record<string, any>
|
83
67
|
},
|
@@ -97,10 +81,6 @@ export type WindowHapiStatesJSON = {
|
|
97
81
|
[WindowHapiModuleName.wallet]: WalletState
|
98
82
|
[WindowHapiModuleName.modal]: ModalState
|
99
83
|
[WindowHapiModuleName.ats]: ATSState
|
100
|
-
[WindowHapiModuleName.talentMindCompany]: TalentMindCompanyState
|
101
|
-
[WindowHapiModuleName.talentMindJob]: TalentMindJobState
|
102
|
-
[WindowHapiModuleName.talentMindResume]: TalentMindResumeState
|
103
|
-
[WindowHapiModuleName.talentMindEvaluation]: TalentMindEvaluationState
|
104
84
|
}
|
105
85
|
|
106
86
|
export type WindowHapiStateBase<T> = {
|
@@ -134,10 +114,6 @@ export type StateValidationKey =
|
|
134
114
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTheming}`
|
135
115
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsOrderJourney}`
|
136
116
|
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsWallet}`
|
137
|
-
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindResume}`
|
138
|
-
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindJob}`
|
139
|
-
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindCompany}`
|
140
|
-
| `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindEvaluation}`
|
141
117
|
|
142
118
|
export type StateValidations<State> = {
|
143
119
|
[P in keyof State]: StateValidationKey | undefined
|
package/_window/utils.types.ts
CHANGED
@@ -10,6 +10,7 @@ import {
|
|
10
10
|
} from "./window"
|
11
11
|
import { WindowHapiUtilsModal } from "../modal/utils.types"
|
12
12
|
import { WindowHapiUtilsRouter } from "../routing/utils.types"
|
13
|
+
import { WindowHapiUtilsLanguage } from "../language/utils.types"
|
13
14
|
|
14
15
|
export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
15
16
|
{
|
@@ -42,6 +43,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
|
42
43
|
orderJourney: WindowHapiUtilsOrderJourney
|
43
44
|
modal: WindowHapiUtilsModal
|
44
45
|
router: WindowHapiUtilsRouter
|
46
|
+
language: WindowHapiUtilsLanguage
|
45
47
|
|
46
48
|
utilities: {
|
47
49
|
[WindowHapiModuleName.basket]: WindowHapiUtilsBasket
|
@@ -51,6 +53,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
|
51
53
|
[WindowHapiModuleName.orderJourney]: WindowHapiUtilsOrderJourney
|
52
54
|
[WindowHapiModuleName.modal]: WindowHapiUtilsModal
|
53
55
|
[WindowHapiModuleName.router]: WindowHapiUtilsRouter
|
56
|
+
[WindowHapiModuleName.language]: WindowHapiUtilsLanguage
|
54
57
|
}
|
55
58
|
},
|
56
59
|
{ readonly core: WindowHapiClassInterface }
|
package/_window/window.ts
CHANGED
@@ -12,6 +12,7 @@ import { WindowHapiService } from "./service.types"
|
|
12
12
|
import { WindowHapiQA } from "./qa.types"
|
13
13
|
import { WindowHapiLogger } from "../common/logger/types"
|
14
14
|
import {
|
15
|
+
HapiFeatureBranch,
|
15
16
|
HapiWebComponent,
|
16
17
|
RecursivePartial,
|
17
18
|
WindowHapiSubmoduleName,
|
@@ -101,7 +102,6 @@ export type WindowHapiInjectorConfig = {
|
|
101
102
|
}
|
102
103
|
|
103
104
|
export type WindowHapiConfigSubmodule = {
|
104
|
-
talentMindApiHost: string
|
105
105
|
apiHost: string
|
106
106
|
initialState: RecursivePartial<any>
|
107
107
|
partnerToken: string
|
@@ -126,6 +126,7 @@ export type WindowHapiConfigSubmodule = {
|
|
126
126
|
htmlTemplates: Record<string, string>
|
127
127
|
walletCurrency: ProductPriceCurrency
|
128
128
|
isUsingGETMethod: boolean
|
129
|
+
featureBranches: HapiFeatureBranch[]
|
129
130
|
}
|
130
131
|
|
131
132
|
export type WindowHapiClassInterface = {
|
package/alert/index.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
3
|
+
export * from './enums';
|
4
|
+
export * from './service.types';
|
5
|
+
export * from './state.types';
|
6
|
+
export * from './types';
|
package/ats/index.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
3
|
+
export * from './api.types';
|
4
|
+
export * from './service.types';
|
5
|
+
export * from './state.types';
|
6
|
+
export * from './types';
|
package/ats/index.ts.bak
ADDED
package/ats/types.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
WalletPaymentIntentPaymentMethod,
|
3
|
+
WalletStripePaymentMethod,
|
4
|
+
} from "../wallet/types"
|
2
5
|
import { ProductPriceCurrency } from "../product/enums"
|
3
6
|
|
4
7
|
export type ATSUserPaymentSetting = {
|
@@ -9,6 +12,9 @@ export type ATSUserPaymentSetting = {
|
|
9
12
|
gateway: {
|
10
13
|
provider: "stripe"
|
11
14
|
publishable_key: string
|
15
|
+
settings: {
|
16
|
+
payment_method_types: WalletStripePaymentMethod[]
|
17
|
+
}
|
12
18
|
}
|
13
19
|
payment_method_types: WalletPaymentIntentPaymentMethod[] | null
|
14
20
|
}
|
package/basket/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
3
|
+
export * from './service.types';
|
4
|
+
export * from './state.types';
|
5
|
+
export * from './types';
|
6
|
+
export * from './utils.types';
|
7
|
+
export * from './validations.types';
|
package/basket/service.types.ts
CHANGED
@@ -24,7 +24,7 @@ export type BasketServiceRemoveContractsWithConflictingGroupsHandler = (
|
|
24
24
|
export type BasketServiceKeepContractsWithConflictingGroupsHandler = () => void
|
25
25
|
export type BasketServiceSetProductsMetaHandler = (
|
26
26
|
meta: BasketProduct[],
|
27
|
-
) => Promise<
|
27
|
+
) => Promise<(Product | Contract)[]>
|
28
28
|
|
29
29
|
export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<
|
30
30
|
{
|
package/basket/utils.types.ts
CHANGED
@@ -4,6 +4,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
|
4
4
|
import {
|
5
5
|
Product,
|
6
6
|
ProductBoardType,
|
7
|
+
ProductDuration,
|
7
8
|
ProductPrice,
|
8
9
|
ProductPriceCurrency,
|
9
10
|
} from "../product"
|
@@ -26,10 +27,13 @@ export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
|
|
26
27
|
) => ProductBoardType | undefined
|
27
28
|
getBasketProductTimeToProcess: (
|
28
29
|
product: Product | Contract,
|
29
|
-
) =>
|
30
|
+
) => ProductDuration | undefined
|
31
|
+
getBasketProductTimeToSetup: (
|
32
|
+
product: Product | Contract,
|
33
|
+
) => ProductDuration | undefined
|
30
34
|
getBasketProductDuration: (
|
31
35
|
product: Product | Contract,
|
32
|
-
) =>
|
36
|
+
) => ProductDuration | undefined
|
33
37
|
getIsProductOrContractInBasket: (
|
34
38
|
contractOrProductId: string,
|
35
39
|
productsMeta: BasketProduct[],
|
package/campaign/api.types.ts
CHANGED
@@ -31,6 +31,7 @@ export type WindowHapiAPICampaignRequests = {
|
|
31
31
|
offset?: number,
|
32
32
|
limit?: number,
|
33
33
|
labels?: Record<string, string> | null,
|
34
|
+
queryParams?: Record<string, any>,
|
34
35
|
) => Promise<PaginatedAPIResponseV2<Campaign>>
|
35
36
|
getCampaign: (
|
36
37
|
campaignId: string,
|
@@ -46,7 +47,10 @@ export type WindowHapiAPICampaignRequests = {
|
|
46
47
|
) => Promise<ProductSupportingContractsComplete>
|
47
48
|
getEducationLevels: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
|
48
49
|
getSeniorities: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
|
49
|
-
orderCampaign: (
|
50
|
+
orderCampaign: (
|
51
|
+
postBody: CampaignOrderRequestBody,
|
52
|
+
queryParams?: Record<string, any>,
|
53
|
+
) => Promise<Campaign>
|
50
54
|
saveCampaign: (postBody: CampaignEditRequestBody) => Promise<Campaign>
|
51
55
|
validateCampaign: (postBody: CampaignOrderRequestBody) => Promise<Campaign>
|
52
56
|
validateCampaignPostingRequirements: (
|
package/campaign/enums.ts
CHANGED
package/campaign/index.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from
|
3
|
+
export * from './api.types';
|
4
|
+
export * from './enums';
|
5
|
+
export * from './qa.types';
|
6
|
+
export * from './service.types';
|
7
|
+
export * from './state.types';
|
8
|
+
export * from './types';
|
9
|
+
export * from './utils.types';
|
10
|
+
export * from './validations.types';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
// created from 'create-ts-index'
|
2
|
+
|
3
|
+
export * from "./api.types"
|
4
|
+
export * from "./enums"
|
5
|
+
export * from "./qa.types"
|
6
|
+
export * from "./service.types"
|
7
|
+
export * from "./state.types"
|
8
|
+
export * from "./types"
|
9
|
+
export * from "./utils.types"
|
10
|
+
export * from "./validations.types"
|
@@ -11,15 +11,23 @@ import {
|
|
11
11
|
CampaignOrderRequestBody,
|
12
12
|
CampaignSetProductStatusRequestBody,
|
13
13
|
TaxonomyEducationAndSeniorityLevel,
|
14
|
+
TaxonomyEmploymentTypes,
|
14
15
|
} from "./types"
|
15
16
|
import { PaginatedAPIResponseV2 } from "../common/types"
|
16
17
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
17
18
|
import { AlertKey } from "../alert"
|
19
|
+
import { EmploymentType } from "./enums"
|
18
20
|
|
19
21
|
export type CampaignServiceGetCampaignsHandler = (
|
20
22
|
offset?: number,
|
21
23
|
limit?: number,
|
22
24
|
labels?: Record<string, string> | null,
|
25
|
+
queryParams?: Record<string, any>,
|
26
|
+
) => Promise<PaginatedAPIResponseV2<Campaign>>
|
27
|
+
export type CampaignServiceGetCampaignsLabeledHandler = (
|
28
|
+
offset?: number,
|
29
|
+
limit?: number,
|
30
|
+
labels?: Record<string, string> | null,
|
23
31
|
) => Promise<PaginatedAPIResponseV2<Campaign>>
|
24
32
|
export type CampaignServiceGetCampaignDetailHandler = (
|
25
33
|
campaignId: string,
|
@@ -65,9 +73,13 @@ export type CampaignServiceSetProductStatusHandler = (
|
|
65
73
|
campaignId: string,
|
66
74
|
requestBody: CampaignSetProductStatusRequestBody,
|
67
75
|
) => Promise<CampaignIdResponse>
|
76
|
+
export type CampaignServiceGetEmploymentTypesHandler = () => Promise<
|
77
|
+
TaxonomyEmploymentTypes[]
|
78
|
+
>
|
68
79
|
export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
69
80
|
{
|
70
81
|
getCampaigns: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsHandler>
|
82
|
+
getCampaignsLabeled: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsLabeledHandler>
|
71
83
|
getCampaignDetail: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignDetailHandler>
|
72
84
|
getCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignHandler>
|
73
85
|
setCampaignCancellation: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSetCampaignCancellationHandler>
|
@@ -83,9 +95,11 @@ export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
|
83
95
|
validateContractPostingRequirementsWithCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateContractPostingRequirementsWithCampaignHandler>
|
84
96
|
saveCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSaveCampaignHandler>
|
85
97
|
validateCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateCampaignHandler>
|
98
|
+
validateCampaignThroughOrder: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateCampaignHandler>
|
86
99
|
getCopyCampaignRequestBody: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCopyCampaignRequestBodyHandler>
|
87
100
|
getEditCampaignRequestBody: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEditCampaignRequestBodyHandler>
|
88
101
|
setProductStatus: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSetProductStatusHandler>
|
102
|
+
getEmploymentTypes: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEmploymentTypesHandler>
|
89
103
|
},
|
90
104
|
{ readonly service: WindowHapiService }
|
91
105
|
>
|
package/campaign/types.ts
CHANGED
@@ -136,29 +136,39 @@ export type CampaignDraft = {
|
|
136
136
|
paymentStatus: "processing_payment"
|
137
137
|
}
|
138
138
|
|
139
|
-
export type
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
customerId: string
|
147
|
-
orderReference: string | null
|
148
|
-
orderedProducts: string[]
|
149
|
-
orderedProductsSpecs: CampaignProductSpecs[]
|
150
|
-
postingDetails: CampaignPostingDetails
|
151
|
-
paymentMethod: OrderJourneyPaymentMethod
|
152
|
-
postings: CampaignPosting[]
|
153
|
-
recruiterInfo: CampaignRecruiterInfo
|
154
|
-
status: CampaignStatus
|
155
|
-
targetGroup: CampaignTargetGroup
|
156
|
-
totalPrice: CampaignTotalPrice
|
157
|
-
walletId: string
|
158
|
-
detailedStatus?: CampaignDetailedStatus //this is only added virtually on FE on demand
|
159
|
-
isEditable: boolean
|
139
|
+
export type CampaignDraftStatus = "new" | "invoiced" | "completed"
|
140
|
+
|
141
|
+
export type CampaignDraftV2 = {
|
142
|
+
campaignId: string
|
143
|
+
draft?: {
|
144
|
+
status: CampaignDraftStatus
|
145
|
+
}
|
160
146
|
}
|
161
147
|
|
148
|
+
export type Campaign = Pick<CampaignDraft, "campaignId"> &
|
149
|
+
CampaignDraftV2 & {
|
150
|
+
labels: Record<string, string> | null
|
151
|
+
currency: ProductPriceCurrency
|
152
|
+
campaignName: string | null
|
153
|
+
companyId: string
|
154
|
+
createdOn: string
|
155
|
+
poNumber: string | null
|
156
|
+
customerId: string
|
157
|
+
orderReference: string | null
|
158
|
+
orderedProducts: string[]
|
159
|
+
orderedProductsSpecs: CampaignProductSpecs[]
|
160
|
+
postingDetails: CampaignPostingDetails
|
161
|
+
paymentMethod: OrderJourneyPaymentMethod
|
162
|
+
postings: CampaignPosting[]
|
163
|
+
recruiterInfo: CampaignRecruiterInfo
|
164
|
+
status: CampaignStatus
|
165
|
+
targetGroup: CampaignTargetGroup
|
166
|
+
totalPrice: CampaignTotalPrice
|
167
|
+
walletId: string
|
168
|
+
detailedStatus?: CampaignDetailedStatus //this is only added virtually on FE on demand
|
169
|
+
isEditable: boolean
|
170
|
+
}
|
171
|
+
|
162
172
|
export type CampaignCreateFormTargetGroupEducationLevel =
|
163
173
|
TaxonomyEducationAndSeniorityLevel
|
164
174
|
|
package/campaign/utils.types.ts
CHANGED
@@ -13,6 +13,7 @@ import {
|
|
13
13
|
} from "zod"
|
14
14
|
import { ZodProductDuration } from "../product/validations.types"
|
15
15
|
import { OrderJourneyPaymentMethod } from "../orderJourney"
|
16
|
+
import { CampaignDraftStatus } from "./types"
|
16
17
|
|
17
18
|
export type ZodCampaignTotalPrice = ZodObject<{
|
18
19
|
amount: ZodNumber
|
@@ -156,7 +157,17 @@ export type ZodCampaignDraft = ZodObject<{
|
|
156
157
|
paymentStatus: ZodString
|
157
158
|
}>
|
158
159
|
|
159
|
-
export type
|
160
|
+
export type ZodCampaignDraftStatus = ZodObject<{
|
161
|
+
status: ZodString
|
162
|
+
}>
|
163
|
+
|
164
|
+
export type ZodCampaignDraftV2 = ZodObject<{
|
165
|
+
draft: ZodOptional<ZodCampaignDraftStatus>
|
166
|
+
}>
|
167
|
+
|
168
|
+
export type ZodCampaigns = ZodArray<
|
169
|
+
ZodUnion<[ZodCampaign, ZodCampaignDraft, ZodCampaignDraftV2]>
|
170
|
+
>
|
160
171
|
export type ZodCampaignCreateFormPostingDetails = ZodObject<{
|
161
172
|
title: ZodString
|
162
173
|
description: ZodString
|
@@ -183,6 +194,7 @@ export type ZodCampaignCreateFormTargetGroup = ZodObject<{
|
|
183
194
|
>
|
184
195
|
}>
|
185
196
|
export type ZodCampaignCreateForm = ZodObject<{
|
197
|
+
labels: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodString>>>
|
186
198
|
companyId: ZodString
|
187
199
|
campaignName: ZodOptional<ZodNullable<ZodString>>
|
188
200
|
poNumber: ZodOptional<ZodNullable<ZodString>>
|
@@ -197,7 +209,9 @@ export type ZodCampaignCreateForm = ZodObject<{
|
|
197
209
|
}>
|
198
210
|
export type WindowHapiValidationsCampaign = {
|
199
211
|
status: string[]
|
212
|
+
draftStatus: CampaignDraftStatus[]
|
200
213
|
statusRegex: RegExp
|
214
|
+
draftStatusRegex: RegExp
|
201
215
|
supportedEmploymentType: string[]
|
202
216
|
employmentTypeRegex: RegExp
|
203
217
|
employmentType: ZodCampaignEmploymentType
|
package/common/enums.ts
CHANGED
@@ -33,10 +33,6 @@ 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",
|
40
36
|
}
|
41
37
|
|
42
38
|
export enum WindowHapiSDKModuleName {
|
package/common/index.ts
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
3
|
+
export * from './events';
|
4
|
+
export * from './logger';
|
5
|
+
export * from './validator';
|
6
|
+
export * from './enums';
|
7
|
+
export * from './qa.types';
|
8
|
+
export * from './types';
|
9
|
+
export * from './validations.types';
|