@ourofoundation/ouro-js 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +100 -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 +95 -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 +81 -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 +139 -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 +202 -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 +185 -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 +298 -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 +115 -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 +85 -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 +4 -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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{z as e}from"zod";import{AssetSchema as t,CreateAssetSchema as a}from"./assets.esm.js";const i=e.object({id:e.string().uuid(),path:e.string(),bucket:e.enum(["public-files","files"]),name:e.string(),type:e.string(),size:e.number(),width:e.number().optional(),height:e.number().optional()}),s=t.extend({asset_type:e.literal("file").default("file"),metadata:i}),l=e.discriminatedUnion("state",[a.extend({asset_type:e.literal("file").default("file"),state:e.literal("success").default("success"),metadata:i}),a.extend({asset_type:e.literal("file").default("file"),state:e.literal("in-progress").default("in-progress"),metadata:e.object({type:e.string()})})]),r=s.partial().omit({user_id:!0,id:!0,created_at:!0,last_updated:!0}).extend({last_updated:e.string().default((()=>(new Date).toISOString()))});export{l as CreateFileSchema,s as FileSchema,r as updateFileSchema};
|
|
2
|
+
//# sourceMappingURL=files.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.esm.js","sources":["../../src/schema/files.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { AssetSchema, CreateAssetSchema } from \"./assets\";\n\nconst FileMetadataSchema = z.object({\n id: z.string().uuid(), // The id of the file object\n path: z.string(), // The path of the file in storage\n bucket: z.enum([\"public-files\", \"files\"]),\n name: z.string(),\n type: z.string(),\n size: z.number(),\n // If the file is an image, we store width and height\n width: z.number().optional(),\n height: z.number().optional(),\n});\n\nconst FileSchema = AssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n metadata: FileMetadataSchema,\n});\n\nconst CreateFileSchema = z.discriminatedUnion(\"state\", [\n // Success state, file is ready\n CreateAssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n state: z.literal(\"success\").default(\"success\"),\n metadata: FileMetadataSchema,\n }),\n // In-progress state, file is being processed\n CreateAssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n state: z.literal(\"in-progress\").default(\"in-progress\"),\n metadata: z.object({\n type: z.string(),\n }),\n }),\n]);\n\nconst updateFileSchema = FileSchema.partial()\n .omit({\n user_id: true,\n id: true,\n created_at: true,\n last_updated: true,\n })\n .extend({\n last_updated: z.string().default(() => new Date().toISOString()),\n });\n\nexport { FileSchema, CreateFileSchema, updateFileSchema };\nexport type File = z.infer<typeof FileSchema>;\nexport type CreateFile = z.infer<typeof CreateFileSchema>;\nexport type UpdateFile = z.infer<typeof updateFileSchema>;\n"],"names":["FileMetadataSchema","z","object","id","string","uuid","path","bucket","enum","name","type","size","number","width","optional","height","FileSchema","AssetSchema","extend","asset_type","literal","default","metadata","CreateFileSchema","discriminatedUnion","CreateAssetSchema","state","updateFileSchema","partial","omit","user_id","created_at","last_updated","Date","toISOString"],"mappings":"6FAIA,MAAMA,EAAqBC,EAAEC,OAAO,CAClCC,GAAIF,EAAEG,SAASC,OACfC,KAAML,EAAEG,SACRG,OAAQN,EAAEO,KAAK,CAAC,eAAgB,UAChCC,KAAMR,EAAEG,SACRM,KAAMT,EAAEG,SACRO,KAAMV,EAAEW,SAERC,MAAOZ,EAAEW,SAASE,WAClBC,OAAQd,EAAEW,SAASE,aAGfE,EAAaC,EAAYC,OAAO,CACpCC,WAAYlB,EAAEmB,QAAQ,QAAQC,QAAQ,QACtCC,SAAUtB,IAGNuB,EAAmBtB,EAAEuB,mBAAmB,QAAS,CAErDC,EAAkBP,OAAO,CACvBC,WAAYlB,EAAEmB,QAAQ,QAAQC,QAAQ,QACtCK,MAAOzB,EAAEmB,QAAQ,WAAWC,QAAQ,WACpCC,SAAUtB,IAGZyB,EAAkBP,OAAO,CACvBC,WAAYlB,EAAEmB,QAAQ,QAAQC,QAAQ,QACtCK,MAAOzB,EAAEmB,QAAQ,eAAeC,QAAQ,eACxCC,SAAUrB,EAAEC,OAAO,CACjBQ,KAAMT,EAAEG,eAKRuB,EAAmBX,EAAWY,UACjCC,KAAK,CACJC,SAAS,EACT3B,IAAI,EACJ4B,YAAY,EACZC,cAAc,IAEfd,OAAO,CACNc,aAAc/B,EAAEG,SAASiB,SAAQ,KAAM,IAAIY,MAAOC"}
|
package/dist/schema/files.js
CHANGED
|
@@ -1,50 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.updateFileSchema = exports.CreateFileSchema = exports.FileSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const assets_1 = require("./assets");
|
|
6
|
-
const FileMetadataSchema = zod_1.z.object({
|
|
7
|
-
id: zod_1.z.string().uuid(),
|
|
8
|
-
path: zod_1.z.string(),
|
|
9
|
-
bucket: zod_1.z.enum(["public-files", "files"]),
|
|
10
|
-
name: zod_1.z.string(),
|
|
11
|
-
type: zod_1.z.string(),
|
|
12
|
-
size: zod_1.z.number(),
|
|
13
|
-
// If the file is an image, we store width and height
|
|
14
|
-
width: zod_1.z.number().optional(),
|
|
15
|
-
height: zod_1.z.number().optional(),
|
|
16
|
-
});
|
|
17
|
-
const FileSchema = assets_1.AssetSchema.extend({
|
|
18
|
-
asset_type: zod_1.z.literal("file").default("file"),
|
|
19
|
-
metadata: FileMetadataSchema,
|
|
20
|
-
});
|
|
21
|
-
exports.FileSchema = FileSchema;
|
|
22
|
-
const CreateFileSchema = zod_1.z.discriminatedUnion("state", [
|
|
23
|
-
// Success state, file is ready
|
|
24
|
-
assets_1.CreateAssetSchema.extend({
|
|
25
|
-
asset_type: zod_1.z.literal("file").default("file"),
|
|
26
|
-
state: zod_1.z.literal("success").default("success"),
|
|
27
|
-
metadata: FileMetadataSchema,
|
|
28
|
-
}),
|
|
29
|
-
// In-progress state, file is being processed
|
|
30
|
-
assets_1.CreateAssetSchema.extend({
|
|
31
|
-
asset_type: zod_1.z.literal("file").default("file"),
|
|
32
|
-
state: zod_1.z.literal("in-progress").default("in-progress"),
|
|
33
|
-
metadata: zod_1.z.object({
|
|
34
|
-
type: zod_1.z.string(),
|
|
35
|
-
}),
|
|
36
|
-
}),
|
|
37
|
-
]);
|
|
38
|
-
exports.CreateFileSchema = CreateFileSchema;
|
|
39
|
-
const updateFileSchema = FileSchema.partial()
|
|
40
|
-
.omit({
|
|
41
|
-
user_id: true,
|
|
42
|
-
id: true,
|
|
43
|
-
created_at: true,
|
|
44
|
-
last_updated: true,
|
|
45
|
-
})
|
|
46
|
-
.extend({
|
|
47
|
-
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
48
|
-
});
|
|
49
|
-
exports.updateFileSchema = updateFileSchema;
|
|
50
|
-
//# sourceMappingURL=files.js.map
|
|
1
|
+
"use strict";var e=require("zod"),t=require("./assets.js");const a=e.z.object({id:e.z.string().uuid(),path:e.z.string(),bucket:e.z.enum(["public-files","files"]),name:e.z.string(),type:e.z.string(),size:e.z.number(),width:e.z.number().optional(),height:e.z.number().optional()}),s=t.AssetSchema.extend({asset_type:e.z.literal("file").default("file"),metadata:a}),i=e.z.discriminatedUnion("state",[t.CreateAssetSchema.extend({asset_type:e.z.literal("file").default("file"),state:e.z.literal("success").default("success"),metadata:a}),t.CreateAssetSchema.extend({asset_type:e.z.literal("file").default("file"),state:e.z.literal("in-progress").default("in-progress"),metadata:e.z.object({type:e.z.string()})})]),r=s.partial().omit({user_id:!0,id:!0,created_at:!0,last_updated:!0}).extend({last_updated:e.z.string().default((()=>(new Date).toISOString()))});exports.CreateFileSchema=i,exports.FileSchema=s,exports.updateFileSchema=r;
|
|
2
|
+
//# sourceMappingURL=files.js.map
|
package/dist/schema/files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","
|
|
1
|
+
{"version":3,"file":"files.js","sources":["../../src/schema/files.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { AssetSchema, CreateAssetSchema } from \"./assets\";\n\nconst FileMetadataSchema = z.object({\n id: z.string().uuid(), // The id of the file object\n path: z.string(), // The path of the file in storage\n bucket: z.enum([\"public-files\", \"files\"]),\n name: z.string(),\n type: z.string(),\n size: z.number(),\n // If the file is an image, we store width and height\n width: z.number().optional(),\n height: z.number().optional(),\n});\n\nconst FileSchema = AssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n metadata: FileMetadataSchema,\n});\n\nconst CreateFileSchema = z.discriminatedUnion(\"state\", [\n // Success state, file is ready\n CreateAssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n state: z.literal(\"success\").default(\"success\"),\n metadata: FileMetadataSchema,\n }),\n // In-progress state, file is being processed\n CreateAssetSchema.extend({\n asset_type: z.literal(\"file\").default(\"file\"),\n state: z.literal(\"in-progress\").default(\"in-progress\"),\n metadata: z.object({\n type: z.string(),\n }),\n }),\n]);\n\nconst updateFileSchema = FileSchema.partial()\n .omit({\n user_id: true,\n id: true,\n created_at: true,\n last_updated: true,\n })\n .extend({\n last_updated: z.string().default(() => new Date().toISOString()),\n });\n\nexport { FileSchema, CreateFileSchema, updateFileSchema };\nexport type File = z.infer<typeof FileSchema>;\nexport type CreateFile = z.infer<typeof CreateFileSchema>;\nexport type UpdateFile = z.infer<typeof updateFileSchema>;\n"],"names":["FileMetadataSchema","z","object","id","string","uuid","path","bucket","enum","name","type","size","number","width","optional","height","FileSchema","AssetSchema","extend","asset_type","literal","default","metadata","CreateFileSchema","discriminatedUnion","CreateAssetSchema","state","updateFileSchema","partial","omit","user_id","created_at","last_updated","Date","toISOString"],"mappings":"2DAIA,MAAMA,EAAqBC,EAACA,EAACC,OAAO,CAClCC,GAAIF,EAACA,EAACG,SAASC,OACfC,KAAML,EAACA,EAACG,SACRG,OAAQN,EAAAA,EAAEO,KAAK,CAAC,eAAgB,UAChCC,KAAMR,EAACA,EAACG,SACRM,KAAMT,EAACA,EAACG,SACRO,KAAMV,EAACA,EAACW,SAERC,MAAOZ,EAACA,EAACW,SAASE,WAClBC,OAAQd,EAACA,EAACW,SAASE,aAGfE,EAAaC,EAAWA,YAACC,OAAO,CACpCC,WAAYlB,EAACA,EAACmB,QAAQ,QAAQC,QAAQ,QACtCC,SAAUtB,IAGNuB,EAAmBtB,EAAAA,EAAEuB,mBAAmB,QAAS,CAErDC,EAAAA,kBAAkBP,OAAO,CACvBC,WAAYlB,EAACA,EAACmB,QAAQ,QAAQC,QAAQ,QACtCK,MAAOzB,EAACA,EAACmB,QAAQ,WAAWC,QAAQ,WACpCC,SAAUtB,IAGZyB,EAAAA,kBAAkBP,OAAO,CACvBC,WAAYlB,EAACA,EAACmB,QAAQ,QAAQC,QAAQ,QACtCK,MAAOzB,EAACA,EAACmB,QAAQ,eAAeC,QAAQ,eACxCC,SAAUrB,EAACA,EAACC,OAAO,CACjBQ,KAAMT,EAACA,EAACG,eAKRuB,EAAmBX,EAAWY,UACjCC,KAAK,CACJC,SAAS,EACT3B,IAAI,EACJ4B,YAAY,EACZC,cAAc,IAEfd,OAAO,CACNc,aAAc/B,EAAAA,EAAEG,SAASiB,SAAQ,KAAM,IAAIY,MAAOC"}
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,80 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
created_at: z.ZodString;
|
|
16
|
-
last_updated: z.ZodString;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
id: string;
|
|
19
|
-
content: string;
|
|
20
|
-
user_id: string;
|
|
21
|
-
embedding: number[];
|
|
22
|
-
asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
23
|
-
asset_id: string;
|
|
24
|
-
created_at: string;
|
|
25
|
-
last_updated: string;
|
|
26
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
27
|
-
org_id?: string | null | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
id: string;
|
|
30
|
-
content: string;
|
|
31
|
-
user_id: string;
|
|
32
|
-
embedding: number[];
|
|
33
|
-
asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
34
|
-
asset_id: string;
|
|
35
|
-
created_at: string;
|
|
36
|
-
last_updated: string;
|
|
37
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
38
|
-
org_id?: string | 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"]>;
|
|
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
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
53
|
-
id: string;
|
|
54
|
-
user_id: string;
|
|
55
|
-
created_at: string;
|
|
56
|
-
last_updated: string;
|
|
57
|
-
source_id: string;
|
|
58
|
-
target_id: string;
|
|
59
|
-
source_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
60
|
-
target_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
61
|
-
action_id?: string | null | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
64
|
-
id: string;
|
|
65
|
-
user_id: string;
|
|
66
|
-
created_at: string;
|
|
67
|
-
last_updated: string;
|
|
68
|
-
source_id: string;
|
|
69
|
-
target_id: string;
|
|
70
|
-
source_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
71
|
-
target_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
72
|
-
action_id?: string | null | undefined;
|
|
73
|
-
}>;
|
|
74
|
-
type Role = z.infer<typeof RoleSchema>;
|
|
75
|
-
type Connection = z.infer<typeof ConnectionSchema>;
|
|
76
|
-
type Embedding = z.infer<typeof EmbeddingSchema>;
|
|
77
|
-
type Visibility = z.infer<typeof VisibilitySchema>;
|
|
78
|
-
type Monetization = z.infer<typeof MonetizationSchema>;
|
|
79
|
-
type AssetTypes = z.infer<typeof AssetTypeSchema>;
|
|
80
|
-
export { RoleSchema, VisibilitySchema, MonetizationSchema, ConnectionSchema, EmbeddingSchema, AssetTypeSchema, type Role, type Connection, type Embedding, type Visibility, type Monetization, type AssetTypes, };
|
|
1
|
+
export * from "./assets";
|
|
2
|
+
export * from "./comments";
|
|
3
|
+
export * from "./common";
|
|
4
|
+
export * from "./conversations";
|
|
5
|
+
export * from "./datasets";
|
|
6
|
+
export * from "./files";
|
|
7
|
+
export * from "./notifications";
|
|
8
|
+
export * from "./organizations";
|
|
9
|
+
export * from "./posts";
|
|
10
|
+
export * from "./services";
|
|
11
|
+
export * from "./teams";
|
|
12
|
+
export * from "./users";
|
|
13
|
+
export * from "./replications";
|
|
14
|
+
export * from "./blueprints";
|
|
@@ -13,58 +13,58 @@ declare const NotificationSchema: z.ZodObject<{
|
|
|
13
13
|
assetType: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
assetId: string;
|
|
16
|
-
assetType: "
|
|
16
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
17
17
|
}, {
|
|
18
18
|
assetId: string;
|
|
19
|
-
assetType: "
|
|
19
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
20
20
|
}>>;
|
|
21
21
|
mention: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
22
22
|
event: z.ZodOptional<z.ZodObject<{
|
|
23
23
|
type: z.ZodEnum<["success", "error"]>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
type: "
|
|
25
|
+
type: "success" | "error";
|
|
26
26
|
}, {
|
|
27
|
-
type: "
|
|
27
|
+
type: "success" | "error";
|
|
28
28
|
}>>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
mention?: {} | undefined;
|
|
30
31
|
text?: string | undefined;
|
|
31
32
|
event?: {
|
|
32
|
-
type: "
|
|
33
|
+
type: "success" | "error";
|
|
33
34
|
} | undefined;
|
|
34
|
-
mention?: {} | undefined;
|
|
35
35
|
asset?: {
|
|
36
36
|
assetId: string;
|
|
37
|
-
assetType: "
|
|
37
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
38
38
|
} | undefined;
|
|
39
39
|
}, {
|
|
40
|
+
mention?: {} | undefined;
|
|
40
41
|
text?: string | undefined;
|
|
41
42
|
event?: {
|
|
42
|
-
type: "
|
|
43
|
+
type: "success" | "error";
|
|
43
44
|
} | undefined;
|
|
44
|
-
mention?: {} | undefined;
|
|
45
45
|
asset?: {
|
|
46
46
|
assetId: string;
|
|
47
|
-
assetType: "
|
|
47
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
48
48
|
} | undefined;
|
|
49
49
|
}>;
|
|
50
50
|
viewed: z.ZodBoolean;
|
|
51
51
|
created_at: z.ZodString;
|
|
52
52
|
last_updated: z.ZodString;
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
type: "follow" | "event" | "other" | "comment" | "reference" | "mention" | "like" | "reply" | "invite" | "payment" | "share";
|
|
55
54
|
id: string;
|
|
55
|
+
org_id: string;
|
|
56
|
+
type: "comment" | "reference" | "mention" | "follow" | "like" | "reply" | "invite" | "payment" | "event" | "share" | "other";
|
|
56
57
|
content: {
|
|
58
|
+
mention?: {} | undefined;
|
|
57
59
|
text?: string | undefined;
|
|
58
60
|
event?: {
|
|
59
|
-
type: "
|
|
61
|
+
type: "success" | "error";
|
|
60
62
|
} | undefined;
|
|
61
|
-
mention?: {} | undefined;
|
|
62
63
|
asset?: {
|
|
63
64
|
assetId: string;
|
|
64
|
-
assetType: "
|
|
65
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
65
66
|
} | undefined;
|
|
66
67
|
};
|
|
67
|
-
org_id: string;
|
|
68
68
|
created_at: string;
|
|
69
69
|
last_updated: string;
|
|
70
70
|
source_user_id: string;
|
|
@@ -72,20 +72,20 @@ declare const NotificationSchema: z.ZodObject<{
|
|
|
72
72
|
viewed: boolean;
|
|
73
73
|
asset_id?: string | null | undefined;
|
|
74
74
|
}, {
|
|
75
|
-
type: "follow" | "event" | "other" | "comment" | "reference" | "mention" | "like" | "reply" | "invite" | "payment" | "share";
|
|
76
75
|
id: string;
|
|
76
|
+
org_id: string;
|
|
77
|
+
type: "comment" | "reference" | "mention" | "follow" | "like" | "reply" | "invite" | "payment" | "event" | "share" | "other";
|
|
77
78
|
content: {
|
|
79
|
+
mention?: {} | undefined;
|
|
78
80
|
text?: string | undefined;
|
|
79
81
|
event?: {
|
|
80
|
-
type: "
|
|
82
|
+
type: "success" | "error";
|
|
81
83
|
} | undefined;
|
|
82
|
-
mention?: {} | undefined;
|
|
83
84
|
asset?: {
|
|
84
85
|
assetId: string;
|
|
85
|
-
assetType: "
|
|
86
|
+
assetType: "user" | "organization" | "team" | "dataset" | "file" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
86
87
|
} | undefined;
|
|
87
88
|
};
|
|
88
|
-
org_id: string;
|
|
89
89
|
created_at: string;
|
|
90
90
|
last_updated: string;
|
|
91
91
|
source_user_id: string;
|
|
@@ -93,5 +93,5 @@ declare const NotificationSchema: z.ZodObject<{
|
|
|
93
93
|
viewed: boolean;
|
|
94
94
|
asset_id?: string | null | undefined;
|
|
95
95
|
}>;
|
|
96
|
-
|
|
97
|
-
export
|
|
96
|
+
export { NotificationSchema };
|
|
97
|
+
export type Notification = z.infer<typeof NotificationSchema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{z as e}from"zod";import{AssetTypeSchema as t}from"./common.esm.js";const o=e.enum(["follow","like","comment","reply","mention","reference","invite","payment","event","share","other"]),i=e.object({id:e.string().uuid(),source_user_id:e.string().uuid(),destination_user_id:e.string().uuid(),org_id:e.string().uuid(),asset_id:e.string().uuid().optional().nullable(),type:o,content:e.object({text:e.string().optional(),asset:e.object({assetId:e.string(),assetType:t}).optional(),mention:e.object({}).optional(),event:e.object({type:e.enum(["success","error"])}).optional()}),viewed:e.boolean(),created_at:e.string(),last_updated:e.string()});export{i as NotificationSchema};
|
|
2
|
+
//# sourceMappingURL=notifications.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.esm.js","sources":["../../src/schema/notifications.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { AssetTypeSchema } from \"./common\";\n\nconst NotificationTypeSchema = z.enum([\n \"follow\",\n \"like\",\n \"comment\",\n \"reply\",\n \"mention\",\n \"reference\",\n \"invite\",\n \"payment\",\n \"event\",\n \"share\",\n \"other\",\n]);\n\nconst NotificationSchema = z.object({\n id: z.string().uuid(),\n source_user_id: z.string().uuid(),\n destination_user_id: z.string().uuid(),\n org_id: z.string().uuid(),\n asset_id: z.string().uuid().optional().nullable(),\n type: NotificationTypeSchema,\n content: z.object({\n text: z.string().optional(),\n asset: z\n .object({\n assetId: z.string(),\n assetType: AssetTypeSchema,\n })\n .optional(),\n mention: z.object({}).optional(),\n event: z\n .object({\n type: z.enum([\"success\", \"error\"]),\n })\n .optional(),\n }),\n viewed: z.boolean(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nexport { NotificationSchema };\nexport type Notification = z.infer<typeof NotificationSchema>;\n"],"names":["NotificationTypeSchema","z","enum","NotificationSchema","object","id","string","uuid","source_user_id","destination_user_id","org_id","asset_id","optional","nullable","type","content","text","asset","assetId","assetType","AssetTypeSchema","mention","event","viewed","boolean","created_at","last_updated"],"mappings":"0EAIA,MAAMA,EAAyBC,EAAEC,KAAK,CACpC,SACA,OACA,UACA,QACA,UACA,YACA,SACA,UACA,QACA,QACA,UAGIC,EAAqBF,EAAEG,OAAO,CAClCC,GAAIJ,EAAEK,SAASC,OACfC,eAAgBP,EAAEK,SAASC,OAC3BE,oBAAqBR,EAAEK,SAASC,OAChCG,OAAQT,EAAEK,SAASC,OACnBI,SAAUV,EAAEK,SAASC,OAAOK,WAAWC,WACvCC,KAAMd,EACNe,QAASd,EAAEG,OAAO,CAChBY,KAAMf,EAAEK,SAASM,WACjBK,MAAOhB,EACJG,OAAO,CACNc,QAASjB,EAAEK,SACXa,UAAWC,IAEZR,WACHS,QAASpB,EAAEG,OAAO,CAAE,GAAEQ,WACtBU,MAAOrB,EACJG,OAAO,CACNU,KAAMb,EAAEC,KAAK,CAAC,UAAW,YAE1BU,aAELW,OAAQtB,EAAEuB,UACVC,WAAYxB,EAAEK,SACdoB,aAAczB,EAAEK"}
|
|
@@ -1,46 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.NotificationSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const common_1 = require("./common");
|
|
6
|
-
const NotificationTypeSchema = zod_1.z.enum([
|
|
7
|
-
"follow",
|
|
8
|
-
"like",
|
|
9
|
-
"comment",
|
|
10
|
-
"reply",
|
|
11
|
-
"mention",
|
|
12
|
-
"reference",
|
|
13
|
-
"invite",
|
|
14
|
-
"payment",
|
|
15
|
-
"event",
|
|
16
|
-
"share",
|
|
17
|
-
"other",
|
|
18
|
-
]);
|
|
19
|
-
const NotificationSchema = zod_1.z.object({
|
|
20
|
-
id: zod_1.z.string().uuid(),
|
|
21
|
-
source_user_id: zod_1.z.string().uuid(),
|
|
22
|
-
destination_user_id: zod_1.z.string().uuid(),
|
|
23
|
-
org_id: zod_1.z.string().uuid(),
|
|
24
|
-
asset_id: zod_1.z.string().uuid().optional().nullable(),
|
|
25
|
-
type: NotificationTypeSchema,
|
|
26
|
-
content: zod_1.z.object({
|
|
27
|
-
text: zod_1.z.string().optional(),
|
|
28
|
-
asset: zod_1.z
|
|
29
|
-
.object({
|
|
30
|
-
assetId: zod_1.z.string(),
|
|
31
|
-
assetType: common_1.AssetTypeSchema,
|
|
32
|
-
})
|
|
33
|
-
.optional(),
|
|
34
|
-
mention: zod_1.z.object({}).optional(),
|
|
35
|
-
event: zod_1.z
|
|
36
|
-
.object({
|
|
37
|
-
type: zod_1.z.enum(["success", "error"]),
|
|
38
|
-
})
|
|
39
|
-
.optional(),
|
|
40
|
-
}),
|
|
41
|
-
viewed: zod_1.z.boolean(),
|
|
42
|
-
created_at: zod_1.z.string(),
|
|
43
|
-
last_updated: zod_1.z.string(),
|
|
44
|
-
});
|
|
45
|
-
exports.NotificationSchema = NotificationSchema;
|
|
46
|
-
//# sourceMappingURL=notifications.js.map
|
|
1
|
+
"use strict";var e=require("zod"),t=require("./common.js");const i=e.z.enum(["follow","like","comment","reply","mention","reference","invite","payment","event","share","other"]),n=e.z.object({id:e.z.string().uuid(),source_user_id:e.z.string().uuid(),destination_user_id:e.z.string().uuid(),org_id:e.z.string().uuid(),asset_id:e.z.string().uuid().optional().nullable(),type:i,content:e.z.object({text:e.z.string().optional(),asset:e.z.object({assetId:e.z.string(),assetType:t.AssetTypeSchema}).optional(),mention:e.z.object({}).optional(),event:e.z.object({type:e.z.enum(["success","error"])}).optional()}),viewed:e.z.boolean(),created_at:e.z.string(),last_updated:e.z.string()});exports.NotificationSchema=n;
|
|
2
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","
|
|
1
|
+
{"version":3,"file":"notifications.js","sources":["../../src/schema/notifications.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { AssetTypeSchema } from \"./common\";\n\nconst NotificationTypeSchema = z.enum([\n \"follow\",\n \"like\",\n \"comment\",\n \"reply\",\n \"mention\",\n \"reference\",\n \"invite\",\n \"payment\",\n \"event\",\n \"share\",\n \"other\",\n]);\n\nconst NotificationSchema = z.object({\n id: z.string().uuid(),\n source_user_id: z.string().uuid(),\n destination_user_id: z.string().uuid(),\n org_id: z.string().uuid(),\n asset_id: z.string().uuid().optional().nullable(),\n type: NotificationTypeSchema,\n content: z.object({\n text: z.string().optional(),\n asset: z\n .object({\n assetId: z.string(),\n assetType: AssetTypeSchema,\n })\n .optional(),\n mention: z.object({}).optional(),\n event: z\n .object({\n type: z.enum([\"success\", \"error\"]),\n })\n .optional(),\n }),\n viewed: z.boolean(),\n created_at: z.string(),\n last_updated: z.string(),\n});\n\nexport { NotificationSchema };\nexport type Notification = z.infer<typeof NotificationSchema>;\n"],"names":["NotificationTypeSchema","z","enum","NotificationSchema","object","id","string","uuid","source_user_id","destination_user_id","org_id","asset_id","optional","nullable","type","content","text","asset","assetId","assetType","AssetTypeSchema","mention","event","viewed","boolean","created_at","last_updated"],"mappings":"2DAIA,MAAMA,EAAyBC,EAACA,EAACC,KAAK,CACpC,SACA,OACA,UACA,QACA,UACA,YACA,SACA,UACA,QACA,QACA,UAGIC,EAAqBF,EAACA,EAACG,OAAO,CAClCC,GAAIJ,EAACA,EAACK,SAASC,OACfC,eAAgBP,EAACA,EAACK,SAASC,OAC3BE,oBAAqBR,EAACA,EAACK,SAASC,OAChCG,OAAQT,EAACA,EAACK,SAASC,OACnBI,SAAUV,EAACA,EAACK,SAASC,OAAOK,WAAWC,WACvCC,KAAMd,EACNe,QAASd,EAACA,EAACG,OAAO,CAChBY,KAAMf,EAACA,EAACK,SAASM,WACjBK,MAAOhB,EAAAA,EACJG,OAAO,CACNc,QAASjB,EAACA,EAACK,SACXa,UAAWC,EAAeA,kBAE3BR,WACHS,QAASpB,EAAAA,EAAEG,OAAO,CAAE,GAAEQ,WACtBU,MAAOrB,EAAAA,EACJG,OAAO,CACNU,KAAMb,EAAAA,EAAEC,KAAK,CAAC,UAAW,YAE1BU,aAELW,OAAQtB,EAACA,EAACuB,UACVC,WAAYxB,EAACA,EAACK,SACdoB,aAAczB,EAACA,EAACK"}
|
|
@@ -19,10 +19,10 @@ declare const OrganizationsSchema: z.ZodObject<{
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
size: string;
|
|
22
|
-
base_role: "
|
|
23
|
-
email?: string | null | undefined;
|
|
22
|
+
base_role: "admin" | "read" | "write" | "none";
|
|
24
23
|
avatar_path?: string | null | undefined;
|
|
25
24
|
mission?: string | null | undefined;
|
|
25
|
+
email?: string | null | undefined;
|
|
26
26
|
domain?: string | null | undefined;
|
|
27
27
|
urls?: {
|
|
28
28
|
value: string;
|
|
@@ -31,14 +31,14 @@ declare const OrganizationsSchema: z.ZodObject<{
|
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
33
33
|
size: string;
|
|
34
|
-
email?: string | null | undefined;
|
|
35
34
|
avatar_path?: string | null | undefined;
|
|
36
35
|
mission?: string | null | undefined;
|
|
36
|
+
email?: string | null | undefined;
|
|
37
37
|
domain?: string | null | undefined;
|
|
38
38
|
urls?: {
|
|
39
39
|
value: string;
|
|
40
40
|
}[] | null | undefined;
|
|
41
|
-
base_role?: "
|
|
41
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
42
42
|
}>;
|
|
43
43
|
declare const MembershipSchema: z.ZodObject<{
|
|
44
44
|
id: z.ZodString;
|
|
@@ -50,21 +50,21 @@ declare const MembershipSchema: z.ZodObject<{
|
|
|
50
50
|
visibility: z.ZodDefault<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
52
|
id: string;
|
|
53
|
-
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
54
|
-
role: "none" | "admin" | "read" | "write";
|
|
55
53
|
user_id: string;
|
|
56
54
|
org_id: string;
|
|
55
|
+
role: "admin" | "read" | "write" | "none";
|
|
57
56
|
team_id: string;
|
|
58
57
|
added_at: string;
|
|
58
|
+
visibility: "organization" | "public" | "private" | "monetized" | "inherit";
|
|
59
59
|
}, {
|
|
60
60
|
id: string;
|
|
61
|
-
role: "none" | "admin" | "read" | "write";
|
|
62
61
|
user_id: string;
|
|
63
62
|
org_id: string;
|
|
63
|
+
role: "admin" | "read" | "write" | "none";
|
|
64
64
|
team_id: string;
|
|
65
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
66
65
|
added_at?: string | undefined;
|
|
66
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
67
67
|
}>;
|
|
68
|
-
|
|
69
|
-
type
|
|
70
|
-
export
|
|
68
|
+
export { OrganizationsSchema, MembershipSchema };
|
|
69
|
+
export type Organization = z.infer<typeof OrganizationsSchema>;
|
|
70
|
+
export type Membership = z.infer<typeof MembershipSchema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{z as i}from"zod";import{RoleSchema as t,VisibilitySchema as l}from"./common.esm.js";const n=i.object({id:i.string().uuid(),name:i.string(),avatar_path:i.string().nullable().optional(),mission:i.string().nullable().optional(),size:i.string(),email:i.string().nullable().optional(),domain:i.string().nullable().optional(),urls:i.array(i.object({value:i.string()})).nullable().optional(),base_role:t.default("write")}),a=i.object({id:i.string().uuid(),user_id:i.string().uuid(),org_id:i.string().uuid(),team_id:i.string().uuid(),role:t,added_at:i.string().default((()=>(new Date).toISOString())),visibility:l.default("public")});export{a as MembershipSchema,n as OrganizationsSchema};
|
|
2
|
+
//# sourceMappingURL=organizations.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.esm.js","sources":["../../src/schema/organizations.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { RoleSchema, VisibilitySchema } from \"./common\";\n\nconst OrganizationsSchema = z.object({\n id: z.string().uuid(),\n name: z.string(),\n avatar_path: z.string().nullable().optional(),\n mission: z.string().nullable().optional(),\n size: z.string(),\n email: z.string().nullable().optional(),\n domain: z.string().nullable().optional(),\n urls: z\n .array(\n z.object({\n value: z.string(),\n })\n )\n .nullable()\n .optional(),\n base_role: RoleSchema.default(\"write\"),\n});\n\nconst MembershipSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n org_id: z.string().uuid(),\n team_id: z.string().uuid(),\n role: RoleSchema,\n added_at: z.string().default(() => new Date().toISOString()),\n visibility: VisibilitySchema.default(\"public\"),\n});\n\nexport { OrganizationsSchema, MembershipSchema };\nexport type Organization = z.infer<typeof OrganizationsSchema>;\nexport type Membership = z.infer<typeof MembershipSchema>;\n"],"names":["OrganizationsSchema","z","object","id","string","uuid","name","avatar_path","nullable","optional","mission","size","email","domain","urls","array","value","base_role","RoleSchema","default","MembershipSchema","user_id","org_id","team_id","role","added_at","Date","toISOString","visibility","VisibilitySchema"],"mappings":"2FAIA,MAAMA,EAAsBC,EAAEC,OAAO,CACnCC,GAAIF,EAAEG,SAASC,OACfC,KAAML,EAAEG,SACRG,YAAaN,EAAEG,SAASI,WAAWC,WACnCC,QAAST,EAAEG,SAASI,WAAWC,WAC/BE,KAAMV,EAAEG,SACRQ,MAAOX,EAAEG,SAASI,WAAWC,WAC7BI,OAAQZ,EAAEG,SAASI,WAAWC,WAC9BK,KAAMb,EACHc,MACCd,EAAEC,OAAO,CACPc,MAAOf,EAAEG,YAGZI,WACAC,WACHQ,UAAWC,EAAWC,QAAQ,WAG1BC,EAAmBnB,EAAEC,OAAO,CAChCC,GAAIF,EAAEG,SAASC,OACfgB,QAASpB,EAAEG,SAASC,OACpBiB,OAAQrB,EAAEG,SAASC,OACnBkB,QAAStB,EAAEG,SAASC,OACpBmB,KAAMN,EACNO,SAAUxB,EAAEG,SAASe,SAAQ,KAAM,IAAIO,MAAOC,gBAC9CC,WAAYC,EAAiBV,QAAQ"}
|
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.MembershipSchema = exports.OrganizationsSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const common_1 = require("./common");
|
|
6
|
-
const OrganizationsSchema = zod_1.z.object({
|
|
7
|
-
id: zod_1.z.string().uuid(),
|
|
8
|
-
name: zod_1.z.string(),
|
|
9
|
-
avatar_path: zod_1.z.string().nullable().optional(),
|
|
10
|
-
mission: zod_1.z.string().nullable().optional(),
|
|
11
|
-
size: zod_1.z.string(),
|
|
12
|
-
email: zod_1.z.string().nullable().optional(),
|
|
13
|
-
domain: zod_1.z.string().nullable().optional(),
|
|
14
|
-
urls: zod_1.z
|
|
15
|
-
.array(zod_1.z.object({
|
|
16
|
-
value: zod_1.z.string(),
|
|
17
|
-
}))
|
|
18
|
-
.nullable()
|
|
19
|
-
.optional(),
|
|
20
|
-
base_role: common_1.RoleSchema.default("write"),
|
|
21
|
-
});
|
|
22
|
-
exports.OrganizationsSchema = OrganizationsSchema;
|
|
23
|
-
const MembershipSchema = zod_1.z.object({
|
|
24
|
-
id: zod_1.z.string().uuid(),
|
|
25
|
-
user_id: zod_1.z.string().uuid(),
|
|
26
|
-
org_id: zod_1.z.string().uuid(),
|
|
27
|
-
team_id: zod_1.z.string().uuid(),
|
|
28
|
-
role: common_1.RoleSchema,
|
|
29
|
-
added_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
30
|
-
visibility: common_1.VisibilitySchema.default("public"),
|
|
31
|
-
});
|
|
32
|
-
exports.MembershipSchema = MembershipSchema;
|
|
33
|
-
//# sourceMappingURL=organizations.js.map
|
|
1
|
+
"use strict";var i=require("zod"),e=require("./common.js");const t=i.z.object({id:i.z.string().uuid(),name:i.z.string(),avatar_path:i.z.string().nullable().optional(),mission:i.z.string().nullable().optional(),size:i.z.string(),email:i.z.string().nullable().optional(),domain:i.z.string().nullable().optional(),urls:i.z.array(i.z.object({value:i.z.string()})).nullable().optional(),base_role:e.RoleSchema.default("write")}),a=i.z.object({id:i.z.string().uuid(),user_id:i.z.string().uuid(),org_id:i.z.string().uuid(),team_id:i.z.string().uuid(),role:e.RoleSchema,added_at:i.z.string().default((()=>(new Date).toISOString())),visibility:e.VisibilitySchema.default("public")});exports.MembershipSchema=a,exports.OrganizationsSchema=t;
|
|
2
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.js","
|
|
1
|
+
{"version":3,"file":"organizations.js","sources":["../../src/schema/organizations.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { RoleSchema, VisibilitySchema } from \"./common\";\n\nconst OrganizationsSchema = z.object({\n id: z.string().uuid(),\n name: z.string(),\n avatar_path: z.string().nullable().optional(),\n mission: z.string().nullable().optional(),\n size: z.string(),\n email: z.string().nullable().optional(),\n domain: z.string().nullable().optional(),\n urls: z\n .array(\n z.object({\n value: z.string(),\n })\n )\n .nullable()\n .optional(),\n base_role: RoleSchema.default(\"write\"),\n});\n\nconst MembershipSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n org_id: z.string().uuid(),\n team_id: z.string().uuid(),\n role: RoleSchema,\n added_at: z.string().default(() => new Date().toISOString()),\n visibility: VisibilitySchema.default(\"public\"),\n});\n\nexport { OrganizationsSchema, MembershipSchema };\nexport type Organization = z.infer<typeof OrganizationsSchema>;\nexport type Membership = z.infer<typeof MembershipSchema>;\n"],"names":["OrganizationsSchema","z","object","id","string","uuid","name","avatar_path","nullable","optional","mission","size","email","domain","urls","array","value","base_role","RoleSchema","default","MembershipSchema","user_id","org_id","team_id","role","added_at","Date","toISOString","visibility","VisibilitySchema"],"mappings":"2DAIA,MAAMA,EAAsBC,EAACA,EAACC,OAAO,CACnCC,GAAIF,EAACA,EAACG,SAASC,OACfC,KAAML,EAACA,EAACG,SACRG,YAAaN,EAAAA,EAAEG,SAASI,WAAWC,WACnCC,QAAST,EAAAA,EAAEG,SAASI,WAAWC,WAC/BE,KAAMV,EAACA,EAACG,SACRQ,MAAOX,EAAAA,EAAEG,SAASI,WAAWC,WAC7BI,OAAQZ,EAAAA,EAAEG,SAASI,WAAWC,WAC9BK,KAAMb,EAAAA,EACHc,MACCd,EAACA,EAACC,OAAO,CACPc,MAAOf,EAACA,EAACG,YAGZI,WACAC,WACHQ,UAAWC,EAAAA,WAAWC,QAAQ,WAG1BC,EAAmBnB,EAACA,EAACC,OAAO,CAChCC,GAAIF,EAACA,EAACG,SAASC,OACfgB,QAASpB,EAACA,EAACG,SAASC,OACpBiB,OAAQrB,EAACA,EAACG,SAASC,OACnBkB,QAAStB,EAACA,EAACG,SAASC,OACpBmB,KAAMN,EAAUA,WAChBO,SAAUxB,EAAAA,EAAEG,SAASe,SAAQ,KAAM,IAAIO,MAAOC,gBAC9CC,WAAYC,EAAAA,iBAAiBV,QAAQ"}
|