@vonq/hapi-elements-types 1.18.0 → 1.20.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/events.types.ts +15 -2
- package/_window/qa.types.ts +3 -1
- package/_window/routing.types.ts +1 -0
- package/_window/sdk.types.ts +3 -1
- package/_window/service.types.ts +5 -0
- package/_window/state.types.ts +4 -1
- package/_window/utils.types.ts +13 -0
- package/alert/enums.ts +2 -0
- package/ats/state.types.ts +1 -0
- package/basket/state.types.ts +3 -1
- package/basket/utils.types.ts +3 -0
- package/basket/validations.types.ts +7 -0
- package/campaign/api.types.ts +22 -1
- package/campaign/service.types.ts +44 -3
- package/campaign/state.types.ts +2 -1
- package/campaign/types.ts +89 -20
- package/campaign/utils.types.ts +21 -0
- package/campaign/validations.types.ts +8 -1
- package/common/events/EventCommand/enums.ts +1 -0
- package/common/events/types.ts +1 -0
- package/common/types.ts +122 -0
- package/contract/service.types.ts +5 -7
- package/contract/types.ts +2 -83
- package/contract/validations.types.ts +7 -1
- package/debugging/index.ts +1 -0
- package/debugging/service.types.ts +16 -0
- package/debugging/state.types.ts +4 -0
- package/debugging/types.ts +17 -0
- package/modal/enums.ts +2 -0
- package/modal/types.ts +28 -4
- package/orderJourney/enums.ts +1 -0
- package/orderJourney/service.types.ts +27 -1
- package/orderJourney/state.types.ts +17 -3
- package/orderJourney/types.ts +42 -0
- package/orderJourney/validations.types.ts +7 -0
- package/package.json +1 -1
- package/product/api.types.ts +15 -1
- package/product/enums.ts +9 -0
- package/product/service.types.ts +25 -2
- package/product/state.types.ts +4 -1
- package/product/types.ts +22 -16
- package/product/utils.types.ts +2 -1
- package/product/validations.types.ts +3 -2
- package/routing/utils.types.ts +14 -0
- package/theming/types.ts +1 -0
- package/wallet/service.types.ts +1 -0
- package/wallet/types.ts +1 -0
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,10 +57,25 @@ export type ProductServiceGetIndustriesHandler = () => Promise<
|
|
51
57
|
ProductIndustry[]
|
52
58
|
>
|
53
59
|
|
54
|
-
export type ProductServiceSetArbitraryJobTitle = (
|
60
|
+
export type ProductServiceSetArbitraryJobTitle = (
|
61
|
+
text: string,
|
62
|
+
shouldResetJobTitlesIds?: boolean,
|
63
|
+
shouldResetJobFunctionsIds?: boolean,
|
64
|
+
) => void
|
65
|
+
|
66
|
+
export type ProductServiceGetProductPostingRequirementOptionsHandler = (
|
67
|
+
productId: string,
|
68
|
+
fieldName: string,
|
69
|
+
autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
|
70
|
+
) => Promise<any>
|
71
|
+
|
72
|
+
export type ProductServiceGetProductPostingRequirementsHandler = (
|
73
|
+
productId: string | number,
|
74
|
+
) => Promise<PostingRequirement[]>
|
55
75
|
|
56
76
|
export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
|
57
77
|
{
|
78
|
+
loadMoreProducts: HapiServiceFunctionWithLifecycleHooks<ProductServiceLoadMoreProductsHandler>
|
58
79
|
setArbitraryJobTitle: ProductServiceSetArbitraryJobTitle
|
59
80
|
getProductWithContractsSupportById: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductWithContractsSupportByIdHandler>
|
60
81
|
getProductsWithContractsSupport: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductsWithContractsSupportHandler>
|
@@ -66,6 +87,8 @@ export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
|
|
66
87
|
getJobTitles: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobTitlesHandler>
|
67
88
|
getJobFunctions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobFunctionsHandler>
|
68
89
|
getIndustries: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetIndustriesHandler>
|
90
|
+
getProductPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementOptionsHandler>
|
91
|
+
getProductPostingRequirements: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementsHandler>
|
69
92
|
},
|
70
93
|
{ readonly service: WindowHapiService }
|
71
94
|
>
|
package/product/state.types.ts
CHANGED
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
ProductSupportingContractsPartial,
|
8
8
|
} from "./types"
|
9
9
|
import { PaginationResponseV1 } from "../common/types"
|
10
|
-
import { ProductPriceCurrency } from "./enums"
|
10
|
+
import { ProductPriceCurrency, ProductSortBy } from "./enums"
|
11
11
|
|
12
12
|
export type ProductState = {
|
13
13
|
/* Products */
|
@@ -20,8 +20,11 @@ export type ProductState = {
|
|
20
20
|
productsAreLoading: boolean
|
21
21
|
productNameInput: string
|
22
22
|
jobRegionsIdsSelected: number[]
|
23
|
+
filtersAccordionIsOpen: boolean
|
23
24
|
/* Product Price Display Currency */
|
24
25
|
displayCurrency: ProductPriceCurrency
|
26
|
+
/* Sort By */
|
27
|
+
searchSortBy: ProductSortBy
|
25
28
|
/* Locations */
|
26
29
|
jobRegions: ProductLocation[]
|
27
30
|
/* Job Titles */
|
package/product/types.ts
CHANGED
@@ -1,9 +1,14 @@
|
|
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 {
|
8
|
+
Facet,
|
9
|
+
PostingRequirement,
|
10
|
+
PostingRequirementLabelsMap,
|
11
|
+
} from "../common"
|
7
12
|
|
8
13
|
export type ProductRange = "hours" | "days" | "weeks" | "months"
|
9
14
|
|
@@ -61,6 +66,8 @@ export type Product = {
|
|
61
66
|
vonq_price: ProductPrice[]
|
62
67
|
time_to_process: ProductDuration
|
63
68
|
time_to_setup: ProductDuration
|
69
|
+
is_recommended?: boolean
|
70
|
+
has_product_specs: boolean
|
64
71
|
} & ProductLogos &
|
65
72
|
ProductType
|
66
73
|
|
@@ -127,6 +134,7 @@ export type ProductFilterQueryParams = {
|
|
127
134
|
filterProductRecommendations: ProductFilterRecommendations
|
128
135
|
filterMyContractSupportedOnly: boolean
|
129
136
|
searchTextInput: string
|
137
|
+
searchSortBy: ProductSortBy
|
130
138
|
}
|
131
139
|
|
132
140
|
export type ProductSearchFilters = {
|
@@ -142,15 +150,7 @@ export type ProductSearchFilters = {
|
|
142
150
|
mcEnabled?: boolean
|
143
151
|
name?: string
|
144
152
|
recommended?: boolean
|
145
|
-
sortBy?:
|
146
|
-
| "relevant"
|
147
|
-
| "recent"
|
148
|
-
| "order_frequency.desc"
|
149
|
-
| "order_frequency.asc"
|
150
|
-
| "created.desc"
|
151
|
-
| "created.asc"
|
152
|
-
| "list_price.desc"
|
153
|
-
| "list_price.asc"
|
153
|
+
sortBy?: ProductSortBy
|
154
154
|
}
|
155
155
|
|
156
156
|
export type ProductWithSupportForContractsFilters = {
|
@@ -159,10 +159,11 @@ export type ProductWithSupportForContractsFilters = {
|
|
159
159
|
export type ProductSupportingContractsComplete = ProductLogos &
|
160
160
|
ProductSupportingContractsPartial & {
|
161
161
|
contract_credentials: ContractCredential[]
|
162
|
-
contract_facets?:
|
162
|
+
contract_facets?: Facet[]
|
163
163
|
feed_url: string | null
|
164
164
|
manual_setup_required: boolean
|
165
|
-
posting_requirements:
|
165
|
+
posting_requirements: PostingRequirement[]
|
166
|
+
posting_requirements_labels: PostingRequirementLabelsMap
|
166
167
|
setup_instructions: string //html;
|
167
168
|
}
|
168
169
|
|
@@ -170,3 +171,8 @@ export type ProductUserProvidedFilters = Omit<
|
|
170
171
|
ProductFilterQueryParams,
|
171
172
|
"filterProductRecommendations" | "filterMyContractSupportedOnly"
|
172
173
|
>
|
174
|
+
|
175
|
+
export type ProductPostingRequirementsAutocompleteRequestOption = {
|
176
|
+
key: string
|
177
|
+
value: string | string[]
|
178
|
+
}
|
package/product/utils.types.ts
CHANGED
@@ -2,11 +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 } from "./enums"
|
5
|
+
import { ProductPriceCurrency, ProductSortBy } from "./enums"
|
6
6
|
|
7
7
|
export type WindowHapiUtilsProduct = WindowHapiModuleWithConstructorArgs<
|
8
8
|
{
|
9
9
|
currencyKeys: typeof ProductPriceCurrency
|
10
|
+
sortByKeys: typeof ProductSortBy
|
10
11
|
getUserProvidedFilters: () => ProductUserProvidedFilters
|
11
12
|
getProductsQueryParams: (
|
12
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
|
+
>
|
package/theming/types.ts
CHANGED
package/wallet/service.types.ts
CHANGED
@@ -25,6 +25,7 @@ export type WindowHapiServiceWallet = WindowHapiModuleWithConstructorArgs<
|
|
25
25
|
) => Promise<void>
|
26
26
|
resetTopUpState: () => void
|
27
27
|
resetDirectChargeState: () => void
|
28
|
+
resetPurchaseOrderState: () => void
|
28
29
|
resetCheckoutFormState: () => void
|
29
30
|
},
|
30
31
|
{ readonly service: WindowHapiService }
|