@confect/core 9.0.0-next.9 → 9.0.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/CHANGELOG.md +158 -4
- package/dist/FunctionProvenance.d.ts +84 -90
- package/dist/FunctionProvenance.d.ts.map +1 -1
- package/dist/FunctionSpec.d.ts +178 -218
- package/dist/FunctionSpec.d.ts.map +1 -1
- package/dist/GenericId.d.ts +6 -13
- package/dist/GenericId.d.ts.map +1 -1
- package/dist/GroupPath.d.ts +10 -16
- package/dist/GroupPath.d.ts.map +1 -1
- package/dist/GroupSpec.d.ts +38 -37
- package/dist/GroupSpec.d.ts.map +1 -1
- package/dist/Identifier.d.ts +2 -7
- package/dist/Identifier.d.ts.map +1 -1
- package/dist/Lazy.d.ts +1 -6
- package/dist/Lazy.d.ts.map +1 -1
- package/dist/PaginationResult.d.ts +10 -17
- package/dist/PaginationResult.d.ts.map +1 -1
- package/dist/Ref.d.ts +54 -52
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Refs.d.ts +21 -21
- package/dist/Refs.d.ts.map +1 -1
- package/dist/Registry.d.ts +5 -10
- package/dist/Registry.d.ts.map +1 -1
- package/dist/RuntimeAndFunctionType.d.ts +36 -41
- package/dist/RuntimeAndFunctionType.d.ts.map +1 -1
- package/dist/Spec.d.ts +17 -21
- package/dist/Spec.d.ts.map +1 -1
- package/dist/SystemFields.d.ts +9 -15
- package/dist/SystemFields.d.ts.map +1 -1
- package/dist/Types.d.ts +27 -27
- package/dist/Types.d.ts.map +1 -1
- package/dist/UserIdentity.d.ts +55 -62
- package/dist/UserIdentity.d.ts.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -0
- package/dist/tsconfig.src.tsbuildinfo +1 -0
- package/package.json +4 -12
package/dist/FunctionSpec.d.ts
CHANGED
|
@@ -1,247 +1,207 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
-
|
|
1
|
+
import type { FunctionType, FunctionVisibility, RegisteredAction, RegisteredMutation, RegisteredQuery } from "convex/server";
|
|
2
|
+
import type { Schema } from "effect";
|
|
3
|
+
import * as FunctionProvenance from "./FunctionProvenance";
|
|
4
|
+
import * as RuntimeAndFunctionType from "./RuntimeAndFunctionType";
|
|
5
|
+
export declare const TypeId = "@confect/core/FunctionSpec";
|
|
6
|
+
export type TypeId = typeof TypeId;
|
|
7
|
+
export declare const isFunctionSpec: (u: unknown) => u is AnyWithProps;
|
|
8
|
+
export interface FunctionSpec<RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility_ extends FunctionVisibility, Name_ extends string, FunctionProvenance_ extends FunctionProvenance.FunctionProvenance> {
|
|
9
|
+
readonly [TypeId]: TypeId;
|
|
10
|
+
readonly runtimeAndFunctionType: RuntimeAndFunctionType_;
|
|
11
|
+
readonly functionVisibility: FunctionVisibility_;
|
|
12
|
+
readonly name: Name_;
|
|
13
|
+
readonly functionProvenance: FunctionProvenance_;
|
|
9
14
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
declare const isFunctionSpec: (u: unknown) => u is AnyWithProps;
|
|
13
|
-
interface FunctionSpec<RuntimeAndFunctionType_ extends RuntimeAndFunctionType, FunctionVisibility_ extends FunctionVisibility, Name_ extends string, FunctionProvenance_ extends FunctionProvenance> {
|
|
14
|
-
readonly [TypeId]: TypeId;
|
|
15
|
-
readonly runtimeAndFunctionType: RuntimeAndFunctionType_;
|
|
16
|
-
readonly functionVisibility: FunctionVisibility_;
|
|
17
|
-
readonly name: Name_;
|
|
18
|
-
readonly functionProvenance: FunctionProvenance_;
|
|
15
|
+
export interface Any {
|
|
16
|
+
readonly [TypeId]: TypeId;
|
|
19
17
|
}
|
|
20
|
-
interface
|
|
21
|
-
readonly [TypeId]: TypeId;
|
|
18
|
+
export interface AnyWithProps extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance.FunctionProvenance> {
|
|
22
19
|
}
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
interface AnyConvex extends FunctionSpec<RuntimeAndFunctionType, FunctionVisibility, string, AnyConvex
|
|
26
|
-
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
export interface AnyConfect extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance.AnyConfect> {
|
|
21
|
+
}
|
|
22
|
+
export interface AnyConvex extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance.AnyConvex> {
|
|
23
|
+
}
|
|
24
|
+
export interface AnyWithPropsWithRuntime<Runtime extends RuntimeAndFunctionType.Runtime> extends FunctionSpec<RuntimeAndFunctionType.WithRuntime<Runtime>, FunctionVisibility, string, FunctionProvenance.FunctionProvenance> {
|
|
25
|
+
}
|
|
26
|
+
export interface AnyWithPropsWithFunctionType<RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType> extends FunctionSpec<RuntimeAndFunctionType_, FunctionVisibility, string, FunctionProvenance.FunctionProvenance> {
|
|
27
|
+
}
|
|
28
|
+
export interface AnyWithPropsWithFunctionProvenance<FunctionProvenance_ extends FunctionProvenance.FunctionProvenance> extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance_> {
|
|
29
|
+
}
|
|
30
|
+
export type GetRuntimeAndFunctionType<FunctionSpec_ extends AnyWithProps> = FunctionSpec_["runtimeAndFunctionType"];
|
|
31
|
+
export type GetFunctionVisibility<FunctionSpec_ extends AnyWithProps> = FunctionSpec_["functionVisibility"];
|
|
32
|
+
export type Name<FunctionSpec_ extends AnyWithProps> = FunctionSpec_["name"];
|
|
33
|
+
export type Args<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
34
|
+
functionProvenance: {
|
|
35
|
+
_tag: "Confect";
|
|
36
|
+
args: infer ArgsSchema_ extends Schema.Schema.AnyNoContext;
|
|
37
|
+
};
|
|
37
38
|
} ? ArgsSchema_["Type"] : FunctionSpec_ extends {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
functionProvenance: {
|
|
40
|
+
_tag: "Convex";
|
|
41
|
+
_args: infer Args_;
|
|
42
|
+
};
|
|
42
43
|
} ? Args_ : never;
|
|
43
|
-
type Returns<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
export type Returns<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
45
|
+
functionProvenance: {
|
|
46
|
+
_tag: "Confect";
|
|
47
|
+
returns: infer ReturnsSchema_ extends Schema.Schema.AnyNoContext;
|
|
48
|
+
};
|
|
48
49
|
} ? ReturnsSchema_["Type"] : FunctionSpec_ extends {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
functionProvenance: {
|
|
51
|
+
_tag: "Convex";
|
|
52
|
+
_returns: infer Returns_;
|
|
53
|
+
};
|
|
53
54
|
} ? Awaited<Returns_> : never;
|
|
54
|
-
type EncodedArgs<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
export type EncodedArgs<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
56
|
+
functionProvenance: {
|
|
57
|
+
_tag: "Confect";
|
|
58
|
+
args: infer ArgsSchema_ extends Schema.Schema.AnyNoContext;
|
|
59
|
+
};
|
|
59
60
|
} ? ArgsSchema_["Encoded"] : FunctionSpec_ extends {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
functionProvenance: {
|
|
62
|
+
_tag: "Convex";
|
|
63
|
+
_args: infer Args_;
|
|
64
|
+
};
|
|
64
65
|
} ? Args_ : never;
|
|
65
|
-
type EncodedReturns<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
export type EncodedReturns<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
67
|
+
functionProvenance: {
|
|
68
|
+
_tag: "Confect";
|
|
69
|
+
returns: infer ReturnsSchema_ extends Schema.Schema.AnyNoContext;
|
|
70
|
+
};
|
|
70
71
|
} ? ReturnsSchema_["Encoded"] : FunctionSpec_ extends {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
functionProvenance: {
|
|
73
|
+
_tag: "Convex";
|
|
74
|
+
_returns: infer Returns_;
|
|
75
|
+
};
|
|
75
76
|
} ? Returns_ : never;
|
|
76
|
-
type Error<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
77
|
-
|
|
77
|
+
export type Error<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
78
|
+
functionProvenance: FunctionProvenance.Confect<any, any, infer ErrorSchema_ extends Schema.Schema.AnyNoContext>;
|
|
78
79
|
} ? ErrorSchema_["Type"] : never;
|
|
79
|
-
type EncodedError<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
80
|
-
|
|
80
|
+
export type EncodedError<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {
|
|
81
|
+
functionProvenance: FunctionProvenance.Confect<any, any, infer ErrorSchema_ extends Schema.Schema.AnyNoContext>;
|
|
81
82
|
} ? ErrorSchema_["Encoded"] : never;
|
|
82
|
-
type WithName<FunctionSpec_ extends AnyWithProps, Name_ extends string> = Extract<FunctionSpec_, {
|
|
83
|
-
|
|
83
|
+
export type WithName<FunctionSpec_ extends AnyWithProps, Name_ extends string> = Extract<FunctionSpec_, {
|
|
84
|
+
readonly name: Name_;
|
|
84
85
|
}>;
|
|
85
|
-
type WithRuntimeAndFunctionType<FunctionSpec_ extends AnyWithProps, RuntimeAndFunctionType_ extends RuntimeAndFunctionType> = Extract<FunctionSpec_, {
|
|
86
|
-
|
|
86
|
+
export type WithRuntimeAndFunctionType<FunctionSpec_ extends AnyWithProps, RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType> = Extract<FunctionSpec_, {
|
|
87
|
+
readonly runtimeAndFunctionType: RuntimeAndFunctionType_;
|
|
87
88
|
}>;
|
|
88
|
-
type WithFunctionType<FunctionSpec_ extends AnyWithProps, FunctionType_ extends FunctionType> = Extract<FunctionSpec_, {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
export type WithFunctionType<FunctionSpec_ extends AnyWithProps, FunctionType_ extends FunctionType> = Extract<FunctionSpec_, {
|
|
90
|
+
readonly runtimeAndFunctionType: {
|
|
91
|
+
readonly functionType: FunctionType_;
|
|
92
|
+
};
|
|
92
93
|
}>;
|
|
93
|
-
type WithFunctionProvenance<FunctionSpec_ extends AnyWithProps, FunctionProvenance_ extends FunctionProvenance> = Extract<FunctionSpec_, {
|
|
94
|
-
|
|
94
|
+
export type WithFunctionProvenance<FunctionSpec_ extends AnyWithProps, FunctionProvenance_ extends FunctionProvenance.FunctionProvenance> = Extract<FunctionSpec_, {
|
|
95
|
+
readonly functionProvenance: FunctionProvenance_;
|
|
95
96
|
}>;
|
|
96
|
-
type WithoutName<FunctionSpec_ extends AnyWithProps, Name_ extends Name<FunctionSpec_>> = Exclude<FunctionSpec_, {
|
|
97
|
-
|
|
97
|
+
export type WithoutName<FunctionSpec_ extends AnyWithProps, Name_ extends Name<FunctionSpec_>> = Exclude<FunctionSpec_, {
|
|
98
|
+
readonly name: Name_;
|
|
98
99
|
}>;
|
|
99
|
-
declare const publicQuery: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}: {
|
|
105
|
-
name: Name_;
|
|
106
|
-
args: () => Args_;
|
|
107
|
-
returns: () => Returns_;
|
|
108
|
-
error?: () => Error_;
|
|
100
|
+
export declare const publicQuery: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
101
|
+
name: Name_;
|
|
102
|
+
args: () => Args_;
|
|
103
|
+
returns: () => Returns_;
|
|
104
|
+
error?: () => Error_;
|
|
109
105
|
}) => FunctionSpec<{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}, "public", Name_, Confect<Args_, Returns_, Error_>>;
|
|
113
|
-
declare const internalQuery: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}: {
|
|
119
|
-
name: Name_;
|
|
120
|
-
args: () => Args_;
|
|
121
|
-
returns: () => Returns_;
|
|
122
|
-
error?: () => Error_;
|
|
106
|
+
readonly runtime: "Convex";
|
|
107
|
+
readonly functionType: "query";
|
|
108
|
+
}, "public", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
109
|
+
export declare const internalQuery: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
110
|
+
name: Name_;
|
|
111
|
+
args: () => Args_;
|
|
112
|
+
returns: () => Returns_;
|
|
113
|
+
error?: () => Error_;
|
|
123
114
|
}) => FunctionSpec<{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, "internal", Name_, Confect<Args_, Returns_, Error_>>;
|
|
127
|
-
declare const publicMutation: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}: {
|
|
133
|
-
name: Name_;
|
|
134
|
-
args: () => Args_;
|
|
135
|
-
returns: () => Returns_;
|
|
136
|
-
error?: () => Error_;
|
|
115
|
+
readonly runtime: "Convex";
|
|
116
|
+
readonly functionType: "query";
|
|
117
|
+
}, "internal", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
118
|
+
export declare const publicMutation: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
119
|
+
name: Name_;
|
|
120
|
+
args: () => Args_;
|
|
121
|
+
returns: () => Returns_;
|
|
122
|
+
error?: () => Error_;
|
|
137
123
|
}) => FunctionSpec<{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}, "public", Name_, Confect<Args_, Returns_, Error_>>;
|
|
141
|
-
declare const internalMutation: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}: {
|
|
147
|
-
name: Name_;
|
|
148
|
-
args: () => Args_;
|
|
149
|
-
returns: () => Returns_;
|
|
150
|
-
error?: () => Error_;
|
|
124
|
+
readonly runtime: "Convex";
|
|
125
|
+
readonly functionType: "mutation";
|
|
126
|
+
}, "public", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
127
|
+
export declare const internalMutation: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
128
|
+
name: Name_;
|
|
129
|
+
args: () => Args_;
|
|
130
|
+
returns: () => Returns_;
|
|
131
|
+
error?: () => Error_;
|
|
151
132
|
}) => FunctionSpec<{
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}, "internal", Name_, Confect<Args_, Returns_, Error_>>;
|
|
155
|
-
declare const publicAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}: {
|
|
161
|
-
name: Name_;
|
|
162
|
-
args: () => Args_;
|
|
163
|
-
returns: () => Returns_;
|
|
164
|
-
error?: () => Error_;
|
|
133
|
+
readonly runtime: "Convex";
|
|
134
|
+
readonly functionType: "mutation";
|
|
135
|
+
}, "internal", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
136
|
+
export declare const publicAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
137
|
+
name: Name_;
|
|
138
|
+
args: () => Args_;
|
|
139
|
+
returns: () => Returns_;
|
|
140
|
+
error?: () => Error_;
|
|
165
141
|
}) => FunctionSpec<{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, "public", Name_, Confect<Args_, Returns_, Error_>>;
|
|
169
|
-
declare const internalAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}: {
|
|
175
|
-
name: Name_;
|
|
176
|
-
args: () => Args_;
|
|
177
|
-
returns: () => Returns_;
|
|
178
|
-
error?: () => Error_;
|
|
142
|
+
readonly runtime: "Convex";
|
|
143
|
+
readonly functionType: "action";
|
|
144
|
+
}, "public", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
145
|
+
export declare const internalAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
146
|
+
name: Name_;
|
|
147
|
+
args: () => Args_;
|
|
148
|
+
returns: () => Returns_;
|
|
149
|
+
error?: () => Error_;
|
|
179
150
|
}) => FunctionSpec<{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}, "internal", Name_, Confect<Args_, Returns_, Error_>>;
|
|
183
|
-
declare const publicNodeAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}: {
|
|
189
|
-
name: Name_;
|
|
190
|
-
args: () => Args_;
|
|
191
|
-
returns: () => Returns_;
|
|
192
|
-
error?: () => Error_;
|
|
151
|
+
readonly runtime: "Convex";
|
|
152
|
+
readonly functionType: "action";
|
|
153
|
+
}, "internal", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
154
|
+
export declare const publicNodeAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
155
|
+
name: Name_;
|
|
156
|
+
args: () => Args_;
|
|
157
|
+
returns: () => Returns_;
|
|
158
|
+
error?: () => Error_;
|
|
193
159
|
}) => FunctionSpec<{
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}, "public", Name_, Confect<Args_, Returns_, Error_>>;
|
|
197
|
-
declare const internalNodeAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}: {
|
|
203
|
-
name: Name_;
|
|
204
|
-
args: () => Args_;
|
|
205
|
-
returns: () => Returns_;
|
|
206
|
-
error?: () => Error_;
|
|
160
|
+
readonly runtime: "Node";
|
|
161
|
+
readonly functionType: "action";
|
|
162
|
+
}, "public", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
163
|
+
export declare const internalNodeAction: <const Name_ extends string, Args_ extends Schema.Schema.AnyNoContext, Returns_ extends Schema.Schema.AnyNoContext, Error_ extends Schema.Schema.AnyNoContext = never>({ name, args, returns, error, }: {
|
|
164
|
+
name: Name_;
|
|
165
|
+
args: () => Args_;
|
|
166
|
+
returns: () => Returns_;
|
|
167
|
+
error?: () => Error_;
|
|
207
168
|
}) => FunctionSpec<{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}, "internal", Name_, Confect<Args_, Returns_, Error_>>;
|
|
169
|
+
readonly runtime: "Node";
|
|
170
|
+
readonly functionType: "action";
|
|
171
|
+
}, "internal", Name_, FunctionProvenance.Confect<Args_, Returns_, Error_>>;
|
|
211
172
|
type ExtractArgs<F> = F extends RegisteredQuery<any, infer A, any> ? A : F extends RegisteredMutation<any, infer A, any> ? A : F extends RegisteredAction<any, infer A, any> ? A : never;
|
|
212
173
|
type ExtractReturns<F> = F extends RegisteredQuery<any, any, infer R> ? R : F extends RegisteredMutation<any, any, infer R> ? R : F extends RegisteredAction<any, any, infer R> ? R : never;
|
|
213
|
-
declare const convexPublicQuery: <F extends RegisteredQuery<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}, "public", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
217
|
-
declare const convexInternalQuery: <F extends RegisteredQuery<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}, "internal", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
221
|
-
declare const convexPublicMutation: <F extends RegisteredMutation<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, "public", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
225
|
-
declare const convexInternalMutation: <F extends RegisteredMutation<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}, "internal", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
229
|
-
declare const convexPublicAction: <F extends RegisteredAction<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}, "public", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
233
|
-
declare const convexInternalAction: <F extends RegisteredAction<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}, "internal", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
237
|
-
declare const convexPublicNodeAction: <F extends RegisteredAction<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, "public", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
241
|
-
declare const convexInternalNodeAction: <F extends RegisteredAction<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}, "internal", Name_, Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
245
|
-
|
|
246
|
-
export { Any, AnyConfect, AnyConvex, AnyWithProps, AnyWithPropsWithFunctionProvenance, AnyWithPropsWithFunctionType, AnyWithPropsWithRuntime, Args, EncodedArgs, EncodedError, EncodedReturns, Error, FunctionSpec, FunctionSpec_d_exports, GetFunctionVisibility, GetRuntimeAndFunctionType, Name, Returns, TypeId, WithFunctionProvenance, WithFunctionType, WithName, WithRuntimeAndFunctionType, WithoutName, convexInternalAction, convexInternalMutation, convexInternalNodeAction, convexInternalQuery, convexPublicAction, convexPublicMutation, convexPublicNodeAction, convexPublicQuery, internalAction, internalMutation, internalNodeAction, internalQuery, isFunctionSpec, publicAction, publicMutation, publicNodeAction, publicQuery };
|
|
174
|
+
export declare const convexPublicQuery: <F extends RegisteredQuery<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
175
|
+
readonly runtime: "Convex";
|
|
176
|
+
readonly functionType: "query";
|
|
177
|
+
}, "public", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
178
|
+
export declare const convexInternalQuery: <F extends RegisteredQuery<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
179
|
+
readonly runtime: "Convex";
|
|
180
|
+
readonly functionType: "query";
|
|
181
|
+
}, "internal", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
182
|
+
export declare const convexPublicMutation: <F extends RegisteredMutation<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
183
|
+
readonly runtime: "Convex";
|
|
184
|
+
readonly functionType: "mutation";
|
|
185
|
+
}, "public", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
186
|
+
export declare const convexInternalMutation: <F extends RegisteredMutation<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
187
|
+
readonly runtime: "Convex";
|
|
188
|
+
readonly functionType: "mutation";
|
|
189
|
+
}, "internal", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
190
|
+
export declare const convexPublicAction: <F extends RegisteredAction<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
191
|
+
readonly runtime: "Convex";
|
|
192
|
+
readonly functionType: "action";
|
|
193
|
+
}, "public", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
194
|
+
export declare const convexInternalAction: <F extends RegisteredAction<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
195
|
+
readonly runtime: "Convex";
|
|
196
|
+
readonly functionType: "action";
|
|
197
|
+
}, "internal", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
198
|
+
export declare const convexPublicNodeAction: <F extends RegisteredAction<"public", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
199
|
+
readonly runtime: "Node";
|
|
200
|
+
readonly functionType: "action";
|
|
201
|
+
}, "public", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
202
|
+
export declare const convexInternalNodeAction: <F extends RegisteredAction<"internal", any, any>>() => <const Name_ extends string>(name: Name_) => FunctionSpec<{
|
|
203
|
+
readonly runtime: "Node";
|
|
204
|
+
readonly functionType: "action";
|
|
205
|
+
}, "internal", Name_, FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>>;
|
|
206
|
+
export {};
|
|
247
207
|
//# sourceMappingURL=FunctionSpec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionSpec.d.ts","
|
|
1
|
+
{"version":3,"file":"FunctionSpec.d.ts","sourceRoot":"","sources":["../src/FunctionSpec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,kBAAkB,MAA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AAC,oDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;iFAuBd,CAAC;AACF,eAAO,MAAM,mBAAmB,GA9B5B,CAAC,sDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;mFA2Bd,CAAC;AACF,eAAO,MAAM,oBAAoB,GAlC7B,CAAC,uDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;iFA+Bd,CAAC;AACF,eAAO,MAAM,sBAAsB,GAtC/B,CAAC,yDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;mFAmCd,CAAC;AACF,eAAO,MAAM,kBAAkB,GA1C3B,CAAC,qDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;iFAuCd,CAAC;AACF,eAAO,MAAM,oBAAoB,GA9C7B,CAAC,uDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;mFA2Cd,CAAC;AACF,eAAO,MAAM,sBAAsB,GAlD/B,CAAC,qDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;iFA+Cd,CAAC;AACF,eAAO,MAAM,wBAAwB,GAtDjC,CAAC,uDAKF,KAAK,CAAC,KAAK,SAAS,MAAM,EACzB,MAAM,KAAK;;;mFAmDd,CAAC"}
|
package/dist/GenericId.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { GenericId as ConvexGenericId } from "convex/values";
|
|
2
|
+
import type { Option } from "effect";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
2
4
|
import * as SchemaAST from "effect/SchemaAST";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
//#region src/GenericId.d.ts
|
|
7
|
-
declare namespace GenericId_d_exports {
|
|
8
|
-
export { GenericId, tableName };
|
|
9
|
-
}
|
|
10
|
-
declare const GenericId: <TableName extends string>(tableName: TableName) => Schema$1.Schema<GenericId$1<TableName>>;
|
|
11
|
-
type GenericId<TableName extends string> = GenericId$1<TableName>;
|
|
12
|
-
declare const tableName: <TableName extends string>(ast: SchemaAST.AST) => Option.Option<TableName>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { GenericId, GenericId_d_exports, tableName };
|
|
5
|
+
export declare const GenericId: <TableName extends string>(tableName: TableName) => Schema.Schema<ConvexGenericId<TableName>>;
|
|
6
|
+
export type GenericId<TableName extends string> = ConvexGenericId<TableName>;
|
|
7
|
+
export declare const tableName: <TableName extends string>(ast: SchemaAST.AST) => Option.Option<TableName>;
|
|
15
8
|
//# sourceMappingURL=GenericId.d.ts.map
|
package/dist/GenericId.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericId.d.ts","
|
|
1
|
+
{"version":3,"file":"GenericId.d.ts","sourceRoot":"","sources":["../src/GenericId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAI9C,eAAO,MAAM,SAAS,GAAI,SAAS,SAAS,MAAM,EAChD,WAAW,SAAS,KACnB,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAGgB,CAAC;AAE5D,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,MAAM,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC;AAE7E,eAAO,MAAM,SAAS,GAAI,SAAS,SAAS,MAAM,EAChD,KAAK,SAAS,CAAC,GAAG,KACjB,MAAM,CAAC,MAAM,CAAC,SAAS,CACyB,CAAC"}
|
package/dist/GroupPath.d.ts
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
//#region src/GroupPath.d.ts
|
|
5
|
-
declare namespace GroupPath_d_exports {
|
|
6
|
-
export { All, GroupAt, SubGroupsAt };
|
|
7
|
-
}
|
|
1
|
+
import type { Record } from "effect";
|
|
2
|
+
import type * as GroupSpec from "./GroupSpec";
|
|
8
3
|
/**
|
|
9
4
|
* Recursively generates paths for a group and its nested groups.
|
|
10
5
|
*
|
|
11
6
|
* - For a group with no subgroups, returns just the group name.
|
|
12
7
|
* - For a group with subgroups, returns the group name plus all possible paths through its direct subgroups.
|
|
13
8
|
*/
|
|
14
|
-
type All<Group extends AnyWithProps, Depth extends 1[] = []> = Depth["length"] extends 15 ? string : Group extends any ? [Groups<Group>] extends [never] ? Name<Group> : Name<Group> | AllHelper<Group, Groups<Group>, Depth> : never;
|
|
15
|
-
type AllHelper<Parent extends AnyWithProps, Groups_ extends AnyWithProps, Depth extends 1[] = []> = Groups_ extends AnyWithProps ? `${Name<Parent>}.${All<Groups_, [...Depth, 1]>}` : never;
|
|
9
|
+
export type All<Group extends GroupSpec.AnyWithProps, Depth extends 1[] = []> = Depth["length"] extends 15 ? string : Group extends any ? [GroupSpec.Groups<Group>] extends [never] ? GroupSpec.Name<Group> : GroupSpec.Name<Group> | AllHelper<Group, GroupSpec.Groups<Group>, Depth> : never;
|
|
10
|
+
type AllHelper<Parent extends GroupSpec.AnyWithProps, Groups_ extends GroupSpec.AnyWithProps, Depth extends 1[] = []> = Groups_ extends GroupSpec.AnyWithProps ? `${GroupSpec.Name<Parent>}.${All<Groups_, [...Depth, 1]>}` : never;
|
|
16
11
|
/**
|
|
17
12
|
* Recursively extracts the group at the given dot-separated path.
|
|
18
13
|
* Path must match the format defined in `Path` above, e.g. "group" or "group.subgroup".
|
|
@@ -22,12 +17,11 @@ type AllHelper<Parent extends AnyWithProps, Groups_ extends AnyWithProps, Depth
|
|
|
22
17
|
* type G = WithPath<RootGroup, "group.subgroup">;
|
|
23
18
|
* ```
|
|
24
19
|
*/
|
|
25
|
-
type GroupAt<Group, Path extends string> = Group extends AnyWithProps ? Path extends `${infer Head}.${infer Tail}` ? Group extends {
|
|
26
|
-
|
|
20
|
+
export type GroupAt<Group, Path extends string> = Group extends GroupSpec.AnyWithProps ? Path extends `${infer Head}.${infer Tail}` ? Group extends {
|
|
21
|
+
readonly name: Head;
|
|
27
22
|
} ? Group extends {
|
|
28
|
-
|
|
29
|
-
} ? GroupAt<SubGroup, Tail> : never : never : WithName<Group, Path> : never;
|
|
30
|
-
type SubGroupsAt<Group extends AnyWithProps, GroupPath extends string> = Groups<GroupAt<Group, GroupPath>> extends infer SubGroups ? SubGroups extends AnyWithProps ? `${GroupPath}.${Name<SubGroups>}` : never : never;
|
|
31
|
-
|
|
32
|
-
export { All, GroupAt, GroupPath_d_exports, SubGroupsAt };
|
|
23
|
+
readonly groups: Record.ReadonlyRecord<string, infer SubGroup>;
|
|
24
|
+
} ? GroupAt<SubGroup, Tail> : never : never : GroupSpec.WithName<Group, Path> : never;
|
|
25
|
+
export type SubGroupsAt<Group extends GroupSpec.AnyWithProps, GroupPath extends string> = GroupSpec.Groups<GroupAt<Group, GroupPath>> extends infer SubGroups ? SubGroups extends GroupSpec.AnyWithProps ? `${GroupPath}.${GroupSpec.Name<SubGroups>}` : never : never;
|
|
26
|
+
export {};
|
|
33
27
|
//# sourceMappingURL=GroupPath.d.ts.map
|
package/dist/GroupPath.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupPath.d.ts","
|
|
1
|
+
{"version":3,"file":"GroupPath.d.ts","sourceRoot":"","sources":["../src/GroupPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,KAAK,SAAS,MAAM,aAAa,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,GAAG,CACb,KAAK,SAAS,SAAS,CAAC,YAAY,EACpC,KAAK,SAAS,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