@vonq/hapi-elements-types 1.49.0 → 1.51.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.
Files changed (61) hide show
  1. package/_window/api.types.ts +32 -1
  2. package/_window/sdk.types.ts +8 -3
  3. package/_window/service.types.ts +1 -0
  4. package/_window/state.types.ts +4 -0
  5. package/_window/utils.types.ts +21 -1
  6. package/_window/validation.types.ts +2 -0
  7. package/_window/window.ts +5 -18
  8. package/alert/enums.ts +1 -0
  9. package/alert/index.ts +1 -0
  10. package/alert/index.ts.bak +1 -0
  11. package/alert/types.ts +7 -0
  12. package/ats/types.ts +1 -0
  13. package/basket/service.types.ts +5 -0
  14. package/basket/utils.types.ts +4 -0
  15. package/campaign/api.types.ts +13 -1
  16. package/campaign/service.types.ts +2 -2
  17. package/campaign/types.ts +53 -4
  18. package/campaign/utils.types.ts +0 -1
  19. package/common/events/EventCommand/enums.ts +1 -0
  20. package/common/logger/types.ts +2 -0
  21. package/common/types.ts +1 -1
  22. package/common/validations.types.ts +4 -0
  23. package/contract/index.ts +9 -8
  24. package/contract/index.ts.bak +2 -0
  25. package/contract/service.types.ts +8 -3
  26. package/contract/state.types.ts +1 -0
  27. package/contract/types.ts +2 -0
  28. package/contract/utils.types.ts +7 -0
  29. package/experimental/api.types.ts +2 -16
  30. package/experimental/index.ts +3 -3
  31. package/experimental/index.ts.bak +5 -0
  32. package/experimental/service.types.ts +1 -36
  33. package/experimental/state.types.ts +0 -15
  34. package/index.ts +17 -16
  35. package/index.ts.bak +1 -0
  36. package/modal/enums.ts +1 -0
  37. package/modal/service.types.ts +2 -4
  38. package/modal/types.ts +10 -8
  39. package/orderJourney/service.types.ts +37 -4
  40. package/orderJourney/state.types.ts +18 -0
  41. package/orderJourney/types.ts +5 -2
  42. package/orderJourney/utils.types.ts +12 -0
  43. package/package.json +1 -1
  44. package/product/api.types.ts +21 -0
  45. package/product/enums.ts +4 -0
  46. package/product/index.ts +1 -0
  47. package/product/index.ts.bak +1 -0
  48. package/product/service.types.ts +22 -0
  49. package/product/state.types.ts +11 -0
  50. package/product/types.ts +45 -0
  51. package/product/utils.types.ts +14 -2
  52. package/ui/enums.ts +9 -0
  53. package/ui/index.ts +4 -0
  54. package/ui/index.ts.bak +5 -1
  55. package/ui/service.types.ts +3 -0
  56. package/ui/state.types.ts +3 -0
  57. package/ui/types.ts +10 -0
  58. package/ui/utils.types.ts +10 -0
  59. package/ui/validations.types.ts +18 -0
  60. package/experimental/enums.ts +0 -5
  61. package/experimental/types.ts +0 -14
package/product/types.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ ProductCPAHiringGoalUnit,
2
3
  ProductFilterRecommendations,
3
4
  ProductPriceCurrency,
4
5
  ProductSortBy,
@@ -47,6 +48,10 @@ export type ProductSupportingContractsPartial = {
47
48
 
48
49
  export type ProductAudienceGroup = "niche" | "generic"
49
50
 
51
+ export type ProductCPA = {
52
+ hiring_goal: number
53
+ hiring_goal_unit: ProductCPAHiringGoalUnit
54
+ }
50
55
  export type Product = {
51
56
  allow_orders: boolean
52
57
  audience_group: ProductAudienceGroup
@@ -69,6 +74,7 @@ export type Product = {
69
74
  time_to_setup: ProductDuration
70
75
  is_recommended?: boolean
71
76
  has_product_specs: boolean
77
+ cpa: ProductCPA | null
72
78
  } & ProductLogos &
73
79
  ProductType
74
80
 
@@ -181,3 +187,42 @@ export type ProductProductsSupportingContractsMap = Map<
181
187
  StringifiedJSON<ProductProductsSupportingContractsPayload>,
182
188
  ProductProductsSupportingContractsMapState
183
189
  >
190
+
191
+ export type ProductSuggestionStatus =
192
+ | "queued"
193
+ | "started"
194
+ | "completed"
195
+ | "errored"
196
+
197
+ export type ProductSearchFiltersSuggestionCreateRequest = {
198
+ context: {
199
+ structured: Record<string, any>
200
+ unstructured: string
201
+ }
202
+ }
203
+
204
+ export type ProductSearchFiltersSuggestionCreateRequestResponse = {
205
+ smartfill_task_id: string
206
+ }
207
+
208
+ export type ProductSearchFiltersSuggestionsPrefillData = {
209
+ job_title: ProductJobTitle
210
+ job_function: ProductJobFunctionPartial
211
+ location: ProductLocation
212
+ industry: ProductIndustry
213
+ }
214
+
215
+ export type ProductSearchFiltersSuggestionsGetRequestResponse = {
216
+ id: string
217
+ status: ProductSuggestionStatus
218
+ created_at: string
219
+ updated_at: string
220
+ prefill_data: Partial<ProductSearchFiltersSuggestionsPrefillData>
221
+ }
222
+
223
+ export type ProductSearchFilterIDs = {
224
+ jobTitlesIdsSelected: number[]
225
+ jobFunctionsIdsSelected: number[]
226
+ jobIndustriesIdsSelected: number[]
227
+ jobRegionsIdsSelected: number[]
228
+ }
@@ -1,5 +1,14 @@
1
- import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
2
- import { PaginationResponseV1 } from "../common/types"
1
+ import {
2
+ ProductFilterQueryParams,
3
+ ProductIndustry,
4
+ ProductJobFunctionPartial,
5
+ ProductJobTitle,
6
+ ProductLocationPartial,
7
+ ProductSearchFilterIDs,
8
+ ProductSearchFiltersSuggestionsPrefillData,
9
+ ProductUserProvidedFilters,
10
+ } from "./types"
11
+ import { PaginationResponseV1, RecursivePartial } from "../common/types"
3
12
  import { WindowHapiUtils } from "../_window/utils.types"
4
13
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
5
14
  import {
@@ -21,6 +30,9 @@ export type WindowHapiUtilsProduct = WindowHapiModuleWithConstructorArgs<
21
30
  getNextPageOffsetAndLimit: (
22
31
  meta: PaginationResponseV1,
23
32
  ) => PaginationResponseV1
33
+ getUpdatedSearchFiltersWithSmartFillData: (
34
+ prefillData: Partial<ProductSearchFiltersSuggestionsPrefillData>,
35
+ ) => ProductSearchFilterIDs
24
36
  },
25
37
  { readonly utils: WindowHapiUtils }
26
38
  >
package/ui/enums.ts ADDED
@@ -0,0 +1,9 @@
1
+ export enum HapiUIIconType {
2
+ "solid" = "solid",
3
+ "regular" = "regular",
4
+ "light" = "light",
5
+ "thin" = "thin",
6
+ "duotone" = "duotone",
7
+ "vonq" = "vonq",
8
+ "lottie" = "lottie",
9
+ }
package/ui/index.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
+ export * from './enums';
3
4
  export * from './service.types';
5
+ export * from './types';
6
+ export * from './utils.types';
7
+ export * from './validations.types';
package/ui/index.ts.bak CHANGED
@@ -1,3 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from './service.types';
3
+ export * from "./enums"
4
+ export * from "./service.types"
5
+ export * from "./utils.types"
6
+ export * from "./validations.types"
7
+ export { HapiUIIconConfig } from "./types"
@@ -1,6 +1,8 @@
1
1
  import { WindowHapiService } from "../_window/service.types"
2
2
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
3
3
 
4
+ import { HapiUIIconConfig } from "./types"
5
+
4
6
  export type WindowHapiServiceUI = WindowHapiModuleWithConstructorArgs<
5
7
  {
6
8
  onIframeLoaded: (callback: (iframeName: string) => void) => void
@@ -23,6 +25,7 @@ export type WindowHapiServiceUI = WindowHapiModuleWithConstructorArgs<
23
25
  ) => Promise<void>
24
26
  hideElement: (elementSelector: string) => Promise<void>
25
27
  showElement: (elementSelector: string) => Promise<void>
28
+ changeIcons: (configs: HapiUIIconConfig[]) => Promise<void>
26
29
  },
27
30
  { readonly service: WindowHapiService }
28
31
  >
@@ -0,0 +1,3 @@
1
+ export type UIState = {
2
+ descriptionsAreShownBelowFormFields: boolean
3
+ }
package/ui/types.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { HapiUIIconType } from "./enums"
2
+
3
+ export type HapiUIIconConfig = {
4
+ fromType: HapiUIIconType
5
+ fromName: string
6
+ toType: HapiUIIconType
7
+ toName: string
8
+ // lottieFilePath can only be used when the 'toType' is of type 'lottie'
9
+ lottieFilePath?: string
10
+ }
@@ -0,0 +1,10 @@
1
+ import { WindowHapiUtils } from "../_window/utils.types"
2
+ import { WindowHapiModuleWithConstructorArgs } from "../_window"
3
+ import { HapiUIIconType } from "./enums"
4
+
5
+ export type WindowHapiUtilsUI = WindowHapiModuleWithConstructorArgs<
6
+ {
7
+ iconType: typeof HapiUIIconType
8
+ },
9
+ { readonly utils: WindowHapiUtils }
10
+ >
@@ -0,0 +1,18 @@
1
+ import { HapiUIIconType } from "./enums"
2
+ import { ZodArray, ZodObject, ZodOptional, ZodString } from "zod"
3
+
4
+ export type ZodIconConfig = ZodObject<{
5
+ fromType: ZodString
6
+ fromName: ZodString
7
+ toType: ZodString
8
+ toName: ZodString
9
+ lottieFilePath: ZodOptional<ZodString>
10
+ }>
11
+
12
+ export type WindowHapiValidationsUI = {
13
+ iconTypes: HapiUIIconType[]
14
+ iconTypeRegex: RegExp
15
+ iconType: ZodString
16
+ iconConfig: ZodIconConfig
17
+ iconConfigs: ZodArray<ZodIconConfig>
18
+ }
@@ -1,5 +0,0 @@
1
- export enum ExperimentalModalKeys {}
2
-
3
- export enum ExperimentalFilePickerModalPropsActionFor {
4
- productPostingRequirements = "product-posting-requirements",
5
- }
@@ -1,14 +0,0 @@
1
- import { RecursivePartial } from "../common"
2
- import { Campaign } from "../campaign"
3
- import { OrderJourneyStep } from "../orderJourney"
4
-
5
- export type ExperimentalSuggestionVacancyFieldsCreateRequestPayload = {
6
- description: string
7
- }
8
-
9
- export type ExperimentalSuggestionVacancyFieldsGetResponseData =
10
- RecursivePartial<Campaign>
11
- export type OrderJourneyProductStep = Omit<
12
- OrderJourneyStep,
13
- "blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
14
- >