@read-frog/api-contract 0.14.0 → 0.15.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.
Files changed (39) hide show
  1. package/dist/index.d.ts +1105 -475
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +264 -97
  4. package/dist/index.js.map +1 -1
  5. package/package.json +15 -14
  6. package/src/contracts/beta-access.ts +3 -6
  7. package/src/contracts/billing.ts +5 -5
  8. package/src/contracts/card-template.ts +45 -39
  9. package/src/contracts/card.ts +22 -19
  10. package/src/contracts/ebook.ts +13 -11
  11. package/src/contracts/hosted-ai.ts +5 -5
  12. package/src/contracts/notebase-column.ts +40 -32
  13. package/src/contracts/notebase-row.ts +85 -45
  14. package/src/contracts/notebase.ts +60 -40
  15. package/src/contracts/shared.ts +21 -2
  16. package/src/contracts/srs.ts +96 -63
  17. package/src/contracts/stats.ts +9 -11
  18. package/src/contracts/user.ts +3 -3
  19. package/src/contracts/video-transcript.ts +22 -12
  20. package/src/index.ts +37 -33
  21. package/src/public-errors.ts +74 -51
  22. package/src/schemas/beta-access.ts +12 -10
  23. package/src/schemas/billing.ts +77 -59
  24. package/src/schemas/card.ts +66 -63
  25. package/src/schemas/ebook.ts +165 -129
  26. package/src/schemas/hosted-ai.ts +84 -74
  27. package/src/schemas/notebase-column.ts +50 -36
  28. package/src/schemas/notebase-row.ts +88 -57
  29. package/src/schemas/notebase-stats.ts +28 -20
  30. package/src/schemas/notebase-view.ts +59 -49
  31. package/src/schemas/notebase.ts +136 -96
  32. package/src/schemas/pagination.ts +9 -0
  33. package/src/schemas/resource-mutation.ts +6 -0
  34. package/src/schemas/srs-stats.ts +30 -22
  35. package/src/schemas/srs.ts +152 -106
  36. package/src/schemas/stats.ts +27 -21
  37. package/src/schemas/timezone.ts +19 -16
  38. package/src/schemas/user.ts +27 -19
  39. package/src/schemas/video-transcript.ts +33 -32
@@ -1,4 +1,5 @@
1
- import { pickPublicErrorMap } from "#/public-errors"
1
+ import { oc } from "@orpc/contract";
2
+ import { pickPublicErrorMap } from "#/public-errors";
2
3
  import {
3
4
  NotebaseCreateInputSchema,
4
5
  NotebaseCreateOutputSchema,
@@ -8,25 +9,39 @@ import {
8
9
  NotebaseGetOutputSchema,
9
10
  NotebaseGetSchemaInputSchema,
10
11
  NotebaseGetSchemaOutputSchema,
12
+ NotebaseGetSummaryInputSchema,
13
+ NotebaseGetSummaryOutputSchema,
11
14
  NotebaseListInputSchema,
12
15
  NotebaseListOutputSchema,
13
16
  NotebaseUpdateInputSchema,
14
17
  NotebaseUpdateOutputSchema,
15
- } from "#/schemas/notebase"
16
- import { notebaseProcedure } from "./shared"
18
+ } from "#/schemas/notebase";
19
+ import { defineAgentProcedure } from "./shared";
17
20
 
18
21
  export const notebaseContract = {
19
- list: notebaseProcedure
20
- .route({
21
- method: "GET",
22
- path: "/notebases",
23
- summary: "List notebases",
24
- tags: ["Notebases"],
25
- })
22
+ list: defineAgentProcedure({
23
+ method: "GET",
24
+ path: "/notebases",
25
+ summary: "List notebases",
26
+ description: "List the notebases (word books) owned by the current user.",
27
+ tags: ["Notebases"],
28
+ })
26
29
  .input(NotebaseListInputSchema)
27
30
  .output(NotebaseListOutputSchema),
28
31
 
29
- get: notebaseProcedure
32
+ getSummary: defineAgentProcedure({
33
+ method: "GET",
34
+ path: "/notebases/{id}/summary",
35
+ summary: "Get notebase summary",
36
+ description:
37
+ "Read the name and public study settings of an owned notebase without loading note content.",
38
+ tags: ["Notebases"],
39
+ })
40
+ .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
41
+ .input(NotebaseGetSummaryInputSchema)
42
+ .output(NotebaseGetSummaryOutputSchema),
43
+
44
+ get: oc
30
45
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
31
46
  .route({
32
47
  method: "GET",
@@ -37,47 +52,52 @@ export const notebaseContract = {
37
52
  .input(NotebaseGetInputSchema)
38
53
  .output(NotebaseGetOutputSchema),
39
54
 
40
- getSchema: notebaseProcedure
55
+ getSchema: defineAgentProcedure({
56
+ method: "GET",
57
+ path: "/notebases/{id}/schema",
58
+ summary: "Get notebase schema",
59
+ description:
60
+ "Read an owned notebase name and field definitions, including field IDs, types and updatedAt timestamps. Does not return note content.",
61
+ tags: ["Notebases"],
62
+ })
41
63
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
42
- .route({
43
- method: "GET",
44
- path: "/notebases/{id}/schema",
45
- summary: "Get notebase schema",
46
- tags: ["Notebases"],
47
- })
48
64
  .input(NotebaseGetSchemaInputSchema)
49
65
  .output(NotebaseGetSchemaOutputSchema),
50
66
 
51
- create: notebaseProcedure
67
+ create: defineAgentProcedure({
68
+ method: "POST",
69
+ path: "/notebases",
70
+ summary: "Create notebase",
71
+ description:
72
+ "Create an owned notebase with optional initial fields and notes. Client-provided entity IDs are supported; duplicate IDs produce a conflict.",
73
+ tags: ["Notebases"],
74
+ })
52
75
  .errors(pickPublicErrorMap("NOTE_LIMIT_EXCEEDED", "CELL_VALIDATION_FAILED"))
53
- .route({
54
- method: "POST",
55
- path: "/notebases",
56
- summary: "Create notebase",
57
- tags: ["Notebases"],
58
- })
76
+ .errors(pickPublicErrorMap("RESOURCE_ALREADY_EXISTS"))
59
77
  .input(NotebaseCreateInputSchema)
60
78
  .output(NotebaseCreateOutputSchema),
61
79
 
62
- update: notebaseProcedure
80
+ update: defineAgentProcedure({
81
+ method: "PUT",
82
+ path: "/notebases/{id}",
83
+ summary: "Update notebase",
84
+ description:
85
+ "Update the supplied name or public study settings of an owned notebase, preserving omitted properties.",
86
+ tags: ["Notebases"],
87
+ })
63
88
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
64
- .route({
65
- method: "PUT",
66
- path: "/notebases/{id}",
67
- summary: "Update notebase",
68
- tags: ["Notebases"],
69
- })
70
89
  .input(NotebaseUpdateInputSchema)
71
90
  .output(NotebaseUpdateOutputSchema),
72
91
 
73
- delete: notebaseProcedure
92
+ delete: defineAgentProcedure({
93
+ method: "DELETE",
94
+ path: "/notebases/{id}",
95
+ summary: "Delete notebase",
96
+ description:
97
+ "Permanently delete an owned notebase and its fields, notes, templates, cards and review records. Return the deleted notebase ID.",
98
+ tags: ["Notebases"],
99
+ })
74
100
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
75
- .route({
76
- method: "DELETE",
77
- path: "/notebases/{id}",
78
- summary: "Delete notebase",
79
- tags: ["Notebases"],
80
- })
81
101
  .input(NotebaseDeleteInputSchema)
82
102
  .output(NotebaseDeleteOutputSchema),
83
- }
103
+ };
@@ -1,3 +1,22 @@
1
- import { oc } from "@orpc/contract"
1
+ import type { Route } from "@orpc/contract";
2
+ import { oc } from "@orpc/contract";
2
3
 
3
- export const notebaseProcedure = oc
4
+ /**
5
+ * A documented business route shared by OpenAPI and agent-facing adapters.
6
+ * Both prose fields are required so adapters can reuse them without a second
7
+ * copy or an undefined fallback.
8
+ */
9
+ export type AgentRoute = Route & { summary: string; description: string };
10
+
11
+ /**
12
+ * Declares a procedure that is exposed to agents as an MCP tool, not only to
13
+ * the REST/OpenAPI surface.
14
+ *
15
+ * oRPC types `~orpc.route` as the widened `Route`, so `route.summary` reads back
16
+ * as `string | undefined` whatever is passed in. `$meta` is the only channel it
17
+ * keeps generic, so the prose is mirrored there and stays a required `string`
18
+ * for tool definitions. OpenAPI keeps reading `route`.
19
+ */
20
+ export function defineAgentProcedure(route: AgentRoute) {
21
+ return oc.$meta({ summary: route.summary, description: route.description }).route(route);
22
+ }
@@ -1,7 +1,13 @@
1
- import { pickPublicErrorMap } from "#/public-errors"
1
+ import { defineAgentProcedure } from "./shared";
2
+ import { oc } from "@orpc/contract";
3
+ import { pickPublicErrorMap } from "#/public-errors";
2
4
  import {
5
+ srsAcknowledgeOptimizerResultsInputSchema,
6
+ srsAcknowledgeOptimizerResultsOutputSchema,
3
7
  srsListCardRevlogsInputSchema,
4
8
  srsListCardRevlogsOutputSchema,
9
+ srsListUnreadOptimizerResultsInputSchema,
10
+ srsListUnreadOptimizerResultsOutputSchema,
5
11
  srsReviewInputSchema,
6
12
  srsReviewOutputSchema,
7
13
  srsRollbackReviewInputSchema,
@@ -12,87 +18,114 @@ import {
12
18
  srsSetCardBuriedOutputSchema,
13
19
  srsSetCardSuspendedInputSchema,
14
20
  srsSetCardSuspendedOutputSchema,
15
- } from "#/schemas/srs"
16
- import { notebaseProcedure } from "./shared"
21
+ } from "#/schemas/srs";
17
22
 
18
23
  export const srsContract = {
19
- scheduleStatusStats: notebaseProcedure
24
+ scheduleStatusStats: defineAgentProcedure({
25
+ method: "GET",
26
+ path: "/srs/schedule-status-stats",
27
+ summary: "Get study statistics",
28
+ description:
29
+ "Read existing study queue counts for owned notebases in the supplied timezone. Does not return note content or card faces.",
30
+ tags: ["SRS"],
31
+ })
20
32
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
21
- .route({
22
- method: "GET",
23
- path: "/srs/schedule-status-stats",
24
- summary: "List today schedule status stats for notebases",
25
- tags: ["SRS"],
26
- })
27
33
  .input(srsScheduleStatusStatsInputSchema)
28
34
  .output(srsScheduleStatusStatsOutputSchema),
29
-
30
- listCardRevlogs: notebaseProcedure
31
- .errors(pickPublicErrorMap("CARD_NOT_FOUND"))
35
+ listUnreadOptimizerResults: oc
32
36
  .route({
33
37
  method: "GET",
34
- path: "/srs/cards/{cardId}/revlogs",
35
- summary: "List complete review history for a card",
38
+ path: "/srs/optimizer-results/unread",
39
+ summary: "List unread applied SRS optimizer results",
36
40
  tags: ["SRS"],
37
41
  })
38
- .input(srsListCardRevlogsInputSchema)
39
- .output(srsListCardRevlogsOutputSchema),
42
+ .input(srsListUnreadOptimizerResultsInputSchema)
43
+ .output(srsListUnreadOptimizerResultsOutputSchema),
40
44
 
41
- review: notebaseProcedure
42
- .errors(pickPublicErrorMap(
43
- "CARD_NOT_FOUND",
44
- "CARD_NOT_REVIEWABLE",
45
- "CARD_REVIEW_STATE_STALE",
46
- ))
45
+ acknowledgeOptimizerResults: oc
47
46
  .route({
48
47
  method: "POST",
49
- path: "/srs/review",
50
- summary: "Review a card with SRS scheduling",
48
+ path: "/srs/optimizer-results/acknowledge",
49
+ summary: "Acknowledge current SRS optimizer results",
51
50
  tags: ["SRS"],
52
51
  })
52
+ .input(srsAcknowledgeOptimizerResultsInputSchema)
53
+ .output(srsAcknowledgeOptimizerResultsOutputSchema),
54
+
55
+ listCardRevlogs: defineAgentProcedure({
56
+ method: "GET",
57
+ path: "/srs/revlogs",
58
+ summary: "List review history",
59
+ description:
60
+ "Read owned review records, optionally filtered by notebase or card. Supports limit and offset pagination. Note content, card faces and rollback snapshots are excluded.",
61
+ tags: ["SRS"],
62
+ })
63
+ .errors(pickPublicErrorMap("CARD_NOT_FOUND", "NOTEBASE_NOT_FOUND"))
64
+ .input(srsListCardRevlogsInputSchema)
65
+ .output(srsListCardRevlogsOutputSchema),
66
+
67
+ review: defineAgentProcedure({
68
+ method: "POST",
69
+ path: "/srs/review",
70
+ summary: "Record review",
71
+ description:
72
+ "Submit one rating for a known owned card without a queue, session or prerequisite read. Existing SRS eligibility, scheduling and sibling rules apply. The optional id is the existing state-derived review ID, not an arbitrary UUID; calls without a stable id are not guaranteed to deduplicate.",
73
+ tags: ["SRS"],
74
+ })
75
+ .errors(pickPublicErrorMap("CARD_NOT_FOUND", "CARD_NOT_REVIEWABLE", "CARD_REVIEW_STATE_STALE"))
53
76
  .input(srsReviewInputSchema)
54
77
  .output(srsReviewOutputSchema),
55
- rollbackReview: notebaseProcedure
56
- .errors(pickPublicErrorMap(
57
- "CARD_NOT_FOUND",
58
- "CARD_REVIEW_ROLLBACK_UNAVAILABLE",
59
- ))
60
- .route({
61
- method: "POST",
62
- path: "/srs/review/rollback",
63
- summary: "Roll back the latest SRS review for a card",
64
- tags: ["SRS"],
65
- })
78
+ rollbackReview: defineAgentProcedure({
79
+ method: "POST",
80
+ path: "/srs/review/rollback",
81
+ summary: "Undo review",
82
+ description:
83
+ "Undo the latest eligible review of one owned card, preserving existing SRS restrictions and sibling restoration. expectedReviewId guards against undoing an earlier review on a retry.",
84
+ tags: ["SRS"],
85
+ })
86
+ .errors(
87
+ pickPublicErrorMap(
88
+ "CARD_NOT_FOUND",
89
+ "CARD_REVIEW_ROLLBACK_UNAVAILABLE",
90
+ "CARD_REVIEW_STATE_STALE",
91
+ ),
92
+ )
66
93
  .input(srsRollbackReviewInputSchema)
67
94
  .output(srsRollbackReviewOutputSchema),
68
- setCardBuried: notebaseProcedure
69
- .errors(pickPublicErrorMap(
70
- "CARD_NOT_FOUND",
71
- "CARD_ALREADY_BURIED",
72
- "CARD_NOT_BURIED",
73
- "CARD_STATUS_CHANGE_UNAVAILABLE",
74
- ))
75
- .route({
76
- method: "POST",
77
- path: "/srs/card/bury",
78
- summary: "Manually bury or unbury a card",
79
- tags: ["SRS"],
80
- })
95
+ setCardBuried: defineAgentProcedure({
96
+ method: "POST",
97
+ path: "/srs/card/bury",
98
+ summary: "Set card buried",
99
+ description:
100
+ "Bury or unbury one owned card. enabled=true buries and enabled=false unburies it. Existing state-change rules apply.",
101
+ tags: ["SRS"],
102
+ })
103
+ .errors(
104
+ pickPublicErrorMap(
105
+ "CARD_NOT_FOUND",
106
+ "CARD_ALREADY_BURIED",
107
+ "CARD_NOT_BURIED",
108
+ "CARD_STATUS_CHANGE_UNAVAILABLE",
109
+ ),
110
+ )
81
111
  .input(srsSetCardBuriedInputSchema)
82
112
  .output(srsSetCardBuriedOutputSchema),
83
- setCardSuspended: notebaseProcedure
84
- .errors(pickPublicErrorMap(
85
- "CARD_NOT_FOUND",
86
- "CARD_ALREADY_SUSPENDED",
87
- "CARD_NOT_SUSPENDED",
88
- "CARD_STATUS_CHANGE_UNAVAILABLE",
89
- ))
90
- .route({
91
- method: "POST",
92
- path: "/srs/card/suspend",
93
- summary: "Manually suspend or unsuspend a card",
94
- tags: ["SRS"],
95
- })
113
+ setCardSuspended: defineAgentProcedure({
114
+ method: "POST",
115
+ path: "/srs/card/suspend",
116
+ summary: "Set card suspended",
117
+ description:
118
+ "Suspend or resume one owned card. enabled=true suspends and enabled=false resumes it. Existing state-change rules apply.",
119
+ tags: ["SRS"],
120
+ })
121
+ .errors(
122
+ pickPublicErrorMap(
123
+ "CARD_NOT_FOUND",
124
+ "CARD_ALREADY_SUSPENDED",
125
+ "CARD_NOT_SUSPENDED",
126
+ "CARD_STATUS_CHANGE_UNAVAILABLE",
127
+ ),
128
+ )
96
129
  .input(srsSetCardSuspendedInputSchema)
97
130
  .output(srsSetCardSuspendedOutputSchema),
98
- }
131
+ };
@@ -1,13 +1,11 @@
1
- import { pickPublicErrorMap } from "#/public-errors"
2
- import { notebaseRowGrowthStatsOutputSchema } from "#/schemas/notebase-stats"
3
- import {
4
- srsMemoryGrowthStatsOutputSchema,
5
- } from "#/schemas/srs-stats"
6
- import { activityStatsOutputSchema, statsInputSchema } from "#/schemas/stats"
7
- import { notebaseProcedure } from "./shared"
1
+ import { oc } from "@orpc/contract";
2
+ import { pickPublicErrorMap } from "#/public-errors";
3
+ import { notebaseRowGrowthStatsOutputSchema } from "#/schemas/notebase-stats";
4
+ import { srsMemoryGrowthStatsOutputSchema } from "#/schemas/srs-stats";
5
+ import { activityStatsOutputSchema, statsInputSchema } from "#/schemas/stats";
8
6
 
9
7
  export const statsContract = {
10
- activity: notebaseProcedure
8
+ activity: oc
11
9
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
12
10
  .route({
13
11
  method: "GET",
@@ -18,7 +16,7 @@ export const statsContract = {
18
16
  .input(statsInputSchema)
19
17
  .output(activityStatsOutputSchema),
20
18
 
21
- srsMemoryGrowth: notebaseProcedure
19
+ srsMemoryGrowth: oc
22
20
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
23
21
  .route({
24
22
  method: "GET",
@@ -29,7 +27,7 @@ export const statsContract = {
29
27
  .input(statsInputSchema)
30
28
  .output(srsMemoryGrowthStatsOutputSchema),
31
29
 
32
- notebaseRowGrowth: notebaseProcedure
30
+ notebaseRowGrowth: oc
33
31
  .errors(pickPublicErrorMap("NOTEBASE_NOT_FOUND"))
34
32
  .route({
35
33
  method: "GET",
@@ -39,4 +37,4 @@ export const statsContract = {
39
37
  })
40
38
  .input(statsInputSchema)
41
39
  .output(notebaseRowGrowthStatsOutputSchema),
42
- }
40
+ };
@@ -1,10 +1,10 @@
1
- import { oc } from "@orpc/contract"
1
+ import { oc } from "@orpc/contract";
2
2
  import {
3
3
  userEnsureTimezoneInputSchema,
4
4
  userEnsureTimezoneOutputSchema,
5
5
  userUpdateTimezoneInputSchema,
6
6
  userUpdateTimezoneOutputSchema,
7
- } from "#/schemas/user"
7
+ } from "#/schemas/user";
8
8
 
9
9
  export const userContract = {
10
10
  ensureTimezone: oc
@@ -25,4 +25,4 @@ export const userContract = {
25
25
  })
26
26
  .input(userUpdateTimezoneInputSchema)
27
27
  .output(userUpdateTimezoneOutputSchema),
28
- }
28
+ };
@@ -1,21 +1,23 @@
1
- import { oc } from "@orpc/contract"
2
- import { pickPublicErrorMap } from "#/public-errors"
1
+ import { oc } from "@orpc/contract";
2
+ import { pickPublicErrorMap } from "#/public-errors";
3
3
  import {
4
4
  videoTranscriptCreateInputSchema,
5
5
  videoTranscriptGetInputSchema,
6
6
  videoTranscriptResourceSchema,
7
7
  videoTranscriptSubtitlesSchema,
8
8
  videoTranscriptUsageSchema,
9
- } from "#/schemas/video-transcript"
9
+ } from "#/schemas/video-transcript";
10
10
 
11
11
  export const videoTranscriptContract = {
12
12
  create: oc
13
- .errors(pickPublicErrorMap(
14
- "VIDEO_TRANSCRIPTION_QUOTA_EXCEEDED",
15
- "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED",
16
- "VIDEO_TRANSCRIPTION_PAYMENT_REQUIRED",
17
- "VIDEO_TRANSCRIPTION_UNSUPPORTED_LENGTH",
18
- ))
13
+ .errors(
14
+ pickPublicErrorMap(
15
+ "VIDEO_TRANSCRIPTION_QUOTA_EXCEEDED",
16
+ "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED",
17
+ "VIDEO_TRANSCRIPTION_PAYMENT_REQUIRED",
18
+ "VIDEO_TRANSCRIPTION_UNSUPPORTED_LENGTH",
19
+ ),
20
+ )
19
21
  .route({
20
22
  method: "POST",
21
23
  path: "/video-transcripts",
@@ -33,7 +35,9 @@ export const videoTranscriptContract = {
33
35
  })
34
36
  .output(videoTranscriptUsageSchema),
35
37
  get: oc
36
- .errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND", "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED"))
38
+ .errors(
39
+ pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND", "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED"),
40
+ )
37
41
  .route({
38
42
  method: "GET",
39
43
  path: "/video-transcripts/{id}",
@@ -43,7 +47,13 @@ export const videoTranscriptContract = {
43
47
  .input(videoTranscriptGetInputSchema)
44
48
  .output(videoTranscriptResourceSchema),
45
49
  getSubtitles: oc
46
- .errors(pickPublicErrorMap("VIDEO_TRANSCRIPT_NOT_FOUND", "VIDEO_TRANSCRIPT_NOT_READY", "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED"))
50
+ .errors(
51
+ pickPublicErrorMap(
52
+ "VIDEO_TRANSCRIPT_NOT_FOUND",
53
+ "VIDEO_TRANSCRIPT_NOT_READY",
54
+ "VIDEO_TRANSCRIPTION_SUBSCRIPTION_REQUIRED",
55
+ ),
56
+ )
47
57
  .route({
48
58
  method: "GET",
49
59
  path: "/video-transcripts/{id}/subtitles",
@@ -52,4 +62,4 @@ export const videoTranscriptContract = {
52
62
  })
53
63
  .input(videoTranscriptGetInputSchema)
54
64
  .output(videoTranscriptSubtitlesSchema),
55
- }
65
+ };
package/src/index.ts CHANGED
@@ -1,17 +1,17 @@
1
- import type { ContractRouterClient } from "@orpc/contract"
2
- import { betaAccessContract } from "./contracts/beta-access"
3
- import { billingContract } from "./contracts/billing"
4
- import { cardContract } from "./contracts/card"
5
- import { cardTemplateContract } from "./contracts/card-template"
6
- import { ebookContract } from "./contracts/ebook"
7
- import { hostedAiContract } from "./contracts/hosted-ai"
8
- import { notebaseContract } from "./contracts/notebase"
9
- import { notebaseColumnContract } from "./contracts/notebase-column"
10
- import { notebaseRowContract } from "./contracts/notebase-row"
11
- import { srsContract } from "./contracts/srs"
12
- import { statsContract } from "./contracts/stats"
13
- import { userContract } from "./contracts/user"
14
- import { videoTranscriptContract } from "./contracts/video-transcript"
1
+ import type { ContractRouterClient } from "@orpc/contract";
2
+ import { betaAccessContract } from "./contracts/beta-access";
3
+ import { billingContract } from "./contracts/billing";
4
+ import { cardContract } from "./contracts/card";
5
+ import { cardTemplateContract } from "./contracts/card-template";
6
+ import { ebookContract } from "./contracts/ebook";
7
+ import { hostedAiContract } from "./contracts/hosted-ai";
8
+ import { notebaseContract } from "./contracts/notebase";
9
+ import { notebaseColumnContract } from "./contracts/notebase-column";
10
+ import { notebaseRowContract } from "./contracts/notebase-row";
11
+ import { srsContract } from "./contracts/srs";
12
+ import { statsContract } from "./contracts/stats";
13
+ import { userContract } from "./contracts/user";
14
+ import { videoTranscriptContract } from "./contracts/video-transcript";
15
15
 
16
16
  export const contract = {
17
17
  betaAccess: betaAccessContract,
@@ -27,24 +27,28 @@ export const contract = {
27
27
  stats: statsContract,
28
28
  user: userContract,
29
29
  videoTranscript: videoTranscriptContract,
30
- }
30
+ };
31
31
 
32
- export type ORPCRouterClient = ContractRouterClient<typeof contract>
32
+ export type ORPCRouterClient = ContractRouterClient<typeof contract>;
33
33
 
34
- export * from "./public-errors"
35
- export * from "./schemas/beta-access"
36
- export * from "./schemas/billing"
37
- export * from "./schemas/card"
38
- export * from "./schemas/ebook"
39
- export * from "./schemas/hosted-ai"
40
- export * from "./schemas/notebase"
41
- export * from "./schemas/notebase-column"
42
- export * from "./schemas/notebase-row"
43
- export * from "./schemas/notebase-stats"
44
- export * from "./schemas/notebase-view"
45
- export * from "./schemas/srs"
46
- export * from "./schemas/srs-stats"
47
- export * from "./schemas/stats"
48
- export * from "./schemas/timezone"
49
- export * from "./schemas/user"
50
- export * from "./schemas/video-transcript"
34
+ export { type AgentRoute, defineAgentProcedure } from "./contracts/shared";
35
+ export * from "./public-errors";
36
+ export * from "./schemas/beta-access";
37
+ export * from "./schemas/billing";
38
+ export * from "./schemas/card";
39
+ export * from "./schemas/ebook";
40
+ export * from "./schemas/hosted-ai";
41
+ export * from "./schemas/notebase";
42
+ export * from "./schemas/notebase-column";
43
+ export * from "./schemas/notebase-row";
44
+ export * from "./schemas/notebase-stats";
45
+ export * from "./schemas/notebase-view";
46
+ export * from "./schemas/srs";
47
+ export * from "./schemas/srs-stats";
48
+ export * from "./schemas/stats";
49
+ export * from "./schemas/timezone";
50
+ export * from "./schemas/user";
51
+ export * from "./schemas/video-transcript";
52
+
53
+ export * from "./schemas/pagination";
54
+ export * from "./schemas/resource-mutation";