@vonq/hapi-elements-types 1.29.0 → 1.30.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.
@@ -17,6 +17,7 @@ export type WindowHapiRouting = WindowHapiModuleWithConstructorArgs<
17
17
  changeHref: (href: string) => void
18
18
  setOrigin: (origin: string) => void
19
19
  setQueryParams: (params: WindowHapiRoutingQueryParams) => void
20
+ getRootHref: () => string
20
21
  onRouteChange: () => void
21
22
  onAfterSetQueryParams: () => void
22
23
  },
@@ -46,6 +46,11 @@ import { WindowHapiQA } from "./qa.types"
46
46
  import { WindowHapiServiceDebugging } from "../debugging/service.types"
47
47
  import { WindowHapiServiceLanguage } from "../language/service.types"
48
48
  import { WindowHapiUtilsLanguage } from "../language/utils.types"
49
+ import {
50
+ WindowHapiAPIExperimental,
51
+ WindowHapiServiceExperimental,
52
+ } from "../experimental"
53
+ import { ExperimentalState } from "../experimental/state.types"
49
54
 
50
55
  export type WindowHapiSDKModule<
51
56
  APIModule,
@@ -54,6 +59,7 @@ export type WindowHapiSDKModule<
54
59
  StateModule,
55
60
  UtilsModule = any,
56
61
  > = {
62
+ isHiddenOnDocumentation?: boolean
57
63
  api?: APIModule
58
64
  state?: StateModule
59
65
  service?: ServiceModule
@@ -139,6 +145,12 @@ export type WindowHapiSDKATS = WindowHapiSDKModule<
139
145
  undefined,
140
146
  WindowHapiStateModule<ATSState>
141
147
  >
148
+ export type WindowHapiSDKExperimental = WindowHapiSDKModule<
149
+ WindowHapiAPIExperimental,
150
+ WindowHapiServiceExperimental,
151
+ undefined,
152
+ WindowHapiStateModule<ExperimentalState>
153
+ >
142
154
 
143
155
  export type WindowHapiSDK = WindowHapiModuleWithConstructorArgs<
144
156
  {
@@ -154,6 +166,7 @@ export type WindowHapiSDK = WindowHapiModuleWithConstructorArgs<
154
166
  [WindowHapiModuleName.debugging]: WindowHapiSDKDebugging
155
167
  [WindowHapiModuleName.alert]: WindowHapiSDKAlert
156
168
  [WindowHapiModuleName.ui]: WindowHapiSDKUI
169
+ [WindowHapiModuleName.experimental]: WindowHapiSDKExperimental
157
170
  },
158
171
  { readonly core: WindowHapiClassInterface }
159
172
  >
@@ -26,6 +26,7 @@ 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 { ExperimentalState } from "../experimental/state.types"
29
30
 
30
31
  export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
31
32
  {
@@ -41,11 +42,13 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
41
42
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
42
43
  [WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
43
44
  [WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
45
+ [WindowHapiModuleName.experimental]: WindowHapiStateModule<ExperimentalState>
44
46
  basePropertiesThatShouldNotBeDocumented: string[]
45
47
  handleDefaultStateFromQueryParams: (params: string | string[]) => void
46
48
  rehydrateInitialState: (
47
49
  initialState: Record<string, any>,
48
50
  getStateModuleName?: (storeName: string) => string,
51
+ throwError?: boolean,
49
52
  ) => void
50
53
  onBeforeStateChange: () => void
51
54
  onAfterStateChange: () => void
@@ -62,7 +65,11 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
62
65
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
63
66
  [WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
64
67
  [WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
68
+ [WindowHapiModuleName.experimental]: WindowHapiStateModule<ExperimentalState>
65
69
  }
70
+ saveStateSnapshot: () => string
71
+ restoreStateSnapshot: (snapshotId: string) => void
72
+ cleanStateSnapshot: (snapshotId: string) => void
66
73
  toJSON: Record<string, any>
67
74
  },
68
75
  { readonly core: WindowHapiClassInterface }
@@ -81,6 +88,7 @@ export type WindowHapiStatesJSON = {
81
88
  [WindowHapiModuleName.wallet]: WalletState
82
89
  [WindowHapiModuleName.modal]: ModalState
83
90
  [WindowHapiModuleName.ats]: ATSState
91
+ [WindowHapiModuleName.experimental]: ExperimentalState
84
92
  }
85
93
 
86
94
  export type WindowHapiStateBase<T> = {
@@ -17,6 +17,9 @@ export type WindowHapiUI = WindowHapiModuleWithConstructorArgs<
17
17
  ) => void
18
18
  toggleModal: () => void
19
19
  toggleAlertbar: () => void
20
+ addModalElementToBody: (element: HTMLDivElement) => void
21
+ removeModalElementFromBody: () => void
22
+ getModalElement: () => HTMLDivElement
20
23
  },
21
24
  { readonly core: WindowHapiClassInterface }
22
25
  >
package/campaign/types.ts CHANGED
@@ -227,6 +227,7 @@ export type CampaignCreateForm = {
227
227
  orderedProducts: string[] //Array of UUIDs
228
228
  orderedProductsSpecs: Record<string, CampaignCreateFormOrderedProductSpec>
229
229
  orderedProductsSpecsLabels?: Record<string, PostingRequirementLabelsMap>
230
+ heStateSnapshotId?: string
230
231
  }
231
232
 
232
233
  export type CampaignEditForm = Omit<
@@ -239,6 +240,7 @@ export type CampaignEditForm = Omit<
239
240
  | "postingDetails"
240
241
  | "orderedProductsSpecs"
241
242
  | "orderedProductsSpecsLabels"
243
+ | "heStateSnapshotId"
242
244
  > & {
243
245
  campaignId: string
244
246
  postingDetails: Omit<
@@ -1,6 +1,9 @@
1
1
  export enum WindowHapiEventCommandName {
2
2
  /* State */
3
3
  stateHydrate = "state:hydrate",
4
+ stateSnapshotSave = "state:snapshot-save",
5
+ stateSnapshotRestore = "state:snapshot-restore",
6
+ stateSnapshotClean = "state:snapshot-clean",
4
7
 
5
8
  /* Service */
6
9
  serviceLoad = "service:load",
@@ -24,6 +27,9 @@ export enum WindowHapiEventCommandName {
24
27
  /* API */
25
28
  apiRequest = "api:request",
26
29
 
30
+ /* Routing */
31
+ routingRequest = "routing:request",
32
+
27
33
  /* QA */
28
34
  qaRequest = "qa:request",
29
35
 
package/common/types.ts CHANGED
@@ -171,7 +171,7 @@ export type PostingRequirementDisplayRuleShowOperand =
171
171
 
172
172
  export type PostingRequirementDisplayRuleShow = {
173
173
  facet: string
174
- value: string | string[]
174
+ value: null | string | string[]
175
175
  op: PostingRequirementDisplayRuleShowOperand
176
176
  }
177
177
  export type PostingRequirementDisplayRule = {
@@ -270,14 +270,10 @@ export type FormFacetsFieldType =
270
270
  | "heading"
271
271
  | "file-upload"
272
272
  | "unknown"
273
- export type ContractPostingRequirementFieldAutocompleteRequestOption = {
274
- key: string
275
- value: string | string[]
276
- }
277
- export type ProductPostingRequirementFieldAutocompleteRequestOption = {
278
- key: string
279
- value: string | string[]
280
- }
273
+
274
+ // keep this for backwards compatability
275
+ export type ContractPostingRequirementFieldAutocompleteRequestOption =
276
+ PostingRequirementsAutocompleteRequestOption
281
277
 
282
278
  export type HapiFeatureBranch = {
283
279
  name: string
@@ -1,12 +1,68 @@
1
1
  import { RawAxiosRequestConfig } from "axios"
2
2
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
3
3
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
4
+ import { AxiosRequestConfig } from "axios/index"
5
+ import { PostingRequirement } from "../common"
6
+ import {
7
+ ExperimentalSuggestionCreateRequestData,
8
+ ExperimentalSuggestionGetResponseData,
9
+ ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
10
+ ExperimentalSuggestionPostingRequirementsGetResponseData,
11
+ ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
12
+ ExperimentalSuggestionVacancyFieldsGetResponseData,
13
+ } from "./types"
4
14
 
5
15
  export type WindowHapiAPIExperimentalConfigs = {
6
16
  getExperimental: RawAxiosRequestConfig
17
+ getPostingRequirementOptions: AxiosRequestConfig
18
+ getPostingRequirements: AxiosRequestConfig
19
+ getSuggestionOfPostingRequirements: AxiosRequestConfig
20
+ getSuggestionOfVacancyFields: AxiosRequestConfig
21
+ createSuggestionOfPostingRequirements: AxiosRequestConfig
22
+ createSuggestionOfVacancyFields: AxiosRequestConfig
7
23
  }
8
24
  export type WindowHapiAPIExperimentalRequests = {
9
25
  getExperimental: () => Promise<any>
26
+ getPostingRequirementOptions: (
27
+ productId: string,
28
+ fieldName: string,
29
+ autocompleteRequestOptions: Record<string, string | string[]>,
30
+ ) => Promise<any>
31
+ getPostingRequirements: (
32
+ productId: string | number,
33
+ ) => Promise<PostingRequirement[]>
34
+ createSuggestionOfPostingRequirements: (
35
+ payload: ExperimentalSuggestionCreateRequestData<ExperimentalSuggestionPostingRequirementsCreateRequestPayload>,
36
+ ) => Promise<
37
+ ExperimentalSuggestionGetResponseData<
38
+ ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
39
+ ExperimentalSuggestionPostingRequirementsGetResponseData
40
+ >
41
+ >
42
+ createSuggestionOfVacancyFields: (
43
+ payload: ExperimentalSuggestionCreateRequestData<ExperimentalSuggestionVacancyFieldsCreateRequestPayload>,
44
+ ) => Promise<
45
+ ExperimentalSuggestionGetResponseData<
46
+ ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
47
+ ExperimentalSuggestionVacancyFieldsGetResponseData
48
+ >
49
+ >
50
+ getSuggestionOfPostingRequirements: (
51
+ suggestionId: string,
52
+ ) => Promise<
53
+ ExperimentalSuggestionGetResponseData<
54
+ ExperimentalSuggestionPostingRequirementsCreateRequestPayload,
55
+ ExperimentalSuggestionPostingRequirementsGetResponseData
56
+ >
57
+ >
58
+ getSuggestionOfVacancyFields: (
59
+ suggestionId: string,
60
+ ) => Promise<
61
+ ExperimentalSuggestionGetResponseData<
62
+ ExperimentalSuggestionVacancyFieldsCreateRequestPayload,
63
+ ExperimentalSuggestionVacancyFieldsGetResponseData
64
+ >
65
+ >
10
66
  }
11
67
  export type WindowHapiAPIExperimental = WindowHapiModuleWithConstructorArgs<
12
68
  WindowHapiAPIModule<
@@ -0,0 +1,8 @@
1
+ export enum ExperimentalModalKeys {
2
+ contractPostingRequirementsSmartFillSuccess = "__experimental-contract-posting-requirements-smart-fill-success",
3
+ campaignVacancyFieldsSmartFillSuccess = "__experimental-campaign-vacancy-fields-smart-fill-success",
4
+ }
5
+
6
+ export enum ExperimentalFilePickerModalPropsActionFor {
7
+ productPostingRequirements = "product-posting-requirements",
8
+ }
@@ -2,3 +2,4 @@
2
2
 
3
3
  export * from "./api.types"
4
4
  export * from "./service.types"
5
+ export * from "./types"
@@ -3,12 +3,45 @@ import {
3
3
  WindowHapiService,
4
4
  } from "../_window/service.types"
5
5
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
6
+ import {
7
+ NestedValidatorKeys,
8
+ PostingRequirement,
9
+ PostingRequirementsAutocompleteRequestOption,
10
+ UseValidatorResult,
11
+ } from "../common"
12
+ import { MessageDescriptor } from "react-intl"
13
+
14
+ export type ExperimentalServiceGetProductPostingRequirementOptionsHandler = (
15
+ productId: string,
16
+ fieldName: string,
17
+ autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
18
+ ) => Promise<any>
19
+
20
+ export type ExperimentalServiceGetProductPostingRequirementsHandler = (
21
+ productId: string | number,
22
+ ) => Promise<PostingRequirement[]>
6
23
 
7
24
  export type WindowHapiServiceExperimental = WindowHapiModuleWithConstructorArgs<
8
25
  {
9
26
  getExperimental: HapiServiceFunctionWithLifecycleHooks<
10
27
  () => Promise<any>
11
28
  >
29
+ getProductPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ExperimentalServiceGetProductPostingRequirementOptionsHandler>
30
+ getProductPostingRequirements: HapiServiceFunctionWithLifecycleHooks<ExperimentalServiceGetProductPostingRequirementsHandler>
31
+ setProductStepsBlurredFields: (
32
+ fields: Record<string, Record<string, boolean>>,
33
+ ) => Record<string, UseValidatorResult> | null
34
+ setProductStepsErrorMessages: (
35
+ messages: Record<
36
+ string,
37
+ Record<string, MessageDescriptor | boolean>
38
+ >,
39
+ ) => void
40
+ setProductStepsSubmittedSteps: (steps: Record<string, boolean>) => void
41
+ setProductStepsValidators: (
42
+ validators: NestedValidatorKeys,
43
+ replaceAsIs: boolean,
44
+ ) => void
12
45
  },
13
46
  { readonly service: WindowHapiService }
14
47
  >
@@ -0,0 +1,17 @@
1
+ import { MessageDescriptor } from "react-intl"
2
+ import { NestedValidatorKeys, UseValidatorResult } from "../common"
3
+ import { OrderJourneyProductStep } from "./types"
4
+
5
+ export type ExperimentalState = {
6
+ /* Product Fields */
7
+ productSteps: OrderJourneyProductStep[]
8
+ productStepsBlurredFields: Record<string, Record<string, boolean>>
9
+ productStepsSubmittedSteps: Record<string, boolean>
10
+ productStepsErrorMessages: Record<
11
+ string,
12
+ Record<string, MessageDescriptor | MessageDescriptor[]>
13
+ >
14
+ productStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
15
+ productStepsData: Record<string, Record<string, any>>
16
+ productStepsValidations: Record<string, UseValidatorResult> | null
17
+ }
@@ -1,11 +1,6 @@
1
1
  import { RecursivePartial } from "../common"
2
2
  import { Campaign, CampaignOrderRequestBody } from "../campaign"
3
-
4
- export enum ExperimentalSuggestionEndpointName {
5
- "postingRequirements" = "posting_requirements",
6
- "vacancyFields" = "vacancy_fields",
7
- "primaryTaxonomy" = "primary_taxonomy",
8
- }
3
+ import { OrderJourneyStep } from "../orderJourney"
9
4
 
10
5
  export type ExperimentalSuggestionResponseStatus =
11
6
  | "new"
@@ -22,7 +17,7 @@ export type ExperimentalSuggestionGetResponseData<P, R> = {
22
17
  id: string
23
18
  status: ExperimentalSuggestionResponseStatus
24
19
  contract_id?: string
25
- type: ExperimentalSuggestionEndpointName
20
+ type: "posting_requirements" | "vacancy_fields" | "primary_taxonomy"
26
21
  payload: P
27
22
  response: R
28
23
  }
@@ -41,12 +36,7 @@ export type ExperimentalSuggestionVacancyFieldsCreateRequestPayload = {
41
36
 
42
37
  export type ExperimentalSuggestionVacancyFieldsGetResponseData =
43
38
  RecursivePartial<Campaign>
44
-
45
- export type ExperimentalSuggestionPrimaryTaxonomyCreateRequestPayload = {
46
- description: string
47
- }
48
-
49
- export type ExperimentalSuggestionPrimaryTaxonomyGetResponseData = Record<
50
- string,
51
- string
39
+ export type OrderJourneyProductStep = Omit<
40
+ OrderJourneyStep,
41
+ "blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
52
42
  >
package/modal/enums.ts CHANGED
@@ -24,8 +24,6 @@ export enum ModalKeys {
24
24
  "mediaEditor" = "media-editor",
25
25
  "uploadWidget" = "upload-widget",
26
26
  "mediaLibrary" = "media-library",
27
- __experimentalContractPostingRequirementsSmartFillSuccess = "__experimental-contract-posting-requirements-smart-fill-success",
28
- __experimentalCampaignVacancyFieldsSmartFillSuccess = "__experimental-campaign-vacancy-fields-smart-fill-success",
29
27
  }
30
28
 
31
29
  export enum FilePickerModalPropsActionFor {
@@ -6,11 +6,12 @@ import { IObservableValue } from "mobx"
6
6
  import { AnyNonFunction } from "../common/types"
7
7
  import { WindowHapiService } from "../_window/service.types"
8
8
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
9
+ import { ExperimentalModalKeys } from "../experimental/enums"
9
10
 
10
11
  export type WindowHapiServiceModal = WindowHapiModuleWithConstructorArgs<
11
12
  {
12
13
  openModal: (
13
- key: ModalKeys,
14
+ key: ModalKeys | ExperimentalModalKeys,
14
15
  props: AnyNonFunction<
15
16
  | { product: Product }
16
17
  | {
@@ -25,7 +26,7 @@ export type WindowHapiServiceModal = WindowHapiModuleWithConstructorArgs<
25
26
  options?: ModalOptions,
26
27
  zone?: ModalZone,
27
28
  ) => void
28
- closeModal: (key: ModalKeys) => void
29
+ closeModal: (key: ModalKeys | ExperimentalModalKeys) => void
29
30
  },
30
31
  { readonly service: WindowHapiService }
31
32
  >
package/modal/types.ts CHANGED
@@ -10,6 +10,10 @@ import { Campaign } from "../campaign"
10
10
  import { OrderJourneyPaymentMethod } from "../orderJourney"
11
11
  import { PickerDisplayMode } from "filestack-js"
12
12
  import { HapiSiteTheme } from "../theming"
13
+ import {
14
+ ExperimentalFilePickerModalPropsActionFor,
15
+ ExperimentalModalKeys,
16
+ } from "../experimental/enums"
13
17
 
14
18
  export type ProductDetailModalProps = {
15
19
  id: string
@@ -84,7 +88,9 @@ export type FilePickerModalPropsActionData =
84
88
  FilePickerModalPropsActionDataPostingRequirements
85
89
 
86
90
  export type FilePickerModalProps = {
87
- actionFor: FilePickerModalPropsActionFor
91
+ actionFor:
92
+ | FilePickerModalPropsActionFor
93
+ | ExperimentalFilePickerModalPropsActionFor
88
94
  actionData?: FilePickerModalPropsActionData
89
95
  }
90
96
 
@@ -112,7 +118,7 @@ export type ModalOptions = {
112
118
 
113
119
  export type Modal = {
114
120
  zone: ModalZone
115
- key: ModalKeys
121
+ key: ModalKeys | ExperimentalModalKeys
116
122
  props: ModalProps | undefined
117
123
  options: ModalOptions
118
124
  }
@@ -58,20 +58,7 @@ export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
58
58
  validators: NestedValidatorKeys,
59
59
  replaceAsIs: boolean,
60
60
  ) => void
61
- setProductStepsBlurredFields: (
62
- fields: Record<string, Record<string, boolean>>,
63
- ) => Record<string, UseValidatorResult> | null
64
- setProductStepsErrorMessages: (
65
- messages: Record<
66
- string,
67
- Record<string, MessageDescriptor | boolean>
68
- >,
69
- ) => void
70
- setProductStepsSubmittedSteps: (steps: Record<string, boolean>) => void
71
- setProductStepsValidators: (
72
- validators: NestedValidatorKeys,
73
- replaceAsIs: boolean,
74
- ) => void
61
+
75
62
  getSetters: (
76
63
  steps: Record<string, boolean>,
77
64
  ) => Record<string, (step: OrderJourneyStep) => any>
@@ -14,7 +14,6 @@ import {
14
14
  OrderJourneyOrderErrorsPostingDetailsURLs,
15
15
  OrderJourneyOrderErrorsPostingDetailsWorkingLocation,
16
16
  OrderJourneyOrderReviewStepData,
17
- OrderJourneyProductStep,
18
17
  OrderJourneyStep,
19
18
  OrderJourneyUTMStepData,
20
19
  OrderJourneyUTMStepValidations,
@@ -112,17 +111,7 @@ export type OrderJourneyState = {
112
111
  contractStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
113
112
  contractStepsData: Record<string, Record<string, any>>
114
113
  contractStepsValidations: Record<string, UseValidatorResult> | null
115
- /* Product Fields */
116
- productSteps: OrderJourneyProductStep[]
117
- productStepsBlurredFields: Record<string, Record<string, boolean>>
118
- productStepsSubmittedSteps: Record<string, boolean>
119
- productStepsErrorMessages: Record<
120
- string,
121
- Record<string, MessageDescriptor | MessageDescriptor[]>
122
- >
123
- productStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
124
- productStepsData: Record<string, Record<string, any>>
125
- productStepsValidations: Record<string, UseValidatorResult> | null
114
+
126
115
  /* UTM Codes */
127
116
  utmCodesStep: OrderJourneyStep
128
117
  utmCodesStepData: OrderJourneyUTMStepData
@@ -1,6 +1,7 @@
1
1
  import { MessageDescriptor } from "react-intl"
2
2
  import { OrderJourneyStepKey } from "./enums"
3
3
  import { UseValidatorResult } from "../common"
4
+ import { OrderJourneyProductStep } from "../experimental"
4
5
 
5
6
  export type OrderJourneyStepBlurredFields = {
6
7
  [k: string]:
@@ -31,11 +32,6 @@ export type OrderJourneyContractStep = Omit<
31
32
  "blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
32
33
  >
33
34
 
34
- export type OrderJourneyProductStep = Omit<
35
- OrderJourneyStep,
36
- "blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
37
- >
38
-
39
35
  export type UTMMap = {
40
36
  value: string
41
37
  mapToName: boolean
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.29.0",
4
+ "version": "1.30.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
@@ -29,8 +29,6 @@ export type WindowHapiAPIProductConfigs = {
29
29
  getJobTitles: AxiosRequestConfig
30
30
  getLocations: AxiosRequestConfig
31
31
  calculateDeliveryTime: AxiosRequestConfig
32
- getPostingRequirementOptions: AxiosRequestConfig
33
- getPostingRequirements: AxiosRequestConfig
34
32
  }
35
33
  export type WindowHapiAPIProductRequests = {
36
34
  getProduct: (productId: number | string) => Promise<Product>
@@ -50,14 +48,6 @@ export type WindowHapiAPIProductRequests = {
50
48
  filters?: ProductWithSupportForContractsFilters,
51
49
  limitOffset?: PaginationLimitOffset,
52
50
  ) => Promise<PaginatedAPIResponseV1<ProductSupportingContractsPartial>>
53
- getPostingRequirementOptions: (
54
- productId: string,
55
- fieldName: string,
56
- autocompleteRequestOptions: Record<string, string | string[]>,
57
- ) => Promise<any>
58
- getPostingRequirements: (
59
- productId: string | number,
60
- ) => Promise<PostingRequirement[]>
61
51
  getIndustries: () => Promise<ProductIndustry[]>
62
52
  getJobFunctions: () => Promise<ProductJobFunction[]>
63
53
  getJobTitles: (
@@ -67,16 +67,6 @@ export type ProductServiceSetArbitraryJobTitle = (
67
67
  shouldResetJobFunctionsIds?: boolean,
68
68
  ) => void
69
69
 
70
- export type ProductServiceGetProductPostingRequirementOptionsHandler = (
71
- productId: string,
72
- fieldName: string,
73
- autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
74
- ) => Promise<any>
75
-
76
- export type ProductServiceGetProductPostingRequirementsHandler = (
77
- productId: string | number,
78
- ) => Promise<PostingRequirement[]>
79
-
80
70
  export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
81
71
  {
82
72
  loadMoreProducts: HapiServiceFunctionWithLifecycleHooks<ProductServiceLoadMoreProductsHandler>
@@ -93,8 +83,6 @@ export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
93
83
  getJobTitles: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobTitlesHandler>
94
84
  getJobFunctions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobFunctionsHandler>
95
85
  getIndustries: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetIndustriesHandler>
96
- getProductPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementOptionsHandler>
97
- getProductPostingRequirements: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductPostingRequirementsHandler>
98
86
  },
99
87
  { readonly service: WindowHapiService }
100
88
  >
package/product/types.ts CHANGED
@@ -176,8 +176,3 @@ export type ProductUserProvidedFilters = Omit<
176
176
  ProductFilterQueryParams,
177
177
  "filterProductRecommendations" | "filterMyContractSupportedOnly"
178
178
  >
179
-
180
- export type ProductPostingRequirementsAutocompleteRequestOption = {
181
- key: string
182
- value: string | string[]
183
- }
@@ -23,6 +23,7 @@ export type WindowHapiServiceWallet = WindowHapiModuleWithConstructorArgs<
23
23
  createPaymentIntent: (
24
24
  paymentParams: WalletPaymentIntentRequest,
25
25
  ) => Promise<void>
26
+ handlePaymentIntentCallbackFromQueryParams: () => void
26
27
  resetTopUpState: () => void
27
28
  resetDirectChargeState: () => void
28
29
  resetPurchaseOrderState: () => void