@vonq/hapi-elements-types 1.17.0 → 1.19.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 (74) hide show
  1. package/_window/api.types.ts +14 -1
  2. package/_window/auth.types.ts +2 -2
  3. package/_window/routing.types.ts +1 -0
  4. package/_window/service.types.ts +13 -0
  5. package/_window/state.types.ts +38 -13
  6. package/_window/utils.types.ts +17 -2
  7. package/_window/window.ts +36 -3
  8. package/alert/enums.ts +2 -1
  9. package/alert/types.ts +5 -3
  10. package/ats/state.types.ts +5 -2
  11. package/ats/types.ts +13 -7
  12. package/basket/state.types.ts +5 -2
  13. package/basket/utils.types.ts +7 -0
  14. package/basket/validations.types.ts +7 -0
  15. package/campaign/api.types.ts +11 -0
  16. package/campaign/service.types.ts +33 -2
  17. package/campaign/state.types.ts +2 -1
  18. package/campaign/types.ts +87 -18
  19. package/campaign/utils.types.ts +21 -0
  20. package/campaign/validations.types.ts +1 -1
  21. package/common/enums.ts +4 -0
  22. package/common/events/EventCommand/enums.ts +2 -2
  23. package/common/types.ts +100 -0
  24. package/common/validator/types.ts +1 -0
  25. package/contract/service.types.ts +5 -7
  26. package/contract/types.ts +2 -76
  27. package/contract/validations.types.ts +6 -0
  28. package/language/qa.types.ts +1 -4
  29. package/language/state.types.ts +0 -16
  30. package/language/validations.types.ts +0 -4
  31. package/modal/enums.ts +5 -1
  32. package/modal/service.types.ts +0 -1
  33. package/modal/types.ts +32 -4
  34. package/modal/utils.types.ts +10 -0
  35. package/orderJourney/enums.ts +2 -0
  36. package/orderJourney/qa.types.ts +0 -3
  37. package/orderJourney/service.types.ts +20 -0
  38. package/orderJourney/state.types.ts +11 -1
  39. package/orderJourney/types.ts +37 -0
  40. package/orderJourney/validations.types.ts +3 -0
  41. package/package.json +1 -1
  42. package/product/api.types.ts +20 -1
  43. package/product/enums.ts +8 -0
  44. package/product/service.types.ts +23 -1
  45. package/product/state.types.ts +6 -0
  46. package/product/types.ts +23 -16
  47. package/product/utils.types.ts +3 -0
  48. package/product/validations.types.ts +3 -2
  49. package/routing/utils.types.ts +14 -0
  50. package/talentMindCompany/api.types.ts +18 -0
  51. package/talentMindCompany/service.types.ts +15 -0
  52. package/talentMindCompany/state.types.ts +5 -0
  53. package/talentMindCompany/types.ts +6 -0
  54. package/talentMindCompany/validations.types.ts +5 -0
  55. package/talentMindEvaluation/api.types.ts +25 -0
  56. package/talentMindEvaluation/service.types.ts +25 -0
  57. package/talentMindEvaluation/state.types.ts +6 -0
  58. package/talentMindEvaluation/types.ts +15 -0
  59. package/talentMindEvaluation/validations.types.ts +5 -0
  60. package/talentMindJob/api.types.ts +26 -0
  61. package/talentMindJob/service.types.ts +28 -0
  62. package/talentMindJob/state.types.ts +6 -0
  63. package/talentMindJob/types.ts +12 -0
  64. package/talentMindJob/validations.types.ts +5 -0
  65. package/talentMindResume/api.types.ts +30 -0
  66. package/talentMindResume/service.types.ts +34 -0
  67. package/talentMindResume/state.types.ts +6 -0
  68. package/talentMindResume/types.ts +119 -0
  69. package/talentMindResume/validations.types.ts +5 -0
  70. package/theming/types.ts +1 -0
  71. package/wallet/service.types.ts +6 -1
  72. package/wallet/state.types.ts +3 -1
  73. package/wallet/types.ts +7 -2
  74. package/wallet/validations.types.ts +15 -3
package/campaign/types.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ProductDuration, ProductIndustry } from "../product/types"
2
- import { ContractPostingRequirement } from "../contract/types"
3
2
  import { ProductPriceCurrency } from "../product/enums"
4
3
  import { EmploymentType, SalaryPeriod } from "./enums"
5
4
  import { OrderJourneyPaymentMethod } from "../orderJourney"
5
+ import { PostingRequirement } from "../common"
6
6
 
7
7
  export type CampaignProductSpecs = {
8
8
  contractId: string | null
@@ -17,6 +17,20 @@ export type CampaignProductSpecs = {
17
17
  statusDescription: string | null
18
18
  }
19
19
 
20
+ export type CampaignProductStatus = {
21
+ productId: string
22
+ status: CampaignStatus
23
+ statusDescription: string | null
24
+ statusRawError: string | null
25
+ statusSolution: string | null
26
+ }
27
+
28
+ export type CampaignDetail = {
29
+ status: CampaignStatus
30
+ orderedProductsStatuses: CampaignProductStatus[]
31
+ campaignId: string
32
+ }
33
+
20
34
  export type CampaignPostingDetailsContactInfo = {
21
35
  emailAddress?: string | null
22
36
  name?: string | null
@@ -97,7 +111,11 @@ export type CampaignTotalPrice = {
97
111
  currency: ProductPriceCurrency
98
112
  }
99
113
 
100
- export type CampaignStatus = "in progress" | "offline" | "online"
114
+ export type CampaignStatus =
115
+ | "in progress"
116
+ | "offline"
117
+ | "online"
118
+ | "not processed"
101
119
 
102
120
  export type CampaignDetailsStatusOrderedProductStatus = {
103
121
  productId: string
@@ -112,6 +130,7 @@ export type CampaignDetailedStatus = {
112
130
  }
113
131
 
114
132
  export type Campaign = {
133
+ labels: Record<string, string> | null
115
134
  currency: ProductPriceCurrency
116
135
  campaignId: string
117
136
  campaignName: string | null
@@ -131,6 +150,7 @@ export type Campaign = {
131
150
  totalPrice: CampaignTotalPrice
132
151
  walletId: string
133
152
  detailedStatus?: CampaignDetailedStatus //this is only added virtually on FE on demand
153
+ isEditable: boolean
134
154
  }
135
155
 
136
156
  export type CampaignCreateFormTargetGroupEducationLevel =
@@ -156,7 +176,8 @@ export type CampaignCreateFormOrderedProductSpecBase = {
156
176
  productId: string
157
177
  utm: string
158
178
  contractId: string
159
- postingRequirements: ContractPostingRequirement[]
179
+ postingRequirements: PostingRequirement[]
180
+ postingDurationDays: number | null
160
181
  }
161
182
  export type CampaignCreateFormOrderedProductSpec =
162
183
  CampaignCreateFormOrderedProductSpecBase & { [k: string]: any }
@@ -176,11 +197,12 @@ export type CampaignCreateFormPostingDetails = {
176
197
  }
177
198
 
178
199
  export type CampaignCreateForm = {
200
+ labels: Record<string, string> | null
179
201
  companyId: string
180
- currency: ProductPriceCurrency
202
+ currency: ProductPriceCurrency | null
181
203
  campaignName?: string | null
182
204
  poNumber: string | null
183
- orderReference?: string
205
+ orderReference?: string | null
184
206
  paymentMethod: OrderJourneyPaymentMethod | null
185
207
  targetGroup: CampaignCreateFormTargetGroup
186
208
  recruiterInfo: CampaignRecruiterInfo
@@ -189,26 +211,76 @@ export type CampaignCreateForm = {
189
211
  orderedProductsSpecs: Record<string, CampaignCreateFormOrderedProductSpec>
190
212
  }
191
213
 
214
+ export type CampaignEditForm = Omit<
215
+ CampaignCreateForm,
216
+ | "companyId"
217
+ | "currency"
218
+ | "poNumber"
219
+ | "orderReference"
220
+ | "paymentMethod"
221
+ | "postingDetails"
222
+ | "orderedProductsSpecs"
223
+ > & {
224
+ campaignId: string
225
+ postingDetails: Omit<
226
+ CampaignCreateFormPostingDetails,
227
+ "applicationUrl" | "jobPageUrl"
228
+ >
229
+ orderedProductsSpecs: Record<
230
+ string,
231
+ Omit<CampaignCreateFormOrderedProductSpec, "postingDurationDays">
232
+ >
233
+ }
234
+
192
235
  export type CampaignOrderRequestBodyOrderedProductsSpec = {
193
236
  contractId?: string
194
237
  utm: string
195
238
  productId?: string
196
- postingRequirements?: any
239
+ postingRequirements?: Record<string, any>
240
+ postingDurationDays: number | null
197
241
  }
198
242
 
199
243
  export type CampaignOrderRequestBody = {
244
+ labels: Record<string, string> | null
200
245
  companyId: string
201
246
  campaignName: string | null | undefined
202
247
  walletId?: string
203
248
  poNumber?: string | null
204
- orderReference?: string
249
+ orderReference?: string | null
205
250
  recruiterInfo: Omit<CampaignRecruiterInfo, "id">
206
251
  paymentMethod: OrderJourneyPaymentMethod | null
207
252
  postingDetails: CampaignPostingDetails
208
253
  targetGroup: CampaignTargetGroup
209
254
  orderedProducts: string[]
210
255
  orderedProductsSpecs: CampaignOrderRequestBodyOrderedProductsSpec[]
211
- currency: string
256
+ }
257
+
258
+ export type CampaignEditRequestBody = Omit<
259
+ CampaignOrderRequestBody,
260
+ | "walletId"
261
+ | "poNumber"
262
+ | "orderReference"
263
+ | "companyId"
264
+ | "postingDetails"
265
+ | "orderedProductsSpecs"
266
+ | "paymentMethod"
267
+ > & {
268
+ campaignId: string
269
+ postingDetails: Omit<
270
+ CampaignPostingDetails,
271
+ "applicationUrl" | "jobPageUrl"
272
+ >
273
+ orderedProductsSpecs: Omit<
274
+ CampaignOrderRequestBodyOrderedProductsSpec,
275
+ "utm" | "productId" | "contractId" | "postingDurationDays"
276
+ >[]
277
+ }
278
+
279
+ export type CampaignPostingRequirementsValidateRequestBody = {
280
+ contract_id: string
281
+ product_id: string
282
+ posting_requirements: { name: string; value: any }[]
283
+ vacancy: { name: string; value: any }[]
212
284
  }
213
285
 
214
286
  export type CampaignTaxonomyNameWithLanguage = {
@@ -234,14 +306,11 @@ export type TaxonomyEmploymentTypes = {
234
306
  value: EmploymentType
235
307
  label: string
236
308
  }
237
- export type TransformedPostingRequirementOption = {
238
- value?: string
239
- options?: { label: string; value: string; data?: any[] }[]
240
- label: string
241
- }
242
- export type TransformedPostingRequirement = Omit<
243
- ContractPostingRequirement,
244
- "options"
245
- > & {
246
- options: TransformedPostingRequirementOption[] | null
309
+
310
+ export type CampaignPostingRequirementsValidateResponse = {
311
+ has_errors: boolean
312
+ errors: {
313
+ credentials: Record<string, any>
314
+ posting_requirements: Record<string, any>
315
+ }
247
316
  }
@@ -7,8 +7,11 @@ import {
7
7
  CampaignCreateFormTargetGroupIndustry,
8
8
  CampaignCreateFormTargetGroupJobCategory,
9
9
  CampaignCreateFormTargetGroupSeniority,
10
+ CampaignEditForm,
11
+ CampaignEditRequestBody,
10
12
  CampaignOrderRequestBody,
11
13
  CampaignOrderRequestBodyOrderedProductsSpec,
14
+ CampaignPostingRequirementsValidateResponse,
12
15
  CampaignTargetGroup,
13
16
  CampaignTargetGroupData,
14
17
  } from "./types"
@@ -16,6 +19,10 @@ import { Product } from "../product/types"
16
19
  import { Contract } from "../contract/types"
17
20
  import { WindowHapiUtils } from "../_window/utils.types"
18
21
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
22
+ import {
23
+ OrderJourneyOrderErrors,
24
+ OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid,
25
+ } from "../orderJourney"
19
26
 
20
27
  export type WindowHapiUtilsCampaign = WindowHapiModuleWithConstructorArgs<
21
28
  {
@@ -25,7 +32,11 @@ export type WindowHapiUtilsCampaign = WindowHapiModuleWithConstructorArgs<
25
32
  campaign: Partial<Campaign>,
26
33
  ) => void
27
34
  getOrderCampaignRequestBody: () => CampaignOrderRequestBody
35
+ getEditCampaignRequestBody: (
36
+ campaignForm: CampaignEditForm,
37
+ ) => CampaignEditRequestBody
28
38
  getCopyCampaignRequestBody: (campaign: Campaign) => CampaignCreateForm
39
+ getCampaignEditForm: (campaign: Campaign) => CampaignEditForm
29
40
  getPostBodyValuesForTargetGroupProperty: (
30
41
  selectValue:
31
42
  | CampaignCreateFormTargetGroupEducationLevel[]
@@ -51,6 +62,16 @@ export type WindowHapiUtilsCampaign = WindowHapiModuleWithConstructorArgs<
51
62
  getPostBodyForOrderedProductsSpecsPostingRequirement: (
52
63
  postingRequirement: any,
53
64
  ) => any
65
+ transformValidatePostingRequirementsWithCampaignErrorsToOrderErrors: (
66
+ response: CampaignPostingRequirementsValidateResponse,
67
+ requestBody: CampaignOrderRequestBody,
68
+ indexOfProductOrContract: number,
69
+ ) => OrderJourneyOrderErrors
70
+ getMergedOrderErrorsWithPostingRequirementsValidation: (
71
+ existingErrors: OrderJourneyOrderErrors | null,
72
+ newErrors: OrderJourneyOrderErrorsCampaignIsValidButPostingRequirementsInvalid,
73
+ indexOfNewPostingRequirements: number,
74
+ ) => OrderJourneyOrderErrors
54
75
  },
55
76
  { readonly utils: WindowHapiUtils }
56
77
  >
@@ -131,7 +131,7 @@ export type ZodCampaignCreateFormOrderedProductSpecs = ZodRecord<
131
131
  >
132
132
 
133
133
  export type ZodCampaign = ZodObject<{
134
- currency: ZodString
134
+ currency: ZodNullable<ZodString>
135
135
  campaignId: ZodString
136
136
  campaignName: ZodNullable<ZodString>
137
137
  companyId: ZodString
package/common/enums.ts CHANGED
@@ -33,6 +33,10 @@ export enum WindowHapiModuleName {
33
33
  alert = "alert",
34
34
  modal = "modal",
35
35
  "ui" = "ui",
36
+ talentMindCompany = "talentMindCompany",
37
+ talentMindJob = "talentMindJob",
38
+ talentMindResume = "talentMindResume",
39
+ talentMindEvaluation = "talentMindEvaluation",
36
40
  }
37
41
 
38
42
  export enum WindowHapiSDKModuleName {
@@ -12,14 +12,14 @@ export enum WindowHapiEventCommandName {
12
12
  serviceFinish = "service:finish",
13
13
 
14
14
  /* Config */
15
- configSetPartnerId = "config:partnerId",
16
15
  configSetPartnerToken = "config:partnerToken", // used for impersonation purposes
17
- configSetClientId = "config:clientId",
18
16
  configSetAreLogsEnabled = "config:areLogsEnabled",
17
+ configSetWalletCurrency = "config:setWalletCurrency",
19
18
 
20
19
  /* App */
21
20
  appLoad = "app:load",
22
21
  appReady = "app:ready",
22
+ appHydrated = "app:hydrated",
23
23
 
24
24
  /* API */
25
25
  apiRequest = "api:request",
package/common/types.ts CHANGED
@@ -100,10 +100,110 @@ export type HapiWebComponent = {
100
100
  isUserJourney?: boolean
101
101
  webComponentCSS?: Record<string, any> //React.CSSProperties
102
102
  attributes?: Record<string, string>
103
+ shouldAutoResize?: boolean
103
104
  qaFunctionToMockId?: Record<string, string> //some widgets have attributes like <widget campaign-id=IDHERE> and they show 404 inside demo pages and documentation so this will map to window.hapiQA function that will grab that id. example below
104
105
  /* mock id example
105
106
  {
106
107
  "campaignId": "campaign.getRandomCampaignId" //campaignId being the path parameter like [campaignId].tsx
107
108
  }
108
109
  */
110
+ // some widgets have query params, we need to mock them
111
+ qaMockQueryParams?: Record<string, string>
112
+ enableNextJSDivScroll?: boolean
113
+ loadingLazyIframe?: boolean
114
+ isHiddenOnDocumentation?: boolean
115
+ }
116
+ export type PostingRequirementType =
117
+ | "SELECT"
118
+ | "SELECT-MAP_ONLY"
119
+ | "TEXT"
120
+ | "MULTIPLE"
121
+ | "HIER"
122
+ | "TEXTEXPAND"
123
+ | "DATE"
124
+ | "TEXTAREA"
125
+ | "AUTOCOMPLETE"
126
+ | "STATISCH"
127
+ | "IMAGE-URL"
128
+ | "VIDEO-URL"
129
+ | "IMAGE-PREVIEW"
130
+ | "DYNAMISCH"
131
+ export type PostingRequirementRule = {
132
+ rule: string
133
+ data: string
134
+ }
135
+ export type PostingRequirementDisplayRuleShow = {
136
+ facet: string
137
+ value: any
138
+ op: "notempty" | "equal" | "in"
139
+ }
140
+ export type PostingRequirementDisplayRule = {
141
+ show: PostingRequirementDisplayRuleShow[]
142
+ }
143
+ export type PostingRequirementAutocompleteParametersSourceSingle = {
144
+ field?: string
145
+ facet?: string
146
+ }
147
+ export type PostingRequirementAutocompleteParametersSourceMultiple = {
148
+ [key: string]:
149
+ | PostingRequirementAutocompleteParametersSourceSingle
150
+ | PostingRequirementAutocompleteParametersSourceSingle[]
151
+ }
152
+ export type PostingRequirementParametersSource =
153
+ | PostingRequirementAutocompleteParametersSourceSingle
154
+ | PostingRequirementAutocompleteParametersSourceMultiple
155
+ export type PostingRequirementAutocomplete = {
156
+ required_parameters: string[] | null
157
+ parameters_source: PostingRequirementParametersSource | null
158
+ }
159
+ export type PostingRequirementGroup = {
160
+ id: string
161
+ name: string
162
+ sort: number
163
+ }
164
+ export type PostingRequirement = {
165
+ name: string
166
+ label: string
167
+ description?: string
168
+ display_rules: PostingRequirementDisplayRule | null
169
+ autocomplete: PostingRequirementAutocomplete | null
170
+ options: PostingRequirementOption[] | null
171
+ required: boolean
172
+ sort: string
173
+ type: PostingRequirementType
174
+ rules?: PostingRequirementRule[] | null
175
+ group_id?: string
176
+ }
177
+ export type PostingRequirementOptionRequiresField = {
178
+ field: {
179
+ name: string
180
+ }
181
+ }
182
+ export type PostingRequirementOption = {
183
+ default?: string
184
+ key: string
185
+ label: string
186
+ data?: any[]
187
+ labels?: Record<"default", string>
188
+ sort: string
189
+ parent?: string
190
+ requires?: PostingRequirementOptionRequiresField[] | null
191
+ }
192
+ export type TransformedPostingRequirementOption = {
193
+ value?: string
194
+ data?: any[]
195
+ requires?: PostingRequirementOptionRequiresField[] | null
196
+ label: string
197
+ }
198
+ export type PostingRequirementReactiveDescription = { description: string }
199
+ export type TransformedPostingRequirement = Omit<
200
+ PostingRequirement,
201
+ "options"
202
+ > & {
203
+ options: TransformedPostingRequirementOption[] | null
204
+ }
205
+ export type Facet = {}
206
+ export type PostingRequirementsAutocompleteRequestOption = {
207
+ key: string
208
+ value: string | string[]
109
209
  }
@@ -1,4 +1,5 @@
1
1
  export type Validators = {
2
2
  isNotEmpty: (value: string | Record<string, any> | any[]) => boolean
3
3
  isNotZero: (value: number) => boolean
4
+ isHandledByBackend: (value: any) => false
4
5
  }
@@ -3,19 +3,17 @@ import {
3
3
  WindowHapiService,
4
4
  } from "../_window/service.types"
5
5
  import { OrderJourneyStepKey } from "../orderJourney/enums"
6
+ import { Contract, ContractCredential, ContractGroup } from "./types"
6
7
  import {
7
- Contract,
8
- ContractCredential,
9
- ContractGroup,
10
- ContractPostingRequirementsAutocompleteRequestOption,
11
- } from "./types"
12
- import { PaginatedAPIResponseV1 } from "../common/types"
8
+ PostingRequirementsAutocompleteRequestOption,
9
+ PaginatedAPIResponseV1,
10
+ } from "../common/types"
13
11
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
14
12
 
15
13
  export type ContractServiceGetContractPostingRequirementOptionsHandler = (
16
14
  contractId: string,
17
15
  fieldName: string,
18
- autocompleteRequestOptions: ContractPostingRequirementsAutocompleteRequestOption[],
16
+ autocompleteRequestOptions: PostingRequirementsAutocompleteRequestOption[],
19
17
  ) => Promise<any>
20
18
  export type ContractServiceGetContractsHandler = (
21
19
  offset: number,
package/contract/types.ts CHANGED
@@ -16,78 +16,6 @@ export type ContractCredential = {
16
16
  options: ContractCredentialOption[] | null
17
17
  }
18
18
 
19
- export type ContractFacet = {}
20
-
21
- export type ContractPostingRequirementType =
22
- | "SELECT"
23
- | "SELECT-MAP_ONLY"
24
- | "TEXT"
25
- | "MULTIPLE"
26
- | "HIER"
27
- | "TEXTEXPAND"
28
- | "DATE"
29
- | "TEXTAREA"
30
- | "AUTOCOMPLETE"
31
- | "STATISCH"
32
-
33
- export type ContractPostingRequirementRule = {
34
- rule: string
35
- data: string
36
- }
37
-
38
- export type ContractPostingRequirementDisplayRuleShow = {
39
- facet: string
40
- value: any
41
- op: "notempty" | "equal" | "in"
42
- }
43
-
44
- export type ContractPostingRequirementDisplayRule = {
45
- show: ContractPostingRequirementDisplayRuleShow[]
46
- }
47
-
48
- export type ContractPostingRequirementAutocompleteParametersSourceSingle = {
49
- field?: string
50
- facet?: string
51
- }
52
-
53
- export type ContractPostingRequirementAutocompleteParametersSourceMultiple = {
54
- [
55
- key: string
56
- ]: ContractPostingRequirementAutocompleteParametersSourceSingle[]
57
- }
58
-
59
- export type ContractPostingRequirementParametersSource =
60
- | ContractPostingRequirementAutocompleteParametersSourceSingle
61
- | ContractPostingRequirementAutocompleteParametersSourceMultiple
62
-
63
- export type ContractPostingRequirementAutocomplete = {
64
- required_parameters: string[] | null
65
- parameters_source: ContractPostingRequirementParametersSource | null
66
- }
67
-
68
- export type ContractPostingRequirement = {
69
- name: string
70
- label: string
71
- description?: string
72
- display_rules: ContractPostingRequirementDisplayRule | null
73
- autocomplete: ContractPostingRequirementAutocomplete | null
74
- options: ContractPostingRequirementOption[] | null
75
- required: boolean
76
- sort: string
77
- type: ContractPostingRequirementType
78
- rules?: ContractPostingRequirementRule[] | null
79
- }
80
-
81
- export type ContractPostingRequirementOption = {
82
- default?: string
83
- key: string
84
- label: string
85
- data?: any[]
86
- labels?: Record<"default", string>
87
- sort: string
88
- parent?: string
89
- }
90
-
91
19
  export type ContractPurchasePrice = {
92
20
  amount: number | null
93
21
  currency: string | null
@@ -104,6 +32,7 @@ export type ContractCreateForm = {
104
32
  purchase_price: ContractPurchasePrice
105
33
  credits: string | null
106
34
  followed_instructions: boolean
35
+ posting_duration_days: number | null
107
36
  allow_renegotiation: boolean
108
37
  }
109
38
 
@@ -130,6 +59,7 @@ export type Contract = {
130
59
  facets?: any[]
131
60
  product: ContractProduct
132
61
  purchase_price: ContractPurchasePrice | null
62
+ posting_duration_days: number | null
133
63
  group: ContractGroup | null
134
64
  }
135
65
 
@@ -141,7 +71,3 @@ export type ContractGroup = {
141
71
  }
142
72
 
143
73
  export type ContractGroupSelected = ContractGroup | "add-new" | null
144
- export type ContractPostingRequirementsAutocompleteRequestOption = {
145
- key: string
146
- value: string | string[]
147
- }
@@ -60,6 +60,12 @@ export type ZodContractCreateForm = ZodObject<{
60
60
  purchase_price: ZodContractPurchasePrice
61
61
  credits: ZodContractCredits
62
62
  followed_instructions: ZodOptional<ZodBoolean>
63
+ posting_duration_days: ZodUnion<
64
+ [
65
+ ZodOptional<ZodNullable<ZodNumber>>,
66
+ ZodOptional<ZodNullable<ZodNumber>>,
67
+ ]
68
+ >
63
69
  allow_renegotiation: ZodOptional<ZodBoolean>
64
70
  }>
65
71
  export type ZodContractPostingRequirementAutocompleteRequestOptions = ZodRecord<
@@ -1,4 +1,3 @@
1
- import { ProductPriceCurrency } from "../product/enums"
2
1
  import { LanguageStoreTranslations } from "./state.types"
3
2
  import { WindowHapiQA } from "../_window/qa.types"
4
3
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
@@ -6,9 +5,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
6
5
  export type WindowHapiQALanguage = WindowHapiModuleWithConstructorArgs<
7
6
  {
8
7
  setLocale: (locale: string) => string
9
- setDisplayCurrency: (
10
- currency: ProductPriceCurrency,
11
- ) => ProductPriceCurrency
8
+
12
9
  setTranslationByLocaleAndKey: (
13
10
  locale: string,
14
11
  key: string,
@@ -1,25 +1,9 @@
1
- import { ProductPriceCurrency } from "../product/enums"
2
-
3
1
  export type LanguageStoreLocaleTranslations = Record<string, string>
4
2
  export type LanguageStoreTranslations = Record<
5
3
  string,
6
4
  LanguageStoreLocaleTranslations
7
5
  >
8
6
  export type LanguageState = {
9
- /**
10
- * Locale of the user (navigator language) in RFC 5646 that can be changed via setLocale function
11
- */
12
7
  locale: string
13
- /**
14
- * An object containing key-value parts where the key is the i18n key such as `test.example-string` and the value is the actual translation. Translations will be loaded by current locale and fallbacks will be used from American English defaults we have.
15
- */
16
8
  translations: LanguageStoreTranslations
17
- /**
18
- * Current Display Currency of all the widgets
19
- */
20
- displayCurrency: ProductPriceCurrency
21
- /**
22
- * Array of supported currencies. **This value changes automatically when user scrolls and should not be set from outside**
23
- */
24
- supportedCurrencies: ProductPriceCurrency[]
25
9
  }
@@ -1,5 +1,4 @@
1
1
  import { ZodRecord, ZodString } from "zod"
2
- import { ProductPriceCurrency } from "../product/enums"
3
2
 
4
3
  export type ZodTranslations = ZodRecord<
5
4
  ZodString,
@@ -7,7 +6,4 @@ export type ZodTranslations = ZodRecord<
7
6
  >
8
7
  export type WindowHapiValidationsLanguage = {
9
8
  translations: ZodTranslations
10
- supportedCurrencies: ProductPriceCurrency[]
11
- supportedCurrenciesRegex: RegExp
12
- displayCurrency: ZodString
13
9
  }
package/modal/enums.ts CHANGED
@@ -8,11 +8,15 @@ export enum ModalKeys {
8
8
  basket = "layout-basket-modal",
9
9
  productInfo = "product-info",
10
10
  campaignTakeOfflineConfirmation = "campaign-confirm-take-offline",
11
- campaignCopyConfirmation = "campaign-confirm-copy",
11
+ campaignCopyJourney = "campaign-confirm-copy",
12
+ campaignStatusDetail = "campaign-status-detail",
12
13
  campaignCopySelection = "contract-copy-selection",
14
+ campaignEdit = "campaign-edit",
13
15
  basketRemoveProductConfirmation = "remove-product-from-basket",
14
16
  contractRemoveConfirmation = "contract-remove-confirmation",
15
17
  contractGroupConflictInfo = "contract-group-conflict-info",
16
18
  filePicker = "file-picker",
17
19
  contractPostingRequirementsSmartFillSuccess = "contract-posting-requirements-smart-fill-success",
20
+ talentMindEvaluateJobWithResume = "talentmind-evaluate-job-with-resume",
21
+ talentMindEvaluateResumeWithJob = "talentmind-evaluate-resume-with-job",
18
22
  }
@@ -21,7 +21,6 @@ export type WindowHapiServiceModal = WindowHapiModuleWithConstructorArgs<
21
21
  basketProduct: Product | Contract
22
22
  }
23
23
  | { campaignId: string }
24
- | { partnerId?: IObservableValue<string> }
25
24
  >,
26
25
  options?: ModalOptions,
27
26
  zone?: ModalZone,
package/modal/types.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import { Product } from "../product/types"
2
2
  import { Contract } from "../contract/types"
3
3
  import { ModalKeys, ModalZone } from "./enums"
4
- import { AnyNonFunction } from "../common/types"
5
- import { Campaign, TransformedPostingRequirement } from "../campaign"
4
+ import { AnyNonFunction, TransformedPostingRequirement } from "../common/types"
5
+ import { Campaign } from "../campaign"
6
+ import { TalentMindResume } from "../talentMindResume/types"
7
+ import { TalentMindJob } from "../talentMindJob/types"
8
+ import { OrderJourneyPaymentMethod } from "../orderJourney"
9
+ import { PickerDisplayMode } from "filestack-js"
10
+ import { HapiBoxProps } from "../../src/components/reusable/Box"
6
11
 
7
12
  export type ProductDetailModalProps = {
8
13
  id: string
@@ -21,6 +26,9 @@ export type CampaignCopySelectionModalProps = {
21
26
  products: (Product | Contract)[]
22
27
  campaign: Campaign
23
28
  }
29
+ export type CampaignEditModalProps = {
30
+ campaign?: Campaign
31
+ }
24
32
  export type ContractPostingRequirementsSmartFillResponseModalProps = {
25
33
  response: Record<string, any>
26
34
  postingRequirements: Record<string, TransformedPostingRequirement>
@@ -31,9 +39,29 @@ export type FilePickerOptions = {
31
39
  uploadInBackground?: boolean
32
40
  maxFiles?: number
33
41
  maxSize?: number
42
+ displayMode?: PickerDisplayMode
43
+ container?: string
44
+ containerProps?: HapiBoxProps
45
+ imageMax?: [number, number]
46
+ imageMin?: [number, number]
47
+ showTransformations?: boolean
48
+ }
49
+ export type BasketModalProps = {
50
+ canDeleteProducts?: boolean
51
+ showDeliveryTime?: boolean
52
+ showAmounts?: boolean
53
+ }
54
+ export type WalletModalProps = {
55
+ showBalance?: boolean
56
+ paymentMethod: OrderJourneyPaymentMethod | null
57
+ }
58
+ export type WalletPurchaseOrderModalProps = {}
59
+ export type TalentMindEvaluateJobWithResumeModalProps = {
60
+ resume: TalentMindResume
61
+ }
62
+ export type TalentMindEvaluateResumeWithJobModalProps = {
63
+ job: TalentMindJob
34
64
  }
35
- export type BasketModalProps = {}
36
- export type WalletModalProps = {}
37
65
 
38
66
  export type ModalProps = AnyNonFunction<
39
67
  | ProductDetailModalProps