@read-frog/api-contract 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ContractRouterClient, ErrorMap, Route } from "@orpc/contract";
2
- import { CardState, ReviewRating, SRS_REVIEW_DURATION_MS_MAX, ScheduleStatus, SchedulingParams, cardStateSchema, reviewRatingSchema, scheduleStatusSchema, schedulingParamsSchema } from "@read-frog/definitions";
3
2
  import { z } from "zod";
3
+ import { CardState, ReviewRating, SRS_REVIEW_DURATION_MS_MAX, ScheduleStatus, SchedulingParams, cardStateSchema, reviewRatingSchema, scheduleStatusSchema, schedulingParamsSchema } from "@read-frog/definitions";
4
4
  //#region src/contracts/shared.d.ts
5
5
  /**
6
6
  * A documented business route shared by OpenAPI and agent-facing adapters.
@@ -147,18 +147,10 @@ export declare const PUBLIC_APP_ERROR_DEFS: {
147
147
  readonly message: "Built-in AI credit exhausted";
148
148
  readonly status: 429;
149
149
  };
150
- readonly NOTEBASE_BETA_RESTRICTED: {
151
- readonly message: "Notebase is currently in beta for selected accounts";
152
- readonly status: 403;
153
- };
154
150
  readonly NOTEBASE_NOT_FOUND: {
155
151
  readonly message: "Notebase not found";
156
152
  readonly status: 404;
157
153
  };
158
- readonly VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
159
- readonly message: "Video transcription is currently in beta for selected accounts";
160
- readonly status: 403;
161
- };
162
154
  readonly VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED: {
163
155
  readonly message: "AI subtitles require a Pro or Ultra subscription";
164
156
  readonly status: 403;
@@ -348,6 +340,10 @@ export declare const PUBLIC_APP_ERROR_DEFS: {
348
340
  readonly message: "Ebook upload has not been completed";
349
341
  readonly status: 409;
350
342
  };
343
+ readonly EMAIL_LINK_INVALID: {
344
+ readonly message: "This email link is not valid";
345
+ readonly status: 400;
346
+ };
351
347
  };
352
348
  export type PublicAppErrorCode = keyof typeof PUBLIC_APP_ERROR_DEFS;
353
349
  export type PublicAppErrorData<TCode extends PublicAppErrorCode> = (typeof PUBLIC_APP_ERROR_DEFS)[TCode] extends {
@@ -395,18 +391,10 @@ export declare function getPublicErrorDefinition<TCode extends PublicAppErrorCod
395
391
  readonly message: "Built-in AI credit exhausted";
396
392
  readonly status: 429;
397
393
  };
398
- readonly NOTEBASE_BETA_RESTRICTED: {
399
- readonly message: "Notebase is currently in beta for selected accounts";
400
- readonly status: 403;
401
- };
402
394
  readonly NOTEBASE_NOT_FOUND: {
403
395
  readonly message: "Notebase not found";
404
396
  readonly status: 404;
405
397
  };
406
- readonly VIDEO_TRANSCRIPTION_BETA_RESTRICTED: {
407
- readonly message: "Video transcription is currently in beta for selected accounts";
408
- readonly status: 403;
409
- };
410
398
  readonly VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED: {
411
399
  readonly message: "AI subtitles require a Pro or Ultra subscription";
412
400
  readonly status: 403;
@@ -596,33 +584,31 @@ export declare function getPublicErrorDefinition<TCode extends PublicAppErrorCod
596
584
  readonly message: "Ebook upload has not been completed";
597
585
  readonly status: 409;
598
586
  };
587
+ readonly EMAIL_LINK_INVALID: {
588
+ readonly message: "This email link is not valid";
589
+ readonly status: 400;
590
+ };
599
591
  }[TCode];
600
592
  export declare function pickPublicErrorMap<const TCodes extends readonly PublicAppErrorCode[]>(...codes: TCodes): Pick<ErrorMap, TCodes[number]>;
601
593
  //#endregion
602
- //#region src/schemas/beta-access.d.ts
603
- export declare const BetaFeatureKeySchema: z.ZodEnum<{
604
- ebook: "ebook";
605
- notebase: "notebase";
606
- videoTranscription: "videoTranscription";
594
+ //#region src/schemas/app-locale.d.ts
595
+ /**
596
+ * The languages the website is in (`project.inlang/settings.json`; a test in
597
+ * apps/www keeps the two in step). Used wherever the server writes for a
598
+ * person: Stripe pages, emails, and the account's `locale`.
599
+ */
600
+ export declare const appLocaleSchema: z.ZodEnum<{
601
+ en: "en";
602
+ es: "es";
603
+ ja: "ja";
604
+ ko: "ko";
605
+ ru: "ru";
606
+ tr: "tr";
607
+ vi: "vi";
608
+ zh: "zh";
609
+ "zh-TW": "zh-TW";
607
610
  }>;
608
- export type BetaFeatureKey = z.infer<typeof BetaFeatureKeySchema>;
609
- export declare const BetaAccessStatusInputSchema: z.ZodObject<{
610
- featureKey: z.ZodEnum<{
611
- ebook: "ebook";
612
- notebase: "notebase";
613
- videoTranscription: "videoTranscription";
614
- }>;
615
- }, z.core.$strict>;
616
- export type BetaAccessStatusInput = z.infer<typeof BetaAccessStatusInputSchema>;
617
- export declare const BetaAccessStatusOutputSchema: z.ZodObject<{
618
- featureKey: z.ZodEnum<{
619
- ebook: "ebook";
620
- notebase: "notebase";
621
- videoTranscription: "videoTranscription";
622
- }>;
623
- allowed: z.ZodBoolean;
624
- }, z.core.$strip>;
625
- export type BetaAccessStatusOutput = z.infer<typeof BetaAccessStatusOutputSchema>;
611
+ export type AppLocale = z.infer<typeof appLocaleSchema>;
626
612
  //#endregion
627
613
  //#region src/schemas/billing.d.ts
628
614
  export declare const billingIntervalSchema: z.ZodEnum<{
@@ -648,27 +634,20 @@ export declare const billingPlanSchema: z.ZodEnum<{
648
634
  }>;
649
635
  export type BillingPlan = z.infer<typeof billingPlanSchema>;
650
636
  /**
651
- * Whether a plan may use a feature, given the plans that feature allows.
637
+ * How many MCP tool calls each plan may make in a day (24 hours from the first
638
+ * one); `null` is no limit. Each `tools/call` counts once, whatever the tool.
652
639
  *
653
- * An explicit set rather than a minimum tier: there is no rank table to keep in
654
- * step with the plan enum, and any combination is expressible by writing it
655
- * down. The cost is that nothing derives from it automatically -- a feature's
656
- * pricing-card placement is a companion edit, noted at each `*_ALLOWED_PLANS`.
657
- */
658
- export declare function isPlanAllowed(plan: BillingPlan, allowed: readonly BillingPlan[]): boolean;
659
- /**
660
- * Plans that may use the remote MCP server.
640
+ * Read by the MCP server's gate AND by the website's copy, so the pages cannot
641
+ * promise calls the server refuses.
661
642
  *
662
- * Read by the server-side gate AND by the website's copy, so the page cannot
663
- * promise access the API refuses. `satisfies` keeps the literal tuple type so
664
- * the UI can render the plan names from this constant instead of hardcoding
665
- * them.
666
- *
667
- * Companion edit when this changes: the feature bullet in
668
- * `apps/www/src/routes/pricing.tsx` lives on the lowest allowed plan's card
669
- * (higher cards inherit it through their "everything in <lower plan>" line).
643
+ * Companion edit when this changes: the MCP docs under
644
+ * `apps/www/content/docs/mcp/` and `account-and-plans`, which state the numbers.
670
645
  */
671
- export declare const MCP_ALLOWED_PLANS: readonly ["ultra"];
646
+ export declare const MCP_DAILY_CALL_LIMITS: {
647
+ readonly free: 10;
648
+ readonly pro: 50;
649
+ readonly ultra: null;
650
+ };
672
651
  export declare const billingCheckoutPlanSchema: z.ZodEnum<{
673
652
  pro: "pro";
674
653
  ultra: "ultra";
@@ -691,7 +670,7 @@ export declare const billingLocaleSchema: z.ZodEnum<{
691
670
  zh: "zh";
692
671
  "zh-TW": "zh-TW";
693
672
  }>;
694
- export type BillingLocale = z.infer<typeof billingLocaleSchema>;
673
+ export type BillingLocale = AppLocale;
695
674
  export declare const billingAccessSourceSchema: z.ZodEnum<{
696
675
  pass: "pass";
697
676
  subscription: "subscription";
@@ -709,6 +688,26 @@ export declare const billingScheduledChangeSchema: z.ZodObject<{
709
688
  effectiveAt: z.ZodCoercedDate<unknown>;
710
689
  }, z.core.$strict>;
711
690
  export type BillingScheduledChange = z.infer<typeof billingScheduledChangeSchema>;
691
+ /**
692
+ * The zone a payment deadline is shown in, as a date with no time. UTC−12 is
693
+ * the last zone to finish a day, and `dueBy` is the end of a day there, so the
694
+ * date it shows stays open in every customer's zone until their own midnight.
695
+ */
696
+ export declare const BILLING_PAYMENT_DUE_TIME_ZONE = "Etc/GMT+12";
697
+ /**
698
+ * A renewal whose payment failed. The plan stays until `dueBy`; paying the
699
+ * invoice before then (or later, until the subscription is canceled) restores
700
+ * the subscription as if the payment had gone through.
701
+ */
702
+ export declare const billingPaymentDueSchema: z.ZodObject<{
703
+ dueBy: z.ZodCoercedDate<unknown>;
704
+ plan: z.ZodEnum<{
705
+ pro: "pro";
706
+ ultra: "ultra";
707
+ }>;
708
+ url: z.ZodNullable<z.ZodURL>;
709
+ }, z.core.$strict>;
710
+ export type BillingPaymentDue = z.infer<typeof billingPaymentDueSchema>;
712
711
  export declare const billingStatusSchema: z.ZodObject<{
713
712
  plan: z.ZodEnum<{
714
713
  free: "free";
@@ -746,6 +745,14 @@ export declare const billingStatusSchema: z.ZodObject<{
746
745
  }>;
747
746
  effectiveAt: z.ZodCoercedDate<unknown>;
748
747
  }, z.core.$strict>>;
748
+ paymentDue: z.ZodNullable<z.ZodObject<{
749
+ dueBy: z.ZodCoercedDate<unknown>;
750
+ plan: z.ZodEnum<{
751
+ pro: "pro";
752
+ ultra: "ultra";
753
+ }>;
754
+ url: z.ZodNullable<z.ZodURL>;
755
+ }, z.core.$strict>>;
749
756
  unlimitedNotebaseNotes: z.ZodBoolean;
750
757
  notebaseNoteLimit: z.ZodNumber;
751
758
  notebaseNoteCount: z.ZodNumber;
@@ -1362,31 +1369,35 @@ export declare const ebookRequestUploadInputSchema: z.ZodObject<{
1362
1369
  title: z.ZodString;
1363
1370
  author: z.ZodOptional<z.ZodString>;
1364
1371
  language: z.ZodOptional<z.ZodString>;
1365
- coverContentType: z.ZodOptional<z.ZodEnum<{
1366
- "image/jpeg": "image/jpeg";
1367
- "image/png": "image/png";
1368
- "image/webp": "image/webp";
1369
- }>>;
1372
+ fileByteSize: z.ZodNumber;
1373
+ cover: z.ZodOptional<z.ZodObject<{
1374
+ contentType: z.ZodEnum<{
1375
+ "image/jpeg": "image/jpeg";
1376
+ "image/png": "image/png";
1377
+ "image/webp": "image/webp";
1378
+ }>;
1379
+ byteSize: z.ZodNumber;
1380
+ }, z.core.$strict>>;
1370
1381
  }, z.core.$strict>;
1371
1382
  export type EbookRequestUploadInput = z.infer<typeof ebookRequestUploadInputSchema>;
1372
1383
  /**
1373
- * S3 POST form policy. `fields` must be appended to the form in iteration order
1374
- * with the file last; S3 ignores anything sent after the `file` part.
1384
+ * A signed PUT: send the file to `url` with exactly `headers`. The signature
1385
+ * covers the file's type and exact size, so storage refuses any other file.
1375
1386
  */
1376
- export declare const ebookPresignedPostSchema: z.ZodObject<{
1387
+ export declare const ebookPresignedUploadSchema: z.ZodObject<{
1377
1388
  url: z.ZodURL;
1378
- fields: z.ZodRecord<z.ZodString, z.ZodString>;
1389
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
1379
1390
  }, z.core.$strict>;
1380
- export type EbookPresignedPost = z.infer<typeof ebookPresignedPostSchema>;
1391
+ export type EbookPresignedUpload = z.infer<typeof ebookPresignedUploadSchema>;
1381
1392
  export declare const ebookRequestUploadOutputSchema: z.ZodObject<{
1382
1393
  ebookId: z.ZodUUID;
1383
1394
  upload: z.ZodObject<{
1384
1395
  url: z.ZodURL;
1385
- fields: z.ZodRecord<z.ZodString, z.ZodString>;
1396
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
1386
1397
  }, z.core.$strict>;
1387
1398
  coverUpload: z.ZodNullable<z.ZodObject<{
1388
1399
  url: z.ZodURL;
1389
- fields: z.ZodRecord<z.ZodString, z.ZodString>;
1400
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
1390
1401
  }, z.core.$strict>>;
1391
1402
  expiresAt: z.ZodCoercedDate<unknown>;
1392
1403
  }, z.core.$strict>;
@@ -1477,6 +1488,133 @@ export declare const ebookDeleteOutputSchema: z.ZodObject<{
1477
1488
  }, z.core.$strict>;
1478
1489
  export type EbookDeleteOutput = z.infer<typeof ebookDeleteOutputSchema>;
1479
1490
  //#endregion
1491
+ //#region src/schemas/email-preferences.d.ts
1492
+ /** A category's key, such as `promotions`. */
1493
+ export declare const emailCategoryKeySchema: z.ZodString;
1494
+ export type EmailCategoryKey = z.infer<typeof emailCategoryKeySchema>;
1495
+ /** The token in an email's unsubscribe link. */
1496
+ export declare const emailLinkTokenSchema: z.ZodString;
1497
+ export declare const emailCategoryStateSchema: z.ZodObject<{
1498
+ key: z.ZodString;
1499
+ name: z.ZodString;
1500
+ description: z.ZodNullable<z.ZodString>;
1501
+ commercial: z.ZodBoolean;
1502
+ required: z.ZodBoolean;
1503
+ subscribed: z.ZodBoolean;
1504
+ }, z.core.$strict>;
1505
+ export type EmailCategoryState = z.infer<typeof emailCategoryStateSchema>;
1506
+ export declare const emailPreferencesStateSchema: z.ZodObject<{
1507
+ categories: z.ZodArray<z.ZodObject<{
1508
+ key: z.ZodString;
1509
+ name: z.ZodString;
1510
+ description: z.ZodNullable<z.ZodString>;
1511
+ commercial: z.ZodBoolean;
1512
+ required: z.ZodBoolean;
1513
+ subscribed: z.ZodBoolean;
1514
+ }, z.core.$strict>>;
1515
+ unsubscribedAll: z.ZodBoolean;
1516
+ }, z.core.$strict>;
1517
+ export type EmailPreferencesState = z.infer<typeof emailPreferencesStateSchema>;
1518
+ /**
1519
+ * What the page a link opens shows on top of the state: whose preferences they
1520
+ * are, without the full address, and the category the link was for, if any.
1521
+ */
1522
+ export declare const emailPreferencesByTokenStateSchema: z.ZodObject<{
1523
+ categories: z.ZodArray<z.ZodObject<{
1524
+ key: z.ZodString;
1525
+ name: z.ZodString;
1526
+ description: z.ZodNullable<z.ZodString>;
1527
+ commercial: z.ZodBoolean;
1528
+ required: z.ZodBoolean;
1529
+ subscribed: z.ZodBoolean;
1530
+ }, z.core.$strict>>;
1531
+ unsubscribedAll: z.ZodBoolean;
1532
+ maskedEmail: z.ZodString;
1533
+ highlightCategory: z.ZodNullable<z.ZodString>;
1534
+ }, z.core.$strict>;
1535
+ export type EmailPreferencesByTokenState = z.infer<typeof emailPreferencesByTokenStateSchema>;
1536
+ export declare const emailPreferencesGetInputSchema: z.ZodObject<{
1537
+ locale: z.ZodEnum<{
1538
+ en: "en";
1539
+ es: "es";
1540
+ ja: "ja";
1541
+ ko: "ko";
1542
+ ru: "ru";
1543
+ tr: "tr";
1544
+ vi: "vi";
1545
+ zh: "zh";
1546
+ "zh-TW": "zh-TW";
1547
+ }>;
1548
+ }, z.core.$strict>;
1549
+ export type EmailPreferencesGetInput = z.infer<typeof emailPreferencesGetInputSchema>;
1550
+ export declare const emailPreferencesUpdateInputSchema: z.ZodObject<{
1551
+ categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1552
+ unsubscribedAll: z.ZodOptional<z.ZodBoolean>;
1553
+ locale: z.ZodEnum<{
1554
+ en: "en";
1555
+ es: "es";
1556
+ ja: "ja";
1557
+ ko: "ko";
1558
+ ru: "ru";
1559
+ tr: "tr";
1560
+ vi: "vi";
1561
+ zh: "zh";
1562
+ "zh-TW": "zh-TW";
1563
+ }>;
1564
+ }, z.core.$strict>;
1565
+ export type EmailPreferencesUpdateInput = z.infer<typeof emailPreferencesUpdateInputSchema>;
1566
+ export declare const emailPreferencesGetByTokenInputSchema: z.ZodObject<{
1567
+ token: z.ZodString;
1568
+ locale: z.ZodEnum<{
1569
+ en: "en";
1570
+ es: "es";
1571
+ ja: "ja";
1572
+ ko: "ko";
1573
+ ru: "ru";
1574
+ tr: "tr";
1575
+ vi: "vi";
1576
+ zh: "zh";
1577
+ "zh-TW": "zh-TW";
1578
+ }>;
1579
+ }, z.core.$strict>;
1580
+ export type EmailPreferencesGetByTokenInput = z.infer<typeof emailPreferencesGetByTokenInputSchema>;
1581
+ export declare const emailPreferencesUpdateByTokenInputSchema: z.ZodObject<{
1582
+ categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1583
+ unsubscribedAll: z.ZodOptional<z.ZodBoolean>;
1584
+ token: z.ZodString;
1585
+ locale: z.ZodEnum<{
1586
+ en: "en";
1587
+ es: "es";
1588
+ ja: "ja";
1589
+ ko: "ko";
1590
+ ru: "ru";
1591
+ tr: "tr";
1592
+ vi: "vi";
1593
+ zh: "zh";
1594
+ "zh-TW": "zh-TW";
1595
+ }>;
1596
+ }, z.core.$strict>;
1597
+ export type EmailPreferencesUpdateByTokenInput = z.infer<typeof emailPreferencesUpdateByTokenInputSchema>;
1598
+ //#endregion
1599
+ //#region src/schemas/feature-access.d.ts
1600
+ export declare const GatedFeatureKeySchema: z.ZodEnum<{
1601
+ ebook: "ebook";
1602
+ }>;
1603
+ export type GatedFeatureKey = z.infer<typeof GatedFeatureKeySchema>;
1604
+ export declare const FeatureAccessStatusInputSchema: z.ZodObject<{
1605
+ featureKey: z.ZodEnum<{
1606
+ ebook: "ebook";
1607
+ }>;
1608
+ }, z.core.$strict>;
1609
+ export type FeatureAccessStatusInput = z.infer<typeof FeatureAccessStatusInputSchema>;
1610
+ export declare const FeatureAccessStatusOutputSchema: z.ZodObject<{
1611
+ featureKey: z.ZodEnum<{
1612
+ ebook: "ebook";
1613
+ }>;
1614
+ allowed: z.ZodBoolean;
1615
+ }, z.core.$strip>;
1616
+ export type FeatureAccessStatusOutput = z.infer<typeof FeatureAccessStatusOutputSchema>;
1617
+ //#endregion
1480
1618
  //#region src/schemas/hosted-ai.d.ts
1481
1619
  export declare const HostedAiOutputFieldTypeSchema: z.ZodEnum<{
1482
1620
  number: "number";
@@ -1639,13 +1777,16 @@ export declare const HostedAiRateLimitErrorDataSchema: z.ZodObject<{
1639
1777
  }>;
1640
1778
  }, z.core.$strip>;
1641
1779
  /**
1780
+ * A recurring pool: the plan's credit for a day or a week, which refills at
1781
+ * `resetAt`.
1782
+ *
1642
1783
  * Deliberately free of dollar amounts and of the versioned policy id. Clients
1643
1784
  * render a consumption bar and a reset time, so a percentage and a period kind
1644
1785
  * are all they need, and neither leaks what a call costs us. `usedPercent`
1645
1786
  * counts settled spend only: including in-flight reservations would make the
1646
1787
  * bar jump forward and then back as each stream settles.
1647
1788
  */
1648
- export declare const HostedAiCreditStatusSchema: z.ZodObject<{
1789
+ export declare const HostedAiRecurringCreditStatusSchema: z.ZodObject<{
1649
1790
  periodKind: z.ZodEnum<{
1650
1791
  daily: "daily";
1651
1792
  weekly: "weekly";
@@ -1662,6 +1803,62 @@ export declare const HostedAiCreditStatusSchema: z.ZodObject<{
1662
1803
  videoSubtitles: "videoSubtitles";
1663
1804
  }>>;
1664
1805
  }, z.core.$strict>;
1806
+ /**
1807
+ * A one-time pool, such as credit from a campaign or from support. It never
1808
+ * refills: once spent or past `expiresAt` it is gone, so a client shows the
1809
+ * expiry, not a reset. It is drawn on only after the plan's own pool for a
1810
+ * feature is spent, or for a feature the plan does not fund. Listed until it
1811
+ * expires, even when spent. Same fields as a recurring pool otherwise.
1812
+ */
1813
+ export declare const HostedAiOneTimeCreditStatusSchema: z.ZodObject<{
1814
+ periodKind: z.ZodLiteral<"once">;
1815
+ usedPercent: z.ZodNumber;
1816
+ expiresAt: z.ZodISODateTime;
1817
+ features: z.ZodArray<z.ZodEnum<{
1818
+ customAction: "customAction";
1819
+ inputTranslation: "inputTranslation";
1820
+ languageDetection: "languageDetection";
1821
+ noteSuggestion: "noteSuggestion";
1822
+ pageTranslation: "pageTranslation";
1823
+ selectionTranslation: "selectionTranslation";
1824
+ videoSubtitles: "videoSubtitles";
1825
+ }>>;
1826
+ }, z.core.$strict>;
1827
+ /**
1828
+ * One pool that can pay for Built-in AI, told apart by `periodKind`: a
1829
+ * recurring `daily` or `weekly` pool refills at `resetAt`, a one-time (`once`)
1830
+ * pool ends at `expiresAt`. Narrow on `periodKind` before reading either.
1831
+ */
1832
+ export declare const HostedAiCreditPoolStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1833
+ periodKind: z.ZodEnum<{
1834
+ daily: "daily";
1835
+ weekly: "weekly";
1836
+ }>;
1837
+ usedPercent: z.ZodNumber;
1838
+ resetAt: z.ZodNullable<z.ZodISODateTime>;
1839
+ features: z.ZodArray<z.ZodEnum<{
1840
+ customAction: "customAction";
1841
+ inputTranslation: "inputTranslation";
1842
+ languageDetection: "languageDetection";
1843
+ noteSuggestion: "noteSuggestion";
1844
+ pageTranslation: "pageTranslation";
1845
+ selectionTranslation: "selectionTranslation";
1846
+ videoSubtitles: "videoSubtitles";
1847
+ }>>;
1848
+ }, z.core.$strict>, z.ZodObject<{
1849
+ periodKind: z.ZodLiteral<"once">;
1850
+ usedPercent: z.ZodNumber;
1851
+ expiresAt: z.ZodISODateTime;
1852
+ features: z.ZodArray<z.ZodEnum<{
1853
+ customAction: "customAction";
1854
+ inputTranslation: "inputTranslation";
1855
+ languageDetection: "languageDetection";
1856
+ noteSuggestion: "noteSuggestion";
1857
+ pageTranslation: "pageTranslation";
1858
+ selectionTranslation: "selectionTranslation";
1859
+ videoSubtitles: "videoSubtitles";
1860
+ }>>;
1861
+ }, z.core.$strict>], "periodKind">;
1665
1862
  export declare const HostedAiTierStatusSchema: z.ZodObject<{
1666
1863
  accessAllowed: z.ZodBoolean;
1667
1864
  available: z.ZodBoolean;
@@ -1718,6 +1915,36 @@ export declare const HostedAiStatusOutputSchema: z.ZodObject<{
1718
1915
  videoSubtitles: "videoSubtitles";
1719
1916
  }>>;
1720
1917
  }, z.core.$strict>>;
1918
+ pools: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1919
+ periodKind: z.ZodEnum<{
1920
+ daily: "daily";
1921
+ weekly: "weekly";
1922
+ }>;
1923
+ usedPercent: z.ZodNumber;
1924
+ resetAt: z.ZodNullable<z.ZodISODateTime>;
1925
+ features: z.ZodArray<z.ZodEnum<{
1926
+ customAction: "customAction";
1927
+ inputTranslation: "inputTranslation";
1928
+ languageDetection: "languageDetection";
1929
+ noteSuggestion: "noteSuggestion";
1930
+ pageTranslation: "pageTranslation";
1931
+ selectionTranslation: "selectionTranslation";
1932
+ videoSubtitles: "videoSubtitles";
1933
+ }>>;
1934
+ }, z.core.$strict>, z.ZodObject<{
1935
+ periodKind: z.ZodLiteral<"once">;
1936
+ usedPercent: z.ZodNumber;
1937
+ expiresAt: z.ZodISODateTime;
1938
+ features: z.ZodArray<z.ZodEnum<{
1939
+ customAction: "customAction";
1940
+ inputTranslation: "inputTranslation";
1941
+ languageDetection: "languageDetection";
1942
+ noteSuggestion: "noteSuggestion";
1943
+ pageTranslation: "pageTranslation";
1944
+ selectionTranslation: "selectionTranslation";
1945
+ videoSubtitles: "videoSubtitles";
1946
+ }>>;
1947
+ }, z.core.$strict>], "periodKind">>;
1721
1948
  features: z.ZodObject<{
1722
1949
  pageTranslation: z.ZodObject<{
1723
1950
  normal: z.ZodObject<{
@@ -1918,7 +2145,9 @@ export type HostedAiCreditPolicyId = z.infer<typeof HostedAiCreditPolicyIdSchema
1918
2145
  export type HostedAiCreditPeriodKind = z.infer<typeof HostedAiCreditPeriodKindSchema>;
1919
2146
  export type HostedAiQuotaScope = z.infer<typeof HostedAiQuotaScopeSchema>;
1920
2147
  export type HostedAiRateLimitErrorData = z.infer<typeof HostedAiRateLimitErrorDataSchema>;
1921
- export type HostedAiCreditStatus = z.infer<typeof HostedAiCreditStatusSchema>;
2148
+ export type HostedAiRecurringCreditStatus = z.infer<typeof HostedAiRecurringCreditStatusSchema>;
2149
+ export type HostedAiOneTimeCreditStatus = z.infer<typeof HostedAiOneTimeCreditStatusSchema>;
2150
+ export type HostedAiCreditPoolStatus = z.infer<typeof HostedAiCreditPoolStatusSchema>;
1922
2151
  export type HostedAiTierStatus = z.infer<typeof HostedAiTierStatusSchema>;
1923
2152
  export type HostedAiFeatureStatus = z.infer<typeof HostedAiFeatureStatusSchema>;
1924
2153
  export type HostedAiStatusOutput = z.infer<typeof HostedAiStatusOutputSchema>;
@@ -2003,6 +2232,7 @@ export declare const notebaseSchema: z.ZodObject<{
2003
2232
  "FSRS-6": "FSRS-6";
2004
2233
  "FSRS-7": "FSRS-7";
2005
2234
  }>;
2235
+ srsSleepingAt: z.ZodNullable<z.ZodDate>;
2006
2236
  createdAt: z.ZodDate;
2007
2237
  updatedAt: z.ZodDate;
2008
2238
  }, z.core.$strip>;
@@ -2110,6 +2340,7 @@ export declare const NotebaseCreateOutputSchema: z.ZodObject<{
2110
2340
  "FSRS-6": "FSRS-6";
2111
2341
  "FSRS-7": "FSRS-7";
2112
2342
  }>;
2343
+ srsSleepingAt: z.ZodNullable<z.ZodDate>;
2113
2344
  createdAt: z.ZodDate;
2114
2345
  updatedAt: z.ZodDate;
2115
2346
  }, z.core.$strip>;
@@ -2150,12 +2381,22 @@ export declare const NotebaseUpdateOutputSchema: z.ZodObject<{
2150
2381
  "FSRS-6": "FSRS-6";
2151
2382
  "FSRS-7": "FSRS-7";
2152
2383
  }>;
2384
+ srsSleepingAt: z.ZodNullable<z.ZodDate>;
2153
2385
  createdAt: z.ZodDate;
2154
2386
  updatedAt: z.ZodDate;
2155
2387
  }, z.core.$strip>;
2156
2388
  txid: z.ZodNumber;
2157
2389
  }, z.core.$strip>;
2158
2390
  export type NotebaseUpdateOutput = z.infer<typeof NotebaseUpdateOutputSchema>;
2391
+ export declare const NotebaseSetSleepInputSchema: z.ZodObject<{
2392
+ id: z.ZodUUID;
2393
+ enabled: z.ZodBoolean;
2394
+ }, z.core.$strict>;
2395
+ export type NotebaseSetSleepInput = z.infer<typeof NotebaseSetSleepInputSchema>;
2396
+ export declare const NotebaseSetSleepOutputSchema: z.ZodObject<{
2397
+ txid: z.ZodNullable<z.ZodNumber>;
2398
+ }, z.core.$strip>;
2399
+ export type NotebaseSetSleepOutput = z.infer<typeof NotebaseSetSleepOutputSchema>;
2159
2400
  export declare const NotebaseDeleteInputSchema: z.ZodObject<{
2160
2401
  id: z.ZodUUID;
2161
2402
  }, z.core.$strip>;
@@ -2204,6 +2445,7 @@ export declare const NotebaseGetOutputSchema: z.ZodObject<{
2204
2445
  "FSRS-6": "FSRS-6";
2205
2446
  "FSRS-7": "FSRS-7";
2206
2447
  }>;
2448
+ srsSleepingAt: z.ZodNullable<z.ZodDate>;
2207
2449
  createdAt: z.ZodCoercedDate<unknown>;
2208
2450
  updatedAt: z.ZodCoercedDate<unknown>;
2209
2451
  notebaseColumns: z.ZodArray<z.ZodObject<{
@@ -4031,12 +4273,27 @@ export declare const speechSynthesizeInputSchema: z.ZodObject<{
4031
4273
  voice: z.ZodOptional<z.ZodString>;
4032
4274
  }, z.core.$strict>;
4033
4275
  export type SpeechSynthesizeInput = z.infer<typeof speechSynthesizeInputSchema>;
4034
- /** The audio, as an MP3 file. */
4035
- export declare const speechSynthesizeOutputSchema: z.ZodFile;
4276
+ /**
4277
+ * Where to download the audio, an MP3: a link to fetch at once, which stops
4278
+ * working at `expiresAt`.
4279
+ */
4280
+ export declare const speechSynthesizeOutputSchema: z.ZodObject<{
4281
+ url: z.ZodURL;
4282
+ expiresAt: z.ZodCoercedDate<unknown>;
4283
+ }, z.core.$strict>;
4284
+ export type SpeechSynthesizeOutput = z.infer<typeof speechSynthesizeOutputSchema>;
4036
4285
  //#endregion
4037
4286
  //#region src/schemas/timezone.d.ts
4038
4287
  export declare const timezoneSchema: z.ZodString;
4039
4288
  export type Timezone = z.infer<typeof timezoneSchema>;
4289
+ /**
4290
+ * The zone a call reckons days in, under the name an account's zone is stored
4291
+ * under (`canonicalTimeZone`): "Asia/Calcutta" arrives as "Asia/Kolkata" and
4292
+ * "CST" as "America/Chicago", names that Temporal and a Debian Postgres both
4293
+ * read. A fixed offset ("+08:00") is refused, as Postgres reads it with the
4294
+ * opposite sign and would put the call's days on the wrong side of UTC.
4295
+ */
4296
+ export declare const canonicalTimezoneSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4040
4297
  //#endregion
4041
4298
  //#region src/schemas/srs.d.ts
4042
4299
  export declare const stepSchema: z.ZodTemplateLiteral<`${number}d` | `${number}h` | `${number}m`>;
@@ -4057,7 +4314,7 @@ export declare const srsReviewInputSchema: z.ZodObject<{
4057
4314
  hard: "hard";
4058
4315
  }>;
4059
4316
  durationMs: z.ZodNumber;
4060
- timezone: z.ZodString;
4317
+ timezone: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4061
4318
  }, z.core.$strict>;
4062
4319
  export type SrsReviewInput = z.infer<typeof srsReviewInputSchema>;
4063
4320
  export declare const srsRollbackReviewInputSchema: z.ZodObject<{
@@ -4073,7 +4330,7 @@ export declare const srsScheduleStatusStatsSchema: z.ZodRecord<z.ZodEnum<{
4073
4330
  export type SrsScheduleStatusStats = z.infer<typeof srsScheduleStatusStatsSchema>;
4074
4331
  export declare const srsScheduleStatusStatsInputSchema: z.ZodObject<{
4075
4332
  notebaseIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
4076
- timezone: z.ZodString;
4333
+ timezone: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4077
4334
  }, z.core.$strict>;
4078
4335
  export type SrsScheduleStatusStatsInput = z.infer<typeof srsScheduleStatusStatsInputSchema>;
4079
4336
  export declare const srsScheduleStatusStatsOutputSchema: z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodEnum<{
@@ -4083,7 +4340,7 @@ export declare const srsScheduleStatusStatsOutputSchema: z.ZodRecord<z.ZodUUID,
4083
4340
  }>, z.ZodNumber>>;
4084
4341
  export type SrsScheduleStatusStatsOutput = z.infer<typeof srsScheduleStatusStatsOutputSchema>;
4085
4342
  export declare const srsRecentNotebaseScheduleStatusStatsInputSchema: z.ZodObject<{
4086
- timezone: z.ZodString;
4343
+ timezone: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4087
4344
  }, z.core.$strict>;
4088
4345
  export type SrsRecentNotebaseScheduleStatusStatsInput = z.infer<typeof srsRecentNotebaseScheduleStatusStatsInputSchema>;
4089
4346
  /** Null when the user has no notebase yet. */
@@ -4446,7 +4703,7 @@ export declare const statsInputSchema: z.ZodObject<{
4446
4703
  notebaseIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodUUID>, z.ZodTransform<string[], string[]>>>;
4447
4704
  from: z.ZodOptional<z.ZodISODate>;
4448
4705
  to: z.ZodISODate;
4449
- timezone: z.ZodString;
4706
+ timezone: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4450
4707
  }, z.core.$strict>;
4451
4708
  export type StatsInput = z.infer<typeof statsInputSchema>;
4452
4709
  export declare const activityStatsOutputSchema: z.ZodObject<{
@@ -4485,6 +4742,63 @@ export declare const userUpdateTimezoneOutputSchema: z.ZodObject<{
4485
4742
  timezone: z.ZodString;
4486
4743
  }, z.core.$strict>;
4487
4744
  export type UserUpdateTimezoneOutput = z.infer<typeof userUpdateTimezoneOutputSchema>;
4745
+ export declare const userEnsureLocaleInputSchema: z.ZodObject<{
4746
+ locale: z.ZodEnum<{
4747
+ en: "en";
4748
+ es: "es";
4749
+ ja: "ja";
4750
+ ko: "ko";
4751
+ ru: "ru";
4752
+ tr: "tr";
4753
+ vi: "vi";
4754
+ zh: "zh";
4755
+ "zh-TW": "zh-TW";
4756
+ }>;
4757
+ }, z.core.$strict>;
4758
+ export type UserEnsureLocaleInput = z.infer<typeof userEnsureLocaleInputSchema>;
4759
+ export declare const userEnsureLocaleOutputSchema: z.ZodObject<{
4760
+ locale: z.ZodEnum<{
4761
+ en: "en";
4762
+ es: "es";
4763
+ ja: "ja";
4764
+ ko: "ko";
4765
+ ru: "ru";
4766
+ tr: "tr";
4767
+ vi: "vi";
4768
+ zh: "zh";
4769
+ "zh-TW": "zh-TW";
4770
+ }>;
4771
+ updated: z.ZodBoolean;
4772
+ }, z.core.$strict>;
4773
+ export type UserEnsureLocaleOutput = z.infer<typeof userEnsureLocaleOutputSchema>;
4774
+ export declare const userUpdateLocaleInputSchema: z.ZodObject<{
4775
+ locale: z.ZodEnum<{
4776
+ en: "en";
4777
+ es: "es";
4778
+ ja: "ja";
4779
+ ko: "ko";
4780
+ ru: "ru";
4781
+ tr: "tr";
4782
+ vi: "vi";
4783
+ zh: "zh";
4784
+ "zh-TW": "zh-TW";
4785
+ }>;
4786
+ }, z.core.$strict>;
4787
+ export type UserUpdateLocaleInput = z.infer<typeof userUpdateLocaleInputSchema>;
4788
+ export declare const userUpdateLocaleOutputSchema: z.ZodObject<{
4789
+ locale: z.ZodEnum<{
4790
+ en: "en";
4791
+ es: "es";
4792
+ ja: "ja";
4793
+ ko: "ko";
4794
+ ru: "ru";
4795
+ tr: "tr";
4796
+ vi: "vi";
4797
+ zh: "zh";
4798
+ "zh-TW": "zh-TW";
4799
+ }>;
4800
+ }, z.core.$strict>;
4801
+ export type UserUpdateLocaleOutput = z.infer<typeof userUpdateLocaleOutputSchema>;
4488
4802
  //#endregion
4489
4803
  //#region src/schemas/video-transcript.d.ts
4490
4804
  export declare const videoTranscriptStatusSchema: z.ZodEnum<{
@@ -4580,22 +4894,6 @@ export declare const deletionResultSchema: z.ZodObject<{
4580
4894
  //#endregion
4581
4895
  //#region src/index.d.ts
4582
4896
  export declare const contract: {
4583
- betaAccess: {
4584
- status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
4585
- featureKey: import("zod").ZodEnum<{
4586
- ebook: "ebook";
4587
- notebase: "notebase";
4588
- videoTranscription: "videoTranscription";
4589
- }>;
4590
- }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
4591
- featureKey: import("zod").ZodEnum<{
4592
- ebook: "ebook";
4593
- notebase: "notebase";
4594
- videoTranscription: "videoTranscription";
4595
- }>;
4596
- allowed: import("zod").ZodBoolean;
4597
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
4598
- };
4599
4897
  billing: {
4600
4898
  status: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, import("zod").ZodObject<{
4601
4899
  plan: import("zod").ZodEnum<{
@@ -4634,6 +4932,14 @@ export declare const contract: {
4634
4932
  }>;
4635
4933
  effectiveAt: import("zod").ZodCoercedDate<unknown>;
4636
4934
  }, import("zod/v4/core").$strict>>;
4935
+ paymentDue: import("zod").ZodNullable<import("zod").ZodObject<{
4936
+ dueBy: import("zod").ZodCoercedDate<unknown>;
4937
+ plan: import("zod").ZodEnum<{
4938
+ pro: "pro";
4939
+ ultra: "ultra";
4940
+ }>;
4941
+ url: import("zod").ZodNullable<import("zod").ZodURL>;
4942
+ }, import("zod/v4/core").$strict>>;
4637
4943
  unlimitedNotebaseNotes: import("zod").ZodBoolean;
4638
4944
  notebaseNoteLimit: import("zod").ZodNumber;
4639
4945
  notebaseNoteCount: import("zod").ZodNumber;
@@ -5081,23 +5387,27 @@ export declare const contract: {
5081
5387
  title: import("zod").ZodString;
5082
5388
  author: import("zod").ZodOptional<import("zod").ZodString>;
5083
5389
  language: import("zod").ZodOptional<import("zod").ZodString>;
5084
- coverContentType: import("zod").ZodOptional<import("zod").ZodEnum<{
5085
- "image/jpeg": "image/jpeg";
5086
- "image/png": "image/png";
5087
- "image/webp": "image/webp";
5088
- }>>;
5390
+ fileByteSize: import("zod").ZodNumber;
5391
+ cover: import("zod").ZodOptional<import("zod").ZodObject<{
5392
+ contentType: import("zod").ZodEnum<{
5393
+ "image/jpeg": "image/jpeg";
5394
+ "image/png": "image/png";
5395
+ "image/webp": "image/webp";
5396
+ }>;
5397
+ byteSize: import("zod").ZodNumber;
5398
+ }, import("zod/v4/core").$strict>>;
5089
5399
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5090
5400
  ebookId: import("zod").ZodUUID;
5091
5401
  upload: import("zod").ZodObject<{
5092
5402
  url: import("zod").ZodURL;
5093
- fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
5403
+ headers: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
5094
5404
  }, import("zod/v4/core").$strict>;
5095
5405
  coverUpload: import("zod").ZodNullable<import("zod").ZodObject<{
5096
5406
  url: import("zod").ZodURL;
5097
- fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
5407
+ headers: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
5098
5408
  }, import("zod/v4/core").$strict>>;
5099
5409
  expiresAt: import("zod").ZodCoercedDate<unknown>;
5100
- }, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "EBOOK_BETA_RESTRICTED" | "EBOOK_LIMIT_EXCEEDED">>, Record<never, never>>;
5410
+ }, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "EBOOK_BETA_RESTRICTED" | "EBOOK_FILE_TOO_LARGE" | "EBOOK_LIMIT_EXCEEDED">>, Record<never, never>>;
5101
5411
  finalizeUpload: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5102
5412
  ebookId: import("zod").ZodUUID;
5103
5413
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
@@ -5159,6 +5469,122 @@ export declare const contract: {
5159
5469
  id: import("zod").ZodUUID;
5160
5470
  }, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "EBOOK_BETA_RESTRICTED" | "EBOOK_NOT_FOUND">>, Record<never, never>>;
5161
5471
  };
5472
+ emailPreferences: {
5473
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5474
+ locale: import("zod").ZodEnum<{
5475
+ en: "en";
5476
+ es: "es";
5477
+ ja: "ja";
5478
+ ko: "ko";
5479
+ ru: "ru";
5480
+ tr: "tr";
5481
+ vi: "vi";
5482
+ zh: "zh";
5483
+ "zh-TW": "zh-TW";
5484
+ }>;
5485
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5486
+ categories: import("zod").ZodArray<import("zod").ZodObject<{
5487
+ key: import("zod").ZodString;
5488
+ name: import("zod").ZodString;
5489
+ description: import("zod").ZodNullable<import("zod").ZodString>;
5490
+ commercial: import("zod").ZodBoolean;
5491
+ required: import("zod").ZodBoolean;
5492
+ subscribed: import("zod").ZodBoolean;
5493
+ }, import("zod/v4/core").$strict>>;
5494
+ unsubscribedAll: import("zod").ZodBoolean;
5495
+ }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
5496
+ update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5497
+ categories: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
5498
+ unsubscribedAll: import("zod").ZodOptional<import("zod").ZodBoolean>;
5499
+ locale: import("zod").ZodEnum<{
5500
+ en: "en";
5501
+ es: "es";
5502
+ ja: "ja";
5503
+ ko: "ko";
5504
+ ru: "ru";
5505
+ tr: "tr";
5506
+ vi: "vi";
5507
+ zh: "zh";
5508
+ "zh-TW": "zh-TW";
5509
+ }>;
5510
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5511
+ categories: import("zod").ZodArray<import("zod").ZodObject<{
5512
+ key: import("zod").ZodString;
5513
+ name: import("zod").ZodString;
5514
+ description: import("zod").ZodNullable<import("zod").ZodString>;
5515
+ commercial: import("zod").ZodBoolean;
5516
+ required: import("zod").ZodBoolean;
5517
+ subscribed: import("zod").ZodBoolean;
5518
+ }, import("zod/v4/core").$strict>>;
5519
+ unsubscribedAll: import("zod").ZodBoolean;
5520
+ }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
5521
+ getByToken: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5522
+ token: import("zod").ZodString;
5523
+ locale: import("zod").ZodEnum<{
5524
+ en: "en";
5525
+ es: "es";
5526
+ ja: "ja";
5527
+ ko: "ko";
5528
+ ru: "ru";
5529
+ tr: "tr";
5530
+ vi: "vi";
5531
+ zh: "zh";
5532
+ "zh-TW": "zh-TW";
5533
+ }>;
5534
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5535
+ categories: import("zod").ZodArray<import("zod").ZodObject<{
5536
+ key: import("zod").ZodString;
5537
+ name: import("zod").ZodString;
5538
+ description: import("zod").ZodNullable<import("zod").ZodString>;
5539
+ commercial: import("zod").ZodBoolean;
5540
+ required: import("zod").ZodBoolean;
5541
+ subscribed: import("zod").ZodBoolean;
5542
+ }, import("zod/v4/core").$strict>>;
5543
+ unsubscribedAll: import("zod").ZodBoolean;
5544
+ maskedEmail: import("zod").ZodString;
5545
+ highlightCategory: import("zod").ZodNullable<import("zod").ZodString>;
5546
+ }, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "EMAIL_LINK_INVALID">>, Record<never, never>>;
5547
+ updateByToken: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5548
+ categories: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
5549
+ unsubscribedAll: import("zod").ZodOptional<import("zod").ZodBoolean>;
5550
+ token: import("zod").ZodString;
5551
+ locale: import("zod").ZodEnum<{
5552
+ en: "en";
5553
+ es: "es";
5554
+ ja: "ja";
5555
+ ko: "ko";
5556
+ ru: "ru";
5557
+ tr: "tr";
5558
+ vi: "vi";
5559
+ zh: "zh";
5560
+ "zh-TW": "zh-TW";
5561
+ }>;
5562
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5563
+ categories: import("zod").ZodArray<import("zod").ZodObject<{
5564
+ key: import("zod").ZodString;
5565
+ name: import("zod").ZodString;
5566
+ description: import("zod").ZodNullable<import("zod").ZodString>;
5567
+ commercial: import("zod").ZodBoolean;
5568
+ required: import("zod").ZodBoolean;
5569
+ subscribed: import("zod").ZodBoolean;
5570
+ }, import("zod/v4/core").$strict>>;
5571
+ unsubscribedAll: import("zod").ZodBoolean;
5572
+ maskedEmail: import("zod").ZodString;
5573
+ highlightCategory: import("zod").ZodNullable<import("zod").ZodString>;
5574
+ }, import("zod/v4/core").$strict>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "EMAIL_LINK_INVALID">>, Record<never, never>>;
5575
+ };
5576
+ featureAccess: {
5577
+ status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5578
+ featureKey: import("zod").ZodEnum<{
5579
+ ebook: "ebook";
5580
+ }>;
5581
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5582
+ featureKey: import("zod").ZodEnum<{
5583
+ ebook: "ebook";
5584
+ }>;
5585
+ allowed: import("zod").ZodBoolean;
5586
+ }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
5587
+ };
5162
5588
  hostedAi: {
5163
5589
  status: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
5164
5590
  credits: import("zod").ZodArray<import("zod").ZodObject<{
@@ -5178,6 +5604,36 @@ export declare const contract: {
5178
5604
  videoSubtitles: "videoSubtitles";
5179
5605
  }>>;
5180
5606
  }, import("zod/v4/core").$strict>>;
5607
+ pools: import("zod").ZodArray<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
5608
+ periodKind: import("zod").ZodEnum<{
5609
+ daily: "daily";
5610
+ weekly: "weekly";
5611
+ }>;
5612
+ usedPercent: import("zod").ZodNumber;
5613
+ resetAt: import("zod").ZodNullable<import("zod").ZodISODateTime>;
5614
+ features: import("zod").ZodArray<import("zod").ZodEnum<{
5615
+ customAction: "customAction";
5616
+ inputTranslation: "inputTranslation";
5617
+ languageDetection: "languageDetection";
5618
+ noteSuggestion: "noteSuggestion";
5619
+ pageTranslation: "pageTranslation";
5620
+ selectionTranslation: "selectionTranslation";
5621
+ videoSubtitles: "videoSubtitles";
5622
+ }>>;
5623
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
5624
+ periodKind: import("zod").ZodLiteral<"once">;
5625
+ usedPercent: import("zod").ZodNumber;
5626
+ expiresAt: import("zod").ZodISODateTime;
5627
+ features: import("zod").ZodArray<import("zod").ZodEnum<{
5628
+ customAction: "customAction";
5629
+ inputTranslation: "inputTranslation";
5630
+ languageDetection: "languageDetection";
5631
+ noteSuggestion: "noteSuggestion";
5632
+ pageTranslation: "pageTranslation";
5633
+ selectionTranslation: "selectionTranslation";
5634
+ videoSubtitles: "videoSubtitles";
5635
+ }>>;
5636
+ }, import("zod/v4/core").$strict>], "periodKind">>;
5181
5637
  features: import("zod").ZodObject<{
5182
5638
  pageTranslation: import("zod").ZodObject<{
5183
5639
  normal: import("zod").ZodObject<{
@@ -5580,6 +6036,7 @@ export declare const contract: {
5580
6036
  "FSRS-6": "FSRS-6";
5581
6037
  "FSRS-7": "FSRS-7";
5582
6038
  }>;
6039
+ srsSleepingAt: import("zod").ZodNullable<import("zod").ZodDate>;
5583
6040
  createdAt: import("zod").ZodCoercedDate<unknown>;
5584
6041
  updatedAt: import("zod").ZodCoercedDate<unknown>;
5585
6042
  notebaseColumns: import("zod").ZodArray<import("zod").ZodObject<{
@@ -5748,6 +6205,7 @@ export declare const contract: {
5748
6205
  "FSRS-6": "FSRS-6";
5749
6206
  "FSRS-7": "FSRS-7";
5750
6207
  }>;
6208
+ srsSleepingAt: import("zod").ZodNullable<import("zod").ZodDate>;
5751
6209
  createdAt: import("zod").ZodDate;
5752
6210
  updatedAt: import("zod").ZodDate;
5753
6211
  }, import("zod/v4/core").$strip>;
@@ -5781,6 +6239,7 @@ export declare const contract: {
5781
6239
  "FSRS-6": "FSRS-6";
5782
6240
  "FSRS-7": "FSRS-7";
5783
6241
  }>;
6242
+ srsSleepingAt: import("zod").ZodNullable<import("zod").ZodDate>;
5784
6243
  createdAt: import("zod").ZodDate;
5785
6244
  updatedAt: import("zod").ZodDate;
5786
6245
  }, import("zod/v4/core").$strip>;
@@ -5789,6 +6248,15 @@ export declare const contract: {
5789
6248
  summary: string;
5790
6249
  description: string;
5791
6250
  } & Record<never, never>>;
6251
+ setSleep: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
6252
+ id: import("zod").ZodUUID;
6253
+ enabled: import("zod").ZodBoolean;
6254
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
6255
+ txid: import("zod").ZodNullable<import("zod").ZodNumber>;
6256
+ }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, Pick<import("@orpc/contract").ErrorMap, "NOTEBASE_NOT_FOUND">>, {
6257
+ summary: string;
6258
+ description: string;
6259
+ } & Record<never, never>>;
5792
6260
  delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
5793
6261
  id: import("zod").ZodUUID;
5794
6262
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -7209,12 +7677,15 @@ export declare const contract: {
7209
7677
  zyb: "zyb";
7210
7678
  }>>;
7211
7679
  voice: import("zod").ZodOptional<import("zod").ZodString>;
7212
- }, import("zod/v4/core").$strict>, import("zod").ZodFile, Record<never, never>, Record<never, never>>;
7680
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7681
+ url: import("zod").ZodURL;
7682
+ expiresAt: import("zod").ZodCoercedDate<unknown>;
7683
+ }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
7213
7684
  };
7214
7685
  srs: {
7215
7686
  scheduleStatusStats: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
7216
7687
  notebaseIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUUID>>;
7217
- timezone: import("zod").ZodString;
7688
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7218
7689
  }, import("zod/v4/core").$strict>, import("zod").ZodRecord<import("zod").ZodUUID, import("zod").ZodRecord<import("zod").ZodEnum<{
7219
7690
  learning: "learning";
7220
7691
  new: "new";
@@ -7224,7 +7695,7 @@ export declare const contract: {
7224
7695
  description: string;
7225
7696
  } & Record<never, never>>;
7226
7697
  recentNotebaseScheduleStatusStats: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
7227
- timezone: import("zod").ZodString;
7698
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7228
7699
  }, import("zod/v4/core").$strict>, import("zod").ZodNullable<import("zod").ZodObject<{
7229
7700
  notebase: import("zod").ZodObject<{
7230
7701
  id: import("zod").ZodString;
@@ -7303,7 +7774,7 @@ export declare const contract: {
7303
7774
  hard: "hard";
7304
7775
  }>;
7305
7776
  durationMs: import("zod").ZodNumber;
7306
- timezone: import("zod").ZodString;
7777
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7307
7778
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7308
7779
  card: import("zod").ZodObject<{
7309
7780
  notebaseId: import("zod").ZodUUID;
@@ -7461,7 +7932,7 @@ export declare const contract: {
7461
7932
  notebaseIds: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodUUID>, import("zod").ZodTransform<string[], string[]>>>;
7462
7933
  from: import("zod").ZodOptional<import("zod").ZodISODate>;
7463
7934
  to: import("zod").ZodISODate;
7464
- timezone: import("zod").ZodString;
7935
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7465
7936
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7466
7937
  srs: import("zod").ZodObject<{
7467
7938
  learnedCards: import("zod").ZodNumber;
@@ -7482,7 +7953,7 @@ export declare const contract: {
7482
7953
  notebaseIds: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodUUID>, import("zod").ZodTransform<string[], string[]>>>;
7483
7954
  from: import("zod").ZodOptional<import("zod").ZodISODate>;
7484
7955
  to: import("zod").ZodISODate;
7485
- timezone: import("zod").ZodString;
7956
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7486
7957
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7487
7958
  baseTotal: import("zod").ZodNumber;
7488
7959
  daily: import("zod").ZodArray<import("zod").ZodObject<{
@@ -7494,7 +7965,7 @@ export declare const contract: {
7494
7965
  notebaseIds: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodArray<import("zod").ZodUUID>, import("zod").ZodTransform<string[], string[]>>>;
7495
7966
  from: import("zod").ZodOptional<import("zod").ZodISODate>;
7496
7967
  to: import("zod").ZodISODate;
7497
- timezone: import("zod").ZodString;
7968
+ timezone: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
7498
7969
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7499
7970
  baseTotal: import("zod").ZodNumber;
7500
7971
  daily: import("zod").ZodArray<import("zod").ZodObject<{
@@ -7515,6 +7986,57 @@ export declare const contract: {
7515
7986
  }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
7516
7987
  timezone: import("zod").ZodString;
7517
7988
  }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
7989
+ ensureLocale: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
7990
+ locale: import("zod").ZodEnum<{
7991
+ en: "en";
7992
+ es: "es";
7993
+ ja: "ja";
7994
+ ko: "ko";
7995
+ ru: "ru";
7996
+ tr: "tr";
7997
+ vi: "vi";
7998
+ zh: "zh";
7999
+ "zh-TW": "zh-TW";
8000
+ }>;
8001
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
8002
+ locale: import("zod").ZodEnum<{
8003
+ en: "en";
8004
+ es: "es";
8005
+ ja: "ja";
8006
+ ko: "ko";
8007
+ ru: "ru";
8008
+ tr: "tr";
8009
+ vi: "vi";
8010
+ zh: "zh";
8011
+ "zh-TW": "zh-TW";
8012
+ }>;
8013
+ updated: import("zod").ZodBoolean;
8014
+ }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
8015
+ updateLocale: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
8016
+ locale: import("zod").ZodEnum<{
8017
+ en: "en";
8018
+ es: "es";
8019
+ ja: "ja";
8020
+ ko: "ko";
8021
+ ru: "ru";
8022
+ tr: "tr";
8023
+ vi: "vi";
8024
+ zh: "zh";
8025
+ "zh-TW": "zh-TW";
8026
+ }>;
8027
+ }, import("zod/v4/core").$strict>, import("zod").ZodObject<{
8028
+ locale: import("zod").ZodEnum<{
8029
+ en: "en";
8030
+ es: "es";
8031
+ ja: "ja";
8032
+ ko: "ko";
8033
+ ru: "ru";
8034
+ tr: "tr";
8035
+ vi: "vi";
8036
+ zh: "zh";
8037
+ "zh-TW": "zh-TW";
8038
+ }>;
8039
+ }, import("zod/v4/core").$strict>, Record<never, never>, Record<never, never>>;
7518
8040
  };
7519
8041
  videoTranscript: {
7520
8042
  create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{