appflare 0.2.0 → 0.2.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.
|
@@ -94,6 +94,32 @@ export type AppflareQueryRouteClient<
|
|
|
94
94
|
) => AppflareRealtimeSubscription;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
+
export type InferRouteSchema<TRoute> = TRoute extends {
|
|
98
|
+
schema: infer TSchema;
|
|
99
|
+
}
|
|
100
|
+
? TSchema
|
|
101
|
+
: never;
|
|
102
|
+
|
|
103
|
+
export type InferRouteInput<TRoute> = TRoute extends {
|
|
104
|
+
run: (...args: infer TArgs) => Promise<unknown>;
|
|
105
|
+
}
|
|
106
|
+
? TArgs extends [infer TInput, ...unknown[]]
|
|
107
|
+
? TInput
|
|
108
|
+
: never
|
|
109
|
+
: never;
|
|
110
|
+
|
|
111
|
+
export type InferRouteResult<TRoute> = TRoute extends {
|
|
112
|
+
run: (...args: infer _TArgs) => Promise<infer TResult>;
|
|
113
|
+
}
|
|
114
|
+
? TResult
|
|
115
|
+
: never;
|
|
116
|
+
|
|
117
|
+
export type InferRouteOutput<TRoute> = InferRouteResult<TRoute> extends AppflareRequestResult<
|
|
118
|
+
infer TOutput
|
|
119
|
+
>
|
|
120
|
+
? TOutput
|
|
121
|
+
: never;
|
|
122
|
+
|
|
97
123
|
export type StorageSignedUrlResponse = {
|
|
98
124
|
url: string;
|
|
99
125
|
method: "GET" | "PUT" | "DELETE";
|