@bloque/sdk-identity 0.2.3 → 0.2.4
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/aliases/aliases-client.d.ts +25 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import { BaseClient } from '@bloque/sdk-core';
|
|
2
2
|
import type { Alias } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Client for public alias lookup operations.
|
|
5
|
+
*
|
|
6
|
+
* Use this client to resolve a Bloque alias such as an email or phone number
|
|
7
|
+
* into its public alias record.
|
|
8
|
+
*
|
|
9
|
+
* The `alias` query parameter is URL-encoded internally by the SDK before the
|
|
10
|
+
* request is sent. Callers must pass the raw alias string and should not apply
|
|
11
|
+
* `encodeURIComponent()` themselves, otherwise the alias will be double-encoded.
|
|
12
|
+
*/
|
|
3
13
|
export declare class AliasesClient extends BaseClient {
|
|
14
|
+
/**
|
|
15
|
+
* Look up a public alias by its raw alias value.
|
|
16
|
+
*
|
|
17
|
+
* The SDK URL-encodes the alias internally, so inputs like
|
|
18
|
+
* `nestor+2@bloque.team` are handled correctly without
|
|
19
|
+
* any preprocessing by the caller.
|
|
20
|
+
*
|
|
21
|
+
* @param alias - Raw alias value. Do not pass a pre-encoded string.
|
|
22
|
+
* @returns The matching public alias record.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const alias = await bloque.identity.aliases.get('nestor+2@bloque.team');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
4
29
|
get(alias: string): Promise<Alias>;
|
|
5
30
|
}
|
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 i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__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__,{ApiKeysClient:()=>ApiKeysClient,OriginClient:()=>OriginClient,AliasesClient:()=>AliasesClient,IdentityClient:()=>IdentityClient,OriginsClient:()=>OriginsClient});const sdk_core_namespaceObject=require("@bloque/sdk-core");class AliasesClient extends sdk_core_namespaceObject.BaseClient{async get(e){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${e}`})}}function mapApiKeyWire(e){return{id:e.id,keyId:e.key_id,publishableKey:e.publishable_key,name:e.name,scopes:e.scopes,domains:e.domains,status:e.status,expiration:e.expiration,metadata:e.metadata,lastUsedAt:e.last_used_at,createdAt:e.created_at}}class ApiKeysClient extends sdk_core_namespaceObject.BaseClient{async create(e){let t={name:e.name,scopes:e.scopes,domains:e.domains,expiration:e.expiration,metadata:e.metadata},i=await this.httpClient.request({method:"POST",path:"/api/api-keys",body:t});return{keyId:i.key_id,secretKey:i.secret_key,publishableKey:i.publishable_key}}async list(){return(await this.httpClient.request({method:"GET",path:"/api/api-keys"})).map(mapApiKeyWire)}async get(e){return mapApiKeyWire(await this.httpClient.request({method:"GET",path:`/api/api-keys/${e}`}))}async exchange(e){let t=await this.httpClient.request({method:"POST",path:"/api/api-keys/exchange",body:{key:e.key,scopes:e.scopes}});return{accessToken:t.access_token,expiresIn:t.expires_in,tokenType:t.token_type}}async revoke(e){await this.httpClient.request({method:"DELETE",path:`/api/api-keys/${e}`})}async rotate(e){return{secretKey:(await this.httpClient.request({method:"POST",path:`/api/api-keys/${e}/rotate`})).secret_key}}}class OriginClient extends sdk_core_namespaceObject.BaseClient{origin;constructor(e,t){super(e),this.origin=t}async assert(e){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${e}`})}}class OriginsClient extends sdk_core_namespaceObject.BaseClient{whatsapp;email;constructor(e){super(e),this.whatsapp=new OriginClient(e,"bloque-whatsapp"),this.email=new OriginClient(e,"bloque-email")}custom(e){return new OriginClient(this.httpClient,e)}async list(){return await this.httpClient.request({method:"GET",path:"/api/origins"})}async register(e,t,i){let a,s=i.assertionResult,n="API_KEY"===s.challengeType?{alias:s.alias,challengeType:"API_KEY",value:{api_key:s.value.apiKey,alias:e},originalChallengeParams:s.originalChallengeParams}:{alias:e,challengeType:s.challengeType,value:s.value,originalChallengeParams:s.originalChallengeParams};return a="individual"===i.type?{assertion_result:n,extra_context:i.extraContext,type:"individual",profile:this._mapUserProfile(i.profile)}:{assertion_result:n,extra_context:i.extraContext,type:"business",profile:this._mapBusinessProfile(i.profile)},{accessToken:(await this.httpClient.request({method:"POST",path:`/api/origins/${t}/register`,body:a})).result.access_token}}_mapUserProfile(e){return{first_name:e.firstName,last_name:e.lastName,birthdate:e.birthdate,email:e.email,phone:e.phone,gender:e.gender,address_line1:e.addressLine1,address_line2:e.addressLine2,city:e.city,state:e.state,postal_code:e.postalCode,neighborhood:e.neighborhood,country_of_birth_code:e.countryOfBirthCode,country_of_residence_code:e.countryOfResidenceCode,personal_id_type:e.personalIdType,personal_id_number:e.personalIdNumber}}_mapBusinessProfile(e){return{address_line1:e.addressLine1,city:e.city,country:e.country,incorporation_date:e.incorporationDate,legal_name:e.legalName,name:e.name,postal_code:e.postalCode,state:e.state,tax_id:e.taxId,type:e.type,address_line2:e.addressLine2,country_code:e.countryCode,email:e.email,logo:e.logo,owner_address_line1:e.ownerAddressLine1,owner_address_line2:e.ownerAddressLine2,owner_city:e.ownerCity,owner_country_code:e.ownerCountryCode,owner_id_number:e.ownerIdNumber,owner_id_type:e.ownerIdType,owner_name:e.ownerName,owner_postal_code:e.ownerPostalCode,owner_state:e.ownerState,phone:e.phone}}}class IdentityClient{httpClient;aliases;apiKeys;origins;constructor(e){this.httpClient=e,this.aliases=new AliasesClient(this.httpClient),this.apiKeys=new ApiKeysClient(this.httpClient),this.origins=new OriginsClient(this.httpClient)}async me(){return await this.httpClient.request({method:"GET",path:"/api/identities/me"})}async updateMe(e){return(await this.httpClient.request({method:"PATCH",path:"/api/identities/me",body:e})).result.identity}async myAliases(){return await this.httpClient.request({method:"GET",path:"/api/identities/me/aliases"})}async get(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}`})}async update(e,t){return(await this.httpClient.request({method:"PATCH",path:`/api/identities/${e}`,body:t})).result.identity}async getAliases(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}/aliases`})}}for(var __rspack_i in exports.AliasesClient=__webpack_exports__.AliasesClient,exports.ApiKeysClient=__webpack_exports__.ApiKeysClient,exports.IdentityClient=__webpack_exports__.IdentityClient,exports.OriginClient=__webpack_exports__.OriginClient,exports.OriginsClient=__webpack_exports__.OriginsClient,__webpack_exports__)-1===["AliasesClient","ApiKeysClient","IdentityClient","OriginClient","OriginsClient"].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 i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__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__,{ApiKeysClient:()=>ApiKeysClient,OriginClient:()=>OriginClient,AliasesClient:()=>AliasesClient,IdentityClient:()=>IdentityClient,OriginsClient:()=>OriginsClient});const sdk_core_namespaceObject=require("@bloque/sdk-core");class AliasesClient extends sdk_core_namespaceObject.BaseClient{async get(e){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${encodeURIComponent(e)}`})}}function mapApiKeyWire(e){return{id:e.id,keyId:e.key_id,publishableKey:e.publishable_key,name:e.name,scopes:e.scopes,domains:e.domains,status:e.status,expiration:e.expiration,metadata:e.metadata,lastUsedAt:e.last_used_at,createdAt:e.created_at}}class ApiKeysClient extends sdk_core_namespaceObject.BaseClient{async create(e){let t={name:e.name,scopes:e.scopes,domains:e.domains,expiration:e.expiration,metadata:e.metadata},i=await this.httpClient.request({method:"POST",path:"/api/api-keys",body:t});return{keyId:i.key_id,secretKey:i.secret_key,publishableKey:i.publishable_key}}async list(){return(await this.httpClient.request({method:"GET",path:"/api/api-keys"})).map(mapApiKeyWire)}async get(e){return mapApiKeyWire(await this.httpClient.request({method:"GET",path:`/api/api-keys/${e}`}))}async exchange(e){let t=await this.httpClient.request({method:"POST",path:"/api/api-keys/exchange",body:{key:e.key,scopes:e.scopes}});return{accessToken:t.access_token,expiresIn:t.expires_in,tokenType:t.token_type}}async revoke(e){await this.httpClient.request({method:"DELETE",path:`/api/api-keys/${e}`})}async rotate(e){return{secretKey:(await this.httpClient.request({method:"POST",path:`/api/api-keys/${e}/rotate`})).secret_key}}}class OriginClient extends sdk_core_namespaceObject.BaseClient{origin;constructor(e,t){super(e),this.origin=t}async assert(e){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${e}`})}}class OriginsClient extends sdk_core_namespaceObject.BaseClient{whatsapp;email;constructor(e){super(e),this.whatsapp=new OriginClient(e,"bloque-whatsapp"),this.email=new OriginClient(e,"bloque-email")}custom(e){return new OriginClient(this.httpClient,e)}async list(){return await this.httpClient.request({method:"GET",path:"/api/origins"})}async register(e,t,i){let a,s=i.assertionResult,n="API_KEY"===s.challengeType?{alias:s.alias,challengeType:"API_KEY",value:{api_key:s.value.apiKey,alias:e},originalChallengeParams:s.originalChallengeParams}:{alias:e,challengeType:s.challengeType,value:s.value,originalChallengeParams:s.originalChallengeParams};return a="individual"===i.type?{assertion_result:n,extra_context:i.extraContext,type:"individual",profile:this._mapUserProfile(i.profile)}:{assertion_result:n,extra_context:i.extraContext,type:"business",profile:this._mapBusinessProfile(i.profile)},{accessToken:(await this.httpClient.request({method:"POST",path:`/api/origins/${t}/register`,body:a})).result.access_token}}_mapUserProfile(e){return{first_name:e.firstName,last_name:e.lastName,birthdate:e.birthdate,email:e.email,phone:e.phone,gender:e.gender,address_line1:e.addressLine1,address_line2:e.addressLine2,city:e.city,state:e.state,postal_code:e.postalCode,neighborhood:e.neighborhood,country_of_birth_code:e.countryOfBirthCode,country_of_residence_code:e.countryOfResidenceCode,personal_id_type:e.personalIdType,personal_id_number:e.personalIdNumber}}_mapBusinessProfile(e){return{address_line1:e.addressLine1,city:e.city,country:e.country,incorporation_date:e.incorporationDate,legal_name:e.legalName,name:e.name,postal_code:e.postalCode,state:e.state,tax_id:e.taxId,type:e.type,address_line2:e.addressLine2,country_code:e.countryCode,email:e.email,logo:e.logo,owner_address_line1:e.ownerAddressLine1,owner_address_line2:e.ownerAddressLine2,owner_city:e.ownerCity,owner_country_code:e.ownerCountryCode,owner_id_number:e.ownerIdNumber,owner_id_type:e.ownerIdType,owner_name:e.ownerName,owner_postal_code:e.ownerPostalCode,owner_state:e.ownerState,phone:e.phone}}}class IdentityClient{httpClient;aliases;apiKeys;origins;constructor(e){this.httpClient=e,this.aliases=new AliasesClient(this.httpClient),this.apiKeys=new ApiKeysClient(this.httpClient),this.origins=new OriginsClient(this.httpClient)}async me(){return await this.httpClient.request({method:"GET",path:"/api/identities/me"})}async updateMe(e){return(await this.httpClient.request({method:"PATCH",path:"/api/identities/me",body:e})).result.identity}async myAliases(){return await this.httpClient.request({method:"GET",path:"/api/identities/me/aliases"})}async get(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}`})}async update(e,t){return(await this.httpClient.request({method:"PATCH",path:`/api/identities/${e}`,body:t})).result.identity}async getAliases(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}/aliases`})}}for(var __rspack_i in exports.AliasesClient=__webpack_exports__.AliasesClient,exports.ApiKeysClient=__webpack_exports__.ApiKeysClient,exports.IdentityClient=__webpack_exports__.IdentityClient,exports.OriginClient=__webpack_exports__.OriginClient,exports.OriginsClient=__webpack_exports__.OriginsClient,__webpack_exports__)-1===["AliasesClient","ApiKeysClient","IdentityClient","OriginClient","OriginsClient"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BaseClient as e}from"@bloque/sdk-core";class t extends e{async get(e){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${e}`})}}function a(e){return{id:e.id,keyId:e.key_id,publishableKey:e.publishable_key,name:e.name,scopes:e.scopes,domains:e.domains,status:e.status,expiration:e.expiration,metadata:e.metadata,lastUsedAt:e.last_used_at,createdAt:e.created_at}}class i extends e{async create(e){let t={name:e.name,scopes:e.scopes,domains:e.domains,expiration:e.expiration,metadata:e.metadata},a=await this.httpClient.request({method:"POST",path:"/api/api-keys",body:t});return{keyId:a.key_id,secretKey:a.secret_key,publishableKey:a.publishable_key}}async list(){return(await this.httpClient.request({method:"GET",path:"/api/api-keys"})).map(a)}async get(e){return a(await this.httpClient.request({method:"GET",path:`/api/api-keys/${e}`}))}async exchange(e){let t=await this.httpClient.request({method:"POST",path:"/api/api-keys/exchange",body:{key:e.key,scopes:e.scopes}});return{accessToken:t.access_token,expiresIn:t.expires_in,tokenType:t.token_type}}async revoke(e){await this.httpClient.request({method:"DELETE",path:`/api/api-keys/${e}`})}async rotate(e){return{secretKey:(await this.httpClient.request({method:"POST",path:`/api/api-keys/${e}/rotate`})).secret_key}}}class s extends e{origin;constructor(e,t){super(e),this.origin=t}async assert(e){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${e}`})}}class n extends e{whatsapp;email;constructor(e){super(e),this.whatsapp=new s(e,"bloque-whatsapp"),this.email=new s(e,"bloque-email")}custom(e){return new s(this.httpClient,e)}async list(){return await this.httpClient.request({method:"GET",path:"/api/origins"})}async register(e,t,a){let i,s=a.assertionResult,n="API_KEY"===s.challengeType?{alias:s.alias,challengeType:"API_KEY",value:{api_key:s.value.apiKey,alias:e},originalChallengeParams:s.originalChallengeParams}:{alias:e,challengeType:s.challengeType,value:s.value,originalChallengeParams:s.originalChallengeParams};return i="individual"===a.type?{assertion_result:n,extra_context:a.extraContext,type:"individual",profile:this._mapUserProfile(a.profile)}:{assertion_result:n,extra_context:a.extraContext,type:"business",profile:this._mapBusinessProfile(a.profile)},{accessToken:(await this.httpClient.request({method:"POST",path:`/api/origins/${t}/register`,body:i})).result.access_token}}_mapUserProfile(e){return{first_name:e.firstName,last_name:e.lastName,birthdate:e.birthdate,email:e.email,phone:e.phone,gender:e.gender,address_line1:e.addressLine1,address_line2:e.addressLine2,city:e.city,state:e.state,postal_code:e.postalCode,neighborhood:e.neighborhood,country_of_birth_code:e.countryOfBirthCode,country_of_residence_code:e.countryOfResidenceCode,personal_id_type:e.personalIdType,personal_id_number:e.personalIdNumber}}_mapBusinessProfile(e){return{address_line1:e.addressLine1,city:e.city,country:e.country,incorporation_date:e.incorporationDate,legal_name:e.legalName,name:e.name,postal_code:e.postalCode,state:e.state,tax_id:e.taxId,type:e.type,address_line2:e.addressLine2,country_code:e.countryCode,email:e.email,logo:e.logo,owner_address_line1:e.ownerAddressLine1,owner_address_line2:e.ownerAddressLine2,owner_city:e.ownerCity,owner_country_code:e.ownerCountryCode,owner_id_number:e.ownerIdNumber,owner_id_type:e.ownerIdType,owner_name:e.ownerName,owner_postal_code:e.ownerPostalCode,owner_state:e.ownerState,phone:e.phone}}}class r{httpClient;aliases;apiKeys;origins;constructor(e){this.httpClient=e,this.aliases=new t(this.httpClient),this.apiKeys=new i(this.httpClient),this.origins=new n(this.httpClient)}async me(){return await this.httpClient.request({method:"GET",path:"/api/identities/me"})}async updateMe(e){return(await this.httpClient.request({method:"PATCH",path:"/api/identities/me",body:e})).result.identity}async myAliases(){return await this.httpClient.request({method:"GET",path:"/api/identities/me/aliases"})}async get(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}`})}async update(e,t){return(await this.httpClient.request({method:"PATCH",path:`/api/identities/${e}`,body:t})).result.identity}async getAliases(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}/aliases`})}}export{t as AliasesClient,i as ApiKeysClient,r as IdentityClient,s as OriginClient,n as OriginsClient};
|
|
1
|
+
import{BaseClient as e}from"@bloque/sdk-core";class t extends e{async get(e){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${encodeURIComponent(e)}`})}}function a(e){return{id:e.id,keyId:e.key_id,publishableKey:e.publishable_key,name:e.name,scopes:e.scopes,domains:e.domains,status:e.status,expiration:e.expiration,metadata:e.metadata,lastUsedAt:e.last_used_at,createdAt:e.created_at}}class i extends e{async create(e){let t={name:e.name,scopes:e.scopes,domains:e.domains,expiration:e.expiration,metadata:e.metadata},a=await this.httpClient.request({method:"POST",path:"/api/api-keys",body:t});return{keyId:a.key_id,secretKey:a.secret_key,publishableKey:a.publishable_key}}async list(){return(await this.httpClient.request({method:"GET",path:"/api/api-keys"})).map(a)}async get(e){return a(await this.httpClient.request({method:"GET",path:`/api/api-keys/${e}`}))}async exchange(e){let t=await this.httpClient.request({method:"POST",path:"/api/api-keys/exchange",body:{key:e.key,scopes:e.scopes}});return{accessToken:t.access_token,expiresIn:t.expires_in,tokenType:t.token_type}}async revoke(e){await this.httpClient.request({method:"DELETE",path:`/api/api-keys/${e}`})}async rotate(e){return{secretKey:(await this.httpClient.request({method:"POST",path:`/api/api-keys/${e}/rotate`})).secret_key}}}class s extends e{origin;constructor(e,t){super(e),this.origin=t}async assert(e){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${e}`})}}class n extends e{whatsapp;email;constructor(e){super(e),this.whatsapp=new s(e,"bloque-whatsapp"),this.email=new s(e,"bloque-email")}custom(e){return new s(this.httpClient,e)}async list(){return await this.httpClient.request({method:"GET",path:"/api/origins"})}async register(e,t,a){let i,s=a.assertionResult,n="API_KEY"===s.challengeType?{alias:s.alias,challengeType:"API_KEY",value:{api_key:s.value.apiKey,alias:e},originalChallengeParams:s.originalChallengeParams}:{alias:e,challengeType:s.challengeType,value:s.value,originalChallengeParams:s.originalChallengeParams};return i="individual"===a.type?{assertion_result:n,extra_context:a.extraContext,type:"individual",profile:this._mapUserProfile(a.profile)}:{assertion_result:n,extra_context:a.extraContext,type:"business",profile:this._mapBusinessProfile(a.profile)},{accessToken:(await this.httpClient.request({method:"POST",path:`/api/origins/${t}/register`,body:i})).result.access_token}}_mapUserProfile(e){return{first_name:e.firstName,last_name:e.lastName,birthdate:e.birthdate,email:e.email,phone:e.phone,gender:e.gender,address_line1:e.addressLine1,address_line2:e.addressLine2,city:e.city,state:e.state,postal_code:e.postalCode,neighborhood:e.neighborhood,country_of_birth_code:e.countryOfBirthCode,country_of_residence_code:e.countryOfResidenceCode,personal_id_type:e.personalIdType,personal_id_number:e.personalIdNumber}}_mapBusinessProfile(e){return{address_line1:e.addressLine1,city:e.city,country:e.country,incorporation_date:e.incorporationDate,legal_name:e.legalName,name:e.name,postal_code:e.postalCode,state:e.state,tax_id:e.taxId,type:e.type,address_line2:e.addressLine2,country_code:e.countryCode,email:e.email,logo:e.logo,owner_address_line1:e.ownerAddressLine1,owner_address_line2:e.ownerAddressLine2,owner_city:e.ownerCity,owner_country_code:e.ownerCountryCode,owner_id_number:e.ownerIdNumber,owner_id_type:e.ownerIdType,owner_name:e.ownerName,owner_postal_code:e.ownerPostalCode,owner_state:e.ownerState,phone:e.phone}}}class r{httpClient;aliases;apiKeys;origins;constructor(e){this.httpClient=e,this.aliases=new t(this.httpClient),this.apiKeys=new i(this.httpClient),this.origins=new n(this.httpClient)}async me(){return await this.httpClient.request({method:"GET",path:"/api/identities/me"})}async updateMe(e){return(await this.httpClient.request({method:"PATCH",path:"/api/identities/me",body:e})).result.identity}async myAliases(){return await this.httpClient.request({method:"GET",path:"/api/identities/me/aliases"})}async get(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}`})}async update(e,t){return(await this.httpClient.request({method:"PATCH",path:`/api/identities/${e}`,body:t})).result.identity}async getAliases(e){return await this.httpClient.request({method:"GET",path:`/api/identities/${e}/aliases`})}}export{t as AliasesClient,i as ApiKeysClient,r as IdentityClient,s as OriginClient,n as OriginsClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloque/sdk-identity",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bloque",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"node": ">=22"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@bloque/sdk-core": "0.2.
|
|
37
|
+
"@bloque/sdk-core": "0.2.4"
|
|
38
38
|
}
|
|
39
39
|
}
|