@arrirpc/type-defs 0.70.1 → 0.71.1
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.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
@@ -47,7 +47,7 @@ declare function isSchemaFormRef(input: unknown): input is SchemaFormRef;
|
|
47
47
|
|
48
48
|
declare const HttpMethodValues: readonly ["get", "post", "put", "patch", "delete", "head"];
|
49
49
|
type HttpMethod = (typeof HttpMethodValues)[number];
|
50
|
-
type RpcHttpMethod = Exclude<HttpMethod,
|
50
|
+
type RpcHttpMethod = Exclude<HttpMethod, 'head'>;
|
51
51
|
declare const isHttpMethod: (input: any) => input is HttpMethod;
|
52
52
|
declare const isRpcHttpMethod: (input: any) => input is RpcHttpMethod;
|
53
53
|
declare const SCHEMA_VERSION = "0.0.7";
|
@@ -75,12 +75,12 @@ interface RpcDefinitionBase<T = string> {
|
|
75
75
|
isDeprecated?: boolean;
|
76
76
|
}
|
77
77
|
interface HttpRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
78
|
-
transport:
|
78
|
+
transport: 'http';
|
79
79
|
method: RpcHttpMethod;
|
80
80
|
isEventStream?: boolean;
|
81
81
|
}
|
82
82
|
interface WsRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
83
|
-
transport:
|
83
|
+
transport: 'ws';
|
84
84
|
}
|
85
85
|
interface CustomRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
86
86
|
transport: `custom:${string}`;
|
@@ -100,9 +100,9 @@ interface Generator<TOptions extends Record<string, any> | undefined> {
|
|
100
100
|
type GeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => Generator<TOptions>;
|
101
101
|
declare function defineGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: GeneratorPlugin<TOptions>): GeneratorPlugin<TOptions>;
|
102
102
|
type RpcDefinitionHelper = RpcDefinition<SchemaFormProperties | SchemaFormDiscriminator>;
|
103
|
-
type AppDefinitionHelper = Omit<AppDefinition,
|
103
|
+
type AppDefinitionHelper = Omit<AppDefinition, 'procedures' | 'definitions' | 'schemaVersion'> & {
|
104
104
|
procedures: Record<string, RpcDefinitionHelper>;
|
105
|
-
definitions?: AppDefinition[
|
105
|
+
definitions?: AppDefinition['definitions'];
|
106
106
|
};
|
107
107
|
declare function createAppDefinition(input: AppDefinitionHelper): AppDefinition;
|
108
108
|
|
package/dist/index.d.mts
CHANGED
@@ -47,7 +47,7 @@ declare function isSchemaFormRef(input: unknown): input is SchemaFormRef;
|
|
47
47
|
|
48
48
|
declare const HttpMethodValues: readonly ["get", "post", "put", "patch", "delete", "head"];
|
49
49
|
type HttpMethod = (typeof HttpMethodValues)[number];
|
50
|
-
type RpcHttpMethod = Exclude<HttpMethod,
|
50
|
+
type RpcHttpMethod = Exclude<HttpMethod, 'head'>;
|
51
51
|
declare const isHttpMethod: (input: any) => input is HttpMethod;
|
52
52
|
declare const isRpcHttpMethod: (input: any) => input is RpcHttpMethod;
|
53
53
|
declare const SCHEMA_VERSION = "0.0.7";
|
@@ -75,12 +75,12 @@ interface RpcDefinitionBase<T = string> {
|
|
75
75
|
isDeprecated?: boolean;
|
76
76
|
}
|
77
77
|
interface HttpRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
78
|
-
transport:
|
78
|
+
transport: 'http';
|
79
79
|
method: RpcHttpMethod;
|
80
80
|
isEventStream?: boolean;
|
81
81
|
}
|
82
82
|
interface WsRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
83
|
-
transport:
|
83
|
+
transport: 'ws';
|
84
84
|
}
|
85
85
|
interface CustomRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
86
86
|
transport: `custom:${string}`;
|
@@ -100,9 +100,9 @@ interface Generator<TOptions extends Record<string, any> | undefined> {
|
|
100
100
|
type GeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => Generator<TOptions>;
|
101
101
|
declare function defineGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: GeneratorPlugin<TOptions>): GeneratorPlugin<TOptions>;
|
102
102
|
type RpcDefinitionHelper = RpcDefinition<SchemaFormProperties | SchemaFormDiscriminator>;
|
103
|
-
type AppDefinitionHelper = Omit<AppDefinition,
|
103
|
+
type AppDefinitionHelper = Omit<AppDefinition, 'procedures' | 'definitions' | 'schemaVersion'> & {
|
104
104
|
procedures: Record<string, RpcDefinitionHelper>;
|
105
|
-
definitions?: AppDefinition[
|
105
|
+
definitions?: AppDefinition['definitions'];
|
106
106
|
};
|
107
107
|
declare function createAppDefinition(input: AppDefinitionHelper): AppDefinition;
|
108
108
|
|
package/dist/index.d.ts
CHANGED
@@ -47,7 +47,7 @@ declare function isSchemaFormRef(input: unknown): input is SchemaFormRef;
|
|
47
47
|
|
48
48
|
declare const HttpMethodValues: readonly ["get", "post", "put", "patch", "delete", "head"];
|
49
49
|
type HttpMethod = (typeof HttpMethodValues)[number];
|
50
|
-
type RpcHttpMethod = Exclude<HttpMethod,
|
50
|
+
type RpcHttpMethod = Exclude<HttpMethod, 'head'>;
|
51
51
|
declare const isHttpMethod: (input: any) => input is HttpMethod;
|
52
52
|
declare const isRpcHttpMethod: (input: any) => input is RpcHttpMethod;
|
53
53
|
declare const SCHEMA_VERSION = "0.0.7";
|
@@ -75,12 +75,12 @@ interface RpcDefinitionBase<T = string> {
|
|
75
75
|
isDeprecated?: boolean;
|
76
76
|
}
|
77
77
|
interface HttpRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
78
|
-
transport:
|
78
|
+
transport: 'http';
|
79
79
|
method: RpcHttpMethod;
|
80
80
|
isEventStream?: boolean;
|
81
81
|
}
|
82
82
|
interface WsRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
83
|
-
transport:
|
83
|
+
transport: 'ws';
|
84
84
|
}
|
85
85
|
interface CustomRpcDefinition<T = string> extends RpcDefinitionBase<T> {
|
86
86
|
transport: `custom:${string}`;
|
@@ -100,9 +100,9 @@ interface Generator<TOptions extends Record<string, any> | undefined> {
|
|
100
100
|
type GeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => Generator<TOptions>;
|
101
101
|
declare function defineGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: GeneratorPlugin<TOptions>): GeneratorPlugin<TOptions>;
|
102
102
|
type RpcDefinitionHelper = RpcDefinition<SchemaFormProperties | SchemaFormDiscriminator>;
|
103
|
-
type AppDefinitionHelper = Omit<AppDefinition,
|
103
|
+
type AppDefinitionHelper = Omit<AppDefinition, 'procedures' | 'definitions' | 'schemaVersion'> & {
|
104
104
|
procedures: Record<string, RpcDefinitionHelper>;
|
105
|
-
definitions?: AppDefinition[
|
105
|
+
definitions?: AppDefinition['definitions'];
|
106
106
|
};
|
107
107
|
declare function createAppDefinition(input: AppDefinitionHelper): AppDefinition;
|
108
108
|
|