@bloque/sdk-identity 0.0.23 → 0.0.25
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/types.d.ts +1 -1
- package/dist/{client.d.ts → identity-client.d.ts} +2 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/{api-types.d.ts → internal/wire-types.d.ts} +79 -94
- package/dist/origins/{client.d.ts → origins-client.d.ts} +3 -3
- package/dist/types.d.ts +1 -3
- package/package.json +2 -2
- /package/dist/aliases/{client.d.ts → aliases-client.d.ts} +0 -0
- /package/dist/origins/{origin.d.ts → origin-client.d.ts} +0 -0
package/dist/aliases/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AliasResponse } from '../
|
|
1
|
+
import type { AliasResponse } from '../internal/wire-types';
|
|
2
2
|
export type Alias = AliasResponse;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { HttpClient } from '@bloque/sdk-core';
|
|
2
|
-
import { AliasesClient } from './aliases/client';
|
|
3
|
-
import { OriginsClient } from './origins/client';
|
|
4
|
-
import type { CreateIdentityParams } from './types';
|
|
2
|
+
import { AliasesClient } from './aliases/aliases-client';
|
|
3
|
+
import { OriginsClient } from './origins/origins-client';
|
|
5
4
|
export declare class IdentityClient {
|
|
6
5
|
private readonly httpClient;
|
|
7
6
|
readonly aliases: AliasesClient;
|
|
8
7
|
readonly origins: OriginsClient;
|
|
9
8
|
constructor(httpClient: HttpClient);
|
|
10
|
-
create(params: CreateIdentityParams): Promise<import(".").RegisterResult>;
|
|
11
9
|
}
|
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__,{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}`})}}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){let
|
|
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__,{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}`})}}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 r,n=i.assertionResult,a="API_KEY"===n.challengeType?{alias:n.alias,challengeType:"API_KEY",value:{api_key:n.value.apiKey,alias:e},originalChallengeParams:n.originalChallengeParams}:{alias:e,challengeType:n.challengeType,value:n.value,originalChallengeParams:n.originalChallengeParams};return r="individual"===i.type?{assertion_result:a,extra_context:i.extraContext,type:"individual",profile:this._mapUserProfile(i.profile)}:{assertion_result:a,extra_context:i.extraContext,type:"business",profile:this._mapBusinessProfile(i.profile)},{accessToken:(await this.httpClient.request({method:"POST",path:`/api/origins/${t}/register`,body:r})).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;origins;constructor(e){this.httpClient=e,this.aliases=new AliasesClient(this.httpClient),this.origins=new OriginsClient(this.httpClient)}}for(var __rspack_i in exports.AliasesClient=__webpack_exports__.AliasesClient,exports.IdentityClient=__webpack_exports__.IdentityClient,exports.OriginClient=__webpack_exports__.OriginClient,exports.OriginsClient=__webpack_exports__.OriginsClient,__webpack_exports__)-1===["AliasesClient","IdentityClient","OriginClient","OriginsClient"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './aliases/client';
|
|
1
|
+
export * from './aliases/aliases-client';
|
|
2
2
|
export * from './aliases/types';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './client';
|
|
5
|
-
export * from './origins/client';
|
|
6
|
-
export * from './origins/origin';
|
|
3
|
+
export * from './identity-client';
|
|
4
|
+
export * from './origins/origin-client';
|
|
5
|
+
export * from './origins/origins-client';
|
|
7
6
|
export * from './origins/types';
|
|
7
|
+
export * from './types';
|
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}`})}}class a 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 i extends e{whatsapp;email;constructor(e){super(e),this.whatsapp=new a(e,"bloque-whatsapp"),this.email=new a(e,"bloque-email")}custom(e){return new a(this.httpClient,e)}async list(){return await this.httpClient.request({method:"GET",path:"/api/origins"})}async register(e,t){let
|
|
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}`})}}class a 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 i extends e{whatsapp;email;constructor(e){super(e),this.whatsapp=new a(e,"bloque-whatsapp"),this.email=new a(e,"bloque-email")}custom(e){return new a(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 s{httpClient;aliases;origins;constructor(e){this.httpClient=e,this.aliases=new t(this.httpClient),this.origins=new i(this.httpClient)}}export{t as AliasesClient,s as IdentityClient,a as OriginClient,i as OriginsClient};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Wire types for Identity API communication (snake_case format)
|
|
4
|
+
* These types represent the raw API request/response format
|
|
5
|
+
* and should not be used directly by SDK consumers.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* Alias response from API
|
|
10
|
+
*/
|
|
1
11
|
export type AliasResponse = {
|
|
2
12
|
id: string;
|
|
3
13
|
alias: string;
|
|
@@ -17,6 +27,10 @@ export type AliasResponse = {
|
|
|
17
27
|
created_at: string;
|
|
18
28
|
updated_at: string;
|
|
19
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
* Base OTP structure
|
|
33
|
+
*/
|
|
20
34
|
interface OTPBase {
|
|
21
35
|
type: 'OTP';
|
|
22
36
|
params: {
|
|
@@ -26,51 +40,61 @@ interface OTPBase {
|
|
|
26
40
|
expires_at: number;
|
|
27
41
|
};
|
|
28
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* OTP assertion for email
|
|
46
|
+
*/
|
|
29
47
|
export interface OTPAssertionEmail extends OTPBase {
|
|
30
48
|
value: OTPBase['value'] & {
|
|
31
49
|
email: string;
|
|
32
50
|
};
|
|
33
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* OTP assertion for WhatsApp
|
|
55
|
+
*/
|
|
34
56
|
export interface OTPAssertionWhatsApp extends OTPBase {
|
|
35
57
|
value: OTPBase['value'] & {
|
|
36
58
|
phone: string;
|
|
37
59
|
};
|
|
38
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* Combined OTP assertion type
|
|
64
|
+
*/
|
|
39
65
|
export type OTPAssertion = OTPAssertionEmail | OTPAssertionWhatsApp;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* Origin from API
|
|
69
|
+
*/
|
|
40
70
|
export interface Origin {
|
|
41
|
-
/**
|
|
42
|
-
* Unique namespace identifier for the origin
|
|
43
|
-
*/
|
|
44
71
|
namespace: string;
|
|
45
|
-
/**
|
|
46
|
-
* Provider type (e.g., 'evm', 'auth0', 'whatsapp', 'email', 'api-key')
|
|
47
|
-
*/
|
|
48
72
|
provider: ' evm' | 'auth0' | 'whatsapp' | 'email' | 'api-key';
|
|
49
|
-
/**
|
|
50
|
-
* Current status of the origin
|
|
51
|
-
*/
|
|
52
73
|
status: 'active' | 'inactive' | 'disabled';
|
|
53
|
-
/**
|
|
54
|
-
* Additional metadata about the origin
|
|
55
|
-
*/
|
|
56
74
|
metadata: Record<string, unknown>;
|
|
57
|
-
/**
|
|
58
|
-
* Creation timestamp (ISO 8601)
|
|
59
|
-
*/
|
|
60
75
|
created_at: string;
|
|
61
|
-
/**
|
|
62
|
-
* Last update timestamp (ISO 8601)
|
|
63
|
-
*/
|
|
64
76
|
updated_at: string;
|
|
65
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* Signing challenge value
|
|
81
|
+
*/
|
|
66
82
|
type SigningChallengeValue = {
|
|
67
83
|
signature: string;
|
|
68
84
|
alias: string;
|
|
69
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
* API key value
|
|
89
|
+
*/
|
|
70
90
|
type ApiKeyValue = {
|
|
71
91
|
api_key: string;
|
|
72
92
|
alias: string;
|
|
73
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* Base assertion structure
|
|
97
|
+
*/
|
|
74
98
|
type BaseAssertion<TType extends string, TValue> = {
|
|
75
99
|
alias: string;
|
|
76
100
|
challengeType: TType;
|
|
@@ -80,15 +104,28 @@ type BaseAssertion<TType extends string, TValue> = {
|
|
|
80
104
|
timestamp: number;
|
|
81
105
|
};
|
|
82
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
* API key assertion
|
|
110
|
+
*/
|
|
83
111
|
type ApiKeyAssertion = BaseAssertion<'API_KEY', ApiKeyValue>;
|
|
112
|
+
/**
|
|
113
|
+
* @internal
|
|
114
|
+
* Interactive assertion (signing, oauth, webauthn, etc.)
|
|
115
|
+
*/
|
|
84
116
|
type InteractiveAssertion = BaseAssertion<'REDIRECT' | 'OAUTH_REDIRECT' | 'SIGNING_CHALLENGE' | 'WEBAUTHN' | 'OTP' | 'PASSWORD', SigningChallengeValue>;
|
|
85
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
* Combined assertion result type
|
|
120
|
+
*/
|
|
121
|
+
export type AssertionResult = ApiKeyAssertion | InteractiveAssertion;
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* User profile for registration (snake_case API format)
|
|
125
|
+
*/
|
|
86
126
|
export type UserProfile = {
|
|
87
127
|
first_name?: string;
|
|
88
128
|
last_name?: string;
|
|
89
|
-
/**
|
|
90
|
-
* ISO 8601 formatted date string (YYYY-MM-DD)
|
|
91
|
-
*/
|
|
92
129
|
birthdate?: string;
|
|
93
130
|
email?: string;
|
|
94
131
|
phone?: string;
|
|
@@ -104,117 +141,65 @@ export type UserProfile = {
|
|
|
104
141
|
personal_id_type?: string;
|
|
105
142
|
personal_id_number?: string;
|
|
106
143
|
};
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
* Business profile for registration (snake_case API format)
|
|
147
|
+
*/
|
|
107
148
|
export type BusinessProfile = {
|
|
108
|
-
/**
|
|
109
|
-
* Primary business address (street address)
|
|
110
|
-
*/
|
|
111
149
|
address_line1: string;
|
|
112
|
-
/**
|
|
113
|
-
* City where business is registered
|
|
114
|
-
*/
|
|
115
150
|
city: string;
|
|
116
|
-
/**
|
|
117
|
-
* Country of incorporation (full name)
|
|
118
|
-
*/
|
|
119
151
|
country: string;
|
|
120
|
-
/**
|
|
121
|
-
* Date of incorporation or registration (YYYY-MM-DD format)
|
|
122
|
-
*/
|
|
123
152
|
incorporation_date: string;
|
|
124
|
-
/**
|
|
125
|
-
* Official registered legal name of the business
|
|
126
|
-
*/
|
|
127
153
|
legal_name: string;
|
|
128
|
-
/**
|
|
129
|
-
* Business trading name or DBA (Doing Business As)
|
|
130
|
-
*/
|
|
131
154
|
name: string;
|
|
132
|
-
/**
|
|
133
|
-
* Postal or ZIP code
|
|
134
|
-
*/
|
|
135
155
|
postal_code: string;
|
|
136
|
-
/**
|
|
137
|
-
* State, province, or region of registration
|
|
138
|
-
*/
|
|
139
156
|
state: string;
|
|
140
|
-
/**
|
|
141
|
-
* Tax identification number (EIN, VAT, RFC, etc.)
|
|
142
|
-
*/
|
|
143
157
|
tax_id: string;
|
|
144
|
-
/**
|
|
145
|
-
* Business legal structure type (LLC, Corporation, Partnership, etc.)
|
|
146
|
-
*/
|
|
147
158
|
type: string;
|
|
148
|
-
/**
|
|
149
|
-
* Secondary address line (suite, floor, etc.)
|
|
150
|
-
*/
|
|
151
159
|
address_line2?: string;
|
|
152
|
-
/**
|
|
153
|
-
* ISO country code (2 or 3 letters)
|
|
154
|
-
*/
|
|
155
160
|
country_code?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Business contact email
|
|
158
|
-
*/
|
|
159
161
|
email?: string;
|
|
160
|
-
/**
|
|
161
|
-
* URL to business logo image
|
|
162
|
-
*/
|
|
163
162
|
logo?: string;
|
|
164
|
-
/**
|
|
165
|
-
* Owner's primary address
|
|
166
|
-
*/
|
|
167
163
|
owner_address_line1?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Owner's secondary address line
|
|
170
|
-
*/
|
|
171
164
|
owner_address_line2?: string;
|
|
172
|
-
/**
|
|
173
|
-
* Owner's city of residence
|
|
174
|
-
*/
|
|
175
165
|
owner_city?: string;
|
|
176
|
-
/**
|
|
177
|
-
* Owner's country code
|
|
178
|
-
*/
|
|
179
166
|
owner_country_code?: string;
|
|
180
|
-
/**
|
|
181
|
-
* Owner's identification number
|
|
182
|
-
*/
|
|
183
167
|
owner_id_number?: string;
|
|
184
|
-
/**
|
|
185
|
-
* Type of identification document for owner
|
|
186
|
-
*/
|
|
187
168
|
owner_id_type?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Full name of the beneficial owner or primary representative
|
|
190
|
-
*/
|
|
191
169
|
owner_name?: string;
|
|
192
|
-
/**
|
|
193
|
-
* Owner's postal code
|
|
194
|
-
*/
|
|
195
170
|
owner_postal_code?: string;
|
|
196
|
-
/**
|
|
197
|
-
* Owner's state or province
|
|
198
|
-
*/
|
|
199
171
|
owner_state?: string;
|
|
200
|
-
/**
|
|
201
|
-
* Business contact phone number
|
|
202
|
-
*/
|
|
203
172
|
phone?: string;
|
|
204
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* @internal
|
|
176
|
+
* Individual registration request
|
|
177
|
+
*/
|
|
205
178
|
export type IndividualRegisterRequest = {
|
|
206
179
|
assertion_result: AssertionResult;
|
|
207
180
|
extra_context?: Record<string, unknown>;
|
|
208
181
|
type: 'individual';
|
|
209
182
|
profile: UserProfile;
|
|
210
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* @internal
|
|
186
|
+
* Business registration request
|
|
187
|
+
*/
|
|
211
188
|
export type BusinessRegisterRequest = {
|
|
212
189
|
assertion_result: AssertionResult;
|
|
213
190
|
extra_context?: Record<string, unknown>;
|
|
214
191
|
type: 'business';
|
|
215
192
|
profile: BusinessProfile;
|
|
216
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* @internal
|
|
196
|
+
* Combined registration request type
|
|
197
|
+
*/
|
|
217
198
|
export type RegisterRequest = IndividualRegisterRequest | BusinessRegisterRequest;
|
|
199
|
+
/**
|
|
200
|
+
* @internal
|
|
201
|
+
* Registration response from API
|
|
202
|
+
*/
|
|
218
203
|
export interface RegisterResponse {
|
|
219
204
|
result: {
|
|
220
205
|
access_token: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpClient } from '@bloque/sdk-core';
|
|
2
2
|
import { BaseClient } from '@bloque/sdk-core';
|
|
3
|
-
import type { Origin, OTPAssertion, OTPAssertionEmail, OTPAssertionWhatsApp } from '../
|
|
4
|
-
import { OriginClient } from './origin';
|
|
3
|
+
import type { Origin, OTPAssertion, OTPAssertionEmail, OTPAssertionWhatsApp } from '../internal/wire-types';
|
|
4
|
+
import { OriginClient } from './origin-client';
|
|
5
5
|
import type { RegisterParams, RegisterResult } from './types';
|
|
6
6
|
export declare class OriginsClient extends BaseClient {
|
|
7
7
|
readonly whatsapp: OriginClient<OTPAssertionWhatsApp>;
|
|
@@ -114,7 +114,7 @@ export declare class OriginsClient extends BaseClient {
|
|
|
114
114
|
* console.log(business.accessToken); // JWT token for business
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
register(origin: string, params: RegisterParams): Promise<RegisterResult>;
|
|
117
|
+
register(alias: string, origin: string, params: RegisterParams): Promise<RegisterResult>;
|
|
118
118
|
private _mapUserProfile;
|
|
119
119
|
private _mapBusinessProfile;
|
|
120
120
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import type { BusinessRegisterParams, IndividualRegisterParams } from './origins/types';
|
|
2
|
-
export type CreateIdentityParams =
|
|
3
|
-
alias: string;
|
|
4
|
-
};
|
|
2
|
+
export type CreateIdentityParams = Pick<IndividualRegisterParams, 'extraContext' | 'type' | 'profile'> | Pick<BusinessRegisterParams, 'extraContext' | 'type' | 'profile'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloque/sdk-identity",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
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.0.
|
|
37
|
+
"@bloque/sdk-core": "0.0.25"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
File without changes
|
|
File without changes
|