@ourofoundation/ouro-js 1.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/README.md +6 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +64 -0
- package/dist/schema/assets.d.ts +245 -0
- package/dist/schema/assets.js +38 -0
- package/dist/schema/blueprints.d.ts +541 -0
- package/dist/schema/blueprints.js +37 -0
- package/dist/schema/comments.d.ts +525 -0
- package/dist/schema/comments.js +32 -0
- package/dist/schema/common.d.ts +37 -0
- package/dist/schema/common.js +18 -0
- package/dist/schema/conversations.d.ts +696 -0
- package/dist/schema/conversations.js +53 -0
- package/dist/schema/datasets.d.ts +918 -0
- package/dist/schema/datasets.js +103 -0
- package/dist/schema/files.d.ts +277 -0
- package/dist/schema/files.js +16 -0
- package/dist/schema/index.d.ts +80 -0
- package/dist/schema/index.js +63 -0
- package/dist/schema/notifications.d.ts +97 -0
- package/dist/schema/notifications.js +45 -0
- package/dist/schema/organizations.d.ts +73 -0
- package/dist/schema/organizations.js +33 -0
- package/dist/schema/posts.d.ts +1612 -0
- package/dist/schema/posts.js +93 -0
- package/dist/schema/replications.d.ts +541 -0
- package/dist/schema/replications.js +37 -0
- package/dist/schema/services.d.ts +86 -0
- package/dist/schema/services.js +38 -0
- package/dist/schema/teams.d.ts +524 -0
- package/dist/schema/teams.js +56 -0
- package/dist/schema/users.d.ts +123 -0
- package/dist/schema/users.js +34 -0
- package/package.json +37 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const index_1 = require("@/schema/index");
|
|
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: index_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;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const OrganizationsSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
owner_id: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
avatar_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
mission: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
size: z.ZodString;
|
|
9
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
urls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
value: string;
|
|
15
|
+
}, {
|
|
16
|
+
value: string;
|
|
17
|
+
}>, "many">>>;
|
|
18
|
+
base_role: z.ZodDefault<z.ZodEnum<["admin", "read", "write", "none"]>>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
size: string;
|
|
23
|
+
owner_id: string;
|
|
24
|
+
base_role: "none" | "admin" | "read" | "write";
|
|
25
|
+
email?: string | null | undefined;
|
|
26
|
+
avatar_path?: string | null | undefined;
|
|
27
|
+
mission?: string | null | undefined;
|
|
28
|
+
domain?: string | null | undefined;
|
|
29
|
+
urls?: {
|
|
30
|
+
value: string;
|
|
31
|
+
}[] | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
size: string;
|
|
36
|
+
owner_id: string;
|
|
37
|
+
email?: string | null | undefined;
|
|
38
|
+
avatar_path?: string | null | undefined;
|
|
39
|
+
mission?: string | null | undefined;
|
|
40
|
+
domain?: string | null | undefined;
|
|
41
|
+
urls?: {
|
|
42
|
+
value: string;
|
|
43
|
+
}[] | null | undefined;
|
|
44
|
+
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
declare const MembershipSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
user_id: z.ZodString;
|
|
49
|
+
org_id: z.ZodString;
|
|
50
|
+
team_id: z.ZodString;
|
|
51
|
+
role: z.ZodEnum<["admin", "read", "write", "none"]>;
|
|
52
|
+
added_at: z.ZodDefault<z.ZodString>;
|
|
53
|
+
visibility: z.ZodDefault<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
id: string;
|
|
56
|
+
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
57
|
+
role: "none" | "admin" | "read" | "write";
|
|
58
|
+
user_id: string;
|
|
59
|
+
org_id: string;
|
|
60
|
+
team_id: string;
|
|
61
|
+
added_at: string;
|
|
62
|
+
}, {
|
|
63
|
+
id: string;
|
|
64
|
+
role: "none" | "admin" | "read" | "write";
|
|
65
|
+
user_id: string;
|
|
66
|
+
org_id: string;
|
|
67
|
+
team_id: string;
|
|
68
|
+
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
69
|
+
added_at?: string | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
type Organization = z.infer<typeof OrganizationsSchema>;
|
|
72
|
+
type Membership = z.infer<typeof MembershipSchema>;
|
|
73
|
+
export { OrganizationsSchema, MembershipSchema, type Organization, type Membership, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MembershipSchema = exports.OrganizationsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const index_1 = require("@/schema/index");
|
|
6
|
+
const OrganizationsSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().uuid(),
|
|
8
|
+
owner_id: zod_1.z.string().uuid(),
|
|
9
|
+
name: zod_1.z.string(),
|
|
10
|
+
avatar_path: zod_1.z.string().nullable().optional(),
|
|
11
|
+
mission: zod_1.z.string().nullable().optional(),
|
|
12
|
+
size: zod_1.z.string(),
|
|
13
|
+
email: zod_1.z.string().nullable().optional(),
|
|
14
|
+
domain: zod_1.z.string().nullable().optional(),
|
|
15
|
+
urls: zod_1.z
|
|
16
|
+
.array(zod_1.z.object({
|
|
17
|
+
value: zod_1.z.string(),
|
|
18
|
+
}))
|
|
19
|
+
.nullable()
|
|
20
|
+
.optional(),
|
|
21
|
+
base_role: index_1.RoleSchema.default("write"),
|
|
22
|
+
});
|
|
23
|
+
exports.OrganizationsSchema = OrganizationsSchema;
|
|
24
|
+
const MembershipSchema = zod_1.z.object({
|
|
25
|
+
id: zod_1.z.string().uuid(),
|
|
26
|
+
user_id: zod_1.z.string().uuid(),
|
|
27
|
+
org_id: zod_1.z.string().uuid(),
|
|
28
|
+
team_id: zod_1.z.string().uuid(),
|
|
29
|
+
role: index_1.RoleSchema,
|
|
30
|
+
added_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
31
|
+
visibility: index_1.VisibilitySchema.default("public"),
|
|
32
|
+
});
|
|
33
|
+
exports.MembershipSchema = MembershipSchema;
|