@iotexproject/kit 0.1.49 → 0.1.50
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/dist/index.d.ts +7 -2
- package/dist/index.js +1 -1
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -7221,8 +7221,8 @@ declare class PointsPlatform {
|
|
|
7221
7221
|
user: string;
|
|
7222
7222
|
}, ctx?: ConfigContext): Promise<{
|
|
7223
7223
|
selfPoints: any;
|
|
7224
|
-
selfRank:
|
|
7225
|
-
dailyPoints:
|
|
7224
|
+
selfRank: {};
|
|
7225
|
+
dailyPoints: {};
|
|
7226
7226
|
error?: undefined;
|
|
7227
7227
|
} | {
|
|
7228
7228
|
error: unknown;
|
|
@@ -8678,6 +8678,11 @@ export type DBModuleType = typeof modules$1;
|
|
|
8678
8678
|
export interface ConfigOptions {
|
|
8679
8679
|
ttl?: number;
|
|
8680
8680
|
checkAuth?: boolean;
|
|
8681
|
+
route?: {
|
|
8682
|
+
method: "get" | "post" | "put" | "delete" | "all";
|
|
8683
|
+
path: string;
|
|
8684
|
+
absolutePath?: boolean;
|
|
8685
|
+
};
|
|
8681
8686
|
}
|
|
8682
8687
|
export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
|
|
8683
8688
|
input?: I;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var U=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{for(let K in b){if(typeof b[K]==="object")b[K]=JSON.stringify(b[K],(Q,N)=>typeof N==="bigint"?N.toString():N);if(b[K]==null)delete b[K]}
|
|
1
|
+
var U=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{for(let K in b){if(typeof b[K]==="object")b[K]=JSON.stringify(b[K],(Q,N)=>typeof N==="bigint"?N.toString():N);if(b[K]==null)delete b[K]}let H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`,D;if(z)D=await fetch(H,{headers:{...z}});else D=await fetch(H);return D.json()}}})}}),S=async({args:j={},prop:z,method:L,url:B,fetchRequestInit:G})=>{if(!G?.method||G?.method==="GET"){for(let b in j){if(typeof j[b]==="object")j[b]=JSON.stringify(j[b],(H,D)=>typeof D==="bigint"?D.toString():D);if(j[b]==null)delete j[b]}let J=`${B}/${String(z)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(J,{...G})).json()}if(G?.method==="POST"){let J=`${B}/${String(z)}/${String(L)}`;return(await fetch(J,{...G,body:JSON.stringify(j)})).json()}},V=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),W=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),X=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{let H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;return(await fetch(H,{method:"GET",...z})).json()}}})}}),Y=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{let H=!1;for(let N in b){if(typeof b[N]==="object")H=!0;if(b[N]==null)delete b[N]}let D,K,Q={};if(H)D=`${j}/${String(B)}/${String(C)}`;else D=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;if(z)Q.headers={...z};if(H)Q.method="POST",Q.body=JSON.stringify(b);return K=await fetch(D,Q),K.json()}}})}});export{X as createIotexscanClient,Y as createIoidClient,W as createClientWithIoPayServer,V as createClientWithDBServer,U as createClient};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@iotexproject/kit",
|
|
3
3
|
"module": "index.ts",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "v0.1.
|
|
5
|
+
"version": "v0.1.50",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"test": "bun --hot run tests/test-marshalldao.ts",
|
|
14
14
|
"build": "bun run build.mjs",
|
|
15
15
|
"prepublishOnly": "bun run build",
|
|
16
|
-
"postinstall": "bun generate-prisma",
|
|
17
16
|
"gen:grpc": "protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./lib/grpc/generated -I ./lib/grpc/protos ./lib/grpc/protos/*.proto",
|
|
18
17
|
"generate-prisma": "prisma generate --schema=./prisma/schema.prisma"
|
|
19
18
|
},
|