@qiwi/substrate-types
Advanced tools
Comparing version
{ | ||
"git": { | ||
"commitId": "ffe3602984c9aecc39b3ac9279d7a3e621c3cfeb", | ||
"repoUrl": "https://github.com/qiwi/substrate.git", | ||
"repoName": "qiwi/substrate" | ||
}, | ||
"date": "2023-05-23T09:01:08.285Z" | ||
"date": "2024-01-31T10:00:50.386Z", | ||
"git_commit_branch": "master", | ||
"git_commit_id": "0b349ddb86b7941db5a98cf97a86f61e4274c135", | ||
"git_repo_url": "https://github.com/qiwi/substrate", | ||
"git_repo_name": "qiwi/substrate", | ||
"ci_run_id": "7724256894", | ||
"ci_run_url": "https://github.com/qiwi/substrate/actions/runs/7724256894" | ||
} |
{ | ||
"name": "@qiwi/substrate-types", | ||
"version": "2.0.4", | ||
"version": "2.1.0", | ||
"exports": { | ||
@@ -8,3 +8,3 @@ ".": { | ||
"require": "./target/cjs/index.cjs", | ||
"types": "./target/esm/index.d.ts" | ||
"types": "./target/dts/index.d.ts" | ||
} | ||
@@ -14,38 +14,40 @@ }, | ||
"module": "./target/esm/index.mjs", | ||
"types": "./target/esm/index.d.ts", | ||
"types": "./target/dts/index.d.ts", | ||
"scripts": { | ||
"clean": "rimraf target buildcache flow-typed typings docs coverage buildstamp.json", | ||
"build": "yarn aliasgen && concurrently 'npm:build:*'", | ||
"build:cjs": "mkdirp target/cjs && tsc -p tsconfig.json --target ES5 --module commonjs --outDir target/cjs --tsBuildInfoFile buildcache/cjs.json && tsc-esm-fix --target=target/cjs --ext=.cjs", | ||
"build:esm": "mkdirp target/esm && tsc -p tsconfig.json --target ES2020 --module es2020 --outDir target/esm --tsBuildInfoFile buildcache/esm.json && tsc-esm-fix --target=target/esm --ext=.mjs", | ||
"build:ts": "mkdirp target/ts && cp -R ./src/main/ts/. ./target/ts/.", | ||
"build:stamp": "buildstamp --git --out.path buildstamp.json", | ||
"build:docs": "typedoc", | ||
"clean": "yarn clean:target", | ||
"build": "yarn build:alias && concurrently 'npm:build:*'", | ||
"build:js": "yarn build:esbuild", | ||
"build:ts": "yarn build:copy:src", | ||
"build:dts": "yarn build:libdef", | ||
"build:docs": "yarn build:typedoc", | ||
"build:stamp": "yarn build:buildstamp", | ||
"test": "yarn test:libdef", | ||
"test:libdef": "yarn dtslint src/test/dts --localTs ../../node_modules/typescript/lib --expectOnly && echo 'dts is fine'", | ||
"aliasgen": "node ../../scripts/js/alias-gen.js" | ||
"test:libdef": "yarn dtslint src/test/dts --localTs ../../node_modules/typescript/lib --expectOnly && echo 'dts is fine'" | ||
}, | ||
"files": [ | ||
"README.md", | ||
"CHANGELOG.md", | ||
"target", | ||
"buildstamp.json" | ||
"target/cjs", | ||
"target/esm", | ||
"target/dts", | ||
"target/ts", | ||
"target/coverage/lcov.info", | ||
"buildstamp.json", | ||
"flow-typed" | ||
], | ||
"devDependencies": { | ||
"@qiwi/substrate-infra": "1.2.3", | ||
"@qiwi/uniconfig": "3.5.11", | ||
"@types/bluebird": "3.5.38", | ||
"@types/config": "3.3.0", | ||
"@types/jest": "29.5.1", | ||
"@types/lodash": "4.14.194", | ||
"@types/node": "20.2.3", | ||
"@types/parsimmon": "1.10.6", | ||
"@types/underscore": "1.11.4", | ||
"axios": "1.4.0", | ||
"@qiwi/uniconfig": "3.5.14", | ||
"@types/bluebird": "3.5.42", | ||
"@types/config": "3.3.3", | ||
"@types/jest": "29.5.11", | ||
"@types/lodash": "4.14.202", | ||
"@types/node": "20.11.10", | ||
"@types/parsimmon": "1.10.9", | ||
"@types/underscore": "1.11.15", | ||
"axios": "1.6.7", | ||
"bluebird": "3.7.2", | ||
"conf": "11.0.1", | ||
"config": "3.3.9", | ||
"cross-fetch": "3.1.6", | ||
"conf": "12.0.0", | ||
"config": "3.3.10", | ||
"cross-fetch": "4.0.0", | ||
"lodash": "4.17.21", | ||
"reflect-metadata": "0.1.13", | ||
"reflect-metadata": "0.2.1", | ||
"underscore": "1.13.6" | ||
@@ -52,0 +54,0 @@ }, |
@@ -35,4 +35,4 @@ export type UnionToIntersection<U, K = any> = ( | ||
: T[P] extends object | ||
? RecursivePartial<T[P]> | ||
: T[P] | ||
? RecursivePartial<T[P]> | ||
: T[P] | ||
} | ||
@@ -39,0 +39,0 @@ |
@@ -13,3 +13,10 @@ import { IPromise } from './IPromise' | ||
export type IHttpMethodV2 = `${HttpMethod}` | ||
export type IHttpMethodV2 = | ||
| 'GET' | ||
| 'DELETE' | ||
| 'HEAD' | ||
| 'OPTIONS' | ||
| 'POST' | ||
| 'PUT' | ||
| 'PATCH' | ||
@@ -46,14 +53,18 @@ export type IHttpHeaders = Record<string, any> | ||
> { | ||
<D = any>(url: string, req?: Req): IPromise< | ||
Omit<Res, 'json'> & IFetchResponse<D> | ||
> | ||
<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> | ||
> | ||
<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>> | ||
} | ||
@@ -66,5 +77,6 @@ | ||
<D = any>(req: Req): IPromise<Omit<Res, 'data'> & IHttpResponse<D>> | ||
<D = any>(url: string, req?: Req): IPromise< | ||
Omit<Res, 'data'> & IHttpResponse<D> | ||
> | ||
<D = any>( | ||
url: string, | ||
req?: Req, | ||
): IPromise<Omit<Res, 'data'> & IHttpResponse<D>> | ||
get: IHttpReqPerform<Req, Res> | ||
@@ -71,0 +83,0 @@ post: IHttpReqPerform<Req, Res> |
@@ -11,4 +11,4 @@ import { UnionToIntersection } from './helpers' | ||
: W extends object | ||
? W | ||
: object) & { value: V } | ||
? W | ||
: object) & { value: V } | ||
@@ -15,0 +15,0 @@ export type ITyped<T = any> = { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2260
29.51%82960
-28.65%45
-83.33%1
Infinity%