@ourofoundation/ouro-js 3.2.4 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-5V7HPXUK.js +2 -0
- package/dist/chunk-5V7HPXUK.js.map +1 -0
- package/dist/chunk-D7S2GB7Z.cjs +2 -0
- package/dist/chunk-D7S2GB7Z.cjs.map +1 -0
- package/dist/chunk-EY4OFSDP.js +2 -0
- package/dist/chunk-EY4OFSDP.js.map +1 -0
- package/dist/chunk-MOEVC3KD.cjs +2 -0
- package/dist/chunk-MOEVC3KD.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/schema/assets.d.cts +77 -77
- package/dist/schema/assets.d.ts +77 -77
- package/dist/schema/blueprints.d.cts +12 -12
- package/dist/schema/blueprints.d.ts +12 -12
- package/dist/schema/comments.d.cts +73 -73
- package/dist/schema/comments.d.ts +73 -73
- package/dist/schema/common.d.cts +9 -9
- package/dist/schema/common.d.ts +9 -9
- package/dist/schema/conversations.d.cts +62 -62
- package/dist/schema/conversations.d.ts +62 -62
- package/dist/schema/datasets.d.cts +97 -97
- package/dist/schema/datasets.d.ts +97 -97
- package/dist/schema/files.d.cts +91 -91
- package/dist/schema/files.d.ts +91 -91
- package/dist/schema/notifications.d.cts +1 -1
- package/dist/schema/notifications.d.ts +1 -1
- package/dist/schema/posts.d.cts +110 -110
- package/dist/schema/posts.d.ts +110 -110
- package/dist/schema/replications.d.cts +12 -12
- package/dist/schema/replications.d.ts +12 -12
- package/dist/schema/services.cjs +1 -1
- package/dist/schema/services.d.cts +106 -101
- package/dist/schema/services.d.ts +106 -101
- package/dist/schema/services.js +1 -1
- package/dist/schema/teams.d.cts +15 -15
- package/dist/schema/teams.d.ts +15 -15
- package/dist/utils/navigate.cjs +1 -1
- package/dist/utils/navigate.d.cts +2 -2
- package/dist/utils/navigate.d.ts +2 -2
- package/dist/utils/navigate.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6RGIIOOP.js +0 -2
- package/dist/chunk-6RGIIOOP.js.map +0 -1
- package/dist/chunk-DHQJ2FCF.cjs +0 -2
- package/dist/chunk-DHQJ2FCF.cjs.map +0 -1
- package/dist/chunk-FNW6DDNP.cjs +0 -2
- package/dist/chunk-FNW6DDNP.cjs.map +0 -1
- package/dist/chunk-XMYZV7TD.js +0 -2
- package/dist/chunk-XMYZV7TD.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,c,d,a as a$1}from'./chunk-KZOOYWQ7.js';import {a,j}from'./chunk-7ABFUHWW.js';import {enum as _enum,object,optional,string,nullable,number,record,any,array,boolean,uuid}from'zod';var x=_enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),A=object({authentication:x,base_url:string(),version:optional(nullable(string())),spec_path:optional(nullable(string())),spec_url:optional(nullable(string())),auth_url:optional(nullable(string()))}),h=A.extend(b.partial().shape),v=c.extend({asset_type:a.refine(s=>s==="service"),metadata:h}),R=d.extend({asset_type:a.refine(s=>s==="service"),metadata:h}).transform(s=>a$1(s)),D=v.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true}).extend({last_updated:string().default(()=>new Date().toISOString())}).transform(s=>a$1(s)),T=object({id:string(),user_id:string(),service_id:string(),path:string(),method:_enum(["GET","POST","PUT","PATCH","DELETE"]),summary:optional(nullable(string())),parameters:optional(nullable(array(record(string(),any())))),request_body:optional(nullable(record(string(),any()))),responses:optional(nullable(array(record(string(),any())))),input_assets:optional(nullable(record(string(),any()))),input_type:optional(nullable(_enum(["file","dataset","post"]))),input_filter:optional(nullable(_enum(["audio","video","image","pdf","3d model","atomic structure"]))),input_file_extension:optional(nullable(string())),input_file_extensions:optional(nullable(array(string()))),output_type:optional(nullable(_enum(["file","dataset","post"]))),output_assets:optional(nullable(record(string(),any()))),output_file_extension:optional(nullable(string())),security:optional(nullable(record(string(),any()))),rate_limit:optional(nullable(number())),last_updated:string()}),E=c.extend({asset_type:a.refine(s=>s==="route"),route:T}),P=object({id:uuid(),user_id:uuid(),route_id:uuid(),metadata:optional(nullable(record(string(),any()))),response:optional(nullable(record(string(),any()))),side_effects:boolean().default(true),input_asset_id:optional(nullable(uuid())),output_asset_id:optional(nullable(uuid())),input_asset:optional(nullable(c)),input_assets:optional(nullable(array(record(string(),any())))),output_asset:optional(nullable(c)),webhook_url:optional(nullable(string())),webhook_token:optional(nullable(string())),status:j,created_at:string(),last_updated:string(),started_at:optional(nullable(string())),finished_at:optional(nullable(string()))});export{v as a,R as b,D as c,E as d,P as e};//# sourceMappingURL=chunk-5V7HPXUK.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-5V7HPXUK.js.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","RouteDetailSchema","array","record","any","number","RouteSchema","ActionSchema","uuid","boolean","StatusSchema"],"mappings":"4LAuBMA,IAAAA,CAAAA,CAAWC,KAAQ,CAAA,CAAC,wBAAyB,MAAQ,CAAA,MAAA,CAAQ,WAAW,CAAC,CAEzEC,CAAAA,CAAAA,CAA4BC,OAAO,CACvC,cAAA,CAAgBH,CAChB,CAAA,QAAA,CAAUI,MAAO,EAAA,CACjB,QAASC,QAASC,CAAAA,QAAAA,CAASF,MAAO,EAAC,CAAC,CAAA,CACpC,SAAWC,CAAAA,QAAAA,CAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACtC,CAAA,QAAA,CAAUC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACrC,CAAA,QAAA,CAAUC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACvC,CAAC,EAEKG,CAAwBL,CAAAA,CAAAA,CAA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,CAAC,CACxC,CAAA,aAAA,CAAeC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CAC1C,CAAA,MAAA,CAAQuB,CACR,CAAA,UAAA,CAAYvB,MAAO,EAAA,CACnB,YAAcA,CAAAA,MAAAA,EACd,CAAA,UAAA,CAAYC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACvC,CAAA,WAAA,CAAaC,QAASC,CAAAA,QAAAA,CAASF,MAAO,EAAC,CAAC,CAC1C,CAAC","file":"chunk-5V7HPXUK.js","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 })\n .extend({\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\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 input_assets: optional(nullable(record(string(), any()))),\n input_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n input_filter: optional(nullable(zodEnum([\"audio\", \"video\", \"image\", \"pdf\", \"3d model\", \"atomic structure\"]))),\n input_file_extension: optional(nullable(string())),\n input_file_extensions: optional(nullable(array(string()))),\n output_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n output_assets: optional(nullable(record(string(), any()))),\n output_file_extension: optional(nullable(string())),\n security: optional(nullable(record(string(), any()))),\n rate_limit: optional(nullable(number())),\n last_updated: string(),\n});\n\nconst RouteSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"route\" === x),\n route: RouteDetailSchema,\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 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 finished_at: optional(nullable(string())),\n});\n\nexport { RouteSchema, ServiceSchema, CreateServiceSchema, UpdateServiceSchema, ActionSchema };\nexport type Service = z.infer<typeof ServiceSchema>;\nexport type Route = z.infer<typeof RouteSchema>;\nexport type RouteDetail = z.infer<typeof RouteDetailSchema>;\nexport type AuthType = z.infer<typeof AuthType>;\nexport type Action = z.infer<typeof ActionSchema>;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkFQ4F7DQH_cjs=require('./chunk-FQ4F7DQH.cjs'),chunk3ZHWBPGA_cjs=require('./chunk-3ZHWBPGA.cjs'),zod=require('zod');var x=zod.enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),A=zod.object({authentication:x,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()))}),h=A.extend(chunkFQ4F7DQH_cjs.b.partial().shape),v=chunkFQ4F7DQH_cjs.c.extend({asset_type:chunk3ZHWBPGA_cjs.a.refine(s=>s==="service"),metadata:h}),R=chunkFQ4F7DQH_cjs.d.extend({asset_type:chunk3ZHWBPGA_cjs.a.refine(s=>s==="service"),metadata:h}).transform(s=>chunkFQ4F7DQH_cjs.a(s)),D=v.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true}).extend({last_updated:zod.string().default(()=>new Date().toISOString())}).transform(s=>chunkFQ4F7DQH_cjs.a(s)),T=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(zod.record(zod.string(),zod.any()))),input_type:zod.optional(zod.nullable(zod.enum(["file","dataset","post"]))),input_filter:zod.optional(zod.nullable(zod.enum(["audio","video","image","pdf","3d model","atomic structure"]))),input_file_extension:zod.optional(zod.nullable(zod.string())),input_file_extensions:zod.optional(zod.nullable(zod.array(zod.string()))),output_type:zod.optional(zod.nullable(zod.enum(["file","dataset","post"]))),output_assets:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),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())),last_updated:zod.string()}),E=chunkFQ4F7DQH_cjs.c.extend({asset_type:chunk3ZHWBPGA_cjs.a.refine(s=>s==="route"),route:T}),P=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(chunkFQ4F7DQH_cjs.c)),input_assets:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),output_asset:zod.optional(zod.nullable(chunkFQ4F7DQH_cjs.c)),webhook_url:zod.optional(zod.nullable(zod.string())),webhook_token:zod.optional(zod.nullable(zod.string())),status:chunk3ZHWBPGA_cjs.j,created_at:zod.string(),last_updated:zod.string(),started_at:zod.optional(zod.nullable(zod.string())),finished_at:zod.optional(zod.nullable(zod.string()))});exports.a=v;exports.b=R;exports.c=D;exports.d=E;exports.e=P;//# sourceMappingURL=chunk-D7S2GB7Z.cjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-D7S2GB7Z.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","RouteDetailSchema","array","record","any","number","RouteSchema","ActionSchema","uuid","boolean","StatusSchema"],"mappings":"wIAuBMA,IAAAA,CAAAA,CAAWC,QAAQ,CAAA,CAAC,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,CAAA,cAAA,CAAgBrB,YAASC,CAAAA,YAAAA,CAASmB,UAAM,CAAC,CACzC,CAAA,eAAA,CAAiBpB,YAASC,CAAAA,YAAAA,CAASmB,QAAK,EAAC,CAAC,CAAA,CAC1C,WAAapB,CAAAA,YAAAA,CAASC,YAASI,CAAAA,mBAAW,CAAC,CAC3C,CAAA,YAAA,CAAcL,YAASC,CAAAA,YAAAA,CAASa,SAAMC,CAAAA,UAAAA,CAAOhB,YAAUiB,CAAAA,OAAAA,EAAK,CAAC,CAAC,CAAC,EAC/D,YAAchB,CAAAA,YAAAA,CAASC,YAASI,CAAAA,mBAAW,CAAC,CAAA,CAC5C,WAAaL,CAAAA,YAAAA,CAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACxC,CAAA,aAAA,CAAeC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CAC1C,CAAA,MAAA,CAAQuB,mBACR,CAAA,UAAA,CAAYvB,UAAO,EAAA,CACnB,YAAcA,CAAAA,UAAAA,EACd,CAAA,UAAA,CAAYC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACvC,CAAA,WAAA,CAAaC,YAASC,CAAAA,YAAAA,CAASF,UAAO,EAAC,CAAC,CAC1C,CAAC","file":"chunk-D7S2GB7Z.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 })\n .extend({\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\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 input_assets: optional(nullable(record(string(), any()))),\n input_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n input_filter: optional(nullable(zodEnum([\"audio\", \"video\", \"image\", \"pdf\", \"3d model\", \"atomic structure\"]))),\n input_file_extension: optional(nullable(string())),\n input_file_extensions: optional(nullable(array(string()))),\n output_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n output_assets: optional(nullable(record(string(), any()))),\n output_file_extension: optional(nullable(string())),\n security: optional(nullable(record(string(), any()))),\n rate_limit: optional(nullable(number())),\n last_updated: string(),\n});\n\nconst RouteSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"route\" === x),\n route: RouteDetailSchema,\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 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 finished_at: optional(nullable(string())),\n});\n\nexport { RouteSchema, ServiceSchema, CreateServiceSchema, UpdateServiceSchema, ActionSchema };\nexport type Service = z.infer<typeof ServiceSchema>;\nexport type Route = z.infer<typeof RouteSchema>;\nexport type RouteDetail = z.infer<typeof RouteDetailSchema>;\nexport type AuthType = z.infer<typeof AuthType>;\nexport type Action = z.infer<typeof ActionSchema>;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-OJQM6MWS.js';import {b}from'./chunk-DUBPWSCA.js';var _=n=>n.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\s\/\_]+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),g=n=>{var r,i,e,o;return n.org_id===b?(r=n.user)==null?void 0:r.username:n.org_id?(i=n.organization)==null?void 0:i.name:((e=n.organization)==null?void 0:e.name)||((o=n.user)==null?void 0:o.username)},l=new Set,t=(n,r)=>{var e,o;let i=`${r}:${(n==null?void 0:n.id)||"no-id"}:${(n==null?void 0:n.asset_type)||"no-type"}`;l.has(i)||(l.add(i),console.warn("[ouro-js] Unable to build asset URL",{reason:r,id:n==null?void 0:n.id,asset_type:n==null?void 0:n.asset_type,org_id:n==null?void 0:n.org_id,user_id:n==null?void 0:n.user_id,name:n==null?void 0:n.name,name_url_slug:n==null?void 0:n.name_url_slug,organization_name:(e=n==null?void 0:n.organization)==null?void 0:e.name,username:(o=n==null?void 0:n.user)==null?void 0:o.username}));},p=n=>{if(n!=null&&n.slug)return n.slug;if(!(n!=null&&n.asset_type))return t(n,"missing_asset_type"),"#";if(n.asset_type==="conversation")return `/conversations/${n.id}`;if(n.asset_type==="comment")return `/comments/${n.id}`;let r=g(n),i=n.name_url_slug||n.id||(n.name?_(n.name):void 0);return !r||!i?(t(n,r?"missing_asset_name":"missing_entity_name"),"#"):`/${n.asset_type}s/${r}/${i}`};var d=(n,r)=>{let i=p(n);if(i==="#")return i;let e=r!=null&&r.intent?`?intent=${r.intent}`:"",o=`${i}${e}`;return r!=null&&r.filters&&(o+=`?filters=${a(r.filters)}`),o};export{_ as a,p as b,d as c};//# sourceMappingURL=chunk-EY4OFSDP.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-EY4OFSDP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/navigate.ts"],"names":["createNameUrlSlug","name","getEntityName","asset","_a","_b","_c","_d","GLOBAL_ORG_ID","missingAssetUrlWarnings","warnMissingAssetUrlData","reason","key","createUrlSlug","entityName","getAssetUrl","config","slug","pathPostfix","url","filterListToString"],"mappings":"wEAGA,IAAMA,CAAqBC,CAAAA,CAAAA,EAEvBA,CAEG,CAAA,WAAA,GAEA,SAAU,CAAA,KAAK,CAEf,CAAA,OAAA,CAAQ,kBAAoB,CAAA,EAAE,CAE9B,CAAA,OAAA,CAAQ,aAAc,GAAG,CAAA,CAEzB,OAAQ,CAAA,WAAA,CAAa,EAAE,CAAA,CAEvB,OAAQ,CAAA,QAAA,CAAU,GAAG,CAErB,CAAA,OAAA,CAAQ,KAAO,CAAA,EAAE,CACjB,CAAA,OAAA,CAAQ,KAAO,CAAA,EAAE,EAIlBC,CAAiBC,CAAAA,CAAAA,EAAe,CAxBtC,IAAAC,CAAAC,CAAAA,CAAAA,CAAAC,CAAAC,CAAAA,CAAAA,CAyBE,OAAIJ,CAAM,CAAA,MAAA,GAAWK,CAAsBJ,CAAAA,CAAAA,CAAAA,CAAAD,CAAM,CAAA,IAAA,GAAN,IAAAC,CAAAA,MAAAA,CAAA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AAc,CAAA,CAClBZ,CACAa,CAAAA,CAAAA,GAIG,CAEH,IAAMC,EAAOJ,CAAcV,CAAAA,CAAK,CAChC,CAAA,GAAIc,CAAS,GAAA,GAAA,CACX,OAAOA,CAAAA,CAET,IAAMC,CAAcF,CAAAA,CAAAA,EAAA,IAAAA,EAAAA,CAAAA,CAAQ,MAAS,CAAA,CAAA,QAAA,EAAWA,CAAO,CAAA,MAAM,GAAK,EAC9DG,CAAAA,CAAAA,CAAM,CAAGF,EAAAA,CAAI,CAAGC,EAAAA,CAAW,CAC/B,CAAA,CAAA,OAAIF,GAAA,IAAAA,EAAAA,CAAAA,CAAQ,OACVG,GAAAA,CAAAA,EAAO,YAAYC,CAAmBJ,CAAAA,CAAAA,CAAO,OAAO,CAAC,IAGhDG,CACT","file":"chunk-EY4OFSDP.js","sourcesContent":["import { filterListToString } from \"./dataset\";\nimport { GLOBAL_ORG_ID } from \"../schema/constants\";\n\nconst createNameUrlSlug = (name: string) => {\n return (\n name\n // Convert to lowercase\n .toLowerCase()\n // Normalize unicode characters\n .normalize(\"NFD\")\n // Remove diacritical marks\n .replace(/[\\u0300-\\u036f]/g, \"\")\n // Replace spaces, forward slashes, and underscores with hyphens\n .replace(/[\\s\\/\\_]+/g, \"-\")\n // Remove special characters\n .replace(/[^\\w\\-]+/g, \"\")\n // Remove multiple consecutive hyphens\n .replace(/\\-\\-+/g, \"-\")\n // Trim hyphens from start and end\n .replace(/^-+/, \"\")\n .replace(/-+$/, \"\")\n );\n};\n\nconst getEntityName = (asset: any) => {\n if (asset.org_id === GLOBAL_ORG_ID) return asset.user?.username;\n if (asset.org_id) return asset.organization?.name;\n return asset.organization?.name || asset.user?.username;\n};\n\nconst missingAssetUrlWarnings = new Set<string>();\n\nconst warnMissingAssetUrlData = (asset: any, reason: string) => {\n const key = `${reason}:${asset?.id || \"no-id\"}:${asset?.asset_type || \"no-type\"}`;\n if (missingAssetUrlWarnings.has(key)) return;\n missingAssetUrlWarnings.add(key);\n\n console.warn(\"[ouro-js] Unable to build asset URL\", {\n reason,\n id: asset?.id,\n asset_type: asset?.asset_type,\n org_id: asset?.org_id,\n user_id: asset?.user_id,\n name: asset?.name,\n name_url_slug: asset?.name_url_slug,\n organization_name: asset?.organization?.name,\n username: asset?.user?.username,\n });\n};\n\nconst createUrlSlug = (asset: any) => {\n if (asset?.slug) {\n return asset.slug;\n }\n if (!asset?.asset_type) {\n warnMissingAssetUrlData(asset, \"missing_asset_type\");\n return \"#\";\n }\n if (asset.asset_type === \"conversation\") {\n return `/conversations/${asset.id}`;\n }\n if (asset.asset_type === \"comment\") {\n return `/comments/${asset.id}`;\n }\n const entityName = getEntityName(asset);\n const name =\n asset.name_url_slug || asset.id || (asset.name ? createNameUrlSlug(asset.name) : undefined);\n if (!entityName || !name) {\n warnMissingAssetUrlData(\n asset,\n !entityName ? \"missing_entity_name\" : \"missing_asset_name\"\n );\n return \"#\";\n }\n const assetType = asset.asset_type;\n return `/${assetType}s/${entityName}/${name}`;\n};\n\nconst getParentAssetUrl = (asset: any, config?: any): string => {\n if (!asset?.parent) return \"#\";\n const postfix = asset.asset_type === \"comment\" ? `#comment-${asset.id}` : \"\";\n return `${getAssetUrl(asset.parent, config)}${postfix}`;\n};\n\nconst getAssetUrl = (\n asset: any,\n config?: {\n intent?: \"share\";\n filters?: { column: string; value: string; operator: string }[];\n }\n) => {\n // const assetType = asset?.asset_type || asset?.assetType;\n const slug = createUrlSlug(asset);\n if (slug === \"#\") {\n return slug;\n }\n const pathPostfix = config?.intent ? `?intent=${config.intent}` : \"\";\n let url = `${slug}${pathPostfix}`;\n if (config?.filters) {\n url += `?filters=${filterListToString(config.filters)}`;\n }\n\n return url;\n};\n\nexport { getAssetUrl, createUrlSlug, createNameUrlSlug };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkVGNECRJJ_cjs=require('./chunk-VGNECRJJ.cjs'),chunk7HF5VHUN_cjs=require('./chunk-7HF5VHUN.cjs');var _=n=>n.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\s\/\_]+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),g=n=>{var r,i,e,o;return n.org_id===chunk7HF5VHUN_cjs.b?(r=n.user)==null?void 0:r.username:n.org_id?(i=n.organization)==null?void 0:i.name:((e=n.organization)==null?void 0:e.name)||((o=n.user)==null?void 0:o.username)},l=new Set,t=(n,r)=>{var e,o;let i=`${r}:${(n==null?void 0:n.id)||"no-id"}:${(n==null?void 0:n.asset_type)||"no-type"}`;l.has(i)||(l.add(i),console.warn("[ouro-js] Unable to build asset URL",{reason:r,id:n==null?void 0:n.id,asset_type:n==null?void 0:n.asset_type,org_id:n==null?void 0:n.org_id,user_id:n==null?void 0:n.user_id,name:n==null?void 0:n.name,name_url_slug:n==null?void 0:n.name_url_slug,organization_name:(e=n==null?void 0:n.organization)==null?void 0:e.name,username:(o=n==null?void 0:n.user)==null?void 0:o.username}));},p=n=>{if(n!=null&&n.slug)return n.slug;if(!(n!=null&&n.asset_type))return t(n,"missing_asset_type"),"#";if(n.asset_type==="conversation")return `/conversations/${n.id}`;if(n.asset_type==="comment")return `/comments/${n.id}`;let r=g(n),i=n.name_url_slug||n.id||(n.name?_(n.name):void 0);return !r||!i?(t(n,r?"missing_asset_name":"missing_entity_name"),"#"):`/${n.asset_type}s/${r}/${i}`};var d=(n,r)=>{let i=p(n);if(i==="#")return i;let e=r!=null&&r.intent?`?intent=${r.intent}`:"",o=`${i}${e}`;return r!=null&&r.filters&&(o+=`?filters=${chunkVGNECRJJ_cjs.a(r.filters)}`),o};exports.a=_;exports.b=p;exports.c=d;//# sourceMappingURL=chunk-MOEVC3KD.cjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-MOEVC3KD.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/navigate.ts"],"names":["createNameUrlSlug","name","getEntityName","asset","_a","_b","_c","_d","GLOBAL_ORG_ID","missingAssetUrlWarnings","warnMissingAssetUrlData","reason","key","createUrlSlug","entityName","getAssetUrl","config","slug","pathPostfix","url","filterListToString"],"mappings":"qHAGA,IAAMA,CAAqBC,CAAAA,CAAAA,EAEvBA,CAEG,CAAA,WAAA,GAEA,SAAU,CAAA,KAAK,CAEf,CAAA,OAAA,CAAQ,kBAAoB,CAAA,EAAE,CAE9B,CAAA,OAAA,CAAQ,aAAc,GAAG,CAAA,CAEzB,OAAQ,CAAA,WAAA,CAAa,EAAE,CAAA,CAEvB,OAAQ,CAAA,QAAA,CAAU,GAAG,CAErB,CAAA,OAAA,CAAQ,KAAO,CAAA,EAAE,CACjB,CAAA,OAAA,CAAQ,KAAO,CAAA,EAAE,EAIlBC,CAAiBC,CAAAA,CAAAA,EAAe,CAxBtC,IAAAC,CAAAC,CAAAA,CAAAA,CAAAC,CAAAC,CAAAA,CAAAA,CAyBE,OAAIJ,CAAM,CAAA,MAAA,GAAWK,mBAAsBJ,CAAAA,CAAAA,CAAAA,CAAAD,CAAM,CAAA,IAAA,GAAN,IAAAC,CAAAA,MAAAA,CAAAA,CAAAA,CAAY,SACnDD,CAAM,CAAA,MAAA,CAAA,CAAeE,CAAAF,CAAAA,CAAAA,CAAM,YAAN,GAAA,IAAA,CAAA,MAAA,CAAAE,CAAoB,CAAA,IAAA,CAAA,CAAA,CACtCC,EAAAH,CAAM,CAAA,YAAA,GAAN,IAAAG,CAAAA,MAAAA,CAAAA,CAAAA,CAAoB,SAAQC,CAAAJ,CAAAA,CAAAA,CAAM,IAAN,GAAA,IAAA,CAAA,MAAA,CAAAI,EAAY,QACjD,CAAA,CAAA,CAEME,CAA0B,CAAA,IAAI,GAE9BC,CAAAA,CAAAA,CAA0B,CAACP,CAAAA,CAAYQ,IAAmB,CAhChE,IAAAP,CAAAC,CAAAA,CAAAA,CAiCE,IAAMO,CAAAA,CAAM,CAAGD,EAAAA,CAAM,KAAIR,CAAA,EAAA,IAAA,CAAA,MA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} from \"./dataset\";\nimport { GLOBAL_ORG_ID } from \"../schema/constants\";\n\nconst createNameUrlSlug = (name: string) => {\n return (\n name\n // Convert to lowercase\n .toLowerCase()\n // Normalize unicode characters\n .normalize(\"NFD\")\n // Remove diacritical marks\n .replace(/[\\u0300-\\u036f]/g, \"\")\n // Replace spaces, forward slashes, and underscores with hyphens\n .replace(/[\\s\\/\\_]+/g, \"-\")\n // Remove special characters\n .replace(/[^\\w\\-]+/g, \"\")\n // Remove multiple consecutive hyphens\n .replace(/\\-\\-+/g, \"-\")\n // Trim hyphens from start and end\n .replace(/^-+/, \"\")\n .replace(/-+$/, \"\")\n );\n};\n\nconst getEntityName = (asset: any) => {\n if (asset.org_id === GLOBAL_ORG_ID) return asset.user?.username;\n if (asset.org_id) return asset.organization?.name;\n return asset.organization?.name || asset.user?.username;\n};\n\nconst missingAssetUrlWarnings = new Set<string>();\n\nconst warnMissingAssetUrlData = (asset: any, reason: string) => {\n const key = `${reason}:${asset?.id || \"no-id\"}:${asset?.asset_type || \"no-type\"}`;\n if (missingAssetUrlWarnings.has(key)) return;\n missingAssetUrlWarnings.add(key);\n\n console.warn(\"[ouro-js] Unable to build asset URL\", {\n reason,\n id: asset?.id,\n asset_type: asset?.asset_type,\n org_id: asset?.org_id,\n user_id: asset?.user_id,\n name: asset?.name,\n name_url_slug: asset?.name_url_slug,\n organization_name: asset?.organization?.name,\n username: asset?.user?.username,\n });\n};\n\nconst createUrlSlug = (asset: any) => {\n if (asset?.slug) {\n return asset.slug;\n }\n if (!asset?.asset_type) {\n warnMissingAssetUrlData(asset, \"missing_asset_type\");\n return \"#\";\n }\n if (asset.asset_type === \"conversation\") {\n return `/conversations/${asset.id}`;\n }\n if (asset.asset_type === \"comment\") {\n return `/comments/${asset.id}`;\n }\n const entityName = getEntityName(asset);\n const name =\n asset.name_url_slug || asset.id || (asset.name ? createNameUrlSlug(asset.name) : undefined);\n if (!entityName || !name) {\n warnMissingAssetUrlData(\n asset,\n !entityName ? \"missing_entity_name\" : \"missing_asset_name\"\n );\n return \"#\";\n }\n const assetType = asset.asset_type;\n return `/${assetType}s/${entityName}/${name}`;\n};\n\nconst getParentAssetUrl = (asset: any, config?: any): string => {\n if (!asset?.parent) return \"#\";\n const postfix = asset.asset_type === \"comment\" ? `#comment-${asset.id}` : \"\";\n return `${getAssetUrl(asset.parent, config)}${postfix}`;\n};\n\nconst getAssetUrl = (\n asset: any,\n config?: {\n intent?: \"share\";\n filters?: { column: string; value: string; operator: string }[];\n }\n) => {\n // const assetType = asset?.asset_type || asset?.assetType;\n const slug = createUrlSlug(asset);\n if (slug === \"#\") {\n return slug;\n }\n const pathPostfix = config?.intent ? `?intent=${config.intent}` : \"\";\n let url = `${slug}${pathPostfix}`;\n if (config?.filters) {\n url += `?filters=${filterListToString(config.filters)}`;\n }\n\n return url;\n};\n\nexport { getAssetUrl, createUrlSlug, createNameUrlSlug };\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkDHQJ2FCF_cjs=require('./chunk-DHQJ2FCF.cjs'),chunkVGNECRJJ_cjs=require('./chunk-VGNECRJJ.cjs'),chunkL2EAP5SJ_cjs=require('./chunk-L2EAP5SJ.cjs'),chunkN6AJDETI_cjs=require('./chunk-N6AJDETI.cjs'),chunkOFSSOFOC_cjs=require('./chunk-OFSSOFOC.cjs'),chunk7RF362MN_cjs=require('./chunk-7RF362MN.cjs'),chunkT4BUMCXS_cjs=require('./chunk-T4BUMCXS.cjs'),chunk6TOGDJKP_cjs=require('./chunk-6TOGDJKP.cjs'),chunkFNW6DDNP_cjs=require('./chunk-FNW6DDNP.cjs'),chunkUORCDNEC_cjs=require('./chunk-UORCDNEC.cjs'),chunk6AK3RVZR_cjs=require('./chunk-6AK3RVZR.cjs'),chunkP5JYABNP_cjs=require('./chunk-P5JYABNP.cjs'),chunkCVFVOARW_cjs=require('./chunk-CVFVOARW.cjs'),chunkV5DSXK34_cjs=require('./chunk-V5DSXK34.cjs'),chunkKYK27OHG_cjs=require('./chunk-KYK27OHG.cjs'),chunkFQ4F7DQH_cjs=require('./chunk-FQ4F7DQH.cjs'),chunkIW4MZW5P_cjs=require('./chunk-IW4MZW5P.cjs'),chunkOIPOIY6M_cjs=require('./chunk-OIPOIY6M.cjs'),chunkGY6SLMMJ_cjs=require('./chunk-GY6SLMMJ.cjs'),chunk3ZHWBPGA_cjs=require('./chunk-3ZHWBPGA.cjs');require('./chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"createNameUrlSlug",{enumerable:true,get:function(){return chunkDHQJ2FCF_cjs.a}});Object.defineProperty(exports,"createUrlSlug",{enumerable:true,get:function(){return chunkDHQJ2FCF_cjs.b}});Object.defineProperty(exports,"getAssetUrl",{enumerable:true,get:function(){return chunkDHQJ2FCF_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 chunkOFSSOFOC_cjs.b}});Object.defineProperty(exports,"FileSchema",{enumerable:true,get:function(){return chunkOFSSOFOC_cjs.a}});Object.defineProperty(exports,"updateFileSchema",{enumerable:true,get:function(){return chunkOFSSOFOC_cjs.c}});Object.defineProperty(exports,"NotificationSchema",{enumerable:true,get:function(){return chunk7RF362MN_cjs.a}});Object.defineProperty(exports,"reactionSchema",{enumerable:true,get:function(){return chunkT4BUMCXS_cjs.a}});Object.defineProperty(exports,"CreateReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.b}});Object.defineProperty(exports,"ReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.a}});Object.defineProperty(exports,"UpdateReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.c}});Object.defineProperty(exports,"ActionSchema",{enumerable:true,get:function(){return chunkFNW6DDNP_cjs.e}});Object.defineProperty(exports,"CreateServiceSchema",{enumerable:true,get:function(){return chunkFNW6DDNP_cjs.b}});Object.defineProperty(exports,"RouteSchema",{enumerable:true,get:function(){return chunkFNW6DDNP_cjs.d}});Object.defineProperty(exports,"ServiceSchema",{enumerable:true,get:function(){return chunkFNW6DDNP_cjs.a}});Object.defineProperty(exports,"UpdateServiceSchema",{enumerable:true,get:function(){return chunkFNW6DDNP_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,"BlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.a}});Object.defineProperty(exports,"CreateBlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.b}});Object.defineProperty(exports,"UpdateBlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.c}});Object.defineProperty(exports,"CommentSchema",{enumerable:true,get:function(){return chunkP5JYABNP_cjs.a}});Object.defineProperty(exports,"CreateCommentSchema",{enumerable:true,get:function(){return chunkP5JYABNP_cjs.b}});Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.c}});Object.defineProperty(exports,"ContentSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.b}});Object.defineProperty(exports,"CreatePostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.d}});Object.defineProperty(exports,"ListPostsSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.g}});Object.defineProperty(exports,"PostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.c}});Object.defineProperty(exports,"ReadPostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.e}});Object.defineProperty(exports,"ReadPostsSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.f}});Object.defineProperty(exports,"TipTapSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.a}});Object.defineProperty(exports,"UpdatePostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.h}});Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.b}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.c}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.a}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.d}});Object.defineProperty(exports,"AssetMetadataSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.b}});Object.defineProperty(exports,"AssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.c}});Object.defineProperty(exports,"CreateAssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.d}});Object.defineProperty(exports,"UpdateAssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.e}});Object.defineProperty(exports,"normalizeAssetConfigForParsing",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.a}});Object.defineProperty(exports,"CreateTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.b}});Object.defineProperty(exports,"ReadTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.c}});Object.defineProperty(exports,"ReadTeamsSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.d}});Object.defineProperty(exports,"TeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.a}});Object.defineProperty(exports,"UpdateTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.e}});Object.defineProperty(exports,"ActorTypePolicySchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.a}});Object.defineProperty(exports,"MembershipSchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.d}});Object.defineProperty(exports,"OrganizationsSchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.c}});Object.defineProperty(exports,"SourcePolicySchema",{enumerable:true,get:function(){return chunkOIPOIY6M_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 chunk3ZHWBPGA_cjs.a}});Object.defineProperty(exports,"ConnectionSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.g}});Object.defineProperty(exports,"EmbeddingSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.f}});Object.defineProperty(exports,"MonetizationSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.d}});Object.defineProperty(exports,"PermissionSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.i}});Object.defineProperty(exports,"PriceCurrencySchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.e}});Object.defineProperty(exports,"PurchaseAssetSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.h}});Object.defineProperty(exports,"RoleSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.c}});Object.defineProperty(exports,"SourceSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.k}});Object.defineProperty(exports,"StatusSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.j}});Object.defineProperty(exports,"VisibilitySchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_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'),chunkOFSSOFOC_cjs=require('./chunk-OFSSOFOC.cjs'),chunk7RF362MN_cjs=require('./chunk-7RF362MN.cjs'),chunkT4BUMCXS_cjs=require('./chunk-T4BUMCXS.cjs'),chunk6TOGDJKP_cjs=require('./chunk-6TOGDJKP.cjs'),chunkD7S2GB7Z_cjs=require('./chunk-D7S2GB7Z.cjs'),chunkUORCDNEC_cjs=require('./chunk-UORCDNEC.cjs'),chunk6AK3RVZR_cjs=require('./chunk-6AK3RVZR.cjs'),chunkP5JYABNP_cjs=require('./chunk-P5JYABNP.cjs'),chunkCVFVOARW_cjs=require('./chunk-CVFVOARW.cjs'),chunkV5DSXK34_cjs=require('./chunk-V5DSXK34.cjs'),chunkKYK27OHG_cjs=require('./chunk-KYK27OHG.cjs'),chunkFQ4F7DQH_cjs=require('./chunk-FQ4F7DQH.cjs'),chunkIW4MZW5P_cjs=require('./chunk-IW4MZW5P.cjs'),chunkOIPOIY6M_cjs=require('./chunk-OIPOIY6M.cjs'),chunkGY6SLMMJ_cjs=require('./chunk-GY6SLMMJ.cjs'),chunk3ZHWBPGA_cjs=require('./chunk-3ZHWBPGA.cjs');require('./chunk-7HF5VHUN.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 chunkOFSSOFOC_cjs.b}});Object.defineProperty(exports,"FileSchema",{enumerable:true,get:function(){return chunkOFSSOFOC_cjs.a}});Object.defineProperty(exports,"updateFileSchema",{enumerable:true,get:function(){return chunkOFSSOFOC_cjs.c}});Object.defineProperty(exports,"NotificationSchema",{enumerable:true,get:function(){return chunk7RF362MN_cjs.a}});Object.defineProperty(exports,"reactionSchema",{enumerable:true,get:function(){return chunkT4BUMCXS_cjs.a}});Object.defineProperty(exports,"CreateReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.b}});Object.defineProperty(exports,"ReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.a}});Object.defineProperty(exports,"UpdateReplicationSchema",{enumerable:true,get:function(){return chunk6TOGDJKP_cjs.c}});Object.defineProperty(exports,"ActionSchema",{enumerable:true,get:function(){return chunkD7S2GB7Z_cjs.e}});Object.defineProperty(exports,"CreateServiceSchema",{enumerable:true,get:function(){return chunkD7S2GB7Z_cjs.b}});Object.defineProperty(exports,"RouteSchema",{enumerable:true,get:function(){return chunkD7S2GB7Z_cjs.d}});Object.defineProperty(exports,"ServiceSchema",{enumerable:true,get:function(){return chunkD7S2GB7Z_cjs.a}});Object.defineProperty(exports,"UpdateServiceSchema",{enumerable:true,get:function(){return chunkD7S2GB7Z_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,"BlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.a}});Object.defineProperty(exports,"CreateBlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.b}});Object.defineProperty(exports,"UpdateBlueprintSchema",{enumerable:true,get:function(){return chunk6AK3RVZR_cjs.c}});Object.defineProperty(exports,"CommentSchema",{enumerable:true,get:function(){return chunkP5JYABNP_cjs.a}});Object.defineProperty(exports,"CreateCommentSchema",{enumerable:true,get:function(){return chunkP5JYABNP_cjs.b}});Object.defineProperty(exports,"ConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.a}});Object.defineProperty(exports,"CreateConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.b}});Object.defineProperty(exports,"MessageSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.d}});Object.defineProperty(exports,"UpdateConversationSchema",{enumerable:true,get:function(){return chunkCVFVOARW_cjs.c}});Object.defineProperty(exports,"ContentSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.b}});Object.defineProperty(exports,"CreatePostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.d}});Object.defineProperty(exports,"ListPostsSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.g}});Object.defineProperty(exports,"PostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.c}});Object.defineProperty(exports,"ReadPostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.e}});Object.defineProperty(exports,"ReadPostsSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.f}});Object.defineProperty(exports,"TipTapSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.a}});Object.defineProperty(exports,"UpdatePostSchema",{enumerable:true,get:function(){return chunkV5DSXK34_cjs.h}});Object.defineProperty(exports,"CreateDatasetFromFileSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.b}});Object.defineProperty(exports,"CreateDatasetFromSchemaSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.c}});Object.defineProperty(exports,"DatasetSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.a}});Object.defineProperty(exports,"updateDatasetSchema",{enumerable:true,get:function(){return chunkKYK27OHG_cjs.d}});Object.defineProperty(exports,"AssetMetadataSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.b}});Object.defineProperty(exports,"AssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.c}});Object.defineProperty(exports,"CreateAssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.d}});Object.defineProperty(exports,"UpdateAssetSchema",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.e}});Object.defineProperty(exports,"normalizeAssetConfigForParsing",{enumerable:true,get:function(){return chunkFQ4F7DQH_cjs.a}});Object.defineProperty(exports,"CreateTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.b}});Object.defineProperty(exports,"ReadTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.c}});Object.defineProperty(exports,"ReadTeamsSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.d}});Object.defineProperty(exports,"TeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.a}});Object.defineProperty(exports,"UpdateTeamSchema",{enumerable:true,get:function(){return chunkIW4MZW5P_cjs.e}});Object.defineProperty(exports,"ActorTypePolicySchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.a}});Object.defineProperty(exports,"MembershipSchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.d}});Object.defineProperty(exports,"OrganizationsSchema",{enumerable:true,get:function(){return chunkOIPOIY6M_cjs.c}});Object.defineProperty(exports,"SourcePolicySchema",{enumerable:true,get:function(){return chunkOIPOIY6M_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 chunk3ZHWBPGA_cjs.a}});Object.defineProperty(exports,"ConnectionSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.g}});Object.defineProperty(exports,"EmbeddingSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.f}});Object.defineProperty(exports,"MonetizationSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.d}});Object.defineProperty(exports,"PermissionSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.i}});Object.defineProperty(exports,"PriceCurrencySchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.e}});Object.defineProperty(exports,"PurchaseAssetSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.h}});Object.defineProperty(exports,"RoleSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.c}});Object.defineProperty(exports,"SourceSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.k}});Object.defineProperty(exports,"StatusSchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.j}});Object.defineProperty(exports,"VisibilitySchema",{enumerable:true,get:function(){return chunk3ZHWBPGA_cjs.b}});//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as createNameUrlSlug,b as createUrlSlug,c as getAssetUrl}from'./chunk-
|
|
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-TGAK4B5M.js';export{a as NotificationSchema}from'./chunk-XIH622YH.js';export{a as reactionSchema}from'./chunk-WE6CXCEQ.js';export{b as CreateReplicationSchema,a as ReplicationSchema,c as UpdateReplicationSchema}from'./chunk-BU2S7UEL.js';export{e as ActionSchema,b as CreateServiceSchema,d as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'./chunk-5V7HPXUK.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 BlueprintSchema,b as CreateBlueprintSchema,c as UpdateBlueprintSchema}from'./chunk-JPCZIGX2.js';export{a as CommentSchema,b as CreateCommentSchema}from'./chunk-SKQ6BRPY.js';export{a as ConversationSchema,b as CreateConversationSchema,d as MessageSchema,c as UpdateConversationSchema}from'./chunk-Q34MIANF.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-XWUYZSVO.js';export{b as CreateDatasetFromFileSchema,c as CreateDatasetFromSchemaSchema,a as DatasetSchema,d as updateDatasetSchema}from'./chunk-7SSENGQL.js';export{b as AssetMetadataSchema,c as AssetSchema,d as CreateAssetSchema,e as UpdateAssetSchema,a as normalizeAssetConfigForParsing}from'./chunk-KZOOYWQ7.js';export{b as CreateTeamSchema,c as ReadTeamSchema,d as ReadTeamsSchema,a as TeamSchema,e as UpdateTeamSchema}from'./chunk-WYHO26N6.js';export{a as ActorTypePolicySchema,d as MembershipSchema,c as OrganizationsSchema,b as SourcePolicySchema}from'./chunk-MB4EEZKP.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-7ABFUHWW.js';import'./chunk-DUBPWSCA.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/schema/assets.d.cts
CHANGED
|
@@ -194,11 +194,11 @@ declare const AssetSchema: z.ZodObject<{
|
|
|
194
194
|
license_id: z.ZodString;
|
|
195
195
|
license: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
196
196
|
asset_type: z.ZodEnum<{
|
|
197
|
+
file: "file";
|
|
197
198
|
user: "user";
|
|
198
199
|
organization: "organization";
|
|
199
200
|
team: "team";
|
|
200
201
|
dataset: "dataset";
|
|
201
|
-
file: "file";
|
|
202
202
|
service: "service";
|
|
203
203
|
route: "route";
|
|
204
204
|
post: "post";
|
|
@@ -257,25 +257,26 @@ declare const AssetSchema: z.ZodObject<{
|
|
|
257
257
|
preview: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
|
|
258
258
|
state: z.ZodEnum<{
|
|
259
259
|
success: "success";
|
|
260
|
+
error: "error";
|
|
260
261
|
queued: "queued";
|
|
261
262
|
"in-progress": "in-progress";
|
|
262
263
|
"timed-out": "timed-out";
|
|
263
|
-
error: "error";
|
|
264
264
|
}>;
|
|
265
265
|
source: z.ZodEnum<{
|
|
266
|
-
api: "api";
|
|
267
266
|
web: "web";
|
|
267
|
+
api: "api";
|
|
268
268
|
}>;
|
|
269
269
|
created_at: z.ZodString;
|
|
270
270
|
last_updated: z.ZodString;
|
|
271
271
|
}, z.core.$strip>;
|
|
272
272
|
declare const CreateAssetSchema: z.ZodObject<{
|
|
273
|
+
parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
273
274
|
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
275
|
+
file: "file";
|
|
274
276
|
user: "user";
|
|
275
277
|
organization: "organization";
|
|
276
278
|
team: "team";
|
|
277
279
|
dataset: "dataset";
|
|
278
|
-
file: "file";
|
|
279
280
|
service: "service";
|
|
280
281
|
route: "route";
|
|
281
282
|
post: "post";
|
|
@@ -285,29 +286,15 @@ declare const CreateAssetSchema: z.ZodObject<{
|
|
|
285
286
|
blueprint: "blueprint";
|
|
286
287
|
replication: "replication";
|
|
287
288
|
}>>;
|
|
288
|
-
parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
289
|
-
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
290
|
-
doi_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
|
-
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
-
paper_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
293
|
-
github_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
294
|
-
originality: z.ZodEnum<{
|
|
295
|
-
original: "original";
|
|
296
|
-
derivative: "derivative";
|
|
297
|
-
"third-party": "third-party";
|
|
298
|
-
}>;
|
|
299
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
300
|
-
reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
-
}, z.core.$strip>>>>;
|
|
302
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
303
|
-
json: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
304
|
-
text: z.ZodString;
|
|
305
|
-
}, z.core.$strip>>>>;
|
|
306
289
|
monetization: z.ZodOptional<z.ZodEnum<{
|
|
307
290
|
none: "none";
|
|
308
291
|
"pay-to-unlock": "pay-to-unlock";
|
|
309
292
|
"pay-per-use": "pay-per-use";
|
|
310
293
|
}>>;
|
|
294
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
295
|
+
json: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
296
|
+
text: z.ZodString;
|
|
297
|
+
}, z.core.$strip>>>>;
|
|
311
298
|
parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
|
|
312
299
|
license_id: z.ZodOptional<z.ZodString>;
|
|
313
300
|
price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
@@ -324,6 +311,19 @@ declare const CreateAssetSchema: z.ZodObject<{
|
|
|
324
311
|
stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
325
312
|
stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
326
313
|
stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
314
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
315
|
+
doi_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
|
+
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
paper_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
318
|
+
github_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
originality: z.ZodEnum<{
|
|
320
|
+
original: "original";
|
|
321
|
+
derivative: "derivative";
|
|
322
|
+
"third-party": "third-party";
|
|
323
|
+
}>;
|
|
324
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
+
reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
}, z.core.$strip>>>>;
|
|
327
327
|
preview: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>>;
|
|
328
328
|
id: z.ZodDefault<z.ZodUUID>;
|
|
329
329
|
team_id: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
|
|
@@ -332,14 +332,14 @@ declare const CreateAssetSchema: z.ZodObject<{
|
|
|
332
332
|
name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
333
|
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
334
334
|
success: "success";
|
|
335
|
+
error: "error";
|
|
335
336
|
queued: "queued";
|
|
336
337
|
"in-progress": "in-progress";
|
|
337
338
|
"timed-out": "timed-out";
|
|
338
|
-
error: "error";
|
|
339
339
|
}>>>;
|
|
340
340
|
source: z.ZodDefault<z.ZodEnum<{
|
|
341
|
-
api: "api";
|
|
342
341
|
web: "web";
|
|
342
|
+
api: "api";
|
|
343
343
|
}>>;
|
|
344
344
|
visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
345
345
|
organization: "organization";
|
|
@@ -352,12 +352,17 @@ declare const CreateAssetSchema: z.ZodObject<{
|
|
|
352
352
|
last_updated: z.ZodDefault<z.ZodString>;
|
|
353
353
|
}, z.core.$strip>;
|
|
354
354
|
declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
355
|
+
parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
356
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
357
|
+
web: "web";
|
|
358
|
+
api: "api";
|
|
359
|
+
}>>;
|
|
355
360
|
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
361
|
+
file: "file";
|
|
356
362
|
user: "user";
|
|
357
363
|
organization: "organization";
|
|
358
364
|
team: "team";
|
|
359
365
|
dataset: "dataset";
|
|
360
|
-
file: "file";
|
|
361
366
|
service: "service";
|
|
362
367
|
route: "route";
|
|
363
368
|
post: "post";
|
|
@@ -367,24 +372,6 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
367
372
|
blueprint: "blueprint";
|
|
368
373
|
replication: "replication";
|
|
369
374
|
}>>;
|
|
370
|
-
org_id: z.ZodOptional<z.ZodUUID>;
|
|
371
|
-
parent: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
372
|
-
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
373
|
-
doi_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
-
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
375
|
-
paper_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
|
-
github_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
377
|
-
originality: z.ZodEnum<{
|
|
378
|
-
original: "original";
|
|
379
|
-
derivative: "derivative";
|
|
380
|
-
"third-party": "third-party";
|
|
381
|
-
}>;
|
|
382
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
383
|
-
reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
384
|
-
}, z.core.$strip>>>>;
|
|
385
|
-
last_updated: z.ZodOptional<z.ZodString>;
|
|
386
|
-
name: z.ZodOptional<z.ZodString>;
|
|
387
|
-
team_id: z.ZodOptional<z.ZodUUID>;
|
|
388
375
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
389
376
|
organization: "organization";
|
|
390
377
|
public: "public";
|
|
@@ -392,14 +379,6 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
392
379
|
monetized: "monetized";
|
|
393
380
|
inherit: "inherit";
|
|
394
381
|
}>>;
|
|
395
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
396
|
-
json: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
397
|
-
text: z.ZodString;
|
|
398
|
-
}, z.core.$strip>>>>;
|
|
399
|
-
source: z.ZodOptional<z.ZodEnum<{
|
|
400
|
-
api: "api";
|
|
401
|
-
web: "web";
|
|
402
|
-
}>>;
|
|
403
382
|
monetization: z.ZodOptional<z.ZodEnum<{
|
|
404
383
|
none: "none";
|
|
405
384
|
"pay-to-unlock": "pay-to-unlock";
|
|
@@ -407,11 +386,18 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
407
386
|
}>>;
|
|
408
387
|
state: z.ZodOptional<z.ZodEnum<{
|
|
409
388
|
success: "success";
|
|
389
|
+
error: "error";
|
|
410
390
|
queued: "queued";
|
|
411
391
|
"in-progress": "in-progress";
|
|
412
392
|
"timed-out": "timed-out";
|
|
413
|
-
error: "error";
|
|
414
393
|
}>>;
|
|
394
|
+
name: z.ZodOptional<z.ZodString>;
|
|
395
|
+
org_id: z.ZodOptional<z.ZodUUID>;
|
|
396
|
+
team_id: z.ZodOptional<z.ZodUUID>;
|
|
397
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
398
|
+
json: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
399
|
+
text: z.ZodString;
|
|
400
|
+
}, z.core.$strip>>>>;
|
|
415
401
|
parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
|
|
416
402
|
license_id: z.ZodOptional<z.ZodString>;
|
|
417
403
|
license: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
@@ -430,31 +416,35 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
430
416
|
stripe_product_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
431
417
|
stripe_price_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
432
418
|
stripe_meter_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
419
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
420
|
+
doi_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
421
|
+
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
|
+
paper_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
github_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
+
originality: z.ZodEnum<{
|
|
425
|
+
original: "original";
|
|
426
|
+
derivative: "derivative";
|
|
427
|
+
"third-party": "third-party";
|
|
428
|
+
}>;
|
|
429
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
+
reply_to_comment_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
|
+
}, z.core.$strip>>>>;
|
|
433
432
|
preview: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>>;
|
|
433
|
+
last_updated: z.ZodOptional<z.ZodString>;
|
|
434
434
|
}, z.core.$strip>, z.ZodTransform<{
|
|
435
|
-
asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
436
|
-
org_id?: string | undefined;
|
|
437
435
|
parent?: Record<string, any> | undefined;
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
github_url?: string | null | undefined;
|
|
444
|
-
source?: string | null | undefined;
|
|
445
|
-
reply_to_comment_id?: string | null | undefined;
|
|
446
|
-
} | null | undefined;
|
|
447
|
-
last_updated?: string | undefined;
|
|
436
|
+
source?: "web" | "api" | undefined;
|
|
437
|
+
asset_type?: "file" | "user" | "organization" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
438
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
439
|
+
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
440
|
+
state?: "success" | "error" | "queued" | "in-progress" | "timed-out" | undefined;
|
|
448
441
|
name?: string | undefined;
|
|
442
|
+
org_id?: string | undefined;
|
|
449
443
|
team_id?: string | undefined;
|
|
450
|
-
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
451
444
|
description?: {
|
|
452
445
|
json: Record<string, any>;
|
|
453
446
|
text: string;
|
|
454
447
|
} | null | undefined;
|
|
455
|
-
source?: "api" | "web" | undefined;
|
|
456
|
-
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
457
|
-
state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
|
|
458
448
|
parent_id?: string | null | undefined;
|
|
459
449
|
license_id?: string | undefined;
|
|
460
450
|
license?: Record<string, any> | undefined;
|
|
@@ -467,11 +457,6 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
467
457
|
stripe_product_id?: string | null | undefined;
|
|
468
458
|
stripe_price_id?: string | null | undefined;
|
|
469
459
|
stripe_meter_id?: string | null | undefined;
|
|
470
|
-
preview?: Record<string, any>[] | null | undefined;
|
|
471
|
-
}, {
|
|
472
|
-
asset_type?: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
473
|
-
org_id?: string | undefined;
|
|
474
|
-
parent?: Record<string, any> | undefined;
|
|
475
460
|
metadata?: {
|
|
476
461
|
originality: "original" | "derivative" | "third-party";
|
|
477
462
|
doi_url?: string | null | undefined;
|
|
@@ -481,17 +466,22 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
481
466
|
source?: string | null | undefined;
|
|
482
467
|
reply_to_comment_id?: string | null | undefined;
|
|
483
468
|
} | null | undefined;
|
|
469
|
+
preview?: Record<string, any>[] | null | undefined;
|
|
484
470
|
last_updated?: string | undefined;
|
|
471
|
+
}, {
|
|
472
|
+
parent?: Record<string, any> | undefined;
|
|
473
|
+
source?: "web" | "api" | undefined;
|
|
474
|
+
asset_type?: "file" | "user" | "organization" | "team" | "dataset" | "service" | "route" | "post" | "quest" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
475
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
476
|
+
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
477
|
+
state?: "success" | "error" | "queued" | "in-progress" | "timed-out" | undefined;
|
|
485
478
|
name?: string | undefined;
|
|
479
|
+
org_id?: string | undefined;
|
|
486
480
|
team_id?: string | undefined;
|
|
487
|
-
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
488
481
|
description?: {
|
|
489
482
|
json: Record<string, any>;
|
|
490
483
|
text: string;
|
|
491
484
|
} | null | undefined;
|
|
492
|
-
source?: "api" | "web" | undefined;
|
|
493
|
-
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
494
|
-
state?: "success" | "queued" | "in-progress" | "timed-out" | "error" | undefined;
|
|
495
485
|
parent_id?: string | null | undefined;
|
|
496
486
|
license_id?: string | undefined;
|
|
497
487
|
license?: Record<string, any> | undefined;
|
|
@@ -504,7 +494,17 @@ declare const UpdateAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
|
504
494
|
stripe_product_id?: string | null | undefined;
|
|
505
495
|
stripe_price_id?: string | null | undefined;
|
|
506
496
|
stripe_meter_id?: string | null | undefined;
|
|
497
|
+
metadata?: {
|
|
498
|
+
originality: "original" | "derivative" | "third-party";
|
|
499
|
+
doi_url?: string | null | undefined;
|
|
500
|
+
external_url?: string | null | undefined;
|
|
501
|
+
paper_url?: string | null | undefined;
|
|
502
|
+
github_url?: string | null | undefined;
|
|
503
|
+
source?: string | null | undefined;
|
|
504
|
+
reply_to_comment_id?: string | null | undefined;
|
|
505
|
+
} | null | undefined;
|
|
507
506
|
preview?: Record<string, any>[] | null | undefined;
|
|
507
|
+
last_updated?: string | undefined;
|
|
508
508
|
}>>;
|
|
509
509
|
|
|
510
510
|
type AssetMetadata = z.infer<typeof AssetMetadataSchema>;
|