@read-frog/api-contract 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +255 -174
- package/dist/index.js +229 -0
- package/dist/index.js.map +1 -0
- package/package.json +14 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
2
|
-
import * as z$1 from "zod";
|
|
3
|
-
import { z } from "zod";
|
|
4
1
|
import * as _orpc_contract0 from "@orpc/contract";
|
|
5
2
|
import { ContractRouterClient } from "@orpc/contract";
|
|
3
|
+
import * as zod from "zod";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
6
|
|
|
7
7
|
//#region src/schemas/column.d.ts
|
|
8
8
|
declare const ColumnAddInputSchema: z.ZodObject<{
|
|
@@ -81,37 +81,51 @@ declare const ColumnDeleteOutputSchema: z.ZodObject<{
|
|
|
81
81
|
//#endregion
|
|
82
82
|
//#region src/schemas/custom-table.d.ts
|
|
83
83
|
declare const CustomTableListInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
84
|
+
type CustomTableListInput = z.infer<typeof CustomTableListInputSchema>;
|
|
84
85
|
declare const CustomTableListItemSchema: z.ZodObject<{
|
|
85
86
|
id: z.ZodString;
|
|
86
87
|
name: z.ZodString;
|
|
87
88
|
}, z.core.$strip>;
|
|
89
|
+
type CustomTableListItem = z.infer<typeof CustomTableListItemSchema>;
|
|
88
90
|
declare const CustomTableListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
89
91
|
id: z.ZodString;
|
|
90
92
|
name: z.ZodString;
|
|
91
93
|
}, z.core.$strip>>;
|
|
94
|
+
type CustomTableListOutput = z.infer<typeof CustomTableListOutputSchema>;
|
|
92
95
|
declare const CustomTableCreateInputSchema: z.ZodObject<{
|
|
93
96
|
id: z.ZodOptional<z.ZodUUID>;
|
|
94
97
|
name: z.ZodString;
|
|
95
98
|
}, z.core.$strip>;
|
|
99
|
+
type CustomTableCreateInput = z.infer<typeof CustomTableCreateInputSchema>;
|
|
96
100
|
declare const CustomTableCreateOutputSchema: z.ZodObject<{
|
|
97
101
|
txid: z.ZodNumber;
|
|
98
102
|
}, z.core.$strip>;
|
|
103
|
+
type CustomTableCreateOutput = z.infer<typeof CustomTableCreateOutputSchema>;
|
|
99
104
|
declare const CustomTableUpdateInputSchema: z.ZodObject<{
|
|
100
105
|
id: z.ZodUUID;
|
|
101
106
|
name: z.ZodOptional<z.ZodString>;
|
|
102
107
|
}, z.core.$strip>;
|
|
108
|
+
type CustomTableUpdateInput = z.infer<typeof CustomTableUpdateInputSchema>;
|
|
103
109
|
declare const CustomTableUpdateOutputSchema: z.ZodObject<{
|
|
104
110
|
txid: z.ZodNumber;
|
|
105
111
|
}, z.core.$strip>;
|
|
112
|
+
type CustomTableUpdateOutput = z.infer<typeof CustomTableUpdateOutputSchema>;
|
|
106
113
|
declare const CustomTableDeleteInputSchema: z.ZodObject<{
|
|
107
114
|
id: z.ZodUUID;
|
|
108
115
|
}, z.core.$strip>;
|
|
116
|
+
type CustomTableDeleteInput = z.infer<typeof CustomTableDeleteInputSchema>;
|
|
109
117
|
declare const CustomTableDeleteOutputSchema: z.ZodObject<{
|
|
110
118
|
txid: z.ZodNumber;
|
|
111
119
|
}, z.core.$strip>;
|
|
120
|
+
type CustomTableDeleteOutput = z.infer<typeof CustomTableDeleteOutputSchema>;
|
|
112
121
|
declare const CustomTableGetInputSchema: z.ZodObject<{
|
|
113
122
|
id: z.ZodUUID;
|
|
114
123
|
}, z.core.$strip>;
|
|
124
|
+
type CustomTableGetInput = z.infer<typeof CustomTableGetInputSchema>;
|
|
125
|
+
declare const CustomTableGetSchemaInputSchema: z.ZodObject<{
|
|
126
|
+
id: z.ZodUUID;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
type CustomTableGetSchemaInput = z.infer<typeof CustomTableGetSchemaInputSchema>;
|
|
115
129
|
declare const TableColumnSchema: z.ZodObject<{
|
|
116
130
|
id: z.ZodString;
|
|
117
131
|
tableId: z.ZodString;
|
|
@@ -145,6 +159,7 @@ declare const TableColumnSchema: z.ZodObject<{
|
|
|
145
159
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
146
160
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
147
161
|
}, z.core.$strip>;
|
|
162
|
+
type TableColumn = z.infer<typeof TableColumnSchema>;
|
|
148
163
|
declare const TableRowSchema: z.ZodObject<{
|
|
149
164
|
id: z.ZodString;
|
|
150
165
|
tableId: z.ZodString;
|
|
@@ -153,6 +168,7 @@ declare const TableRowSchema: z.ZodObject<{
|
|
|
153
168
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
154
169
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
155
170
|
}, z.core.$strip>;
|
|
171
|
+
type TableRow = z.infer<typeof TableRowSchema>;
|
|
156
172
|
declare const TableViewSchema: z.ZodObject<{
|
|
157
173
|
id: z.ZodString;
|
|
158
174
|
tableId: z.ZodString;
|
|
@@ -169,6 +185,7 @@ declare const TableViewSchema: z.ZodObject<{
|
|
|
169
185
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
170
186
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
171
187
|
}, z.core.$strip>;
|
|
188
|
+
type TableView = z.infer<typeof TableViewSchema>;
|
|
172
189
|
declare const CustomTableGetOutputSchema: z.ZodObject<{
|
|
173
190
|
id: z.ZodString;
|
|
174
191
|
userId: z.ZodString;
|
|
@@ -233,17 +250,46 @@ declare const CustomTableGetOutputSchema: z.ZodObject<{
|
|
|
233
250
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
234
251
|
}, z.core.$strip>>;
|
|
235
252
|
}, z.core.$strip>;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
type CustomTableGetOutput = z.infer<typeof CustomTableGetOutputSchema>;
|
|
254
|
+
declare const CustomTableGetSchemaOutputSchema: z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
258
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
tableId: z.ZodString;
|
|
261
|
+
name: z.ZodString;
|
|
262
|
+
config: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
263
|
+
type: z.ZodLiteral<"string">;
|
|
264
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
265
|
+
type: z.ZodLiteral<"number">;
|
|
266
|
+
decimal: z.ZodDefault<z.ZodNumber>;
|
|
267
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
268
|
+
number: "number";
|
|
269
|
+
currency: "currency";
|
|
270
|
+
percent: "percent";
|
|
271
|
+
}>>;
|
|
272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"boolean">;
|
|
274
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"date">;
|
|
276
|
+
dateFormat: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
type: z.ZodLiteral<"select">;
|
|
279
|
+
options: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
value: z.ZodString;
|
|
282
|
+
color: z.ZodString;
|
|
283
|
+
}, z.core.$strip>>>;
|
|
284
|
+
}, z.core.$strip>], "type">;
|
|
285
|
+
position: z.ZodNumber;
|
|
286
|
+
isPrimary: z.ZodBoolean;
|
|
287
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
288
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
289
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
type CustomTableGetSchemaOutput = z.infer<typeof CustomTableGetSchemaOutputSchema>;
|
|
247
293
|
//#endregion
|
|
248
294
|
//#region src/schemas/row.d.ts
|
|
249
295
|
declare const RowAddInputSchema: z.ZodObject<{
|
|
@@ -254,9 +300,11 @@ declare const RowAddInputSchema: z.ZodObject<{
|
|
|
254
300
|
position: z.ZodOptional<z.ZodNumber>;
|
|
255
301
|
}, z.core.$strict>;
|
|
256
302
|
}, z.core.$strip>;
|
|
303
|
+
type RowAddInput = z.infer<typeof RowAddInputSchema>;
|
|
257
304
|
declare const RowAddOutputSchema: z.ZodObject<{
|
|
258
305
|
txid: z.ZodNumber;
|
|
259
306
|
}, z.core.$strip>;
|
|
307
|
+
type RowAddOutput = z.infer<typeof RowAddOutputSchema>;
|
|
260
308
|
declare const RowUpdateInputSchema: z.ZodObject<{
|
|
261
309
|
rowId: z.ZodUUID;
|
|
262
310
|
data: z.ZodObject<{
|
|
@@ -264,6 +312,7 @@ declare const RowUpdateInputSchema: z.ZodObject<{
|
|
|
264
312
|
position: z.ZodOptional<z.ZodNumber>;
|
|
265
313
|
}, z.core.$strict>;
|
|
266
314
|
}, z.core.$strip>;
|
|
315
|
+
type RowUpdateInput = z.infer<typeof RowUpdateInputSchema>;
|
|
267
316
|
declare const RowUpdateOutputSchema: z.ZodObject<{
|
|
268
317
|
id: z.ZodUUID;
|
|
269
318
|
tableId: z.ZodUUID;
|
|
@@ -273,221 +322,253 @@ declare const RowUpdateOutputSchema: z.ZodObject<{
|
|
|
273
322
|
updatedAt: z.ZodDate;
|
|
274
323
|
txid: z.ZodNumber;
|
|
275
324
|
}, z.core.$strip>;
|
|
325
|
+
type RowUpdateOutput = z.infer<typeof RowUpdateOutputSchema>;
|
|
276
326
|
declare const RowDeleteInputSchema: z.ZodObject<{
|
|
277
327
|
rowId: z.ZodUUID;
|
|
278
328
|
}, z.core.$strip>;
|
|
329
|
+
type RowDeleteInput = z.infer<typeof RowDeleteInputSchema>;
|
|
279
330
|
declare const RowDeleteOutputSchema: z.ZodObject<{
|
|
280
331
|
txid: z.ZodNumber;
|
|
281
332
|
}, z.core.$strip>;
|
|
333
|
+
type RowDeleteOutput = z.infer<typeof RowDeleteOutputSchema>;
|
|
282
334
|
//#endregion
|
|
283
335
|
//#region src/index.d.ts
|
|
284
336
|
declare const contract: {
|
|
285
337
|
customTable: {
|
|
286
|
-
list: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
287
|
-
id:
|
|
288
|
-
name:
|
|
338
|
+
list: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{}, zod_v4_core0.$strip>, zod.ZodArray<zod.ZodObject<{
|
|
339
|
+
id: zod.ZodString;
|
|
340
|
+
name: zod.ZodString;
|
|
289
341
|
}, zod_v4_core0.$strip>>, Record<never, never>, Record<never, never>>;
|
|
290
|
-
get: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
291
|
-
id:
|
|
292
|
-
}, zod_v4_core0.$strip>,
|
|
293
|
-
id:
|
|
294
|
-
userId:
|
|
295
|
-
name:
|
|
296
|
-
createdAt:
|
|
297
|
-
updatedAt:
|
|
298
|
-
columns:
|
|
299
|
-
id:
|
|
300
|
-
tableId:
|
|
301
|
-
name:
|
|
302
|
-
config:
|
|
303
|
-
type:
|
|
304
|
-
}, zod_v4_core0.$strip>,
|
|
305
|
-
type:
|
|
306
|
-
decimal:
|
|
307
|
-
format:
|
|
342
|
+
get: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
343
|
+
id: zod.ZodUUID;
|
|
344
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
345
|
+
id: zod.ZodString;
|
|
346
|
+
userId: zod.ZodString;
|
|
347
|
+
name: zod.ZodString;
|
|
348
|
+
createdAt: zod.ZodCoercedDate<unknown>;
|
|
349
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
350
|
+
columns: zod.ZodArray<zod.ZodObject<{
|
|
351
|
+
id: zod.ZodString;
|
|
352
|
+
tableId: zod.ZodString;
|
|
353
|
+
name: zod.ZodString;
|
|
354
|
+
config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
355
|
+
type: zod.ZodLiteral<"string">;
|
|
356
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
357
|
+
type: zod.ZodLiteral<"number">;
|
|
358
|
+
decimal: zod.ZodDefault<zod.ZodNumber>;
|
|
359
|
+
format: zod.ZodDefault<zod.ZodEnum<{
|
|
308
360
|
number: "number";
|
|
309
361
|
currency: "currency";
|
|
310
362
|
percent: "percent";
|
|
311
363
|
}>>;
|
|
312
|
-
}, zod_v4_core0.$strip>,
|
|
313
|
-
type:
|
|
314
|
-
}, zod_v4_core0.$strip>,
|
|
315
|
-
type:
|
|
316
|
-
dateFormat:
|
|
317
|
-
}, zod_v4_core0.$strip>,
|
|
318
|
-
type:
|
|
319
|
-
options:
|
|
320
|
-
id:
|
|
321
|
-
value:
|
|
322
|
-
color:
|
|
364
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
365
|
+
type: zod.ZodLiteral<"boolean">;
|
|
366
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
367
|
+
type: zod.ZodLiteral<"date">;
|
|
368
|
+
dateFormat: zod.ZodOptional<zod.ZodString>;
|
|
369
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
370
|
+
type: zod.ZodLiteral<"select">;
|
|
371
|
+
options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
372
|
+
id: zod.ZodString;
|
|
373
|
+
value: zod.ZodString;
|
|
374
|
+
color: zod.ZodString;
|
|
323
375
|
}, zod_v4_core0.$strip>>>;
|
|
324
376
|
}, zod_v4_core0.$strip>], "type">;
|
|
325
|
-
position:
|
|
326
|
-
isPrimary:
|
|
327
|
-
width:
|
|
328
|
-
createdAt:
|
|
329
|
-
updatedAt:
|
|
377
|
+
position: zod.ZodNumber;
|
|
378
|
+
isPrimary: zod.ZodBoolean;
|
|
379
|
+
width: zod.ZodNullable<zod.ZodNumber>;
|
|
380
|
+
createdAt: zod.ZodCoercedDate<unknown>;
|
|
381
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
330
382
|
}, zod_v4_core0.$strip>>;
|
|
331
|
-
rows:
|
|
332
|
-
id:
|
|
333
|
-
tableId:
|
|
334
|
-
cells:
|
|
335
|
-
position:
|
|
336
|
-
createdAt:
|
|
337
|
-
updatedAt:
|
|
383
|
+
rows: zod.ZodArray<zod.ZodObject<{
|
|
384
|
+
id: zod.ZodString;
|
|
385
|
+
tableId: zod.ZodString;
|
|
386
|
+
cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
387
|
+
position: zod.ZodNullable<zod.ZodNumber>;
|
|
388
|
+
createdAt: zod.ZodCoercedDate<unknown>;
|
|
389
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
338
390
|
}, zod_v4_core0.$strip>>;
|
|
339
|
-
views:
|
|
340
|
-
id:
|
|
341
|
-
tableId:
|
|
342
|
-
name:
|
|
343
|
-
type:
|
|
391
|
+
views: zod.ZodArray<zod.ZodObject<{
|
|
392
|
+
id: zod.ZodString;
|
|
393
|
+
tableId: zod.ZodString;
|
|
394
|
+
name: zod.ZodString;
|
|
395
|
+
type: zod.ZodEnum<{
|
|
344
396
|
table: "table";
|
|
345
397
|
kanban: "kanban";
|
|
346
398
|
gallery: "gallery";
|
|
347
399
|
}>;
|
|
348
|
-
config:
|
|
349
|
-
filters:
|
|
350
|
-
sorts:
|
|
351
|
-
position:
|
|
352
|
-
createdAt:
|
|
353
|
-
updatedAt:
|
|
400
|
+
config: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
401
|
+
filters: zod.ZodNullable<zod.ZodArray<zod.ZodUnknown>>;
|
|
402
|
+
sorts: zod.ZodNullable<zod.ZodArray<zod.ZodUnknown>>;
|
|
403
|
+
position: zod.ZodNumber;
|
|
404
|
+
createdAt: zod.ZodCoercedDate<unknown>;
|
|
405
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
354
406
|
}, zod_v4_core0.$strip>>;
|
|
355
407
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
356
|
-
|
|
357
|
-
id:
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
408
|
+
getSchema: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
409
|
+
id: zod.ZodUUID;
|
|
410
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
411
|
+
id: zod.ZodString;
|
|
412
|
+
name: zod.ZodString;
|
|
413
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
414
|
+
columns: zod.ZodArray<zod.ZodObject<{
|
|
415
|
+
id: zod.ZodString;
|
|
416
|
+
tableId: zod.ZodString;
|
|
417
|
+
name: zod.ZodString;
|
|
418
|
+
config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
419
|
+
type: zod.ZodLiteral<"string">;
|
|
420
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
421
|
+
type: zod.ZodLiteral<"number">;
|
|
422
|
+
decimal: zod.ZodDefault<zod.ZodNumber>;
|
|
423
|
+
format: zod.ZodDefault<zod.ZodEnum<{
|
|
424
|
+
number: "number";
|
|
425
|
+
currency: "currency";
|
|
426
|
+
percent: "percent";
|
|
427
|
+
}>>;
|
|
428
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
429
|
+
type: zod.ZodLiteral<"boolean">;
|
|
430
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
431
|
+
type: zod.ZodLiteral<"date">;
|
|
432
|
+
dateFormat: zod.ZodOptional<zod.ZodString>;
|
|
433
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
434
|
+
type: zod.ZodLiteral<"select">;
|
|
435
|
+
options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
436
|
+
id: zod.ZodString;
|
|
437
|
+
value: zod.ZodString;
|
|
438
|
+
color: zod.ZodString;
|
|
439
|
+
}, zod_v4_core0.$strip>>>;
|
|
440
|
+
}, zod_v4_core0.$strip>], "type">;
|
|
441
|
+
position: zod.ZodNumber;
|
|
442
|
+
isPrimary: zod.ZodBoolean;
|
|
443
|
+
width: zod.ZodNullable<zod.ZodNumber>;
|
|
444
|
+
createdAt: zod.ZodCoercedDate<unknown>;
|
|
445
|
+
updatedAt: zod.ZodCoercedDate<unknown>;
|
|
446
|
+
}, zod_v4_core0.$strip>>;
|
|
447
|
+
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
448
|
+
create: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
449
|
+
id: zod.ZodOptional<zod.ZodUUID>;
|
|
450
|
+
name: zod.ZodString;
|
|
451
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
452
|
+
txid: zod.ZodNumber;
|
|
361
453
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
362
|
-
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
363
|
-
id:
|
|
364
|
-
name:
|
|
365
|
-
}, zod_v4_core0.$strip>,
|
|
366
|
-
txid:
|
|
454
|
+
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
455
|
+
id: zod.ZodUUID;
|
|
456
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
457
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
458
|
+
txid: zod.ZodNumber;
|
|
367
459
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
368
|
-
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
369
|
-
id:
|
|
370
|
-
}, zod_v4_core0.$strip>,
|
|
371
|
-
txid:
|
|
460
|
+
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
461
|
+
id: zod.ZodUUID;
|
|
462
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
463
|
+
txid: zod.ZodNumber;
|
|
372
464
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
373
465
|
};
|
|
374
466
|
column: {
|
|
375
|
-
add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
376
|
-
tableId:
|
|
377
|
-
data:
|
|
378
|
-
id:
|
|
379
|
-
name:
|
|
380
|
-
config:
|
|
381
|
-
type:
|
|
382
|
-
}, zod_v4_core0.$strip>,
|
|
383
|
-
type:
|
|
384
|
-
decimal:
|
|
385
|
-
format:
|
|
467
|
+
add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
468
|
+
tableId: zod.ZodUUID;
|
|
469
|
+
data: zod.ZodObject<{
|
|
470
|
+
id: zod.ZodOptional<zod.ZodUUID>;
|
|
471
|
+
name: zod.ZodString;
|
|
472
|
+
config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
473
|
+
type: zod.ZodLiteral<"string">;
|
|
474
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
475
|
+
type: zod.ZodLiteral<"number">;
|
|
476
|
+
decimal: zod.ZodDefault<zod.ZodNumber>;
|
|
477
|
+
format: zod.ZodDefault<zod.ZodEnum<{
|
|
386
478
|
number: "number";
|
|
387
479
|
currency: "currency";
|
|
388
480
|
percent: "percent";
|
|
389
481
|
}>>;
|
|
390
|
-
}, zod_v4_core0.$strip>,
|
|
391
|
-
type:
|
|
392
|
-
}, zod_v4_core0.$strip>,
|
|
393
|
-
type:
|
|
394
|
-
dateFormat:
|
|
395
|
-
}, zod_v4_core0.$strip>,
|
|
396
|
-
type:
|
|
397
|
-
options:
|
|
398
|
-
id:
|
|
399
|
-
value:
|
|
400
|
-
color:
|
|
482
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
483
|
+
type: zod.ZodLiteral<"boolean">;
|
|
484
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
485
|
+
type: zod.ZodLiteral<"date">;
|
|
486
|
+
dateFormat: zod.ZodOptional<zod.ZodString>;
|
|
487
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
488
|
+
type: zod.ZodLiteral<"select">;
|
|
489
|
+
options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
490
|
+
id: zod.ZodString;
|
|
491
|
+
value: zod.ZodString;
|
|
492
|
+
color: zod.ZodString;
|
|
401
493
|
}, zod_v4_core0.$strip>>>;
|
|
402
494
|
}, zod_v4_core0.$strip>], "type">;
|
|
403
|
-
position:
|
|
495
|
+
position: zod.ZodOptional<zod.ZodNumber>;
|
|
404
496
|
}, zod_v4_core0.$strict>;
|
|
405
|
-
}, zod_v4_core0.$strip>,
|
|
406
|
-
txid:
|
|
497
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
498
|
+
txid: zod.ZodNumber;
|
|
407
499
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
408
|
-
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
409
|
-
columnId:
|
|
410
|
-
data:
|
|
411
|
-
name:
|
|
412
|
-
config:
|
|
413
|
-
type:
|
|
414
|
-
}, zod_v4_core0.$strip>,
|
|
415
|
-
type:
|
|
416
|
-
decimal:
|
|
417
|
-
format:
|
|
500
|
+
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
501
|
+
columnId: zod.ZodUUID;
|
|
502
|
+
data: zod.ZodObject<{
|
|
503
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
504
|
+
config: zod.ZodOptional<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
505
|
+
type: zod.ZodLiteral<"string">;
|
|
506
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
507
|
+
type: zod.ZodLiteral<"number">;
|
|
508
|
+
decimal: zod.ZodDefault<zod.ZodNumber>;
|
|
509
|
+
format: zod.ZodDefault<zod.ZodEnum<{
|
|
418
510
|
number: "number";
|
|
419
511
|
currency: "currency";
|
|
420
512
|
percent: "percent";
|
|
421
513
|
}>>;
|
|
422
|
-
}, zod_v4_core0.$strip>,
|
|
423
|
-
type:
|
|
424
|
-
}, zod_v4_core0.$strip>,
|
|
425
|
-
type:
|
|
426
|
-
dateFormat:
|
|
427
|
-
}, zod_v4_core0.$strip>,
|
|
428
|
-
type:
|
|
429
|
-
options:
|
|
430
|
-
id:
|
|
431
|
-
value:
|
|
432
|
-
color:
|
|
514
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
515
|
+
type: zod.ZodLiteral<"boolean">;
|
|
516
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
517
|
+
type: zod.ZodLiteral<"date">;
|
|
518
|
+
dateFormat: zod.ZodOptional<zod.ZodString>;
|
|
519
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
520
|
+
type: zod.ZodLiteral<"select">;
|
|
521
|
+
options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
|
|
522
|
+
id: zod.ZodString;
|
|
523
|
+
value: zod.ZodString;
|
|
524
|
+
color: zod.ZodString;
|
|
433
525
|
}, zod_v4_core0.$strip>>>;
|
|
434
526
|
}, zod_v4_core0.$strip>], "type">>;
|
|
435
|
-
width:
|
|
527
|
+
width: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
|
|
436
528
|
}, zod_v4_core0.$strict>;
|
|
437
|
-
}, zod_v4_core0.$strip>,
|
|
438
|
-
txid:
|
|
529
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
530
|
+
txid: zod.ZodNumber;
|
|
439
531
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
440
|
-
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
441
|
-
columnId:
|
|
442
|
-
}, zod_v4_core0.$strip>,
|
|
443
|
-
txid:
|
|
532
|
+
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
533
|
+
columnId: zod.ZodUUID;
|
|
534
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
535
|
+
txid: zod.ZodNumber;
|
|
444
536
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
445
537
|
};
|
|
446
538
|
row: {
|
|
447
|
-
add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
448
|
-
tableId:
|
|
449
|
-
data:
|
|
450
|
-
id:
|
|
451
|
-
cells:
|
|
452
|
-
position:
|
|
539
|
+
add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
540
|
+
tableId: zod.ZodUUID;
|
|
541
|
+
data: zod.ZodObject<{
|
|
542
|
+
id: zod.ZodOptional<zod.ZodUUID>;
|
|
543
|
+
cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
544
|
+
position: zod.ZodOptional<zod.ZodNumber>;
|
|
453
545
|
}, zod_v4_core0.$strict>;
|
|
454
|
-
}, zod_v4_core0.$strip>,
|
|
455
|
-
txid:
|
|
546
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
547
|
+
txid: zod.ZodNumber;
|
|
456
548
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
457
|
-
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<
|
|
458
|
-
rowId:
|
|
459
|
-
data:
|
|
460
|
-
cells:
|
|
461
|
-
position:
|
|
549
|
+
update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
550
|
+
rowId: zod.ZodUUID;
|
|
551
|
+
data: zod.ZodObject<{
|
|
552
|
+
cells: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
553
|
+
position: zod.ZodOptional<zod.ZodNumber>;
|
|
462
554
|
}, zod_v4_core0.$strict>;
|
|
463
|
-
}, zod_v4_core0.$strip>,
|
|
464
|
-
id:
|
|
465
|
-
tableId:
|
|
466
|
-
cells:
|
|
467
|
-
position:
|
|
468
|
-
createdAt:
|
|
469
|
-
updatedAt:
|
|
470
|
-
txid:
|
|
471
|
-
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
472
|
-
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
|
|
473
|
-
rowId: z$1.ZodUUID;
|
|
474
|
-
}, zod_v4_core0.$strip>, z$1.ZodObject<{
|
|
475
|
-
txid: z$1.ZodNumber;
|
|
476
|
-
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
477
|
-
};
|
|
478
|
-
echo: {
|
|
479
|
-
once: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
|
|
480
|
-
message: z$1.ZodString;
|
|
481
|
-
}, zod_v4_core0.$strip>, z$1.ZodObject<{
|
|
482
|
-
echoedMessage: z$1.ZodString;
|
|
555
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
556
|
+
id: zod.ZodUUID;
|
|
557
|
+
tableId: zod.ZodUUID;
|
|
558
|
+
cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
559
|
+
position: zod.ZodNullable<zod.ZodNumber>;
|
|
560
|
+
createdAt: zod.ZodDate;
|
|
561
|
+
updatedAt: zod.ZodDate;
|
|
562
|
+
txid: zod.ZodNumber;
|
|
483
563
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}, zod_v4_core0.$strip>,
|
|
487
|
-
|
|
564
|
+
delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
|
|
565
|
+
rowId: zod.ZodUUID;
|
|
566
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
567
|
+
txid: zod.ZodNumber;
|
|
488
568
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
489
569
|
};
|
|
490
570
|
};
|
|
491
571
|
type ORPCRouterClient = ContractRouterClient<typeof contract>;
|
|
492
572
|
//#endregion
|
|
493
|
-
export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema,
|
|
573
|
+
export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInput, CustomTableCreateInputSchema, CustomTableCreateOutput, CustomTableCreateOutputSchema, CustomTableDeleteInput, CustomTableDeleteInputSchema, CustomTableDeleteOutput, CustomTableDeleteOutputSchema, CustomTableGetInput, CustomTableGetInputSchema, CustomTableGetOutput, CustomTableGetOutputSchema, CustomTableGetSchemaInput, CustomTableGetSchemaInputSchema, CustomTableGetSchemaOutput, CustomTableGetSchemaOutputSchema, CustomTableListInput, CustomTableListInputSchema, CustomTableListItem, CustomTableListItemSchema, CustomTableListOutput, CustomTableListOutputSchema, CustomTableUpdateInput, CustomTableUpdateInputSchema, CustomTableUpdateOutput, CustomTableUpdateOutputSchema, ORPCRouterClient, RowAddInput, RowAddInputSchema, RowAddOutput, RowAddOutputSchema, RowDeleteInput, RowDeleteInputSchema, RowDeleteOutput, RowDeleteOutputSchema, RowUpdateInput, RowUpdateInputSchema, RowUpdateOutput, RowUpdateOutputSchema, TableColumn, TableColumnSchema, TableRow, TableRowSchema, TableView, TableViewSchema, contract };
|
|
574
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { COLUMN_MAX_WIDTH, COLUMN_MIN_WIDTH, columnConfigSchema } from "@read-frog/definitions";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/schemas/column.ts
|
|
6
|
+
const ColumnAddInputSchema = z.object({
|
|
7
|
+
tableId: z.uuid(),
|
|
8
|
+
data: z.object({
|
|
9
|
+
id: z.uuid().optional(),
|
|
10
|
+
name: z.string().min(1),
|
|
11
|
+
config: columnConfigSchema,
|
|
12
|
+
position: z.number().int().optional()
|
|
13
|
+
}).strict()
|
|
14
|
+
});
|
|
15
|
+
const ColumnAddOutputSchema = z.object({ txid: z.number() });
|
|
16
|
+
const ColumnUpdateInputSchema = z.object({
|
|
17
|
+
columnId: z.uuid(),
|
|
18
|
+
data: z.object({
|
|
19
|
+
name: z.string().min(1).optional(),
|
|
20
|
+
config: columnConfigSchema.optional(),
|
|
21
|
+
width: z.number().int().min(COLUMN_MIN_WIDTH).max(COLUMN_MAX_WIDTH).nullable().optional()
|
|
22
|
+
}).strict()
|
|
23
|
+
});
|
|
24
|
+
const ColumnUpdateOutputSchema = z.object({ txid: z.number() });
|
|
25
|
+
const ColumnDeleteInputSchema = z.object({ columnId: z.uuid() });
|
|
26
|
+
const ColumnDeleteOutputSchema = z.object({ txid: z.number() });
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/contracts/column.ts
|
|
30
|
+
const columnContract = {
|
|
31
|
+
add: oc.route({
|
|
32
|
+
method: "POST",
|
|
33
|
+
path: "/columns",
|
|
34
|
+
summary: "Add column to table",
|
|
35
|
+
tags: ["Columns"]
|
|
36
|
+
}).input(ColumnAddInputSchema).output(ColumnAddOutputSchema),
|
|
37
|
+
update: oc.route({
|
|
38
|
+
method: "PATCH",
|
|
39
|
+
path: "/columns/{columnId}",
|
|
40
|
+
summary: "Update column name",
|
|
41
|
+
tags: ["Columns"]
|
|
42
|
+
}).input(ColumnUpdateInputSchema).output(ColumnUpdateOutputSchema),
|
|
43
|
+
delete: oc.route({
|
|
44
|
+
method: "DELETE",
|
|
45
|
+
path: "/columns/{columnId}",
|
|
46
|
+
summary: "Delete column",
|
|
47
|
+
tags: ["Columns"]
|
|
48
|
+
}).input(ColumnDeleteInputSchema).output(ColumnDeleteOutputSchema)
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/schemas/custom-table.ts
|
|
53
|
+
const CustomTableListInputSchema = z.object({});
|
|
54
|
+
const CustomTableListItemSchema = z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string()
|
|
57
|
+
});
|
|
58
|
+
const CustomTableListOutputSchema = z.array(CustomTableListItemSchema);
|
|
59
|
+
const CustomTableCreateInputSchema = z.object({
|
|
60
|
+
id: z.uuid().optional(),
|
|
61
|
+
name: z.string().min(1)
|
|
62
|
+
});
|
|
63
|
+
const CustomTableCreateOutputSchema = z.object({ txid: z.number() });
|
|
64
|
+
const CustomTableUpdateInputSchema = z.object({
|
|
65
|
+
id: z.uuid(),
|
|
66
|
+
name: z.string().min(1).optional()
|
|
67
|
+
});
|
|
68
|
+
const CustomTableUpdateOutputSchema = z.object({ txid: z.number() });
|
|
69
|
+
const CustomTableDeleteInputSchema = z.object({ id: z.uuid() });
|
|
70
|
+
const CustomTableDeleteOutputSchema = z.object({ txid: z.number() });
|
|
71
|
+
const CustomTableGetInputSchema = z.object({ id: z.uuid() });
|
|
72
|
+
const CustomTableGetSchemaInputSchema = z.object({ id: z.uuid() });
|
|
73
|
+
const TableColumnSchema = z.object({
|
|
74
|
+
id: z.string(),
|
|
75
|
+
tableId: z.string(),
|
|
76
|
+
name: z.string(),
|
|
77
|
+
config: columnConfigSchema,
|
|
78
|
+
position: z.number(),
|
|
79
|
+
isPrimary: z.boolean(),
|
|
80
|
+
width: z.number().nullable(),
|
|
81
|
+
createdAt: z.coerce.date(),
|
|
82
|
+
updatedAt: z.coerce.date()
|
|
83
|
+
});
|
|
84
|
+
const TableRowSchema = z.object({
|
|
85
|
+
id: z.string(),
|
|
86
|
+
tableId: z.string(),
|
|
87
|
+
cells: z.record(z.string(), z.unknown()),
|
|
88
|
+
position: z.number().nullable(),
|
|
89
|
+
createdAt: z.coerce.date(),
|
|
90
|
+
updatedAt: z.coerce.date()
|
|
91
|
+
});
|
|
92
|
+
const TableViewSchema = z.object({
|
|
93
|
+
id: z.string(),
|
|
94
|
+
tableId: z.string(),
|
|
95
|
+
name: z.string(),
|
|
96
|
+
type: z.enum([
|
|
97
|
+
"table",
|
|
98
|
+
"kanban",
|
|
99
|
+
"gallery"
|
|
100
|
+
]),
|
|
101
|
+
config: z.record(z.string(), z.unknown()).nullable(),
|
|
102
|
+
filters: z.array(z.unknown()).nullable(),
|
|
103
|
+
sorts: z.array(z.unknown()).nullable(),
|
|
104
|
+
position: z.number(),
|
|
105
|
+
createdAt: z.coerce.date(),
|
|
106
|
+
updatedAt: z.coerce.date()
|
|
107
|
+
});
|
|
108
|
+
const CustomTableGetOutputSchema = z.object({
|
|
109
|
+
id: z.string(),
|
|
110
|
+
userId: z.string(),
|
|
111
|
+
name: z.string(),
|
|
112
|
+
createdAt: z.coerce.date(),
|
|
113
|
+
updatedAt: z.coerce.date(),
|
|
114
|
+
columns: z.array(TableColumnSchema),
|
|
115
|
+
rows: z.array(TableRowSchema),
|
|
116
|
+
views: z.array(TableViewSchema)
|
|
117
|
+
});
|
|
118
|
+
const CustomTableGetSchemaOutputSchema = z.object({
|
|
119
|
+
id: z.string(),
|
|
120
|
+
name: z.string(),
|
|
121
|
+
updatedAt: z.coerce.date(),
|
|
122
|
+
columns: z.array(TableColumnSchema)
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/contracts/custom-table.ts
|
|
127
|
+
const customTableContract = {
|
|
128
|
+
list: oc.route({
|
|
129
|
+
method: "GET",
|
|
130
|
+
path: "/custom-tables",
|
|
131
|
+
summary: "List custom tables",
|
|
132
|
+
tags: ["Custom Tables"]
|
|
133
|
+
}).input(CustomTableListInputSchema).output(CustomTableListOutputSchema),
|
|
134
|
+
get: oc.route({
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "/custom-tables/{id}",
|
|
137
|
+
summary: "Get custom table with columns, rows, and views",
|
|
138
|
+
tags: ["Custom Tables"]
|
|
139
|
+
}).input(CustomTableGetInputSchema).output(CustomTableGetOutputSchema),
|
|
140
|
+
getSchema: oc.route({
|
|
141
|
+
method: "GET",
|
|
142
|
+
path: "/custom-tables/{id}/schema",
|
|
143
|
+
summary: "Get custom table schema",
|
|
144
|
+
tags: ["Custom Tables"]
|
|
145
|
+
}).input(CustomTableGetSchemaInputSchema).output(CustomTableGetSchemaOutputSchema),
|
|
146
|
+
create: oc.route({
|
|
147
|
+
method: "POST",
|
|
148
|
+
path: "/custom-tables",
|
|
149
|
+
summary: "Create custom table",
|
|
150
|
+
tags: ["Custom Tables"]
|
|
151
|
+
}).input(CustomTableCreateInputSchema).output(CustomTableCreateOutputSchema),
|
|
152
|
+
update: oc.route({
|
|
153
|
+
method: "PUT",
|
|
154
|
+
path: "/custom-tables/{id}",
|
|
155
|
+
summary: "Update custom table",
|
|
156
|
+
tags: ["Custom Tables"]
|
|
157
|
+
}).input(CustomTableUpdateInputSchema).output(CustomTableUpdateOutputSchema),
|
|
158
|
+
delete: oc.route({
|
|
159
|
+
method: "DELETE",
|
|
160
|
+
path: "/custom-tables/{id}",
|
|
161
|
+
summary: "Delete custom table",
|
|
162
|
+
tags: ["Custom Tables"]
|
|
163
|
+
}).input(CustomTableDeleteInputSchema).output(CustomTableDeleteOutputSchema)
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/schemas/row.ts
|
|
168
|
+
const RowAddInputSchema = z.object({
|
|
169
|
+
tableId: z.uuid(),
|
|
170
|
+
data: z.object({
|
|
171
|
+
id: z.uuid().optional(),
|
|
172
|
+
cells: z.record(z.string(), z.unknown()),
|
|
173
|
+
position: z.number().int().optional()
|
|
174
|
+
}).strict()
|
|
175
|
+
});
|
|
176
|
+
const RowAddOutputSchema = z.object({ txid: z.number() });
|
|
177
|
+
const RowUpdateInputSchema = z.object({
|
|
178
|
+
rowId: z.uuid(),
|
|
179
|
+
data: z.object({
|
|
180
|
+
cells: z.record(z.string(), z.unknown()).optional(),
|
|
181
|
+
position: z.number().int().optional()
|
|
182
|
+
}).strict()
|
|
183
|
+
});
|
|
184
|
+
const RowUpdateOutputSchema = z.object({
|
|
185
|
+
id: z.uuid(),
|
|
186
|
+
tableId: z.uuid(),
|
|
187
|
+
cells: z.record(z.string(), z.unknown()),
|
|
188
|
+
position: z.number().int().nullable(),
|
|
189
|
+
createdAt: z.date(),
|
|
190
|
+
updatedAt: z.date(),
|
|
191
|
+
txid: z.number()
|
|
192
|
+
});
|
|
193
|
+
const RowDeleteInputSchema = z.object({ rowId: z.uuid() });
|
|
194
|
+
const RowDeleteOutputSchema = z.object({ txid: z.number() });
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/contracts/row.ts
|
|
198
|
+
const rowContract = {
|
|
199
|
+
add: oc.route({
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: "/rows",
|
|
202
|
+
summary: "Add row to table",
|
|
203
|
+
tags: ["Rows"]
|
|
204
|
+
}).input(RowAddInputSchema).output(RowAddOutputSchema),
|
|
205
|
+
update: oc.route({
|
|
206
|
+
method: "PATCH",
|
|
207
|
+
path: "/rows/{rowId}",
|
|
208
|
+
summary: "Update row cells",
|
|
209
|
+
tags: ["Rows"]
|
|
210
|
+
}).input(RowUpdateInputSchema).output(RowUpdateOutputSchema),
|
|
211
|
+
delete: oc.route({
|
|
212
|
+
method: "DELETE",
|
|
213
|
+
path: "/rows/{rowId}",
|
|
214
|
+
summary: "Delete row",
|
|
215
|
+
tags: ["Rows"]
|
|
216
|
+
}).input(RowDeleteInputSchema).output(RowDeleteOutputSchema)
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/index.ts
|
|
221
|
+
const contract = {
|
|
222
|
+
customTable: customTableContract,
|
|
223
|
+
column: columnContract,
|
|
224
|
+
row: rowContract
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
//#endregion
|
|
228
|
+
export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableGetSchemaInputSchema, CustomTableGetSchemaOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, RowAddInputSchema, RowAddOutputSchema, RowDeleteInputSchema, RowDeleteOutputSchema, RowUpdateInputSchema, RowUpdateOutputSchema, TableColumnSchema, TableRowSchema, TableViewSchema, contract };
|
|
229
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/schemas/column.ts","../src/contracts/column.ts","../src/schemas/custom-table.ts","../src/contracts/custom-table.ts","../src/schemas/row.ts","../src/contracts/row.ts","../src/index.ts"],"sourcesContent":["import { COLUMN_MAX_WIDTH, COLUMN_MIN_WIDTH, columnConfigSchema } from '@read-frog/definitions'\nimport { z } from 'zod'\n\nexport const ColumnAddInputSchema = z.object({\n tableId: z.uuid(),\n data: z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n config: columnConfigSchema,\n position: z.number().int().optional(),\n }).strict(),\n})\n\nexport const ColumnAddOutputSchema = z.object({\n txid: z.number(),\n})\n\nexport const ColumnUpdateInputSchema = z.object({\n columnId: z.uuid(),\n data: z.object({\n name: z.string().min(1).optional(),\n config: columnConfigSchema.optional(),\n width: z.number().int().min(COLUMN_MIN_WIDTH).max(COLUMN_MAX_WIDTH).nullable().optional(),\n }).strict(),\n})\n\nexport const ColumnUpdateOutputSchema = z.object({\n txid: z.number(),\n})\n\nexport const ColumnDeleteInputSchema = z.object({\n columnId: z.uuid(),\n})\n\nexport const ColumnDeleteOutputSchema = z.object({\n txid: z.number(),\n})\n","import { oc } from '@orpc/contract'\nimport {\n ColumnAddInputSchema,\n ColumnAddOutputSchema,\n ColumnDeleteInputSchema,\n ColumnDeleteOutputSchema,\n ColumnUpdateInputSchema,\n ColumnUpdateOutputSchema,\n} from '@/schemas/column'\n\nexport const columnContract = {\n add: oc\n .route({\n method: 'POST',\n path: '/columns',\n summary: 'Add column to table',\n tags: ['Columns'],\n })\n .input(ColumnAddInputSchema)\n .output(ColumnAddOutputSchema),\n\n update: oc\n .route({\n method: 'PATCH',\n path: '/columns/{columnId}',\n summary: 'Update column name',\n tags: ['Columns'],\n })\n .input(ColumnUpdateInputSchema)\n .output(ColumnUpdateOutputSchema),\n\n delete: oc\n .route({\n method: 'DELETE',\n path: '/columns/{columnId}',\n summary: 'Delete column',\n tags: ['Columns'],\n })\n .input(ColumnDeleteInputSchema)\n .output(ColumnDeleteOutputSchema),\n}\n","import { columnConfigSchema } from '@read-frog/definitions'\nimport { z } from 'zod'\n\nexport const CustomTableListInputSchema = z.object({})\nexport type CustomTableListInput = z.infer<typeof CustomTableListInputSchema>\n\nexport const CustomTableListItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n})\nexport type CustomTableListItem = z.infer<typeof CustomTableListItemSchema>\n\nexport const CustomTableListOutputSchema = z.array(CustomTableListItemSchema)\nexport type CustomTableListOutput = z.infer<typeof CustomTableListOutputSchema>\n\nexport const CustomTableCreateInputSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n})\nexport type CustomTableCreateInput = z.infer<typeof CustomTableCreateInputSchema>\n\nexport const CustomTableCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type CustomTableCreateOutput = z.infer<typeof CustomTableCreateOutputSchema>\n\nexport const CustomTableUpdateInputSchema = z.object({\n id: z.uuid(),\n name: z.string().min(1).optional(),\n})\nexport type CustomTableUpdateInput = z.infer<typeof CustomTableUpdateInputSchema>\n\nexport const CustomTableUpdateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type CustomTableUpdateOutput = z.infer<typeof CustomTableUpdateOutputSchema>\n\nexport const CustomTableDeleteInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CustomTableDeleteInput = z.infer<typeof CustomTableDeleteInputSchema>\n\nexport const CustomTableDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type CustomTableDeleteOutput = z.infer<typeof CustomTableDeleteOutputSchema>\n\n// Get endpoint schemas\nexport const CustomTableGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CustomTableGetInput = z.infer<typeof CustomTableGetInputSchema>\n\nexport const CustomTableGetSchemaInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CustomTableGetSchemaInput = z.infer<typeof CustomTableGetSchemaInputSchema>\n\nexport const TableColumnSchema = z.object({\n id: z.string(),\n tableId: z.string(),\n name: z.string(),\n config: columnConfigSchema,\n position: z.number(),\n isPrimary: z.boolean(),\n width: z.number().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type TableColumn = z.infer<typeof TableColumnSchema>\n\nexport const TableRowSchema = z.object({\n id: z.string(),\n tableId: z.string(),\n cells: z.record(z.string(), z.unknown()),\n position: z.number().nullable(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type TableRow = z.infer<typeof TableRowSchema>\n\nexport const TableViewSchema = z.object({\n id: z.string(),\n tableId: z.string(),\n name: z.string(),\n type: z.enum(['table', 'kanban', 'gallery']),\n config: z.record(z.string(), z.unknown()).nullable(),\n filters: z.array(z.unknown()).nullable(),\n sorts: z.array(z.unknown()).nullable(),\n position: z.number(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type TableView = z.infer<typeof TableViewSchema>\n\nexport const CustomTableGetOutputSchema = z.object({\n id: z.string(),\n userId: z.string(),\n name: z.string(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n columns: z.array(TableColumnSchema),\n rows: z.array(TableRowSchema),\n views: z.array(TableViewSchema),\n})\nexport type CustomTableGetOutput = z.infer<typeof CustomTableGetOutputSchema>\n\nexport const CustomTableGetSchemaOutputSchema = z.object({\n id: z.string(),\n name: z.string(),\n updatedAt: z.coerce.date(),\n columns: z.array(TableColumnSchema),\n})\nexport type CustomTableGetSchemaOutput = z.infer<typeof CustomTableGetSchemaOutputSchema>\n","import { oc } from '@orpc/contract'\nimport {\n CustomTableCreateInputSchema,\n CustomTableCreateOutputSchema,\n CustomTableDeleteInputSchema,\n CustomTableDeleteOutputSchema,\n CustomTableGetInputSchema,\n CustomTableGetOutputSchema,\n CustomTableGetSchemaInputSchema,\n CustomTableGetSchemaOutputSchema,\n CustomTableListInputSchema,\n CustomTableListOutputSchema,\n CustomTableUpdateInputSchema,\n CustomTableUpdateOutputSchema,\n} from '@/schemas/custom-table'\n\nexport const customTableContract = {\n list: oc\n .route({\n method: 'GET',\n path: '/custom-tables',\n summary: 'List custom tables',\n tags: ['Custom Tables'],\n })\n .input(CustomTableListInputSchema)\n .output(CustomTableListOutputSchema),\n\n get: oc\n .route({\n method: 'GET',\n path: '/custom-tables/{id}',\n summary: 'Get custom table with columns, rows, and views',\n tags: ['Custom Tables'],\n })\n .input(CustomTableGetInputSchema)\n .output(CustomTableGetOutputSchema),\n\n getSchema: oc\n .route({\n method: 'GET',\n path: '/custom-tables/{id}/schema',\n summary: 'Get custom table schema',\n tags: ['Custom Tables'],\n })\n .input(CustomTableGetSchemaInputSchema)\n .output(CustomTableGetSchemaOutputSchema),\n\n create: oc\n .route({\n method: 'POST',\n path: '/custom-tables',\n summary: 'Create custom table',\n tags: ['Custom Tables'],\n })\n .input(CustomTableCreateInputSchema)\n .output(CustomTableCreateOutputSchema),\n\n update: oc\n .route({\n method: 'PUT',\n path: '/custom-tables/{id}',\n summary: 'Update custom table',\n tags: ['Custom Tables'],\n })\n .input(CustomTableUpdateInputSchema)\n .output(CustomTableUpdateOutputSchema),\n\n delete: oc\n .route({\n method: 'DELETE',\n path: '/custom-tables/{id}',\n summary: 'Delete custom table',\n tags: ['Custom Tables'],\n })\n .input(CustomTableDeleteInputSchema)\n .output(CustomTableDeleteOutputSchema),\n}\n","import { z } from 'zod'\n\nexport const RowAddInputSchema = z.object({\n tableId: z.uuid(),\n data: z.object({\n id: z.uuid().optional(),\n cells: z.record(z.string(), z.unknown()),\n position: z.number().int().optional(),\n }).strict(),\n})\nexport type RowAddInput = z.infer<typeof RowAddInputSchema>\n\nexport const RowAddOutputSchema = z.object({\n txid: z.number(),\n})\nexport type RowAddOutput = z.infer<typeof RowAddOutputSchema>\n\nexport const RowUpdateInputSchema = z.object({\n rowId: z.uuid(),\n data: z.object({\n cells: z.record(z.string(), z.unknown()).optional(),\n position: z.number().int().optional(),\n }).strict(),\n})\nexport type RowUpdateInput = z.infer<typeof RowUpdateInputSchema>\n\nexport const RowUpdateOutputSchema = z.object({\n id: z.uuid(),\n tableId: z.uuid(),\n cells: z.record(z.string(), z.unknown()),\n position: z.number().int().nullable(),\n createdAt: z.date(),\n updatedAt: z.date(),\n txid: z.number(),\n})\nexport type RowUpdateOutput = z.infer<typeof RowUpdateOutputSchema>\n\nexport const RowDeleteInputSchema = z.object({\n rowId: z.uuid(),\n})\nexport type RowDeleteInput = z.infer<typeof RowDeleteInputSchema>\n\nexport const RowDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type RowDeleteOutput = z.infer<typeof RowDeleteOutputSchema>\n","import { oc } from '@orpc/contract'\nimport {\n RowAddInputSchema,\n RowAddOutputSchema,\n RowDeleteInputSchema,\n RowDeleteOutputSchema,\n RowUpdateInputSchema,\n RowUpdateOutputSchema,\n} from '@/schemas/row'\n\nexport const rowContract = {\n add: oc\n .route({\n method: 'POST',\n path: '/rows',\n summary: 'Add row to table',\n tags: ['Rows'],\n })\n .input(RowAddInputSchema)\n .output(RowAddOutputSchema),\n\n update: oc\n .route({\n method: 'PATCH',\n path: '/rows/{rowId}',\n summary: 'Update row cells',\n tags: ['Rows'],\n })\n .input(RowUpdateInputSchema)\n .output(RowUpdateOutputSchema),\n\n delete: oc\n .route({\n method: 'DELETE',\n path: '/rows/{rowId}',\n summary: 'Delete row',\n tags: ['Rows'],\n })\n .input(RowDeleteInputSchema)\n .output(RowDeleteOutputSchema),\n}\n","import type { ContractRouterClient } from '@orpc/contract'\nimport { columnContract } from './contracts/column'\nimport { customTableContract } from './contracts/custom-table'\nimport { rowContract } from './contracts/row'\n\nexport const contract = {\n customTable: customTableContract,\n column: columnContract,\n row: rowContract,\n}\n\nexport type ORPCRouterClient = ContractRouterClient<typeof contract>\n\n// Re-export schemas for convenience\nexport * from './schemas/column'\nexport * from './schemas/custom-table'\nexport * from './schemas/row'\n"],"mappings":";;;;;AAGA,MAAa,uBAAuB,EAAE,OAAO;CAC3C,SAAS,EAAE,MAAM;CACjB,MAAM,EAAE,OAAO;EACb,IAAI,EAAE,MAAM,CAAC,UAAU;EACvB,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;EACvB,QAAQ;EACR,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACtC,CAAC,CAAC,QAAQ;CACZ,CAAC;AAEF,MAAa,wBAAwB,EAAE,OAAO,EAC5C,MAAM,EAAE,QAAQ,EACjB,CAAC;AAEF,MAAa,0BAA0B,EAAE,OAAO;CAC9C,UAAU,EAAE,MAAM;CAClB,MAAM,EAAE,OAAO;EACb,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;EAClC,QAAQ,mBAAmB,UAAU;EACrC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,UAAU,CAAC,UAAU;EAC1F,CAAC,CAA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AQ,GACL,MAAM;EACL,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAM,CAAC,OAAO;EACf,CAAC,CACD,MAAM,qBAAqB,CAC3B,OAAO,sBAAsB;CAEhC,QAAQ,GACL,MAAM;EACL,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAM,CAAC,OAAO;EACf,CAAC,CACD,MAAM,qBAAqB,CAC3B,OAAO,sBAAsB;CACjC;;;;ACnCD,MAAa,WAAW;CACtB,aAAa;CACb,QAAQ;CACR,KAAK;CACN"}
|
package/package.json
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@read-frog/api-contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
7
|
-
".":
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts"
|
|
10
|
+
}
|
|
8
11
|
},
|
|
9
|
-
"main": "./dist/index.
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
10
14
|
"files": [
|
|
11
15
|
"dist"
|
|
12
16
|
],
|
|
13
17
|
"dependencies": {
|
|
14
|
-
"@orpc/contract": "^1.13.
|
|
18
|
+
"@orpc/contract": "^1.13.5",
|
|
15
19
|
"zod": "^4.3.6",
|
|
16
|
-
"@read-frog/definitions": "0.1.
|
|
20
|
+
"@read-frog/definitions": "0.1.2"
|
|
17
21
|
},
|
|
18
22
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^25.
|
|
23
|
+
"@types/node": "^25.5.0",
|
|
20
24
|
"tsdown": "^0.20.3",
|
|
21
25
|
"@repo/eslint-config": "0.0.0",
|
|
26
|
+
"@repo/tsdown-config": "0.0.0",
|
|
22
27
|
"@repo/typescript-config": "0.0.0"
|
|
23
28
|
},
|
|
24
29
|
"scripts": {
|
|
30
|
+
"build": "tsdown",
|
|
31
|
+
"dev": "tsdown --watch",
|
|
25
32
|
"build:publish": "tsdown",
|
|
26
33
|
"lint": "eslint .",
|
|
27
34
|
"lint:fix": "eslint --fix"
|
|
28
|
-
}
|
|
29
|
-
"types": "./dist/index.d.ts"
|
|
35
|
+
}
|
|
30
36
|
}
|