@wenex/sdk 0.7.1 → 0.7.3
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/classes/restful.service.d.ts +2 -2
- package/common/classes/restful.service.js +1 -2
- package/common/classes/restful.service.js.map +1 -1
- package/common/interfaces/auth/grant/grant.interface.d.ts +2 -1
- package/common/interfaces/config/config.interface.d.ts +2 -1
- package/common/interfaces/config/setting.interface.d.ts +2 -1
- package/common/interfaces/domain/app/app.interface.d.ts +2 -1
- package/common/interfaces/domain/client/client.interface.d.ts +2 -1
- package/common/interfaces/financial/account.interface.d.ts +2 -1
- package/common/interfaces/financial/coin/coin.interface.d.ts +2 -1
- package/common/interfaces/financial/transaction.interface.d.ts +2 -1
- package/common/interfaces/financial/wallet.interface.d.ts +2 -1
- package/common/interfaces/general/artifact.interface.d.ts +2 -1
- package/common/interfaces/general/workflow/workflow.interface.d.ts +2 -1
- package/common/interfaces/identity/profile.interface.d.ts +2 -1
- package/common/interfaces/identity/session.interface.d.ts +2 -1
- package/common/interfaces/identity/user.interface.d.ts +2 -1
- package/common/interfaces/logistic/cargo.interface.d.ts +2 -1
- package/common/interfaces/logistic/driver.interface.d.ts +2 -1
- package/common/interfaces/logistic/location/boundary-administrative.interface.d.ts +8 -0
- package/common/interfaces/logistic/location/boundary-administrative.interface.js +3 -0
- package/common/interfaces/logistic/location/boundary-administrative.interface.js.map +1 -0
- package/common/interfaces/logistic/location/index.d.ts +2 -0
- package/common/interfaces/logistic/location/index.js +2 -0
- package/common/interfaces/logistic/location/index.js.map +1 -1
- package/common/interfaces/logistic/location/lat-lng.interface.d.ts +5 -0
- package/common/interfaces/logistic/location/lat-lng.interface.js +3 -0
- package/common/interfaces/logistic/location/lat-lng.interface.js.map +1 -0
- package/common/interfaces/logistic/location/location.interface.d.ts +2 -1
- package/common/interfaces/logistic/travel.interface.d.ts +2 -1
- package/common/interfaces/logistic/vehicle.interface.d.ts +2 -1
- package/common/interfaces/special/file.interface.d.ts +2 -1
- package/common/interfaces/special/stat.interface.d.ts +2 -1
- package/common/interfaces/touch/mail/mail.interface.d.ts +2 -1
- package/common/interfaces/touch/push/push.interface.d.ts +2 -1
- package/package.json +1 -1
- package/services/logistic/locations.service.d.ts +3 -2
- package/services/logistic/locations.service.js +14 -0
- package/services/logistic/locations.service.js.map +1 -1
- package/services/special/files.service.js +2 -2
- package/services/special/files.service.js.map +1 -1
- package/services/touch/mails.service.js +1 -1
- package/services/touch/mails.service.js.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchEventSourceInit } from '@microsoft/fetch-event-source';
|
|
2
2
|
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
-
import { Dto as DtoInterface, Core, Filter, QueryFilter, Serializer, Pagination, Optional, Population, FilterOne } from '../interfaces';
|
|
3
|
+
import { Dto as DtoInterface, Core, Filter, Items, QueryFilter, Serializer, Pagination, Optional, Population, FilterOne } from '../interfaces';
|
|
4
4
|
import { RequestService } from '../providers';
|
|
5
5
|
export type RequestConfig<T> = Omit<AxiosRequestConfig, 'params'> & {
|
|
6
6
|
params?: Optional<Filter<T>> & {
|
|
@@ -19,7 +19,7 @@ export declare class RestfulService<T extends Core, Dto extends DtoInterface<Cor
|
|
|
19
19
|
constructor(name: string, axios: AxiosInstance);
|
|
20
20
|
count(filter: QueryFilter<T>, config?: RequestConfig<T>): Promise<number>;
|
|
21
21
|
create(data: Dto, config?: RequestConfig<T>): Promise<Serializer<T>>;
|
|
22
|
-
createBulk(data: Dto
|
|
22
|
+
createBulk(data: Items<Dto>, config?: RequestConfig<T>): Promise<Serializer<T>[]>;
|
|
23
23
|
cursor(filter: FilterOne<T>, options: FetchEventSourceInit, config?: RequestConfig<T>): Promise<void>;
|
|
24
24
|
find<Populate extends Population = 'id'>(filter: Filter<T>, config?: RequestConfig<T>): Promise<Serializer<T, Populate>[]>;
|
|
25
25
|
findById<Populate extends Population = 'id'>(id: string, config?: RequestConfig<T>): Promise<Serializer<T, Populate>>;
|
|
@@ -37,8 +37,7 @@ class RestfulService extends providers_1.RequestService {
|
|
|
37
37
|
}
|
|
38
38
|
createBulk(data, config) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
return (yield this.post(this.url('bulk'), data, config))
|
|
41
|
-
.items;
|
|
40
|
+
return (yield this.post(this.url('bulk'), data, config)).items;
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
43
|
cursor(filter, options, config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restful.service.js","sourceRoot":"","sources":["../../src/common/classes/restful.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,sEAAuF;AAEvF,4CAAoB;AAgBpB,4CAA8C;AAW9C,MAAa,cAGX,SAAQ,0BAAc;IAGtB,YACqB,IAAY,EACZ,KAAoB;QAEvC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHM,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAe;QAJtB,QAAG,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAOrF,CAAC;IAEK,KAAK,CAAC,MAAsB,EAAE,MAAyB;;YAC3D,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,mBAAM,MAAM,qBAAS,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAG,CAAC;YACnE,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAQ,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,kCAAO,MAAM,KAAE,MAAM,IAAG,CAAC,CAAC,KAAK,CAAC;QACjF,CAAC;KAAA;IAEK,MAAM,CAAC,IAAS,EAAE,MAAyB;;YAC/C,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAA2B,IA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KACT,MAAM,IACN,CACH,CAAC,KAAK,CAAC;QACV,CAAC;KAAA;CACF;AA5HD,wCA4HC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { GrantTime } from './time.interface';
|
|
3
3
|
import { Action, Resource } from '../../../enums';
|
|
4
|
-
import { Core, Dto, Properties } from '
|
|
4
|
+
import { Core, Dto, Items, Properties } from '../../common';
|
|
5
5
|
export interface Grant<Props extends Properties = Properties> extends Core<Props> {
|
|
6
6
|
subject: string;
|
|
7
7
|
action: Action;
|
|
@@ -15,3 +15,4 @@ export type GrantDoc = Grant & Document;
|
|
|
15
15
|
export type GrantDto = Dto<Omit<Grant, 'time'>> & {
|
|
16
16
|
time?: Dto<GrantTime>[];
|
|
17
17
|
};
|
|
18
|
+
export type GrantItemsDto = Items<GrantDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { ValueType } from '../../enums';
|
|
3
|
-
import { Core, Dto, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
4
4
|
export interface Config<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
key: string;
|
|
6
6
|
type: ValueType;
|
|
@@ -8,3 +8,4 @@ export interface Config<Props extends Properties = Properties> extends Core<Prop
|
|
|
8
8
|
}
|
|
9
9
|
export type ConfigDoc = Config & Document;
|
|
10
10
|
export type ConfigDto = Dto<Config>;
|
|
11
|
+
export type ConfigItemsDto = Items<ConfigDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { ValueType } from '../../enums';
|
|
3
|
-
import { Core, Dto, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
4
4
|
export interface Setting<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
key: string;
|
|
6
6
|
type: ValueType;
|
|
@@ -8,3 +8,4 @@ export interface Setting<Props extends Properties = Properties> extends Core<Pro
|
|
|
8
8
|
}
|
|
9
9
|
export type SettingDoc = Setting & Document;
|
|
10
10
|
export type SettingDto = Dto<Setting>;
|
|
11
|
+
export type SettingItemsDto = Items<SettingDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { AppChangeLog } from './change-log.interface';
|
|
3
|
-
import { Core, Dto, Properties } from '../../common';
|
|
3
|
+
import { Core, Dto, Items, Properties } from '../../common';
|
|
4
4
|
import { AppType, GrantType, Scope, Status } from '../../../enums';
|
|
5
5
|
export interface App<Props extends Properties = Properties> extends Core<Props> {
|
|
6
6
|
cid: string;
|
|
@@ -23,3 +23,4 @@ export type AppDoc = App & Document;
|
|
|
23
23
|
export type AppDto = Dto<Omit<App, 'change_logs'>> & {
|
|
24
24
|
change_logs?: Dto<AppChangeLog>[];
|
|
25
25
|
};
|
|
26
|
+
export type AppItemsDto = Items<AppDto>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
3
2
|
import { ClientDomain, ClientDomainDto } from './domain.interface';
|
|
4
3
|
import { ClientService, ClientServiceDto } from './service.interface';
|
|
4
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../../common';
|
|
5
5
|
import { ClientPlan, GrantType, Scope, State, Status } from '../../../enums';
|
|
6
6
|
export type ApiToken = {
|
|
7
7
|
cid: string;
|
|
@@ -37,3 +37,4 @@ export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'services'>, '
|
|
|
37
37
|
domains: ClientDomainDto[];
|
|
38
38
|
services?: ClientServiceDto[];
|
|
39
39
|
};
|
|
40
|
+
export type ClientItemsDto = Items<ClientDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { AccountBroker, AccountOwnership, AccountProvider, AccountType } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Account<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
type: AccountType;
|
|
6
6
|
broker: AccountBroker;
|
|
@@ -10,3 +10,4 @@ export interface Account<Props extends Properties = Properties> extends Core<Pro
|
|
|
10
10
|
}
|
|
11
11
|
export type AccountDoc = Account & Document;
|
|
12
12
|
export type AccountDto = Dto<MakeOptional<Account, 'broker' | 'members' | 'provider'>>;
|
|
13
|
+
export type AccountItemsDto = Items<AccountDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { CoinUnit, CoinUnitDto } from './unit.interface';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../../common';
|
|
4
4
|
import { CoinCategory, CoinLib, CoinProvider, CoinType } from '../../../enums';
|
|
5
5
|
export interface Coin<Props extends Properties = Properties> extends Core<Props> {
|
|
6
6
|
type: CoinType;
|
|
@@ -23,3 +23,4 @@ export type CoinDoc = Coin & Document;
|
|
|
23
23
|
export type CoinDto = Dto<MakeOptional<Omit<Coin, 'subunits'>, 'precision'>> & {
|
|
24
24
|
subunits?: CoinUnitDto[];
|
|
25
25
|
};
|
|
26
|
+
export type CoinItemsDto = Items<CoinDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { Pay, PayDto } from './common';
|
|
3
|
-
import { Core, Dto, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
4
4
|
import { TransactionReason, TransactionState, TransactionType } from '../../enums';
|
|
5
5
|
export interface Transaction<Props extends Properties = Properties> extends Core<Props> {
|
|
6
6
|
type: TransactionType;
|
|
@@ -18,3 +18,4 @@ export type TransactionDto = Dto<Omit<Transaction, 'payers' | 'payees'>> & {
|
|
|
18
18
|
payees?: PayDto[];
|
|
19
19
|
payers?: PayDto[];
|
|
20
20
|
};
|
|
21
|
+
export type TransactionItemsDto = Items<TransactionDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { WalletProvider } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Wallet<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
coin: string;
|
|
6
6
|
account: string;
|
|
@@ -14,3 +14,4 @@ export interface Wallet<Props extends Properties = Properties> extends Core<Prop
|
|
|
14
14
|
}
|
|
15
15
|
export type WalletDoc = Wallet & Document;
|
|
16
16
|
export type WalletDto = Dto<MakeOptional<Wallet, 'provider'>>;
|
|
17
|
+
export type WalletItemsDto = Items<WalletDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { ValueType } from '../../enums';
|
|
3
|
-
import { Core, Dto, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
4
4
|
export interface Artifact<T = any, Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
key: string;
|
|
6
6
|
type: ValueType;
|
|
@@ -8,3 +8,4 @@ export interface Artifact<T = any, Props extends Properties = Properties> extend
|
|
|
8
8
|
}
|
|
9
9
|
export type ArtifactDoc<T = any> = Artifact<T> & Document;
|
|
10
10
|
export type ArtifactDto<T = any> = Dto<Artifact<T>>;
|
|
11
|
+
export type ArtifactItemsDto = Items<ArtifactDto>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { WorkflowStatus } from '../../../enums';
|
|
3
3
|
import { WorkflowToken } from './token.interface';
|
|
4
|
-
import { Core, Dto, Properties } from '../../common';
|
|
4
|
+
import { Core, Dto, Items, Properties } from '../../common';
|
|
5
5
|
export interface Workflow<D = any, V = any, Props extends Properties = Properties> extends Core<Props> {
|
|
6
6
|
entity: string;
|
|
7
7
|
identity: string;
|
|
@@ -13,3 +13,4 @@ export type WorkflowDoc<D = any, V = any> = Workflow<D, V> & Document;
|
|
|
13
13
|
export type WorkflowDto<D = any, V = any> = Dto<Omit<Workflow<D, V>, 'tokens'> & {
|
|
14
14
|
tokens: WorkflowToken<V>[];
|
|
15
15
|
}>;
|
|
16
|
+
export type WorkflowItemsDto = Items<WorkflowDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { Gender, ProfileType, State } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Profile<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
type: ProfileType;
|
|
6
6
|
state: State;
|
|
@@ -20,3 +20,4 @@ export interface Profile<Props extends Properties = Properties> extends Core<Pro
|
|
|
20
20
|
}
|
|
21
21
|
export type ProfileDoc = Profile & Document;
|
|
22
22
|
export type ProfileDto = Dto<MakeOptional<Profile, 'state' | 'gender' | 'type'>>;
|
|
23
|
+
export type ProfileItemsDto = Items<ProfileDto>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, Properties } from '../common';
|
|
2
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
3
3
|
export interface Session<Props extends Properties = Properties> extends Core<Props> {
|
|
4
4
|
ip: string;
|
|
5
5
|
agent: string;
|
|
@@ -7,3 +7,4 @@ export interface Session<Props extends Properties = Properties> extends Core<Pro
|
|
|
7
7
|
}
|
|
8
8
|
export type SessionDoc = Session & Document;
|
|
9
9
|
export type SessionDto = Dto<Session>;
|
|
10
|
+
export type SessionItemsDto = Items<SessionDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { Status, UserMFA, UserOAuth } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface User<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
status: Status;
|
|
6
6
|
tz: string;
|
|
@@ -16,3 +16,4 @@ export interface User<Props extends Properties = Properties> extends Core<Props>
|
|
|
16
16
|
}
|
|
17
17
|
export type UserDoc = User & Document;
|
|
18
18
|
export type UserDto = Dto<MakeOptional<User, 'tz' | 'lang'>>;
|
|
19
|
+
export type UserItemsDto = Items<UserDto>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, Properties } from '../common';
|
|
2
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
3
3
|
export interface Cargo<Props extends Properties = Properties> extends Core<Props> {
|
|
4
4
|
title?: string;
|
|
5
5
|
product?: string;
|
|
@@ -13,3 +13,4 @@ export interface Cargo<Props extends Properties = Properties> extends Core<Props
|
|
|
13
13
|
}
|
|
14
14
|
export type CargoDoc = Cargo & Document;
|
|
15
15
|
export type CargoDto = Dto<Cargo>;
|
|
16
|
+
export type CargoItemsDto = Items<CargoDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { DriverType, Gender, State, Status } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Driver<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
type: DriverType;
|
|
6
6
|
gender: Gender;
|
|
@@ -14,3 +14,4 @@ export interface Driver<Props extends Properties = Properties> extends Core<Prop
|
|
|
14
14
|
}
|
|
15
15
|
export type DriverDoc = Driver & Document;
|
|
16
16
|
export type DriverDto = Dto<MakeOptional<Driver, 'state' | 'status'>>;
|
|
17
|
+
export type DriverItemsDto = Items<DriverDto>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boundary-administrative.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/boundary-administrative.interface.ts"],"names":[],"mappings":""}
|
|
@@ -16,4 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./location.interface"), exports);
|
|
18
18
|
__exportStar(require("./geometry.interface"), exports);
|
|
19
|
+
__exportStar(require("./lat-lng.interface"), exports);
|
|
20
|
+
__exportStar(require("./boundary-administrative.interface"), exports);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC;AAErC,sDAAoC;AACpC,sEAAoD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lat-lng.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/lat-lng.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, Geometry, Properties } from '../../common';
|
|
2
|
+
import { Core, Dto, Geometry, Items, Properties } from '../../common';
|
|
3
3
|
export interface Location<Props extends Properties = Properties> extends Core<Props> {
|
|
4
4
|
identity?: string;
|
|
5
5
|
geometry: Geometry;
|
|
6
6
|
}
|
|
7
7
|
export type LocationDoc = Location & Document;
|
|
8
8
|
export type LocationDto = Dto<Location>;
|
|
9
|
+
export type LocationItemsDto = Items<LocationDto>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, Properties } from '../common';
|
|
2
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
3
3
|
export interface Travel<Props extends Properties = Properties> extends Core<Props> {
|
|
4
4
|
cargoes?: string[];
|
|
5
5
|
drivers?: string[];
|
|
@@ -8,3 +8,4 @@ export interface Travel<Props extends Properties = Properties> extends Core<Prop
|
|
|
8
8
|
}
|
|
9
9
|
export type TravelDoc = Travel & Document;
|
|
10
10
|
export type TravelDto = Dto<Travel>;
|
|
11
|
+
export type TravelItemsDto = Items<TravelDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { Status, VehicleType } from '../../enums';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Vehicle<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
type: VehicleType;
|
|
6
6
|
status: Status;
|
|
@@ -9,3 +9,4 @@ export interface Vehicle<Props extends Properties = Properties> extends Core<Pro
|
|
|
9
9
|
}
|
|
10
10
|
export type VehicleDoc = Vehicle & Document;
|
|
11
11
|
export type VehicleDto = Dto<MakeOptional<Vehicle, 'status'>>;
|
|
12
|
+
export type VehicleItemsDto = Items<VehicleDto>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { Core, Dto, Properties } from '../common';
|
|
2
|
+
import { Core, Dto, Items, Properties } from '../common';
|
|
3
3
|
export interface File<Props extends Properties = Properties> extends Core<Props> {
|
|
4
4
|
field?: string;
|
|
5
5
|
original: string;
|
|
@@ -16,3 +16,4 @@ export interface File<Props extends Properties = Properties> extends Core<Props>
|
|
|
16
16
|
}
|
|
17
17
|
export type FileDoc = File & Document;
|
|
18
18
|
export type FileDto = Dto<File>;
|
|
19
|
+
export type FileItemsDto = Items<FileDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { StatType } from '../../enums';
|
|
3
|
-
import { Core, Dto, Flags, MakeOptional, Properties } from '../common';
|
|
3
|
+
import { Core, Dto, Flags, Items, MakeOptional, Properties } from '../common';
|
|
4
4
|
export interface Stat<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
type: StatType;
|
|
6
6
|
key: string;
|
|
@@ -18,3 +18,4 @@ export type StatDto = Dto<MakeOptional<Stat, 'year'> & {
|
|
|
18
18
|
alpha?: number;
|
|
19
19
|
hour?: number;
|
|
20
20
|
}>;
|
|
21
|
+
export type StatItemsDto = Items<StatDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { MailSmtp } from './smtp.interface';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../../common';
|
|
4
4
|
export interface Mail<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
to: string[];
|
|
6
6
|
cc?: string[];
|
|
@@ -17,3 +17,4 @@ export interface Mail<Props extends Properties = Properties> extends Core<Props>
|
|
|
17
17
|
}
|
|
18
18
|
export type MailDoc = Mail & Document;
|
|
19
19
|
export type MailDto = Dto<MakeOptional<Mail, 'from'>>;
|
|
20
|
+
export type MailItemsDto = Items<MailDto>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { PushKeys } from './keys.interface';
|
|
3
|
-
import { Core, Dto, MakeOptional, Properties } from '../../common';
|
|
3
|
+
import { Core, Dto, Items, MakeOptional, Properties } from '../../common';
|
|
4
4
|
export interface Push<Props extends Properties = Properties> extends Core<Props> {
|
|
5
5
|
domain: string;
|
|
6
6
|
session: string;
|
|
@@ -13,3 +13,4 @@ export interface Push<Props extends Properties = Properties> extends Core<Props>
|
|
|
13
13
|
}
|
|
14
14
|
export type PushDoc = Push & Document;
|
|
15
15
|
export type PushDto = Dto<MakeOptional<Push, 'domain' | 'session' | 'identity'>>;
|
|
16
|
+
export type PushItemsDto = Items<PushDto>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BoundaryAdministrative, LatLng, LatLngDto, Location, LocationDto } from '../../common/interfaces';
|
|
3
|
+
import { RequestConfig, RestfulService } from '../../common/classes';
|
|
4
4
|
export declare class LocationsService extends RestfulService<Location, LocationDto> {
|
|
5
5
|
protected axios: AxiosInstance;
|
|
6
6
|
constructor(axios: AxiosInstance);
|
|
7
|
+
locationToAddress(data: LatLngDto, config?: RequestConfig<LatLng>): Promise<BoundaryAdministrative>;
|
|
7
8
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.LocationsService = void 0;
|
|
4
13
|
const classes_1 = require("../../common/classes");
|
|
@@ -7,6 +16,11 @@ class LocationsService extends classes_1.RestfulService {
|
|
|
7
16
|
super('locations', axios);
|
|
8
17
|
this.axios = axios;
|
|
9
18
|
}
|
|
19
|
+
locationToAddress(data, config) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return this.post(this.url('location-to-address'), data, config);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
10
24
|
}
|
|
11
25
|
exports.LocationsService = LocationsService;
|
|
12
26
|
//# sourceMappingURL=locations.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,kDAAqE;AAErE,MAAa,gBAAiB,SAAQ,wBAAqC;IACzE,YAAsB,KAAoB;QACxC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QADN,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,iBAAiB,CACrB,IAAe,EACf,MAA8B;;YAE9B,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAC/B,IAAI,EACJ,MAAM,CACP,CAAC;QACJ,CAAC;KAAA;CACF;AAfD,4CAeC"}
|
|
@@ -20,7 +20,7 @@ class FilesService extends classes_1.RestfulService {
|
|
|
20
20
|
return __awaiter(this, arguments, void 0, function* (id, config = {}, responseType = 'blob') {
|
|
21
21
|
config.responseType = responseType;
|
|
22
22
|
const url = this.url(`download/${id}`);
|
|
23
|
-
return
|
|
23
|
+
return this.get(url, config);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
upload(items_1, scope_1) {
|
|
@@ -33,7 +33,7 @@ class FilesService extends classes_1.RestfulService {
|
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
35
|
const url = this.url(`upload/${scope}`);
|
|
36
|
-
return
|
|
36
|
+
return this.post(url, form, config);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,kDAAqE;AAErE,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,QAAQ;6DACZ,EAAU,EACV,SAA8B,EAAE,EAChC,eAA6B,MAAM;YAEnC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,kDAAqE;AAErE,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,QAAQ;6DACZ,EAAU,EACV,SAA8B,EAAE,EAChC,eAA6B,MAAM;YAEnC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO,IAAI,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC;KAAA;IAEK,MAAM;6DACV,KAA2C,EAC3C,KAA2B,EAC3B,SAA8B,EAAE;YAEhC,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAExE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;gBACpB,OAAO,EAAE;oBACP,cAAc,EAAE,qBAAqB;iBACtC;aACF,CAAC,CAAC;YAEH,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC,IAAI,CAA+B,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACpE,CAAC;KAAA;CACF;AAhCD,oCAgCC"}
|
|
@@ -18,7 +18,7 @@ class MailsService extends classes_1.RestfulService {
|
|
|
18
18
|
}
|
|
19
19
|
send(data, config) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
return
|
|
21
|
+
return this.post(this.url('send'), data, config);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mails.service.js","sourceRoot":"","sources":["../../src/services/touch/mails.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kDAAqE;AAErE,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,IAAI,CAAC,IAAa,EAAE,MAA4B;;YACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"mails.service.js","sourceRoot":"","sources":["../../src/services/touch/mails.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kDAAqE;AAErE,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,IAAI,CAAC,IAAa,EAAE,MAA4B;;YACpD,OAAO,IAAI,CAAC,IAAI,CAA4B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9E,CAAC;KAAA;CACF;AARD,oCAQC"}
|