@ourofoundation/ouro-js 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -19
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -81
- package/dist/index.js.map +1 -1
- package/dist/schema/assets.d.ts +111 -100
- package/dist/schema/assets.esm.js +2 -0
- package/dist/schema/assets.esm.js.map +1 -0
- package/dist/schema/assets.js +2 -95
- package/dist/schema/assets.js.map +1 -1
- package/dist/schema/blueprints.d.ts +105 -95
- package/dist/schema/blueprints.esm.js +2 -0
- package/dist/schema/blueprints.esm.js.map +1 -0
- package/dist/schema/blueprints.js +2 -38
- package/dist/schema/blueprints.js.map +1 -1
- package/dist/schema/comments.d.ts +91 -81
- package/dist/schema/comments.esm.js +2 -0
- package/dist/schema/comments.esm.js.map +1 -0
- package/dist/schema/comments.js +2 -32
- package/dist/schema/comments.js.map +1 -1
- package/dist/schema/common.d.ts +32 -32
- package/dist/schema/common.esm.js +2 -0
- package/dist/schema/common.esm.js.map +1 -0
- package/dist/schema/common.js +2 -87
- package/dist/schema/common.js.map +1 -1
- package/dist/schema/conversations.d.ts +149 -139
- package/dist/schema/conversations.esm.js +2 -0
- package/dist/schema/conversations.esm.js.map +1 -0
- package/dist/schema/conversations.js +2 -54
- package/dist/schema/conversations.js.map +1 -1
- package/dist/schema/datasets.d.ts +218 -202
- package/dist/schema/datasets.esm.js +2 -0
- package/dist/schema/datasets.esm.js.map +1 -0
- package/dist/schema/datasets.js +2 -49
- package/dist/schema/datasets.js.map +1 -1
- package/dist/schema/files.d.ts +201 -185
- package/dist/schema/files.esm.js +2 -0
- package/dist/schema/files.esm.js.map +1 -0
- package/dist/schema/files.js +2 -50
- package/dist/schema/files.js.map +1 -1
- package/dist/schema/index.d.ts +14 -80
- package/dist/schema/notifications.d.ts +22 -22
- package/dist/schema/notifications.esm.js +2 -0
- package/dist/schema/notifications.esm.js.map +1 -0
- package/dist/schema/notifications.js +2 -46
- package/dist/schema/notifications.js.map +1 -1
- package/dist/schema/organizations.d.ts +11 -11
- package/dist/schema/organizations.esm.js +2 -0
- package/dist/schema/organizations.esm.js.map +1 -0
- package/dist/schema/organizations.js +2 -33
- package/dist/schema/organizations.js.map +1 -1
- package/dist/schema/posts.d.ts +326 -298
- package/dist/schema/posts.esm.js +2 -0
- package/dist/schema/posts.esm.js.map +1 -0
- package/dist/schema/posts.js +2 -81
- package/dist/schema/posts.js.map +1 -1
- package/dist/schema/replications.d.ts +125 -115
- package/dist/schema/replications.esm.js +2 -0
- package/dist/schema/replications.esm.js.map +1 -0
- package/dist/schema/replications.js +2 -42
- package/dist/schema/replications.js.map +1 -1
- package/dist/schema/services.d.ts +14 -14
- package/dist/schema/services.esm.js +2 -0
- package/dist/schema/services.esm.js.map +1 -0
- package/dist/schema/services.js +2 -39
- package/dist/schema/services.js.map +1 -1
- package/dist/schema/teams.d.ts +99 -85
- package/dist/schema/teams.esm.js +2 -0
- package/dist/schema/teams.esm.js.map +1 -0
- package/dist/schema/teams.js +2 -57
- package/dist/schema/teams.js.map +1 -1
- package/dist/schema/users.d.ts +13 -4
- package/dist/schema/users.esm.js +2 -0
- package/dist/schema/users.esm.js.map +1 -0
- package/dist/schema/users.js +2 -35
- package/dist/schema/users.js.map +1 -1
- package/dist/types/index.d.ts +14 -0
- package/dist/utils/air/index.d.ts +1 -1
- package/dist/utils/air/index.esm.js +2 -0
- package/dist/utils/air/index.esm.js.map +1 -0
- package/dist/utils/air/index.js +2 -51
- package/dist/utils/air/index.js.map +1 -1
- package/dist/utils/air/markdown-parser.esm.js +2 -0
- package/dist/utils/air/markdown-parser.esm.js.map +1 -0
- package/dist/utils/air/markdown-parser.js +2 -118
- package/dist/utils/air/markdown-parser.js.map +1 -1
- package/dist/utils/dataset.esm.js +2 -0
- package/dist/utils/dataset.esm.js.map +1 -0
- package/dist/utils/dataset.js +2 -19
- package/dist/utils/dataset.js.map +1 -1
- package/dist/utils/navigate.esm.js +2 -0
- package/dist/utils/navigate.esm.js.map +1 -0
- package/dist/utils/navigate.js +2 -56
- package/dist/utils/navigate.js.map +1 -1
- package/package.json +21 -4
- package/rollup.config.js +52 -0
package/dist/schema/common.d.ts
CHANGED
|
@@ -16,26 +16,26 @@ declare const EmbeddingSchema: z.ZodObject<{
|
|
|
16
16
|
last_updated: z.ZodString;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
18
|
id: string;
|
|
19
|
-
content: string;
|
|
20
19
|
user_id: string;
|
|
21
20
|
embedding: number[];
|
|
22
|
-
|
|
21
|
+
content: string;
|
|
22
|
+
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
23
23
|
asset_id: string;
|
|
24
24
|
created_at: string;
|
|
25
25
|
last_updated: string;
|
|
26
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
27
26
|
org_id?: string | null | undefined;
|
|
27
|
+
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
id: string;
|
|
30
|
-
content: string;
|
|
31
30
|
user_id: string;
|
|
32
31
|
embedding: number[];
|
|
33
|
-
|
|
32
|
+
content: string;
|
|
33
|
+
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
34
34
|
asset_id: string;
|
|
35
35
|
created_at: string;
|
|
36
36
|
last_updated: string;
|
|
37
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
38
37
|
org_id?: string | null | undefined;
|
|
38
|
+
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
39
39
|
}>;
|
|
40
40
|
declare const ConnectionSchema: z.ZodObject<{
|
|
41
41
|
id: z.ZodString;
|
|
@@ -49,26 +49,26 @@ declare const ConnectionSchema: z.ZodObject<{
|
|
|
49
49
|
created_at: z.ZodString;
|
|
50
50
|
last_updated: z.ZodString;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
53
52
|
id: string;
|
|
54
53
|
user_id: string;
|
|
54
|
+
type: "comment" | "reference" | "mention" | "action" | "component";
|
|
55
55
|
created_at: string;
|
|
56
56
|
last_updated: string;
|
|
57
57
|
source_id: string;
|
|
58
58
|
target_id: string;
|
|
59
|
-
source_asset_type: "
|
|
60
|
-
target_asset_type: "
|
|
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
61
|
action_id?: string | null | undefined;
|
|
62
62
|
}, {
|
|
63
|
-
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
64
63
|
id: string;
|
|
65
64
|
user_id: string;
|
|
65
|
+
type: "comment" | "reference" | "mention" | "action" | "component";
|
|
66
66
|
created_at: string;
|
|
67
67
|
last_updated: string;
|
|
68
68
|
source_id: string;
|
|
69
69
|
target_id: string;
|
|
70
|
-
source_asset_type: "
|
|
71
|
-
target_asset_type: "
|
|
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
72
|
action_id?: string | null | undefined;
|
|
73
73
|
}>;
|
|
74
74
|
declare const PurchaseAssetSchema: z.ZodObject<{
|
|
@@ -76,13 +76,13 @@ declare const PurchaseAssetSchema: z.ZodObject<{
|
|
|
76
76
|
method: z.ZodEnum<["checkout", "api"]>;
|
|
77
77
|
assetType: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
78
78
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
method: "checkout" | "api";
|
|
80
79
|
assetId: string;
|
|
81
|
-
assetType: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
82
|
-
}, {
|
|
83
80
|
method: "checkout" | "api";
|
|
81
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
82
|
+
}, {
|
|
84
83
|
assetId: string;
|
|
85
|
-
|
|
84
|
+
method: "checkout" | "api";
|
|
85
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
86
86
|
}>;
|
|
87
87
|
declare const PermissionSchema: z.ZodObject<{
|
|
88
88
|
id: z.ZodString;
|
|
@@ -101,38 +101,38 @@ declare const PermissionSchema: z.ZodObject<{
|
|
|
101
101
|
created_at: z.ZodString;
|
|
102
102
|
last_updated: z.ZodString;
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
id: string;
|
|
105
|
-
role: "none" | "admin" | "read" | "write";
|
|
106
104
|
user: {
|
|
107
105
|
user_id: string;
|
|
108
106
|
};
|
|
107
|
+
id: string;
|
|
109
108
|
user_id: string | null;
|
|
110
109
|
org_id: string | null;
|
|
111
|
-
asset_type: "
|
|
110
|
+
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
112
111
|
asset_id: string;
|
|
113
112
|
created_at: string;
|
|
114
113
|
last_updated: string;
|
|
114
|
+
role: "admin" | "read" | "write" | "none";
|
|
115
115
|
}, {
|
|
116
|
-
id: string;
|
|
117
|
-
role: "none" | "admin" | "read" | "write";
|
|
118
116
|
user: {
|
|
119
117
|
user_id: string;
|
|
120
118
|
};
|
|
119
|
+
id: string;
|
|
121
120
|
user_id: string | null;
|
|
122
121
|
org_id: string | null;
|
|
123
|
-
asset_type: "
|
|
122
|
+
asset_type: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
124
123
|
asset_id: string;
|
|
125
124
|
created_at: string;
|
|
126
125
|
last_updated: string;
|
|
126
|
+
role: "admin" | "read" | "write" | "none";
|
|
127
127
|
}>;
|
|
128
128
|
declare const StatusSchema: z.ZodEnum<["queued", "in-progress", "success", "error"]>;
|
|
129
|
-
|
|
130
|
-
type
|
|
131
|
-
type
|
|
132
|
-
type
|
|
133
|
-
type
|
|
134
|
-
type
|
|
135
|
-
type
|
|
136
|
-
type
|
|
137
|
-
type
|
|
138
|
-
export
|
|
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>;
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC,OAAQ,gBAAiB,gBAEtDI,EAAkBL,EAAEM,OAAO,CAC/BC,GAAIP,EAAEQ,SACNC,QAAST,EAAEQ,SACXE,OAAQV,EAAEQ,SAASG,WAAWC,WAC9BC,UAAWb,EAAEc,MAAMd,EAAEe,UACrBC,QAAShB,EAAEQ,SACXS,WAAYlB,EACZmB,SAAUlB,EAAEQ,SACZW,SAAUnB,EAAEM,OAAO,CAAE,GAAEc,cAAcT,WAAWC,WAChDS,WAAYrB,EAAEQ,SACdc,aAActB,EAAEQ,WAGZe,EAAuBvB,EAAEC,KAAK,CAClC,UACA,YACA,UACA,SACA,cAGIuB,EAAmBxB,EAAEM,OAAO,CAChCC,GAAIP,EAAEQ,SAASiB,OACfhB,QAAST,EAAEQ,SAASiB,OACpBC,KAAMH,EACNI,UAAW3B,EAAEQ,SAASiB,OAAOb,WAAWD,WACxCiB,UAAW5B,EAAEQ,SAASiB,OACtBI,UAAW7B,EAAEQ,SAASiB,OACtBK,kBAAmB/B,EACnBgC,kBAAmBhC,EACnBsB,WAAYrB,EAAEQ,SACdc,aAActB,EAAEQ,WAGZwB,EAAsBhC,EAAEM,OAAO,CACnC2B,QAASjC,EAAEQ,SAASiB,OACpBS,OAAQlC,EAAEC,KAAK,CAAC,WAAY,QAC5BkC,UAAWpC,IAGPqC,EAAmBpC,EAAEM,OAAO,CAChCC,GAAIP,EAAEQ,SAASiB,OACfY,KAAMlC,EACNmC,KAAMtC,EAAEM,OAAO,CACbG,QAAST,EAAEQ,SAASiB,SAEtBhB,QAAST,EAAEQ,SAASiB,OAAOd,WAC3BD,OAAQV,EAAEQ,SAASiB,OAAOd,WAC1BM,WAAYlB,EACZmB,SAAUlB,EAAEQ,SAASiB,OACrBJ,WAAYrB,EAAEQ,SACdc,aAActB,EAAEQ,WAGZ+B,EAAevC,EAAEC,KAAK,CAAC,SAAU,cAAe,UAAW"}
|
package/dist/schema/common.js
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.StatusSchema = exports.PermissionSchema = exports.PurchaseAssetSchema = exports.AssetTypeSchema = exports.EmbeddingSchema = exports.ConnectionSchema = exports.MonetizationSchema = exports.VisibilitySchema = exports.RoleSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const AssetTypeSchema = zod_1.z.enum([
|
|
6
|
-
"user",
|
|
7
|
-
"organization",
|
|
8
|
-
"team",
|
|
9
|
-
"dataset",
|
|
10
|
-
"file",
|
|
11
|
-
"service",
|
|
12
|
-
"route",
|
|
13
|
-
"post",
|
|
14
|
-
"comment",
|
|
15
|
-
"conversation",
|
|
16
|
-
"blueprint",
|
|
17
|
-
"replication",
|
|
18
|
-
]);
|
|
19
|
-
exports.AssetTypeSchema = AssetTypeSchema;
|
|
20
|
-
const VisibilitySchema = zod_1.z.enum([
|
|
21
|
-
"public",
|
|
22
|
-
"private",
|
|
23
|
-
"organization",
|
|
24
|
-
"monetized",
|
|
25
|
-
"inherit",
|
|
26
|
-
]);
|
|
27
|
-
exports.VisibilitySchema = VisibilitySchema;
|
|
28
|
-
const RoleSchema = zod_1.z.enum(["admin", "read", "write", "none"]);
|
|
29
|
-
exports.RoleSchema = RoleSchema;
|
|
30
|
-
const MonetizationSchema = zod_1.z.enum(["none", "pay-to-unlock", "pay-per-use"]);
|
|
31
|
-
exports.MonetizationSchema = MonetizationSchema;
|
|
32
|
-
const EmbeddingSchema = zod_1.z.object({
|
|
33
|
-
id: zod_1.z.string(),
|
|
34
|
-
user_id: zod_1.z.string(),
|
|
35
|
-
org_id: zod_1.z.string().nullable().optional(),
|
|
36
|
-
embedding: zod_1.z.array(zod_1.z.number()),
|
|
37
|
-
content: zod_1.z.string(),
|
|
38
|
-
asset_type: AssetTypeSchema,
|
|
39
|
-
asset_id: zod_1.z.string(),
|
|
40
|
-
metadata: zod_1.z.object({}).passthrough().nullable().optional(),
|
|
41
|
-
created_at: zod_1.z.string(),
|
|
42
|
-
last_updated: zod_1.z.string(),
|
|
43
|
-
});
|
|
44
|
-
exports.EmbeddingSchema = EmbeddingSchema;
|
|
45
|
-
const ConnectionTypeSchema = zod_1.z.enum([
|
|
46
|
-
"comment",
|
|
47
|
-
"reference",
|
|
48
|
-
"mention",
|
|
49
|
-
"action",
|
|
50
|
-
"component",
|
|
51
|
-
]);
|
|
52
|
-
const ConnectionSchema = zod_1.z.object({
|
|
53
|
-
id: zod_1.z.string().uuid(),
|
|
54
|
-
user_id: zod_1.z.string().uuid(),
|
|
55
|
-
type: ConnectionTypeSchema,
|
|
56
|
-
action_id: zod_1.z.string().uuid().optional().nullable(),
|
|
57
|
-
source_id: zod_1.z.string().uuid(),
|
|
58
|
-
target_id: zod_1.z.string().uuid(),
|
|
59
|
-
source_asset_type: AssetTypeSchema,
|
|
60
|
-
target_asset_type: AssetTypeSchema,
|
|
61
|
-
created_at: zod_1.z.string(),
|
|
62
|
-
last_updated: zod_1.z.string(),
|
|
63
|
-
});
|
|
64
|
-
exports.ConnectionSchema = ConnectionSchema;
|
|
65
|
-
const PurchaseAssetSchema = zod_1.z.object({
|
|
66
|
-
assetId: zod_1.z.string().uuid(),
|
|
67
|
-
method: zod_1.z.enum(["checkout", "api"]),
|
|
68
|
-
assetType: AssetTypeSchema,
|
|
69
|
-
});
|
|
70
|
-
exports.PurchaseAssetSchema = PurchaseAssetSchema;
|
|
71
|
-
const PermissionSchema = zod_1.z.object({
|
|
72
|
-
id: zod_1.z.string().uuid(),
|
|
73
|
-
role: RoleSchema,
|
|
74
|
-
user: zod_1.z.object({
|
|
75
|
-
user_id: zod_1.z.string().uuid(),
|
|
76
|
-
}),
|
|
77
|
-
user_id: zod_1.z.string().uuid().nullable(),
|
|
78
|
-
org_id: zod_1.z.string().uuid().nullable(),
|
|
79
|
-
asset_type: AssetTypeSchema,
|
|
80
|
-
asset_id: zod_1.z.string().uuid(),
|
|
81
|
-
created_at: zod_1.z.string(),
|
|
82
|
-
last_updated: zod_1.z.string(),
|
|
83
|
-
});
|
|
84
|
-
exports.PermissionSchema = PermissionSchema;
|
|
85
|
-
const StatusSchema = zod_1.z.enum(["queued", "in-progress", "success", "error"]);
|
|
86
|
-
exports.StatusSchema = StatusSchema;
|
|
87
|
-
//# sourceMappingURL=common.js.map
|
|
1
|
+
"use strict";var e=require("zod");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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","
|
|
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,QAAST,EAACA,EAACQ,SAASiB,OACpBC,KAAMH,EACNI,UAAW3B,EAACA,EAACQ,SAASiB,OAAOb,WAAWD,WACxCiB,UAAW5B,EAACA,EAACQ,SAASiB,OACtBI,UAAW7B,EAACA,EAACQ,SAASiB,OACtBK,kBAAmB/B,EACnBgC,kBAAmBhC,EACnBsB,WAAYrB,EAACA,EAACQ,SACdc,aAActB,EAACA,EAACQ,WAGZwB,EAAsBhC,EAACA,EAACM,OAAO,CACnC2B,QAASjC,EAACA,EAACQ,SAASiB,OACpBS,OAAQlC,EAAAA,EAAEC,KAAK,CAAC,WAAY,QAC5BkC,UAAWpC,IAGPqC,EAAmBpC,EAACA,EAACM,OAAO,CAChCC,GAAIP,EAACA,EAACQ,SAASiB,OACfY,KAAMlC,EACNmC,KAAMtC,EAACA,EAACM,OAAO,CACbG,QAAST,EAACA,EAACQ,SAASiB,SAEtBhB,QAAST,EAAAA,EAAEQ,SAASiB,OAAOd,WAC3BD,OAAQV,EAAAA,EAAEQ,SAASiB,OAAOd,WAC1BM,WAAYlB,EACZmB,SAAUlB,EAACA,EAACQ,SAASiB,OACrBJ,WAAYrB,EAACA,EAACQ,SACdc,aAActB,EAACA,EAACQ,WAGZ+B,EAAevC,EAACA,EAACC,KAAK,CAAC,SAAU,cAAe,UAAW"}
|