@iotexproject/kit 0.1.30 → 0.1.31
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 +24 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8927,11 +8927,12 @@ declare class Analysis extends BaseDBModule {
|
|
|
8927
8927
|
msg: any;
|
|
8928
8928
|
referral_code?: undefined;
|
|
8929
8929
|
}>;
|
|
8930
|
-
create_refer({ refer_id, user_id, device_id, data, }: {
|
|
8930
|
+
create_refer({ refer_id, refer_id_type, user_id, device_id, data, }: {
|
|
8931
8931
|
refer_id: string;
|
|
8932
|
+
refer_id_type: "referral_code" | "user_id";
|
|
8932
8933
|
user_id: string;
|
|
8933
8934
|
device_id: string;
|
|
8934
|
-
data
|
|
8935
|
+
data: Record<string, any>;
|
|
8935
8936
|
}, ctx?: {
|
|
8936
8937
|
authData?: {
|
|
8937
8938
|
app_id: string;
|
|
@@ -8949,6 +8950,22 @@ declare class Analysis extends BaseDBModule {
|
|
|
8949
8950
|
api_key: string;
|
|
8950
8951
|
};
|
|
8951
8952
|
}): Promise<Record<string, any>>;
|
|
8953
|
+
fetch_user_point({ user_id, }: {
|
|
8954
|
+
user_id: string;
|
|
8955
|
+
}, ctx?: {
|
|
8956
|
+
authData?: {
|
|
8957
|
+
app_id: string;
|
|
8958
|
+
api_key: string;
|
|
8959
|
+
};
|
|
8960
|
+
}): Promise<{
|
|
8961
|
+
ok: boolean;
|
|
8962
|
+
point: number;
|
|
8963
|
+
msg?: undefined;
|
|
8964
|
+
} | {
|
|
8965
|
+
ok: boolean;
|
|
8966
|
+
msg: any;
|
|
8967
|
+
point?: undefined;
|
|
8968
|
+
}>;
|
|
8952
8969
|
}
|
|
8953
8970
|
declare class Analyzer extends BaseDBModule {
|
|
8954
8971
|
tvl(): Promise<any>;
|
|
@@ -10198,8 +10215,6 @@ declare class Point {
|
|
|
10198
10215
|
}>;
|
|
10199
10216
|
upload_event({ action_id, }: {
|
|
10200
10217
|
action_id: number;
|
|
10201
|
-
device_id?: string;
|
|
10202
|
-
refer_id?: string;
|
|
10203
10218
|
}, ctx?: {
|
|
10204
10219
|
authData?: {
|
|
10205
10220
|
sub: string;
|
|
@@ -10235,6 +10250,11 @@ declare class Point {
|
|
|
10235
10250
|
sub: string;
|
|
10236
10251
|
};
|
|
10237
10252
|
}): Promise<any>;
|
|
10253
|
+
my_point(args?: any, ctx?: {
|
|
10254
|
+
authData?: {
|
|
10255
|
+
sub: string;
|
|
10256
|
+
};
|
|
10257
|
+
}): Promise<any>;
|
|
10238
10258
|
}
|
|
10239
10259
|
declare const modules$4: {
|
|
10240
10260
|
point: Point;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
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]}const H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;let 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]}const J=`${B}/${String(z)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(J,{...G})).json()}if(G?.method==="POST"){const 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)=>{const 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};
|