@bloque/sdk-accounts 0.0.10 → 0.0.11

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