@iotexproject/kit 0.1.29 → 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 +118 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4133,6 +4133,7 @@ declare class VerifyingProxyEntity {
|
|
|
4133
4133
|
export type ConfigContext = {
|
|
4134
4134
|
chainId: string;
|
|
4135
4135
|
appName: string;
|
|
4136
|
+
authData?: Record<string, any>;
|
|
4136
4137
|
};
|
|
4137
4138
|
declare class IoID {
|
|
4138
4139
|
verfiyerProxyList(args: {
|
|
@@ -4222,11 +4223,12 @@ declare class IoID {
|
|
|
4222
4223
|
chainId?: undefined;
|
|
4223
4224
|
}>;
|
|
4224
4225
|
setProjectMetadata(args: {
|
|
4226
|
+
key: string;
|
|
4225
4227
|
address: `0x${string}`;
|
|
4226
4228
|
metadata: ProjectMetadata;
|
|
4227
4229
|
}, ctx?: ConfigContext): Promise<{
|
|
4228
4230
|
address: `0x${string}`;
|
|
4229
|
-
data:
|
|
4231
|
+
data: any;
|
|
4230
4232
|
chainId: string;
|
|
4231
4233
|
error?: undefined;
|
|
4232
4234
|
} | {
|
|
@@ -8879,28 +8881,90 @@ declare class Analysis extends BaseDBModule {
|
|
|
8879
8881
|
api_key: string;
|
|
8880
8882
|
};
|
|
8881
8883
|
}>;
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
+
upload_event({ user_id, event_type, event_id, event }: {
|
|
8885
|
+
event_type: string;
|
|
8886
|
+
user_id: string;
|
|
8887
|
+
event_id: string;
|
|
8888
|
+
event: Record<string, any>;
|
|
8889
|
+
}, ctx?: {
|
|
8890
|
+
authData?: {
|
|
8891
|
+
app_id: string;
|
|
8892
|
+
api_key: string;
|
|
8893
|
+
};
|
|
8894
|
+
}): Promise<{
|
|
8895
|
+
ok: boolean;
|
|
8896
|
+
msg: any;
|
|
8897
|
+
}>;
|
|
8898
|
+
generate_referral_code({ refer_id, }: {
|
|
8884
8899
|
refer_id: string;
|
|
8900
|
+
}, ctx?: {
|
|
8901
|
+
authData?: {
|
|
8902
|
+
app_id: string;
|
|
8903
|
+
api_key: string;
|
|
8904
|
+
};
|
|
8905
|
+
}): Promise<{
|
|
8906
|
+
ok: boolean;
|
|
8907
|
+
referral_code: any;
|
|
8908
|
+
msg: string;
|
|
8909
|
+
} | {
|
|
8910
|
+
ok: boolean;
|
|
8911
|
+
msg: any;
|
|
8912
|
+
referral_code?: undefined;
|
|
8913
|
+
}>;
|
|
8914
|
+
fetch_referral_code({ user_id, }: {
|
|
8885
8915
|
user_id: string;
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8916
|
+
}, ctx?: {
|
|
8917
|
+
authData?: {
|
|
8918
|
+
app_id: string;
|
|
8919
|
+
api_key: string;
|
|
8920
|
+
};
|
|
8890
8921
|
}): Promise<{
|
|
8922
|
+
ok: boolean;
|
|
8923
|
+
referral_code: any;
|
|
8924
|
+
msg?: undefined;
|
|
8925
|
+
} | {
|
|
8891
8926
|
ok: boolean;
|
|
8892
8927
|
msg: any;
|
|
8928
|
+
referral_code?: undefined;
|
|
8893
8929
|
}>;
|
|
8894
|
-
|
|
8895
|
-
|
|
8930
|
+
create_refer({ refer_id, refer_id_type, user_id, device_id, data, }: {
|
|
8931
|
+
refer_id: string;
|
|
8932
|
+
refer_id_type: "referral_code" | "user_id";
|
|
8896
8933
|
user_id: string;
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8934
|
+
device_id: string;
|
|
8935
|
+
data: Record<string, any>;
|
|
8936
|
+
}, ctx?: {
|
|
8937
|
+
authData?: {
|
|
8938
|
+
app_id: string;
|
|
8939
|
+
api_key: string;
|
|
8940
|
+
};
|
|
8941
|
+
}): Promise<{
|
|
8942
|
+
ok: boolean;
|
|
8943
|
+
msg: any;
|
|
8944
|
+
}>;
|
|
8945
|
+
fetch_event({ event_id, }: {
|
|
8946
|
+
event_id: string;
|
|
8947
|
+
}, ctx?: {
|
|
8948
|
+
authData?: {
|
|
8949
|
+
app_id: string;
|
|
8950
|
+
api_key: string;
|
|
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
|
+
};
|
|
8901
8960
|
}): Promise<{
|
|
8961
|
+
ok: boolean;
|
|
8962
|
+
point: number;
|
|
8963
|
+
msg?: undefined;
|
|
8964
|
+
} | {
|
|
8902
8965
|
ok: boolean;
|
|
8903
8966
|
msg: any;
|
|
8967
|
+
point?: undefined;
|
|
8904
8968
|
}>;
|
|
8905
8969
|
}
|
|
8906
8970
|
declare class Analyzer extends BaseDBModule {
|
|
@@ -9074,7 +9138,7 @@ declare class Staking$1 extends BaseDBModule {
|
|
|
9074
9138
|
data?: undefined;
|
|
9075
9139
|
}>;
|
|
9076
9140
|
}
|
|
9077
|
-
export type ComponentType = "banner-latest" | "
|
|
9141
|
+
export type ComponentType = "banner-latest" | "token-2049";
|
|
9078
9142
|
export interface ComponentData {
|
|
9079
9143
|
id: ComponentType;
|
|
9080
9144
|
html: string;
|
|
@@ -9103,6 +9167,7 @@ declare const modules$1: {
|
|
|
9103
9167
|
export type DBModuleType = typeof modules$1;
|
|
9104
9168
|
export interface ConfigOptions {
|
|
9105
9169
|
ttl: number;
|
|
9170
|
+
checkAuth?: boolean;
|
|
9106
9171
|
}
|
|
9107
9172
|
export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
|
|
9108
9173
|
input?: I;
|
|
@@ -10148,17 +10213,47 @@ declare class Point {
|
|
|
10148
10213
|
sub: string | undefined;
|
|
10149
10214
|
};
|
|
10150
10215
|
}>;
|
|
10151
|
-
upload_event({
|
|
10152
|
-
|
|
10153
|
-
},
|
|
10154
|
-
|
|
10216
|
+
upload_event({ action_id, }: {
|
|
10217
|
+
action_id: number;
|
|
10218
|
+
}, ctx?: {
|
|
10219
|
+
authData?: {
|
|
10220
|
+
sub: string;
|
|
10221
|
+
};
|
|
10155
10222
|
}): Promise<any>;
|
|
10156
|
-
|
|
10157
|
-
|
|
10223
|
+
generate_referral_code(args?: any, ctx?: {
|
|
10224
|
+
authData?: {
|
|
10225
|
+
sub: string;
|
|
10226
|
+
};
|
|
10227
|
+
}): Promise<any>;
|
|
10228
|
+
fetch_referral_code(args?: any, ctx?: {
|
|
10229
|
+
authData?: {
|
|
10230
|
+
sub: string;
|
|
10231
|
+
};
|
|
10232
|
+
}): Promise<any>;
|
|
10233
|
+
create_refer({ referral_code, device_id, }: {
|
|
10234
|
+
referral_code: string;
|
|
10158
10235
|
device_id: string;
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10236
|
+
}, ctx?: {
|
|
10237
|
+
authData?: {
|
|
10238
|
+
sub: string;
|
|
10239
|
+
};
|
|
10240
|
+
}): Promise<any>;
|
|
10241
|
+
fetch_event({ event_id }: {
|
|
10242
|
+
event_id: string;
|
|
10243
|
+
}, ctx?: {
|
|
10244
|
+
authData?: {
|
|
10245
|
+
sub: string;
|
|
10246
|
+
};
|
|
10247
|
+
}): Promise<any>;
|
|
10248
|
+
my_point_tasks(args?: any, ctx?: {
|
|
10249
|
+
authData?: {
|
|
10250
|
+
sub: string;
|
|
10251
|
+
};
|
|
10252
|
+
}): Promise<any>;
|
|
10253
|
+
my_point(args?: any, ctx?: {
|
|
10254
|
+
authData?: {
|
|
10255
|
+
sub: string;
|
|
10256
|
+
};
|
|
10162
10257
|
}): Promise<any>;
|
|
10163
10258
|
}
|
|
10164
10259
|
declare const modules$4: {
|
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]}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)).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};
|
|
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};
|