@dappworks/urpc
Advanced tools
Comparing version 0.0.44 to 0.0.45
@@ -43,2 +43,15 @@ // Generated by dts-bundle-generator v9.5.1 | ||
}; | ||
export type URPC_Class<G extends () => { | ||
enums?: any[] | { | ||
label: any; | ||
value: any; | ||
}[]; | ||
default?: any; | ||
} = () => any> = { | ||
class: string; | ||
get: G; | ||
}; | ||
export type URPC_Input<T> = { | ||
[K in keyof T]: T[K] extends URPC_Class<infer G> ? ReturnType<G>["default"] : T[K]; | ||
}; | ||
export interface URPC_Function<T extends Object = {}, R extends any = any, V = any> { | ||
@@ -51,3 +64,3 @@ uid: string; | ||
func: (args: { | ||
input: T; | ||
input: URPC_Input<T>; | ||
val?: R; | ||
@@ -87,10 +100,6 @@ }) => V; | ||
} | ||
export type URPC_Entity = URPC_Function<any, any, any> | URPC_Variable<any>; | ||
export type URPC_Entity = URPC_Function<any, any, any> | URPC_Variable<any> | URPC_Schema; | ||
export type URPC_Schema = { | ||
[key: string]: URPC_Entity | URPC_Schema; | ||
[key: string]: URPC_Entity; | ||
}; | ||
export type URPC_Class<G extends () => any = () => any> = { | ||
class: string; | ||
get: G; | ||
}; | ||
export declare class URPC<T extends URPC_Schema = any> { | ||
@@ -100,3 +109,4 @@ schemas: T; | ||
uidSchemas: URPC_Schema; | ||
static enum<G extends () => any>(args: Partial<URPC_Class<G>>): URPC_Class<G>; | ||
static enum<G extends URPC_Class["get"]>(get: G): URPC_Class<G>; | ||
static Namespace(args: URPC_Entity): URPC_Entity; | ||
static Var<G extends () => any>(args: Partial<URPC_Variable<G>>): URPC_Variable<G>; | ||
@@ -108,18 +118,4 @@ static Func<T extends Object = {}, R = any, V = any>(args: Partial<URPC_Function<T, R, V>>): URPC_Function<T, R, V>; | ||
namespace: string; | ||
}): Promise<({ | ||
}): Promise<(Partial<URPC_Function<{}, any, any>> | { | ||
uid: string; | ||
type: "func"; | ||
name: string | undefined; | ||
input: any; | ||
uiConfig: FormConfigType<any> | undefined; | ||
schema: { | ||
[x: string]: SchemaItem<any, any> | undefined; | ||
} & { | ||
[key: string]: SchemaItem<any, any>; | ||
}; | ||
value?: undefined; | ||
set?: undefined; | ||
patch?: undefined; | ||
} | { | ||
uid: string; | ||
type: "var" | undefined; | ||
@@ -147,4 +143,2 @@ name: string | undefined; | ||
}; | ||
input?: undefined; | ||
uiConfig?: undefined; | ||
} | { | ||
@@ -154,8 +148,6 @@ type: string; | ||
uid?: undefined; | ||
input?: undefined; | ||
uiConfig?: undefined; | ||
schema?: undefined; | ||
value?: undefined; | ||
set?: undefined; | ||
patch?: undefined; | ||
schema?: undefined; | ||
})[]>; | ||
@@ -213,24 +205,4 @@ loadVars(params?: { | ||
schema: { | ||
loadFull(params: Parameters<URPC<T>["loadFull"]>[0]): Promise<({ | ||
loadFull(params: Parameters<URPC<T>["loadFull"]>[0]): Promise<(Partial<URPC_Function<{}, any, any>> | { | ||
uid: string; | ||
type: "func"; | ||
name: string | undefined; | ||
input: any; | ||
uiConfig: FormConfigType<any> | undefined; | ||
schema: { | ||
[x: string]: ({ | ||
type?: string | undefined; | ||
uiConfig?: FormConfigItem | undefined; | ||
} | URPC_Function<any, any, any> | URPC_Action<any, any>) | undefined; | ||
} & { | ||
[key: string]: { | ||
type?: string | undefined; | ||
uiConfig?: FormConfigItem | undefined; | ||
} | URPC_Function<any, any, any> | URPC_Action<any, any>; | ||
}; | ||
value?: undefined; | ||
set?: undefined; | ||
patch?: undefined; | ||
} | { | ||
uid: string; | ||
type: "var" | undefined; | ||
@@ -264,4 +236,2 @@ name: string | undefined; | ||
}; | ||
input?: undefined; | ||
uiConfig?: undefined; | ||
} | { | ||
@@ -271,8 +241,6 @@ type: string; | ||
uid?: undefined; | ||
input?: undefined; | ||
uiConfig?: undefined; | ||
schema?: undefined; | ||
value?: undefined; | ||
set?: undefined; | ||
patch?: undefined; | ||
schema?: undefined; | ||
})[]>; | ||
@@ -279,0 +247,0 @@ loadVars(params?: Parameters<URPC<T>["loadFull"]>[0]): Promise<{ |
{ | ||
"name": "@dappworks/urpc", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"module": "index.ts", | ||
@@ -16,3 +16,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@rjsf/utils": "^5.7.3", | ||
"@rjsf/utils": "^5.18.4", | ||
"@types/bun": "latest", | ||
@@ -23,6 +23,6 @@ "@types/json-schema": "^7.0.15", | ||
"bun-plugin-dts": "^0.2.3", | ||
"hono": "^4.2.6" | ||
"hono": "^4.4.6" | ||
}, | ||
"peerDependencies": { | ||
"typescript": "^5.0.0" | ||
"typescript": "^5.4.5" | ||
}, | ||
@@ -29,0 +29,0 @@ "homepage": "https://github.com/dapp-works/urpc", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125098
715