@vonq/hapi-elements-types 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ats/api.types.ts
CHANGED
@@ -12,12 +12,14 @@ export type WindowHapiAPIATSConfigs = {
|
|
12
12
|
getUserSettings: AxiosRequestConfig<any>
|
13
13
|
refreshJWTToken: AxiosRequestConfig<any>
|
14
14
|
validateJWTToken: AxiosRequestConfig<any>
|
15
|
+
getUserData: AxiosRequestConfig<any>
|
15
16
|
}
|
16
17
|
|
17
18
|
export type WindowHapiAPIATSRequests = {
|
18
19
|
getUserSettings: () => Promise<ATSSettings>
|
19
20
|
refreshJWTToken: () => Promise<ATSUserTokenResponse>
|
20
21
|
validateJWTToken: () => Promise<boolean>
|
22
|
+
getUserData: () => Promise<any>
|
21
23
|
getMessages: () => Promise<ATSMessage[]>
|
22
24
|
sendMessage: (ticket: ATSMessage) => Promise<ATSMessage[]>
|
23
25
|
}
|
package/basket/service.types.ts
CHANGED
@@ -13,6 +13,7 @@ export type BasketServiceGetProductsHandler = (
|
|
13
13
|
export type BasketServiceAddProductOrContractByIdHandler = (
|
14
14
|
contractOrProductId: string,
|
15
15
|
isProduct: boolean,
|
16
|
+
showAlert?: boolean,
|
16
17
|
) => void
|
17
18
|
export type BasketServiceRemoveProductOrContractByIdHandler = (
|
18
19
|
contractOrProductId: string,
|
package/campaign/types.ts
CHANGED
@@ -97,7 +97,7 @@ export type CampaignTotalPrice = {
|
|
97
97
|
currency: ProductPriceCurrency
|
98
98
|
}
|
99
99
|
|
100
|
-
export type CampaignStatus = "in progress" | "offline"
|
100
|
+
export type CampaignStatus = "in progress" | "offline" | "online"
|
101
101
|
|
102
102
|
export type CampaignDetailsStatusOrderedProductStatus = {
|
103
103
|
productId: string
|
@@ -180,6 +180,7 @@ export type CampaignCreateForm = {
|
|
180
180
|
currency: ProductPriceCurrency
|
181
181
|
campaignName?: string | null
|
182
182
|
poNumber: string | null
|
183
|
+
orderReference?: string
|
183
184
|
paymentMethod: OrderJourneyPaymentMethod | null
|
184
185
|
targetGroup: CampaignCreateFormTargetGroup
|
185
186
|
recruiterInfo: CampaignRecruiterInfo
|
@@ -200,6 +201,7 @@ export type CampaignOrderRequestBody = {
|
|
200
201
|
campaignName: string | null | undefined
|
201
202
|
walletId?: string
|
202
203
|
poNumber?: string | null
|
204
|
+
orderReference?: string
|
203
205
|
recruiterInfo: Omit<CampaignRecruiterInfo, "id">
|
204
206
|
paymentMethod: OrderJourneyPaymentMethod | null
|
205
207
|
postingDetails: CampaignPostingDetails
|
package/common/logger/types.ts
CHANGED
@@ -3,6 +3,11 @@ import {
|
|
3
3
|
WindowHapiService,
|
4
4
|
} from "../_window/service.types"
|
5
5
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
6
|
+
import { NestedValidatorKeys, UseValidatorResult } from "../common"
|
7
|
+
import { OrderJourneyStep, OrderJourneyUTMStepValidations } from "./types"
|
8
|
+
import { MessageDescriptor } from "react-intl"
|
9
|
+
import orderJourneyStep from "../../src/components/business/OrderJourneyStep"
|
10
|
+
import { OrderJourneyStepKey } from "./enums"
|
6
11
|
|
7
12
|
export type OrderJourneyServiceSwitchToNextStepHandler = () => Promise<void>
|
8
13
|
export type OrderJourneyServiceSwitchToPreviousStepHandler = () => Promise<void>
|
@@ -11,6 +16,56 @@ export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
|
|
11
16
|
{
|
12
17
|
switchToNextStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToNextStepHandler>
|
13
18
|
switchToPreviousStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToPreviousStepHandler>
|
19
|
+
getValidators: () => Record<string, NestedValidatorKeys>
|
20
|
+
getErrorMessages: () => Record<string, Record<string, any> | undefined>
|
21
|
+
getBlurredFields: () => Record<string, Record<string, any> | undefined>
|
22
|
+
getStepValidators: (
|
23
|
+
stepKey: string | undefined,
|
24
|
+
) => NestedValidatorKeys | undefined
|
25
|
+
setOnboardingStep: (step: OrderJourneyStep) => UseValidatorResult
|
26
|
+
setSelectProductsStep: (step: OrderJourneyStep) => UseValidatorResult
|
27
|
+
setAddContractsStep: (step: OrderJourneyStep) => UseValidatorResult
|
28
|
+
setSelectContractsStep: (step: OrderJourneyStep) => UseValidatorResult
|
29
|
+
setBasketSummaryStep: (step: OrderJourneyStep) => UseValidatorResult
|
30
|
+
setTargetGroupStep: (step: OrderJourneyStep) => UseValidatorResult
|
31
|
+
setRecruiterInfoStep: (step: OrderJourneyStep) => UseValidatorResult
|
32
|
+
setPostingDetailsStep: (step: OrderJourneyStep) => UseValidatorResult
|
33
|
+
setOrganizationStep: (step: OrderJourneyStep) => UseValidatorResult
|
34
|
+
setContactInfoStep: (step: OrderJourneyStep) => UseValidatorResult
|
35
|
+
setWorkingLocationStep: (step: OrderJourneyStep) => UseValidatorResult
|
36
|
+
setURLsStep: (step: OrderJourneyStep) => UseValidatorResult
|
37
|
+
setUTMCodesStep: (
|
38
|
+
step: OrderJourneyStep,
|
39
|
+
) => OrderJourneyUTMStepValidations
|
40
|
+
setOrderReviewStep: (step: OrderJourneyStep) => UseValidatorResult
|
41
|
+
setPaymentMethodStep: (step: OrderJourneyStep) => UseValidatorResult
|
42
|
+
setOrderConfirmationStep: (step: OrderJourneyStep) => UseValidatorResult
|
43
|
+
setContractStepsBlurredFields: (
|
44
|
+
fields: Record<string, Record<string, boolean>>,
|
45
|
+
) => Record<string, UseValidatorResult> | null
|
46
|
+
setContractStepsErrorMessages: (
|
47
|
+
messages: Record<
|
48
|
+
string,
|
49
|
+
Record<string, MessageDescriptor | boolean>
|
50
|
+
>,
|
51
|
+
) => void
|
52
|
+
setContractStepsSubmittedSteps: (steps: Record<string, boolean>) => void
|
53
|
+
getSetters: (
|
54
|
+
steps: Record<string, boolean>,
|
55
|
+
) => Record<string, (step: OrderJourneyStep) => any>
|
56
|
+
getData: (
|
57
|
+
steps: Record<string, boolean>,
|
58
|
+
) => Record<string, Record<string, any>>
|
59
|
+
getSetBlurredFieldsAndSetSubmittedFunctions: (
|
60
|
+
stepKey: string | undefined,
|
61
|
+
) => {
|
62
|
+
setBlurredFieldsFunction: any
|
63
|
+
setSubmittedFunction: any
|
64
|
+
}
|
65
|
+
validateStep: (
|
66
|
+
stepKey: OrderJourneyStepKey | string,
|
67
|
+
isSubmitted?: boolean,
|
68
|
+
) => UseValidatorResult
|
14
69
|
},
|
15
70
|
{ readonly service: WindowHapiService }
|
16
71
|
>
|
@@ -3,13 +3,17 @@ import { WindowHapiUtils } from "../_window/utils.types"
|
|
3
3
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
import { Contract } from "../contract"
|
5
5
|
import { Product } from "../product"
|
6
|
-
import {
|
6
|
+
import {
|
7
|
+
orderJourneyGetContractIdFromContractStepKey,
|
8
|
+
orderJourneyGetContractStepKey,
|
9
|
+
} from "../../common/orderJourney/utils"
|
7
10
|
|
8
11
|
export type WindowHapiUtilsOrderJourney = WindowHapiModuleWithConstructorArgs<
|
9
12
|
{
|
10
13
|
stepKeys: typeof OrderJourneyStepKey
|
11
14
|
paymentMethodKeys: typeof OrderJourneyPaymentMethod
|
12
15
|
orderJourneyGetContractIdFromContractStepKey: (key: string) => string
|
16
|
+
orderJourneyGetContractStepKey: (contractId: string) => string
|
13
17
|
updateProductUTMsFromBasketItemData: (
|
14
18
|
basketItemData: (Contract | Product)[],
|
15
19
|
) => void
|
package/package.json
CHANGED