@bloque/sdk-accounts 0.0.16 → 0.0.17

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.
@@ -3,6 +3,7 @@ interface Account<TDetails = unknown> {
3
3
  urn: string;
4
4
  medium: 'bancolombia' | 'card';
5
5
  details: TDetails;
6
+ ledger_account_id: string;
6
7
  status: 'active' | 'disabled' | 'frozen' | 'deleted' | 'creation_in_progress' | 'creation_failed';
7
8
  owner_urn: string;
8
9
  created_at: string;
@@ -15,6 +15,10 @@ export interface CreateBancolombiaAccountParams {
15
15
  * @example "did:bloque:card:123e4567"
16
16
  */
17
17
  cardUrn?: string;
18
+ /**
19
+ * Webhook URL to receive account events
20
+ */
21
+ webhookUrl?: string;
18
22
  /**
19
23
  * Custom metadata to attach to the Bancolombia account
20
24
  */
@@ -44,6 +48,10 @@ export interface BancolombiaAccount {
44
48
  * Owner URN
45
49
  */
46
50
  ownerUrn: string;
51
+ /**
52
+ * Ledger account ID associated with the card
53
+ */
54
+ ledgerId: string;
47
55
  /**
48
56
  * Webhook URL (if configured)
49
57
  */
@@ -10,6 +10,10 @@ export interface CreateCardParams {
10
10
  * Display name for the card
11
11
  */
12
12
  name?: string;
13
+ /**
14
+ * Webhook URL to receive card events
15
+ */
16
+ webhookUrl?: string;
13
17
  /**
14
18
  * Custom metadata to associate with the card
15
19
  */
@@ -48,6 +52,10 @@ export interface CardAccount {
48
52
  * Owner URN
49
53
  */
50
54
  ownerUrn: string;
55
+ /**
56
+ * Ledger account ID associated with the card
57
+ */
58
+ ledgerId: string;
51
59
  /**
52
60
  * Webhook URL (if configured)
53
61
  */
package/dist/index.cjs CHANGED
@@ -1 +1 @@
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});
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,webhook_url:e.webhookUrl,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,ledgerId:r.ledger_account_id,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,webhook_url:e.webhookUrl,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,ledgerId:r.ledger_account_id,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 +1 @@
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};
1
+ class t{httpClient;constructor(t){this.httpClient=t}async create(t){let e={holder_urn:t.urn,webhook_url:t.webhookUrl,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,ledgerId:a.ledger_account_id,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,webhook_url:t.webhookUrl,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,ledgerId:a.ledger_account_id,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.16",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "bloque",
@@ -36,6 +36,6 @@
36
36
  "node": ">=22"
37
37
  },
38
38
  "dependencies": {
39
- "@bloque/sdk-core": "0.0.16"
39
+ "@bloque/sdk-core": "0.0.17"
40
40
  }
41
41
  }