@vonq/hapi-elements-types 1.21.0 → 1.23.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 (98) hide show
  1. package/_window/api.types.ts +12 -13
  2. package/_window/index.ts.bak +16 -0
  3. package/_window/sdk.types.ts +5 -2
  4. package/_window/service.types.ts +6 -16
  5. package/_window/state.types.ts +0 -24
  6. package/_window/utils.types.ts +3 -0
  7. package/_window/window.ts +2 -1
  8. package/alert/index.ts +4 -4
  9. package/alert/index.ts.bak +6 -0
  10. package/ats/index.ts +4 -4
  11. package/ats/index.ts.bak +6 -0
  12. package/ats/types.ts +7 -1
  13. package/basket/index.ts +5 -5
  14. package/basket/index.ts.bak +7 -0
  15. package/basket/service.types.ts +1 -1
  16. package/basket/utils.types.ts +6 -2
  17. package/campaign/api.types.ts +5 -1
  18. package/campaign/enums.ts +0 -3
  19. package/campaign/index.ts +8 -8
  20. package/campaign/index.ts.bak +10 -0
  21. package/campaign/service.types.ts +14 -0
  22. package/campaign/types.ts +31 -21
  23. package/campaign/utils.types.ts +1 -0
  24. package/campaign/validations.types.ts +15 -1
  25. package/common/enums.ts +0 -4
  26. package/common/events/EventCommand/index.ts.bak +4 -0
  27. package/common/events/index.ts.bak +4 -0
  28. package/common/index.ts +7 -5
  29. package/common/index.ts.bak +7 -0
  30. package/common/logger/index.ts +4 -0
  31. package/common/types.ts +16 -1
  32. package/common/validations.types.ts +2 -0
  33. package/common/validator/index.ts +3 -0
  34. package/contract/api.types.ts +1 -0
  35. package/contract/index.ts +7 -7
  36. package/contract/index.ts.bak +9 -0
  37. package/contract/service.types.ts +7 -1
  38. package/contract/state.types.ts +1 -0
  39. package/contract/types.ts +2 -0
  40. package/contract/validations.types.ts +1 -0
  41. package/debugging/index.ts +3 -2
  42. package/debugging/index.ts.bak +4 -0
  43. package/index.ts +16 -16
  44. package/index.ts.bak +18 -0
  45. package/language/enums.ts +5 -0
  46. package/language/index.ts +6 -3
  47. package/language/index.ts.bak +5 -0
  48. package/language/service.types.ts +7 -0
  49. package/language/state.types.ts +3 -1
  50. package/language/utils.types.ts +11 -0
  51. package/modal/enums.ts +3 -3
  52. package/modal/index.ts +5 -4
  53. package/modal/index.ts.bak +6 -0
  54. package/modal/types.ts +11 -8
  55. package/orderJourney/index.ts +7 -6
  56. package/orderJourney/index.ts.bak +8 -0
  57. package/orderJourney/qa.types.ts +3 -1
  58. package/orderJourney/service.types.ts +2 -8
  59. package/orderJourney/state.types.ts +31 -7
  60. package/orderJourney/types.ts +107 -8
  61. package/orderJourney/validations.types.ts +13 -2
  62. package/package.json +2 -3
  63. package/product/index.ts +8 -8
  64. package/product/index.ts.bak +10 -0
  65. package/product/types.ts +6 -1
  66. package/product/validations.types.ts +1 -0
  67. package/routing/index.ts +2 -1
  68. package/routing/index.ts.bak +3 -0
  69. package/theming/index.ts +4 -4
  70. package/theming/index.ts.bak +6 -0
  71. package/theming/types.ts +44 -0
  72. package/theming/validations.types.ts +16 -0
  73. package/ui/index.ts.bak +3 -0
  74. package/wallet/index.ts +5 -5
  75. package/wallet/index.ts.bak +7 -0
  76. package/wallet/state.types.ts +1 -1
  77. package/wallet/types.ts +6 -1
  78. package/talentMindCompany/api.types.ts +0 -18
  79. package/talentMindCompany/service.types.ts +0 -15
  80. package/talentMindCompany/state.types.ts +0 -5
  81. package/talentMindCompany/types.ts +0 -6
  82. package/talentMindCompany/validations.types.ts +0 -5
  83. package/talentMindEvaluation/api.types.ts +0 -25
  84. package/talentMindEvaluation/service.types.ts +0 -25
  85. package/talentMindEvaluation/state.types.ts +0 -6
  86. package/talentMindEvaluation/types.ts +0 -15
  87. package/talentMindEvaluation/validations.types.ts +0 -5
  88. package/talentMindJob/api.types.ts +0 -26
  89. package/talentMindJob/service.types.ts +0 -28
  90. package/talentMindJob/state.types.ts +0 -6
  91. package/talentMindJob/types.ts +0 -12
  92. package/talentMindJob/validations.types.ts +0 -5
  93. package/talentMindResume/api.types.ts +0 -30
  94. package/talentMindResume/service.types.ts +0 -34
  95. package/talentMindResume/state.types.ts +0 -6
  96. package/talentMindResume/types.ts +0 -119
  97. package/talentMindResume/validations.types.ts +0 -5
  98. package/tsconfig.json +0 -36
@@ -61,8 +61,7 @@ export type OrderJourneyUTMStepValidations = {
61
61
  }
62
62
  }
63
63
  >
64
- areAllValid: boolean
65
- }
64
+ } & UseValidatorResult
66
65
 
67
66
  export type OrderJourneyOrderReviewStepData = {
68
67
  accordionsOpen: OrderJourneyStepKey[]
@@ -87,15 +86,94 @@ export type OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid
87
86
  has_errors: boolean
88
87
  }
89
88
 
90
- export type OrderJourneyOrderErrorsCampaignIsInvalid = {
91
- postingDetails: Record<string, any>
92
- recruiterInfo: Record<string, any>
93
- targetGroup: Record<string, any>
94
- orderedProducts: string[]
89
+ export type OrderJourneyOrderErrorsRecruiterInfo = {
90
+ name?: string[]
91
+ emailAddress?: string[]
92
+ }
93
+
94
+ export type OrderJourneyOrderErrorsTargetGroup = string[]
95
+
96
+ export type OrderJourneyOrderErrorsPostingDetailsOrganization = {
97
+ organization?: {
98
+ name?: string[]
99
+ companyLogo?: string[]
100
+ }
101
+ }
102
+
103
+ export type OrderJourneyOrderErrorsPostingDetailsWorkingLocation = {
104
+ workingLocation?: {
105
+ addressLine1?: string[]
106
+ addressLine2?: string[]
107
+ city?: string[]
108
+ country?: string[]
109
+ postcode?: string[]
110
+ }
111
+ }
112
+
113
+ export type OrderJourneyOrderErrorsPostingDetailsURLs = {
114
+ jobPageUrl?: string[]
115
+ applicationUrl?: string[]
116
+ }
117
+
118
+ export type OrderJourneyOrderErrorsPostingDetailsBase = {
119
+ title?: string[]
120
+ description?: string[]
121
+ employmentType?: string[]
122
+ salaryIndication?: {
123
+ period?: string[]
124
+ to?: string[]
125
+ from?: string[]
126
+ currency?: string[]
127
+ }
128
+ weeklyWorkingHours?: {
129
+ from?: string[]
130
+ to?: string[]
131
+ }
132
+ }
133
+
134
+ export type OrderJourneyOrderErrorsPostingDetails =
135
+ OrderJourneyOrderErrorsPostingDetailsOrganization &
136
+ OrderJourneyOrderErrorsPostingDetailsWorkingLocation &
137
+ OrderJourneyOrderErrorsPostingDetailsURLs &
138
+ OrderJourneyOrderErrorsPostingDetailsBase
139
+
140
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithPostingDetails = {
141
+ postingDetails?: OrderJourneyOrderErrorsPostingDetails
142
+ }
143
+
144
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithRecruiterInfo = {
145
+ recruiterInfo?: OrderJourneyOrderErrorsRecruiterInfo
146
+ }
147
+
148
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithTargetGroup = {
149
+ targetGroup?: OrderJourneyOrderErrorsTargetGroup
150
+ }
151
+
152
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithOrderedProducts = {
153
+ orderedProducts?: string[]
154
+ }
155
+
156
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithPaymentMethod = {
157
+ paymentMethod?: string[]
158
+ }
159
+
160
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithOrderedProductsSpecs = {
95
161
  orderedProductsSpecs?: any[]
96
- walletId: string
97
162
  }
98
163
 
164
+ export type OrderJourneyOrderErrorsCampaignIsInvalidWithWalletId = {
165
+ walletId?: string
166
+ }
167
+
168
+ export type OrderJourneyOrderErrorsCampaignIsInvalid =
169
+ OrderJourneyOrderErrorsCampaignIsInvalidWithPostingDetails &
170
+ OrderJourneyOrderErrorsCampaignIsInvalidWithRecruiterInfo &
171
+ OrderJourneyOrderErrorsCampaignIsInvalidWithTargetGroup &
172
+ OrderJourneyOrderErrorsCampaignIsInvalidWithOrderedProducts &
173
+ OrderJourneyOrderErrorsCampaignIsInvalidWithOrderedProductsSpecs &
174
+ OrderJourneyOrderErrorsCampaignIsInvalidWithWalletId &
175
+ OrderJourneyOrderErrorsCampaignIsInvalidWithPaymentMethod
176
+
99
177
  // HAPI Backend validation works in this order:
100
178
  // - it validates the campaign first, if campaign itself is not valid, it does not validate the posting requirements at all
101
179
  // - if campaign is valid, then it validates posting requirements
@@ -104,3 +182,24 @@ export type OrderJourneyOrderErrorsCampaignIsInvalid = {
104
182
  export type OrderJourneyOrderErrors =
105
183
  | OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid
106
184
  | OrderJourneyOrderErrorsCampaignIsInvalid
185
+
186
+ export type OrderJourneyStepMap = {
187
+ [OrderJourneyStepKey.searchRecommendProducts]: OrderJourneyStep
188
+ [OrderJourneyStepKey.selectProducts]: OrderJourneyStep
189
+ [OrderJourneyStepKey.addContracts]: OrderJourneyStep
190
+ [OrderJourneyStepKey.selectContracts]: OrderJourneyStep
191
+ [OrderJourneyStepKey.basketSummary]: OrderJourneyStep
192
+ [OrderJourneyStepKey.targetGroup]: OrderJourneyStep
193
+ [OrderJourneyStepKey.recruiterInfo]: OrderJourneyStep
194
+ [OrderJourneyStepKey.postingDetails]: OrderJourneyStep
195
+ [OrderJourneyStepKey.postingOrganization]: OrderJourneyStep
196
+ [OrderJourneyStepKey.postingContactInfo]: OrderJourneyStep
197
+ [OrderJourneyStepKey.postingWorkingLocation]: OrderJourneyStep
198
+ [OrderJourneyStepKey.postingURLs]: OrderJourneyStep
199
+ [OrderJourneyStepKey.contractChannelPostingRequirements]: OrderJourneyContractStep[]
200
+ [OrderJourneyStepKey.productChannelPostingRequirements]: OrderJourneyProductStep[]
201
+ [OrderJourneyStepKey.postingUTMCodes]: OrderJourneyStep
202
+ [OrderJourneyStepKey.orderReview]: OrderJourneyStep
203
+ [OrderJourneyStepKey.paymentMethod]: OrderJourneyStep
204
+ [OrderJourneyStepKey.orderConfirmation]: OrderJourneyStep
205
+ }
@@ -2,6 +2,7 @@ import {
2
2
  ZodArray,
3
3
  ZodBoolean,
4
4
  ZodNativeEnum,
5
+ ZodNullable,
5
6
  ZodObject,
6
7
  ZodOptional,
7
8
  ZodRecord,
@@ -21,7 +22,9 @@ export type ZodOrderJourneyStep = ZodObject<{
21
22
  errorMessagesIntlDescriptors: ZodOptional<ZodRecord<ZodString, ZodTypeAny>>
22
23
  }>
23
24
 
24
- export type ZodOrderJourneySteps = ZodArray<ZodOrderJourneyStep>
25
+ export type ZodOrderJourneySteps = ZodUnion<
26
+ [ZodArray<ZodOrderJourneyStep>, ZodArray<ZodArray<ZodOrderJourneyStep>>]
27
+ >
25
28
  export type ZodOrderJourneyUTMCodeMap = ZodObject<{
26
29
  mapToName: ZodBoolean
27
30
  value: ZodString
@@ -43,11 +46,19 @@ export type ZodOrderJourneyOrderReviewStepData = ZodObject<{
43
46
  export type ZodOrderJourneyOrderConfirmationStepData = ZodObject<{
44
47
  disclaimerTexts: ZodArray<ZodString>
45
48
  }>
49
+
50
+ export type ZodOrderJourneyStepKeys = ZodArray<ZodString>
51
+
52
+ export type ZodOrderJourneyStepsEnabled = ZodUnion<
53
+ [ZodOrderJourneyStepKeys, ZodArray<ZodOrderJourneyStepKeys>]
54
+ >
55
+
46
56
  export type WindowHapiValidationsOrderJourney = {
47
57
  supportedStepKeys: OrderJourneyStepKey[]
48
58
  stepKeysRegex: RegExp
49
59
  stepKey: ZodString
50
- stepKeys: ZodArray<ZodString>
60
+ stepKeys: ZodOrderJourneyStepKeys
61
+ stepsEnabled: ZodOrderJourneyStepsEnabled
51
62
  step: ZodOrderJourneyStep
52
63
  steps: ZodOrderJourneySteps
53
64
  paymentMethod: ZodString
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.21.0",
4
+ "version": "1.23.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
8
8
  "type": "module",
9
9
  "scripts": {
10
10
  "version:minor": "npm version minor",
11
- "build:types": "tsc -d --declarationMap --emitDeclarationOnly",
12
11
  "publish:types": "npm publish --access public",
13
- "generate:index": "cti create ./src"
12
+ "generate:index": "cti create ./"
14
13
  },
15
14
  "main": "index.ts",
16
15
  "types": "index.d.ts",
package/product/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./api.types"
4
- export * from "./enums"
5
- export * from "./qa.types"
6
- export * from "./service.types"
7
- export * from "./state.types"
8
- export * from "./types"
9
- export * from "./utils.types"
10
- export * from "./validations.types"
3
+ export * from './api.types';
4
+ export * from './enums';
5
+ export * from './qa.types';
6
+ export * from './service.types';
7
+ export * from './state.types';
8
+ export * from './types';
9
+ export * from './utils.types';
10
+ export * from './validations.types';
@@ -0,0 +1,10 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from "./api.types"
4
+ export * from "./enums"
5
+ export * from "./qa.types"
6
+ export * from "./service.types"
7
+ export * from "./state.types"
8
+ export * from "./types"
9
+ export * from "./utils.types"
10
+ export * from "./validations.types"
package/product/types.ts CHANGED
@@ -47,11 +47,15 @@ export type ProductSupportingContractsPartial = {
47
47
  type: string
48
48
  mc_enabled: boolean
49
49
  }
50
+
51
+ export type ProductAudienceGroup = "niche" | "generic"
52
+
50
53
  export type Product = {
51
54
  allow_orders: boolean
52
- audience_group: "niche" | "generic"
55
+ audience_group: ProductAudienceGroup
53
56
  cross_postings: string[]
54
57
  channel: ProductSupportingContractsPartial
58
+ bundle_products_ids?: string[]
55
59
  description: string | null
56
60
  title: string
57
61
  duration: ProductDuration
@@ -78,6 +82,7 @@ export type ProductBoardType =
78
82
  | "social media"
79
83
  | "publication"
80
84
  | "community"
85
+ | "product_bundle"
81
86
 
82
87
  export type ProductType = {
83
88
  type: ProductBoardType
@@ -99,6 +99,7 @@ export type ZodProductWithSupportForContractsFilters = ZodObject<{
99
99
  }>
100
100
 
101
101
  export type ZodProduct = ZodObject<{
102
+ bundle_products_ids: ZodOptional<ZodArray<ZodString>>
102
103
  allow_orders: ZodBoolean
103
104
  audience_group: ZodString
104
105
  cross_postings: ZodProductCrossPostings
package/routing/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./state.types"
3
+ export * from './state.types';
4
+ export * from './utils.types';
@@ -0,0 +1,3 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from "./state.types"
package/theming/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./qa.types"
4
- export * from "./state.types"
5
- export * from "./types"
6
- export * from "./validations.types"
3
+ export * from './qa.types';
4
+ export * from './state.types';
5
+ export * from './types';
6
+ export * from './validations.types';
@@ -0,0 +1,6 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from "./qa.types"
4
+ export * from "./state.types"
5
+ export * from "./types"
6
+ export * from "./validations.types"
package/theming/types.ts CHANGED
@@ -40,6 +40,7 @@ declare const useTheme: UseThemeFactory<DefaultTheme>
40
40
  export type ThemeGlobalStyles = {
41
41
  borderRadius: string
42
42
  borderColor: string
43
+ placeholderColor: string
43
44
 
44
45
  primaryBackgroundColor: string
45
46
  primaryTextColor: string
@@ -50,18 +51,22 @@ export type ThemeGlobalStyles = {
50
51
  successBackgroundColor: string
51
52
  successTextColor: string
52
53
  successSecondaryBackgroundColor: string
54
+ successSecondaryTextColor: string
53
55
 
54
56
  dangerBackgroundColor: string
55
57
  dangerTextColor: string
56
58
  dangerSecondaryBackgroundColor: string
59
+ dangerSecondaryTextColor: string
57
60
 
58
61
  warningBackgroundColor: string
59
62
  warningTextColor: string
60
63
  warningSecondaryBackgroundColor: string
64
+ warningSecondaryTextColor: string
61
65
 
62
66
  infoBackgroundColor: string
63
67
  infoTextColor: string
64
68
  infoSecondaryBackgroundColor: string
69
+ infoSecondaryTextColor: string
65
70
 
66
71
  fadedBackgroundColor: string
67
72
  fadedTextColor: string
@@ -69,6 +74,9 @@ export type ThemeGlobalStyles = {
69
74
  accentBackgroundColor: string
70
75
  accentTextColor: string
71
76
 
77
+ neutralBackgroundColor: string
78
+ neutralTextColor: string
79
+
72
80
  scrollBarTrackColor: string
73
81
  scrollBarThumbColor: string
74
82
  }
@@ -84,6 +92,7 @@ export type HapiThemeRule =
84
92
  | "loadingSpinner"
85
93
  | "userJourneyBar"
86
94
  | "card"
95
+ | "cardHeader"
87
96
  | "productCard"
88
97
  | "campaignCard"
89
98
  | "tabHeaders"
@@ -103,9 +112,28 @@ export type HapiThemeRule =
103
112
  | "buttonWarningSecondary"
104
113
  | "buttonFaded"
105
114
  | "buttonAccent"
115
+ | "buttonNeutral"
106
116
  | "badgeBase"
117
+ | "badgePrimary"
118
+ | "badgeSecondary"
119
+ | "badgeSuccess"
120
+ | "badgeSuccessSecondary"
121
+ | "badgeInfo"
122
+ | "badgeInfoSecondary"
123
+ | "badgeDanger"
124
+ | "badgeDangerSecondary"
125
+ | "badgeWarning"
126
+ | "badgeWarningSecondary"
127
+ | "badgeFaded"
128
+ | "badgeAccent"
129
+ | "badgeNeutral"
130
+ | "formFieldLabelBase"
107
131
  | "formFieldLabel"
132
+ | "formFieldErrorMessage"
108
133
  | "formFieldBase"
134
+ | "formFieldDescriptionBase"
135
+ | "formFieldDescription"
136
+ | "formFieldErrorMessageBase"
109
137
  | "inputSelectBase"
110
138
  | "input"
111
139
  | "inputRange"
@@ -114,6 +142,19 @@ export type HapiThemeRule =
114
142
  | "textarea"
115
143
  | "select"
116
144
  | "checkbox"
145
+ | "checkboxPrimary"
146
+ | "checkboxSecondary"
147
+ | "checkboxSuccess"
148
+ | "checkboxSuccessSecondary"
149
+ | "checkboxInfo"
150
+ | "checkboxInfoSecondary"
151
+ | "checkboxDanger"
152
+ | "checkboxDangerSecondary"
153
+ | "checkboxWarning"
154
+ | "checkboxWarningSecondary"
155
+ | "checkboxAccent"
156
+ | "checkboxFaded"
157
+ | "checkboxNeutral"
117
158
  | "radio"
118
159
  | "accordionButton"
119
160
  | "accordionArrow"
@@ -141,6 +182,7 @@ export type HapiThemeComponentVariant =
141
182
  | "successSecondary"
142
183
  | "faded"
143
184
  | "accent"
185
+ | "neutral"
144
186
 
145
187
  export type CSSPropertiesInJS = {
146
188
  [key: string]: string | undefined | any[] | (() => any) | any
@@ -165,3 +207,5 @@ export type ThemeFontFaceOption = {
165
207
  fontSize?: string
166
208
  rel?: "stylesheet"
167
209
  }
210
+ export type HapiClassName = (string | undefined)[]
211
+ export type HapiSiteTheme = "elements"
@@ -11,6 +11,8 @@ import {
11
11
 
12
12
  export type ZodThemeGlobalStyles = ZodObject<{
13
13
  borderRadius: ZodString
14
+ borderColor: ZodString
15
+ placeholderColor: ZodString
14
16
 
15
17
  primaryBackgroundColor: ZodString
16
18
  primaryTextColor: ZodString
@@ -20,21 +22,35 @@ export type ZodThemeGlobalStyles = ZodObject<{
20
22
 
21
23
  successBackgroundColor: ZodString
22
24
  successTextColor: ZodString
25
+ successSecondaryBackgroundColor: ZodString
26
+ successSecondaryTextColor: ZodString
23
27
 
24
28
  dangerBackgroundColor: ZodString
25
29
  dangerTextColor: ZodString
30
+ dangerSecondaryBackgroundColor: ZodString
31
+ dangerSecondaryTextColor: ZodString
26
32
 
27
33
  warningBackgroundColor: ZodString
28
34
  warningTextColor: ZodString
35
+ warningSecondaryBackgroundColor: ZodString
36
+ warningSecondaryTextColor: ZodString
29
37
 
30
38
  infoBackgroundColor: ZodString
31
39
  infoTextColor: ZodString
40
+ infoSecondaryBackgroundColor: ZodString
41
+ infoSecondaryTextColor: ZodString
32
42
 
33
43
  fadedBackgroundColor: ZodString
34
44
  fadedTextColor: ZodString
35
45
 
46
+ neutralBackgroundColor: ZodString
47
+ neutralTextColor: ZodString
48
+
36
49
  accentBackgroundColor: ZodString
37
50
  accentTextColor: ZodString
51
+
52
+ scrollBarTrackColor: ZodString
53
+ scrollBarThumbColor: ZodString
38
54
  }>
39
55
 
40
56
  export type ZodFontFace = ZodObject<{
@@ -0,0 +1,3 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './service.types';
package/wallet/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./api.types"
4
- export * from "./service.types"
5
- export * from "./state.types"
6
- export * from "./types"
7
- export * from "./validations.types"
3
+ export * from './api.types';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
7
+ export * from './validations.types';
@@ -0,0 +1,7 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from "./api.types"
4
+ export * from "./service.types"
5
+ export * from "./state.types"
6
+ export * from "./types"
7
+ export * from "./validations.types"
@@ -15,7 +15,7 @@ export type WalletState = {
15
15
  paymentIntentRequestBody: WalletPaymentIntentRequest | null
16
16
  paymentIntentClientSecret: string | null
17
17
  topUpIsLoading: boolean
18
- topUpAmount: number
18
+ topUpAmount: number | null
19
19
  topUpMinAmount: number
20
20
  topUpMinAmountCurrency: ProductPriceCurrency
21
21
  topUpTermsOfServiceIsAgreed: boolean
package/wallet/types.ts CHANGED
@@ -30,7 +30,7 @@ export type WalletBillingPortalLinkResponse = {
30
30
  billingPortalLink: string
31
31
  }
32
32
 
33
- export type WalletPaymentIntentPaymentMethod =
33
+ export type WalletStripePaymentMethod =
34
34
  | "card"
35
35
  | "acss_debit"
36
36
  | "affirm"
@@ -59,12 +59,17 @@ export type WalletPaymentIntentPaymentMethod =
59
59
  | "sofort"
60
60
  | "us_bank_account"
61
61
  | "wechat_pay"
62
+ | "customer_balance"
63
+
64
+ export type WalletPaymentIntentPaymentMethod =
65
+ | Omit<WalletStripePaymentMethod, "customer_balance">
62
66
  | "bank_transfer"
63
67
 
64
68
  export type WalletPaymentIntentRequest = {
65
69
  walletId: string
66
70
  partnerId: string
67
71
  amount: number
72
+ currency?: string
68
73
  agreeTerms: boolean
69
74
  draftCampaignId?: string
70
75
  paymentMethodTypes?: WalletPaymentIntentPaymentMethod[]
@@ -1,18 +0,0 @@
1
- import { RawAxiosRequestConfig } from "axios"
2
- import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
3
- import { WindowHapiModuleWithConstructorArgs } from "../_window"
4
-
5
- export type WindowHapiAPITalentMindCompanyConfigs = {
6
- getCompanies: RawAxiosRequestConfig
7
- }
8
- export type WindowHapiAPITalentMindCompanyRequests = {
9
- getCompanies: () => Promise<any>
10
- }
11
- export type WindowHapiAPITalentMindCompany =
12
- WindowHapiModuleWithConstructorArgs<
13
- WindowHapiAPIModule<
14
- WindowHapiAPITalentMindCompanyRequests,
15
- WindowHapiAPITalentMindCompanyConfigs
16
- >,
17
- { readonly api: WindowHapiAPI }
18
- >
@@ -1,15 +0,0 @@
1
- import {
2
- HapiServiceFunctionWithLifecycleHooks,
3
- WindowHapiService,
4
- } from "../_window/service.types"
5
- import { WindowHapiModuleWithConstructorArgs } from "../_window"
6
-
7
- export type TalentMindCompanyServiceGetCompaniesHandler = () => Promise<any>
8
-
9
- export type WindowHapiServiceTalentMindCompany =
10
- WindowHapiModuleWithConstructorArgs<
11
- {
12
- getCompanies: HapiServiceFunctionWithLifecycleHooks<TalentMindCompanyServiceGetCompaniesHandler>
13
- },
14
- { readonly service: WindowHapiService }
15
- >
@@ -1,5 +0,0 @@
1
- import { TalentMindCompany } from "./types"
2
-
3
- export type TalentMindCompanyState = {
4
- companies: TalentMindCompany[]
5
- }
@@ -1,6 +0,0 @@
1
- export type TalentMindCompany = {
2
- id: number
3
- name: string
4
- description: string
5
- address: string | null
6
- }
@@ -1,5 +0,0 @@
1
- import { ZodAny, ZodNullable } from "zod"
2
-
3
- export type WindowHapiValidationsTalentMindCompany = {
4
- company: ZodNullable<ZodAny>
5
- }
@@ -1,25 +0,0 @@
1
- import { RawAxiosRequestConfig } from "axios"
2
- import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
3
- import { WindowHapiModuleWithConstructorArgs } from "../_window"
4
- import { TalentMindCreateEvaluationForm, TalentMindEvaluation } from "./types"
5
-
6
- export type WindowHapiAPITalentMindEvaluationConfigs = {
7
- getEvaluations: RawAxiosRequestConfig
8
- getEvaluation: RawAxiosRequestConfig
9
- createEvaluation: RawAxiosRequestConfig
10
- }
11
- export type WindowHapiAPITalentMindEvaluationRequests = {
12
- getEvaluations: () => Promise<TalentMindEvaluation[]>
13
- getEvaluation: () => Promise<TalentMindEvaluation>
14
- createEvaluation: (
15
- form: TalentMindCreateEvaluationForm,
16
- ) => Promise<TalentMindEvaluation>
17
- }
18
- export type WindowHapiAPITalentMindEvaluation =
19
- WindowHapiModuleWithConstructorArgs<
20
- WindowHapiAPIModule<
21
- WindowHapiAPITalentMindEvaluationRequests,
22
- WindowHapiAPITalentMindEvaluationConfigs
23
- >,
24
- { readonly api: WindowHapiAPI }
25
- >
@@ -1,25 +0,0 @@
1
- import {
2
- HapiServiceFunctionWithLifecycleHooks,
3
- WindowHapiService,
4
- } from "../_window/service.types"
5
- import { WindowHapiModuleWithConstructorArgs } from "../_window"
6
- import { TalentMindCreateEvaluationForm, TalentMindEvaluation } from "./types"
7
-
8
- export type TalentMindEvaluationServiceGetEvaluationsHandler = () => Promise<
9
- TalentMindEvaluation[]
10
- >
11
- export type TalentMindEvaluationServiceGetEvaluationHandler =
12
- () => Promise<TalentMindEvaluation>
13
- export type TalentMindEvaluationServiceCreateEvaluationHandler = (
14
- resumeForm: TalentMindCreateEvaluationForm,
15
- ) => Promise<TalentMindEvaluation>
16
-
17
- export type WindowHapiServiceTalentMindEvaluation =
18
- WindowHapiModuleWithConstructorArgs<
19
- {
20
- getEvaluations: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceGetEvaluationsHandler>
21
- getEvaluation: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceGetEvaluationHandler>
22
- createEvaluation: HapiServiceFunctionWithLifecycleHooks<TalentMindEvaluationServiceCreateEvaluationHandler>
23
- },
24
- { readonly service: WindowHapiService }
25
- >
@@ -1,6 +0,0 @@
1
- import { TalentMindCreateEvaluationForm, TalentMindEvaluation } from "./types"
2
-
3
- export type TalentMindEvaluationState = {
4
- evaluations: TalentMindEvaluation[]
5
- evaluationForm: TalentMindCreateEvaluationForm
6
- }
@@ -1,15 +0,0 @@
1
- export type TalentMindEvaluation = {
2
- id: number
3
- is_qualified: false
4
- followup_questions: string[] | null
5
- job: number
6
- resume: number
7
- score: number
8
- strengths: string[] | null
9
- weaknesses: string[] | null
10
- }
11
-
12
- export type TalentMindCreateEvaluationForm = {
13
- resume: number | null
14
- job: number | null
15
- }
@@ -1,5 +0,0 @@
1
- import { ZodAny, ZodNullable } from "zod"
2
-
3
- export type WindowHapiValidationsTalentMindEvaluation = {
4
- evaluation: ZodNullable<ZodAny>
5
- }