@vonq/hapi-elements-types 1.5.0 → 1.7.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.
- package/{src/_window → _window}/api.types.ts +9 -7
- package/_window/auth.types.ts +13 -0
- package/_window/config.types.ts +5 -0
- package/{src/_window → _window}/events.types.ts +15 -14
- package/_window/instances.types.ts +27 -0
- package/{src/_window → _window}/qa.types.ts +7 -5
- package/{src/_window → _window}/routing.types.ts +6 -4
- package/{src/_window → _window}/sdk.types.ts +29 -27
- package/{src/_window → _window}/service.types.ts +9 -7
- package/{src/_window → _window}/state.types.ts +55 -53
- package/_window/ui.types.ts +15 -0
- package/{src/_window → _window}/utils.types.ts +7 -5
- package/{src/_window → _window}/validation.types.ts +7 -5
- package/_window/window.ts +140 -0
- package/alert/index.ts +6 -0
- package/{src/alert → alert}/service.types.ts +2 -2
- package/alert/state.types.ts +9 -0
- package/{src/ats → ats}/api.types.ts +2 -2
- package/ats/index.ts +6 -0
- package/{src/ats → ats}/service.types.ts +2 -2
- package/{src/ats → ats}/state.types.ts +1 -1
- package/basket/index.ts +7 -0
- package/{src/basket → basket}/service.types.ts +2 -2
- package/{src/basket → basket}/state.types.ts +1 -1
- package/{src/basket → basket}/utils.types.ts +2 -2
- package/{src/campaign → campaign}/api.types.ts +2 -2
- package/campaign/index.ts +10 -0
- package/campaign/qa.types.ts +12 -0
- package/{src/campaign → campaign}/service.types.ts +2 -2
- package/{src/campaign → campaign}/state.types.ts +1 -1
- package/{src/campaign → campaign}/utils.types.ts +2 -2
- package/{enums.ts → common/enums.ts} +2 -1
- package/{src/common → common}/events/types.ts +6 -6
- package/common/index.ts +7 -0
- package/common/logger/types.ts +18 -0
- package/{src/common → common}/qa.types.ts +2 -2
- package/{src/common → common}/types.ts +5 -6
- package/common/validator/types.ts +4 -0
- package/{src/contract → contract}/api.types.ts +2 -2
- package/contract/index.ts +9 -0
- package/{src/contract → contract}/qa.types.ts +2 -2
- package/{src/contract → contract}/service.types.ts +2 -2
- package/{src/contract → contract}/state.types.ts +1 -1
- package/{src/contract → contract}/utils.types.ts +2 -2
- package/{src/common/logger-datadog → debugging}/index.ts +1 -1
- package/{src/debugging → debugging}/state.types.ts +1 -1
- package/index.ts +18 -0
- package/language/index.ts +5 -0
- package/{src/language → language}/qa.types.ts +2 -2
- package/{src/language → language}/state.types.ts +1 -1
- package/modal/index.ts +6 -0
- package/{src/modal → modal}/service.types.ts +2 -2
- package/{src/modal → modal}/state.types.ts +1 -1
- package/orderJourney/index.ts +8 -0
- package/{src/orderJourney → orderJourney}/qa.types.ts +2 -2
- package/{src/orderJourney → orderJourney}/state.types.ts +1 -1
- package/{src/orderJourney → orderJourney}/utils.types.ts +2 -2
- package/package.json +16 -5
- package/{src/product → product}/api.types.ts +2 -2
- package/product/index.ts +10 -0
- package/{src/product → product}/qa.types.ts +2 -2
- package/{src/product → product}/service.types.ts +2 -2
- package/{src/product → product}/state.types.ts +1 -1
- package/{src/product → product}/utils.types.ts +2 -2
- package/routing/index.ts +3 -0
- package/theming/index.ts +6 -0
- package/{src/theming → theming}/qa.types.ts +2 -2
- package/{src/theming → theming}/state.types.ts +1 -1
- package/{src/theming → theming}/types.ts +38 -1
- package/tsconfig.json +7 -12
- package/{src/ui → ui}/service.types.ts +2 -2
- package/{src/wallet → wallet}/api.types.ts +2 -2
- package/wallet/index.ts +7 -0
- package/{src/wallet → wallet}/service.types.ts +2 -2
- package/{src/wallet → wallet}/state.types.ts +1 -1
- package/src/_window/auth.types.ts +0 -11
- package/src/_window/config.types.ts +0 -30
- package/src/_window/instances.types.ts +0 -18
- package/src/_window/ui.types.ts +0 -13
- package/src/_window/window.ts +0 -56
- package/src/alert/functions.types.ts +0 -13
- package/src/alert/index.ts +0 -9
- package/src/alert/state.initial.ts +0 -16
- package/src/alert/state.types.ts +0 -27
- package/src/alert/state.validations.ts +0 -11
- package/src/ats/functions.types.ts +0 -7
- package/src/ats/index.ts +0 -9
- package/src/ats/state.initial.ts +0 -5
- package/src/ats/state.validations.ts +0 -6
- package/src/basket/consts.ts +0 -1
- package/src/basket/functions.types.ts +0 -40
- package/src/basket/index.ts +0 -12
- package/src/basket/state.initial.ts +0 -11
- package/src/basket/state.validations.ts +0 -12
- package/src/basket/utils.ts +0 -79
- package/src/campaign/consts.ts +0 -1
- package/src/campaign/functions.types.ts +0 -90
- package/src/campaign/index.ts +0 -15
- package/src/campaign/qa.types.ts +0 -12
- package/src/campaign/state.initial.ts +0 -84
- package/src/campaign/state.validations.ts +0 -16
- package/src/campaign/utils.ts +0 -53
- package/src/common/LocalStorage.ts +0 -123
- package/src/common/browser.ts +0 -2
- package/src/common/color.ts +0 -9
- package/src/common/immutable.ts +0 -28
- package/src/common/index.ts +0 -22
- package/src/common/instances/Instance.ts +0 -13
- package/src/common/instances/consts.ts +0 -1
- package/src/common/instances/index.ts +0 -4
- package/src/common/json.ts +0 -25
- package/src/common/logger/Logger.ts +0 -70
- package/src/common/logger/index.ts +0 -5
- package/src/common/logger/types.ts +0 -7
- package/src/common/logger-datadog/LoggerDatadog.ts +0 -42
- package/src/common/misc.ts +0 -114
- package/src/common/promise.ts +0 -161
- package/src/common/proxy.ts +0 -77
- package/src/common/regExTest.ts +0 -12
- package/src/common/tree.ts +0 -148
- package/src/common/utm.ts +0 -19
- package/src/common/validators.ts +0 -21
- package/src/common/webComponents.ts +0 -26
- package/src/config/functions.types.ts +0 -23
- package/src/config/index.ts +0 -5
- package/src/config/state.initial.ts +0 -11
- package/src/config/state.types.ts +0 -15
- package/src/consts.ts +0 -980
- package/src/contract/consts.ts +0 -1
- package/src/contract/functions.types.ts +0 -112
- package/src/contract/index.ts +0 -14
- package/src/contract/state.initial.ts +0 -39
- package/src/contract/state.validations.ts +0 -21
- package/src/contract/utils.ts +0 -36
- package/src/debugging/functions.types.ts +0 -34
- package/src/debugging/index.ts +0 -6
- package/src/debugging/state.initial.ts +0 -10
- package/src/debugging/state.validations.ts +0 -10
- package/src/index.ts +0 -22
- package/src/language/consts.ts +0 -6
- package/src/language/en.ts +0 -530
- package/src/language/functions.types.ts +0 -29
- package/src/language/index.ts +0 -11
- package/src/language/state.initial.ts +0 -13
- package/src/language/state.validations.ts +0 -10
- package/src/language/utils.ts +0 -17
- package/src/modal/consts.ts +0 -6
- package/src/modal/functions.types.ts +0 -22
- package/src/modal/index.ts +0 -11
- package/src/modal/state.initial.ts +0 -9
- package/src/modal/state.validations.ts +0 -6
- package/src/modal/store.types.ts +0 -5
- package/src/orderJourney/consts.ts +0 -289
- package/src/orderJourney/functions.types.ts +0 -140
- package/src/orderJourney/index.ts +0 -13
- package/src/orderJourney/state.initial.ts +0 -401
- package/src/orderJourney/state.validations.ts +0 -78
- package/src/orderJourney/utils.ts +0 -7
- package/src/product/consts.ts +0 -1
- package/src/product/functions.types.ts +0 -156
- package/src/product/index.ts +0 -14
- package/src/product/state.initial.ts +0 -28
- package/src/product/state.validations.ts +0 -25
- package/src/routing/functions.types.ts +0 -48
- package/src/routing/index.ts +0 -5
- package/src/routing/state.initial.ts +0 -10
- package/src/theming/consts.ts +0 -7727
- package/src/theming/functions.types.ts +0 -13
- package/src/theming/index.ts +0 -11
- package/src/theming/state.initial.ts +0 -16
- package/src/theming/state.validations.ts +0 -8
- package/src/theming/utils.ts +0 -581
- package/src/types.ts +0 -229
- package/src/utils.ts +0 -3
- package/src/wallet/consts.ts +0 -3
- package/src/wallet/functions.types.ts +0 -58
- package/src/wallet/index.ts +0 -11
- package/src/wallet/state.initial.ts +0 -18
- package/src/wallet/state.validations.ts +0 -18
- /package/{src/_window → _window}/index.ts +0 -0
- /package/{src/alert → alert}/enums.ts +0 -0
- /package/{src/alert → alert}/types.ts +0 -0
- /package/{src/ats → ats}/types.ts +0 -0
- /package/{src/basket → basket}/types.ts +0 -0
- /package/{src/basket → basket}/validations.types.ts +0 -0
- /package/{src/campaign → campaign}/enums.ts +0 -0
- /package/{src/campaign → campaign}/types.ts +0 -0
- /package/{src/campaign → campaign}/validations.types.ts +0 -0
- /package/{src/common → common}/events/EventCommand/enums.ts +0 -0
- /package/{src/common → common}/events/EventCommand/index.ts +0 -0
- /package/{src/common → common}/events/EventCommand/types.ts +0 -0
- /package/{src/common → common}/events/index.ts +0 -0
- /package/{src/common → common}/logger/enums.ts +0 -0
- /package/{src/common → common}/validations.types.ts +0 -0
- /package/{src/contract → contract}/types.ts +0 -0
- /package/{src/contract → contract}/validations.types.ts +0 -0
- /package/{src/language → language}/validations.types.ts +0 -0
- /package/{src/modal → modal}/enums.ts +0 -0
- /package/{src/modal → modal}/types.ts +0 -0
- /package/{src/orderJourney → orderJourney}/enums.ts +0 -0
- /package/{src/orderJourney → orderJourney}/types.ts +0 -0
- /package/{src/orderJourney → orderJourney}/validations.types.ts +0 -0
- /package/{src/product → product}/enums.ts +0 -0
- /package/{src/product → product}/types.ts +0 -0
- /package/{src/product → product}/validations.types.ts +0 -0
- /package/{src/routing → routing}/state.types.ts +0 -0
- /package/{src/theming → theming}/validations.types.ts +0 -0
- /package/{src/ui → ui}/index.ts +0 -0
- /package/{src/wallet → wallet}/types.ts +0 -0
- /package/{src/wallet → wallet}/validations.types.ts +0 -0
package/src/types.ts
DELETED
@@ -1,229 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { WindowHapiState } from "./_window/state.types"
|
3
|
-
import { WindowHapiAuth } from "./_window/auth.types"
|
4
|
-
import { WindowHapiUI } from "./_window/ui.types"
|
5
|
-
import HapiInstance from "./common/instances/Instance"
|
6
|
-
import { WindowHapiQA } from "./_window/qa.types"
|
7
|
-
import { ProductStoreState } from "./product/state.types"
|
8
|
-
import { ProductStoreFunctions } from "./product/functions.types"
|
9
|
-
import { BasketStoreState } from "./basket/state.types"
|
10
|
-
import { BasketStoreFunctions } from "./basket/functions.types"
|
11
|
-
import { ModalStore } from "./modal/store.types"
|
12
|
-
import { ModalStoreState } from "./modal/state.types"
|
13
|
-
import { ModalStoreFunctions } from "./modal/functions.types"
|
14
|
-
import { ContractStoreState } from "./contract/state.types"
|
15
|
-
import { ContractStoreFunctions } from "./contract/functions.types"
|
16
|
-
import { AlertStoreState } from "./alert/state.types"
|
17
|
-
import { AlertStoreFunctions } from "./alert/functions.types"
|
18
|
-
import { OrderJourneyStoreState } from "./orderJourney/state.types"
|
19
|
-
import { OrderJourneyStoreFunctions } from "./orderJourney/functions.types"
|
20
|
-
import { CampaignStoreState } from "./campaign/state.types"
|
21
|
-
import { CampaignStoreFunctions } from "./campaign/functions.types"
|
22
|
-
import { WalletStoreState } from "./wallet/state.types"
|
23
|
-
import { WalletStoreFunctions } from "./wallet/functions.types"
|
24
|
-
import { ThemeStoreState } from "./theming/state.types"
|
25
|
-
import { ThemeStoreFunctions } from "./theming/functions.types"
|
26
|
-
import { RouterStoreState } from "./routing/state.types"
|
27
|
-
import { RouterStoreFunctions } from "./routing/functions.types"
|
28
|
-
import { ConfigStoreState } from "./config/state.types"
|
29
|
-
import { ConfigStoreFunctions } from "./config/functions.types"
|
30
|
-
import { LanguageStoreState } from "./language/state.types"
|
31
|
-
import { LanguageStoreFunctions } from "./language/functions.types"
|
32
|
-
import { DebuggingStoreState } from "./debugging/state.types"
|
33
|
-
import { DebuggingStoreFunctions } from "./debugging/functions.types"
|
34
|
-
import { IntlShape } from "react-intl"
|
35
|
-
import { Logger } from "./common/logger/Logger"
|
36
|
-
import { IReactionDisposer } from "mobx"
|
37
|
-
import { ATSStoreState } from "./ats/state.types"
|
38
|
-
import { ATSStoreFunctions } from "./ats/functions.types"
|
39
|
-
import { WindowHapiValidations } from "./_window/validation.types"
|
40
|
-
import { WindowHapiUtils } from "./_window/utils.types"
|
41
|
-
import { WindowHapiRouting } from "./_window/routing.types"
|
42
|
-
import { WindowHapiInstances } from "./_window/instances.types"
|
43
|
-
import { WindowHapiSDK } from "./_window/sdk.types"
|
44
|
-
import { WindowHapiService } from "./_window/service.types"
|
45
|
-
import { WindowHapiEvents } from "./_window/events.types"
|
46
|
-
import { WindowHapiAPI } from "./_window/api.types"
|
47
|
-
import { WindowHapiConfig } from "./_window/config.types"
|
48
|
-
import { RecursivePartial } from "./common/types"
|
49
|
-
|
50
|
-
export type ComponentWithChildren = {
|
51
|
-
children?: React.ReactNode
|
52
|
-
}
|
53
|
-
|
54
|
-
export type WindowHAPIInterface = {
|
55
|
-
hapiState: WindowHapiState
|
56
|
-
hapiAuth: WindowHapiAuth
|
57
|
-
hapiConfig: WindowHapiConfig
|
58
|
-
hapiEvents: WindowHapiEvents
|
59
|
-
hapiInstances: WindowHapiInstances
|
60
|
-
hapiRouting: WindowHapiRouting
|
61
|
-
hapiUI: WindowHapiUI
|
62
|
-
hapiUtils: WindowHapiUtils
|
63
|
-
hapiInstance: HapiInstance
|
64
|
-
hapiValidation: WindowHapiValidations
|
65
|
-
hapi: WindowHapiSDK
|
66
|
-
hapiApi: WindowHapiAPI
|
67
|
-
hapiService: WindowHapiService
|
68
|
-
hapiQA: WindowHapiQA
|
69
|
-
__hapi: IRootStore
|
70
|
-
__mobxToJS: <T>(source: T, options?: any) => T
|
71
|
-
}
|
72
|
-
export type BaseStoreFunctions = {
|
73
|
-
init: () => void
|
74
|
-
}
|
75
|
-
export type CreateLoggerHandler = (
|
76
|
-
source?: string,
|
77
|
-
isEnabled?: boolean,
|
78
|
-
) => Logger
|
79
|
-
export type IRootStore = {
|
80
|
-
store: Stores
|
81
|
-
rehydrateStore: (
|
82
|
-
storeName: keyof Stores,
|
83
|
-
storeData: RecursivePartial<Stores[keyof Stores]>,
|
84
|
-
) => void
|
85
|
-
intl: IntlShape
|
86
|
-
createLogger: CreateLoggerHandler
|
87
|
-
|
88
|
-
sourceInstance: HapiInstance
|
89
|
-
targetInstances: HapiInstance[]
|
90
|
-
}
|
91
|
-
export type BaseStoreVariables = {
|
92
|
-
rootStore: IRootStore
|
93
|
-
}
|
94
|
-
export type BaseStoreVariablesAndFunctions = BaseStoreVariables &
|
95
|
-
BaseStoreFunctions
|
96
|
-
export type BaseStore<State, Functions> = BaseStoreVariablesAndFunctions &
|
97
|
-
State &
|
98
|
-
Functions
|
99
|
-
export type ConfigStore = BaseStore<ConfigStoreState, ConfigStoreFunctions>
|
100
|
-
export type ConfigStoreType = StoryFactoryType<
|
101
|
-
ConfigStore,
|
102
|
-
ConfigStoreState,
|
103
|
-
ConfigStoreFunctions
|
104
|
-
>
|
105
|
-
export type ATSStore = BaseStore<ATSStoreState, ATSStoreFunctions>
|
106
|
-
export type ATSStoreType = StoryFactoryType<
|
107
|
-
ATSStore,
|
108
|
-
ATSStoreState,
|
109
|
-
ATSStoreFunctions
|
110
|
-
>
|
111
|
-
export type LanguageStore = BaseStore<
|
112
|
-
LanguageStoreState,
|
113
|
-
LanguageStoreFunctions
|
114
|
-
>
|
115
|
-
export type LanguageStoreType = StoryFactoryType<
|
116
|
-
LanguageStore,
|
117
|
-
LanguageStoreState,
|
118
|
-
LanguageStoreFunctions
|
119
|
-
>
|
120
|
-
export type AlertStore = BaseStore<AlertStoreState, AlertStoreFunctions>
|
121
|
-
export type AlertStoreType = StoryFactoryType<
|
122
|
-
AlertStore,
|
123
|
-
AlertStoreState,
|
124
|
-
AlertStoreFunctions
|
125
|
-
>
|
126
|
-
export type ThemeStore = BaseStore<ThemeStoreState, ThemeStoreFunctions>
|
127
|
-
export type ThemeStoreType = StoryFactoryType<
|
128
|
-
ThemeStore,
|
129
|
-
ThemeStoreState,
|
130
|
-
ThemeStoreFunctions
|
131
|
-
>
|
132
|
-
export type RouterStore = BaseStore<RouterStoreState, RouterStoreFunctions>
|
133
|
-
export type RouterStoreType = StoryFactoryType<
|
134
|
-
RouterStore,
|
135
|
-
RouterStoreState,
|
136
|
-
RouterStoreFunctions
|
137
|
-
>
|
138
|
-
export type ContractStore = BaseStore<
|
139
|
-
ContractStoreState,
|
140
|
-
ContractStoreFunctions
|
141
|
-
>
|
142
|
-
export type ContractStoreType = StoryFactoryType<
|
143
|
-
ContractStore,
|
144
|
-
ContractStoreState,
|
145
|
-
ContractStoreFunctions
|
146
|
-
>
|
147
|
-
export type ProductStore = BaseStore<ProductStoreState, ProductStoreFunctions>
|
148
|
-
export type ProductStoreType = StoryFactoryType<
|
149
|
-
ProductStore,
|
150
|
-
ProductStoreState,
|
151
|
-
ProductStoreFunctions
|
152
|
-
>
|
153
|
-
export type CampaignStore = BaseStore<
|
154
|
-
CampaignStoreState,
|
155
|
-
CampaignStoreFunctions
|
156
|
-
>
|
157
|
-
export type CampaignStoreType = StoryFactoryType<
|
158
|
-
CampaignStore,
|
159
|
-
CampaignStoreState,
|
160
|
-
CampaignStoreFunctions
|
161
|
-
>
|
162
|
-
export type WalletStore = BaseStore<WalletStoreState, WalletStoreFunctions>
|
163
|
-
export type WalletStoreType = StoryFactoryType<
|
164
|
-
WalletStore,
|
165
|
-
WalletStoreState,
|
166
|
-
WalletStoreFunctions
|
167
|
-
>
|
168
|
-
export type BasketStore = BaseStore<BasketStoreState, BasketStoreFunctions>
|
169
|
-
export type BasketStoreType = StoryFactoryType<
|
170
|
-
BasketStore,
|
171
|
-
BasketStoreState,
|
172
|
-
BasketStoreFunctions
|
173
|
-
>
|
174
|
-
export type ModalStoreType = StoryFactoryType<
|
175
|
-
ModalStore,
|
176
|
-
ModalStoreState,
|
177
|
-
ModalStoreFunctions
|
178
|
-
>
|
179
|
-
export type OrderJourneyStore = BaseStore<
|
180
|
-
OrderJourneyStoreState,
|
181
|
-
OrderJourneyStoreFunctions
|
182
|
-
>
|
183
|
-
export type OrderJourneyStoreType = StoryFactoryType<
|
184
|
-
OrderJourneyStore,
|
185
|
-
OrderJourneyStoreState,
|
186
|
-
OrderJourneyStoreFunctions
|
187
|
-
>
|
188
|
-
export type DebuggingStore = BaseStore<
|
189
|
-
DebuggingStoreState,
|
190
|
-
DebuggingStoreFunctions
|
191
|
-
>
|
192
|
-
export type DebuggingStoreType = StoryFactoryType<
|
193
|
-
DebuggingStore,
|
194
|
-
DebuggingStoreState,
|
195
|
-
DebuggingStoreFunctions
|
196
|
-
>
|
197
|
-
export type Stores = {
|
198
|
-
atsStore: ATSStoreType
|
199
|
-
configStore: ConfigStoreType
|
200
|
-
languageStore: LanguageStoreType
|
201
|
-
alertStore: AlertStoreType
|
202
|
-
themeStore: ThemeStoreType
|
203
|
-
contractStore: ContractStoreType
|
204
|
-
productStore: ProductStoreType
|
205
|
-
routerStore: RouterStoreType
|
206
|
-
campaignStore: CampaignStoreType
|
207
|
-
modalStore: ModalStoreType
|
208
|
-
walletStore: WalletStoreType
|
209
|
-
basketStore: BasketStoreType
|
210
|
-
orderJourneyStore: OrderJourneyStoreType
|
211
|
-
debuggingStore: DebuggingStoreType
|
212
|
-
}
|
213
|
-
export type CommonStoreVariablesAndFunctions = {
|
214
|
-
init: (...args: any[]) => void | Promise<void>
|
215
|
-
logger: Logger
|
216
|
-
classObserver: StoreClassObserver | undefined
|
217
|
-
toJSON: JSON
|
218
|
-
}
|
219
|
-
export type StoreClassObserver = IReactionDisposer
|
220
|
-
export type StoreFactory<Store, _StoreState, _StoreFunctions> =
|
221
|
-
CommonStoreVariablesAndFunctions
|
222
|
-
export type StoryFactoryType<Store, _StoreState, _StoreFunctions> =
|
223
|
-
StoreFactory<Store, _StoreState, _StoreFunctions> &
|
224
|
-
_StoreState &
|
225
|
-
_StoreFunctions
|
226
|
-
export type DemoATSLayoutType = "technical" | "product-oriented"
|
227
|
-
|
228
|
-
export type ModuleWithConstructorArgs<Module, ConstructorArgs> = Module &
|
229
|
-
ConstructorArgs
|
package/src/utils.ts
DELETED
package/src/wallet/consts.ts
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
import { ProductPriceCurrency } from "../product/enums"
|
2
|
-
import { Wallet, WalletPaymentIntentPaymentMethod } from "./types"
|
3
|
-
|
4
|
-
export type WalletStoreSetWalletHandler = (wallet: Wallet) => void
|
5
|
-
export type WalletStoreSetIsWalletLoadingHandler = (isLoading: boolean) => void
|
6
|
-
export type WalletStoreSetTopUpIsLoadingHandler = (isLoading: boolean) => void
|
7
|
-
export type WalletStoreSetTopUpAmountHandler = (amount: number) => void
|
8
|
-
export type WalletStoreSetTopUpMinAmountHandler = (amount: number) => void
|
9
|
-
export type WalletStoreSetTopUpMinAmountCurrencyHandler = (
|
10
|
-
currency: ProductPriceCurrency,
|
11
|
-
) => void
|
12
|
-
export type WalletStoreSetTopUpTermsOfServiceIsAgreedHandler = (
|
13
|
-
isAgreed: boolean,
|
14
|
-
) => void
|
15
|
-
export type WalletStoreSetStripeClientSecretHandler = (client: string) => void
|
16
|
-
export type WalletStoreSetTopUpCurrentStepIndexHandler = (step: number) => void
|
17
|
-
export type WalletStoreSetTopUpPaymentMethodTypesHandler = (
|
18
|
-
type: WalletPaymentIntentPaymentMethod[],
|
19
|
-
) => void
|
20
|
-
|
21
|
-
export type WalletStoreFunctions = {
|
22
|
-
/**
|
23
|
-
* The function that sets the value of `wallet`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
24
|
-
*/
|
25
|
-
setWallet: WalletStoreSetWalletHandler
|
26
|
-
/**
|
27
|
-
* The function that sets the value of `walletIsLoading`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
28
|
-
*/
|
29
|
-
setWalletIsLoading: WalletStoreSetIsWalletLoadingHandler
|
30
|
-
/**
|
31
|
-
* The function that sets the value of `topUpIsLoading`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
32
|
-
*/
|
33
|
-
setTopUpIsLoading: WalletStoreSetTopUpIsLoadingHandler
|
34
|
-
/**
|
35
|
-
* The function that sets the value of `topUpAmount`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
36
|
-
*/
|
37
|
-
setTopUpAmount: WalletStoreSetTopUpAmountHandler
|
38
|
-
/**
|
39
|
-
* The function that sets the value of `topUpMinAmount`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
40
|
-
*/
|
41
|
-
setTopUpMinAmount: WalletStoreSetTopUpMinAmountHandler
|
42
|
-
/**
|
43
|
-
* The function that sets the value of `topUpMinAmountCurrency`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
44
|
-
*/
|
45
|
-
setTopUpMinAmountCurrency: WalletStoreSetTopUpMinAmountCurrencyHandler
|
46
|
-
/**
|
47
|
-
* The function that sets the value of `topUpTermsOfServiceIsAgreed`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
48
|
-
*/
|
49
|
-
setTopUpTermsOfServiceIsAgreed: WalletStoreSetTopUpTermsOfServiceIsAgreedHandler
|
50
|
-
/**
|
51
|
-
* The function that sets the value of `topUpCurrentStepIndex`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
52
|
-
*/
|
53
|
-
setTopUpCurrentStepIndex: WalletStoreSetTopUpCurrentStepIndexHandler
|
54
|
-
/**
|
55
|
-
* The function that sets the value of `topUpPaymentMethodTypes`. Refer to [WalletStoreState](/docs/sdk/wallet/#walletstorestate) for more details.
|
56
|
-
*/
|
57
|
-
setTopUpPaymentMethodTypes: WalletStoreSetTopUpPaymentMethodTypesHandler
|
58
|
-
}
|
package/src/wallet/index.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
// created from 'create-ts-index'
|
2
|
-
|
3
|
-
export * from './api.types';
|
4
|
-
export * from './consts';
|
5
|
-
export * from './functions.types';
|
6
|
-
export * from './service.types';
|
7
|
-
export * from './state.initial';
|
8
|
-
export * from './state.types';
|
9
|
-
export * from './state.validations';
|
10
|
-
export * from './types';
|
11
|
-
export * from './validations.types';
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { ProductPriceCurrency } from "../product/enums"
|
2
|
-
import { WalletStoreState } from "./state.types"
|
3
|
-
|
4
|
-
export const initialWalletStoreState: WalletStoreState = {
|
5
|
-
balanceIsEnoughToOrderCampaign: false,
|
6
|
-
balanceInUSD: null,
|
7
|
-
paymentIntentRequestBody: null,
|
8
|
-
paymentIntentClientSecret: null,
|
9
|
-
topUpPaymentMethodTypes: ["card"],
|
10
|
-
wallet: null,
|
11
|
-
walletIsLoading: false,
|
12
|
-
topUpIsLoading: false,
|
13
|
-
topUpAmount: 0,
|
14
|
-
topUpMinAmount: 0,
|
15
|
-
topUpMinAmountCurrency: ProductPriceCurrency.USD,
|
16
|
-
topUpTermsOfServiceIsAgreed: false,
|
17
|
-
topUpCurrentStepIndex: 0,
|
18
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { WalletStoreState } from "./state.types"
|
2
|
-
import { StateValidations } from "../_window/state.types"
|
3
|
-
|
4
|
-
export const walletStoreStateValidations: StateValidations<WalletStoreState> = {
|
5
|
-
wallet: "wallet.wallet",
|
6
|
-
walletIsLoading: "common.genericBoolean",
|
7
|
-
balanceInUSD: "throwHasNoSetterError",
|
8
|
-
balanceIsEnoughToOrderCampaign: "throwHasNoSetterError",
|
9
|
-
topUpPaymentMethodTypes: "common.genericStringArray",
|
10
|
-
paymentIntentRequestBody: "throwHasNoSetterError",
|
11
|
-
paymentIntentClientSecret: "common.genericNullableString",
|
12
|
-
topUpIsLoading: "common.genericBoolean",
|
13
|
-
topUpAmount: "common.genericNumber",
|
14
|
-
topUpMinAmount: "common.genericNumber",
|
15
|
-
topUpMinAmountCurrency: "product.currency",
|
16
|
-
topUpTermsOfServiceIsAgreed: "common.genericBoolean",
|
17
|
-
topUpCurrentStepIndex: "common.genericNumber",
|
18
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/{src/ui → ui}/index.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|