@ourofoundation/ouro-js 3.5.1 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{chunk-XQQVHVWP.js → chunk-35CJDNHH.js} +2 -2
  2. package/dist/{chunk-XQQVHVWP.js.map → chunk-35CJDNHH.js.map} +1 -1
  3. package/dist/{chunk-6XQFD2Z2.cjs → chunk-6GPIZJ4T.cjs} +2 -2
  4. package/dist/chunk-6GPIZJ4T.cjs.map +1 -0
  5. package/dist/{chunk-HN7Y7VMJ.cjs → chunk-6ZJQTECB.cjs} +2 -2
  6. package/dist/{chunk-HN7Y7VMJ.cjs.map → chunk-6ZJQTECB.cjs.map} +1 -1
  7. package/dist/chunk-73DHYPGU.cjs +2 -0
  8. package/dist/chunk-73DHYPGU.cjs.map +1 -0
  9. package/dist/{chunk-6FG474SV.cjs → chunk-BWAEBQKV.cjs} +2 -2
  10. package/dist/chunk-BWAEBQKV.cjs.map +1 -0
  11. package/dist/{chunk-DC6TYS3A.cjs → chunk-F5CWCYOP.cjs} +2 -2
  12. package/dist/chunk-F5CWCYOP.cjs.map +1 -0
  13. package/dist/{chunk-NJQ5YWYJ.cjs → chunk-HIXNQKVP.cjs} +2 -2
  14. package/dist/{chunk-NJQ5YWYJ.cjs.map → chunk-HIXNQKVP.cjs.map} +1 -1
  15. package/dist/{chunk-OS542EYD.js → chunk-IWOXGKK4.js} +2 -2
  16. package/dist/chunk-IWOXGKK4.js.map +1 -0
  17. package/dist/chunk-KCVE35IO.js +2 -0
  18. package/dist/chunk-KCVE35IO.js.map +1 -0
  19. package/dist/chunk-MLTO7TMM.js +2 -0
  20. package/dist/chunk-MLTO7TMM.js.map +1 -0
  21. package/dist/{chunk-EK5P7FST.js → chunk-R2W4NEEJ.js} +2 -2
  22. package/dist/chunk-R2W4NEEJ.js.map +1 -0
  23. package/dist/{chunk-M2JJPDBW.js → chunk-TYOQ32UV.js} +2 -2
  24. package/dist/{chunk-M2JJPDBW.js.map → chunk-TYOQ32UV.js.map} +1 -1
  25. package/dist/chunk-V73EW77Y.cjs +2 -0
  26. package/dist/chunk-V73EW77Y.cjs.map +1 -0
  27. package/dist/chunk-XLJBQ7BU.js +2 -0
  28. package/dist/chunk-XLJBQ7BU.js.map +1 -0
  29. package/dist/index.cjs +1 -1
  30. package/dist/index.d.cts +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/schema/conversations.cjs +1 -1
  34. package/dist/schema/conversations.js +1 -1
  35. package/dist/schema/datasets.cjs +1 -1
  36. package/dist/schema/datasets.d.cts +49 -3
  37. package/dist/schema/datasets.d.ts +49 -3
  38. package/dist/schema/datasets.js +1 -1
  39. package/dist/schema/files.cjs +1 -1
  40. package/dist/schema/files.d.cts +0 -3
  41. package/dist/schema/files.d.ts +0 -3
  42. package/dist/schema/files.js +1 -1
  43. package/dist/schema/posts.cjs +1 -1
  44. package/dist/schema/posts.d.cts +0 -3
  45. package/dist/schema/posts.d.ts +0 -3
  46. package/dist/schema/posts.js +1 -1
  47. package/dist/schema/quests.cjs +1 -1
  48. package/dist/schema/quests.d.cts +0 -3
  49. package/dist/schema/quests.d.ts +0 -3
  50. package/dist/schema/quests.js +1 -1
  51. package/dist/schema/services.cjs +1 -1
  52. package/dist/schema/services.d.cts +0 -3
  53. package/dist/schema/services.d.ts +0 -3
  54. package/dist/schema/services.js +1 -1
  55. package/dist/utils/quest-submission.cjs +1 -1
  56. package/dist/utils/quest-submission.js +1 -1
  57. package/package.json +1 -1
  58. package/dist/chunk-3UWDQLTN.js +0 -2
  59. package/dist/chunk-3UWDQLTN.js.map +0 -1
  60. package/dist/chunk-6FG474SV.cjs.map +0 -1
  61. package/dist/chunk-6XQFD2Z2.cjs.map +0 -1
  62. package/dist/chunk-DC6TYS3A.cjs.map +0 -1
  63. package/dist/chunk-EK5P7FST.js.map +0 -1
  64. package/dist/chunk-OBWPO2QT.cjs +0 -2
  65. package/dist/chunk-OBWPO2QT.cjs.map +0 -1
  66. package/dist/chunk-OFDJA6ZW.cjs +0 -2
  67. package/dist/chunk-OFDJA6ZW.cjs.map +0 -1
  68. package/dist/chunk-OS542EYD.js.map +0 -1
  69. package/dist/chunk-VJJLRHOX.js +0 -2
  70. package/dist/chunk-VJJLRHOX.js.map +0 -1
  71. package/dist/chunk-W5UCZ73B.js +0 -2
  72. package/dist/chunk-W5UCZ73B.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/quest-submission.ts"],"names":["isPlainObject","value","normalizeFileExtension","safe","normalizeFileExtensions","rawValues","entry","KeyedAssetRefsSchema","record","string","object","uuid","AssetTypeSchema","KeyedAssetInputValueSchema","union","optional","KeyedAssetInputSchema","QuestSubmissionAssetDeclarationSchema","RouteInputAssetDeclarationSchema","boolean","readDeclarationExtensions","declaration","readDeclarationFilter","getRouteInputDeclarationsFromRoute","route","_a","detail","inputs","entries","declarationToSubmissionDeclaration","extensions","filter","materializeContributorSubmissionAssets","routeInputs","pinnedKeys","pinned","out","key","getPrimaryDeclarationKey","declarations","primary","d","getSubmissionAssetShape","item","_b","materialized","declarationToPickerFilters","assetType","filters","fileType","assetMatchesDeclaration","asset","_c","_d","_e","_f","metadata","ext","type","expected","getPrimaryAssetRef","refs","ref","toRouteInputAssets"],"mappings":"2IAeA,SAASA,EAAcC,CAAkD,CAAA,CACvE,OAAO,CAAQA,CAAAA,CAAAA,EAAU,OAAOA,CAAU,EAAA,QAAA,EAAY,CAAC,KAAM,CAAA,OAAA,CAAQA,CAAK,CAC5E,CAEA,SAASC,CAAuBD,CAAAA,CAAAA,CAAiD,CAC/E,GAAI,CAACA,EAAO,OAAO,IAAA,CAEnB,IAAME,CADaF,CAAAA,CAAAA,CAAM,QAAQ,MAAQ,CAAA,EAAE,EAAE,IAAK,EAAA,CAAE,aAC5B,CAAA,OAAA,CAAQ,aAAc,EAAE,CAAA,CAChD,OAAI,CAACE,CAAAA,EAAQ,QAAQ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,CAAAA,CACE,CAAE,GAAAzB,CAAAA,CAAAA,CAAK,SAAUyB,CAAI,CAAA,QAAA,CAAU,WAAYA,CAAI,CAAA,UAAW,EADhD,IAEnB,CAEO,SAASC,CACdF,CAAAA,CAAAA,CACwD,CACxD,OAAKA,CAAAA,CACE,OAAO,WACZ,CAAA,MAAA,CAAO,QAAQA,CAAI,CAAA,CAAE,IAAI,CAAC,CAACxB,EAAKyB,CAAG,CAAA,GAAM,CACvCzB,CACA,CAAA,CAAE,QAASyB,CAAI,CAAA,QAAA,CAAU,UAAWA,CAAI,CAAA,UAAW,CACrD,CAAC,CACH,CANkB,CAAA,EAOpB","file":"chunk-M2JJPDBW.js","sourcesContent":["import {\n object,\n string,\n record,\n optional,\n boolean,\n array,\n uuid,\n union,\n type z,\n} from \"zod\";\n\nimport { AssetTypeSchema } from \"../schema/common\";\nimport { RouteInputAssetDeclarationSchema } from \"../schema/services\";\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeFileExtension(value: string | null | undefined): string | null {\n if (!value) return null;\n const normalized = value.replace(/^\\.+/, \"\").trim().toLowerCase();\n const safe = normalized.replace(/[^a-z0-9]/g, \"\");\n if (!safe || /^\\d+$/.test(safe) || safe.length > 12) return null;\n return safe;\n}\n\nfunction normalizeFileExtensions(\n value: string | string[] | null | undefined\n): string[] {\n const rawValues = Array.isArray(value)\n ? value\n : typeof value === \"string\"\n ? value.split(/[\\s,]+/)\n : [];\n return Array.from(\n new Set(\n rawValues\n .map((entry) => normalizeFileExtension(entry))\n .filter((entry): entry is string => Boolean(entry))\n )\n );\n}\n\n/** Stored on entries and eval_static_inputs after server normalization. */\nexport const KeyedAssetRefsSchema = record(\n string(),\n object({\n asset_id: uuid(),\n asset_type: AssetTypeSchema,\n })\n);\n\n/** Accepted on POST /quests/:id/entries/create — server fills asset_type. */\nexport const KeyedAssetInputValueSchema = union([\n uuid(),\n object({\n asset_id: uuid(),\n asset_type: optional(AssetTypeSchema),\n }),\n]);\n\nexport const KeyedAssetInputSchema = record(\n string(),\n KeyedAssetInputValueSchema\n);\n\nexport const QuestSubmissionAssetDeclarationSchema =\n RouteInputAssetDeclarationSchema.extend({\n required: optional(boolean()).default(true),\n });\n\nexport type KeyedAssetRefs = z.infer<typeof KeyedAssetRefsSchema>;\nexport type KeyedAssetInput = z.infer<typeof KeyedAssetInputSchema>;\nexport type QuestSubmissionAssetDeclaration = z.infer<\n typeof QuestSubmissionAssetDeclarationSchema\n>;\n\nexport type AssetDeclarationPickerFilters = {\n assetType?: string;\n fileType?: string;\n extensions?: string[];\n hasConstraints: boolean;\n};\n\nexport type QuestSubmissionItemInput = {\n eval_route_id?: string | null;\n submission_assets?: Record<string, QuestSubmissionAssetDeclaration> | null;\n eval_static_inputs?: KeyedAssetRefs | null;\n expected_asset_type?: string | null;\n};\n\nexport type RouteInputDeclarationLike = {\n asset_type?: string | null;\n primary?: boolean;\n input_filter?: string | null;\n filter?: string | null;\n file_extensions?: string[] | null;\n input_file_extensions?: string[] | null;\n};\n\nexport type RouteForSubmissionShape = {\n route?: {\n input_assets?: Record<string, RouteInputDeclarationLike> | null;\n input_type?: string | null;\n input_filter?: string | null;\n input_file_extensions?: string[] | null;\n } | null;\n} | null;\n\nfunction readDeclarationExtensions(\n declaration: RouteInputDeclarationLike\n): string[] {\n return normalizeFileExtensions([\n ...(Array.isArray(declaration.file_extensions)\n ? declaration.file_extensions\n : []),\n ...(Array.isArray(declaration.input_file_extensions)\n ? declaration.input_file_extensions\n : []),\n ].join(\",\"));\n}\n\nfunction readDeclarationFilter(\n declaration: RouteInputDeclarationLike\n): string | undefined {\n return declaration.input_filter || declaration.filter || undefined;\n}\n\n/** Route keyed inputs as a flat map (includes legacy input_type fallback). */\nexport function getRouteInputDeclarationsFromRoute(\n route: RouteForSubmissionShape\n): Record<string, RouteInputDeclarationLike> {\n const detail = route?.route;\n if (!detail) return {};\n\n const inputs = detail.input_assets;\n if (isPlainObject(inputs)) {\n const entries = Object.entries(inputs).filter(([, value]) =>\n isPlainObject(value)\n ) as [string, RouteInputDeclarationLike][];\n if (entries.length > 0) {\n return Object.fromEntries(entries);\n }\n }\n\n if (detail.input_type) {\n return {\n [detail.input_type]: {\n asset_type: detail.input_type,\n primary: true,\n input_filter: detail.input_filter,\n input_file_extensions: detail.input_file_extensions ?? null,\n },\n };\n }\n\n return {};\n}\n\nexport function declarationToSubmissionDeclaration(\n declaration: RouteInputDeclarationLike\n): QuestSubmissionAssetDeclaration {\n const extensions = readDeclarationExtensions(declaration);\n const filter = readDeclarationFilter(declaration);\n return {\n asset_type: declaration.asset_type as QuestSubmissionAssetDeclaration[\"asset_type\"],\n primary: declaration.primary,\n input_filter: (filter ?? null) as QuestSubmissionAssetDeclaration[\"input_filter\"],\n file_extensions: extensions.length > 0 ? extensions : null,\n required: true,\n };\n}\n\n/** Materialize contributor declarations from route inputs minus pinned keys. */\nexport function materializeContributorSubmissionAssets(\n routeInputs: Record<string, RouteInputDeclarationLike>,\n pinnedKeys: string[]\n): Record<string, QuestSubmissionAssetDeclaration> {\n const pinned = new Set(pinnedKeys);\n const out: Record<string, QuestSubmissionAssetDeclaration> = {};\n for (const [key, declaration] of Object.entries(routeInputs)) {\n if (pinned.has(key)) continue;\n out[key] = declarationToSubmissionDeclaration(declaration);\n }\n return out;\n}\n\nexport function getPrimaryDeclarationKey(\n declarations: Record<string, QuestSubmissionAssetDeclaration>\n): string | null {\n const entries = Object.entries(declarations);\n if (!entries.length) return null;\n const primary = entries.find(([, d]) => d.primary === true);\n if (primary) return primary[0];\n if (entries.length === 1) return entries[0][0];\n return entries[0][0];\n}\n\nexport function getSubmissionAssetShape(\n item: QuestSubmissionItemInput,\n route?: RouteForSubmissionShape | null\n): {\n contributorKeys: string[];\n declarations: Record<string, QuestSubmissionAssetDeclaration>;\n pinned: KeyedAssetRefs;\n} {\n const pinned: KeyedAssetRefs = item.eval_static_inputs ?? {};\n\n if (item.eval_route_id && route) {\n const routeInputs = getRouteInputDeclarationsFromRoute(route);\n const pinnedKeys = Object.keys(pinned);\n const materialized =\n item.submission_assets &&\n Object.keys(item.submission_assets).length > 0\n ? item.submission_assets\n : materializeContributorSubmissionAssets(routeInputs, pinnedKeys);\n const contributorKeys = Object.keys(materialized);\n return {\n contributorKeys,\n declarations: materialized,\n pinned,\n };\n }\n\n const declarations = item.submission_assets ?? {};\n return {\n contributorKeys: Object.keys(declarations),\n declarations,\n pinned,\n };\n}\n\nexport function declarationToPickerFilters(\n declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined\n): AssetDeclarationPickerFilters | null {\n if (!declaration) return null;\n const assetType = declaration.asset_type || undefined;\n if (!assetType) return null;\n\n const filters: AssetDeclarationPickerFilters = {\n assetType,\n hasConstraints: false,\n };\n\n if (assetType === \"file\") {\n const extensions = readDeclarationExtensions(declaration);\n if (extensions.length > 0) {\n filters.extensions = extensions;\n filters.hasConstraints = true;\n }\n const fileType = readDeclarationFilter(declaration);\n if (fileType) {\n filters.fileType = fileType;\n filters.hasConstraints = true;\n }\n }\n\n return filters;\n}\n\nexport function assetMatchesDeclaration(\n asset:\n | {\n assetType?: string | null;\n asset_type?: string | null;\n asset?: { metadata?: Record<string, unknown> } | null;\n }\n | null\n | undefined,\n declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined\n): boolean {\n if (!declaration || !asset) return true;\n const filters = declarationToPickerFilters(declaration);\n if (!filters) return true;\n\n const assetType = asset.assetType ?? asset.asset_type;\n if (filters.assetType && assetType !== filters.assetType) return false;\n\n if (filters.assetType === \"file\") {\n const metadata = asset.asset?.metadata ?? {};\n if (filters.extensions && filters.extensions.length > 0) {\n const ext = String(metadata.extension ?? \"\").toLowerCase();\n if (!ext || !filters.extensions.includes(ext)) return false;\n }\n if (filters.fileType) {\n const type = String(metadata.file_type ?? metadata.type ?? \"\")\n .toLowerCase()\n .split(\"/\")[0];\n const expected = filters.fileType.toLowerCase();\n if (type && expected && !type.includes(expected) && type !== expected) {\n return false;\n }\n }\n }\n\n return true;\n}\n\nexport function getPrimaryAssetRef(\n refs: KeyedAssetRefs | null | undefined,\n declarations?: Record<string, QuestSubmissionAssetDeclaration> | null\n): { key: string; asset_id: string; asset_type: string } | null {\n if (!refs || !Object.keys(refs).length) return null;\n const key =\n (declarations && getPrimaryDeclarationKey(declarations)) ||\n Object.keys(refs)[0];\n const ref = refs[key];\n if (!ref) return null;\n return { key, asset_id: ref.asset_id, asset_type: ref.asset_type };\n}\n\nexport function toRouteInputAssets(\n refs: KeyedAssetRefs | null | undefined\n): Record<string, { assetId: string; assetType: string }> {\n if (!refs) return {};\n return Object.fromEntries(\n Object.entries(refs).map(([key, ref]) => [\n key,\n { assetId: ref.asset_id, assetType: ref.asset_type },\n ])\n );\n}\n\n/** @deprecated Use declarationToPickerFilters */\nexport type EvalSubmissionFilters = AssetDeclarationPickerFilters;\n"]}
1
+ {"version":3,"sources":["../src/utils/quest-submission.ts"],"names":["isPlainObject","value","normalizeFileExtension","safe","normalizeFileExtensions","rawValues","entry","KeyedAssetRefsSchema","record","string","object","uuid","AssetTypeSchema","KeyedAssetInputValueSchema","union","optional","KeyedAssetInputSchema","QuestSubmissionAssetDeclarationSchema","RouteInputAssetDeclarationSchema","boolean","readDeclarationExtensions","declaration","readDeclarationFilter","getRouteInputDeclarationsFromRoute","route","_a","detail","inputs","entries","declarationToSubmissionDeclaration","extensions","filter","materializeContributorSubmissionAssets","routeInputs","pinnedKeys","pinned","out","key","getPrimaryDeclarationKey","declarations","primary","d","getSubmissionAssetShape","item","_b","materialized","declarationToPickerFilters","assetType","filters","fileType","assetMatchesDeclaration","asset","_c","_d","_e","_f","metadata","ext","type","expected","getPrimaryAssetRef","refs","ref","toRouteInputAssets"],"mappings":"2IAeA,SAASA,EAAcC,CAAkD,CAAA,CACvE,OAAO,CAAQA,CAAAA,CAAAA,EAAU,OAAOA,CAAU,EAAA,QAAA,EAAY,CAAC,KAAM,CAAA,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,CAAAA,CAAAA,CAC8D,CAC9D,GAAI,CAACsB,GAAQ,CAAC,MAAA,CAAO,KAAKA,CAAI,CAAA,CAAE,OAAQ,OAAO,IAAA,CAC/C,IAAMxB,CACHE,CAAAA,CAAAA,EAAgBD,EAAyBC,CAAY,CAAA,EACtD,OAAO,IAAKsB,CAAAA,CAAI,EAAE,CAAC,CAAA,CACfC,EAAMD,CAAKxB,CAAAA,CAAG,EACpB,OAAKyB,CAAAA,CACE,CAAE,GAAAzB,CAAAA,CAAAA,CAAK,SAAUyB,CAAI,CAAA,QAAA,CAAU,WAAYA,CAAI,CAAA,UAAW,EADhD,IAEnB,CAEO,SAASC,CACdF,CAAAA,CAAAA,CACwD,CACxD,OAAKA,CAAAA,CACE,OAAO,WACZ,CAAA,MAAA,CAAO,QAAQA,CAAI,CAAA,CAAE,IAAI,CAAC,CAACxB,EAAKyB,CAAG,CAAA,GAAM,CACvCzB,CACA,CAAA,CAAE,QAASyB,CAAI,CAAA,QAAA,CAAU,UAAWA,CAAI,CAAA,UAAW,CACrD,CAAC,CACH,CANkB,CAAA,EAOpB","file":"chunk-TYOQ32UV.js","sourcesContent":["import {\n object,\n string,\n record,\n optional,\n boolean,\n array,\n uuid,\n union,\n type z,\n} from \"zod\";\n\nimport { AssetTypeSchema } from \"../schema/common\";\nimport { RouteInputAssetDeclarationSchema } from \"../schema/services\";\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeFileExtension(value: string | null | undefined): string | null {\n if (!value) return null;\n const normalized = value.replace(/^\\.+/, \"\").trim().toLowerCase();\n const safe = normalized.replace(/[^a-z0-9]/g, \"\");\n if (!safe || /^\\d+$/.test(safe) || safe.length > 12) return null;\n return safe;\n}\n\nfunction normalizeFileExtensions(\n value: string | string[] | null | undefined\n): string[] {\n const rawValues = Array.isArray(value)\n ? value\n : typeof value === \"string\"\n ? value.split(/[\\s,]+/)\n : [];\n return Array.from(\n new Set(\n rawValues\n .map((entry) => normalizeFileExtension(entry))\n .filter((entry): entry is string => Boolean(entry))\n )\n );\n}\n\n/** Stored on entries and eval_static_inputs after server normalization. */\nexport const KeyedAssetRefsSchema = record(\n string(),\n object({\n asset_id: uuid(),\n asset_type: AssetTypeSchema,\n })\n);\n\n/** Accepted on POST /quests/:id/entries/create — server fills asset_type. */\nexport const KeyedAssetInputValueSchema = union([\n uuid(),\n object({\n asset_id: uuid(),\n asset_type: optional(AssetTypeSchema),\n }),\n]);\n\nexport const KeyedAssetInputSchema = record(\n string(),\n KeyedAssetInputValueSchema\n);\n\nexport const QuestSubmissionAssetDeclarationSchema =\n RouteInputAssetDeclarationSchema.extend({\n required: optional(boolean()).default(true),\n });\n\nexport type KeyedAssetRefs = z.infer<typeof KeyedAssetRefsSchema>;\nexport type KeyedAssetInput = z.infer<typeof KeyedAssetInputSchema>;\nexport type QuestSubmissionAssetDeclaration = z.infer<\n typeof QuestSubmissionAssetDeclarationSchema\n>;\n\nexport type AssetDeclarationPickerFilters = {\n assetType?: string;\n fileType?: string;\n extensions?: string[];\n hasConstraints: boolean;\n};\n\nexport type QuestSubmissionItemInput = {\n eval_route_id?: string | null;\n submission_assets?: Record<string, QuestSubmissionAssetDeclaration> | null;\n eval_static_inputs?: KeyedAssetRefs | null;\n expected_asset_type?: string | null;\n};\n\nexport type RouteInputDeclarationLike = {\n asset_type?: string | null;\n primary?: boolean;\n input_filter?: string | null;\n filter?: string | null;\n file_extensions?: string[] | null;\n input_file_extensions?: string[] | null;\n};\n\nexport type RouteForSubmissionShape = {\n route?: {\n input_assets?: Record<string, RouteInputDeclarationLike> | null;\n input_type?: string | null;\n input_filter?: string | null;\n input_file_extensions?: string[] | null;\n } | null;\n} | null;\n\nfunction readDeclarationExtensions(\n declaration: RouteInputDeclarationLike\n): string[] {\n return normalizeFileExtensions([\n ...(Array.isArray(declaration.file_extensions)\n ? declaration.file_extensions\n : []),\n ...(Array.isArray(declaration.input_file_extensions)\n ? declaration.input_file_extensions\n : []),\n ].join(\",\"));\n}\n\nfunction readDeclarationFilter(\n declaration: RouteInputDeclarationLike\n): string | undefined {\n return declaration.input_filter || declaration.filter || undefined;\n}\n\n/** Route keyed inputs as a flat map (includes legacy input_type fallback). */\nexport function getRouteInputDeclarationsFromRoute(\n route: RouteForSubmissionShape\n): Record<string, RouteInputDeclarationLike> {\n const detail = route?.route;\n if (!detail) return {};\n\n const inputs = detail.input_assets;\n if (isPlainObject(inputs)) {\n const entries = Object.entries(inputs).filter(([, value]) =>\n isPlainObject(value)\n ) as [string, RouteInputDeclarationLike][];\n if (entries.length > 0) {\n return Object.fromEntries(entries);\n }\n }\n\n if (detail.input_type) {\n return {\n [detail.input_type]: {\n asset_type: detail.input_type,\n primary: true,\n input_filter: detail.input_filter,\n input_file_extensions: detail.input_file_extensions ?? null,\n },\n };\n }\n\n return {};\n}\n\nexport function declarationToSubmissionDeclaration(\n declaration: RouteInputDeclarationLike\n): QuestSubmissionAssetDeclaration {\n const extensions = readDeclarationExtensions(declaration);\n const filter = readDeclarationFilter(declaration);\n return {\n asset_type: declaration.asset_type as QuestSubmissionAssetDeclaration[\"asset_type\"],\n primary: declaration.primary,\n input_filter: (filter ?? null) as QuestSubmissionAssetDeclaration[\"input_filter\"],\n file_extensions: extensions.length > 0 ? extensions : null,\n required: true,\n };\n}\n\n/** Materialize contributor declarations from route inputs minus pinned keys. */\nexport function materializeContributorSubmissionAssets(\n routeInputs: Record<string, RouteInputDeclarationLike>,\n pinnedKeys: string[]\n): Record<string, QuestSubmissionAssetDeclaration> {\n const pinned = new Set(pinnedKeys);\n const out: Record<string, QuestSubmissionAssetDeclaration> = {};\n for (const [key, declaration] of Object.entries(routeInputs)) {\n if (pinned.has(key)) continue;\n out[key] = declarationToSubmissionDeclaration(declaration);\n }\n return out;\n}\n\nexport function getPrimaryDeclarationKey(\n declarations: Record<string, QuestSubmissionAssetDeclaration>\n): string | null {\n const entries = Object.entries(declarations);\n if (!entries.length) return null;\n const primary = entries.find(([, d]) => d.primary === true);\n if (primary) return primary[0];\n if (entries.length === 1) return entries[0][0];\n return entries[0][0];\n}\n\nexport function getSubmissionAssetShape(\n item: QuestSubmissionItemInput,\n route?: RouteForSubmissionShape | null\n): {\n contributorKeys: string[];\n declarations: Record<string, QuestSubmissionAssetDeclaration>;\n pinned: KeyedAssetRefs;\n} {\n const pinned: KeyedAssetRefs = item.eval_static_inputs ?? {};\n\n if (item.eval_route_id && route) {\n const routeInputs = getRouteInputDeclarationsFromRoute(route);\n const pinnedKeys = Object.keys(pinned);\n const materialized =\n item.submission_assets &&\n Object.keys(item.submission_assets).length > 0\n ? item.submission_assets\n : materializeContributorSubmissionAssets(routeInputs, pinnedKeys);\n const contributorKeys = Object.keys(materialized);\n return {\n contributorKeys,\n declarations: materialized,\n pinned,\n };\n }\n\n const declarations = item.submission_assets ?? {};\n return {\n contributorKeys: Object.keys(declarations),\n declarations,\n pinned,\n };\n}\n\nexport function declarationToPickerFilters(\n declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined\n): AssetDeclarationPickerFilters | null {\n if (!declaration) return null;\n const assetType = declaration.asset_type || undefined;\n if (!assetType) return null;\n\n const filters: AssetDeclarationPickerFilters = {\n assetType,\n hasConstraints: false,\n };\n\n if (assetType === \"file\") {\n const extensions = readDeclarationExtensions(declaration);\n if (extensions.length > 0) {\n filters.extensions = extensions;\n filters.hasConstraints = true;\n }\n const fileType = readDeclarationFilter(declaration);\n if (fileType) {\n filters.fileType = fileType;\n filters.hasConstraints = true;\n }\n }\n\n return filters;\n}\n\nexport function assetMatchesDeclaration(\n asset:\n | {\n assetType?: string | null;\n asset_type?: string | null;\n asset?: { metadata?: Record<string, unknown> } | null;\n }\n | null\n | undefined,\n declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined\n): boolean {\n if (!declaration || !asset) return true;\n const filters = declarationToPickerFilters(declaration);\n if (!filters) return true;\n\n const assetType = asset.assetType ?? asset.asset_type;\n if (filters.assetType && assetType !== filters.assetType) return false;\n\n if (filters.assetType === \"file\") {\n const metadata = asset.asset?.metadata ?? {};\n if (filters.extensions && filters.extensions.length > 0) {\n const ext = String(metadata.extension ?? \"\").toLowerCase();\n if (!ext || !filters.extensions.includes(ext)) return false;\n }\n if (filters.fileType) {\n const type = String(metadata.file_type ?? metadata.type ?? \"\")\n .toLowerCase()\n .split(\"/\")[0];\n const expected = filters.fileType.toLowerCase();\n if (type && expected && !type.includes(expected) && type !== expected) {\n return false;\n }\n }\n }\n\n return true;\n}\n\nexport function getPrimaryAssetRef(\n refs: KeyedAssetRefs | null | undefined,\n declarations?: Record<string, QuestSubmissionAssetDeclaration> | null\n): { key: string; asset_id: string; asset_type: string } | null {\n if (!refs || !Object.keys(refs).length) return null;\n const key =\n (declarations && getPrimaryDeclarationKey(declarations)) ||\n Object.keys(refs)[0];\n const ref = refs[key];\n if (!ref) return null;\n return { key, asset_id: ref.asset_id, asset_type: ref.asset_type };\n}\n\nexport function toRouteInputAssets(\n refs: KeyedAssetRefs | null | undefined\n): Record<string, { assetId: string; assetType: string }> {\n if (!refs) return {};\n return Object.fromEntries(\n Object.entries(refs).map(([key, ref]) => [\n key,\n { assetId: ref.asset_id, assetType: ref.asset_type },\n ])\n );\n}\n\n/** @deprecated Use declarationToPickerFilters */\nexport type EvalSubmissionFilters = AssetDeclarationPickerFilters;\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkROMY5WNQ_cjs=require('./chunk-ROMY5WNQ.cjs'),chunk43KB23BA_cjs=require('./chunk-43KB23BA.cjs'),zod=require('zod');var v=zod.enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),z=zod.object({authentication:v,base_url:zod.string(),version:zod.optional(zod.nullable(zod.string())),spec_path:zod.optional(zod.nullable(zod.string())),spec_url:zod.optional(zod.nullable(zod.string())),auth_url:zod.optional(zod.nullable(zod.string()))}),A=z.extend(chunkROMY5WNQ_cjs.b.partial().shape),D=chunkROMY5WNQ_cjs.c.extend({asset_type:chunk43KB23BA_cjs.a.refine(n=>n==="service"),metadata:A}),C=chunkROMY5WNQ_cjs.d.extend({asset_type:chunk43KB23BA_cjs.a.refine(n=>n==="service"),metadata:A}).transform(n=>chunkROMY5WNQ_cjs.a(n)),w=D.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true,is_pinned_in_team:true}).extend({last_updated:zod.string().default(()=>new Date().toISOString())}).transform(n=>chunkROMY5WNQ_cjs.a(n)),x=zod.enum(["sync","async"]),d=zod.enum(["file","dataset","post"]),R=zod.enum(["audio","video","image","pdf","3d model","atomic structure"]),T=zod.object({asset_type:d,primary:zod.optional(zod.boolean()),input_filter:zod.optional(zod.nullable(R)),file_extensions:zod.optional(zod.nullable(zod.array(zod.string()))),contains_file_extensions:zod.optional(zod.nullable(zod.array(zod.string())))}).catchall(zod.any()),O=zod.object({asset_type:d,primary:zod.optional(zod.boolean()),file_extensions:zod.optional(zod.nullable(zod.array(zod.string()))),contains_file_extensions:zod.optional(zod.nullable(zod.array(zod.string())))}).catchall(zod.any()),b=zod.record(zod.string(),T),g=zod.record(zod.string(),O),M=zod.object({id:zod.string(),user_id:zod.string(),service_id:zod.string(),path:zod.string(),method:zod.enum(["GET","POST","PUT","PATCH","DELETE"]),summary:zod.optional(zod.nullable(zod.string())),parameters:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),request_body:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),responses:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),input_assets:zod.optional(zod.nullable(b)),input_type:zod.optional(zod.nullable(d)),input_filter:zod.optional(zod.nullable(R)),input_file_extension:zod.optional(zod.nullable(zod.string())),input_file_extensions:zod.optional(zod.nullable(zod.array(zod.string()))),output_assets:zod.optional(zod.nullable(g)),output_type:zod.optional(zod.nullable(d)),output_file_extension:zod.optional(zod.nullable(zod.string())),security:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),rate_limit:zod.optional(zod.nullable(zod.number())),execution_mode:zod.optional(x).default("sync"),observed_execution_mode:zod.optional(zod.nullable(x)),last_updated:zod.string()}),E=zod.object({avg_ack_ms:zod.optional(zod.nullable(zod.number())),p95_ack_ms:zod.optional(zod.nullable(zod.number())),avg_completion_ms:zod.optional(zod.nullable(zod.number())),p95_completion_ms:zod.optional(zod.nullable(zod.number())),latency_sample_count:zod.optional(zod.nullable(zod.number()))}),F=chunkROMY5WNQ_cjs.c.extend({asset_type:chunk43KB23BA_cjs.a.refine(n=>n==="route"),route:M,metrics:zod.optional(zod.nullable(E))}),U=zod.object({id:zod.uuid(),user_id:zod.uuid(),route_id:zod.uuid(),metadata:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),response:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),side_effects:zod.boolean().default(true),input_asset_id:zod.optional(zod.nullable(zod.uuid())),output_asset_id:zod.optional(zod.nullable(zod.uuid())),input_asset:zod.optional(zod.nullable(chunkROMY5WNQ_cjs.c)),input_assets:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),output_asset:zod.optional(zod.nullable(chunkROMY5WNQ_cjs.c)),output_assets:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),webhook_url:zod.optional(zod.nullable(zod.string())),webhook_token:zod.optional(zod.nullable(zod.string())),status:chunk43KB23BA_cjs.j,created_at:zod.string(),last_updated:zod.string(),started_at:zod.optional(zod.nullable(zod.string())),ack_at:zod.optional(zod.nullable(zod.string())),upstream_status_code:zod.optional(zod.nullable(zod.number())),finished_at:zod.optional(zod.nullable(zod.string()))});exports.a=D;exports.b=C;exports.c=w;exports.d=x;exports.e=T;exports.f=O;exports.g=b;exports.h=g;exports.i=E;exports.j=F;exports.k=U;//# sourceMappingURL=chunk-V73EW77Y.cjs.map
2
+ //# sourceMappingURL=chunk-V73EW77Y.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schema/services.ts"],"names":["AuthType","zodEnum","BaseServiceMetadataSchema","object","string","optional","nullable","ServiceMetadataSchema","AssetMetadataSchema","ServiceSchema","AssetSchema","AssetTypeSchema","x","CreateServiceSchema","CreateAssetSchema","value","normalizeAssetConfigForParsing","UpdateServiceSchema","ExecutionModeSchema","RouteAssetType","RouteInputFilter","RouteInputAssetDeclarationSchema","boolean","array","any","RouteOutputAssetDeclarationSchema","RouteInputAssetsSchema","record","RouteOutputAssetsSchema","RouteDetailSchema","number","RouteMetricsSchema","RouteSchema","ActionSchema","uuid","StatusSchema"],"mappings":"wIAuBA,IAAMA,EAAWC,QAAQ,CAAA,CAAC,uBAAyB,CAAA,MAAA,CAAQ,OAAQ,WAAW,CAAC,CAEzEC,CAAAA,CAAAA,CAA4BC,WAAO,CACvC,cAAA,CAAgBH,CAChB,CAAA,QAAA,CAAUI,YACV,CAAA,OAAA,CAASC,YAASC,CAAAA,YAAAA,CAASF,YAAQ,CAAC,CACpC,CAAA,SAAA,CAAWC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,EACtC,QAAUC,CAAAA,YAAAA,CAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CAAA,CACrC,QAAUC,CAAAA,YAAAA,CAASC,aAASF,UAAO,EAAC,CAAC,CACvC,CAAC,CAEKG,CAAAA,CAAAA,CAAwBL,CAA0B,CAAA,MAAA,CACtDM,oBAAoB,OAAQ,EAAA,CAAE,KAChC,CAAA,CAEMC,EAAgBC,mBAAY,CAAA,MAAA,CAAO,CACvC,UAAA,CAAYC,oBAAgB,MAAQC,CAAAA,CAAAA,EAAoBA,CAAd,GAAA,SAAe,EACzD,QAAUL,CAAAA,CACZ,CAAC,CAAA,CAEKM,EAAsBC,mBAAkB,CAAA,MAAA,CAAO,CACnD,UAAA,CAAYH,oBAAgB,MAAQC,CAAAA,CAAAA,EAAoBA,CAAd,GAAA,SAAe,EACzD,QAAUL,CAAAA,CACZ,CAAC,CAAA,CAAE,UAAWQ,CAAUC,EAAAA,mBAAAA,CAA+BD,CAA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,CAIvC,OAAQC,YAASC,CAAAA,YAAAA,CAASF,UAAO,EAAC,CAAC,CAEnC,CAAA,oBAAA,CAAsBC,YAASC,CAAAA,YAAAA,CAASwB,YAAQ,CAAC,CACjD,CAAA,WAAA,CAAazB,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CAC1C,CAAC","file":"chunk-V73EW77Y.cjs","sourcesContent":["import {\n object,\n string,\n uuid,\n number,\n array,\n type z,\n record,\n any,\n enum as zodEnum,\n optional,\n nullable,\n boolean\n} from \"zod\";\n\nimport { AssetTypeSchema, StatusSchema } from \"./common\";\nimport {\n AssetMetadataSchema,\n AssetSchema,\n CreateAssetSchema,\n normalizeAssetConfigForParsing,\n} from \"./assets\";\n\nconst AuthType = zodEnum([\"Personal Access Token\", \"Ouro\", \"None\", \"OAuth 2.0\"]);\n\nconst BaseServiceMetadataSchema = object({\n authentication: AuthType,\n base_url: string(),\n version: optional(nullable(string())),\n spec_path: optional(nullable(string())),\n spec_url: optional(nullable(string())),\n auth_url: optional(nullable(string())),\n});\n\nconst ServiceMetadataSchema = BaseServiceMetadataSchema.extend(\n AssetMetadataSchema.partial().shape\n);\n\nconst ServiceSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"service\" === x),\n metadata: ServiceMetadataSchema,\n});\n\nconst CreateServiceSchema = CreateAssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"service\" === x),\n metadata: ServiceMetadataSchema,\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nconst UpdateServiceSchema = ServiceSchema.partial()\n .omit({\n user_id: true,\n id: true,\n created_at: true,\n last_updated: true,\n organization: true,\n user: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n })\n .extend({\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\n\nconst ExecutionModeSchema = zodEnum([\"sync\", \"async\"]);\n\n// Asset type accepted in keyed `input_assets` / `output_assets` declarations.\nconst RouteAssetType = zodEnum([\"file\", \"dataset\", \"post\"]);\n\n// File-type filter accepted on file-input declarations.\nconst RouteInputFilter = zodEnum([\n \"audio\",\n \"video\",\n \"image\",\n \"pdf\",\n \"3d model\",\n \"atomic structure\",\n]);\n\n// Shape of a single keyed declaration in `routes.input_assets`. Plural\n// declarations are canonical; the legacy `input_type` and `input_file_*`\n// columns on the route row stay in sync as primary projections.\nconst RouteInputAssetDeclarationSchema = object({\n asset_type: RouteAssetType,\n primary: optional(boolean()),\n input_filter: optional(nullable(RouteInputFilter)),\n file_extensions: optional(nullable(array(string()))),\n contains_file_extensions: optional(nullable(array(string()))),\n}).catchall(any());\n\n// Shape of a single keyed declaration in `routes.output_assets`.\nconst RouteOutputAssetDeclarationSchema = object({\n asset_type: RouteAssetType,\n primary: optional(boolean()),\n file_extensions: optional(nullable(array(string()))),\n contains_file_extensions: optional(nullable(array(string()))),\n}).catchall(any());\n\nconst RouteInputAssetsSchema = record(\n string(),\n RouteInputAssetDeclarationSchema\n);\n\nconst RouteOutputAssetsSchema = record(\n string(),\n RouteOutputAssetDeclarationSchema\n);\n\nconst RouteDetailSchema = object({\n id: string(),\n user_id: string(),\n service_id: string(),\n path: string(),\n method: zodEnum([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]),\n summary: optional(nullable(string())),\n parameters: optional(nullable(array(record(string(), any())))),\n request_body: optional(nullable(record(string(), any()))),\n responses: optional(nullable(array(record(string(), any())))),\n // Canonical plural input declarations keyed by request body field name.\n input_assets: optional(nullable(RouteInputAssetsSchema)),\n // Legacy primary projection — kept synchronized with `input_assets` for\n // older clients, indexing, and quick asset-type lookups.\n input_type: optional(nullable(RouteAssetType)),\n input_filter: optional(nullable(RouteInputFilter)),\n input_file_extension: optional(nullable(string())),\n input_file_extensions: optional(nullable(array(string()))),\n // Canonical plural output declarations keyed by response body field name.\n output_assets: optional(nullable(RouteOutputAssetsSchema)),\n // Legacy primary projection — kept synchronized with `output_assets`.\n output_type: optional(nullable(RouteAssetType)),\n output_file_extension: optional(nullable(string())),\n security: optional(nullable(record(string(), any()))),\n rate_limit: optional(nullable(number())),\n // Author-declared execution model: 'sync' = upstream returns the result\n // inline; 'async' = upstream returns 202 quickly and webhooks completion.\n execution_mode: optional(ExecutionModeSchema).default(\"sync\"),\n // Empirical mode derived by the platform from recent action history; null\n // until enough samples have been observed. When this differs from\n // execution_mode the route is misconfigured.\n observed_execution_mode: optional(nullable(ExecutionModeSchema)),\n last_updated: string(),\n});\n\n// Per-route latency aggregates surfaced from asset_metrics. All fields are\n// nullable because they don't exist until the platform has observed at least\n// one completed action for the route.\nconst RouteMetricsSchema = object({\n // Average HTTP-hop latency in milliseconds: time from request start until\n // upstream returned 200 or 202.\n avg_ack_ms: optional(nullable(number())),\n p95_ack_ms: optional(nullable(number())),\n // Average end-to-end latency in milliseconds: started_at to finished_at,\n // includes webhook completion for async routes. This is the value an\n // agent should consider when deciding whether to wait or poll.\n avg_completion_ms: optional(nullable(number())),\n p95_completion_ms: optional(nullable(number())),\n latency_sample_count: optional(nullable(number())),\n});\n\nconst RouteSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"route\" === x),\n route: RouteDetailSchema,\n // Latency aggregates joined from asset_metrics; null when no samples yet.\n metrics: optional(nullable(RouteMetricsSchema)),\n});\n\nconst ActionSchema = object({\n id: uuid(),\n user_id: uuid(),\n route_id: uuid(),\n metadata: optional(nullable(record(string(), any()))),\n response: optional(nullable(record(string(), any()))),\n side_effects: boolean().default(true),\n input_asset_id: optional(nullable(uuid())),\n output_asset_id: optional(nullable(uuid())),\n input_asset: optional(nullable(AssetSchema)),\n input_assets: optional(nullable(array(record(string(), any())))),\n output_asset: optional(nullable(AssetSchema)),\n output_assets: optional(nullable(array(record(string(), any())))),\n webhook_url: optional(nullable(string())),\n webhook_token: optional(nullable(string())),\n status: StatusSchema,\n created_at: string(),\n last_updated: string(),\n started_at: optional(nullable(string())),\n // When the upstream service first responded (200 or 202). For sync routes\n // this is approximately equal to finished_at; for async routes the gap\n // between ack_at and finished_at is the out-of-band wait time.\n ack_at: optional(nullable(string())),\n // HTTP status code returned by the upstream service at ack time.\n upstream_status_code: optional(nullable(number())),\n finished_at: optional(nullable(string())),\n});\n\nexport {\n RouteSchema,\n RouteInputAssetDeclarationSchema,\n RouteOutputAssetDeclarationSchema,\n RouteInputAssetsSchema,\n RouteOutputAssetsSchema,\n ServiceSchema,\n CreateServiceSchema,\n UpdateServiceSchema,\n ActionSchema,\n RouteMetricsSchema,\n ExecutionModeSchema,\n};\nexport type Service = z.infer<typeof ServiceSchema>;\nexport type Route = z.infer<typeof RouteSchema>;\nexport type RouteDetail = z.infer<typeof RouteDetailSchema>;\nexport type RouteMetrics = z.infer<typeof RouteMetricsSchema>;\nexport type RouteInputAssetDeclaration = z.infer<typeof RouteInputAssetDeclarationSchema>;\nexport type RouteOutputAssetDeclaration = z.infer<typeof RouteOutputAssetDeclarationSchema>;\nexport type RouteInputAssets = z.infer<typeof RouteInputAssetsSchema>;\nexport type RouteOutputAssets = z.infer<typeof RouteOutputAssetsSchema>;\nexport type ExecutionMode = z.infer<typeof ExecutionModeSchema>;\nexport type AuthType = z.infer<typeof AuthType>;\nexport type Action = z.infer<typeof ActionSchema>;\n"]}
@@ -0,0 +1,2 @@
1
+ import {b as b$1,c,d,a as a$1}from'./chunk-SR5UZ4NP.js';import {a}from'./chunk-WRHPQNEL.js';import {object,enum as _enum,uuid,string,number,record,optional,array,literal,nullable,any}from'zod';var y=object({type:string(),size:number(),path:string(),extension:string(),name:string(),id:uuid(),bucket:_enum(["public-files","files"])}),D=record(string(),object({asset_type:optional(a)})),x=record(string(),object({values:array(string())})),F=object({table_name:string(),schema:literal("datasets").default("datasets"),columns:array(string()),asset_refs:optional(nullable(D)),enum_columns:optional(nullable(x))}),b=object({column_name:string(),data_type:string(),fk_constraint_name:optional(nullable(string())),foreign_table_schema:optional(nullable(string())),foreign_table_name:optional(nullable(string())),foreign_column_name:optional(nullable(string())),semantic_type:optional(nullable(_enum(["asset_ref","enum"]))),asset_type:optional(nullable(a)),enum_values:optional(nullable(array(string())))}),R=object({asset_id:uuid(),asset_type:a,name:nullable(string()),web_url:nullable(string())}),g=record(string(),record(string(),R)),f=F.extend(b$1.partial().shape),z=c.extend({asset_type:literal("dataset").default("dataset"),metadata:f.extend({...y.partial().shape}),preview:array(record(string(),any()))}),E=d.extend({asset_type:literal("dataset").default("dataset"),metadata:f.extend({...y.shape}),preview:array(record(string(),any()))}).transform(n=>a$1(n)),w=d.extend({asset_type:literal("dataset").default("dataset"),metadata:f,preview:array(record(string(),any()))}).transform(n=>a$1(n)),M=z.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true,is_pinned_in_team:true}).extend({asset_type:literal("dataset").default("dataset"),last_updated:string().default(()=>new Date().toISOString())}).transform(n=>a$1(n));export{D as a,x as b,b as c,R as d,g as e,z as f,E as g,w as h,M as i};//# sourceMappingURL=chunk-XLJBQ7BU.js.map
2
+ //# sourceMappingURL=chunk-XLJBQ7BU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schema/datasets.ts"],"names":["DatasetFromFileMetadataSchema","object","string","number","uuid","zodEnum","DatasetAssetRefsSchema","record","optional","AssetTypeSchema","DatasetEnumColumnsSchema","array","BaseDatasetMetadataSchema","literal","nullable","EnrichedDatasetSchemaFieldSchema","ResolvedAssetRefSchema","ResolvedAssetRefsSchema","DatasetMetadataSchema","AssetMetadataSchema","DatasetSchema","AssetSchema","any","CreateDatasetFromFileSchema","CreateAssetSchema","value","normalizeAssetConfigForParsing","CreateDatasetFromSchemaSchema","updateDatasetSchema"],"mappings":"qMAuBMA,CAAgCC,CAAAA,MAAAA,CAAO,CAC3C,IAAMC,CAAAA,MAAAA,GACN,IAAMC,CAAAA,MAAAA,GACN,IAAMD,CAAAA,MAAAA,GACN,SAAWA,CAAAA,MAAAA,GACX,IAAMA,CAAAA,MAAAA,GACN,EAAIE,CAAAA,IAAAA,EACJ,CAAA,MA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AAsBR,EAAc,OAAQ,EAAA,CAC/C,KAAK,CACJ,OAAA,CAAS,IACT,CAAA,EAAA,CAAI,KACJ,UAAY,CAAA,IAAA,CACZ,aAAc,IACd,CAAA,YAAA,CAAc,KACd,IAAM,CAAA,IAAA,CACN,KAAM,IACN,CAAA,IAAA,CAAM,KACN,iBAAmB,CAAA,IACrB,CAAC,CACA,CAAA,MAAA,CAAO,CACN,UAAYP,CAAAA,OAAAA,CAAQ,SAAS,CAAE,CAAA,OAAA,CAAQ,SAAS,CAChD,CAAA,YAAA,CAAcX,QAAS,CAAA,OAAA,CAAQ,IAAM,IAAI,IAAA,GAAO,WAAY,EAAC,CAC/D,CAAC,CAAA,CACA,UAAWuB,CAAUC,EAAAA,GAAAA,CAA+BD,CAAK,CAAC","file":"chunk-XLJBQ7BU.js","sourcesContent":["import {\n object,\n string,\n uuid,\n number,\n array,\n literal,\n record,\n optional,\n nullable,\n type z,\n any,\n enum as zodEnum\n} from \"zod\";\n\nimport {\n AssetSchema,\n CreateAssetSchema,\n AssetMetadataSchema,\n normalizeAssetConfigForParsing,\n} from \"./assets\";\nimport { AssetTypeSchema } from \"./common\";\n\nconst DatasetFromFileMetadataSchema = object({\n type: string(),\n size: number(),\n path: string(),\n extension: string(),\n name: string(),\n id: uuid(), // storage file object id,\n bucket: zodEnum([\"public-files\", \"files\"]),\n});\n\n/**\n * Per-column asset reference declarations.\n *\n * A column becomes an asset reference when the backend adds a real Postgres FK\n * to public.assets(id). The optional asset_type refines validation/display.\n */\nconst DatasetAssetRefsSchema = record(\n string(),\n object({\n asset_type: optional(AssetTypeSchema),\n })\n);\n\n/**\n * Per-column enum declarations.\n *\n * Enum columns are stored as ordinary dataset columns plus a Postgres CHECK\n * constraint. The values are surfaced in schema reads so agents can query with\n * known categorical values.\n */\nconst DatasetEnumColumnsSchema = record(\n string(),\n object({\n values: array(string()),\n })\n);\n\nconst BaseDatasetMetadataSchema = object({\n table_name: string(),\n schema: literal(\"datasets\").default(\"datasets\"),\n columns: array(string()),\n asset_refs: optional(nullable(DatasetAssetRefsSchema)),\n enum_columns: optional(nullable(DatasetEnumColumnsSchema)),\n});\n\n/**\n * A single column from GET /datasets/:id/schema, enriched server-side.\n *\n * The FK fields come straight from get_table_schema. `semantic_type` is pure\n * inference: \"asset_ref\" when the column has an FK to public.assets. The\n * optional `asset_type` is the declared target-type hint from\n * metadata.asset_refs (display + soft validation only). `semantic_type: \"enum\"`\n * comes from metadata.enum_columns and exposes its known values.\n */\nconst EnrichedDatasetSchemaFieldSchema = object({\n column_name: string(),\n data_type: string(),\n fk_constraint_name: optional(nullable(string())),\n foreign_table_schema: optional(nullable(string())),\n foreign_table_name: optional(nullable(string())),\n foreign_column_name: optional(nullable(string())),\n semantic_type: optional(nullable(zodEnum([\"asset_ref\", \"enum\"]))),\n asset_type: optional(nullable(AssetTypeSchema)),\n enum_values: optional(nullable(array(string()))),\n});\n\n/**\n * A resolved asset reference returned in the `resolved_asset_refs` sidecar of\n * GET /datasets/:id/data?resolve_asset_refs=true. Reuses the platform-wide\n * { asset_id, asset_type } vocabulary (see KeyedAssetRefsSchema).\n */\nconst ResolvedAssetRefSchema = object({\n asset_id: uuid(),\n asset_type: AssetTypeSchema,\n name: nullable(string()),\n web_url: nullable(string()),\n});\n\n/** column -> (referenced uuid -> resolved asset). */\nconst ResolvedAssetRefsSchema = record(\n string(),\n record(string(), ResolvedAssetRefSchema)\n);\n\nconst DatasetMetadataSchema = BaseDatasetMetadataSchema.extend(\n AssetMetadataSchema.partial().shape\n);\n\nconst DatasetSchema = AssetSchema.extend({\n asset_type: literal(\"dataset\").default(\"dataset\"),\n metadata: DatasetMetadataSchema.extend({\n ...DatasetFromFileMetadataSchema.partial().shape,\n }),\n preview: array(record(string(), any())),\n});\n\nconst CreateDatasetFromFileSchema = CreateAssetSchema.extend({\n asset_type: literal(\"dataset\").default(\"dataset\"),\n metadata: DatasetMetadataSchema.extend({\n ...DatasetFromFileMetadataSchema.shape,\n }),\n preview: array(record(string(), any())),\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nconst CreateDatasetFromSchemaSchema = CreateAssetSchema.extend({\n asset_type: literal(\"dataset\").default(\"dataset\"),\n metadata: DatasetMetadataSchema,\n preview: array(record(string(), any())),\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nconst updateDatasetSchema = DatasetSchema.partial()\n .omit({\n user_id: true,\n id: true,\n created_at: true,\n last_updated: true,\n organization: true,\n user: true,\n team: true,\n slug: true,\n is_pinned_in_team: true,\n })\n .extend({\n asset_type: literal(\"dataset\").default(\"dataset\"),\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\n\nexport {\n DatasetSchema,\n CreateDatasetFromFileSchema,\n CreateDatasetFromSchemaSchema,\n updateDatasetSchema,\n DatasetAssetRefsSchema,\n DatasetEnumColumnsSchema,\n EnrichedDatasetSchemaFieldSchema,\n ResolvedAssetRefSchema,\n ResolvedAssetRefsSchema,\n};\nexport type Dataset = z.infer<typeof DatasetSchema>;\nexport type CreateFromFileDataset = z.infer<typeof CreateDatasetFromFileSchema>;\nexport type CreateFromSchemaDataset = z.infer<typeof CreateDatasetFromSchemaSchema>;\nexport type UpdateDataset = z.infer<typeof updateDatasetSchema>;\nexport type DatasetAssetRefs = z.infer<typeof DatasetAssetRefsSchema>;\nexport type DatasetEnumColumns = z.infer<typeof DatasetEnumColumnsSchema>;\nexport type EnrichedDatasetSchemaField = z.infer<\n typeof EnrichedDatasetSchemaFieldSchema\n>;\nexport type ResolvedAssetRef = z.infer<typeof ResolvedAssetRefSchema>;\nexport type ResolvedAssetRefs = z.infer<typeof ResolvedAssetRefsSchema>;\n"]}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkMOEVC3KD_cjs=require('./chunk-MOEVC3KD.cjs'),chunkVGNECRJJ_cjs=require('./chunk-VGNECRJJ.cjs'),chunkL2EAP5SJ_cjs=require('./chunk-L2EAP5SJ.cjs'),chunkN6AJDETI_cjs=require('./chunk-N6AJDETI.cjs'),chunk6XQFD2Z2_cjs=require('./chunk-6XQFD2Z2.cjs'),chunk4K6R6FZD_cjs=require('./chunk-4K6R6FZD.cjs'),chunk6FG474SV_cjs=require('./chunk-6FG474SV.cjs'),chunkHN7Y7VMJ_cjs=require('./chunk-HN7Y7VMJ.cjs'),chunkT4BUMCXS_cjs=require('./chunk-T4BUMCXS.cjs'),chunkOFDJA6ZW_cjs=require('./chunk-OFDJA6ZW.cjs'),chunkUORCDNEC_cjs=require('./chunk-UORCDNEC.cjs'),chunkFRMPLGE4_cjs=require('./chunk-FRMPLGE4.cjs'),chunkNJQ5YWYJ_cjs=require('./chunk-NJQ5YWYJ.cjs'),chunkDC6TYS3A_cjs=require('./chunk-DC6TYS3A.cjs'),chunkOBWPO2QT_cjs=require('./chunk-OBWPO2QT.cjs'),chunkROMY5WNQ_cjs=require('./chunk-ROMY5WNQ.cjs'),chunkUY43EQTO_cjs=require('./chunk-UY43EQTO.cjs'),chunkVOY623ZD_cjs=require('./chunk-VOY623ZD.cjs'),chunkGY6SLMMJ_cjs=require('./chunk-GY6SLMMJ.cjs'),chunk43KB23BA_cjs=require('./chunk-43KB23BA.cjs');require('./chunk-7HF5VHUN.cjs');var chunkG24BRDHO_cjs=require('./chunk-G24BRDHO.cjs');Object.defineProperty(exports,"createNameUrlSlug",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.a}});Object.defineProperty(exports,"createUrlSlug",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.b}});Object.defineProperty(exports,"getAssetUrl",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.c}});Object.defineProperty(exports,"filterListToString",{enumerable:true,get:function(){return chunkVGNECRJJ_cjs.a}});Object.defineProperty(exports,"getReferencesInContent",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.e}});Object.defineProperty(exports,"normalizeViewMode",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.a}});Object.defineProperty(exports,"parseAssetLinkShorthand",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.c}});Object.defineProperty(exports,"parseOuroAssetUrl",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.d}});Object.defineProperty(exports,"resolveDisplayConfig",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.b}});Object.defineProperty(exports,"parseMarkdown",{enumerable:true,get:function(){return chunkN6AJDETI_cjs.a}});Object.defineProperty(exports,"CreateFileSchema",{enumerable:true,get:function(){return chunk6XQFD2Z2_cjs.b}});Object.defineProperty(exports,"FileSchema",{enumerable:true,get:function(){return chunk6XQFD2Z2_cjs.a}});Object.defineProperty(exports,"updateFileSchema",{enumerable:true,get:function(){return chunk6XQFD2Z2_cjs.c}});Object.defineProperty(exports,"NotificationSchema",{enumerable:true,get:function(){return chunk4K6R6FZD_cjs.a}});Object.defineProperty(exports,"CreateEntrySchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.p}});Object.defineProperty(exports,"CreateQuestItemObjectSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.i}});Object.defineProperty(exports,"CreateQuestItemSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.j}});Object.defineProperty(exports,"CreateQuestSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.l}});Object.defineProperty(exports,"EntryEvalStatusSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.e}});Object.defineProperty(exports,"EntrySchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.o}});Object.defineProperty(exports,"EntryStatusSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.f}});Object.defineProperty(exports,"QuestItemBaseSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.g}});Object.defineProperty(exports,"QuestItemSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.h}});Object.defineProperty(exports,"QuestItemStatusSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.c}});Object.defineProperty(exports,"QuestSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.k}});Object.defineProperty(exports,"QuestStatusSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.b}});Object.defineProperty(exports,"QuestTypeSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.a}});Object.defineProperty(exports,"ReviewEntrySchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.q}});Object.defineProperty(exports,"RewardCurrencySchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.d}});Object.defineProperty(exports,"UpdateQuestItemSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.n}});Object.defineProperty(exports,"UpdateQuestSchema",{enumerable:true,get:function(){return chunk6FG474SV_cjs.m}});Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.c}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkHN7Y7VMJ_cjs.m}});Object.defineProperty(exports,"reactionSchema",{enumerable:true,get:function(){return chunkT4BUMCXS_cjs.a}});Object.defineProperty(exports,"ActionSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.k}});Object.defineProperty(exports,"CreateServiceSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.b}});Object.defineProperty(exports,"ExecutionModeSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.d}});Object.defineProperty(exports,"RouteInputAssetDeclarationSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.e}});Object.defineProperty(exports,"RouteInputAssetsSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.g}});Object.defineProperty(exports,"RouteMetricsSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.i}});Object.defineProperty(exports,"RouteOutputAssetDeclarationSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.f}});Object.defineProperty(exports,"RouteOutputAssetsSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.h}});Object.defineProperty(exports,"RouteSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.j}});Object.defineProperty(exports,"ServiceSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.a}});Object.defineProperty(exports,"UpdateServiceSchema",{enumerable:true,get:function(){return chunkOFDJA6ZW_cjs.c}});Object.defineProperty(exports,"AssetTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.e}});Object.defineProperty(exports,"AssetTagWithTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.f}});Object.defineProperty(exports,"CreateAssetTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.g}});Object.defineProperty(exports,"TagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.c}});Object.defineProperty(exports,"TagSourceSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.b}});Object.defineProperty(exports,"TagTypeSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.a}});Object.defineProperty(exports,"TagWithParentSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.d}});Object.defineProperty(exports,"TagsByTypeSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.h}});Object.defineProperty(exports,"CommentSchema",{enumerable:true,get:function(){return chunkFRMPLGE4_cjs.a}});Object.defineProperty(exports,"CreateCommentSchema",{enumerable:true,get:function(){return chunkFRMPLGE4_cjs.b}});Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.c}});Object.defineProperty(exports,"ContentSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.b}});Object.defineProperty(exports,"CreatePostSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.d}});Object.defineProperty(exports,"ListPostsSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.g}});Object.defineProperty(exports,"PostSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.c}});Object.defineProperty(exports,"ReadPostSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.e}});Object.defineProperty(exports,"ReadPostsSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.f}});Object.defineProperty(exports,"TipTapSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.a}});Object.defineProperty(exports,"UpdatePostSchema",{enumerable:true,get:function(){return chunkDC6TYS3A_cjs.h}});Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.f}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.g}});Object.defineProperty(exports,"DatasetAssetRefsSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.a}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.e}});Object.defineProperty(exports,"EnrichedDatasetSchemaFieldSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.b}});Object.defineProperty(exports,"ResolvedAssetRefSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.c}});Object.defineProperty(exports,"ResolvedAssetRefsSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.d}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.h}});Object.defineProperty(exports,"AssetMetadataSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.b}});Object.defineProperty(exports,"AssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.c}});Object.defineProperty(exports,"CreateAssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.d}});Object.defineProperty(exports,"UpdateAssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.e}});Object.defineProperty(exports,"normalizeAssetConfigForParsing",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.a}});Object.defineProperty(exports,"CreateTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.b}});Object.defineProperty(exports,"ReadTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.c}});Object.defineProperty(exports,"ReadTeamsSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.d}});Object.defineProperty(exports,"TeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.a}});Object.defineProperty(exports,"UpdateTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.e}});Object.defineProperty(exports,"ActorTypePolicySchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.a}});Object.defineProperty(exports,"MembershipSchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.d}});Object.defineProperty(exports,"OrganizationsSchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.c}});Object.defineProperty(exports,"SourcePolicySchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.b}});Object.defineProperty(exports,"ActorTypeSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.a}});Object.defineProperty(exports,"ProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.b}});Object.defineProperty(exports,"ReadProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.c}});Object.defineProperty(exports,"UpdateProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.d}});Object.defineProperty(exports,"AssetTypeSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.a}});Object.defineProperty(exports,"ConnectionSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.g}});Object.defineProperty(exports,"EmbeddingSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.f}});Object.defineProperty(exports,"MonetizationSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.d}});Object.defineProperty(exports,"PermissionSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.i}});Object.defineProperty(exports,"PriceCurrencySchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.e}});Object.defineProperty(exports,"PurchaseAssetSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.h}});Object.defineProperty(exports,"RoleSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.c}});Object.defineProperty(exports,"SourceSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.k}});Object.defineProperty(exports,"StatusSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.j}});Object.defineProperty(exports,"VisibilitySchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.b}});Object.defineProperty(exports,"USER_SUBSCRIBABLE_WEBHOOK_EVENTS",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.c}});Object.defineProperty(exports,"WEBHOOK_EVENTS",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.a}});Object.defineProperty(exports,"WEBHOOK_EVENT_TYPES",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.b}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkMOEVC3KD_cjs=require('./chunk-MOEVC3KD.cjs'),chunkVGNECRJJ_cjs=require('./chunk-VGNECRJJ.cjs'),chunkL2EAP5SJ_cjs=require('./chunk-L2EAP5SJ.cjs'),chunkN6AJDETI_cjs=require('./chunk-N6AJDETI.cjs'),chunk6GPIZJ4T_cjs=require('./chunk-6GPIZJ4T.cjs'),chunk4K6R6FZD_cjs=require('./chunk-4K6R6FZD.cjs'),chunkBWAEBQKV_cjs=require('./chunk-BWAEBQKV.cjs'),chunk6ZJQTECB_cjs=require('./chunk-6ZJQTECB.cjs'),chunkT4BUMCXS_cjs=require('./chunk-T4BUMCXS.cjs'),chunkV73EW77Y_cjs=require('./chunk-V73EW77Y.cjs'),chunkUORCDNEC_cjs=require('./chunk-UORCDNEC.cjs'),chunkFRMPLGE4_cjs=require('./chunk-FRMPLGE4.cjs'),chunkHIXNQKVP_cjs=require('./chunk-HIXNQKVP.cjs'),chunkF5CWCYOP_cjs=require('./chunk-F5CWCYOP.cjs'),chunk73DHYPGU_cjs=require('./chunk-73DHYPGU.cjs'),chunkROMY5WNQ_cjs=require('./chunk-ROMY5WNQ.cjs'),chunkUY43EQTO_cjs=require('./chunk-UY43EQTO.cjs'),chunkVOY623ZD_cjs=require('./chunk-VOY623ZD.cjs'),chunkGY6SLMMJ_cjs=require('./chunk-GY6SLMMJ.cjs'),chunk43KB23BA_cjs=require('./chunk-43KB23BA.cjs');require('./chunk-7HF5VHUN.cjs');var chunkG24BRDHO_cjs=require('./chunk-G24BRDHO.cjs');Object.defineProperty(exports,"createNameUrlSlug",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.a}});Object.defineProperty(exports,"createUrlSlug",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.b}});Object.defineProperty(exports,"getAssetUrl",{enumerable:true,get:function(){return chunkMOEVC3KD_cjs.c}});Object.defineProperty(exports,"filterListToString",{enumerable:true,get:function(){return chunkVGNECRJJ_cjs.a}});Object.defineProperty(exports,"getReferencesInContent",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.e}});Object.defineProperty(exports,"normalizeViewMode",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.a}});Object.defineProperty(exports,"parseAssetLinkShorthand",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.c}});Object.defineProperty(exports,"parseOuroAssetUrl",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.d}});Object.defineProperty(exports,"resolveDisplayConfig",{enumerable:true,get:function(){return chunkL2EAP5SJ_cjs.b}});Object.defineProperty(exports,"parseMarkdown",{enumerable:true,get:function(){return chunkN6AJDETI_cjs.a}});Object.defineProperty(exports,"CreateFileSchema",{enumerable:true,get:function(){return chunk6GPIZJ4T_cjs.b}});Object.defineProperty(exports,"FileSchema",{enumerable:true,get:function(){return chunk6GPIZJ4T_cjs.a}});Object.defineProperty(exports,"updateFileSchema",{enumerable:true,get:function(){return chunk6GPIZJ4T_cjs.c}});Object.defineProperty(exports,"NotificationSchema",{enumerable:true,get:function(){return chunk4K6R6FZD_cjs.a}});Object.defineProperty(exports,"CreateEntrySchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.p}});Object.defineProperty(exports,"CreateQuestItemObjectSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.i}});Object.defineProperty(exports,"CreateQuestItemSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.j}});Object.defineProperty(exports,"CreateQuestSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.l}});Object.defineProperty(exports,"EntryEvalStatusSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.e}});Object.defineProperty(exports,"EntrySchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.o}});Object.defineProperty(exports,"EntryStatusSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.f}});Object.defineProperty(exports,"QuestItemBaseSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.g}});Object.defineProperty(exports,"QuestItemSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.h}});Object.defineProperty(exports,"QuestItemStatusSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.c}});Object.defineProperty(exports,"QuestSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.k}});Object.defineProperty(exports,"QuestStatusSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.b}});Object.defineProperty(exports,"QuestTypeSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.a}});Object.defineProperty(exports,"ReviewEntrySchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.q}});Object.defineProperty(exports,"RewardCurrencySchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.d}});Object.defineProperty(exports,"UpdateQuestItemSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.n}});Object.defineProperty(exports,"UpdateQuestSchema",{enumerable:true,get:function(){return chunkBWAEBQKV_cjs.m}});Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.c}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunk6ZJQTECB_cjs.m}});Object.defineProperty(exports,"reactionSchema",{enumerable:true,get:function(){return chunkT4BUMCXS_cjs.a}});Object.defineProperty(exports,"ActionSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.k}});Object.defineProperty(exports,"CreateServiceSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.b}});Object.defineProperty(exports,"ExecutionModeSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.d}});Object.defineProperty(exports,"RouteInputAssetDeclarationSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.e}});Object.defineProperty(exports,"RouteInputAssetsSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.g}});Object.defineProperty(exports,"RouteMetricsSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.i}});Object.defineProperty(exports,"RouteOutputAssetDeclarationSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.f}});Object.defineProperty(exports,"RouteOutputAssetsSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.h}});Object.defineProperty(exports,"RouteSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.j}});Object.defineProperty(exports,"ServiceSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.a}});Object.defineProperty(exports,"UpdateServiceSchema",{enumerable:true,get:function(){return chunkV73EW77Y_cjs.c}});Object.defineProperty(exports,"AssetTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.e}});Object.defineProperty(exports,"AssetTagWithTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.f}});Object.defineProperty(exports,"CreateAssetTagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.g}});Object.defineProperty(exports,"TagSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.c}});Object.defineProperty(exports,"TagSourceSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.b}});Object.defineProperty(exports,"TagTypeSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.a}});Object.defineProperty(exports,"TagWithParentSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.d}});Object.defineProperty(exports,"TagsByTypeSchema",{enumerable:true,get:function(){return chunkUORCDNEC_cjs.h}});Object.defineProperty(exports,"CommentSchema",{enumerable:true,get:function(){return chunkFRMPLGE4_cjs.a}});Object.defineProperty(exports,"CreateCommentSchema",{enumerable:true,get:function(){return chunkFRMPLGE4_cjs.b}});Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.c}});Object.defineProperty(exports,"ContentSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.b}});Object.defineProperty(exports,"CreatePostSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.d}});Object.defineProperty(exports,"ListPostsSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.g}});Object.defineProperty(exports,"PostSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.c}});Object.defineProperty(exports,"ReadPostSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.e}});Object.defineProperty(exports,"ReadPostsSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.f}});Object.defineProperty(exports,"TipTapSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.a}});Object.defineProperty(exports,"UpdatePostSchema",{enumerable:true,get:function(){return chunkF5CWCYOP_cjs.h}});Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.g}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.h}});Object.defineProperty(exports,"DatasetAssetRefsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.a}});Object.defineProperty(exports,"DatasetEnumColumnsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.b}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.f}});Object.defineProperty(exports,"EnrichedDatasetSchemaFieldSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.c}});Object.defineProperty(exports,"ResolvedAssetRefSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.d}});Object.defineProperty(exports,"ResolvedAssetRefsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.e}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.i}});Object.defineProperty(exports,"AssetMetadataSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.b}});Object.defineProperty(exports,"AssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.c}});Object.defineProperty(exports,"CreateAssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.d}});Object.defineProperty(exports,"UpdateAssetSchema",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.e}});Object.defineProperty(exports,"normalizeAssetConfigForParsing",{enumerable:true,get:function(){return chunkROMY5WNQ_cjs.a}});Object.defineProperty(exports,"CreateTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.b}});Object.defineProperty(exports,"ReadTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.c}});Object.defineProperty(exports,"ReadTeamsSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.d}});Object.defineProperty(exports,"TeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.a}});Object.defineProperty(exports,"UpdateTeamSchema",{enumerable:true,get:function(){return chunkUY43EQTO_cjs.e}});Object.defineProperty(exports,"ActorTypePolicySchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.a}});Object.defineProperty(exports,"MembershipSchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.d}});Object.defineProperty(exports,"OrganizationsSchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.c}});Object.defineProperty(exports,"SourcePolicySchema",{enumerable:true,get:function(){return chunkVOY623ZD_cjs.b}});Object.defineProperty(exports,"ActorTypeSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.a}});Object.defineProperty(exports,"ProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.b}});Object.defineProperty(exports,"ReadProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.c}});Object.defineProperty(exports,"UpdateProfileSchema",{enumerable:true,get:function(){return chunkGY6SLMMJ_cjs.d}});Object.defineProperty(exports,"AssetTypeSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.a}});Object.defineProperty(exports,"ConnectionSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.g}});Object.defineProperty(exports,"EmbeddingSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.f}});Object.defineProperty(exports,"MonetizationSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.d}});Object.defineProperty(exports,"PermissionSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.i}});Object.defineProperty(exports,"PriceCurrencySchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.e}});Object.defineProperty(exports,"PurchaseAssetSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.h}});Object.defineProperty(exports,"RoleSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.c}});Object.defineProperty(exports,"SourceSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.k}});Object.defineProperty(exports,"StatusSchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.j}});Object.defineProperty(exports,"VisibilitySchema",{enumerable:true,get:function(){return chunk43KB23BA_cjs.b}});Object.defineProperty(exports,"USER_SUBSCRIBABLE_WEBHOOK_EVENTS",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.c}});Object.defineProperty(exports,"WEBHOOK_EVENTS",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.a}});Object.defineProperty(exports,"WEBHOOK_EVENT_TYPES",{enumerable:true,get:function(){return chunkG24BRDHO_cjs.b}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -7,7 +7,7 @@ export { CreateFile, CreateFileSchema, File, FileSchema, UpdateFile, updateFileS
7
7
  export { Content, ContentSchema, CreatePost, CreatePostSchema, ListPosts, ListPostsSchema, Post, PostSchema, ReadPost, ReadPostSchema, ReadPosts, ReadPostsSchema, TipTap, TipTapSchema, UpdatePost, UpdatePostSchema } from './schema/posts.cjs';
8
8
  export { Comment, CommentSchema, CreateComment, CreateCommentSchema } from './schema/comments.cjs';
9
9
  export { Conversation, ConversationSchema, CreateConversation, CreateConversationSchema, Message, MessageSchema, UpdateConversation, UpdateConversationSchema } from './schema/conversations.cjs';
10
- export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, CreateFromFileDataset, CreateFromSchemaDataset, Dataset, DatasetAssetRefs, DatasetAssetRefsSchema, DatasetSchema, EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, ResolvedAssetRef, ResolvedAssetRefSchema, ResolvedAssetRefs, ResolvedAssetRefsSchema, UpdateDataset, updateDatasetSchema } from './schema/datasets.cjs';
10
+ export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, CreateFromFileDataset, CreateFromSchemaDataset, Dataset, DatasetAssetRefs, DatasetAssetRefsSchema, DatasetEnumColumns, DatasetEnumColumnsSchema, DatasetSchema, EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, ResolvedAssetRef, ResolvedAssetRefSchema, ResolvedAssetRefs, ResolvedAssetRefsSchema, UpdateDataset, updateDatasetSchema } from './schema/datasets.cjs';
11
11
  export { CreateEntry, CreateEntrySchema, CreateQuest, CreateQuestItem, CreateQuestItemObjectSchema, CreateQuestItemSchema, CreateQuestSchema, Entry, EntryEvalStatus, EntryEvalStatusSchema, EntrySchema, EntryStatus, EntryStatusSchema, Quest, QuestItem, QuestItemBaseSchema, QuestItemSchema, QuestItemStatus, QuestItemStatusSchema, QuestSchema, QuestStatus, QuestStatusSchema, QuestType, QuestTypeSchema, ReviewEntry, ReviewEntrySchema, RewardCurrency, RewardCurrencySchema, UpdateQuest, UpdateQuestItem, UpdateQuestItemSchema, UpdateQuestSchema } from './schema/quests.cjs';
12
12
  export { Notification, NotificationSchema } from './schema/notifications.cjs';
13
13
  export { USER_SUBSCRIBABLE_WEBHOOK_EVENTS, WEBHOOK_EVENTS, WEBHOOK_EVENT_TYPES, WebhookActor, WebhookAssetRef, WebhookEventDefinition, WebhookEventType, WebhookOrgRef, WebhookPayload, WebhookTeamRef } from './schema/events.cjs';
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export { CreateFile, CreateFileSchema, File, FileSchema, UpdateFile, updateFileS
7
7
  export { Content, ContentSchema, CreatePost, CreatePostSchema, ListPosts, ListPostsSchema, Post, PostSchema, ReadPost, ReadPostSchema, ReadPosts, ReadPostsSchema, TipTap, TipTapSchema, UpdatePost, UpdatePostSchema } from './schema/posts.js';
8
8
  export { Comment, CommentSchema, CreateComment, CreateCommentSchema } from './schema/comments.js';
9
9
  export { Conversation, ConversationSchema, CreateConversation, CreateConversationSchema, Message, MessageSchema, UpdateConversation, UpdateConversationSchema } from './schema/conversations.js';
10
- export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, CreateFromFileDataset, CreateFromSchemaDataset, Dataset, DatasetAssetRefs, DatasetAssetRefsSchema, DatasetSchema, EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, ResolvedAssetRef, ResolvedAssetRefSchema, ResolvedAssetRefs, ResolvedAssetRefsSchema, UpdateDataset, updateDatasetSchema } from './schema/datasets.js';
10
+ export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, CreateFromFileDataset, CreateFromSchemaDataset, Dataset, DatasetAssetRefs, DatasetAssetRefsSchema, DatasetEnumColumns, DatasetEnumColumnsSchema, DatasetSchema, EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, ResolvedAssetRef, ResolvedAssetRefSchema, ResolvedAssetRefs, ResolvedAssetRefsSchema, UpdateDataset, updateDatasetSchema } from './schema/datasets.js';
11
11
  export { CreateEntry, CreateEntrySchema, CreateQuest, CreateQuestItem, CreateQuestItemObjectSchema, CreateQuestItemSchema, CreateQuestSchema, Entry, EntryEvalStatus, EntryEvalStatusSchema, EntrySchema, EntryStatus, EntryStatusSchema, Quest, QuestItem, QuestItemBaseSchema, QuestItemSchema, QuestItemStatus, QuestItemStatusSchema, QuestSchema, QuestStatus, QuestStatusSchema, QuestType, QuestTypeSchema, ReviewEntry, ReviewEntrySchema, RewardCurrency, RewardCurrencySchema, UpdateQuest, UpdateQuestItem, UpdateQuestItemSchema, UpdateQuestSchema } from './schema/quests.js';
12
12
  export { Notification, NotificationSchema } from './schema/notifications.js';
13
13
  export { USER_SUBSCRIBABLE_WEBHOOK_EVENTS, WEBHOOK_EVENTS, WEBHOOK_EVENT_TYPES, WebhookActor, WebhookAssetRef, WebhookEventDefinition, WebhookEventType, WebhookOrgRef, WebhookPayload, WebhookTeamRef } from './schema/events.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as createNameUrlSlug,b as createUrlSlug,c as getAssetUrl}from'./chunk-EY4OFSDP.js';export{a as filterListToString}from'./chunk-OJQM6MWS.js';export{e as getReferencesInContent,a as normalizeViewMode,c as parseAssetLinkShorthand,d as parseOuroAssetUrl,b as resolveDisplayConfig}from'./chunk-PONEAJK7.js';export{a as parseMarkdown}from'./chunk-DE2Z5AOM.js';export{b as CreateFileSchema,a as FileSchema,c as updateFileSchema}from'./chunk-VJJLRHOX.js';export{a as NotificationSchema}from'./chunk-JISPX5A6.js';export{p as CreateEntrySchema,i as CreateQuestItemObjectSchema,j as CreateQuestItemSchema,l as CreateQuestSchema,e as EntryEvalStatusSchema,o as EntrySchema,f as EntryStatusSchema,g as QuestItemBaseSchema,h as QuestItemSchema,c as QuestItemStatusSchema,k as QuestSchema,b as QuestStatusSchema,a as QuestTypeSchema,q as ReviewEntrySchema,d as RewardCurrencySchema,n as UpdateQuestItemSchema,m as UpdateQuestSchema}from'./chunk-EK5P7FST.js';export{c as KeyedAssetInputSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'./chunk-M2JJPDBW.js';export{a as reactionSchema}from'./chunk-WE6CXCEQ.js';export{k as ActionSchema,b as CreateServiceSchema,d as ExecutionModeSchema,e as RouteInputAssetDeclarationSchema,g as RouteInputAssetsSchema,i as RouteMetricsSchema,f as RouteOutputAssetDeclarationSchema,h as RouteOutputAssetsSchema,j as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'./chunk-W5UCZ73B.js';export{e as AssetTagSchema,f as AssetTagWithTagSchema,g as CreateAssetTagSchema,c as TagSchema,b as TagSourceSchema,a as TagTypeSchema,d as TagWithParentSchema,h as TagsByTypeSchema}from'./chunk-EEXD7LGK.js';export{a as CommentSchema,b as CreateCommentSchema}from'./chunk-G3VMEPTP.js';export{a as ConversationSchema,b as CreateConversationSchema,d as MessageSchema,c as UpdateConversationSchema}from'./chunk-XQQVHVWP.js';export{b as ContentSchema,d as CreatePostSchema,g as ListPostsSchema,c as PostSchema,e as ReadPostSchema,f as ReadPostsSchema,a as TipTapSchema,h as UpdatePostSchema}from'./chunk-OS542EYD.js';export{f as CreateDatasetFromFileSchema,g as CreateDatasetFromSchemaSchema,a as DatasetAssetRefsSchema,e as DatasetSchema,b as EnrichedDatasetSchemaFieldSchema,c as ResolvedAssetRefSchema,d as ResolvedAssetRefsSchema,h as updateDatasetSchema}from'./chunk-3UWDQLTN.js';export{b as AssetMetadataSchema,c as AssetSchema,d as CreateAssetSchema,e as UpdateAssetSchema,a as normalizeAssetConfigForParsing}from'./chunk-SR5UZ4NP.js';export{b as CreateTeamSchema,c as ReadTeamSchema,d as ReadTeamsSchema,a as TeamSchema,e as UpdateTeamSchema}from'./chunk-CF56NFUG.js';export{a as ActorTypePolicySchema,d as MembershipSchema,c as OrganizationsSchema,b as SourcePolicySchema}from'./chunk-WLGOABHV.js';export{a as ActorTypeSchema,b as ProfileSchema,c as ReadProfileSchema,d as UpdateProfileSchema}from'./chunk-3N56ERWF.js';export{a as AssetTypeSchema,g as ConnectionSchema,f as EmbeddingSchema,d as MonetizationSchema,i as PermissionSchema,e as PriceCurrencySchema,h as PurchaseAssetSchema,c as RoleSchema,k as SourceSchema,j as StatusSchema,b as VisibilitySchema}from'./chunk-WRHPQNEL.js';import'./chunk-DUBPWSCA.js';export{c as USER_SUBSCRIBABLE_WEBHOOK_EVENTS,a as WEBHOOK_EVENTS,b as WEBHOOK_EVENT_TYPES}from'./chunk-CIWFH5BJ.js';//# sourceMappingURL=index.js.map
1
+ export{a as createNameUrlSlug,b as createUrlSlug,c as getAssetUrl}from'./chunk-EY4OFSDP.js';export{a as filterListToString}from'./chunk-OJQM6MWS.js';export{e as getReferencesInContent,a as normalizeViewMode,c as parseAssetLinkShorthand,d as parseOuroAssetUrl,b as resolveDisplayConfig}from'./chunk-PONEAJK7.js';export{a as parseMarkdown}from'./chunk-DE2Z5AOM.js';export{b as CreateFileSchema,a as FileSchema,c as updateFileSchema}from'./chunk-KCVE35IO.js';export{a as NotificationSchema}from'./chunk-JISPX5A6.js';export{p as CreateEntrySchema,i as CreateQuestItemObjectSchema,j as CreateQuestItemSchema,l as CreateQuestSchema,e as EntryEvalStatusSchema,o as EntrySchema,f as EntryStatusSchema,g as QuestItemBaseSchema,h as QuestItemSchema,c as QuestItemStatusSchema,k as QuestSchema,b as QuestStatusSchema,a as QuestTypeSchema,q as ReviewEntrySchema,d as RewardCurrencySchema,n as UpdateQuestItemSchema,m as UpdateQuestSchema}from'./chunk-R2W4NEEJ.js';export{c as KeyedAssetInputSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'./chunk-TYOQ32UV.js';export{a as reactionSchema}from'./chunk-WE6CXCEQ.js';export{k as ActionSchema,b as CreateServiceSchema,d as ExecutionModeSchema,e as RouteInputAssetDeclarationSchema,g as RouteInputAssetsSchema,i as RouteMetricsSchema,f as RouteOutputAssetDeclarationSchema,h as RouteOutputAssetsSchema,j as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'./chunk-MLTO7TMM.js';export{e as AssetTagSchema,f as AssetTagWithTagSchema,g as CreateAssetTagSchema,c as TagSchema,b as TagSourceSchema,a as TagTypeSchema,d as TagWithParentSchema,h as TagsByTypeSchema}from'./chunk-EEXD7LGK.js';export{a as CommentSchema,b as CreateCommentSchema}from'./chunk-G3VMEPTP.js';export{a as ConversationSchema,b as CreateConversationSchema,d as MessageSchema,c as UpdateConversationSchema}from'./chunk-35CJDNHH.js';export{b as ContentSchema,d as CreatePostSchema,g as ListPostsSchema,c as PostSchema,e as ReadPostSchema,f as ReadPostsSchema,a as TipTapSchema,h as UpdatePostSchema}from'./chunk-IWOXGKK4.js';export{g as CreateDatasetFromFileSchema,h as CreateDatasetFromSchemaSchema,a as DatasetAssetRefsSchema,b as DatasetEnumColumnsSchema,f as DatasetSchema,c as EnrichedDatasetSchemaFieldSchema,d as ResolvedAssetRefSchema,e as ResolvedAssetRefsSchema,i as updateDatasetSchema}from'./chunk-XLJBQ7BU.js';export{b as AssetMetadataSchema,c as AssetSchema,d as CreateAssetSchema,e as UpdateAssetSchema,a as normalizeAssetConfigForParsing}from'./chunk-SR5UZ4NP.js';export{b as CreateTeamSchema,c as ReadTeamSchema,d as ReadTeamsSchema,a as TeamSchema,e as UpdateTeamSchema}from'./chunk-CF56NFUG.js';export{a as ActorTypePolicySchema,d as MembershipSchema,c as OrganizationsSchema,b as SourcePolicySchema}from'./chunk-WLGOABHV.js';export{a as ActorTypeSchema,b as ProfileSchema,c as ReadProfileSchema,d as UpdateProfileSchema}from'./chunk-3N56ERWF.js';export{a as AssetTypeSchema,g as ConnectionSchema,f as EmbeddingSchema,d as MonetizationSchema,i as PermissionSchema,e as PriceCurrencySchema,h as PurchaseAssetSchema,c as RoleSchema,k as SourceSchema,j as StatusSchema,b as VisibilitySchema}from'./chunk-WRHPQNEL.js';import'./chunk-DUBPWSCA.js';export{c as USER_SUBSCRIBABLE_WEBHOOK_EVENTS,a as WEBHOOK_EVENTS,b as WEBHOOK_EVENT_TYPES}from'./chunk-CIWFH5BJ.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkNJQ5YWYJ_cjs=require('../chunk-NJQ5YWYJ.cjs');require('../chunk-DC6TYS3A.cjs'),require('../chunk-ROMY5WNQ.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkNJQ5YWYJ_cjs.c}});//# sourceMappingURL=conversations.cjs.map
1
+ 'use strict';var chunkHIXNQKVP_cjs=require('../chunk-HIXNQKVP.cjs');require('../chunk-F5CWCYOP.cjs'),require('../chunk-ROMY5WNQ.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkHIXNQKVP_cjs.c}});//# sourceMappingURL=conversations.cjs.map
2
2
  //# sourceMappingURL=conversations.cjs.map
@@ -1,2 +1,2 @@
1
- export{a as ConversationSchema,b as CreateConversationSchema,d as MessageSchema,c as UpdateConversationSchema}from'../chunk-XQQVHVWP.js';import'../chunk-OS542EYD.js';import'../chunk-SR5UZ4NP.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=conversations.js.map
1
+ export{a as ConversationSchema,b as CreateConversationSchema,d as MessageSchema,c as UpdateConversationSchema}from'../chunk-35CJDNHH.js';import'../chunk-IWOXGKK4.js';import'../chunk-SR5UZ4NP.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=conversations.js.map
2
2
  //# sourceMappingURL=conversations.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkOBWPO2QT_cjs=require('../chunk-OBWPO2QT.cjs');require('../chunk-ROMY5WNQ.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.f}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.g}});Object.defineProperty(exports,"DatasetAssetRefsSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.a}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.e}});Object.defineProperty(exports,"EnrichedDatasetSchemaFieldSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.b}});Object.defineProperty(exports,"ResolvedAssetRefSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.c}});Object.defineProperty(exports,"ResolvedAssetRefsSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.d}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunkOBWPO2QT_cjs.h}});//# sourceMappingURL=datasets.cjs.map
1
+ 'use strict';var chunk73DHYPGU_cjs=require('../chunk-73DHYPGU.cjs');require('../chunk-ROMY5WNQ.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.g}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.h}});Object.defineProperty(exports,"DatasetAssetRefsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.a}});Object.defineProperty(exports,"DatasetEnumColumnsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.b}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.f}});Object.defineProperty(exports,"EnrichedDatasetSchemaFieldSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.c}});Object.defineProperty(exports,"ResolvedAssetRefSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.d}});Object.defineProperty(exports,"ResolvedAssetRefsSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.e}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunk73DHYPGU_cjs.i}});//# sourceMappingURL=datasets.cjs.map
2
2
  //# sourceMappingURL=datasets.cjs.map
@@ -21,13 +21,24 @@ declare const DatasetAssetRefsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
21
21
  conversation: "conversation";
22
22
  }>>;
23
23
  }, z.core.$strip>>;
24
+ /**
25
+ * Per-column enum declarations.
26
+ *
27
+ * Enum columns are stored as ordinary dataset columns plus a Postgres CHECK
28
+ * constraint. The values are surfaced in schema reads so agents can query with
29
+ * known categorical values.
30
+ */
31
+ declare const DatasetEnumColumnsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
32
+ values: z.ZodArray<z.ZodString>;
33
+ }, z.core.$strip>>;
24
34
  /**
25
35
  * A single column from GET /datasets/:id/schema, enriched server-side.
26
36
  *
27
37
  * The FK fields come straight from get_table_schema. `semantic_type` is pure
28
38
  * inference: "asset_ref" when the column has an FK to public.assets. The
29
39
  * optional `asset_type` is the declared target-type hint from
30
- * metadata.asset_refs (display + soft validation only).
40
+ * metadata.asset_refs (display + soft validation only). `semantic_type: "enum"`
41
+ * comes from metadata.enum_columns and exposes its known values.
31
42
  */
32
43
  declare const EnrichedDatasetSchemaFieldSchema: z.ZodObject<{
33
44
  column_name: z.ZodString;
@@ -36,7 +47,10 @@ declare const EnrichedDatasetSchemaFieldSchema: z.ZodObject<{
36
47
  foreign_table_schema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
48
  foreign_table_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
49
  foreign_column_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- semantic_type: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"asset_ref">>>;
50
+ semantic_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
51
+ enum: "enum";
52
+ asset_ref: "asset_ref";
53
+ }>>>;
40
54
  asset_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
41
55
  user: "user";
42
56
  organization: "organization";
@@ -50,6 +64,7 @@ declare const EnrichedDatasetSchemaFieldSchema: z.ZodObject<{
50
64
  comment: "comment";
51
65
  conversation: "conversation";
52
66
  }>>>;
67
+ enum_values: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
53
68
  }, z.core.$strip>;
54
69
  /**
55
70
  * A resolved asset reference returned in the `resolved_asset_refs` sidecar of
@@ -334,6 +349,9 @@ declare const DatasetSchema: z.ZodObject<{
334
349
  conversation: "conversation";
335
350
  }>>;
336
351
  }, z.core.$strip>>>>;
352
+ enum_columns: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
353
+ values: z.ZodArray<z.ZodString>;
354
+ }, z.core.$strip>>>>;
337
355
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
338
356
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
339
357
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -430,6 +448,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
430
448
  conversation: "conversation";
431
449
  }>>;
432
450
  }, z.core.$strip>>>>;
451
+ enum_columns: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
452
+ values: z.ZodArray<z.ZodString>;
453
+ }, z.core.$strip>>>>;
433
454
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
434
455
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
435
456
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -478,6 +499,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
478
499
  asset_refs?: Record<string, {
479
500
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
480
501
  }> | null | undefined;
502
+ enum_columns?: Record<string, {
503
+ values: string[];
504
+ }> | null | undefined;
481
505
  doi_url?: string | null | undefined;
482
506
  external_url?: string | null | undefined;
483
507
  paper_url?: string | null | undefined;
@@ -529,6 +553,9 @@ declare const CreateDatasetFromFileSchema: z.ZodPipe<z.ZodObject<{
529
553
  asset_refs?: Record<string, {
530
554
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
531
555
  }> | null | undefined;
556
+ enum_columns?: Record<string, {
557
+ values: string[];
558
+ }> | null | undefined;
532
559
  doi_url?: string | null | undefined;
533
560
  external_url?: string | null | undefined;
534
561
  paper_url?: string | null | undefined;
@@ -628,6 +655,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
628
655
  conversation: "conversation";
629
656
  }>>;
630
657
  }, z.core.$strip>>>>;
658
+ enum_columns: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
659
+ values: z.ZodArray<z.ZodString>;
660
+ }, z.core.$strip>>>>;
631
661
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
632
662
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
633
663
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -659,6 +689,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
659
689
  asset_refs?: Record<string, {
660
690
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
661
691
  }> | null | undefined;
692
+ enum_columns?: Record<string, {
693
+ values: string[];
694
+ }> | null | undefined;
662
695
  doi_url?: string | null | undefined;
663
696
  external_url?: string | null | undefined;
664
697
  paper_url?: string | null | undefined;
@@ -703,6 +736,9 @@ declare const CreateDatasetFromSchemaSchema: z.ZodPipe<z.ZodObject<{
703
736
  asset_refs?: Record<string, {
704
737
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
705
738
  }> | null | undefined;
739
+ enum_columns?: Record<string, {
740
+ values: string[];
741
+ }> | null | undefined;
706
742
  doi_url?: string | null | undefined;
707
743
  external_url?: string | null | undefined;
708
744
  paper_url?: string | null | undefined;
@@ -752,6 +788,9 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
752
788
  conversation: "conversation";
753
789
  }>>;
754
790
  }, z.core.$strip>>>>;
791
+ enum_columns: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
792
+ values: z.ZodArray<z.ZodString>;
793
+ }, z.core.$strip>>>>;
755
794
  doi_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
756
795
  external_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
757
796
  paper_url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
@@ -836,6 +875,9 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
836
875
  asset_refs?: Record<string, {
837
876
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
838
877
  }> | null | undefined;
878
+ enum_columns?: Record<string, {
879
+ values: string[];
880
+ }> | null | undefined;
839
881
  doi_url?: string | null | undefined;
840
882
  external_url?: string | null | undefined;
841
883
  paper_url?: string | null | undefined;
@@ -886,6 +928,9 @@ declare const updateDatasetSchema: z.ZodPipe<z.ZodObject<{
886
928
  asset_refs?: Record<string, {
887
929
  asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | undefined;
888
930
  }> | null | undefined;
931
+ enum_columns?: Record<string, {
932
+ values: string[];
933
+ }> | null | undefined;
889
934
  doi_url?: string | null | undefined;
890
935
  external_url?: string | null | undefined;
891
936
  paper_url?: string | null | undefined;
@@ -931,8 +976,9 @@ type CreateFromFileDataset = z.infer<typeof CreateDatasetFromFileSchema>;
931
976
  type CreateFromSchemaDataset = z.infer<typeof CreateDatasetFromSchemaSchema>;
932
977
  type UpdateDataset = z.infer<typeof updateDatasetSchema>;
933
978
  type DatasetAssetRefs = z.infer<typeof DatasetAssetRefsSchema>;
979
+ type DatasetEnumColumns = z.infer<typeof DatasetEnumColumnsSchema>;
934
980
  type EnrichedDatasetSchemaField = z.infer<typeof EnrichedDatasetSchemaFieldSchema>;
935
981
  type ResolvedAssetRef = z.infer<typeof ResolvedAssetRefSchema>;
936
982
  type ResolvedAssetRefs = z.infer<typeof ResolvedAssetRefsSchema>;
937
983
 
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 };
984
+ export { CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, type CreateFromFileDataset, type CreateFromSchemaDataset, type Dataset, type DatasetAssetRefs, DatasetAssetRefsSchema, type DatasetEnumColumns, DatasetEnumColumnsSchema, DatasetSchema, type EnrichedDatasetSchemaField, EnrichedDatasetSchemaFieldSchema, type ResolvedAssetRef, ResolvedAssetRefSchema, type ResolvedAssetRefs, ResolvedAssetRefsSchema, type UpdateDataset, updateDatasetSchema };