@bloque/sdk-identity 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 +1 -94
- package/dist/index.js +1 -51
- package/package.json +3 -17
package/dist/index.cjs
CHANGED
|
@@ -1,94 +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
|
-
OriginClient: ()=>OriginClient,
|
|
28
|
-
AliasesClient: ()=>AliasesClient,
|
|
29
|
-
IdentityClient: ()=>IdentityClient,
|
|
30
|
-
OriginsClient: ()=>OriginsClient
|
|
31
|
-
});
|
|
32
|
-
class AliasesClient {
|
|
33
|
-
httpClient;
|
|
34
|
-
constructor(httpClient){
|
|
35
|
-
this.httpClient = httpClient;
|
|
36
|
-
}
|
|
37
|
-
async get(alias) {
|
|
38
|
-
const response = await this.httpClient.request({
|
|
39
|
-
method: 'GET',
|
|
40
|
-
path: `/api/aliases?alias=${alias}`
|
|
41
|
-
});
|
|
42
|
-
return response;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
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
|
-
class IdentityClient {
|
|
73
|
-
httpClient;
|
|
74
|
-
aliases;
|
|
75
|
-
origins;
|
|
76
|
-
constructor(httpClient){
|
|
77
|
-
this.httpClient = httpClient;
|
|
78
|
-
this.aliases = new AliasesClient(this.httpClient);
|
|
79
|
-
this.origins = new OriginsClient(this.httpClient);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.AliasesClient = __webpack_exports__.AliasesClient;
|
|
83
|
-
exports.IdentityClient = __webpack_exports__.IdentityClient;
|
|
84
|
-
exports.OriginClient = __webpack_exports__.OriginClient;
|
|
85
|
-
exports.OriginsClient = __webpack_exports__.OriginsClient;
|
|
86
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
87
|
-
"AliasesClient",
|
|
88
|
-
"IdentityClient",
|
|
89
|
-
"OriginClient",
|
|
90
|
-
"OriginsClient"
|
|
91
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
92
|
-
Object.defineProperty(exports, '__esModule', {
|
|
93
|
-
value: true
|
|
94
|
-
});
|
|
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});class AliasesClient{httpClient;constructor(e){this.httpClient=e}async get(e){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${e}`})}}class OriginClient{httpClient;origin;constructor(e,t){this.httpClient=e,this.origin=t}async assert(e){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${e}`})}}class OriginsClient{whatsapp;email;httpClient;constructor(e){this.httpClient=e,this.whatsapp=new OriginClient(e,"bloque-whatsapp"),this.email=new OriginClient(e,"bloque-email")}custom(e){return new OriginClient(this.httpClient,e)}}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.js
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
class AliasesClient
|
|
2
|
-
httpClient;
|
|
3
|
-
constructor(httpClient){
|
|
4
|
-
this.httpClient = httpClient;
|
|
5
|
-
}
|
|
6
|
-
async get(alias) {
|
|
7
|
-
const response = await this.httpClient.request({
|
|
8
|
-
method: 'GET',
|
|
9
|
-
path: `/api/aliases?alias=${alias}`
|
|
10
|
-
});
|
|
11
|
-
return response;
|
|
12
|
-
}
|
|
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
|
-
class IdentityClient {
|
|
42
|
-
httpClient;
|
|
43
|
-
aliases;
|
|
44
|
-
origins;
|
|
45
|
-
constructor(httpClient){
|
|
46
|
-
this.httpClient = httpClient;
|
|
47
|
-
this.aliases = new AliasesClient(this.httpClient);
|
|
48
|
-
this.origins = new OriginsClient(this.httpClient);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export { AliasesClient, IdentityClient, OriginClient, OriginsClient };
|
|
1
|
+
class t{httpClient;constructor(t){this.httpClient=t}async get(t){return await this.httpClient.request({method:"GET",path:`/api/aliases?alias=${t}`})}}class i{httpClient;origin;constructor(t,i){this.httpClient=t,this.origin=i}async assert(t){return await this.httpClient.request({method:"GET",path:`/api/origins/${this.origin}/assert?alias=${t}`})}}class s{whatsapp;email;httpClient;constructor(t){this.httpClient=t,this.whatsapp=new i(t,"bloque-whatsapp"),this.email=new i(t,"bloque-email")}custom(t){return new i(this.httpClient,t)}}class e{httpClient;aliases;origins;constructor(i){this.httpClient=i,this.aliases=new t(this.httpClient),this.origins=new s(this.httpClient)}}export{t as AliasesClient,e as IdentityClient,i as OriginClient,s as OriginsClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloque/sdk-identity",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bloque",
|
|
@@ -33,21 +33,7 @@
|
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=22"
|
|
35
35
|
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"release": "bun publish --provenance",
|
|
38
|
-
"build": "rslib build",
|
|
39
|
-
"dev": "rslib build --watch",
|
|
40
|
-
"clean": "rm -rf node_modules && rm -rf dist",
|
|
41
|
-
"check": "biome check --write",
|
|
42
|
-
"typecheck": "tsgo --noEmit"
|
|
43
|
-
},
|
|
44
36
|
"dependencies": {
|
|
45
|
-
"@bloque/sdk-core": "0.0.
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@rslib/core": "^0.18.4",
|
|
49
|
-
"@types/node": "^24.10.1",
|
|
50
|
-
"@typescript/native-preview": "latest",
|
|
51
|
-
"typescript": "^5.9.3"
|
|
37
|
+
"@bloque/sdk-core": "0.0.16"
|
|
52
38
|
}
|
|
53
|
-
}
|
|
39
|
+
}
|