@vonq/hapi-elements-types 1.22.0 → 1.24.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 (100) hide show
  1. package/_window/api.types.ts +12 -13
  2. package/_window/index.ts.bak +16 -0
  3. package/_window/qa.types.ts +1 -0
  4. package/_window/sdk.types.ts +5 -2
  5. package/_window/service.types.ts +3 -12
  6. package/_window/state.types.ts +0 -24
  7. package/_window/ui.types.ts +8 -1
  8. package/_window/utils.types.ts +3 -0
  9. package/_window/window.ts +22 -3
  10. package/alert/index.ts +4 -4
  11. package/alert/index.ts.bak +6 -0
  12. package/ats/index.ts +4 -4
  13. package/ats/index.ts.bak +6 -0
  14. package/ats/types.ts +7 -1
  15. package/basket/index.ts +5 -5
  16. package/basket/index.ts.bak +7 -0
  17. package/basket/service.types.ts +3 -1
  18. package/basket/utils.types.ts +6 -2
  19. package/campaign/api.types.ts +5 -1
  20. package/campaign/enums.ts +0 -3
  21. package/campaign/index.ts +8 -8
  22. package/campaign/index.ts.bak +10 -0
  23. package/campaign/service.types.ts +14 -0
  24. package/campaign/types.ts +31 -21
  25. package/campaign/utils.types.ts +1 -0
  26. package/campaign/validations.types.ts +15 -1
  27. package/common/enums.ts +0 -4
  28. package/common/events/EventCommand/index.ts.bak +4 -0
  29. package/common/events/index.ts.bak +4 -0
  30. package/common/index.ts +7 -5
  31. package/common/index.ts.bak +9 -0
  32. package/common/logger/index.ts +4 -0
  33. package/common/logger/index.ts.bak +4 -0
  34. package/common/types.ts +20 -3
  35. package/common/validations.types.ts +2 -0
  36. package/common/validator/index.ts +3 -0
  37. package/common/validator/index.ts.bak +3 -0
  38. package/contract/api.types.ts +1 -0
  39. package/contract/index.ts +7 -7
  40. package/contract/index.ts.bak +9 -0
  41. package/contract/service.types.ts +7 -1
  42. package/contract/types.ts +2 -0
  43. package/contract/validations.types.ts +1 -0
  44. package/debugging/index.ts +3 -2
  45. package/debugging/index.ts.bak +5 -0
  46. package/index.ts +16 -16
  47. package/index.ts.bak +18 -0
  48. package/language/enums.ts +5 -0
  49. package/language/index.ts +6 -3
  50. package/language/index.ts.bak +8 -0
  51. package/language/service.types.ts +7 -0
  52. package/language/state.types.ts +3 -1
  53. package/language/utils.types.ts +11 -0
  54. package/modal/enums.ts +3 -3
  55. package/modal/index.ts +5 -4
  56. package/modal/index.ts.bak +7 -0
  57. package/modal/types.ts +11 -8
  58. package/orderJourney/index.ts +7 -6
  59. package/orderJourney/index.ts.bak +9 -0
  60. package/orderJourney/qa.types.ts +3 -1
  61. package/orderJourney/service.types.ts +3 -8
  62. package/orderJourney/state.types.ts +31 -8
  63. package/orderJourney/types.ts +79 -16
  64. package/orderJourney/validations.types.ts +13 -2
  65. package/package.json +2 -3
  66. package/product/index.ts +8 -8
  67. package/product/index.ts.bak +10 -0
  68. package/product/types.ts +4 -1
  69. package/routing/index.ts +2 -1
  70. package/routing/index.ts.bak +4 -0
  71. package/theming/index.ts +4 -4
  72. package/theming/index.ts.bak +6 -0
  73. package/theming/types.ts +44 -0
  74. package/theming/validations.types.ts +16 -0
  75. package/ui/index.ts.bak +3 -0
  76. package/wallet/index.ts +5 -5
  77. package/wallet/index.ts.bak +7 -0
  78. package/wallet/state.types.ts +1 -1
  79. package/wallet/types.ts +6 -1
  80. package/talentMindCompany/api.types.ts +0 -18
  81. package/talentMindCompany/service.types.ts +0 -15
  82. package/talentMindCompany/state.types.ts +0 -5
  83. package/talentMindCompany/types.ts +0 -6
  84. package/talentMindCompany/validations.types.ts +0 -5
  85. package/talentMindEvaluation/api.types.ts +0 -25
  86. package/talentMindEvaluation/service.types.ts +0 -25
  87. package/talentMindEvaluation/state.types.ts +0 -6
  88. package/talentMindEvaluation/types.ts +0 -15
  89. package/talentMindEvaluation/validations.types.ts +0 -5
  90. package/talentMindJob/api.types.ts +0 -26
  91. package/talentMindJob/service.types.ts +0 -28
  92. package/talentMindJob/state.types.ts +0 -6
  93. package/talentMindJob/types.ts +0 -12
  94. package/talentMindJob/validations.types.ts +0 -5
  95. package/talentMindResume/api.types.ts +0 -30
  96. package/talentMindResume/service.types.ts +0 -34
  97. package/talentMindResume/state.types.ts +0 -6
  98. package/talentMindResume/types.ts +0 -119
  99. package/talentMindResume/validations.types.ts +0 -5
  100. package/tsconfig.json +0 -36
@@ -16,12 +16,9 @@ import {
16
16
  } from "./window"
17
17
  import { WindowHapiLogger } from "../common/logger/types"
18
18
  import { ATSUserTokenResponse } from "../ats"
19
- import { WindowHapiAPITalentMindCompany } from "../talentMindCompany/api.types"
20
- import { WindowHapiAPITalentMindResume } from "../talentMindResume/api.types"
21
- import { WindowHapiAPITalentMindJob } from "../talentMindJob/api.types"
22
- import { WindowHapiAPITalentMindEvaluation } from "../talentMindEvaluation/api.types"
23
19
 
24
20
  export type WindowHapiAPIModule<ModuleType, ModuleConfig> = {
21
+ propertiesThatShouldNotBeDocumented: string[]
25
22
  logger: WindowHapiLogger
26
23
  configs: ModuleConfig
27
24
  setBaseURL: (url: string) => void
@@ -49,6 +46,17 @@ export type WindowHapiAPIValidateJWTTokenHandler = () => Promise<boolean>
49
46
  export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
50
47
  {
51
48
  /* Common */
49
+ setClassBaseConfig: <T>(
50
+ klass: any,
51
+ config: Record<string, RawAxiosRequestConfig>,
52
+ ) => void
53
+ setClassResourceConfig: <T>(
54
+ klass: any,
55
+ resourceKey: string,
56
+ config: RawAxiosRequestConfig,
57
+ ) => void
58
+ propertiesThatShouldNotBeDocumented: string[]
59
+ mergePropertiesThatShouldNotBeDocumented: (klass: any) => void
52
60
  request: <T = any, R = AxiosResponse<T>, D = any>(
53
61
  config: Partial<HapiRequestConfig<D>>,
54
62
  ) => Promise<R>
@@ -63,7 +71,6 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
63
71
  refreshJWTToken: WindowHapiAPIRefreshJWTTokenHandler
64
72
  validateJWTToken: WindowHapiAPIValidateJWTTokenHandler
65
73
  baseURL: string
66
- talentMindBaseUrl: string
67
74
  setBaseURL: (url: string) => void
68
75
  setBaseConfig: (params: Record<string, Record<string, string>>) => void
69
76
  baseTimeout: number
@@ -82,20 +89,12 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
82
89
  [WindowHapiModuleName.product]: WindowHapiAPIProduct
83
90
  [WindowHapiModuleName.campaign]: WindowHapiAPICampaign
84
91
  [WindowHapiModuleName.ats]: WindowHapiAPIATS
85
- [WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
86
- [WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
87
- [WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
88
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
89
92
  modules: {
90
93
  [WindowHapiModuleName.contract]: WindowHapiAPIContract
91
94
  [WindowHapiModuleName.wallet]: WindowHapiAPIWallet
92
95
  [WindowHapiModuleName.product]: WindowHapiAPIProduct
93
96
  [WindowHapiModuleName.campaign]: WindowHapiAPICampaign
94
97
  [WindowHapiModuleName.ats]: WindowHapiAPIATS
95
- [WindowHapiModuleName.talentMindCompany]: WindowHapiAPITalentMindCompany
96
- [WindowHapiModuleName.talentMindJob]: WindowHapiAPITalentMindJob
97
- [WindowHapiModuleName.talentMindResume]: WindowHapiAPITalentMindResume
98
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiAPITalentMindEvaluation
99
98
  }
100
99
  },
101
100
  { readonly core: WindowHapiClassInterface }
@@ -0,0 +1,16 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './api.types';
4
+ export * from './auth.types';
5
+ export * from './config.types';
6
+ export * from './events.types';
7
+ export * from './instances.types';
8
+ export * from './qa.types';
9
+ export * from './routing.types';
10
+ export * from './sdk.types';
11
+ export * from './service.types';
12
+ export * from './state.types';
13
+ export * from './ui.types';
14
+ export * from './utils.types';
15
+ export * from './validation.types';
16
+ export * from './window';
@@ -26,6 +26,7 @@ export type WindowHapiQA = WindowHapiModuleWithConstructorArgs<
26
26
  getDebugPanelButtonEl: () => HTMLElement | null
27
27
  onClickDebugPanel: () => void
28
28
  addDebugPanelToDOM: () => void
29
+ removeDebugPanelFromDOM: () => void
29
30
  setDebugPanelPosition: (buttonEl: HTMLElement | null) => void
30
31
  },
31
32
  { readonly core: WindowHapiClassInterface }
@@ -44,6 +44,8 @@ import { ATSState, WindowHapiAPIATS, WindowHapiServiceATS } from "../ats"
44
44
  import { WindowHapiServiceOrderJourney } from "../orderJourney/service.types"
45
45
  import { WindowHapiQA } from "./qa.types"
46
46
  import { WindowHapiServiceDebugging } from "../debugging/service.types"
47
+ import { WindowHapiServiceLanguage } from "../language/service.types"
48
+ import { WindowHapiUtilsLanguage } from "../language/utils.types"
47
49
 
48
50
  export type WindowHapiSDKModule<
49
51
  APIModule,
@@ -94,9 +96,10 @@ export type WindowHapiSDKDebugging = WindowHapiSDKModule<
94
96
  >
95
97
  export type WindowHapiSDKLanguage = WindowHapiSDKModule<
96
98
  undefined,
97
- undefined,
99
+ WindowHapiServiceLanguage,
98
100
  WindowHapiValidationsLanguage,
99
- WindowHapiStateModule<LanguageState>
101
+ WindowHapiStateModule<LanguageState>,
102
+ WindowHapiUtilsLanguage
100
103
  >
101
104
  export type WindowHapiSDKOrderJourney = WindowHapiSDKModule<
102
105
  undefined,
@@ -14,11 +14,8 @@ import {
14
14
  } from "./window"
15
15
  import { WindowHapiLogger } from "../common/logger/types"
16
16
  import { WindowHapiServiceOrderJourney } from "../orderJourney/service.types"
17
- import { WindowHapiServiceTalentMindCompany } from "../talentMindCompany/service.types"
18
- import { WindowHapiServiceTalentMindJob } from "../talentMindJob/service.types"
19
- import { WindowHapiServiceTalentMindResume } from "../talentMindResume/service.types"
20
- import { WindowHapiServiceTalentMindEvaluation } from "../talentMindEvaluation/service.types"
21
17
  import { WindowHapiServiceDebugging } from "../debugging/service.types"
18
+ import { WindowHapiServiceLanguage } from "../language/service.types"
22
19
 
23
20
  export type HapiServiceFunctionLifecycleHookCallbackHandler = (
24
21
  ...args: any[]
@@ -58,10 +55,7 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
58
55
  [WindowHapiModuleName.ui]: WindowHapiServiceUI
59
56
  [WindowHapiModuleName.ats]: WindowHapiServiceATS
60
57
  [WindowHapiModuleName.debugging]: WindowHapiServiceDebugging
61
- [WindowHapiModuleName.talentMindCompany]: WindowHapiServiceTalentMindCompany
62
- [WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
63
- [WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
64
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
58
+ [WindowHapiModuleName.language]: WindowHapiServiceLanguage
65
59
  services: {
66
60
  [WindowHapiModuleName.alert]: WindowHapiServiceAlert
67
61
  [WindowHapiModuleName.basket]: WindowHapiServiceBasket
@@ -74,10 +68,7 @@ export type WindowHapiService = WindowHapiModuleWithConstructorArgs<
74
68
  [WindowHapiModuleName.ui]: WindowHapiServiceUI
75
69
  [WindowHapiModuleName.ats]: WindowHapiServiceATS
76
70
  [WindowHapiModuleName.debugging]: WindowHapiServiceDebugging
77
- [WindowHapiModuleName.talentMindCompany]: WindowHapiServiceTalentMindCompany
78
- [WindowHapiModuleName.talentMindJob]: WindowHapiServiceTalentMindJob
79
- [WindowHapiModuleName.talentMindResume]: WindowHapiServiceTalentMindResume
80
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiServiceTalentMindEvaluation
71
+ [WindowHapiModuleName.language]: WindowHapiServiceLanguage
81
72
  }
82
73
 
83
74
  decorateFunctionWithLifecycleEvents: <HandlerType extends Function>(
@@ -26,14 +26,6 @@ import { WindowHapiValidationsTheming } from "../theming/validations.types"
26
26
  import { WindowHapiValidationsOrderJourney } from "../orderJourney/validations.types"
27
27
  import { WindowHapiValidationsWallet } from "../wallet/validations.types"
28
28
  import { WindowHapiValidations } from "./validation.types"
29
- import { TalentMindCompanyState } from "../talentMindCompany/state.types"
30
- import { TalentMindJobState } from "../talentMindJob/state.types"
31
- import { TalentMindResumeState } from "../talentMindResume/state.types"
32
- import { TalentMindEvaluationState } from "../talentMindEvaluation/state.types"
33
- import { WindowHapiValidationsTalentMindResume } from "../talentMindResume/validations.types"
34
- import { WindowHapiValidationsTalentMindJob } from "../talentMindJob/validations.types"
35
- import { WindowHapiValidationsTalentMindCompany } from "../talentMindCompany/validations.types"
36
- import { WindowHapiValidationsTalentMindEvaluation } from "../talentMindEvaluation/validations.types"
37
29
 
38
30
  export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
39
31
  {
@@ -49,10 +41,6 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
49
41
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
50
42
  [WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
51
43
  [WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
52
- [WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
53
- [WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
54
- [WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
55
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
56
44
  basePropertiesThatShouldNotBeDocumented: string[]
57
45
  handleDefaultStateFromQueryParams: (params: string | string[]) => void
58
46
  rehydrateInitialState: (
@@ -74,10 +62,6 @@ export type WindowHapiState = WindowHapiModuleWithConstructorArgs<
74
62
  [WindowHapiModuleName.wallet]: WindowHapiStateModule<WalletState>
75
63
  [WindowHapiModuleName.modal]: WindowHapiStateModule<ModalState>
76
64
  [WindowHapiModuleName.ats]: WindowHapiStateModule<ATSState>
77
- [WindowHapiModuleName.talentMindCompany]: WindowHapiStateModule<TalentMindCompanyState>
78
- [WindowHapiModuleName.talentMindJob]: WindowHapiStateModule<TalentMindJobState>
79
- [WindowHapiModuleName.talentMindResume]: WindowHapiStateModule<TalentMindResumeState>
80
- [WindowHapiModuleName.talentMindEvaluation]: WindowHapiStateModule<TalentMindEvaluationState>
81
65
  }
82
66
  toJSON: Record<string, any>
83
67
  },
@@ -97,10 +81,6 @@ export type WindowHapiStatesJSON = {
97
81
  [WindowHapiModuleName.wallet]: WalletState
98
82
  [WindowHapiModuleName.modal]: ModalState
99
83
  [WindowHapiModuleName.ats]: ATSState
100
- [WindowHapiModuleName.talentMindCompany]: TalentMindCompanyState
101
- [WindowHapiModuleName.talentMindJob]: TalentMindJobState
102
- [WindowHapiModuleName.talentMindResume]: TalentMindResumeState
103
- [WindowHapiModuleName.talentMindEvaluation]: TalentMindEvaluationState
104
84
  }
105
85
 
106
86
  export type WindowHapiStateBase<T> = {
@@ -134,10 +114,6 @@ export type StateValidationKey =
134
114
  | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTheming}`
135
115
  | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsOrderJourney}`
136
116
  | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsWallet}`
137
- | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindResume}`
138
- | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindJob}`
139
- | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindCompany}`
140
- | `${keyof WindowHapiValidations}.${keyof WindowHapiValidationsTalentMindEvaluation}`
141
117
 
142
118
  export type StateValidations<State> = {
143
119
  [P in keyof State]: StateValidationKey | undefined
@@ -3,10 +3,17 @@ import {
3
3
  WindowHapiClassInterface,
4
4
  } from "./window"
5
5
 
6
+ export type WindowHapiUIElementNameForAddingToBody =
7
+ | "he-ui-modals"
8
+ | "he-ui-alertbar"
9
+
6
10
  export type WindowHapiUI = WindowHapiModuleWithConstructorArgs<
7
11
  {
8
12
  addUIElementToBody: (
9
- elementName: "he-ui-modals" | "he-ui-alertbar",
13
+ elementName: WindowHapiUIElementNameForAddingToBody,
14
+ ) => void
15
+ removeUIElementFromBody: (
16
+ elementName: WindowHapiUIElementNameForAddingToBody,
10
17
  ) => void
11
18
  toggleModal: () => void
12
19
  toggleAlertbar: () => void
@@ -10,6 +10,7 @@ import {
10
10
  } from "./window"
11
11
  import { WindowHapiUtilsModal } from "../modal/utils.types"
12
12
  import { WindowHapiUtilsRouter } from "../routing/utils.types"
13
+ import { WindowHapiUtilsLanguage } from "../language/utils.types"
13
14
 
14
15
  export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
15
16
  {
@@ -42,6 +43,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
42
43
  orderJourney: WindowHapiUtilsOrderJourney
43
44
  modal: WindowHapiUtilsModal
44
45
  router: WindowHapiUtilsRouter
46
+ language: WindowHapiUtilsLanguage
45
47
 
46
48
  utilities: {
47
49
  [WindowHapiModuleName.basket]: WindowHapiUtilsBasket
@@ -51,6 +53,7 @@ export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
51
53
  [WindowHapiModuleName.orderJourney]: WindowHapiUtilsOrderJourney
52
54
  [WindowHapiModuleName.modal]: WindowHapiUtilsModal
53
55
  [WindowHapiModuleName.router]: WindowHapiUtilsRouter
56
+ [WindowHapiModuleName.language]: WindowHapiUtilsLanguage
54
57
  }
55
58
  },
56
59
  { readonly core: WindowHapiClassInterface }
package/_window/window.ts CHANGED
@@ -5,7 +5,10 @@ import { WindowHapiInstance, WindowHapiInstances } from "./instances.types"
5
5
  import { WindowHapiRouting } from "./routing.types"
6
6
  import { WindowHapiAuth } from "./auth.types"
7
7
  import { WindowHapiEvents } from "./events.types"
8
- import { WindowHapiUI } from "./ui.types"
8
+ import {
9
+ WindowHapiUI,
10
+ WindowHapiUIElementNameForAddingToBody,
11
+ } from "./ui.types"
9
12
  import { WindowHapiAPI } from "./api.types"
10
13
  import { WindowHapiSDK } from "./sdk.types"
11
14
  import { WindowHapiService } from "./service.types"
@@ -102,7 +105,6 @@ export type WindowHapiInjectorConfig = {
102
105
  }
103
106
 
104
107
  export type WindowHapiConfigSubmodule = {
105
- talentMindApiHost: string
106
108
  apiHost: string
107
109
  initialState: RecursivePartial<any>
108
110
  partnerToken: string
@@ -130,6 +132,11 @@ export type WindowHapiConfigSubmodule = {
130
132
  featureBranches: HapiFeatureBranch[]
131
133
  }
132
134
 
135
+ export type WindowPropertiesMap = {
136
+ windowKey: WindowHapiSubmoduleName
137
+ klassProperty: keyof WindowHapiClassInterface
138
+ }
139
+
133
140
  export type WindowHapiClassInterface = {
134
141
  logger: WindowHapiLogger
135
142
  utils: WindowHapiUtilsSubmodule
@@ -149,6 +156,16 @@ export type WindowHapiClassInterface = {
149
156
  isReady: boolean
150
157
  enableLogs: boolean
151
158
  enableRemoteLogs: boolean
159
+ windowPropertiesMap: WindowPropertiesMap[]
160
+ uiElementsToAddToBody: WindowHapiUIElementNameForAddingToBody[]
161
+ attachWebComponents: () => void
162
+ attach: () => void
163
+ detach: () => void
164
+ bootstrap: () => Promise<void>
165
+ logWelcomeMessage: () => void
166
+ logDeprecationNotice: () => void
167
+ logLatestTypesPackageVersion: () => Promise<void>
168
+ logFeatureBranches: () => Promise<void>
152
169
  }
153
170
 
154
171
  export type WindowHapi = {
@@ -174,7 +191,9 @@ export type WindowHapiInjector = {
174
191
  key: K,
175
192
  value: WindowHapiInjectorConfig[K],
176
193
  ): WindowHapiInjectorConfig
177
- inject: () => Promise<void>
194
+ inject: () => Promise<never | true>
195
+ eject: () => Promise<void>
196
+ reinjectForNewUser: (newToken: string) => Promise<never | true>
178
197
  }
179
198
  hapiInjectorConfig: WindowHapiInjectorConfig
180
199
  }
package/alert/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./enums"
4
- export * from "./service.types"
5
- export * from "./state.types"
6
- export * from "./types"
3
+ export * from './enums';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
@@ -0,0 +1,6 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './enums';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
package/ats/index.ts CHANGED
@@ -1,6 +1,6 @@
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"
3
+ export * from './api.types';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
@@ -0,0 +1,6 @@
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';
package/ats/types.ts CHANGED
@@ -1,4 +1,7 @@
1
- import { WalletPaymentIntentPaymentMethod } from "../wallet/types"
1
+ import {
2
+ WalletPaymentIntentPaymentMethod,
3
+ WalletStripePaymentMethod,
4
+ } from "../wallet/types"
2
5
  import { ProductPriceCurrency } from "../product/enums"
3
6
 
4
7
  export type ATSUserPaymentSetting = {
@@ -9,6 +12,9 @@ export type ATSUserPaymentSetting = {
9
12
  gateway: {
10
13
  provider: "stripe"
11
14
  publishable_key: string
15
+ settings: {
16
+ payment_method_types: WalletStripePaymentMethod[]
17
+ }
12
18
  }
13
19
  payment_method_types: WalletPaymentIntentPaymentMethod[] | null
14
20
  }
package/basket/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./service.types"
4
- export * from "./state.types"
5
- export * from "./types"
6
- export * from "./utils.types"
7
- export * from "./validations.types"
3
+ export * from './service.types';
4
+ export * from './state.types';
5
+ export * from './types';
6
+ export * from './utils.types';
7
+ export * from './validations.types';
@@ -0,0 +1,7 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './service.types';
4
+ export * from './state.types';
5
+ export * from './types';
6
+ export * from './utils.types';
7
+ export * from './validations.types';
@@ -9,6 +9,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
9
9
 
10
10
  export type BasketServiceGetProductsHandler = (
11
11
  products?: BasketProduct[],
12
+ shouldSet?: boolean,
12
13
  ) => Promise<(Product | Contract)[]>
13
14
  export type BasketServiceAddProductOrContractByIdHandler = (
14
15
  contractOrProductId: string,
@@ -24,12 +25,13 @@ export type BasketServiceRemoveContractsWithConflictingGroupsHandler = (
24
25
  export type BasketServiceKeepContractsWithConflictingGroupsHandler = () => void
25
26
  export type BasketServiceSetProductsMetaHandler = (
26
27
  meta: BasketProduct[],
27
- ) => Promise<void>
28
+ ) => Promise<(Product | Contract)[]>
28
29
 
29
30
  export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<
30
31
  {
31
32
  onAfterGetBasketData: (
32
33
  basketItemData: (Contract | Product)[],
34
+ shouldSet: boolean,
33
35
  ) => BasketProduct[]
34
36
  setProductsMeta: BasketServiceSetProductsMetaHandler
35
37
  getProducts: HapiServiceFunctionWithLifecycleHooks<BasketServiceGetProductsHandler>
@@ -4,6 +4,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
4
4
  import {
5
5
  Product,
6
6
  ProductBoardType,
7
+ ProductDuration,
7
8
  ProductPrice,
8
9
  ProductPriceCurrency,
9
10
  } from "../product"
@@ -26,10 +27,13 @@ export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
26
27
  ) => ProductBoardType | undefined
27
28
  getBasketProductTimeToProcess: (
28
29
  product: Product | Contract,
29
- ) => string | undefined
30
+ ) => ProductDuration | undefined
31
+ getBasketProductTimeToSetup: (
32
+ product: Product | Contract,
33
+ ) => ProductDuration | undefined
30
34
  getBasketProductDuration: (
31
35
  product: Product | Contract,
32
- ) => string | undefined
36
+ ) => ProductDuration | undefined
33
37
  getIsProductOrContractInBasket: (
34
38
  contractOrProductId: string,
35
39
  productsMeta: BasketProduct[],
@@ -31,6 +31,7 @@ export type WindowHapiAPICampaignRequests = {
31
31
  offset?: number,
32
32
  limit?: number,
33
33
  labels?: Record<string, string> | null,
34
+ queryParams?: Record<string, any>,
34
35
  ) => Promise<PaginatedAPIResponseV2<Campaign>>
35
36
  getCampaign: (
36
37
  campaignId: string,
@@ -46,7 +47,10 @@ export type WindowHapiAPICampaignRequests = {
46
47
  ) => Promise<ProductSupportingContractsComplete>
47
48
  getEducationLevels: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
48
49
  getSeniorities: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
49
- orderCampaign: (postBody: CampaignOrderRequestBody) => Promise<Campaign>
50
+ orderCampaign: (
51
+ postBody: CampaignOrderRequestBody,
52
+ queryParams?: Record<string, any>,
53
+ ) => Promise<Campaign>
50
54
  saveCampaign: (postBody: CampaignEditRequestBody) => Promise<Campaign>
51
55
  validateCampaign: (postBody: CampaignOrderRequestBody) => Promise<Campaign>
52
56
  validateCampaignPostingRequirements: (
package/campaign/enums.ts CHANGED
@@ -9,9 +9,6 @@ export enum EmploymentType {
9
9
  }
10
10
 
11
11
  export enum SalaryPeriod {
12
- DAILY = "daily",
13
12
  MONTHLY = "monthly",
14
- HOURLY = "hourly",
15
- WEEKLY = "weekly",
16
13
  YEARLY = "yearly",
17
14
  }
package/campaign/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';
@@ -11,15 +11,23 @@ import {
11
11
  CampaignOrderRequestBody,
12
12
  CampaignSetProductStatusRequestBody,
13
13
  TaxonomyEducationAndSeniorityLevel,
14
+ TaxonomyEmploymentTypes,
14
15
  } from "./types"
15
16
  import { PaginatedAPIResponseV2 } from "../common/types"
16
17
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
17
18
  import { AlertKey } from "../alert"
19
+ import { EmploymentType } from "./enums"
18
20
 
19
21
  export type CampaignServiceGetCampaignsHandler = (
20
22
  offset?: number,
21
23
  limit?: number,
22
24
  labels?: Record<string, string> | null,
25
+ queryParams?: Record<string, any>,
26
+ ) => Promise<PaginatedAPIResponseV2<Campaign>>
27
+ export type CampaignServiceGetCampaignsLabeledHandler = (
28
+ offset?: number,
29
+ limit?: number,
30
+ labels?: Record<string, string> | null,
23
31
  ) => Promise<PaginatedAPIResponseV2<Campaign>>
24
32
  export type CampaignServiceGetCampaignDetailHandler = (
25
33
  campaignId: string,
@@ -65,9 +73,13 @@ export type CampaignServiceSetProductStatusHandler = (
65
73
  campaignId: string,
66
74
  requestBody: CampaignSetProductStatusRequestBody,
67
75
  ) => Promise<CampaignIdResponse>
76
+ export type CampaignServiceGetEmploymentTypesHandler = () => Promise<
77
+ TaxonomyEmploymentTypes[]
78
+ >
68
79
  export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
69
80
  {
70
81
  getCampaigns: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsHandler>
82
+ getCampaignsLabeled: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsLabeledHandler>
71
83
  getCampaignDetail: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignDetailHandler>
72
84
  getCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignHandler>
73
85
  setCampaignCancellation: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSetCampaignCancellationHandler>
@@ -83,9 +95,11 @@ export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
83
95
  validateContractPostingRequirementsWithCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateContractPostingRequirementsWithCampaignHandler>
84
96
  saveCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSaveCampaignHandler>
85
97
  validateCampaign: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateCampaignHandler>
98
+ validateCampaignThroughOrder: HapiServiceFunctionWithLifecycleHooks<CampaignServiceValidateCampaignHandler>
86
99
  getCopyCampaignRequestBody: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCopyCampaignRequestBodyHandler>
87
100
  getEditCampaignRequestBody: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEditCampaignRequestBodyHandler>
88
101
  setProductStatus: HapiServiceFunctionWithLifecycleHooks<CampaignServiceSetProductStatusHandler>
102
+ getEmploymentTypes: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetEmploymentTypesHandler>
89
103
  },
90
104
  { readonly service: WindowHapiService }
91
105
  >
package/campaign/types.ts CHANGED
@@ -136,29 +136,39 @@ export type CampaignDraft = {
136
136
  paymentStatus: "processing_payment"
137
137
  }
138
138
 
139
- export type Campaign = Pick<CampaignDraft, "campaignId"> & {
140
- labels: Record<string, string> | null
141
- currency: ProductPriceCurrency
142
- campaignName: string | null
143
- companyId: string
144
- createdOn: string
145
- poNumber: string | null
146
- customerId: string
147
- orderReference: string | null
148
- orderedProducts: string[]
149
- orderedProductsSpecs: CampaignProductSpecs[]
150
- postingDetails: CampaignPostingDetails
151
- paymentMethod: OrderJourneyPaymentMethod
152
- postings: CampaignPosting[]
153
- recruiterInfo: CampaignRecruiterInfo
154
- status: CampaignStatus
155
- targetGroup: CampaignTargetGroup
156
- totalPrice: CampaignTotalPrice
157
- walletId: string
158
- detailedStatus?: CampaignDetailedStatus //this is only added virtually on FE on demand
159
- isEditable: boolean
139
+ export type CampaignDraftStatus = "new" | "invoiced" | "completed"
140
+
141
+ export type CampaignDraftV2 = {
142
+ campaignId: string
143
+ draft?: {
144
+ status: CampaignDraftStatus
145
+ }
160
146
  }
161
147
 
148
+ export type Campaign = Pick<CampaignDraft, "campaignId"> &
149
+ CampaignDraftV2 & {
150
+ labels: Record<string, string> | null
151
+ currency: ProductPriceCurrency
152
+ campaignName: string | null
153
+ companyId: string
154
+ createdOn: string
155
+ poNumber: string | null
156
+ customerId: string
157
+ orderReference: string | null
158
+ orderedProducts: string[]
159
+ orderedProductsSpecs: CampaignProductSpecs[]
160
+ postingDetails: CampaignPostingDetails
161
+ paymentMethod: OrderJourneyPaymentMethod
162
+ postings: CampaignPosting[]
163
+ recruiterInfo: CampaignRecruiterInfo
164
+ status: CampaignStatus
165
+ targetGroup: CampaignTargetGroup
166
+ totalPrice: CampaignTotalPrice
167
+ walletId: string
168
+ detailedStatus?: CampaignDetailedStatus //this is only added virtually on FE on demand
169
+ isEditable: boolean
170
+ }
171
+
162
172
  export type CampaignCreateFormTargetGroupEducationLevel =
163
173
  TaxonomyEducationAndSeniorityLevel
164
174
 
@@ -14,6 +14,7 @@ import {
14
14
  CampaignPostingRequirementsValidateResponse,
15
15
  CampaignTargetGroup,
16
16
  CampaignTargetGroupData,
17
+ TaxonomyEducationAndSeniorityLevel,
17
18
  } from "./types"
18
19
  import { Product } from "../product/types"
19
20
  import { Contract } from "../contract/types"