@astropay/payments-lib 0.0.6

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/dist/main.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { AstroPayPaymentsLib } from './core/astroPayInit';
2
+ import { AstroPayPaymentComponent } from './components/pages/AstroPayPaymentComponent';
3
+ export default AstroPayPaymentsLib;
4
+ export { AstroPayPaymentComponent };
@@ -0,0 +1,32 @@
1
+ export declare const CONFIG_ENVIRONMENT_VALUES: readonly ["production", "sandbox"];
2
+ export declare const CONFIG_THEME_VALUES: readonly ["light", "dark"];
3
+ export declare const CONFIG_LANGUAGE_VALUES: readonly ["en", "pt", "es"];
4
+ export declare const CONFIG_CURRENCY_MODE_VALUES: readonly ["iso", "symbol"];
5
+ type APEnvironment = (typeof CONFIG_ENVIRONMENT_VALUES)[number];
6
+ type APAvailableTheme = (typeof CONFIG_THEME_VALUES)[number];
7
+ type APAvailableLanguages = (typeof CONFIG_LANGUAGE_VALUES)[number];
8
+ type APAvailableCurrencyMode = (typeof CONFIG_CURRENCY_MODE_VALUES)[number];
9
+ type APComponentStyles = {
10
+ primaryColor: string;
11
+ secondaryColor: string;
12
+ backgroundColor: string;
13
+ textPrimaryColor: string;
14
+ textSecondaryColor: string;
15
+ fontFamily: string;
16
+ width: string | number;
17
+ };
18
+ type APLibConfig = {
19
+ environment?: APEnvironment;
20
+ theme?: APAvailableTheme;
21
+ language?: APAvailableLanguages;
22
+ currencyMode?: APAvailableCurrencyMode;
23
+ styles?: Partial<APComponentStyles>;
24
+ };
25
+ type APPaymentComponent = {
26
+ amount: number;
27
+ currency: string;
28
+ country: string;
29
+ showTitle?: boolean;
30
+ showDescription?: boolean;
31
+ };
32
+ export type { APLibConfig, APPaymentComponent, APEnvironment, APAvailableTheme, APAvailableLanguages, APAvailableCurrencyMode, APComponentStyles, };
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "version": "0.0.6",
3
+ "type": "module",
4
+ "name": "@astropay/payments-lib",
5
+ "description": "Official AstroPay payments library for web and mobile.",
6
+ "license": "UNLICENSED",
7
+ "author": {
8
+ "name": "AstroPay",
9
+ "email": "support@astropay.com",
10
+ "url": "https://developers.astropay.com/help"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/astropay-it/astropay-payments-lib.git"
18
+ },
19
+ "contributors": [
20
+ {
21
+ "name": "AstroPay IT",
22
+ "email": "it_services@astropay.com"
23
+ }
24
+ ],
25
+ "keywords": [
26
+ "payments",
27
+ "astropay",
28
+ "checkout"
29
+ ],
30
+ "main": "./dist/astropay-payments-lib.es.js",
31
+ "module": "./dist/astropay-payments-lib.es.js",
32
+ "types": "./dist/types/index.d.ts",
33
+ "exports": {
34
+ ".": {
35
+ "import": "./dist/astropay-payments-lib.es.js"
36
+ },
37
+ "./types": {
38
+ "types": "./dist/types/index.d.ts"
39
+ }
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "README.md"
44
+ ],
45
+ "scripts": {
46
+ "dev": "vite",
47
+ "start": "vite --open --host --mode test",
48
+ "build:test": "tsc -b ./tsconfig.lib.json && vite build --mode test",
49
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
50
+ "lint": "eslint .",
51
+ "preview": "vite preview",
52
+ "test": "jest",
53
+ "test:watch": "jest --watch",
54
+ "prepare": "husky",
55
+ "publish": "npm publish --access public"
56
+ },
57
+ "peerDependencies": {
58
+ "@emotion/css": "^11.13.5",
59
+ "axios": "^1.7.9",
60
+ "bowser": "^2.11.0",
61
+ "i18next": "^24.2.2",
62
+ "qrcode": "^1.5.4"
63
+ },
64
+ "devDependencies": {
65
+ "@commitlint/cli": "^19.7.1",
66
+ "@commitlint/config-conventional": "^19.7.1",
67
+ "@emotion/css": "^11.13.5",
68
+ "@eslint/js": "^9.19.0",
69
+ "@testing-library/jest-dom": "^6.6.3",
70
+ "@types/axios": "^0.14.4",
71
+ "@types/jest": "^29.5.14",
72
+ "@types/node": "^22.13.1",
73
+ "@types/qrcode": "^1.5.5",
74
+ "@typescript-eslint/eslint-plugin": "^8.23.0",
75
+ "@typescript-eslint/parser": "^8.23.0",
76
+ "axios": "^1.7.9",
77
+ "bowser": "^2.11.0",
78
+ "commitizen": "^4.3.1",
79
+ "cz-conventional-changelog": "^3.3.0",
80
+ "eslint": "^9.19.0",
81
+ "eslint-config-prettier": "^10.0.1",
82
+ "eslint-plugin-prettier": "^5.2.3",
83
+ "globals": "^15.14.0",
84
+ "husky": "^9.1.7",
85
+ "i18next": "^24.2.2",
86
+ "jest": "^29.7.0",
87
+ "jest-environment-jsdom": "^29.7.0",
88
+ "prettier": "^3.4.2",
89
+ "qrcode": "^1.5.4",
90
+ "rollup-plugin-visualizer": "^5.14.0",
91
+ "ts-jest": "^29.3.1",
92
+ "typescript": "~5.7.2",
93
+ "typescript-eslint": "^8.22.0",
94
+ "vite": "^6.1.0",
95
+ "vite-plugin-dts": "^4.5.0",
96
+ "vite-plugin-lib-inject-css": "^2.2.1",
97
+ "vite-tsconfig-paths": "^5.1.4"
98
+ },
99
+ "config": {
100
+ "commitizen": {
101
+ "path": "./node_modules/cz-conventional-changelog"
102
+ }
103
+ }
104
+ }