@bloque/sdk-accounts 0.0.11 → 0.0.12
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 +20 -17
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -17
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -25,9 +25,10 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
AccountsClient: ()=>AccountsClient,
|
|
28
|
-
CardClient: ()=>CardClient
|
|
28
|
+
CardClient: ()=>CardClient,
|
|
29
|
+
BancolombiaClient: ()=>BancolombiaClient
|
|
29
30
|
});
|
|
30
|
-
class
|
|
31
|
+
class BancolombiaClient {
|
|
31
32
|
httpClient;
|
|
32
33
|
constructor(httpClient){
|
|
33
34
|
this.httpClient = httpClient;
|
|
@@ -35,31 +36,25 @@ class CardClient {
|
|
|
35
36
|
async create(params) {
|
|
36
37
|
const request = {
|
|
37
38
|
holder_urn: params.urn,
|
|
38
|
-
input: {
|
|
39
|
-
create: {
|
|
40
|
-
card_type: 'VIRTUAL'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
39
|
+
input: {},
|
|
43
40
|
metadata: {
|
|
44
41
|
source: "sdk-typescript",
|
|
45
42
|
name: params.name,
|
|
43
|
+
card_urn: params.cardUrn,
|
|
46
44
|
...params.metadata
|
|
47
45
|
}
|
|
48
46
|
};
|
|
49
47
|
const response = await this.httpClient.request({
|
|
50
48
|
method: 'POST',
|
|
51
|
-
path: '/api/mediums/
|
|
49
|
+
path: '/api/mediums/bancolombia',
|
|
52
50
|
body: request
|
|
53
51
|
});
|
|
54
52
|
const account = response.result.account;
|
|
55
53
|
return {
|
|
56
54
|
urn: account.urn,
|
|
57
55
|
id: account.id,
|
|
58
|
-
|
|
59
|
-
productType: account.details.card_product_type,
|
|
56
|
+
referenceCode: account.details.reference_code,
|
|
60
57
|
status: account.status,
|
|
61
|
-
cardType: account.details.card_type,
|
|
62
|
-
detailsUrl: account.details.card_url_details,
|
|
63
58
|
ownerUrn: account.owner_urn,
|
|
64
59
|
webhookUrl: account.webhook_url,
|
|
65
60
|
metadata: account.metadata,
|
|
@@ -68,7 +63,7 @@ class CardClient {
|
|
|
68
63
|
};
|
|
69
64
|
}
|
|
70
65
|
}
|
|
71
|
-
class
|
|
66
|
+
class CardClient {
|
|
72
67
|
httpClient;
|
|
73
68
|
constructor(httpClient){
|
|
74
69
|
this.httpClient = httpClient;
|
|
@@ -76,25 +71,31 @@ class BancolombiaClient {
|
|
|
76
71
|
async create(params) {
|
|
77
72
|
const request = {
|
|
78
73
|
holder_urn: params.urn,
|
|
79
|
-
input: {
|
|
74
|
+
input: {
|
|
75
|
+
create: {
|
|
76
|
+
card_type: 'VIRTUAL'
|
|
77
|
+
}
|
|
78
|
+
},
|
|
80
79
|
metadata: {
|
|
81
80
|
source: "sdk-typescript",
|
|
82
81
|
name: params.name,
|
|
83
|
-
card_urn: params.cardUrn,
|
|
84
82
|
...params.metadata
|
|
85
83
|
}
|
|
86
84
|
};
|
|
87
85
|
const response = await this.httpClient.request({
|
|
88
86
|
method: 'POST',
|
|
89
|
-
path: '/api/mediums/
|
|
87
|
+
path: '/api/mediums/card',
|
|
90
88
|
body: request
|
|
91
89
|
});
|
|
92
90
|
const account = response.result.account;
|
|
93
91
|
return {
|
|
94
92
|
urn: account.urn,
|
|
95
93
|
id: account.id,
|
|
96
|
-
|
|
94
|
+
lastFour: account.details.card_last_four,
|
|
95
|
+
productType: account.details.card_product_type,
|
|
97
96
|
status: account.status,
|
|
97
|
+
cardType: account.details.card_type,
|
|
98
|
+
detailsUrl: account.details.card_url_details,
|
|
98
99
|
ownerUrn: account.owner_urn,
|
|
99
100
|
webhookUrl: account.webhook_url,
|
|
100
101
|
metadata: account.metadata,
|
|
@@ -114,9 +115,11 @@ class AccountsClient {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
exports.AccountsClient = __webpack_exports__.AccountsClient;
|
|
118
|
+
exports.BancolombiaClient = __webpack_exports__.BancolombiaClient;
|
|
117
119
|
exports.CardClient = __webpack_exports__.CardClient;
|
|
118
120
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
119
121
|
"AccountsClient",
|
|
122
|
+
"BancolombiaClient",
|
|
120
123
|
"CardClient"
|
|
121
124
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
122
125
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class BancolombiaClient {
|
|
2
2
|
httpClient;
|
|
3
3
|
constructor(httpClient){
|
|
4
4
|
this.httpClient = httpClient;
|
|
@@ -6,31 +6,25 @@ class CardClient {
|
|
|
6
6
|
async create(params) {
|
|
7
7
|
const request = {
|
|
8
8
|
holder_urn: params.urn,
|
|
9
|
-
input: {
|
|
10
|
-
create: {
|
|
11
|
-
card_type: 'VIRTUAL'
|
|
12
|
-
}
|
|
13
|
-
},
|
|
9
|
+
input: {},
|
|
14
10
|
metadata: {
|
|
15
11
|
source: "sdk-typescript",
|
|
16
12
|
name: params.name,
|
|
13
|
+
card_urn: params.cardUrn,
|
|
17
14
|
...params.metadata
|
|
18
15
|
}
|
|
19
16
|
};
|
|
20
17
|
const response = await this.httpClient.request({
|
|
21
18
|
method: 'POST',
|
|
22
|
-
path: '/api/mediums/
|
|
19
|
+
path: '/api/mediums/bancolombia',
|
|
23
20
|
body: request
|
|
24
21
|
});
|
|
25
22
|
const account = response.result.account;
|
|
26
23
|
return {
|
|
27
24
|
urn: account.urn,
|
|
28
25
|
id: account.id,
|
|
29
|
-
|
|
30
|
-
productType: account.details.card_product_type,
|
|
26
|
+
referenceCode: account.details.reference_code,
|
|
31
27
|
status: account.status,
|
|
32
|
-
cardType: account.details.card_type,
|
|
33
|
-
detailsUrl: account.details.card_url_details,
|
|
34
28
|
ownerUrn: account.owner_urn,
|
|
35
29
|
webhookUrl: account.webhook_url,
|
|
36
30
|
metadata: account.metadata,
|
|
@@ -39,7 +33,7 @@ class CardClient {
|
|
|
39
33
|
};
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
|
-
class
|
|
36
|
+
class CardClient {
|
|
43
37
|
httpClient;
|
|
44
38
|
constructor(httpClient){
|
|
45
39
|
this.httpClient = httpClient;
|
|
@@ -47,25 +41,31 @@ class BancolombiaClient {
|
|
|
47
41
|
async create(params) {
|
|
48
42
|
const request = {
|
|
49
43
|
holder_urn: params.urn,
|
|
50
|
-
input: {
|
|
44
|
+
input: {
|
|
45
|
+
create: {
|
|
46
|
+
card_type: 'VIRTUAL'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
51
49
|
metadata: {
|
|
52
50
|
source: "sdk-typescript",
|
|
53
51
|
name: params.name,
|
|
54
|
-
card_urn: params.cardUrn,
|
|
55
52
|
...params.metadata
|
|
56
53
|
}
|
|
57
54
|
};
|
|
58
55
|
const response = await this.httpClient.request({
|
|
59
56
|
method: 'POST',
|
|
60
|
-
path: '/api/mediums/
|
|
57
|
+
path: '/api/mediums/card',
|
|
61
58
|
body: request
|
|
62
59
|
});
|
|
63
60
|
const account = response.result.account;
|
|
64
61
|
return {
|
|
65
62
|
urn: account.urn,
|
|
66
63
|
id: account.id,
|
|
67
|
-
|
|
64
|
+
lastFour: account.details.card_last_four,
|
|
65
|
+
productType: account.details.card_product_type,
|
|
68
66
|
status: account.status,
|
|
67
|
+
cardType: account.details.card_type,
|
|
68
|
+
detailsUrl: account.details.card_url_details,
|
|
69
69
|
ownerUrn: account.owner_urn,
|
|
70
70
|
webhookUrl: account.webhook_url,
|
|
71
71
|
metadata: account.metadata,
|
|
@@ -84,4 +84,4 @@ class AccountsClient {
|
|
|
84
84
|
this.card = new CardClient(this.httpClient);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
export { AccountsClient, CardClient };
|
|
87
|
+
export { AccountsClient, BancolombiaClient, CardClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloque/sdk-accounts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bloque",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typecheck": "tsgo --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bloque/sdk-core": "0.0.
|
|
47
|
+
"@bloque/sdk-core": "0.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@rslib/core": "^0.18.4",
|