@ourofoundation/ouro-js 3.5.0 → 3.5.2

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 (107) hide show
  1. package/dist/{chunk-BFBGVGNF.js → chunk-35CJDNHH.js} +2 -2
  2. package/dist/{chunk-BFBGVGNF.js.map → chunk-35CJDNHH.js.map} +1 -1
  3. package/dist/chunk-3UWDQLTN.js +2 -0
  4. package/dist/chunk-3UWDQLTN.js.map +1 -0
  5. package/dist/chunk-6GPIZJ4T.cjs +2 -0
  6. package/dist/chunk-6GPIZJ4T.cjs.map +1 -0
  7. package/dist/{chunk-CONKY65O.cjs → chunk-6ZJQTECB.cjs} +2 -2
  8. package/dist/{chunk-CONKY65O.cjs.map → chunk-6ZJQTECB.cjs.map} +1 -1
  9. package/dist/{chunk-XWXLCG4E.cjs → chunk-BWAEBQKV.cjs} +2 -2
  10. package/dist/chunk-BWAEBQKV.cjs.map +1 -0
  11. package/dist/chunk-F5CWCYOP.cjs +2 -0
  12. package/dist/chunk-F5CWCYOP.cjs.map +1 -0
  13. package/dist/{chunk-QT3A4ULM.cjs → chunk-FRMPLGE4.cjs} +2 -2
  14. package/dist/{chunk-QT3A4ULM.cjs.map → chunk-FRMPLGE4.cjs.map} +1 -1
  15. package/dist/{chunk-6YF2RSXS.js → chunk-G3VMEPTP.js} +2 -2
  16. package/dist/{chunk-6YF2RSXS.js.map → chunk-G3VMEPTP.js.map} +1 -1
  17. package/dist/chunk-HIXNQKVP.cjs +2 -0
  18. package/dist/{chunk-NEINJFFK.cjs.map → chunk-HIXNQKVP.cjs.map} +1 -1
  19. package/dist/chunk-IWOXGKK4.js +2 -0
  20. package/dist/chunk-IWOXGKK4.js.map +1 -0
  21. package/dist/chunk-KCVE35IO.js +2 -0
  22. package/dist/chunk-KCVE35IO.js.map +1 -0
  23. package/dist/chunk-MLTO7TMM.js +2 -0
  24. package/dist/chunk-MLTO7TMM.js.map +1 -0
  25. package/dist/chunk-OBWPO2QT.cjs +2 -0
  26. package/dist/chunk-OBWPO2QT.cjs.map +1 -0
  27. package/dist/{chunk-Z3ALIFYO.js → chunk-R2W4NEEJ.js} +2 -2
  28. package/dist/chunk-R2W4NEEJ.js.map +1 -0
  29. package/dist/{chunk-IP4OVRZB.cjs → chunk-ROMY5WNQ.cjs} +2 -2
  30. package/dist/chunk-ROMY5WNQ.cjs.map +1 -0
  31. package/dist/chunk-SR5UZ4NP.js +2 -0
  32. package/dist/chunk-SR5UZ4NP.js.map +1 -0
  33. package/dist/{chunk-JKTQY4RU.js → chunk-TYOQ32UV.js} +2 -2
  34. package/dist/{chunk-JKTQY4RU.js.map → chunk-TYOQ32UV.js.map} +1 -1
  35. package/dist/chunk-V73EW77Y.cjs +2 -0
  36. package/dist/chunk-V73EW77Y.cjs.map +1 -0
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.cts +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/schema/assets.cjs +1 -1
  42. package/dist/schema/assets.d.cts +85 -84
  43. package/dist/schema/assets.d.ts +85 -84
  44. package/dist/schema/assets.js +1 -1
  45. package/dist/schema/comments.cjs +1 -1
  46. package/dist/schema/comments.d.cts +140 -136
  47. package/dist/schema/comments.d.ts +140 -136
  48. package/dist/schema/comments.js +1 -1
  49. package/dist/schema/common.d.cts +16 -16
  50. package/dist/schema/common.d.ts +16 -16
  51. package/dist/schema/conversations.cjs +1 -1
  52. package/dist/schema/conversations.d.cts +70 -69
  53. package/dist/schema/conversations.d.ts +70 -69
  54. package/dist/schema/conversations.js +1 -1
  55. package/dist/schema/datasets.cjs +1 -1
  56. package/dist/schema/datasets.d.cts +283 -107
  57. package/dist/schema/datasets.d.ts +283 -107
  58. package/dist/schema/datasets.js +1 -1
  59. package/dist/schema/files.cjs +1 -1
  60. package/dist/schema/files.d.cts +101 -100
  61. package/dist/schema/files.d.ts +101 -100
  62. package/dist/schema/files.js +1 -1
  63. package/dist/schema/notifications.d.cts +2 -2
  64. package/dist/schema/notifications.d.ts +2 -2
  65. package/dist/schema/organizations.d.cts +1 -1
  66. package/dist/schema/organizations.d.ts +1 -1
  67. package/dist/schema/posts.cjs +1 -1
  68. package/dist/schema/posts.d.cts +131 -129
  69. package/dist/schema/posts.d.ts +131 -129
  70. package/dist/schema/posts.js +1 -1
  71. package/dist/schema/quests.cjs +1 -1
  72. package/dist/schema/quests.d.cts +178 -177
  73. package/dist/schema/quests.d.ts +178 -177
  74. package/dist/schema/quests.js +1 -1
  75. package/dist/schema/services.cjs +1 -1
  76. package/dist/schema/services.d.cts +131 -127
  77. package/dist/schema/services.d.ts +131 -127
  78. package/dist/schema/services.js +1 -1
  79. package/dist/schema/teams.d.cts +18 -18
  80. package/dist/schema/teams.d.ts +18 -18
  81. package/dist/utils/quest-submission.cjs +1 -1
  82. package/dist/utils/quest-submission.d.cts +7 -7
  83. package/dist/utils/quest-submission.d.ts +7 -7
  84. package/dist/utils/quest-submission.js +1 -1
  85. package/package.json +1 -1
  86. package/dist/chunk-7F26V24D.js +0 -2
  87. package/dist/chunk-7F26V24D.js.map +0 -1
  88. package/dist/chunk-B4225TEG.js +0 -2
  89. package/dist/chunk-B4225TEG.js.map +0 -1
  90. package/dist/chunk-BQ5WODME.cjs +0 -2
  91. package/dist/chunk-BQ5WODME.cjs.map +0 -1
  92. package/dist/chunk-G2MXCB7Q.js +0 -2
  93. package/dist/chunk-G2MXCB7Q.js.map +0 -1
  94. package/dist/chunk-IP4OVRZB.cjs.map +0 -1
  95. package/dist/chunk-JW7FACNZ.cjs +0 -2
  96. package/dist/chunk-JW7FACNZ.cjs.map +0 -1
  97. package/dist/chunk-MH4A7XAY.cjs +0 -2
  98. package/dist/chunk-MH4A7XAY.cjs.map +0 -1
  99. package/dist/chunk-NEINJFFK.cjs +0 -2
  100. package/dist/chunk-U3F23ASS.js +0 -2
  101. package/dist/chunk-U3F23ASS.js.map +0 -1
  102. package/dist/chunk-WUC5AUUJ.cjs +0 -2
  103. package/dist/chunk-WUC5AUUJ.cjs.map +0 -1
  104. package/dist/chunk-XWXLCG4E.cjs.map +0 -1
  105. package/dist/chunk-Y6AKG4FJ.js +0 -2
  106. package/dist/chunk-Y6AKG4FJ.js.map +0 -1
  107. package/dist/chunk-Z3ALIFYO.js.map +0 -1
@@ -1,5 +1,98 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Per-column asset reference declarations.
5
+ *
6
+ * A column becomes an asset reference when the backend adds a real Postgres FK
7
+ * to public.assets(id). The optional asset_type refines validation/display.
8
+ */
9
+ declare const DatasetAssetRefsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
10
+ asset_type: z.ZodOptional<z.ZodEnum<{
11
+ organization: "organization";
12
+ file: "file";
13
+ user: "user";
14
+ team: "team";
15
+ dataset: "dataset";
16
+ service: "service";
17
+ route: "route";
18
+ post: "post";
19
+ quest: "quest";
20
+ comment: "comment";
21
+ conversation: "conversation";
22
+ }>>;
23
+ }, z.core.$strip>>;
24
+ /**
25
+ * A single column from GET /datasets/:id/schema, enriched server-side.
26
+ *
27
+ * The FK fields come straight from get_table_schema. `semantic_type` is pure
28
+ * inference: "asset_ref" when the column has an FK to public.assets. The
29
+ * optional `asset_type` is the declared target-type hint from
30
+ * metadata.asset_refs (display + soft validation only).
31
+ */
32
+ declare const EnrichedDatasetSchemaFieldSchema: z.ZodObject<{
33
+ column_name: z.ZodString;
34
+ data_type: z.ZodString;
35
+ fk_constraint_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ foreign_table_schema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ foreign_table_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ foreign_column_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ semantic_type: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"asset_ref">>>;
40
+ asset_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
41
+ organization: "organization";
42
+ file: "file";
43
+ user: "user";
44
+ team: "team";
45
+ dataset: "dataset";
46
+ service: "service";
47
+ route: "route";
48
+ post: "post";
49
+ quest: "quest";
50
+ comment: "comment";
51
+ conversation: "conversation";
52
+ }>>>;
53
+ }, z.core.$strip>;
54
+ /**
55
+ * A resolved asset reference returned in the `resolved_asset_refs` sidecar of
56
+ * GET /datasets/:id/data?resolve_asset_refs=true. Reuses the platform-wide
57
+ * { asset_id, asset_type } vocabulary (see KeyedAssetRefsSchema).
58
+ */
59
+ declare const ResolvedAssetRefSchema: z.ZodObject<{
60
+ asset_id: z.ZodUUID;
61
+ asset_type: z.ZodEnum<{
62
+ organization: "organization";
63
+ file: "file";
64
+ user: "user";
65
+ team: "team";
66
+ dataset: "dataset";
67
+ service: "service";
68
+ route: "route";
69
+ post: "post";
70
+ quest: "quest";
71
+ comment: "comment";
72
+ conversation: "conversation";
73
+ }>;
74
+ name: z.ZodNullable<z.ZodString>;
75
+ web_url: z.ZodNullable<z.ZodString>;
76
+ }, z.core.$strip>;
77
+ /** column -> (referenced uuid -> resolved asset). */
78
+ declare const ResolvedAssetRefsSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
79
+ asset_id: z.ZodUUID;
80
+ asset_type: z.ZodEnum<{
81
+ organization: "organization";
82
+ file: "file";
83
+ user: "user";
84
+ team: "team";
85
+ dataset: "dataset";
86
+ service: "service";
87
+ route: "route";
88
+ post: "post";
89
+ quest: "quest";
90
+ comment: "comment";
91
+ conversation: "conversation";
92
+ }>;
93
+ name: z.ZodNullable<z.ZodString>;
94
+ web_url: z.ZodNullable<z.ZodString>;
95
+ }, z.core.$strip>>>;
3
96
  declare const DatasetSchema: z.ZodObject<{
4
97
  id: z.ZodUUID;
5
98
  user_id: z.ZodUUID;
@@ -108,9 +201,9 @@ declare const DatasetSchema: z.ZodObject<{
108
201
  none: "none";
109
202
  }>>;
110
203
  visibility: z.ZodOptional<z.ZodEnum<{
111
- organization: "organization";
112
204
  public: "public";
113
205
  private: "private";
206
+ organization: "organization";
114
207
  monetized: "monetized";
115
208
  inherit: "inherit";
116
209
  }>>;
@@ -182,9 +275,9 @@ declare const DatasetSchema: z.ZodObject<{
182
275
  text: z.ZodString;
183
276
  }, z.core.$strip>>>;
184
277
  visibility: z.ZodEnum<{
185
- organization: "organization";
186
278
  public: "public";
187
279
  private: "private";
280
+ organization: "organization";
188
281
  monetized: "monetized";
189
282
  inherit: "inherit";
190
283
  }>;
@@ -209,15 +302,16 @@ declare const DatasetSchema: z.ZodObject<{
209
302
  stripe_meter_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
303
  state: z.ZodEnum<{
211
304
  success: "success";
305
+ error: "error";
212
306
  queued: "queued";
213
307
  "in-progress": "in-progress";
214
308
  "timed-out": "timed-out";
215
- error: "error";
216
309
  }>;
217
310
  source: z.ZodEnum<{
218
- api: "api";
219
311
  web: "web";
312
+ api: "api";
220
313
  }>;
314
+ is_pinned_in_team: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
221
315
  created_at: z.ZodString;
222
316
  last_updated: z.ZodString;
223
317
  asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
@@ -225,6 +319,21 @@ declare const DatasetSchema: z.ZodObject<{
225
319
  table_name: z.ZodString;
226
320
  schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
227
321
  columns: z.ZodArray<z.ZodString>;
322
+ asset_refs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
323
+ asset_type: z.ZodOptional<z.ZodEnum<{
324
+ organization: "organization";
325
+ file: "file";
326
+ user: "user";
327
+ team: "team";
328
+ dataset: "dataset";
329
+ service: "service";
330
+ route: "route";
331
+ post: "post";
332
+ quest: "quest";
333
+ comment: "comment";
334
+ conversation: "conversation";
335
+ }>>;
336
+ }, z.core.$strip>>>>;
228
337
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
229
338
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
230
339
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -251,15 +360,15 @@ declare const DatasetSchema: z.ZodObject<{
251
360
  }, z.core.$strip>;
252
361
  declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
253
362
  parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
254
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
255
- json: z.ZodRecord<z.ZodString, z.ZodAny>;
256
- text: z.ZodString;
257
- }, z.core.$strip>>>>;
258
363
  monetization: z.ZodOptional<z.ZodEnum<{
259
364
  none: "none";
260
365
  "pay-to-unlock": "pay-to-unlock";
261
366
  "pay-per-use": "pay-per-use";
262
367
  }>>;
368
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
369
+ json: z.ZodRecord<z.ZodString, z.ZodAny>;
370
+ text: z.ZodString;
371
+ }, z.core.$strip>>>>;
263
372
  parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
264
373
  license_id: z.ZodOptional<z.ZodString>;
265
374
  price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
@@ -283,19 +392,19 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
283
392
  name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
393
  state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
285
394
  success: "success";
395
+ error: "error";
286
396
  queued: "queued";
287
397
  "in-progress": "in-progress";
288
398
  "timed-out": "timed-out";
289
- error: "error";
290
399
  }>>>;
291
400
  source: z.ZodDefault<z.ZodEnum<{
292
- api: "api";
293
401
  web: "web";
402
+ api: "api";
294
403
  }>>;
295
404
  visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
296
- organization: "organization";
297
405
  public: "public";
298
406
  private: "private";
407
+ organization: "organization";
299
408
  monetized: "monetized";
300
409
  inherit: "inherit";
301
410
  }>>>;
@@ -306,6 +415,21 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
306
415
  table_name: z.ZodString;
307
416
  schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
308
417
  columns: z.ZodArray<z.ZodString>;
418
+ asset_refs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
419
+ asset_type: z.ZodOptional<z.ZodEnum<{
420
+ organization: "organization";
421
+ file: "file";
422
+ user: "user";
423
+ team: "team";
424
+ dataset: "dataset";
425
+ service: "service";
426
+ route: "route";
427
+ post: "post";
428
+ quest: "quest";
429
+ comment: "comment";
430
+ conversation: "conversation";
431
+ }>>;
432
+ }, z.core.$strip>>>>;
309
433
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
310
434
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
311
435
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -334,9 +458,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
334
458
  team_id: string | null;
335
459
  org_id: string | null;
336
460
  name: string;
337
- state: "success" | "queued" | "in-progress" | "timed-out" | "error";
338
- source: "api" | "web";
339
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
461
+ state: "success" | "error" | "queued" | "in-progress" | "timed-out";
462
+ source: "web" | "api";
463
+ visibility: "public" | "private" | "organization" | "monetized" | "inherit";
340
464
  created_at: string;
341
465
  last_updated: string;
342
466
  asset_type: "dataset";
@@ -351,6 +475,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
351
475
  name: string;
352
476
  id: string;
353
477
  bucket: "public-files" | "files";
478
+ asset_refs?: Record<string, {
479
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
480
+ }> | null | undefined;
354
481
  doi_url?: string | null | undefined;
355
482
  external_url?: string | null | undefined;
356
483
  paper_url?: string | null | undefined;
@@ -361,11 +488,11 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
361
488
  };
362
489
  preview: Record<string, any>[];
363
490
  parent?: Record<string, any> | undefined;
491
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
364
492
  description?: {
365
493
  json: Record<string, any>;
366
494
  text: string;
367
495
  } | null | undefined;
368
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
369
496
  parent_id?: string | null | undefined;
370
497
  license_id?: string | undefined;
371
498
  price?: number | null | undefined;
@@ -382,9 +509,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
382
509
  team_id: string | null;
383
510
  org_id: string | null;
384
511
  name: string;
385
- state: "success" | "queued" | "in-progress" | "timed-out" | "error";
386
- source: "api" | "web";
387
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
512
+ state: "success" | "error" | "queued" | "in-progress" | "timed-out";
513
+ source: "web" | "api";
514
+ visibility: "public" | "private" | "organization" | "monetized" | "inherit";
388
515
  created_at: string;
389
516
  last_updated: string;
390
517
  asset_type: "dataset";
@@ -399,6 +526,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
399
526
  name: string;
400
527
  id: string;
401
528
  bucket: "public-files" | "files";
529
+ asset_refs?: Record<string, {
530
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
531
+ }> | null | undefined;
402
532
  doi_url?: string | null | undefined;
403
533
  external_url?: string | null | undefined;
404
534
  paper_url?: string | null | undefined;
@@ -409,11 +539,11 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
409
539
  };
410
540
  preview: Record<string, any>[];
411
541
  parent?: Record<string, any> | undefined;
542
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
412
543
  description?: {
413
544
  json: Record<string, any>;
414
545
  text: string;
415
546
  } | null | undefined;
416
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
417
547
  parent_id?: string | null | undefined;
418
548
  license_id?: string | undefined;
419
549
  price?: number | null | undefined;
@@ -428,15 +558,15 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
428
558
  }>>;
429
559
  declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
430
560
  parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
431
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
432
- json: z.ZodRecord<z.ZodString, z.ZodAny>;
433
- text: z.ZodString;
434
- }, z.core.$strip>>>>;
435
561
  monetization: z.ZodOptional<z.ZodEnum<{
436
562
  none: "none";
437
563
  "pay-to-unlock": "pay-to-unlock";
438
564
  "pay-per-use": "pay-per-use";
439
565
  }>>;
566
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
567
+ json: z.ZodRecord<z.ZodString, z.ZodAny>;
568
+ text: z.ZodString;
569
+ }, z.core.$strip>>>>;
440
570
  parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
441
571
  license_id: z.ZodOptional<z.ZodString>;
442
572
  price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
@@ -460,19 +590,19 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
460
590
  name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
461
591
  state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
462
592
  success: "success";
593
+ error: "error";
463
594
  queued: "queued";
464
595
  "in-progress": "in-progress";
465
596
  "timed-out": "timed-out";
466
- error: "error";
467
597
  }>>>;
468
598
  source: z.ZodDefault<z.ZodEnum<{
469
- api: "api";
470
599
  web: "web";
600
+ api: "api";
471
601
  }>>;
472
602
  visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
473
- organization: "organization";
474
603
  public: "public";
475
604
  private: "private";
605
+ organization: "organization";
476
606
  monetized: "monetized";
477
607
  inherit: "inherit";
478
608
  }>>>;
@@ -483,6 +613,21 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
483
613
  table_name: z.ZodString;
484
614
  schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
485
615
  columns: z.ZodArray<z.ZodString>;
616
+ asset_refs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
617
+ asset_type: z.ZodOptional<z.ZodEnum<{
618
+ organization: "organization";
619
+ file: "file";
620
+ user: "user";
621
+ team: "team";
622
+ dataset: "dataset";
623
+ service: "service";
624
+ route: "route";
625
+ post: "post";
626
+ quest: "quest";
627
+ comment: "comment";
628
+ conversation: "conversation";
629
+ }>>;
630
+ }, z.core.$strip>>>>;
486
631
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
487
632
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
488
633
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -501,9 +646,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
501
646
  team_id: string | null;
502
647
  org_id: string | null;
503
648
  name: string;
504
- state: "success" | "queued" | "in-progress" | "timed-out" | "error";
505
- source: "api" | "web";
506
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
649
+ state: "success" | "error" | "queued" | "in-progress" | "timed-out";
650
+ source: "web" | "api";
651
+ visibility: "public" | "private" | "organization" | "monetized" | "inherit";
507
652
  created_at: string;
508
653
  last_updated: string;
509
654
  asset_type: "dataset";
@@ -511,6 +656,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
511
656
  table_name: string;
512
657
  schema: "datasets";
513
658
  columns: string[];
659
+ asset_refs?: Record<string, {
660
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
661
+ }> | null | undefined;
514
662
  doi_url?: string | null | undefined;
515
663
  external_url?: string | null | undefined;
516
664
  paper_url?: string | null | undefined;
@@ -521,11 +669,11 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
521
669
  };
522
670
  preview: Record<string, any>[];
523
671
  parent?: Record<string, any> | undefined;
672
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
524
673
  description?: {
525
674
  json: Record<string, any>;
526
675
  text: string;
527
676
  } | null | undefined;
528
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
529
677
  parent_id?: string | null | undefined;
530
678
  license_id?: string | undefined;
531
679
  price?: number | null | undefined;
@@ -542,9 +690,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
542
690
  team_id: string | null;
543
691
  org_id: string | null;
544
692
  name: string;
545
- state: "success" | "queued" | "in-progress" | "timed-out" | "error";
546
- source: "api" | "web";
547
- visibility: "organization" | "public" | "private" | "monetized" | "inherit";
693
+ state: "success" | "error" | "queued" | "in-progress" | "timed-out";
694
+ source: "web" | "api";
695
+ visibility: "public" | "private" | "organization" | "monetized" | "inherit";
548
696
  created_at: string;
549
697
  last_updated: string;
550
698
  asset_type: "dataset";
@@ -552,6 +700,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
552
700
  table_name: string;
553
701
  schema: "datasets";
554
702
  columns: string[];
703
+ asset_refs?: Record<string, {
704
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
705
+ }> | null | undefined;
555
706
  doi_url?: string | null | undefined;
556
707
  external_url?: string | null | undefined;
557
708
  paper_url?: string | null | undefined;
@@ -562,11 +713,11 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
562
713
  };
563
714
  preview: Record<string, any>[];
564
715
  parent?: Record<string, any> | undefined;
716
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
565
717
  description?: {
566
718
  json: Record<string, any>;
567
719
  text: string;
568
720
  } | null | undefined;
569
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
570
721
  parent_id?: string | null | undefined;
571
722
  license_id?: string | undefined;
572
723
  price?: number | null | undefined;
@@ -580,51 +731,18 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
580
731
  name_url_slug?: string | null | undefined;
581
732
  }>>;
582
733
  declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
583
- org_id: z.ZodOptional<z.ZodUUID>;
584
734
  parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
585
- metadata: z.ZodOptional<z.ZodObject<{
586
- table_name: z.ZodString;
587
- schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
588
- columns: z.ZodArray<z.ZodString>;
589
- doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
590
- external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
591
- paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
592
- github_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
593
- originality: z.ZodOptional<z.ZodEnum<{
594
- original: "original";
595
- derivative: "derivative";
596
- "third-party": "third-party";
597
- }>>;
598
- source: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
599
- reply_to_comment_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
600
- type: z.ZodOptional<z.ZodString>;
601
- size: z.ZodOptional<z.ZodNumber>;
602
- path: z.ZodOptional<z.ZodString>;
603
- extension: z.ZodOptional<z.ZodString>;
604
- name: z.ZodOptional<z.ZodString>;
605
- id: z.ZodOptional<z.ZodUUID>;
606
- bucket: z.ZodOptional<z.ZodEnum<{
607
- "public-files": "public-files";
608
- files: "files";
609
- }>>;
610
- }, z.core.$strip>>;
611
- name: z.ZodOptional<z.ZodString>;
612
- team_id: z.ZodOptional<z.ZodUUID>;
735
+ source: z.ZodOptional<z.ZodEnum<{
736
+ web: "web";
737
+ api: "api";
738
+ }>>;
613
739
  visibility: z.ZodOptional<z.ZodEnum<{
614
- organization: "organization";
615
740
  public: "public";
616
741
  private: "private";
742
+ organization: "organization";
617
743
  monetized: "monetized";
618
744
  inherit: "inherit";
619
745
  }>>;
620
- description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
621
- json: z.ZodRecord<z.ZodString, z.ZodAny>;
622
- text: z.ZodString;
623
- }, z.core.$strip>>>>;
624
- source: z.ZodOptional<z.ZodEnum<{
625
- api: "api";
626
- web: "web";
627
- }>>;
628
746
  monetization: z.ZodOptional<z.ZodEnum<{
629
747
  none: "none";
630
748
  "pay-to-unlock": "pay-to-unlock";
@@ -632,11 +750,18 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
632
750
  }>>;
633
751
  state: z.ZodOptional<z.ZodEnum<{
634
752
  success: "success";
753
+ error: "error";
635
754
  queued: "queued";
636
755
  "in-progress": "in-progress";
637
756
  "timed-out": "timed-out";
638
- error: "error";
639
757
  }>>;
758
+ name: z.ZodOptional<z.ZodString>;
759
+ org_id: z.ZodOptional<z.ZodUUID>;
760
+ team_id: z.ZodOptional<z.ZodUUID>;
761
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
762
+ json: z.ZodRecord<z.ZodString, z.ZodAny>;
763
+ text: z.ZodString;
764
+ }, z.core.$strip>>>>;
640
765
  parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
641
766
  license_id: z.ZodOptional<z.ZodString>;
642
767
  license: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
@@ -655,18 +780,84 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
655
780
  stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
656
781
  stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
657
782
  stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
783
+ metadata: z.ZodOptional<z.ZodObject<{
784
+ table_name: z.ZodString;
785
+ schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
786
+ columns: z.ZodArray<z.ZodString>;
787
+ asset_refs: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
788
+ asset_type: z.ZodOptional<z.ZodEnum<{
789
+ organization: "organization";
790
+ file: "file";
791
+ user: "user";
792
+ team: "team";
793
+ dataset: "dataset";
794
+ service: "service";
795
+ route: "route";
796
+ post: "post";
797
+ quest: "quest";
798
+ comment: "comment";
799
+ conversation: "conversation";
800
+ }>>;
801
+ }, z.core.$strip>>>>;
802
+ doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
803
+ external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
804
+ paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
805
+ github_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
806
+ originality: z.ZodOptional<z.ZodEnum<{
807
+ original: "original";
808
+ derivative: "derivative";
809
+ "third-party": "third-party";
810
+ }>>;
811
+ source: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
812
+ reply_to_comment_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
813
+ type: z.ZodOptional<z.ZodString>;
814
+ size: z.ZodOptional<z.ZodNumber>;
815
+ path: z.ZodOptional<z.ZodString>;
816
+ extension: z.ZodOptional<z.ZodString>;
817
+ name: z.ZodOptional<z.ZodString>;
818
+ id: z.ZodOptional<z.ZodUUID>;
819
+ bucket: z.ZodOptional<z.ZodEnum<{
820
+ "public-files": "public-files";
821
+ files: "files";
822
+ }>>;
823
+ }, z.core.$strip>>;
658
824
  preview: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
659
825
  asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
660
826
  last_updated: z.ZodDefault<z.ZodString>;
661
827
  }, z.core.$strip>, z.ZodTransform<{
662
828
  asset_type: "dataset";
663
829
  last_updated: string;
664
- org_id?: string | undefined;
665
830
  parent?: Record<string, any> | undefined;
831
+ source?: "web" | "api" | undefined;
832
+ visibility?: "public" | "private" | "organization" | "monetized" | "inherit" | undefined;
833
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
834
+ state?: "success" | "error" | "queued" | "in-progress" | "timed-out" | undefined;
835
+ name?: string | undefined;
836
+ org_id?: string | undefined;
837
+ team_id?: string | undefined;
838
+ description?: {
839
+ json: Record<string, any>;
840
+ text: string;
841
+ } | null | undefined;
842
+ parent_id?: string | null | undefined;
843
+ license_id?: string | undefined;
844
+ license?: Record<string, any> | undefined;
845
+ name_url_slug?: string | null | undefined;
846
+ price?: number | null | undefined;
847
+ unit_cost?: number | null | undefined;
848
+ cost_accounting?: "fixed" | "variable" | null | undefined;
849
+ cost_unit?: string | null | undefined;
850
+ price_currency?: "usd" | "btc" | undefined;
851
+ stripe_product_id?: string | null | undefined;
852
+ stripe_price_id?: string | null | undefined;
853
+ stripe_meter_id?: string | null | undefined;
666
854
  metadata?: {
667
855
  table_name: string;
668
856
  schema: "datasets";
669
857
  columns: string[];
858
+ asset_refs?: Record<string, {
859
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
860
+ }> | null | undefined;
670
861
  doi_url?: string | null | undefined;
671
862
  external_url?: string | null | undefined;
672
863
  paper_url?: string | null | undefined;
@@ -682,16 +873,22 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
682
873
  id?: string | undefined;
683
874
  bucket?: "public-files" | "files" | undefined;
684
875
  } | undefined;
876
+ preview?: Record<string, any>[] | undefined;
877
+ }, {
878
+ asset_type: "dataset";
879
+ last_updated: string;
880
+ parent?: Record<string, any> | undefined;
881
+ source?: "web" | "api" | undefined;
882
+ visibility?: "public" | "private" | "organization" | "monetized" | "inherit" | undefined;
883
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
884
+ state?: "success" | "error" | "queued" | "in-progress" | "timed-out" | undefined;
685
885
  name?: string | undefined;
886
+ org_id?: string | undefined;
686
887
  team_id?: string | undefined;
687
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
688
888
  description?: {
689
889
  json: Record<string, any>;
690
890
  text: string;
691
891
  } | null | undefined;
692
- source?: "api" | "web" | undefined;
693
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
694
- state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
695
892
  parent_id?: string | null | undefined;
696
893
  license_id?: string | undefined;
697
894
  license?: Record<string, any> | undefined;
@@ -704,16 +901,13 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
704
901
  stripe_product_id?: string | null | undefined;
705
902
  stripe_price_id?: string | null | undefined;
706
903
  stripe_meter_id?: string | null | undefined;
707
- preview?: Record<string, any>[] | undefined;
708
- }, {
709
- asset_type: "dataset";
710
- last_updated: string;
711
- org_id?: string | undefined;
712
- parent?: Record<string, any> | undefined;
713
904
  metadata?: {
714
905
  table_name: string;
715
906
  schema: "datasets";
716
907
  columns: string[];
908
+ asset_refs?: Record<string, {
909
+ asset_type?: "organization" | "file" | "user" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
910
+ }> | null | undefined;
717
911
  doi_url?: string | null | undefined;
718
912
  external_url?: string | null | undefined;
719
913
  paper_url?: string | null | undefined;
@@ -729,28 +923,6 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
729
923
  id?: string | undefined;
730
924
  bucket?: "public-files" | "files" | undefined;
731
925
  } | undefined;
732
- name?: string | undefined;
733
- team_id?: string | undefined;
734
- visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
735
- description?: {
736
- json: Record<string, any>;
737
- text: string;
738
- } | null | undefined;
739
- source?: "api" | "web" | undefined;
740
- monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
741
- state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
742
- parent_id?: string | null | undefined;
743
- license_id?: string | undefined;
744
- license?: Record<string, any> | undefined;
745
- name_url_slug?: string | null | undefined;
746
- price?: number | null | undefined;
747
- unit_cost?: number | null | undefined;
748
- cost_accounting?: "fixed" | "variable" | null | undefined;
749
- cost_unit?: string | null | undefined;
750
- price_currency?: "usd" | "btc" | undefined;
751
- stripe_product_id?: string | null | undefined;
752
- stripe_price_id?: string | null | undefined;
753
- stripe_meter_id?: string | null | undefined;
754
926
  preview?: Record<string, any>[] | undefined;
755
927
  }>>;
756
928
 
@@ -758,5 +930,9 @@ type Dataset = z.infer<typeof DatasetSchema>;
758
930
  type CreateFromFileDataset = z.infer<typeof CreateDatasetFromFileSchema>;
759
931
  type CreateFromSchemaDataset = z.infer<typeof CreateDatasetFromSchemaSchema>;
760
932
  type UpdateDataset = z.infer<typeof updateDatasetSchema>;
933
+ type DatasetAssetRefs = z.infer<typeof DatasetAssetRefsSchema>;
934
+ type EnrichedDatasetSchemaField = z.infer<typeof EnrichedDatasetSchemaFieldSchema>;
935
+ type ResolvedAssetRef = z.infer<typeof ResolvedAssetRefSchema>;
936
+ type ResolvedAssetRefs = z.infer<typeof ResolvedAssetRefsSchema>;
761
937
 
762
- export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, type CreateFromFileDataset, type CreateFromSchemaDataset, type Dataset, DatasetSchema, type UpdateDataset, updateDatasetSchema };
938
+ export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, type CreateFromFileDataset, type CreateFromSchemaDataset, type Dataset, type DatasetAssetRefs, DatasetAssetRefsSchema, DatasetSchema, type EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, type ResolvedAssetRef, ResolvedAssetRefSchema, type ResolvedAssetRefs, ResolvedAssetRefsSchema, type UpdateDataset, updateDatasetSchema };