@read-frog/api-contract 0.7.0 → 0.8.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 +212 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +117 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/contracts/hosted-ai.ts +31 -0
- package/src/contracts/srs.ts +47 -0
- package/src/index.ts +3 -0
- package/src/public-errors.ts +20 -0
- package/src/schemas/hosted-ai.ts +46 -0
- package/src/schemas/notebase.ts +2 -0
- package/src/schemas/srs.ts +48 -0
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,26 @@ declare const PUBLIC_APP_ERROR_DEFS: {
|
|
|
87
87
|
readonly message: "Card review cannot be rolled back";
|
|
88
88
|
readonly status: 409;
|
|
89
89
|
};
|
|
90
|
+
readonly CARD_ALREADY_BURIED: {
|
|
91
|
+
readonly message: "Card is already buried";
|
|
92
|
+
readonly status: 409;
|
|
93
|
+
};
|
|
94
|
+
readonly CARD_NOT_BURIED: {
|
|
95
|
+
readonly message: "Card is not buried";
|
|
96
|
+
readonly status: 409;
|
|
97
|
+
};
|
|
98
|
+
readonly CARD_ALREADY_SUSPENDED: {
|
|
99
|
+
readonly message: "Card is already suspended";
|
|
100
|
+
readonly status: 409;
|
|
101
|
+
};
|
|
102
|
+
readonly CARD_NOT_SUSPENDED: {
|
|
103
|
+
readonly message: "Card is not suspended";
|
|
104
|
+
readonly status: 409;
|
|
105
|
+
};
|
|
106
|
+
readonly CARD_STATUS_CHANGE_UNAVAILABLE: {
|
|
107
|
+
readonly message: "Card status change is unavailable";
|
|
108
|
+
readonly status: 409;
|
|
109
|
+
};
|
|
90
110
|
readonly NOTEBASE_VIEW_NOT_FOUND: {
|
|
91
111
|
readonly message: "Notebase view not found";
|
|
92
112
|
readonly status: 404;
|
|
@@ -173,6 +193,26 @@ declare function getPublicErrorDefinition<TCode extends PublicAppErrorCode>(code
|
|
|
173
193
|
readonly message: "Card review cannot be rolled back";
|
|
174
194
|
readonly status: 409;
|
|
175
195
|
};
|
|
196
|
+
readonly CARD_ALREADY_BURIED: {
|
|
197
|
+
readonly message: "Card is already buried";
|
|
198
|
+
readonly status: 409;
|
|
199
|
+
};
|
|
200
|
+
readonly CARD_NOT_BURIED: {
|
|
201
|
+
readonly message: "Card is not buried";
|
|
202
|
+
readonly status: 409;
|
|
203
|
+
};
|
|
204
|
+
readonly CARD_ALREADY_SUSPENDED: {
|
|
205
|
+
readonly message: "Card is already suspended";
|
|
206
|
+
readonly status: 409;
|
|
207
|
+
};
|
|
208
|
+
readonly CARD_NOT_SUSPENDED: {
|
|
209
|
+
readonly message: "Card is not suspended";
|
|
210
|
+
readonly status: 409;
|
|
211
|
+
};
|
|
212
|
+
readonly CARD_STATUS_CHANGE_UNAVAILABLE: {
|
|
213
|
+
readonly message: "Card status change is unavailable";
|
|
214
|
+
readonly status: 409;
|
|
215
|
+
};
|
|
176
216
|
readonly NOTEBASE_VIEW_NOT_FOUND: {
|
|
177
217
|
readonly message: "Notebase view not found";
|
|
178
218
|
readonly status: 404;
|
|
@@ -484,6 +524,44 @@ declare const CardGenerateOutputSchema: z.ZodObject<{
|
|
|
484
524
|
}, z.core.$strip>;
|
|
485
525
|
type CardGenerateOutput = z.infer<typeof CardGenerateOutputSchema>;
|
|
486
526
|
//#endregion
|
|
527
|
+
//#region src/schemas/hosted-ai.d.ts
|
|
528
|
+
declare const HostedAiOutputFieldTypeSchema: z.ZodEnum<{
|
|
529
|
+
string: "string";
|
|
530
|
+
number: "number";
|
|
531
|
+
}>;
|
|
532
|
+
declare const HostedAiOutputFieldSchema: z.ZodObject<{
|
|
533
|
+
name: z.ZodString;
|
|
534
|
+
type: z.ZodEnum<{
|
|
535
|
+
string: "string";
|
|
536
|
+
number: "number";
|
|
537
|
+
}>;
|
|
538
|
+
}, z.core.$strict>;
|
|
539
|
+
declare const HostedAiStreamTextInputSchema: z.ZodObject<{
|
|
540
|
+
system: z.ZodString;
|
|
541
|
+
prompt: z.ZodString;
|
|
542
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
}, z.core.$strict>;
|
|
544
|
+
declare const HostedAiStreamStructuredObjectInputSchema: z.ZodObject<{
|
|
545
|
+
system: z.ZodString;
|
|
546
|
+
prompt: z.ZodString;
|
|
547
|
+
outputSchema: z.ZodArray<z.ZodObject<{
|
|
548
|
+
name: z.ZodString;
|
|
549
|
+
type: z.ZodEnum<{
|
|
550
|
+
string: "string";
|
|
551
|
+
number: "number";
|
|
552
|
+
}>;
|
|
553
|
+
}, z.core.$strict>>;
|
|
554
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
}, z.core.$strict>;
|
|
556
|
+
declare const HostedAiStreamPartSchema: z.ZodObject<{
|
|
557
|
+
type: z.ZodString;
|
|
558
|
+
}, z.core.$loose>;
|
|
559
|
+
type HostedAiOutputFieldType = z.infer<typeof HostedAiOutputFieldTypeSchema>;
|
|
560
|
+
type HostedAiOutputField = z.infer<typeof HostedAiOutputFieldSchema>;
|
|
561
|
+
type HostedAiStreamTextInput = z.infer<typeof HostedAiStreamTextInputSchema>;
|
|
562
|
+
type HostedAiStreamStructuredObjectInput = z.infer<typeof HostedAiStreamStructuredObjectInputSchema>;
|
|
563
|
+
type HostedAiStreamPart = z.infer<typeof HostedAiStreamPartSchema>;
|
|
564
|
+
//#endregion
|
|
487
565
|
//#region src/schemas/notebase.d.ts
|
|
488
566
|
declare const NotebaseListInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
489
567
|
type NotebaseListInput = z.infer<typeof NotebaseListInputSchema>;
|
|
@@ -597,10 +675,14 @@ declare const NotebaseCreateOutputSchema: z.ZodObject<{
|
|
|
597
675
|
type NotebaseCreateOutput = z.infer<typeof NotebaseCreateOutputSchema>;
|
|
598
676
|
declare const notebaseUpdateDataSchema: z.ZodObject<{
|
|
599
677
|
name: z.ZodOptional<z.ZodString>;
|
|
678
|
+
srsNewPerDay: z.ZodOptional<z.ZodNumber>;
|
|
679
|
+
srsReviewsPerDay: z.ZodOptional<z.ZodNumber>;
|
|
600
680
|
}, z.core.$strict>;
|
|
601
681
|
type NotebaseUpdateData = z.infer<typeof notebaseUpdateDataSchema>;
|
|
602
682
|
declare const NotebaseUpdateInputSchema: z.ZodObject<{
|
|
603
683
|
name: z.ZodOptional<z.ZodString>;
|
|
684
|
+
srsNewPerDay: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
srsReviewsPerDay: z.ZodOptional<z.ZodNumber>;
|
|
604
686
|
id: z.ZodUUID;
|
|
605
687
|
}, z.core.$strict>;
|
|
606
688
|
type NotebaseUpdateInput = z.infer<typeof NotebaseUpdateInputSchema>;
|
|
@@ -1134,6 +1216,38 @@ declare const srsRollbackReviewInputSchema: z.ZodObject<{
|
|
|
1134
1216
|
cardId: z.ZodUUID;
|
|
1135
1217
|
}, z.core.$strict>;
|
|
1136
1218
|
type SrsRollbackReviewInput = z.infer<typeof srsRollbackReviewInputSchema>;
|
|
1219
|
+
declare const srsScheduleStatusStatsSchema: z.ZodRecord<z.ZodEnum<{
|
|
1220
|
+
new: "new";
|
|
1221
|
+
learning: "learning";
|
|
1222
|
+
review: "review";
|
|
1223
|
+
}>, z.ZodNumber>;
|
|
1224
|
+
type SrsScheduleStatusStats = z.infer<typeof srsScheduleStatusStatsSchema>;
|
|
1225
|
+
declare const srsScheduleStatusStatsInputSchema: z.ZodObject<{
|
|
1226
|
+
notebaseIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
1227
|
+
timezone: z.ZodString;
|
|
1228
|
+
}, z.core.$strict>;
|
|
1229
|
+
type SrsScheduleStatusStatsInput = z.infer<typeof srsScheduleStatusStatsInputSchema>;
|
|
1230
|
+
declare const srsScheduleStatusStatsOutputSchema: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodEnum<{
|
|
1231
|
+
new: "new";
|
|
1232
|
+
learning: "learning";
|
|
1233
|
+
review: "review";
|
|
1234
|
+
}>, z.ZodNumber>>;
|
|
1235
|
+
type SrsScheduleStatusStatsOutput = z.infer<typeof srsScheduleStatusStatsOutputSchema>;
|
|
1236
|
+
declare const srsManualCardStatusInputSchema: z.ZodObject<{
|
|
1237
|
+
cardId: z.ZodUUID;
|
|
1238
|
+
enabled: z.ZodBoolean;
|
|
1239
|
+
}, z.core.$strict>;
|
|
1240
|
+
type SrsManualCardStatusInput = z.infer<typeof srsManualCardStatusInputSchema>;
|
|
1241
|
+
declare const srsSetCardBuriedInputSchema: z.ZodObject<{
|
|
1242
|
+
cardId: z.ZodUUID;
|
|
1243
|
+
enabled: z.ZodBoolean;
|
|
1244
|
+
}, z.core.$strict>;
|
|
1245
|
+
type SrsSetCardBuriedInput = SrsManualCardStatusInput;
|
|
1246
|
+
declare const srsSetCardSuspendedInputSchema: z.ZodObject<{
|
|
1247
|
+
cardId: z.ZodUUID;
|
|
1248
|
+
enabled: z.ZodBoolean;
|
|
1249
|
+
}, z.core.$strict>;
|
|
1250
|
+
type SrsSetCardSuspendedInput = SrsManualCardStatusInput;
|
|
1137
1251
|
declare const srsRevlogSchema: z.ZodObject<{
|
|
1138
1252
|
id: z.ZodUUID;
|
|
1139
1253
|
notebaseId: z.ZodUUID;
|
|
@@ -1172,6 +1286,34 @@ declare const srsRevlogSchema: z.ZodObject<{
|
|
|
1172
1286
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
1173
1287
|
}, z.core.$strip>;
|
|
1174
1288
|
type SrsRevlog = z.infer<typeof srsRevlogSchema>;
|
|
1289
|
+
declare const srsRevlogWithoutSnapshotSchema: z.ZodObject<{
|
|
1290
|
+
id: z.ZodUUID;
|
|
1291
|
+
notebaseId: z.ZodUUID;
|
|
1292
|
+
state: z.ZodEnum<{
|
|
1293
|
+
new: "new";
|
|
1294
|
+
learning: "learning";
|
|
1295
|
+
review: "review";
|
|
1296
|
+
relearning: "relearning";
|
|
1297
|
+
}>;
|
|
1298
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
1299
|
+
rating: z.ZodEnum<{
|
|
1300
|
+
again: "again";
|
|
1301
|
+
hard: "hard";
|
|
1302
|
+
good: "good";
|
|
1303
|
+
easy: "easy";
|
|
1304
|
+
}>;
|
|
1305
|
+
cardId: z.ZodUUID;
|
|
1306
|
+
durationMs: z.ZodNumber;
|
|
1307
|
+
afterScheduleStatus: z.ZodEnum<{
|
|
1308
|
+
new: "new";
|
|
1309
|
+
learning: "learning";
|
|
1310
|
+
review: "review";
|
|
1311
|
+
suspended: "suspended";
|
|
1312
|
+
buried: "buried";
|
|
1313
|
+
}>;
|
|
1314
|
+
reviewedAt: z.ZodCoercedDate<unknown>;
|
|
1315
|
+
}, z.core.$strip>;
|
|
1316
|
+
type SrsRevlogWithoutSnapshot = z.infer<typeof srsRevlogWithoutSnapshotSchema>;
|
|
1175
1317
|
declare const srsReviewOutputSchema: z.ZodObject<{
|
|
1176
1318
|
card: z.ZodObject<{
|
|
1177
1319
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
@@ -1278,6 +1420,18 @@ declare const srsRollbackReviewOutputSchema: z.ZodObject<{
|
|
|
1278
1420
|
txid: z.ZodNumber;
|
|
1279
1421
|
}, z.core.$strip>;
|
|
1280
1422
|
type SrsRollbackReviewOutput = z.infer<typeof srsRollbackReviewOutputSchema>;
|
|
1423
|
+
declare const srsTxidOutputSchema: z.ZodObject<{
|
|
1424
|
+
txid: z.ZodNumber;
|
|
1425
|
+
}, z.core.$strip>;
|
|
1426
|
+
type SrsTxidOutput = z.infer<typeof srsTxidOutputSchema>;
|
|
1427
|
+
declare const srsSetCardBuriedOutputSchema: z.ZodObject<{
|
|
1428
|
+
txid: z.ZodNumber;
|
|
1429
|
+
}, z.core.$strip>;
|
|
1430
|
+
type SrsSetCardBuriedOutput = SrsTxidOutput;
|
|
1431
|
+
declare const srsSetCardSuspendedOutputSchema: z.ZodObject<{
|
|
1432
|
+
txid: z.ZodNumber;
|
|
1433
|
+
}, z.core.$strip>;
|
|
1434
|
+
type SrsSetCardSuspendedOutput = SrsTxidOutput;
|
|
1281
1435
|
//#endregion
|
|
1282
1436
|
//#region src/schemas/user.d.ts
|
|
1283
1437
|
declare const userEnsureTimezoneInputSchema: z.ZodObject<{
|
|
@@ -1470,6 +1624,41 @@ declare const contract: {
|
|
|
1470
1624
|
txid: import("zod").ZodNumber;
|
|
1471
1625
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "CARD_TEMPLATE_NOT_FOUND">>, Record<never, never>>;
|
|
1472
1626
|
};
|
|
1627
|
+
hostedAi: {
|
|
1628
|
+
translate: {
|
|
1629
|
+
streamText: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1630
|
+
system: import("zod").ZodString;
|
|
1631
|
+
prompt: import("zod").ZodString;
|
|
1632
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1633
|
+
}, import("zod/v4/core").$strict>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
1634
|
+
[x: string]: unknown;
|
|
1635
|
+
type: string;
|
|
1636
|
+
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
1637
|
+
[x: string]: unknown;
|
|
1638
|
+
type: string;
|
|
1639
|
+
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
1640
|
+
};
|
|
1641
|
+
customAction: {
|
|
1642
|
+
streamStructuredObject: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1643
|
+
system: import("zod").ZodString;
|
|
1644
|
+
prompt: import("zod").ZodString;
|
|
1645
|
+
outputSchema: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1646
|
+
name: import("zod").ZodString;
|
|
1647
|
+
type: import("zod").ZodEnum<{
|
|
1648
|
+
string: "string";
|
|
1649
|
+
number: "number";
|
|
1650
|
+
}>;
|
|
1651
|
+
}, import("zod/v4/core").$strict>>;
|
|
1652
|
+
temperature: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1653
|
+
}, import("zod/v4/core").$strict>, import("@orpc/contract").Schema<AsyncIteratorObject<{
|
|
1654
|
+
[x: string]: unknown;
|
|
1655
|
+
type: string;
|
|
1656
|
+
}, unknown, void>, import("@orpc/contract").AsyncIteratorClass<{
|
|
1657
|
+
[x: string]: unknown;
|
|
1658
|
+
type: string;
|
|
1659
|
+
}, unknown, void>>, Record<never, never>, Record<never, never>>;
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1473
1662
|
notebase: {
|
|
1474
1663
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
1475
1664
|
id: import("zod").ZodString;
|
|
@@ -1636,6 +1825,8 @@ declare const contract: {
|
|
|
1636
1825
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Record<never, never>>;
|
|
1637
1826
|
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1638
1827
|
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1828
|
+
srsNewPerDay: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1829
|
+
srsReviewsPerDay: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1639
1830
|
id: import("zod").ZodUUID;
|
|
1640
1831
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
1641
1832
|
txid: import("zod").ZodNumber;
|
|
@@ -1760,6 +1951,14 @@ declare const contract: {
|
|
|
1760
1951
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_NOT_FOUND" | "CONCURRENT_POSITION_CONFLICT">>, Record<never, never>>;
|
|
1761
1952
|
};
|
|
1762
1953
|
srs: {
|
|
1954
|
+
scheduleStatusStats: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1955
|
+
notebaseIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUUID>>;
|
|
1956
|
+
timezone: import("zod").ZodString;
|
|
1957
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodRecord<import("zod").ZodUUID, import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
1958
|
+
new: "new";
|
|
1959
|
+
learning: "learning";
|
|
1960
|
+
review: "review";
|
|
1961
|
+
}>, import("zod").ZodNumber>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_NOT_FOUND">>, Record<never, never>>;
|
|
1763
1962
|
review: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1764
1963
|
cardId: import("zod").ZodUUID;
|
|
1765
1964
|
id: import("zod").ZodOptional<import("zod").ZodUUID>;
|
|
@@ -1877,6 +2076,18 @@ declare const contract: {
|
|
|
1877
2076
|
rolledBackRevlogId: import("zod").ZodUUID;
|
|
1878
2077
|
txid: import("zod").ZodNumber;
|
|
1879
2078
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "CARD_NOT_FOUND" | "CARD_REVIEW_ROLLBACK_UNAVAILABLE">>, Record<never, never>>;
|
|
2079
|
+
setCardBuried: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2080
|
+
cardId: import("zod").ZodUUID;
|
|
2081
|
+
enabled: import("zod").ZodBoolean;
|
|
2082
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2083
|
+
txid: import("zod").ZodNumber;
|
|
2084
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "CARD_NOT_FOUND" | "CARD_ALREADY_BURIED" | "CARD_NOT_BURIED" | "CARD_STATUS_CHANGE_UNAVAILABLE">>, Record<never, never>>;
|
|
2085
|
+
setCardSuspended: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2086
|
+
cardId: import("zod").ZodUUID;
|
|
2087
|
+
enabled: import("zod").ZodBoolean;
|
|
2088
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2089
|
+
txid: import("zod").ZodNumber;
|
|
2090
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_BETA_RESTRICTED">>, Pick<import("@orpc/contract").ErrorMap, "CARD_NOT_FOUND" | "CARD_ALREADY_SUSPENDED" | "CARD_NOT_SUSPENDED" | "CARD_STATUS_CHANGE_UNAVAILABLE">>, Record<never, never>>;
|
|
1880
2091
|
};
|
|
1881
2092
|
user: {
|
|
1882
2093
|
ensureTimezone: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
@@ -1894,5 +2105,5 @@ declare const contract: {
|
|
|
1894
2105
|
};
|
|
1895
2106
|
type ORPCRouterClient = ContractRouterClient<typeof contract>;
|
|
1896
2107
|
//#endregion
|
|
1897
|
-
export { BetaAccessStatusInput, BetaAccessStatusInputSchema, BetaAccessStatusOutput, BetaAccessStatusOutputSchema, BetaFeatureKey, BetaFeatureKeySchema, Card, CardGenerateInput, CardGenerateInputSchema, CardGenerateOutput, CardGenerateOutputSchema, CardGetInput, CardGetInputSchema, CardGetOutput, CardGetOutputSchema, CardListInput, CardListInputSchema, CardListOutput, CardListOutputSchema, type CardState, CardTemplate, CardTemplateCreateInput, CardTemplateCreateInputSchema, CardTemplateCreateOutput, CardTemplateCreateOutputSchema, CardTemplateDeleteInput, CardTemplateDeleteInputSchema, CardTemplateDeleteOutput, CardTemplateDeleteOutputSchema, CardTemplateGetInput, CardTemplateGetInputSchema, CardTemplateGetOutput, CardTemplateGetOutputSchema, CardTemplateInvalidColumnsData, CardTemplateInvalidColumnsDataSchema, CardTemplateListInput, CardTemplateListInputSchema, CardTemplateListOutput, CardTemplateListOutputSchema, CardTemplateUpdateInput, CardTemplateUpdateInputSchema, CardTemplateUpdateOutput, CardTemplateUpdateOutputSchema, CellValidationFailedData, CellValidationFailedDataSchema, CellValidationFailureDetails, CellValidationFailureDetailsSchema, CellValidationFailureReason, CellValidationFailureReasonSchema, Notebase, NotebaseColumn, NotebaseColumnCreateData, NotebaseColumnCreateInput, NotebaseColumnCreateInputSchema, NotebaseColumnCreateOutput, NotebaseColumnCreateOutputSchema, NotebaseColumnDeleteInput, NotebaseColumnDeleteInputSchema, NotebaseColumnDeleteOutput, NotebaseColumnDeleteOutputSchema, NotebaseColumnReorderInput, NotebaseColumnReorderInputSchema, NotebaseColumnReorderOutput, NotebaseColumnReorderOutputSchema, NotebaseColumnUpdateData, NotebaseColumnUpdateInput, NotebaseColumnUpdateInputSchema, NotebaseColumnUpdateOutput, NotebaseColumnUpdateOutputSchema, NotebaseCreateData, NotebaseCreateInput, NotebaseCreateInputSchema, NotebaseCreateOutput, NotebaseCreateOutputSchema, NotebaseDeleteInput, NotebaseDeleteInputSchema, NotebaseDeleteOutput, NotebaseDeleteOutputSchema, NotebaseGetInput, NotebaseGetInputSchema, NotebaseGetOutput, NotebaseGetOutputSchema, NotebaseGetSchemaInput, NotebaseGetSchemaInputSchema, NotebaseGetSchemaOutput, NotebaseGetSchemaOutputSchema, NotebaseListInput, NotebaseListInputSchema, NotebaseListItem, NotebaseListItemSchema, NotebaseListOutput, NotebaseListOutputSchema, NotebaseRow, NotebaseRowCreateData, NotebaseRowCreateInput, NotebaseRowCreateInputSchema, NotebaseRowCreateOutput, NotebaseRowCreateOutputSchema, NotebaseRowDeleteInput, NotebaseRowDeleteInputSchema, NotebaseRowDeleteOutput, NotebaseRowDeleteOutputSchema, NotebaseRowReorderInput, NotebaseRowReorderInputSchema, NotebaseRowReorderOutput, NotebaseRowReorderOutputSchema, NotebaseRowUpdateData, NotebaseRowUpdateInput, NotebaseRowUpdateInputSchema, NotebaseRowUpdateOutput, NotebaseRowUpdateOutputSchema, NotebaseUpdateData, NotebaseUpdateInput, NotebaseUpdateInputSchema, NotebaseUpdateOutput, NotebaseUpdateOutputSchema, NotebaseView, NotebaseViewConfig, NotebaseViewCreateData, NotebaseViewFilter, NotebaseViewSort, NotebaseViewType, NotebaseViewUpdateData, ORPCRouterClient, PUBLIC_APP_ERROR_DEFS, PublicAppErrorCode, PublicAppErrorData, RenderedCard, type ReviewRating, SRS_REVIEW_CLIENT_ID_NAMESPACE, SRS_REVIEW_DURATION_MS_MAX, type ScheduleStatus, type SchedulingParams, SrsReviewClientIdCard, SrsReviewInput, SrsReviewOutput, SrsRevlog, SrsRollbackReviewInput, SrsRollbackReviewOutput, Step, Timezone, UserEnsureTimezoneInput, UserEnsureTimezoneOutput, UserUpdateTimezoneInput, UserUpdateTimezoneOutput, 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, userUpdateTimezoneInputSchema, userUpdateTimezoneOutputSchema };
|
|
2108
|
+
export { BetaAccessStatusInput, BetaAccessStatusInputSchema, BetaAccessStatusOutput, BetaAccessStatusOutputSchema, BetaFeatureKey, BetaFeatureKeySchema, Card, CardGenerateInput, CardGenerateInputSchema, CardGenerateOutput, CardGenerateOutputSchema, CardGetInput, CardGetInputSchema, CardGetOutput, CardGetOutputSchema, CardListInput, CardListInputSchema, CardListOutput, CardListOutputSchema, type CardState, CardTemplate, CardTemplateCreateInput, CardTemplateCreateInputSchema, CardTemplateCreateOutput, CardTemplateCreateOutputSchema, CardTemplateDeleteInput, CardTemplateDeleteInputSchema, CardTemplateDeleteOutput, CardTemplateDeleteOutputSchema, CardTemplateGetInput, CardTemplateGetInputSchema, CardTemplateGetOutput, CardTemplateGetOutputSchema, CardTemplateInvalidColumnsData, CardTemplateInvalidColumnsDataSchema, CardTemplateListInput, CardTemplateListInputSchema, CardTemplateListOutput, CardTemplateListOutputSchema, CardTemplateUpdateInput, CardTemplateUpdateInputSchema, CardTemplateUpdateOutput, CardTemplateUpdateOutputSchema, CellValidationFailedData, CellValidationFailedDataSchema, CellValidationFailureDetails, CellValidationFailureDetailsSchema, CellValidationFailureReason, CellValidationFailureReasonSchema, HostedAiOutputField, HostedAiOutputFieldSchema, HostedAiOutputFieldType, HostedAiOutputFieldTypeSchema, HostedAiStreamPart, HostedAiStreamPartSchema, HostedAiStreamStructuredObjectInput, HostedAiStreamStructuredObjectInputSchema, HostedAiStreamTextInput, HostedAiStreamTextInputSchema, Notebase, NotebaseColumn, NotebaseColumnCreateData, NotebaseColumnCreateInput, NotebaseColumnCreateInputSchema, NotebaseColumnCreateOutput, NotebaseColumnCreateOutputSchema, NotebaseColumnDeleteInput, NotebaseColumnDeleteInputSchema, NotebaseColumnDeleteOutput, NotebaseColumnDeleteOutputSchema, NotebaseColumnReorderInput, NotebaseColumnReorderInputSchema, NotebaseColumnReorderOutput, NotebaseColumnReorderOutputSchema, NotebaseColumnUpdateData, NotebaseColumnUpdateInput, NotebaseColumnUpdateInputSchema, NotebaseColumnUpdateOutput, NotebaseColumnUpdateOutputSchema, NotebaseCreateData, NotebaseCreateInput, NotebaseCreateInputSchema, NotebaseCreateOutput, NotebaseCreateOutputSchema, NotebaseDeleteInput, NotebaseDeleteInputSchema, NotebaseDeleteOutput, NotebaseDeleteOutputSchema, NotebaseGetInput, NotebaseGetInputSchema, NotebaseGetOutput, NotebaseGetOutputSchema, NotebaseGetSchemaInput, NotebaseGetSchemaInputSchema, NotebaseGetSchemaOutput, NotebaseGetSchemaOutputSchema, NotebaseListInput, NotebaseListInputSchema, NotebaseListItem, NotebaseListItemSchema, NotebaseListOutput, NotebaseListOutputSchema, NotebaseRow, NotebaseRowCreateData, NotebaseRowCreateInput, NotebaseRowCreateInputSchema, NotebaseRowCreateOutput, NotebaseRowCreateOutputSchema, NotebaseRowDeleteInput, NotebaseRowDeleteInputSchema, NotebaseRowDeleteOutput, NotebaseRowDeleteOutputSchema, NotebaseRowReorderInput, NotebaseRowReorderInputSchema, NotebaseRowReorderOutput, NotebaseRowReorderOutputSchema, NotebaseRowUpdateData, NotebaseRowUpdateInput, NotebaseRowUpdateInputSchema, NotebaseRowUpdateOutput, NotebaseRowUpdateOutputSchema, NotebaseUpdateData, NotebaseUpdateInput, NotebaseUpdateInputSchema, NotebaseUpdateOutput, NotebaseUpdateOutputSchema, NotebaseView, NotebaseViewConfig, NotebaseViewCreateData, NotebaseViewFilter, NotebaseViewSort, NotebaseViewType, NotebaseViewUpdateData, ORPCRouterClient, PUBLIC_APP_ERROR_DEFS, PublicAppErrorCode, PublicAppErrorData, RenderedCard, type ReviewRating, SRS_REVIEW_CLIENT_ID_NAMESPACE, SRS_REVIEW_DURATION_MS_MAX, type ScheduleStatus, type SchedulingParams, SrsManualCardStatusInput, SrsReviewClientIdCard, SrsReviewInput, SrsReviewOutput, SrsRevlog, SrsRevlogWithoutSnapshot, SrsRollbackReviewInput, SrsRollbackReviewOutput, SrsScheduleStatusStats, SrsScheduleStatusStatsInput, SrsScheduleStatusStatsOutput, SrsSetCardBuriedInput, SrsSetCardBuriedOutput, SrsSetCardSuspendedInput, SrsSetCardSuspendedOutput, SrsTxidOutput, Step, Timezone, UserEnsureTimezoneInput, UserEnsureTimezoneOutput, UserUpdateTimezoneInput, UserUpdateTimezoneOutput, 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, srsManualCardStatusInputSchema, srsReviewInputSchema, srsReviewOutputSchema, srsRevlogSchema, srsRevlogWithoutSnapshotSchema, srsRollbackReviewInputSchema, srsRollbackReviewOutputSchema, srsScheduleStatusStatsInputSchema, srsScheduleStatusStatsOutputSchema, srsScheduleStatusStatsSchema, srsSetCardBuriedInputSchema, srsSetCardBuriedOutputSchema, srsSetCardSuspendedInputSchema, srsSetCardSuspendedOutputSchema, srsTxidOutputSchema, stepSchema, timezoneSchema, userEnsureTimezoneInputSchema, userEnsureTimezoneOutputSchema, userUpdateTimezoneInputSchema, userUpdateTimezoneOutputSchema };
|
|
1898
2109
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/public-errors.ts","../src/schemas/beta-access.ts","../src/schemas/card.ts","../src/schemas/notebase.ts","../src/schemas/notebase-column.ts","../src/schemas/notebase-row.ts","../src/schemas/notebase-view.ts","../src/schemas/timezone.ts","../src/schemas/srs.ts","../src/schemas/user.ts","../src/index.ts"],"mappings":";;;;;cASa,iCAAA,EAAiC,CAAA,CAAA,OAAA;;;;;;KAMlC,2BAAA,GAA8B,CAAA,CAAE,KAAK,QAAQ,iCAAA;AAAA,cAE5C,kCAAA,EAAkC,CAAA,CAAA,SAAA;;;;;;;KAOnC,4BAAA,GAA+B,CAAA,CAAE,KAAK,QAAQ,kCAAA;AAAA,cAE7C,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAK/B,wBAAA,GAA2B,CAAA,CAAE,KAAK,QAAQ,8BAAA;AAAA,cAEzC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;KAGrC,8BAAA,GAAiC,CAAA,CAAE,KAAK,QAAQ,oCAAA;AAAA,cAE/C,qBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiED,kBAAA,gBAAkC,qBAAqB;AAAA,KAEvD,kBAAA,eAAiC,kBAAA,YACjC,qBAAA,EAAuB,KAAA;EAAiB,IAAA,wBAA4B,CAAA,CAAE,UAAA;AAAA,IAC5E,CAAA,CAAE,MAAA,CAAO,OAAA;AAAA,iBAGC,oB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWD,gBAAA,GAAmB,oBAAoB,QAAQ,QAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/public-errors.ts","../src/schemas/beta-access.ts","../src/schemas/card.ts","../src/schemas/hosted-ai.ts","../src/schemas/notebase.ts","../src/schemas/notebase-column.ts","../src/schemas/notebase-row.ts","../src/schemas/notebase-view.ts","../src/schemas/timezone.ts","../src/schemas/srs.ts","../src/schemas/user.ts","../src/index.ts"],"mappings":";;;;;cASa,iCAAA,EAAiC,CAAA,CAAA,OAAA;;;;;;KAMlC,2BAAA,GAA8B,CAAA,CAAE,KAAK,QAAQ,iCAAA;AAAA,cAE5C,kCAAA,EAAkC,CAAA,CAAA,SAAA;;;;;;;KAOnC,4BAAA,GAA+B,CAAA,CAAE,KAAK,QAAQ,kCAAA;AAAA,cAE7C,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAK/B,wBAAA,GAA2B,CAAA,CAAE,KAAK,QAAQ,8BAAA;AAAA,cAEzC,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;KAGrC,8BAAA,GAAiC,CAAA,CAAE,KAAK,QAAQ,oCAAA;AAAA,cAE/C,qBAAA;EAAA;;;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gBAAA,GAAmB,oBAAoB,QAAQ,QAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { oc } from "@orpc/contract";
|
|
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";
|
|
1
|
+
import { eventIterator, oc } from "@orpc/contract";
|
|
2
|
+
import { BETA_FEATURE_KEYS, NOTEBASE_COLUMN_MAX_WIDTH, NOTEBASE_COLUMN_MIN_WIDTH, SRS_REVIEW_DURATION_MS_MAX, activeScheduleStatusSchema, 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);
|
|
@@ -83,6 +83,26 @@ const PUBLIC_APP_ERROR_DEFS = {
|
|
|
83
83
|
message: "Card review cannot be rolled back",
|
|
84
84
|
status: 409
|
|
85
85
|
},
|
|
86
|
+
CARD_ALREADY_BURIED: {
|
|
87
|
+
message: "Card is already buried",
|
|
88
|
+
status: 409
|
|
89
|
+
},
|
|
90
|
+
CARD_NOT_BURIED: {
|
|
91
|
+
message: "Card is not buried",
|
|
92
|
+
status: 409
|
|
93
|
+
},
|
|
94
|
+
CARD_ALREADY_SUSPENDED: {
|
|
95
|
+
message: "Card is already suspended",
|
|
96
|
+
status: 409
|
|
97
|
+
},
|
|
98
|
+
CARD_NOT_SUSPENDED: {
|
|
99
|
+
message: "Card is not suspended",
|
|
100
|
+
status: 409
|
|
101
|
+
},
|
|
102
|
+
CARD_STATUS_CHANGE_UNAVAILABLE: {
|
|
103
|
+
message: "Card status change is unavailable",
|
|
104
|
+
status: 409
|
|
105
|
+
},
|
|
86
106
|
NOTEBASE_VIEW_NOT_FOUND: {
|
|
87
107
|
message: "Notebase view not found",
|
|
88
108
|
status: 404
|
|
@@ -237,6 +257,58 @@ const cardTemplateContract = {
|
|
|
237
257
|
}).input(CardTemplateDeleteInputSchema).output(CardTemplateDeleteOutputSchema)
|
|
238
258
|
};
|
|
239
259
|
//#endregion
|
|
260
|
+
//#region src/schemas/hosted-ai.ts
|
|
261
|
+
const HostedAiOutputFieldTypeSchema = z.enum(["string", "number"]);
|
|
262
|
+
const HostedAiOutputFieldSchema = z.strictObject({
|
|
263
|
+
name: z.string().trim().min(1).max(80),
|
|
264
|
+
type: HostedAiOutputFieldTypeSchema
|
|
265
|
+
});
|
|
266
|
+
const HostedAiStreamTextInputSchema = z.strictObject({
|
|
267
|
+
system: z.string().trim().min(1).max(16e3),
|
|
268
|
+
prompt: z.string().trim().min(1).max(32e3),
|
|
269
|
+
temperature: z.number().min(0).max(2).optional()
|
|
270
|
+
});
|
|
271
|
+
const HostedAiStreamStructuredObjectInputSchema = z.strictObject({
|
|
272
|
+
system: z.string().trim().min(1).max(16e3),
|
|
273
|
+
prompt: z.string().trim().min(1).max(32e3),
|
|
274
|
+
outputSchema: z.array(HostedAiOutputFieldSchema).min(1).max(32),
|
|
275
|
+
temperature: z.number().min(0).max(2).optional()
|
|
276
|
+
}).superRefine((input, ctx) => {
|
|
277
|
+
const fieldNames = /* @__PURE__ */ new Set();
|
|
278
|
+
input.outputSchema.forEach((field, index) => {
|
|
279
|
+
if (fieldNames.has(field.name)) {
|
|
280
|
+
ctx.addIssue({
|
|
281
|
+
code: "custom",
|
|
282
|
+
message: `Duplicate output schema name "${field.name}".`,
|
|
283
|
+
path: [
|
|
284
|
+
"outputSchema",
|
|
285
|
+
index,
|
|
286
|
+
"name"
|
|
287
|
+
]
|
|
288
|
+
});
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
fieldNames.add(field.name);
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
const HostedAiStreamPartSchema = z.looseObject({ type: z.string().trim().min(1) });
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/contracts/hosted-ai.ts
|
|
297
|
+
const hostedAiContract = {
|
|
298
|
+
translate: { streamText: oc.route({
|
|
299
|
+
method: "POST",
|
|
300
|
+
path: "/hosted-ai/translate/stream-text",
|
|
301
|
+
summary: "Stream hosted translation text output",
|
|
302
|
+
tags: ["Hosted AI"]
|
|
303
|
+
}).input(HostedAiStreamTextInputSchema).output(eventIterator(HostedAiStreamPartSchema)) },
|
|
304
|
+
customAction: { streamStructuredObject: oc.route({
|
|
305
|
+
method: "POST",
|
|
306
|
+
path: "/hosted-ai/custom-actions/stream-structured-object",
|
|
307
|
+
summary: "Stream hosted custom action structured output",
|
|
308
|
+
tags: ["Hosted AI"]
|
|
309
|
+
}).input(HostedAiStreamStructuredObjectInputSchema).output(eventIterator(HostedAiStreamPartSchema)) }
|
|
310
|
+
};
|
|
311
|
+
//#endregion
|
|
240
312
|
//#region src/schemas/notebase-column.ts
|
|
241
313
|
const notebaseColumnWidthSchema = z.number().int().min(NOTEBASE_COLUMN_MIN_WIDTH).max(NOTEBASE_COLUMN_MAX_WIDTH);
|
|
242
314
|
const notebaseColumnSchema = z.object({
|
|
@@ -410,7 +482,11 @@ const notebaseCreateDataSchema = z.object({
|
|
|
410
482
|
}).strict();
|
|
411
483
|
const NotebaseCreateInputSchema = notebaseCreateDataSchema;
|
|
412
484
|
const NotebaseCreateOutputSchema = z.object({ txid: z.number() });
|
|
413
|
-
const notebaseUpdateDataSchema = z.object({
|
|
485
|
+
const notebaseUpdateDataSchema = z.object({
|
|
486
|
+
name: z.string().min(1).optional(),
|
|
487
|
+
srsNewPerDay: schedulingParamsShape.newPerDay.optional(),
|
|
488
|
+
srsReviewsPerDay: schedulingParamsShape.reviewsPerDay.optional()
|
|
489
|
+
}).strict();
|
|
414
490
|
const NotebaseUpdateInputSchema = notebaseUpdateDataSchema.extend({ id: z.uuid() });
|
|
415
491
|
const NotebaseUpdateOutputSchema = z.object({ txid: z.number() });
|
|
416
492
|
const NotebaseDeleteInputSchema = z.object({ id: z.uuid() });
|
|
@@ -562,6 +638,18 @@ const srsReviewInputSchema = z.object({
|
|
|
562
638
|
timezone: timezoneSchema
|
|
563
639
|
}).strict();
|
|
564
640
|
const srsRollbackReviewInputSchema = z.object({ cardId: z.uuid() }).strict();
|
|
641
|
+
const srsScheduleStatusStatsSchema = z.record(activeScheduleStatusSchema, z.number().int().min(0));
|
|
642
|
+
const srsScheduleStatusStatsInputSchema = z.object({
|
|
643
|
+
notebaseIds: z.array(z.uuid()).optional(),
|
|
644
|
+
timezone: timezoneSchema
|
|
645
|
+
}).strict();
|
|
646
|
+
const srsScheduleStatusStatsOutputSchema = z.record(z.uuid(), srsScheduleStatusStatsSchema);
|
|
647
|
+
const srsManualCardStatusInputSchema = z.object({
|
|
648
|
+
cardId: z.uuid(),
|
|
649
|
+
enabled: z.boolean()
|
|
650
|
+
}).strict();
|
|
651
|
+
const srsSetCardBuriedInputSchema = srsManualCardStatusInputSchema;
|
|
652
|
+
const srsSetCardSuspendedInputSchema = srsManualCardStatusInputSchema;
|
|
565
653
|
const srsRevlogSchema = z.object({
|
|
566
654
|
id: z.uuid(),
|
|
567
655
|
notebaseId: z.uuid(),
|
|
@@ -574,6 +662,7 @@ const srsRevlogSchema = z.object({
|
|
|
574
662
|
fsrsReviewLogSnapshot: fsrsReviewLogSnapshotSchema,
|
|
575
663
|
createdAt: z.coerce.date()
|
|
576
664
|
});
|
|
665
|
+
const srsRevlogWithoutSnapshotSchema = srsRevlogSchema.omit({ fsrsReviewLogSnapshot: true });
|
|
577
666
|
const srsReviewOutputSchema = z.object({
|
|
578
667
|
card: cardSchema,
|
|
579
668
|
revlog: srsRevlogSchema,
|
|
@@ -584,6 +673,9 @@ const srsRollbackReviewOutputSchema = z.object({
|
|
|
584
673
|
rolledBackRevlogId: z.uuid(),
|
|
585
674
|
txid: z.number()
|
|
586
675
|
});
|
|
676
|
+
const srsTxidOutputSchema = z.object({ txid: z.number() });
|
|
677
|
+
const srsSetCardBuriedOutputSchema = srsTxidOutputSchema;
|
|
678
|
+
const srsSetCardSuspendedOutputSchema = srsTxidOutputSchema;
|
|
587
679
|
function formatLastReviewTime(lastReviewTime) {
|
|
588
680
|
return lastReviewTime ? new Date(lastReviewTime).toISOString() : nullLastReviewTimeSentinel;
|
|
589
681
|
}
|
|
@@ -603,6 +695,7 @@ async function uuidV5(name, namespace) {
|
|
|
603
695
|
}
|
|
604
696
|
function uuidToBytes(uuid) {
|
|
605
697
|
const hex = uuid.replaceAll("-", "").toLowerCase();
|
|
698
|
+
/* v8 ignore next 3 -- SRS_REVIEW_CLIENT_ID_NAMESPACE is a fixed valid UUID. */
|
|
606
699
|
if (!/^[0-9a-f]{32}$/.test(hex)) throw new Error("Invalid UUID namespace");
|
|
607
700
|
return new Uint8Array(Array.from({ length: 16 }, (_, index) => Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16)));
|
|
608
701
|
}
|
|
@@ -619,6 +712,12 @@ function bytesToUuid(bytes) {
|
|
|
619
712
|
//#endregion
|
|
620
713
|
//#region src/contracts/srs.ts
|
|
621
714
|
const srsContract = {
|
|
715
|
+
scheduleStatusStats: notebaseProcedure.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND")).route({
|
|
716
|
+
method: "GET",
|
|
717
|
+
path: "/srs/schedule-status-stats",
|
|
718
|
+
summary: "List today schedule status stats for notebases",
|
|
719
|
+
tags: ["SRS"]
|
|
720
|
+
}).input(srsScheduleStatusStatsInputSchema).output(srsScheduleStatusStatsOutputSchema),
|
|
622
721
|
review: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_NOT_REVIEWABLE", "CARD_REVIEW_STATE_STALE")).route({
|
|
623
722
|
method: "POST",
|
|
624
723
|
path: "/srs/review",
|
|
@@ -630,7 +729,19 @@ const srsContract = {
|
|
|
630
729
|
path: "/srs/review/rollback",
|
|
631
730
|
summary: "Roll back the latest SRS review for a card",
|
|
632
731
|
tags: ["SRS"]
|
|
633
|
-
}).input(srsRollbackReviewInputSchema).output(srsRollbackReviewOutputSchema)
|
|
732
|
+
}).input(srsRollbackReviewInputSchema).output(srsRollbackReviewOutputSchema),
|
|
733
|
+
setCardBuried: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_ALREADY_BURIED", "CARD_NOT_BURIED", "CARD_STATUS_CHANGE_UNAVAILABLE")).route({
|
|
734
|
+
method: "POST",
|
|
735
|
+
path: "/srs/card/bury",
|
|
736
|
+
summary: "Manually bury or unbury a card",
|
|
737
|
+
tags: ["SRS"]
|
|
738
|
+
}).input(srsSetCardBuriedInputSchema).output(srsSetCardBuriedOutputSchema),
|
|
739
|
+
setCardSuspended: notebaseProcedure.errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_ALREADY_SUSPENDED", "CARD_NOT_SUSPENDED", "CARD_STATUS_CHANGE_UNAVAILABLE")).route({
|
|
740
|
+
method: "POST",
|
|
741
|
+
path: "/srs/card/suspend",
|
|
742
|
+
summary: "Manually suspend or unsuspend a card",
|
|
743
|
+
tags: ["SRS"]
|
|
744
|
+
}).input(srsSetCardSuspendedInputSchema).output(srsSetCardSuspendedOutputSchema)
|
|
634
745
|
};
|
|
635
746
|
//#endregion
|
|
636
747
|
//#region src/schemas/user.ts
|
|
@@ -647,6 +758,7 @@ const contract = {
|
|
|
647
758
|
betaAccess: betaAccessContract,
|
|
648
759
|
card: cardContract,
|
|
649
760
|
cardTemplate: cardTemplateContract,
|
|
761
|
+
hostedAi: hostedAiContract,
|
|
650
762
|
notebase: notebaseContract,
|
|
651
763
|
notebaseColumn: notebaseColumnContract,
|
|
652
764
|
notebaseRow: notebaseRowContract,
|
|
@@ -667,6 +779,6 @@ const contract = {
|
|
|
667
779
|
}
|
|
668
780
|
};
|
|
669
781
|
//#endregion
|
|
670
|
-
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, userUpdateTimezoneInputSchema, userUpdateTimezoneOutputSchema };
|
|
782
|
+
export { BetaAccessStatusInputSchema, BetaAccessStatusOutputSchema, BetaFeatureKeySchema, CardGenerateInputSchema, CardGenerateOutputSchema, CardGetInputSchema, CardGetOutputSchema, CardListInputSchema, CardListOutputSchema, CardTemplateCreateInputSchema, CardTemplateCreateOutputSchema, CardTemplateDeleteInputSchema, CardTemplateDeleteOutputSchema, CardTemplateGetInputSchema, CardTemplateGetOutputSchema, CardTemplateInvalidColumnsDataSchema, CardTemplateListInputSchema, CardTemplateListOutputSchema, CardTemplateUpdateInputSchema, CardTemplateUpdateOutputSchema, CellValidationFailedDataSchema, CellValidationFailureDetailsSchema, CellValidationFailureReasonSchema, HostedAiOutputFieldSchema, HostedAiOutputFieldTypeSchema, HostedAiStreamPartSchema, HostedAiStreamStructuredObjectInputSchema, HostedAiStreamTextInputSchema, 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, srsManualCardStatusInputSchema, srsReviewInputSchema, srsReviewOutputSchema, srsRevlogSchema, srsRevlogWithoutSnapshotSchema, srsRollbackReviewInputSchema, srsRollbackReviewOutputSchema, srsScheduleStatusStatsInputSchema, srsScheduleStatusStatsOutputSchema, srsScheduleStatusStatsSchema, srsSetCardBuriedInputSchema, srsSetCardBuriedOutputSchema, srsSetCardSuspendedInputSchema, srsSetCardSuspendedOutputSchema, srsTxidOutputSchema, stepSchema, timezoneSchema, userEnsureTimezoneInputSchema, userEnsureTimezoneOutputSchema, userUpdateTimezoneInputSchema, userUpdateTimezoneOutputSchema };
|
|
671
783
|
|
|
672
784
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["cardStateSchema","scheduleStatusSchema"],"sources":["../src/schemas/beta-access.ts","../src/contracts/beta-access.ts","../src/public-errors.ts","../src/schemas/card.ts","../src/contracts/shared.ts","../src/contracts/card.ts","../src/contracts/card-template.ts","../src/schemas/notebase-column.ts","../src/schemas/notebase-row.ts","../src/schemas/notebase-view.ts","../src/schemas/notebase.ts","../src/contracts/notebase.ts","../src/contracts/notebase-column.ts","../src/contracts/notebase-row.ts","../src/schemas/timezone.ts","../src/schemas/srs.ts","../src/contracts/srs.ts","../src/schemas/user.ts","../src/contracts/user.ts","../src/index.ts"],"sourcesContent":["import { BETA_FEATURE_KEYS } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport const BetaFeatureKeySchema = z.enum(BETA_FEATURE_KEYS)\nexport type BetaFeatureKey = z.infer<typeof BetaFeatureKeySchema>\n\nexport const BetaAccessStatusInputSchema = z.object({\n featureKey: BetaFeatureKeySchema,\n}).strict()\nexport type BetaAccessStatusInput = z.infer<typeof BetaAccessStatusInputSchema>\n\nexport const BetaAccessStatusOutputSchema = z.object({\n featureKey: BetaFeatureKeySchema,\n allowed: z.boolean(),\n})\nexport type BetaAccessStatusOutput = z.infer<typeof BetaAccessStatusOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport {\n BetaAccessStatusInputSchema,\n BetaAccessStatusOutputSchema,\n} from \"#/schemas/beta-access\"\n\nexport const betaAccessContract = {\n status: oc\n .route({\n method: \"GET\",\n path: \"/beta-access/status\",\n summary: \"Get beta access status for a feature\",\n tags: [\"Beta Access\"],\n })\n .input(BetaAccessStatusInputSchema)\n .output(BetaAccessStatusOutputSchema),\n}\n","import type { ErrorMap } from \"@orpc/contract\"\nimport { z } from \"zod\"\n\ninterface PublicAppErrorDefinition {\n data?: z.ZodTypeAny\n message: string\n status: number\n}\n\nexport const CellValidationFailureReasonSchema = z.enum([\n \"unknown_notebase_column\",\n \"type_mismatch\",\n \"invalid_select_option\",\n \"invalid_date_format\",\n])\nexport type CellValidationFailureReason = z.infer<typeof CellValidationFailureReasonSchema>\n\nexport const CellValidationFailureDetailsSchema = z.object({\n expectedFormat: z.string().optional(),\n expectedType: z.string().optional(),\n receivedType: z.string().optional(),\n receivedValue: z.unknown().optional(),\n validOptions: z.array(z.string()).optional(),\n}).strict()\nexport type CellValidationFailureDetails = z.infer<typeof CellValidationFailureDetailsSchema>\n\nexport const CellValidationFailedDataSchema = z.object({\n notebaseColumnId: z.string(),\n details: CellValidationFailureDetailsSchema,\n reason: CellValidationFailureReasonSchema,\n}).strict()\nexport type CellValidationFailedData = z.infer<typeof CellValidationFailedDataSchema>\n\nexport const CardTemplateInvalidColumnsDataSchema = z.object({\n notebaseColumnIds: z.array(z.string()),\n}).strict()\nexport type CardTemplateInvalidColumnsData = z.infer<typeof CardTemplateInvalidColumnsDataSchema>\n\nexport const PUBLIC_APP_ERROR_DEFS = {\n NOTEBASE_BETA_RESTRICTED: {\n message: \"Notebase is currently in beta for selected accounts\",\n status: 403,\n },\n NOTEBASE_NOT_FOUND: {\n message: \"Notebase not found\",\n status: 404,\n },\n NOTEBASE_COLUMN_NOT_FOUND: {\n message: \"Notebase column not found\",\n status: 404,\n },\n NOTEBASE_ROW_NOT_FOUND: {\n message: \"Notebase row not found\",\n status: 404,\n },\n CARD_NOT_FOUND: {\n message: \"Card not found\",\n status: 404,\n },\n CARD_TEMPLATE_NOT_FOUND: {\n message: \"Card template not found\",\n status: 404,\n },\n CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS: {\n data: CardTemplateInvalidColumnsDataSchema,\n message: \"Card template references unknown notebase columns\",\n status: 422,\n },\n CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE: {\n message: \"Notebase column is used by a card template\",\n status: 409,\n },\n CARD_NOT_REVIEWABLE: {\n message: \"Card cannot be reviewed in its current state\",\n status: 409,\n },\n CARD_REVIEW_STATE_STALE: {\n message: \"Card review state is stale\",\n status: 409,\n },\n CARD_REVIEW_ROLLBACK_UNAVAILABLE: {\n message: \"Card review cannot be rolled back\",\n status: 409,\n },\n NOTEBASE_VIEW_NOT_FOUND: {\n message: \"Notebase view not found\",\n status: 404,\n },\n CELL_VALIDATION_FAILED: {\n data: CellValidationFailedDataSchema,\n message: \"Cell validation failed\",\n status: 422,\n },\n PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED: {\n message: \"Cannot delete primary notebase column\",\n status: 400,\n },\n CONCURRENT_POSITION_CONFLICT: {\n message: \"Concurrent position conflict, please retry\",\n status: 409,\n },\n} as const satisfies Record<string, PublicAppErrorDefinition>\n\nexport type PublicAppErrorCode = keyof typeof PUBLIC_APP_ERROR_DEFS\n\nexport type PublicAppErrorData<TCode extends PublicAppErrorCode>\n = (typeof PUBLIC_APP_ERROR_DEFS)[TCode] extends { data: infer TSchema extends z.ZodTypeAny }\n ? z.output<TSchema>\n : undefined\n\nexport function isPublicAppErrorCode(code: string | undefined): code is PublicAppErrorCode {\n return code !== undefined && code in PUBLIC_APP_ERROR_DEFS\n}\n\nexport function getPublicErrorDefinition<TCode extends PublicAppErrorCode>(code: TCode) {\n return PUBLIC_APP_ERROR_DEFS[code]\n}\n\nexport function pickPublicErrorMap<const TCodes extends readonly PublicAppErrorCode[]>(\n ...codes: TCodes\n) {\n return Object.fromEntries(codes.map((code) => {\n const definition = PUBLIC_APP_ERROR_DEFS[code]\n\n if (\"data\" in definition) {\n return [code, {\n data: definition.data,\n message: definition.message,\n status: definition.status,\n }]\n }\n\n return [code, {\n message: definition.message,\n status: definition.status,\n }]\n })) as Pick<ErrorMap, TCodes[number]>\n}\n","import {\n cardIdentityShape,\n cardMemoryStateShape,\n cardStateSchema,\n cardTemplateConfigSchema,\n scheduleStatusSchema,\n} from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport {\n cardStateSchema,\n scheduleStatusSchema,\n}\nexport type { CardState, ScheduleStatus } from \"@read-frog/definitions\"\n\nexport const cardTemplateSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n name: z.string(),\n config: cardTemplateConfigSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type CardTemplate = z.infer<typeof cardTemplateSchema>\n\nexport const CardTemplateListInputSchema = z.object({\n notebaseId: z.uuid(),\n})\nexport type CardTemplateListInput = z.infer<typeof CardTemplateListInputSchema>\n\nexport const CardTemplateListOutputSchema = z.array(cardTemplateSchema)\nexport type CardTemplateListOutput = z.infer<typeof CardTemplateListOutputSchema>\n\nexport const CardTemplateGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardTemplateGetInput = z.infer<typeof CardTemplateGetInputSchema>\n\nexport const CardTemplateGetOutputSchema = cardTemplateSchema\nexport type CardTemplateGetOutput = z.infer<typeof CardTemplateGetOutputSchema>\n\nexport const CardTemplateCreateInputSchema = z.object({\n id: z.uuid().optional(),\n notebaseId: z.uuid(),\n name: z.string().min(1),\n config: cardTemplateConfigSchema,\n}).strict()\nexport type CardTemplateCreateInput = z.infer<typeof CardTemplateCreateInputSchema>\n\nexport const CardTemplateCreateOutputSchema = cardTemplateSchema.extend({\n txid: z.number(),\n})\nexport type CardTemplateCreateOutput = z.infer<typeof CardTemplateCreateOutputSchema>\n\nexport const CardTemplateUpdateInputSchema = z.object({\n id: z.uuid(),\n name: z.string().min(1).optional(),\n config: cardTemplateConfigSchema.optional(),\n}).strict()\nexport type CardTemplateUpdateInput = z.infer<typeof CardTemplateUpdateInputSchema>\n\nexport const CardTemplateUpdateOutputSchema = cardTemplateSchema.extend({\n txid: z.number(),\n})\nexport type CardTemplateUpdateOutput = z.infer<typeof CardTemplateUpdateOutputSchema>\n\nexport const CardTemplateDeleteInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardTemplateDeleteInput = z.infer<typeof CardTemplateDeleteInputSchema>\n\nexport const CardTemplateDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type CardTemplateDeleteOutput = z.infer<typeof CardTemplateDeleteOutputSchema>\n\nexport const cardSchema = z.object({\n ...cardIdentityShape,\n ...cardMemoryStateShape,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type Card = z.infer<typeof cardSchema>\n\nexport const renderedCardSchema = cardSchema.extend({\n front: z.string(),\n back: z.string(),\n})\nexport type RenderedCard = z.infer<typeof renderedCardSchema>\n\nexport const CardListInputSchema = z.object({\n notebaseId: z.uuid(),\n templateId: z.uuid().optional(),\n limit: z.number().int().min(1).max(500).optional(),\n offset: z.number().int().min(0).optional(),\n})\nexport type CardListInput = z.infer<typeof CardListInputSchema>\n\nexport const CardListOutputSchema = z.array(renderedCardSchema)\nexport type CardListOutput = z.infer<typeof CardListOutputSchema>\n\nexport const CardGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardGetInput = z.infer<typeof CardGetInputSchema>\n\nexport const CardGetOutputSchema = renderedCardSchema\nexport type CardGetOutput = z.infer<typeof CardGetOutputSchema>\n\nexport const CardGenerateInputSchema = z.object({\n notebaseId: z.uuid(),\n templateId: z.uuid().optional(),\n})\nexport type CardGenerateInput = z.infer<typeof CardGenerateInputSchema>\n\nexport const CardGenerateOutputSchema = z.object({\n created: z.number().int().min(0),\n txid: z.number(),\n})\nexport type CardGenerateOutput = z.infer<typeof CardGenerateOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport { pickPublicErrorMap } from \"#/public-errors\"\n\nexport const notebaseProcedure = oc.errors(\n pickPublicErrorMap(\"NOTEBASE_BETA_RESTRICTED\"),\n)\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n CardGenerateInputSchema,\n CardGenerateOutputSchema,\n CardGetInputSchema,\n CardGetOutputSchema,\n CardListInputSchema,\n CardListOutputSchema,\n} from \"#/schemas/card\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const cardContract = {\n list: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/cards\",\n summary: \"List rendered cards\",\n tags: [\"Cards\"],\n })\n .input(CardListInputSchema)\n .output(CardListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/cards/{id}\",\n summary: \"Get rendered card\",\n tags: [\"Cards\"],\n })\n .input(CardGetInputSchema)\n .output(CardGetOutputSchema),\n\n generate: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"POST\",\n path: \"/cards/generate\",\n summary: \"Generate missing cards\",\n tags: [\"Cards\"],\n })\n .input(CardGenerateInputSchema)\n .output(CardGenerateOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n CardTemplateCreateInputSchema,\n CardTemplateCreateOutputSchema,\n CardTemplateDeleteInputSchema,\n CardTemplateDeleteOutputSchema,\n CardTemplateGetInputSchema,\n CardTemplateGetOutputSchema,\n CardTemplateListInputSchema,\n CardTemplateListOutputSchema,\n CardTemplateUpdateInputSchema,\n CardTemplateUpdateOutputSchema,\n} from \"#/schemas/card\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const cardTemplateContract = {\n list: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/card-templates\",\n summary: \"List card templates\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateListInputSchema)\n .output(CardTemplateListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/card-templates/{id}\",\n summary: \"Get card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateGetInputSchema)\n .output(CardTemplateGetOutputSchema),\n\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS\"))\n .route({\n method: \"POST\",\n path: \"/card-templates\",\n summary: \"Create card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateCreateInputSchema)\n .output(CardTemplateCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\", \"CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS\"))\n .route({\n method: \"PATCH\",\n path: \"/card-templates/{id}\",\n summary: \"Update card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateUpdateInputSchema)\n .output(CardTemplateUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"DELETE\",\n path: \"/card-templates/{id}\",\n summary: \"Delete card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateDeleteInputSchema)\n .output(CardTemplateDeleteOutputSchema),\n}\n","import { NOTEBASE_COLUMN_MAX_WIDTH, NOTEBASE_COLUMN_MIN_WIDTH, notebaseColumnConfigSchema } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport const notebaseColumnWidthSchema = z.number().int().min(NOTEBASE_COLUMN_MIN_WIDTH).max(NOTEBASE_COLUMN_MAX_WIDTH)\n\nexport const notebaseColumnSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n name: z.string(),\n config: notebaseColumnConfigSchema,\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 NotebaseColumn = z.infer<typeof notebaseColumnSchema>\n\nexport const notebaseColumnCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n config: notebaseColumnConfigSchema,\n}).strict()\nexport type NotebaseColumnCreateData = z.infer<typeof notebaseColumnCreateDataSchema>\n\nexport const notebaseColumnUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n config: notebaseColumnConfigSchema.optional(),\n width: notebaseColumnWidthSchema.nullable().optional(),\n}).strict()\nexport type NotebaseColumnUpdateData = z.infer<typeof notebaseColumnUpdateDataSchema>\n\nexport const NotebaseColumnCreateInputSchema = z.object({\n notebaseId: z.uuid(),\n data: notebaseColumnCreateDataSchema,\n})\nexport type NotebaseColumnCreateInput = z.infer<typeof NotebaseColumnCreateInputSchema>\n\nexport const NotebaseColumnCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnCreateOutput = z.infer<typeof NotebaseColumnCreateOutputSchema>\n\nexport const NotebaseColumnUpdateInputSchema = z.object({\n notebaseColumnId: z.uuid(),\n data: notebaseColumnUpdateDataSchema,\n})\nexport type NotebaseColumnUpdateInput = z.infer<typeof NotebaseColumnUpdateInputSchema>\n\nexport const NotebaseColumnUpdateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnUpdateOutput = z.infer<typeof NotebaseColumnUpdateOutputSchema>\n\nexport const NotebaseColumnDeleteInputSchema = z.object({\n notebaseColumnId: z.uuid(),\n})\nexport type NotebaseColumnDeleteInput = z.infer<typeof NotebaseColumnDeleteInputSchema>\n\nexport const NotebaseColumnDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnDeleteOutput = z.infer<typeof NotebaseColumnDeleteOutputSchema>\n\nexport const NotebaseColumnReorderInputSchema = z.object({\n notebaseId: z.uuid(),\n ids: z.array(z.uuid()),\n})\nexport type NotebaseColumnReorderInput = z.infer<typeof NotebaseColumnReorderInputSchema>\n\nexport const NotebaseColumnReorderOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnReorderOutput = z.infer<typeof NotebaseColumnReorderOutputSchema>\n","import { z } from \"zod\"\n\nexport const notebaseRowCellsSchema = z.record(z.string(), z.unknown())\n\nexport const notebaseRowSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n cells: notebaseRowCellsSchema,\n position: z.number(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type NotebaseRow = z.infer<typeof notebaseRowSchema>\n\nexport const notebaseRowCreateDataSchema = z.object({\n id: z.uuid().optional(),\n cells: notebaseRowCellsSchema.optional(),\n}).strict()\nexport type NotebaseRowCreateData = z.infer<typeof notebaseRowCreateDataSchema>\n\nexport const notebaseRowUpdateDataSchema = z.object({\n cells: notebaseRowCellsSchema.optional(),\n}).strict()\nexport type NotebaseRowUpdateData = z.infer<typeof notebaseRowUpdateDataSchema>\n\nexport const NotebaseRowCreateInputSchema = z.object({\n notebaseId: z.uuid(),\n data: notebaseRowCreateDataSchema,\n})\nexport type NotebaseRowCreateInput = z.infer<typeof NotebaseRowCreateInputSchema>\n\nexport const NotebaseRowCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowCreateOutput = z.infer<typeof NotebaseRowCreateOutputSchema>\n\nexport const NotebaseRowUpdateInputSchema = z.object({\n notebaseRowId: z.uuid(),\n data: notebaseRowUpdateDataSchema,\n})\nexport type NotebaseRowUpdateInput = z.infer<typeof NotebaseRowUpdateInputSchema>\n\nexport const NotebaseRowUpdateOutputSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n cells: notebaseRowCellsSchema,\n position: z.number().int(),\n createdAt: z.date(),\n updatedAt: z.date(),\n txid: z.number(),\n})\nexport type NotebaseRowUpdateOutput = z.infer<typeof NotebaseRowUpdateOutputSchema>\n\nexport const NotebaseRowDeleteInputSchema = z.object({\n notebaseRowId: z.uuid(),\n})\nexport type NotebaseRowDeleteInput = z.infer<typeof NotebaseRowDeleteInputSchema>\n\nexport const NotebaseRowDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowDeleteOutput = z.infer<typeof NotebaseRowDeleteOutputSchema>\n\nexport const NotebaseRowReorderInputSchema = z.object({\n notebaseId: z.uuid(),\n ids: z.array(z.uuid()),\n})\nexport type NotebaseRowReorderInput = z.infer<typeof NotebaseRowReorderInputSchema>\n\nexport const NotebaseRowReorderOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowReorderOutput = z.infer<typeof NotebaseRowReorderOutputSchema>\n","import { z } from \"zod\"\n\nexport const notebaseViewTypeSchema = z.enum([\"table\", \"kanban\", \"gallery\"])\nexport type NotebaseViewType = z.infer<typeof notebaseViewTypeSchema>\n\nexport const notebaseViewConfigSchema = z.object({\n notebaseColumnWidths: z.record(z.string(), z.number()).optional(),\n hiddenNotebaseColumns: z.array(z.string()).optional(),\n groupByNotebaseColumnId: z.string().optional(),\n}).catchall(z.unknown())\nexport type NotebaseViewConfig = z.infer<typeof notebaseViewConfigSchema>\n\nexport const notebaseViewFilterSchema = z.object({\n notebaseColumnId: z.string(),\n operator: z.string(),\n value: z.unknown(),\n}).strict()\nexport type NotebaseViewFilter = z.infer<typeof notebaseViewFilterSchema>\n\nexport const notebaseViewFiltersSchema = z.array(notebaseViewFilterSchema)\n\nexport const notebaseViewSortSchema = z.object({\n notebaseColumnId: z.string(),\n direction: z.enum([\"asc\", \"desc\"]),\n}).strict()\nexport type NotebaseViewSort = z.infer<typeof notebaseViewSortSchema>\n\nexport const notebaseViewSortsSchema = z.array(notebaseViewSortSchema)\n\nexport const notebaseViewCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n type: notebaseViewTypeSchema,\n config: notebaseViewConfigSchema.optional(),\n filters: notebaseViewFiltersSchema.optional(),\n sorts: notebaseViewSortsSchema.optional(),\n}).strict()\nexport type NotebaseViewCreateData = z.infer<typeof notebaseViewCreateDataSchema>\n\nexport const notebaseViewUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n type: notebaseViewTypeSchema.optional(),\n config: notebaseViewConfigSchema.optional(),\n filters: notebaseViewFiltersSchema.optional(),\n sorts: notebaseViewSortsSchema.optional(),\n}).strict()\nexport type NotebaseViewUpdateData = z.infer<typeof notebaseViewUpdateDataSchema>\n\nexport const notebaseViewSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n name: z.string(),\n type: notebaseViewTypeSchema,\n config: notebaseViewConfigSchema.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 NotebaseView = z.infer<typeof notebaseViewSchema>\n","import { notebaseColumnConfigSchema, schedulingParamsShape, srsWeightsSchema } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\nimport { notebaseColumnSchema } from \"./notebase-column\"\nimport { notebaseRowSchema } from \"./notebase-row\"\nimport { notebaseViewSchema } from \"./notebase-view\"\n\nexport const NotebaseListInputSchema = z.object({})\nexport type NotebaseListInput = z.infer<typeof NotebaseListInputSchema>\n\nexport const NotebaseListItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n})\nexport type NotebaseListItem = z.infer<typeof NotebaseListItemSchema>\n\nexport const NotebaseListOutputSchema = z.array(NotebaseListItemSchema)\nexport type NotebaseListOutput = z.infer<typeof NotebaseListOutputSchema>\n\nexport const notebaseSchema = z.object({\n id: z.string(),\n userId: z.string(),\n name: z.string(),\n srsNewPerDay: schedulingParamsShape.newPerDay,\n srsReviewsPerDay: schedulingParamsShape.reviewsPerDay,\n srsDesiredRetention: schedulingParamsShape.desiredRetention,\n srsEnableShortTerm: schedulingParamsShape.enableShortTerm,\n srsMaximumInterval: schedulingParamsShape.maximumInterval,\n srsLearningSteps: schedulingParamsShape.learningSteps,\n srsRelearningSteps: schedulingParamsShape.relearningSteps,\n srsLeechThreshold: schedulingParamsShape.leechThreshold,\n srsEnableFuzz: schedulingParamsShape.enableFuzz,\n srsWeights: srsWeightsSchema.nullable(),\n createdAt: z.date(),\n updatedAt: z.date(),\n})\nexport type Notebase = z.infer<typeof notebaseSchema>\n\nexport const notebaseCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n options: z.object({\n initialColumns: z.array(z.object({\n id: z.uuid(),\n name: z.string().min(1),\n config: notebaseColumnConfigSchema,\n }).strict()).min(1),\n initialRow: z.object({\n id: z.uuid().optional(),\n cells: z.record(z.string(), z.unknown()),\n }).strict().optional(),\n }).strict().optional(),\n}).strict()\nexport type NotebaseCreateData = z.infer<typeof notebaseCreateDataSchema>\n\nexport const NotebaseCreateInputSchema = notebaseCreateDataSchema\nexport type NotebaseCreateInput = z.infer<typeof NotebaseCreateInputSchema>\n\nexport const NotebaseCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseCreateOutput = z.infer<typeof NotebaseCreateOutputSchema>\n\nexport const notebaseUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n}).strict()\nexport type NotebaseUpdateData = z.infer<typeof notebaseUpdateDataSchema>\n\nexport const NotebaseUpdateInputSchema = notebaseUpdateDataSchema.extend({\n id: z.uuid(),\n})\nexport type NotebaseUpdateInput = z.infer<typeof NotebaseUpdateInputSchema>\n\nexport const NotebaseUpdateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseUpdateOutput = z.infer<typeof NotebaseUpdateOutputSchema>\n\nexport const NotebaseDeleteInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseDeleteInput = z.infer<typeof NotebaseDeleteInputSchema>\n\nexport const NotebaseDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseDeleteOutput = z.infer<typeof NotebaseDeleteOutputSchema>\n\n// Get endpoint schemas\nexport const NotebaseGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseGetInput = z.infer<typeof NotebaseGetInputSchema>\n\nexport const NotebaseGetSchemaInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseGetSchemaInput = z.infer<typeof NotebaseGetSchemaInputSchema>\n\nexport const NotebaseGetOutputSchema = notebaseSchema.extend({\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n notebaseColumns: z.array(notebaseColumnSchema),\n notebaseRows: z.array(notebaseRowSchema),\n notebaseViews: z.array(notebaseViewSchema),\n})\nexport type NotebaseGetOutput = z.infer<typeof NotebaseGetOutputSchema>\n\nexport const NotebaseGetSchemaOutputSchema = z.object({\n id: z.string(),\n name: z.string(),\n updatedAt: z.coerce.date(),\n notebaseColumns: z.array(notebaseColumnSchema),\n})\nexport type NotebaseGetSchemaOutput = z.infer<typeof NotebaseGetSchemaOutputSchema>\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseCreateInputSchema,\n NotebaseCreateOutputSchema,\n NotebaseDeleteInputSchema,\n NotebaseDeleteOutputSchema,\n NotebaseGetInputSchema,\n NotebaseGetOutputSchema,\n NotebaseGetSchemaInputSchema,\n NotebaseGetSchemaOutputSchema,\n NotebaseListInputSchema,\n NotebaseListOutputSchema,\n NotebaseUpdateInputSchema,\n NotebaseUpdateOutputSchema,\n} from \"#/schemas/notebase\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseContract = {\n list: notebaseProcedure\n .route({\n method: \"GET\",\n path: \"/notebases\",\n summary: \"List notebases\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseListInputSchema)\n .output(NotebaseListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/notebases/{id}\",\n summary: \"Get notebase with notebase columns, rows, and views\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseGetInputSchema)\n .output(NotebaseGetOutputSchema),\n\n getSchema: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/notebases/{id}/schema\",\n summary: \"Get notebase schema\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseGetSchemaInputSchema)\n .output(NotebaseGetSchemaOutputSchema),\n\n create: notebaseProcedure\n .route({\n method: \"POST\",\n path: \"/notebases\",\n summary: \"Create notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseCreateInputSchema)\n .output(NotebaseCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"PUT\",\n path: \"/notebases/{id}\",\n summary: \"Update notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseUpdateInputSchema)\n .output(NotebaseUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"DELETE\",\n path: \"/notebases/{id}\",\n summary: \"Delete notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseDeleteInputSchema)\n .output(NotebaseDeleteOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseColumnCreateInputSchema,\n NotebaseColumnCreateOutputSchema,\n NotebaseColumnDeleteInputSchema,\n NotebaseColumnDeleteOutputSchema,\n NotebaseColumnReorderInputSchema,\n NotebaseColumnReorderOutputSchema,\n NotebaseColumnUpdateInputSchema,\n NotebaseColumnUpdateOutputSchema,\n} from \"#/schemas/notebase-column\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseColumnContract = {\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-columns\",\n summary: \"Create notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnCreateInputSchema)\n .output(NotebaseColumnCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_COLUMN_NOT_FOUND\"))\n .route({\n method: \"PATCH\",\n path: \"/notebase-columns/{notebaseColumnId}\",\n summary: \"Update notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnUpdateInputSchema)\n .output(NotebaseColumnUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"NOTEBASE_COLUMN_NOT_FOUND\",\n \"PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED\",\n \"CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE\",\n \"CONCURRENT_POSITION_CONFLICT\",\n ))\n .route({\n method: \"DELETE\",\n path: \"/notebase-columns/{notebaseColumnId}\",\n summary: \"Delete notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnDeleteInputSchema)\n .output(NotebaseColumnDeleteOutputSchema),\n\n reorder: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-columns/reorder\",\n summary: \"Reorder notebase columns\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnReorderInputSchema)\n .output(NotebaseColumnReorderOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseRowCreateInputSchema,\n NotebaseRowCreateOutputSchema,\n NotebaseRowDeleteInputSchema,\n NotebaseRowDeleteOutputSchema,\n NotebaseRowReorderInputSchema,\n NotebaseRowReorderOutputSchema,\n NotebaseRowUpdateInputSchema,\n NotebaseRowUpdateOutputSchema,\n} from \"#/schemas/notebase-row\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseRowContract = {\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"NOTEBASE_NOT_FOUND\",\n \"CELL_VALIDATION_FAILED\",\n \"CONCURRENT_POSITION_CONFLICT\",\n ))\n .route({\n method: \"POST\",\n path: \"/notebase-rows\",\n summary: \"Create notebase row\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowCreateInputSchema)\n .output(NotebaseRowCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_ROW_NOT_FOUND\", \"CELL_VALIDATION_FAILED\"))\n .route({\n method: \"PATCH\",\n path: \"/notebase-rows/{notebaseRowId}\",\n summary: \"Update notebase row cells\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowUpdateInputSchema)\n .output(NotebaseRowUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_ROW_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"DELETE\",\n path: \"/notebase-rows/{notebaseRowId}\",\n summary: \"Delete notebase row\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowDeleteInputSchema)\n .output(NotebaseRowDeleteOutputSchema),\n\n reorder: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-rows/reorder\",\n summary: \"Reorder notebase rows\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowReorderInputSchema)\n .output(NotebaseRowReorderOutputSchema),\n}\n","import { z } from \"zod\"\n\n// @ref https://zenn.dev/herp_inc/articles/js-intl-date-time-format-performance\nconst localeTimeZoneFormatter = new Map<string, Intl.DateTimeFormat>()\nfunction createTimezoneFormatter(timezone: string): Intl.DateTimeFormat {\n let formatter = localeTimeZoneFormatter.get(timezone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(\"en-US\", { timeZone: timezone })\n localeTimeZoneFormatter.set(timezone, formatter)\n }\n return formatter\n}\n\nexport const timezoneSchema = z.string().trim().min(1).refine((timezone) => {\n try {\n createTimezoneFormatter(timezone).format(new Date())\n return true\n }\n catch {\n return false\n }\n}, \"Invalid timezone\")\nexport type Timezone = z.infer<typeof timezoneSchema>\n","import {\n cardStateSchema,\n fsrsReviewLogSnapshotSchema,\n reviewRatingSchema,\n scheduleStatusSchema,\n schedulingParamsSchema,\n SRS_REVIEW_DURATION_MS_MAX,\n srsStepSchema,\n} from \"@read-frog/definitions\"\nimport { z } from \"zod\"\nimport { cardSchema } from \"./card\"\nimport { timezoneSchema } from \"./timezone\"\n\nexport {\n reviewRatingSchema,\n schedulingParamsSchema,\n SRS_REVIEW_DURATION_MS_MAX,\n}\nexport { timezoneSchema } from \"./timezone\"\nexport type { Timezone } from \"./timezone\"\nexport type { ReviewRating, SchedulingParams } from \"@read-frog/definitions\"\n\nexport const stepSchema = srsStepSchema\nexport type Step = z.infer<typeof stepSchema>\n\nexport const SRS_REVIEW_CLIENT_ID_NAMESPACE = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"\nconst srsReviewClientIdNamePrefix = \"readfrog:srs-review\"\nconst nullLastReviewTimeSentinel = \"null\"\n\nexport interface SrsReviewClientIdCard {\n id: string\n lastReviewTime: Date | string | null\n}\n\nexport async function createSrsReviewClientId(card: SrsReviewClientIdCard) {\n return uuidV5(\n `${srsReviewClientIdNamePrefix}:${card.id}:${formatLastReviewTime(card.lastReviewTime)}`,\n SRS_REVIEW_CLIENT_ID_NAMESPACE,\n )\n}\n\nexport const srsReviewInputSchema = z.object({\n cardId: z.uuid(),\n id: z.uuid().optional(),\n rating: reviewRatingSchema,\n durationMs: z.number().int().min(0).max(SRS_REVIEW_DURATION_MS_MAX),\n timezone: timezoneSchema,\n}).strict()\nexport type SrsReviewInput = z.infer<typeof srsReviewInputSchema>\n\nexport const srsRollbackReviewInputSchema = z.object({\n cardId: z.uuid(),\n}).strict()\nexport type SrsRollbackReviewInput = z.infer<typeof srsRollbackReviewInputSchema>\n\nexport const srsRevlogSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n cardId: z.uuid(),\n rating: reviewRatingSchema,\n state: cardStateSchema,\n afterScheduleStatus: scheduleStatusSchema,\n reviewedAt: z.coerce.date(),\n durationMs: z.number().int(),\n fsrsReviewLogSnapshot: fsrsReviewLogSnapshotSchema,\n createdAt: z.coerce.date(),\n})\nexport type SrsRevlog = z.infer<typeof srsRevlogSchema>\n\nexport const srsReviewOutputSchema = z.object({\n card: cardSchema,\n revlog: srsRevlogSchema,\n txid: z.number(),\n})\nexport type SrsReviewOutput = z.infer<typeof srsReviewOutputSchema>\n\nexport const srsRollbackReviewOutputSchema = z.object({\n card: cardSchema,\n rolledBackRevlogId: z.uuid(),\n txid: z.number(),\n})\nexport type SrsRollbackReviewOutput = z.infer<typeof srsRollbackReviewOutputSchema>\n\nfunction formatLastReviewTime(lastReviewTime: Date | string | null) {\n return lastReviewTime ? new Date(lastReviewTime).toISOString() : nullLastReviewTimeSentinel\n}\n\nasync function uuidV5(name: string, namespace: string) {\n const namespaceBytes = uuidToBytes(namespace)\n const nameBytes = new TextEncoder().encode(name)\n const input = new Uint8Array(namespaceBytes.length + nameBytes.length)\n input.set(namespaceBytes)\n input.set(nameBytes, namespaceBytes.length)\n\n const hash = new Uint8Array(await crypto.subtle.digest(\"SHA-1\", input))\n const bytes = hash.slice(0, 16)\n const versionByte = bytes[6]\n const variantByte = bytes[8]\n if (versionByte === undefined || variantByte === undefined) {\n throw new Error(\"SHA-1 digest was too short\")\n }\n bytes[6] = (versionByte & 0x0F) | 0x50\n bytes[8] = (variantByte & 0x3F) | 0x80\n\n return bytesToUuid(bytes)\n}\n\nfunction uuidToBytes(uuid: string) {\n const hex = uuid.replaceAll(\"-\", \"\").toLowerCase()\n if (!/^[0-9a-f]{32}$/.test(hex)) {\n throw new Error(\"Invalid UUID namespace\")\n }\n\n return new Uint8Array(\n Array.from({ length: 16 }, (_, index) =>\n Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16)),\n )\n}\n\nfunction bytesToUuid(bytes: Uint8Array) {\n const hex = Array.from(bytes, byte => byte.toString(16).padStart(2, \"0\"))\n return [\n hex.slice(0, 4).join(\"\"),\n hex.slice(4, 6).join(\"\"),\n hex.slice(6, 8).join(\"\"),\n hex.slice(8, 10).join(\"\"),\n hex.slice(10, 16).join(\"\"),\n ].join(\"-\")\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n srsReviewInputSchema,\n srsReviewOutputSchema,\n srsRollbackReviewInputSchema,\n srsRollbackReviewOutputSchema,\n} from \"#/schemas/srs\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const srsContract = {\n review: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_NOT_REVIEWABLE\",\n \"CARD_REVIEW_STATE_STALE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/review\",\n summary: \"Review a card with SRS scheduling\",\n tags: [\"SRS\"],\n })\n .input(srsReviewInputSchema)\n .output(srsReviewOutputSchema),\n rollbackReview: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_REVIEW_ROLLBACK_UNAVAILABLE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/review/rollback\",\n summary: \"Roll back the latest SRS review for a card\",\n tags: [\"SRS\"],\n })\n .input(srsRollbackReviewInputSchema)\n .output(srsRollbackReviewOutputSchema),\n}\n","import { z } from \"zod\"\nimport { timezoneSchema } from \"./timezone\"\n\nexport const userEnsureTimezoneInputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserEnsureTimezoneInput = z.infer<typeof userEnsureTimezoneInputSchema>\n\nexport const userEnsureTimezoneOutputSchema = z.object({\n timezone: timezoneSchema,\n updated: z.boolean(),\n}).strict()\nexport type UserEnsureTimezoneOutput = z.infer<typeof userEnsureTimezoneOutputSchema>\n\nexport const userUpdateTimezoneInputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserUpdateTimezoneInput = z.infer<typeof userUpdateTimezoneInputSchema>\n\nexport const userUpdateTimezoneOutputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserUpdateTimezoneOutput = z.infer<typeof userUpdateTimezoneOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport {\n userEnsureTimezoneInputSchema,\n userEnsureTimezoneOutputSchema,\n userUpdateTimezoneInputSchema,\n userUpdateTimezoneOutputSchema,\n} from \"#/schemas/user\"\n\nexport const userContract = {\n ensureTimezone: oc\n .route({\n method: \"POST\",\n path: \"/users/me/timezone/ensure\",\n summary: \"Ensure the authenticated user has a timezone\",\n tags: [\"Users\"],\n })\n .input(userEnsureTimezoneInputSchema)\n .output(userEnsureTimezoneOutputSchema),\n updateTimezone: oc\n .route({\n method: \"PATCH\",\n path: \"/users/me/timezone\",\n summary: \"Update the authenticated user's timezone\",\n tags: [\"Users\"],\n })\n .input(userUpdateTimezoneInputSchema)\n .output(userUpdateTimezoneOutputSchema),\n}\n","import type { ContractRouterClient } from \"@orpc/contract\"\nimport { betaAccessContract } from \"./contracts/beta-access\"\nimport { cardContract } from \"./contracts/card\"\nimport { cardTemplateContract } from \"./contracts/card-template\"\nimport { notebaseContract } from \"./contracts/notebase\"\nimport { notebaseColumnContract } from \"./contracts/notebase-column\"\nimport { notebaseRowContract } from \"./contracts/notebase-row\"\nimport { srsContract } from \"./contracts/srs\"\nimport { userContract } from \"./contracts/user\"\n\nexport const contract = {\n betaAccess: betaAccessContract,\n card: cardContract,\n cardTemplate: cardTemplateContract,\n notebase: notebaseContract,\n notebaseColumn: notebaseColumnContract,\n notebaseRow: notebaseRowContract,\n srs: srsContract,\n user: userContract,\n}\n\nexport type ORPCRouterClient = ContractRouterClient<typeof contract>\n\nexport * from \"./public-errors\"\nexport * from \"./schemas/beta-access\"\nexport * from \"./schemas/card\"\nexport * from \"./schemas/notebase\"\nexport * from \"./schemas/notebase-column\"\nexport * from \"./schemas/notebase-row\"\nexport * from \"./schemas/notebase-view\"\nexport * from \"./schemas/srs\"\nexport * from \"./schemas/timezone\"\nexport * from \"./schemas/user\"\n"],"mappings":";;;;AAGA,MAAa,uBAAuB,EAAE,KAAK,iBAAiB;AAG5D,MAAa,8BAA8B,EAAE,OAAO,EAClD,YAAY,qBACd,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,+BAA+B,EA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b,MAAM;GACL,QAAQ;GACR,MAAM;GACN,SAAS;GACT,MAAM,CAAC,OAAO;EAChB,CAAC,CAAC,CACD,MAAM,6BAA6B,CAAC,CACpC,OAAO,8BAA8B;CCRlC;AACR"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["cardStateSchema","scheduleStatusSchema"],"sources":["../src/schemas/beta-access.ts","../src/contracts/beta-access.ts","../src/public-errors.ts","../src/schemas/card.ts","../src/contracts/shared.ts","../src/contracts/card.ts","../src/contracts/card-template.ts","../src/schemas/hosted-ai.ts","../src/contracts/hosted-ai.ts","../src/schemas/notebase-column.ts","../src/schemas/notebase-row.ts","../src/schemas/notebase-view.ts","../src/schemas/notebase.ts","../src/contracts/notebase.ts","../src/contracts/notebase-column.ts","../src/contracts/notebase-row.ts","../src/schemas/timezone.ts","../src/schemas/srs.ts","../src/contracts/srs.ts","../src/schemas/user.ts","../src/contracts/user.ts","../src/index.ts"],"sourcesContent":["import { BETA_FEATURE_KEYS } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport const BetaFeatureKeySchema = z.enum(BETA_FEATURE_KEYS)\nexport type BetaFeatureKey = z.infer<typeof BetaFeatureKeySchema>\n\nexport const BetaAccessStatusInputSchema = z.object({\n featureKey: BetaFeatureKeySchema,\n}).strict()\nexport type BetaAccessStatusInput = z.infer<typeof BetaAccessStatusInputSchema>\n\nexport const BetaAccessStatusOutputSchema = z.object({\n featureKey: BetaFeatureKeySchema,\n allowed: z.boolean(),\n})\nexport type BetaAccessStatusOutput = z.infer<typeof BetaAccessStatusOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport {\n BetaAccessStatusInputSchema,\n BetaAccessStatusOutputSchema,\n} from \"#/schemas/beta-access\"\n\nexport const betaAccessContract = {\n status: oc\n .route({\n method: \"GET\",\n path: \"/beta-access/status\",\n summary: \"Get beta access status for a feature\",\n tags: [\"Beta Access\"],\n })\n .input(BetaAccessStatusInputSchema)\n .output(BetaAccessStatusOutputSchema),\n}\n","import type { ErrorMap } from \"@orpc/contract\"\nimport { z } from \"zod\"\n\ninterface PublicAppErrorDefinition {\n data?: z.ZodTypeAny\n message: string\n status: number\n}\n\nexport const CellValidationFailureReasonSchema = z.enum([\n \"unknown_notebase_column\",\n \"type_mismatch\",\n \"invalid_select_option\",\n \"invalid_date_format\",\n])\nexport type CellValidationFailureReason = z.infer<typeof CellValidationFailureReasonSchema>\n\nexport const CellValidationFailureDetailsSchema = z.object({\n expectedFormat: z.string().optional(),\n expectedType: z.string().optional(),\n receivedType: z.string().optional(),\n receivedValue: z.unknown().optional(),\n validOptions: z.array(z.string()).optional(),\n}).strict()\nexport type CellValidationFailureDetails = z.infer<typeof CellValidationFailureDetailsSchema>\n\nexport const CellValidationFailedDataSchema = z.object({\n notebaseColumnId: z.string(),\n details: CellValidationFailureDetailsSchema,\n reason: CellValidationFailureReasonSchema,\n}).strict()\nexport type CellValidationFailedData = z.infer<typeof CellValidationFailedDataSchema>\n\nexport const CardTemplateInvalidColumnsDataSchema = z.object({\n notebaseColumnIds: z.array(z.string()),\n}).strict()\nexport type CardTemplateInvalidColumnsData = z.infer<typeof CardTemplateInvalidColumnsDataSchema>\n\nexport const PUBLIC_APP_ERROR_DEFS = {\n NOTEBASE_BETA_RESTRICTED: {\n message: \"Notebase is currently in beta for selected accounts\",\n status: 403,\n },\n NOTEBASE_NOT_FOUND: {\n message: \"Notebase not found\",\n status: 404,\n },\n NOTEBASE_COLUMN_NOT_FOUND: {\n message: \"Notebase column not found\",\n status: 404,\n },\n NOTEBASE_ROW_NOT_FOUND: {\n message: \"Notebase row not found\",\n status: 404,\n },\n CARD_NOT_FOUND: {\n message: \"Card not found\",\n status: 404,\n },\n CARD_TEMPLATE_NOT_FOUND: {\n message: \"Card template not found\",\n status: 404,\n },\n CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS: {\n data: CardTemplateInvalidColumnsDataSchema,\n message: \"Card template references unknown notebase columns\",\n status: 422,\n },\n CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE: {\n message: \"Notebase column is used by a card template\",\n status: 409,\n },\n CARD_NOT_REVIEWABLE: {\n message: \"Card cannot be reviewed in its current state\",\n status: 409,\n },\n CARD_REVIEW_STATE_STALE: {\n message: \"Card review state is stale\",\n status: 409,\n },\n CARD_REVIEW_ROLLBACK_UNAVAILABLE: {\n message: \"Card review cannot be rolled back\",\n status: 409,\n },\n CARD_ALREADY_BURIED: {\n message: \"Card is already buried\",\n status: 409,\n },\n CARD_NOT_BURIED: {\n message: \"Card is not buried\",\n status: 409,\n },\n CARD_ALREADY_SUSPENDED: {\n message: \"Card is already suspended\",\n status: 409,\n },\n CARD_NOT_SUSPENDED: {\n message: \"Card is not suspended\",\n status: 409,\n },\n CARD_STATUS_CHANGE_UNAVAILABLE: {\n message: \"Card status change is unavailable\",\n status: 409,\n },\n NOTEBASE_VIEW_NOT_FOUND: {\n message: \"Notebase view not found\",\n status: 404,\n },\n CELL_VALIDATION_FAILED: {\n data: CellValidationFailedDataSchema,\n message: \"Cell validation failed\",\n status: 422,\n },\n PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED: {\n message: \"Cannot delete primary notebase column\",\n status: 400,\n },\n CONCURRENT_POSITION_CONFLICT: {\n message: \"Concurrent position conflict, please retry\",\n status: 409,\n },\n} as const satisfies Record<string, PublicAppErrorDefinition>\n\nexport type PublicAppErrorCode = keyof typeof PUBLIC_APP_ERROR_DEFS\n\nexport type PublicAppErrorData<TCode extends PublicAppErrorCode>\n = (typeof PUBLIC_APP_ERROR_DEFS)[TCode] extends { data: infer TSchema extends z.ZodTypeAny }\n ? z.output<TSchema>\n : undefined\n\nexport function isPublicAppErrorCode(code: string | undefined): code is PublicAppErrorCode {\n return code !== undefined && code in PUBLIC_APP_ERROR_DEFS\n}\n\nexport function getPublicErrorDefinition<TCode extends PublicAppErrorCode>(code: TCode) {\n return PUBLIC_APP_ERROR_DEFS[code]\n}\n\nexport function pickPublicErrorMap<const TCodes extends readonly PublicAppErrorCode[]>(\n ...codes: TCodes\n) {\n return Object.fromEntries(codes.map((code) => {\n const definition = PUBLIC_APP_ERROR_DEFS[code]\n\n if (\"data\" in definition) {\n return [code, {\n data: definition.data,\n message: definition.message,\n status: definition.status,\n }]\n }\n\n return [code, {\n message: definition.message,\n status: definition.status,\n }]\n })) as Pick<ErrorMap, TCodes[number]>\n}\n","import {\n cardIdentityShape,\n cardMemoryStateShape,\n cardStateSchema,\n cardTemplateConfigSchema,\n scheduleStatusSchema,\n} from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport {\n cardStateSchema,\n scheduleStatusSchema,\n}\nexport type { CardState, ScheduleStatus } from \"@read-frog/definitions\"\n\nexport const cardTemplateSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n name: z.string(),\n config: cardTemplateConfigSchema,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type CardTemplate = z.infer<typeof cardTemplateSchema>\n\nexport const CardTemplateListInputSchema = z.object({\n notebaseId: z.uuid(),\n})\nexport type CardTemplateListInput = z.infer<typeof CardTemplateListInputSchema>\n\nexport const CardTemplateListOutputSchema = z.array(cardTemplateSchema)\nexport type CardTemplateListOutput = z.infer<typeof CardTemplateListOutputSchema>\n\nexport const CardTemplateGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardTemplateGetInput = z.infer<typeof CardTemplateGetInputSchema>\n\nexport const CardTemplateGetOutputSchema = cardTemplateSchema\nexport type CardTemplateGetOutput = z.infer<typeof CardTemplateGetOutputSchema>\n\nexport const CardTemplateCreateInputSchema = z.object({\n id: z.uuid().optional(),\n notebaseId: z.uuid(),\n name: z.string().min(1),\n config: cardTemplateConfigSchema,\n}).strict()\nexport type CardTemplateCreateInput = z.infer<typeof CardTemplateCreateInputSchema>\n\nexport const CardTemplateCreateOutputSchema = cardTemplateSchema.extend({\n txid: z.number(),\n})\nexport type CardTemplateCreateOutput = z.infer<typeof CardTemplateCreateOutputSchema>\n\nexport const CardTemplateUpdateInputSchema = z.object({\n id: z.uuid(),\n name: z.string().min(1).optional(),\n config: cardTemplateConfigSchema.optional(),\n}).strict()\nexport type CardTemplateUpdateInput = z.infer<typeof CardTemplateUpdateInputSchema>\n\nexport const CardTemplateUpdateOutputSchema = cardTemplateSchema.extend({\n txid: z.number(),\n})\nexport type CardTemplateUpdateOutput = z.infer<typeof CardTemplateUpdateOutputSchema>\n\nexport const CardTemplateDeleteInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardTemplateDeleteInput = z.infer<typeof CardTemplateDeleteInputSchema>\n\nexport const CardTemplateDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type CardTemplateDeleteOutput = z.infer<typeof CardTemplateDeleteOutputSchema>\n\nexport const cardSchema = z.object({\n ...cardIdentityShape,\n ...cardMemoryStateShape,\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type Card = z.infer<typeof cardSchema>\n\nexport const renderedCardSchema = cardSchema.extend({\n front: z.string(),\n back: z.string(),\n})\nexport type RenderedCard = z.infer<typeof renderedCardSchema>\n\nexport const CardListInputSchema = z.object({\n notebaseId: z.uuid(),\n templateId: z.uuid().optional(),\n limit: z.number().int().min(1).max(500).optional(),\n offset: z.number().int().min(0).optional(),\n})\nexport type CardListInput = z.infer<typeof CardListInputSchema>\n\nexport const CardListOutputSchema = z.array(renderedCardSchema)\nexport type CardListOutput = z.infer<typeof CardListOutputSchema>\n\nexport const CardGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type CardGetInput = z.infer<typeof CardGetInputSchema>\n\nexport const CardGetOutputSchema = renderedCardSchema\nexport type CardGetOutput = z.infer<typeof CardGetOutputSchema>\n\nexport const CardGenerateInputSchema = z.object({\n notebaseId: z.uuid(),\n templateId: z.uuid().optional(),\n})\nexport type CardGenerateInput = z.infer<typeof CardGenerateInputSchema>\n\nexport const CardGenerateOutputSchema = z.object({\n created: z.number().int().min(0),\n txid: z.number(),\n})\nexport type CardGenerateOutput = z.infer<typeof CardGenerateOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport { pickPublicErrorMap } from \"#/public-errors\"\n\nexport const notebaseProcedure = oc.errors(\n pickPublicErrorMap(\"NOTEBASE_BETA_RESTRICTED\"),\n)\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n CardGenerateInputSchema,\n CardGenerateOutputSchema,\n CardGetInputSchema,\n CardGetOutputSchema,\n CardListInputSchema,\n CardListOutputSchema,\n} from \"#/schemas/card\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const cardContract = {\n list: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/cards\",\n summary: \"List rendered cards\",\n tags: [\"Cards\"],\n })\n .input(CardListInputSchema)\n .output(CardListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/cards/{id}\",\n summary: \"Get rendered card\",\n tags: [\"Cards\"],\n })\n .input(CardGetInputSchema)\n .output(CardGetOutputSchema),\n\n generate: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"POST\",\n path: \"/cards/generate\",\n summary: \"Generate missing cards\",\n tags: [\"Cards\"],\n })\n .input(CardGenerateInputSchema)\n .output(CardGenerateOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n CardTemplateCreateInputSchema,\n CardTemplateCreateOutputSchema,\n CardTemplateDeleteInputSchema,\n CardTemplateDeleteOutputSchema,\n CardTemplateGetInputSchema,\n CardTemplateGetOutputSchema,\n CardTemplateListInputSchema,\n CardTemplateListOutputSchema,\n CardTemplateUpdateInputSchema,\n CardTemplateUpdateOutputSchema,\n} from \"#/schemas/card\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const cardTemplateContract = {\n list: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/card-templates\",\n summary: \"List card templates\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateListInputSchema)\n .output(CardTemplateListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/card-templates/{id}\",\n summary: \"Get card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateGetInputSchema)\n .output(CardTemplateGetOutputSchema),\n\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS\"))\n .route({\n method: \"POST\",\n path: \"/card-templates\",\n summary: \"Create card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateCreateInputSchema)\n .output(CardTemplateCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\", \"CARD_TEMPLATE_INVALID_NOTEBASE_COLUMNS\"))\n .route({\n method: \"PATCH\",\n path: \"/card-templates/{id}\",\n summary: \"Update card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateUpdateInputSchema)\n .output(CardTemplateUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"CARD_TEMPLATE_NOT_FOUND\"))\n .route({\n method: \"DELETE\",\n path: \"/card-templates/{id}\",\n summary: \"Delete card template\",\n tags: [\"Card Templates\"],\n })\n .input(CardTemplateDeleteInputSchema)\n .output(CardTemplateDeleteOutputSchema),\n}\n","import { z } from \"zod\"\n\nexport const HostedAiOutputFieldTypeSchema = z.enum([\"string\", \"number\"])\n\nexport const HostedAiOutputFieldSchema = z.strictObject({\n name: z.string().trim().min(1).max(80),\n type: HostedAiOutputFieldTypeSchema,\n})\n\nexport const HostedAiStreamTextInputSchema = z.strictObject({\n system: z.string().trim().min(1).max(16000),\n prompt: z.string().trim().min(1).max(32000),\n temperature: z.number().min(0).max(2).optional(),\n})\n\nexport const HostedAiStreamStructuredObjectInputSchema = z.strictObject({\n system: z.string().trim().min(1).max(16000),\n prompt: z.string().trim().min(1).max(32000),\n outputSchema: z.array(HostedAiOutputFieldSchema).min(1).max(32),\n temperature: z.number().min(0).max(2).optional(),\n}).superRefine((input, ctx) => {\n const fieldNames = new Set<string>()\n\n input.outputSchema.forEach((field, index) => {\n if (fieldNames.has(field.name)) {\n ctx.addIssue({\n code: \"custom\",\n message: `Duplicate output schema name \"${field.name}\".`,\n path: [\"outputSchema\", index, \"name\"],\n })\n return\n }\n\n fieldNames.add(field.name)\n })\n})\n\nexport const HostedAiStreamPartSchema = z.looseObject({\n type: z.string().trim().min(1),\n})\n\nexport type HostedAiOutputFieldType = z.infer<typeof HostedAiOutputFieldTypeSchema>\nexport type HostedAiOutputField = z.infer<typeof HostedAiOutputFieldSchema>\nexport type HostedAiStreamTextInput = z.infer<typeof HostedAiStreamTextInputSchema>\nexport type HostedAiStreamStructuredObjectInput = z.infer<typeof HostedAiStreamStructuredObjectInputSchema>\nexport type HostedAiStreamPart = z.infer<typeof HostedAiStreamPartSchema>\n","import { eventIterator, oc } from \"@orpc/contract\"\nimport {\n HostedAiStreamPartSchema,\n HostedAiStreamStructuredObjectInputSchema,\n HostedAiStreamTextInputSchema,\n} from \"#/schemas/hosted-ai\"\n\nexport const hostedAiContract = {\n translate: {\n streamText: oc\n .route({\n method: \"POST\",\n path: \"/hosted-ai/translate/stream-text\",\n summary: \"Stream hosted translation text output\",\n tags: [\"Hosted AI\"],\n })\n .input(HostedAiStreamTextInputSchema)\n .output(eventIterator(HostedAiStreamPartSchema)),\n },\n customAction: {\n streamStructuredObject: oc\n .route({\n method: \"POST\",\n path: \"/hosted-ai/custom-actions/stream-structured-object\",\n summary: \"Stream hosted custom action structured output\",\n tags: [\"Hosted AI\"],\n })\n .input(HostedAiStreamStructuredObjectInputSchema)\n .output(eventIterator(HostedAiStreamPartSchema)),\n },\n}\n","import { NOTEBASE_COLUMN_MAX_WIDTH, NOTEBASE_COLUMN_MIN_WIDTH, notebaseColumnConfigSchema } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport const notebaseColumnWidthSchema = z.number().int().min(NOTEBASE_COLUMN_MIN_WIDTH).max(NOTEBASE_COLUMN_MAX_WIDTH)\n\nexport const notebaseColumnSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n name: z.string(),\n config: notebaseColumnConfigSchema,\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 NotebaseColumn = z.infer<typeof notebaseColumnSchema>\n\nexport const notebaseColumnCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n config: notebaseColumnConfigSchema,\n}).strict()\nexport type NotebaseColumnCreateData = z.infer<typeof notebaseColumnCreateDataSchema>\n\nexport const notebaseColumnUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n config: notebaseColumnConfigSchema.optional(),\n width: notebaseColumnWidthSchema.nullable().optional(),\n}).strict()\nexport type NotebaseColumnUpdateData = z.infer<typeof notebaseColumnUpdateDataSchema>\n\nexport const NotebaseColumnCreateInputSchema = z.object({\n notebaseId: z.uuid(),\n data: notebaseColumnCreateDataSchema,\n})\nexport type NotebaseColumnCreateInput = z.infer<typeof NotebaseColumnCreateInputSchema>\n\nexport const NotebaseColumnCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnCreateOutput = z.infer<typeof NotebaseColumnCreateOutputSchema>\n\nexport const NotebaseColumnUpdateInputSchema = z.object({\n notebaseColumnId: z.uuid(),\n data: notebaseColumnUpdateDataSchema,\n})\nexport type NotebaseColumnUpdateInput = z.infer<typeof NotebaseColumnUpdateInputSchema>\n\nexport const NotebaseColumnUpdateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnUpdateOutput = z.infer<typeof NotebaseColumnUpdateOutputSchema>\n\nexport const NotebaseColumnDeleteInputSchema = z.object({\n notebaseColumnId: z.uuid(),\n})\nexport type NotebaseColumnDeleteInput = z.infer<typeof NotebaseColumnDeleteInputSchema>\n\nexport const NotebaseColumnDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnDeleteOutput = z.infer<typeof NotebaseColumnDeleteOutputSchema>\n\nexport const NotebaseColumnReorderInputSchema = z.object({\n notebaseId: z.uuid(),\n ids: z.array(z.uuid()),\n})\nexport type NotebaseColumnReorderInput = z.infer<typeof NotebaseColumnReorderInputSchema>\n\nexport const NotebaseColumnReorderOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseColumnReorderOutput = z.infer<typeof NotebaseColumnReorderOutputSchema>\n","import { z } from \"zod\"\n\nexport const notebaseRowCellsSchema = z.record(z.string(), z.unknown())\n\nexport const notebaseRowSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n cells: notebaseRowCellsSchema,\n position: z.number(),\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n})\nexport type NotebaseRow = z.infer<typeof notebaseRowSchema>\n\nexport const notebaseRowCreateDataSchema = z.object({\n id: z.uuid().optional(),\n cells: notebaseRowCellsSchema.optional(),\n}).strict()\nexport type NotebaseRowCreateData = z.infer<typeof notebaseRowCreateDataSchema>\n\nexport const notebaseRowUpdateDataSchema = z.object({\n cells: notebaseRowCellsSchema.optional(),\n}).strict()\nexport type NotebaseRowUpdateData = z.infer<typeof notebaseRowUpdateDataSchema>\n\nexport const NotebaseRowCreateInputSchema = z.object({\n notebaseId: z.uuid(),\n data: notebaseRowCreateDataSchema,\n})\nexport type NotebaseRowCreateInput = z.infer<typeof NotebaseRowCreateInputSchema>\n\nexport const NotebaseRowCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowCreateOutput = z.infer<typeof NotebaseRowCreateOutputSchema>\n\nexport const NotebaseRowUpdateInputSchema = z.object({\n notebaseRowId: z.uuid(),\n data: notebaseRowUpdateDataSchema,\n})\nexport type NotebaseRowUpdateInput = z.infer<typeof NotebaseRowUpdateInputSchema>\n\nexport const NotebaseRowUpdateOutputSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n cells: notebaseRowCellsSchema,\n position: z.number().int(),\n createdAt: z.date(),\n updatedAt: z.date(),\n txid: z.number(),\n})\nexport type NotebaseRowUpdateOutput = z.infer<typeof NotebaseRowUpdateOutputSchema>\n\nexport const NotebaseRowDeleteInputSchema = z.object({\n notebaseRowId: z.uuid(),\n})\nexport type NotebaseRowDeleteInput = z.infer<typeof NotebaseRowDeleteInputSchema>\n\nexport const NotebaseRowDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowDeleteOutput = z.infer<typeof NotebaseRowDeleteOutputSchema>\n\nexport const NotebaseRowReorderInputSchema = z.object({\n notebaseId: z.uuid(),\n ids: z.array(z.uuid()),\n})\nexport type NotebaseRowReorderInput = z.infer<typeof NotebaseRowReorderInputSchema>\n\nexport const NotebaseRowReorderOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseRowReorderOutput = z.infer<typeof NotebaseRowReorderOutputSchema>\n","import { z } from \"zod\"\n\nexport const notebaseViewTypeSchema = z.enum([\"table\", \"kanban\", \"gallery\"])\nexport type NotebaseViewType = z.infer<typeof notebaseViewTypeSchema>\n\nexport const notebaseViewConfigSchema = z.object({\n notebaseColumnWidths: z.record(z.string(), z.number()).optional(),\n hiddenNotebaseColumns: z.array(z.string()).optional(),\n groupByNotebaseColumnId: z.string().optional(),\n}).catchall(z.unknown())\nexport type NotebaseViewConfig = z.infer<typeof notebaseViewConfigSchema>\n\nexport const notebaseViewFilterSchema = z.object({\n notebaseColumnId: z.string(),\n operator: z.string(),\n value: z.unknown(),\n}).strict()\nexport type NotebaseViewFilter = z.infer<typeof notebaseViewFilterSchema>\n\nexport const notebaseViewFiltersSchema = z.array(notebaseViewFilterSchema)\n\nexport const notebaseViewSortSchema = z.object({\n notebaseColumnId: z.string(),\n direction: z.enum([\"asc\", \"desc\"]),\n}).strict()\nexport type NotebaseViewSort = z.infer<typeof notebaseViewSortSchema>\n\nexport const notebaseViewSortsSchema = z.array(notebaseViewSortSchema)\n\nexport const notebaseViewCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n type: notebaseViewTypeSchema,\n config: notebaseViewConfigSchema.optional(),\n filters: notebaseViewFiltersSchema.optional(),\n sorts: notebaseViewSortsSchema.optional(),\n}).strict()\nexport type NotebaseViewCreateData = z.infer<typeof notebaseViewCreateDataSchema>\n\nexport const notebaseViewUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n type: notebaseViewTypeSchema.optional(),\n config: notebaseViewConfigSchema.optional(),\n filters: notebaseViewFiltersSchema.optional(),\n sorts: notebaseViewSortsSchema.optional(),\n}).strict()\nexport type NotebaseViewUpdateData = z.infer<typeof notebaseViewUpdateDataSchema>\n\nexport const notebaseViewSchema = z.object({\n id: z.string(),\n notebaseId: z.string(),\n name: z.string(),\n type: notebaseViewTypeSchema,\n config: notebaseViewConfigSchema.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 NotebaseView = z.infer<typeof notebaseViewSchema>\n","import { notebaseColumnConfigSchema, schedulingParamsShape, srsWeightsSchema } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\nimport { notebaseColumnSchema } from \"./notebase-column\"\nimport { notebaseRowSchema } from \"./notebase-row\"\nimport { notebaseViewSchema } from \"./notebase-view\"\n\nexport const NotebaseListInputSchema = z.object({})\nexport type NotebaseListInput = z.infer<typeof NotebaseListInputSchema>\n\nexport const NotebaseListItemSchema = z.object({\n id: z.string(),\n name: z.string(),\n})\nexport type NotebaseListItem = z.infer<typeof NotebaseListItemSchema>\n\nexport const NotebaseListOutputSchema = z.array(NotebaseListItemSchema)\nexport type NotebaseListOutput = z.infer<typeof NotebaseListOutputSchema>\n\nexport const notebaseSchema = z.object({\n id: z.string(),\n userId: z.string(),\n name: z.string(),\n srsNewPerDay: schedulingParamsShape.newPerDay,\n srsReviewsPerDay: schedulingParamsShape.reviewsPerDay,\n srsDesiredRetention: schedulingParamsShape.desiredRetention,\n srsEnableShortTerm: schedulingParamsShape.enableShortTerm,\n srsMaximumInterval: schedulingParamsShape.maximumInterval,\n srsLearningSteps: schedulingParamsShape.learningSteps,\n srsRelearningSteps: schedulingParamsShape.relearningSteps,\n srsLeechThreshold: schedulingParamsShape.leechThreshold,\n srsEnableFuzz: schedulingParamsShape.enableFuzz,\n srsWeights: srsWeightsSchema.nullable(),\n createdAt: z.date(),\n updatedAt: z.date(),\n})\nexport type Notebase = z.infer<typeof notebaseSchema>\n\nexport const notebaseCreateDataSchema = z.object({\n id: z.uuid().optional(),\n name: z.string().min(1),\n options: z.object({\n initialColumns: z.array(z.object({\n id: z.uuid(),\n name: z.string().min(1),\n config: notebaseColumnConfigSchema,\n }).strict()).min(1),\n initialRow: z.object({\n id: z.uuid().optional(),\n cells: z.record(z.string(), z.unknown()),\n }).strict().optional(),\n }).strict().optional(),\n}).strict()\nexport type NotebaseCreateData = z.infer<typeof notebaseCreateDataSchema>\n\nexport const NotebaseCreateInputSchema = notebaseCreateDataSchema\nexport type NotebaseCreateInput = z.infer<typeof NotebaseCreateInputSchema>\n\nexport const NotebaseCreateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseCreateOutput = z.infer<typeof NotebaseCreateOutputSchema>\n\nexport const notebaseUpdateDataSchema = z.object({\n name: z.string().min(1).optional(),\n srsNewPerDay: schedulingParamsShape.newPerDay.optional(),\n srsReviewsPerDay: schedulingParamsShape.reviewsPerDay.optional(),\n}).strict()\nexport type NotebaseUpdateData = z.infer<typeof notebaseUpdateDataSchema>\n\nexport const NotebaseUpdateInputSchema = notebaseUpdateDataSchema.extend({\n id: z.uuid(),\n})\nexport type NotebaseUpdateInput = z.infer<typeof NotebaseUpdateInputSchema>\n\nexport const NotebaseUpdateOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseUpdateOutput = z.infer<typeof NotebaseUpdateOutputSchema>\n\nexport const NotebaseDeleteInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseDeleteInput = z.infer<typeof NotebaseDeleteInputSchema>\n\nexport const NotebaseDeleteOutputSchema = z.object({\n txid: z.number(),\n})\nexport type NotebaseDeleteOutput = z.infer<typeof NotebaseDeleteOutputSchema>\n\n// Get endpoint schemas\nexport const NotebaseGetInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseGetInput = z.infer<typeof NotebaseGetInputSchema>\n\nexport const NotebaseGetSchemaInputSchema = z.object({\n id: z.uuid(),\n})\nexport type NotebaseGetSchemaInput = z.infer<typeof NotebaseGetSchemaInputSchema>\n\nexport const NotebaseGetOutputSchema = notebaseSchema.extend({\n createdAt: z.coerce.date(),\n updatedAt: z.coerce.date(),\n notebaseColumns: z.array(notebaseColumnSchema),\n notebaseRows: z.array(notebaseRowSchema),\n notebaseViews: z.array(notebaseViewSchema),\n})\nexport type NotebaseGetOutput = z.infer<typeof NotebaseGetOutputSchema>\n\nexport const NotebaseGetSchemaOutputSchema = z.object({\n id: z.string(),\n name: z.string(),\n updatedAt: z.coerce.date(),\n notebaseColumns: z.array(notebaseColumnSchema),\n})\nexport type NotebaseGetSchemaOutput = z.infer<typeof NotebaseGetSchemaOutputSchema>\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseCreateInputSchema,\n NotebaseCreateOutputSchema,\n NotebaseDeleteInputSchema,\n NotebaseDeleteOutputSchema,\n NotebaseGetInputSchema,\n NotebaseGetOutputSchema,\n NotebaseGetSchemaInputSchema,\n NotebaseGetSchemaOutputSchema,\n NotebaseListInputSchema,\n NotebaseListOutputSchema,\n NotebaseUpdateInputSchema,\n NotebaseUpdateOutputSchema,\n} from \"#/schemas/notebase\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseContract = {\n list: notebaseProcedure\n .route({\n method: \"GET\",\n path: \"/notebases\",\n summary: \"List notebases\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseListInputSchema)\n .output(NotebaseListOutputSchema),\n\n get: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/notebases/{id}\",\n summary: \"Get notebase with notebase columns, rows, and views\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseGetInputSchema)\n .output(NotebaseGetOutputSchema),\n\n getSchema: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/notebases/{id}/schema\",\n summary: \"Get notebase schema\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseGetSchemaInputSchema)\n .output(NotebaseGetSchemaOutputSchema),\n\n create: notebaseProcedure\n .route({\n method: \"POST\",\n path: \"/notebases\",\n summary: \"Create notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseCreateInputSchema)\n .output(NotebaseCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"PUT\",\n path: \"/notebases/{id}\",\n summary: \"Update notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseUpdateInputSchema)\n .output(NotebaseUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"DELETE\",\n path: \"/notebases/{id}\",\n summary: \"Delete notebase\",\n tags: [\"Notebases\"],\n })\n .input(NotebaseDeleteInputSchema)\n .output(NotebaseDeleteOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseColumnCreateInputSchema,\n NotebaseColumnCreateOutputSchema,\n NotebaseColumnDeleteInputSchema,\n NotebaseColumnDeleteOutputSchema,\n NotebaseColumnReorderInputSchema,\n NotebaseColumnReorderOutputSchema,\n NotebaseColumnUpdateInputSchema,\n NotebaseColumnUpdateOutputSchema,\n} from \"#/schemas/notebase-column\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseColumnContract = {\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-columns\",\n summary: \"Create notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnCreateInputSchema)\n .output(NotebaseColumnCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_COLUMN_NOT_FOUND\"))\n .route({\n method: \"PATCH\",\n path: \"/notebase-columns/{notebaseColumnId}\",\n summary: \"Update notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnUpdateInputSchema)\n .output(NotebaseColumnUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"NOTEBASE_COLUMN_NOT_FOUND\",\n \"PRIMARY_NOTEBASE_COLUMN_DELETE_NOT_ALLOWED\",\n \"CARD_TEMPLATE_NOTEBASE_COLUMN_IN_USE\",\n \"CONCURRENT_POSITION_CONFLICT\",\n ))\n .route({\n method: \"DELETE\",\n path: \"/notebase-columns/{notebaseColumnId}\",\n summary: \"Delete notebase column\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnDeleteInputSchema)\n .output(NotebaseColumnDeleteOutputSchema),\n\n reorder: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-columns/reorder\",\n summary: \"Reorder notebase columns\",\n tags: [\"Notebase Columns\"],\n })\n .input(NotebaseColumnReorderInputSchema)\n .output(NotebaseColumnReorderOutputSchema),\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n NotebaseRowCreateInputSchema,\n NotebaseRowCreateOutputSchema,\n NotebaseRowDeleteInputSchema,\n NotebaseRowDeleteOutputSchema,\n NotebaseRowReorderInputSchema,\n NotebaseRowReorderOutputSchema,\n NotebaseRowUpdateInputSchema,\n NotebaseRowUpdateOutputSchema,\n} from \"#/schemas/notebase-row\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const notebaseRowContract = {\n create: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"NOTEBASE_NOT_FOUND\",\n \"CELL_VALIDATION_FAILED\",\n \"CONCURRENT_POSITION_CONFLICT\",\n ))\n .route({\n method: \"POST\",\n path: \"/notebase-rows\",\n summary: \"Create notebase row\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowCreateInputSchema)\n .output(NotebaseRowCreateOutputSchema),\n\n update: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_ROW_NOT_FOUND\", \"CELL_VALIDATION_FAILED\"))\n .route({\n method: \"PATCH\",\n path: \"/notebase-rows/{notebaseRowId}\",\n summary: \"Update notebase row cells\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowUpdateInputSchema)\n .output(NotebaseRowUpdateOutputSchema),\n\n delete: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_ROW_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"DELETE\",\n path: \"/notebase-rows/{notebaseRowId}\",\n summary: \"Delete notebase row\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowDeleteInputSchema)\n .output(NotebaseRowDeleteOutputSchema),\n\n reorder: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\", \"CONCURRENT_POSITION_CONFLICT\"))\n .route({\n method: \"POST\",\n path: \"/notebase-rows/reorder\",\n summary: \"Reorder notebase rows\",\n tags: [\"Notebase Rows\"],\n })\n .input(NotebaseRowReorderInputSchema)\n .output(NotebaseRowReorderOutputSchema),\n}\n","import { z } from \"zod\"\n\n// @ref https://zenn.dev/herp_inc/articles/js-intl-date-time-format-performance\nconst localeTimeZoneFormatter = new Map<string, Intl.DateTimeFormat>()\nfunction createTimezoneFormatter(timezone: string): Intl.DateTimeFormat {\n let formatter = localeTimeZoneFormatter.get(timezone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(\"en-US\", { timeZone: timezone })\n localeTimeZoneFormatter.set(timezone, formatter)\n }\n return formatter\n}\n\nexport const timezoneSchema = z.string().trim().min(1).refine((timezone) => {\n try {\n createTimezoneFormatter(timezone).format(new Date())\n return true\n }\n catch {\n return false\n }\n}, \"Invalid timezone\")\nexport type Timezone = z.infer<typeof timezoneSchema>\n","import {\n activeScheduleStatusSchema,\n cardStateSchema,\n fsrsReviewLogSnapshotSchema,\n reviewRatingSchema,\n scheduleStatusSchema,\n schedulingParamsSchema,\n SRS_REVIEW_DURATION_MS_MAX,\n srsStepSchema,\n} from \"@read-frog/definitions\"\nimport { z } from \"zod\"\nimport { cardSchema } from \"./card\"\nimport { timezoneSchema } from \"./timezone\"\n\nexport {\n reviewRatingSchema,\n schedulingParamsSchema,\n SRS_REVIEW_DURATION_MS_MAX,\n}\nexport { timezoneSchema } from \"./timezone\"\nexport type { Timezone } from \"./timezone\"\nexport type { ReviewRating, SchedulingParams } from \"@read-frog/definitions\"\n\nexport const stepSchema = srsStepSchema\nexport type Step = z.infer<typeof stepSchema>\n\nexport const SRS_REVIEW_CLIENT_ID_NAMESPACE = \"6ba7b811-9dad-11d1-80b4-00c04fd430c8\"\nconst srsReviewClientIdNamePrefix = \"readfrog:srs-review\"\nconst nullLastReviewTimeSentinel = \"null\"\n\nexport interface SrsReviewClientIdCard {\n id: string\n lastReviewTime: Date | string | null\n}\n\nexport async function createSrsReviewClientId(card: SrsReviewClientIdCard) {\n return uuidV5(\n `${srsReviewClientIdNamePrefix}:${card.id}:${formatLastReviewTime(card.lastReviewTime)}`,\n SRS_REVIEW_CLIENT_ID_NAMESPACE,\n )\n}\n\nexport const srsReviewInputSchema = z.object({\n cardId: z.uuid(),\n id: z.uuid().optional(),\n rating: reviewRatingSchema,\n durationMs: z.number().int().min(0).max(SRS_REVIEW_DURATION_MS_MAX),\n timezone: timezoneSchema,\n}).strict()\nexport type SrsReviewInput = z.infer<typeof srsReviewInputSchema>\n\nexport const srsRollbackReviewInputSchema = z.object({\n cardId: z.uuid(),\n}).strict()\nexport type SrsRollbackReviewInput = z.infer<typeof srsRollbackReviewInputSchema>\n\nexport const srsScheduleStatusStatsSchema = z.record(\n activeScheduleStatusSchema,\n z.number().int().min(0),\n)\nexport type SrsScheduleStatusStats = z.infer<typeof srsScheduleStatusStatsSchema>\n\nexport const srsScheduleStatusStatsInputSchema = z.object({\n notebaseIds: z.array(z.uuid()).optional(),\n timezone: timezoneSchema,\n}).strict()\nexport type SrsScheduleStatusStatsInput = z.infer<typeof srsScheduleStatusStatsInputSchema>\n\nexport const srsScheduleStatusStatsOutputSchema = z.record(\n z.uuid(),\n srsScheduleStatusStatsSchema,\n)\nexport type SrsScheduleStatusStatsOutput = z.infer<typeof srsScheduleStatusStatsOutputSchema>\n\nexport const srsManualCardStatusInputSchema = z.object({\n cardId: z.uuid(),\n enabled: z.boolean(),\n}).strict()\nexport type SrsManualCardStatusInput = z.infer<typeof srsManualCardStatusInputSchema>\n\nexport const srsSetCardBuriedInputSchema = srsManualCardStatusInputSchema\nexport type SrsSetCardBuriedInput = SrsManualCardStatusInput\n\nexport const srsSetCardSuspendedInputSchema = srsManualCardStatusInputSchema\nexport type SrsSetCardSuspendedInput = SrsManualCardStatusInput\n\nexport const srsRevlogSchema = z.object({\n id: z.uuid(),\n notebaseId: z.uuid(),\n cardId: z.uuid(),\n rating: reviewRatingSchema,\n state: cardStateSchema,\n afterScheduleStatus: scheduleStatusSchema,\n reviewedAt: z.coerce.date(),\n durationMs: z.number().int(),\n fsrsReviewLogSnapshot: fsrsReviewLogSnapshotSchema,\n createdAt: z.coerce.date(),\n})\nexport type SrsRevlog = z.infer<typeof srsRevlogSchema>\n\nexport const srsRevlogWithoutSnapshotSchema = srsRevlogSchema.omit({\n fsrsReviewLogSnapshot: true,\n})\nexport type SrsRevlogWithoutSnapshot = z.infer<typeof srsRevlogWithoutSnapshotSchema>\n\nexport const srsReviewOutputSchema = z.object({\n card: cardSchema,\n revlog: srsRevlogSchema,\n txid: z.number(),\n})\nexport type SrsReviewOutput = z.infer<typeof srsReviewOutputSchema>\n\nexport const srsRollbackReviewOutputSchema = z.object({\n card: cardSchema,\n rolledBackRevlogId: z.uuid(),\n txid: z.number(),\n})\nexport type SrsRollbackReviewOutput = z.infer<typeof srsRollbackReviewOutputSchema>\n\nexport const srsTxidOutputSchema = z.object({\n txid: z.number(),\n})\nexport type SrsTxidOutput = z.infer<typeof srsTxidOutputSchema>\n\nexport const srsSetCardBuriedOutputSchema = srsTxidOutputSchema\nexport type SrsSetCardBuriedOutput = SrsTxidOutput\n\nexport const srsSetCardSuspendedOutputSchema = srsTxidOutputSchema\nexport type SrsSetCardSuspendedOutput = SrsTxidOutput\n\nfunction formatLastReviewTime(lastReviewTime: Date | string | null) {\n return lastReviewTime ? new Date(lastReviewTime).toISOString() : nullLastReviewTimeSentinel\n}\n\nasync function uuidV5(name: string, namespace: string) {\n const namespaceBytes = uuidToBytes(namespace)\n const nameBytes = new TextEncoder().encode(name)\n const input = new Uint8Array(namespaceBytes.length + nameBytes.length)\n input.set(namespaceBytes)\n input.set(nameBytes, namespaceBytes.length)\n\n const hash = new Uint8Array(await crypto.subtle.digest(\"SHA-1\", input))\n const bytes = hash.slice(0, 16)\n const versionByte = bytes[6]\n const variantByte = bytes[8]\n if (versionByte === undefined || variantByte === undefined) {\n throw new Error(\"SHA-1 digest was too short\")\n }\n bytes[6] = (versionByte & 0x0F) | 0x50\n bytes[8] = (variantByte & 0x3F) | 0x80\n\n return bytesToUuid(bytes)\n}\n\nfunction uuidToBytes(uuid: string) {\n const hex = uuid.replaceAll(\"-\", \"\").toLowerCase()\n /* v8 ignore next 3 -- SRS_REVIEW_CLIENT_ID_NAMESPACE is a fixed valid UUID. */\n if (!/^[0-9a-f]{32}$/.test(hex)) {\n throw new Error(\"Invalid UUID namespace\")\n }\n\n return new Uint8Array(\n Array.from({ length: 16 }, (_, index) =>\n Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16)),\n )\n}\n\nfunction bytesToUuid(bytes: Uint8Array) {\n const hex = Array.from(bytes, byte => byte.toString(16).padStart(2, \"0\"))\n return [\n hex.slice(0, 4).join(\"\"),\n hex.slice(4, 6).join(\"\"),\n hex.slice(6, 8).join(\"\"),\n hex.slice(8, 10).join(\"\"),\n hex.slice(10, 16).join(\"\"),\n ].join(\"-\")\n}\n","import { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n srsReviewInputSchema,\n srsReviewOutputSchema,\n srsRollbackReviewInputSchema,\n srsRollbackReviewOutputSchema,\n srsScheduleStatusStatsInputSchema,\n srsScheduleStatusStatsOutputSchema,\n srsSetCardBuriedInputSchema,\n srsSetCardBuriedOutputSchema,\n srsSetCardSuspendedInputSchema,\n srsSetCardSuspendedOutputSchema,\n} from \"#/schemas/srs\"\nimport { notebaseProcedure } from \"./shared\"\n\nexport const srsContract = {\n scheduleStatusStats: notebaseProcedure\n .errors(pickPublicErrorMap(\"NOTEBASE_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/srs/schedule-status-stats\",\n summary: \"List today schedule status stats for notebases\",\n tags: [\"SRS\"],\n })\n .input(srsScheduleStatusStatsInputSchema)\n .output(srsScheduleStatusStatsOutputSchema),\n\n review: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_NOT_REVIEWABLE\",\n \"CARD_REVIEW_STATE_STALE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/review\",\n summary: \"Review a card with SRS scheduling\",\n tags: [\"SRS\"],\n })\n .input(srsReviewInputSchema)\n .output(srsReviewOutputSchema),\n rollbackReview: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_REVIEW_ROLLBACK_UNAVAILABLE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/review/rollback\",\n summary: \"Roll back the latest SRS review for a card\",\n tags: [\"SRS\"],\n })\n .input(srsRollbackReviewInputSchema)\n .output(srsRollbackReviewOutputSchema),\n setCardBuried: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_ALREADY_BURIED\",\n \"CARD_NOT_BURIED\",\n \"CARD_STATUS_CHANGE_UNAVAILABLE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/card/bury\",\n summary: \"Manually bury or unbury a card\",\n tags: [\"SRS\"],\n })\n .input(srsSetCardBuriedInputSchema)\n .output(srsSetCardBuriedOutputSchema),\n setCardSuspended: notebaseProcedure\n .errors(pickPublicErrorMap(\n \"CARD_NOT_FOUND\",\n \"CARD_ALREADY_SUSPENDED\",\n \"CARD_NOT_SUSPENDED\",\n \"CARD_STATUS_CHANGE_UNAVAILABLE\",\n ))\n .route({\n method: \"POST\",\n path: \"/srs/card/suspend\",\n summary: \"Manually suspend or unsuspend a card\",\n tags: [\"SRS\"],\n })\n .input(srsSetCardSuspendedInputSchema)\n .output(srsSetCardSuspendedOutputSchema),\n}\n","import { z } from \"zod\"\nimport { timezoneSchema } from \"./timezone\"\n\nexport const userEnsureTimezoneInputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserEnsureTimezoneInput = z.infer<typeof userEnsureTimezoneInputSchema>\n\nexport const userEnsureTimezoneOutputSchema = z.object({\n timezone: timezoneSchema,\n updated: z.boolean(),\n}).strict()\nexport type UserEnsureTimezoneOutput = z.infer<typeof userEnsureTimezoneOutputSchema>\n\nexport const userUpdateTimezoneInputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserUpdateTimezoneInput = z.infer<typeof userUpdateTimezoneInputSchema>\n\nexport const userUpdateTimezoneOutputSchema = z.object({\n timezone: timezoneSchema,\n}).strict()\nexport type UserUpdateTimezoneOutput = z.infer<typeof userUpdateTimezoneOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport {\n userEnsureTimezoneInputSchema,\n userEnsureTimezoneOutputSchema,\n userUpdateTimezoneInputSchema,\n userUpdateTimezoneOutputSchema,\n} from \"#/schemas/user\"\n\nexport const userContract = {\n ensureTimezone: oc\n .route({\n method: \"POST\",\n path: \"/users/me/timezone/ensure\",\n summary: \"Ensure the authenticated user has a timezone\",\n tags: [\"Users\"],\n })\n .input(userEnsureTimezoneInputSchema)\n .output(userEnsureTimezoneOutputSchema),\n updateTimezone: oc\n .route({\n method: \"PATCH\",\n path: \"/users/me/timezone\",\n summary: \"Update the authenticated user's timezone\",\n tags: [\"Users\"],\n })\n .input(userUpdateTimezoneInputSchema)\n .output(userUpdateTimezoneOutputSchema),\n}\n","import type { ContractRouterClient } from \"@orpc/contract\"\nimport { betaAccessContract } from \"./contracts/beta-access\"\nimport { cardContract } from \"./contracts/card\"\nimport { cardTemplateContract } from \"./contracts/card-template\"\nimport { hostedAiContract } from \"./contracts/hosted-ai\"\nimport { notebaseContract } from \"./contracts/notebase\"\nimport { notebaseColumnContract } from \"./contracts/notebase-column\"\nimport { notebaseRowContract } from \"./contracts/notebase-row\"\nimport { srsContract } from \"./contracts/srs\"\nimport { userContract } from \"./contracts/user\"\n\nexport const contract = {\n betaAccess: betaAccessContract,\n card: cardContract,\n cardTemplate: cardTemplateContract,\n hostedAi: hostedAiContract,\n notebase: notebaseContract,\n notebaseColumn: notebaseColumnContract,\n notebaseRow: notebaseRowContract,\n srs: srsContract,\n user: userContract,\n}\n\nexport type ORPCRouterClient = ContractRouterClient<typeof contract>\n\nexport * from \"./public-errors\"\nexport * from \"./schemas/beta-access\"\nexport * from \"./schemas/card\"\nexport * from \"./schemas/hosted-ai\"\nexport * from \"./schemas/notebase\"\nexport * from \"./schemas/notebase-column\"\nexport * from \"./schemas/notebase-row\"\nexport * from \"./schemas/notebase-view\"\nexport * from \"./schemas/srs\"\nexport * from \"./schemas/timezone\"\nexport * from \"./schemas/user\"\n"],"mappings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N,SAAS;EACT,MAAM,CAAC,KAAK;CACd,CAAC,CAAC,CACD,MAAM,2BAA2B,CAAC,CAClC,OAAO,4BAA4B;CACtC,kBAAkB,kBACf,OAAO,mBACN,kBACA,0BACA,sBACA,gCACF,CAAC,CAAC,CACD,MAAM;EACL,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAM,CAAC,KAAK;CACd,CAAC,CAAC,CACD,MAAM,8BAA8B,CAAC,CACrC,OAAO,+BAA+B;AAC3C;;;ACjFA,MAAa,gCAAgC,EAAE,OAAO,EACpD,UAAU,eACZ,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,iCAAiC,EAAE,OAAO;CACrD,UAAU;CACV,SAAS,EAAE,QAAQ;AACrB,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,gCAAgC,EAAE,OAAO,EACpD,UAAU,eACZ,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,iCAAiC,EAAE,OAAO,EACrD,UAAU,eACZ,CAAC,CAAC,CAAC,OAAO;;;AEVV,MAAa,WAAW;CACtB,YAAY;CACZ,MAAM;CACN,cAAc;CACd,UAAU;CACV,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,KAAK;CACL,MAAM;EDXN,gBAAgB,GACb,MAAM;GACL,QAAQ;GACR,MAAM;GACN,SAAS;GACT,MAAM,CAAC,OAAO;EAChB,CAAC,CAAC,CACD,MAAM,6BAA6B,CAAC,CACpC,OAAO,8BAA8B;EACxC,gBAAgB,GACb,MAAM;GACL,QAAQ;GACR,MAAM;GACN,SAAS;GACT,MAAM,CAAC,OAAO;EAChB,CAAC,CAAC,CACD,MAAM,6BAA6B,CAAC,CACpC,OAAO,8BAA8B;CCNlC;AACR"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@read-frog/api-contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@orpc/contract": "^1.14.5",
|
|
28
28
|
"zod": "^4.4.3",
|
|
29
|
-
"@read-frog/definitions": "0.3.
|
|
29
|
+
"@read-frog/definitions": "0.3.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^25.9.2",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { eventIterator, oc } from "@orpc/contract"
|
|
2
|
+
import {
|
|
3
|
+
HostedAiStreamPartSchema,
|
|
4
|
+
HostedAiStreamStructuredObjectInputSchema,
|
|
5
|
+
HostedAiStreamTextInputSchema,
|
|
6
|
+
} from "#/schemas/hosted-ai"
|
|
7
|
+
|
|
8
|
+
export const hostedAiContract = {
|
|
9
|
+
translate: {
|
|
10
|
+
streamText: oc
|
|
11
|
+
.route({
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: "/hosted-ai/translate/stream-text",
|
|
14
|
+
summary: "Stream hosted translation text output",
|
|
15
|
+
tags: ["Hosted AI"],
|
|
16
|
+
})
|
|
17
|
+
.input(HostedAiStreamTextInputSchema)
|
|
18
|
+
.output(eventIterator(HostedAiStreamPartSchema)),
|
|
19
|
+
},
|
|
20
|
+
customAction: {
|
|
21
|
+
streamStructuredObject: oc
|
|
22
|
+
.route({
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: "/hosted-ai/custom-actions/stream-structured-object",
|
|
25
|
+
summary: "Stream hosted custom action structured output",
|
|
26
|
+
tags: ["Hosted AI"],
|
|
27
|
+
})
|
|
28
|
+
.input(HostedAiStreamStructuredObjectInputSchema)
|
|
29
|
+
.output(eventIterator(HostedAiStreamPartSchema)),
|
|
30
|
+
},
|
|
31
|
+
}
|
package/src/contracts/srs.ts
CHANGED
|
@@ -4,10 +4,27 @@ import {
|
|
|
4
4
|
srsReviewOutputSchema,
|
|
5
5
|
srsRollbackReviewInputSchema,
|
|
6
6
|
srsRollbackReviewOutputSchema,
|
|
7
|
+
srsScheduleStatusStatsInputSchema,
|
|
8
|
+
srsScheduleStatusStatsOutputSchema,
|
|
9
|
+
srsSetCardBuriedInputSchema,
|
|
10
|
+
srsSetCardBuriedOutputSchema,
|
|
11
|
+
srsSetCardSuspendedInputSchema,
|
|
12
|
+
srsSetCardSuspendedOutputSchema,
|
|
7
13
|
} from "#/schemas/srs"
|
|
8
14
|
import { notebaseProcedure } from "./shared"
|
|
9
15
|
|
|
10
16
|
export const srsContract = {
|
|
17
|
+
scheduleStatusStats: notebaseProcedure
|
|
18
|
+
.errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
|
|
19
|
+
.route({
|
|
20
|
+
method: "GET",
|
|
21
|
+
path: "/srs/schedule-status-stats",
|
|
22
|
+
summary: "List today schedule status stats for notebases",
|
|
23
|
+
tags: ["SRS"],
|
|
24
|
+
})
|
|
25
|
+
.input(srsScheduleStatusStatsInputSchema)
|
|
26
|
+
.output(srsScheduleStatusStatsOutputSchema),
|
|
27
|
+
|
|
11
28
|
review: notebaseProcedure
|
|
12
29
|
.errors(pickPublicErrorMap(
|
|
13
30
|
"CARD_NOT_FOUND",
|
|
@@ -35,4 +52,34 @@ export const srsContract = {
|
|
|
35
52
|
})
|
|
36
53
|
.input(srsRollbackReviewInputSchema)
|
|
37
54
|
.output(srsRollbackReviewOutputSchema),
|
|
55
|
+
setCardBuried: notebaseProcedure
|
|
56
|
+
.errors(pickPublicErrorMap(
|
|
57
|
+
"CARD_NOT_FOUND",
|
|
58
|
+
"CARD_ALREADY_BURIED",
|
|
59
|
+
"CARD_NOT_BURIED",
|
|
60
|
+
"CARD_STATUS_CHANGE_UNAVAILABLE",
|
|
61
|
+
))
|
|
62
|
+
.route({
|
|
63
|
+
method: "POST",
|
|
64
|
+
path: "/srs/card/bury",
|
|
65
|
+
summary: "Manually bury or unbury a card",
|
|
66
|
+
tags: ["SRS"],
|
|
67
|
+
})
|
|
68
|
+
.input(srsSetCardBuriedInputSchema)
|
|
69
|
+
.output(srsSetCardBuriedOutputSchema),
|
|
70
|
+
setCardSuspended: notebaseProcedure
|
|
71
|
+
.errors(pickPublicErrorMap(
|
|
72
|
+
"CARD_NOT_FOUND",
|
|
73
|
+
"CARD_ALREADY_SUSPENDED",
|
|
74
|
+
"CARD_NOT_SUSPENDED",
|
|
75
|
+
"CARD_STATUS_CHANGE_UNAVAILABLE",
|
|
76
|
+
))
|
|
77
|
+
.route({
|
|
78
|
+
method: "POST",
|
|
79
|
+
path: "/srs/card/suspend",
|
|
80
|
+
summary: "Manually suspend or unsuspend a card",
|
|
81
|
+
tags: ["SRS"],
|
|
82
|
+
})
|
|
83
|
+
.input(srsSetCardSuspendedInputSchema)
|
|
84
|
+
.output(srsSetCardSuspendedOutputSchema),
|
|
38
85
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ContractRouterClient } from "@orpc/contract"
|
|
|
2
2
|
import { betaAccessContract } from "./contracts/beta-access"
|
|
3
3
|
import { cardContract } from "./contracts/card"
|
|
4
4
|
import { cardTemplateContract } from "./contracts/card-template"
|
|
5
|
+
import { hostedAiContract } from "./contracts/hosted-ai"
|
|
5
6
|
import { notebaseContract } from "./contracts/notebase"
|
|
6
7
|
import { notebaseColumnContract } from "./contracts/notebase-column"
|
|
7
8
|
import { notebaseRowContract } from "./contracts/notebase-row"
|
|
@@ -12,6 +13,7 @@ export const contract = {
|
|
|
12
13
|
betaAccess: betaAccessContract,
|
|
13
14
|
card: cardContract,
|
|
14
15
|
cardTemplate: cardTemplateContract,
|
|
16
|
+
hostedAi: hostedAiContract,
|
|
15
17
|
notebase: notebaseContract,
|
|
16
18
|
notebaseColumn: notebaseColumnContract,
|
|
17
19
|
notebaseRow: notebaseRowContract,
|
|
@@ -24,6 +26,7 @@ export type ORPCRouterClient = ContractRouterClient<typeof contract>
|
|
|
24
26
|
export * from "./public-errors"
|
|
25
27
|
export * from "./schemas/beta-access"
|
|
26
28
|
export * from "./schemas/card"
|
|
29
|
+
export * from "./schemas/hosted-ai"
|
|
27
30
|
export * from "./schemas/notebase"
|
|
28
31
|
export * from "./schemas/notebase-column"
|
|
29
32
|
export * from "./schemas/notebase-row"
|
package/src/public-errors.ts
CHANGED
|
@@ -82,6 +82,26 @@ export const PUBLIC_APP_ERROR_DEFS = {
|
|
|
82
82
|
message: "Card review cannot be rolled back",
|
|
83
83
|
status: 409,
|
|
84
84
|
},
|
|
85
|
+
CARD_ALREADY_BURIED: {
|
|
86
|
+
message: "Card is already buried",
|
|
87
|
+
status: 409,
|
|
88
|
+
},
|
|
89
|
+
CARD_NOT_BURIED: {
|
|
90
|
+
message: "Card is not buried",
|
|
91
|
+
status: 409,
|
|
92
|
+
},
|
|
93
|
+
CARD_ALREADY_SUSPENDED: {
|
|
94
|
+
message: "Card is already suspended",
|
|
95
|
+
status: 409,
|
|
96
|
+
},
|
|
97
|
+
CARD_NOT_SUSPENDED: {
|
|
98
|
+
message: "Card is not suspended",
|
|
99
|
+
status: 409,
|
|
100
|
+
},
|
|
101
|
+
CARD_STATUS_CHANGE_UNAVAILABLE: {
|
|
102
|
+
message: "Card status change is unavailable",
|
|
103
|
+
status: 409,
|
|
104
|
+
},
|
|
85
105
|
NOTEBASE_VIEW_NOT_FOUND: {
|
|
86
106
|
message: "Notebase view not found",
|
|
87
107
|
status: 404,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod"
|
|
2
|
+
|
|
3
|
+
export const HostedAiOutputFieldTypeSchema = z.enum(["string", "number"])
|
|
4
|
+
|
|
5
|
+
export const HostedAiOutputFieldSchema = z.strictObject({
|
|
6
|
+
name: z.string().trim().min(1).max(80),
|
|
7
|
+
type: HostedAiOutputFieldTypeSchema,
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
export const HostedAiStreamTextInputSchema = z.strictObject({
|
|
11
|
+
system: z.string().trim().min(1).max(16000),
|
|
12
|
+
prompt: z.string().trim().min(1).max(32000),
|
|
13
|
+
temperature: z.number().min(0).max(2).optional(),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export const HostedAiStreamStructuredObjectInputSchema = z.strictObject({
|
|
17
|
+
system: z.string().trim().min(1).max(16000),
|
|
18
|
+
prompt: z.string().trim().min(1).max(32000),
|
|
19
|
+
outputSchema: z.array(HostedAiOutputFieldSchema).min(1).max(32),
|
|
20
|
+
temperature: z.number().min(0).max(2).optional(),
|
|
21
|
+
}).superRefine((input, ctx) => {
|
|
22
|
+
const fieldNames = new Set<string>()
|
|
23
|
+
|
|
24
|
+
input.outputSchema.forEach((field, index) => {
|
|
25
|
+
if (fieldNames.has(field.name)) {
|
|
26
|
+
ctx.addIssue({
|
|
27
|
+
code: "custom",
|
|
28
|
+
message: `Duplicate output schema name "${field.name}".`,
|
|
29
|
+
path: ["outputSchema", index, "name"],
|
|
30
|
+
})
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
fieldNames.add(field.name)
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
export const HostedAiStreamPartSchema = z.looseObject({
|
|
39
|
+
type: z.string().trim().min(1),
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
export type HostedAiOutputFieldType = z.infer<typeof HostedAiOutputFieldTypeSchema>
|
|
43
|
+
export type HostedAiOutputField = z.infer<typeof HostedAiOutputFieldSchema>
|
|
44
|
+
export type HostedAiStreamTextInput = z.infer<typeof HostedAiStreamTextInputSchema>
|
|
45
|
+
export type HostedAiStreamStructuredObjectInput = z.infer<typeof HostedAiStreamStructuredObjectInputSchema>
|
|
46
|
+
export type HostedAiStreamPart = z.infer<typeof HostedAiStreamPartSchema>
|
package/src/schemas/notebase.ts
CHANGED
|
@@ -62,6 +62,8 @@ export type NotebaseCreateOutput = z.infer<typeof NotebaseCreateOutputSchema>
|
|
|
62
62
|
|
|
63
63
|
export const notebaseUpdateDataSchema = z.object({
|
|
64
64
|
name: z.string().min(1).optional(),
|
|
65
|
+
srsNewPerDay: schedulingParamsShape.newPerDay.optional(),
|
|
66
|
+
srsReviewsPerDay: schedulingParamsShape.reviewsPerDay.optional(),
|
|
65
67
|
}).strict()
|
|
66
68
|
export type NotebaseUpdateData = z.infer<typeof notebaseUpdateDataSchema>
|
|
67
69
|
|
package/src/schemas/srs.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
activeScheduleStatusSchema,
|
|
2
3
|
cardStateSchema,
|
|
3
4
|
fsrsReviewLogSnapshotSchema,
|
|
4
5
|
reviewRatingSchema,
|
|
@@ -53,6 +54,36 @@ export const srsRollbackReviewInputSchema = z.object({
|
|
|
53
54
|
}).strict()
|
|
54
55
|
export type SrsRollbackReviewInput = z.infer<typeof srsRollbackReviewInputSchema>
|
|
55
56
|
|
|
57
|
+
export const srsScheduleStatusStatsSchema = z.record(
|
|
58
|
+
activeScheduleStatusSchema,
|
|
59
|
+
z.number().int().min(0),
|
|
60
|
+
)
|
|
61
|
+
export type SrsScheduleStatusStats = z.infer<typeof srsScheduleStatusStatsSchema>
|
|
62
|
+
|
|
63
|
+
export const srsScheduleStatusStatsInputSchema = z.object({
|
|
64
|
+
notebaseIds: z.array(z.uuid()).optional(),
|
|
65
|
+
timezone: timezoneSchema,
|
|
66
|
+
}).strict()
|
|
67
|
+
export type SrsScheduleStatusStatsInput = z.infer<typeof srsScheduleStatusStatsInputSchema>
|
|
68
|
+
|
|
69
|
+
export const srsScheduleStatusStatsOutputSchema = z.record(
|
|
70
|
+
z.uuid(),
|
|
71
|
+
srsScheduleStatusStatsSchema,
|
|
72
|
+
)
|
|
73
|
+
export type SrsScheduleStatusStatsOutput = z.infer<typeof srsScheduleStatusStatsOutputSchema>
|
|
74
|
+
|
|
75
|
+
export const srsManualCardStatusInputSchema = z.object({
|
|
76
|
+
cardId: z.uuid(),
|
|
77
|
+
enabled: z.boolean(),
|
|
78
|
+
}).strict()
|
|
79
|
+
export type SrsManualCardStatusInput = z.infer<typeof srsManualCardStatusInputSchema>
|
|
80
|
+
|
|
81
|
+
export const srsSetCardBuriedInputSchema = srsManualCardStatusInputSchema
|
|
82
|
+
export type SrsSetCardBuriedInput = SrsManualCardStatusInput
|
|
83
|
+
|
|
84
|
+
export const srsSetCardSuspendedInputSchema = srsManualCardStatusInputSchema
|
|
85
|
+
export type SrsSetCardSuspendedInput = SrsManualCardStatusInput
|
|
86
|
+
|
|
56
87
|
export const srsRevlogSchema = z.object({
|
|
57
88
|
id: z.uuid(),
|
|
58
89
|
notebaseId: z.uuid(),
|
|
@@ -67,6 +98,11 @@ export const srsRevlogSchema = z.object({
|
|
|
67
98
|
})
|
|
68
99
|
export type SrsRevlog = z.infer<typeof srsRevlogSchema>
|
|
69
100
|
|
|
101
|
+
export const srsRevlogWithoutSnapshotSchema = srsRevlogSchema.omit({
|
|
102
|
+
fsrsReviewLogSnapshot: true,
|
|
103
|
+
})
|
|
104
|
+
export type SrsRevlogWithoutSnapshot = z.infer<typeof srsRevlogWithoutSnapshotSchema>
|
|
105
|
+
|
|
70
106
|
export const srsReviewOutputSchema = z.object({
|
|
71
107
|
card: cardSchema,
|
|
72
108
|
revlog: srsRevlogSchema,
|
|
@@ -81,6 +117,17 @@ export const srsRollbackReviewOutputSchema = z.object({
|
|
|
81
117
|
})
|
|
82
118
|
export type SrsRollbackReviewOutput = z.infer<typeof srsRollbackReviewOutputSchema>
|
|
83
119
|
|
|
120
|
+
export const srsTxidOutputSchema = z.object({
|
|
121
|
+
txid: z.number(),
|
|
122
|
+
})
|
|
123
|
+
export type SrsTxidOutput = z.infer<typeof srsTxidOutputSchema>
|
|
124
|
+
|
|
125
|
+
export const srsSetCardBuriedOutputSchema = srsTxidOutputSchema
|
|
126
|
+
export type SrsSetCardBuriedOutput = SrsTxidOutput
|
|
127
|
+
|
|
128
|
+
export const srsSetCardSuspendedOutputSchema = srsTxidOutputSchema
|
|
129
|
+
export type SrsSetCardSuspendedOutput = SrsTxidOutput
|
|
130
|
+
|
|
84
131
|
function formatLastReviewTime(lastReviewTime: Date | string | null) {
|
|
85
132
|
return lastReviewTime ? new Date(lastReviewTime).toISOString() : nullLastReviewTimeSentinel
|
|
86
133
|
}
|
|
@@ -107,6 +154,7 @@ async function uuidV5(name: string, namespace: string) {
|
|
|
107
154
|
|
|
108
155
|
function uuidToBytes(uuid: string) {
|
|
109
156
|
const hex = uuid.replaceAll("-", "").toLowerCase()
|
|
157
|
+
/* v8 ignore next 3 -- SRS_REVIEW_CLIENT_ID_NAMESPACE is a fixed valid UUID. */
|
|
110
158
|
if (!/^[0-9a-f]{32}$/.test(hex)) {
|
|
111
159
|
throw new Error("Invalid UUID namespace")
|
|
112
160
|
}
|