@wenex/sdk 0.6.4 → 0.6.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.
Files changed (28) hide show
  1. package/common/enums/domain/clients/index.d.ts +2 -2
  2. package/common/enums/domain/clients/index.js +2 -2
  3. package/common/enums/domain/clients/index.js.map +1 -1
  4. package/common/interfaces/auth/grant/grant.interface.d.ts +2 -2
  5. package/common/interfaces/common/core.interface.d.ts +2 -2
  6. package/common/interfaces/config/config.interface.d.ts +2 -2
  7. package/common/interfaces/config/setting.interface.d.ts +2 -2
  8. package/common/interfaces/domain/app/app.interface.d.ts +2 -2
  9. package/common/interfaces/domain/client/client.interface.d.ts +3 -3
  10. package/common/interfaces/financial/account.interface.d.ts +2 -2
  11. package/common/interfaces/financial/coin/coin.interface.d.ts +7 -5
  12. package/common/interfaces/financial/transaction.interface.d.ts +2 -2
  13. package/common/interfaces/financial/wallet.interface.d.ts +2 -2
  14. package/common/interfaces/identity/profile.interface.d.ts +2 -2
  15. package/common/interfaces/identity/session.interface.d.ts +2 -2
  16. package/common/interfaces/identity/user.interface.d.ts +2 -2
  17. package/common/interfaces/special/file.interface.d.ts +2 -2
  18. package/common/interfaces/special/stat.interface.d.ts +2 -2
  19. package/common/interfaces/touch/mail/mail.interface.d.ts +2 -2
  20. package/common/interfaces/touch/push/history/history.interface.d.ts +2 -2
  21. package/common/interfaces/touch/push/push.interface.d.ts +2 -2
  22. package/package.json +1 -1
  23. package/common/enums/domain/clients/service-provider.enum.d.ts +0 -4
  24. package/common/enums/domain/clients/service-provider.enum.js +0 -9
  25. package/common/enums/domain/clients/service-provider.enum.js.map +0 -1
  26. package/common/enums/domain/clients/service-type.enum.d.ts +0 -6
  27. package/common/enums/domain/clients/service-type.enum.js +0 -11
  28. package/common/enums/domain/clients/service-type.enum.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  export * from './plan.enum';
2
- export * from './service-type.enum';
3
- export * from './service-provider.enum';
2
+ export * from './otp-type.enum';
3
+ export * from './otp-provider.enum';
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./plan.enum"), exports);
18
- __exportStar(require("./service-type.enum"), exports);
19
- __exportStar(require("./service-provider.enum"), exports);
18
+ __exportStar(require("./otp-type.enum"), exports);
19
+ __exportStar(require("./otp-provider.enum"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/domain/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,sDAAoC;AACpC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/domain/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,kDAAgC;AAChC,sDAAoC"}
@@ -25,9 +25,9 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { GrantTime } from './time.interface';
28
+ import { Core, Dto } from '../../../interfaces';
28
29
  import { Action, Resource } from '../../../enums';
29
- import { Core, Dto, Properties } from '../../../interfaces';
30
- export interface Grant<Props extends Properties = Properties> extends Core<Props> {
30
+ export interface Grant extends Core {
31
31
  subject: string;
32
32
  action: Action;
33
33
  object: Resource;
@@ -1,5 +1,5 @@
1
- import { Properties as Props } from './generic.interface';
2
- export interface Core<Properties extends Props = Props> {
1
+ import { Properties } from './generic.interface';
2
+ export interface Core {
3
3
  id: string;
4
4
  ref?: string;
5
5
  owner: string;
@@ -24,9 +24,9 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import { Document } from 'mongoose';
27
+ import { Core, Dto } from '../common';
27
28
  import { ValueType } from '../../enums';
28
- import { Core, Dto, Properties } from '../common';
29
- export interface Config<Props extends Properties = Properties> extends Core<Props> {
29
+ export interface Config extends Core {
30
30
  key: string;
31
31
  type: ValueType;
32
32
  value?: any;
@@ -24,9 +24,9 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import { Document } from 'mongoose';
27
+ import { Core, Dto } from '../common';
27
28
  import { ValueType } from '../../enums';
28
- import { Core, Dto, Properties } from '../common';
29
- export interface Setting<Props extends Properties = Properties> extends Core<Props> {
29
+ export interface Setting extends Core {
30
30
  key: string;
31
31
  type: ValueType;
32
32
  value?: any;
@@ -24,10 +24,10 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
+ import { Core, Dto } from '../../common';
27
28
  import { AppChangeLog } from './change-log.interface';
28
- import { Core, Dto, Properties } from '../../common';
29
29
  import { AppType, GrantType, Scope, Status } from '../../../enums';
30
- export interface App<Props extends Properties = Properties> extends Core<Props> {
30
+ export interface App extends Core {
31
31
  cid: string;
32
32
  type: AppType;
33
33
  name: string;
@@ -24,7 +24,7 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
- import { Core, Dto, MakeOptional, Properties } from '../../common';
27
+ import { Core, Dto, MakeOptional } from '../../common';
28
28
  import { ClientDomain, ClientDomainDto } from './domain.interface';
29
29
  import { ClientService, ClientServiceDto } from './service.interface';
30
30
  import { ClientPlan, GrantType, Scope, State, Status } from '../../../enums';
@@ -34,7 +34,7 @@ export type ApiToken = {
34
34
  whitelist?: string[];
35
35
  expiration_date: Date;
36
36
  };
37
- export interface Client<Props extends Properties = Properties> extends Core<Props> {
37
+ export interface Client extends Core {
38
38
  name: string;
39
39
  plan: ClientPlan;
40
40
  url?: string;
@@ -58,7 +58,7 @@ export interface Client<Props extends Properties = Properties> extends Core<Prop
58
58
  services?: ClientService[];
59
59
  }
60
60
  export type ClientDoc = Client & Document;
61
- export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'services'>, 'state' | 'client_id' | 'access_token_ttl' | 'refresh_token_ttl'>> & {
61
+ export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'services' | 'api_key'>, 'state' | 'client_id' | 'access_token_ttl' | 'refresh_token_ttl'>> & {
62
62
  domains: ClientDomainDto[];
63
63
  services?: ClientServiceDto[];
64
64
  };
@@ -25,8 +25,8 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { AccountBroker, AccountOwnership, AccountProvider, AccountType } from '../../enums';
28
- import { Core, Dto, MakeOptional, Properties } from '../common';
29
- export interface Account<Props extends Properties = Properties> extends Core<Props> {
28
+ import { Core, Dto, MakeOptional } from '../common';
29
+ export interface Account extends Core {
30
30
  type: AccountType;
31
31
  broker: AccountBroker;
32
32
  provider: AccountProvider;
@@ -24,10 +24,10 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
+ import { Core, Dto, MakeOptional } from '../../common';
27
28
  import { CoinUnit, CoinUnitDto } from './unit.interface';
28
- import { Core, Dto, MakeOptional, Properties } from '../../common';
29
29
  import { CoinCategory, CoinLib, CoinProvider, CoinType } from '../../../enums';
30
- export interface Coin<Props extends Properties = Properties> extends Core<Props> {
30
+ export interface Coin extends Core {
31
31
  type: CoinType;
32
32
  code?: string;
33
33
  symbol: string;
@@ -38,13 +38,15 @@ export interface Coin<Props extends Properties = Properties> extends Core<Props>
38
38
  explore?: string;
39
39
  network?: string;
40
40
  contract?: string;
41
- subunits?: CoinUnit[];
41
+ subunit?: CoinUnit;
42
+ supunit?: CoinUnit;
42
43
  category?: CoinCategory;
43
44
  lib?: CoinLib;
44
45
  nodes?: string[];
45
46
  provider?: CoinProvider;
46
47
  }
47
48
  export type CoinDoc = Coin & Document;
48
- export type CoinDto = Dto<MakeOptional<Omit<Coin, 'subunits'>, 'precision'>> & {
49
- subunits?: CoinUnitDto[];
49
+ export type CoinDto = Dto<MakeOptional<Omit<Coin, 'subunit' | 'supunit'>, 'precision'>> & {
50
+ subunit?: CoinUnitDto;
51
+ supunit?: CoinUnitDto;
50
52
  };
@@ -24,10 +24,10 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
+ import { Core, Dto } from '../common';
27
28
  import { Pay, PayDto } from './common';
28
- import { Core, Dto, Properties } from '../common';
29
29
  import { TransactionReason, TransactionState, TransactionType } from '../../enums';
30
- export interface Transaction<Props extends Properties = Properties> extends Core<Props> {
30
+ export interface Transaction extends Core {
31
31
  type: TransactionType;
32
32
  state: TransactionState;
33
33
  reason: TransactionReason;
@@ -25,8 +25,8 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { WalletProvider } from '../../enums';
28
- import { Core, Dto, MakeOptional, Properties } from '../common';
29
- export interface Wallet<Props extends Properties = Properties> extends Core<Props> {
28
+ import { Core, Dto, MakeOptional } from '../common';
29
+ export interface Wallet extends Core {
30
30
  coin: string;
31
31
  account: string;
32
32
  amount: number;
@@ -24,9 +24,9 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
+ import { Core, Dto, MakeOptional } from '../common';
27
28
  import { Gender, ProfileType, State } from '../../enums';
28
- import { Core, Dto, MakeOptional, Properties } from '../common';
29
- export interface Profile<Props extends Properties = Properties> extends Core<Props> {
29
+ export interface Profile extends Core {
30
30
  type: ProfileType;
31
31
  state: State;
32
32
  gender: Gender;
@@ -24,8 +24,8 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
- import { Core, Dto, Properties } from '../common';
28
- export interface Session<Props extends Properties = Properties> extends Core<Props> {
27
+ import { Core, Dto } from '../common';
28
+ export interface Session extends Core {
29
29
  ip: string;
30
30
  agent: string;
31
31
  expiration_date: Date;
@@ -24,9 +24,9 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
+ import { Core, Dto, MakeOptional } from '../common';
27
28
  import { Status, UserMFA, UserOAuth } from '../../enums';
28
- import { Core, Dto, MakeOptional, Properties } from '../common';
29
- export interface User<Props extends Properties = Properties> extends Core<Props> {
29
+ export interface User extends Core {
30
30
  status: Status;
31
31
  tz: string;
32
32
  mfa?: UserMFA;
@@ -24,8 +24,8 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
- import { Core, Dto, Properties } from '../common';
28
- export interface File<Props extends Properties = Properties> extends Core<Props> {
27
+ import { Core, Dto } from '../common';
28
+ export interface File extends Core {
29
29
  field?: string;
30
30
  original: string;
31
31
  encoding?: string;
@@ -25,8 +25,8 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { StatType } from '../../enums';
28
- import { Core, Dto, Flags, MakeOptional, Properties } from '../common';
29
- export interface Stat<Props extends Properties = Properties> extends Core<Props> {
28
+ import { Core, Dto, Flags, MakeOptional } from '../common';
29
+ export interface Stat extends Core {
30
30
  type: StatType;
31
31
  key: string;
32
32
  val: number;
@@ -25,8 +25,8 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { MailSmtp } from './smtp.interface';
28
- import { Core, Dto, MakeOptional, Properties } from '../../common';
29
- export interface Mail<Props extends Properties = Properties> extends Core<Props> {
28
+ import { Core, Dto, MakeOptional } from '../../common';
29
+ export interface Mail extends Core {
30
30
  to: string[];
31
31
  cc?: string[];
32
32
  bcc?: string[];
@@ -25,9 +25,9 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { PushUrgency } from '../../../../enums';
28
+ import { Core, Dto, MakeOptional, Payload } from '../../../common';
28
29
  import { PushHistoryReply, PushHistoryReplyDto } from './reply.interface';
29
- import { Core, Dto, MakeOptional, Payload, Properties } from '../../../common';
30
- export interface PushHistory<Porps extends Properties = Properties> extends Core<Porps> {
30
+ export interface PushHistory extends Core {
31
31
  to: string;
32
32
  from: string;
33
33
  topic?: string;
@@ -25,8 +25,8 @@
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Document } from 'mongoose';
27
27
  import { PushKeys } from './keys.interface';
28
- import { Core, Dto, MakeOptional, Properties } from '../../common';
29
- export interface Push<Props extends Properties = Properties> extends Core<Props> {
28
+ import { Core, Dto, MakeOptional } from '../../common';
29
+ export interface Push extends Core {
30
30
  domain: string;
31
31
  session: string;
32
32
  identity: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,4 +0,0 @@
1
- export declare enum ClientServiceProvider {
2
- Wenex = "wenex",
3
- Unknown = "unknown"
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientServiceProvider = void 0;
4
- var ClientServiceProvider;
5
- (function (ClientServiceProvider) {
6
- ClientServiceProvider["Wenex"] = "wenex";
7
- ClientServiceProvider["Unknown"] = "unknown";
8
- })(ClientServiceProvider || (exports.ClientServiceProvider = ClientServiceProvider = {}));
9
- //# sourceMappingURL=service-provider.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-provider.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/domain/clients/service-provider.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,4CAAmB,CAAA;AACrB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC"}
@@ -1,6 +0,0 @@
1
- export declare enum ClientServiceType {
2
- SMS = "sms",
3
- Call = "call",
4
- Email = "email",
5
- Webpush = "webpush"
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientServiceType = void 0;
4
- var ClientServiceType;
5
- (function (ClientServiceType) {
6
- ClientServiceType["SMS"] = "sms";
7
- ClientServiceType["Call"] = "call";
8
- ClientServiceType["Email"] = "email";
9
- ClientServiceType["Webpush"] = "webpush";
10
- })(ClientServiceType || (exports.ClientServiceType = ClientServiceType = {}));
11
- //# sourceMappingURL=service-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-type.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/domain/clients/service-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,wCAAmB,CAAA;AACrB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"}