@read-frog/api-contract 0.1.2 → 0.2.0

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 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<{
@@ -112,6 +112,9 @@ declare const CustomTableDeleteOutputSchema: z.ZodObject<{
112
112
  declare const CustomTableGetInputSchema: z.ZodObject<{
113
113
  id: z.ZodUUID;
114
114
  }, z.core.$strip>;
115
+ declare const CustomTableGetSchemaInputSchema: z.ZodObject<{
116
+ id: z.ZodUUID;
117
+ }, z.core.$strip>;
115
118
  declare const TableColumnSchema: z.ZodObject<{
116
119
  id: z.ZodString;
117
120
  tableId: z.ZodString;
@@ -233,17 +236,44 @@ declare const CustomTableGetOutputSchema: z.ZodObject<{
233
236
  updatedAt: z.ZodCoercedDate<unknown>;
234
237
  }, z.core.$strip>>;
235
238
  }, z.core.$strip>;
236
- //#endregion
237
- //#region src/schemas/echo.d.ts
238
- declare const EchoInputSchema: z$1.ZodObject<{
239
- message: z$1.ZodString;
240
- }, z$1.core.$strip>;
241
- declare const EchoOutputSchema: z$1.ZodObject<{
242
- echoedMessage: z$1.ZodString;
243
- }, z$1.core.$strip>;
244
- declare const EchoTwiceOutputSchema: z$1.ZodObject<{
245
- echoedTwiceMessage: z$1.ZodString;
246
- }, z$1.core.$strip>;
239
+ declare const CustomTableGetSchemaOutputSchema: z.ZodObject<{
240
+ id: z.ZodString;
241
+ name: z.ZodString;
242
+ updatedAt: z.ZodCoercedDate<unknown>;
243
+ columns: z.ZodArray<z.ZodObject<{
244
+ id: z.ZodString;
245
+ tableId: z.ZodString;
246
+ name: z.ZodString;
247
+ config: z.ZodDiscriminatedUnion<[z.ZodObject<{
248
+ type: z.ZodLiteral<"string">;
249
+ }, z.core.$strip>, z.ZodObject<{
250
+ type: z.ZodLiteral<"number">;
251
+ decimal: z.ZodDefault<z.ZodNumber>;
252
+ format: z.ZodDefault<z.ZodEnum<{
253
+ number: "number";
254
+ currency: "currency";
255
+ percent: "percent";
256
+ }>>;
257
+ }, z.core.$strip>, z.ZodObject<{
258
+ type: z.ZodLiteral<"boolean">;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ type: z.ZodLiteral<"date">;
261
+ dateFormat: z.ZodOptional<z.ZodString>;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ type: z.ZodLiteral<"select">;
264
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
265
+ id: z.ZodString;
266
+ value: z.ZodString;
267
+ color: z.ZodString;
268
+ }, z.core.$strip>>>;
269
+ }, z.core.$strip>], "type">;
270
+ position: z.ZodNumber;
271
+ isPrimary: z.ZodBoolean;
272
+ width: z.ZodNullable<z.ZodNumber>;
273
+ createdAt: z.ZodCoercedDate<unknown>;
274
+ updatedAt: z.ZodCoercedDate<unknown>;
275
+ }, z.core.$strip>>;
276
+ }, z.core.$strip>;
247
277
  //#endregion
248
278
  //#region src/schemas/row.d.ts
249
279
  declare const RowAddInputSchema: z.ZodObject<{
@@ -283,211 +313,240 @@ declare const RowDeleteOutputSchema: z.ZodObject<{
283
313
  //#region src/index.d.ts
284
314
  declare const contract: {
285
315
  customTable: {
286
- list: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{}, zod_v4_core0.$strip>, z$1.ZodArray<z$1.ZodObject<{
287
- id: z$1.ZodString;
288
- name: z$1.ZodString;
316
+ list: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{}, zod_v4_core0.$strip>, zod.ZodArray<zod.ZodObject<{
317
+ id: zod.ZodString;
318
+ name: zod.ZodString;
289
319
  }, zod_v4_core0.$strip>>, Record<never, never>, Record<never, never>>;
290
- get: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
291
- id: z$1.ZodUUID;
292
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
293
- id: z$1.ZodString;
294
- userId: z$1.ZodString;
295
- name: z$1.ZodString;
296
- createdAt: z$1.ZodCoercedDate<unknown>;
297
- updatedAt: z$1.ZodCoercedDate<unknown>;
298
- columns: z$1.ZodArray<z$1.ZodObject<{
299
- id: z$1.ZodString;
300
- tableId: z$1.ZodString;
301
- name: z$1.ZodString;
302
- config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
303
- type: z$1.ZodLiteral<"string">;
304
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
305
- type: z$1.ZodLiteral<"number">;
306
- decimal: z$1.ZodDefault<z$1.ZodNumber>;
307
- format: z$1.ZodDefault<z$1.ZodEnum<{
320
+ get: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
321
+ id: zod.ZodUUID;
322
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
323
+ id: zod.ZodString;
324
+ userId: zod.ZodString;
325
+ name: zod.ZodString;
326
+ createdAt: zod.ZodCoercedDate<unknown>;
327
+ updatedAt: zod.ZodCoercedDate<unknown>;
328
+ columns: zod.ZodArray<zod.ZodObject<{
329
+ id: zod.ZodString;
330
+ tableId: zod.ZodString;
331
+ name: zod.ZodString;
332
+ config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
333
+ type: zod.ZodLiteral<"string">;
334
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
335
+ type: zod.ZodLiteral<"number">;
336
+ decimal: zod.ZodDefault<zod.ZodNumber>;
337
+ format: zod.ZodDefault<zod.ZodEnum<{
308
338
  number: "number";
309
339
  currency: "currency";
310
340
  percent: "percent";
311
341
  }>>;
312
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
313
- type: z$1.ZodLiteral<"boolean">;
314
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
315
- type: z$1.ZodLiteral<"date">;
316
- dateFormat: z$1.ZodOptional<z$1.ZodString>;
317
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
318
- type: z$1.ZodLiteral<"select">;
319
- options: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
320
- id: z$1.ZodString;
321
- value: z$1.ZodString;
322
- color: z$1.ZodString;
342
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
343
+ type: zod.ZodLiteral<"boolean">;
344
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
345
+ type: zod.ZodLiteral<"date">;
346
+ dateFormat: zod.ZodOptional<zod.ZodString>;
347
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
348
+ type: zod.ZodLiteral<"select">;
349
+ options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
350
+ id: zod.ZodString;
351
+ value: zod.ZodString;
352
+ color: zod.ZodString;
323
353
  }, zod_v4_core0.$strip>>>;
324
354
  }, zod_v4_core0.$strip>], "type">;
325
- position: z$1.ZodNumber;
326
- isPrimary: z$1.ZodBoolean;
327
- width: z$1.ZodNullable<z$1.ZodNumber>;
328
- createdAt: z$1.ZodCoercedDate<unknown>;
329
- updatedAt: z$1.ZodCoercedDate<unknown>;
355
+ position: zod.ZodNumber;
356
+ isPrimary: zod.ZodBoolean;
357
+ width: zod.ZodNullable<zod.ZodNumber>;
358
+ createdAt: zod.ZodCoercedDate<unknown>;
359
+ updatedAt: zod.ZodCoercedDate<unknown>;
330
360
  }, zod_v4_core0.$strip>>;
331
- rows: z$1.ZodArray<z$1.ZodObject<{
332
- id: z$1.ZodString;
333
- tableId: z$1.ZodString;
334
- cells: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
335
- position: z$1.ZodNullable<z$1.ZodNumber>;
336
- createdAt: z$1.ZodCoercedDate<unknown>;
337
- updatedAt: z$1.ZodCoercedDate<unknown>;
361
+ rows: zod.ZodArray<zod.ZodObject<{
362
+ id: zod.ZodString;
363
+ tableId: zod.ZodString;
364
+ cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
365
+ position: zod.ZodNullable<zod.ZodNumber>;
366
+ createdAt: zod.ZodCoercedDate<unknown>;
367
+ updatedAt: zod.ZodCoercedDate<unknown>;
338
368
  }, zod_v4_core0.$strip>>;
339
- views: z$1.ZodArray<z$1.ZodObject<{
340
- id: z$1.ZodString;
341
- tableId: z$1.ZodString;
342
- name: z$1.ZodString;
343
- type: z$1.ZodEnum<{
369
+ views: zod.ZodArray<zod.ZodObject<{
370
+ id: zod.ZodString;
371
+ tableId: zod.ZodString;
372
+ name: zod.ZodString;
373
+ type: zod.ZodEnum<{
344
374
  table: "table";
345
375
  kanban: "kanban";
346
376
  gallery: "gallery";
347
377
  }>;
348
- config: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
349
- filters: z$1.ZodNullable<z$1.ZodArray<z$1.ZodUnknown>>;
350
- sorts: z$1.ZodNullable<z$1.ZodArray<z$1.ZodUnknown>>;
351
- position: z$1.ZodNumber;
352
- createdAt: z$1.ZodCoercedDate<unknown>;
353
- updatedAt: z$1.ZodCoercedDate<unknown>;
378
+ config: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
379
+ filters: zod.ZodNullable<zod.ZodArray<zod.ZodUnknown>>;
380
+ sorts: zod.ZodNullable<zod.ZodArray<zod.ZodUnknown>>;
381
+ position: zod.ZodNumber;
382
+ createdAt: zod.ZodCoercedDate<unknown>;
383
+ updatedAt: zod.ZodCoercedDate<unknown>;
354
384
  }, zod_v4_core0.$strip>>;
355
385
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
356
- create: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
357
- id: z$1.ZodOptional<z$1.ZodUUID>;
358
- name: z$1.ZodString;
359
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
360
- txid: z$1.ZodNumber;
386
+ getSchema: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
387
+ id: zod.ZodUUID;
388
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
389
+ id: zod.ZodString;
390
+ name: zod.ZodString;
391
+ updatedAt: zod.ZodCoercedDate<unknown>;
392
+ columns: zod.ZodArray<zod.ZodObject<{
393
+ id: zod.ZodString;
394
+ tableId: zod.ZodString;
395
+ name: zod.ZodString;
396
+ config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
397
+ type: zod.ZodLiteral<"string">;
398
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
399
+ type: zod.ZodLiteral<"number">;
400
+ decimal: zod.ZodDefault<zod.ZodNumber>;
401
+ format: zod.ZodDefault<zod.ZodEnum<{
402
+ number: "number";
403
+ currency: "currency";
404
+ percent: "percent";
405
+ }>>;
406
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
407
+ type: zod.ZodLiteral<"boolean">;
408
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
409
+ type: zod.ZodLiteral<"date">;
410
+ dateFormat: zod.ZodOptional<zod.ZodString>;
411
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
412
+ type: zod.ZodLiteral<"select">;
413
+ options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
414
+ id: zod.ZodString;
415
+ value: zod.ZodString;
416
+ color: zod.ZodString;
417
+ }, zod_v4_core0.$strip>>>;
418
+ }, zod_v4_core0.$strip>], "type">;
419
+ position: zod.ZodNumber;
420
+ isPrimary: zod.ZodBoolean;
421
+ width: zod.ZodNullable<zod.ZodNumber>;
422
+ createdAt: zod.ZodCoercedDate<unknown>;
423
+ updatedAt: zod.ZodCoercedDate<unknown>;
424
+ }, zod_v4_core0.$strip>>;
425
+ }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
426
+ create: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
427
+ id: zod.ZodOptional<zod.ZodUUID>;
428
+ name: zod.ZodString;
429
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
430
+ txid: zod.ZodNumber;
361
431
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
362
- update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
363
- id: z$1.ZodUUID;
364
- name: z$1.ZodOptional<z$1.ZodString>;
365
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
366
- txid: z$1.ZodNumber;
432
+ update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
433
+ id: zod.ZodUUID;
434
+ name: zod.ZodOptional<zod.ZodString>;
435
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
436
+ txid: zod.ZodNumber;
367
437
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
368
- delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
369
- id: z$1.ZodUUID;
370
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
371
- txid: z$1.ZodNumber;
438
+ delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
439
+ id: zod.ZodUUID;
440
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
441
+ txid: zod.ZodNumber;
372
442
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
373
443
  };
374
444
  column: {
375
- add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
376
- tableId: z$1.ZodUUID;
377
- data: z$1.ZodObject<{
378
- id: z$1.ZodOptional<z$1.ZodUUID>;
379
- name: z$1.ZodString;
380
- config: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
381
- type: z$1.ZodLiteral<"string">;
382
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
383
- type: z$1.ZodLiteral<"number">;
384
- decimal: z$1.ZodDefault<z$1.ZodNumber>;
385
- format: z$1.ZodDefault<z$1.ZodEnum<{
445
+ add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
446
+ tableId: zod.ZodUUID;
447
+ data: zod.ZodObject<{
448
+ id: zod.ZodOptional<zod.ZodUUID>;
449
+ name: zod.ZodString;
450
+ config: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
451
+ type: zod.ZodLiteral<"string">;
452
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
453
+ type: zod.ZodLiteral<"number">;
454
+ decimal: zod.ZodDefault<zod.ZodNumber>;
455
+ format: zod.ZodDefault<zod.ZodEnum<{
386
456
  number: "number";
387
457
  currency: "currency";
388
458
  percent: "percent";
389
459
  }>>;
390
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
391
- type: z$1.ZodLiteral<"boolean">;
392
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
393
- type: z$1.ZodLiteral<"date">;
394
- dateFormat: z$1.ZodOptional<z$1.ZodString>;
395
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
396
- type: z$1.ZodLiteral<"select">;
397
- options: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
398
- id: z$1.ZodString;
399
- value: z$1.ZodString;
400
- color: z$1.ZodString;
460
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
461
+ type: zod.ZodLiteral<"boolean">;
462
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
463
+ type: zod.ZodLiteral<"date">;
464
+ dateFormat: zod.ZodOptional<zod.ZodString>;
465
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
466
+ type: zod.ZodLiteral<"select">;
467
+ options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
468
+ id: zod.ZodString;
469
+ value: zod.ZodString;
470
+ color: zod.ZodString;
401
471
  }, zod_v4_core0.$strip>>>;
402
472
  }, zod_v4_core0.$strip>], "type">;
403
- position: z$1.ZodOptional<z$1.ZodNumber>;
473
+ position: zod.ZodOptional<zod.ZodNumber>;
404
474
  }, zod_v4_core0.$strict>;
405
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
406
- txid: z$1.ZodNumber;
475
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
476
+ txid: zod.ZodNumber;
407
477
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
408
- update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
409
- columnId: z$1.ZodUUID;
410
- data: z$1.ZodObject<{
411
- name: z$1.ZodOptional<z$1.ZodString>;
412
- config: z$1.ZodOptional<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
413
- type: z$1.ZodLiteral<"string">;
414
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
415
- type: z$1.ZodLiteral<"number">;
416
- decimal: z$1.ZodDefault<z$1.ZodNumber>;
417
- format: z$1.ZodDefault<z$1.ZodEnum<{
478
+ update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
479
+ columnId: zod.ZodUUID;
480
+ data: zod.ZodObject<{
481
+ name: zod.ZodOptional<zod.ZodString>;
482
+ config: zod.ZodOptional<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
483
+ type: zod.ZodLiteral<"string">;
484
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
485
+ type: zod.ZodLiteral<"number">;
486
+ decimal: zod.ZodDefault<zod.ZodNumber>;
487
+ format: zod.ZodDefault<zod.ZodEnum<{
418
488
  number: "number";
419
489
  currency: "currency";
420
490
  percent: "percent";
421
491
  }>>;
422
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
423
- type: z$1.ZodLiteral<"boolean">;
424
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
425
- type: z$1.ZodLiteral<"date">;
426
- dateFormat: z$1.ZodOptional<z$1.ZodString>;
427
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
428
- type: z$1.ZodLiteral<"select">;
429
- options: z$1.ZodDefault<z$1.ZodArray<z$1.ZodObject<{
430
- id: z$1.ZodString;
431
- value: z$1.ZodString;
432
- color: z$1.ZodString;
492
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
493
+ type: zod.ZodLiteral<"boolean">;
494
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
495
+ type: zod.ZodLiteral<"date">;
496
+ dateFormat: zod.ZodOptional<zod.ZodString>;
497
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
498
+ type: zod.ZodLiteral<"select">;
499
+ options: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
500
+ id: zod.ZodString;
501
+ value: zod.ZodString;
502
+ color: zod.ZodString;
433
503
  }, zod_v4_core0.$strip>>>;
434
504
  }, zod_v4_core0.$strip>], "type">>;
435
- width: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
505
+ width: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
436
506
  }, zod_v4_core0.$strict>;
437
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
438
- txid: z$1.ZodNumber;
507
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
508
+ txid: zod.ZodNumber;
439
509
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
440
- delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
441
- columnId: z$1.ZodUUID;
442
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
443
- txid: z$1.ZodNumber;
510
+ delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
511
+ columnId: zod.ZodUUID;
512
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
513
+ txid: zod.ZodNumber;
444
514
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
445
515
  };
446
516
  row: {
447
- add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
448
- tableId: z$1.ZodUUID;
449
- data: z$1.ZodObject<{
450
- id: z$1.ZodOptional<z$1.ZodUUID>;
451
- cells: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
452
- position: z$1.ZodOptional<z$1.ZodNumber>;
517
+ add: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
518
+ tableId: zod.ZodUUID;
519
+ data: zod.ZodObject<{
520
+ id: zod.ZodOptional<zod.ZodUUID>;
521
+ cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
522
+ position: zod.ZodOptional<zod.ZodNumber>;
453
523
  }, zod_v4_core0.$strict>;
454
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
455
- txid: z$1.ZodNumber;
524
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
525
+ txid: zod.ZodNumber;
456
526
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
457
- update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
458
- rowId: z$1.ZodUUID;
459
- data: z$1.ZodObject<{
460
- cells: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
461
- position: z$1.ZodOptional<z$1.ZodNumber>;
527
+ update: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
528
+ rowId: zod.ZodUUID;
529
+ data: zod.ZodObject<{
530
+ cells: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
531
+ position: zod.ZodOptional<zod.ZodNumber>;
462
532
  }, zod_v4_core0.$strict>;
463
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
464
- id: z$1.ZodUUID;
465
- tableId: z$1.ZodUUID;
466
- cells: z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>;
467
- position: z$1.ZodNullable<z$1.ZodNumber>;
468
- createdAt: z$1.ZodDate;
469
- updatedAt: z$1.ZodDate;
470
- txid: z$1.ZodNumber;
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;
533
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
534
+ id: zod.ZodUUID;
535
+ tableId: zod.ZodUUID;
536
+ cells: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
537
+ position: zod.ZodNullable<zod.ZodNumber>;
538
+ createdAt: zod.ZodDate;
539
+ updatedAt: zod.ZodDate;
540
+ txid: zod.ZodNumber;
483
541
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
484
- twice: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z$1.ZodObject<{
485
- message: z$1.ZodString;
486
- }, zod_v4_core0.$strip>, z$1.ZodObject<{
487
- echoedTwiceMessage: z$1.ZodString;
542
+ delete: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{
543
+ rowId: zod.ZodUUID;
544
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
545
+ txid: zod.ZodNumber;
488
546
  }, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
489
547
  };
490
548
  };
491
549
  type ORPCRouterClient = ContractRouterClient<typeof contract>;
492
550
  //#endregion
493
- export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, EchoInputSchema, EchoOutputSchema, EchoTwiceOutputSchema, ORPCRouterClient, RowAddInputSchema, RowAddOutputSchema, RowDeleteInputSchema, RowDeleteOutputSchema, RowUpdateInputSchema, RowUpdateOutputSchema, TableColumnSchema, TableRowSchema, TableViewSchema, contract };
551
+ export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableGetSchemaInputSchema, CustomTableGetSchemaOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, ORPCRouterClient, RowAddInputSchema, RowAddOutputSchema, RowDeleteInputSchema, RowDeleteOutputSchema, RowUpdateInputSchema, RowUpdateOutputSchema, TableColumnSchema, TableRowSchema, TableViewSchema, contract };
552
+ //# 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({})\n\nexport const CustomTableListItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n})\n\nexport const CustomTableListOutputSchema = z.array(CustomTableListItemSchema)\n\nexport const CustomTableCreateInputSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n})\n\nexport const CustomTableCreateOutputSchema = z.object({\n txid: z.number(),\n})\n\nexport const CustomTableUpdateInputSchema = z.object({\n id: z.uuid(),\n name: z.string().min(1).optional(),\n})\n\nexport const CustomTableUpdateOutputSchema = z.object({\n txid: z.number(),\n})\n\nexport const CustomTableDeleteInputSchema = z.object({\n id: z.uuid(),\n})\n\nexport const CustomTableDeleteOutputSchema = z.object({\n txid: z.number(),\n})\n\n// Get endpoint schemas\nexport const CustomTableGetInputSchema = z.object({\n id: z.uuid(),\n})\n\nexport const CustomTableGetSchemaInputSchema = z.object({\n id: z.uuid(),\n})\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})\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})\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})\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})\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})\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})\n\nexport const RowAddOutputSchema = z.object({\n txid: z.number(),\n})\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})\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})\n\nexport const RowDeleteInputSchema = z.object({\n rowId: z.uuid(),\n})\n\nexport const RowDeleteOutputSchema = z.object({\n txid: z.number(),\n})\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,E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AU,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;CACrC,WAAW,EAAE,MAAM;CACnB,WAAW,EAAE,MAAM;CACnB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAa,uBAAuB,EAAE,OAAO,EAC3C,OAAO,EAAE,MAAM,EAChB,CAAC;AAEF,MAAa,wBAAwB,EAAE,OAAO,EAC5C,MAAM,EAAE,QAAQ,EACjB,CAAC;;;;AC7BF,MAAa,cAAc;CACzB,KAAK,GACF,MAAM;EACL,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAM,CAAC,OAAO;EACf,CAAC,CACD,MAAM,kBAAkB,CACxB,OAAO,mBAAmB;CAE7B,QAAQ,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.2",
4
+ "version": "0.2.0",
5
5
  "private": false,
6
6
  "exports": {
7
- ".": "./dist/index.d.ts"
7
+ ".": {
8
+ "import": "./dist/index.js",
9
+ "types": "./dist/index.d.ts"
10
+ }
8
11
  },
9
- "main": "./dist/index.d.ts",
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.2",
15
- "zod": "^4.3.5",
16
- "@read-frog/definitions": "0.1.0"
18
+ "@orpc/contract": "^1.13.5",
19
+ "zod": "^4.3.6",
20
+ "@read-frog/definitions": "0.1.2"
17
21
  },
18
22
  "devDependencies": {
19
- "@types/node": "^25.0.3",
20
- "tsdown": "^0.18.4",
23
+ "@types/node": "^25.5.0",
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
  }