@xyo-network/api 2.55.4 → 2.56.0

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.
Files changed (51) hide show
  1. package/dist/cjs/Api/Api.js +0 -12
  2. package/dist/cjs/Api/Api.js.map +1 -1
  3. package/dist/cjs/Api/index.js +0 -1
  4. package/dist/cjs/Api/index.js.map +1 -1
  5. package/dist/cjs/index.js +0 -1
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/docs.json +5252 -10438
  8. package/dist/esm/Api/Api.js +0 -19
  9. package/dist/esm/Api/Api.js.map +1 -1
  10. package/dist/esm/Api/index.js +0 -1
  11. package/dist/esm/Api/index.js.map +1 -1
  12. package/dist/esm/index.js +0 -1
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/types/Api/Api.d.ts +0 -6
  15. package/dist/types/Api/Api.d.ts.map +1 -1
  16. package/dist/types/Api/index.d.ts +0 -1
  17. package/dist/types/Api/index.d.ts.map +1 -1
  18. package/dist/types/index.d.ts +0 -1
  19. package/dist/types/index.d.ts.map +1 -1
  20. package/package.json +8 -9
  21. package/src/Api/Api.ts +0 -23
  22. package/src/Api/index.ts +0 -1
  23. package/src/index.ts +0 -1
  24. package/dist/cjs/Api/Account/Api.js +0 -15
  25. package/dist/cjs/Api/Account/Api.js.map +0 -1
  26. package/dist/cjs/Api/Account/index.js +0 -5
  27. package/dist/cjs/Api/Account/index.js.map +0 -1
  28. package/dist/cjs/User/Api.js +0 -25
  29. package/dist/cjs/User/Api.js.map +0 -1
  30. package/dist/cjs/User/index.js +0 -5
  31. package/dist/cjs/User/index.js.map +0 -1
  32. package/dist/esm/Api/Account/Api.js +0 -17
  33. package/dist/esm/Api/Account/Api.js.map +0 -1
  34. package/dist/esm/Api/Account/index.js +0 -2
  35. package/dist/esm/Api/Account/index.js.map +0 -1
  36. package/dist/esm/User/Api.js +0 -27
  37. package/dist/esm/User/Api.js.map +0 -1
  38. package/dist/esm/User/index.js +0 -2
  39. package/dist/esm/User/index.js.map +0 -1
  40. package/dist/types/Api/Account/Api.d.ts +0 -19
  41. package/dist/types/Api/Account/Api.d.ts.map +0 -1
  42. package/dist/types/Api/Account/index.d.ts +0 -2
  43. package/dist/types/Api/Account/index.d.ts.map +0 -1
  44. package/dist/types/User/Api.d.ts +0 -35
  45. package/dist/types/User/Api.d.ts.map +0 -1
  46. package/dist/types/User/index.d.ts +0 -2
  47. package/dist/types/User/index.d.ts.map +0 -1
  48. package/src/Api/Account/Api.ts +0 -32
  49. package/src/Api/Account/index.ts +0 -1
  50. package/src/User/Api.ts +0 -39
  51. package/src/User/index.ts +0 -1
@@ -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({
@@ -1 +1 @@
1
- {"version":3,"file":"Api.js","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,OAAO,eAAuD,SAAQ,YAA0B;IAC5F,KAAK,CAAa;IAE1B,IAAI,IAAI;QACN,IAAI,CAAC,KAAK;YACR,IAAI,CAAC,KAAK;gBACV,IAAI,UAAU,CAAC;oBACb,GAAG,IAAI,CAAC,MAAM;oBACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,OAAO;iBAC1B,CAAC,CAAA;QACJ,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,OAAO,CAAC,OAAiB;QACvB,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,IAAI,CAAC,MAAM;YACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,GAAG;SAC7D,CAAC,CAAA;IACJ,CAAC;IAED,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"}
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"}
@@ -1,3 +1,2 @@
1
- export * from './Account';
2
1
  export * from './Api';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
package/dist/esm/index.js CHANGED
@@ -3,6 +3,5 @@ export * from './Base';
3
3
  export * from './Diviner';
4
4
  export * from './models';
5
5
  export * from './Simple';
6
- export * from './User';
7
6
  export * from './WithArchive';
8
7
  //# sourceMappingURL=index.js.map
@@ -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,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA"}
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"}
@@ -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":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,qBAAa,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,SAAQ,YAAY,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpG,OAAO,CAAC,KAAK,CAAC,CAAY;IAE1B,IAAI,IAAI,IAAI,UAAU,CAQrB;IAED,OAAO,CAAC,OAAO,EAAE,QAAQ;IAOzB,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;;;;;CAOzB"}
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,3 +1,2 @@
1
- export * from './Account';
2
1
  export * from './Api';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -3,6 +3,5 @@ export * from './Base';
3
3
  export * from './Diviner';
4
4
  export * from './models';
5
5
  export * from './Simple';
6
- export * from './User';
7
6
  export * from './WithArchive';
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA"}
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/account": "^2.55.4",
13
- "@xyo-network/api-models": "^2.55.4",
14
- "@xyo-network/axios": "^2.55.4",
15
- "@xyo-network/boundwitness-model": "^2.55.4",
16
- "@xyo-network/core": "^2.55.4",
17
- "@xyo-network/diviner-model": "^2.55.4",
18
- "@xyo-network/huri": "^2.55.4",
19
- "@xyo-network/payload-model": "^2.55.4"
12
+ "@xyo-network/api-models": "^2.56.0",
13
+ "@xyo-network/axios": "^2.56.0",
14
+ "@xyo-network/boundwitness-model": "^2.56.0",
15
+ "@xyo-network/core": "^2.56.0",
16
+ "@xyo-network/diviner-model": "^2.56.0",
17
+ "@xyo-network/huri": "^2.56.0",
18
+ "@xyo-network/payload-model": "^2.56.0"
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.4"
61
+ "version": "2.56.0"
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,2 +1 @@
1
- export * from './Account'
2
1
  export * from './Api'
package/src/index.ts CHANGED
@@ -3,5 +3,4 @@ export * from './Base'
3
3
  export * from './Diviner'
4
4
  export * from './models'
5
5
  export * from './Simple'
6
- export * from './User'
7
6
  export * from './WithArchive'
@@ -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,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Api"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":";;;AAAA,gDAAqB"}
@@ -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
@@ -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"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Api"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -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,2 +0,0 @@
1
- export * from './Api';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -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
@@ -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"}
@@ -1,2 +0,0 @@
1
- export * from './Api';
2
- //# sourceMappingURL=index.js.map
@@ -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,2 +0,0 @@
1
- export * from './Api';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Api/Account/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -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,2 +0,0 @@
1
- export * from './Api';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/User/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -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
- }
@@ -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'