ouisys-engine 4.6.3 → 4.7.0-alpha.4

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-lcf8PfJd.js +2 -0
  2. package/dist/RemoteDataState-lcf8PfJd.js.map +1 -0
  3. package/dist/bupperizeCountry-CEtt0MKz.js +2 -0
  4. package/dist/bupperizeCountry-CEtt0MKz.js.map +1 -0
  5. package/dist/checkSubscriptionByRockmanIdOnly-BwR1un1L.js +2 -0
  6. package/dist/checkSubscriptionByRockmanIdOnly-BwR1un1L.js.map +1 -0
  7. package/dist/checkSubscriptionHander.js +2 -0
  8. package/dist/checkSubscriptionHander.js.map +1 -0
  9. package/dist/click2smsFlow.js +2 -0
  10. package/dist/click2smsFlow.js.map +1 -0
  11. package/dist/creditCardFlow.js +2 -0
  12. package/dist/creditCardFlow.js.map +1 -0
  13. package/dist/getConfig.js +2 -0
  14. package/dist/getConfig.js.map +1 -0
  15. package/dist/handleClickChainFlow.js +2 -0
  16. package/dist/handleClickChainFlow.js.map +1 -0
  17. package/dist/handleSubmitNumber.js +2 -0
  18. package/dist/handleSubmitNumber.js.map +1 -0
  19. package/dist/helpers-xPhGBX-B.js +2 -0
  20. package/dist/helpers-xPhGBX-B.js.map +1 -0
  21. package/dist/loadScriptInnerHtml-BzQm-AFb.js +2 -0
  22. package/dist/loadScriptInnerHtml-BzQm-AFb.js.map +1 -0
  23. package/dist/moFlow.js +2 -0
  24. package/dist/moFlow.js.map +1 -0
  25. package/dist/moRedirFlow.js +2 -0
  26. package/dist/moRedirFlow.js.map +1 -0
  27. package/dist/oneClickFlow.js +2 -0
  28. package/dist/oneClickFlow.js.map +1 -0
  29. package/dist/pinFlow.js +2 -0
  30. package/dist/pinFlow.js.map +1 -0
  31. package/dist/searchToObject.js +2 -0
  32. package/dist/searchToObject.js.map +1 -0
  33. package/dist/storeMsisdn-Cjq8_qYH.js +2 -0
  34. package/dist/storeMsisdn-Cjq8_qYH.js.map +1 -0
  35. package/dist/strategy.js +2 -0
  36. package/dist/strategy.js.map +1 -0
  37. package/dist/strategySlice-CtjrhCrS.js +2 -0
  38. package/dist/strategySlice-CtjrhCrS.js.map +1 -0
  39. package/dist/tracker-DaaILhEr.js +2 -0
  40. package/dist/tracker-DaaILhEr.js.map +1 -0
  41. package/dist/tracker.js +2 -0
  42. package/dist/tracker.js.map +1 -0
  43. package/dist/tryGetIPRangeName-QW-9NgzE.js +2 -0
  44. package/dist/tryGetIPRangeName-QW-9NgzE.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 +2 -0
  69. package/dist/ussdFlow.js.map +1 -0
  70. package/package.json +83 -11
  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,69 @@
1
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
2
+
3
+ interface GETREDIRECTUrlState {
4
+ type: 'GET_REDIRECT_URL';
5
+ result: RemoteDataState<IGETREDIRECTURLFailure, IGETREDIRECTURLSuccess>;
6
+ }
7
+ interface AJAXSUBSCRIBEState {
8
+ type: 'SUBCRIBE_AJAX';
9
+ result: RemoteDataState<SubscribeFailure, SubscribeSuccess>;
10
+ }
11
+ declare type OneClickFlowCurrentState = GETREDIRECTUrlState | AJAXSUBSCRIBEState;
12
+ interface OneClickFlowState {
13
+ currentState: OneClickFlowCurrentState;
14
+ }
15
+ declare type IGETREDIRECTURLFailure = {
16
+ errorType?: string;
17
+ error?: any;
18
+ };
19
+ declare type IGETREDIRECTURLSuccess = {
20
+ redirectUrl: string;
21
+ };
22
+ declare type SubscribeUserErrorTypes = 'SubscriptionError' | 'UnknownError' | 'AlreadySubscribed';
23
+ declare type SubscribeSuccess = {
24
+ productUrl: string;
25
+ };
26
+ declare type SubscribeFailure = {
27
+ errorType: SubscribeUserErrorTypes;
28
+ error?: any;
29
+ productUrl?: string;
30
+ };
31
+ interface ILinkExtraParams {
32
+ [key: string]: string;
33
+ }
34
+ declare type IIDentifyUserResult = {
35
+ success: true;
36
+ rockman_id: string;
37
+ subscription_url?: string;
38
+ redirect_url?: string;
39
+ } | {
40
+ success: false;
41
+ rockman_id: string;
42
+ message: string;
43
+ };
44
+ declare type IHEResult = {
45
+ success: true;
46
+ rockman_id: string;
47
+ redirectUrlWithReplacedUniqid?: string;
48
+ source: string;
49
+ oldUniqid: string;
50
+ newUniqid: string;
51
+ } | {
52
+ success: false;
53
+ rockman_id: string;
54
+ message: string;
55
+ };
56
+ declare type ISubscribeResult = {
57
+ success: true;
58
+ rockman_id: string;
59
+ product_url: string;
60
+ redirect_url?: string;
61
+ } | {
62
+ success: false;
63
+ rockman_id: string;
64
+ message: string;
65
+ product_url?: string;
66
+ };
67
+ declare type IMockOneClickFlowStates = 'redirect-url-success-state' | 'subscribe-ajax-state';
68
+
69
+ export type { AJAXSUBSCRIBEState as A, GETREDIRECTUrlState as G, IGETREDIRECTURLFailure as I, OneClickFlowState as O, SubscribeFailure as S, OneClickFlowCurrentState as a, IGETREDIRECTURLSuccess as b, SubscribeSuccess as c, SubscribeUserErrorTypes as d, ILinkExtraParams as e, IIDentifyUserResult as f, IHEResult as g, ISubscribeResult as h, IMockOneClickFlowStates as i };
@@ -0,0 +1,128 @@
1
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
2
+
3
+ interface ExtraData {
4
+ actualPIN: string | null;
5
+ msisdn: string;
6
+ operator: string;
7
+ pinMaxLength: number | null;
8
+ }
9
+ interface MSISDNEntryState {
10
+ type: 'MSISDNEntry';
11
+ result: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
12
+ data?: ExtraData;
13
+ }
14
+ interface PINEntryState {
15
+ type: 'PINEntry';
16
+ result: RemoteDataState<PINEntryFailure, PINEntrySuccess>;
17
+ data?: ExtraData;
18
+ }
19
+ declare type PinFlowCurrentState = MSISDNEntryState | PINEntryState;
20
+ interface PinFlowState {
21
+ currentState: PinFlowCurrentState;
22
+ }
23
+ declare type MSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN' | string;
24
+ declare type MSISDNEntryFailure = {
25
+ errorType: MSISDNEntryErrorTypes;
26
+ error?: any;
27
+ productUrl?: string;
28
+ };
29
+ declare type MSISDNEntrySuccess = Record<string, unknown>;
30
+ declare type PINEntryFailure = {
31
+ errorType: PINEntryErrorTypes;
32
+ error?: Error;
33
+ productUrl?: string;
34
+ };
35
+ declare type PINEntrySuccess = {
36
+ finalUrl: string;
37
+ msisdn?: string;
38
+ isAlreadySubscribed?: boolean;
39
+ };
40
+ declare type PINEntryErrorTypes = 'UnknownError' | 'TooEarly' | 'InvalidPIN' | 'UnexpectedState' | 'SessionBlocked' | 'AlreadySubscribed';
41
+ declare type IMsisdnSumbitNextData = {
42
+ actualPIN: string;
43
+ msisdn: string;
44
+ pinMaxLength?: number | null;
45
+ operator?: string;
46
+ };
47
+ declare type IMsisnSubmitActionPayload = {
48
+ type: 'MSISDNEntry';
49
+ result: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
50
+ data: IMsisdnSumbitNextData;
51
+ };
52
+ declare type IMsisdnSubmitErrorPayload = {
53
+ type: 'MSISDNEntry';
54
+ result: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
55
+ };
56
+ declare type IPinSubmitPayload = {
57
+ type: 'PINEntry';
58
+ result: RemoteDataState<PINEntryFailure, PINEntrySuccess>;
59
+ actualPIN?: string;
60
+ };
61
+ declare type IPinErrorPayload = {
62
+ type: 'PINEntry';
63
+ result: RemoteDataState<PINEntryFailure, PINEntrySuccess>;
64
+ };
65
+ declare type IBackToStartPayload = {
66
+ type: 'MSISDNEntry';
67
+ result: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
68
+ };
69
+ declare type IConfig = {
70
+ offer?: string;
71
+ slug?: string;
72
+ country?: string;
73
+ host?: string;
74
+ device?: 'smart' | 'feature';
75
+ automaticallySubmitAllOperators?: boolean;
76
+ operators?: string[];
77
+ };
78
+ declare type IMSISDNSubmissionResult = {
79
+ success: true;
80
+ rockman_id: string;
81
+ pin: string;
82
+ product_url?: string;
83
+ operator: string;
84
+ redirect_to_url?: string;
85
+ javascript?: string;
86
+ } | {
87
+ success: false;
88
+ rockman_id: string;
89
+ message: string;
90
+ product_url?: string;
91
+ };
92
+ declare type IPINSubmissionResult = {
93
+ success: true;
94
+ rockman_id: string;
95
+ product_url?: string;
96
+ async?: boolean;
97
+ message?: string;
98
+ } | {
99
+ success: false;
100
+ rockman_id: string;
101
+ message: string;
102
+ };
103
+ interface IHash {
104
+ [key: string]: string;
105
+ }
106
+ declare type SingleMSISDNSubmissionResult = {
107
+ type: 'SingleMSISDNSubmissionResult';
108
+ operator: string;
109
+ pin?: string;
110
+ uniqidResult?: string;
111
+ redirectUrl?: string;
112
+ };
113
+ declare type MultiOperatorMSISDNSubmissionResult = {
114
+ type: 'MultiOperatorMSISDNSubmissionResult';
115
+ };
116
+ declare type IMcpShieldResult = {
117
+ success: true;
118
+ rockman_id: string;
119
+ source: string;
120
+ uniqid: string;
121
+ } | {
122
+ success: false;
123
+ rockman_id: string;
124
+ message: string;
125
+ };
126
+ declare type IMockPinFlowStates = 'msisdn-state' | 'pin-state' | 'completed-state' | 'msisdn-failure-state';
127
+
128
+ export type { ExtraData as E, IMsisdnSumbitNextData as I, MSISDNEntryFailure as M, PinFlowCurrentState as P, SingleMSISDNSubmissionResult as S, MSISDNEntrySuccess as a, PINEntryFailure as b, PINEntrySuccess as c, PINEntryState as d, PINEntryErrorTypes as e, IHash as f, MSISDNEntryState as g, PinFlowState as h, MSISDNEntryErrorTypes as i, IMsisnSubmitActionPayload as j, IMsisdnSubmitErrorPayload as k, IPinSubmitPayload as l, IPinErrorPayload as m, IBackToStartPayload as n, IConfig as o, IMSISDNSubmissionResult as p, IPINSubmissionResult as q, MultiOperatorMSISDNSubmissionResult as r, IMcpShieldResult as s, IMockPinFlowStates as t };
@@ -0,0 +1,61 @@
1
+ declare type RemoteDataState<E, D> = {
2
+ type: 'NothingYet';
3
+ } | {
4
+ type: 'Loading';
5
+ } | {
6
+ type: 'Failure';
7
+ error: E;
8
+ } | {
9
+ type: 'Success';
10
+ data: D;
11
+ };
12
+ interface IMatcher<E, D, R> {
13
+ nothingYet: (data?: D) => R;
14
+ loading: () => R;
15
+ failure: (error: E) => R;
16
+ success: (data: D) => R;
17
+ }
18
+ interface ISuccessMatcher<E, D, R> {
19
+ success: (data: D) => R;
20
+ otherwise: (rds: RemoteDataState<E, D>) => R;
21
+ }
22
+ declare function match<E, D, R>({ nothingYet, loading, failure, success }: IMatcher<E, D, R>): (model: RemoteDataState<E, D>) => R;
23
+ declare const NothingYet: <E, D>() => RemoteDataState<E, D>;
24
+ declare const Loading: <E, D>() => RemoteDataState<E, D>;
25
+ declare const Failure: <E, D>(error: E) => RemoteDataState<E, D>;
26
+ declare const Success: <E, D>(data: D) => RemoteDataState<E, D>;
27
+ declare const IsNothingYet: <E, D>(s: RemoteDataState<E, D>) => boolean;
28
+ declare const IsLoading: <E, D>(s: RemoteDataState<E, D>) => boolean;
29
+ declare const IsFailure: <E, D>(s: RemoteDataState<E, D>) => boolean;
30
+ declare const IsSuccess: <E, D>(s: RemoteDataState<E, D>) => boolean;
31
+ declare const WhenFailure: <E, D, R>(d: R, r: (err: E) => R) => (s: RemoteDataState<E, D>) => R;
32
+ declare const WhenLoading: <D, R>(d: R, r: () => R) => (s: RemoteDataState<unknown, D>) => R;
33
+ declare const WhenSuccess: <D, R>(d: R, r: (data: D) => R) => (s: RemoteDataState<unknown, D>) => R;
34
+ declare const MatchFailure: <E, D, R>({ failure, otherwise }: {
35
+ otherwise: () => R;
36
+ failure: (err: E) => R;
37
+ }) => (s: RemoteDataState<E, D>) => R;
38
+ declare const MatchSuccess: <E, D, R>({ success, otherwise }: ISuccessMatcher<E, D, R>) => (s: RemoteDataState<E, D>) => R;
39
+
40
+ declare const RemoteDataState$1_Failure: typeof Failure;
41
+ type RemoteDataState$1_IMatcher<E, D, R> = IMatcher<E, D, R>;
42
+ type RemoteDataState$1_ISuccessMatcher<E, D, R> = ISuccessMatcher<E, D, R>;
43
+ declare const RemoteDataState$1_IsFailure: typeof IsFailure;
44
+ declare const RemoteDataState$1_IsLoading: typeof IsLoading;
45
+ declare const RemoteDataState$1_IsNothingYet: typeof IsNothingYet;
46
+ declare const RemoteDataState$1_IsSuccess: typeof IsSuccess;
47
+ declare const RemoteDataState$1_Loading: typeof Loading;
48
+ declare const RemoteDataState$1_MatchFailure: typeof MatchFailure;
49
+ declare const RemoteDataState$1_MatchSuccess: typeof MatchSuccess;
50
+ declare const RemoteDataState$1_NothingYet: typeof NothingYet;
51
+ type RemoteDataState$1_RemoteDataState<E, D> = RemoteDataState<E, D>;
52
+ declare const RemoteDataState$1_Success: typeof Success;
53
+ declare const RemoteDataState$1_WhenFailure: typeof WhenFailure;
54
+ declare const RemoteDataState$1_WhenLoading: typeof WhenLoading;
55
+ declare const RemoteDataState$1_WhenSuccess: typeof WhenSuccess;
56
+ declare const RemoteDataState$1_match: typeof match;
57
+ declare namespace RemoteDataState$1 {
58
+ export { RemoteDataState$1_Failure as Failure, type RemoteDataState$1_IMatcher as IMatcher, type RemoteDataState$1_ISuccessMatcher as ISuccessMatcher, RemoteDataState$1_IsFailure as IsFailure, RemoteDataState$1_IsLoading as IsLoading, RemoteDataState$1_IsNothingYet as IsNothingYet, RemoteDataState$1_IsSuccess as IsSuccess, RemoteDataState$1_Loading as Loading, RemoteDataState$1_MatchFailure as MatchFailure, RemoteDataState$1_MatchSuccess as MatchSuccess, RemoteDataState$1_NothingYet as NothingYet, type RemoteDataState$1_RemoteDataState as RemoteDataState, RemoteDataState$1_Success as Success, RemoteDataState$1_WhenFailure as WhenFailure, RemoteDataState$1_WhenLoading as WhenLoading, RemoteDataState$1_WhenSuccess as WhenSuccess, RemoteDataState$1_match as match };
59
+ }
60
+
61
+ export { type RemoteDataState as R, RemoteDataState$1 as a };
@@ -0,0 +1,325 @@
1
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
2
+ import { C as CreditCardFlowState } from './CreditCardTypes-B-IT-l6I.js';
3
+ import { e as MoRedirFlowState } from './MoRedirTypes-4tEJjT1g.js';
4
+ import { d as MoFlowState } from './MoTypes-D-UK92gs.js';
5
+ import { O as OneClickFlowState } from './OneClickTypes-DF0jodl-.js';
6
+ import { h as PinFlowState } from './PinTypes-BLJDBZe6.js';
7
+ import { U as UssdFlowState } from './UssdTypes-C7QlIW11.js';
8
+
9
+ declare type IWithMultiKeywordShortcode = IKeywordShortcode & {
10
+ type?: string;
11
+ data?: Array<IKeywordShortcode>;
12
+ };
13
+ interface LOAD_OC2SMSState {
14
+ type: 'LOAD_OC2SMS';
15
+ result: RemoteDataState<string, IWithMultiKeywordShortcode>;
16
+ }
17
+ interface Click2smsFlowState {
18
+ currentState: Click2smsFlowCurrentState;
19
+ }
20
+ declare type Click2smsFlowCurrentState = LOAD_OC2SMSState;
21
+ declare type MSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN' | 'UnexpectedState';
22
+ declare type ILOADOC2SMSFailure = {
23
+ errorType: MSISDNEntryErrorTypes;
24
+ error?: any;
25
+ productUrl?: string;
26
+ };
27
+ declare type ILOADOC2SMSSuccess = IKeywordShortcode;
28
+ declare type ILoadOc2click2smsPayload = {
29
+ type: 'LOAD_OC2SMS';
30
+ payload: RemoteDataState<string, IWithMultiKeywordShortcode>;
31
+ };
32
+ declare type IKeywordShortcode = {
33
+ keyword: string;
34
+ shortcode: string;
35
+ operator?: string;
36
+ };
37
+ declare type Config = {
38
+ host?: string;
39
+ country?: string;
40
+ slug?: string;
41
+ automaticallySubmitAllOperators?: boolean;
42
+ operators?: string[];
43
+ };
44
+ declare type IClick2smsConfig = ({
45
+ tag: 'tallyman';
46
+ } & Config) | ({
47
+ tag: 'keywordAndShortCode';
48
+ } & IKeywordShortcode & Config) | ({
49
+ tag: 'keyword';
50
+ } & Config);
51
+ declare type SingleSubmissionResult = IKeywordShortcode & {
52
+ type: 'SingleSubmissionResult';
53
+ };
54
+ declare type MultiOperatorSubmissionResult = {
55
+ type: 'MultiOperatorSubmissionResult';
56
+ data: Array<IKeywordShortcode>;
57
+ };
58
+ declare type ICheckSubscriptionResult = {
59
+ success: false;
60
+ rockman_id: string;
61
+ message: string;
62
+ } | {
63
+ success: true;
64
+ msisdn: string;
65
+ product_url?: string;
66
+ rockman_id: string;
67
+ };
68
+ declare type IFetchResult = {
69
+ success: boolean;
70
+ uid: string;
71
+ shortcode: string;
72
+ keyword: string;
73
+ displayKeyword: string;
74
+ message?: string;
75
+ };
76
+
77
+ declare type IIdentifyResult = {
78
+ operator: string;
79
+ flow?: string;
80
+ success: boolean;
81
+ rockman_id?: string;
82
+ message?: string;
83
+ };
84
+ declare type ConfigDetails = {
85
+ host: string;
86
+ slug: string;
87
+ country: string;
88
+ device?: 'smart' | 'feature';
89
+ queryString?: Array<[string, string]>;
90
+ automaticallySubmitAllOperators?: boolean;
91
+ operators?: string[];
92
+ service: string;
93
+ offer?: string;
94
+ };
95
+ declare type IConfig = {
96
+ offer?: string;
97
+ slug?: string;
98
+ country?: string;
99
+ host?: string;
100
+ device?: 'smart' | 'feature';
101
+ automaticallySubmitAllOperators?: boolean;
102
+ operators?: string[];
103
+ service?: string;
104
+ serviceId?: string;
105
+ queryString?: any;
106
+ apiAction?: any;
107
+ };
108
+ declare type ISupportedFlows = 'pin' | 'mo' | 'oneClick' | 'click2sms' | 'moRedir' | 'ussd' | 'creditCard';
109
+ declare type IFlow = {
110
+ flow: ISupportedFlows;
111
+ flowOnWifi?: ISupportedFlows;
112
+ operator?: string;
113
+ flowConfig: ConfigDetails;
114
+ default?: IFlow;
115
+ rockman_id?: string;
116
+ };
117
+ declare type StrategyConfig = {
118
+ operators: {
119
+ [key: string]: IFlow;
120
+ };
121
+ default: IFlow;
122
+ isUseMsisdnPrefix?: boolean;
123
+ };
124
+ declare type IStrategy = {
125
+ strategy: IStrategyNames;
126
+ country: string;
127
+ strategyConfigs: StrategyConfig;
128
+ };
129
+ declare type IStrategyNames = 'pin' | 'mo' | 'mo-redir' | 'click2sms' | 'one-click' | 'ussd' | 'tpay-he' | 'credit-card' | 'tallyman-one-click' | 'pin-mo-ask-operator' | 'pin-mo-ask-mobile-number' | 'pin-one-click-ask-operator' | 'pin-one-click-detect-operator-by-ip' | 'one-click-mo-pin-detect-operator-by-ip-or-msisdn' | 'pin-click2sms-ask-operator' | 'mo-redir-one-click-detect-operator-by-ip' | 'pin-mo-redir-ask-mobile-number' | 'pin-click2sms-ask-mobile-number' | 'mo-one-click-detect-operator-by-ip' | 'click2sms-one-click-detect-operator-by-ip' | 'pin-header-enrichment' | 'pin-msisdn-fowarding-pin-header-enrichment' | 'he-pin-mo-redir-header-enrichment' | 'he-pin-one-click-header-enrichment' | 'he-pin-one-click-ask-operator' | 'click2sms-one-click-ask-operator' | 'pin-mo-detect-operator-by-ip' | 'he-mo-redir-one-click-header-enrichment' | 'pin-combo-ask-mobile-number' | 'header-enrichment-script' | 'mo-redir-mo-click2sms-one-click-detect-operator-by-ip-or-msisdn' | 'pin-mo-mo-redir-ask-mobile-number';
130
+ interface IHash {
131
+ [key: string]: string;
132
+ }
133
+ declare type IDENTIFYMSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN';
134
+ declare type IDENTIFYMSISDNEntryFailure = {
135
+ errorType: IDENTIFYMSISDNEntryErrorTypes;
136
+ error: unknown;
137
+ };
138
+ declare type IdentifyFlowOptionsResult = {
139
+ config: IConfig;
140
+ nextAction?: unknown;
141
+ msisdn?: string;
142
+ operator?: string;
143
+ subscription_url?: string;
144
+ redirect_url?: string;
145
+ rockman_id?: string;
146
+ isHeaderEnrichmentSuccess?: boolean;
147
+ autoRedirect?: boolean;
148
+ isUseMsisdnPrefix?: boolean;
149
+ };
150
+ declare type IDENTIFYMSISDNEntrySuccess = {};
151
+ declare type OPERATORSelectFailure = {};
152
+ declare type OPERATORSelectSuccess = IdentifyFlowOptionsResult;
153
+ declare type IDETECTYOPERATOBYIPFailure = {};
154
+ declare type IDETECTYOPERATOBYIPSuccess = IdentifyFlowOptionsResult;
155
+ declare type IDENTIFY_OPERATOR_MSISDNEntrySuccess = IdentifyFlowOptionsResult;
156
+ declare type IDENTIFY_FLOW_HESuccess = IdentifyFlowOptionsResult;
157
+ declare type OPERATORSelectFlowIdentifyFailure = {};
158
+ declare type OPERATORSelectFlowIdentifySuccess = {
159
+ operators: Array<string>;
160
+ msisdn?: string;
161
+ nextAction: 'selectOperator';
162
+ };
163
+ declare type IDENTIFYFailure = {};
164
+ declare type IDENTIFYSuccess = {};
165
+ declare type IOperatorSelectFlowIdentifyPayload = {
166
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT';
167
+ result: RemoteDataState<OPERATORSelectFlowIdentifyFailure, OPERATORSelectFlowIdentifySuccess>;
168
+ };
169
+ declare type IDetectOperatorByIpPayload = {
170
+ type: 'DETECT_OPERATOR_BY_IP';
171
+ result: RemoteDataState<IDETECTYOPERATOBYIPFailure, IDETECTYOPERATOBYIPSuccess>;
172
+ };
173
+ declare enum PossibleTypes {
174
+ IDENTIFY_STRATEGY = "IDENTIFY_STRATEGY",
175
+ IDENTIFY_FLOW_BY_MSISDN = "IDENTIFY_FLOW_BY_MSISDN",
176
+ IDENTIFY_FLOW_BY_OPERATOR_SELECT = "IDENTIFY_FLOW_BY_OPERATOR_SELECT",
177
+ PIN = "PIN",
178
+ MO = "MO",
179
+ MO_REDIR = "MO_REDIR",
180
+ ONE_CLICK = "ONE_CLICK",
181
+ CLICK2SMS = "CLICK2SMS",
182
+ USSD = "USSD",
183
+ TPAY_HE = "TPAY_HE",
184
+ CREDIT_CARD = "CREDIT_CARD"
185
+ }
186
+ declare type IOperatorSelectPayload = {
187
+ type: PossibleTypes;
188
+ result: OPERATORSelectSuccess;
189
+ };
190
+ declare type ISubmitMsisdnPayload = {
191
+ type: PossibleTypes;
192
+ result: IDENTIFY_OPERATOR_MSISDNEntrySuccess;
193
+ };
194
+ declare type IIdentifyFlowByIpOperatorPayload = {
195
+ type: PossibleTypes;
196
+ result: IDENTIFY_OPERATOR_MSISDNEntrySuccess;
197
+ };
198
+ declare type IIdentifyFlowByHePayload = {
199
+ type: PossibleTypes;
200
+ result: IDENTIFY_FLOW_HESuccess;
201
+ };
202
+ declare type IIdentfyFlowByMsisdnNextAction = 'submitMSISDNAction' | 'loadOc2sms';
203
+ declare type IIdentfyFlowByOperatorNextAction = 'submitMSISDNAction' | 'loadOc2sms';
204
+ declare type IIdentfyFlowByIPOperatorNextAction = 'getRedirectUrlAction' | 'submitMSISDNAction';
205
+ declare type IIdenyifyFlowByMsisdnSumbitNextData = {
206
+ nextAction: IIdentfyFlowByMsisdnNextAction;
207
+ msisdn?: string;
208
+ operator?: string;
209
+ };
210
+ declare type IIdenyifyFlowByMsisdnPayload = {
211
+ type: 'IDENTIFY_FLOW_BY_MSISDN';
212
+ result: RemoteDataState<IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess>;
213
+ data: IIdenyifyFlowByMsisdnSumbitNextData;
214
+ };
215
+ declare type IIdenyifyStrategyPayload = {
216
+ type: 'IDENTIFY_FLOW_BY_MSISDN';
217
+ result: RemoteDataState<IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess>;
218
+ data: IIdenyifyFlowByMsisdnSumbitNextData;
219
+ };
220
+ declare type IStrategyCurrentState = {
221
+ type: 'IDENTIFY_STRATEGY';
222
+ result: RemoteDataState<IDENTIFYFailure, IDENTIFYSuccess>;
223
+ } | {
224
+ type: 'IDENTIFY_FLOW_BY_OPERATOR_SELECT';
225
+ result: OPERATORSelectFlowIdentifySuccess;
226
+ } | {
227
+ type: 'DETECT_OPERATOR_BY_IP';
228
+ result: RemoteDataState<IDETECTYOPERATOBYIPFailure, IDETECTYOPERATOBYIPSuccess>;
229
+ } | {
230
+ type: 'HE_IDENTIFY';
231
+ result: RemoteDataState<IDENTIFYFailure, IDENTIFYSuccess>;
232
+ } | {
233
+ type: 'OPERATOR_SELECT';
234
+ result: RemoteDataState<OPERATORSelectFailure, OPERATORSelectSuccess>;
235
+ config: IConfig;
236
+ } | {
237
+ type: 'IDENTIFY_FLOW_BY_MSISDN';
238
+ result: RemoteDataState<IDENTIFYMSISDNEntryFailure, IDENTIFYMSISDNEntrySuccess>;
239
+ nextData: IIdenyifyFlowByMsisdnSumbitNextData;
240
+ } | {
241
+ type: 'PIN';
242
+ result: IdentifyFlowOptionsResult;
243
+ } | {
244
+ type: 'MO';
245
+ result: IdentifyFlowOptionsResult;
246
+ } | {
247
+ type: 'USSD';
248
+ result: IdentifyFlowOptionsResult;
249
+ } | {
250
+ type: 'MO_REDIR';
251
+ result: IdentifyFlowOptionsResult;
252
+ } | {
253
+ type: 'ONE_CLICK';
254
+ result: IdentifyFlowOptionsResult;
255
+ } | {
256
+ type: 'CLICK2SMS';
257
+ result: IdentifyFlowOptionsResult;
258
+ } | {
259
+ type: 'TPAY_HE';
260
+ result: IdentifyFlowOptionsResult;
261
+ } | {
262
+ type: 'CREDIT_CARD';
263
+ result: IdentifyFlowOptionsResult;
264
+ };
265
+ declare type IStrategyIDentifyUserResult = {
266
+ success: 'true';
267
+ rockman_id: string;
268
+ msisdn: string;
269
+ operator?: string;
270
+ subscription_url?: string;
271
+ redirect_url?: string;
272
+ 'redirect-back'?: string;
273
+ 'msisdn-alias'?: string;
274
+ } | {
275
+ success: 'false';
276
+ rockman_id: string;
277
+ message: string;
278
+ 'redirect-back'?: string;
279
+ };
280
+ declare type IMockFlows = 'pin' | 'mo' | 'oneclick' | 'click2sms' | 'moredir' | 'ussd' | 'tpay' | 'creditcard';
281
+ interface IMockFlowParams<T> {
282
+ 'mock-flow': IMockFlows;
283
+ 'current-state': T;
284
+ 'show-pin-entry': '1' | '0';
285
+ 'show-thank-you': '1' | '0';
286
+ operator: string;
287
+ msisdn?: string;
288
+ }
289
+ interface IScriptHeaderEnrichmentSuccess extends CustomEvent {
290
+ detail: {
291
+ msisdn: string;
292
+ operator_code: string;
293
+ };
294
+ }
295
+ interface ExtraStrategyData {
296
+ isHeaderEnrichmentSuccess?: boolean;
297
+ config?: ConfigDetails;
298
+ msisdn?: string;
299
+ rockman_id?: string;
300
+ operator?: string;
301
+ subscription_url?: string;
302
+ redirect_url?: string;
303
+ operators?: string[];
304
+ }
305
+ interface StrategyState {
306
+ currentState: StrategyCurrentState;
307
+ }
308
+ interface StrategyCurrentState {
309
+ type: PossibleTypes;
310
+ result: RemoteDataState<any, any>;
311
+ data?: ExtraStrategyData;
312
+ }
313
+ declare type IMockPinFlowStates = 'msisdn-state' | 'pin-state' | 'completed-state' | 'msisdn-failure-state';
314
+ interface RootState {
315
+ strategy?: StrategyState;
316
+ pinFlow?: PinFlowState;
317
+ moFlow?: MoFlowState;
318
+ moRedirFlow?: MoRedirFlowState;
319
+ click2smsFlow?: Click2smsFlowState;
320
+ oneClickFlow?: OneClickFlowState;
321
+ ussdFlow?: UssdFlowState;
322
+ creditCardFlow?: CreditCardFlowState;
323
+ }
324
+
325
+ export { type ILoadOc2click2smsPayload as $, type IIdentifyFlowByHePayload as A, type IIdentfyFlowByMsisdnNextAction as B, type ConfigDetails as C, type IIdentfyFlowByOperatorNextAction as D, type IIdentfyFlowByIPOperatorNextAction as E, type IIdenyifyFlowByMsisdnSumbitNextData as F, type IIdenyifyFlowByMsisdnPayload as G, type IIdenyifyStrategyPayload as H, type IDENTIFYMSISDNEntryFailure as I, type IStrategyCurrentState as J, type IStrategyIDentifyUserResult as K, type IMockFlows as L, type IMockFlowParams as M, type IScriptHeaderEnrichmentSuccess as N, type OPERATORSelectFailure as O, PossibleTypes as P, type ExtraStrategyData as Q, type IMockPinFlowStates as R, type StrategyCurrentState as S, type RootState as T, type LOAD_OC2SMSState as U, type Click2smsFlowState as V, type IWithMultiKeywordShortcode as W, type Click2smsFlowCurrentState as X, type MSISDNEntryErrorTypes as Y, type ILOADOC2SMSFailure as Z, type ILOADOC2SMSSuccess as _, type IDENTIFYMSISDNEntrySuccess as a, type IKeywordShortcode as a0, type IClick2smsConfig as a1, type SingleSubmissionResult as a2, type MultiOperatorSubmissionResult as a3, type ICheckSubscriptionResult as a4, type IFetchResult as a5, type StrategyState as b, type IIdentifyResult as c, type IConfig as d, type ISupportedFlows as e, type IFlow as f, type StrategyConfig as g, type IStrategy as h, type IStrategyNames as i, type IHash as j, type IDENTIFYMSISDNEntryErrorTypes as k, type IdentifyFlowOptionsResult as l, type OPERATORSelectSuccess as m, type IDETECTYOPERATOBYIPFailure as n, type IDETECTYOPERATOBYIPSuccess as o, type IDENTIFY_OPERATOR_MSISDNEntrySuccess as p, type IDENTIFY_FLOW_HESuccess as q, type OPERATORSelectFlowIdentifyFailure as r, type OPERATORSelectFlowIdentifySuccess as s, type IDENTIFYFailure as t, type IDENTIFYSuccess as u, type IOperatorSelectFlowIdentifyPayload as v, type IDetectOperatorByIpPayload as w, type IOperatorSelectPayload as x, type ISubmitMsisdnPayload as y, type IIdentifyFlowByIpOperatorPayload as z };
@@ -0,0 +1,34 @@
1
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
2
+
3
+ interface MSISDNEntryState {
4
+ type: 'MSISDNEntry';
5
+ result: RemoteDataState<MSISDNEntryFailure, MSISDNEntrySuccess>;
6
+ }
7
+ declare type UssdFlowCurrentState = MSISDNEntryState;
8
+ interface UssdFlowState {
9
+ currentState: UssdFlowCurrentState;
10
+ }
11
+ declare type MSISDNEntryErrorTypes = 'AlreadySubscribed' | 'UnknownError' | 'InvalidMSISDN' | 'UnexpectedState';
12
+ declare type MSISDNEntryFailure = {
13
+ errorType: MSISDNEntryErrorTypes;
14
+ error?: any;
15
+ productUrl?: string;
16
+ };
17
+ declare type MSISDNEntrySuccess = IKeywordShortcode;
18
+ declare type IKeywordShortcode = {
19
+ keyword: string;
20
+ shortcode: string;
21
+ };
22
+ declare type IMSISDNSubmissionResult = {
23
+ success: true;
24
+ rockman_id: string;
25
+ keyword: string;
26
+ shortcode: string;
27
+ } | {
28
+ success: false;
29
+ rockman_id: string;
30
+ message: string;
31
+ };
32
+ declare type IMockUssdFlowStates = 'msisdn-entry-success-state' | 'msisdn-entry-failure-state';
33
+
34
+ export type { IKeywordShortcode as I, MSISDNEntryState as M, UssdFlowState as U, MSISDNEntryFailure as a, MSISDNEntrySuccess as b, UssdFlowCurrentState as c, MSISDNEntryErrorTypes as d, IMSISDNSubmissionResult as e, IMockUssdFlowStates as f };
@@ -0,0 +1,8 @@
1
+ declare function checkSubscriptionHander({ window, flow, action, args }: {
2
+ window: Window;
3
+ flow?: string;
4
+ action?: string;
5
+ args?: any;
6
+ }): Promise<string>;
7
+
8
+ export { checkSubscriptionHander };
@@ -0,0 +1,37 @@
1
+ import { U as LOAD_OC2SMSState, V as Click2smsFlowState, j as IHash, W as IWithMultiKeywordShortcode, X as Click2smsFlowCurrentState } from './StrategyTypes-BEIYqoJV.js';
2
+ export { a4 as ICheckSubscriptionResult, a1 as IClick2smsConfig, a5 as IFetchResult, a0 as IKeywordShortcode, Z as ILOADOC2SMSFailure, _ as ILOADOC2SMSSuccess, $ as ILoadOc2click2smsPayload, Y as MSISDNEntryErrorTypes, a3 as MultiOperatorSubmissionResult, a2 as SingleSubmissionResult } from './StrategyTypes-BEIYqoJV.js';
3
+ import * as redux from 'redux';
4
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
5
+ import * as _reduxjs_toolkit_dist_createAsyncThunk from '@reduxjs/toolkit/dist/createAsyncThunk';
6
+ import { useSelector } from 'react-redux';
7
+ import { R as RemoteDataState } from './RemoteDataState-D1aFrz8W.js';
8
+ import './CreditCardTypes-B-IT-l6I.js';
9
+ import './MoRedirTypes-4tEJjT1g.js';
10
+ import './MoTypes-D-UK92gs.js';
11
+ import './OneClickTypes-DF0jodl-.js';
12
+ import './PinTypes-BLJDBZe6.js';
13
+ import './UssdTypes-C7QlIW11.js';
14
+
15
+ interface LOAD_OC2SMSArgs {
16
+ window: Window;
17
+ extraParams?: IHash;
18
+ }
19
+ /**
20
+ * loadOc2smsAction
21
+ * @returns {type: ' 'pinFlow/submitMSISDNAction', payload: {type: PossibleTypes, result: MSISDNEntryState}}
22
+
23
+ * Calls oc2sms api that returns a keyword and short code
24
+ *
25
+ */
26
+ declare const loadOc2smsAction: _reduxjs_toolkit.AsyncThunk<LOAD_OC2SMSState, LOAD_OC2SMSArgs, _reduxjs_toolkit_dist_createAsyncThunk.AsyncThunkConfig>;
27
+ declare const click2smsFlowReducer: redux.Reducer<Click2smsFlowState, redux.UnknownAction, Click2smsFlowState>;
28
+
29
+ declare const useClick2smsFlowState: (useSelector: typeof useSelector) => LOAD_OC2SMSState;
30
+
31
+ declare const useKeyWordShortCode: (useSelector: typeof useSelector) => IWithMultiKeywordShortcode;
32
+
33
+ declare function click2smsFlowMatch<R>({ load }: {
34
+ load: (rds: RemoteDataState<string, IWithMultiKeywordShortcode>) => R;
35
+ }): (state: Click2smsFlowCurrentState) => R;
36
+
37
+ export { Click2smsFlowCurrentState, Click2smsFlowState, IWithMultiKeywordShortcode, LOAD_OC2SMSState, click2smsFlowMatch, click2smsFlowReducer, loadOc2smsAction, useClick2smsFlowState, useKeyWordShortCode };