@bloque/payments-core 0.0.2
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/index.cjs +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +0 -0
- package/dist/types/card-payment.d.ts +8 -0
- package/dist/types/cash-payment.d.ts +6 -0
- package/dist/types/payment-submit.d.ts +15 -0
- package/dist/types/payment.d.ts +15 -0
- package/dist/types/pse-payment.d.ts +7 -0
- package/package.json +52 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { CardPaymentFormData } from './types/card-payment';
|
|
2
|
+
export type { CashPaymentFormData } from './types/cash-payment';
|
|
3
|
+
export type { CreatePaymentParams, PaymentMethodType, PaymentResponse, } from './types/payment';
|
|
4
|
+
export type { PaymentSubmitPayload } from './types/payment-submit';
|
|
5
|
+
export type { PSEPaymentFormData } from './types/pse-payment';
|
package/dist/index.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CardPaymentFormData } from './card-payment';
|
|
2
|
+
import type { CashPaymentFormData } from './cash-payment';
|
|
3
|
+
import type { PSEPaymentFormData } from './pse-payment';
|
|
4
|
+
type PaymentFormDataMap = {
|
|
5
|
+
card: CardPaymentFormData;
|
|
6
|
+
pse: PSEPaymentFormData;
|
|
7
|
+
cash: CashPaymentFormData;
|
|
8
|
+
};
|
|
9
|
+
export type PaymentSubmitPayload = {
|
|
10
|
+
[K in keyof PaymentFormDataMap]: {
|
|
11
|
+
type: K;
|
|
12
|
+
data: PaymentFormDataMap[K];
|
|
13
|
+
};
|
|
14
|
+
}[keyof PaymentFormDataMap];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PaymentSubmitPayload } from './payment-submit';
|
|
2
|
+
export type PaymentMethodType = 'card' | 'pse' | 'cash';
|
|
3
|
+
export interface CreatePaymentParams {
|
|
4
|
+
checkoutId?: string;
|
|
5
|
+
payment: PaymentSubmitPayload;
|
|
6
|
+
}
|
|
7
|
+
export interface PaymentResponse {
|
|
8
|
+
id: string;
|
|
9
|
+
object: 'payment';
|
|
10
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
11
|
+
amount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
created_at: string;
|
|
14
|
+
updated_at: string;
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bloque/payments-core",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Core utilities and types for Bloque Payments.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"bloque",
|
|
8
|
+
"payments",
|
|
9
|
+
"core",
|
|
10
|
+
"utilities"
|
|
11
|
+
],
|
|
12
|
+
"author": "Nestor Cortina <nexckycort@gmail.com>",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"provenance": true
|
|
17
|
+
},
|
|
18
|
+
"homepage": "git+https://github.com/bloque-app/payments.git#readme",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/bloque-app/payments.git",
|
|
22
|
+
"directory": "packages/payments-core"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"main": "./dist/index.cjs",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "rslib build",
|
|
41
|
+
"dev": "rslib build --watch",
|
|
42
|
+
"clean": "rm -rf node_modules && rm -rf dist",
|
|
43
|
+
"check": "biome check --write",
|
|
44
|
+
"typecheck": "tsgo --noEmit"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@rslib/core": "catalog:",
|
|
48
|
+
"@types/node": "catalog:",
|
|
49
|
+
"@typescript/native-preview": "catalog:",
|
|
50
|
+
"typescript": "catalog:"
|
|
51
|
+
}
|
|
52
|
+
}
|