@ourofoundation/ouro-js 1.1.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +801 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8045 -0
- package/dist/index.d.ts +8045 -18
- package/dist/index.js +740 -1
- package/dist/index.js.map +1 -1
- package/package.json +19 -36
- package/tsup.config.ts +12 -0
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/schema/assets.d.ts +0 -611
- package/dist/schema/assets.esm.js +0 -2
- package/dist/schema/assets.esm.js.map +0 -1
- package/dist/schema/assets.js +0 -2
- package/dist/schema/assets.js.map +0 -1
- package/dist/schema/blueprints.d.ts +0 -553
- package/dist/schema/blueprints.esm.js +0 -2
- package/dist/schema/blueprints.esm.js.map +0 -1
- package/dist/schema/blueprints.js +0 -2
- package/dist/schema/blueprints.js.map +0 -1
- package/dist/schema/comments.d.ts +0 -537
- package/dist/schema/comments.esm.js +0 -2
- package/dist/schema/comments.esm.js.map +0 -1
- package/dist/schema/comments.js +0 -2
- package/dist/schema/comments.js.map +0 -1
- package/dist/schema/common.d.ts +0 -138
- package/dist/schema/common.esm.js +0 -2
- package/dist/schema/common.esm.js.map +0 -1
- package/dist/schema/common.js +0 -2
- package/dist/schema/common.js.map +0 -1
- package/dist/schema/conversations.d.ts +0 -709
- package/dist/schema/conversations.esm.js +0 -2
- package/dist/schema/conversations.esm.js.map +0 -1
- package/dist/schema/conversations.js +0 -2
- package/dist/schema/conversations.js.map +0 -1
- package/dist/schema/datasets.d.ts +0 -1056
- package/dist/schema/datasets.esm.js +0 -2
- package/dist/schema/datasets.esm.js.map +0 -1
- package/dist/schema/datasets.js +0 -2
- package/dist/schema/datasets.js.map +0 -1
- package/dist/schema/files.d.ts +0 -1024
- package/dist/schema/files.esm.js +0 -2
- package/dist/schema/files.esm.js.map +0 -1
- package/dist/schema/files.js +0 -2
- package/dist/schema/files.js.map +0 -1
- package/dist/schema/index.d.ts +0 -14
- package/dist/schema/index.js +0 -63
- package/dist/schema/notifications.d.ts +0 -97
- package/dist/schema/notifications.esm.js +0 -2
- package/dist/schema/notifications.esm.js.map +0 -1
- package/dist/schema/notifications.js +0 -2
- package/dist/schema/notifications.js.map +0 -1
- package/dist/schema/organizations.d.ts +0 -70
- package/dist/schema/organizations.esm.js +0 -2
- package/dist/schema/organizations.esm.js.map +0 -1
- package/dist/schema/organizations.js +0 -2
- package/dist/schema/organizations.js.map +0 -1
- package/dist/schema/posts.d.ts +0 -1848
- package/dist/schema/posts.esm.js +0 -2
- package/dist/schema/posts.esm.js.map +0 -1
- package/dist/schema/posts.js +0 -2
- package/dist/schema/posts.js.map +0 -1
- package/dist/schema/replications.d.ts +0 -610
- package/dist/schema/replications.esm.js +0 -2
- package/dist/schema/replications.esm.js.map +0 -1
- package/dist/schema/replications.js +0 -2
- package/dist/schema/replications.js.map +0 -1
- package/dist/schema/services.d.ts +0 -86
- package/dist/schema/services.esm.js +0 -2
- package/dist/schema/services.esm.js.map +0 -1
- package/dist/schema/services.js +0 -2
- package/dist/schema/services.js.map +0 -1
- package/dist/schema/teams.d.ts +0 -528
- package/dist/schema/teams.esm.js +0 -2
- package/dist/schema/teams.esm.js.map +0 -1
- package/dist/schema/teams.js +0 -2
- package/dist/schema/teams.js.map +0 -1
- package/dist/schema/users.d.ts +0 -132
- package/dist/schema/users.esm.js +0 -2
- package/dist/schema/users.esm.js.map +0 -1
- package/dist/schema/users.js +0 -2
- package/dist/schema/users.js.map +0 -1
- package/dist/types/index.d.ts +0 -14
- package/dist/utils/air/index.d.ts +0 -24
- package/dist/utils/air/index.esm.js +0 -2
- package/dist/utils/air/index.esm.js.map +0 -1
- package/dist/utils/air/index.js +0 -2
- package/dist/utils/air/index.js.map +0 -1
- package/dist/utils/air/markdown-parser.d.ts +0 -1
- package/dist/utils/air/markdown-parser.esm.js +0 -2
- package/dist/utils/air/markdown-parser.esm.js.map +0 -1
- package/dist/utils/air/markdown-parser.js +0 -2
- package/dist/utils/air/markdown-parser.js.map +0 -1
- package/dist/utils/dataset.d.ts +0 -7
- package/dist/utils/dataset.esm.js +0 -2
- package/dist/utils/dataset.esm.js.map +0 -1
- package/dist/utils/dataset.js +0 -2
- package/dist/utils/dataset.js.map +0 -1
- package/dist/utils/navigate.d.ts +0 -11
- package/dist/utils/navigate.esm.js +0 -2
- package/dist/utils/navigate.esm.js.map +0 -1
- package/dist/utils/navigate.js +0 -2
- package/dist/utils/navigate.js.map +0 -1
- package/rollup.config.js +0 -52
package/dist/schema/common.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const AssetTypeSchema: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
3
|
-
declare const VisibilitySchema: z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>;
|
|
4
|
-
declare const RoleSchema: z.ZodEnum<["admin", "read", "write", "none"]>;
|
|
5
|
-
declare const MonetizationSchema: z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>;
|
|
6
|
-
declare const EmbeddingSchema: z.ZodObject<{
|
|
7
|
-
id: z.ZodString;
|
|
8
|
-
user_id: z.ZodString;
|
|
9
|
-
org_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
-
embedding: z.ZodArray<z.ZodNumber, "many">;
|
|
11
|
-
content: z.ZodString;
|
|
12
|
-
asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
13
|
-
asset_id: z.ZodString;
|
|
14
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
15
|
-
created_at: z.ZodString;
|
|
16
|
-
last_updated: z.ZodString;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
id: string;
|
|
19
|
-
user_id: string;
|
|
20
|
-
embedding: number[];
|
|
21
|
-
content: string;
|
|
22
|
-
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
23
|
-
asset_id: string;
|
|
24
|
-
created_at: string;
|
|
25
|
-
last_updated: string;
|
|
26
|
-
org_id?: string | null | undefined;
|
|
27
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
id: string;
|
|
30
|
-
user_id: string;
|
|
31
|
-
embedding: number[];
|
|
32
|
-
content: string;
|
|
33
|
-
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
34
|
-
asset_id: string;
|
|
35
|
-
created_at: string;
|
|
36
|
-
last_updated: string;
|
|
37
|
-
org_id?: string | null | undefined;
|
|
38
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
39
|
-
}>;
|
|
40
|
-
declare const ConnectionSchema: z.ZodObject<{
|
|
41
|
-
id: z.ZodString;
|
|
42
|
-
user_id: z.ZodString;
|
|
43
|
-
type: z.ZodEnum<["comment", "reference", "mention", "action", "component"]>;
|
|
44
|
-
action_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
45
|
-
source_id: z.ZodString;
|
|
46
|
-
target_id: z.ZodString;
|
|
47
|
-
source_asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
48
|
-
target_asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
49
|
-
created_at: z.ZodString;
|
|
50
|
-
last_updated: z.ZodString;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
id: string;
|
|
53
|
-
user_id: string;
|
|
54
|
-
type: "comment" | "reference" | "mention" | "action" | "component";
|
|
55
|
-
created_at: string;
|
|
56
|
-
last_updated: string;
|
|
57
|
-
source_id: string;
|
|
58
|
-
target_id: string;
|
|
59
|
-
source_asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
60
|
-
target_asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
61
|
-
action_id?: string | null | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
id: string;
|
|
64
|
-
user_id: string;
|
|
65
|
-
type: "comment" | "reference" | "mention" | "action" | "component";
|
|
66
|
-
created_at: string;
|
|
67
|
-
last_updated: string;
|
|
68
|
-
source_id: string;
|
|
69
|
-
target_id: string;
|
|
70
|
-
source_asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
71
|
-
target_asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
72
|
-
action_id?: string | null | undefined;
|
|
73
|
-
}>;
|
|
74
|
-
declare const PurchaseAssetSchema: z.ZodObject<{
|
|
75
|
-
assetId: z.ZodString;
|
|
76
|
-
method: z.ZodEnum<["checkout", "api"]>;
|
|
77
|
-
assetType: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
assetId: string;
|
|
80
|
-
method: "checkout" | "api";
|
|
81
|
-
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
82
|
-
}, {
|
|
83
|
-
assetId: string;
|
|
84
|
-
method: "checkout" | "api";
|
|
85
|
-
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
86
|
-
}>;
|
|
87
|
-
declare const PermissionSchema: z.ZodObject<{
|
|
88
|
-
id: z.ZodString;
|
|
89
|
-
role: z.ZodEnum<["admin", "read", "write", "none"]>;
|
|
90
|
-
user: z.ZodObject<{
|
|
91
|
-
user_id: z.ZodString;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
user_id: string;
|
|
94
|
-
}, {
|
|
95
|
-
user_id: string;
|
|
96
|
-
}>;
|
|
97
|
-
user_id: z.ZodNullable<z.ZodString>;
|
|
98
|
-
org_id: z.ZodNullable<z.ZodString>;
|
|
99
|
-
asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
100
|
-
asset_id: z.ZodString;
|
|
101
|
-
created_at: z.ZodString;
|
|
102
|
-
last_updated: z.ZodString;
|
|
103
|
-
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
user: {
|
|
105
|
-
user_id: string;
|
|
106
|
-
};
|
|
107
|
-
id: string;
|
|
108
|
-
user_id: string | null;
|
|
109
|
-
org_id: string | null;
|
|
110
|
-
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
111
|
-
asset_id: string;
|
|
112
|
-
created_at: string;
|
|
113
|
-
last_updated: string;
|
|
114
|
-
role: "admin" | "read" | "write" | "none";
|
|
115
|
-
}, {
|
|
116
|
-
user: {
|
|
117
|
-
user_id: string;
|
|
118
|
-
};
|
|
119
|
-
id: string;
|
|
120
|
-
user_id: string | null;
|
|
121
|
-
org_id: string | null;
|
|
122
|
-
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
123
|
-
asset_id: string;
|
|
124
|
-
created_at: string;
|
|
125
|
-
last_updated: string;
|
|
126
|
-
role: "admin" | "read" | "write" | "none";
|
|
127
|
-
}>;
|
|
128
|
-
declare const StatusSchema: z.ZodEnum<["queued", "in-progress", "success", "error"]>;
|
|
129
|
-
export { RoleSchema, VisibilitySchema, MonetizationSchema, ConnectionSchema, EmbeddingSchema, AssetTypeSchema, PurchaseAssetSchema, PermissionSchema, StatusSchema, };
|
|
130
|
-
export type Role = z.infer<typeof RoleSchema>;
|
|
131
|
-
export type Connection = z.infer<typeof ConnectionSchema>;
|
|
132
|
-
export type Embedding = z.infer<typeof EmbeddingSchema>;
|
|
133
|
-
export type Visibility = z.infer<typeof VisibilitySchema>;
|
|
134
|
-
export type Monetization = z.infer<typeof MonetizationSchema>;
|
|
135
|
-
export type AssetTypes = z.infer<typeof AssetTypeSchema>;
|
|
136
|
-
export type PurchaseAsset = z.infer<typeof PurchaseAssetSchema>;
|
|
137
|
-
export type Permission = z.infer<typeof PermissionSchema>;
|
|
138
|
-
export type Status = z.infer<typeof StatusSchema>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";const t=e.enum(["user","organization","team","dataset","file","service","route","post","comment","conversation","blueprint","replication"]),i=e.enum(["public","private","organization","monetized","inherit"]),n=e.enum(["admin","read","write","none"]),r=e.enum(["none","pay-to-unlock","pay-per-use"]),s=e.object({id:e.string(),user_id:e.string(),org_id:e.string().nullable().optional(),embedding:e.array(e.number()),content:e.string(),asset_type:t,asset_id:e.string(),metadata:e.object({}).passthrough().nullable().optional(),created_at:e.string(),last_updated:e.string()}),u=e.enum(["comment","reference","mention","action","component"]),a=e.object({id:e.string().uuid(),user_id:e.string().uuid(),type:u,action_id:e.string().uuid().optional().nullable(),source_id:e.string().uuid(),target_id:e.string().uuid(),source_asset_type:t,target_asset_type:t,created_at:e.string(),last_updated:e.string()}),o=e.object({assetId:e.string().uuid(),method:e.enum(["checkout","api"]),assetType:t}),d=e.object({id:e.string().uuid(),role:n,user:e.object({user_id:e.string().uuid()}),user_id:e.string().uuid().nullable(),org_id:e.string().uuid().nullable(),asset_type:t,asset_id:e.string().uuid(),created_at:e.string(),last_updated:e.string()}),g=e.enum(["queued","in-progress","success","error"]);export{t as AssetTypeSchema,a as ConnectionSchema,s as EmbeddingSchema,r as MonetizationSchema,d as PermissionSchema,o as PurchaseAssetSchema,n as RoleSchema,g as StatusSchema,i as VisibilitySchema};
|
|
2
|
-
//# sourceMappingURL=common.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.esm.js","sources":["../../src/schema/common.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst AssetTypeSchema = z.enum([\n \"user\",\n \"organization\",\n \"team\",\n \"dataset\",\n \"file\",\n \"service\",\n \"route\",\n \"post\",\n \"comment\",\n \"conversation\",\n \"blueprint\",\n \"replication\",\n]);\n\nconst VisibilitySchema = z.enum([\n \"public\",\n \"private\",\n \"organization\",\n \"monetized\",\n \"inherit\",\n]);\n\nconst RoleSchema = z.enum([\"admin\", \"read\", \"write\", \"none\"]);\n\nconst MonetizationSchema = z.enum([\"none\", \"pay-to-unlock\", \"pay-per-use\"]);\n\nconst EmbeddingSchema = z.object({\n id: z.string(),\n user_id: z.string(),\n org_id: z.string().nullable().optional(),\n embedding: z.array(z.number()),\n content: z.string(),\n asset_type: AssetTypeSchema,\n asset_id: z.string(),\n metadata: z.object({}).passthrough().nullable().optional(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst ConnectionTypeSchema = z.enum([\n \"comment\",\n \"reference\",\n \"mention\",\n \"action\",\n \"component\",\n]);\n\nconst ConnectionSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n type: ConnectionTypeSchema,\n action_id: z.string().uuid().optional().nullable(),\n source_id: z.string().uuid(),\n target_id: z.string().uuid(),\n source_asset_type: AssetTypeSchema,\n target_asset_type: AssetTypeSchema,\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst PurchaseAssetSchema = z.object({\n assetId: z.string().uuid(),\n method: z.enum([\"checkout\", \"api\"]),\n assetType: AssetTypeSchema,\n});\n\nconst PermissionSchema = z.object({\n id: z.string().uuid(),\n role: RoleSchema,\n user: z.object({\n user_id: z.string().uuid(),\n }),\n user_id: z.string().uuid().nullable(),\n org_id: z.string().uuid().nullable(),\n asset_type: AssetTypeSchema,\n asset_id: z.string().uuid(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst StatusSchema = z.enum([\"queued\", \"in-progress\", \"success\", \"error\"]);\n\nexport {\n RoleSchema,\n VisibilitySchema,\n MonetizationSchema,\n ConnectionSchema,\n EmbeddingSchema,\n AssetTypeSchema,\n PurchaseAssetSchema,\n PermissionSchema,\n StatusSchema,\n};\n\nexport type Role = z.infer<typeof RoleSchema>;\nexport type Connection = z.infer<typeof ConnectionSchema>;\nexport type Embedding = z.infer<typeof EmbeddingSchema>;\nexport type Visibility = z.infer<typeof VisibilitySchema>;\nexport type Monetization = z.infer<typeof MonetizationSchema>;\nexport type AssetTypes = z.infer<typeof AssetTypeSchema>;\nexport type PurchaseAsset = z.infer<typeof PurchaseAssetSchema>;\nexport type Permission = z.infer<typeof PermissionSchema>;\nexport type Status = z.infer<typeof StatusSchema>;\n"],"names":["AssetTypeSchema","z","enum","VisibilitySchema","RoleSchema","MonetizationSchema","EmbeddingSchema","object","id","string","user_id","org_id","nullable","optional","embedding","array","number","content","asset_type","asset_id","metadata","passthrough","created_at","last_updated","ConnectionTypeSchema","ConnectionSchema","uuid","type","action_id","source_id","target_id","source_asset_type","target_asset_type","PurchaseAssetSchema","assetId","method","assetType","PermissionSchema","role","user","StatusSchema"],"mappings":"wBAEA,MAAMA,EAAkBC,EAAEC,KAAK,CAC7B,OACA,eACA,OACA,UACA,OACA,UACA,QACA,OACA,UACA,eACA,YACA,gBAGIC,EAAmBF,EAAEC,KAAK,CAC9B,SACA,UACA,eACA,YACA,YAGIE,EAAaH,EAAEC,KAAK,CAAC,QAAS,OAAQ,QAAS,SAE/CG,EAAqBJ,EAAEC,KAAK,CAA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od");const t=e.z.enum(["user","organization","team","dataset","file","service","route","post","comment","conversation","blueprint","replication"]),i=e.z.enum(["public","private","organization","monetized","inherit"]),s=e.z.enum(["admin","read","write","none"]),r=e.z.enum(["none","pay-to-unlock","pay-per-use"]),n=e.z.object({id:e.z.string(),user_id:e.z.string(),org_id:e.z.string().nullable().optional(),embedding:e.z.array(e.z.number()),content:e.z.string(),asset_type:t,asset_id:e.z.string(),metadata:e.z.object({}).passthrough().nullable().optional(),created_at:e.z.string(),last_updated:e.z.string()}),a=e.z.enum(["comment","reference","mention","action","component"]),o=e.z.object({id:e.z.string().uuid(),user_id:e.z.string().uuid(),type:a,action_id:e.z.string().uuid().optional().nullable(),source_id:e.z.string().uuid(),target_id:e.z.string().uuid(),source_asset_type:t,target_asset_type:t,created_at:e.z.string(),last_updated:e.z.string()}),u=e.z.object({assetId:e.z.string().uuid(),method:e.z.enum(["checkout","api"]),assetType:t}),d=e.z.object({id:e.z.string().uuid(),role:s,user:e.z.object({user_id:e.z.string().uuid()}),user_id:e.z.string().uuid().nullable(),org_id:e.z.string().uuid().nullable(),asset_type:t,asset_id:e.z.string().uuid(),created_at:e.z.string(),last_updated:e.z.string()}),z=e.z.enum(["queued","in-progress","success","error"]);exports.AssetTypeSchema=t,exports.ConnectionSchema=o,exports.EmbeddingSchema=n,exports.MonetizationSchema=r,exports.PermissionSchema=d,exports.PurchaseAssetSchema=u,exports.RoleSchema=s,exports.StatusSchema=z,exports.VisibilitySchema=i;
|
|
2
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sources":["../../src/schema/common.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst AssetTypeSchema = z.enum([\n \"user\",\n \"organization\",\n \"team\",\n \"dataset\",\n \"file\",\n \"service\",\n \"route\",\n \"post\",\n \"comment\",\n \"conversation\",\n \"blueprint\",\n \"replication\",\n]);\n\nconst VisibilitySchema = z.enum([\n \"public\",\n \"private\",\n \"organization\",\n \"monetized\",\n \"inherit\",\n]);\n\nconst RoleSchema = z.enum([\"admin\", \"read\", \"write\", \"none\"]);\n\nconst MonetizationSchema = z.enum([\"none\", \"pay-to-unlock\", \"pay-per-use\"]);\n\nconst EmbeddingSchema = z.object({\n id: z.string(),\n user_id: z.string(),\n org_id: z.string().nullable().optional(),\n embedding: z.array(z.number()),\n content: z.string(),\n asset_type: AssetTypeSchema,\n asset_id: z.string(),\n metadata: z.object({}).passthrough().nullable().optional(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst ConnectionTypeSchema = z.enum([\n \"comment\",\n \"reference\",\n \"mention\",\n \"action\",\n \"component\",\n]);\n\nconst ConnectionSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n type: ConnectionTypeSchema,\n action_id: z.string().uuid().optional().nullable(),\n source_id: z.string().uuid(),\n target_id: z.string().uuid(),\n source_asset_type: AssetTypeSchema,\n target_asset_type: AssetTypeSchema,\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst PurchaseAssetSchema = z.object({\n assetId: z.string().uuid(),\n method: z.enum([\"checkout\", \"api\"]),\n assetType: AssetTypeSchema,\n});\n\nconst PermissionSchema = z.object({\n id: z.string().uuid(),\n role: RoleSchema,\n user: z.object({\n user_id: z.string().uuid(),\n }),\n user_id: z.string().uuid().nullable(),\n org_id: z.string().uuid().nullable(),\n asset_type: AssetTypeSchema,\n asset_id: z.string().uuid(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nconst StatusSchema = z.enum([\"queued\", \"in-progress\", \"success\", \"error\"]);\n\nexport {\n RoleSchema,\n VisibilitySchema,\n MonetizationSchema,\n ConnectionSchema,\n EmbeddingSchema,\n AssetTypeSchema,\n PurchaseAssetSchema,\n PermissionSchema,\n StatusSchema,\n};\n\nexport type Role = z.infer<typeof RoleSchema>;\nexport type Connection = z.infer<typeof ConnectionSchema>;\nexport type Embedding = z.infer<typeof EmbeddingSchema>;\nexport type Visibility = z.infer<typeof VisibilitySchema>;\nexport type Monetization = z.infer<typeof MonetizationSchema>;\nexport type AssetTypes = z.infer<typeof AssetTypeSchema>;\nexport type PurchaseAsset = z.infer<typeof PurchaseAssetSchema>;\nexport type Permission = z.infer<typeof PermissionSchema>;\nexport type Status = z.infer<typeof StatusSchema>;\n"],"names":["AssetTypeSchema","z","enum","VisibilitySchema","RoleSchema","MonetizationSchema","EmbeddingSchema","object","id","string","user_id","org_id","nullable","optional","embedding","array","number","content","asset_type","asset_id","metadata","passthrough","created_at","last_updated","ConnectionTypeSchema","ConnectionSchema","uuid","type","action_id","source_id","target_id","source_asset_type","target_asset_type","PurchaseAssetSchema","assetId","method","assetType","PermissionSchema","role","user","StatusSchema"],"mappings":"kCAEA,MAAMA,EAAkBC,EAACA,EAACC,KAAK,CAC7B,OACA,eACA,OACA,UACA,OACA,UACA,QACA,OACA,UACA,eACA,YACA,gBAGIC,EAAmBF,EAACA,EAACC,KAAK,CAC9B,SACA,UACA,eACA,YACA,YAGIE,EAAaH,EAACA,EAACC,KAAK,CAAC,QAAS,OAAQ,QAAS,SAE/CG,EAAqBJ,EAACA,EAACC,KAAK,CAAC,OAAQ,gBAAiB,gBAEtDI,EAAkBL,EAACA,EAACM,OAAO,CAC/BC,GAAIP,EAACA,EAACQ,SACNC,QAAST,EAACA,EAACQ,SACXE,OAAQV,EAAAA,EAAEQ,SAASG,WAAWC,WAC9BC,UAAWb,EAAAA,EAAEc,MAAMd,EAACA,EAACe,UACrBC,QAAShB,EAACA,EAACQ,SACXS,WAAYlB,EACZmB,SAAUlB,EAACA,EAACQ,SACZW,SAAUnB,EAAAA,EAAEM,OAAO,CAAE,GAAEc,cAAcT,WAAWC,WAChDS,WAAYrB,EAACA,EAACQ,SACdc,aAActB,EAACA,EAACQ,WAGZe,EAAuBvB,EAACA,EAACC,KAAK,CAClC,UACA,YACA,UACA,SACA,cAGIuB,EAAmBxB,EAACA,EAACM,OAAO,CAChCC,GAAIP,EAACA,EAACQ,SAASiB,OACfhB,QAA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