@bloque/sdk-accounts 0.0.15 → 0.0.16

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
@@ -1,127 +1 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
9
- };
10
- })();
11
- (()=>{
12
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
- })();
14
- (()=>{
15
- __webpack_require__.r = (exports1)=>{
16
- if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
- value: 'Module'
18
- });
19
- Object.defineProperty(exports1, '__esModule', {
20
- value: true
21
- });
22
- };
23
- })();
24
- var __webpack_exports__ = {};
25
- __webpack_require__.r(__webpack_exports__);
26
- __webpack_require__.d(__webpack_exports__, {
27
- AccountsClient: ()=>AccountsClient,
28
- CardClient: ()=>CardClient,
29
- BancolombiaClient: ()=>BancolombiaClient
30
- });
31
- class BancolombiaClient {
32
- httpClient;
33
- constructor(httpClient){
34
- this.httpClient = httpClient;
35
- }
36
- async create(params) {
37
- const request = {
38
- holder_urn: params.urn,
39
- input: {},
40
- metadata: {
41
- source: "sdk-typescript",
42
- name: params.name,
43
- card_urn: params.cardUrn,
44
- ...params.metadata
45
- }
46
- };
47
- const response = await this.httpClient.request({
48
- method: 'POST',
49
- path: '/api/mediums/bancolombia',
50
- body: request
51
- });
52
- const account = response.result.account;
53
- return {
54
- urn: account.urn,
55
- id: account.id,
56
- referenceCode: account.details.reference_code,
57
- status: account.status,
58
- ownerUrn: account.owner_urn,
59
- webhookUrl: account.webhook_url,
60
- metadata: account.metadata,
61
- createdAt: account.created_at,
62
- updatedAt: account.updated_at
63
- };
64
- }
65
- }
66
- class CardClient {
67
- httpClient;
68
- constructor(httpClient){
69
- this.httpClient = httpClient;
70
- }
71
- async create(params) {
72
- const request = {
73
- holder_urn: params.urn,
74
- input: {
75
- create: {
76
- card_type: 'VIRTUAL'
77
- }
78
- },
79
- metadata: {
80
- source: "sdk-typescript",
81
- name: params.name,
82
- ...params.metadata
83
- }
84
- };
85
- const response = await this.httpClient.request({
86
- method: 'POST',
87
- path: '/api/mediums/card',
88
- body: request
89
- });
90
- const account = response.result.account;
91
- return {
92
- urn: account.urn,
93
- id: account.id,
94
- lastFour: account.details.card_last_four,
95
- productType: account.details.card_product_type,
96
- status: account.status,
97
- cardType: account.details.card_type,
98
- detailsUrl: account.details.card_url_details,
99
- ownerUrn: account.owner_urn,
100
- webhookUrl: account.webhook_url,
101
- metadata: account.metadata,
102
- createdAt: account.created_at,
103
- updatedAt: account.updated_at
104
- };
105
- }
106
- }
107
- class AccountsClient {
108
- httpClient;
109
- bancolombia;
110
- card;
111
- constructor(httpClient){
112
- this.httpClient = httpClient;
113
- this.bancolombia = new BancolombiaClient(this.httpClient);
114
- this.card = new CardClient(this.httpClient);
115
- }
116
- }
117
- exports.AccountsClient = __webpack_exports__.AccountsClient;
118
- exports.BancolombiaClient = __webpack_exports__.BancolombiaClient;
119
- exports.CardClient = __webpack_exports__.CardClient;
120
- for(var __rspack_i in __webpack_exports__)if (-1 === [
121
- "AccountsClient",
122
- "BancolombiaClient",
123
- "CardClient"
124
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
125
- Object.defineProperty(exports, '__esModule', {
126
- value: true
127
- });
1
+ "use strict";const __rslib_import_meta_url__="u"<typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AccountsClient:()=>AccountsClient,CardClient:()=>CardClient,BancolombiaClient:()=>BancolombiaClient});class BancolombiaClient{httpClient;constructor(e){this.httpClient=e}async create(e){let t={holder_urn:e.urn,input:{},metadata:{source:"sdk-typescript",name:e.name,card_urn:e.cardUrn,...e.metadata}},r=(await this.httpClient.request({method:"POST",path:"/api/mediums/bancolombia",body:t})).result.account;return{urn:r.urn,id:r.id,referenceCode:r.details.reference_code,status:r.status,ownerUrn:r.owner_urn,webhookUrl:r.webhook_url,metadata:r.metadata,createdAt:r.created_at,updatedAt:r.updated_at}}}class CardClient{httpClient;constructor(e){this.httpClient=e}async create(e){let t={holder_urn:e.urn,input:{create:{card_type:"VIRTUAL"}},metadata:{source:"sdk-typescript",name:e.name,...e.metadata}},r=(await this.httpClient.request({method:"POST",path:"/api/mediums/card",body:t})).result.account;return{urn:r.urn,id:r.id,lastFour:r.details.card_last_four,productType:r.details.card_product_type,status:r.status,cardType:r.details.card_type,detailsUrl:r.details.card_url_details,ownerUrn:r.owner_urn,webhookUrl:r.webhook_url,metadata:r.metadata,createdAt:r.created_at,updatedAt:r.updated_at}}}class AccountsClient{httpClient;bancolombia;card;constructor(e){this.httpClient=e,this.bancolombia=new BancolombiaClient(this.httpClient),this.card=new CardClient(this.httpClient)}}for(var __rspack_i in exports.AccountsClient=__webpack_exports__.AccountsClient,exports.BancolombiaClient=__webpack_exports__.BancolombiaClient,exports.CardClient=__webpack_exports__.CardClient,__webpack_exports__)-1===["AccountsClient","BancolombiaClient","CardClient"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
package/dist/index.js CHANGED
@@ -1,87 +1 @@
1
- class BancolombiaClient {
2
- httpClient;
3
- constructor(httpClient){
4
- this.httpClient = httpClient;
5
- }
6
- async create(params) {
7
- const request = {
8
- holder_urn: params.urn,
9
- input: {},
10
- metadata: {
11
- source: "sdk-typescript",
12
- name: params.name,
13
- card_urn: params.cardUrn,
14
- ...params.metadata
15
- }
16
- };
17
- const response = await this.httpClient.request({
18
- method: 'POST',
19
- path: '/api/mediums/bancolombia',
20
- body: request
21
- });
22
- const account = response.result.account;
23
- return {
24
- urn: account.urn,
25
- id: account.id,
26
- referenceCode: account.details.reference_code,
27
- status: account.status,
28
- ownerUrn: account.owner_urn,
29
- webhookUrl: account.webhook_url,
30
- metadata: account.metadata,
31
- createdAt: account.created_at,
32
- updatedAt: account.updated_at
33
- };
34
- }
35
- }
36
- class CardClient {
37
- httpClient;
38
- constructor(httpClient){
39
- this.httpClient = httpClient;
40
- }
41
- async create(params) {
42
- const request = {
43
- holder_urn: params.urn,
44
- input: {
45
- create: {
46
- card_type: 'VIRTUAL'
47
- }
48
- },
49
- metadata: {
50
- source: "sdk-typescript",
51
- name: params.name,
52
- ...params.metadata
53
- }
54
- };
55
- const response = await this.httpClient.request({
56
- method: 'POST',
57
- path: '/api/mediums/card',
58
- body: request
59
- });
60
- const account = response.result.account;
61
- return {
62
- urn: account.urn,
63
- id: account.id,
64
- lastFour: account.details.card_last_four,
65
- productType: account.details.card_product_type,
66
- status: account.status,
67
- cardType: account.details.card_type,
68
- detailsUrl: account.details.card_url_details,
69
- ownerUrn: account.owner_urn,
70
- webhookUrl: account.webhook_url,
71
- metadata: account.metadata,
72
- createdAt: account.created_at,
73
- updatedAt: account.updated_at
74
- };
75
- }
76
- }
77
- class AccountsClient {
78
- httpClient;
79
- bancolombia;
80
- card;
81
- constructor(httpClient){
82
- this.httpClient = httpClient;
83
- this.bancolombia = new BancolombiaClient(this.httpClient);
84
- this.card = new CardClient(this.httpClient);
85
- }
86
- }
87
- export { AccountsClient, BancolombiaClient, CardClient };
1
+ class t{httpClient;constructor(t){this.httpClient=t}async create(t){let e={holder_urn:t.urn,input:{},metadata:{source:"sdk-typescript",name:t.name,card_urn:t.cardUrn,...t.metadata}},a=(await this.httpClient.request({method:"POST",path:"/api/mediums/bancolombia",body:e})).result.account;return{urn:a.urn,id:a.id,referenceCode:a.details.reference_code,status:a.status,ownerUrn:a.owner_urn,webhookUrl:a.webhook_url,metadata:a.metadata,createdAt:a.created_at,updatedAt:a.updated_at}}}class e{httpClient;constructor(t){this.httpClient=t}async create(t){let e={holder_urn:t.urn,input:{create:{card_type:"VIRTUAL"}},metadata:{source:"sdk-typescript",name:t.name,...t.metadata}},a=(await this.httpClient.request({method:"POST",path:"/api/mediums/card",body:e})).result.account;return{urn:a.urn,id:a.id,lastFour:a.details.card_last_four,productType:a.details.card_product_type,status:a.status,cardType:a.details.card_type,detailsUrl:a.details.card_url_details,ownerUrn:a.owner_urn,webhookUrl:a.webhook_url,metadata:a.metadata,createdAt:a.created_at,updatedAt:a.updated_at}}}class a{httpClient;bancolombia;card;constructor(a){this.httpClient=a,this.bancolombia=new t(this.httpClient),this.card=new e(this.httpClient)}}export{a as AccountsClient,t as BancolombiaClient,e as CardClient};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloque/sdk-accounts",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "bloque",
@@ -35,21 +35,7 @@
35
35
  "engines": {
36
36
  "node": ">=22"
37
37
  },
38
- "scripts": {
39
- "release": "bun publish --provenance",
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
38
  "dependencies": {
47
- "@bloque/sdk-core": "0.0.15"
48
- },
49
- "devDependencies": {
50
- "@rslib/core": "^0.18.4",
51
- "@types/node": "^24.10.1",
52
- "@typescript/native-preview": "latest",
53
- "typescript": "^5.9.3"
39
+ "@bloque/sdk-core": "0.0.16"
54
40
  }
55
- }
41
+ }