@kernhq/module-quire 0.13.1 → 0.14.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 (97) hide show
  1. package/dist/contract/models.d.ts +185 -0
  2. package/dist/contract/models.d.ts.map +1 -1
  3. package/dist/contract/models.js +133 -0
  4. package/dist/contract/models.js.map +1 -1
  5. package/dist/contract/permissions.d.ts +14 -0
  6. package/dist/contract/permissions.d.ts.map +1 -1
  7. package/dist/contract/permissions.js +82 -0
  8. package/dist/contract/permissions.js.map +1 -1
  9. package/dist/contract/properties.d.ts +4 -4
  10. package/dist/contract/router.d.ts +535 -8
  11. package/dist/contract/router.d.ts.map +1 -1
  12. package/dist/contract/router.js +133 -1
  13. package/dist/contract/router.js.map +1 -1
  14. package/dist/server/_impl.d.ts +519 -8
  15. package/dist/server/_impl.d.ts.map +1 -1
  16. package/dist/server/_impl.js +128 -0
  17. package/dist/server/_impl.js.map +1 -1
  18. package/dist/server/export/html.d.ts +67 -0
  19. package/dist/server/export/html.d.ts.map +1 -0
  20. package/dist/server/export/html.js +206 -0
  21. package/dist/server/export/html.js.map +1 -0
  22. package/dist/server/export/markdown.d.ts +51 -0
  23. package/dist/server/export/markdown.d.ts.map +1 -0
  24. package/dist/server/export/markdown.js +312 -0
  25. package/dist/server/export/markdown.js.map +1 -0
  26. package/dist/server/export/pdf.d.ts +20 -0
  27. package/dist/server/export/pdf.d.ts.map +1 -0
  28. package/dist/server/export/pdf.js +91 -0
  29. package/dist/server/export/pdf.js.map +1 -0
  30. package/dist/server/export/zip.d.ts +31 -0
  31. package/dist/server/export/zip.d.ts.map +1 -0
  32. package/dist/server/export/zip.js +158 -0
  33. package/dist/server/export/zip.js.map +1 -0
  34. package/dist/server/import/csv.d.ts +77 -0
  35. package/dist/server/import/csv.d.ts.map +1 -0
  36. package/dist/server/import/csv.js +263 -0
  37. package/dist/server/import/csv.js.map +1 -0
  38. package/dist/server/import/html.d.ts +52 -0
  39. package/dist/server/import/html.d.ts.map +1 -0
  40. package/dist/server/import/html.js +472 -0
  41. package/dist/server/import/html.js.map +1 -0
  42. package/dist/server/import/markdown.d.ts +63 -0
  43. package/dist/server/import/markdown.d.ts.map +1 -0
  44. package/dist/server/import/markdown.js +692 -0
  45. package/dist/server/import/markdown.js.map +1 -0
  46. package/dist/server/import/plan.d.ts +70 -0
  47. package/dist/server/import/plan.d.ts.map +1 -0
  48. package/dist/server/import/plan.js +761 -0
  49. package/dist/server/import/plan.js.map +1 -0
  50. package/dist/server/import/ydoc.d.ts +35 -0
  51. package/dist/server/import/ydoc.d.ts.map +1 -0
  52. package/dist/server/import/ydoc.js +91 -0
  53. package/dist/server/import/ydoc.js.map +1 -0
  54. package/dist/server/import/zip.d.ts +63 -0
  55. package/dist/server/import/zip.d.ts.map +1 -0
  56. package/dist/server/import/zip.js +308 -0
  57. package/dist/server/import/zip.js.map +1 -0
  58. package/dist/server/index.d.ts.map +1 -1
  59. package/dist/server/index.js +3 -1
  60. package/dist/server/index.js.map +1 -1
  61. package/dist/server/schema.d.ts +445 -1
  62. package/dist/server/schema.d.ts.map +1 -1
  63. package/dist/server/schema.js +146 -0
  64. package/dist/server/schema.js.map +1 -1
  65. package/dist/server/services/databases.d.ts +5 -5
  66. package/dist/server/services/export.d.ts +176 -0
  67. package/dist/server/services/export.d.ts.map +1 -0
  68. package/dist/server/services/export.js +822 -0
  69. package/dist/server/services/export.js.map +1 -0
  70. package/dist/server/services/import.d.ts +109 -0
  71. package/dist/server/services/import.d.ts.map +1 -0
  72. package/dist/server/services/import.js +570 -0
  73. package/dist/server/services/import.js.map +1 -0
  74. package/dist/server/services/index.d.ts +26 -1
  75. package/dist/server/services/index.d.ts.map +1 -1
  76. package/dist/server/services/index.js +60 -1
  77. package/dist/server/services/index.js.map +1 -1
  78. package/dist/server/services/versions.d.ts +1 -1
  79. package/migrations/0010_transfers.sql +154 -0
  80. package/migrations/meta/_journal.json +7 -0
  81. package/package.json +1 -1
  82. package/src/client/components/ExportDialog.svelte +685 -0
  83. package/src/client/components/ImportDialog.svelte +702 -0
  84. package/src/client/components/ImportReport.svelte +310 -0
  85. package/src/client/components/SidebarSpaces.svelte +79 -0
  86. package/src/client/i18n.ts +614 -0
  87. package/src/client/index.ts +32 -0
  88. package/src/client/mock.ts +318 -0
  89. package/src/client/module.ts +36 -0
  90. package/src/client/pages/PageView.svelte +36 -0
  91. package/src/client/pages/TransfersPage.svelte +570 -0
  92. package/src/client/permissions.ts +11 -0
  93. package/src/client/query.ts +23 -0
  94. package/src/client/transfers.ts +142 -0
  95. package/src/contract/models.ts +152 -0
  96. package/src/contract/permissions.ts +84 -0
  97. package/src/contract/router.ts +147 -0
@@ -148,6 +148,91 @@ export declare const PublicSitemapEntry: z.ZodObject<{
148
148
  path: z.ZodString;
149
149
  lastModified: z.ZodISODateTime;
150
150
  }, z.core.$strip>;
151
+ /**
152
+ * An export job, plus the one thing that cannot be stored on it: a link to the artefact.
153
+ *
154
+ * `downloadUrl` is minted per request and is null in every state but `done`. It is composed here
155
+ * rather than written into `export_jobs` because a signed storage URL is the object's key, so a
156
+ * stored one is both an address that leaks the workspace and file uuids and an address that stops
157
+ * working an hour later — and, worse, a fence applied once at the moment the job finished rather
158
+ * than every time somebody asks. A subtree export flattens pages of different readerships into one
159
+ * file, so the moment of the fetch is the moment that has to be checked.
160
+ */
161
+ export declare const ExportJobDetail: z.ZodObject<{
162
+ id: z.ZodUUID;
163
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
164
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
165
+ scope: z.ZodEnum<{
166
+ page: "page";
167
+ subtree: "subtree";
168
+ space: "space";
169
+ }>;
170
+ targetId: z.ZodUUID;
171
+ format: z.ZodEnum<{
172
+ markdown: "markdown";
173
+ html: "html";
174
+ docx: "docx";
175
+ pdf: "pdf";
176
+ }>;
177
+ state: z.ZodEnum<{
178
+ queued: "queued";
179
+ running: "running";
180
+ done: "done";
181
+ failed: "failed";
182
+ }>;
183
+ fileId: z.ZodNullable<z.ZodUUID>;
184
+ error: z.ZodNullable<z.ZodString>;
185
+ counts: z.ZodObject<{
186
+ total: z.ZodDefault<z.ZodNumber>;
187
+ done: z.ZodDefault<z.ZodNumber>;
188
+ skipped: z.ZodDefault<z.ZodNumber>;
189
+ failed: z.ZodDefault<z.ZodNumber>;
190
+ }, z.core.$strip>;
191
+ createdAt: z.ZodISODateTime;
192
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
193
+ downloadUrl: z.ZodNullable<z.ZodString>;
194
+ }, z.core.$strip>;
195
+ export type ExportJobDetail = z.infer<typeof ExportJobDetail>;
196
+ /**
197
+ * An import job **without its report**, which is the only shape a list can afford to carry.
198
+ *
199
+ * The report is one row per file, and a Notion export is thousands of files — so twenty jobs in a
200
+ * list is a response of megabytes to draw a table of dates and states. `get` carries the whole thing
201
+ * because that screen is somebody looking at one import and asking what happened to their files,
202
+ * which is the question the report exists to answer.
203
+ *
204
+ * Omitted rather than truncated on purpose. A report cut off at fifty rows is one that has quietly
205
+ * stopped being the complete account of the archive, and a person reading "23 skipped" beside a list
206
+ * of twelve would have no way to know which. Absent is a state a client can render; incomplete is not.
207
+ */
208
+ export declare const ImportJobSummary: z.ZodObject<{
209
+ id: z.ZodUUID;
210
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
211
+ error: z.ZodNullable<z.ZodString>;
212
+ createdAt: z.ZodISODateTime;
213
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
214
+ targetId: z.ZodUUID;
215
+ state: z.ZodEnum<{
216
+ queued: "queued";
217
+ running: "running";
218
+ done: "done";
219
+ failed: "failed";
220
+ }>;
221
+ counts: z.ZodObject<{
222
+ total: z.ZodDefault<z.ZodNumber>;
223
+ done: z.ZodDefault<z.ZodNumber>;
224
+ skipped: z.ZodDefault<z.ZodNumber>;
225
+ failed: z.ZodDefault<z.ZodNumber>;
226
+ }, z.core.$strip>;
227
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
228
+ source: z.ZodEnum<{
229
+ markdown: "markdown";
230
+ notion: "notion";
231
+ confluence: "confluence";
232
+ }>;
233
+ sourceFileId: z.ZodUUID;
234
+ }, z.core.$strip>;
235
+ export type ImportJobSummary = z.infer<typeof ImportJobSummary>;
151
236
  /**
152
237
  * One picture from a published page, **as bytes rather than as an address**.
153
238
  *
@@ -1467,9 +1552,9 @@ export declare const quireContract: {
1467
1552
  label: z.ZodString;
1468
1553
  colour: z.ZodDefault<z.ZodString>;
1469
1554
  group: z.ZodOptional<z.ZodEnum<{
1555
+ done: "done";
1470
1556
  todo: "todo";
1471
1557
  doing: "doing";
1472
- done: "done";
1473
1558
  }>>;
1474
1559
  }, z.core.$strip>>>;
1475
1560
  format: z.ZodOptional<z.ZodString>;
@@ -1634,9 +1719,9 @@ export declare const quireContract: {
1634
1719
  label: z.ZodString;
1635
1720
  colour: z.ZodDefault<z.ZodString>;
1636
1721
  group: z.ZodOptional<z.ZodEnum<{
1722
+ done: "done";
1637
1723
  todo: "todo";
1638
1724
  doing: "doing";
1639
- done: "done";
1640
1725
  }>>;
1641
1726
  }, z.core.$strip>>>;
1642
1727
  format: z.ZodOptional<z.ZodString>;
@@ -1867,9 +1952,9 @@ export declare const quireContract: {
1867
1952
  label: z.ZodString;
1868
1953
  colour: z.ZodDefault<z.ZodString>;
1869
1954
  group: z.ZodOptional<z.ZodEnum<{
1955
+ done: "done";
1870
1956
  todo: "todo";
1871
1957
  doing: "doing";
1872
- done: "done";
1873
1958
  }>>;
1874
1959
  }, z.core.$strip>>>;
1875
1960
  format: z.ZodOptional<z.ZodString>;
@@ -2137,9 +2222,9 @@ export declare const quireContract: {
2137
2222
  label: z.ZodString;
2138
2223
  colour: z.ZodDefault<z.ZodString>;
2139
2224
  group: z.ZodOptional<z.ZodEnum<{
2225
+ done: "done";
2140
2226
  todo: "todo";
2141
2227
  doing: "doing";
2142
- done: "done";
2143
2228
  }>>;
2144
2229
  }, z.core.$strip>>>;
2145
2230
  format: z.ZodOptional<z.ZodString>;
@@ -2199,9 +2284,9 @@ export declare const quireContract: {
2199
2284
  label: z.ZodString;
2200
2285
  colour: z.ZodDefault<z.ZodString>;
2201
2286
  group: z.ZodOptional<z.ZodEnum<{
2287
+ done: "done";
2202
2288
  todo: "todo";
2203
2289
  doing: "doing";
2204
- done: "done";
2205
2290
  }>>;
2206
2291
  }, z.core.$strip>>>;
2207
2292
  format: z.ZodOptional<z.ZodString>;
@@ -2285,9 +2370,9 @@ export declare const quireContract: {
2285
2370
  label: z.ZodString;
2286
2371
  colour: z.ZodDefault<z.ZodString>;
2287
2372
  group: z.ZodOptional<z.ZodEnum<{
2373
+ done: "done";
2288
2374
  todo: "todo";
2289
2375
  doing: "doing";
2290
- done: "done";
2291
2376
  }>>;
2292
2377
  }, z.core.$strip>>>;
2293
2378
  format: z.ZodOptional<z.ZodString>;
@@ -2348,9 +2433,9 @@ export declare const quireContract: {
2348
2433
  label: z.ZodString;
2349
2434
  colour: z.ZodDefault<z.ZodString>;
2350
2435
  group: z.ZodOptional<z.ZodEnum<{
2436
+ done: "done";
2351
2437
  todo: "todo";
2352
2438
  doing: "doing";
2353
- done: "done";
2354
2439
  }>>;
2355
2440
  }, z.core.$strip>>>;
2356
2441
  format: z.ZodOptional<z.ZodString>;
@@ -2445,9 +2530,9 @@ export declare const quireContract: {
2445
2530
  label: z.ZodString;
2446
2531
  colour: z.ZodDefault<z.ZodString>;
2447
2532
  group: z.ZodOptional<z.ZodEnum<{
2533
+ done: "done";
2448
2534
  todo: "todo";
2449
2535
  doing: "doing";
2450
- done: "done";
2451
2536
  }>>;
2452
2537
  }, z.core.$strip>>>;
2453
2538
  format: z.ZodOptional<z.ZodString>;
@@ -3791,6 +3876,448 @@ export declare const quireContract: {
3791
3876
  };
3792
3877
  }>, Record<never, never>>;
3793
3878
  };
3879
+ /**
3880
+ * Taking work out: a page, a page and everything under it, or a whole space, as a file.
3881
+ *
3882
+ * Three procedures and no fourth, which is the shape worth explaining. There is no `download`:
3883
+ * `get` carries a `downloadUrl` it mints as it answers, so the permission is checked on the
3884
+ * request that fetches the file rather than baked into a link that outlives the check. And there
3885
+ * is no `cancel`: a job either finishes or fails, both terminal, and a cancel that races a worker
3886
+ * writing an artefact is a way to end up with an object nothing points at.
3887
+ *
3888
+ * **What the artefact contains is decided by the job, not by the caller.** `start` names a scope
3889
+ * and a format; every page under that scope is then checked against the requester's own
3890
+ * `quire.page.view`, and a page they may not read is left out and counted in `skipped`. So a
3891
+ * subtree export by somebody with a page-scoped DENY is a smaller file, not a refusal — and
3892
+ * `counts.skipped` is how they find out, which is the difference between an export that is quietly
3893
+ * missing pages and one that says how many.
3894
+ *
3895
+ * `format: 'docx'` is declared in `ExportFormat` and refused by `start` today: see the note in
3896
+ * `services/export.ts` for what makes a *correct* Word file more than a matter of effort, and why
3897
+ * a refusal is better than a document that may not open.
3898
+ */
3899
+ readonly exports: {
3900
+ /** Queue one. The answer is a row to watch, never the file — see the note above. */
3901
+ readonly start: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3902
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
3903
+ scope: z.ZodEnum<{
3904
+ page: "page";
3905
+ subtree: "subtree";
3906
+ space: "space";
3907
+ }>;
3908
+ targetId: z.ZodUUID;
3909
+ format: z.ZodEnum<{
3910
+ markdown: "markdown";
3911
+ html: "html";
3912
+ docx: "docx";
3913
+ pdf: "pdf";
3914
+ }>;
3915
+ }, z.core.$strip>, z.ZodObject<{
3916
+ id: z.ZodUUID;
3917
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
3918
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
3919
+ scope: z.ZodEnum<{
3920
+ page: "page";
3921
+ subtree: "subtree";
3922
+ space: "space";
3923
+ }>;
3924
+ targetId: z.ZodUUID;
3925
+ format: z.ZodEnum<{
3926
+ markdown: "markdown";
3927
+ html: "html";
3928
+ docx: "docx";
3929
+ pdf: "pdf";
3930
+ }>;
3931
+ state: z.ZodEnum<{
3932
+ queued: "queued";
3933
+ running: "running";
3934
+ done: "done";
3935
+ failed: "failed";
3936
+ }>;
3937
+ fileId: z.ZodNullable<z.ZodUUID>;
3938
+ error: z.ZodNullable<z.ZodString>;
3939
+ counts: z.ZodObject<{
3940
+ total: z.ZodDefault<z.ZodNumber>;
3941
+ done: z.ZodDefault<z.ZodNumber>;
3942
+ skipped: z.ZodDefault<z.ZodNumber>;
3943
+ failed: z.ZodDefault<z.ZodNumber>;
3944
+ }, z.core.$strip>;
3945
+ createdAt: z.ZodISODateTime;
3946
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
3947
+ downloadUrl: z.ZodNullable<z.ZodString>;
3948
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
3949
+ BAD_REQUEST: {
3950
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
3951
+ };
3952
+ UNAUTHORIZED: {};
3953
+ FORBIDDEN: {
3954
+ data: z.ZodOptional<z.ZodObject<{
3955
+ permission: z.ZodOptional<z.ZodString>;
3956
+ }, z.core.$strip>>;
3957
+ };
3958
+ NOT_FOUND: {};
3959
+ CONFLICT: {
3960
+ data: z.ZodOptional<z.ZodObject<{
3961
+ reason: z.ZodOptional<z.ZodString>;
3962
+ }, z.core.$strip>>;
3963
+ };
3964
+ RATE_LIMITED: {};
3965
+ MODULE_DISABLED: {
3966
+ data: z.ZodObject<{
3967
+ module: z.ZodString;
3968
+ }, z.core.$strip>;
3969
+ };
3970
+ }>, Record<never, never>>;
3971
+ /** Where it has got to, and — once it is `done` — a link that is good for a few minutes. */
3972
+ readonly get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3973
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
3974
+ jobId: z.ZodUUID;
3975
+ }, z.core.$strip>, z.ZodObject<{
3976
+ id: z.ZodUUID;
3977
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
3978
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
3979
+ scope: z.ZodEnum<{
3980
+ page: "page";
3981
+ subtree: "subtree";
3982
+ space: "space";
3983
+ }>;
3984
+ targetId: z.ZodUUID;
3985
+ format: z.ZodEnum<{
3986
+ markdown: "markdown";
3987
+ html: "html";
3988
+ docx: "docx";
3989
+ pdf: "pdf";
3990
+ }>;
3991
+ state: z.ZodEnum<{
3992
+ queued: "queued";
3993
+ running: "running";
3994
+ done: "done";
3995
+ failed: "failed";
3996
+ }>;
3997
+ fileId: z.ZodNullable<z.ZodUUID>;
3998
+ error: z.ZodNullable<z.ZodString>;
3999
+ counts: z.ZodObject<{
4000
+ total: z.ZodDefault<z.ZodNumber>;
4001
+ done: z.ZodDefault<z.ZodNumber>;
4002
+ skipped: z.ZodDefault<z.ZodNumber>;
4003
+ failed: z.ZodDefault<z.ZodNumber>;
4004
+ }, z.core.$strip>;
4005
+ createdAt: z.ZodISODateTime;
4006
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
4007
+ downloadUrl: z.ZodNullable<z.ZodString>;
4008
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4009
+ BAD_REQUEST: {
4010
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4011
+ };
4012
+ UNAUTHORIZED: {};
4013
+ FORBIDDEN: {
4014
+ data: z.ZodOptional<z.ZodObject<{
4015
+ permission: z.ZodOptional<z.ZodString>;
4016
+ }, z.core.$strip>>;
4017
+ };
4018
+ NOT_FOUND: {};
4019
+ CONFLICT: {
4020
+ data: z.ZodOptional<z.ZodObject<{
4021
+ reason: z.ZodOptional<z.ZodString>;
4022
+ }, z.core.$strip>>;
4023
+ };
4024
+ RATE_LIMITED: {};
4025
+ MODULE_DISABLED: {
4026
+ data: z.ZodObject<{
4027
+ module: z.ZodString;
4028
+ }, z.core.$strip>;
4029
+ };
4030
+ }>, Record<never, never>>;
4031
+ /**
4032
+ * This person's own exports, newest first.
4033
+ *
4034
+ * Deliberately not the workspace's. Row-level security fences the tenant, which is not a privacy
4035
+ * boundary, so the `requested_by` filter in the query is the only thing that keeps one person's
4036
+ * export of the salary handbook out of everybody else's list — the same rule `favorites.list`
4037
+ * and `recents.list` follow.
4038
+ */
4039
+ readonly list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4040
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4041
+ limit: z.ZodDefault<z.ZodNumber>;
4042
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
4043
+ id: z.ZodUUID;
4044
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4045
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
4046
+ scope: z.ZodEnum<{
4047
+ page: "page";
4048
+ subtree: "subtree";
4049
+ space: "space";
4050
+ }>;
4051
+ targetId: z.ZodUUID;
4052
+ format: z.ZodEnum<{
4053
+ markdown: "markdown";
4054
+ html: "html";
4055
+ docx: "docx";
4056
+ pdf: "pdf";
4057
+ }>;
4058
+ state: z.ZodEnum<{
4059
+ queued: "queued";
4060
+ running: "running";
4061
+ done: "done";
4062
+ failed: "failed";
4063
+ }>;
4064
+ fileId: z.ZodNullable<z.ZodUUID>;
4065
+ error: z.ZodNullable<z.ZodString>;
4066
+ counts: z.ZodObject<{
4067
+ total: z.ZodDefault<z.ZodNumber>;
4068
+ done: z.ZodDefault<z.ZodNumber>;
4069
+ skipped: z.ZodDefault<z.ZodNumber>;
4070
+ failed: z.ZodDefault<z.ZodNumber>;
4071
+ }, z.core.$strip>;
4072
+ createdAt: z.ZodISODateTime;
4073
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
4074
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4075
+ BAD_REQUEST: {
4076
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4077
+ };
4078
+ UNAUTHORIZED: {};
4079
+ FORBIDDEN: {
4080
+ data: z.ZodOptional<z.ZodObject<{
4081
+ permission: z.ZodOptional<z.ZodString>;
4082
+ }, z.core.$strip>>;
4083
+ };
4084
+ NOT_FOUND: {};
4085
+ CONFLICT: {
4086
+ data: z.ZodOptional<z.ZodObject<{
4087
+ reason: z.ZodOptional<z.ZodString>;
4088
+ }, z.core.$strip>>;
4089
+ };
4090
+ RATE_LIMITED: {};
4091
+ MODULE_DISABLED: {
4092
+ data: z.ZodObject<{
4093
+ module: z.ZodString;
4094
+ }, z.core.$strip>;
4095
+ };
4096
+ }>, Record<never, never>>;
4097
+ };
4098
+ /**
4099
+ * Getting work in: a Notion export, a Confluence export or a folder of Markdown, into one space.
4100
+ *
4101
+ * **The failure list is the feature.** A real export has files that will not map — an attachment,
4102
+ * a `.csv` with no header, a page whose link points outside what was exported — and an import that
4103
+ * silently drops forty pages is worse than one that refuses. So every file in the archive gets a
4104
+ * row in `report` saying whether it became a page, was deliberately left out, or could not be read,
4105
+ * and `counts.total` is exactly the number of rows: nothing in the archive goes unaccounted for.
4106
+ *
4107
+ * Three things follow from the archive being read whole before anything is written, and each is
4108
+ * worth knowing before reading the handlers:
4109
+ *
4110
+ * - **an import is all or nothing.** A zip that fails half way leaves the space exactly as it
4111
+ * was, because the plan is built in memory and written in one transaction;
4112
+ * - **links between imported pages are rewritten to Quire page ids**, which needs every id to
4113
+ * exist before any body is resolved — a link to a page further down the archive is the normal
4114
+ * case, not the exception. A link that resolves to nothing becomes plain text rather than a
4115
+ * dead link, and the report names the target it could not find;
4116
+ * - **a `.csv` becomes a database with typed columns**, guessed from the values and reported.
4117
+ *
4118
+ * `quire.page.import` is `dangerous`, as the tracker marks its own imports: this is the one thing
4119
+ * in the module that writes hundreds of pages into a space in one act, and it is not undone by
4120
+ * pressing something.
4121
+ */
4122
+ readonly imports: {
4123
+ /**
4124
+ * Queue one. The answer is a row to watch; nothing has been written to the space yet.
4125
+ *
4126
+ * `fileId` is an upload — a core file the browser has already put in place — and not the archive
4127
+ * itself. A zip is up to a few hundred megabytes, which is a file to be uploaded and then named,
4128
+ * never a request body.
4129
+ */
4130
+ readonly start: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4131
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4132
+ spaceId: z.ZodUUID;
4133
+ source: z.ZodEnum<{
4134
+ markdown: "markdown";
4135
+ notion: "notion";
4136
+ confluence: "confluence";
4137
+ }>;
4138
+ fileId: z.ZodUUID;
4139
+ }, z.core.$strip>, z.ZodObject<{
4140
+ id: z.ZodUUID;
4141
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4142
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
4143
+ source: z.ZodEnum<{
4144
+ markdown: "markdown";
4145
+ notion: "notion";
4146
+ confluence: "confluence";
4147
+ }>;
4148
+ targetId: z.ZodUUID;
4149
+ sourceFileId: z.ZodUUID;
4150
+ state: z.ZodEnum<{
4151
+ queued: "queued";
4152
+ running: "running";
4153
+ done: "done";
4154
+ failed: "failed";
4155
+ }>;
4156
+ error: z.ZodNullable<z.ZodString>;
4157
+ counts: z.ZodObject<{
4158
+ total: z.ZodDefault<z.ZodNumber>;
4159
+ done: z.ZodDefault<z.ZodNumber>;
4160
+ skipped: z.ZodDefault<z.ZodNumber>;
4161
+ failed: z.ZodDefault<z.ZodNumber>;
4162
+ }, z.core.$strip>;
4163
+ report: z.ZodArray<z.ZodObject<{
4164
+ path: z.ZodString;
4165
+ outcome: z.ZodEnum<{
4166
+ failed: "failed";
4167
+ skipped: "skipped";
4168
+ imported: "imported";
4169
+ }>;
4170
+ pageId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
4171
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4172
+ }, z.core.$strip>>;
4173
+ createdAt: z.ZodISODateTime;
4174
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
4175
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4176
+ BAD_REQUEST: {
4177
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4178
+ };
4179
+ UNAUTHORIZED: {};
4180
+ FORBIDDEN: {
4181
+ data: z.ZodOptional<z.ZodObject<{
4182
+ permission: z.ZodOptional<z.ZodString>;
4183
+ }, z.core.$strip>>;
4184
+ };
4185
+ NOT_FOUND: {};
4186
+ CONFLICT: {
4187
+ data: z.ZodOptional<z.ZodObject<{
4188
+ reason: z.ZodOptional<z.ZodString>;
4189
+ }, z.core.$strip>>;
4190
+ };
4191
+ RATE_LIMITED: {};
4192
+ MODULE_DISABLED: {
4193
+ data: z.ZodObject<{
4194
+ module: z.ZodString;
4195
+ }, z.core.$strip>;
4196
+ };
4197
+ }>, Record<never, never>>;
4198
+ /** Where it has got to, and — once it has finished — what happened to every file in it. */
4199
+ readonly get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4200
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4201
+ jobId: z.ZodUUID;
4202
+ }, z.core.$strip>, z.ZodObject<{
4203
+ id: z.ZodUUID;
4204
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4205
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
4206
+ source: z.ZodEnum<{
4207
+ markdown: "markdown";
4208
+ notion: "notion";
4209
+ confluence: "confluence";
4210
+ }>;
4211
+ targetId: z.ZodUUID;
4212
+ sourceFileId: z.ZodUUID;
4213
+ state: z.ZodEnum<{
4214
+ queued: "queued";
4215
+ running: "running";
4216
+ done: "done";
4217
+ failed: "failed";
4218
+ }>;
4219
+ error: z.ZodNullable<z.ZodString>;
4220
+ counts: z.ZodObject<{
4221
+ total: z.ZodDefault<z.ZodNumber>;
4222
+ done: z.ZodDefault<z.ZodNumber>;
4223
+ skipped: z.ZodDefault<z.ZodNumber>;
4224
+ failed: z.ZodDefault<z.ZodNumber>;
4225
+ }, z.core.$strip>;
4226
+ report: z.ZodArray<z.ZodObject<{
4227
+ path: z.ZodString;
4228
+ outcome: z.ZodEnum<{
4229
+ failed: "failed";
4230
+ skipped: "skipped";
4231
+ imported: "imported";
4232
+ }>;
4233
+ pageId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
4234
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4235
+ }, z.core.$strip>>;
4236
+ createdAt: z.ZodISODateTime;
4237
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
4238
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4239
+ BAD_REQUEST: {
4240
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4241
+ };
4242
+ UNAUTHORIZED: {};
4243
+ FORBIDDEN: {
4244
+ data: z.ZodOptional<z.ZodObject<{
4245
+ permission: z.ZodOptional<z.ZodString>;
4246
+ }, z.core.$strip>>;
4247
+ };
4248
+ NOT_FOUND: {};
4249
+ CONFLICT: {
4250
+ data: z.ZodOptional<z.ZodObject<{
4251
+ reason: z.ZodOptional<z.ZodString>;
4252
+ }, z.core.$strip>>;
4253
+ };
4254
+ RATE_LIMITED: {};
4255
+ MODULE_DISABLED: {
4256
+ data: z.ZodObject<{
4257
+ module: z.ZodString;
4258
+ }, z.core.$strip>;
4259
+ };
4260
+ }>, Record<never, never>>;
4261
+ /**
4262
+ * This person's own imports, newest first, without their reports — see `ImportJobSummary`.
4263
+ *
4264
+ * Deliberately not the workspace's, for the same reason `exports.list` is not: row-level security
4265
+ * fences the tenant, which is not a privacy boundary, so the `requested_by` filter in the query
4266
+ * is the only thing that keeps one person's import out of everybody else's list.
4267
+ */
4268
+ readonly list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
4269
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4270
+ limit: z.ZodDefault<z.ZodNumber>;
4271
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
4272
+ id: z.ZodUUID;
4273
+ workspaceId: z.core.$ZodBranded<z.ZodUUID, "WorkspaceId", "out">;
4274
+ error: z.ZodNullable<z.ZodString>;
4275
+ createdAt: z.ZodISODateTime;
4276
+ requestedBy: z.core.$ZodBranded<z.ZodUUID, "UserId", "out">;
4277
+ targetId: z.ZodUUID;
4278
+ state: z.ZodEnum<{
4279
+ queued: "queued";
4280
+ running: "running";
4281
+ done: "done";
4282
+ failed: "failed";
4283
+ }>;
4284
+ counts: z.ZodObject<{
4285
+ total: z.ZodDefault<z.ZodNumber>;
4286
+ done: z.ZodDefault<z.ZodNumber>;
4287
+ skipped: z.ZodDefault<z.ZodNumber>;
4288
+ failed: z.ZodDefault<z.ZodNumber>;
4289
+ }, z.core.$strip>;
4290
+ finishedAt: z.ZodNullable<z.ZodISODateTime>;
4291
+ source: z.ZodEnum<{
4292
+ markdown: "markdown";
4293
+ notion: "notion";
4294
+ confluence: "confluence";
4295
+ }>;
4296
+ sourceFileId: z.ZodUUID;
4297
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
4298
+ BAD_REQUEST: {
4299
+ data: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4300
+ };
4301
+ UNAUTHORIZED: {};
4302
+ FORBIDDEN: {
4303
+ data: z.ZodOptional<z.ZodObject<{
4304
+ permission: z.ZodOptional<z.ZodString>;
4305
+ }, z.core.$strip>>;
4306
+ };
4307
+ NOT_FOUND: {};
4308
+ CONFLICT: {
4309
+ data: z.ZodOptional<z.ZodObject<{
4310
+ reason: z.ZodOptional<z.ZodString>;
4311
+ }, z.core.$strip>>;
4312
+ };
4313
+ RATE_LIMITED: {};
4314
+ MODULE_DISABLED: {
4315
+ data: z.ZodObject<{
4316
+ module: z.ZodString;
4317
+ }, z.core.$strip>;
4318
+ };
4319
+ }>, Record<never, never>>;
4320
+ };
3794
4321
  /**
3795
4322
  * The signed-out surface. **This is the only part of Kern with no principal behind it.**
3796
4323
  *
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/contract/router.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAML,EAAE,EAWH,MAAM,aAAa,CAAA;AAyCpB;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;iBAA4B,CAAA;AACtD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEzD,qDAAqD;AACrD,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAA8B,CAAA;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;iBAGrB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEnD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc;;;;;iBAOzB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,sFAAsF;AACtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;iBAe3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;iBAM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