@gaganref/confect-core 10.3.1-fork.15 → 10.3.1-fork.17
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/FunctionSpec.d.ts +225 -0
- package/dist/FunctionSpec.d.ts.map +1 -1
- package/dist/FunctionSpec.js +5 -2
- package/dist/FunctionSpec.js.map +1 -1
- package/package.json +1 -1
- package/src/FunctionSpec.ts +119 -3
package/dist/FunctionSpec.d.ts
CHANGED
|
@@ -19,10 +19,15 @@ export interface FunctionSpec<RuntimeAndFunctionType_ extends RuntimeAndFunction
|
|
|
19
19
|
export interface Builder<RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility_ extends FunctionVisibility, Name_ extends string, FunctionProvenance_ extends FunctionProvenance.FunctionProvenance, MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never> extends FunctionSpec<RuntimeAndFunctionType_, FunctionVisibility_, Name_, FunctionProvenance_, MiddlewareSpecs_> {
|
|
20
20
|
middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(middlewareSpec: MiddlewareSpec_ & MiddlewareSpec.ValidateFunctionAttach<MiddlewareSpec_, RuntimeAndFunctionType_, FunctionProvenance_, MiddlewareSpecs_>, ...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>): Builder<RuntimeAndFunctionType_, FunctionVisibility_, Name_, FunctionProvenance_, MiddlewareSpecs_ | MiddlewareSpec_>;
|
|
21
21
|
}
|
|
22
|
+
export interface DescribedBuilder<RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility_ extends FunctionVisibility, Name_ extends string, FunctionProvenance_ extends FunctionProvenance.FunctionProvenance, MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never> extends Builder<RuntimeAndFunctionType_, FunctionVisibility_, Name_, FunctionProvenance_, MiddlewareSpecs_> {
|
|
23
|
+
readonly description?: string;
|
|
24
|
+
middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(middlewareSpec: MiddlewareSpec_ & MiddlewareSpec.ValidateFunctionAttach<MiddlewareSpec_, RuntimeAndFunctionType_, FunctionProvenance_, MiddlewareSpecs_>, ...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>): DescribedBuilder<RuntimeAndFunctionType_, FunctionVisibility_, Name_, FunctionProvenance_, MiddlewareSpecs_ | MiddlewareSpec_>;
|
|
25
|
+
}
|
|
22
26
|
export interface Any {
|
|
23
27
|
readonly [TypeId]: TypeId;
|
|
24
28
|
}
|
|
25
29
|
export interface AnyWithProps extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance.FunctionProvenance, MiddlewareSpec.AnyMiddlewareSpec> {
|
|
30
|
+
readonly description?: string;
|
|
26
31
|
}
|
|
27
32
|
export interface AnyConfect extends FunctionSpec<RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility, string, FunctionProvenance.AnyConfect, MiddlewareSpec.AnyMiddlewareSpec> {
|
|
28
33
|
}
|
|
@@ -129,6 +134,7 @@ type ForbidPaginationOpts<UserArgsFields extends FunctionProvenance.ArgsFields>
|
|
|
129
134
|
export declare const publicQuery: {
|
|
130
135
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
131
136
|
name: Name_;
|
|
137
|
+
description?: never;
|
|
132
138
|
args: () => ArgsFields_;
|
|
133
139
|
returns: () => Returns_;
|
|
134
140
|
error?: () => Error_;
|
|
@@ -138,6 +144,7 @@ export declare const publicQuery: {
|
|
|
138
144
|
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
139
145
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
140
146
|
name: Name_;
|
|
147
|
+
description?: never;
|
|
141
148
|
args?: never;
|
|
142
149
|
returns: () => Returns_;
|
|
143
150
|
error?: () => Error_;
|
|
@@ -145,10 +152,31 @@ export declare const publicQuery: {
|
|
|
145
152
|
readonly runtime: "Convex";
|
|
146
153
|
readonly functionType: "query";
|
|
147
154
|
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
155
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
156
|
+
name: Name_;
|
|
157
|
+
description?: string;
|
|
158
|
+
args: () => ArgsFields_;
|
|
159
|
+
returns: () => Returns_;
|
|
160
|
+
error?: () => Error_;
|
|
161
|
+
}): DescribedBuilder<{
|
|
162
|
+
readonly runtime: "Convex";
|
|
163
|
+
readonly functionType: "query";
|
|
164
|
+
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
165
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
166
|
+
name: Name_;
|
|
167
|
+
description?: string;
|
|
168
|
+
args?: never;
|
|
169
|
+
returns: () => Returns_;
|
|
170
|
+
error?: () => Error_;
|
|
171
|
+
}): DescribedBuilder<{
|
|
172
|
+
readonly runtime: "Convex";
|
|
173
|
+
readonly functionType: "query";
|
|
174
|
+
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
148
175
|
};
|
|
149
176
|
export declare const internalQuery: {
|
|
150
177
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
151
178
|
name: Name_;
|
|
179
|
+
description?: never;
|
|
152
180
|
args: () => ArgsFields_;
|
|
153
181
|
returns: () => Returns_;
|
|
154
182
|
error?: () => Error_;
|
|
@@ -158,6 +186,7 @@ export declare const internalQuery: {
|
|
|
158
186
|
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
159
187
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
160
188
|
name: Name_;
|
|
189
|
+
description?: never;
|
|
161
190
|
args?: never;
|
|
162
191
|
returns: () => Returns_;
|
|
163
192
|
error?: () => Error_;
|
|
@@ -165,10 +194,31 @@ export declare const internalQuery: {
|
|
|
165
194
|
readonly runtime: "Convex";
|
|
166
195
|
readonly functionType: "query";
|
|
167
196
|
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
197
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
198
|
+
name: Name_;
|
|
199
|
+
description?: never;
|
|
200
|
+
args: () => ArgsFields_;
|
|
201
|
+
returns: () => Returns_;
|
|
202
|
+
error?: () => Error_;
|
|
203
|
+
}): DescribedBuilder<{
|
|
204
|
+
readonly runtime: "Convex";
|
|
205
|
+
readonly functionType: "query";
|
|
206
|
+
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
207
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
208
|
+
name: Name_;
|
|
209
|
+
description?: never;
|
|
210
|
+
args?: never;
|
|
211
|
+
returns: () => Returns_;
|
|
212
|
+
error?: () => Error_;
|
|
213
|
+
}): DescribedBuilder<{
|
|
214
|
+
readonly runtime: "Convex";
|
|
215
|
+
readonly functionType: "query";
|
|
216
|
+
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
168
217
|
};
|
|
169
218
|
export declare const publicPaginatedQuery: {
|
|
170
219
|
<const Name_ extends string, const UserArgsFields_ extends FunctionProvenance.ArgsFields, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
171
220
|
name: Name_;
|
|
221
|
+
description?: never;
|
|
172
222
|
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
173
223
|
item: () => Item_;
|
|
174
224
|
error?: () => Error_;
|
|
@@ -178,6 +228,7 @@ export declare const publicPaginatedQuery: {
|
|
|
178
228
|
}, "public", Name_, FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>, never>;
|
|
179
229
|
<const Name_ extends string, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
180
230
|
name: Name_;
|
|
231
|
+
description?: never;
|
|
181
232
|
args?: never;
|
|
182
233
|
item: () => Item_;
|
|
183
234
|
error?: () => Error_;
|
|
@@ -185,10 +236,31 @@ export declare const publicPaginatedQuery: {
|
|
|
185
236
|
readonly runtime: "Convex";
|
|
186
237
|
readonly functionType: "query";
|
|
187
238
|
}, "public", Name_, FunctionProvenance.ConfectPaginated<{}, Item_, Error_>, never>;
|
|
239
|
+
<const Name_ extends string, const UserArgsFields_ extends FunctionProvenance.ArgsFields, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
240
|
+
name: Name_;
|
|
241
|
+
description?: string;
|
|
242
|
+
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
243
|
+
item: () => Item_;
|
|
244
|
+
error?: () => Error_;
|
|
245
|
+
}): DescribedBuilder<{
|
|
246
|
+
readonly runtime: "Convex";
|
|
247
|
+
readonly functionType: "query";
|
|
248
|
+
}, "public", Name_, FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>, never>;
|
|
249
|
+
<const Name_ extends string, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
250
|
+
name: Name_;
|
|
251
|
+
description?: string;
|
|
252
|
+
args?: never;
|
|
253
|
+
item: () => Item_;
|
|
254
|
+
error?: () => Error_;
|
|
255
|
+
}): DescribedBuilder<{
|
|
256
|
+
readonly runtime: "Convex";
|
|
257
|
+
readonly functionType: "query";
|
|
258
|
+
}, "public", Name_, FunctionProvenance.ConfectPaginated<{}, Item_, Error_>, never>;
|
|
188
259
|
};
|
|
189
260
|
export declare const internalPaginatedQuery: {
|
|
190
261
|
<const Name_ extends string, const UserArgsFields_ extends FunctionProvenance.ArgsFields, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
191
262
|
name: Name_;
|
|
263
|
+
description?: never;
|
|
192
264
|
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
193
265
|
item: () => Item_;
|
|
194
266
|
error?: () => Error_;
|
|
@@ -198,6 +270,7 @@ export declare const internalPaginatedQuery: {
|
|
|
198
270
|
}, "internal", Name_, FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>, never>;
|
|
199
271
|
<const Name_ extends string, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
200
272
|
name: Name_;
|
|
273
|
+
description?: never;
|
|
201
274
|
args?: never;
|
|
202
275
|
item: () => Item_;
|
|
203
276
|
error?: () => Error_;
|
|
@@ -205,10 +278,31 @@ export declare const internalPaginatedQuery: {
|
|
|
205
278
|
readonly runtime: "Convex";
|
|
206
279
|
readonly functionType: "query";
|
|
207
280
|
}, "internal", Name_, FunctionProvenance.ConfectPaginated<{}, Item_, Error_>, never>;
|
|
281
|
+
<const Name_ extends string, const UserArgsFields_ extends FunctionProvenance.ArgsFields, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
282
|
+
name: Name_;
|
|
283
|
+
description?: never;
|
|
284
|
+
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
285
|
+
item: () => Item_;
|
|
286
|
+
error?: () => Error_;
|
|
287
|
+
}): DescribedBuilder<{
|
|
288
|
+
readonly runtime: "Convex";
|
|
289
|
+
readonly functionType: "query";
|
|
290
|
+
}, "internal", Name_, FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>, never>;
|
|
291
|
+
<const Name_ extends string, Item_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
292
|
+
name: Name_;
|
|
293
|
+
description?: never;
|
|
294
|
+
args?: never;
|
|
295
|
+
item: () => Item_;
|
|
296
|
+
error?: () => Error_;
|
|
297
|
+
}): DescribedBuilder<{
|
|
298
|
+
readonly runtime: "Convex";
|
|
299
|
+
readonly functionType: "query";
|
|
300
|
+
}, "internal", Name_, FunctionProvenance.ConfectPaginated<{}, Item_, Error_>, never>;
|
|
208
301
|
};
|
|
209
302
|
export declare const publicMutation: {
|
|
210
303
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
211
304
|
name: Name_;
|
|
305
|
+
description?: never;
|
|
212
306
|
args: () => ArgsFields_;
|
|
213
307
|
returns: () => Returns_;
|
|
214
308
|
error?: () => Error_;
|
|
@@ -218,6 +312,7 @@ export declare const publicMutation: {
|
|
|
218
312
|
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
219
313
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
220
314
|
name: Name_;
|
|
315
|
+
description?: never;
|
|
221
316
|
args?: never;
|
|
222
317
|
returns: () => Returns_;
|
|
223
318
|
error?: () => Error_;
|
|
@@ -225,10 +320,31 @@ export declare const publicMutation: {
|
|
|
225
320
|
readonly runtime: "Convex";
|
|
226
321
|
readonly functionType: "mutation";
|
|
227
322
|
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
323
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
324
|
+
name: Name_;
|
|
325
|
+
description?: string;
|
|
326
|
+
args: () => ArgsFields_;
|
|
327
|
+
returns: () => Returns_;
|
|
328
|
+
error?: () => Error_;
|
|
329
|
+
}): DescribedBuilder<{
|
|
330
|
+
readonly runtime: "Convex";
|
|
331
|
+
readonly functionType: "mutation";
|
|
332
|
+
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
333
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
334
|
+
name: Name_;
|
|
335
|
+
description?: string;
|
|
336
|
+
args?: never;
|
|
337
|
+
returns: () => Returns_;
|
|
338
|
+
error?: () => Error_;
|
|
339
|
+
}): DescribedBuilder<{
|
|
340
|
+
readonly runtime: "Convex";
|
|
341
|
+
readonly functionType: "mutation";
|
|
342
|
+
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
228
343
|
};
|
|
229
344
|
export declare const internalMutation: {
|
|
230
345
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
231
346
|
name: Name_;
|
|
347
|
+
description?: never;
|
|
232
348
|
args: () => ArgsFields_;
|
|
233
349
|
returns: () => Returns_;
|
|
234
350
|
error?: () => Error_;
|
|
@@ -238,6 +354,7 @@ export declare const internalMutation: {
|
|
|
238
354
|
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
239
355
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
240
356
|
name: Name_;
|
|
357
|
+
description?: never;
|
|
241
358
|
args?: never;
|
|
242
359
|
returns: () => Returns_;
|
|
243
360
|
error?: () => Error_;
|
|
@@ -245,10 +362,31 @@ export declare const internalMutation: {
|
|
|
245
362
|
readonly runtime: "Convex";
|
|
246
363
|
readonly functionType: "mutation";
|
|
247
364
|
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
365
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
366
|
+
name: Name_;
|
|
367
|
+
description?: never;
|
|
368
|
+
args: () => ArgsFields_;
|
|
369
|
+
returns: () => Returns_;
|
|
370
|
+
error?: () => Error_;
|
|
371
|
+
}): DescribedBuilder<{
|
|
372
|
+
readonly runtime: "Convex";
|
|
373
|
+
readonly functionType: "mutation";
|
|
374
|
+
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
375
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
376
|
+
name: Name_;
|
|
377
|
+
description?: never;
|
|
378
|
+
args?: never;
|
|
379
|
+
returns: () => Returns_;
|
|
380
|
+
error?: () => Error_;
|
|
381
|
+
}): DescribedBuilder<{
|
|
382
|
+
readonly runtime: "Convex";
|
|
383
|
+
readonly functionType: "mutation";
|
|
384
|
+
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
248
385
|
};
|
|
249
386
|
export declare const publicAction: {
|
|
250
387
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
251
388
|
name: Name_;
|
|
389
|
+
description?: never;
|
|
252
390
|
args: () => ArgsFields_;
|
|
253
391
|
returns: () => Returns_;
|
|
254
392
|
error?: () => Error_;
|
|
@@ -258,6 +396,7 @@ export declare const publicAction: {
|
|
|
258
396
|
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
259
397
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
260
398
|
name: Name_;
|
|
399
|
+
description?: never;
|
|
261
400
|
args?: never;
|
|
262
401
|
returns: () => Returns_;
|
|
263
402
|
error?: () => Error_;
|
|
@@ -265,10 +404,31 @@ export declare const publicAction: {
|
|
|
265
404
|
readonly runtime: "Convex";
|
|
266
405
|
readonly functionType: "action";
|
|
267
406
|
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
407
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
408
|
+
name: Name_;
|
|
409
|
+
description?: string;
|
|
410
|
+
args: () => ArgsFields_;
|
|
411
|
+
returns: () => Returns_;
|
|
412
|
+
error?: () => Error_;
|
|
413
|
+
}): DescribedBuilder<{
|
|
414
|
+
readonly runtime: "Convex";
|
|
415
|
+
readonly functionType: "action";
|
|
416
|
+
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
417
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
418
|
+
name: Name_;
|
|
419
|
+
description?: string;
|
|
420
|
+
args?: never;
|
|
421
|
+
returns: () => Returns_;
|
|
422
|
+
error?: () => Error_;
|
|
423
|
+
}): DescribedBuilder<{
|
|
424
|
+
readonly runtime: "Convex";
|
|
425
|
+
readonly functionType: "action";
|
|
426
|
+
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
268
427
|
};
|
|
269
428
|
export declare const internalAction: {
|
|
270
429
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
271
430
|
name: Name_;
|
|
431
|
+
description?: never;
|
|
272
432
|
args: () => ArgsFields_;
|
|
273
433
|
returns: () => Returns_;
|
|
274
434
|
error?: () => Error_;
|
|
@@ -278,6 +438,7 @@ export declare const internalAction: {
|
|
|
278
438
|
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
279
439
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
280
440
|
name: Name_;
|
|
441
|
+
description?: never;
|
|
281
442
|
args?: never;
|
|
282
443
|
returns: () => Returns_;
|
|
283
444
|
error?: () => Error_;
|
|
@@ -285,10 +446,31 @@ export declare const internalAction: {
|
|
|
285
446
|
readonly runtime: "Convex";
|
|
286
447
|
readonly functionType: "action";
|
|
287
448
|
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
449
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
450
|
+
name: Name_;
|
|
451
|
+
description?: never;
|
|
452
|
+
args: () => ArgsFields_;
|
|
453
|
+
returns: () => Returns_;
|
|
454
|
+
error?: () => Error_;
|
|
455
|
+
}): DescribedBuilder<{
|
|
456
|
+
readonly runtime: "Convex";
|
|
457
|
+
readonly functionType: "action";
|
|
458
|
+
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
459
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
460
|
+
name: Name_;
|
|
461
|
+
description?: never;
|
|
462
|
+
args?: never;
|
|
463
|
+
returns: () => Returns_;
|
|
464
|
+
error?: () => Error_;
|
|
465
|
+
}): DescribedBuilder<{
|
|
466
|
+
readonly runtime: "Convex";
|
|
467
|
+
readonly functionType: "action";
|
|
468
|
+
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
288
469
|
};
|
|
289
470
|
export declare const publicNodeAction: {
|
|
290
471
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
291
472
|
name: Name_;
|
|
473
|
+
description?: never;
|
|
292
474
|
args: () => ArgsFields_;
|
|
293
475
|
returns: () => Returns_;
|
|
294
476
|
error?: () => Error_;
|
|
@@ -298,6 +480,7 @@ export declare const publicNodeAction: {
|
|
|
298
480
|
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
299
481
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
300
482
|
name: Name_;
|
|
483
|
+
description?: never;
|
|
301
484
|
args?: never;
|
|
302
485
|
returns: () => Returns_;
|
|
303
486
|
error?: () => Error_;
|
|
@@ -305,10 +488,31 @@ export declare const publicNodeAction: {
|
|
|
305
488
|
readonly runtime: "Node";
|
|
306
489
|
readonly functionType: "action";
|
|
307
490
|
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
491
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
492
|
+
name: Name_;
|
|
493
|
+
description?: string;
|
|
494
|
+
args: () => ArgsFields_;
|
|
495
|
+
returns: () => Returns_;
|
|
496
|
+
error?: () => Error_;
|
|
497
|
+
}): DescribedBuilder<{
|
|
498
|
+
readonly runtime: "Node";
|
|
499
|
+
readonly functionType: "action";
|
|
500
|
+
}, "public", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
501
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
502
|
+
name: Name_;
|
|
503
|
+
description?: string;
|
|
504
|
+
args?: never;
|
|
505
|
+
returns: () => Returns_;
|
|
506
|
+
error?: () => Error_;
|
|
507
|
+
}): DescribedBuilder<{
|
|
508
|
+
readonly runtime: "Node";
|
|
509
|
+
readonly functionType: "action";
|
|
510
|
+
}, "public", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
308
511
|
};
|
|
309
512
|
export declare const internalNodeAction: {
|
|
310
513
|
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
311
514
|
name: Name_;
|
|
515
|
+
description?: never;
|
|
312
516
|
args: () => ArgsFields_;
|
|
313
517
|
returns: () => Returns_;
|
|
314
518
|
error?: () => Error_;
|
|
@@ -318,6 +522,7 @@ export declare const internalNodeAction: {
|
|
|
318
522
|
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
319
523
|
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
320
524
|
name: Name_;
|
|
525
|
+
description?: never;
|
|
321
526
|
args?: never;
|
|
322
527
|
returns: () => Returns_;
|
|
323
528
|
error?: () => Error_;
|
|
@@ -325,6 +530,26 @@ export declare const internalNodeAction: {
|
|
|
325
530
|
readonly runtime: "Node";
|
|
326
531
|
readonly functionType: "action";
|
|
327
532
|
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
533
|
+
<const Name_ extends string, const ArgsFields_ extends FunctionProvenance.ArgsFields, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
534
|
+
name: Name_;
|
|
535
|
+
description?: never;
|
|
536
|
+
args: () => ArgsFields_;
|
|
537
|
+
returns: () => Returns_;
|
|
538
|
+
error?: () => Error_;
|
|
539
|
+
}): DescribedBuilder<{
|
|
540
|
+
readonly runtime: "Node";
|
|
541
|
+
readonly functionType: "action";
|
|
542
|
+
}, "internal", Name_, FunctionProvenance.Confect<ArgsFields_, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
543
|
+
<const Name_ extends string, Returns_ extends Schema.Codec<any, any>, Error_ extends Schema.Codec<any, any> = never>(options: {
|
|
544
|
+
name: Name_;
|
|
545
|
+
description?: never;
|
|
546
|
+
args?: never;
|
|
547
|
+
returns: () => Returns_;
|
|
548
|
+
error?: () => Error_;
|
|
549
|
+
}): DescribedBuilder<{
|
|
550
|
+
readonly runtime: "Node";
|
|
551
|
+
readonly functionType: "action";
|
|
552
|
+
}, "internal", Name_, FunctionProvenance.Confect<{}, Returns_, Error_, FunctionProvenance.ConfectKind>, never>;
|
|
328
553
|
};
|
|
329
554
|
type MatchingRegisteredFunction<RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType, FunctionVisibility_ extends FunctionVisibility> = RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends "query" ? RegisteredQuery<FunctionVisibility_, any, any> : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends "mutation" ? RegisteredMutation<FunctionVisibility_, any, any> : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends "action" ? RegisteredAction<FunctionVisibility_, any, any> : never;
|
|
330
555
|
type ExtractArgs<F> = F extends RegisteredQuery<any, infer A extends DefaultFunctionArgs, any> ? A : F extends RegisteredMutation<any, infer A extends DefaultFunctionArgs, any> ? A : F extends RegisteredAction<any, infer A extends DefaultFunctionArgs, any> ? A : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionSpec.d.ts","sourceRoot":"","sources":["../src/FunctionSpec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAE7C,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE,eAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,eAAO,MAAM,cAAc,MAAO,OAAO,KAAG,CAAC,IAAI,YACf,CAAC;AAEnC,MAAM,WAAW,YAAY,CAC3B,uBAAuB,SAAS,sBAAsB,CAAC,sBAAsB,EAC7E,mBAAmB,SAAS,kBAAkB,EAC9C,KAAK,SAAS,MAAM,EACpB,mBAAmB,SAAS,kBAAkB,CAAC,kBAAkB,EACjE,gBAAgB,SAAS,cAAc,CAAC,iBAAiB,GAAG,KAAK;IAEjE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC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AAM;;;0FAqD5B,CAAC"}
|
package/dist/FunctionSpec.js
CHANGED
|
@@ -42,6 +42,7 @@ const Proto = {
|
|
|
42
42
|
runtimeAndFunctionType: this.runtimeAndFunctionType,
|
|
43
43
|
functionVisibility: this.functionVisibility,
|
|
44
44
|
name: this.name,
|
|
45
|
+
..."description" in this ? { description: this.description } : {},
|
|
45
46
|
functionProvenance: this.functionProvenance,
|
|
46
47
|
middlewareAttachments: [...this.middlewareAttachments, {
|
|
47
48
|
spec: middlewareSpec,
|
|
@@ -51,12 +52,13 @@ const Proto = {
|
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
const make = (runtimeAndFunctionType, functionVisibility) => {
|
|
54
|
-
function makeSpec({ name, args, returns, error }) {
|
|
55
|
+
function makeSpec({ name, description, args, returns, error }) {
|
|
55
56
|
validateConfectFunctionIdentifier(name);
|
|
56
57
|
return Object.assign(Object.create(Proto), {
|
|
57
58
|
runtimeAndFunctionType,
|
|
58
59
|
functionVisibility,
|
|
59
60
|
name,
|
|
61
|
+
...description === void 0 ? {} : { description },
|
|
60
62
|
functionProvenance: args === void 0 ? Confect(() => ({}), returns, error) : Confect(args, returns, error),
|
|
61
63
|
middlewareAttachments: []
|
|
62
64
|
});
|
|
@@ -64,12 +66,13 @@ const make = (runtimeAndFunctionType, functionVisibility) => {
|
|
|
64
66
|
return makeSpec;
|
|
65
67
|
};
|
|
66
68
|
const makePaginated = (runtimeAndFunctionType, functionVisibility) => {
|
|
67
|
-
function makeSpec({ name, args, item, error }) {
|
|
69
|
+
function makeSpec({ name, description, args, item, error }) {
|
|
68
70
|
validateConfectFunctionIdentifier(name);
|
|
69
71
|
return Object.assign(Object.create(Proto), {
|
|
70
72
|
runtimeAndFunctionType,
|
|
71
73
|
functionVisibility,
|
|
72
74
|
name,
|
|
75
|
+
...description === void 0 ? {} : { description },
|
|
73
76
|
functionProvenance: args === void 0 ? ConfectPaginated(() => ({}), item, error) : ConfectPaginated(args, item, error),
|
|
74
77
|
middlewareAttachments: []
|
|
75
78
|
});
|
package/dist/FunctionSpec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionSpec.js","names":["FunctionProvenance.Confect","FunctionProvenance.ConfectPaginated","RuntimeAndFunctionType.ConvexQuery","RuntimeAndFunctionType.ConvexMutation","RuntimeAndFunctionType.ConvexAction","RuntimeAndFunctionType.NodeAction","FunctionProvenance.Convex"],"sources":["../src/FunctionSpec.ts"],"sourcesContent":["import type * as MiddlewareAttachment from \"./MiddlewareAttachment.js\";\nimport type {\n DefaultFunctionArgs,\n FunctionType,\n FunctionVisibility,\n RegisteredAction,\n RegisteredMutation,\n RegisteredQuery,\n} from \"convex/server\";\nimport type * as Schema from \"effect/Schema\";\nimport * as Predicate from \"effect/Predicate\";\nimport * as FunctionProvenance from \"./FunctionProvenance.js\";\nimport { validateConfectFunctionIdentifier } from \"./Identifier.js\";\nimport type * as MiddlewareSpec from \"./MiddlewareSpec.js\";\nimport * as RuntimeAndFunctionType from \"./RuntimeAndFunctionType.js\";\n\nexport const TypeId = \"~@confect/core/FunctionSpec\";\nexport type TypeId = typeof TypeId;\n\nexport const isFunctionSpec = (u: unknown): u is AnyWithProps =>\n Predicate.hasProperty(u, TypeId);\n\nexport interface FunctionSpec<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n Name_ extends string,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,\n> {\n readonly [TypeId]: TypeId;\n readonly runtimeAndFunctionType: RuntimeAndFunctionType_;\n readonly functionVisibility: FunctionVisibility_;\n readonly name: Name_;\n readonly functionProvenance: FunctionProvenance_;\n readonly middlewareSpecs: ReadonlyArray<MiddlewareSpecs_>;\n readonly middlewareAttachments: ReadonlyArray<\n MiddlewareAttachment.MiddlewareAttachment<MiddlewareSpecs_>\n >;\n}\n\nexport interface Builder<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n Name_ extends string,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,\n> extends FunctionSpec<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_\n> {\n middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(\n middlewareSpec: MiddlewareSpec_ &\n MiddlewareSpec.ValidateFunctionAttach<\n MiddlewareSpec_,\n RuntimeAndFunctionType_,\n FunctionProvenance_,\n MiddlewareSpecs_\n >,\n ...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>\n ): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_ | MiddlewareSpec_\n >;\n}\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyConfect extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.AnyConfect,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyConvex extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.AnyConvex,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithRuntime<\n Runtime extends RuntimeAndFunctionType.Runtime,\n> extends FunctionSpec<\n RuntimeAndFunctionType.WithRuntime<Runtime>,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithFunctionType<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n> extends FunctionSpec<\n RuntimeAndFunctionType_,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithFunctionProvenance<\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n> extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance_,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport type GetRuntimeAndFunctionType<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"runtimeAndFunctionType\"];\n\nexport type GetFunctionVisibility<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"functionVisibility\"];\n\nexport type GetFunctionProvenance<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"functionProvenance\"];\n\nexport type Name<FunctionSpec_ extends AnyWithProps> = FunctionSpec_[\"name\"];\n\nexport type MiddlewareSpecs<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"middlewareSpecs\"][number];\n\n/**\n * The field map declared by a Confect-provenance spec.\n */\nexport type ArgsFields<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly \"~ArgsFields\": infer ArgsFields_ extends\n FunctionProvenance.ArgsFields;\n };\n }\n ? ArgsFields_\n : FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? FunctionProvenance.ArgsFields\n : never;\n\n/**\n * The args schema assembled from a Confect-provenance spec's field map.\n */\nexport type ArgsSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly \"~ArgsFields\": infer ArgsFields_ extends\n FunctionProvenance.ArgsFields;\n };\n }\n ? Schema.Struct<ArgsFields_>\n : FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly args: infer ArgsSchema_ extends\n FunctionProvenance.AnyArgsSchema;\n };\n }\n ? ArgsSchema_\n : never;\n\nexport type ReturnsSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly returns: infer ReturnsSchema_ extends Schema.Codec<any, any>;\n };\n }\n ? ReturnsSchema_\n : never;\n\nexport type ErrorSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly error?: infer ErrorSchema_;\n };\n }\n ? Extract<ErrorSchema_, Schema.Codec<any, any>>\n : never;\n\nexport type Args<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n}\n ? ArgsSchema<FunctionSpec_>[\"Type\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n infer Args_,\n any\n >\n ? Args_\n : never;\n\nexport type Returns<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ReturnsSchema<FunctionSpec_>[\"Type\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n any,\n infer Returns_\n >\n ? Awaited<Returns_>\n : never;\n\nexport type EncodedArgs<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ArgsSchema<FunctionSpec_>[\"Encoded\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n infer Args_,\n any\n >\n ? Args_\n : never;\n\nexport type EncodedReturns<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ReturnsSchema<FunctionSpec_>[\"Encoded\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n any,\n infer Returns_\n >\n ? Returns_\n : never;\n\nexport type Error<FunctionSpec_ extends AnyWithProps> =\n ErrorSchema<FunctionSpec_>[\"Type\"];\n\nexport type EncodedError<FunctionSpec_ extends AnyWithProps> =\n ErrorSchema<FunctionSpec_>[\"Encoded\"];\n\nexport type WithName<\n FunctionSpec_ extends AnyWithProps,\n Name_ extends string,\n> = Extract<FunctionSpec_, { readonly name: Name_ }>;\n\nexport type WithRuntimeAndFunctionType<\n FunctionSpec_ extends AnyWithProps,\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n> = Extract<\n FunctionSpec_,\n { readonly runtimeAndFunctionType: RuntimeAndFunctionType_ }\n>;\n\nexport type WithFunctionType<\n FunctionSpec_ extends AnyWithProps,\n FunctionType_ extends FunctionType,\n> = Extract<\n FunctionSpec_,\n { readonly runtimeAndFunctionType: { readonly functionType: FunctionType_ } }\n>;\n\nexport type WithFunctionProvenance<\n FunctionSpec_ extends AnyWithProps,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n> = Extract<\n FunctionSpec_,\n { readonly functionProvenance: FunctionProvenance_ }\n>;\n\nexport type WithoutName<\n FunctionSpec_ extends AnyWithProps,\n Name_ extends Name<FunctionSpec_>,\n> = Exclude<FunctionSpec_, { readonly name: Name_ }>;\n\nconst Proto = {\n [TypeId]: TypeId,\n\n get middlewareSpecs() {\n return this.middlewareAttachments.map(({ spec }) => spec);\n },\n\n middleware(\n this: AnyWithProps,\n middlewareSpec: MiddlewareSpec.AnyMiddlewareSpec,\n ...options: ReadonlyArray<unknown>\n ) {\n if (this.functionProvenance._tag === \"Convex\") {\n throw new Error(\n `Plain Convex function \"${this.name}\" cannot have middleware`,\n );\n }\n const functionType = this.runtimeAndFunctionType.functionType;\n if (!middlewareSpec.functionTypes[functionType]) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" does not declare function type \"${functionType}\" of function \"${this.name}\"`,\n );\n }\n if (\n !(\"options\" in middlewareSpec) &&\n this.middlewareAttachments.some(\n ({ spec }) => spec.key === middlewareSpec.key,\n )\n ) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" is already attached to function \"${this.name}\"`,\n );\n }\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType: this.runtimeAndFunctionType,\n functionVisibility: this.functionVisibility,\n name: this.name,\n functionProvenance: this.functionProvenance,\n middlewareAttachments: [\n ...this.middlewareAttachments,\n { spec: middlewareSpec, options: options[0] },\n ],\n });\n },\n} satisfies ThisType<AnyWithProps>;\n\ninterface Options {\n readonly name: string;\n readonly args?: () => FunctionProvenance.ArgsFields;\n readonly returns: () => Schema.Codec<any, any>;\n readonly error?: () => Schema.Codec<any, any>;\n}\n\nconst make = <\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n>(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n) => {\n function makeSpec<\n const Name_ extends string,\n const ArgsFields_ extends FunctionProvenance.ArgsFields,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n args: () => ArgsFields_;\n returns: () => Returns_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<ArgsFields_, Returns_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n args?: never;\n returns: () => Returns_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<{}, Returns_, Error_>\n >;\n function makeSpec({ name, args, returns, error }: Options) {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n functionProvenance:\n args === undefined\n ? FunctionProvenance.Confect(() => ({}), returns, error)\n : FunctionProvenance.Confect(args, returns, error),\n middlewareAttachments: [],\n });\n }\n\n return makeSpec;\n};\n\n/**\n * `Schema.Struct` fields that must not declare `paginationOpts`. Used to reject\n * a user args schema that redeclares the field the paginated constructors add\n * themselves; the check reports at the `args` thunk with an unsatisfiable type\n * when violated.\n */\ntype ForbidPaginationOpts<\n UserArgsFields extends FunctionProvenance.ArgsFields,\n> = \"paginationOpts\" extends keyof UserArgsFields\n ? { readonly paginationOpts: never }\n : unknown;\n\ninterface PaginatedOptions {\n readonly name: string;\n readonly args?: () => FunctionProvenance.ArgsFields;\n readonly item: () => Schema.Codec<any, any>;\n readonly error?: () => Schema.Codec<any, any>;\n}\n\nconst makePaginated = <\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n>(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n) => {\n function makeSpec<\n const Name_ extends string,\n const UserArgsFields_ extends FunctionProvenance.ArgsFields,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;\n item: () => Item_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n args?: never;\n item: () => Item_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<{}, Item_, Error_>\n >;\n function makeSpec({ name, args, item, error }: PaginatedOptions) {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n functionProvenance:\n args === undefined\n ? FunctionProvenance.ConfectPaginated(() => ({}), item, error)\n : FunctionProvenance.ConfectPaginated(args, item, error),\n middlewareAttachments: [],\n });\n }\n\n return makeSpec;\n};\n\nexport const publicQuery = make(RuntimeAndFunctionType.ConvexQuery, \"public\");\nexport const internalQuery = make(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const publicPaginatedQuery = makePaginated(\n RuntimeAndFunctionType.ConvexQuery,\n \"public\",\n);\nexport const internalPaginatedQuery = makePaginated(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const publicMutation = make(\n RuntimeAndFunctionType.ConvexMutation,\n \"public\",\n);\nexport const internalMutation = make(\n RuntimeAndFunctionType.ConvexMutation,\n \"internal\",\n);\nexport const publicAction = make(RuntimeAndFunctionType.ConvexAction, \"public\");\nexport const internalAction = make(\n RuntimeAndFunctionType.ConvexAction,\n \"internal\",\n);\n\nexport const publicNodeAction = make(\n RuntimeAndFunctionType.NodeAction,\n \"public\",\n);\nexport const internalNodeAction = make(\n RuntimeAndFunctionType.NodeAction,\n \"internal\",\n);\n\ntype MatchingRegisteredFunction<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n> =\n RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"query\"\n ? RegisteredQuery<FunctionVisibility_, any, any>\n : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"mutation\"\n ? RegisteredMutation<FunctionVisibility_, any, any>\n : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"action\"\n ? RegisteredAction<FunctionVisibility_, any, any>\n : never;\n\ntype ExtractArgs<F> =\n F extends RegisteredQuery<any, infer A extends DefaultFunctionArgs, any>\n ? A\n : F extends RegisteredMutation<\n any,\n infer A extends DefaultFunctionArgs,\n any\n >\n ? A\n : F extends RegisteredAction<\n any,\n infer A extends DefaultFunctionArgs,\n any\n >\n ? A\n : never;\n\ntype ExtractReturns<F> =\n F extends RegisteredQuery<any, any, infer R>\n ? R\n : F extends RegisteredMutation<any, any, infer R>\n ? R\n : F extends RegisteredAction<any, any, infer R>\n ? R\n : never;\n\nconst makeConvex =\n <\n RuntimeAndFunctionType_ extends\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n >(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n ) =>\n <\n F extends MatchingRegisteredFunction<\n RuntimeAndFunctionType_,\n FunctionVisibility_\n >,\n >() =>\n <const Name_ extends string>(\n name: Name_,\n ): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>\n > => {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n functionProvenance: FunctionProvenance.Convex<\n ExtractArgs<F>,\n ExtractReturns<F>\n >(),\n middlewareAttachments: [],\n }) as any;\n };\n\nexport const convexPublicQuery = makeConvex(\n RuntimeAndFunctionType.ConvexQuery,\n \"public\",\n);\nexport const convexInternalQuery = makeConvex(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const convexPublicMutation = makeConvex(\n RuntimeAndFunctionType.ConvexMutation,\n \"public\",\n);\nexport const convexInternalMutation = makeConvex(\n RuntimeAndFunctionType.ConvexMutation,\n \"internal\",\n);\nexport const convexPublicAction = makeConvex(\n RuntimeAndFunctionType.ConvexAction,\n \"public\",\n);\nexport const convexInternalAction = makeConvex(\n RuntimeAndFunctionType.ConvexAction,\n \"internal\",\n);\nexport const convexPublicNodeAction = makeConvex(\n RuntimeAndFunctionType.NodeAction,\n \"public\",\n);\nexport const convexInternalNodeAction = makeCon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,MAAM,iBAIJ,wBACA,uBACG;CAgCH,SAAS,SAAS,EAAE,MAAM,MAAM,MAAM,SAA2B;EAC/D,kCAAkC,IAAI;EAEtC,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG;GACzC;GACA;GACA;GACA,oBACE,SAAS,KAAA,IACLC,wBAA2C,CAAC,IAAI,MAAM,KAAK,IAC3DA,iBAAoC,MAAM,MAAM,KAAK;GAC3D,uBAAuB,CAAC;EAC1B,CAAC;CACH;CAEA,OAAO;AACT;AAEA,MAAa,cAAc,KAAKC,aAAoC,QAAQ;AAC5E,MAAa,gBAAgB,KAC3BA,aACA,UACF;AACA,MAAa,uBAAuB,cAClCA,aACA,QACF;AACA,MAAa,yBAAyB,cACpCA,aACA,UACF;AACA,MAAa,iBAAiB,KAC5BC,gBACA,QACF;AACA,MAAa,mBAAmB,KAC9BA,gBACA,UACF;AACA,MAAa,eAAe,KAAKC,cAAqC,QAAQ;AAC9E,MAAa,iBAAiB,KAC5BA,cACA,UACF;AAEA,MAAa,mBAAmB,KAC9BC,YACA,QACF;AACA,MAAa,qBAAqB,KAChCA,YACA,UACF;AAwCA,MAAM,cAMF,wBACA,8BASA,SAMG;CACH,kCAAkC,IAAI;CAEtC,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG;EACzC;EACA;EACA;EACA,oBAAoBC,OAGlB;EACF,uBAAuB,CAAC;CAC1B,CAAC;AACH;AAEF,MAAa,oBAAoB,WAC/BJ,aACA,QACF;AACA,MAAa,sBAAsB,WACjCA,aACA,UACF;AACA,MAAa,uBAAuB,WAClCC,gBACA,QACF;AACA,MAAa,yBAAyB,WACpCA,gBACA,UACF;AACA,MAAa,qBAAqB,WAChCC,cACA,QACF;AACA,MAAa,uBAAuB,WAClCA,cACA,UACF;AACA,MAAa,yBAAyB,WACpCC,YACA,QACF;AACA,MAAa,2BAA2B,WACtCA,YACA,UACF"}
|
|
1
|
+
{"version":3,"file":"FunctionSpec.js","names":["FunctionProvenance.Confect","FunctionProvenance.ConfectPaginated","RuntimeAndFunctionType.ConvexQuery","RuntimeAndFunctionType.ConvexMutation","RuntimeAndFunctionType.ConvexAction","RuntimeAndFunctionType.NodeAction","FunctionProvenance.Convex"],"sources":["../src/FunctionSpec.ts"],"sourcesContent":["import type * as MiddlewareAttachment from \"./MiddlewareAttachment.js\";\nimport type {\n DefaultFunctionArgs,\n FunctionType,\n FunctionVisibility,\n RegisteredAction,\n RegisteredMutation,\n RegisteredQuery,\n} from \"convex/server\";\nimport type * as Schema from \"effect/Schema\";\nimport * as Predicate from \"effect/Predicate\";\nimport * as FunctionProvenance from \"./FunctionProvenance.js\";\nimport { validateConfectFunctionIdentifier } from \"./Identifier.js\";\nimport type * as MiddlewareSpec from \"./MiddlewareSpec.js\";\nimport * as RuntimeAndFunctionType from \"./RuntimeAndFunctionType.js\";\n\nexport const TypeId = \"~@confect/core/FunctionSpec\";\nexport type TypeId = typeof TypeId;\n\nexport const isFunctionSpec = (u: unknown): u is AnyWithProps =>\n Predicate.hasProperty(u, TypeId);\n\nexport interface FunctionSpec<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n Name_ extends string,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,\n> {\n readonly [TypeId]: TypeId;\n readonly runtimeAndFunctionType: RuntimeAndFunctionType_;\n readonly functionVisibility: FunctionVisibility_;\n readonly name: Name_;\n readonly functionProvenance: FunctionProvenance_;\n readonly middlewareSpecs: ReadonlyArray<MiddlewareSpecs_>;\n readonly middlewareAttachments: ReadonlyArray<\n MiddlewareAttachment.MiddlewareAttachment<MiddlewareSpecs_>\n >;\n}\n\nexport interface Builder<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n Name_ extends string,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,\n> extends FunctionSpec<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_\n> {\n middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(\n middlewareSpec: MiddlewareSpec_ &\n MiddlewareSpec.ValidateFunctionAttach<\n MiddlewareSpec_,\n RuntimeAndFunctionType_,\n FunctionProvenance_,\n MiddlewareSpecs_\n >,\n ...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>\n ): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_ | MiddlewareSpec_\n >;\n}\n\nexport interface DescribedBuilder<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n Name_ extends string,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,\n> extends Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_\n> {\n readonly description?: string;\n\n middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(\n middlewareSpec: MiddlewareSpec_ &\n MiddlewareSpec.ValidateFunctionAttach<\n MiddlewareSpec_,\n RuntimeAndFunctionType_,\n FunctionProvenance_,\n MiddlewareSpecs_\n >,\n ...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>\n ): DescribedBuilder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance_,\n MiddlewareSpecs_ | MiddlewareSpec_\n >;\n}\n\nexport interface Any {\n readonly [TypeId]: TypeId;\n}\n\nexport interface AnyWithProps extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {\n readonly description?: string;\n}\n\nexport interface AnyConfect extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.AnyConfect,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyConvex extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance.AnyConvex,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithRuntime<\n Runtime extends RuntimeAndFunctionType.Runtime,\n> extends FunctionSpec<\n RuntimeAndFunctionType.WithRuntime<Runtime>,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithFunctionType<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n> extends FunctionSpec<\n RuntimeAndFunctionType_,\n FunctionVisibility,\n string,\n FunctionProvenance.FunctionProvenance,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport interface AnyWithPropsWithFunctionProvenance<\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n> extends FunctionSpec<\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility,\n string,\n FunctionProvenance_,\n MiddlewareSpec.AnyMiddlewareSpec\n> {}\n\nexport type GetRuntimeAndFunctionType<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"runtimeAndFunctionType\"];\n\nexport type GetFunctionVisibility<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"functionVisibility\"];\n\nexport type GetFunctionProvenance<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"functionProvenance\"];\n\nexport type Name<FunctionSpec_ extends AnyWithProps> = FunctionSpec_[\"name\"];\n\nexport type MiddlewareSpecs<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_[\"middlewareSpecs\"][number];\n\n/**\n * The field map declared by a Confect-provenance spec.\n */\nexport type ArgsFields<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly \"~ArgsFields\": infer ArgsFields_ extends\n FunctionProvenance.ArgsFields;\n };\n }\n ? ArgsFields_\n : FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? FunctionProvenance.ArgsFields\n : never;\n\n/**\n * The args schema assembled from a Confect-provenance spec's field map.\n */\nexport type ArgsSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly \"~ArgsFields\": infer ArgsFields_ extends\n FunctionProvenance.ArgsFields;\n };\n }\n ? Schema.Struct<ArgsFields_>\n : FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly args: infer ArgsSchema_ extends\n FunctionProvenance.AnyArgsSchema;\n };\n }\n ? ArgsSchema_\n : never;\n\nexport type ReturnsSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly returns: infer ReturnsSchema_ extends Schema.Codec<any, any>;\n };\n }\n ? ReturnsSchema_\n : never;\n\nexport type ErrorSchema<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: {\n readonly _tag: \"Confect\";\n readonly error?: infer ErrorSchema_;\n };\n }\n ? Extract<ErrorSchema_, Schema.Codec<any, any>>\n : never;\n\nexport type Args<FunctionSpec_ extends AnyWithProps> = FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n}\n ? ArgsSchema<FunctionSpec_>[\"Type\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n infer Args_,\n any\n >\n ? Args_\n : never;\n\nexport type Returns<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ReturnsSchema<FunctionSpec_>[\"Type\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n any,\n infer Returns_\n >\n ? Awaited<Returns_>\n : never;\n\nexport type EncodedArgs<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ArgsSchema<FunctionSpec_>[\"Encoded\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n infer Args_,\n any\n >\n ? Args_\n : never;\n\nexport type EncodedReturns<FunctionSpec_ extends AnyWithProps> =\n FunctionSpec_ extends {\n readonly functionProvenance: { readonly _tag: \"Confect\" };\n }\n ? ReturnsSchema<FunctionSpec_>[\"Encoded\"]\n : GetFunctionProvenance<FunctionSpec_> extends FunctionProvenance.Convex<\n any,\n infer Returns_\n >\n ? Returns_\n : never;\n\nexport type Error<FunctionSpec_ extends AnyWithProps> =\n ErrorSchema<FunctionSpec_>[\"Type\"];\n\nexport type EncodedError<FunctionSpec_ extends AnyWithProps> =\n ErrorSchema<FunctionSpec_>[\"Encoded\"];\n\nexport type WithName<\n FunctionSpec_ extends AnyWithProps,\n Name_ extends string,\n> = Extract<FunctionSpec_, { readonly name: Name_ }>;\n\nexport type WithRuntimeAndFunctionType<\n FunctionSpec_ extends AnyWithProps,\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n> = Extract<\n FunctionSpec_,\n { readonly runtimeAndFunctionType: RuntimeAndFunctionType_ }\n>;\n\nexport type WithFunctionType<\n FunctionSpec_ extends AnyWithProps,\n FunctionType_ extends FunctionType,\n> = Extract<\n FunctionSpec_,\n { readonly runtimeAndFunctionType: { readonly functionType: FunctionType_ } }\n>;\n\nexport type WithFunctionProvenance<\n FunctionSpec_ extends AnyWithProps,\n FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,\n> = Extract<\n FunctionSpec_,\n { readonly functionProvenance: FunctionProvenance_ }\n>;\n\nexport type WithoutName<\n FunctionSpec_ extends AnyWithProps,\n Name_ extends Name<FunctionSpec_>,\n> = Exclude<FunctionSpec_, { readonly name: Name_ }>;\n\nconst Proto = {\n [TypeId]: TypeId,\n\n get middlewareSpecs() {\n return this.middlewareAttachments.map(({ spec }) => spec);\n },\n\n middleware(\n this: AnyWithProps,\n middlewareSpec: MiddlewareSpec.AnyMiddlewareSpec,\n ...options: ReadonlyArray<unknown>\n ) {\n if (this.functionProvenance._tag === \"Convex\") {\n throw new Error(\n `Plain Convex function \"${this.name}\" cannot have middleware`,\n );\n }\n const functionType = this.runtimeAndFunctionType.functionType;\n if (!middlewareSpec.functionTypes[functionType]) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" does not declare function type \"${functionType}\" of function \"${this.name}\"`,\n );\n }\n if (\n !(\"options\" in middlewareSpec) &&\n this.middlewareAttachments.some(\n ({ spec }) => spec.key === middlewareSpec.key,\n )\n ) {\n throw new Error(\n `Middleware \"${middlewareSpec.key}\" is already attached to function \"${this.name}\"`,\n );\n }\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType: this.runtimeAndFunctionType,\n functionVisibility: this.functionVisibility,\n name: this.name,\n ...(\"description\" in this ? { description: this.description } : {}),\n functionProvenance: this.functionProvenance,\n middlewareAttachments: [\n ...this.middlewareAttachments,\n { spec: middlewareSpec, options: options[0] },\n ],\n });\n },\n} satisfies ThisType<AnyWithProps>;\n\ninterface Options {\n readonly description?: string;\n readonly name: string;\n readonly args?: () => FunctionProvenance.ArgsFields;\n readonly returns: () => Schema.Codec<any, any>;\n readonly error?: () => Schema.Codec<any, any>;\n}\n\nconst make = <\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n>(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n) => {\n function makeSpec<\n const Name_ extends string,\n const ArgsFields_ extends FunctionProvenance.ArgsFields,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: never;\n args: () => ArgsFields_;\n returns: () => Returns_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<ArgsFields_, Returns_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: never;\n args?: never;\n returns: () => Returns_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<{}, Returns_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n const ArgsFields_ extends FunctionProvenance.ArgsFields,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: FunctionVisibility_ extends \"public\" ? string : never;\n args: () => ArgsFields_;\n returns: () => Returns_;\n error?: () => Error_;\n }): DescribedBuilder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<ArgsFields_, Returns_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Returns_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: FunctionVisibility_ extends \"public\" ? string : never;\n args?: never;\n returns: () => Returns_;\n error?: () => Error_;\n }): DescribedBuilder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Confect<{}, Returns_, Error_>\n >;\n function makeSpec({ name, description, args, returns, error }: Options) {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n ...(description === undefined ? {} : { description }),\n functionProvenance:\n args === undefined\n ? FunctionProvenance.Confect(() => ({}), returns, error)\n : FunctionProvenance.Confect(args, returns, error),\n middlewareAttachments: [],\n });\n }\n\n return makeSpec;\n};\n\n/**\n * `Schema.Struct` fields that must not declare `paginationOpts`. Used to reject\n * a user args schema that redeclares the field the paginated constructors add\n * themselves; the check reports at the `args` thunk with an unsatisfiable type\n * when violated.\n */\ntype ForbidPaginationOpts<\n UserArgsFields extends FunctionProvenance.ArgsFields,\n> = \"paginationOpts\" extends keyof UserArgsFields\n ? { readonly paginationOpts: never }\n : unknown;\n\ninterface PaginatedOptions {\n readonly description?: string;\n readonly name: string;\n readonly args?: () => FunctionProvenance.ArgsFields;\n readonly item: () => Schema.Codec<any, any>;\n readonly error?: () => Schema.Codec<any, any>;\n}\n\nconst makePaginated = <\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n>(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n) => {\n function makeSpec<\n const Name_ extends string,\n const UserArgsFields_ extends FunctionProvenance.ArgsFields,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: never;\n args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;\n item: () => Item_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: never;\n args?: never;\n item: () => Item_;\n error?: () => Error_;\n }): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<{}, Item_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n const UserArgsFields_ extends FunctionProvenance.ArgsFields,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: FunctionVisibility_ extends \"public\" ? string : never;\n args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;\n item: () => Item_;\n error?: () => Error_;\n }): DescribedBuilder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>\n >;\n function makeSpec<\n const Name_ extends string,\n Item_ extends Schema.Codec<any, any>,\n Error_ extends Schema.Codec<any, any> = never,\n >(options: {\n name: Name_;\n description?: FunctionVisibility_ extends \"public\" ? string : never;\n args?: never;\n item: () => Item_;\n error?: () => Error_;\n }): DescribedBuilder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.ConfectPaginated<{}, Item_, Error_>\n >;\n function makeSpec({\n name,\n description,\n args,\n item,\n error,\n }: PaginatedOptions) {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n ...(description === undefined ? {} : { description }),\n functionProvenance:\n args === undefined\n ? FunctionProvenance.ConfectPaginated(() => ({}), item, error)\n : FunctionProvenance.ConfectPaginated(args, item, error),\n middlewareAttachments: [],\n });\n }\n\n return makeSpec;\n};\n\nexport const publicQuery = make(RuntimeAndFunctionType.ConvexQuery, \"public\");\nexport const internalQuery = make(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const publicPaginatedQuery = makePaginated(\n RuntimeAndFunctionType.ConvexQuery,\n \"public\",\n);\nexport const internalPaginatedQuery = makePaginated(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const publicMutation = make(\n RuntimeAndFunctionType.ConvexMutation,\n \"public\",\n);\nexport const internalMutation = make(\n RuntimeAndFunctionType.ConvexMutation,\n \"internal\",\n);\nexport const publicAction = make(RuntimeAndFunctionType.ConvexAction, \"public\");\nexport const internalAction = make(\n RuntimeAndFunctionType.ConvexAction,\n \"internal\",\n);\n\nexport const publicNodeAction = make(\n RuntimeAndFunctionType.NodeAction,\n \"public\",\n);\nexport const internalNodeAction = make(\n RuntimeAndFunctionType.NodeAction,\n \"internal\",\n);\n\ntype MatchingRegisteredFunction<\n RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n> =\n RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"query\"\n ? RegisteredQuery<FunctionVisibility_, any, any>\n : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"mutation\"\n ? RegisteredMutation<FunctionVisibility_, any, any>\n : RuntimeAndFunctionType.GetFunctionType<RuntimeAndFunctionType_> extends \"action\"\n ? RegisteredAction<FunctionVisibility_, any, any>\n : never;\n\ntype ExtractArgs<F> =\n F extends RegisteredQuery<any, infer A extends DefaultFunctionArgs, any>\n ? A\n : F extends RegisteredMutation<\n any,\n infer A extends DefaultFunctionArgs,\n any\n >\n ? A\n : F extends RegisteredAction<\n any,\n infer A extends DefaultFunctionArgs,\n any\n >\n ? A\n : never;\n\ntype ExtractReturns<F> =\n F extends RegisteredQuery<any, any, infer R>\n ? R\n : F extends RegisteredMutation<any, any, infer R>\n ? R\n : F extends RegisteredAction<any, any, infer R>\n ? R\n : never;\n\nconst makeConvex =\n <\n RuntimeAndFunctionType_ extends\n RuntimeAndFunctionType.RuntimeAndFunctionType,\n FunctionVisibility_ extends FunctionVisibility,\n >(\n runtimeAndFunctionType: RuntimeAndFunctionType_,\n functionVisibility: FunctionVisibility_,\n ) =>\n <\n F extends MatchingRegisteredFunction<\n RuntimeAndFunctionType_,\n FunctionVisibility_\n >,\n >() =>\n <const Name_ extends string>(\n name: Name_,\n ): Builder<\n RuntimeAndFunctionType_,\n FunctionVisibility_,\n Name_,\n FunctionProvenance.Convex<ExtractArgs<F>, ExtractReturns<F>>\n > => {\n validateConfectFunctionIdentifier(name);\n\n return Object.assign(Object.create(Proto), {\n runtimeAndFunctionType,\n functionVisibility,\n name,\n functionProvenance: FunctionProvenance.Convex<\n ExtractArgs<F>,\n ExtractReturns<F>\n >(),\n middlewareAttachments: [],\n }) as any;\n };\n\nexport const convexPublicQuery = makeConvex(\n RuntimeAndFunctionType.ConvexQuery,\n \"public\",\n);\nexport const convexInternalQuery = makeConvex(\n RuntimeAndFunctionType.ConvexQuery,\n \"internal\",\n);\nexport const convexPublicMutation = makeConvex(\n RuntimeAndFunctionType.ConvexMutation,\n \"public\",\n);\nexport const convexInternalMutation = makeConvex(\n RuntimeAndFunctionType.ConvexMutation,\n \"internal\",\n);\nexport const convexPublicAction = makeConvex(\n RuntimeAndFunctionType.ConvexAction,\n \"public\",\n);\nexport const convexInternalAction = makeConvex(\n RuntimeAndFunctionType.ConvexAction,\n \"internal\",\n);\nexport const convexPublicNodeAction = makeConvex(\n RuntimeAndFunctionType.NodeAction,\n \"public\",\n);\nexport const convexInternalNodeAction = makeConvex(\n RuntimeAndFunctionType.NodeAction,\n \"internal\",\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAa,SAAS;AAGtB,MAAa,kBAAkB,MAC7B,UAAU,YAAY,GAAG,MAAM;AAiTjC,MAAM,QAAQ;EACX,SAAS;CAEV,IAAI,kBAAkB;EACpB,OAAO,KAAK,sBAAsB,KAAK,EAAE,WAAW,IAAI;CAC1D;CAEA,WAEE,gBACA,GAAG,SACH;EACA,IAAI,KAAK,mBAAmB,SAAS,UACnC,MAAM,IAAI,MACR,0BAA0B,KAAK,KAAK,yBACtC;EAEF,MAAM,eAAe,KAAK,uBAAuB;EACjD,IAAI,CAAC,eAAe,cAAc,eAChC,MAAM,IAAI,MACR,eAAe,eAAe,IAAI,oCAAoC,aAAa,iBAAiB,KAAK,KAAK,EAChH;EAEF,IACE,EAAE,aAAa,mBACf,KAAK,sBAAsB,MACxB,EAAE,WAAW,KAAK,QAAQ,eAAe,GAC5C,GAEA,MA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AAa,yBAAyB,cACpCA,aACA,UACF;AACA,MAAa,iBAAiB,KAC5BC,gBACA,QACF;AACA,MAAa,mBAAmB,KAC9BA,gBACA,UACF;AACA,MAAa,eAAe,KAAKC,cAAqC,QAAQ;AAC9E,MAAa,iBAAiB,KAC5BA,cACA,UACF;AAEA,MAAa,mBAAmB,KAC9BC,YACA,QACF;AACA,MAAa,qBAAqB,KAChCA,YACA,UACF;AAwCA,MAAM,cAMF,wBACA,8BASA,SAMG;CACH,kCAAkC,IAAI;CAEtC,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG;EACzC;EACA;EACA;EACA,oBAAoBC,OAGlB;EACF,uBAAuB,CAAC;CAC1B,CAAC;AACH;AAEF,MAAa,oBAAoB,WAC/BJ,aACA,QACF;AACA,MAAa,sBAAsB,WACjCA,aACA,UACF;AACA,MAAa,uBAAuB,WAClCC,gBACA,QACF;AACA,MAAa,yBAAyB,WACpCA,gBACA,UACF;AACA,MAAa,qBAAqB,WAChCC,cACA,QACF;AACA,MAAa,uBAAuB,WAClCA,cACA,UACF;AACA,MAAa,yBAAyB,WACpCC,YACA,QACF;AACA,MAAa,2BAA2B,WACtCA,YACA,UACF"}
|
package/package.json
CHANGED
package/src/FunctionSpec.ts
CHANGED
|
@@ -69,6 +69,39 @@ export interface Builder<
|
|
|
69
69
|
>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
export interface DescribedBuilder<
|
|
73
|
+
RuntimeAndFunctionType_ extends RuntimeAndFunctionType.RuntimeAndFunctionType,
|
|
74
|
+
FunctionVisibility_ extends FunctionVisibility,
|
|
75
|
+
Name_ extends string,
|
|
76
|
+
FunctionProvenance_ extends FunctionProvenance.FunctionProvenance,
|
|
77
|
+
MiddlewareSpecs_ extends MiddlewareSpec.AnyMiddlewareSpec = never,
|
|
78
|
+
> extends Builder<
|
|
79
|
+
RuntimeAndFunctionType_,
|
|
80
|
+
FunctionVisibility_,
|
|
81
|
+
Name_,
|
|
82
|
+
FunctionProvenance_,
|
|
83
|
+
MiddlewareSpecs_
|
|
84
|
+
> {
|
|
85
|
+
readonly description?: string;
|
|
86
|
+
|
|
87
|
+
middleware<MiddlewareSpec_ extends MiddlewareSpec.AnyMiddlewareSpec>(
|
|
88
|
+
middlewareSpec: MiddlewareSpec_ &
|
|
89
|
+
MiddlewareSpec.ValidateFunctionAttach<
|
|
90
|
+
MiddlewareSpec_,
|
|
91
|
+
RuntimeAndFunctionType_,
|
|
92
|
+
FunctionProvenance_,
|
|
93
|
+
MiddlewareSpecs_
|
|
94
|
+
>,
|
|
95
|
+
...options: MiddlewareAttachment.Args<NoInfer<MiddlewareSpec_>>
|
|
96
|
+
): DescribedBuilder<
|
|
97
|
+
RuntimeAndFunctionType_,
|
|
98
|
+
FunctionVisibility_,
|
|
99
|
+
Name_,
|
|
100
|
+
FunctionProvenance_,
|
|
101
|
+
MiddlewareSpecs_ | MiddlewareSpec_
|
|
102
|
+
>;
|
|
103
|
+
}
|
|
104
|
+
|
|
72
105
|
export interface Any {
|
|
73
106
|
readonly [TypeId]: TypeId;
|
|
74
107
|
}
|
|
@@ -79,7 +112,9 @@ export interface AnyWithProps extends FunctionSpec<
|
|
|
79
112
|
string,
|
|
80
113
|
FunctionProvenance.FunctionProvenance,
|
|
81
114
|
MiddlewareSpec.AnyMiddlewareSpec
|
|
82
|
-
> {
|
|
115
|
+
> {
|
|
116
|
+
readonly description?: string;
|
|
117
|
+
}
|
|
83
118
|
|
|
84
119
|
export interface AnyConfect extends FunctionSpec<
|
|
85
120
|
RuntimeAndFunctionType.RuntimeAndFunctionType,
|
|
@@ -326,6 +361,7 @@ const Proto = {
|
|
|
326
361
|
runtimeAndFunctionType: this.runtimeAndFunctionType,
|
|
327
362
|
functionVisibility: this.functionVisibility,
|
|
328
363
|
name: this.name,
|
|
364
|
+
...("description" in this ? { description: this.description } : {}),
|
|
329
365
|
functionProvenance: this.functionProvenance,
|
|
330
366
|
middlewareAttachments: [
|
|
331
367
|
...this.middlewareAttachments,
|
|
@@ -336,6 +372,7 @@ const Proto = {
|
|
|
336
372
|
} satisfies ThisType<AnyWithProps>;
|
|
337
373
|
|
|
338
374
|
interface Options {
|
|
375
|
+
readonly description?: string;
|
|
339
376
|
readonly name: string;
|
|
340
377
|
readonly args?: () => FunctionProvenance.ArgsFields;
|
|
341
378
|
readonly returns: () => Schema.Codec<any, any>;
|
|
@@ -356,6 +393,7 @@ const make = <
|
|
|
356
393
|
Error_ extends Schema.Codec<any, any> = never,
|
|
357
394
|
>(options: {
|
|
358
395
|
name: Name_;
|
|
396
|
+
description?: never;
|
|
359
397
|
args: () => ArgsFields_;
|
|
360
398
|
returns: () => Returns_;
|
|
361
399
|
error?: () => Error_;
|
|
@@ -371,6 +409,7 @@ const make = <
|
|
|
371
409
|
Error_ extends Schema.Codec<any, any> = never,
|
|
372
410
|
>(options: {
|
|
373
411
|
name: Name_;
|
|
412
|
+
description?: never;
|
|
374
413
|
args?: never;
|
|
375
414
|
returns: () => Returns_;
|
|
376
415
|
error?: () => Error_;
|
|
@@ -380,13 +419,47 @@ const make = <
|
|
|
380
419
|
Name_,
|
|
381
420
|
FunctionProvenance.Confect<{}, Returns_, Error_>
|
|
382
421
|
>;
|
|
383
|
-
function makeSpec
|
|
422
|
+
function makeSpec<
|
|
423
|
+
const Name_ extends string,
|
|
424
|
+
const ArgsFields_ extends FunctionProvenance.ArgsFields,
|
|
425
|
+
Returns_ extends Schema.Codec<any, any>,
|
|
426
|
+
Error_ extends Schema.Codec<any, any> = never,
|
|
427
|
+
>(options: {
|
|
428
|
+
name: Name_;
|
|
429
|
+
description?: FunctionVisibility_ extends "public" ? string : never;
|
|
430
|
+
args: () => ArgsFields_;
|
|
431
|
+
returns: () => Returns_;
|
|
432
|
+
error?: () => Error_;
|
|
433
|
+
}): DescribedBuilder<
|
|
434
|
+
RuntimeAndFunctionType_,
|
|
435
|
+
FunctionVisibility_,
|
|
436
|
+
Name_,
|
|
437
|
+
FunctionProvenance.Confect<ArgsFields_, Returns_, Error_>
|
|
438
|
+
>;
|
|
439
|
+
function makeSpec<
|
|
440
|
+
const Name_ extends string,
|
|
441
|
+
Returns_ extends Schema.Codec<any, any>,
|
|
442
|
+
Error_ extends Schema.Codec<any, any> = never,
|
|
443
|
+
>(options: {
|
|
444
|
+
name: Name_;
|
|
445
|
+
description?: FunctionVisibility_ extends "public" ? string : never;
|
|
446
|
+
args?: never;
|
|
447
|
+
returns: () => Returns_;
|
|
448
|
+
error?: () => Error_;
|
|
449
|
+
}): DescribedBuilder<
|
|
450
|
+
RuntimeAndFunctionType_,
|
|
451
|
+
FunctionVisibility_,
|
|
452
|
+
Name_,
|
|
453
|
+
FunctionProvenance.Confect<{}, Returns_, Error_>
|
|
454
|
+
>;
|
|
455
|
+
function makeSpec({ name, description, args, returns, error }: Options) {
|
|
384
456
|
validateConfectFunctionIdentifier(name);
|
|
385
457
|
|
|
386
458
|
return Object.assign(Object.create(Proto), {
|
|
387
459
|
runtimeAndFunctionType,
|
|
388
460
|
functionVisibility,
|
|
389
461
|
name,
|
|
462
|
+
...(description === undefined ? {} : { description }),
|
|
390
463
|
functionProvenance:
|
|
391
464
|
args === undefined
|
|
392
465
|
? FunctionProvenance.Confect(() => ({}), returns, error)
|
|
@@ -411,6 +484,7 @@ type ForbidPaginationOpts<
|
|
|
411
484
|
: unknown;
|
|
412
485
|
|
|
413
486
|
interface PaginatedOptions {
|
|
487
|
+
readonly description?: string;
|
|
414
488
|
readonly name: string;
|
|
415
489
|
readonly args?: () => FunctionProvenance.ArgsFields;
|
|
416
490
|
readonly item: () => Schema.Codec<any, any>;
|
|
@@ -431,6 +505,7 @@ const makePaginated = <
|
|
|
431
505
|
Error_ extends Schema.Codec<any, any> = never,
|
|
432
506
|
>(options: {
|
|
433
507
|
name: Name_;
|
|
508
|
+
description?: never;
|
|
434
509
|
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
435
510
|
item: () => Item_;
|
|
436
511
|
error?: () => Error_;
|
|
@@ -446,6 +521,7 @@ const makePaginated = <
|
|
|
446
521
|
Error_ extends Schema.Codec<any, any> = never,
|
|
447
522
|
>(options: {
|
|
448
523
|
name: Name_;
|
|
524
|
+
description?: never;
|
|
449
525
|
args?: never;
|
|
450
526
|
item: () => Item_;
|
|
451
527
|
error?: () => Error_;
|
|
@@ -455,13 +531,53 @@ const makePaginated = <
|
|
|
455
531
|
Name_,
|
|
456
532
|
FunctionProvenance.ConfectPaginated<{}, Item_, Error_>
|
|
457
533
|
>;
|
|
458
|
-
function makeSpec
|
|
534
|
+
function makeSpec<
|
|
535
|
+
const Name_ extends string,
|
|
536
|
+
const UserArgsFields_ extends FunctionProvenance.ArgsFields,
|
|
537
|
+
Item_ extends Schema.Codec<any, any>,
|
|
538
|
+
Error_ extends Schema.Codec<any, any> = never,
|
|
539
|
+
>(options: {
|
|
540
|
+
name: Name_;
|
|
541
|
+
description?: FunctionVisibility_ extends "public" ? string : never;
|
|
542
|
+
args: () => UserArgsFields_ & ForbidPaginationOpts<UserArgsFields_>;
|
|
543
|
+
item: () => Item_;
|
|
544
|
+
error?: () => Error_;
|
|
545
|
+
}): DescribedBuilder<
|
|
546
|
+
RuntimeAndFunctionType_,
|
|
547
|
+
FunctionVisibility_,
|
|
548
|
+
Name_,
|
|
549
|
+
FunctionProvenance.ConfectPaginated<UserArgsFields_, Item_, Error_>
|
|
550
|
+
>;
|
|
551
|
+
function makeSpec<
|
|
552
|
+
const Name_ extends string,
|
|
553
|
+
Item_ extends Schema.Codec<any, any>,
|
|
554
|
+
Error_ extends Schema.Codec<any, any> = never,
|
|
555
|
+
>(options: {
|
|
556
|
+
name: Name_;
|
|
557
|
+
description?: FunctionVisibility_ extends "public" ? string : never;
|
|
558
|
+
args?: never;
|
|
559
|
+
item: () => Item_;
|
|
560
|
+
error?: () => Error_;
|
|
561
|
+
}): DescribedBuilder<
|
|
562
|
+
RuntimeAndFunctionType_,
|
|
563
|
+
FunctionVisibility_,
|
|
564
|
+
Name_,
|
|
565
|
+
FunctionProvenance.ConfectPaginated<{}, Item_, Error_>
|
|
566
|
+
>;
|
|
567
|
+
function makeSpec({
|
|
568
|
+
name,
|
|
569
|
+
description,
|
|
570
|
+
args,
|
|
571
|
+
item,
|
|
572
|
+
error,
|
|
573
|
+
}: PaginatedOptions) {
|
|
459
574
|
validateConfectFunctionIdentifier(name);
|
|
460
575
|
|
|
461
576
|
return Object.assign(Object.create(Proto), {
|
|
462
577
|
runtimeAndFunctionType,
|
|
463
578
|
functionVisibility,
|
|
464
579
|
name,
|
|
580
|
+
...(description === undefined ? {} : { description }),
|
|
465
581
|
functionProvenance:
|
|
466
582
|
args === undefined
|
|
467
583
|
? FunctionProvenance.ConfectPaginated(() => ({}), item, error)
|