ipagos-js-sdk 1.0.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 +150 -0
- package/dist/client.d.ts +531 -0
- package/dist/client.js +698 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/types.d.ts +31 -0
- package/dist/types.js +2 -0
- package/package.json +24 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type CSEnvironment = 'sandbox' | 'production';
|
|
2
|
+
export interface CSClientConfig {
|
|
3
|
+
environment: CSEnvironment;
|
|
4
|
+
merchantId: string;
|
|
5
|
+
keyId: string;
|
|
6
|
+
secretKey: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SignResult {
|
|
9
|
+
date: string;
|
|
10
|
+
digest?: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CSSuccess<T = any> {
|
|
14
|
+
success: true;
|
|
15
|
+
data: T;
|
|
16
|
+
}
|
|
17
|
+
export interface CSError {
|
|
18
|
+
success: false;
|
|
19
|
+
status?: number;
|
|
20
|
+
error: any;
|
|
21
|
+
}
|
|
22
|
+
export interface BillTo {
|
|
23
|
+
firstName: string;
|
|
24
|
+
lastName: string;
|
|
25
|
+
address1: string;
|
|
26
|
+
locality: string;
|
|
27
|
+
administrativeArea: string;
|
|
28
|
+
postalCode: string;
|
|
29
|
+
country: string;
|
|
30
|
+
}
|
|
31
|
+
export type iPagosCSClientResponse<T = any> = CSSuccess<T> | CSError;
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ipagos-js-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Official iPagos TypeScript SDK",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "Tu Nombre o Empresa",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"axios": "^1.13.5"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"typescript": "^5.8.3",
|
|
22
|
+
"ts-node": "^10.9.2"
|
|
23
|
+
}
|
|
24
|
+
}
|