@read-frog/api-contract 0.2.0 → 0.2.2
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 +36 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -81,40 +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>;
|
|
115
125
|
declare const CustomTableGetSchemaInputSchema: z.ZodObject<{
|
|
116
126
|
id: z.ZodUUID;
|
|
117
127
|
}, z.core.$strip>;
|
|
128
|
+
type CustomTableGetSchemaInput = z.infer<typeof CustomTableGetSchemaInputSchema>;
|
|
118
129
|
declare const TableColumnSchema: z.ZodObject<{
|
|
119
130
|
id: z.ZodString;
|
|
120
131
|
tableId: z.ZodString;
|
|
@@ -148,6 +159,7 @@ declare const TableColumnSchema: z.ZodObject<{
|
|
|
148
159
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
149
160
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
150
161
|
}, z.core.$strip>;
|
|
162
|
+
type TableColumn = z.infer<typeof TableColumnSchema>;
|
|
151
163
|
declare const TableRowSchema: z.ZodObject<{
|
|
152
164
|
id: z.ZodString;
|
|
153
165
|
tableId: z.ZodString;
|
|
@@ -156,6 +168,7 @@ declare const TableRowSchema: z.ZodObject<{
|
|
|
156
168
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
157
169
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
158
170
|
}, z.core.$strip>;
|
|
171
|
+
type TableRow = z.infer<typeof TableRowSchema>;
|
|
159
172
|
declare const TableViewSchema: z.ZodObject<{
|
|
160
173
|
id: z.ZodString;
|
|
161
174
|
tableId: z.ZodString;
|
|
@@ -172,6 +185,7 @@ declare const TableViewSchema: z.ZodObject<{
|
|
|
172
185
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
173
186
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
174
187
|
}, z.core.$strip>;
|
|
188
|
+
type TableView = z.infer<typeof TableViewSchema>;
|
|
175
189
|
declare const CustomTableGetOutputSchema: z.ZodObject<{
|
|
176
190
|
id: z.ZodString;
|
|
177
191
|
userId: z.ZodString;
|
|
@@ -236,6 +250,7 @@ declare const CustomTableGetOutputSchema: z.ZodObject<{
|
|
|
236
250
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
237
251
|
}, z.core.$strip>>;
|
|
238
252
|
}, z.core.$strip>;
|
|
253
|
+
type CustomTableGetOutput = z.infer<typeof CustomTableGetOutputSchema>;
|
|
239
254
|
declare const CustomTableGetSchemaOutputSchema: z.ZodObject<{
|
|
240
255
|
id: z.ZodString;
|
|
241
256
|
name: z.ZodString;
|
|
@@ -274,6 +289,15 @@ declare const CustomTableGetSchemaOutputSchema: z.ZodObject<{
|
|
|
274
289
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
275
290
|
}, z.core.$strip>>;
|
|
276
291
|
}, z.core.$strip>;
|
|
292
|
+
type CustomTableGetSchemaOutput = z.infer<typeof CustomTableGetSchemaOutputSchema>;
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/schemas/notebase-beta.d.ts
|
|
295
|
+
declare const NotebaseBetaStatusInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
296
|
+
type NotebaseBetaStatusInput = z.infer<typeof NotebaseBetaStatusInputSchema>;
|
|
297
|
+
declare const NotebaseBetaStatusOutputSchema: z.ZodObject<{
|
|
298
|
+
allowed: z.ZodBoolean;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
type NotebaseBetaStatusOutput = z.infer<typeof NotebaseBetaStatusOutputSchema>;
|
|
277
301
|
//#endregion
|
|
278
302
|
//#region src/schemas/row.d.ts
|
|
279
303
|
declare const RowAddInputSchema: z.ZodObject<{
|
|
@@ -284,9 +308,11 @@ declare const RowAddInputSchema: z.ZodObject<{
|
|
|
284
308
|
position: z.ZodOptional<z.ZodNumber>;
|
|
285
309
|
}, z.core.$strict>;
|
|
286
310
|
}, z.core.$strip>;
|
|
311
|
+
type RowAddInput = z.infer<typeof RowAddInputSchema>;
|
|
287
312
|
declare const RowAddOutputSchema: z.ZodObject<{
|
|
288
313
|
txid: z.ZodNumber;
|
|
289
314
|
}, z.core.$strip>;
|
|
315
|
+
type RowAddOutput = z.infer<typeof RowAddOutputSchema>;
|
|
290
316
|
declare const RowUpdateInputSchema: z.ZodObject<{
|
|
291
317
|
rowId: z.ZodUUID;
|
|
292
318
|
data: z.ZodObject<{
|
|
@@ -294,6 +320,7 @@ declare const RowUpdateInputSchema: z.ZodObject<{
|
|
|
294
320
|
position: z.ZodOptional<z.ZodNumber>;
|
|
295
321
|
}, z.core.$strict>;
|
|
296
322
|
}, z.core.$strip>;
|
|
323
|
+
type RowUpdateInput = z.infer<typeof RowUpdateInputSchema>;
|
|
297
324
|
declare const RowUpdateOutputSchema: z.ZodObject<{
|
|
298
325
|
id: z.ZodUUID;
|
|
299
326
|
tableId: z.ZodUUID;
|
|
@@ -303,12 +330,15 @@ declare const RowUpdateOutputSchema: z.ZodObject<{
|
|
|
303
330
|
updatedAt: z.ZodDate;
|
|
304
331
|
txid: z.ZodNumber;
|
|
305
332
|
}, z.core.$strip>;
|
|
333
|
+
type RowUpdateOutput = z.infer<typeof RowUpdateOutputSchema>;
|
|
306
334
|
declare const RowDeleteInputSchema: z.ZodObject<{
|
|
307
335
|
rowId: z.ZodUUID;
|
|
308
336
|
}, z.core.$strip>;
|
|
337
|
+
type RowDeleteInput = z.infer<typeof RowDeleteInputSchema>;
|
|
309
338
|
declare const RowDeleteOutputSchema: z.ZodObject<{
|
|
310
339
|
txid: z.ZodNumber;
|
|
311
340
|
}, z.core.$strip>;
|
|
341
|
+
type RowDeleteOutput = z.infer<typeof RowDeleteOutputSchema>;
|
|
312
342
|
//#endregion
|
|
313
343
|
//#region src/index.d.ts
|
|
314
344
|
declare const contract: {
|
|
@@ -545,8 +575,13 @@ declare const contract: {
|
|
|
545
575
|
txid: zod.ZodNumber;
|
|
546
576
|
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
547
577
|
};
|
|
578
|
+
notebaseBeta: {
|
|
579
|
+
status: _orpc_contract0.ContractProcedureBuilderWithInputOutput<zod.ZodObject<{}, zod_v4_core0.$strict>, zod.ZodObject<{
|
|
580
|
+
allowed: zod.ZodBoolean;
|
|
581
|
+
}, zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
582
|
+
};
|
|
548
583
|
};
|
|
549
584
|
type ORPCRouterClient = ContractRouterClient<typeof contract>;
|
|
550
585
|
//#endregion
|
|
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 };
|
|
586
|
+
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, NotebaseBetaStatusInput, NotebaseBetaStatusInputSchema, NotebaseBetaStatusOutput, NotebaseBetaStatusOutputSchema, ORPCRouterClient, RowAddInput, RowAddInputSchema, RowAddOutput, RowAddOutputSchema, RowDeleteInput, RowDeleteInputSchema, RowDeleteOutput, RowDeleteOutputSchema, RowUpdateInput, RowUpdateInputSchema, RowUpdateOutput, RowUpdateOutputSchema, TableColumn, TableColumnSchema, TableRow, TableRowSchema, TableView, TableViewSchema, contract };
|
|
552
587
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -163,6 +163,20 @@ const customTableContract = {
|
|
|
163
163
|
}).input(CustomTableDeleteInputSchema).output(CustomTableDeleteOutputSchema)
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/schemas/notebase-beta.ts
|
|
168
|
+
const NotebaseBetaStatusInputSchema = z.object({}).strict();
|
|
169
|
+
const NotebaseBetaStatusOutputSchema = z.object({ allowed: z.boolean() });
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/contracts/notebase-beta.ts
|
|
173
|
+
const notebaseBetaContract = { status: oc.route({
|
|
174
|
+
method: "GET",
|
|
175
|
+
path: "/notebase-beta/status",
|
|
176
|
+
summary: "Get Notebase beta access status",
|
|
177
|
+
tags: ["Notebase Beta"]
|
|
178
|
+
}).input(NotebaseBetaStatusInputSchema).output(NotebaseBetaStatusOutputSchema) };
|
|
179
|
+
|
|
166
180
|
//#endregion
|
|
167
181
|
//#region src/schemas/row.ts
|
|
168
182
|
const RowAddInputSchema = z.object({
|
|
@@ -221,9 +235,10 @@ const rowContract = {
|
|
|
221
235
|
const contract = {
|
|
222
236
|
customTable: customTableContract,
|
|
223
237
|
column: columnContract,
|
|
224
|
-
row: rowContract
|
|
238
|
+
row: rowContract,
|
|
239
|
+
notebaseBeta: notebaseBetaContract
|
|
225
240
|
};
|
|
226
241
|
|
|
227
242
|
//#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 };
|
|
243
|
+
export { ColumnAddInputSchema, ColumnAddOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableGetSchemaInputSchema, CustomTableGetSchemaOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, NotebaseBetaStatusInputSchema, NotebaseBetaStatusOutputSchema, RowAddInputSchema, RowAddOutputSchema, RowDeleteInputSchema, RowDeleteOutputSchema, RowUpdateInputSchema, RowUpdateOutputSchema, TableColumnSchema, TableRowSchema, TableViewSchema, contract };
|
|
229
244
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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,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,CAAC,QAAQ;CACZ,CAAC;AAEF,MAAa,2BAA2B,EAAE,OAAO,EAC/C,M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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"}
|
|
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/notebase-beta.ts","../src/contracts/notebase-beta.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 NotebaseBetaStatusInputSchema = z.object({}).strict()\nexport type NotebaseBetaStatusInput = z.infer<typeof NotebaseBetaStatusInputSchema>\n\nexport const NotebaseBetaStatusOutputSchema = z.object({\n allowed: z.boolean(),\n})\nexport type NotebaseBetaStatusOutput = z.infer<typeof NotebaseBetaStatusOutputSchema>\n","import { oc } from '@orpc/contract'\nimport {\n NotebaseBetaStatusInputSchema,\n NotebaseBetaStatusOutputSchema,\n} from '@/schemas/notebase-beta'\n\nexport const notebaseBetaContract = {\n status: oc\n .route({\n method: 'GET',\n path: '/notebase-beta/status',\n summary: 'Get Notebase beta access status',\n tags: ['Notebase Beta'],\n })\n .input(NotebaseBetaStatusInputSchema)\n .output(NotebaseBetaStatusOutputSchema),\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 { notebaseBetaContract } from './contracts/notebase-beta'\nimport { rowContract } from './contracts/row'\n\nexport const contract = {\n customTable: customTableContract,\n column: columnContract,\n row: rowContract,\n notebaseBeta: notebaseBetaContract,\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/notebase-beta'\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,QAA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