@vonq/hapi-elements-types 1.9.0 → 1.11.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.
@@ -67,6 +67,11 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
67
67
  headers: RawAxiosRequestHeaders
68
68
  setHeaders: (headers: RawAxiosRequestHeaders) => void
69
69
  baseRequestConfig: RawAxiosRequestConfig<any>
70
+ makeDataRequest: (
71
+ method: "get" | "put" | "patch",
72
+ endpoint: string,
73
+ data?: any,
74
+ ) => Promise<any>
70
75
  [WindowHapiModuleName.contract]: WindowHapiAPIContract
71
76
  [WindowHapiModuleName.wallet]: WindowHapiAPIWallet
72
77
  [WindowHapiModuleName.product]: WindowHapiAPIProduct
@@ -7,6 +7,7 @@ export type WindowHapiAuth = WindowHapiModuleWithConstructorArgs<
7
7
  {
8
8
  partnerId: string | undefined
9
9
  clientId: string | undefined
10
+ partnerToken: string | undefined // used for impersonation
10
11
  clientToken: string | undefined
11
12
  },
12
13
  { readonly core: WindowHapiClassInterface }
@@ -1,19 +1,19 @@
1
1
  import {
2
+ WindowHapiEventCommandData,
2
3
  WindowHapiEventCommandNames,
3
4
  WindowHapiEventCommandStatus,
4
- WindowHapiEventCommandData,
5
5
  } from "../common/events/EventCommand/types"
6
6
  import {
7
+ WindowHapiEventCommand,
7
8
  WindowHapiEventCommandCallbackHandler,
9
+ WindowHapiEventListener,
8
10
  WindowHapiEventMediatorGetInstancesHandler,
9
11
  WindowHapiEventMediatorInstances,
10
- WindowHapiEventCommand,
11
12
  WindowHapiEventStrategy,
12
- WindowHapiEventListener,
13
13
  } from "../common/events/types"
14
14
  import {
15
- WindowHapiModuleWithConstructorArgs,
16
15
  WindowHapiClassInterface,
16
+ WindowHapiModuleWithConstructorArgs,
17
17
  } from "./window"
18
18
  import { WindowHapiSubmoduleName } from "../common/enums"
19
19
  import { WindowHapiInstance } from "./instances.types"
@@ -145,6 +145,7 @@ export type WindowHapiEvents = WindowHapiModuleWithConstructorArgs<
145
145
  eventServiceStrategy: WindowHapiEventStrategy
146
146
  eventQAStrategy: WindowHapiEventStrategy
147
147
  eventDOMStrategy: WindowHapiEventStrategy
148
+ eventConfigStrategy: WindowHapiEventStrategy
148
149
  getInstances: () => {
149
150
  source: WindowHapiInstance
150
151
  targets: WindowHapiInstance[]
@@ -7,6 +7,7 @@ import { WindowHapiLogger } from "../common/logger/types"
7
7
  export type WindowHapiInstances = WindowHapiModuleWithConstructorArgs<
8
8
  {
9
9
  instances: WindowHapiInstance[]
10
+ readyInstances: string[]
10
11
  getFrameWindowByName: (name: string) => Window | undefined
11
12
  hasInstance: (instanceName: string) => boolean
12
13
  getInstanceByName: (
@@ -17,6 +18,7 @@ export type WindowHapiInstances = WindowHapiModuleWithConstructorArgs<
17
18
  removeInstance: (instanceName: string) => void
18
19
  onAfterAddInstance: (instance: WindowHapiInstance) => void
19
20
  onAfterRemoveInstance: (instance: WindowHapiInstance) => void
21
+ setInstanceReadyByName: (instanceName: string, isReady: boolean) => void
20
22
  },
21
23
  { readonly core: WindowHapiClassInterface }
22
24
  >
@@ -36,6 +36,7 @@ export type HapiServiceBase = {
36
36
  __serviceName: WindowHapiModuleName
37
37
  logger: WindowHapiLogger
38
38
  init: () => void
39
+ propertiesThatShouldNotBeDocumented: string[]
39
40
  }
40
41
  export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
41
42
  {
@@ -43,6 +43,7 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
43
43
  [WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
44
44
  basePropertiesThatShouldNotBeDocumented: string[]
45
45
  handleDefaultStateFromQueryParams: (params: string | string[]) => void
46
+ onBeforeStateChange: () => void
46
47
  onAfterStateChange: () => void
47
48
  stores: {
48
49
  alert: WindowHapiStateModule<AlertState>
@@ -78,11 +79,12 @@ export type WindowHapiStatesJSON = {
78
79
  [WindowHapiModuleName.ats]: ATSState
79
80
  }
80
81
 
81
- export type WindowHapiStateBase = {
82
+ export type WindowHapiStateBase<T> = {
82
83
  propertiesThatShouldNotBeDocumented: string[]
83
84
  __elementsStateModuleName: string
84
85
  toJSON: any
85
86
  addClassPropertiesObserver: () => void
87
+ validations: StateValidations<T>
86
88
  }
87
89
 
88
90
  export type HapiStateValueWithListener<T> = {
@@ -90,7 +92,7 @@ export type HapiStateValueWithListener<T> = {
90
92
  value: T
91
93
  }
92
94
 
93
- export type WindowHapiStateModule<T> = WindowHapiStateBase & {
95
+ export type WindowHapiStateModule<T> = WindowHapiStateBase<T> & {
94
96
  [P in keyof T]:
95
97
  | T[P]
96
98
  | HapiStateValueWithListener<T[P]>
@@ -8,14 +8,15 @@ import {
8
8
  WindowHapiModuleWithConstructorArgs,
9
9
  WindowHapiClassInterface,
10
10
  } from "./window"
11
+ import { RecursivePartial } from "../common"
11
12
 
12
13
  export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
13
14
  {
14
15
  isObject: (item: any) => boolean
15
- mergeDeepOverwriteArrays: (
16
- original: Record<string, any>,
17
- overwrites: Record<string, any>,
18
- ) => Record<string, any>
16
+ mergeDeepOverwriteArrays: <T>(
17
+ original: T,
18
+ overwrites: RecursivePartial<T>,
19
+ ) => T
19
20
  getComponentNameIndexSuffix: (instanceName: string) => string
20
21
  getIframeLoadingSpinner: () => HTMLDivElement
21
22
  product: WindowHapiUtilsProduct
package/_window/window.ts CHANGED
@@ -85,10 +85,12 @@ export type WindowHapiConfigSubmodule = {
85
85
  apiHost: string
86
86
  initialState: RecursivePartial<any>
87
87
  partnerId: string
88
+ partnerToken: string
88
89
  clientId: string
89
90
  clientToken: string
90
91
  loadingSpinnerDefaultFillColor: string
91
92
  appOrigin: string
93
+ docsOrigin: string
92
94
  enableLogs: boolean
93
95
  webComponents: HapiWebComponent[]
94
96
  isInvalidToken: boolean
@@ -122,6 +124,7 @@ export type WindowHapiClassInterface = {
122
124
  instance: WindowHapiInstance
123
125
  qa: WindowHapiQASubmodule
124
126
  isProduction: boolean
127
+ enableLogs: boolean
125
128
  }
126
129
 
127
130
  export type WindowHapi = {
package/alert/enums.ts CHANGED
@@ -5,6 +5,7 @@ export enum AlertKey {
5
5
  contractCreateSuccess = "contract-created",
6
6
  contractGroupCreateSuccess = "contract-group-created",
7
7
  campaignTakeOfflineSuccess = "campaign-take-offline-success",
8
+ "campaignCopyContractWarning" = "campaign-copy-contract-warning",
8
9
  campaignOrderSuccess = "campaign-order-success",
9
10
  campaignCopySuccess = "campaign-copy-success",
10
11
  buttonCopySuccess = "copy-button-success",
package/alert/types.ts CHANGED
@@ -36,6 +36,8 @@ export type CampaignOrderSuccessAlertProps = {}
36
36
 
37
37
  export type CampaignCopySuccessAlertProps = {}
38
38
 
39
+ export type DiscardedContractsDuringCampaignCopyAlertProps = {}
40
+
39
41
  export type CampaignTakeOfflineSuccessAlertProps = {}
40
42
 
41
43
  export type ProductAddToBasketSuccessAlertProps = {}
@@ -44,6 +46,7 @@ export type ProductRemoveFromBasketWarningAlertProps = {}
44
46
 
45
47
  export type AlertProps = AnyNonFunction<
46
48
  | ContractCreateSuccessAlertProps
49
+ | DiscardedContractsDuringCampaignCopyAlertProps
47
50
  | ContractRemoveSuccessAlertProps
48
51
  | ContractGroupCreateSuccessAlertProps
49
52
  | BackendErrorMessageAlertProps
package/ats/api.types.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import { AxiosRequestConfig } from "axios/index"
2
- import { ATSSettings, ATSUserTokenResponse } from "./types"
2
+ import {
3
+ ATSDataResponse,
4
+ ATSMessage,
5
+ ATSSettings,
6
+ ATSUserTokenResponse,
7
+ } from "./types"
3
8
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
4
9
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
5
10
 
@@ -13,6 +18,8 @@ export type WindowHapiAPIATSRequests = {
13
18
  getUserSettings: () => Promise<ATSSettings>
14
19
  refreshJWTToken: () => Promise<ATSUserTokenResponse>
15
20
  validateJWTToken: () => Promise<boolean>
21
+ getMessages: () => Promise<ATSMessage[]>
22
+ sendMessage: (ticket: ATSMessage) => Promise<ATSMessage[]>
16
23
  }
17
24
  export type WindowHapiAPIATS = WindowHapiModuleWithConstructorArgs<
18
25
  WindowHapiAPIModule<WindowHapiAPIATSRequests, WindowHapiAPIATSConfigs>,
@@ -2,16 +2,23 @@ import {
2
2
  HapiServiceFunctionWithLifecycleHooks,
3
3
  WindowHapiService,
4
4
  } from "../_window/service.types"
5
- import { ATSSettings } from "./types"
5
+ import { ATSMessage, ATSSettings } from "./types"
6
6
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
7
7
 
8
8
  export type ATSServiceGetUserSettingsHandler = () => Promise<
9
9
  ATSSettings | undefined
10
10
  >
11
+ export type ATSServiceGetMessagesHandler = () => Promise<ATSMessage[]>
12
+
13
+ export type ATSServiceSendMessageHandler = (
14
+ message: ATSMessage,
15
+ ) => Promise<ATSMessage[]>
11
16
 
12
17
  export type WindowHapiServiceATS = WindowHapiModuleWithConstructorArgs<
13
18
  {
14
19
  getUserSettings: HapiServiceFunctionWithLifecycleHooks<ATSServiceGetUserSettingsHandler>
20
+ getMessages: HapiServiceFunctionWithLifecycleHooks<ATSServiceGetMessagesHandler>
21
+ sendMessage: HapiServiceFunctionWithLifecycleHooks<ATSServiceSendMessageHandler>
15
22
  },
16
23
  { readonly service: WindowHapiService }
17
24
  >
package/ats/types.ts CHANGED
@@ -25,3 +25,17 @@ export type ATSSettings = {
25
25
  export type ATSUserTokenResponse = {
26
26
  token: string
27
27
  }
28
+
29
+ export type ATSMessage = {
30
+ id?: string
31
+ sender: "ats" | "vonq"
32
+ createdAt?: string
33
+ message: string
34
+ }
35
+
36
+ export type ATSDataResponse = {
37
+ data: {
38
+ messages: ATSMessage[]
39
+ }
40
+ type: "elements"
41
+ }
@@ -7,9 +7,9 @@ import {
7
7
  } from "../_window/service.types"
8
8
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
9
9
 
10
- export type BasketServiceGetProductsHandler = () => Promise<
11
- (Product | Contract)[]
12
- >
10
+ export type BasketServiceGetProductsHandler = (
11
+ products?: BasketProduct[],
12
+ ) => Promise<(Product | Contract)[]>
13
13
  export type BasketServiceAddProductOrContractByIdHandler = (
14
14
  contractOrProductId: string,
15
15
  isProduct: boolean,
@@ -12,6 +12,7 @@ import {
12
12
  getBasketProductBoardType,
13
13
  getConflictingContractsWithDifferentGroupsInBasket,
14
14
  } from "../../common/basket/utils"
15
+ import { Campaign, CampaignCreateForm } from "../campaign"
15
16
 
16
17
  export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
17
18
  {
@@ -41,6 +42,7 @@ export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
41
42
  contract: Contract,
42
43
  basketProducts: (Contract | Product)[],
43
44
  ) => (Product | Contract)[]
45
+ getBasketProductMetaFromCampaignForm: (form: Campaign) => any[]
44
46
  },
45
47
  { readonly utils: WindowHapiUtils }
46
48
  >
@@ -31,6 +31,7 @@ export type CampaignServiceGetSenioritiesHandler = () => Promise<
31
31
  export type CampaignServiceOrderCampaignHandler = () => Promise<Campaign>
32
32
  export type CampaignServiceCopyCampaignHandler = (
33
33
  campaign: Campaign,
34
+ withExistingProducts: boolean,
34
35
  ) => Promise<Campaign>
35
36
 
36
37
  export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
package/campaign/types.ts CHANGED
@@ -117,6 +117,7 @@ export type Campaign = {
117
117
  campaignName: string | null
118
118
  companyId: string
119
119
  createdOn: string
120
+ poNumber: string | null
120
121
  customerId: string
121
122
  orderReference: string | null
122
123
  orderedProducts: string[]
@@ -141,7 +142,7 @@ export type CampaignCreateFormTargetGroupIndustry = ProductIndustry
141
142
 
142
143
  export type CampaignCreateFormTargetGroupJobCategory = {
143
144
  label: string
144
- value: number
145
+ value: number | string
145
146
  }
146
147
 
147
148
  export type CampaignCreateFormTargetGroup = {
@@ -160,26 +161,29 @@ export type CampaignCreateFormOrderedProductSpecBase = {
160
161
  export type CampaignCreateFormOrderedProductSpec =
161
162
  CampaignCreateFormOrderedProductSpecBase & { [k: string]: any }
162
163
 
164
+ export type CampaignCreateFormPostingDetails = {
165
+ title: string
166
+ description: string
167
+ organization: CampaignPostingDetailsOrganization
168
+ workingLocation: CampaignPostingDetailsWorkingLocation
169
+ yearsOfExperience: number
170
+ employmentType: EmploymentType
171
+ weeklyWorkingHours: CampaignPostingDetailsWeeklyWorkingHours
172
+ salaryIndication: CampaignPostingDetailsSalaryIndication
173
+ contactInfo: CampaignPostingDetailsContactInfo | null
174
+ jobPageUrl: string
175
+ applicationUrl: string
176
+ }
177
+
163
178
  export type CampaignCreateForm = {
164
179
  companyId: string
180
+ currency: ProductPriceCurrency
165
181
  campaignName?: string | null
166
182
  poNumber: string | null
167
183
  paymentMethod: OrderJourneyPaymentMethod | null
168
184
  targetGroup: CampaignCreateFormTargetGroup
169
185
  recruiterInfo: CampaignRecruiterInfo
170
- postingDetails: {
171
- title: string
172
- description: string
173
- organization: CampaignPostingDetailsOrganization
174
- workingLocation: CampaignPostingDetailsWorkingLocation
175
- yearsOfExperience: number
176
- employmentType: EmploymentType
177
- weeklyWorkingHours: CampaignPostingDetailsWeeklyWorkingHours
178
- salaryIndication: CampaignPostingDetailsSalaryIndication
179
- contactInfo: CampaignPostingDetailsContactInfo | null
180
- jobPageUrl: string
181
- applicationUrl: string
182
- }
186
+ postingDetails: CampaignCreateFormPostingDetails
183
187
  orderedProducts: string[] //Array of UUIDs
184
188
  orderedProductsSpecs: Record<string, CampaignCreateFormOrderedProductSpec>
185
189
  }
@@ -215,12 +219,12 @@ export type TaxonomyEducationLevelName = CampaignTaxonomyNameWithLanguage
215
219
  export type TaxonomySeniorityName = CampaignTaxonomyNameWithLanguage
216
220
 
217
221
  export type TaxonomySeniority = {
218
- id: number
222
+ id: number | string
219
223
  name: TaxonomySeniorityName[]
220
224
  }
221
225
 
222
226
  export type TaxonomyEducationAndSeniorityLevel = {
223
- id: number
227
+ id: number | string
224
228
  name: TaxonomyEducationLevelName[]
225
229
  }
226
230
 
@@ -26,9 +26,7 @@ export type WindowHapiUtilsCampaign = WindowHapiModuleWithConstructorArgs<
26
26
  campaign: Partial<Campaign>,
27
27
  ) => void
28
28
  getOrderCampaignRequestBody: () => CampaignOrderRequestBody
29
- getCopyCampaignRequestBody: (
30
- campaign: Campaign,
31
- ) => CampaignOrderRequestBody
29
+ getCopyCampaignRequestBody: (campaign: Campaign) => CampaignCreateForm
32
30
  getPostBodyValuesForTargetGroupProperty: (
33
31
  selectValue:
34
32
  | CampaignCreateFormTargetGroupEducationLevel[]
@@ -87,13 +87,13 @@ export type ZodCampaignTaxonomyNameWithLanguage = ZodObject<{
87
87
  value: ZodString
88
88
  }>
89
89
  export type ZodCampaignTaxonomyEducationLevel = ZodObject<{
90
- id: ZodNumber
90
+ id: ZodUnion<[ZodNumber, ZodString]>
91
91
  name: ZodArray<ZodCampaignTaxonomyNameWithLanguage>
92
92
  }>
93
93
  export type ZodCampaignTaxonomyEducationLevels =
94
94
  ZodArray<ZodCampaignTaxonomyEducationLevel>
95
95
  export type ZodCampaignTaxonomySeniority = ZodObject<{
96
- id: ZodNumber
96
+ id: ZodUnion<[ZodNumber, ZodString]>
97
97
  name: ZodArray<ZodCampaignTaxonomyNameWithLanguage>
98
98
  }>
99
99
  export type ZodCampaignTaxonomySeniorities =
@@ -165,11 +165,13 @@ export type ZodCampaignCreateFormPostingDetails = ZodObject<{
165
165
  export type ZodCampaignCreateFormTargetGroup = ZodObject<{
166
166
  educationLevel: ZodCampaignTaxonomyEducationLevels
167
167
  seniority: ZodCampaignTaxonomySeniorities
168
- industry: ZodArray<ZodObject<{ id: ZodNumber; name: ZodString }>>
168
+ industry: ZodArray<
169
+ ZodObject<{ id: ZodUnion<[ZodNumber, ZodString]>; name: ZodString }>
170
+ >
169
171
  jobCategory: ZodArray<
170
172
  ZodObject<{
171
173
  label: ZodString
172
- value: ZodNumber
174
+ value: ZodUnion<[ZodNumber, ZodString]>
173
175
  }>
174
176
  >
175
177
  }>
@@ -1,6 +1,5 @@
1
1
  export enum WindowHapiEventCommandName {
2
2
  /* State */
3
- stateLoad = "state:load",
4
3
  stateHydrate = "state:hydrate",
5
4
 
6
5
  /* Service */
@@ -14,11 +13,13 @@ export enum WindowHapiEventCommandName {
14
13
 
15
14
  /* Config */
16
15
  configSetPartnerId = "config:partnerId",
16
+ configSetPartnerToken = "config:partnerToken", // used for impersonation purposes
17
17
  configSetClientId = "config:clientId",
18
18
  configSetAreLogsEnabled = "config:areLogsEnabled",
19
19
 
20
20
  /* App */
21
21
  appLoad = "app:load",
22
+ appReady = "app:ready",
22
23
 
23
24
  /* API */
24
25
  apiRequest = "api:request",
@@ -36,7 +36,7 @@ export type WindowHapiEventCommand = {
36
36
 
37
37
  export type WindowHapiEventCommandCallbackHandler = (
38
38
  data: any,
39
- event: WindowHapiEventCommand,
39
+ event: WindowHapiEventCommand | WindowHapiEventListener,
40
40
  ) => void
41
41
  export type WindowHapiEventCommandCommitHandler = (
42
42
  ...args: any[]
package/contract/types.ts CHANGED
@@ -5,13 +5,15 @@ export type ContractProduct = {
5
5
  title: string
6
6
  }
7
7
 
8
+ export type ContractCredentialOption = { key: string; label: string }
9
+
8
10
  export type ContractCredential = {
9
11
  description?: string | null
10
12
  label: string
11
13
  name: string
12
14
  sort: string
13
15
  url: string | null
14
- options: any[] | null
16
+ options: ContractCredentialOption[] | null
15
17
  }
16
18
 
17
19
  export type ContractFacet = {}
package/modal/enums.ts CHANGED
@@ -9,6 +9,7 @@ export enum ModalKeys {
9
9
  productInfo = "product-info",
10
10
  campaignTakeOfflineConfirmation = "campaign-confirm-take-offline",
11
11
  campaignCopyConfirmation = "campaign-confirm-copy",
12
+ campaignCopySelection = "contract-copy-selection",
12
13
  basketRemoveProductConfirmation = "remove-product-from-basket",
13
14
  contractRemoveConfirmation = "contract-remove-confirmation",
14
15
  contractGroupConflictInfo = "contract-group-conflict-info",
package/modal/types.ts CHANGED
@@ -2,7 +2,7 @@ import { Product } from "../product/types"
2
2
  import { Contract } from "../contract/types"
3
3
  import { ModalKeys, ModalZone } from "./enums"
4
4
  import { AnyNonFunction } from "../common/types"
5
- import { TransformedPostingRequirement } from "../campaign"
5
+ import { Campaign, TransformedPostingRequirement } from "../campaign"
6
6
 
7
7
  export type ProductDetailModalProps = {
8
8
  id: string
@@ -17,6 +17,10 @@ export type ContractGroupConflictInfoModalProps = {
17
17
  contract: Contract
18
18
  conflictingContracts: Contract[]
19
19
  }
20
+ export type CampaignCopySelectionModalProps = {
21
+ products: (Product | Contract)[]
22
+ campaign: Campaign
23
+ }
20
24
  export type ContractPostingRequirementsSmartFillResponseModalProps = {
21
25
  response: Record<string, any>
22
26
  postingRequirements: Record<string, TransformedPostingRequirement>
@@ -45,6 +49,7 @@ export type ModalProps = AnyNonFunction<
45
49
 
46
50
  export type ModalOptions = {
47
51
  showCloseButton?: boolean
52
+ showBottomCloseButton?: boolean
48
53
  showBackdrop?: boolean
49
54
  unstyled?: boolean
50
55
  disableVerticalScroll?: boolean
@@ -19,7 +19,7 @@ export enum OrderJourneyStepKey {
19
19
  }
20
20
 
21
21
  export enum OrderJourneyPaymentMethod {
22
- atsManaged = "ats-managed",
22
+ atsManaged = "ats_managed",
23
23
  wallet = "wallet",
24
24
  purchaseOrder = "purchase_order",
25
25
  }
@@ -82,7 +82,6 @@ export type OrderJourneyState = {
82
82
  string,
83
83
  Record<string, MessageDescriptor>
84
84
  >
85
- contractStepsHideFields: Record<string, boolean>
86
85
  contractStepsValidators: Record<string, Record<string, NestedValidatorKeys>>
87
86
  contractStepsData: Record<string, Record<string, any>>
88
87
  contractStepsValidations: Record<string, UseValidatorResult> | null
@@ -16,10 +16,6 @@ export type OrderJourneyStepErrorMessages = {
16
16
  | Record<string, MessageDescriptor | OrderJourneyStepErrorMessage>
17
17
  }
18
18
 
19
- export type OrderJourneyStepHideFields = {
20
- [k: string]: boolean | Record<string, boolean | OrderJourneyStepHideFields>
21
- }
22
-
23
19
  export type OrderJourneyStepKeyType = OrderJourneyStepKey | string
24
20
  export type OrderJourneyStep = {
25
21
  key: OrderJourneyStepKeyType
@@ -28,7 +24,6 @@ export type OrderJourneyStep = {
28
24
  isSubmitted?: boolean
29
25
  blurredFields?: OrderJourneyStepBlurredFields
30
26
  errorMessagesIntlDescriptors?: OrderJourneyStepErrorMessages
31
- hideFields?: OrderJourneyStepHideFields
32
27
  }
33
28
 
34
29
  export type OrderJourneyContractStep = Omit<
@@ -3,11 +3,13 @@ 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 { orderJourneyGetContractIdFromContractStepKey } from "../../common/orderJourney/utils"
6
7
 
7
8
  export type WindowHapiUtilsOrderJourney = WindowHapiModuleWithConstructorArgs<
8
9
  {
9
10
  stepKeys: typeof OrderJourneyStepKey
10
11
  paymentMethodKeys: typeof OrderJourneyPaymentMethod
12
+ orderJourneyGetContractIdFromContractStepKey: (key: string) => string
11
13
  updateProductUTMsFromBasketItemData: (
12
14
  basketItemData: (Contract | Product)[],
13
15
  ) => void
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.9.0",
4
+ "version": "1.11.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
package/product/types.ts CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  export type ProductRange = "hours" | "days" | "weeks" | "months"
9
9
 
10
10
  export type ProductIndustry = {
11
- id: number
11
+ id: number | string
12
12
  name: string
13
13
  }
14
14
 
@@ -7,6 +7,7 @@ import {
7
7
  ZodObject,
8
8
  ZodOptional,
9
9
  ZodString,
10
+ ZodUnion,
10
11
  } from "zod"
11
12
  import { ProductPriceCurrency } from "./enums"
12
13
  import { ZodPaginationResponseV1 } from "../common/validations.types"
@@ -30,7 +31,7 @@ export type ZodProductDuration = ZodObject<{
30
31
  }>
31
32
 
32
33
  export type ZodProductIndustry = ZodObject<{
33
- id: ZodNumber
34
+ id: ZodUnion<[ZodNumber, ZodString]>
34
35
  name: ZodString
35
36
  }>
36
37
  export type ZodProductIndustries = ZodArray<ZodProductIndustry>
package/theming/types.ts CHANGED
@@ -84,6 +84,7 @@ export type HapiThemeRule =
84
84
  | "loadingSpinner"
85
85
  | "userJourneyBar"
86
86
  | "card"
87
+ | "productCard"
87
88
  | "tabHeaders"
88
89
  | "tabHeader"
89
90
  | "tabPanels"