Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@qiwi/substrate-types

Package Overview
Dependencies
Maintainers
5
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qiwi/substrate-types - npm Package Compare versions

Comparing version 1.46.0 to 1.46.1

15

CHANGELOG.md

@@ -0,1 +1,16 @@

## @qiwi/substrate-types [1.46.1](https://github.com/qiwi/substrate/compare/@qiwi/substrate-types@1.46.0...@qiwi/substrate-types@1.46.1) (2020-10-04)
### Performance Improvements
* **deps:** up deps ([2397181](https://github.com/qiwi/substrate/commit/23971816b886fc8f4e265c656de09b47ac8d2ba6))
### Dependencies
* **@qiwi/substrate-infra:** upgraded to 1.0.1
# @qiwi/substrate-types [1.46.0](https://github.com/qiwi/substrate/compare/@qiwi/substrate-types@1.45.0...@qiwi/substrate-types@1.46.0) (2020-09-12)

@@ -2,0 +17,0 @@

1370

flow-typed/index.flow.js

@@ -7,692 +7,12 @@ /**

declare module "@qiwi/substrate-types/target/es5/IAnyMap" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type IAnyMap = {
[key: string]: any,
[key: number]: any,
...
};
}
declare module "@qiwi/substrate-types/target/es5" {
declare export * from "@qiwi/substrate-types/target/es5/export"
declare module "@qiwi/substrate-types/target/es5/ILogger" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type ILoggerMethod = (...args: any[]) => void;
declare export * from "@qiwi/substrate-types/target/es5/aliases"
declare export var LogLevel: {|
+ERROR: "error", // "error"
+WARN: "warn", // "warn"
+INFO: "info", // "info"
+DEBUG: "debug", // "debug"
+TRACE: "trace", // "trace"
|};
declare export * from "@qiwi/substrate-types/target/es5/helpers"
declare export interface ILogger {
trace: ILoggerMethod;
debug: ILoggerMethod;
info: ILoggerMethod;
log: ILoggerMethod;
warn: ILoggerMethod;
error: ILoggerMethod;
fatal?: ILoggerMethod;
[key: string]: any;
[key: number]: any;
}
declare export * from "@qiwi/substrate-types/target/es5/extras"
}
declare module "@qiwi/substrate-types/target/es5/helpers" {
declare export type UnionToIntersection<
U
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export function mkenum<
T: {
[index: string]: U,
...
},
U: string
>(
x: T
): T;
declare export type EnumType<T> = $ElementType<T, $Keys<T>>;
declare export type PrependTuple<
A,
T: Array<any>
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export type Extends<
T,
E,
R1,
R2
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export type ExtendsOrNever<T, E> = Extends<T, E, T, empty>;
declare export type RecursivePartial<T> = $ObjMapi<
T,
<P>(
P
) => /* Flow doesn't support conditional types, use `$Call` utility type */ any
>;
}
declare module "@qiwi/substrate-types/target/es5/IDeviceInfo" {
import type { RecursivePartial } from "@qiwi/substrate-types/target/es5/helpers";
declare export type IBrowserInfo = RecursivePartial<{
name: string | null,
version: string | null,
layout: string | null,
...
}>;
declare export type IOperationalSystemInfo = RecursivePartial<{
name: string | null,
architecture: number | null,
family: string | null,
version: string | null,
...
}>;
declare export type IDeviceInfo = RecursivePartial<{
browser: IBrowserInfo,
model: {
name: string | null,
manufacturer: string | null,
...
},
isMobile: boolean,
os: IOperationalSystemInfo,
...
}>;
}
declare module "@qiwi/substrate-types/target/es5/IClientEventDto" {
import type { LogLevel } from "@qiwi/substrate-types/target/es5/ILogger";
import type { IDeviceInfo } from "@qiwi/substrate-types/target/es5/IDeviceInfo";
import type { RecursivePartial } from "@qiwi/substrate-types/target/es5/helpers";
declare export var EnvironmentProfile: {|
+CI: "ci", // "ci"
+DEV: "development", // "development"
+TEST: "testing", // "testing"
+PROD: "prod", // "prod"
+STAGE: "staging", // "staging"
|};
declare type TClientEventMeta = RecursivePartial<{
appName: string,
appHost: string,
appVersion: string,
appNamespace: string,
appConfig: { [key: string]: any, ... },
envProfile: $Values<typeof EnvironmentProfile>,
deviceInfo: IDeviceInfo & { [key: string]: any, ... },
...
}>;
declare export type IClientEventMeta = TClientEventMeta;
declare export interface IClientEventDto {
message: string;
tags?: Array<string>;
code?: string;
level?: LogLevel;
meta?: IClientEventMeta;
details?: { [key: string]: any, ... };
stacktrace?: any;
timestamp?: number | string;
}
declare export {};
}
declare module "@qiwi/substrate-types/target/es5/ICloneable" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export interface ICloneable<T> {
clone(): T;
}
}
declare module "@qiwi/substrate-types/target/es5/ICollection" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type ICollectionItem = any;
declare export interface ICollection<T> {
get: (index: number | string) => T | void;
add: (index: number | string, item: T) => T;
remove: (index: number | string) => T | void;
clear: () => void;
size: number;
isEmpty: () => boolean;
}
}
declare module "@qiwi/substrate-types/target/es5/IConfig" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TConfigKey = string;
declare export interface IConfig<T = any> {
set?: (key: TConfigKey, value: T) => void;
get: (key: TConfigKey) => T;
has: (key: TConfigKey) => boolean;
delete?: (key: TConfigKey) => void;
clear?: () => void;
size?: number;
[key: string]: any;
}
}
declare module "@qiwi/substrate-types/target/es5/IConfigurable" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export interface IConfigurable {
setConfig: (options?: any) => void;
getConfig: () => any;
}
}
declare module "@qiwi/substrate-types/target/es5/IConstructor" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type Abstract<T = { [key: string]: any }> = Function & {
prototype: T,
...
};
declare export type IConstructor<
T = { [key: string]: any },
A: any[] = any[]
> = (...args: A) => T;
declare export type IClass<T = { [key: string]: any }> = Abstract<T> &
IConstructor<T>;
declare export type IConstructable<
T = { [key: string]: any },
A: any[] = any[]
> = IConstructor<T, A>;
}
declare module "@qiwi/substrate-types/target/es5/ICurrency" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type ICurrency = string;
}
declare module "@qiwi/substrate-types/target/es5/IEnableable" {
declare export interface IEnableable {
enable(): void;
disable(): void;
}
}
declare module "@qiwi/substrate-types/target/es5/IEventEmitter" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type IEventListener = (...args: any[]) => void;
declare export type IEmitterMethod = (
type: string,
listener: IEventListener
) => void;
declare export interface IEventEmitter {
emit(type: string, ...args: any[]): void;
off: IEmitterMethod;
on: IEmitterMethod;
once: IEmitterMethod;
}
}
declare module "@qiwi/substrate-types/target/es5/IExecutionMode" {
declare export var IExecutionMode: {|
+SYNC: "sync", // "sync"
+ASYNC: "async", // "async"
|};
}
declare module "@qiwi/substrate-types/target/es5/IExtra" {
declare export type IExtra<K: string, V> = $ObjMapi<
{ [k: K]: any },
<key>(key) => V
>;
}
declare module "@qiwi/substrate-types/target/es5/IFunction" {
declare export type IFunction<A: any[] = any[], R = any> = (...args: A) => R;
declare export type IFn<A: any[] = any[], R = any> = IFunction<A, R>;
declare export type ICallable<A: any[] = any[], R = any> = IFunction<A, R>;
declare export type IUnaryFunction<A = any, R = any> = (a: A) => R;
declare export type IUnaryFn<A = any, R = any> = IUnaryFunction<A, R>;
}
declare module "@qiwi/substrate-types/target/es5/IPromise" {
import type { IConstructor } from "@qiwi/substrate-types/target/es5/IConstructor";
declare export type TPromiseExecutor<TValue = any, TReason = any> = (
resolve: (value: TValue) => void,
reject: (reason: TReason) => void
) => void;
declare export type IPromiseConstructor<TValue = any, TReason = any> = {
new(executor: TPromiseExecutor<TValue>): IPromise<TValue, TReason>,
all: (
values: Iterable<IPromise<TValue, TReason>>
) => IPromise<TValue[], TReason>,
race: (
values: Iterable<IPromise<TValue, TReason>>
) => IPromise<TValue, TReason>,
reject: (reason?: TReason) => IPromise<TValue, TReason>,
resolve: (value?: TValue) => IPromise<TValue, TReason>,
...
} & IConstructor<IPromise<TValue, TReason>>;
declare export interface IPromise<TValue = any, TReason = any> {
then: (
onSuccess?: (value: TValue) => any,
onReject?: (reason: TReason) => any
) => IPromise<>;
catch: (onReject: (reason: TReason) => any) => IPromise<>;
finally: (onFinally: () => any) => IPromise<>;
+[typeof Symbol.toStringTag]: string;
}
declare export var IPromise: PromiseConstructor;
}
declare module "@qiwi/substrate-types/target/es5/IHttpClient" {
import type { IPromise } from "@qiwi/substrate-types/target/es5/IPromise";
declare export var HttpMethod: {|
+GET: "GET", // "GET"
+DELETE: "DELETE", // "DELETE"
+HEAD: "HEAD", // "HEAD"
+OPTIONS: "OPTIONS", // "OPTIONS"
+POST: "POST", // "POST"
+PUT: "PUT", // "PUT"
+PATCH: "PATCH", // "PATCH"
|};
declare export type IHttpRequestProvider = IFetch<> | IHttpClient<>;
declare export type IHttpHeaders = { [key: string]: any, ... };
declare export interface IHttpResponse<D = any> {
status: number;
statusText: string;
headers: IHttpHeaders;
data: D;
}
declare export interface IFetchResponse<D = any> {
status: number;
statusText: string;
headers: any;
json(): IPromise<D>;
body: any;
}
declare interface IHttpRequest {
url?: string;
method?: $Values<typeof HttpMethod>;
headers?: IHttpHeaders;
params?: any;
body?: any;
data?: any;
}
declare export interface IFetch<
Req: IHttpRequest = IHttpRequest,
Res: IFetchResponse<> = IFetchResponse<>
> {
<D>(
url: string,
req?: Req
): IPromise<Omit<Res, "json"> & IFetchResponse<D>>;
}
declare export interface IHttpReqPerform<
Req = IHttpRequest,
Res = IHttpResponse<>
> {
<D>(
url: string,
body?: any,
req?: Req
): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
<D>(url: string, req?: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
}
declare export interface IHttpClient<
Req: IHttpRequest = IHttpRequest,
Res: IHttpResponse<> = IHttpResponse<>
> {
<D>(req: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
<D>(url: string, req?: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
get: IHttpReqPerform<Req, Res>;
post: IHttpReqPerform<Req, Res>;
put: IHttpReqPerform<Req, Res>;
patch: IHttpReqPerform<Req, Res>;
head: IHttpReqPerform<Req, Res>;
delete: IHttpReqPerform<Req, Res>;
options: IHttpReqPerform<Req, Res>;
}
declare export {};
}
declare module "@qiwi/substrate-types/target/es5/IIterable" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export interface IIteratorResult {
value: any;
done: boolean;
}
declare export interface IIterator {
next(): {
value: any,
done: boolean,
...
};
}
declare export interface IIterable {
@@iterator: () => IIterator;
}
}
declare module "@qiwi/substrate-types/target/es5/IMetadata" {
declare export interface IMetadataProvider {
defineMetadata(
metadataKey: any,
metadataValue: any,
target: any,
propertyKey?: string | Symbol
): void;
hasMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): boolean;
getMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): any;
getOwnMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): any;
}
}
declare module "@qiwi/substrate-types/target/es5/IMiddleware" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export interface IRequest {
res?: IResponse;
[key: string]: any;
}
declare export interface IResponse {
status: (status: number) => IResponse;
send: (arg: string | { [key: string]: any }) => IResponse;
json: () => IResponse;
req?: IRequest;
[key: string]: any;
}
declare export interface INext {
(...args: any[]): any;
}
declare export interface IRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): void;
}
declare export interface IErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): void;
}
declare export type IMiddleware = IRequestMiddleware | IErrorMiddleware;
declare export interface IAsyncRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
declare export interface IAsyncErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
declare export type IAsyncMiddleware =
| IAsyncRequestMiddleware
| IAsyncErrorMiddleware;
}
declare module "@qiwi/substrate-types/target/es5/IMoney" {
import type { ICurrency } from "@qiwi/substrate-types/target/es5/ICurrency";
declare export type IValue = number;
declare export interface IMoney {
value: IValue;
currency: ICurrency;
toString: () => string;
}
}
declare module "@qiwi/substrate-types/target/es5/INil" {
declare export type INil = null | void;
declare export type INullOrUndefined = INil;
}
declare module "@qiwi/substrate-types/target/es5/INormalValue" {
import type { IAnyMap } from "@qiwi/substrate-types/target/es5/IAnyMap";
import type { UnionToIntersection } from "@qiwi/substrate-types/target/es5/helpers";
declare export interface IIdentified {
id: string | number | Symbol;
}
declare export type IWrappedValue<
V = any,
W = Object
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any & {
value: V,
...
};
declare export type ITyped<T = any> = {
type: T,
...
};
declare export type ITypedValue<V = any, T = any> = IWrappedValue<
V,
ITyped<T>
>;
declare export type IMeted<M: IAnyMap = IAnyMap> = {
meta: M,
...
};
declare export type IMetedValue<
V = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, IMeted<M>>;
declare export type IMetaTyped<T = any, M: IAnyMap = IAnyMap> = ITyped<T> &
IMeted<M>;
declare export type IMetaTypedValue<
V = any,
T = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, IMetaTyped<T, M>>;
declare export type INormalValue<
V = any,
T = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, [IMetaTyped<T, M>, IIdentified]>;
}
declare module "@qiwi/substrate-types/target/es5/IPipeline" {
import type { IUnaryFn } from "@qiwi/substrate-types/target/es5/IFunction";
import type { INormalValue } from "@qiwi/substrate-types/target/es5/INormalValue";
declare export type IPipe<E = any> = IUnaryFn<E, E>;
declare export type IPipeline<P: IPipe<> = IPipe<>> = Array<P>;
declare export type INormalPipe<E: INormalValue = INormalValue> = IPipe<E>;
declare export type INormalPipeline<
P: INormalPipe<> = INormalPipe<>
> = IPipeline<P>;
}
declare module "@qiwi/substrate-types/target/es5/IStringMap" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type IStringMap = {
[key: string]: string,
...
};
}
declare module "@qiwi/substrate-types/target/es5/IUtilGet" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TUtilGetPath = Array<string | number> | string;
declare export type TUtilGetObject = { [key: string]: any };
declare export type TUtilGetDefaultValue = any;
declare export type TUtilGetResponse = any;
declare export type TUtilGet = (
obj: TUtilGetObject,
path: TUtilGetPath,
defaultValue?: TUtilGetDefaultValue
) => TUtilGetResponse;
}
declare module "@qiwi/substrate-types/target/es5/IUtilSet" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TUtilSetPath = Array<string | number> | string;
declare export type TUtilSetObject = { [key: string]: any };
declare export type TUtilSetValue = any;
declare export type TUtilSet = (
obj: TUtilSetObject,
path: TUtilSetPath,
value: TUtilSetValue
) => void;
}
declare module "@qiwi/substrate-types/target/es5/IUtilEach" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TUtilEachCollection = any[] | { [key: string]: any };
declare export type TUtilEachHandler = (
value: any,
key?: string | number,
collection?: TUtilEachCollection
) => void;
declare export type TUtilEach = (
collection: TUtilEachCollection,
handler: TUtilEachHandler
) => TUtilEachCollection;
}
declare module "@qiwi/substrate-types/target/es5/IUtilMap" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TUtilMapCollection = any[] | { [key: string]: any };
declare export type TUtilMapHandler = (
value: any,
key?: string | number,
collection?: TUtilMapCollection
) => any;
declare export type TUtilMap = (
collection: TUtilMapCollection,
handler: TUtilMapHandler
) => any[];
}
declare module "@qiwi/substrate-types/target/es5/IStorage" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TStorageKey = string;
declare export type TStorageValue = any;
declare export type TStorageTTL = number;
declare export interface IStorage {
get: (key: TStorageKey) => TStorageValue;
set: (key: TStorageKey, value: TStorageValue, ttl?: TStorageTTL) => void;
has: (key: TStorageKey) => boolean;
remove: (key: TStorageKey) => void;
size: () => number;
reset: () => void;
}
}
declare module "@qiwi/substrate-types/target/es5/IStack" {
import type { ICollection } from "@qiwi/substrate-types/target/es5/ICollection";
declare export type IStackItem = any;
declare export type IStack<T> = {
push: (...items: Array<T>) => T,
pop: () => T | void,
unshift: (...items: Array<T>) => T,
shift: () => T | void,
indexOf: (item: T) => number,
first: () => T | void,
last: () => T | void,
toArray(): Array<T>,
...
} & ICollection<T>;
}
declare module "@qiwi/substrate-types/target/es5/TPredicate" {
/**
* @module
* @qiwi /substrate-types
*/
/**
*/
declare export type TPredicate = (...args: any[]) => boolean;
}
declare module "@qiwi/substrate-types/target/es5/export" {

@@ -832,32 +152,2 @@ declare export { IStringMap } from "@qiwi/substrate-types/target/es5/IStringMap";

declare module "@qiwi/substrate-types/target/es5/IPool" {
import type { IPromise } from "@qiwi/substrate-types/target/es5/export";
declare export var IPooledObjectStatus: {|
+READY: "ready", // "ready"
+ACTIVE: "active", // "active"
+INVALID: "invalid", // "invalid"
|};
declare export interface IPooledObject<T> {
ref: T;
status: $Values<typeof IPooledObjectStatus>;
activate(): void;
passivate(): void;
destroy(): void;
validate(): boolean;
[key: string]: any;
}
declare export interface IPooledObjectFactory<T> {
(...args: any[]): IPooledObject<T>;
}
declare export interface IPool<T> {
factory: IPooledObjectFactory<T>;
borrow(): IPromise<T>;
release(instance: T): void;
invalidate(instance: T): void;
[key: string]: any;
}
}
declare module "@qiwi/substrate-types/target/es5/aliases" {

@@ -991,2 +281,36 @@ declare export { IStringMap as StringMap } from "@qiwi/substrate-types/target/es5/IStringMap";

declare module "@qiwi/substrate-types/target/es5/helpers" {
declare export type UnionToIntersection<
U
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export function mkenum<
T: {
[index: string]: U,
...
},
U: string
>(
x: T
): T;
declare export type EnumType<T> = $ElementType<T, $Keys<T>>;
declare export type PrependTuple<
A,
T: Array<any>
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export type Extends<
T,
E,
R1,
R2
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any;
declare export type ExtendsOrNever<T, E> = Extends<T, E, T, empty>;
declare export type RecursivePartial<T> = $ObjMapi<
T,
<P>(
P
) => /* Flow doesn't support conditional types, use `$Call` utility type */ any
>;
}
declare module "@qiwi/substrate-types/target/es5/extras" {

@@ -1001,14 +325,618 @@ import type { IExtra } from "@qiwi/substrate-types/target/es5/IExtra";

declare module "@qiwi/substrate-types/target/es5/index" {
declare export * from "@qiwi/substrate-types/target/es5/export"
declare module "@qiwi/substrate-types/target/es5/IStringMap" {
/**
*/
declare export type IStringMap = {
[key: string]: string,
...
};
}
declare export * from "@qiwi/substrate-types/target/es5/aliases"
declare module "@qiwi/substrate-types/target/es5/IAnyMap" {
/**
*/
declare export type IAnyMap = {
[key: string]: any,
[key: number]: any,
...
};
}
declare export * from "@qiwi/substrate-types/target/es5/helpers"
declare module "@qiwi/substrate-types/target/es5/IEventEmitter" {
/**
*/
declare export type IEventListener = (...args: any[]) => void;
declare export type IEmitterMethod = (
type: string,
listener: IEventListener
) => void;
declare export interface IEventEmitter {
emit(type: string, ...args: any[]): void;
off: IEmitterMethod;
on: IEmitterMethod;
once: IEmitterMethod;
}
}
declare export * from "@qiwi/substrate-types/target/es5/extras"
declare module "@qiwi/substrate-types/target/es5/ILogger" {
/**
*/
declare export type ILoggerMethod = (...args: any[]) => void;
declare export var LogLevel: {|
+ERROR: "error", // "error"
+WARN: "warn", // "warn"
+INFO: "info", // "info"
+DEBUG: "debug", // "debug"
+TRACE: "trace", // "trace"
|};
declare export interface ILogger {
trace: ILoggerMethod;
debug: ILoggerMethod;
info: ILoggerMethod;
log: ILoggerMethod;
warn: ILoggerMethod;
error: ILoggerMethod;
fatal?: ILoggerMethod;
[key: string]: any;
[key: number]: any;
}
}
declare module "@qiwi/substrate-types/target/es5/IUtilGet" {
/**
*/
declare export type TUtilGetPath = Array<string | number> | string;
declare export type TUtilGetObject = { [key: string]: any };
declare export type TUtilGetDefaultValue = any;
declare export type TUtilGetResponse = any;
declare export type TUtilGet = (
obj: TUtilGetObject,
path: TUtilGetPath,
defaultValue?: TUtilGetDefaultValue
) => TUtilGetResponse;
}
declare module "@qiwi/substrate-types/target/es5/IUtilSet" {
/**
*/
declare export type TUtilSetPath = Array<string | number> | string;
declare export type TUtilSetObject = { [key: string]: any };
declare export type TUtilSetValue = any;
declare export type TUtilSet = (
obj: TUtilSetObject,
path: TUtilSetPath,
value: TUtilSetValue
) => void;
}
declare module "@qiwi/substrate-types/target/es5/IUtilEach" {
/**
*/
declare export type TUtilEachCollection = any[] | { [key: string]: any };
declare export type TUtilEachHandler = (
value: any,
key?: string | number,
collection?: TUtilEachCollection
) => void;
declare export type TUtilEach = (
collection: TUtilEachCollection,
handler: TUtilEachHandler
) => TUtilEachCollection;
}
declare module "@qiwi/substrate-types/target/es5/IUtilMap" {
/**
*/
declare export type TUtilMapCollection = any[] | { [key: string]: any };
declare export type TUtilMapHandler = (
value: any,
key?: string | number,
collection?: TUtilMapCollection
) => any;
declare export type TUtilMap = (
collection: TUtilMapCollection,
handler: TUtilMapHandler
) => any[];
}
declare module "@qiwi/substrate-types/target/es5/ICloneable" {
/**
*/
declare export interface ICloneable<T> {
clone(): T;
}
}
declare module "@qiwi/substrate-types/target/es5/ICurrency" {
/**
*/
declare export type ICurrency = string;
}
declare module "@qiwi/substrate-types/target/es5/IPromise" {
import type { IConstructor } from "@qiwi/substrate-types/target/es5/IConstructor";
declare export type TPromiseExecutor<TValue = any, TReason = any> = (
resolve: (value: TValue) => void,
reject: (reason: TReason) => void
) => void;
declare export type IPromiseConstructor<TValue = any, TReason = any> = {
new(executor: TPromiseExecutor<TValue>): IPromise<TValue, TReason>,
all: (
values: Iterable<IPromise<TValue, TReason>>
) => IPromise<TValue[], TReason>,
race: (
values: Iterable<IPromise<TValue, TReason>>
) => IPromise<TValue, TReason>,
reject: (reason?: TReason) => IPromise<TValue, TReason>,
resolve: (value?: TValue) => IPromise<TValue, TReason>,
...
} & IConstructor<IPromise<TValue, TReason>>;
declare export interface IPromise<TValue = any, TReason = any> {
then: (
onSuccess?: (value: TValue) => any,
onReject?: (reason: TReason) => any
) => IPromise<>;
catch: (onReject: (reason: TReason) => any) => IPromise<>;
finally: (onFinally: () => any) => IPromise<>;
+[typeof Symbol.toStringTag]: string;
}
declare export var IPromise: PromiseConstructor;
}
declare module "@qiwi/substrate-types/target/es5/IStorage" {
/**
*/
declare export type TStorageKey = string;
declare export type TStorageValue = any;
declare export type TStorageTTL = number;
declare export interface IStorage {
get: (key: TStorageKey) => TStorageValue;
set: (key: TStorageKey, value: TStorageValue, ttl?: TStorageTTL) => void;
has: (key: TStorageKey) => boolean;
remove: (key: TStorageKey) => void;
size: () => number;
reset: () => void;
}
}
declare module "@qiwi/substrate-types/target/es5/IMoney" {
import type { ICurrency } from "@qiwi/substrate-types/target/es5/ICurrency";
declare export type IValue = number;
declare export interface IMoney {
value: IValue;
currency: ICurrency;
toString: () => string;
}
}
declare module "@qiwi/substrate-types/target/es5/IStack" {
import type { ICollection } from "@qiwi/substrate-types/target/es5/ICollection";
declare export type IStackItem = any;
declare export type IStack<T> = {
push: (...items: Array<T>) => T,
pop: () => T | void,
unshift: (...items: Array<T>) => T,
shift: () => T | void,
indexOf: (item: T) => number,
first: () => T | void,
last: () => T | void,
toArray(): Array<T>,
...
} & ICollection<T>;
}
declare module "@qiwi/substrate-types/target/es5/ICollection" {
/**
*/
declare export type ICollectionItem = any;
declare export interface ICollection<T> {
get: (index: number | string) => T | void;
add: (index: number | string, item: T) => T;
remove: (index: number | string) => T | void;
clear: () => void;
size: number;
isEmpty: () => boolean;
}
}
declare module "@qiwi/substrate-types/target/es5/TPredicate" {
/**
*/
declare export type TPredicate = (...args: any[]) => boolean;
}
declare module "@qiwi/substrate-types/target/es5/IConfigurable" {
/**
*/
declare export interface IConfigurable {
setConfig: (options?: any) => void;
getConfig: () => any;
}
}
declare module "@qiwi/substrate-types/target/es5/IConfig" {
/**
*/
declare export type TConfigKey = string;
declare export interface IConfig<T = any> {
set?: (key: TConfigKey, value: T) => void;
get: (key: TConfigKey) => T;
has: (key: TConfigKey) => boolean;
delete?: (key: TConfigKey) => void;
clear?: () => void;
size?: number;
[key: string]: any;
}
}
declare module "@qiwi/substrate-types/target/es5/IConstructor" {
/**
*/
declare export type Abstract<T = { [key: string]: any }> = Function & {
prototype: T,
...
};
declare export type IConstructor<
T = { [key: string]: any },
A: any[] = any[]
> = (...args: A) => T;
declare export type IClass<T = { [key: string]: any }> = Abstract<T> &
IConstructor<T>;
declare export type IConstructable<
T = { [key: string]: any },
A: any[] = any[]
> = IConstructor<T, A>;
}
declare module "@qiwi/substrate-types/target/es5/IIterable" {
/**
*/
declare export interface IIteratorResult {
value: any;
done: boolean;
}
declare export interface IIterator {
next(): {
value: any,
done: boolean,
...
};
}
declare export interface IIterable {
@@iterator: () => IIterator;
}
}
declare module "@qiwi/substrate-types/target/es5/IMiddleware" {
/**
*/
declare export interface IRequest {
res?: IResponse;
[key: string]: any;
}
declare export interface IResponse {
status: (status: number) => IResponse;
send: (arg: string | { [key: string]: any }) => IResponse;
json: () => IResponse;
req?: IRequest;
[key: string]: any;
}
declare export interface INext {
(...args: any[]): any;
}
declare export interface IRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): void;
}
declare export interface IErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): void;
}
declare export type IMiddleware = IRequestMiddleware | IErrorMiddleware;
declare export interface IAsyncRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
declare export interface IAsyncErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
declare export type IAsyncMiddleware =
| IAsyncRequestMiddleware
| IAsyncErrorMiddleware;
}
declare module "@qiwi/substrate-types/target/es5/IPool" {
import type { IPromise } from "@qiwi/substrate-types/target/es5/export";
declare export var IPooledObjectStatus: {|
+READY: "ready", // "ready"
+ACTIVE: "active", // "active"
+INVALID: "invalid", // "invalid"
|};
declare export interface IPooledObject<T> {
ref: T;
status: $Values<typeof IPooledObjectStatus>;
activate(): void;
passivate(): void;
destroy(): void;
validate(): boolean;
[key: string]: any;
}
declare export interface IPooledObjectFactory<T> {
(...args: any[]): IPooledObject<T>;
}
declare export interface IPool<T> {
factory: IPooledObjectFactory<T>;
borrow(): IPromise<T>;
release(instance: T): void;
invalidate(instance: T): void;
[key: string]: any;
}
}
declare module "@qiwi/substrate-types/target/es5/IHttpClient" {
import type { IPromise } from "@qiwi/substrate-types/target/es5/IPromise";
declare export var HttpMethod: {|
+GET: "GET", // "GET"
+DELETE: "DELETE", // "DELETE"
+HEAD: "HEAD", // "HEAD"
+OPTIONS: "OPTIONS", // "OPTIONS"
+POST: "POST", // "POST"
+PUT: "PUT", // "PUT"
+PATCH: "PATCH", // "PATCH"
|};
declare export type IHttpRequestProvider = IFetch<> | IHttpClient<>;
declare export type IHttpHeaders = { [key: string]: any, ... };
declare export interface IHttpResponse<D = any> {
status: number;
statusText: string;
headers: IHttpHeaders;
data: D;
}
declare export interface IFetchResponse<D = any> {
status: number;
statusText: string;
headers: any;
json(): IPromise<D>;
body: any;
}
declare interface IHttpRequest {
url?: string;
method?: $Values<typeof HttpMethod>;
headers?: IHttpHeaders;
params?: any;
body?: any;
data?: any;
}
declare export interface IFetch<
Req: IHttpRequest = IHttpRequest,
Res: IFetchResponse<> = IFetchResponse<>
> {
<D>(
url: string,
req?: Req
): IPromise<Omit<Res, "json"> & IFetchResponse<D>>;
}
declare export interface IHttpReqPerform<
Req = IHttpRequest,
Res = IHttpResponse<>
> {
<D>(
url: string,
body?: any,
req?: Req
): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
<D>(url: string, req?: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
}
declare export interface IHttpClient<
Req: IHttpRequest = IHttpRequest,
Res: IHttpResponse<> = IHttpResponse<>
> {
<D>(req: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
<D>(url: string, req?: Req): IPromise<Omit<Res, "data"> & IHttpResponse<D>>;
get: IHttpReqPerform<Req, Res>;
post: IHttpReqPerform<Req, Res>;
put: IHttpReqPerform<Req, Res>;
patch: IHttpReqPerform<Req, Res>;
head: IHttpReqPerform<Req, Res>;
delete: IHttpReqPerform<Req, Res>;
options: IHttpReqPerform<Req, Res>;
}
declare export {};
}
declare module "@qiwi/substrate-types/target/es5/IClientEventDto" {
import type { LogLevel } from "@qiwi/substrate-types/target/es5/ILogger";
import type { IDeviceInfo } from "@qiwi/substrate-types/target/es5/IDeviceInfo";
import type { RecursivePartial } from "@qiwi/substrate-types/target/es5/helpers";
declare export var EnvironmentProfile: {|
+CI: "ci", // "ci"
+DEV: "development", // "development"
+TEST: "testing", // "testing"
+PROD: "prod", // "prod"
+STAGE: "staging", // "staging"
|};
declare type TClientEventMeta = RecursivePartial<{
appName: string,
appHost: string,
appVersion: string,
appNamespace: string,
appConfig: { [key: string]: any, ... },
envProfile: $Values<typeof EnvironmentProfile>,
deviceInfo: IDeviceInfo & { [key: string]: any, ... },
...
}>;
declare export type IClientEventMeta = TClientEventMeta;
declare export interface IClientEventDto {
message: string;
tags?: Array<string>;
code?: string;
level?: LogLevel;
meta?: IClientEventMeta;
details?: { [key: string]: any, ... };
stacktrace?: any;
timestamp?: number | string;
}
declare export {};
}
declare module "@qiwi/substrate-types/target/es5/INormalValue" {
import type { IAnyMap } from "@qiwi/substrate-types/target/es5/IAnyMap";
import type { UnionToIntersection } from "@qiwi/substrate-types/target/es5/helpers";
declare export interface IIdentified {
id: string | number | Symbol;
}
declare export type IWrappedValue<
V = any,
W = Object
> = /* Flow doesn't support conditional types, use `$Call` utility type */ any & {
value: V,
...
};
declare export type ITyped<T = any> = {
type: T,
...
};
declare export type ITypedValue<V = any, T = any> = IWrappedValue<
V,
ITyped<T>
>;
declare export type IMeted<M: IAnyMap = IAnyMap> = {
meta: M,
...
};
declare export type IMetedValue<
V = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, IMeted<M>>;
declare export type IMetaTyped<T = any, M: IAnyMap = IAnyMap> = ITyped<T> &
IMeted<M>;
declare export type IMetaTypedValue<
V = any,
T = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, IMetaTyped<T, M>>;
declare export type INormalValue<
V = any,
T = any,
M: IAnyMap = IAnyMap
> = IWrappedValue<V, [IMetaTyped<T, M>, IIdentified]>;
}
declare module "@qiwi/substrate-types/target/es5/IFunction" {
declare export type IFunction<A: any[] = any[], R = any> = (...args: A) => R;
declare export type IFn<A: any[] = any[], R = any> = IFunction<A, R>;
declare export type ICallable<A: any[] = any[], R = any> = IFunction<A, R>;
declare export type IUnaryFunction<A = any, R = any> = (a: A) => R;
declare export type IUnaryFn<A = any, R = any> = IUnaryFunction<A, R>;
}
declare module "@qiwi/substrate-types/target/es5/IMetadata" {
declare export interface IMetadataProvider {
defineMetadata(
metadataKey: any,
metadataValue: any,
target: any,
propertyKey?: string | Symbol
): void;
hasMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): boolean;
getMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): any;
getOwnMetadata(
metadataKey: any,
target: any,
propertyKey?: string | Symbol
): any;
}
}
declare module "@qiwi/substrate-types/target/es5/IEnableable" {
declare export interface IEnableable {
enable(): void;
disable(): void;
}
}
declare module "@qiwi/substrate-types/target/es5/IPipeline" {
import type { IUnaryFn } from "@qiwi/substrate-types/target/es5/IFunction";
import type { INormalValue } from "@qiwi/substrate-types/target/es5/INormalValue";
declare export type IPipe<E = any> = IUnaryFn<E, E>;
declare export type IPipeline<P: IPipe<> = IPipe<>> = Array<P>;
declare export type INormalPipe<E: INormalValue = INormalValue> = IPipe<E>;
declare export type INormalPipeline<
P: INormalPipe<> = INormalPipe<>
> = IPipeline<P>;
}
declare module "@qiwi/substrate-types/target/es5/IExtra" {
declare export type IExtra<K: string, V> = $ObjMapi<
{ [k: K]: any },
<key>(key) => V
>;
}
declare module "@qiwi/substrate-types/target/es5/INil" {
declare export type INil = null | void;
declare export type INullOrUndefined = INil;
}
declare module "@qiwi/substrate-types/target/es5/IExecutionMode" {
declare export var IExecutionMode: {|
+SYNC: "sync", // "sync"
+ASYNC: "async", // "async"
|};
}
declare module "@qiwi/substrate-types/target/es5/IDeviceInfo" {
import type { RecursivePartial } from "@qiwi/substrate-types/target/es5/helpers";
declare export type IBrowserInfo = RecursivePartial<{
name: string | null,
version: string | null,
layout: string | null,
...
}>;
declare export type IOperationalSystemInfo = RecursivePartial<{
name: string | null,
architecture: number | null,
family: string | null,
version: string | null,
...
}>;
declare export type IDeviceInfo = RecursivePartial<{
browser: IBrowserInfo,
model: {
name: string | null,
manufacturer: string | null,
...
},
isMobile: boolean,
os: IOperationalSystemInfo,
...
}>;
}
declare module "@qiwi/substrate-types" {
declare export * from "@qiwi/substrate-types/target/es5/index"
declare export * from "@qiwi/substrate-types/target/es5"
}
{
"name": "@qiwi/substrate-types",
"version": "1.46.0",
"version": "1.46.1",
"main": "target/es5/index.js",

@@ -24,3 +24,3 @@ "source": "target/ts/index.ts",

"build:ts": "cp -r src/main/ts/ target/ts/",
"build:libdef": "dts-generator --project ./ --out typings/index.d.ts --prefix @qiwi/substrate-types/target/es5 --name @qiwi/substrate-types --main @qiwi/substrate-types/target/es5/index && libdeffix --dts=./typings/index.d.ts --prefix=@qiwi/substrate-types/target/es5 && flowgen typings/index.d.ts --output-file flow-typed/index.flow.js",
"build:libdef": "libdefkit --tsconfig=tsconfig.json",
"test": "cp typings/index.d.ts src/test/ts/libdef/index.d.ts && yarn dtslint",

@@ -41,14 +41,15 @@ "jest": "jest --config=jest.config.json",

"@qiwi/uniconfig": "3.5.1",
"@qiwi/substrate-infra": "1.0.1",
"@types/axios": "0.14.0",
"@types/bluebird": "3.5.32",
"@types/config": "0.0.36",
"@types/jest": "26.0.13",
"@types/jest": "26.0.14",
"@types/lodash": "4.14.161",
"@types/node": "14.10.1",
"@types/parsimmon": "1.10.2",
"@types/underscore": "1.10.22",
"@types/node": "14.11.2",
"@types/parsimmon": "1.10.3",
"@types/underscore": "1.10.24",
"axios": "0.20.0",
"bluebird": "3.7.2",
"conf": "7.1.2",
"config": "3.3.1",
"config": "3.3.2",
"lodash": "4.17.20",

@@ -59,5 +60,3 @@ "underscore": "1.11.0",

},
"dependencies": {
"@qiwi/substrate-infra": "1.0.0"
},
"dependencies": {},
"peerDependencies": {},

@@ -64,0 +63,0 @@ "license": "MIT",

@@ -1,563 +0,579 @@

declare module '@qiwi/substrate-types/target/es5/IAnyMap' {
/** @module @qiwi/substrate-types */
/** */
export type IAnyMap = {
[key: string]: any;
[key: number]: any;
};
// Generated by dts-bundle v0.7.4-beta.0
declare module '@qiwi/substrate-types/target/es5' {
/** */
export * from '@qiwi/substrate-types/target/es5/export';
export * from '@qiwi/substrate-types/target/es5/aliases';
export * from '@qiwi/substrate-types/target/es5/helpers';
export * from '@qiwi/substrate-types/target/es5/extras';
}
declare module '@qiwi/substrate-types/target/es5/ILogger' {
/** @module @qiwi/substrate-types */
/** */
export type ILoggerMethod = (...args: any[]) => void;
export enum LogLevel {
ERROR = "error",
WARN = "warn",
INFO = "info",
DEBUG = "debug",
TRACE = "trace"
}
export interface ILogger {
trace: ILoggerMethod;
debug: ILoggerMethod;
info: ILoggerMethod;
log: ILoggerMethod;
warn: ILoggerMethod;
error: ILoggerMethod;
fatal?: ILoggerMethod;
[key: string]: any;
[key: number]: any;
}
declare module '@qiwi/substrate-types/target/es5/export' {
/** */
export { IStringMap } from '@qiwi/substrate-types/target/es5/IStringMap';
export { IAnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
export { IEventEmitter } from '@qiwi/substrate-types/target/es5/IEventEmitter';
export { ILogger, LogLevel, ILoggerMethod } from '@qiwi/substrate-types/target/es5/ILogger';
export { TUtilGet } from '@qiwi/substrate-types/target/es5/IUtilGet';
export { TUtilSet } from '@qiwi/substrate-types/target/es5/IUtilSet';
export { TUtilEach } from '@qiwi/substrate-types/target/es5/IUtilEach';
export { TUtilMap } from '@qiwi/substrate-types/target/es5/IUtilMap';
export { ICloneable } from '@qiwi/substrate-types/target/es5/ICloneable';
export { ICurrency } from '@qiwi/substrate-types/target/es5/ICurrency';
export { IPromiseConstructor, IPromise } from '@qiwi/substrate-types/target/es5/IPromise';
export { IStorage } from '@qiwi/substrate-types/target/es5/IStorage';
export { IMoney } from '@qiwi/substrate-types/target/es5/IMoney';
export { IStack } from '@qiwi/substrate-types/target/es5/IStack';
export { ICollection } from '@qiwi/substrate-types/target/es5/ICollection';
export { TPredicate } from '@qiwi/substrate-types/target/es5/TPredicate';
export { IConfigurable } from '@qiwi/substrate-types/target/es5/IConfigurable';
export { IConfig } from '@qiwi/substrate-types/target/es5/IConfig';
export { IConstructor, IConstructable, Abstract, IClass, } from '@qiwi/substrate-types/target/es5/IConstructor';
export { IIterable, IIterator, IIteratorResult, } from '@qiwi/substrate-types/target/es5/IIterable';
export { IMiddleware, IAsyncMiddleware, IErrorMiddleware, IRequestMiddleware, IRequest, IResponse, INext, } from '@qiwi/substrate-types/target/es5/IMiddleware';
export { IPool, IPooledObject, IPooledObjectFactory, IPooledObjectStatus, } from '@qiwi/substrate-types/target/es5/IPool';
export { IHttpClient, IFetch, IHttpRequestProvider, HttpMethod, } from '@qiwi/substrate-types/target/es5/IHttpClient';
export { IClientEventDto, IClientEventMeta, EnvironmentProfile, } from '@qiwi/substrate-types/target/es5/IClientEventDto';
export { INormalValue, IIdentified, IMetaTyped, IMetaTypedValue, IWrappedValue, ITyped, ITypedValue, IMeted, IMetedValue, } from '@qiwi/substrate-types/target/es5/INormalValue';
export { IFunction, IFn, IUnaryFunction, IUnaryFn, ICallable, } from '@qiwi/substrate-types/target/es5/IFunction';
export { IMetadataProvider } from '@qiwi/substrate-types/target/es5/IMetadata';
export { IEnableable } from '@qiwi/substrate-types/target/es5/IEnableable';
export { IPipe, IPipeline, INormalPipe, INormalPipeline, } from '@qiwi/substrate-types/target/es5/IPipeline';
export { IExtra } from '@qiwi/substrate-types/target/es5/IExtra';
export { INil, INullOrUndefined, } from '@qiwi/substrate-types/target/es5/INil';
export { IExecutionMode } from '@qiwi/substrate-types/target/es5/IExecutionMode';
export { IDeviceInfo, IBrowserInfo, IOperationalSystemInfo, } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
}
declare module '@qiwi/substrate-types/target/es5/aliases' {
/** */
export { IStringMap as StringMap } from '@qiwi/substrate-types/target/es5/IStringMap';
export { IAnyMap as AnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
export { IEventEmitter as EventEmitter } from '@qiwi/substrate-types/target/es5/IEventEmitter';
export { ILogger as Logger, LogLevel, ILoggerMethod as LoggerMethod } from '@qiwi/substrate-types/target/es5/ILogger';
export { TUtilGet as UtilGet } from '@qiwi/substrate-types/target/es5/IUtilGet';
export { TUtilSet as UtilSet } from '@qiwi/substrate-types/target/es5/IUtilSet';
export { TUtilEach as UtilEach } from '@qiwi/substrate-types/target/es5/IUtilEach';
export { TUtilMap as UtilMap } from '@qiwi/substrate-types/target/es5/IUtilMap';
export { ICloneable as Cloneable } from '@qiwi/substrate-types/target/es5/ICloneable';
export { ICurrency as Currency } from '@qiwi/substrate-types/target/es5/ICurrency';
export {} from '@qiwi/substrate-types/target/es5/IPromise';
export { IStorage as Storage } from '@qiwi/substrate-types/target/es5/IStorage';
export { IMoney as Money } from '@qiwi/substrate-types/target/es5/IMoney';
export {} from '@qiwi/substrate-types/target/es5/IStack';
export { ICollection as Collection } from '@qiwi/substrate-types/target/es5/ICollection';
export { TPredicate as Predicate } from '@qiwi/substrate-types/target/es5/TPredicate';
export { IConfigurable as Configurable } from '@qiwi/substrate-types/target/es5/IConfigurable';
export { IConfig as Config } from '@qiwi/substrate-types/target/es5/IConfig';
export { IConstructor as Constructor, IConstructable as Constructable, Abstract, IClass as Class, } from '@qiwi/substrate-types/target/es5/IConstructor';
export { IIterable as Iterable, IIterator as Iterator, IIteratorResult as IteratorResult, } from '@qiwi/substrate-types/target/es5/IIterable';
export { IMiddleware as Middleware, IAsyncMiddleware as AsyncMiddleware, IErrorMiddleware as ErrorMiddleware, IRequestMiddleware as RequestMiddleware, IRequest as Request, IResponse as Response, INext as Next, } from '@qiwi/substrate-types/target/es5/IMiddleware';
export { IPool as Pool, IPooledObject as PooledObject, IPooledObjectFactory as PooledObjectFactory, IPooledObjectStatus as PooledObjectStatus, } from '@qiwi/substrate-types/target/es5/IPool';
export { IHttpClient as HttpClient, IFetch as Fetch, IHttpRequestProvider as HttpRequestProvider, HttpMethod, } from '@qiwi/substrate-types/target/es5/IHttpClient';
export { IClientEventDto as ClientEventDto, IClientEventMeta as ClientEventMeta, EnvironmentProfile, } from '@qiwi/substrate-types/target/es5/IClientEventDto';
export { INormalValue as NormalValue, IIdentified as Identified, IMetaTyped as MetaTyped, IMetaTypedValue as MetaTypedValue, IWrappedValue as WrappedValue, ITyped as Typed, ITypedValue as TypedValue, IMeted as Meted, IMetedValue as MetedValue, } from '@qiwi/substrate-types/target/es5/INormalValue';
export { IFn as Fn, IUnaryFunction as UnaryFunction, IUnaryFn as UnaryFn, ICallable as Callable, } from '@qiwi/substrate-types/target/es5/IFunction';
export { IMetadataProvider as MetadataProvider } from '@qiwi/substrate-types/target/es5/IMetadata';
export { IEnableable as Enableable } from '@qiwi/substrate-types/target/es5/IEnableable';
export { IPipe as Pipe, IPipeline as Pipeline, INormalPipe as NormalPipe, INormalPipeline as NormalPipeline, } from '@qiwi/substrate-types/target/es5/IPipeline';
export { IExtra as Extra } from '@qiwi/substrate-types/target/es5/IExtra';
export { INil as Nil, INullOrUndefined as NullOrUndefined, } from '@qiwi/substrate-types/target/es5/INil';
export { IExecutionMode as ExecutionMode } from '@qiwi/substrate-types/target/es5/IExecutionMode';
export { IDeviceInfo as DeviceInfo, IBrowserInfo as BrowserInfo, IOperationalSystemInfo as OperationalSystemInfo, } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
}
declare module '@qiwi/substrate-types/target/es5/helpers' {
export type UnionToIntersection<U> = ((U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never);
export function mkenum<T extends {
[index: string]: U;
}, U extends string>(x: T): T;
export type EnumType<T> = T[keyof T];
export type PrependTuple<A, T extends Array<any>> = (((a: A, ...b: T) => void) extends (...a: infer I) => void ? I : []);
export type Extends<T, E, R1, R2> = T extends E ? R1 : R2;
export type ExtendsOrNever<T, E> = Extends<T, E, T, never>;
export type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
};
export type UnionToIntersection<U> = ((U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never);
export function mkenum<T extends {
[index: string]: U;
}, U extends string>(x: T): T;
export type EnumType<T> = T[keyof T];
export type PrependTuple<A, T extends Array<any>> = (((a: A, ...b: T) => void) extends (...a: infer I) => void ? I : []);
export type Extends<T, E, R1, R2> = T extends E ? R1 : R2;
export type ExtendsOrNever<T, E> = Extends<T, E, T, never>;
export type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
};
}
declare module '@qiwi/substrate-types/target/es5/IDeviceInfo' {
import { RecursivePartial } from '@qiwi/substrate-types/target/es5/helpers';
export type IBrowserInfo = RecursivePartial<{
name: string | null;
version: string | null;
layout: string | null;
}>;
export type IOperationalSystemInfo = RecursivePartial<{
name: string | null;
architecture: number | null;
family: string | null;
version: string | null;
}>;
export type IDeviceInfo = RecursivePartial<{
browser: IBrowserInfo;
model: {
name: string | null;
manufacturer: string | null;
};
isMobile: boolean;
os: IOperationalSystemInfo;
}>;
declare module '@qiwi/substrate-types/target/es5/extras' {
import { IExtra } from '@qiwi/substrate-types/target/es5/IExtra';
import { IStorage } from '@qiwi/substrate-types/target/es5/IStorage';
export type IStoreExtra = IExtra<'store', IStorage>;
export type IStorageExtra = IExtra<'storage', IStorage>;
}
declare module '@qiwi/substrate-types/target/es5/IClientEventDto' {
/** @module @qiwi/substrate-types */
/** */
import { LogLevel } from '@qiwi/substrate-types/target/es5/ILogger';
import { IDeviceInfo } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
import { RecursivePartial } from '@qiwi/substrate-types/target/es5/helpers';
export enum EnvironmentProfile {
CI = "ci",
DEV = "development",
TEST = "testing",
PROD = "prod",
STAGE = "staging"
} type TClientEventMeta = RecursivePartial<{
appName: string;
appHost: string;
appVersion: string;
appNamespace: string;
appConfig: Record<string, any>;
envProfile: EnvironmentProfile;
deviceInfo: IDeviceInfo & Record<string, any>;
}>;
export type IClientEventMeta = TClientEventMeta;
export interface IClientEventDto {
message: string;
tags?: Array<string>;
code?: string;
level?: LogLevel;
meta?: IClientEventMeta;
details?: Record<string, any>;
stacktrace?: any;
timestamp?: number | string;
}
export {};
declare module '@qiwi/substrate-types/target/es5/IStringMap' {
/** */
export type IStringMap = {
[key: string]: string;
};
}
declare module '@qiwi/substrate-types/target/es5/ICloneable' {
/** @module @qiwi/substrate-types */
/** */
export interface ICloneable<T> {
clone(): T;
}
declare module '@qiwi/substrate-types/target/es5/IAnyMap' {
/** */
export type IAnyMap = {
[key: string]: any;
[key: number]: any;
};
}
declare module '@qiwi/substrate-types/target/es5/ICollection' {
/** @module @qiwi/substrate-types */
/** */
export type ICollectionItem = any;
export interface ICollection<T> {
get: (index: number | string) => T | undefined;
add: (index: number | string, item: T) => T;
remove: (index: number | string) => T | undefined;
clear: () => void;
size: number;
isEmpty: () => boolean;
}
declare module '@qiwi/substrate-types/target/es5/IEventEmitter' {
/** */
export type IEventListener = (...args: any[]) => void;
export type IEmitterMethod = (type: string, listener: IEventListener) => void;
export interface IEventEmitter {
emit(type: string, ...args: any[]): void;
off: IEmitterMethod;
on: IEmitterMethod;
once: IEmitterMethod;
}
}
declare module '@qiwi/substrate-types/target/es5/IConfig' {
/** @module @qiwi/substrate-types */
/** */
export type TConfigKey = string;
export interface IConfig<T = any> {
set?: (key: TConfigKey, value: T) => void;
get: (key: TConfigKey) => T;
has: (key: TConfigKey) => boolean;
delete?: (key: TConfigKey) => void;
clear?: () => void;
size?: number;
[key: string]: any;
}
declare module '@qiwi/substrate-types/target/es5/ILogger' {
/** */
export type ILoggerMethod = (...args: any[]) => void;
export enum LogLevel {
ERROR = "error",
WARN = "warn",
INFO = "info",
DEBUG = "debug",
TRACE = "trace"
}
export interface ILogger {
trace: ILoggerMethod;
debug: ILoggerMethod;
info: ILoggerMethod;
log: ILoggerMethod;
warn: ILoggerMethod;
error: ILoggerMethod;
fatal?: ILoggerMethod;
[key: string]: any;
[key: number]: any;
}
}
declare module '@qiwi/substrate-types/target/es5/IConfigurable' {
/** @module @qiwi/substrate-types */
/** */
export interface IConfigurable {
setConfig: (options?: any) => void;
getConfig: () => any;
}
declare module '@qiwi/substrate-types/target/es5/IUtilGet' {
/** */
export type TUtilGetPath = Array<string | number> | string;
export type TUtilGetObject = object;
export type TUtilGetDefaultValue = any;
export type TUtilGetResponse = any;
export type TUtilGet = (obj: TUtilGetObject, path: TUtilGetPath, defaultValue?: TUtilGetDefaultValue) => TUtilGetResponse;
}
declare module '@qiwi/substrate-types/target/es5/IConstructor' {
/** @module @qiwi/substrate-types */
/** */
export type Abstract<T = object> = Function & {
prototype: T;
};
export type IConstructor<T = object, A extends any[] = any[]> = new (...args: A) => T;
export type IClass<T = object> = Abstract<T> & IConstructor<T>;
export type IConstructable<T = object, A extends any[] = any[]> = IConstructor<T, A>;
declare module '@qiwi/substrate-types/target/es5/IUtilSet' {
/** */
export type TUtilSetPath = Array<string | number> | string;
export type TUtilSetObject = object;
export type TUtilSetValue = any;
export type TUtilSet = (obj: TUtilSetObject, path: TUtilSetPath, value: TUtilSetValue) => void;
}
declare module '@qiwi/substrate-types/target/es5/ICurrency' {
/** @module @qiwi/substrate-types */
/** */
export type ICurrency = string;
declare module '@qiwi/substrate-types/target/es5/IUtilEach' {
/** */
export type TUtilEachCollection = any[] | object;
export type TUtilEachHandler = (value: any, key?: string | number, collection?: TUtilEachCollection) => void;
export type TUtilEach = (collection: TUtilEachCollection, handler: TUtilEachHandler) => TUtilEachCollection;
}
declare module '@qiwi/substrate-types/target/es5/IEnableable' {
export interface IEnableable {
enable(): void;
disable(): void;
}
declare module '@qiwi/substrate-types/target/es5/IUtilMap' {
/** */
export type TUtilMapCollection = any[] | object;
export type TUtilMapHandler = (value: any, key?: string | number, collection?: TUtilMapCollection) => any;
export type TUtilMap = (collection: TUtilMapCollection, handler: TUtilMapHandler) => any[];
}
declare module '@qiwi/substrate-types/target/es5/IEventEmitter' {
/** @module @qiwi/substrate-types */
/** */
export type IEventListener = (...args: any[]) => void;
export type IEmitterMethod = (type: string, listener: IEventListener) => void;
export interface IEventEmitter {
emit(type: string, ...args: any[]): void;
off: IEmitterMethod;
on: IEmitterMethod;
once: IEmitterMethod;
}
declare module '@qiwi/substrate-types/target/es5/ICloneable' {
/** */
export interface ICloneable<T> {
clone(): T;
}
}
declare module '@qiwi/substrate-types/target/es5/IExecutionMode' {
export enum IExecutionMode {
SYNC = "sync",
ASYNC = "async"
}
declare module '@qiwi/substrate-types/target/es5/ICurrency' {
/** */
export type ICurrency = string;
}
declare module '@qiwi/substrate-types/target/es5/IExtra' {
export type IExtra<K extends string, V> = {
[key in K]: V;
};
declare module '@qiwi/substrate-types/target/es5/IPromise' {
/** */
import { IConstructor } from '@qiwi/substrate-types/target/es5/IConstructor';
export type TPromiseExecutor<TValue = any, TReason = any> = (resolve: (value: TValue) => void, reject: (reason: TReason) => void) => void;
export interface IPromiseConstructor<TValue = any, TReason = any> extends IConstructor<IPromise<TValue, TReason>> {
new (executor: TPromiseExecutor<TValue>): IPromise<TValue, TReason>;
all: (values: Iterable<IPromise<TValue, TReason>>) => IPromise<TValue[], TReason>;
race: (values: Iterable<IPromise<TValue, TReason>>) => IPromise<TValue, TReason>;
reject: (reason?: TReason) => IPromise<TValue, TReason>;
resolve: (value?: TValue) => IPromise<TValue, TReason>;
}
export interface IPromise<TValue = any, TReason = any> {
then: (onSuccess?: (value: TValue) => any, onReject?: (reason: TReason) => any) => IPromise;
catch: (onReject: (reason: TReason) => any) => IPromise;
finally: (onFinally: () => any) => IPromise;
readonly [Symbol.toStringTag]: string;
}
export const IPromise: PromiseConstructor;
}
declare module '@qiwi/substrate-types/target/es5/IFunction' {
export type IFunction<A extends any[] = any[], R = any> = (...args: A) => R;
export type IFn<A extends any[] = any[], R = any> = IFunction<A, R>;
export type ICallable<A extends any[] = any[], R = any> = IFunction<A, R>;
export type IUnaryFunction<A = any, R = any> = (a: A) => R;
export type IUnaryFn<A = any, R = any> = IUnaryFunction<A, R>;
declare module '@qiwi/substrate-types/target/es5/IStorage' {
/** */
export type TStorageKey = string;
export type TStorageValue = any;
export type TStorageTTL = number;
export interface IStorage {
get: (key: TStorageKey) => TStorageValue;
set: (key: TStorageKey, value: TStorageValue, ttl?: TStorageTTL) => void;
has: (key: TStorageKey) => boolean;
remove: (key: TStorageKey) => void;
size: () => number;
reset: () => void;
}
}
declare module '@qiwi/substrate-types/target/es5/IPromise' {
/** @module @qiwi/substrate-types */
/** */
import { IConstructor } from '@qiwi/substrate-types/target/es5/IConstructor';
export type TPromiseExecutor<TValue = any, TReason = any> = (resolve: (value: TValue) => void, reject: (reason: TReason) => void) => void;
export interface IPromiseConstructor<TValue = any, TReason = any> extends IConstructor<IPromise<TValue, TReason>> {
new (executor: TPromiseExecutor<TValue>): IPromise<TValue, TReason>;
all: (values: Iterable<IPromise<TValue, TReason>>) => IPromise<TValue[], TReason>;
race: (values: Iterable<IPromise<TValue, TReason>>) => IPromise<TValue, TReason>;
reject: (reason?: TReason) => IPromise<TValue, TReason>;
resolve: (value?: TValue) => IPromise<TValue, TReason>;
}
export interface IPromise<TValue = any, TReason = any> {
then: (onSuccess?: (value: TValue) => any, onReject?: (reason: TReason) => any) => IPromise;
catch: (onReject: (reason: TReason) => any) => IPromise;
finally: (onFinally: () => any) => IPromise;
readonly [Symbol.toStringTag]: string;
}
export const IPromise: PromiseConstructor;
declare module '@qiwi/substrate-types/target/es5/IMoney' {
/** */
import { ICurrency } from '@qiwi/substrate-types/target/es5/ICurrency';
export type IValue = number;
export interface IMoney {
value: IValue;
currency: ICurrency;
toString: () => string;
}
}
declare module '@qiwi/substrate-types/target/es5/IHttpClient' {
import { IPromise } from '@qiwi/substrate-types/target/es5/IPromise';
export const enum HttpMethod {
GET = "GET",
DELETE = "DELETE",
HEAD = "HEAD",
OPTIONS = "OPTIONS",
POST = "POST",
PUT = "PUT",
PATCH = "PATCH"
}
export type IHttpRequestProvider = IFetch | IHttpClient;
export type IHttpHeaders = Record<string, any>;
export interface IHttpResponse<D = any> {
status: number;
statusText: string;
headers: IHttpHeaders;
data: D;
}
export interface IFetchResponse<D = any> {
status: number;
statusText: string;
headers: any;
json(): IPromise<D>;
body: any;
}
interface IHttpRequest {
url?: string;
method?: HttpMethod;
headers?: IHttpHeaders;
params?: any;
body?: any;
data?: any;
}
export interface IFetch<Req extends IHttpRequest = IHttpRequest, Res extends IFetchResponse = IFetchResponse> {
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'json'> & IFetchResponse<D>>;
}
export interface IHttpReqPerform<Req = IHttpRequest, Res = IHttpResponse> {
<D = any>(url: string, body?: any, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
}
export interface IHttpClient<Req extends IHttpRequest = IHttpRequest, Res extends IHttpResponse = IHttpResponse> {
<D = any>(req: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
get: IHttpReqPerform<Req, Res>;
post: IHttpReqPerform<Req, Res>;
put: IHttpReqPerform<Req, Res>;
patch: IHttpReqPerform<Req, Res>;
head: IHttpReqPerform<Req, Res>;
delete: IHttpReqPerform<Req, Res>;
options: IHttpReqPerform<Req, Res>;
}
export {};
declare module '@qiwi/substrate-types/target/es5/IStack' {
/** */
import { ICollection } from '@qiwi/substrate-types/target/es5/ICollection';
export type IStackItem = any;
export interface IStack<T> extends ICollection<T> {
push: (...items: Array<T>) => T;
pop: () => T | undefined;
unshift: (...items: Array<T>) => T;
shift: () => T | undefined;
indexOf: (item: T) => number;
first: () => T | undefined;
last: () => T | undefined;
toArray(): Array<T>;
}
}
declare module '@qiwi/substrate-types/target/es5/IIterable' {
/** @module @qiwi/substrate-types */
/** */
export interface IIteratorResult {
value: any;
done: boolean;
}
export interface IIterator {
next(): {
value: any;
done: boolean;
};
}
export interface IIterable {
[Symbol.iterator](): IIterator;
}
declare module '@qiwi/substrate-types/target/es5/ICollection' {
/** */
export type ICollectionItem = any;
export interface ICollection<T> {
get: (index: number | string) => T | undefined;
add: (index: number | string, item: T) => T;
remove: (index: number | string) => T | undefined;
clear: () => void;
size: number;
isEmpty: () => boolean;
}
}
declare module '@qiwi/substrate-types/target/es5/IMetadata' {
export interface IMetadataProvider {
defineMetadata(metadataKey: any, metadataValue: any, target: any, propertyKey?: string | symbol): void;
hasMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): boolean;
getMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): any;
getOwnMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): any;
}
declare module '@qiwi/substrate-types/target/es5/TPredicate' {
/** */
export type TPredicate = (...args: any[]) => boolean;
}
declare module '@qiwi/substrate-types/target/es5/IMiddleware' {
/** @module @qiwi/substrate-types */
/** */
export interface IRequest {
res?: IResponse;
[key: string]: any;
}
export interface IResponse {
status: (status: number) => IResponse;
send: (arg: string | object) => IResponse;
json: () => IResponse;
req?: IRequest;
[key: string]: any;
}
export interface INext {
(...args: any[]): any;
}
export interface IRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): void;
}
export interface IErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): void;
}
export type IMiddleware = IRequestMiddleware | IErrorMiddleware;
export interface IAsyncRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
export interface IAsyncErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
export type IAsyncMiddleware = IAsyncRequestMiddleware | IAsyncErrorMiddleware;
declare module '@qiwi/substrate-types/target/es5/IConfigurable' {
/** */
export interface IConfigurable {
setConfig: (options?: any) => void;
getConfig: () => any;
}
}
declare module '@qiwi/substrate-types/target/es5/IMoney' {
/** @module @qiwi/substrate-types */
/** */
import { ICurrency } from '@qiwi/substrate-types/target/es5/ICurrency';
export type IValue = number;
export interface IMoney {
value: IValue;
currency: ICurrency;
toString: () => string;
}
declare module '@qiwi/substrate-types/target/es5/IConfig' {
/** */
export type TConfigKey = string;
export interface IConfig<T = any> {
set?: (key: TConfigKey, value: T) => void;
get: (key: TConfigKey) => T;
has: (key: TConfigKey) => boolean;
delete?: (key: TConfigKey) => void;
clear?: () => void;
size?: number;
[key: string]: any;
}
}
declare module '@qiwi/substrate-types/target/es5/INil' {
export type INil = null | undefined;
export type INullOrUndefined = INil;
declare module '@qiwi/substrate-types/target/es5/IConstructor' {
/** */
export type Abstract<T = object> = Function & {
prototype: T;
};
export type IConstructor<T = object, A extends any[] = any[]> = new (...args: A) => T;
export type IClass<T = object> = Abstract<T> & IConstructor<T>;
export type IConstructable<T = object, A extends any[] = any[]> = IConstructor<T, A>;
}
declare module '@qiwi/substrate-types/target/es5/INormalValue' {
import { IAnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
import { UnionToIntersection } from '@qiwi/substrate-types/target/es5/helpers';
export interface IIdentified {
id: string | number | symbol;
}
export type IWrappedValue<V = any, W = Object> = (W extends object[] ? UnionToIntersection<W[number]> : W extends object ? W : object) & {
value: V;
};
export type ITyped<T = any> = {
type: T;
};
export type ITypedValue<V = any, T = any> = IWrappedValue<V, ITyped<T>>;
export type IMeted<M extends IAnyMap = IAnyMap> = {
meta: M;
};
export type IMetedValue<V = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, IMeted<M>>;
export type IMetaTyped<T = any, M extends IAnyMap = IAnyMap> = ITyped<T> & IMeted<M>;
export type IMetaTypedValue<V = any, T = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, IMetaTyped<T, M>>;
export type INormalValue<V = any, T = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, [IMetaTyped<T, M>, IIdentified]>;
declare module '@qiwi/substrate-types/target/es5/IIterable' {
/** */
export interface IIteratorResult {
value: any;
done: boolean;
}
export interface IIterator {
next(): {
value: any;
done: boolean;
};
}
export interface IIterable {
[Symbol.iterator](): IIterator;
}
}
declare module '@qiwi/substrate-types/target/es5/IPipeline' {
import { IUnaryFn } from '@qiwi/substrate-types/target/es5/IFunction';
import { INormalValue } from '@qiwi/substrate-types/target/es5/INormalValue';
export type IPipe<E = any> = IUnaryFn<E, E>;
export type IPipeline<P extends IPipe = IPipe> = Array<P>;
export type INormalPipe<E extends INormalValue = INormalValue> = IPipe<E>;
export type INormalPipeline<P extends INormalPipe = INormalPipe> = IPipeline<P>;
declare module '@qiwi/substrate-types/target/es5/IMiddleware' {
/** */
export interface IRequest {
res?: IResponse;
[key: string]: any;
}
export interface IResponse {
status: (status: number) => IResponse;
send: (arg: string | object) => IResponse;
json: () => IResponse;
req?: IRequest;
[key: string]: any;
}
export interface INext {
(...args: any[]): any;
}
export interface IRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): void;
}
export interface IErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): void;
}
export type IMiddleware = IRequestMiddleware | IErrorMiddleware;
export interface IAsyncRequestMiddleware {
(req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
export interface IAsyncErrorMiddleware {
(err: Error, req: IRequest, res: IResponse, next?: INext): Promise<void>;
}
export type IAsyncMiddleware = IAsyncRequestMiddleware | IAsyncErrorMiddleware;
}
declare module '@qiwi/substrate-types/target/es5/IStringMap' {
/** @module @qiwi/substrate-types */
/** */
export type IStringMap = {
[key: string]: string;
};
declare module '@qiwi/substrate-types/target/es5/IPool' {
/** */
import { IPromise } from '@qiwi/substrate-types/target/es5/export';
export const enum IPooledObjectStatus {
READY = "ready",
ACTIVE = "active",
INVALID = "invalid"
}
export interface IPooledObject<T> {
ref: T;
status: IPooledObjectStatus;
activate(): void;
passivate(): void;
destroy(): void;
validate(): boolean;
[key: string]: any;
}
export interface IPooledObjectFactory<T> {
(...args: any[]): IPooledObject<T>;
}
export interface IPool<T> {
factory: IPooledObjectFactory<T>;
borrow(): IPromise<T>;
release(instance: T): void;
invalidate(instance: T): void;
[key: string]: any;
}
}
declare module '@qiwi/substrate-types/target/es5/IUtilGet' {
/** @module @qiwi/substrate-types */
/** */
export type TUtilGetPath = Array<string | number> | string;
export type TUtilGetObject = object;
export type TUtilGetDefaultValue = any;
export type TUtilGetResponse = any;
export type TUtilGet = (obj: TUtilGetObject, path: TUtilGetPath, defaultValue?: TUtilGetDefaultValue) => TUtilGetResponse;
declare module '@qiwi/substrate-types/target/es5/IHttpClient' {
import { IPromise } from '@qiwi/substrate-types/target/es5/IPromise';
export const enum HttpMethod {
GET = "GET",
DELETE = "DELETE",
HEAD = "HEAD",
OPTIONS = "OPTIONS",
POST = "POST",
PUT = "PUT",
PATCH = "PATCH"
}
export type IHttpRequestProvider = IFetch | IHttpClient;
export type IHttpHeaders = Record<string, any>;
export interface IHttpResponse<D = any> {
status: number;
statusText: string;
headers: IHttpHeaders;
data: D;
}
export interface IFetchResponse<D = any> {
status: number;
statusText: string;
headers: any;
json(): IPromise<D>;
body: any;
}
interface IHttpRequest {
url?: string;
method?: HttpMethod;
headers?: IHttpHeaders;
params?: any;
body?: any;
data?: any;
}
export interface IFetch<Req extends IHttpRequest = IHttpRequest, Res extends IFetchResponse = IFetchResponse> {
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'json'> & IFetchResponse<D>>;
}
export interface IHttpReqPerform<Req = IHttpRequest, Res = IHttpResponse> {
<D = any>(url: string, body?: any, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
}
export interface IHttpClient<Req extends IHttpRequest = IHttpRequest, Res extends IHttpResponse = IHttpResponse> {
<D = any>(req: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
<D = any>(url: string, req?: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>>;
get: IHttpReqPerform<Req, Res>;
post: IHttpReqPerform<Req, Res>;
put: IHttpReqPerform<Req, Res>;
patch: IHttpReqPerform<Req, Res>;
head: IHttpReqPerform<Req, Res>;
delete: IHttpReqPerform<Req, Res>;
options: IHttpReqPerform<Req, Res>;
}
export {};
}
declare module '@qiwi/substrate-types/target/es5/IUtilSet' {
/** @module @qiwi/substrate-types */
/** */
export type TUtilSetPath = Array<string | number> | string;
export type TUtilSetObject = object;
export type TUtilSetValue = any;
export type TUtilSet = (obj: TUtilSetObject, path: TUtilSetPath, value: TUtilSetValue) => void;
declare module '@qiwi/substrate-types/target/es5/IClientEventDto' {
/** */
import { LogLevel } from '@qiwi/substrate-types/target/es5/ILogger';
import { IDeviceInfo } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
import { RecursivePartial } from '@qiwi/substrate-types/target/es5/helpers';
export enum EnvironmentProfile {
CI = "ci",
DEV = "development",
TEST = "testing",
PROD = "prod",
STAGE = "staging"
}
type TClientEventMeta = RecursivePartial<{
appName: string;
appHost: string;
appVersion: string;
appNamespace: string;
appConfig: Record<string, any>;
envProfile: EnvironmentProfile;
deviceInfo: IDeviceInfo & Record<string, any>;
}>;
export type IClientEventMeta = TClientEventMeta;
export interface IClientEventDto {
message: string;
tags?: Array<string>;
code?: string;
level?: LogLevel;
meta?: IClientEventMeta;
details?: Record<string, any>;
stacktrace?: any;
timestamp?: number | string;
}
export {};
}
declare module '@qiwi/substrate-types/target/es5/IUtilEach' {
/** @module @qiwi/substrate-types */
/** */
export type TUtilEachCollection = any[] | object;
export type TUtilEachHandler = (value: any, key?: string | number, collection?: TUtilEachCollection) => void;
export type TUtilEach = (collection: TUtilEachCollection, handler: TUtilEachHandler) => TUtilEachCollection;
declare module '@qiwi/substrate-types/target/es5/INormalValue' {
import { IAnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
import { UnionToIntersection } from '@qiwi/substrate-types/target/es5/helpers';
export interface IIdentified {
id: string | number | symbol;
}
export type IWrappedValue<V = any, W = Object> = (W extends object[] ? UnionToIntersection<W[number]> : W extends object ? W : object) & {
value: V;
};
export type ITyped<T = any> = {
type: T;
};
export type ITypedValue<V = any, T = any> = IWrappedValue<V, ITyped<T>>;
export type IMeted<M extends IAnyMap = IAnyMap> = {
meta: M;
};
export type IMetedValue<V = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, IMeted<M>>;
export type IMetaTyped<T = any, M extends IAnyMap = IAnyMap> = ITyped<T> & IMeted<M>;
export type IMetaTypedValue<V = any, T = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, IMetaTyped<T, M>>;
export type INormalValue<V = any, T = any, M extends IAnyMap = IAnyMap> = IWrappedValue<V, [IMetaTyped<T, M>, IIdentified]>;
}
declare module '@qiwi/substrate-types/target/es5/IUtilMap' {
/** @module @qiwi/substrate-types */
/** */
export type TUtilMapCollection = any[] | object;
export type TUtilMapHandler = (value: any, key?: string | number, collection?: TUtilMapCollection) => any;
export type TUtilMap = (collection: TUtilMapCollection, handler: TUtilMapHandler) => any[];
declare module '@qiwi/substrate-types/target/es5/IFunction' {
export type IFunction<A extends any[] = any[], R = any> = (...args: A) => R;
export type IFn<A extends any[] = any[], R = any> = IFunction<A, R>;
export type ICallable<A extends any[] = any[], R = any> = IFunction<A, R>;
export type IUnaryFunction<A = any, R = any> = (a: A) => R;
export type IUnaryFn<A = any, R = any> = IUnaryFunction<A, R>;
}
declare module '@qiwi/substrate-types/target/es5/IStorage' {
/** @module @qiwi/substrate-types */
/** */
export type TStorageKey = string;
export type TStorageValue = any;
export type TStorageTTL = number;
export interface IStorage {
get: (key: TStorageKey) => TStorageValue;
set: (key: TStorageKey, value: TStorageValue, ttl?: TStorageTTL) => void;
has: (key: TStorageKey) => boolean;
remove: (key: TStorageKey) => void;
size: () => number;
reset: () => void;
}
declare module '@qiwi/substrate-types/target/es5/IMetadata' {
export interface IMetadataProvider {
defineMetadata(metadataKey: any, metadataValue: any, target: any, propertyKey?: string | symbol): void;
hasMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): boolean;
getMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): any;
getOwnMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): any;
}
}
declare module '@qiwi/substrate-types/target/es5/IStack' {
/** @module @qiwi/substrate-types */
/** */
import { ICollection } from '@qiwi/substrate-types/target/es5/ICollection';
export type IStackItem = any;
export interface IStack<T> extends ICollection<T> {
push: (...items: Array<T>) => T;
pop: () => T | undefined;
unshift: (...items: Array<T>) => T;
shift: () => T | undefined;
indexOf: (item: T) => number;
first: () => T | undefined;
last: () => T | undefined;
toArray(): Array<T>;
}
declare module '@qiwi/substrate-types/target/es5/IEnableable' {
export interface IEnableable {
enable(): void;
disable(): void;
}
}
declare module '@qiwi/substrate-types/target/es5/TPredicate' {
/** @module @qiwi/substrate-types */
/** */
export type TPredicate = (...args: any[]) => boolean;
declare module '@qiwi/substrate-types/target/es5/IPipeline' {
import { IUnaryFn } from '@qiwi/substrate-types/target/es5/IFunction';
import { INormalValue } from '@qiwi/substrate-types/target/es5/INormalValue';
export type IPipe<E = any> = IUnaryFn<E, E>;
export type IPipeline<P extends IPipe = IPipe> = Array<P>;
export type INormalPipe<E extends INormalValue = INormalValue> = IPipe<E>;
export type INormalPipeline<P extends INormalPipe = INormalPipe> = IPipeline<P>;
}
declare module '@qiwi/substrate-types/target/es5/export' {
/** @module @qiwi/substrate-types */
/** */
export { IStringMap } from '@qiwi/substrate-types/target/es5/IStringMap';
export { IAnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
export { IEventEmitter } from '@qiwi/substrate-types/target/es5/IEventEmitter';
export { ILogger, LogLevel, ILoggerMethod } from '@qiwi/substrate-types/target/es5/ILogger';
export { TUtilGet } from '@qiwi/substrate-types/target/es5/IUtilGet';
export { TUtilSet } from '@qiwi/substrate-types/target/es5/IUtilSet';
export { TUtilEach } from '@qiwi/substrate-types/target/es5/IUtilEach';
export { TUtilMap } from '@qiwi/substrate-types/target/es5/IUtilMap';
export { ICloneable } from '@qiwi/substrate-types/target/es5/ICloneable';
export { ICurrency } from '@qiwi/substrate-types/target/es5/ICurrency';
export { IPromiseConstructor, IPromise } from '@qiwi/substrate-types/target/es5/IPromise';
export { IStorage } from '@qiwi/substrate-types/target/es5/IStorage';
export { IMoney } from '@qiwi/substrate-types/target/es5/IMoney';
export { IStack } from '@qiwi/substrate-types/target/es5/IStack';
export { ICollection } from '@qiwi/substrate-types/target/es5/ICollection';
export { TPredicate } from '@qiwi/substrate-types/target/es5/TPredicate';
export { IConfigurable } from '@qiwi/substrate-types/target/es5/IConfigurable';
export { IConfig } from '@qiwi/substrate-types/target/es5/IConfig';
export { IConstructor, IConstructable, Abstract, IClass, } from '@qiwi/substrate-types/target/es5/IConstructor';
export { IIterable, IIterator, IIteratorResult, } from '@qiwi/substrate-types/target/es5/IIterable';
export { IMiddleware, IAsyncMiddleware, IErrorMiddleware, IRequestMiddleware, IRequest, IResponse, INext, } from '@qiwi/substrate-types/target/es5/IMiddleware';
export { IPool, IPooledObject, IPooledObjectFactory, IPooledObjectStatus, } from '@qiwi/substrate-types/target/es5/IPool';
export { IHttpClient, IFetch, IHttpRequestProvider, HttpMethod, } from '@qiwi/substrate-types/target/es5/IHttpClient';
export { IClientEventDto, IClientEventMeta, EnvironmentProfile, } from '@qiwi/substrate-types/target/es5/IClientEventDto';
export { INormalValue, IIdentified, IMetaTyped, IMetaTypedValue, IWrappedValue, ITyped, ITypedValue, IMeted, IMetedValue, } from '@qiwi/substrate-types/target/es5/INormalValue';
export { IFunction, IFn, IUnaryFunction, IUnaryFn, ICallable, } from '@qiwi/substrate-types/target/es5/IFunction';
export { IMetadataProvider } from '@qiwi/substrate-types/target/es5/IMetadata';
export { IEnableable } from '@qiwi/substrate-types/target/es5/IEnableable';
export { IPipe, IPipeline, INormalPipe, INormalPipeline, } from '@qiwi/substrate-types/target/es5/IPipeline';
export { IExtra } from '@qiwi/substrate-types/target/es5/IExtra';
export { INil, INullOrUndefined, } from '@qiwi/substrate-types/target/es5/INil';
export { IExecutionMode } from '@qiwi/substrate-types/target/es5/IExecutionMode';
export { IDeviceInfo, IBrowserInfo, IOperationalSystemInfo, } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
declare module '@qiwi/substrate-types/target/es5/IExtra' {
export type IExtra<K extends string, V> = {
[key in K]: V;
};
}
declare module '@qiwi/substrate-types/target/es5/IPool' {
/** @module @qiwi/substrate-types */
/** */
import { IPromise } from '@qiwi/substrate-types/target/es5/export';
export const enum IPooledObjectStatus {
READY = "ready",
ACTIVE = "active",
INVALID = "invalid"
}
export interface IPooledObject<T> {
ref: T;
status: IPooledObjectStatus;
activate(): void;
passivate(): void;
destroy(): void;
validate(): boolean;
[key: string]: any;
}
export interface IPooledObjectFactory<T> {
(...args: any[]): IPooledObject<T>;
}
export interface IPool<T> {
factory: IPooledObjectFactory<T>;
borrow(): IPromise<T>;
release(instance: T): void;
invalidate(instance: T): void;
[key: string]: any;
}
declare module '@qiwi/substrate-types/target/es5/INil' {
export type INil = null | undefined;
export type INullOrUndefined = INil;
}
declare module '@qiwi/substrate-types/target/es5/aliases' {
/** @module @qiwi/substrate-types */
/** */
export { IStringMap as StringMap } from '@qiwi/substrate-types/target/es5/IStringMap';
export { IAnyMap as AnyMap } from '@qiwi/substrate-types/target/es5/IAnyMap';
export { IEventEmitter as EventEmitter } from '@qiwi/substrate-types/target/es5/IEventEmitter';
export { ILogger as Logger, LogLevel, ILoggerMethod as LoggerMethod } from '@qiwi/substrate-types/target/es5/ILogger';
export { TUtilGet as UtilGet } from '@qiwi/substrate-types/target/es5/IUtilGet';
export { TUtilSet as UtilSet } from '@qiwi/substrate-types/target/es5/IUtilSet';
export { TUtilEach as UtilEach } from '@qiwi/substrate-types/target/es5/IUtilEach';
export { TUtilMap as UtilMap } from '@qiwi/substrate-types/target/es5/IUtilMap';
export { ICloneable as Cloneable } from '@qiwi/substrate-types/target/es5/ICloneable';
export { ICurrency as Currency } from '@qiwi/substrate-types/target/es5/ICurrency';
export {} from '@qiwi/substrate-types/target/es5/IPromise';
export { IStorage as Storage } from '@qiwi/substrate-types/target/es5/IStorage';
export { IMoney as Money } from '@qiwi/substrate-types/target/es5/IMoney';
export {} from '@qiwi/substrate-types/target/es5/IStack';
export { ICollection as Collection } from '@qiwi/substrate-types/target/es5/ICollection';
export { TPredicate as Predicate } from '@qiwi/substrate-types/target/es5/TPredicate';
export { IConfigurable as Configurable } from '@qiwi/substrate-types/target/es5/IConfigurable';
export { IConfig as Config } from '@qiwi/substrate-types/target/es5/IConfig';
export { IConstructor as Constructor, IConstructable as Constructable, Abstract, IClass as Class, } from '@qiwi/substrate-types/target/es5/IConstructor';
export { IIterable as Iterable, IIterator as Iterator, IIteratorResult as IteratorResult, } from '@qiwi/substrate-types/target/es5/IIterable';
export { IMiddleware as Middleware, IAsyncMiddleware as AsyncMiddleware, IErrorMiddleware as ErrorMiddleware, IRequestMiddleware as RequestMiddleware, IRequest as Request, IResponse as Response, INext as Next, } from '@qiwi/substrate-types/target/es5/IMiddleware';
export { IPool as Pool, IPooledObject as PooledObject, IPooledObjectFactory as PooledObjectFactory, IPooledObjectStatus as PooledObjectStatus, } from '@qiwi/substrate-types/target/es5/IPool';
export { IHttpClient as HttpClient, IFetch as Fetch, IHttpRequestProvider as HttpRequestProvider, HttpMethod, } from '@qiwi/substrate-types/target/es5/IHttpClient';
export { IClientEventDto as ClientEventDto, IClientEventMeta as ClientEventMeta, EnvironmentProfile, } from '@qiwi/substrate-types/target/es5/IClientEventDto';
export { INormalValue as NormalValue, IIdentified as Identified, IMetaTyped as MetaTyped, IMetaTypedValue as MetaTypedValue, IWrappedValue as WrappedValue, ITyped as Typed, ITypedValue as TypedValue, IMeted as Meted, IMetedValue as MetedValue, } from '@qiwi/substrate-types/target/es5/INormalValue';
export { IFn as Fn, IUnaryFunction as UnaryFunction, IUnaryFn as UnaryFn, ICallable as Callable, } from '@qiwi/substrate-types/target/es5/IFunction';
export { IMetadataProvider as MetadataProvider } from '@qiwi/substrate-types/target/es5/IMetadata';
export { IEnableable as Enableable } from '@qiwi/substrate-types/target/es5/IEnableable';
export { IPipe as Pipe, IPipeline as Pipeline, INormalPipe as NormalPipe, INormalPipeline as NormalPipeline, } from '@qiwi/substrate-types/target/es5/IPipeline';
export { IExtra as Extra } from '@qiwi/substrate-types/target/es5/IExtra';
export { INil as Nil, INullOrUndefined as NullOrUndefined, } from '@qiwi/substrate-types/target/es5/INil';
export { IExecutionMode as ExecutionMode } from '@qiwi/substrate-types/target/es5/IExecutionMode';
export { IDeviceInfo as DeviceInfo, IBrowserInfo as BrowserInfo, IOperationalSystemInfo as OperationalSystemInfo, } from '@qiwi/substrate-types/target/es5/IDeviceInfo';
declare module '@qiwi/substrate-types/target/es5/IExecutionMode' {
export enum IExecutionMode {
SYNC = "sync",
ASYNC = "async"
}
}
declare module '@qiwi/substrate-types/target/es5/extras' {
import { IExtra } from '@qiwi/substrate-types/target/es5/IExtra';
import { IStorage } from '@qiwi/substrate-types/target/es5/IStorage';
export type IStoreExtra = IExtra<'store', IStorage>;
export type IStorageExtra = IExtra<'storage', IStorage>;
declare module '@qiwi/substrate-types/target/es5/IDeviceInfo' {
import { RecursivePartial } from '@qiwi/substrate-types/target/es5/helpers';
export type IBrowserInfo = RecursivePartial<{
name: string | null;
version: string | null;
layout: string | null;
}>;
export type IOperationalSystemInfo = RecursivePartial<{
name: string | null;
architecture: number | null;
family: string | null;
version: string | null;
}>;
export type IDeviceInfo = RecursivePartial<{
browser: IBrowserInfo;
model: {
name: string | null;
manufacturer: string | null;
};
isMobile: boolean;
os: IOperationalSystemInfo;
}>;
}
declare module '@qiwi/substrate-types/target/es5/index' {
/** @module @qiwi/substrate-types */
/** */
export * from '@qiwi/substrate-types/target/es5/export';
export * from '@qiwi/substrate-types/target/es5/aliases';
export * from '@qiwi/substrate-types/target/es5/helpers';
export * from '@qiwi/substrate-types/target/es5/extras';
}
declare module '@qiwi/substrate-types' {
export * from '@qiwi/substrate-types/target/es5/index';
/** */
export * from '@qiwi/substrate-types/target/es5';
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc