@vonq/hapi-elements-types 1.3.0 → 1.5.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 (187) hide show
  1. package/enums.ts +41 -0
  2. package/package.json +6 -7
  3. package/src/_window/api.types.ts +59 -0
  4. package/src/_window/auth.types.ts +11 -0
  5. package/src/_window/config.types.ts +30 -0
  6. package/src/_window/events.types.ts +157 -0
  7. package/src/_window/index.ts +16 -0
  8. package/src/_window/instances.types.ts +18 -0
  9. package/src/_window/qa.types.ts +28 -0
  10. package/src/_window/routing.types.ts +21 -0
  11. package/src/_window/sdk.types.ts +147 -0
  12. package/src/_window/service.types.ts +67 -0
  13. package/src/_window/state.types.ts +112 -0
  14. package/src/_window/ui.types.ts +13 -0
  15. package/src/_window/utils.types.ts +34 -0
  16. package/src/_window/validation.types.ts +43 -0
  17. package/src/_window/window.ts +56 -0
  18. package/src/alert/enums.ts +22 -0
  19. package/src/alert/functions.types.ts +13 -0
  20. package/src/alert/index.ts +9 -0
  21. package/src/alert/service.types.ts +15 -0
  22. package/src/alert/state.initial.ts +16 -0
  23. package/src/alert/state.types.ts +27 -0
  24. package/src/alert/state.validations.ts +11 -0
  25. package/src/alert/types.ts +63 -0
  26. package/src/ats/api.types.ts +16 -0
  27. package/src/ats/functions.types.ts +7 -0
  28. package/src/ats/index.ts +9 -0
  29. package/src/ats/service.types.ts +17 -0
  30. package/src/ats/state.initial.ts +5 -0
  31. package/src/ats/state.types.ts +5 -0
  32. package/src/ats/state.validations.ts +6 -0
  33. package/src/ats/types.ts +19 -0
  34. package/src/basket/consts.ts +1 -0
  35. package/src/basket/functions.types.ts +40 -0
  36. package/src/basket/index.ts +12 -0
  37. package/src/basket/service.types.ts +32 -0
  38. package/src/basket/state.initial.ts +11 -0
  39. package/src/basket/state.types.ts +34 -0
  40. package/src/basket/state.validations.ts +12 -0
  41. package/src/basket/types.ts +4 -0
  42. package/src/basket/utils.ts +79 -0
  43. package/src/basket/utils.types.ts +10 -0
  44. package/src/basket/validations.types.ts +25 -0
  45. package/src/campaign/api.types.ts +45 -0
  46. package/src/campaign/consts.ts +1 -0
  47. package/src/campaign/enums.ts +17 -0
  48. package/src/campaign/functions.types.ts +90 -0
  49. package/src/campaign/index.ts +15 -0
  50. package/src/campaign/qa.types.ts +12 -0
  51. package/src/campaign/service.types.ts +48 -0
  52. package/src/campaign/state.initial.ts +84 -0
  53. package/src/campaign/state.types.ts +55 -0
  54. package/src/campaign/state.validations.ts +16 -0
  55. package/src/campaign/types.ts +237 -0
  56. package/src/campaign/utils.ts +53 -0
  57. package/src/campaign/utils.types.ts +59 -0
  58. package/src/campaign/validations.types.ts +215 -0
  59. package/src/common/LocalStorage.ts +123 -0
  60. package/src/common/browser.ts +2 -0
  61. package/src/common/color.ts +9 -0
  62. package/src/common/events/EventCommand/enums.ts +49 -0
  63. package/src/common/events/EventCommand/index.ts +4 -0
  64. package/src/common/events/EventCommand/types.ts +18 -0
  65. package/src/common/events/index.ts +4 -0
  66. package/src/common/events/types.ts +52 -0
  67. package/src/common/immutable.ts +28 -0
  68. package/src/common/index.ts +22 -0
  69. package/src/common/instances/Instance.ts +13 -0
  70. package/src/common/instances/consts.ts +1 -0
  71. package/src/common/instances/index.ts +4 -0
  72. package/src/common/json.ts +25 -0
  73. package/src/common/logger/Logger.ts +70 -0
  74. package/src/common/logger/enums.ts +12 -0
  75. package/src/common/logger/index.ts +5 -0
  76. package/src/common/logger/types.ts +7 -0
  77. package/src/common/logger-datadog/LoggerDatadog.ts +42 -0
  78. package/src/common/logger-datadog/index.ts +3 -0
  79. package/src/common/misc.ts +114 -0
  80. package/src/common/promise.ts +161 -0
  81. package/src/common/proxy.ts +77 -0
  82. package/src/common/qa.types.ts +9 -0
  83. package/src/common/regExTest.ts +12 -0
  84. package/src/common/tree.ts +148 -0
  85. package/src/common/types.ts +110 -0
  86. package/src/common/utm.ts +19 -0
  87. package/src/common/validations.types.ts +89 -0
  88. package/src/common/validators.ts +21 -0
  89. package/src/common/webComponents.ts +26 -0
  90. package/src/config/functions.types.ts +23 -0
  91. package/src/config/index.ts +5 -0
  92. package/src/config/state.initial.ts +11 -0
  93. package/src/config/state.types.ts +15 -0
  94. package/src/consts.ts +980 -0
  95. package/src/contract/api.types.ts +47 -0
  96. package/src/contract/consts.ts +1 -0
  97. package/src/contract/functions.types.ts +112 -0
  98. package/src/contract/index.ts +14 -0
  99. package/src/contract/qa.types.ts +12 -0
  100. package/src/contract/service.types.ts +54 -0
  101. package/src/contract/state.initial.ts +39 -0
  102. package/src/contract/state.types.ts +74 -0
  103. package/src/contract/state.validations.ts +21 -0
  104. package/src/contract/types.ts +145 -0
  105. package/src/contract/utils.ts +36 -0
  106. package/src/contract/utils.types.ts +11 -0
  107. package/src/contract/validations.types.ts +104 -0
  108. package/src/debugging/functions.types.ts +34 -0
  109. package/src/debugging/index.ts +6 -0
  110. package/src/debugging/state.initial.ts +10 -0
  111. package/src/debugging/state.types.ts +18 -0
  112. package/src/debugging/state.validations.ts +10 -0
  113. package/src/index.ts +22 -0
  114. package/src/language/consts.ts +6 -0
  115. package/src/language/en.ts +530 -0
  116. package/src/language/functions.types.ts +29 -0
  117. package/src/language/index.ts +11 -0
  118. package/src/language/qa.types.ts +19 -0
  119. package/src/language/state.initial.ts +13 -0
  120. package/src/language/state.types.ts +25 -0
  121. package/src/language/state.validations.ts +10 -0
  122. package/src/language/utils.ts +17 -0
  123. package/src/language/validations.types.ts +13 -0
  124. package/src/modal/consts.ts +6 -0
  125. package/src/modal/enums.ts +14 -0
  126. package/src/modal/functions.types.ts +22 -0
  127. package/src/modal/index.ts +11 -0
  128. package/src/modal/service.types.ts +32 -0
  129. package/src/modal/state.initial.ts +9 -0
  130. package/src/modal/state.types.ts +8 -0
  131. package/src/modal/state.validations.ts +6 -0
  132. package/src/modal/store.types.ts +5 -0
  133. package/src/modal/types.ts +44 -0
  134. package/src/orderJourney/consts.ts +289 -0
  135. package/src/orderJourney/enums.ts +25 -0
  136. package/src/orderJourney/functions.types.ts +140 -0
  137. package/src/orderJourney/index.ts +13 -0
  138. package/src/orderJourney/qa.types.ts +16 -0
  139. package/src/orderJourney/state.initial.ts +401 -0
  140. package/src/orderJourney/state.types.ts +99 -0
  141. package/src/orderJourney/state.validations.ts +78 -0
  142. package/src/orderJourney/types.ts +31 -0
  143. package/src/orderJourney/utils.ts +7 -0
  144. package/src/orderJourney/utils.types.ts +11 -0
  145. package/src/orderJourney/validations.types.ts +34 -0
  146. package/src/product/api.types.ts +62 -0
  147. package/src/product/consts.ts +1 -0
  148. package/src/product/enums.ts +11 -0
  149. package/src/product/functions.types.ts +156 -0
  150. package/src/product/index.ts +14 -0
  151. package/src/product/qa.types.ts +11 -0
  152. package/src/product/service.types.ts +68 -0
  153. package/src/product/state.initial.ts +28 -0
  154. package/src/product/state.types.ts +93 -0
  155. package/src/product/state.validations.ts +25 -0
  156. package/src/product/types.ts +161 -0
  157. package/src/product/utils.types.ts +22 -0
  158. package/src/product/validations.types.ts +189 -0
  159. package/src/routing/functions.types.ts +48 -0
  160. package/src/routing/index.ts +5 -0
  161. package/src/routing/state.initial.ts +10 -0
  162. package/src/routing/state.types.ts +30 -0
  163. package/src/theming/consts.ts +7727 -0
  164. package/src/theming/functions.types.ts +13 -0
  165. package/src/theming/index.ts +11 -0
  166. package/src/theming/qa.types.ts +11 -0
  167. package/src/theming/state.initial.ts +16 -0
  168. package/src/theming/state.types.ts +6 -0
  169. package/src/theming/state.validations.ts +8 -0
  170. package/src/theming/types.ts +123 -0
  171. package/src/theming/utils.ts +581 -0
  172. package/src/theming/validations.types.ts +62 -0
  173. package/src/types.ts +229 -0
  174. package/src/ui/index.ts +3 -0
  175. package/src/ui/service.types.ts +26 -0
  176. package/src/utils.ts +3 -0
  177. package/src/wallet/api.types.ts +33 -0
  178. package/src/wallet/consts.ts +3 -0
  179. package/src/wallet/functions.types.ts +58 -0
  180. package/src/wallet/index.ts +11 -0
  181. package/src/wallet/service.types.ts +26 -0
  182. package/src/wallet/state.initial.ts +18 -0
  183. package/src/wallet/state.types.ts +58 -0
  184. package/src/wallet/state.validations.ts +18 -0
  185. package/src/wallet/types.ts +65 -0
  186. package/src/wallet/validations.types.ts +18 -0
  187. package/tsconfig.json +41 -0
@@ -0,0 +1,161 @@
1
+ import { ProductFilterRecommendations, ProductPriceCurrency } from "./enums"
2
+ import {
3
+ ContractCredential,
4
+ ContractFacet,
5
+ ContractPostingRequirement,
6
+ } from "../contract/types"
7
+
8
+ export type ProductRange = "hours" | "days" | "weeks" | "months"
9
+
10
+ export type ProductIndustry = {
11
+ id: number
12
+ name: string
13
+ }
14
+
15
+ export type ProductLocationPartial = {
16
+ id: number
17
+ canonical_name: string
18
+ }
19
+
20
+ export type ProductLogoUrl = {
21
+ url: string
22
+ }
23
+
24
+ export type ProductLogoUrlWithSize = ProductLogoUrl & {
25
+ size: string
26
+ }
27
+
28
+ export type ProductPrice = {
29
+ amount: number
30
+ currency: ProductPriceCurrency
31
+ }
32
+
33
+ export type ProductDuration = {
34
+ range: ProductRange
35
+ period: number
36
+ }
37
+
38
+ export type ProductSupportingContractsPartial = {
39
+ id: number
40
+ name: string
41
+ url: string
42
+ type: string
43
+ mc_enabled: boolean
44
+ }
45
+ export type Product = {
46
+ allow_orders: boolean
47
+ audience_group: "niche" | "generic"
48
+ cross_postings: string[]
49
+ channel: ProductSupportingContractsPartial
50
+ description: string | null
51
+ title: string
52
+ duration: ProductDuration
53
+ homepage: string | null
54
+ industries: ProductIndustry[]
55
+ job_functions: ProductJobFunctionPartial[]
56
+ locations: ProductLocationPartial[]
57
+ mc_enabled: boolean
58
+ mc_only: boolean
59
+ product_id: string
60
+ ratecard_price: ProductPrice[]
61
+ vonq_price: ProductPrice[]
62
+ time_to_process: ProductDuration
63
+ time_to_setup: ProductDuration
64
+ } & ProductLogos &
65
+ ProductType
66
+
67
+ export type ProductType = {
68
+ type:
69
+ | "aggregator"
70
+ | "job board"
71
+ | "service"
72
+ | "social media"
73
+ | "publication"
74
+ | "community"
75
+ }
76
+
77
+ export type ProductLogos = {
78
+ logo_rectangle_url?: ProductLogoUrlWithSize[] | null
79
+ logo_square_url?: ProductLogoUrlWithSize[] | null
80
+ logo_url?: ProductLogoUrl[] | null
81
+ }
82
+
83
+ export type ProductJobFunctionPartial = {
84
+ id: number
85
+ name: string
86
+ }
87
+
88
+ export type ProductJobFunction = {
89
+ children?: ProductJobFunction[]
90
+ } & ProductJobFunctionPartial
91
+
92
+ export type ProductJobTitle = {
93
+ id: number
94
+ name: string
95
+ job_function: ProductJobFunctionPartial | null
96
+ }
97
+
98
+ export type ProductLocationPlaceType =
99
+ | "world"
100
+ | "continent"
101
+ | "country"
102
+ | "region"
103
+
104
+ export type ProductLocation = {
105
+ bounding_box: any[]
106
+ place_type: ProductLocationPlaceType[]
107
+ fully_qualified_place_name: string
108
+ within?: ProductLocation
109
+ } & ProductLocationPartial
110
+
111
+ export type ProductFilterQueryParams = {
112
+ productNameInput: string
113
+ locationsIdsSelected: number[]
114
+ jobTitlesIdsSelected: number[]
115
+ jobFunctionsIdsSelected: number[]
116
+ jobIndustriesIdsSelected: number[]
117
+ filterProductRecommendations: ProductFilterRecommendations
118
+ filterMyContractSupportedOnly: boolean
119
+ }
120
+
121
+ export type ProductSearchFilters = {
122
+ currency?: string //ISO-4217
123
+ durationFrom?: string //number of days
124
+ durationTo?: string //number of days
125
+ exactLocationId?: string // Location ID
126
+ excludeRecommended?: boolean
127
+ includeLocationId?: string //regular string or comma seperated string
128
+ industryId?: string
129
+ jobFunctionId?: string
130
+ jobTitleId?: string //can't be used with jobFunctionId
131
+ mcEnabled?: boolean
132
+ name?: string
133
+ recommended?: boolean
134
+ sortBy?:
135
+ | "relevant"
136
+ | "recent"
137
+ | "order_frequency.desc"
138
+ | "order_frequency.asc"
139
+ | "created.desc"
140
+ | "created.asc"
141
+ | "list_price.desc"
142
+ | "list_price.asc"
143
+ }
144
+
145
+ export type ProductWithSupportForContractsFilters = {
146
+ search?: string
147
+ }
148
+ export type ProductSupportingContractsComplete = ProductLogos &
149
+ ProductSupportingContractsPartial & {
150
+ contract_credentials: ContractCredential[]
151
+ contract_facets?: ContractFacet[]
152
+ feed_url: string | null
153
+ manual_setup_required: boolean
154
+ posting_requirements: ContractPostingRequirement[]
155
+ setup_instructions: string //html;
156
+ }
157
+
158
+ export type ProductUserProvidedFilters = Omit<
159
+ ProductFilterQueryParams,
160
+ "filterProductRecommendations" | "filterMyContractSupportedOnly"
161
+ >
@@ -0,0 +1,22 @@
1
+ import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
2
+ import { PaginationResponseV1 } from "../common/types"
3
+ import { ModuleWithConstructorArgs } from "../types"
4
+ import {
5
+ OrderJourneyPaymentMethod,
6
+ OrderJourneyStepKey,
7
+ } from "../orderJourney/enums"
8
+ import { WindowHapiUtils } from "../_window/utils.types"
9
+
10
+ export type WindowHapiUtilsProduct = ModuleWithConstructorArgs<
11
+ {
12
+ getUserProvidedFilters: () => ProductUserProvidedFilters
13
+ getProductsQueryParams: (
14
+ params: Partial<ProductFilterQueryParams>,
15
+ paginationOptions?: PaginationResponseV1 | null,
16
+ ) => URLSearchParams
17
+ getNextPageOffsetAndLimit: (
18
+ meta: PaginationResponseV1,
19
+ ) => PaginationResponseV1
20
+ },
21
+ { readonly utils: WindowHapiUtils }
22
+ >
@@ -0,0 +1,189 @@
1
+ import {
2
+ ZodAny,
3
+ ZodArray,
4
+ ZodBoolean,
5
+ ZodNullable,
6
+ ZodNumber,
7
+ ZodObject,
8
+ ZodOptional,
9
+ ZodString,
10
+ } from "zod"
11
+ import { ProductPriceCurrency } from "./enums"
12
+ import { ZodPaginationResponseV1 } from "../common/validations.types"
13
+
14
+ export type ZodProductCrossPosting = ZodString
15
+ export type ZodProductCrossPostings = ZodArray<ZodProductCrossPosting>
16
+ export type ZodProductDescription = ZodString
17
+ export type ZodProductHomepage = ZodString
18
+
19
+ export type ZodProductChannel = ZodObject<{
20
+ id: ZodNumber
21
+ name: ZodString
22
+ url: ZodString
23
+ type: ZodString
24
+ mc_enabled: ZodBoolean
25
+ }>
26
+
27
+ export type ZodProductDuration = ZodObject<{
28
+ range: ZodString
29
+ period: ZodNumber
30
+ }>
31
+
32
+ export type ZodProductIndustry = ZodObject<{
33
+ id: ZodNumber
34
+ name: ZodString
35
+ }>
36
+ export type ZodProductIndustries = ZodArray<ZodProductIndustry>
37
+
38
+ export type ZodProductJobFunction = ZodObject<{
39
+ id: ZodNumber
40
+ name: ZodString
41
+ }>
42
+ export type ZodProductJobFunctions = ZodArray<ZodProductJobFunction>
43
+ export type ZodProductLocationPartial = ZodObject<{
44
+ id: ZodNumber
45
+ canonical_name: ZodString
46
+ }>
47
+ export type ZodProductLocationsPartial = ZodArray<ZodProductLocationPartial>
48
+ export type ZodProductLocationBoundingBox = ZodAny
49
+ export type ZodProductLocationBoundingBoxes =
50
+ ZodArray<ZodProductLocationBoundingBox>
51
+ export type ZodProductLocationPlaceType = ZodString
52
+ export type ZodProductLocationPlaceTypes = ZodArray<ZodProductLocationPlaceType>
53
+ export type ZodProductLocation = ZodObject<{
54
+ bounding_box: ZodProductLocationBoundingBoxes
55
+ place_type: ZodProductLocationPlaceTypes
56
+ fully_qualified_place_name: ZodString
57
+ within: ZodOptional<ZodAny>
58
+ canonical_name: ZodString
59
+ id: ZodNumber
60
+ }>
61
+ export type ZodProductLocations = ZodArray<ZodProductLocation>
62
+ export type ZodProductPrice = ZodObject<{
63
+ amount: ZodNumber
64
+ currency: ZodString
65
+ }>
66
+ export type ZodProductPrices = ZodArray<ZodProductPrice>
67
+ export type ZodProductLogoWithSize = ZodObject<{
68
+ size: ZodString
69
+ url: ZodString
70
+ }>
71
+ export type ZodProductLogosWithSizes = ZodArray<ZodProductLogoWithSize>
72
+ export type ZodProductLogoUrl = ZodObject<{
73
+ url: ZodString
74
+ }>
75
+ export type ZodProductLogoUrls = ZodArray<ZodProductLogoUrl>
76
+ export type ZodProductJobTitle = ZodObject<{
77
+ id: ZodNumber
78
+ name: ZodString
79
+ }>
80
+ export type ZodProductJobTitles = ZodArray<ZodProductJobTitle>
81
+ export type ZodProductFilters = ZodObject<{
82
+ currency: ZodOptional<ZodString>
83
+ durationFrom: ZodOptional<ZodString>
84
+ durationTo: ZodOptional<ZodString>
85
+ exactLocationId: ZodOptional<ZodString>
86
+ excludeRecommended: ZodOptional<ZodBoolean>
87
+ includeLocationId: ZodOptional<ZodString>
88
+ industryId: ZodOptional<ZodString>
89
+ jobFunctionId: ZodOptional<ZodString>
90
+ jobTitleId: ZodOptional<ZodString>
91
+ mcEnabled: ZodOptional<ZodBoolean>
92
+ name: ZodOptional<ZodString>
93
+ recommended: ZodOptional<ZodBoolean>
94
+ sortBy: ZodOptional<ZodString>
95
+ }>
96
+ export type ZodProductWithSupportForContractsFilters = ZodObject<{
97
+ search: ZodString
98
+ }>
99
+
100
+ export type ZodProduct = ZodObject<{
101
+ allow_orders: ZodBoolean
102
+ audience_group: ZodString
103
+ cross_postings: ZodProductCrossPostings
104
+ channel: ZodNullable<ZodProductChannel>
105
+ description: ZodNullable<ZodProductDescription>
106
+ duration: ZodProductDuration
107
+ homepage: ZodNullable<ZodProductHomepage>
108
+ industries: ZodProductIndustries
109
+ job_functions: ZodProductJobFunctions
110
+ locations: ZodProductLocationsPartial
111
+ mc_enabled: ZodBoolean
112
+ mc_only: ZodBoolean
113
+ product_id: ZodString
114
+ ratecard_price: ZodProductPrices
115
+ vonq_price: ZodProductPrices
116
+ title: ZodString
117
+ time_to_process: ZodProductDuration
118
+ time_to_setup: ZodProductDuration
119
+ logo_rectangle_url: ZodOptional<ZodNullable<ZodProductLogosWithSizes>>
120
+ logo_square_url: ZodOptional<ZodNullable<ZodProductLogosWithSizes>>
121
+ logo_url: ZodOptional<ZodNullable<ZodProductLogoUrls>>
122
+ type: ZodNullable<ZodString>
123
+ }>
124
+
125
+ export type ZodProducts = ZodArray<ZodProduct>
126
+
127
+ export type ZodProductWithContractSupport = ZodObject<{
128
+ id: ZodNumber
129
+ name: ZodString
130
+ url: ZodString
131
+ type: ZodString
132
+ mc_enabled: ZodBoolean
133
+ }>
134
+
135
+ export type ZodProductWithContractSupportComplete = ZodObject<{
136
+ url: ZodString
137
+ type: ZodString
138
+ setup_instructions: ZodString
139
+ posting_requirements: ZodArray<ZodAny>
140
+ manual_setup_required: ZodBoolean
141
+ feed_url: ZodNullable<ZodString>
142
+ contract_facets: ZodOptional<ZodArray<ZodAny>>
143
+ contract_credentials: ZodArray<ZodAny>
144
+ id: ZodNumber
145
+ name: ZodString
146
+ mc_enabled: ZodBoolean
147
+ logo_rectangle_url: ZodOptional<ZodNullable<ZodProductLogosWithSizes>>
148
+ logo_square_url: ZodOptional<ZodNullable<ZodProductLogosWithSizes>>
149
+ logo_url: ZodOptional<ZodNullable<ZodProductLogoUrls>>
150
+ }>
151
+ export type WindowHapiValidationsProduct = {
152
+ type: string[]
153
+ typeRegex: RegExp
154
+ audienceGroup: string[]
155
+ audienceGroupRegex: RegExp
156
+ range: string[]
157
+ rangeRegex: RegExp
158
+ currencies: ProductPriceCurrency[]
159
+ currencyRegex: RegExp
160
+ currency: ZodString
161
+ searchSortBy: string[]
162
+ searchSortByRegex: RegExp
163
+ placeTypes: string[]
164
+ placeTypesRegex: RegExp
165
+ logoWithSize: ZodProductLogoWithSize
166
+ logo: ZodProductLogoUrl
167
+ channel: ZodProductChannel
168
+ duration: ZodProductDuration
169
+ industry: ZodProductIndustry
170
+ industries: ZodProductIndustries
171
+ jobFunction: ZodProductJobFunction
172
+ jobFunctions: ZodProductJobFunctions
173
+ location: ZodProductLocationPartial
174
+ locations: ZodProductLocationsPartial
175
+ price: ZodProductPrice
176
+ prices: ZodProductPrices
177
+ product: ZodProduct
178
+ products: ZodProducts
179
+ productWithContractSupport: ZodProductWithContractSupport
180
+ productsWithContractSupport: ZodArray<ZodProductWithContractSupport>
181
+ productWithContractSupportComplete: ZodProductWithContractSupportComplete
182
+ productLocation: ZodProductLocation
183
+ productLocations: ZodProductLocations
184
+ jobTitle: ZodProductJobTitle
185
+ jobTitles: ZodProductJobTitles
186
+ filters: ZodProductFilters
187
+ filterForContracts: ZodProductWithSupportForContractsFilters
188
+ productsPaginationMeta: ZodNullable<ZodPaginationResponseV1>
189
+ }
@@ -0,0 +1,48 @@
1
+ export type RouterStoreSetParentWindowQueryParamsHandler = (
2
+ params: Record<string, string>,
3
+ ) => void
4
+ export type RouterStoreSetParentWindowPathnameHandler = (
5
+ pathname: string,
6
+ ) => void
7
+ export type RouterStoreSetParentWindowOriginHandler = (origin: string) => void
8
+ export type RouterStoreSetLastScrollPositionHandler = (position: number) => void
9
+ export type RouterStoreSetRedirectUrlHandler = (url?: string) => void
10
+ export type RouterStoreSetIsRedirectingHandler = (
11
+ isRedirecting: boolean,
12
+ ) => void
13
+ export type RouterStoreSetCurrentRoutePathNameHandler = (
14
+ pathname: string,
15
+ ) => void
16
+ export type RouterStoreSetPreviousRoutePathNameHandler = (
17
+ pathname: string,
18
+ ) => void
19
+ export type RouterStoreSetCurrentAsPathHandler = (pathname: string) => void
20
+ export type RouterStoreSetPreviousAsPathHandler = (pathname: string) => void
21
+ export type RouterStoreSetPreviousHashHandler = (
22
+ hash: string | undefined,
23
+ ) => void
24
+ export type RouterStoreSetCurrentHashHandler = (
25
+ hash: string | undefined,
26
+ ) => void
27
+ export type RouterStoreFunctions = {
28
+ /**
29
+ * The function that sets the value of `lastScrollPosition`. Refer to [RouterStoreState](/docs/api/modules#routertorestate) for more details. **This function is called automatically when route changes and should not be called from outside**
30
+ */
31
+ setLastScrollPosition: RouterStoreSetLastScrollPositionHandler
32
+ /**
33
+ * The function that sets the value of `redirectUrl`. Refer to [RouterStoreState](/docs/api/modules#routertorestate) for more details.
34
+ */
35
+ setRedirectUrl: RouterStoreSetRedirectUrlHandler
36
+ /**
37
+ * The function that sets the value of `isRedirecting`. Refer to [RouterStoreState](/docs/api/modules#routertorestate) for more details.
38
+ */
39
+ setIsRedirecting: RouterStoreSetIsRedirectingHandler
40
+ /**
41
+ * The function that sets the value of `currentAsPath`. Refer to [RouterStoreState](/docs/api/modules#routertorestate) for more details. **This function is called automatically when route changes and should not be called from outside**
42
+ */
43
+ setCurrentAsPath: RouterStoreSetCurrentAsPathHandler
44
+ /**
45
+ * The function that sets the value of `previousAsPath`. Refer to [RouterStoreState](/docs/api/modules#routertorestate) for more details. **This function is called automatically when route changes and should not be called from outside**
46
+ */
47
+ setPreviousAsPath: RouterStoreSetPreviousAsPathHandler
48
+ }
@@ -0,0 +1,5 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './functions.types';
4
+ export * from './state.initial';
5
+ export * from './state.types';
@@ -0,0 +1,10 @@
1
+ import { RouterStoreState } from "./state.types"
2
+ import { isBrowser } from "../common/browser"
3
+
4
+ export const initialRouterStoreState: RouterStoreState = {
5
+ currentAsPath: isBrowser ? window.location.pathname : "",
6
+ previousAsPath: isBrowser ? window.location.pathname : "",
7
+ redirectUrl: "",
8
+ isRedirecting: false,
9
+ lastScrollPosition: 0,
10
+ }
@@ -0,0 +1,30 @@
1
+ export type RouteTransitionOptions = {
2
+ shallow?: boolean
3
+ }
4
+ export type RouterState = {
5
+ url: string
6
+ as: string
7
+ options: RouteTransitionOptions
8
+ }
9
+ export type RouterStoreState = {
10
+ /**
11
+ * Holds the current route "asPath" (NextJS Router related) path URL
12
+ */
13
+ currentAsPath: string
14
+ /**
15
+ * Holds the previous route "asPath" (NextJS Router related) path URL
16
+ */
17
+ previousAsPath: string
18
+ /**
19
+ * Specifies a redirectUrl to land on after a certain action is completed
20
+ */
21
+ redirectUrl: string | undefined
22
+ /**
23
+ * Shows loading spinner while user is being redirected
24
+ */
25
+ isRedirecting: boolean
26
+ /**
27
+ * Captures lastScrollPosition in Y axis before a route changes, useful when the position is going to be restored later
28
+ */
29
+ lastScrollPosition: number
30
+ }