ouisys-engine 4.6.3 → 4.7.0-alpha.1

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 (222) hide show
  1. package/dist/RemoteDataState-CwHLI23e.js +75 -0
  2. package/dist/RemoteDataState-CwHLI23e.js.map +1 -0
  3. package/dist/bupperizeCountry-CCDIOHP6.js +4 -0
  4. package/dist/bupperizeCountry-CCDIOHP6.js.map +1 -0
  5. package/dist/checkSubscriptionByRockmanIdOnly-C89Ph9cV.js +27 -0
  6. package/dist/checkSubscriptionByRockmanIdOnly-C89Ph9cV.js.map +1 -0
  7. package/dist/checkSubscriptionHander.js +53 -0
  8. package/dist/checkSubscriptionHander.js.map +1 -0
  9. package/dist/click2smsFlow.js +246 -0
  10. package/dist/click2smsFlow.js.map +1 -0
  11. package/dist/creditCardFlow.js +248 -0
  12. package/dist/creditCardFlow.js.map +1 -0
  13. package/dist/getConfig.js +14 -0
  14. package/dist/getConfig.js.map +1 -0
  15. package/dist/handleClickChainFlow.js +32 -0
  16. package/dist/handleClickChainFlow.js.map +1 -0
  17. package/dist/handleSubmitNumber.js +65 -0
  18. package/dist/handleSubmitNumber.js.map +1 -0
  19. package/dist/helpers-J_h-ZgxH.js +29 -0
  20. package/dist/helpers-J_h-ZgxH.js.map +1 -0
  21. package/dist/loadScriptInnerHtml-DPcoY467.js +26 -0
  22. package/dist/loadScriptInnerHtml-DPcoY467.js.map +1 -0
  23. package/dist/moFlow.js +275 -0
  24. package/dist/moFlow.js.map +1 -0
  25. package/dist/moRedirFlow.js +225 -0
  26. package/dist/moRedirFlow.js.map +1 -0
  27. package/dist/oneClickFlow.js +464 -0
  28. package/dist/oneClickFlow.js.map +1 -0
  29. package/dist/pinFlow.js +697 -0
  30. package/dist/pinFlow.js.map +1 -0
  31. package/dist/searchToObject.js +19 -0
  32. package/dist/searchToObject.js.map +1 -0
  33. package/dist/storeMsisdn-ChiBh8mI.js +58 -0
  34. package/dist/storeMsisdn-ChiBh8mI.js.map +1 -0
  35. package/dist/strategy.js +50 -0
  36. package/dist/strategy.js.map +1 -0
  37. package/dist/strategySlice-bF74rxDK.js +842 -0
  38. package/dist/strategySlice-bF74rxDK.js.map +1 -0
  39. package/dist/tracker-B_zsMRN2.js +79 -0
  40. package/dist/tracker-B_zsMRN2.js.map +1 -0
  41. package/dist/tracker.js +5 -0
  42. package/dist/tracker.js.map +1 -0
  43. package/dist/tryGetIPRangeName-C69HEG5W.js +42 -0
  44. package/dist/tryGetIPRangeName-C69HEG5W.js.map +1 -0
  45. package/dist/types/CreditCardTypes-B-IT-l6I.d.ts +72 -0
  46. package/dist/types/IHash-0OgZ_1ij.d.ts +5 -0
  47. package/dist/types/MoRedirTypes-4tEJjT1g.d.ts +31 -0
  48. package/dist/types/MoTypes-D-UK92gs.d.ts +45 -0
  49. package/dist/types/OneClickTypes-DF0jodl-.d.ts +69 -0
  50. package/dist/types/PinTypes-BLJDBZe6.d.ts +128 -0
  51. package/dist/types/RemoteDataState-D1aFrz8W.d.ts +61 -0
  52. package/dist/types/StrategyTypes-BEIYqoJV.d.ts +325 -0
  53. package/dist/types/UssdTypes-C7QlIW11.d.ts +34 -0
  54. package/dist/types/checkSubscriptionHander.d.ts +8 -0
  55. package/dist/types/click2smsFlow.d.ts +37 -0
  56. package/dist/types/creditCardFlow.d.ts +37 -0
  57. package/dist/types/getConfig.d.ts +38 -0
  58. package/dist/types/handleClickChainFlow.d.ts +6 -0
  59. package/dist/types/handleSubmitNumber.d.ts +26 -0
  60. package/dist/types/moFlow.d.ts +70 -0
  61. package/dist/types/moRedirFlow.d.ts +82 -0
  62. package/dist/types/oneClickFlow.d.ts +56 -0
  63. package/dist/types/pinFlow.d.ts +179 -0
  64. package/dist/types/searchToObject.d.ts +3 -0
  65. package/dist/types/strategy.d.ts +86 -0
  66. package/dist/types/tracker.d.ts +5 -0
  67. package/dist/types/ussdFlow.d.ts +84 -0
  68. package/dist/ussdFlow.js +211 -0
  69. package/dist/ussdFlow.js.map +1 -0
  70. package/package.json +85 -9
  71. package/.babelrc +0 -30
  72. package/.browserslistrc +0 -6
  73. package/.eslintrc.js +0 -3
  74. package/.nvmrc +0 -1
  75. package/.prettierignore +0 -4
  76. package/dist/@types/react-tracker.d.js +0 -1
  77. package/dist/@types/redux-cli-logger.d.js +0 -1
  78. package/dist/@types/tiny-async-pool.d.js +0 -1
  79. package/dist/@types/window.d.js +0 -1
  80. package/dist/api/index.d.ts +0 -43
  81. package/dist/api/index.js +0 -1
  82. package/dist/common-types/AppThunk.d.ts +0 -13
  83. package/dist/common-types/AppThunk.js +0 -1
  84. package/dist/common-types/Either.d.ts +0 -8
  85. package/dist/common-types/Either.js +0 -1
  86. package/dist/common-types/IError.d.ts +0 -3
  87. package/dist/common-types/IError.js +0 -1
  88. package/dist/common-types/IOptInFlowName.d.ts +0 -1
  89. package/dist/common-types/IOptInFlowName.js +0 -1
  90. package/dist/common-types/ITracker.d.ts +0 -9
  91. package/dist/common-types/ITracker.js +0 -1
  92. package/dist/common-types/IVisitor.d.ts +0 -14
  93. package/dist/common-types/IVisitor.js +0 -1
  94. package/dist/common-types/RemoteDataState.d.ts +0 -38
  95. package/dist/common-types/RemoteDataState.js +0 -1
  96. package/dist/custom-hooks/useOneClickRedirectUrl.d.ts +0 -3
  97. package/dist/custom-hooks/useOneClickRedirectUrl.js +0 -1
  98. package/dist/custom-hooks/usePinEntryState.d.ts +0 -8
  99. package/dist/custom-hooks/usePinEntryState.js +0 -1
  100. package/dist/custom-hooks/useStrategyConfig.d.ts +0 -4
  101. package/dist/custom-hooks/useStrategyConfig.js +0 -1
  102. package/dist/flows/click2smsFlow.d.ts +0 -6
  103. package/dist/flows/click2smsFlow.js +0 -1
  104. package/dist/flows/creditCardFlow.d.ts +0 -6
  105. package/dist/flows/creditCardFlow.js +0 -1
  106. package/dist/flows/moFlow.d.ts +0 -6
  107. package/dist/flows/moFlow.js +0 -1
  108. package/dist/flows/moRedirFlow.d.ts +0 -6
  109. package/dist/flows/moRedirFlow.js +0 -1
  110. package/dist/flows/oneClickFlow.d.ts +0 -7
  111. package/dist/flows/oneClickFlow.js +0 -1
  112. package/dist/flows/pinFlow.d.ts +0 -7
  113. package/dist/flows/pinFlow.js +0 -1
  114. package/dist/flows/strategy.d.ts +0 -14
  115. package/dist/flows/strategy.js +0 -1
  116. package/dist/flows/ussdFlow.d.ts +0 -6
  117. package/dist/flows/ussdFlow.js +0 -1
  118. package/dist/index.d.ts +0 -0
  119. package/dist/index.js +0 -1
  120. package/dist/ips/tryGetIPRangeName.d.ts +0 -2
  121. package/dist/ips/tryGetIPRangeName.js +0 -1
  122. package/dist/jest.config.js +0 -194
  123. package/dist/pacman/index.d.ts +0 -6
  124. package/dist/pacman/index.js +0 -1
  125. package/dist/pacman/queryString.d.ts +0 -3
  126. package/dist/pacman/queryString.js +0 -1
  127. package/dist/reducers/click2smsFlow/Click2smsTypes.d.ts +0 -76
  128. package/dist/reducers/click2smsFlow/Click2smsTypes.js +0 -1
  129. package/dist/reducers/click2smsFlow/IClick2smsConstants.d.ts +0 -2
  130. package/dist/reducers/click2smsFlow/IClick2smsConstants.js +0 -1
  131. package/dist/reducers/click2smsFlow/index.d.ts +0 -5
  132. package/dist/reducers/click2smsFlow/index.js +0 -1
  133. package/dist/reducers/click2smsFlow/utils.d.ts +0 -4
  134. package/dist/reducers/click2smsFlow/utils.js +0 -1
  135. package/dist/reducers/creditCardFlow/CreditCardTypes.d.ts +0 -79
  136. package/dist/reducers/creditCardFlow/CreditCardTypes.js +0 -1
  137. package/dist/reducers/creditCardFlow/ICreditCardConstants.d.ts +0 -2
  138. package/dist/reducers/creditCardFlow/ICreditCardConstants.js +0 -1
  139. package/dist/reducers/creditCardFlow/index.d.ts +0 -5
  140. package/dist/reducers/creditCardFlow/index.js +0 -1
  141. package/dist/reducers/creditCardFlow/utils.d.ts +0 -8
  142. package/dist/reducers/creditCardFlow/utils.js +0 -1
  143. package/dist/reducers/moFlow/IMoConstants.d.ts +0 -2
  144. package/dist/reducers/moFlow/IMoConstants.js +0 -1
  145. package/dist/reducers/moFlow/MoTypes.d.ts +0 -88
  146. package/dist/reducers/moFlow/MoTypes.js +0 -1
  147. package/dist/reducers/moFlow/index.d.ts +0 -16
  148. package/dist/reducers/moFlow/index.js +0 -1
  149. package/dist/reducers/moFlow/utils.d.ts +0 -12
  150. package/dist/reducers/moFlow/utils.js +0 -1
  151. package/dist/reducers/moRedirFlow/IMoRedirConstants.d.ts +0 -2
  152. package/dist/reducers/moRedirFlow/IMoRedirConstants.js +0 -1
  153. package/dist/reducers/moRedirFlow/MoRedirTypes.d.ts +0 -64
  154. package/dist/reducers/moRedirFlow/MoRedirTypes.js +0 -1
  155. package/dist/reducers/moRedirFlow/index.d.ts +0 -14
  156. package/dist/reducers/moRedirFlow/index.js +0 -1
  157. package/dist/reducers/moRedirFlow/utils.d.ts +0 -10
  158. package/dist/reducers/moRedirFlow/utils.js +0 -1
  159. package/dist/reducers/oneClickFlow/IOneClickConstants.d.ts +0 -2
  160. package/dist/reducers/oneClickFlow/IOneClickConstants.js +0 -1
  161. package/dist/reducers/oneClickFlow/OneClickTypes.d.ts +0 -85
  162. package/dist/reducers/oneClickFlow/OneClickTypes.js +0 -1
  163. package/dist/reducers/oneClickFlow/index.d.ts +0 -13
  164. package/dist/reducers/oneClickFlow/index.js +0 -1
  165. package/dist/reducers/oneClickFlow/utils.d.ts +0 -16
  166. package/dist/reducers/oneClickFlow/utils.js +0 -1
  167. package/dist/reducers/pinFlow/IPinConstants.d.ts +0 -2
  168. package/dist/reducers/pinFlow/IPinConstants.js +0 -1
  169. package/dist/reducers/pinFlow/PinTypes.d.ts +0 -156
  170. package/dist/reducers/pinFlow/PinTypes.js +0 -1
  171. package/dist/reducers/pinFlow/index.d.ts +0 -19
  172. package/dist/reducers/pinFlow/index.js +0 -1
  173. package/dist/reducers/pinFlow/utils.d.ts +0 -11
  174. package/dist/reducers/pinFlow/utils.js +0 -1
  175. package/dist/reducers/strategy/IStategyActionContants.d.ts +0 -2
  176. package/dist/reducers/strategy/IStategyActionContants.js +0 -1
  177. package/dist/reducers/strategy/StrategyTypes.d.ts +0 -248
  178. package/dist/reducers/strategy/StrategyTypes.js +0 -1
  179. package/dist/reducers/strategy/index.d.ts +0 -13
  180. package/dist/reducers/strategy/index.js +0 -1
  181. package/dist/reducers/strategy/strategies/ask_mobile_number.d.ts +0 -15
  182. package/dist/reducers/strategy/strategies/ask_mobile_number.js +0 -1
  183. package/dist/reducers/strategy/strategies/ask_operator.d.ts +0 -5
  184. package/dist/reducers/strategy/strategies/ask_operator.js +0 -1
  185. package/dist/reducers/strategy/strategies/detect_operator_by_ip.d.ts +0 -10
  186. package/dist/reducers/strategy/strategies/detect_operator_by_ip.js +0 -1
  187. package/dist/reducers/strategy/strategies/header_enrichment.d.ts +0 -7
  188. package/dist/reducers/strategy/strategies/header_enrichment.js +0 -1
  189. package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.d.ts +0 -7
  190. package/dist/reducers/strategy/strategies/injectHeaderEnrichmentScript.js +0 -1
  191. package/dist/reducers/strategy/utils.d.ts +0 -30
  192. package/dist/reducers/strategy/utils.js +0 -1
  193. package/dist/reducers/ussdFlow/IUssdConstants.d.ts +0 -2
  194. package/dist/reducers/ussdFlow/IUssdConstants.js +0 -1
  195. package/dist/reducers/ussdFlow/UssdTypes.d.ts +0 -77
  196. package/dist/reducers/ussdFlow/UssdTypes.js +0 -1
  197. package/dist/reducers/ussdFlow/index.d.ts +0 -14
  198. package/dist/reducers/ussdFlow/index.js +0 -1
  199. package/dist/reducers/ussdFlow/utils.d.ts +0 -11
  200. package/dist/reducers/ussdFlow/utils.js +0 -1
  201. package/dist/store/index.d.ts +0 -14
  202. package/dist/store/index.js +0 -1
  203. package/dist/store/reducers.d.ts +0 -20
  204. package/dist/store/reducers.js +0 -1
  205. package/dist/utilities/addEmpelloToken.d.ts +0 -4
  206. package/dist/utilities/addEmpelloToken.js +0 -1
  207. package/dist/utilities/handleSubmitNumber.d.ts +0 -21
  208. package/dist/utilities/handleSubmitNumber.js +0 -1
  209. package/dist/utilities/index.d.ts +0 -17
  210. package/dist/utilities/index.js +0 -1
  211. package/dist/utilities/loadScriptInnerHtml.d.ts +0 -2
  212. package/dist/utilities/loadScriptInnerHtml.js +0 -1
  213. package/dist/utilities/loadScriptSrc.d.ts +0 -8
  214. package/dist/utilities/loadScriptSrc.js +0 -1
  215. package/dist/utilities/replaceUrlParam.d.ts +0 -1
  216. package/dist/utilities/replaceUrlParam.js +0 -1
  217. package/dist/utilities/storeMsisdn.d.ts +0 -3
  218. package/dist/utilities/storeMsisdn.js +0 -1
  219. package/index.html +0 -49
  220. package/mockData/config.json +0 -28
  221. package/setupJest.js +0 -6
  222. package/tsconfig.json +0 -28
@@ -0,0 +1,26 @@
1
+ import { Dispatch } from '@reduxjs/toolkit';
2
+
3
+ declare const handleAutoSubmitMsisdn: ({ msisdnValue, dispatch, submitMSISDNAction, isHeaderEnrichmentSuccess, setMsisdnValue, isHeaderEnrichmentAutoSubmit }: {
4
+ window: Window;
5
+ msisdnValue: string;
6
+ dispatch: Dispatch;
7
+ submitMSISDNAction: ({ window, msisdn }: {
8
+ window: Window;
9
+ msisdn: string;
10
+ }) => any;
11
+ isHeaderEnrichmentSuccess: boolean;
12
+ setMsisdnValue: (msisdnValue: string) => void;
13
+ isHeaderEnrichmentAutoSubmit?: boolean;
14
+ }) => void;
15
+ declare const handleFormSubmit: ({ window, isHeaderEnrichmentSuccess, setInternationalNumber, onEnd, internationalNumber }: {
16
+ window: Window;
17
+ isHeaderEnrichmentSuccess: boolean;
18
+ country: string;
19
+ setInternationalNumber: (msisdn: string) => void;
20
+ onEnd: (msisdn: string, extraParams?: {
21
+ [key: string]: string;
22
+ }) => void;
23
+ internationalNumber: string;
24
+ }) => void;
25
+
26
+ export { handleAutoSubmitMsisdn, handleFormSubmit };
@@ -0,0 +1,70 @@
1
+ import { M as MSISDNEntryState, a as MSISDNEntryFailure, b as MSISDNEntrySuccess, c as MoFlowCurrentState } from './MoTypes-D-UK92gs.js';
2
+ export { h as IGoogleReCaptcha, I as IKeywordShortcode, f as IMSISDNSubmissionResult, g as IMockMoFlowStates, e as MSISDNEntryErrorTypes, d as MoFlowState } from './MoTypes-D-UK92gs.js';
3
+ import { useSelector } from 'react-redux';
4
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import * as redux from 'redux';
7
+ import { I as IHash } from './IHash-0OgZ_1ij.js';
8
+
9
+ declare const useMoFlowState: (useSelector: typeof useSelector) => MSISDNEntryState;
10
+
11
+ declare function moFlowMatch<R>({ msisdnEntry }: {
12
+ msisdnEntry: (rds: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>) => R;
13
+ }): (state: MoFlowCurrentState) => R;
14
+
15
+ interface SubmitMSISDNArgs {
16
+ window: Window;
17
+ msisdn: string;
18
+ extraParams?: IHash;
19
+ }
20
+ /**
21
+ * submitMSISDNAction
22
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: PossibleTypes, result: MSISDNEntryState}}
23
+
24
+ * Calls trigger-message api that returns a short code and key word
25
+ * Sets completed stated
26
+ */
27
+ declare const submitMSISDNAction: _reduxjs_toolkit.AsyncThunk<MSISDNEntryState, SubmitMSISDNArgs, {
28
+ rejectValue: MSISDNEntryFailure;
29
+ state?: unknown;
30
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
31
+ extra?: unknown;
32
+ serializedErrorType?: unknown;
33
+ pendingMeta?: unknown;
34
+ fulfilledMeta?: unknown;
35
+ rejectedMeta?: unknown;
36
+ }>;
37
+ declare const moFlowReducer: redux.Reducer<{
38
+ currentState: {
39
+ type: 'MSISDNEntry';
40
+ result: {
41
+ type: "NothingYet";
42
+ } | {
43
+ type: "Loading";
44
+ } | {
45
+ type: "Failure";
46
+ error: any;
47
+ } | {
48
+ type: "Success";
49
+ data: any;
50
+ };
51
+ };
52
+ }, redux.UnknownAction, {
53
+ currentState: {
54
+ type: 'MSISDNEntry';
55
+ result: {
56
+ type: "NothingYet";
57
+ } | {
58
+ type: "Loading";
59
+ } | {
60
+ type: "Failure";
61
+ error: any;
62
+ } | {
63
+ type: "Success";
64
+ data: any;
65
+ };
66
+ };
67
+ }>;
68
+ declare const backToStartAction: _reduxjs_toolkit.ActionCreatorWithoutPayload<"moFlow/backToStartAction">;
69
+
70
+ export { MSISDNEntryFailure, MSISDNEntryState, MSISDNEntrySuccess, MoFlowCurrentState, backToStartAction, moFlowMatch, moFlowReducer, submitMSISDNAction, useMoFlowState };
@@ -0,0 +1,82 @@
1
+ import { M as MSISDNEntryState, a as MSISDNEntryFailure, b as MSISDNEntrySuccess, c as MoRedirFlowCurrentState, d as MSISDNEntryErrorTypes } from './MoRedirTypes-4tEJjT1g.js';
2
+ export { I as IMSISDNSubmissionResult, f as IMockMoRedirFlowStates, e as MoRedirFlowState } from './MoRedirTypes-4tEJjT1g.js';
3
+ import { useSelector } from 'react-redux';
4
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import * as redux from 'redux';
7
+ import { I as IHash } from './IHash-0OgZ_1ij.js';
8
+
9
+ declare const useMoRedirFlowState: (useSelector: typeof useSelector) => MSISDNEntryState;
10
+
11
+ declare function moRedirFlowMatch<R>({ msisdnEntry }: {
12
+ msisdnEntry: (rds: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>) => R;
13
+ }): (state: MoRedirFlowCurrentState) => R;
14
+
15
+ interface SubmitMSISDNArgs {
16
+ window: Window;
17
+ msisdn: string;
18
+ extraParams?: IHash;
19
+ }
20
+ /**
21
+ * submitMSISDNAction
22
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: PossibleTypes, result: MSISDNEntryState}}
23
+
24
+ * Calls redirec api that returns a redirect url
25
+ * Sets completed stated
26
+ */
27
+ declare const submitMSISDNAction: _reduxjs_toolkit.AsyncThunk<MSISDNEntryState, SubmitMSISDNArgs, {
28
+ rejectValue: MSISDNEntryFailure;
29
+ state?: unknown;
30
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
31
+ extra?: unknown;
32
+ serializedErrorType?: unknown;
33
+ pendingMeta?: unknown;
34
+ fulfilledMeta?: unknown;
35
+ rejectedMeta?: unknown;
36
+ }>;
37
+ declare const moRedirFlowReducer: redux.Reducer<{
38
+ currentState: {
39
+ type: "MSISDNEntry";
40
+ result: {
41
+ type: "NothingYet";
42
+ } | {
43
+ type: "Loading";
44
+ } | {
45
+ type: "Failure";
46
+ error: {
47
+ errorType: MSISDNEntryErrorTypes;
48
+ error?: any;
49
+ productUrl?: string;
50
+ };
51
+ } | {
52
+ type: "Success";
53
+ data: {
54
+ href: string;
55
+ };
56
+ };
57
+ };
58
+ }, redux.UnknownAction, {
59
+ currentState: {
60
+ type: "MSISDNEntry";
61
+ result: {
62
+ type: "NothingYet";
63
+ } | {
64
+ type: "Loading";
65
+ } | {
66
+ type: "Failure";
67
+ error: {
68
+ errorType: MSISDNEntryErrorTypes;
69
+ error?: any;
70
+ productUrl?: string;
71
+ };
72
+ } | {
73
+ type: "Success";
74
+ data: {
75
+ href: string;
76
+ };
77
+ };
78
+ };
79
+ }>;
80
+ declare const backToStartAction: _reduxjs_toolkit.ActionCreatorWithoutPayload<"moRedirFlow/backToStartAction">;
81
+
82
+ export { MSISDNEntryErrorTypes, MSISDNEntryFailure, MSISDNEntryState, MSISDNEntrySuccess, MoRedirFlowCurrentState, backToStartAction, moRedirFlowMatch, moRedirFlowReducer, submitMSISDNAction, useMoRedirFlowState };
@@ -0,0 +1,56 @@
1
+ import { a as OneClickFlowCurrentState, I as IGETREDIRECTURLFailure, b as IGETREDIRECTURLSuccess, S as SubscribeFailure, c as SubscribeSuccess, G as GETREDIRECTUrlState, A as AJAXSUBSCRIBEState, O as OneClickFlowState } from './OneClickTypes-DF0jodl-.js';
2
+ export { g as IHEResult, f as IIDentifyUserResult, e as ILinkExtraParams, i as IMockOneClickFlowStates, h as ISubscribeResult, d as SubscribeUserErrorTypes } from './OneClickTypes-DF0jodl-.js';
3
+ import { useSelector } from 'react-redux';
4
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
5
+ import * as redux from 'redux';
6
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
+ import * as _reduxjs_toolkit_dist_createAsyncThunk from '@reduxjs/toolkit/dist/createAsyncThunk';
8
+ import { I as IHash } from './IHash-0OgZ_1ij.js';
9
+
10
+ declare const useOneClickFlowState: (useSelector: typeof useSelector) => OneClickFlowCurrentState;
11
+
12
+ declare function oneClickFlowMatch<R>({ getRedirectUrl, subscribe }: {
13
+ getRedirectUrl: (rds: RemoteDataState<IGETREDIRECTURLFailure, IGETREDIRECTURLSuccess>) => R;
14
+ subscribe?: (rds: RemoteDataState<SubscribeFailure, SubscribeSuccess>) => R;
15
+ }): (state: OneClickFlowCurrentState) => R;
16
+
17
+ interface GetRedirectUrlArgs {
18
+ window: Window;
19
+ extraParams?: IHash;
20
+ autoRedirect?: boolean;
21
+ isGetRedirectBupperWay?: boolean;
22
+ ignoreUrlParams?: boolean;
23
+ }
24
+ /**
25
+ * getRedirectUrlAction
26
+ * @returns {type: ' 'oneClickFlow/getRedirectUrlAction', payload: {type: PossibleTypes, result: GETREDIRECTUrlState}}
27
+
28
+ * Calls redirect api to get a redirect url for the user to be redirected to
29
+ * Can also create a bupper redirect url
30
+ */
31
+ declare const getRedirectUrlAction: _reduxjs_toolkit.AsyncThunk<GETREDIRECTUrlState, GetRedirectUrlArgs, _reduxjs_toolkit_dist_createAsyncThunk.AsyncThunkConfig>;
32
+ /**
33
+ * subscribeUrlAction
34
+ * @returns {type: ' 'oneClickFlow/submitMSISDNAction', payload: {type: PossibleTypes.MO, result: PINEntryState}}
35
+
36
+ * Calls oneclick subscripe api to subscribe the user
37
+ * Returns a product url
38
+ */
39
+ interface OneClickSubscribeArgs {
40
+ window: Window;
41
+ autoRedirect?: boolean;
42
+ extraParams?: IHash;
43
+ }
44
+ declare const subscribeUrlAction: _reduxjs_toolkit.AsyncThunk<AJAXSUBSCRIBEState, OneClickSubscribeArgs, {
45
+ rejectValue: SubscribeFailure;
46
+ state?: unknown;
47
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
48
+ extra?: unknown;
49
+ serializedErrorType?: unknown;
50
+ pendingMeta?: unknown;
51
+ fulfilledMeta?: unknown;
52
+ rejectedMeta?: unknown;
53
+ }>;
54
+ declare const oneClickFlowReducer: redux.Reducer<OneClickFlowState, redux.UnknownAction, OneClickFlowState>;
55
+
56
+ export { AJAXSUBSCRIBEState, GETREDIRECTUrlState, IGETREDIRECTURLFailure, IGETREDIRECTURLSuccess, OneClickFlowCurrentState, OneClickFlowState, SubscribeFailure, SubscribeSuccess, getRedirectUrlAction, oneClickFlowMatch, oneClickFlowReducer, subscribeUrlAction, useOneClickFlowState };
@@ -0,0 +1,179 @@
1
+ import { P as PinFlowCurrentState, M as MSISDNEntryFailure, a as MSISDNEntrySuccess, b as PINEntryFailure, c as PINEntrySuccess, I as IMsisdnSumbitNextData, d as PINEntryState, e as PINEntryErrorTypes, f as IHash } from './PinTypes-BLJDBZe6.js';
2
+ export { E as ExtraData, n as IBackToStartPayload, o as IConfig, p as IMSISDNSubmissionResult, s as IMcpShieldResult, t as IMockPinFlowStates, k as IMsisdnSubmitErrorPayload, j as IMsisnSubmitActionPayload, q as IPINSubmissionResult, m as IPinErrorPayload, l as IPinSubmitPayload, i as MSISDNEntryErrorTypes, g as MSISDNEntryState, r as MultiOperatorMSISDNSubmissionResult, h as PinFlowState, S as SingleMSISDNSubmissionResult } from './PinTypes-BLJDBZe6.js';
3
+ import { useSelector } from 'react-redux';
4
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import * as redux from 'redux';
7
+
8
+ declare const usePinFlowState: (useSelector: typeof useSelector) => PinFlowCurrentState;
9
+
10
+ declare function pinFlowMatch<R>({ msisdnEntry, pinEntry }: {
11
+ msisdnEntry: (rds: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>) => R;
12
+ pinEntry: (rds: RemoteDataState<PINEntryFailure, PINEntrySuccess>, nextData: IMsisdnSumbitNextData) => R;
13
+ }): (state: PinFlowCurrentState) => R;
14
+
15
+ /**
16
+ * submitMSISDNAction
17
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: PossibleTypes.MO, result: PINEntryState}}
18
+
19
+ * Calls trigger-pin api that sends a pin to the user
20
+ * Sets state to show pin entry
21
+ */
22
+ interface SubmitMSISDNArgs {
23
+ window: Window;
24
+ msisdn: string;
25
+ extraParams?: IHash;
26
+ }
27
+ declare const submitMSISDNAction: _reduxjs_toolkit.AsyncThunk<PINEntryState, SubmitMSISDNArgs, {
28
+ rejectValue: MSISDNEntryFailure;
29
+ state?: unknown;
30
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
31
+ extra?: unknown;
32
+ serializedErrorType?: unknown;
33
+ pendingMeta?: unknown;
34
+ fulfilledMeta?: unknown;
35
+ rejectedMeta?: unknown;
36
+ }>;
37
+ /**
38
+ * submitPinAction
39
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: 'PINEntry', result: RDS.NothingYet()}}
40
+
41
+ * Calls verify-pin api that check if the user enters a valid pin
42
+ * Sets state to show thank you page if pin is valid
43
+ */
44
+ interface SubmitPINArgs {
45
+ window: Window;
46
+ msisdn: string;
47
+ pin: string;
48
+ extraParams?: IHash;
49
+ }
50
+ declare const submitPinAction: _reduxjs_toolkit.AsyncThunk<PINEntryState, SubmitPINArgs, {
51
+ rejectValue: PINEntryFailure;
52
+ state?: unknown;
53
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
54
+ extra?: unknown;
55
+ serializedErrorType?: unknown;
56
+ pendingMeta?: unknown;
57
+ fulfilledMeta?: unknown;
58
+ rejectedMeta?: unknown;
59
+ }>;
60
+ declare const pinFlowReducer: redux.Reducer<{
61
+ currentState: {
62
+ type: "MSISDNEntry";
63
+ result: {
64
+ type: "NothingYet";
65
+ } | {
66
+ type: "Loading";
67
+ } | {
68
+ type: "Failure";
69
+ error: {
70
+ errorType: string;
71
+ error?: any;
72
+ productUrl?: string;
73
+ };
74
+ } | {
75
+ type: "Success";
76
+ data: {
77
+ [x: string]: unknown;
78
+ };
79
+ };
80
+ data?: {
81
+ actualPIN: string;
82
+ msisdn: string;
83
+ operator: string;
84
+ pinMaxLength: number;
85
+ };
86
+ } | {
87
+ type: "PINEntry";
88
+ result: {
89
+ type: "NothingYet";
90
+ } | {
91
+ type: "Loading";
92
+ } | {
93
+ type: "Failure";
94
+ error: {
95
+ errorType: PINEntryErrorTypes;
96
+ error?: {
97
+ name: string;
98
+ message: string;
99
+ stack?: string;
100
+ };
101
+ productUrl?: string;
102
+ };
103
+ } | {
104
+ type: "Success";
105
+ data: {
106
+ finalUrl: string;
107
+ msisdn?: string;
108
+ isAlreadySubscribed?: boolean;
109
+ };
110
+ };
111
+ data?: {
112
+ actualPIN: string;
113
+ msisdn: string;
114
+ operator: string;
115
+ pinMaxLength: number;
116
+ };
117
+ };
118
+ }, redux.UnknownAction, {
119
+ currentState: {
120
+ type: "MSISDNEntry";
121
+ result: {
122
+ type: "NothingYet";
123
+ } | {
124
+ type: "Loading";
125
+ } | {
126
+ type: "Failure";
127
+ error: {
128
+ errorType: string;
129
+ error?: any;
130
+ productUrl?: string;
131
+ };
132
+ } | {
133
+ type: "Success";
134
+ data: {
135
+ [x: string]: unknown;
136
+ };
137
+ };
138
+ data?: {
139
+ actualPIN: string;
140
+ msisdn: string;
141
+ operator: string;
142
+ pinMaxLength: number;
143
+ };
144
+ } | {
145
+ type: "PINEntry";
146
+ result: {
147
+ type: "NothingYet";
148
+ } | {
149
+ type: "Loading";
150
+ } | {
151
+ type: "Failure";
152
+ error: {
153
+ errorType: PINEntryErrorTypes;
154
+ error?: {
155
+ name: string;
156
+ message: string;
157
+ stack?: string;
158
+ };
159
+ productUrl?: string;
160
+ };
161
+ } | {
162
+ type: "Success";
163
+ data: {
164
+ finalUrl: string;
165
+ msisdn?: string;
166
+ isAlreadySubscribed?: boolean;
167
+ };
168
+ };
169
+ data?: {
170
+ actualPIN: string;
171
+ msisdn: string;
172
+ operator: string;
173
+ pinMaxLength: number;
174
+ };
175
+ };
176
+ }>;
177
+ declare const backToStartAction: _reduxjs_toolkit.ActionCreatorWithoutPayload<"pinFlow/backToStartAction">;
178
+
179
+ export { IHash, IMsisdnSumbitNextData, MSISDNEntryFailure, MSISDNEntrySuccess, PINEntryErrorTypes, PINEntryFailure, PINEntryState, PINEntrySuccess, PinFlowCurrentState, backToStartAction, pinFlowMatch, pinFlowReducer, submitMSISDNAction, submitPinAction, usePinFlowState };
@@ -0,0 +1,3 @@
1
+ declare const searchToObject: (window: Window) => {};
2
+
3
+ export { searchToObject };
@@ -0,0 +1,86 @@
1
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
2
+ export { a as RDS } from './RemoteDataState-D1aFrz8W.js';
3
+ import { S as StrategyCurrentState, I as IDENTIFYMSISDNEntryFailure, a as IDENTIFYMSISDNEntrySuccess, P as PossibleTypes, C as ConfigDetails, b as StrategyState } from './StrategyTypes-BEIYqoJV.js';
4
+ export { Q as ExtraStrategyData, d as IConfig, t as IDENTIFYFailure, k as IDENTIFYMSISDNEntryErrorTypes, u as IDENTIFYSuccess, q as IDENTIFY_FLOW_HESuccess, p as IDENTIFY_OPERATOR_MSISDNEntrySuccess, n as IDETECTYOPERATOBYIPFailure, o as IDETECTYOPERATOBYIPSuccess, w as IDetectOperatorByIpPayload, f as IFlow, j as IHash, E as IIdentfyFlowByIPOperatorNextAction, B as IIdentfyFlowByMsisdnNextAction, D as IIdentfyFlowByOperatorNextAction, A as IIdentifyFlowByHePayload, z as IIdentifyFlowByIpOperatorPayload, c as IIdentifyResult, G as IIdenyifyFlowByMsisdnPayload, F as IIdenyifyFlowByMsisdnSumbitNextData, H as IIdenyifyStrategyPayload, M as IMockFlowParams, L as IMockFlows, R as IMockPinFlowStates, v as IOperatorSelectFlowIdentifyPayload, x as IOperatorSelectPayload, N as IScriptHeaderEnrichmentSuccess, h as IStrategy, J as IStrategyCurrentState, K as IStrategyIDentifyUserResult, i as IStrategyNames, y as ISubmitMsisdnPayload, e as ISupportedFlows, l as IdentifyFlowOptionsResult, O as OPERATORSelectFailure, r as OPERATORSelectFlowIdentifyFailure, s as OPERATORSelectFlowIdentifySuccess, m as OPERATORSelectSuccess, T as RootState, g as StrategyConfig } from './StrategyTypes-BEIYqoJV.js';
5
+ import { useSelector } from 'react-redux';
6
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
+ import * as _reduxjs_toolkit_dist_createAsyncThunk from '@reduxjs/toolkit/dist/createAsyncThunk';
8
+ import * as redux from 'redux';
9
+ import './CreditCardTypes-B-IT-l6I.js';
10
+ import './MoRedirTypes-4tEJjT1g.js';
11
+ import './MoTypes-D-UK92gs.js';
12
+ import './OneClickTypes-DF0jodl-.js';
13
+ import './PinTypes-BLJDBZe6.js';
14
+ import './UssdTypes-C7QlIW11.js';
15
+
16
+ declare const useStrategyState: (useSelector: typeof useSelector) => StrategyCurrentState;
17
+
18
+ declare function strategy<R>({ identifyInitialState, identifyFlowByOperatorSelect, identifyFlowByMsisdn, pinFlow, moFlow, moRedirFlow, oneClickFlow, click2smsFlow, ussdFlow, creditCardFlow }: {
19
+ identifyInitialState: () => R;
20
+ identifyFlowByOperatorSelect?: () => R;
21
+ identifyFlowByMsisdn?: (rds: RemoteDataState<IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess>) => R;
22
+ pinFlow?: () => R;
23
+ moFlow?: () => R;
24
+ moRedirFlow?: () => R;
25
+ oneClickFlow?: () => R;
26
+ click2smsFlow?: () => R;
27
+ ussdFlow?: () => R;
28
+ creditCardFlow?: () => R;
29
+ }): (state: StrategyCurrentState) => R;
30
+
31
+ declare const submitMSISDNAction: _reduxjs_toolkit.AsyncThunk<StrategyCurrentState | {
32
+ type: PossibleTypes;
33
+ result: RemoteDataState<unknown, unknown>;
34
+ data: {
35
+ operator: string;
36
+ config: ConfigDetails;
37
+ };
38
+ }, {
39
+ window: Window;
40
+ msisdn: string;
41
+ isHeSuccess?: boolean;
42
+ }, _reduxjs_toolkit_dist_createAsyncThunk.AsyncThunkConfig>;
43
+
44
+ declare const selectOperatorAction: _reduxjs_toolkit.AsyncThunk<{
45
+ type: PossibleTypes;
46
+ result: {
47
+ config: ConfigDetails;
48
+ operator: string;
49
+ autoRedirect?: undefined;
50
+ };
51
+ } | {
52
+ type: PossibleTypes;
53
+ result: {
54
+ config: ConfigDetails;
55
+ operator: string;
56
+ autoRedirect: boolean;
57
+ };
58
+ } | {
59
+ type: PossibleTypes;
60
+ result: RemoteDataState<unknown, unknown>;
61
+ }, {
62
+ operator: string;
63
+ }, _reduxjs_toolkit_dist_createAsyncThunk.AsyncThunkConfig>;
64
+
65
+ /**
66
+ * Identify Strategy
67
+ * @returns {type: 'strategy/identifyStrategy', payload: {type: PossibleTypes.MO, result: IdentifyFlowOptionsResult}}
68
+ * - Add type
69
+ * - Makes a decision on which strategy to use in order to identify the flow
70
+ * - Strategy could be asking user's phone number, selecting an operator etc
71
+ * - all with the intension of getting the flow and its configuration
72
+ * - Flows are usually tied to an operator in the pages config.json
73
+ * - But they could also be single flows
74
+ *
75
+ */
76
+ declare const identifyStrategy: _reduxjs_toolkit.AsyncThunk<StrategyCurrentState | {
77
+ type: PossibleTypes;
78
+ result: RemoteDataState<unknown, unknown>;
79
+ data: {
80
+ config: ConfigDetails;
81
+ operator: string;
82
+ };
83
+ }, void, _reduxjs_toolkit_dist_createAsyncThunk.AsyncThunkConfig>;
84
+ declare const strategyReducer: redux.Reducer<StrategyState, redux.UnknownAction, StrategyState>;
85
+
86
+ export { ConfigDetails, IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess, PossibleTypes, StrategyCurrentState, StrategyState, identifyStrategy, selectOperatorAction, strategy, strategyReducer, submitMSISDNAction, useStrategyState };
@@ -0,0 +1,5 @@
1
+ import * as pacman_client__build_lib_Pacman_types from 'pacman-client/.build-lib/Pacman/types';
2
+
3
+ declare const tracker: pacman_client__build_lib_Pacman_types.ITrackerFlowEvents;
4
+
5
+ export { tracker };
@@ -0,0 +1,84 @@
1
+ import { M as MSISDNEntryState, a as MSISDNEntryFailure, b as MSISDNEntrySuccess, c as UssdFlowCurrentState, d as MSISDNEntryErrorTypes } from './UssdTypes-C7QlIW11.js';
2
+ export { I as IKeywordShortcode, e as IMSISDNSubmissionResult, f as IMockUssdFlowStates, U as UssdFlowState } from './UssdTypes-C7QlIW11.js';
3
+ import { useSelector } from 'react-redux';
4
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import * as redux from 'redux';
7
+ import { I as IHash } from './IHash-0OgZ_1ij.js';
8
+
9
+ declare const useUssdFlowState: (useSelector: typeof useSelector) => MSISDNEntryState;
10
+
11
+ declare function ussdFlowMatch<R>({ msisdnEntry }: {
12
+ msisdnEntry: (rds: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>) => R;
13
+ }): (state: UssdFlowCurrentState) => R;
14
+
15
+ interface SubmitMSISDNArgs {
16
+ window: Window;
17
+ msisdn: string;
18
+ extraParams?: IHash;
19
+ }
20
+ /**
21
+ * submitMSISDNAction
22
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: PossibleTypes, result: MSISDNEntryState}}
23
+
24
+ * Calls ussd api that open ussd prompt on mobile
25
+ *
26
+ */
27
+ declare const submitMSISDNAction: _reduxjs_toolkit.AsyncThunk<MSISDNEntryState, SubmitMSISDNArgs, {
28
+ rejectValue: MSISDNEntryFailure;
29
+ state?: unknown;
30
+ dispatch?: redux.Dispatch<redux.UnknownAction>;
31
+ extra?: unknown;
32
+ serializedErrorType?: unknown;
33
+ pendingMeta?: unknown;
34
+ fulfilledMeta?: unknown;
35
+ rejectedMeta?: unknown;
36
+ }>;
37
+ declare const ussdFlowReducer: redux.Reducer<{
38
+ currentState: {
39
+ type: "MSISDNEntry";
40
+ result: {
41
+ type: "NothingYet";
42
+ } | {
43
+ type: "Loading";
44
+ } | {
45
+ type: "Failure";
46
+ error: {
47
+ errorType: MSISDNEntryErrorTypes;
48
+ error?: any;
49
+ productUrl?: string;
50
+ };
51
+ } | {
52
+ type: "Success";
53
+ data: {
54
+ keyword: string;
55
+ shortcode: string;
56
+ };
57
+ };
58
+ };
59
+ }, redux.UnknownAction, {
60
+ currentState: {
61
+ type: "MSISDNEntry";
62
+ result: {
63
+ type: "NothingYet";
64
+ } | {
65
+ type: "Loading";
66
+ } | {
67
+ type: "Failure";
68
+ error: {
69
+ errorType: MSISDNEntryErrorTypes;
70
+ error?: any;
71
+ productUrl?: string;
72
+ };
73
+ } | {
74
+ type: "Success";
75
+ data: {
76
+ keyword: string;
77
+ shortcode: string;
78
+ };
79
+ };
80
+ };
81
+ }>;
82
+ declare const backToStartAction: _reduxjs_toolkit.ActionCreatorWithoutPayload<"ussdFlow/backToStartAction">;
83
+
84
+ export { MSISDNEntryErrorTypes, MSISDNEntryFailure, MSISDNEntryState, MSISDNEntrySuccess, UssdFlowCurrentState, backToStartAction, submitMSISDNAction, useUssdFlowState, ussdFlowMatch, ussdFlowReducer };