@bloque/sdk-identity 0.0.10 → 0.0.11

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/client.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import type { HttpClient } from '@bloque/sdk-core';
2
2
  import { AliasesClient } from './aliases/client';
3
- import { OriginsClient } from './origins/client';
4
3
  export declare class IdentityClient {
5
4
  private readonly httpClient;
6
5
  readonly aliases: AliasesClient;
7
- readonly origins: OriginsClient;
8
6
  constructor(httpClient: HttpClient);
9
7
  }
package/dist/index.cjs CHANGED
@@ -24,10 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- OriginClient: ()=>OriginClient,
28
27
  AliasesClient: ()=>AliasesClient,
29
- IdentityClient: ()=>IdentityClient,
30
- OriginsClient: ()=>OriginsClient
28
+ IdentityClient: ()=>IdentityClient
31
29
  });
32
30
  class AliasesClient {
33
31
  httpClient;
@@ -42,52 +40,19 @@ class AliasesClient {
42
40
  return response;
43
41
  }
44
42
  }
45
- class OriginClient {
46
- httpClient;
47
- origin;
48
- constructor(httpClient, origin){
49
- this.httpClient = httpClient;
50
- this.origin = origin;
51
- }
52
- async assert(alias) {
53
- return await this.httpClient.request({
54
- method: 'GET',
55
- path: `/api/origins/${this.origin}/assert?alias=${alias}`
56
- });
57
- }
58
- }
59
- class OriginsClient {
60
- whatsapp;
61
- email;
62
- httpClient;
63
- constructor(httpClient){
64
- this.httpClient = httpClient;
65
- this.whatsapp = new OriginClient(httpClient, 'bloque-whatsapp');
66
- this.email = new OriginClient(httpClient, 'bloque-email');
67
- }
68
- custom(origin) {
69
- return new OriginClient(this.httpClient, origin);
70
- }
71
- }
72
43
  class IdentityClient {
73
44
  httpClient;
74
45
  aliases;
75
- origins;
76
46
  constructor(httpClient){
77
47
  this.httpClient = httpClient;
78
48
  this.aliases = new AliasesClient(this.httpClient);
79
- this.origins = new OriginsClient(this.httpClient);
80
49
  }
81
50
  }
82
51
  exports.AliasesClient = __webpack_exports__.AliasesClient;
83
52
  exports.IdentityClient = __webpack_exports__.IdentityClient;
84
- exports.OriginClient = __webpack_exports__.OriginClient;
85
- exports.OriginsClient = __webpack_exports__.OriginsClient;
86
53
  for(var __rspack_i in __webpack_exports__)if (-1 === [
87
54
  "AliasesClient",
88
- "IdentityClient",
89
- "OriginClient",
90
- "OriginsClient"
55
+ "IdentityClient"
91
56
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
92
57
  Object.defineProperty(exports, '__esModule', {
93
58
  value: true
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
1
  export * from './aliases/client';
2
2
  export * from './aliases/types';
3
- export * from './api-types';
4
3
  export * from './client';
5
- export * from './origins/client';
6
- export * from './origins/origin';
package/dist/index.js CHANGED
@@ -11,41 +11,12 @@ class AliasesClient {
11
11
  return response;
12
12
  }
13
13
  }
14
- class OriginClient {
15
- httpClient;
16
- origin;
17
- constructor(httpClient, origin){
18
- this.httpClient = httpClient;
19
- this.origin = origin;
20
- }
21
- async assert(alias) {
22
- return await this.httpClient.request({
23
- method: 'GET',
24
- path: `/api/origins/${this.origin}/assert?alias=${alias}`
25
- });
26
- }
27
- }
28
- class OriginsClient {
29
- whatsapp;
30
- email;
31
- httpClient;
32
- constructor(httpClient){
33
- this.httpClient = httpClient;
34
- this.whatsapp = new OriginClient(httpClient, 'bloque-whatsapp');
35
- this.email = new OriginClient(httpClient, 'bloque-email');
36
- }
37
- custom(origin) {
38
- return new OriginClient(this.httpClient, origin);
39
- }
40
- }
41
14
  class IdentityClient {
42
15
  httpClient;
43
16
  aliases;
44
- origins;
45
17
  constructor(httpClient){
46
18
  this.httpClient = httpClient;
47
19
  this.aliases = new AliasesClient(this.httpClient);
48
- this.origins = new OriginsClient(this.httpClient);
49
20
  }
50
21
  }
51
- export { AliasesClient, IdentityClient, OriginClient, OriginsClient };
22
+ export { AliasesClient, IdentityClient };
@@ -1,10 +1,12 @@
1
1
  import type { HttpClient } from '@bloque/sdk-core';
2
2
  import type { OTPAssertion, OTPAssertionEmail, OTPAssertionWhatsApp } from '../api-types';
3
3
  import { OriginClient } from './origin';
4
+ import type { Alias } from './types';
4
5
  export declare class OriginsClient {
5
6
  readonly whatsapp: OriginClient<OTPAssertionWhatsApp>;
6
7
  readonly email: OriginClient<OTPAssertionEmail>;
7
8
  private readonly httpClient;
8
9
  constructor(httpClient: HttpClient);
10
+ get(alias: string): Promise<Alias>;
9
11
  custom(origin: string): OriginClient<OTPAssertion>;
10
12
  }
@@ -0,0 +1,2 @@
1
+ import type { AliasResponse } from '../api-types';
2
+ export type Alias = AliasResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloque/sdk-identity",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "bloque",
@@ -42,7 +42,7 @@
42
42
  "typecheck": "tsgo --noEmit"
43
43
  },
44
44
  "dependencies": {
45
- "@bloque/sdk-core": "0.0.2"
45
+ "@bloque/sdk-core": "0.0.11"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@rslib/core": "^0.18.4",