@xyo-network/api 2.55.3 → 2.55.5
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/cjs/Api/Api.js +0 -12
- package/dist/cjs/Api/Api.js.map +1 -1
- package/dist/cjs/Api/index.js +0 -1
- package/dist/cjs/Api/index.js.map +1 -1
- package/dist/cjs/Test/testBoundWitness.js +0 -1
- package/dist/cjs/Test/testBoundWitness.js.map +1 -1
- package/dist/cjs/Test/testPayload.js +0 -1
- package/dist/cjs/Test/testPayload.js.map +1 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/docs.json +5252 -10438
- package/dist/esm/Api/Api.js +0 -19
- package/dist/esm/Api/Api.js.map +1 -1
- package/dist/esm/Api/index.js +0 -1
- package/dist/esm/Api/index.js.map +1 -1
- package/dist/esm/Test/testBoundWitness.js +0 -1
- package/dist/esm/Test/testBoundWitness.js.map +1 -1
- package/dist/esm/Test/testPayload.js +0 -1
- package/dist/esm/Test/testPayload.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/Api/Api.d.ts +0 -6
- package/dist/types/Api/Api.d.ts.map +1 -1
- package/dist/types/Api/index.d.ts +0 -1
- package/dist/types/Api/index.d.ts.map +1 -1
- package/dist/types/Test/testBoundWitness.d.ts.map +1 -1
- package/dist/types/Test/testPayload.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +8 -9
- package/src/Api/Api.ts +0 -23
- package/src/Api/index.ts +0 -1
- package/src/Test/testBoundWitness.ts +0 -1
- package/src/Test/testPayload.ts +0 -1
- package/src/index.ts +0 -1
- package/dist/cjs/Api/Account/Api.js +0 -15
- package/dist/cjs/Api/Account/Api.js.map +0 -1
- package/dist/cjs/Api/Account/index.js +0 -5
- package/dist/cjs/Api/Account/index.js.map +0 -1
- package/dist/cjs/User/Api.js +0 -25
- package/dist/cjs/User/Api.js.map +0 -1
- package/dist/cjs/User/index.js +0 -5
- package/dist/cjs/User/index.js.map +0 -1
- package/dist/esm/Api/Account/Api.js +0 -17
- package/dist/esm/Api/Account/Api.js.map +0 -1
- package/dist/esm/Api/Account/index.js +0 -2
- package/dist/esm/Api/Account/index.js.map +0 -1
- package/dist/esm/User/Api.js +0 -27
- package/dist/esm/User/Api.js.map +0 -1
- package/dist/esm/User/index.js +0 -2
- package/dist/esm/User/index.js.map +0 -1
- package/dist/types/Api/Account/Api.d.ts +0 -19
- package/dist/types/Api/Account/Api.d.ts.map +0 -1
- package/dist/types/Api/Account/index.d.ts +0 -2
- package/dist/types/Api/Account/index.d.ts.map +0 -1
- package/dist/types/User/Api.d.ts +0 -35
- package/dist/types/User/Api.d.ts.map +0 -1
- package/dist/types/User/index.d.ts +0 -2
- package/dist/types/User/index.d.ts.map +0 -1
- package/src/Api/Account/Api.ts +0 -32
- package/src/Api/Account/index.ts +0 -1
- package/src/User/Api.ts +0 -39
- package/src/User/index.ts +0 -1
package/dist/esm/Api/Api.js
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import { AddressValue } from '@xyo-network/account';
|
|
2
1
|
import { Huri } from '@xyo-network/huri';
|
|
3
2
|
import { XyoApiSimple } from '../Simple';
|
|
4
|
-
import { XyoUserApi } from '../User';
|
|
5
|
-
import { XyoAccountApi } from './Account';
|
|
6
3
|
export class XyoArchivistApi extends XyoApiSimple {
|
|
7
|
-
_user;
|
|
8
|
-
get user() {
|
|
9
|
-
this._user =
|
|
10
|
-
this._user ??
|
|
11
|
-
new XyoUserApi({
|
|
12
|
-
...this.config,
|
|
13
|
-
root: `${this.root}user/`,
|
|
14
|
-
});
|
|
15
|
-
return this._user;
|
|
16
|
-
}
|
|
17
|
-
account(address) {
|
|
18
|
-
return new XyoAccountApi({
|
|
19
|
-
...this.config,
|
|
20
|
-
root: `${this.root}wallet/${new AddressValue(address).hex}/`,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
4
|
huri(huri) {
|
|
24
5
|
const huriObj = typeof huri === 'string' ? new Huri(huri) : huri;
|
|
25
6
|
return new XyoApiSimple({
|
package/dist/esm/Api/Api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,OAAO,eAAuD,SAAQ,YAA0B;IACpG,IAAI,CAAC,IAAmB;QACtB,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAChE,OAAO,IAAI,YAAY,CAAU;YAC/B,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG;SACrC,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/dist/esm/Api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model';
|
|
2
2
|
const testBoundWitness = {
|
|
3
|
-
_archive: 'temp',
|
|
4
3
|
_client: 'js',
|
|
5
4
|
_hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',
|
|
6
5
|
_signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testBoundWitness.js","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAElF,MAAM,gBAAgB,GAAiB;IACrC,
|
|
1
|
+
{"version":3,"file":"testBoundWitness.js","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAElF,MAAM,gBAAgB,GAAiB;IACrC,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,kEAAkE;IACzE,WAAW,EAAE,CAAC,kIAAkI,CAAC;IACjJ,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,CAAC,0CAA0C,CAAC;IACvD,cAAc,EAAE,CAAC,kEAAkE,CAAC;IACpF,eAAe,EAAE,CAAC,kBAAkB,CAAC;IACrC,eAAe,EAAE,CAAC,IAAI,CAAC;IACvB,MAAM,EAAE,kBAAkB;CACX,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testPayload.js","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,kBAAkB,CAAA;AACrC,MAAM,WAAW,GAA6B;IAC5C,
|
|
1
|
+
{"version":3,"file":"testPayload.js","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,kBAAkB,CAAA;AACrC,MAAM,WAAW,GAA6B;IAC5C,KAAK,EAAE,kEAAkE;IACzE,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,CAAC;IACd,WAAW,EAAE;QACX,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,aAAa;KAC3B;IACD,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,aAAa;CAC3B,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
|
package/dist/types/Api/Api.d.ts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { XyoApiConfig } from '@xyo-network/api-models';
|
|
2
|
-
import { DataLike } from '@xyo-network/core';
|
|
3
2
|
import { Huri } from '@xyo-network/huri';
|
|
4
3
|
import { Payload } from '@xyo-network/payload-model';
|
|
5
4
|
import { XyoApiSimple } from '../Simple';
|
|
6
|
-
import { XyoUserApi } from '../User';
|
|
7
|
-
import { XyoAccountApi } from './Account';
|
|
8
5
|
export declare class XyoArchivistApi<C extends XyoApiConfig = XyoApiConfig> extends XyoApiSimple<Payload[], C> {
|
|
9
|
-
private _user?;
|
|
10
|
-
get user(): XyoUserApi;
|
|
11
|
-
account(address: DataLike): XyoAccountApi;
|
|
12
6
|
huri(huri: Huri | string): XyoApiSimple<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
13
7
|
schema: string;
|
|
14
8
|
}, import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,qBAAa,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,SAAQ,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpG,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;;;;;CAOzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,YAUP,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAUzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
|
package/package.json
CHANGED
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@xyo-network/
|
|
13
|
-
"@xyo-network/
|
|
14
|
-
"@xyo-network/
|
|
15
|
-
"@xyo-network/
|
|
16
|
-
"@xyo-network/
|
|
17
|
-
"@xyo-network/
|
|
18
|
-
"@xyo-network/
|
|
19
|
-
"@xyo-network/payload-model": "^2.55.3"
|
|
12
|
+
"@xyo-network/api-models": "^2.55.5",
|
|
13
|
+
"@xyo-network/axios": "^2.55.5",
|
|
14
|
+
"@xyo-network/boundwitness-model": "^2.55.5",
|
|
15
|
+
"@xyo-network/core": "^2.55.5",
|
|
16
|
+
"@xyo-network/diviner-model": "^2.55.5",
|
|
17
|
+
"@xyo-network/huri": "^2.55.5",
|
|
18
|
+
"@xyo-network/payload-model": "^2.55.5"
|
|
20
19
|
},
|
|
21
20
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
22
21
|
"devDependencies": {
|
|
@@ -59,5 +58,5 @@
|
|
|
59
58
|
},
|
|
60
59
|
"sideEffects": false,
|
|
61
60
|
"types": "dist/types/index.d.ts",
|
|
62
|
-
"version": "2.55.
|
|
61
|
+
"version": "2.55.5"
|
|
63
62
|
}
|
package/src/Api/Api.ts
CHANGED
|
@@ -1,33 +1,10 @@
|
|
|
1
|
-
import { AddressValue } from '@xyo-network/account'
|
|
2
1
|
import { XyoApiConfig } from '@xyo-network/api-models'
|
|
3
|
-
import { DataLike } from '@xyo-network/core'
|
|
4
2
|
import { Huri } from '@xyo-network/huri'
|
|
5
3
|
import { Payload } from '@xyo-network/payload-model'
|
|
6
4
|
|
|
7
5
|
import { XyoApiSimple } from '../Simple'
|
|
8
|
-
import { XyoUserApi } from '../User'
|
|
9
|
-
import { XyoAccountApi } from './Account'
|
|
10
6
|
|
|
11
7
|
export class XyoArchivistApi<C extends XyoApiConfig = XyoApiConfig> extends XyoApiSimple<Payload[], C> {
|
|
12
|
-
private _user?: XyoUserApi
|
|
13
|
-
|
|
14
|
-
get user(): XyoUserApi {
|
|
15
|
-
this._user =
|
|
16
|
-
this._user ??
|
|
17
|
-
new XyoUserApi({
|
|
18
|
-
...this.config,
|
|
19
|
-
root: `${this.root}user/`,
|
|
20
|
-
})
|
|
21
|
-
return this._user
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
account(address: DataLike) {
|
|
25
|
-
return new XyoAccountApi({
|
|
26
|
-
...this.config,
|
|
27
|
-
root: `${this.root}wallet/${new AddressValue(address).hex}/`,
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
8
|
huri(huri: Huri | string) {
|
|
32
9
|
const huriObj = typeof huri === 'string' ? new Huri(huri) : huri
|
|
33
10
|
return new XyoApiSimple<Payload>({
|
package/src/Api/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
2
2
|
|
|
3
3
|
const testBoundWitness: BoundWitness = {
|
|
4
|
-
_archive: 'temp',
|
|
5
4
|
_client: 'js',
|
|
6
5
|
_hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',
|
|
7
6
|
_signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],
|
package/src/Test/testPayload.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Payload } from '@xyo-network/payload-model'
|
|
|
3
3
|
|
|
4
4
|
const testSchema = 'network.xyo.test'
|
|
5
5
|
const testPayload: Payload<StringKeyObject> = {
|
|
6
|
-
_archive: 'test',
|
|
7
6
|
_hash: '20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c',
|
|
8
7
|
_timestamp: 1609459255555,
|
|
9
8
|
numberField: 1,
|
package/src/index.ts
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XyoAccountApi = void 0;
|
|
4
|
-
const Base_1 = require("../../Base");
|
|
5
|
-
const Simple_1 = require("../../Simple");
|
|
6
|
-
class XyoAccountApi extends Base_1.XyoApiBase {
|
|
7
|
-
get challenge() {
|
|
8
|
-
return new Simple_1.XyoApiSimple(Object.assign(Object.assign({}, this.config), { root: `${this.root}challenge/` }));
|
|
9
|
-
}
|
|
10
|
-
get verify() {
|
|
11
|
-
return new Simple_1.XyoApiSimple(Object.assign(Object.assign({}, this.config), { root: `${this.root}verify/` }));
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.XyoAccountApi = XyoAccountApi;
|
|
15
|
-
//# sourceMappingURL=Api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../../src/Api/Account/Api.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,yCAA2C;AAgB3C,MAAa,aAAc,SAAQ,iBAAU;IAC3C,IAAI,SAAS;QACX,OAAO,IAAI,qBAAY,iCAClB,IAAI,CAAC,MAAM,KACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,YAAY,IAC9B,CAAA;IACJ,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,qBAAY,iCAClB,IAAI,CAAC,MAAM,KACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS,IAC3B,CAAA;IACJ,CAAC;CACF;AAdD,sCAcC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":";;;AAAA,gDAAqB"}
|
package/dist/cjs/User/Api.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XyoUserApi = void 0;
|
|
4
|
-
const Base_1 = require("../Base");
|
|
5
|
-
const Simple_1 = require("../Simple");
|
|
6
|
-
class XyoUserApi extends Base_1.XyoApiBase {
|
|
7
|
-
get authenticated() {
|
|
8
|
-
return !!this.config.jwtToken;
|
|
9
|
-
}
|
|
10
|
-
get headers() {
|
|
11
|
-
const headers = {};
|
|
12
|
-
if (this.config.jwtToken) {
|
|
13
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
14
|
-
}
|
|
15
|
-
return headers;
|
|
16
|
-
}
|
|
17
|
-
get login() {
|
|
18
|
-
return new Simple_1.XyoApiSimple(Object.assign(Object.assign({}, this.config), { root: `${this.root}login/` }));
|
|
19
|
-
}
|
|
20
|
-
get profile() {
|
|
21
|
-
return new Simple_1.XyoApiSimple(Object.assign(Object.assign({}, this.config), { root: `${this.root}profile/` }));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.XyoUserApi = XyoUserApi;
|
|
25
|
-
//# sourceMappingURL=Api.js.map
|
package/dist/cjs/User/Api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/User/Api.ts"],"names":[],"mappings":";;;AAAA,kCAAoC;AACpC,sCAAwC;AAWxC,MAAa,UAAW,SAAQ,iBAAU;IACxC,IAAa,aAAa;QACxB,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED,IAAa,OAAO;QAClB,MAAM,OAAO,GAA2B,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,OAAO,CAAC,aAAa,GAAG,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;SACzD;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,qBAAY,iCAClB,IAAI,CAAC,MAAM,KACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,QAAQ,IAC1B,CAAA;IACJ,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,qBAAY,iCAClB,IAAI,CAAC,MAAM,KACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU,IAC5B,CAAA;IACJ,CAAC;CACF;AA1BD,gCA0BC"}
|
package/dist/cjs/User/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/User/index.ts"],"names":[],"mappings":";;;AAAA,gDAAqB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../../Base';
|
|
2
|
-
import { XyoApiSimple } from '../../Simple';
|
|
3
|
-
export class XyoAccountApi extends XyoApiBase {
|
|
4
|
-
get challenge() {
|
|
5
|
-
return new XyoApiSimple({
|
|
6
|
-
...this.config,
|
|
7
|
-
root: `${this.root}challenge/`,
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
get verify() {
|
|
11
|
-
return new XyoApiSimple({
|
|
12
|
-
...this.config,
|
|
13
|
-
root: `${this.root}verify/`,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=Api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../../src/Api/Account/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAgB3C,MAAM,OAAO,aAAc,SAAQ,UAAU;IAC3C,IAAI,SAAS;QACX,OAAO,IAAI,YAAY,CAAsB;YAC3C,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,YAAY;SAC/B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,YAAY,CAAmB;YACxC,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS;SAC5B,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
package/dist/esm/User/Api.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../Base';
|
|
2
|
-
import { XyoApiSimple } from '../Simple';
|
|
3
|
-
export class XyoUserApi extends XyoApiBase {
|
|
4
|
-
get authenticated() {
|
|
5
|
-
return !!this.config.jwtToken;
|
|
6
|
-
}
|
|
7
|
-
get headers() {
|
|
8
|
-
const headers = {};
|
|
9
|
-
if (this.config.jwtToken) {
|
|
10
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
11
|
-
}
|
|
12
|
-
return headers;
|
|
13
|
-
}
|
|
14
|
-
get login() {
|
|
15
|
-
return new XyoApiSimple({
|
|
16
|
-
...this.config,
|
|
17
|
-
root: `${this.root}login/`,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
get profile() {
|
|
21
|
-
return new XyoApiSimple({
|
|
22
|
-
...this.config,
|
|
23
|
-
root: `${this.root}profile/`,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=Api.js.map
|
package/dist/esm/User/Api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/User/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAWxC,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC,IAAa,aAAa;QACxB,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED,IAAa,OAAO;QAClB,MAAM,OAAO,GAA2B,EAAE,CAAA;QAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,OAAO,CAAC,aAAa,GAAG,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;SACzD;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,YAAY,CAAe;YACpC,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,QAAQ;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,YAAY,CAAC;YACtB,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU;SAC7B,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/dist/esm/User/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/User/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../../Base';
|
|
2
|
-
import { XyoApiSimple } from '../../Simple';
|
|
3
|
-
export interface XyoAccountChallenge {
|
|
4
|
-
/** @field Server specific state identifier [out] */
|
|
5
|
-
state?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface XyoAccountVerify {
|
|
8
|
-
/** @field Message that was signed [in] */
|
|
9
|
-
message: string;
|
|
10
|
-
/** @field Signature [in] */
|
|
11
|
-
signature: string;
|
|
12
|
-
/** @field Token generated by server [out] */
|
|
13
|
-
token?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class XyoAccountApi extends XyoApiBase {
|
|
16
|
-
get challenge(): XyoApiSimple<XyoAccountChallenge, XyoAccountChallenge, import("@xyo-network/payload-model").PayloadFindFilter, import("@xyo-network/api-models/dist/types/Config").XyoApiConfig>;
|
|
17
|
-
get verify(): XyoApiSimple<XyoAccountVerify, XyoAccountVerify, import("@xyo-network/payload-model").PayloadFindFilter, import("@xyo-network/api-models/dist/types/Config").XyoApiConfig>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=Api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../../src/Api/Account/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,aAAc,SAAQ,UAAU;IAC3C,IAAI,SAAS,qLAKZ;IAED,IAAI,MAAM,+KAKT;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
package/dist/types/User/Api.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../Base';
|
|
2
|
-
import { XyoApiSimple } from '../Simple';
|
|
3
|
-
export interface XyoUserLogin {
|
|
4
|
-
/** @field Email address of the user [in] */
|
|
5
|
-
email?: string;
|
|
6
|
-
/** @field Password of the user [in] */
|
|
7
|
-
password?: string;
|
|
8
|
-
/** @field Token to access the API as that user [out] */
|
|
9
|
-
token?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare class XyoUserApi extends XyoApiBase {
|
|
12
|
-
get authenticated(): boolean;
|
|
13
|
-
get headers(): Record<string, string>;
|
|
14
|
-
get login(): XyoApiSimple<XyoUserLogin, XyoUserLogin, import("@xyo-network/payload-model").PayloadFindFilter, import("@xyo-network/api-models/dist/types/Config").XyoApiConfig>;
|
|
15
|
-
get profile(): XyoApiSimple<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
16
|
-
schema: string;
|
|
17
|
-
}, import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
|
|
18
|
-
schema: string;
|
|
19
|
-
}, import("@xyo-network/payload-model").PayloadFindFilter, {
|
|
20
|
-
root: string;
|
|
21
|
-
apiDomain: string;
|
|
22
|
-
apiKey?: string | undefined;
|
|
23
|
-
compressionThreshold?: number | undefined;
|
|
24
|
-
jwtToken?: string | undefined;
|
|
25
|
-
query?: string | undefined;
|
|
26
|
-
reportableParent?: import("@xyo-network/api-models").XyoApiReportable | undefined;
|
|
27
|
-
throwError?: boolean | undefined;
|
|
28
|
-
throwFailure?: boolean | undefined;
|
|
29
|
-
userid?: string | undefined;
|
|
30
|
-
onError?: ((error: import("@xyo-network/api-models").XyoApiError<any, any>, depth: number) => void) | undefined;
|
|
31
|
-
onFailure?: ((response: import("@xyo-network/api-models").XyoApiResponse<unknown, unknown>, depth: number) => void) | undefined;
|
|
32
|
-
onSuccess?: ((response: import("@xyo-network/api-models").XyoApiResponse<unknown, unknown>, depth: number) => void) | undefined;
|
|
33
|
-
}>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=Api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/User/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,UAAW,SAAQ,UAAU;IACxC,IAAa,aAAa,YAEzB;IAED,IAAa,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM7C;IAED,IAAI,KAAK,uKAKR;IAED,IAAI,OAAO;;;;;;;;;;;;;;;;;;OAKV;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/User/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
package/src/Api/Account/Api.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../../Base'
|
|
2
|
-
import { XyoApiSimple } from '../../Simple'
|
|
3
|
-
|
|
4
|
-
export interface XyoAccountChallenge {
|
|
5
|
-
/** @field Server specific state identifier [out] */
|
|
6
|
-
state?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface XyoAccountVerify {
|
|
10
|
-
/** @field Message that was signed [in] */
|
|
11
|
-
message: string
|
|
12
|
-
/** @field Signature [in] */
|
|
13
|
-
signature: string
|
|
14
|
-
/** @field Token generated by server [out] */
|
|
15
|
-
token?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class XyoAccountApi extends XyoApiBase {
|
|
19
|
-
get challenge() {
|
|
20
|
-
return new XyoApiSimple<XyoAccountChallenge>({
|
|
21
|
-
...this.config,
|
|
22
|
-
root: `${this.root}challenge/`,
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get verify() {
|
|
27
|
-
return new XyoApiSimple<XyoAccountVerify>({
|
|
28
|
-
...this.config,
|
|
29
|
-
root: `${this.root}verify/`,
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
}
|
package/src/Api/Account/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Api'
|
package/src/User/Api.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { XyoApiBase } from '../Base'
|
|
2
|
-
import { XyoApiSimple } from '../Simple'
|
|
3
|
-
|
|
4
|
-
export interface XyoUserLogin {
|
|
5
|
-
/** @field Email address of the user [in] */
|
|
6
|
-
email?: string
|
|
7
|
-
/** @field Password of the user [in] */
|
|
8
|
-
password?: string
|
|
9
|
-
/** @field Token to access the API as that user [out] */
|
|
10
|
-
token?: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class XyoUserApi extends XyoApiBase {
|
|
14
|
-
override get authenticated() {
|
|
15
|
-
return !!this.config.jwtToken
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
override get headers(): Record<string, string> {
|
|
19
|
-
const headers: Record<string, string> = {}
|
|
20
|
-
if (this.config.jwtToken) {
|
|
21
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`
|
|
22
|
-
}
|
|
23
|
-
return headers
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get login() {
|
|
27
|
-
return new XyoApiSimple<XyoUserLogin>({
|
|
28
|
-
...this.config,
|
|
29
|
-
root: `${this.root}login/`,
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get profile() {
|
|
34
|
-
return new XyoApiSimple({
|
|
35
|
-
...this.config,
|
|
36
|
-
root: `${this.root}profile/`,
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/User/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Api'
|