@heliofi/checkout-react 1.0.0 → 1.1.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/README.md CHANGED
@@ -1,3 +1,4 @@
1
1
  # Helio Checkout React
2
2
 
3
- For documentation please visit https://demo.hel.io or https://docs.hel.io
3
+ - Documentation please visit https://docs.hel.io/developers/helio-checkout-widget
4
+ - Demo: https://demo.hel.io
@@ -0,0 +1,60 @@
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: Omit<HelioEmbedConfig, 'source'>;
18
+ }
19
+
20
+ declare interface HelioEmbedConfig {
21
+ paylinkId: string;
22
+ network?: NetworkType;
23
+ debug?: boolean;
24
+ customTexts?: CustomTextsInterface;
25
+ primaryPaymentMethod?: PrimaryPaymentMethod;
26
+ theme?: HelioEmbedTheme;
27
+ paymentType?: 'PAYLINK' | 'PAYSTREAM';
28
+ display?: DisplayType;
29
+ amount?: string;
30
+ additionalJSON?: Json;
31
+ onSuccess?: (event: {
32
+ data: unknown;
33
+ transaction: string;
34
+ paymentPK?: string;
35
+ swapTransactionSignature?: string;
36
+ }) => void;
37
+ onError?: (event: {
38
+ transaction?: string;
39
+ errorMessage?: string;
40
+ }) => void;
41
+ onPending?: (event: {
42
+ data?: unknown;
43
+ transaction: string;
44
+ }) => void;
45
+ onCancel?: () => void;
46
+ onStartPayment?: () => void;
47
+ source?: string;
48
+ }
49
+
50
+ declare type HelioEmbedTheme = ThemeOverride;
51
+
52
+ declare type Json = Json[] | boolean | null | number | string | {
53
+ [key: string]: Json;
54
+ };
55
+
56
+ declare type NetworkType = 'test' | 'main';
57
+
58
+ declare type PrimaryPaymentMethod = 'fiat' | 'crypto';
59
+
60
+ 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.0",
4
+ "version": "1.1.0",
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
  }