@bloque/sdk-accounts 0.0.11 → 0.0.13

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,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 CardClient {
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/card',
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
- lastFour: account.details.card_last_four,
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 BancolombiaClient {
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/bancolombia',
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
- referenceCode: account.details.reference_code,
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
@@ -1,3 +1,5 @@
1
+ export * from './bancolombia/client';
2
+ export * from './bancolombia/types';
1
3
  export * from './card/client';
2
4
  export * from './card/types';
3
5
  export * from './client';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- class CardClient {
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/card',
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
- lastFour: account.details.card_last_four,
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 BancolombiaClient {
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/bancolombia',
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
- referenceCode: account.details.reference_code,
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.11",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "bloque",
@@ -12,7 +12,7 @@
12
12
  "license": "MIT",
13
13
  "publishConfig": {
14
14
  "access": "public",
15
- "provenance": true
15
+ "provenance": null
16
16
  },
17
17
  "homepage": "git+https://github.com/bloque-app/sdk.git#readme",
18
18
  "repository": {
@@ -36,7 +36,6 @@
36
36
  "node": ">=22"
37
37
  },
38
38
  "scripts": {
39
- "release": "bun publish",
40
39
  "build": "rslib build",
41
40
  "dev": "rslib build --watch",
42
41
  "clean": "rm -rf node_modules && rm -rf dist",
@@ -44,12 +43,12 @@
44
43
  "typecheck": "tsgo --noEmit"
45
44
  },
46
45
  "dependencies": {
47
- "@bloque/sdk-core": "0.0.11"
46
+ "@bloque/sdk-core": "workspace:*"
48
47
  },
49
48
  "devDependencies": {
50
- "@rslib/core": "^0.18.4",
51
- "@types/node": "^24.10.1",
52
- "@typescript/native-preview": "latest",
53
- "typescript": "^5.9.3"
49
+ "@rslib/core": "catalog:",
50
+ "@types/node": "catalog:",
51
+ "@typescript/native-preview": "catalog:",
52
+ "typescript": "catalog:"
54
53
  }
55
54
  }