@read-frog/api-contract 0.4.1 → 0.6.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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { oc } from "@orpc/contract";
2
- import { BETA_FEATURE_KEYS, COLUMN_MAX_WIDTH, COLUMN_MIN_WIDTH, columnConfigSchema } from "@read-frog/definitions";
2
+ import { BETA_FEATURE_KEYS, NOTEBASE_COLUMN_MAX_WIDTH, NOTEBASE_COLUMN_MIN_WIDTH, SRS_REVIEW_DURATION_MS_MAX, cardIdentityShape, cardMemoryStateShape, cardStateSchema, cardStateSchema as cardStateSchema$1, cardTemplateConfigSchema, fsrsReviewLogSnapshotSchema, notebaseColumnConfigSchema, reviewRatingSchema, scheduleStatusSchema, scheduleStatusSchema as scheduleStatusSchema$1, schedulingParamsSchema, schedulingParamsShape, srsStepSchema, srsWeightsSchema } from "@read-frog/definitions";
3
3
  import { z } from "zod";
4
4
  //#region src/schemas/beta-access.ts
5
5
  const BetaFeatureKeySchema = z.enum(BETA_FEATURE_KEYS);
@@ -19,7 +19,7 @@ const betaAccessContract = { status: oc.route({
19
19
  //#endregion
20
20
  //#region src/public-errors.ts
21
21
  const CellValidationFailureReasonSchema = z.enum([
22
- "unknown_column",
22
+ "unknown_notebase_column",
23
23
  "type_mismatch",
24
24
  "invalid_select_option",
25
25
  "invalid_date_format"
@@ -32,29 +32,59 @@ const CellValidationFailureDetailsSchema = z.object({
32
32
  validOptions: z.array(z.string()).optional()
33
33
  }).strict();
34
34
  const CellValidationFailedDataSchema = z.object({
35
- columnId: z.string(),
35
+ notebaseColumnId: z.string(),
36
36
  details: CellValidationFailureDetailsSchema,
37
37
  reason: CellValidationFailureReasonSchema
38
38
  }).strict();
39
+ const CardTemplateInvalidColumnsDataSchema = z.object({ notebaseColumnIds: z.array(z.string()) }).strict();
39
40
  const PUBLIC_APP_ERROR_DEFS = {
40
41
  NOTEBASE_BETA_RESTRICTED: {
41
42
  message: "Notebase is currently in beta for selected accounts",
42
43
  status: 403
43
44
  },
44
- TABLE_NOT_FOUND: {
45
- message: "Table not found",
45
+ NOTEBASE_NOT_FOUND: {
46
+ message: "Notebase not found",
46
47
  status: 404
47
48
  },
48
- COLUMN_NOT_FOUND: {
49
- message: "Column not found",
49
+ NOTEBASE_COLUMN_NOT_FOUND: {
50
+ message: "Notebase column not found",
50
51
  status: 404
51
52
  },
52
- ROW_NOT_FOUND: {
53
- message: "Row not found",
53
+ NOTEBASE_ROW_NOT_FOUND: {
54
+ message: "Notebase row not found",
54
55
  status: 404
55
56
  },
56
- VIEW_NOT_FOUND: {
57
- message: "View not found",
57
+ CARD_NOT_FOUND: {
58
+ message: "Card not found",
59
+ status: 404
60
+ },
61
+ CARD_TEMPLATE_NOT_FOUND: {
62
+ message: "Card template not found",
63
+ status: 404
64
+ },
65
+ CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS: {
66
+ data: CardTemplateInvalidColumnsDataSchema,
67
+ message: "Card template references unknown notebase columns",
68
+ status: 422
69
+ },
70
+ CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE: {
71
+ message: "Notebase column is used by a card template",
72
+ status: 409
73
+ },
74
+ CARD_NOT_REVIEWABLE: {
75
+ message: "Card cannot be reviewed in its current state",
76
+ status: 409
77
+ },
78
+ CARD_REVIEW_STATE_STALE: {
79
+ message: "Card review state is stale",
80
+ status: 409
81
+ },
82
+ CARD_REVIEW_ROLLBACK_UNAVAILABLE: {
83
+ message: "Card review cannot be rolled back",
84
+ status: 409
85
+ },
86
+ NOTEBASE_VIEW_NOT_FOUND: {
87
+ message: "Notebase view not found",
58
88
  status: 404
59
89
  },
60
90
  CELL_VALIDATION_FAILED: {
@@ -62,8 +92,8 @@ const PUBLIC_APP_ERROR_DEFS = {
62
92
  message: "Cell validation failed",
63
93
  status: 422
64
94
  },
65
- PRIMARY_COLUMN_DELETE_NOT_ALLOWED: {
66
- message: "Cannot delete primary column",
95
+ PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED: {
96
+ message: "Cannot delete primary notebase column",
67
97
  status: 400
68
98
  },
69
99
  CONCURRENT_POSITION_CONFLICT: {
@@ -92,162 +122,246 @@ function pickPublicErrorMap(...codes) {
92
122
  }));
93
123
  }
94
124
  //#endregion
95
- //#region src/schemas/column.ts
96
- const columnWidthSchema = z.number().int().min(COLUMN_MIN_WIDTH).max(COLUMN_MAX_WIDTH);
97
- const tableColumnSchema = z.object({
98
- id: z.string(),
99
- tableId: z.string(),
125
+ //#region src/schemas/card.ts
126
+ const cardTemplateSchema = z.object({
127
+ id: z.uuid(),
128
+ notebaseId: z.uuid(),
100
129
  name: z.string(),
101
- config: columnConfigSchema,
102
- position: z.number(),
103
- isPrimary: z.boolean(),
104
- width: z.number().nullable(),
130
+ config: cardTemplateConfigSchema,
105
131
  createdAt: z.coerce.date(),
106
132
  updatedAt: z.coerce.date()
107
133
  });
108
- const columnCreateDataSchema = z.object({
134
+ const CardTemplateListInputSchema = z.object({ notebaseId: z.uuid() });
135
+ const CardTemplateListOutputSchema = z.array(cardTemplateSchema);
136
+ const CardTemplateGetInputSchema = z.object({ id: z.uuid() });
137
+ const CardTemplateGetOutputSchema = cardTemplateSchema;
138
+ const CardTemplateCreateInputSchema = z.object({
109
139
  id: z.uuid().optional(),
140
+ notebaseId: z.uuid(),
110
141
  name: z.string().min(1),
111
- config: columnConfigSchema
142
+ config: cardTemplateConfigSchema
112
143
  }).strict();
113
- const columnUpdateDataSchema = z.object({
144
+ const CardTemplateCreateOutputSchema = cardTemplateSchema.extend({ txid: z.number() });
145
+ const CardTemplateUpdateInputSchema = z.object({
146
+ id: z.uuid(),
114
147
  name: z.string().min(1).optional(),
115
- config: columnConfigSchema.optional(),
116
- width: columnWidthSchema.nullable().optional()
148
+ config: cardTemplateConfigSchema.optional()
117
149
  }).strict();
118
- const ColumnCreateInputSchema = z.object({
119
- tableId: z.uuid(),
120
- data: columnCreateDataSchema
150
+ const CardTemplateUpdateOutputSchema = cardTemplateSchema.extend({ txid: z.number() });
151
+ const CardTemplateDeleteInputSchema = z.object({ id: z.uuid() });
152
+ const CardTemplateDeleteOutputSchema = z.object({ txid: z.number() });
153
+ const cardSchema = z.object({
154
+ ...cardIdentityShape,
155
+ ...cardMemoryStateShape,
156
+ createdAt: z.coerce.date(),
157
+ updatedAt: z.coerce.date()
121
158
  });
122
- const ColumnCreateOutputSchema = z.object({ txid: z.number() });
123
- const ColumnUpdateInputSchema = z.object({
124
- columnId: z.uuid(),
125
- data: columnUpdateDataSchema
159
+ const renderedCardSchema = cardSchema.extend({
160
+ front: z.string(),
161
+ back: z.string()
126
162
  });
127
- const ColumnUpdateOutputSchema = z.object({ txid: z.number() });
128
- const ColumnDeleteInputSchema = z.object({ columnId: z.uuid() });
129
- const ColumnDeleteOutputSchema = z.object({ txid: z.number() });
130
- const ColumnReorderInputSchema = z.object({
131
- tableId: z.uuid(),
132
- ids: z.array(z.uuid())
163
+ const CardListInputSchema = z.object({
164
+ notebaseId: z.uuid(),
165
+ templateId: z.uuid().optional(),
166
+ limit: z.number().int().min(1).max(500).optional(),
167
+ offset: z.number().int().min(0).optional()
168
+ });
169
+ const CardListOutputSchema = z.array(renderedCardSchema);
170
+ const CardGetInputSchema = z.object({ id: z.uuid() });
171
+ const CardGetOutputSchema = renderedCardSchema;
172
+ const CardGenerateInputSchema = z.object({
173
+ notebaseId: z.uuid(),
174
+ templateId: z.uuid().optional()
175
+ });
176
+ const CardGenerateOutputSchema = z.object({
177
+ created: z.number().int().min(0),
178
+ txid: z.number()
133
179
  });
134
- const ColumnReorderOutputSchema = z.object({ txid: z.number() });
135
180
  //#endregion
136
181
  //#region src/contracts/shared.ts
137
182
  const notebaseProcedure = oc.errors(pickPublicErrorMap("NOTEBASE_BETA_RESTRICTED"));
138
183
  //#endregion
139
- //#region src/contracts/column.ts
140
- const columnContract = {
141
- create: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
184
+ //#region src/contracts/card.ts
185
+ const cardContract = {
186
+ list: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
187
+ method: "GET",
188
+ path: "/cards",
189
+ summary: "List rendered cards",
190
+ tags: ["Cards"]
191
+ }).input(CardListInputSchema).output(CardListOutputSchema),
192
+ get: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND")).route({
193
+ method: "GET",
194
+ path: "/cards/{id}",
195
+ summary: "Get rendered card",
196
+ tags: ["Cards"]
197
+ }).input(CardGetInputSchema).output(CardGetOutputSchema),
198
+ generate: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CARD_TEMPLATE_NOT_FOUND")).route({
199
+ method: "POST",
200
+ path: "/cards/generate",
201
+ summary: "Generate missing cards",
202
+ tags: ["Cards"]
203
+ }).input(CardGenerateInputSchema).output(CardGenerateOutputSchema)
204
+ };
205
+ //#endregion
206
+ //#region src/contracts/card-template.ts
207
+ const cardTemplateContract = {
208
+ list: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
209
+ method: "GET",
210
+ path: "/card-templates",
211
+ summary: "List card templates",
212
+ tags: ["Card Templates"]
213
+ }).input(CardTemplateListInputSchema).output(CardTemplateListOutputSchema),
214
+ get: notebaseProcedure.errors(pickPublicErrorMap("CARD_TEMPLATE_NOT_FOUND")).route({
215
+ method: "GET",
216
+ path: "/card-templates/{id}",
217
+ summary: "Get card template",
218
+ tags: ["Card Templates"]
219
+ }).input(CardTemplateGetInputSchema).output(CardTemplateGetOutputSchema),
220
+ create: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS")).route({
142
221
  method: "POST",
143
- path: "/columns",
144
- summary: "Create column",
145
- tags: ["Columns"]
146
- }).input(ColumnCreateInputSchema).output(ColumnCreateOutputSchema),
147
- update: notebaseProcedure.errors(pickPublicErrorMap("COLUMN_NOT_FOUND")).route({
222
+ path: "/card-templates",
223
+ summary: "Create card template",
224
+ tags: ["Card Templates"]
225
+ }).input(CardTemplateCreateInputSchema).output(CardTemplateCreateOutputSchema),
226
+ update: notebaseProcedure.errors(pickPublicErrorMap("CARD_TEMPLATE_NOT_FOUND", "CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS")).route({
148
227
  method: "PATCH",
149
- path: "/columns/{columnId}",
150
- summary: "Update column",
151
- tags: ["Columns"]
152
- }).input(ColumnUpdateInputSchema).output(ColumnUpdateOutputSchema),
153
- delete: notebaseProcedure.errors(pickPublicErrorMap("COLUMN_NOT_FOUND", "PRIMARY_COLUMN_DELETE_NOT_ALLOWED", "CONCURRENT_POSITION_CONFLICT")).route({
228
+ path: "/card-templates/{id}",
229
+ summary: "Update card template",
230
+ tags: ["Card Templates"]
231
+ }).input(CardTemplateUpdateInputSchema).output(CardTemplateUpdateOutputSchema),
232
+ delete: notebaseProcedure.errors(pickPublicErrorMap("CARD_TEMPLATE_NOT_FOUND")).route({
154
233
  method: "DELETE",
155
- path: "/columns/{columnId}",
156
- summary: "Delete column",
157
- tags: ["Columns"]
158
- }).input(ColumnDeleteInputSchema).output(ColumnDeleteOutputSchema),
159
- reorder: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
160
- method: "POST",
161
- path: "/columns/reorder",
162
- summary: "Reorder columns in a table",
163
- tags: ["Columns"]
164
- }).input(ColumnReorderInputSchema).output(ColumnReorderOutputSchema)
234
+ path: "/card-templates/{id}",
235
+ summary: "Delete card template",
236
+ tags: ["Card Templates"]
237
+ }).input(CardTemplateDeleteInputSchema).output(CardTemplateDeleteOutputSchema)
165
238
  };
166
239
  //#endregion
167
- //#region src/schemas/row.ts
168
- const rowCellsSchema = z.record(z.string(), z.unknown());
169
- const tableRowSchema = z.object({
240
+ //#region src/schemas/notebase-column.ts
241
+ const notebaseColumnWidthSchema = z.number().int().min(NOTEBASE_COLUMN_MIN_WIDTH).max(NOTEBASE_COLUMN_MAX_WIDTH);
242
+ const notebaseColumnSchema = z.object({
170
243
  id: z.string(),
171
- tableId: z.string(),
172
- cells: rowCellsSchema,
244
+ notebaseId: z.string(),
245
+ name: z.string(),
246
+ config: notebaseColumnConfigSchema,
173
247
  position: z.number(),
248
+ isPrimary: z.boolean(),
249
+ width: z.number().nullable(),
174
250
  createdAt: z.coerce.date(),
175
251
  updatedAt: z.coerce.date()
176
252
  });
177
- const rowCreateDataSchema = z.object({
253
+ const notebaseColumnCreateDataSchema = z.object({
178
254
  id: z.uuid().optional(),
179
- cells: rowCellsSchema.optional()
255
+ name: z.string().min(1),
256
+ config: notebaseColumnConfigSchema
257
+ }).strict();
258
+ const notebaseColumnUpdateDataSchema = z.object({
259
+ name: z.string().min(1).optional(),
260
+ config: notebaseColumnConfigSchema.optional(),
261
+ width: notebaseColumnWidthSchema.nullable().optional()
180
262
  }).strict();
181
- const rowUpdateDataSchema = z.object({ cells: rowCellsSchema.optional() }).strict();
182
- const RowCreateInputSchema = z.object({
183
- tableId: z.uuid(),
184
- data: rowCreateDataSchema
263
+ const NotebaseColumnCreateInputSchema = z.object({
264
+ notebaseId: z.uuid(),
265
+ data: notebaseColumnCreateDataSchema
266
+ });
267
+ const NotebaseColumnCreateOutputSchema = z.object({ txid: z.number() });
268
+ const NotebaseColumnUpdateInputSchema = z.object({
269
+ notebaseColumnId: z.uuid(),
270
+ data: notebaseColumnUpdateDataSchema
185
271
  });
186
- const RowCreateOutputSchema = z.object({ txid: z.number() });
187
- const RowUpdateInputSchema = z.object({
188
- rowId: z.uuid(),
189
- data: rowUpdateDataSchema
272
+ const NotebaseColumnUpdateOutputSchema = z.object({ txid: z.number() });
273
+ const NotebaseColumnDeleteInputSchema = z.object({ notebaseColumnId: z.uuid() });
274
+ const NotebaseColumnDeleteOutputSchema = z.object({ txid: z.number() });
275
+ const NotebaseColumnReorderInputSchema = z.object({
276
+ notebaseId: z.uuid(),
277
+ ids: z.array(z.uuid())
190
278
  });
191
- const RowUpdateOutputSchema = z.object({
279
+ const NotebaseColumnReorderOutputSchema = z.object({ txid: z.number() });
280
+ //#endregion
281
+ //#region src/schemas/notebase-row.ts
282
+ const notebaseRowCellsSchema = z.record(z.string(), z.unknown());
283
+ const notebaseRowSchema = z.object({
284
+ id: z.string(),
285
+ notebaseId: z.string(),
286
+ cells: notebaseRowCellsSchema,
287
+ position: z.number(),
288
+ createdAt: z.coerce.date(),
289
+ updatedAt: z.coerce.date()
290
+ });
291
+ const notebaseRowCreateDataSchema = z.object({
292
+ id: z.uuid().optional(),
293
+ cells: notebaseRowCellsSchema.optional()
294
+ }).strict();
295
+ const notebaseRowUpdateDataSchema = z.object({ cells: notebaseRowCellsSchema.optional() }).strict();
296
+ const NotebaseRowCreateInputSchema = z.object({
297
+ notebaseId: z.uuid(),
298
+ data: notebaseRowCreateDataSchema
299
+ });
300
+ const NotebaseRowCreateOutputSchema = z.object({ txid: z.number() });
301
+ const NotebaseRowUpdateInputSchema = z.object({
302
+ notebaseRowId: z.uuid(),
303
+ data: notebaseRowUpdateDataSchema
304
+ });
305
+ const NotebaseRowUpdateOutputSchema = z.object({
192
306
  id: z.uuid(),
193
- tableId: z.uuid(),
194
- cells: rowCellsSchema,
307
+ notebaseId: z.uuid(),
308
+ cells: notebaseRowCellsSchema,
195
309
  position: z.number().int(),
196
310
  createdAt: z.date(),
197
311
  updatedAt: z.date(),
198
312
  txid: z.number()
199
313
  });
200
- const RowDeleteInputSchema = z.object({ rowId: z.uuid() });
201
- const RowDeleteOutputSchema = z.object({ txid: z.number() });
202
- const RowReorderInputSchema = z.object({
203
- tableId: z.uuid(),
314
+ const NotebaseRowDeleteInputSchema = z.object({ notebaseRowId: z.uuid() });
315
+ const NotebaseRowDeleteOutputSchema = z.object({ txid: z.number() });
316
+ const NotebaseRowReorderInputSchema = z.object({
317
+ notebaseId: z.uuid(),
204
318
  ids: z.array(z.uuid())
205
319
  });
206
- const RowReorderOutputSchema = z.object({ txid: z.number() });
320
+ const NotebaseRowReorderOutputSchema = z.object({ txid: z.number() });
207
321
  //#endregion
208
- //#region src/schemas/view.ts
209
- const tableViewTypeSchema = z.enum([
322
+ //#region src/schemas/notebase-view.ts
323
+ const notebaseViewTypeSchema = z.enum([
210
324
  "table",
211
325
  "kanban",
212
326
  "gallery"
213
327
  ]);
214
- const viewConfigSchema = z.object({
215
- columnWidths: z.record(z.string(), z.number()).optional(),
216
- hiddenColumns: z.array(z.string()).optional(),
217
- groupByColumnId: z.string().optional()
328
+ const notebaseViewConfigSchema = z.object({
329
+ notebaseColumnWidths: z.record(z.string(), z.number()).optional(),
330
+ hiddenNotebaseColumns: z.array(z.string()).optional(),
331
+ groupByNotebaseColumnId: z.string().optional()
218
332
  }).catchall(z.unknown());
219
- const viewFilterSchema = z.object({
220
- columnId: z.string(),
333
+ const notebaseViewFilterSchema = z.object({
334
+ notebaseColumnId: z.string(),
221
335
  operator: z.string(),
222
336
  value: z.unknown()
223
337
  }).strict();
224
- const viewFiltersSchema = z.array(viewFilterSchema);
225
- const viewSortSchema = z.object({
226
- columnId: z.string(),
338
+ const notebaseViewFiltersSchema = z.array(notebaseViewFilterSchema);
339
+ const notebaseViewSortSchema = z.object({
340
+ notebaseColumnId: z.string(),
227
341
  direction: z.enum(["asc", "desc"])
228
342
  }).strict();
229
- const viewSortsSchema = z.array(viewSortSchema);
230
- const viewCreateDataSchema = z.object({
343
+ const notebaseViewSortsSchema = z.array(notebaseViewSortSchema);
344
+ const notebaseViewCreateDataSchema = z.object({
231
345
  id: z.uuid().optional(),
232
346
  name: z.string().min(1),
233
- type: tableViewTypeSchema,
234
- config: viewConfigSchema.optional(),
235
- filters: viewFiltersSchema.optional(),
236
- sorts: viewSortsSchema.optional()
347
+ type: notebaseViewTypeSchema,
348
+ config: notebaseViewConfigSchema.optional(),
349
+ filters: notebaseViewFiltersSchema.optional(),
350
+ sorts: notebaseViewSortsSchema.optional()
237
351
  }).strict();
238
- const viewUpdateDataSchema = z.object({
352
+ const notebaseViewUpdateDataSchema = z.object({
239
353
  name: z.string().min(1).optional(),
240
- type: tableViewTypeSchema.optional(),
241
- config: viewConfigSchema.optional(),
242
- filters: viewFiltersSchema.optional(),
243
- sorts: viewSortsSchema.optional()
354
+ type: notebaseViewTypeSchema.optional(),
355
+ config: notebaseViewConfigSchema.optional(),
356
+ filters: notebaseViewFiltersSchema.optional(),
357
+ sorts: notebaseViewSortsSchema.optional()
244
358
  }).strict();
245
- const tableViewSchema = z.object({
359
+ const notebaseViewSchema = z.object({
246
360
  id: z.string(),
247
- tableId: z.string(),
361
+ notebaseId: z.string(),
248
362
  name: z.string(),
249
- type: tableViewTypeSchema,
250
- config: viewConfigSchema.nullable(),
363
+ type: notebaseViewTypeSchema,
364
+ config: notebaseViewConfigSchema.nullable(),
251
365
  filters: z.array(z.unknown()).nullable(),
252
366
  sorts: z.array(z.unknown()).nullable(),
253
367
  position: z.number(),
@@ -255,113 +369,283 @@ const tableViewSchema = z.object({
255
369
  updatedAt: z.coerce.date()
256
370
  });
257
371
  //#endregion
258
- //#region src/schemas/custom-table.ts
259
- const CustomTableListInputSchema = z.object({});
260
- const CustomTableListItemSchema = z.object({
372
+ //#region src/schemas/notebase.ts
373
+ const NotebaseListInputSchema = z.object({});
374
+ const NotebaseListItemSchema = z.object({
261
375
  id: z.string(),
262
376
  name: z.string()
263
377
  });
264
- const CustomTableListOutputSchema = z.array(CustomTableListItemSchema);
265
- const customTableCreateDataSchema = z.object({
266
- id: z.uuid().optional(),
267
- name: z.string().min(1)
268
- }).strict();
269
- const CustomTableCreateInputSchema = customTableCreateDataSchema;
270
- const CustomTableCreateOutputSchema = z.object({ txid: z.number() });
271
- const customTableUpdateDataSchema = z.object({ name: z.string().min(1).optional() }).strict();
272
- const CustomTableUpdateInputSchema = customTableUpdateDataSchema.extend({ id: z.uuid() });
273
- const CustomTableUpdateOutputSchema = z.object({ txid: z.number() });
274
- const CustomTableDeleteInputSchema = z.object({ id: z.uuid() });
275
- const CustomTableDeleteOutputSchema = z.object({ txid: z.number() });
276
- const CustomTableGetInputSchema = z.object({ id: z.uuid() });
277
- const CustomTableGetSchemaInputSchema = z.object({ id: z.uuid() });
278
- const CustomTableGetOutputSchema = z.object({
378
+ const NotebaseListOutputSchema = z.array(NotebaseListItemSchema);
379
+ const notebaseSchema = z.object({
279
380
  id: z.string(),
280
381
  userId: z.string(),
281
382
  name: z.string(),
383
+ srsNewPerDay: schedulingParamsShape.newPerDay,
384
+ srsReviewsPerDay: schedulingParamsShape.reviewsPerDay,
385
+ srsDesiredRetention: schedulingParamsShape.desiredRetention,
386
+ srsEnableShortTerm: schedulingParamsShape.enableShortTerm,
387
+ srsMaximumInterval: schedulingParamsShape.maximumInterval,
388
+ srsLearningSteps: schedulingParamsShape.learningSteps,
389
+ srsRelearningSteps: schedulingParamsShape.relearningSteps,
390
+ srsLeechThreshold: schedulingParamsShape.leechThreshold,
391
+ srsEnableFuzz: schedulingParamsShape.enableFuzz,
392
+ srsWeights: srsWeightsSchema.nullable(),
393
+ createdAt: z.date(),
394
+ updatedAt: z.date()
395
+ });
396
+ const notebaseCreateDataSchema = z.object({
397
+ id: z.uuid().optional(),
398
+ name: z.string().min(1)
399
+ }).strict();
400
+ const NotebaseCreateInputSchema = notebaseCreateDataSchema;
401
+ const NotebaseCreateOutputSchema = z.object({ txid: z.number() });
402
+ const notebaseUpdateDataSchema = z.object({ name: z.string().min(1).optional() }).strict();
403
+ const NotebaseUpdateInputSchema = notebaseUpdateDataSchema.extend({ id: z.uuid() });
404
+ const NotebaseUpdateOutputSchema = z.object({ txid: z.number() });
405
+ const NotebaseDeleteInputSchema = z.object({ id: z.uuid() });
406
+ const NotebaseDeleteOutputSchema = z.object({ txid: z.number() });
407
+ const NotebaseGetInputSchema = z.object({ id: z.uuid() });
408
+ const NotebaseGetSchemaInputSchema = z.object({ id: z.uuid() });
409
+ const NotebaseGetOutputSchema = notebaseSchema.extend({
282
410
  createdAt: z.coerce.date(),
283
411
  updatedAt: z.coerce.date(),
284
- columns: z.array(tableColumnSchema),
285
- rows: z.array(tableRowSchema),
286
- views: z.array(tableViewSchema)
412
+ notebaseColumns: z.array(notebaseColumnSchema),
413
+ notebaseRows: z.array(notebaseRowSchema),
414
+ notebaseViews: z.array(notebaseViewSchema)
287
415
  });
288
- const CustomTableGetSchemaOutputSchema = z.object({
416
+ const NotebaseGetSchemaOutputSchema = z.object({
289
417
  id: z.string(),
290
418
  name: z.string(),
291
419
  updatedAt: z.coerce.date(),
292
- columns: z.array(tableColumnSchema)
420
+ notebaseColumns: z.array(notebaseColumnSchema)
293
421
  });
294
422
  //#endregion
423
+ //#region src/contracts/notebase.ts
424
+ const notebaseContract = {
425
+ list: notebaseProcedure.route({
426
+ method: "GET",
427
+ path: "/notebases",
428
+ summary: "List notebases",
429
+ tags: ["Notebases"]
430
+ }).input(NotebaseListInputSchema).output(NotebaseListOutputSchema),
431
+ get: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
432
+ method: "GET",
433
+ path: "/notebases/{id}",
434
+ summary: "Get notebase with notebase columns, rows, and views",
435
+ tags: ["Notebases"]
436
+ }).input(NotebaseGetInputSchema).output(NotebaseGetOutputSchema),
437
+ getSchema: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
438
+ method: "GET",
439
+ path: "/notebases/{id}/schema",
440
+ summary: "Get notebase schema",
441
+ tags: ["Notebases"]
442
+ }).input(NotebaseGetSchemaInputSchema).output(NotebaseGetSchemaOutputSchema),
443
+ create: notebaseProcedure.route({
444
+ method: "POST",
445
+ path: "/notebases",
446
+ summary: "Create notebase",
447
+ tags: ["Notebases"]
448
+ }).input(NotebaseCreateInputSchema).output(NotebaseCreateOutputSchema),
449
+ update: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
450
+ method: "PUT",
451
+ path: "/notebases/{id}",
452
+ summary: "Update notebase",
453
+ tags: ["Notebases"]
454
+ }).input(NotebaseUpdateInputSchema).output(NotebaseUpdateOutputSchema),
455
+ delete: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
456
+ method: "DELETE",
457
+ path: "/notebases/{id}",
458
+ summary: "Delete notebase",
459
+ tags: ["Notebases"]
460
+ }).input(NotebaseDeleteInputSchema).output(NotebaseDeleteOutputSchema)
461
+ };
462
+ //#endregion
463
+ //#region src/contracts/notebase-column.ts
464
+ const notebaseColumnContract = {
465
+ create: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
466
+ method: "POST",
467
+ path: "/notebase-columns",
468
+ summary: "Create notebase column",
469
+ tags: ["Notebase Columns"]
470
+ }).input(NotebaseColumnCreateInputSchema).output(NotebaseColumnCreateOutputSchema),
471
+ update: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_COLUMN_NOT_FOUND")).route({
472
+ method: "PATCH",
473
+ path: "/notebase-columns/{notebaseColumnId}",
474
+ summary: "Update notebase column",
475
+ tags: ["Notebase Columns"]
476
+ }).input(NotebaseColumnUpdateInputSchema).output(NotebaseColumnUpdateOutputSchema),
477
+ delete: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_COLUMN_NOT_FOUND", "PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED", "CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE", "CONCURRENT_POSITION_CONFLICT")).route({
478
+ method: "DELETE",
479
+ path: "/notebase-columns/{notebaseColumnId}",
480
+ summary: "Delete notebase column",
481
+ tags: ["Notebase Columns"]
482
+ }).input(NotebaseColumnDeleteInputSchema).output(NotebaseColumnDeleteOutputSchema),
483
+ reorder: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
484
+ method: "POST",
485
+ path: "/notebase-columns/reorder",
486
+ summary: "Reorder notebase columns",
487
+ tags: ["Notebase Columns"]
488
+ }).input(NotebaseColumnReorderInputSchema).output(NotebaseColumnReorderOutputSchema)
489
+ };
490
+ //#endregion
491
+ //#region src/contracts/notebase-row.ts
492
+ const notebaseRowContract = {
493
+ create: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CELL_VALIDATION_FAILED", "CONCURRENT_POSITION_CONFLICT")).route({
494
+ method: "POST",
495
+ path: "/notebase-rows",
496
+ summary: "Create notebase row",
497
+ tags: ["Notebase Rows"]
498
+ }).input(NotebaseRowCreateInputSchema).output(NotebaseRowCreateOutputSchema),
499
+ update: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_ROW_NOT_FOUND", "CELL_VALIDATION_FAILED")).route({
500
+ method: "PATCH",
501
+ path: "/notebase-rows/{notebaseRowId}",
502
+ summary: "Update notebase row cells",
503
+ tags: ["Notebase Rows"]
504
+ }).input(NotebaseRowUpdateInputSchema).output(NotebaseRowUpdateOutputSchema),
505
+ delete: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_ROW_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
506
+ method: "DELETE",
507
+ path: "/notebase-rows/{notebaseRowId}",
508
+ summary: "Delete notebase row",
509
+ tags: ["Notebase Rows"]
510
+ }).input(NotebaseRowDeleteInputSchema).output(NotebaseRowDeleteOutputSchema),
511
+ reorder: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
512
+ method: "POST",
513
+ path: "/notebase-rows/reorder",
514
+ summary: "Reorder notebase rows",
515
+ tags: ["Notebase Rows"]
516
+ }).input(NotebaseRowReorderInputSchema).output(NotebaseRowReorderOutputSchema)
517
+ };
518
+ //#endregion
519
+ //#region src/schemas/timezone.ts
520
+ const localeTimeZoneFormatter = /* @__PURE__ */ new Map();
521
+ function createTimezoneFormatter(timezone) {
522
+ let formatter = localeTimeZoneFormatter.get(timezone);
523
+ if (!formatter) {
524
+ formatter = new Intl.DateTimeFormat("en-US", { timeZone: timezone });
525
+ localeTimeZoneFormatter.set(timezone, formatter);
526
+ }
527
+ return formatter;
528
+ }
529
+ const timezoneSchema = z.string().trim().min(1).refine((timezone) => {
530
+ try {
531
+ createTimezoneFormatter(timezone).format(/* @__PURE__ */ new Date());
532
+ return true;
533
+ } catch {
534
+ return false;
535
+ }
536
+ }, "Invalid timezone");
537
+ //#endregion
538
+ //#region src/schemas/srs.ts
539
+ const stepSchema = srsStepSchema;
540
+ const SRS_REVIEW_CLIENT_ID_NAMESPACE = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
541
+ const srsReviewClientIdNamePrefix = "readfrog:srs-review";
542
+ const nullLastReviewTimeSentinel = "null";
543
+ async function createSrsReviewClientId(card) {
544
+ return uuidV5(`${srsReviewClientIdNamePrefix}:${card.id}:${formatLastReviewTime(card.lastReviewTime)}`, SRS_REVIEW_CLIENT_ID_NAMESPACE);
545
+ }
546
+ const srsReviewInputSchema = z.object({
547
+ cardId: z.uuid(),
548
+ id: z.uuid().optional(),
549
+ rating: reviewRatingSchema,
550
+ durationMs: z.number().int().min(0).max(SRS_REVIEW_DURATION_MS_MAX),
551
+ timezone: timezoneSchema
552
+ }).strict();
553
+ const srsRollbackReviewInputSchema = z.object({ cardId: z.uuid() }).strict();
554
+ const srsRevlogSchema = z.object({
555
+ id: z.uuid(),
556
+ notebaseId: z.uuid(),
557
+ cardId: z.uuid(),
558
+ rating: reviewRatingSchema,
559
+ state: cardStateSchema$1,
560
+ afterScheduleStatus: scheduleStatusSchema$1,
561
+ reviewedAt: z.coerce.date(),
562
+ durationMs: z.number().int(),
563
+ fsrsReviewLogSnapshot: fsrsReviewLogSnapshotSchema,
564
+ createdAt: z.coerce.date()
565
+ });
566
+ const srsReviewOutputSchema = z.object({
567
+ card: cardSchema,
568
+ revlog: srsRevlogSchema,
569
+ txid: z.number()
570
+ });
571
+ const srsRollbackReviewOutputSchema = z.object({
572
+ card: cardSchema,
573
+ rolledBackRevlogId: z.uuid(),
574
+ txid: z.number()
575
+ });
576
+ function formatLastReviewTime(lastReviewTime) {
577
+ return lastReviewTime ? new Date(lastReviewTime).toISOString() : nullLastReviewTimeSentinel;
578
+ }
579
+ async function uuidV5(name, namespace) {
580
+ const namespaceBytes = uuidToBytes(namespace);
581
+ const nameBytes = new TextEncoder().encode(name);
582
+ const input = new Uint8Array(namespaceBytes.length + nameBytes.length);
583
+ input.set(namespaceBytes);
584
+ input.set(nameBytes, namespaceBytes.length);
585
+ const bytes = new Uint8Array(await crypto.subtle.digest("SHA-1", input)).slice(0, 16);
586
+ const versionByte = bytes[6];
587
+ const variantByte = bytes[8];
588
+ if (versionByte === void 0 || variantByte === void 0) throw new Error("SHA-1 digest was too short");
589
+ bytes[6] = versionByte & 15 | 80;
590
+ bytes[8] = variantByte & 63 | 128;
591
+ return bytesToUuid(bytes);
592
+ }
593
+ function uuidToBytes(uuid) {
594
+ const hex = uuid.replaceAll("-", "").toLowerCase();
595
+ if (!/^[0-9a-f]{32}$/.test(hex)) throw new Error("Invalid UUID namespace");
596
+ return new Uint8Array(Array.from({ length: 16 }, (_, index) => Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16)));
597
+ }
598
+ function bytesToUuid(bytes) {
599
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0"));
600
+ return [
601
+ hex.slice(0, 4).join(""),
602
+ hex.slice(4, 6).join(""),
603
+ hex.slice(6, 8).join(""),
604
+ hex.slice(8, 10).join(""),
605
+ hex.slice(10, 16).join("")
606
+ ].join("-");
607
+ }
608
+ //#endregion
609
+ //#region src/contracts/srs.ts
610
+ const srsContract = {
611
+ review: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_NOT_REVIEWABLE", "CARD_REVIEW_STATE_STALE")).route({
612
+ method: "POST",
613
+ path: "/srs/review",
614
+ summary: "Review a card with SRS scheduling",
615
+ tags: ["SRS"]
616
+ }).input(srsReviewInputSchema).output(srsReviewOutputSchema),
617
+ rollbackReview: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_REVIEW_ROLLBACK_UNAVAILABLE")).route({
618
+ method: "POST",
619
+ path: "/srs/review/rollback",
620
+ summary: "Roll back the latest SRS review for a card",
621
+ tags: ["SRS"]
622
+ }).input(srsRollbackReviewInputSchema).output(srsRollbackReviewOutputSchema)
623
+ };
624
+ //#endregion
625
+ //#region src/schemas/user.ts
626
+ const userEnsureTimezoneInputSchema = z.object({ timezone: timezoneSchema }).strict();
627
+ const userEnsureTimezoneOutputSchema = z.object({
628
+ timezone: timezoneSchema,
629
+ updated: z.boolean()
630
+ }).strict();
631
+ //#endregion
295
632
  //#region src/index.ts
296
633
  const contract = {
297
634
  betaAccess: betaAccessContract,
298
- customTable: {
299
- list: notebaseProcedure.route({
300
- method: "GET",
301
- path: "/custom-tables",
302
- summary: "List custom tables",
303
- tags: ["Custom Tables"]
304
- }).input(CustomTableListInputSchema).output(CustomTableListOutputSchema),
305
- get: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND")).route({
306
- method: "GET",
307
- path: "/custom-tables/{id}",
308
- summary: "Get custom table with columns, rows, and views",
309
- tags: ["Custom Tables"]
310
- }).input(CustomTableGetInputSchema).output(CustomTableGetOutputSchema),
311
- getSchema: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND")).route({
312
- method: "GET",
313
- path: "/custom-tables/{id}/schema",
314
- summary: "Get custom table schema",
315
- tags: ["Custom Tables"]
316
- }).input(CustomTableGetSchemaInputSchema).output(CustomTableGetSchemaOutputSchema),
317
- create: notebaseProcedure.route({
318
- method: "POST",
319
- path: "/custom-tables",
320
- summary: "Create custom table",
321
- tags: ["Custom Tables"]
322
- }).input(CustomTableCreateInputSchema).output(CustomTableCreateOutputSchema),
323
- update: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND")).route({
324
- method: "PUT",
325
- path: "/custom-tables/{id}",
326
- summary: "Update custom table",
327
- tags: ["Custom Tables"]
328
- }).input(CustomTableUpdateInputSchema).output(CustomTableUpdateOutputSchema),
329
- delete: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND")).route({
330
- method: "DELETE",
331
- path: "/custom-tables/{id}",
332
- summary: "Delete custom table",
333
- tags: ["Custom Tables"]
334
- }).input(CustomTableDeleteInputSchema).output(CustomTableDeleteOutputSchema)
335
- },
336
- column: columnContract,
337
- row: {
338
- create: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND", "CELL_VALIDATION_FAILED", "CONCURRENT_POSITION_CONFLICT")).route({
339
- method: "POST",
340
- path: "/rows",
341
- summary: "Create row",
342
- tags: ["Rows"]
343
- }).input(RowCreateInputSchema).output(RowCreateOutputSchema),
344
- update: notebaseProcedure.errors(pickPublicErrorMap("ROW_NOT_FOUND", "CELL_VALIDATION_FAILED")).route({
345
- method: "PATCH",
346
- path: "/rows/{rowId}",
347
- summary: "Update row cells",
348
- tags: ["Rows"]
349
- }).input(RowUpdateInputSchema).output(RowUpdateOutputSchema),
350
- delete: notebaseProcedure.errors(pickPublicErrorMap("ROW_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
351
- method: "DELETE",
352
- path: "/rows/{rowId}",
353
- summary: "Delete row",
354
- tags: ["Rows"]
355
- }).input(RowDeleteInputSchema).output(RowDeleteOutputSchema),
356
- reorder: notebaseProcedure.errors(pickPublicErrorMap("TABLE_NOT_FOUND", "CONCURRENT_POSITION_CONFLICT")).route({
357
- method: "POST",
358
- path: "/rows/reorder",
359
- summary: "Reorder rows in a table",
360
- tags: ["Rows"]
361
- }).input(RowReorderInputSchema).output(RowReorderOutputSchema)
362
- }
635
+ card: cardContract,
636
+ cardTemplate: cardTemplateContract,
637
+ notebase: notebaseContract,
638
+ notebaseColumn: notebaseColumnContract,
639
+ notebaseRow: notebaseRowContract,
640
+ srs: srsContract,
641
+ user: { ensureTimezone: oc.route({
642
+ method: "POST",
643
+ path: "/users/me/timezone/ensure",
644
+ summary: "Ensure the authenticated user has a timezone",
645
+ tags: ["Users"]
646
+ }).input(userEnsureTimezoneInputSchema).output(userEnsureTimezoneOutputSchema) }
363
647
  };
364
648
  //#endregion
365
- export { BetaAccessStatusInputSchema, BetaAccessStatusOutputSchema, BetaFeatureKeySchema, CellValidationFailedDataSchema, CellValidationFailureDetailsSchema, CellValidationFailureReasonSchema, ColumnCreateInputSchema, ColumnCreateOutputSchema, ColumnDeleteInputSchema, ColumnDeleteOutputSchema, ColumnReorderInputSchema, ColumnReorderOutputSchema, ColumnUpdateInputSchema, ColumnUpdateOutputSchema, CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableGetInputSchema, CustomTableGetOutputSchema, CustomTableGetSchemaInputSchema, CustomTableGetSchemaOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, PUBLIC_APP_ERROR_DEFS, RowCreateInputSchema, RowCreateOutputSchema, RowDeleteInputSchema, RowDeleteOutputSchema, RowReorderInputSchema, RowReorderOutputSchema, RowUpdateInputSchema, RowUpdateOutputSchema, columnCreateDataSchema, columnUpdateDataSchema, columnWidthSchema, contract, customTableCreateDataSchema, customTableUpdateDataSchema, getPublicErrorDefinition, isPublicAppErrorCode, pickPublicErrorMap, rowCellsSchema, rowCreateDataSchema, rowUpdateDataSchema, tableColumnSchema, tableRowSchema, tableViewSchema, tableViewTypeSchema, viewConfigSchema, viewCreateDataSchema, viewFilterSchema, viewFiltersSchema, viewSortSchema, viewSortsSchema, viewUpdateDataSchema };
649
+ export { BetaAccessStatusInputSchema, BetaAccessStatusOutputSchema, BetaFeatureKeySchema, CardGenerateInputSchema, CardGenerateOutputSchema, CardGetInputSchema, CardGetOutputSchema, CardListInputSchema, CardListOutputSchema, CardTemplateCreateInputSchema, CardTemplateCreateOutputSchema, CardTemplateDeleteInputSchema, CardTemplateDeleteOutputSchema, CardTemplateGetInputSchema, CardTemplateGetOutputSchema, CardTemplateInvalidColumnsDataSchema, CardTemplateListInputSchema, CardTemplateListOutputSchema, CardTemplateUpdateInputSchema, CardTemplateUpdateOutputSchema, CellValidationFailedDataSchema, CellValidationFailureDetailsSchema, CellValidationFailureReasonSchema, NotebaseColumnCreateInputSchema, NotebaseColumnCreateOutputSchema, NotebaseColumnDeleteInputSchema, NotebaseColumnDeleteOutputSchema, NotebaseColumnReorderInputSchema, NotebaseColumnReorderOutputSchema, NotebaseColumnUpdateInputSchema, NotebaseColumnUpdateOutputSchema, NotebaseCreateInputSchema, NotebaseCreateOutputSchema, NotebaseDeleteInputSchema, NotebaseDeleteOutputSchema, NotebaseGetInputSchema, NotebaseGetOutputSchema, NotebaseGetSchemaInputSchema, NotebaseGetSchemaOutputSchema, NotebaseListInputSchema, NotebaseListItemSchema, NotebaseListOutputSchema, NotebaseRowCreateInputSchema, NotebaseRowCreateOutputSchema, NotebaseRowDeleteInputSchema, NotebaseRowDeleteOutputSchema, NotebaseRowReorderInputSchema, NotebaseRowReorderOutputSchema, NotebaseRowUpdateInputSchema, NotebaseRowUpdateOutputSchema, NotebaseUpdateInputSchema, NotebaseUpdateOutputSchema, PUBLIC_APP_ERROR_DEFS, SRS_REVIEW_CLIENT_ID_NAMESPACE, SRS_REVIEW_DURATION_MS_MAX, cardSchema, cardStateSchema, cardTemplateSchema, contract, createSrsReviewClientId, getPublicErrorDefinition, isPublicAppErrorCode, notebaseColumnCreateDataSchema, notebaseColumnSchema, notebaseColumnUpdateDataSchema, notebaseColumnWidthSchema, notebaseCreateDataSchema, notebaseRowCellsSchema, notebaseRowCreateDataSchema, notebaseRowSchema, notebaseRowUpdateDataSchema, notebaseSchema, notebaseUpdateDataSchema, notebaseViewConfigSchema, notebaseViewCreateDataSchema, notebaseViewFilterSchema, notebaseViewFiltersSchema, notebaseViewSchema, notebaseViewSortSchema, notebaseViewSortsSchema, notebaseViewTypeSchema, notebaseViewUpdateDataSchema, pickPublicErrorMap, renderedCardSchema, reviewRatingSchema, scheduleStatusSchema, schedulingParamsSchema, srsReviewInputSchema, srsReviewOutputSchema, srsRevlogSchema, srsRollbackReviewInputSchema, srsRollbackReviewOutputSchema, stepSchema, timezoneSchema, userEnsureTimezoneInputSchema, userEnsureTimezoneOutputSchema };
366
650
 
367
651
  //# sourceMappingURL=index.js.map