@heliofi/checkout-react 1.0.0 → 1.0.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.
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ThemeOverride } from '../../infrastructure/theme/types';
|
|
2
|
+
|
|
3
|
+
declare interface CustomTextsInterface {
|
|
4
|
+
mainButtonTitle?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare type DisplayType = keyof typeof DisplayTypeEnum;
|
|
8
|
+
|
|
9
|
+
declare enum DisplayTypeEnum {
|
|
10
|
+
BUTTON = "BUTTON",
|
|
11
|
+
INLINE = "INLINE"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare const HelioCheckout: (props: HelioCheckoutReactProps) => JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare interface HelioCheckoutReactProps {
|
|
17
|
+
config: HelioEmbedConfig;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare type HelioEmbedConfig = HelioEmbedConfig_2;
|
|
21
|
+
|
|
22
|
+
declare interface HelioEmbedConfig_2 {
|
|
23
|
+
paylinkId: string;
|
|
24
|
+
network?: NetworkType;
|
|
25
|
+
debug?: boolean;
|
|
26
|
+
customTexts?: CustomTextsInterface;
|
|
27
|
+
theme?: HelioEmbedTheme;
|
|
28
|
+
paymentType?: 'PAYLINK' | 'PAYSTREAM';
|
|
29
|
+
display?: DisplayType;
|
|
30
|
+
amount?: string;
|
|
31
|
+
additionalJSON?: Json;
|
|
32
|
+
onSuccess?: (event: {
|
|
33
|
+
data: unknown;
|
|
34
|
+
transaction: string;
|
|
35
|
+
paymentPK?: string;
|
|
36
|
+
swapTransactionSignature?: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
onError?: (event: {
|
|
39
|
+
transaction?: string;
|
|
40
|
+
errorMessage?: string;
|
|
41
|
+
}) => void;
|
|
42
|
+
onPending?: (event: {
|
|
43
|
+
data?: unknown;
|
|
44
|
+
transaction: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
onCancel?: () => void;
|
|
47
|
+
onStartPayment?: () => void;
|
|
48
|
+
source?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare type HelioEmbedTheme = ThemeOverride;
|
|
52
|
+
|
|
53
|
+
declare type Json = Json[] | boolean | null | number | string | {
|
|
54
|
+
[key: string]: Json;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
declare type NetworkType = 'test' | 'main';
|
|
58
|
+
|
|
59
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heliofi/checkout-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/helio-checkout-react.umd.js",
|
|
21
21
|
"module": "./dist/helio-checkout-react.es.js",
|
|
22
|
+
"types": "./dist/helio-checkout-react.es.d.ts",
|
|
22
23
|
"exports": {
|
|
23
24
|
".": {
|
|
24
25
|
"import": "./dist/helio-checkout-react.es.js",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
},
|
|
28
29
|
"files": [
|
|
29
30
|
"dist/helio-checkout-react.es.js",
|
|
31
|
+
"dist/helio-checkout-react.es.d.ts",
|
|
30
32
|
"dist/helio-checkout-react.umd.js"
|
|
31
33
|
],
|
|
32
34
|
"peerDependencies": {
|
|
@@ -48,6 +50,7 @@
|
|
|
48
50
|
"jsdom": "^23.0.1",
|
|
49
51
|
"typescript": "5.1.6",
|
|
50
52
|
"vite": "^4.4.5",
|
|
53
|
+
"vite-plugin-dts": "^3.6.4",
|
|
51
54
|
"vitest": "^0.34.6"
|
|
52
55
|
}
|
|
53
56
|
}
|