@wenex/sdk 0.6.5 → 0.6.7
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/enums/domain/clients/index.d.ts +2 -2
- package/common/enums/domain/clients/index.js +2 -2
- package/common/enums/domain/clients/index.js.map +1 -1
- package/common/enums/domain/clients/service-provider.enum.d.ts +4 -0
- package/common/enums/domain/clients/service-provider.enum.js +9 -0
- package/common/enums/domain/clients/service-provider.enum.js.map +1 -0
- package/common/enums/domain/clients/service-type.enum.d.ts +6 -0
- package/common/enums/domain/clients/service-type.enum.js +11 -0
- package/common/enums/domain/clients/service-type.enum.js.map +1 -0
- 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 +5 -7
- 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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from './plan.enum';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './service-type.enum';
|
|
3
|
+
export * from './service-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("./
|
|
19
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./service-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./service-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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/domain/clients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,sDAAoC;AACpC,0DAAwC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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';
|
|
29
28
|
import { Action, Resource } from '../../../enums';
|
|
30
|
-
|
|
29
|
+
import { Core, Dto, Properties } from '../../../interfaces';
|
|
30
|
+
export interface Grant<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
import { ValueType } from '../../enums';
|
|
29
|
-
|
|
28
|
+
import { Core, Dto, Properties } from '../common';
|
|
29
|
+
export interface Config<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
import { ValueType } from '../../enums';
|
|
29
|
-
|
|
28
|
+
import { Core, Dto, Properties } from '../common';
|
|
29
|
+
export interface Setting<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
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 extends Core {
|
|
30
|
+
export interface App<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../../common';
|
|
27
|
+
import { Core, Dto, MakeOptional, Properties } 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 extends Core {
|
|
37
|
+
export interface Client<Props extends Properties = Properties> extends Core<Props> {
|
|
38
38
|
name: string;
|
|
39
39
|
plan: ClientPlan;
|
|
40
40
|
url?: string;
|
|
@@ -58,7 +58,7 @@ export interface Client extends Core {
|
|
|
58
58
|
services?: ClientService[];
|
|
59
59
|
}
|
|
60
60
|
export type ClientDoc = Client & Document;
|
|
61
|
-
export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'services'
|
|
61
|
+
export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'services'>, 'state' | 'client_id' | 'api_key' | '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 } from '../common';
|
|
29
|
-
export interface Account extends Core {
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
29
|
+
export interface Account<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
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 extends Core {
|
|
30
|
+
export interface Coin<Props extends Properties = Properties> extends Core<Props> {
|
|
31
31
|
type: CoinType;
|
|
32
32
|
code?: string;
|
|
33
33
|
symbol: string;
|
|
@@ -38,15 +38,13 @@ export interface Coin extends Core {
|
|
|
38
38
|
explore?: string;
|
|
39
39
|
network?: string;
|
|
40
40
|
contract?: string;
|
|
41
|
-
|
|
42
|
-
supunit?: CoinUnit;
|
|
41
|
+
subunits?: CoinUnit[];
|
|
43
42
|
category?: CoinCategory;
|
|
44
43
|
lib?: CoinLib;
|
|
45
44
|
nodes?: string[];
|
|
46
45
|
provider?: CoinProvider;
|
|
47
46
|
}
|
|
48
47
|
export type CoinDoc = Coin & Document;
|
|
49
|
-
export type CoinDto = Dto<MakeOptional<Omit<Coin, '
|
|
50
|
-
|
|
51
|
-
supunit?: CoinUnitDto;
|
|
48
|
+
export type CoinDto = Dto<MakeOptional<Omit<Coin, 'subunits'>, 'precision'>> & {
|
|
49
|
+
subunits?: CoinUnitDto[];
|
|
52
50
|
};
|
|
@@ -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';
|
|
28
27
|
import { Pay, PayDto } from './common';
|
|
28
|
+
import { Core, Dto, Properties } from '../common';
|
|
29
29
|
import { TransactionReason, TransactionState, TransactionType } from '../../enums';
|
|
30
|
-
export interface Transaction extends Core {
|
|
30
|
+
export interface Transaction<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../common';
|
|
29
|
-
export interface Wallet extends Core {
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
29
|
+
export interface Wallet<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
import { Gender, ProfileType, State } from '../../enums';
|
|
29
|
-
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
29
|
+
export interface Profile<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../common';
|
|
28
|
-
export interface Session extends Core {
|
|
27
|
+
import { Core, Dto, Properties } from '../common';
|
|
28
|
+
export interface Session<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
28
27
|
import { Status, UserMFA, UserOAuth } from '../../enums';
|
|
29
|
-
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
29
|
+
export interface User<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../common';
|
|
28
|
-
export interface File extends Core {
|
|
27
|
+
import { Core, Dto, Properties } from '../common';
|
|
28
|
+
export interface File<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../common';
|
|
29
|
-
export interface Stat extends Core {
|
|
28
|
+
import { Core, Dto, Flags, MakeOptional, Properties } from '../common';
|
|
29
|
+
export interface Stat<Props extends Properties = Properties> extends Core<Props> {
|
|
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 } from '../../common';
|
|
29
|
-
export interface Mail extends Core {
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
29
|
+
export interface Mail<Props extends Properties = Properties> extends Core<Props> {
|
|
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';
|
|
29
28
|
import { PushHistoryReply, PushHistoryReplyDto } from './reply.interface';
|
|
30
|
-
|
|
29
|
+
import { Core, Dto, MakeOptional, Payload, Properties } from '../../../common';
|
|
30
|
+
export interface PushHistory<Porps extends Properties = Properties> extends Core<Porps> {
|
|
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 } from '../../common';
|
|
29
|
-
export interface Push extends Core {
|
|
28
|
+
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
29
|
+
export interface Push<Props extends Properties = Properties> extends Core<Props> {
|
|
30
30
|
domain: string;
|
|
31
31
|
session: string;
|
|
32
32
|
identity: string;
|