@wenex/sdk 0.6.3 → 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.
- package/common/interfaces/auth/grant/grant.interface.d.ts +2 -2
- package/common/interfaces/common/core.interface.d.ts +2 -2
- package/common/interfaces/config/config.interface.d.ts +2 -2
- package/common/interfaces/config/setting.interface.d.ts +2 -2
- package/common/interfaces/domain/app/app.interface.d.ts +2 -2
- package/common/interfaces/domain/client/client.interface.d.ts +3 -3
- package/common/interfaces/financial/account.interface.d.ts +2 -2
- package/common/interfaces/financial/coin/coin.interface.d.ts +7 -5
- package/common/interfaces/financial/transaction.interface.d.ts +2 -2
- package/common/interfaces/financial/wallet.interface.d.ts +2 -2
- package/common/interfaces/identity/profile.interface.d.ts +2 -2
- package/common/interfaces/identity/session.interface.d.ts +2 -2
- package/common/interfaces/identity/user.interface.d.ts +2 -2
- package/common/interfaces/special/file.interface.d.ts +2 -2
- package/common/interfaces/special/stat.interface.d.ts +2 -2
- package/common/interfaces/touch/mail/mail.interface.d.ts +2 -2
- package/common/interfaces/touch/push/history/history.interface.d.ts +2 -2
- package/common/interfaces/touch/push/push.interface.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
29
|
-
export interface Account
|
|
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
|
|
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
|
-
|
|
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, '
|
|
49
|
-
|
|
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
|
|
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
|
|
29
|
-
export interface Wallet
|
|
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
|
-
|
|
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
|
|
28
|
-
export interface Session
|
|
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
|
-
|
|
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
|
|
28
|
-
export interface File
|
|
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
|
|
29
|
-
export interface Stat
|
|
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
|
|
29
|
-
export interface Mail
|
|
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
|
-
|
|
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
|
|
29
|
-
export interface Push
|
|
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;
|