@vonq/hapi-elements-types 1.22.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 (96) 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 +3 -12
  5. package/_window/state.types.ts +0 -24
  6. package/_window/utils.types.ts +3 -0
  7. package/_window/window.ts +0 -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 +8 -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/types.ts +2 -0
  39. package/contract/validations.types.ts +1 -0
  40. package/debugging/index.ts +3 -2
  41. package/debugging/index.ts.bak +4 -0
  42. package/index.ts +16 -16
  43. package/index.ts.bak +18 -0
  44. package/language/enums.ts +5 -0
  45. package/language/index.ts +6 -3
  46. package/language/index.ts.bak +5 -0
  47. package/language/service.types.ts +7 -0
  48. package/language/state.types.ts +3 -1
  49. package/language/utils.types.ts +11 -0
  50. package/modal/enums.ts +3 -3
  51. package/modal/index.ts +5 -4
  52. package/modal/index.ts.bak +6 -0
  53. package/modal/types.ts +11 -8
  54. package/orderJourney/index.ts +7 -6
  55. package/orderJourney/index.ts.bak +8 -0
  56. package/orderJourney/qa.types.ts +3 -1
  57. package/orderJourney/service.types.ts +2 -8
  58. package/orderJourney/state.types.ts +31 -8
  59. package/orderJourney/types.ts +79 -16
  60. package/orderJourney/validations.types.ts +13 -2
  61. package/package.json +2 -3
  62. package/product/index.ts +8 -8
  63. package/product/index.ts.bak +10 -0
  64. package/product/types.ts +4 -1
  65. package/routing/index.ts +2 -1
  66. package/routing/index.ts.bak +3 -0
  67. package/theming/index.ts +4 -4
  68. package/theming/index.ts.bak +6 -0
  69. package/theming/types.ts +44 -0
  70. package/theming/validations.types.ts +16 -0
  71. package/ui/index.ts.bak +3 -0
  72. package/wallet/index.ts +5 -5
  73. package/wallet/index.ts.bak +7 -0
  74. package/wallet/state.types.ts +1 -1
  75. package/wallet/types.ts +6 -1
  76. package/talentMindCompany/api.types.ts +0 -18
  77. package/talentMindCompany/service.types.ts +0 -15
  78. package/talentMindCompany/state.types.ts +0 -5
  79. package/talentMindCompany/types.ts +0 -6
  80. package/talentMindCompany/validations.types.ts +0 -5
  81. package/talentMindEvaluation/api.types.ts +0 -25
  82. package/talentMindEvaluation/service.types.ts +0 -25
  83. package/talentMindEvaluation/state.types.ts +0 -6
  84. package/talentMindEvaluation/types.ts +0 -15
  85. package/talentMindEvaluation/validations.types.ts +0 -5
  86. package/talentMindJob/api.types.ts +0 -26
  87. package/talentMindJob/service.types.ts +0 -28
  88. package/talentMindJob/state.types.ts +0 -6
  89. package/talentMindJob/types.ts +0 -12
  90. package/talentMindJob/validations.types.ts +0 -5
  91. package/talentMindResume/api.types.ts +0 -30
  92. package/talentMindResume/service.types.ts +0 -34
  93. package/talentMindResume/state.types.ts +0 -6
  94. package/talentMindResume/types.ts +0 -119
  95. package/talentMindResume/validations.types.ts +0 -5
  96. 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';
@@ -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
@@ -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
@@ -102,7 +102,6 @@ export type WindowHapiInjectorConfig = {
102
102
  }
103
103
 
104
104
  export type WindowHapiConfigSubmodule = {
105
- talentMindApiHost: string
106
105
  apiHost: string
107
106
  initialState: RecursivePartial<any>
108
107
  partnerToken: string
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"
@@ -24,7 +24,7 @@ export type BasketServiceRemoveContractsWithConflictingGroupsHandler = (
24
24
  export type BasketServiceKeepContractsWithConflictingGroupsHandler = () => void
25
25
  export type BasketServiceSetProductsMetaHandler = (
26
26
  meta: BasketProduct[],
27
- ) => Promise<void>
27
+ ) => Promise<(Product | Contract)[]>
28
28
 
29
29
  export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<
30
30
  {
@@ -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"
@@ -13,6 +13,7 @@ import {
13
13
  } from "zod"
14
14
  import { ZodProductDuration } from "../product/validations.types"
15
15
  import { OrderJourneyPaymentMethod } from "../orderJourney"
16
+ import { CampaignDraftStatus } from "./types"
16
17
 
17
18
  export type ZodCampaignTotalPrice = ZodObject<{
18
19
  amount: ZodNumber
@@ -156,7 +157,17 @@ export type ZodCampaignDraft = ZodObject<{
156
157
  paymentStatus: ZodString
157
158
  }>
158
159
 
159
- export type ZodCampaigns = ZodArray<ZodUnion<[ZodCampaign, ZodCampaignDraft]>>
160
+ export type ZodCampaignDraftStatus = ZodObject<{
161
+ status: ZodString
162
+ }>
163
+
164
+ export type ZodCampaignDraftV2 = ZodObject<{
165
+ draft: ZodOptional<ZodCampaignDraftStatus>
166
+ }>
167
+
168
+ export type ZodCampaigns = ZodArray<
169
+ ZodUnion<[ZodCampaign, ZodCampaignDraft, ZodCampaignDraftV2]>
170
+ >
160
171
  export type ZodCampaignCreateFormPostingDetails = ZodObject<{
161
172
  title: ZodString
162
173
  description: ZodString
@@ -183,6 +194,7 @@ export type ZodCampaignCreateFormTargetGroup = ZodObject<{
183
194
  >
184
195
  }>
185
196
  export type ZodCampaignCreateForm = ZodObject<{
197
+ labels: ZodOptional<ZodNullable<ZodRecord<ZodString, ZodString>>>
186
198
  companyId: ZodString
187
199
  campaignName: ZodOptional<ZodNullable<ZodString>>
188
200
  poNumber: ZodOptional<ZodNullable<ZodString>>
@@ -197,7 +209,9 @@ export type ZodCampaignCreateForm = ZodObject<{
197
209
  }>
198
210
  export type WindowHapiValidationsCampaign = {
199
211
  status: string[]
212
+ draftStatus: CampaignDraftStatus[]
200
213
  statusRegex: RegExp
214
+ draftStatusRegex: RegExp
201
215
  supportedEmploymentType: string[]
202
216
  employmentTypeRegex: RegExp
203
217
  employmentType: ZodCampaignEmploymentType
package/common/enums.ts CHANGED
@@ -33,10 +33,6 @@ 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",
40
36
  }
41
37
 
42
38
  export enum WindowHapiSDKModuleName {
@@ -0,0 +1,4 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './enums';
4
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './EventCommand';
4
+ export * from './types';
package/common/index.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./events"
4
- export * from "./qa.types"
5
- export * from "./types"
6
- export * from "./validations.types"
7
- export * from "./enums"
3
+ export * from './events';
4
+ export * from './logger';
5
+ export * from './validator';
6
+ export * from './enums';
7
+ export * from './qa.types';
8
+ export * from './types';
9
+ export * from './validations.types';
@@ -0,0 +1,7 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from "./events"
4
+ export * from "./qa.types"
5
+ export * from "./types"
6
+ export * from "./validations.types"
7
+ export * from "./enums"
@@ -0,0 +1,4 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './enums';
4
+ export * from './types';