@vonq/hapi-elements-types 1.43.0 → 1.45.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.
@@ -27,16 +27,24 @@ import { WindowHapiValidationsOrderJourney } from "../orderJourney/validations.t
27
27
  import { WindowHapiValidationsWallet } from "../wallet/validations.types"
28
28
  import { WindowHapiValidations } from "./validation.types"
29
29
  import { ExperimentalState } from "../experimental/state.types"
30
+ import { ProductCacheState } from "../product/state.cache.types"
31
+ import { ContractCacheState } from "../contract/state.cache.types"
30
32
 
31
33
  export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
32
34
  {
33
35
  [WindowHapiModuleName.alert]: WindowHapiStateModule<AlertState>
34
36
  [WindowHapiModuleName.basket]: WindowHapiStateModule<BasketState>
35
37
  [WindowHapiModuleName.campaign]: WindowHapiStateModule<CampaignState>
36
- [WindowHapiModuleName.contract]: WindowHapiStateModule<ContractState>
38
+ [WindowHapiModuleName.contract]: WindowHapiStateModule<
39
+ ContractState,
40
+ ContractCacheState
41
+ >
37
42
  [WindowHapiModuleName.debugging]: WindowHapiStateModule<DebuggingState>
38
43
  [WindowHapiModuleName.language]: WindowHapiStateModule<LanguageState>
39
- [WindowHapiModuleName.product]: WindowHapiStateModule<ProductState>
44
+ [WindowHapiModuleName.product]: WindowHapiStateModule<
45
+ ProductState,
46
+ ProductCacheState
47
+ >
40
48
  [WindowHapiModuleName.theming]: WindowHapiStateModule<ThemingState>
41
49
  [WindowHapiModuleName.orderJourney]: WindowHapiStateModule<OrderJourneyState>
42
50
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
@@ -56,10 +64,16 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
56
64
  [WindowHapiModuleName.alert]: WindowHapiStateModule<AlertState>
57
65
  [WindowHapiModuleName.basket]: WindowHapiStateModule<BasketState>
58
66
  [WindowHapiModuleName.campaign]: WindowHapiStateModule<CampaignState>
59
- [WindowHapiModuleName.contract]: WindowHapiStateModule<ContractState>
67
+ [WindowHapiModuleName.contract]: WindowHapiStateModule<
68
+ ContractState,
69
+ ContractCacheState
70
+ >
60
71
  [WindowHapiModuleName.debugging]: WindowHapiStateModule<DebuggingState>
61
72
  [WindowHapiModuleName.language]: WindowHapiStateModule<LanguageState>
62
- [WindowHapiModuleName.product]: WindowHapiStateModule<ProductState>
73
+ [WindowHapiModuleName.product]: WindowHapiStateModule<
74
+ ProductState,
75
+ ProductCacheState
76
+ >
63
77
  [WindowHapiModuleName.theming]: WindowHapiStateModule<ThemingState>
64
78
  [WindowHapiModuleName.orderJourney]: WindowHapiStateModule<OrderJourneyState>
65
79
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
@@ -91,12 +105,13 @@ export type WindowHapiStatesJSON = {
91
105
  [WindowHapiModuleName.experimental]: ExperimentalState
92
106
  }
93
107
 
94
- export type WindowHapiStateBase<T> = {
108
+ export type WindowHapiStateBase<T, CacheType = undefined> = {
95
109
  propertiesThatShouldNotBeDocumented: string[]
96
110
  __elementsStateModuleName: string
97
111
  toJSON: any
98
112
  addClassPropertiesObserver: () => void
99
113
  validations: StateValidations<T>
114
+ cache: WindowHapiStateModule<CacheType> | undefined
100
115
  }
101
116
 
102
117
  export type HapiStateValueWithListener<T> = {
@@ -104,7 +119,10 @@ export type HapiStateValueWithListener<T> = {
104
119
  value: T
105
120
  }
106
121
 
107
- export type WindowHapiStateModule<T> = WindowHapiStateBase<T> & {
122
+ export type WindowHapiStateModule<
123
+ T,
124
+ CacheType = undefined,
125
+ > = WindowHapiStateBase<T, CacheType> & {
108
126
  [P in keyof T]:
109
127
  | T[P]
110
128
  | HapiStateValueWithListener<T[P]>
package/_window/window.ts CHANGED
@@ -168,6 +168,11 @@ export type WindowHapiClassInterface = {
168
168
  logDeprecationNotice: () => void
169
169
  logLatestTypesPackageVersion: () => Promise<void>
170
170
  logFeatureBranches: () => Promise<void>
171
+ querySelectorAllThatAlsoSearchesShadowDOM: (
172
+ node: Element | ShadowRoot | Document,
173
+ selector: string,
174
+ ) => Element[]
175
+ querySelectorThatAlsoSearchesShadowDOM: (selector: string) => Element
171
176
  }
172
177
 
173
178
  export type WindowHapi = {
package/alert/enums.ts CHANGED
@@ -2,6 +2,8 @@ export enum AlertKey {
2
2
  backendErrorMessage = "backend-error-message",
3
3
  topupSuccess = "topup-success",
4
4
  contractRemoveSuccess = "contract-removed",
5
+ contractGroupRemoveSuccess = "contract-group-removed",
6
+ contractGroupUpdateSuccess = "contract-group-updated",
5
7
  contractCreateSuccess = "contract-created",
6
8
  contractEditSuccess = "contract-edited",
7
9
  contractGroupCreateSuccess = "contract-group-created",
package/alert/types.ts CHANGED
@@ -23,6 +23,14 @@ export type ContractGroupCreateSuccessAlertProps = {
23
23
  groupName: string
24
24
  }
25
25
 
26
+ export type ContractGroupUpdateSuccessAlertProps = {
27
+ groupName: string
28
+ }
29
+
30
+ export type ContractGroupRemoveSuccessAlertProps = {
31
+ groupName: string
32
+ }
33
+
26
34
  export type BackendErrorMessageAlertProps = {
27
35
  errorMessage: string
28
36
  }
package/common/types.ts CHANGED
@@ -280,6 +280,8 @@ export type FormFacetsFieldType =
280
280
  | "questionnaire"
281
281
  | "unknown"
282
282
 
283
+ export type FormFacetsFormOfThisOrderedProductSpec = Record<string, any>
284
+
283
285
  // keep this for backwards compatability
284
286
  export type ContractPostingRequirementFieldAutocompleteRequestOption =
285
287
  PostingRequirementsAutocompleteRequestOption
@@ -292,3 +294,5 @@ export type HapiFeatureBranch = {
292
294
  releaseDate: string
293
295
  }
294
296
  export type FlattenedItem = { label: string; value: any }
297
+
298
+ export type StringifiedJSON<T> = string
@@ -3,6 +3,7 @@ import {
3
3
  ZodArray,
4
4
  ZodBoolean,
5
5
  ZodFunction,
6
+ ZodMap,
6
7
  ZodNullable,
7
8
  ZodNumber,
8
9
  ZodObject,
@@ -63,6 +64,7 @@ export type WindowHapiValidationsCommon = {
63
64
  genericString: ZodString
64
65
  genericStringArray: ZodArray<ZodString>
65
66
  genericObject: ZodObject<any>
67
+ genericMap: ZodMap<any, any>
66
68
  genericRecordFunction: ZodRecord<
67
69
  ZodString,
68
70
  ZodFunction<ZodTuple<[], ZodUnknown>, ZodUnknown>
@@ -3,8 +3,9 @@ import {
3
3
  Contract,
4
4
  ContractCreateForm,
5
5
  ContractGroup,
6
- ContractGroupCreateForm,
7
6
  ContractEditForm,
7
+ ContractGroupCreateForm,
8
+ ContractGroupUpdateForm,
8
9
  } from "./types"
9
10
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
10
11
  import { PaginatedAPIResponseV1, PaginationLimitOffset } from "../common/types"
@@ -19,12 +20,15 @@ export type WindowHapiAPIContractConfigs = {
19
20
  removeContract: AxiosRequestConfig
20
21
  getPostingRequirementOptions: AxiosRequestConfig
21
22
  getGroups: AxiosRequestConfig
23
+ removeContractGroup: AxiosRequestConfig
24
+ updateContractGroup: AxiosRequestConfig
22
25
  createGroup: AxiosRequestConfig
23
26
  }
24
27
  export type WindowHapiAPIContractRequests = {
25
28
  getContracts: (
26
29
  limitOffset?: PaginationLimitOffset,
27
30
  labels?: Record<string, string> | null,
31
+ filters?: URLSearchParams,
28
32
  ) => Promise<PaginatedAPIResponseV1<Contract>>
29
33
  getContractsByIds: (
30
34
  contractIds: (string | number)[],
@@ -39,6 +43,11 @@ export type WindowHapiAPIContractRequests = {
39
43
  autocompleteRequestOptions: Record<string, string | string[]>,
40
44
  ) => Promise<any>
41
45
  getGroups: () => Promise<ContractGroup[]>
46
+ removeContractGroup: (groupIdx: number) => Promise<ContractGroup>
47
+ updateContractGroup: (
48
+ groupIdx: number,
49
+ group: ContractGroupUpdateForm,
50
+ ) => Promise<ContractGroup>
42
51
  createGroup: (group: ContractGroupCreateForm) => Promise<ContractGroup>
43
52
  removeContract: (contractId: string) => Promise<Contract>
44
53
  }
@@ -5,8 +5,8 @@ import {
5
5
  import { OrderJourneyStepKey } from "../orderJourney/enums"
6
6
  import {
7
7
  Contract,
8
- ContractDirectApplyChannelPrefillVariablesMap,
9
8
  ContractCredential,
9
+ ContractDirectApplyChannelPrefillVariablesMap,
10
10
  ContractGroup,
11
11
  ContractDirectApplyPostingRequirementQuestionnaireQuestionBody,
12
12
  ContractDirectApplyPostingRequirementQuestionnaireRules,
@@ -14,6 +14,7 @@ import {
14
14
  } from "./types"
15
15
  import {
16
16
  PaginatedAPIResponseV1,
17
+ PostingRequirementOption,
17
18
  PostingRequirementsAutocompleteRequestOption,
18
19
  TransformedPostingRequirement,
19
20
  } from "../common/types"
@@ -27,10 +28,15 @@ export type ContractServiceGetContractPostingRequirementOptionsHandler = (
27
28
  contractId: string,
28
29
  fieldName: string,
29
30
  autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
30
- ) => Promise<any>
31
+ ) => Promise<PostingRequirementOption[]>
31
32
 
32
33
  export type ContractServiceGetContractsHandler = (
33
34
  offset: number,
35
+ queryParams?: URLSearchParams,
36
+ ) => Promise<PaginatedAPIResponseV1<Contract>>
37
+
38
+ export type ContractServiceGetFilteredContractsHandler = (
39
+ offset: number,
34
40
  ) => Promise<PaginatedAPIResponseV1<Contract>>
35
41
 
36
42
  export type ContractServiceGetContractGroupsHandler = () => Promise<
@@ -51,6 +57,15 @@ export type ContractServiceRemoveContractHandler = (
51
57
  contractId: string,
52
58
  ) => Promise<void>
53
59
 
60
+ export type ContractServiceRemoveContractGroupHandler = (
61
+ groupIdx: number,
62
+ ) => Promise<void>
63
+
64
+ export type ContractServiceUpdateContractGroupHandler = (
65
+ groupIdx: number,
66
+ groupName: string,
67
+ ) => Promise<void>
68
+
54
69
  export type ContractServiceCreateContractGroupHandler =
55
70
  () => Promise<ContractGroup>
56
71
 
@@ -96,6 +111,14 @@ export type ContractServiceGetContractChannelPostingRequirementQuestionnaireRule
96
111
  channelName: ContractDirectApplyChannelName,
97
112
  ) => Promise<ContractServiceGetContractChannelPostingRequirementQuestionnaireRulesForDirectApplyResponse>
98
113
 
114
+ export type ContractServiceGetContractPostingRequirementOptionsFromCacheOrAPIHandler =
115
+ (
116
+ contractId: string,
117
+ fieldName: string,
118
+ autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
119
+ forceRefresh?: boolean,
120
+ ) => Promise<PostingRequirementOption[]>
121
+
99
122
  export type WindowHapiServiceContract = WindowHapiModuleWithConstructorArgs<
100
123
  {
101
124
  onAfterContractEditModalOpenClose: (
@@ -103,6 +126,7 @@ export type WindowHapiServiceContract = WindowHapiModuleWithConstructorArgs<
103
126
  previousModals: Modals,
104
127
  ) => void
105
128
  getContractPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractPostingRequirementOptionsHandler>
129
+ getFilteredContracts: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetFilteredContractsHandler>
106
130
  getContractsLabeled: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractsLabeledHandler>
107
131
  getContracts: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractsHandler>
108
132
  getContractGroups: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractGroupsHandler>
@@ -115,6 +139,7 @@ export type WindowHapiServiceContract = WindowHapiModuleWithConstructorArgs<
115
139
  getContractChannelPostingRequirementQuestionnaireBodyForDirectApply: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractChannelPostingRequirementQuestionnaireBodyForDirectApplyHandler>
116
140
  getContractChannelPostingRequirementQuestionnaireRulesForDirectApply: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractChannelPostingRequirementQuestionnaireRulesForDirectApplyHandler>
117
141
  setContractChannelPostingRequirementQuestionnaireOptionsDirectApply: HapiServiceFunctionWithLifecycleHooks<ContractServiceSetContractChannelPostingRequirementQuestionnaireOptionsDirectApplyHandler>
142
+ getContractPostingRequirementOptionsFromCacheOrAPI: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractPostingRequirementOptionsFromCacheOrAPIHandler>
118
143
  initiateOauthLogin: (
119
144
  contractId: string | number,
120
145
  orderJourneyStepActive: OrderJourneyStepKey,
@@ -0,0 +1,5 @@
1
+ import { ContractProductsSupportingContractsMap } from "./types"
2
+
3
+ export type ContractCacheState = {
4
+ postingRequirementOptionsMap: ContractProductsSupportingContractsMap
5
+ }
@@ -26,6 +26,11 @@ export type ContractState = {
26
26
  groupsAreLoading: boolean
27
27
  groupIsCreating: boolean
28
28
  groupCreateError: string | null
29
+ groupUpdateError: string | null
29
30
  groupForm: ContractGroupCreateForm
31
+ groupUpdateNameInput: string
30
32
  groupFormIsValid: boolean
33
+ filterChannelName: string
34
+ filterGroupId: string
35
+ filtersAccordionIsOpen: boolean
31
36
  }
package/contract/types.ts CHANGED
@@ -3,6 +3,8 @@ import {
3
3
  Facet,
4
4
  PostingRequirement,
5
5
  PostingRequirementLabelsMap,
6
+ PostingRequirementsAutocompleteRequestOption,
7
+ StringifiedJSON,
6
8
  } from "../common"
7
9
  import {
8
10
  ContractDirectApplyPostingRequirementQuestionnaireLengthRule,
@@ -35,6 +37,8 @@ export type ContractPurchasePrice = {
35
37
 
36
38
  export type ContractCreateFormCredentials = Record<string, string>
37
39
 
40
+ export type ContractCreateCredentialsValidation = "if_supported"
41
+
38
42
  export type ContractCreateForm = {
39
43
  id?: number | string
40
44
  credentials?: ContractCreateFormCredentials
@@ -48,6 +52,7 @@ export type ContractCreateForm = {
48
52
  allow_renegotiation: boolean
49
53
  labels: Record<string, string> | null
50
54
  posting_requirements_defaults: Record<string, string | string[]> | null
55
+ credentials_validation?: ContractCreateCredentialsValidation
51
56
  }
52
57
 
53
58
  export type ContractEditForm = ContractCreateForm
@@ -56,6 +61,10 @@ export type ContractGroupCreateForm = {
56
61
  name: string
57
62
  }
58
63
 
64
+ export type ContractGroupUpdateForm = {
65
+ name: string
66
+ }
67
+
59
68
  export type ContractChannel = ProductLogos &
60
69
  ProductType & {
61
70
  allows_edit?: boolean
@@ -254,3 +263,22 @@ export type ContractDirectApplyPostingRequirementQuestionnaireQuestionAnswerIgno
254
263
  answer: ContractDirectApplyPostingRequirementQuestionnaireClosedQuestionAnswer
255
264
  ignoreReasons: ContractDirectApplyPostingRequirementQuestionnaireQuestionValidationError[]
256
265
  }
266
+
267
+ export type ContractPostingRequirementsOptionsPayload = [
268
+ string | number, // argument 1 of fn ContractServiceGetContractPostingRequirementOptionsFromCacheOrAPIHandler
269
+ string, // argument 2 of fn ContractServiceGetContractPostingRequirementOptionsFromCacheOrAPIHandler
270
+ PostingRequirementsAutocompleteRequestOption[], // argument 3 of fn ContractServiceGetContractPostingRequirementOptionsFromCacheOrAPIHandler
271
+ ]
272
+ export type ContractPostingRequirementsOptionsMapState = {
273
+ isLoading: boolean
274
+ data: any | null
275
+ lastAccessedDate: string
276
+ }
277
+ export type ContractProductsSupportingContractsMap = Map<
278
+ StringifiedJSON<ContractPostingRequirementsOptionsPayload>,
279
+ ContractPostingRequirementsOptionsMapState
280
+ >
281
+ export type ContractFilterQueryParams = {
282
+ filterChannelName: string
283
+ filterGroupId: string
284
+ }
@@ -3,6 +3,7 @@ import {
3
3
  ContractDirectApplyChannelPrefillVariablesMap,
4
4
  ContractCreateForm,
5
5
  ContractGroupCreateForm,
6
+ ContractFilterQueryParams,
6
7
  } from "./types"
7
8
  import { WindowHapiUtils } from "../_window/utils.types"
8
9
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
@@ -10,6 +11,7 @@ import {
10
11
  ContractDirectApplyChannelName,
11
12
  ContractDirectApplyPostingRequirementQuestionnaireValidationWarningCode,
12
13
  } from "./enums"
14
+ import { PaginationResponseV1 } from "types/common"
13
15
 
14
16
  export type WindowHapiUtilsContract = WindowHapiModuleWithConstructorArgs<
15
17
  {
@@ -21,6 +23,9 @@ export type WindowHapiUtilsContract = WindowHapiModuleWithConstructorArgs<
21
23
  directApplyIgnoreReasonWarning: typeof ContractDirectApplyPostingRequirementQuestionnaireValidationWarningCode
22
24
  getInitialContractForm: () => ContractCreateForm
23
25
  getInitialGroupForm: () => ContractGroupCreateForm
26
+ getContractsQueryParams: (
27
+ params: Partial<ContractFilterQueryParams>,
28
+ ) => URLSearchParams
24
29
  getContractNameWithGroupSuffix: (contract: Contract) => string
25
30
  },
26
31
  { readonly utils: WindowHapiUtils }
package/modal/enums.ts CHANGED
@@ -18,6 +18,8 @@ export enum ModalKeys {
18
18
  basketProductBundleParentClashConfirmation = "basket-product-bundle-parent-clash-confirmation",
19
19
  basketProductBundleChildClashConfirmation = "basket-product-bundle-child-clash-confirmation",
20
20
  contractRemoveConfirmation = "contract-remove-confirmation",
21
+ contractGroupRemoveConfirmation = "contract-group-remove-confirmation",
22
+ contractGroupUpdateConfirmation = "contract-group-update-confirmation",
21
23
  contractEdit = "contract-edit",
22
24
  contractGroupConflictInfo = "contract-group-conflict-info",
23
25
  filePicker = "file-picker",
package/modal/types.ts CHANGED
@@ -28,6 +28,10 @@ export type CampaignProductTakeOfflineConfirmationModalProps = {
28
28
  productId: string
29
29
  }
30
30
  export type ContractRemoveConfirmationModalProps = { contractId: string }
31
+ export type ContractGroupRemoveConfirmationModalProps = {
32
+ groupId: string
33
+ groupIdx: number
34
+ }
31
35
  export type ContractEditJourneyModalProps = { contractId: string }
32
36
  export type ContractGroupConflictInfoModalProps = {
33
37
  contract: Contract
@@ -1,12 +1,13 @@
1
1
  import { WindowHapiUtils } from "../_window/utils.types"
2
2
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
3
- import { ModalKeys } from "./enums"
3
+ import { ModalKeys, ModalZone } from "./enums"
4
4
  import { Modals } from "./types"
5
5
 
6
6
  export type WindowHapiUtilsModal = WindowHapiModuleWithConstructorArgs<
7
7
  {
8
8
  modalKeys: typeof ModalKeys
9
9
  getIsModalOpen: (key: ModalKeys, modals: Modals) => boolean
10
+ getZoneOfOpenModal: (key: ModalKeys, modals: Modals) => ModalZone | null
10
11
  },
11
12
  { readonly utils: WindowHapiUtils }
12
13
  >
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.43.0",
4
+ "version": "1.45.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
@@ -67,6 +67,11 @@ export type ProductServiceSetArbitraryJobTitle = (
67
67
  shouldResetJobFunctionsIds?: boolean,
68
68
  ) => void
69
69
 
70
+ export type ProductServiceGetProductSupportingContractsFromCacheOrAPIHandler = (
71
+ id: string | number,
72
+ forceRefresh?: boolean,
73
+ ) => Promise<ProductSupportingContractsComplete | undefined>
74
+
70
75
  export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
71
76
  {
72
77
  loadMoreProducts: HapiServiceFunctionWithLifecycleHooks<ProductServiceLoadMoreProductsHandler>
@@ -83,6 +88,7 @@ export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
83
88
  getJobTitles: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobTitlesHandler>
84
89
  getJobFunctions: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetJobFunctionsHandler>
85
90
  getIndustries: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetIndustriesHandler>
91
+ getProductSupportingContractsFromCacheOrAPI: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductSupportingContractsFromCacheOrAPIHandler>
86
92
  },
87
93
  { readonly service: WindowHapiService }
88
94
  >
@@ -0,0 +1,5 @@
1
+ import { ProductProductsSupportingContractsMap } from "./types"
2
+
3
+ export type ProductCacheState = {
4
+ productsSupportingContractsMap: ProductProductsSupportingContractsMap
5
+ }
package/product/types.ts CHANGED
@@ -4,12 +4,8 @@ import {
4
4
  ProductSortBy,
5
5
  ProductTypeFilterBy,
6
6
  } from "./enums"
7
- import { ContractCredential, ContractDetails } from "../contract/types"
8
- import {
9
- Facet,
10
- PostingRequirement,
11
- PostingRequirementLabelsMap,
12
- } from "../common"
7
+ import { ContractDetails } from "../contract/types"
8
+ import { StringifiedJSON } from "../common"
13
9
 
14
10
  export type ProductRange = "hours" | "days" | "weeks" | "months"
15
11
 
@@ -171,3 +167,17 @@ export type ProductUserProvidedFilters = Omit<
171
167
  ProductFilterQueryParams,
172
168
  "filterProductRecommendations" | "filterMyContractSupportedOnly"
173
169
  >
170
+
171
+ export type ProductProductsSupportingContractsPayload = [
172
+ string | number, // argument 1 of fn ProductServiceGetProductSupportingContractsFromCacheOrAPIHandler
173
+ ]
174
+
175
+ export type ProductProductsSupportingContractsMapState = {
176
+ isLoading: boolean
177
+ data: ProductSupportingContractsComplete | null
178
+ lastAccessedDate: string
179
+ }
180
+ export type ProductProductsSupportingContractsMap = Map<
181
+ StringifiedJSON<ProductProductsSupportingContractsPayload>,
182
+ ProductProductsSupportingContractsMapState
183
+ >