@read-frog/api-contract 0.9.1 → 0.9.3
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 +188 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +103 -19
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/contracts/billing.ts +2 -2
- package/src/contracts/video-transcript.ts +40 -0
- package/src/index.ts +3 -0
- package/src/public-errors.ts +16 -0
- package/src/schemas/billing.ts +14 -1
- package/src/schemas/srs.ts +2 -0
- package/src/schemas/video-transcript.ts +46 -0
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,18 @@ declare const PUBLIC_APP_ERROR_DEFS: {
|
|
|
48
48
|
readonly message: "Notebase not found";
|
|
49
49
|
readonly status: 404;
|
|
50
50
|
};
|
|
51
|
+
readonly VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
|
|
52
|
+
readonly message: "Video transcription is currently in beta for selected accounts";
|
|
53
|
+
readonly status: 403;
|
|
54
|
+
};
|
|
55
|
+
readonly VIDEO_TRANSCRIPT_NOT_FOUND: {
|
|
56
|
+
readonly message: "Video transcript not found";
|
|
57
|
+
readonly status: 404;
|
|
58
|
+
};
|
|
59
|
+
readonly VIDEO_TRANSCRIPT_NOT_READY: {
|
|
60
|
+
readonly message: "Video transcript is not ready yet";
|
|
61
|
+
readonly status: 409;
|
|
62
|
+
};
|
|
51
63
|
readonly NOTEBASE_COLUMN_NOT_FOUND: {
|
|
52
64
|
readonly message: "Notebase column not found";
|
|
53
65
|
readonly status: 404;
|
|
@@ -87,6 +99,10 @@ declare const PUBLIC_APP_ERROR_DEFS: {
|
|
|
87
99
|
readonly message: "Billing customer not found";
|
|
88
100
|
readonly status: 404;
|
|
89
101
|
};
|
|
102
|
+
readonly BILLING_PASS_ACTIVE: {
|
|
103
|
+
readonly message: "An active Pro pass already covers this account";
|
|
104
|
+
readonly status: 409;
|
|
105
|
+
};
|
|
90
106
|
readonly CARD_NOT_REVIEWABLE: {
|
|
91
107
|
readonly message: "Card cannot be reviewed in its current state";
|
|
92
108
|
readonly status: 409;
|
|
@@ -166,6 +182,18 @@ declare function getPublicErrorDefinition<TCode extends PublicAppErrorCode>(code
|
|
|
166
182
|
readonly message: "Notebase not found";
|
|
167
183
|
readonly status: 404;
|
|
168
184
|
};
|
|
185
|
+
readonly VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
|
|
186
|
+
readonly message: "Video transcription is currently in beta for selected accounts";
|
|
187
|
+
readonly status: 403;
|
|
188
|
+
};
|
|
189
|
+
readonly VIDEO_TRANSCRIPT_NOT_FOUND: {
|
|
190
|
+
readonly message: "Video transcript not found";
|
|
191
|
+
readonly status: 404;
|
|
192
|
+
};
|
|
193
|
+
readonly VIDEO_TRANSCRIPT_NOT_READY: {
|
|
194
|
+
readonly message: "Video transcript is not ready yet";
|
|
195
|
+
readonly status: 409;
|
|
196
|
+
};
|
|
169
197
|
readonly NOTEBASE_COLUMN_NOT_FOUND: {
|
|
170
198
|
readonly message: "Notebase column not found";
|
|
171
199
|
readonly status: 404;
|
|
@@ -205,6 +233,10 @@ declare function getPublicErrorDefinition<TCode extends PublicAppErrorCode>(code
|
|
|
205
233
|
readonly message: "Billing customer not found";
|
|
206
234
|
readonly status: 404;
|
|
207
235
|
};
|
|
236
|
+
readonly BILLING_PASS_ACTIVE: {
|
|
237
|
+
readonly message: "An active Pro pass already covers this account";
|
|
238
|
+
readonly status: 409;
|
|
239
|
+
};
|
|
208
240
|
readonly CARD_NOT_REVIEWABLE: {
|
|
209
241
|
readonly message: "Card cannot be reviewed in its current state";
|
|
210
242
|
readonly status: 409;
|
|
@@ -275,17 +307,20 @@ declare function pickPublicErrorMap<const TCodes extends readonly PublicAppError
|
|
|
275
307
|
//#region src/schemas/beta-access.d.ts
|
|
276
308
|
declare const BetaFeatureKeySchema: z.ZodEnum<{
|
|
277
309
|
notebase: "notebase";
|
|
310
|
+
videoTranscription: "videoTranscription";
|
|
278
311
|
}>;
|
|
279
312
|
type BetaFeatureKey = z.infer<typeof BetaFeatureKeySchema>;
|
|
280
313
|
declare const BetaAccessStatusInputSchema: z.ZodObject<{
|
|
281
314
|
featureKey: z.ZodEnum<{
|
|
282
315
|
notebase: "notebase";
|
|
316
|
+
videoTranscription: "videoTranscription";
|
|
283
317
|
}>;
|
|
284
318
|
}, z.core.$strict>;
|
|
285
319
|
type BetaAccessStatusInput = z.infer<typeof BetaAccessStatusInputSchema>;
|
|
286
320
|
declare const BetaAccessStatusOutputSchema: z.ZodObject<{
|
|
287
321
|
featureKey: z.ZodEnum<{
|
|
288
322
|
notebase: "notebase";
|
|
323
|
+
videoTranscription: "videoTranscription";
|
|
289
324
|
}>;
|
|
290
325
|
allowed: z.ZodBoolean;
|
|
291
326
|
}, z.core.$strip>;
|
|
@@ -311,12 +346,29 @@ type BillingSubscriptionStatus = z.infer<typeof billingSubscriptionStatusSchema>
|
|
|
311
346
|
declare const billingPlanSchema: z.ZodEnum<{
|
|
312
347
|
free: "free";
|
|
313
348
|
pro: "pro";
|
|
349
|
+
ultra: "ultra";
|
|
314
350
|
}>;
|
|
315
351
|
type BillingPlan = z.infer<typeof billingPlanSchema>;
|
|
352
|
+
declare const billingCheckoutPlanSchema: z.ZodEnum<{
|
|
353
|
+
pro: "pro";
|
|
354
|
+
ultra: "ultra";
|
|
355
|
+
}>;
|
|
356
|
+
type BillingCheckoutPlan = z.infer<typeof billingCheckoutPlanSchema>;
|
|
357
|
+
declare const billingCheckoutChannelSchema: z.ZodEnum<{
|
|
358
|
+
global: "global";
|
|
359
|
+
cn: "cn";
|
|
360
|
+
}>;
|
|
361
|
+
type BillingCheckoutChannel = z.infer<typeof billingCheckoutChannelSchema>;
|
|
362
|
+
declare const billingAccessSourceSchema: z.ZodEnum<{
|
|
363
|
+
subscription: "subscription";
|
|
364
|
+
pass: "pass";
|
|
365
|
+
}>;
|
|
366
|
+
type BillingAccessSource = z.infer<typeof billingAccessSourceSchema>;
|
|
316
367
|
declare const billingStatusSchema: z.ZodObject<{
|
|
317
368
|
plan: z.ZodEnum<{
|
|
318
369
|
free: "free";
|
|
319
370
|
pro: "pro";
|
|
371
|
+
ultra: "ultra";
|
|
320
372
|
}>;
|
|
321
373
|
status: z.ZodNullable<z.ZodEnum<{
|
|
322
374
|
incomplete: "incomplete";
|
|
@@ -334,6 +386,10 @@ declare const billingStatusSchema: z.ZodObject<{
|
|
|
334
386
|
}>>;
|
|
335
387
|
currentPeriodEnd: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
336
388
|
cancelAtPeriodEnd: z.ZodBoolean;
|
|
389
|
+
accessSource: z.ZodNullable<z.ZodEnum<{
|
|
390
|
+
subscription: "subscription";
|
|
391
|
+
pass: "pass";
|
|
392
|
+
}>>;
|
|
337
393
|
unlimitedNotebaseNotes: z.ZodBoolean;
|
|
338
394
|
notebaseNoteLimit: z.ZodNumber;
|
|
339
395
|
notebaseNoteCount: z.ZodNumber;
|
|
@@ -344,6 +400,14 @@ declare const billingCreateCheckoutSessionInputSchema: z.ZodObject<{
|
|
|
344
400
|
month: "month";
|
|
345
401
|
year: "year";
|
|
346
402
|
}>;
|
|
403
|
+
channel: z.ZodDefault<z.ZodEnum<{
|
|
404
|
+
global: "global";
|
|
405
|
+
cn: "cn";
|
|
406
|
+
}>>;
|
|
407
|
+
plan: z.ZodDefault<z.ZodEnum<{
|
|
408
|
+
pro: "pro";
|
|
409
|
+
ultra: "ultra";
|
|
410
|
+
}>>;
|
|
347
411
|
}, z.core.$strict>;
|
|
348
412
|
type BillingCreateCheckoutSessionInput = z.infer<typeof billingCreateCheckoutSessionInputSchema>;
|
|
349
413
|
declare const billingSessionUrlOutputSchema: z.ZodObject<{
|
|
@@ -1469,6 +1533,7 @@ declare const srsReviewOutputSchema: z.ZodObject<{
|
|
|
1469
1533
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
1470
1534
|
}, z.core.$strip>;
|
|
1471
1535
|
txid: z.ZodNumber;
|
|
1536
|
+
created: z.ZodBoolean;
|
|
1472
1537
|
}, z.core.$strip>;
|
|
1473
1538
|
type SrsReviewOutput = z.infer<typeof srsReviewOutputSchema>;
|
|
1474
1539
|
declare const srsRollbackReviewOutputSchema: z.ZodObject<{
|
|
@@ -1538,16 +1603,66 @@ declare const userUpdateTimezoneOutputSchema: z.ZodObject<{
|
|
|
1538
1603
|
}, z.core.$strict>;
|
|
1539
1604
|
type UserUpdateTimezoneOutput = z.infer<typeof userUpdateTimezoneOutputSchema>;
|
|
1540
1605
|
//#endregion
|
|
1606
|
+
//#region src/schemas/video-transcript.d.ts
|
|
1607
|
+
declare const videoTranscriptStatusSchema: z.ZodEnum<{
|
|
1608
|
+
pending: "pending";
|
|
1609
|
+
processing: "processing";
|
|
1610
|
+
completed: "completed";
|
|
1611
|
+
failed: "failed";
|
|
1612
|
+
}>;
|
|
1613
|
+
type VideoTranscriptStatus = z.infer<typeof videoTranscriptStatusSchema>;
|
|
1614
|
+
declare const videoTranscriptResourceSchema: z.ZodObject<{
|
|
1615
|
+
id: z.ZodString;
|
|
1616
|
+
platform: z.ZodString;
|
|
1617
|
+
videoId: z.ZodString;
|
|
1618
|
+
url: z.ZodString;
|
|
1619
|
+
status: z.ZodEnum<{
|
|
1620
|
+
pending: "pending";
|
|
1621
|
+
processing: "processing";
|
|
1622
|
+
completed: "completed";
|
|
1623
|
+
failed: "failed";
|
|
1624
|
+
}>;
|
|
1625
|
+
title: z.ZodNullable<z.ZodString>;
|
|
1626
|
+
durationSec: z.ZodNullable<z.ZodNumber>;
|
|
1627
|
+
detectedLanguage: z.ZodNullable<z.ZodString>;
|
|
1628
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1629
|
+
createdAt: z.ZodDate;
|
|
1630
|
+
updatedAt: z.ZodDate;
|
|
1631
|
+
}, z.core.$strip>;
|
|
1632
|
+
type VideoTranscriptResource = z.infer<typeof videoTranscriptResourceSchema>;
|
|
1633
|
+
declare const videoTranscriptSubtitlesSchema: z.ZodObject<{
|
|
1634
|
+
id: z.ZodString;
|
|
1635
|
+
detectedLanguage: z.ZodNullable<z.ZodString>;
|
|
1636
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
1637
|
+
start: z.ZodNumber;
|
|
1638
|
+
end: z.ZodNumber;
|
|
1639
|
+
text: z.ZodString;
|
|
1640
|
+
}, z.core.$strip>>;
|
|
1641
|
+
}, z.core.$strip>;
|
|
1642
|
+
type VideoTranscriptSubtitles = z.infer<typeof videoTranscriptSubtitlesSchema>;
|
|
1643
|
+
declare const videoTranscriptCreateInputSchema: z.ZodObject<{
|
|
1644
|
+
platform: z.ZodString;
|
|
1645
|
+
videoId: z.ZodString;
|
|
1646
|
+
url: z.ZodString;
|
|
1647
|
+
}, z.core.$strict>;
|
|
1648
|
+
type VideoTranscriptCreateInput = z.infer<typeof videoTranscriptCreateInputSchema>;
|
|
1649
|
+
declare const videoTranscriptGetInputSchema: z.ZodObject<{
|
|
1650
|
+
id: z.ZodUUID;
|
|
1651
|
+
}, z.core.$strict>;
|
|
1652
|
+
type VideoTranscriptGetInput = z.infer<typeof videoTranscriptGetInputSchema>;
|
|
1653
|
+
//#endregion
|
|
1541
1654
|
//#region src/index.d.ts
|
|
1542
1655
|
declare const contract: {
|
|
1543
1656
|
betaAccess: {
|
|
1544
1657
|
status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1545
1658
|
featureKey: import("zod").ZodEnum<{
|
|
1546
1659
|
notebase: "notebase";
|
|
1660
|
+
videoTranscription: "videoTranscription";
|
|
1547
1661
|
}>;
|
|
1548
1662
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
1549
1663
|
featureKey: import("zod").ZodEnum<{
|
|
1550
1664
|
notebase: "notebase";
|
|
1665
|
+
videoTranscription: "videoTranscription";
|
|
1551
1666
|
}>;
|
|
1552
1667
|
allowed: import("zod").ZodBoolean;
|
|
1553
1668
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -1557,6 +1672,7 @@ declare const contract: {
|
|
|
1557
1672
|
plan: import("zod").ZodEnum<{
|
|
1558
1673
|
free: "free";
|
|
1559
1674
|
pro: "pro";
|
|
1675
|
+
ultra: "ultra";
|
|
1560
1676
|
}>;
|
|
1561
1677
|
status: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1562
1678
|
incomplete: "incomplete";
|
|
@@ -1574,21 +1690,33 @@ declare const contract: {
|
|
|
1574
1690
|
}>>;
|
|
1575
1691
|
currentPeriodEnd: import("zod").ZodNullable<import("zod").ZodCoercedDate<unknown>>;
|
|
1576
1692
|
cancelAtPeriodEnd: import("zod").ZodBoolean;
|
|
1693
|
+
accessSource: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
1694
|
+
subscription: "subscription";
|
|
1695
|
+
pass: "pass";
|
|
1696
|
+
}>>;
|
|
1577
1697
|
unlimitedNotebaseNotes: import("zod").ZodBoolean;
|
|
1578
1698
|
notebaseNoteLimit: import("zod").ZodNumber;
|
|
1579
1699
|
notebaseNoteCount: import("zod").ZodNumber;
|
|
1580
|
-
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND">>, Record<never, never>>;
|
|
1700
|
+
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND" | "BILLING_PASS_ACTIVE">>, Record<never, never>>;
|
|
1581
1701
|
createCheckoutSession: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1582
1702
|
interval: import("zod").ZodEnum<{
|
|
1583
1703
|
month: "month";
|
|
1584
1704
|
year: "year";
|
|
1585
1705
|
}>;
|
|
1706
|
+
channel: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1707
|
+
global: "global";
|
|
1708
|
+
cn: "cn";
|
|
1709
|
+
}>>;
|
|
1710
|
+
plan: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1711
|
+
pro: "pro";
|
|
1712
|
+
ultra: "ultra";
|
|
1713
|
+
}>>;
|
|
1586
1714
|
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
1587
1715
|
url: import("zod").ZodURL;
|
|
1588
|
-
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND">>, Record<never, never>>;
|
|
1716
|
+
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND" | "BILLING_PASS_ACTIVE">>, Record<never, never>>;
|
|
1589
1717
|
createCustomerPortalSession: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
|
|
1590
1718
|
url: import("zod").ZodURL;
|
|
1591
|
-
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND">>, Record<never, never>>;
|
|
1719
|
+
}, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "BILLING_NOT_CONFIGURED" | "BILLING_CUSTOMER_NOT_FOUND" | "BILLING_PASS_ACTIVE">>, Record<never, never>>;
|
|
1592
1720
|
};
|
|
1593
1721
|
card: {
|
|
1594
1722
|
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
@@ -2165,6 +2293,7 @@ declare const contract: {
|
|
|
2165
2293
|
createdAt: import("zod").ZodCoercedDate<unknown>;
|
|
2166
2294
|
}, import("zod/v4/core").$strip>;
|
|
2167
2295
|
txid: import("zod").ZodNumber;
|
|
2296
|
+
created: import("zod").ZodBoolean;
|
|
2168
2297
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "CARD_NOT_FOUND" | "CARD_NOT_REVIEWABLE" | "CARD_REVIEW_STATE_STALE">>, Record<never, never>>;
|
|
2169
2298
|
rollbackReview: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2170
2299
|
cardId: import("zod").ZodUUID;
|
|
@@ -2228,8 +2357,63 @@ declare const contract: {
|
|
|
2228
2357
|
timezone: import("zod").ZodString;
|
|
2229
2358
|
}, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
|
|
2230
2359
|
};
|
|
2360
|
+
videoTranscript: {
|
|
2361
|
+
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2362
|
+
platform: import("zod").ZodString;
|
|
2363
|
+
videoId: import("zod").ZodString;
|
|
2364
|
+
url: import("zod").ZodString;
|
|
2365
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2366
|
+
id: import("zod").ZodString;
|
|
2367
|
+
platform: import("zod").ZodString;
|
|
2368
|
+
videoId: import("zod").ZodString;
|
|
2369
|
+
url: import("zod").ZodString;
|
|
2370
|
+
status: import("zod").ZodEnum<{
|
|
2371
|
+
pending: "pending";
|
|
2372
|
+
processing: "processing";
|
|
2373
|
+
completed: "completed";
|
|
2374
|
+
failed: "failed";
|
|
2375
|
+
}>;
|
|
2376
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2377
|
+
durationSec: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
2378
|
+
detectedLanguage: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2379
|
+
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2380
|
+
createdAt: import("zod").ZodDate;
|
|
2381
|
+
updatedAt: import("zod").ZodDate;
|
|
2382
|
+
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
2383
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2384
|
+
id: import("zod").ZodUUID;
|
|
2385
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2386
|
+
id: import("zod").ZodString;
|
|
2387
|
+
platform: import("zod").ZodString;
|
|
2388
|
+
videoId: import("zod").ZodString;
|
|
2389
|
+
url: import("zod").ZodString;
|
|
2390
|
+
status: import("zod").ZodEnum<{
|
|
2391
|
+
pending: "pending";
|
|
2392
|
+
processing: "processing";
|
|
2393
|
+
completed: "completed";
|
|
2394
|
+
failed: "failed";
|
|
2395
|
+
}>;
|
|
2396
|
+
title: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2397
|
+
durationSec: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
2398
|
+
detectedLanguage: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2399
|
+
error: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2400
|
+
createdAt: import("zod").ZodDate;
|
|
2401
|
+
updatedAt: import("zod").ZodDate;
|
|
2402
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "VIDEO_TRANSCRIPT_NOT_FOUND">>, Record<never, never>>;
|
|
2403
|
+
getSubtitles: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2404
|
+
id: import("zod").ZodUUID;
|
|
2405
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2406
|
+
id: import("zod").ZodString;
|
|
2407
|
+
detectedLanguage: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2408
|
+
segments: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2409
|
+
start: import("zod").ZodNumber;
|
|
2410
|
+
end: import("zod").ZodNumber;
|
|
2411
|
+
text: import("zod").ZodString;
|
|
2412
|
+
}, import("zod/v4/core").$strip>>;
|
|
2413
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "VIDEO_TRANSCRIPT_NOT_FOUND" | "VIDEO_TRANSCRIPT_NOT_READY">>, Record<never, never>>;
|
|
2414
|
+
};
|
|
2231
2415
|
};
|
|
2232
2416
|
type ORPCRouterClient = ContractRouterClient<typeof contract>;
|
|
2233
2417
|
//#endregion
|
|
2234
|
-
export { BetaAccessStatusInput, BetaAccessStatusInputSchema, BetaAccessStatusOutput, BetaAccessStatusOutputSchema, BetaFeatureKey, BetaFeatureKeySchema, BillingCreateCheckoutSessionInput, BillingInterval, BillingPlan, BillingSessionUrlOutput, BillingStatus, BillingSubscriptionStatus, 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, billingCreateCheckoutSessionInputSchema, billingIntervalSchema, billingPlanSchema, billingSessionUrlOutputSchema, billingStatusSchema, billingSubscriptionStatusSchema, 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 };
|
|
2418
|
+
export { BetaAccessStatusInput, BetaAccessStatusInputSchema, BetaAccessStatusOutput, BetaAccessStatusOutputSchema, BetaFeatureKey, BetaFeatureKeySchema, BillingAccessSource, BillingCheckoutChannel, BillingCheckoutPlan, BillingCreateCheckoutSessionInput, BillingInterval, BillingPlan, BillingSessionUrlOutput, BillingStatus, BillingSubscriptionStatus, 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, VideoTranscriptCreateInput, VideoTranscriptGetInput, VideoTranscriptResource, VideoTranscriptStatus, VideoTranscriptSubtitles, billingAccessSourceSchema, billingCheckoutChannelSchema, billingCheckoutPlanSchema, billingCreateCheckoutSessionInputSchema, billingIntervalSchema, billingPlanSchema, billingSessionUrlOutputSchema, billingStatusSchema, billingSubscriptionStatusSchema, 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, videoTranscriptCreateInputSchema, videoTranscriptGetInputSchema, videoTranscriptResourceSchema, videoTranscriptStatusSchema, videoTranscriptSubtitlesSchema };
|
|
2235
2419
|
//# 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/billing.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,8BA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAaD,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/billing.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/schemas/video-transcript.ts","../src/index.ts"],"mappings":";;;;;cASa,iCAAA,EAAiC,CAAA,CAAA,OAAA;;;;;;KAMlC,2BAAA,GAA8B,CAAA,CAAE,KAAK,QAAQ,iCAAA;AAAA,cAE5C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcD,gBAAA,GAAmB,oBAAoB,QAAQ,QAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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";
|
|
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, transcriptSegmentSchema } 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);
|
|
@@ -46,6 +46,18 @@ const PUBLIC_APP_ERROR_DEFS = {
|
|
|
46
46
|
message: "Notebase not found",
|
|
47
47
|
status: 404
|
|
48
48
|
},
|
|
49
|
+
VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
|
|
50
|
+
message: "Video transcription is currently in beta for selected accounts",
|
|
51
|
+
status: 403
|
|
52
|
+
},
|
|
53
|
+
VIDEO_TRANSCRIPT_NOT_FOUND: {
|
|
54
|
+
message: "Video transcript not found",
|
|
55
|
+
status: 404
|
|
56
|
+
},
|
|
57
|
+
VIDEO_TRANSCRIPT_NOT_READY: {
|
|
58
|
+
message: "Video transcript is not ready yet",
|
|
59
|
+
status: 409
|
|
60
|
+
},
|
|
49
61
|
NOTEBASE_COLUMN_NOT_FOUND: {
|
|
50
62
|
message: "Notebase column not found",
|
|
51
63
|
status: 404
|
|
@@ -83,6 +95,10 @@ const PUBLIC_APP_ERROR_DEFS = {
|
|
|
83
95
|
message: "Billing customer not found",
|
|
84
96
|
status: 404
|
|
85
97
|
},
|
|
98
|
+
BILLING_PASS_ACTIVE: {
|
|
99
|
+
message: "An active Pro pass already covers this account",
|
|
100
|
+
status: 409
|
|
101
|
+
},
|
|
86
102
|
CARD_NOT_REVIEWABLE: {
|
|
87
103
|
message: "Card cannot be reviewed in its current state",
|
|
88
104
|
status: 409
|
|
@@ -166,22 +182,34 @@ const billingSubscriptionStatusSchema = z.enum([
|
|
|
166
182
|
"unpaid",
|
|
167
183
|
"paused"
|
|
168
184
|
]);
|
|
169
|
-
const billingPlanSchema = z.enum([
|
|
185
|
+
const billingPlanSchema = z.enum([
|
|
186
|
+
"free",
|
|
187
|
+
"pro",
|
|
188
|
+
"ultra"
|
|
189
|
+
]);
|
|
190
|
+
const billingCheckoutPlanSchema = z.enum(["pro", "ultra"]);
|
|
191
|
+
const billingCheckoutChannelSchema = z.enum(["global", "cn"]);
|
|
192
|
+
const billingAccessSourceSchema = z.enum(["subscription", "pass"]);
|
|
170
193
|
const billingStatusSchema = z.object({
|
|
171
194
|
plan: billingPlanSchema,
|
|
172
195
|
status: billingSubscriptionStatusSchema.nullable(),
|
|
173
196
|
interval: billingIntervalSchema.nullable(),
|
|
174
197
|
currentPeriodEnd: z.coerce.date().nullable(),
|
|
175
198
|
cancelAtPeriodEnd: z.boolean(),
|
|
199
|
+
accessSource: billingAccessSourceSchema.nullable(),
|
|
176
200
|
unlimitedNotebaseNotes: z.boolean(),
|
|
177
201
|
notebaseNoteLimit: z.number().int().positive(),
|
|
178
202
|
notebaseNoteCount: z.number().int().min(0)
|
|
179
203
|
}).strict();
|
|
180
|
-
const billingCreateCheckoutSessionInputSchema = z.object({
|
|
204
|
+
const billingCreateCheckoutSessionInputSchema = z.object({
|
|
205
|
+
interval: billingIntervalSchema,
|
|
206
|
+
channel: billingCheckoutChannelSchema.default("global"),
|
|
207
|
+
plan: billingCheckoutPlanSchema.default("pro")
|
|
208
|
+
}).strict();
|
|
181
209
|
const billingSessionUrlOutputSchema = z.object({ url: z.url() }).strict();
|
|
182
210
|
//#endregion
|
|
183
211
|
//#region src/contracts/billing.ts
|
|
184
|
-
const billingProcedure = oc.errors(pickPublicErrorMap("BILLING_NOT_CONFIGURED", "BILLING_CUSTOMER_NOT_FOUND"));
|
|
212
|
+
const billingProcedure = oc.errors(pickPublicErrorMap("BILLING_NOT_CONFIGURED", "BILLING_CUSTOMER_NOT_FOUND", "BILLING_PASS_ACTIVE"));
|
|
185
213
|
const billingContract = {
|
|
186
214
|
status: billingProcedure.route({
|
|
187
215
|
method: "GET",
|
|
@@ -192,7 +220,7 @@ const billingContract = {
|
|
|
192
220
|
createCheckoutSession: billingProcedure.route({
|
|
193
221
|
method: "POST",
|
|
194
222
|
path: "/billing/checkout-sessions",
|
|
195
|
-
summary: "Create a Stripe Checkout Session for a subscription",
|
|
223
|
+
summary: "Create a Stripe Checkout Session for a subscription or one-time Pro pass",
|
|
196
224
|
tags: ["Billing"]
|
|
197
225
|
}).input(billingCreateCheckoutSessionInputSchema).output(billingSessionUrlOutputSchema),
|
|
198
226
|
createCustomerPortalSession: billingProcedure.route({
|
|
@@ -740,7 +768,8 @@ const srsRevlogWithoutSnapshotSchema = srsRevlogSchema.omit({ fsrsReviewLogSnaps
|
|
|
740
768
|
const srsReviewOutputSchema = z.object({
|
|
741
769
|
card: cardSchema,
|
|
742
770
|
revlog: srsRevlogSchema,
|
|
743
|
-
txid: z.number()
|
|
771
|
+
txid: z.number(),
|
|
772
|
+
created: z.boolean()
|
|
744
773
|
});
|
|
745
774
|
const srsRollbackReviewOutputSchema = z.object({
|
|
746
775
|
card: cardSchema,
|
|
@@ -827,6 +856,54 @@ const userEnsureTimezoneOutputSchema = z.object({
|
|
|
827
856
|
const userUpdateTimezoneInputSchema = z.object({ timezone: timezoneSchema }).strict();
|
|
828
857
|
const userUpdateTimezoneOutputSchema = z.object({ timezone: timezoneSchema }).strict();
|
|
829
858
|
//#endregion
|
|
859
|
+
//#region src/contracts/user.ts
|
|
860
|
+
const userContract = {
|
|
861
|
+
ensureTimezone: oc.route({
|
|
862
|
+
method: "POST",
|
|
863
|
+
path: "/users/me/timezone/ensure",
|
|
864
|
+
summary: "Ensure the authenticated user has a timezone",
|
|
865
|
+
tags: ["Users"]
|
|
866
|
+
}).input(userEnsureTimezoneInputSchema).output(userEnsureTimezoneOutputSchema),
|
|
867
|
+
updateTimezone: oc.route({
|
|
868
|
+
method: "PATCH",
|
|
869
|
+
path: "/users/me/timezone",
|
|
870
|
+
summary: "Update the authenticated user's timezone",
|
|
871
|
+
tags: ["Users"]
|
|
872
|
+
}).input(userUpdateTimezoneInputSchema).output(userUpdateTimezoneOutputSchema)
|
|
873
|
+
};
|
|
874
|
+
//#endregion
|
|
875
|
+
//#region src/schemas/video-transcript.ts
|
|
876
|
+
const videoTranscriptStatusSchema = z.enum([
|
|
877
|
+
"pending",
|
|
878
|
+
"processing",
|
|
879
|
+
"completed",
|
|
880
|
+
"failed"
|
|
881
|
+
]);
|
|
882
|
+
const videoTranscriptResourceSchema = z.object({
|
|
883
|
+
id: z.string(),
|
|
884
|
+
platform: z.string(),
|
|
885
|
+
videoId: z.string(),
|
|
886
|
+
url: z.string(),
|
|
887
|
+
status: videoTranscriptStatusSchema,
|
|
888
|
+
title: z.string().nullable(),
|
|
889
|
+
durationSec: z.number().nullable(),
|
|
890
|
+
detectedLanguage: z.string().nullable(),
|
|
891
|
+
error: z.string().nullable(),
|
|
892
|
+
createdAt: z.date(),
|
|
893
|
+
updatedAt: z.date()
|
|
894
|
+
});
|
|
895
|
+
const videoTranscriptSubtitlesSchema = z.object({
|
|
896
|
+
id: z.string(),
|
|
897
|
+
detectedLanguage: z.string().nullable(),
|
|
898
|
+
segments: z.array(transcriptSegmentSchema)
|
|
899
|
+
});
|
|
900
|
+
const videoTranscriptCreateInputSchema = z.object({
|
|
901
|
+
platform: z.string(),
|
|
902
|
+
videoId: z.string(),
|
|
903
|
+
url: z.string().url()
|
|
904
|
+
}).strict();
|
|
905
|
+
const videoTranscriptGetInputSchema = z.object({ id: z.uuid() }).strict();
|
|
906
|
+
//#endregion
|
|
830
907
|
//#region src/index.ts
|
|
831
908
|
const contract = {
|
|
832
909
|
betaAccess: betaAccessContract,
|
|
@@ -838,22 +915,29 @@ const contract = {
|
|
|
838
915
|
notebaseColumn: notebaseColumnContract,
|
|
839
916
|
notebaseRow: notebaseRowContract,
|
|
840
917
|
srs: srsContract,
|
|
841
|
-
user:
|
|
842
|
-
|
|
918
|
+
user: userContract,
|
|
919
|
+
videoTranscript: {
|
|
920
|
+
create: oc.route({
|
|
843
921
|
method: "POST",
|
|
844
|
-
path: "/
|
|
845
|
-
summary: "
|
|
846
|
-
tags: ["
|
|
847
|
-
}).input(
|
|
848
|
-
|
|
849
|
-
method: "
|
|
850
|
-
path: "/
|
|
851
|
-
summary: "
|
|
852
|
-
tags: ["
|
|
853
|
-
}).input(
|
|
922
|
+
path: "/video-transcripts",
|
|
923
|
+
summary: "Create or reuse a video transcription job",
|
|
924
|
+
tags: ["Video Transcription"]
|
|
925
|
+
}).input(videoTranscriptCreateInputSchema).output(videoTranscriptResourceSchema),
|
|
926
|
+
get: oc.errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND")).route({
|
|
927
|
+
method: "GET",
|
|
928
|
+
path: "/video-transcripts/{id}",
|
|
929
|
+
summary: "Get a video transcription job's status",
|
|
930
|
+
tags: ["Video Transcription"]
|
|
931
|
+
}).input(videoTranscriptGetInputSchema).output(videoTranscriptResourceSchema),
|
|
932
|
+
getSubtitles: oc.errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND", "VIDEO_TRANSCRIPT_NOT_READY")).route({
|
|
933
|
+
method: "GET",
|
|
934
|
+
path: "/video-transcripts/{id}/subtitles",
|
|
935
|
+
summary: "Get a completed video transcript's subtitles",
|
|
936
|
+
tags: ["Video Transcription"]
|
|
937
|
+
}).input(videoTranscriptGetInputSchema).output(videoTranscriptSubtitlesSchema)
|
|
854
938
|
}
|
|
855
939
|
};
|
|
856
940
|
//#endregion
|
|
857
|
-
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, billingCreateCheckoutSessionInputSchema, billingIntervalSchema, billingPlanSchema, billingSessionUrlOutputSchema, billingStatusSchema, billingSubscriptionStatusSchema, 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 };
|
|
941
|
+
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, billingAccessSourceSchema, billingCheckoutChannelSchema, billingCheckoutPlanSchema, billingCreateCheckoutSessionInputSchema, billingIntervalSchema, billingPlanSchema, billingSessionUrlOutputSchema, billingStatusSchema, billingSubscriptionStatusSchema, 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, videoTranscriptCreateInputSchema, videoTranscriptGetInputSchema, videoTranscriptResourceSchema, videoTranscriptStatusSchema, videoTranscriptSubtitlesSchema };
|
|
858
942
|
|
|
859
943
|
//# 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/billing.ts","../src/contracts/billing.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 NOTE_LIMIT_EXCEEDED: {\n message: \"Upgrade is required to create more Notebase notes\",\n status: 403,\n },\n BILLING_NOT_CONFIGURED: {\n message: \"Billing is not configured\",\n status: 503,\n },\n BILLING_CUSTOMER_NOT_FOUND: {\n message: \"Billing customer not found\",\n status: 404,\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 { z } from \"zod\"\n\nexport const billingIntervalSchema = z.enum([\"month\", \"year\"])\nexport type BillingInterval = z.infer<typeof billingIntervalSchema>\n\nexport const billingSubscriptionStatusSchema = z.enum([\n \"incomplete\",\n \"incomplete_expired\",\n \"trialing\",\n \"active\",\n \"past_due\",\n \"canceled\",\n \"unpaid\",\n \"paused\",\n])\nexport type BillingSubscriptionStatus = z.infer<typeof billingSubscriptionStatusSchema>\n\nexport const billingPlanSchema = z.enum([\"free\", \"pro\"])\nexport type BillingPlan = z.infer<typeof billingPlanSchema>\n\nexport const billingStatusSchema = z.object({\n plan: billingPlanSchema,\n status: billingSubscriptionStatusSchema.nullable(),\n interval: billingIntervalSchema.nullable(),\n currentPeriodEnd: z.coerce.date().nullable(),\n cancelAtPeriodEnd: z.boolean(),\n unlimitedNotebaseNotes: z.boolean(),\n notebaseNoteLimit: z.number().int().positive(),\n notebaseNoteCount: z.number().int().min(0),\n}).strict()\nexport type BillingStatus = z.infer<typeof billingStatusSchema>\n\nexport const billingCreateCheckoutSessionInputSchema = z.object({\n interval: billingIntervalSchema,\n}).strict()\nexport type BillingCreateCheckoutSessionInput = z.infer<typeof billingCreateCheckoutSessionInputSchema>\n\nexport const billingSessionUrlOutputSchema = z.object({\n url: z.url(),\n}).strict()\nexport type BillingSessionUrlOutput = z.infer<typeof billingSessionUrlOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n billingCreateCheckoutSessionInputSchema,\n billingSessionUrlOutputSchema,\n billingStatusSchema,\n} from \"#/schemas/billing\"\n\nconst billingProcedure = oc.errors(\n pickPublicErrorMap(\"BILLING_NOT_CONFIGURED\", \"BILLING_CUSTOMER_NOT_FOUND\"),\n)\n\nexport const billingContract = {\n status: billingProcedure\n .route({\n method: \"GET\",\n path: \"/billing/status\",\n summary: \"Get authenticated user's billing status\",\n tags: [\"Billing\"],\n })\n .output(billingStatusSchema),\n createCheckoutSession: billingProcedure\n .route({\n method: \"POST\",\n path: \"/billing/checkout-sessions\",\n summary: \"Create a Stripe Checkout Session for a subscription\",\n tags: [\"Billing\"],\n })\n .input(billingCreateCheckoutSessionInputSchema)\n .output(billingSessionUrlOutputSchema),\n createCustomerPortalSession: billingProcedure\n .route({\n method: \"POST\",\n path: \"/billing/customer-portal-sessions\",\n summary: \"Create a Stripe Customer Portal Session\",\n tags: [\"Billing\"],\n })\n .output(billingSessionUrlOutputSchema),\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\"\n\nexport const notebaseProcedure = oc\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 type { RefinementCtx } from \"zod\"\nimport { z } from \"zod\"\n\nconst HOSTED_AI_SYSTEM_FALLBACK_REMOVAL_DATE = \"2026-07-11\"\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\nconst HostedAiInstructionsSchema = z.string().trim().min(1).max(16000)\n\ninterface HostedAiInstructionsCompatibilityInput {\n instructions?: string\n system?: string\n}\n\nfunction validateHostedAiInstructionsCompatibility(\n input: HostedAiInstructionsCompatibilityInput,\n ctx: RefinementCtx<HostedAiInstructionsCompatibilityInput>,\n): void {\n if (input.instructions !== undefined || input.system !== undefined) {\n return\n }\n\n ctx.addIssue({\n code: \"custom\",\n message: `instructions is required. The deprecated system field is accepted as a temporary fallback until ${HOSTED_AI_SYSTEM_FALLBACK_REMOVAL_DATE}.`,\n path: [\"instructions\"],\n })\n}\n\nexport const HostedAiStreamTextInputSchema = z.strictObject({\n instructions: HostedAiInstructionsSchema.optional(),\n system: HostedAiInstructionsSchema.optional(),\n prompt: z.string().trim().min(1).max(32000),\n temperature: z.number().min(0).max(2).optional(),\n}).superRefine(validateHostedAiInstructionsCompatibility)\n\nexport const HostedAiStreamStructuredObjectInputSchema = z.strictObject({\n instructions: HostedAiInstructionsSchema.optional(),\n system: HostedAiInstructionsSchema.optional(),\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 validateHostedAiInstructionsCompatibility(input, ctx)\n\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 .errors(pickPublicErrorMap(\"NOTE_LIMIT_EXCEEDED\"))\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 \"NOTE_LIMIT_EXCEEDED\",\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 { billingContract } from \"./contracts/billing\"\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 billing: billingContract,\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/billing\"\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":";;;;AAGA,MAAa,uBAAuB,EAAE,KAAK,iBAAiB;AAG5D,MAAa,8BAA8B,EAAE,OAAO,EAClD,YAAY,qBACd,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,+BAA+B,EAAE,OAAO;CACnD,YAAY;CACZ,SAAS,EAAE,QAAQ;AACrB,CAAC;;;ACRD,MAAa,qBAAqB,EAChC,QAAQ,GACL,MAAM;CACL,QAAQ;CACR,MAAM;CACN,SAAS;CACT,MAAM,CAAC,aAAa;AACtB,CAAC,CAAC,CACD,MAAM,2BAA2B,CAAC,CAClC,OAAO,4BAA4B,EACxC;;;ACPA,MAAa,oCAAoC,EAAE,KAAK;CACtD;CACA;CACA;CACA;AACF,CAAC;AAGD,MAAa,qCAAqC,EAAE,OAAO;CACzD,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;CACpC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;AAC7C,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,iCAAiC,EAAE,OAAO;CACrD,kBAAkB,EAAE,OAAO;CAC3B,SAAS;CACT,QAAQ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,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;;;AETV,MAAa,WAAW;CACtB,YAAY;CACZ,SAAS;CACT,MAAM;CACN,cAAc;CACd,UAAU;CACV,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,KAAK;CACL,MAAM;EDbN,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;CCJlC;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/billing.ts","../src/contracts/billing.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/schemas/video-transcript.ts","../src/contracts/video-transcript.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 VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {\n message: \"Video transcription is currently in beta for selected accounts\",\n status: 403,\n },\n VIDEO_TRANSCRIPT_NOT_FOUND: {\n message: \"Video transcript not found\",\n status: 404,\n },\n VIDEO_TRANSCRIPT_NOT_READY: {\n message: \"Video transcript is not ready yet\",\n status: 409,\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 NOTE_LIMIT_EXCEEDED: {\n message: \"Upgrade is required to create more Notebase notes\",\n status: 403,\n },\n BILLING_NOT_CONFIGURED: {\n message: \"Billing is not configured\",\n status: 503,\n },\n BILLING_CUSTOMER_NOT_FOUND: {\n message: \"Billing customer not found\",\n status: 404,\n },\n BILLING_PASS_ACTIVE: {\n message: \"An active Pro pass already covers this account\",\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 { z } from \"zod\"\n\nexport const billingIntervalSchema = z.enum([\"month\", \"year\"])\nexport type BillingInterval = z.infer<typeof billingIntervalSchema>\n\nexport const billingSubscriptionStatusSchema = z.enum([\n \"incomplete\",\n \"incomplete_expired\",\n \"trialing\",\n \"active\",\n \"past_due\",\n \"canceled\",\n \"unpaid\",\n \"paused\",\n])\nexport type BillingSubscriptionStatus = z.infer<typeof billingSubscriptionStatusSchema>\n\nexport const billingPlanSchema = z.enum([\"free\", \"pro\", \"ultra\"])\nexport type BillingPlan = z.infer<typeof billingPlanSchema>\n\n// Plans a user can actively check out into (the free tier has no price).\nexport const billingCheckoutPlanSchema = z.enum([\"pro\", \"ultra\"])\nexport type BillingCheckoutPlan = z.infer<typeof billingCheckoutPlanSchema>\n\nexport const billingCheckoutChannelSchema = z.enum([\"global\", \"cn\"])\nexport type BillingCheckoutChannel = z.infer<typeof billingCheckoutChannelSchema>\n\nexport const billingAccessSourceSchema = z.enum([\"subscription\", \"pass\"])\nexport type BillingAccessSource = z.infer<typeof billingAccessSourceSchema>\n\nexport const billingStatusSchema = z.object({\n plan: billingPlanSchema,\n status: billingSubscriptionStatusSchema.nullable(),\n interval: billingIntervalSchema.nullable(),\n currentPeriodEnd: z.coerce.date().nullable(),\n cancelAtPeriodEnd: z.boolean(),\n accessSource: billingAccessSourceSchema.nullable(),\n unlimitedNotebaseNotes: z.boolean(),\n notebaseNoteLimit: z.number().int().positive(),\n notebaseNoteCount: z.number().int().min(0),\n}).strict()\nexport type BillingStatus = z.infer<typeof billingStatusSchema>\n\nexport const billingCreateCheckoutSessionInputSchema = z.object({\n interval: billingIntervalSchema,\n channel: billingCheckoutChannelSchema.default(\"global\"),\n plan: billingCheckoutPlanSchema.default(\"pro\"),\n}).strict()\nexport type BillingCreateCheckoutSessionInput = z.infer<typeof billingCreateCheckoutSessionInputSchema>\n\nexport const billingSessionUrlOutputSchema = z.object({\n url: z.url(),\n}).strict()\nexport type BillingSessionUrlOutput = z.infer<typeof billingSessionUrlOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n billingCreateCheckoutSessionInputSchema,\n billingSessionUrlOutputSchema,\n billingStatusSchema,\n} from \"#/schemas/billing\"\n\nconst billingProcedure = oc.errors(\n pickPublicErrorMap(\"BILLING_NOT_CONFIGURED\", \"BILLING_CUSTOMER_NOT_FOUND\", \"BILLING_PASS_ACTIVE\"),\n)\n\nexport const billingContract = {\n status: billingProcedure\n .route({\n method: \"GET\",\n path: \"/billing/status\",\n summary: \"Get authenticated user's billing status\",\n tags: [\"Billing\"],\n })\n .output(billingStatusSchema),\n createCheckoutSession: billingProcedure\n .route({\n method: \"POST\",\n path: \"/billing/checkout-sessions\",\n summary: \"Create a Stripe Checkout Session for a subscription or one-time Pro pass\",\n tags: [\"Billing\"],\n })\n .input(billingCreateCheckoutSessionInputSchema)\n .output(billingSessionUrlOutputSchema),\n createCustomerPortalSession: billingProcedure\n .route({\n method: \"POST\",\n path: \"/billing/customer-portal-sessions\",\n summary: \"Create a Stripe Customer Portal Session\",\n tags: [\"Billing\"],\n })\n .output(billingSessionUrlOutputSchema),\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\"\n\nexport const notebaseProcedure = oc\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 type { RefinementCtx } from \"zod\"\nimport { z } from \"zod\"\n\nconst HOSTED_AI_SYSTEM_FALLBACK_REMOVAL_DATE = \"2026-07-11\"\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\nconst HostedAiInstructionsSchema = z.string().trim().min(1).max(16000)\n\ninterface HostedAiInstructionsCompatibilityInput {\n instructions?: string\n system?: string\n}\n\nfunction validateHostedAiInstructionsCompatibility(\n input: HostedAiInstructionsCompatibilityInput,\n ctx: RefinementCtx<HostedAiInstructionsCompatibilityInput>,\n): void {\n if (input.instructions !== undefined || input.system !== undefined) {\n return\n }\n\n ctx.addIssue({\n code: \"custom\",\n message: `instructions is required. The deprecated system field is accepted as a temporary fallback until ${HOSTED_AI_SYSTEM_FALLBACK_REMOVAL_DATE}.`,\n path: [\"instructions\"],\n })\n}\n\nexport const HostedAiStreamTextInputSchema = z.strictObject({\n instructions: HostedAiInstructionsSchema.optional(),\n system: HostedAiInstructionsSchema.optional(),\n prompt: z.string().trim().min(1).max(32000),\n temperature: z.number().min(0).max(2).optional(),\n}).superRefine(validateHostedAiInstructionsCompatibility)\n\nexport const HostedAiStreamStructuredObjectInputSchema = z.strictObject({\n instructions: HostedAiInstructionsSchema.optional(),\n system: HostedAiInstructionsSchema.optional(),\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 validateHostedAiInstructionsCompatibility(input, ctx)\n\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 .errors(pickPublicErrorMap(\"NOTE_LIMIT_EXCEEDED\"))\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 \"NOTE_LIMIT_EXCEEDED\",\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 // False when an idempotent replay returned an existing revlog instead of creating one.\n created: z.boolean(),\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 { transcriptSegmentSchema } from \"@read-frog/definitions\"\nimport { z } from \"zod\"\n\nexport const videoTranscriptStatusSchema = z.enum([\n \"pending\",\n \"processing\",\n \"completed\",\n \"failed\",\n])\nexport type VideoTranscriptStatus = z.infer<typeof videoTranscriptStatusSchema>\n\n// The transcript \"job\" resource: status + metadata, without the (heavy) segments payload.\nexport const videoTranscriptResourceSchema = z.object({\n id: z.string(),\n platform: z.string(),\n videoId: z.string(),\n url: z.string(),\n status: videoTranscriptStatusSchema,\n title: z.string().nullable(),\n durationSec: z.number().nullable(),\n detectedLanguage: z.string().nullable(),\n error: z.string().nullable(),\n createdAt: z.date(),\n updatedAt: z.date(),\n})\nexport type VideoTranscriptResource = z.infer<typeof videoTranscriptResourceSchema>\n\n// The subtitles sub-resource: the segments + model-detected language, only available once completed.\nexport const videoTranscriptSubtitlesSchema = z.object({\n id: z.string(),\n detectedLanguage: z.string().nullable(),\n segments: z.array(transcriptSegmentSchema),\n})\nexport type VideoTranscriptSubtitles = z.infer<typeof videoTranscriptSubtitlesSchema>\n\nexport const videoTranscriptCreateInputSchema = z.object({\n platform: z.string(),\n videoId: z.string(),\n url: z.string().url(),\n}).strict()\nexport type VideoTranscriptCreateInput = z.infer<typeof videoTranscriptCreateInputSchema>\n\nexport const videoTranscriptGetInputSchema = z.object({\n id: z.uuid(),\n}).strict()\nexport type VideoTranscriptGetInput = z.infer<typeof videoTranscriptGetInputSchema>\n","import { oc } from \"@orpc/contract\"\nimport { pickPublicErrorMap } from \"#/public-errors\"\nimport {\n videoTranscriptCreateInputSchema,\n videoTranscriptGetInputSchema,\n videoTranscriptResourceSchema,\n videoTranscriptSubtitlesSchema,\n} from \"#/schemas/video-transcript\"\n\nexport const videoTranscriptContract = {\n create: oc\n .route({\n method: \"POST\",\n path: \"/video-transcripts\",\n summary: \"Create or reuse a video transcription job\",\n tags: [\"Video Transcription\"],\n })\n .input(videoTranscriptCreateInputSchema)\n .output(videoTranscriptResourceSchema),\n get: oc\n .errors(pickPublicErrorMap(\"VIDEO_TRANSCRIPT_NOT_FOUND\"))\n .route({\n method: \"GET\",\n path: \"/video-transcripts/{id}\",\n summary: \"Get a video transcription job's status\",\n tags: [\"Video Transcription\"],\n })\n .input(videoTranscriptGetInputSchema)\n .output(videoTranscriptResourceSchema),\n getSubtitles: oc\n .errors(pickPublicErrorMap(\"VIDEO_TRANSCRIPT_NOT_FOUND\", \"VIDEO_TRANSCRIPT_NOT_READY\"))\n .route({\n method: \"GET\",\n path: \"/video-transcripts/{id}/subtitles\",\n summary: \"Get a completed video transcript's subtitles\",\n tags: [\"Video Transcription\"],\n })\n .input(videoTranscriptGetInputSchema)\n .output(videoTranscriptSubtitlesSchema),\n}\n","import type { ContractRouterClient } from \"@orpc/contract\"\nimport { betaAccessContract } from \"./contracts/beta-access\"\nimport { billingContract } from \"./contracts/billing\"\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\"\nimport { videoTranscriptContract } from \"./contracts/video-transcript\"\n\nexport const contract = {\n betaAccess: betaAccessContract,\n billing: billingContract,\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 videoTranscript: videoTranscriptContract,\n}\n\nexport type ORPCRouterClient = ContractRouterClient<typeof contract>\n\nexport * from \"./public-errors\"\nexport * from \"./schemas/beta-access\"\nexport * from \"./schemas/billing\"\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\"\nexport * from \"./schemas/video-transcript\"\n"],"mappings":";;;;AAGA,MAAa,uBAAuB,EAAE,KAAK,iBAAiB;AAG5D,MAAa,8BAA8B,EAAE,OAAO,EAClD,YAAY,qBACd,CAAC,CAAC,CAAC,OAAO;AAGV,MAAa,+BAA+B,EAAE,OAAO;CACnD,YAAY;CACZ,SAAS,EAAE,QAAQ;AACrB,CAAC;;;ACRD,MAAa,qBAAqB,EAChC,QAAQ,GACL,MAAM;CACL,QAAQ;CACR,MAAM;CACN,SAAS;CACT,MAAM,CAAC,aAAa;AACtB,CAAC,CAAC,CACD,MAAM,2BAA2B,CAAC,CAClC,OAAO,4BAA4B,EACxC;;;ACPA,MAAa,oCAAoC,EAAE,KAAK;CACtD;CACA;CACA;CACA;AACF,CAAC;AAGD,MAAa,qCAAqC,EAAE,OAAO;CACzD,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS;CACpC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS;CAClC,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;CACpC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;AAC7C,CAAC,CAAC,CAAC,OA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4B,CAAC,CAAC,CACtF,MAAM;GACL,QAAQ;GACR,MAAM;GACN,SAAS;GACT,MAAM,CAAC,qBAAqB;EAC9B,CAAC,CAAC,CACD,MAAM,6BAA6B,CAAC,CACpC,OAAO,8BAA8B;CCdvB;AACnB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@read-frog/api-contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@orpc/contract": "^1.14.6",
|
|
28
28
|
"zod": "^4.4.3",
|
|
29
|
-
"@read-frog/definitions": "0.3.
|
|
29
|
+
"@read-frog/definitions": "0.3.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.1.0",
|
|
33
33
|
"tsdown": "^0.22.3",
|
|
34
|
+
"@repo/eslint-config": "0.0.1",
|
|
34
35
|
"@repo/tsdown-config": "0.0.0",
|
|
35
|
-
"@repo/typescript-config": "0.0.0"
|
|
36
|
-
"@repo/eslint-config": "0.0.1"
|
|
36
|
+
"@repo/typescript-config": "0.0.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsdown",
|
package/src/contracts/billing.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "#/schemas/billing"
|
|
8
8
|
|
|
9
9
|
const billingProcedure = oc.errors(
|
|
10
|
-
pickPublicErrorMap("BILLING_NOT_CONFIGURED", "BILLING_CUSTOMER_NOT_FOUND"),
|
|
10
|
+
pickPublicErrorMap("BILLING_NOT_CONFIGURED", "BILLING_CUSTOMER_NOT_FOUND", "BILLING_PASS_ACTIVE"),
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
export const billingContract = {
|
|
@@ -23,7 +23,7 @@ export const billingContract = {
|
|
|
23
23
|
.route({
|
|
24
24
|
method: "POST",
|
|
25
25
|
path: "/billing/checkout-sessions",
|
|
26
|
-
summary: "Create a Stripe Checkout Session for a subscription",
|
|
26
|
+
summary: "Create a Stripe Checkout Session for a subscription or one-time Pro pass",
|
|
27
27
|
tags: ["Billing"],
|
|
28
28
|
})
|
|
29
29
|
.input(billingCreateCheckoutSessionInputSchema)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import { pickPublicErrorMap } from "#/public-errors"
|
|
3
|
+
import {
|
|
4
|
+
videoTranscriptCreateInputSchema,
|
|
5
|
+
videoTranscriptGetInputSchema,
|
|
6
|
+
videoTranscriptResourceSchema,
|
|
7
|
+
videoTranscriptSubtitlesSchema,
|
|
8
|
+
} from "#/schemas/video-transcript"
|
|
9
|
+
|
|
10
|
+
export const videoTranscriptContract = {
|
|
11
|
+
create: oc
|
|
12
|
+
.route({
|
|
13
|
+
method: "POST",
|
|
14
|
+
path: "/video-transcripts",
|
|
15
|
+
summary: "Create or reuse a video transcription job",
|
|
16
|
+
tags: ["Video Transcription"],
|
|
17
|
+
})
|
|
18
|
+
.input(videoTranscriptCreateInputSchema)
|
|
19
|
+
.output(videoTranscriptResourceSchema),
|
|
20
|
+
get: oc
|
|
21
|
+
.errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND"))
|
|
22
|
+
.route({
|
|
23
|
+
method: "GET",
|
|
24
|
+
path: "/video-transcripts/{id}",
|
|
25
|
+
summary: "Get a video transcription job's status",
|
|
26
|
+
tags: ["Video Transcription"],
|
|
27
|
+
})
|
|
28
|
+
.input(videoTranscriptGetInputSchema)
|
|
29
|
+
.output(videoTranscriptResourceSchema),
|
|
30
|
+
getSubtitles: oc
|
|
31
|
+
.errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND", "VIDEO_TRANSCRIPT_NOT_READY"))
|
|
32
|
+
.route({
|
|
33
|
+
method: "GET",
|
|
34
|
+
path: "/video-transcripts/{id}/subtitles",
|
|
35
|
+
summary: "Get a completed video transcript's subtitles",
|
|
36
|
+
tags: ["Video Transcription"],
|
|
37
|
+
})
|
|
38
|
+
.input(videoTranscriptGetInputSchema)
|
|
39
|
+
.output(videoTranscriptSubtitlesSchema),
|
|
40
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { notebaseColumnContract } from "./contracts/notebase-column"
|
|
|
9
9
|
import { notebaseRowContract } from "./contracts/notebase-row"
|
|
10
10
|
import { srsContract } from "./contracts/srs"
|
|
11
11
|
import { userContract } from "./contracts/user"
|
|
12
|
+
import { videoTranscriptContract } from "./contracts/video-transcript"
|
|
12
13
|
|
|
13
14
|
export const contract = {
|
|
14
15
|
betaAccess: betaAccessContract,
|
|
@@ -21,6 +22,7 @@ export const contract = {
|
|
|
21
22
|
notebaseRow: notebaseRowContract,
|
|
22
23
|
srs: srsContract,
|
|
23
24
|
user: userContract,
|
|
25
|
+
videoTranscript: videoTranscriptContract,
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export type ORPCRouterClient = ContractRouterClient<typeof contract>
|
|
@@ -37,3 +39,4 @@ export * from "./schemas/notebase-view"
|
|
|
37
39
|
export * from "./schemas/srs"
|
|
38
40
|
export * from "./schemas/timezone"
|
|
39
41
|
export * from "./schemas/user"
|
|
42
|
+
export * from "./schemas/video-transcript"
|
package/src/public-errors.ts
CHANGED
|
@@ -45,6 +45,18 @@ export const PUBLIC_APP_ERROR_DEFS = {
|
|
|
45
45
|
message: "Notebase not found",
|
|
46
46
|
status: 404,
|
|
47
47
|
},
|
|
48
|
+
VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
|
|
49
|
+
message: "Video transcription is currently in beta for selected accounts",
|
|
50
|
+
status: 403,
|
|
51
|
+
},
|
|
52
|
+
VIDEO_TRANSCRIPT_NOT_FOUND: {
|
|
53
|
+
message: "Video transcript not found",
|
|
54
|
+
status: 404,
|
|
55
|
+
},
|
|
56
|
+
VIDEO_TRANSCRIPT_NOT_READY: {
|
|
57
|
+
message: "Video transcript is not ready yet",
|
|
58
|
+
status: 409,
|
|
59
|
+
},
|
|
48
60
|
NOTEBASE_COLUMN_NOT_FOUND: {
|
|
49
61
|
message: "Notebase column not found",
|
|
50
62
|
status: 404,
|
|
@@ -82,6 +94,10 @@ export const PUBLIC_APP_ERROR_DEFS = {
|
|
|
82
94
|
message: "Billing customer not found",
|
|
83
95
|
status: 404,
|
|
84
96
|
},
|
|
97
|
+
BILLING_PASS_ACTIVE: {
|
|
98
|
+
message: "An active Pro pass already covers this account",
|
|
99
|
+
status: 409,
|
|
100
|
+
},
|
|
85
101
|
CARD_NOT_REVIEWABLE: {
|
|
86
102
|
message: "Card cannot be reviewed in its current state",
|
|
87
103
|
status: 409,
|
package/src/schemas/billing.ts
CHANGED
|
@@ -15,15 +15,26 @@ export const billingSubscriptionStatusSchema = z.enum([
|
|
|
15
15
|
])
|
|
16
16
|
export type BillingSubscriptionStatus = z.infer<typeof billingSubscriptionStatusSchema>
|
|
17
17
|
|
|
18
|
-
export const billingPlanSchema = z.enum(["free", "pro"])
|
|
18
|
+
export const billingPlanSchema = z.enum(["free", "pro", "ultra"])
|
|
19
19
|
export type BillingPlan = z.infer<typeof billingPlanSchema>
|
|
20
20
|
|
|
21
|
+
// Plans a user can actively check out into (the free tier has no price).
|
|
22
|
+
export const billingCheckoutPlanSchema = z.enum(["pro", "ultra"])
|
|
23
|
+
export type BillingCheckoutPlan = z.infer<typeof billingCheckoutPlanSchema>
|
|
24
|
+
|
|
25
|
+
export const billingCheckoutChannelSchema = z.enum(["global", "cn"])
|
|
26
|
+
export type BillingCheckoutChannel = z.infer<typeof billingCheckoutChannelSchema>
|
|
27
|
+
|
|
28
|
+
export const billingAccessSourceSchema = z.enum(["subscription", "pass"])
|
|
29
|
+
export type BillingAccessSource = z.infer<typeof billingAccessSourceSchema>
|
|
30
|
+
|
|
21
31
|
export const billingStatusSchema = z.object({
|
|
22
32
|
plan: billingPlanSchema,
|
|
23
33
|
status: billingSubscriptionStatusSchema.nullable(),
|
|
24
34
|
interval: billingIntervalSchema.nullable(),
|
|
25
35
|
currentPeriodEnd: z.coerce.date().nullable(),
|
|
26
36
|
cancelAtPeriodEnd: z.boolean(),
|
|
37
|
+
accessSource: billingAccessSourceSchema.nullable(),
|
|
27
38
|
unlimitedNotebaseNotes: z.boolean(),
|
|
28
39
|
notebaseNoteLimit: z.number().int().positive(),
|
|
29
40
|
notebaseNoteCount: z.number().int().min(0),
|
|
@@ -32,6 +43,8 @@ export type BillingStatus = z.infer<typeof billingStatusSchema>
|
|
|
32
43
|
|
|
33
44
|
export const billingCreateCheckoutSessionInputSchema = z.object({
|
|
34
45
|
interval: billingIntervalSchema,
|
|
46
|
+
channel: billingCheckoutChannelSchema.default("global"),
|
|
47
|
+
plan: billingCheckoutPlanSchema.default("pro"),
|
|
35
48
|
}).strict()
|
|
36
49
|
export type BillingCreateCheckoutSessionInput = z.infer<typeof billingCreateCheckoutSessionInputSchema>
|
|
37
50
|
|
package/src/schemas/srs.ts
CHANGED
|
@@ -107,6 +107,8 @@ export const srsReviewOutputSchema = z.object({
|
|
|
107
107
|
card: cardSchema,
|
|
108
108
|
revlog: srsRevlogSchema,
|
|
109
109
|
txid: z.number(),
|
|
110
|
+
// False when an idempotent replay returned an existing revlog instead of creating one.
|
|
111
|
+
created: z.boolean(),
|
|
110
112
|
})
|
|
111
113
|
export type SrsReviewOutput = z.infer<typeof srsReviewOutputSchema>
|
|
112
114
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { transcriptSegmentSchema } from "@read-frog/definitions"
|
|
2
|
+
import { z } from "zod"
|
|
3
|
+
|
|
4
|
+
export const videoTranscriptStatusSchema = z.enum([
|
|
5
|
+
"pending",
|
|
6
|
+
"processing",
|
|
7
|
+
"completed",
|
|
8
|
+
"failed",
|
|
9
|
+
])
|
|
10
|
+
export type VideoTranscriptStatus = z.infer<typeof videoTranscriptStatusSchema>
|
|
11
|
+
|
|
12
|
+
// The transcript "job" resource: status + metadata, without the (heavy) segments payload.
|
|
13
|
+
export const videoTranscriptResourceSchema = z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
platform: z.string(),
|
|
16
|
+
videoId: z.string(),
|
|
17
|
+
url: z.string(),
|
|
18
|
+
status: videoTranscriptStatusSchema,
|
|
19
|
+
title: z.string().nullable(),
|
|
20
|
+
durationSec: z.number().nullable(),
|
|
21
|
+
detectedLanguage: z.string().nullable(),
|
|
22
|
+
error: z.string().nullable(),
|
|
23
|
+
createdAt: z.date(),
|
|
24
|
+
updatedAt: z.date(),
|
|
25
|
+
})
|
|
26
|
+
export type VideoTranscriptResource = z.infer<typeof videoTranscriptResourceSchema>
|
|
27
|
+
|
|
28
|
+
// The subtitles sub-resource: the segments + model-detected language, only available once completed.
|
|
29
|
+
export const videoTranscriptSubtitlesSchema = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
detectedLanguage: z.string().nullable(),
|
|
32
|
+
segments: z.array(transcriptSegmentSchema),
|
|
33
|
+
})
|
|
34
|
+
export type VideoTranscriptSubtitles = z.infer<typeof videoTranscriptSubtitlesSchema>
|
|
35
|
+
|
|
36
|
+
export const videoTranscriptCreateInputSchema = z.object({
|
|
37
|
+
platform: z.string(),
|
|
38
|
+
videoId: z.string(),
|
|
39
|
+
url: z.string().url(),
|
|
40
|
+
}).strict()
|
|
41
|
+
export type VideoTranscriptCreateInput = z.infer<typeof videoTranscriptCreateInputSchema>
|
|
42
|
+
|
|
43
|
+
export const videoTranscriptGetInputSchema = z.object({
|
|
44
|
+
id: z.uuid(),
|
|
45
|
+
}).strict()
|
|
46
|
+
export type VideoTranscriptGetInput = z.infer<typeof videoTranscriptGetInputSchema>
|