@ourofoundation/ouro-js 1.0.0 → 1.0.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 +14 -15
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -0
- package/dist/schema/assets.js +7 -6
- package/dist/schema/assets.js.map +1 -0
- package/dist/schema/blueprints.js +5 -4
- package/dist/schema/blueprints.js.map +1 -0
- package/dist/schema/comments.js +5 -4
- package/dist/schema/comments.js.map +1 -0
- package/dist/schema/common.d.ts +81 -3
- package/dist/schema/common.js +64 -4
- package/dist/schema/common.js.map +1 -0
- package/dist/schema/conversations.js +5 -4
- package/dist/schema/conversations.js.map +1 -0
- package/dist/schema/datasets.js +6 -5
- package/dist/schema/datasets.js.map +1 -0
- package/dist/schema/files.js +2 -1
- package/dist/schema/files.js.map +1 -0
- package/dist/schema/notifications.js +3 -2
- package/dist/schema/notifications.js.map +1 -0
- package/dist/schema/organizations.js +5 -4
- package/dist/schema/organizations.js.map +1 -0
- package/dist/schema/posts.d.ts +10 -10
- package/dist/schema/posts.js +10 -9
- package/dist/schema/posts.js.map +1 -0
- package/dist/schema/replications.d.ts +82 -25
- package/dist/schema/replications.js +15 -10
- package/dist/schema/replications.js.map +1 -0
- package/dist/schema/services.js +3 -2
- package/dist/schema/services.js.map +1 -0
- package/dist/schema/teams.js +8 -7
- package/dist/schema/teams.js.map +1 -0
- package/dist/schema/users.js +1 -0
- package/dist/schema/users.js.map +1 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema, type Blueprint, type CreateBlueprint, type UpdateBlueprint } from "@/schema/blueprints";
|
|
1
|
+
import { Asset, type AssetSchema } from "./schema/assets";
|
|
2
|
+
import { CommentSchema, CreateCommentSchema, type Comment, type CreateComment } from "./schema/comments";
|
|
3
|
+
import { PurchaseAssetSchema, PermissionSchema, RoleSchema, VisibilitySchema, MonetizationSchema, ConnectionSchema, EmbeddingSchema, AssetTypeSchema, type Role, type Connection, type Embedding, type Visibility, type Monetization, type AssetTypes, type PurchaseAsset, type Permission } from "./schema/common";
|
|
4
|
+
import { MessageSchema, UpdateConversationSchema, CreateConversationSchema, ConversationSchema, type Conversation, type CreateConversation, type UpdateConversation, type Message } from "./schema/conversations";
|
|
5
|
+
import { DatasetSchema, CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, updateDatasetSchema, type Dataset, type CreateFromFileDataset, type CreateFromSchemaDataset, type UpdateDataset } from "./schema/datasets";
|
|
6
|
+
import { FileSchema, type File } from "./schema/files";
|
|
7
|
+
import { NotificationSchema, type Notification } from "./schema/notifications";
|
|
8
|
+
import { OrganizationsSchema, MembershipSchema, type Organization, type Membership } from "./schema/organizations";
|
|
9
|
+
import { TipTapSchema, ContentSchema, PostSchema, CreatePostSchema, ListPostsSchema, ReadPostSchema, ReadPostsSchema, updatePostSchema, type Post, type CreatePost, type ListPosts, type ReadPost, type ReadPosts, type UpdatePost, type Content, type TipTap } from "./schema/posts";
|
|
10
|
+
import { routeSchema, serviceSchema, authType, type Service, type Route, type AuthType } from "./schema/services";
|
|
11
|
+
import { TeamSchema, CreateTeamSchema, ReadTeamSchema, ReadTeamsSchema, UpdateTeamSchema, type Team, type CreateTeam, type ReadTeam, type ReadTeams, type UpdateTeam } from "./schema/teams";
|
|
12
|
+
import { ProfileSchema, ReadProfileSchema, UpdateProfileSchema, type Profile, type UpdateProfile, type ReadProfile } from "./schema/users";
|
|
13
|
+
import { ReplicationSchema, CreateReplicationSchema, UpdateReplicationSchema, type Replication, type CreateReplication, type UpdateReplication } from "./schema/replications";
|
|
14
|
+
import { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema, type Blueprint, type CreateBlueprint, type UpdateBlueprint } from "./schema/blueprints";
|
|
16
15
|
export { RoleSchema, VisibilitySchema, MonetizationSchema, ConnectionSchema, EmbeddingSchema, AssetTypeSchema, type Role, type Connection, type Embedding, type Visibility, type Monetization, type AssetTypes, Asset, type AssetSchema, CommentSchema, CreateCommentSchema, type Comment, type CreateComment, PurchaseAssetSchema, PermissionSchema, type PurchaseAsset, type Permission, MessageSchema, UpdateConversationSchema, CreateConversationSchema, ConversationSchema, type Conversation, type CreateConversation, type UpdateConversation, type Message, DatasetSchema, CreateDatasetFromFileSchema, CreateDatasetFromSchemaSchema, updateDatasetSchema, type Dataset, type CreateFromFileDataset, type CreateFromSchemaDataset, type UpdateDataset, FileSchema, type File, NotificationSchema, type Notification, OrganizationsSchema, MembershipSchema, type Organization, type Membership, TipTapSchema, ContentSchema, PostSchema, CreatePostSchema, ListPostsSchema, ReadPostSchema, ReadPostsSchema, updatePostSchema, type Post, type CreatePost, type ListPosts, type ReadPost, type ReadPosts, type UpdatePost, type Content, type TipTap, routeSchema, serviceSchema, authType, type Service, type Route, type AuthType, TeamSchema, CreateTeamSchema, ReadTeamSchema, ReadTeamsSchema, UpdateTeamSchema, type Team, type CreateTeam, type ReadTeam, type ReadTeams, type UpdateTeam, ProfileSchema, ReadProfileSchema, UpdateProfileSchema, type Profile, type UpdateProfile, type ReadProfile, ReplicationSchema, CreateReplicationSchema, UpdateReplicationSchema, type Replication, type CreateReplication, type UpdateReplication, BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema, type Blueprint, type CreateBlueprint, type UpdateBlueprint, };
|
package/dist/index.js
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateBlueprintSchema = exports.CreateBlueprintSchema = exports.BlueprintSchema = exports.UpdateReplicationSchema = exports.CreateReplicationSchema = exports.ReplicationSchema = exports.UpdateProfileSchema = exports.ReadProfileSchema = exports.ProfileSchema = exports.UpdateTeamSchema = exports.ReadTeamsSchema = exports.ReadTeamSchema = exports.CreateTeamSchema = exports.TeamSchema = exports.authType = exports.serviceSchema = exports.routeSchema = exports.updatePostSchema = exports.ReadPostsSchema = exports.ReadPostSchema = exports.ListPostsSchema = exports.CreatePostSchema = exports.PostSchema = exports.ContentSchema = exports.TipTapSchema = exports.MembershipSchema = exports.OrganizationsSchema = exports.NotificationSchema = exports.FileSchema = exports.updateDatasetSchema = exports.CreateDatasetFromSchemaSchema = exports.CreateDatasetFromFileSchema = exports.DatasetSchema = exports.ConversationSchema = exports.CreateConversationSchema = exports.UpdateConversationSchema = exports.MessageSchema = exports.PermissionSchema = exports.PurchaseAssetSchema = exports.CreateCommentSchema = exports.CommentSchema = exports.AssetTypeSchema = exports.EmbeddingSchema = exports.ConnectionSchema = exports.MonetizationSchema = exports.VisibilitySchema = exports.RoleSchema = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "RoleSchema", { enumerable: true, get: function () { return index_1.RoleSchema; } });
|
|
6
|
-
Object.defineProperty(exports, "VisibilitySchema", { enumerable: true, get: function () { return index_1.VisibilitySchema; } });
|
|
7
|
-
Object.defineProperty(exports, "MonetizationSchema", { enumerable: true, get: function () { return index_1.MonetizationSchema; } });
|
|
8
|
-
Object.defineProperty(exports, "ConnectionSchema", { enumerable: true, get: function () { return index_1.ConnectionSchema; } });
|
|
9
|
-
Object.defineProperty(exports, "EmbeddingSchema", { enumerable: true, get: function () { return index_1.EmbeddingSchema; } });
|
|
10
|
-
Object.defineProperty(exports, "AssetTypeSchema", { enumerable: true, get: function () { return index_1.AssetTypeSchema; } });
|
|
11
|
-
const comments_1 = require("@/schema/comments");
|
|
4
|
+
const comments_1 = require("./schema/comments");
|
|
12
5
|
Object.defineProperty(exports, "CommentSchema", { enumerable: true, get: function () { return comments_1.CommentSchema; } });
|
|
13
6
|
Object.defineProperty(exports, "CreateCommentSchema", { enumerable: true, get: function () { return comments_1.CreateCommentSchema; } });
|
|
14
|
-
const common_1 = require("
|
|
7
|
+
const common_1 = require("./schema/common");
|
|
15
8
|
Object.defineProperty(exports, "PurchaseAssetSchema", { enumerable: true, get: function () { return common_1.PurchaseAssetSchema; } });
|
|
16
9
|
Object.defineProperty(exports, "PermissionSchema", { enumerable: true, get: function () { return common_1.PermissionSchema; } });
|
|
17
|
-
|
|
10
|
+
Object.defineProperty(exports, "RoleSchema", { enumerable: true, get: function () { return common_1.RoleSchema; } });
|
|
11
|
+
Object.defineProperty(exports, "VisibilitySchema", { enumerable: true, get: function () { return common_1.VisibilitySchema; } });
|
|
12
|
+
Object.defineProperty(exports, "MonetizationSchema", { enumerable: true, get: function () { return common_1.MonetizationSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "ConnectionSchema", { enumerable: true, get: function () { return common_1.ConnectionSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "EmbeddingSchema", { enumerable: true, get: function () { return common_1.EmbeddingSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "AssetTypeSchema", { enumerable: true, get: function () { return common_1.AssetTypeSchema; } });
|
|
16
|
+
const conversations_1 = require("./schema/conversations");
|
|
18
17
|
Object.defineProperty(exports, "MessageSchema", { enumerable: true, get: function () { return conversations_1.MessageSchema; } });
|
|
19
18
|
Object.defineProperty(exports, "UpdateConversationSchema", { enumerable: true, get: function () { return conversations_1.UpdateConversationSchema; } });
|
|
20
19
|
Object.defineProperty(exports, "CreateConversationSchema", { enumerable: true, get: function () { return conversations_1.CreateConversationSchema; } });
|
|
21
20
|
Object.defineProperty(exports, "ConversationSchema", { enumerable: true, get: function () { return conversations_1.ConversationSchema; } });
|
|
22
|
-
const datasets_1 = require("
|
|
21
|
+
const datasets_1 = require("./schema/datasets");
|
|
23
22
|
Object.defineProperty(exports, "DatasetSchema", { enumerable: true, get: function () { return datasets_1.DatasetSchema; } });
|
|
24
23
|
Object.defineProperty(exports, "CreateDatasetFromFileSchema", { enumerable: true, get: function () { return datasets_1.CreateDatasetFromFileSchema; } });
|
|
25
24
|
Object.defineProperty(exports, "CreateDatasetFromSchemaSchema", { enumerable: true, get: function () { return datasets_1.CreateDatasetFromSchemaSchema; } });
|
|
26
25
|
Object.defineProperty(exports, "updateDatasetSchema", { enumerable: true, get: function () { return datasets_1.updateDatasetSchema; } });
|
|
27
|
-
const files_1 = require("
|
|
26
|
+
const files_1 = require("./schema/files");
|
|
28
27
|
Object.defineProperty(exports, "FileSchema", { enumerable: true, get: function () { return files_1.FileSchema; } });
|
|
29
|
-
const notifications_1 = require("
|
|
28
|
+
const notifications_1 = require("./schema/notifications");
|
|
30
29
|
Object.defineProperty(exports, "NotificationSchema", { enumerable: true, get: function () { return notifications_1.NotificationSchema; } });
|
|
31
|
-
const organizations_1 = require("
|
|
30
|
+
const organizations_1 = require("./schema/organizations");
|
|
32
31
|
Object.defineProperty(exports, "OrganizationsSchema", { enumerable: true, get: function () { return organizations_1.OrganizationsSchema; } });
|
|
33
32
|
Object.defineProperty(exports, "MembershipSchema", { enumerable: true, get: function () { return organizations_1.MembershipSchema; } });
|
|
34
|
-
const posts_1 = require("
|
|
33
|
+
const posts_1 = require("./schema/posts");
|
|
35
34
|
Object.defineProperty(exports, "TipTapSchema", { enumerable: true, get: function () { return posts_1.TipTapSchema; } });
|
|
36
35
|
Object.defineProperty(exports, "ContentSchema", { enumerable: true, get: function () { return posts_1.ContentSchema; } });
|
|
37
36
|
Object.defineProperty(exports, "PostSchema", { enumerable: true, get: function () { return posts_1.PostSchema; } });
|
|
@@ -40,25 +39,26 @@ Object.defineProperty(exports, "ListPostsSchema", { enumerable: true, get: funct
|
|
|
40
39
|
Object.defineProperty(exports, "ReadPostSchema", { enumerable: true, get: function () { return posts_1.ReadPostSchema; } });
|
|
41
40
|
Object.defineProperty(exports, "ReadPostsSchema", { enumerable: true, get: function () { return posts_1.ReadPostsSchema; } });
|
|
42
41
|
Object.defineProperty(exports, "updatePostSchema", { enumerable: true, get: function () { return posts_1.updatePostSchema; } });
|
|
43
|
-
const services_1 = require("
|
|
42
|
+
const services_1 = require("./schema/services");
|
|
44
43
|
Object.defineProperty(exports, "routeSchema", { enumerable: true, get: function () { return services_1.routeSchema; } });
|
|
45
44
|
Object.defineProperty(exports, "serviceSchema", { enumerable: true, get: function () { return services_1.serviceSchema; } });
|
|
46
45
|
Object.defineProperty(exports, "authType", { enumerable: true, get: function () { return services_1.authType; } });
|
|
47
|
-
const teams_1 = require("
|
|
46
|
+
const teams_1 = require("./schema/teams");
|
|
48
47
|
Object.defineProperty(exports, "TeamSchema", { enumerable: true, get: function () { return teams_1.TeamSchema; } });
|
|
49
48
|
Object.defineProperty(exports, "CreateTeamSchema", { enumerable: true, get: function () { return teams_1.CreateTeamSchema; } });
|
|
50
49
|
Object.defineProperty(exports, "ReadTeamSchema", { enumerable: true, get: function () { return teams_1.ReadTeamSchema; } });
|
|
51
50
|
Object.defineProperty(exports, "ReadTeamsSchema", { enumerable: true, get: function () { return teams_1.ReadTeamsSchema; } });
|
|
52
51
|
Object.defineProperty(exports, "UpdateTeamSchema", { enumerable: true, get: function () { return teams_1.UpdateTeamSchema; } });
|
|
53
|
-
const users_1 = require("
|
|
52
|
+
const users_1 = require("./schema/users");
|
|
54
53
|
Object.defineProperty(exports, "ProfileSchema", { enumerable: true, get: function () { return users_1.ProfileSchema; } });
|
|
55
54
|
Object.defineProperty(exports, "ReadProfileSchema", { enumerable: true, get: function () { return users_1.ReadProfileSchema; } });
|
|
56
55
|
Object.defineProperty(exports, "UpdateProfileSchema", { enumerable: true, get: function () { return users_1.UpdateProfileSchema; } });
|
|
57
|
-
const replications_1 = require("
|
|
56
|
+
const replications_1 = require("./schema/replications");
|
|
58
57
|
Object.defineProperty(exports, "ReplicationSchema", { enumerable: true, get: function () { return replications_1.ReplicationSchema; } });
|
|
59
58
|
Object.defineProperty(exports, "CreateReplicationSchema", { enumerable: true, get: function () { return replications_1.CreateReplicationSchema; } });
|
|
60
59
|
Object.defineProperty(exports, "UpdateReplicationSchema", { enumerable: true, get: function () { return replications_1.UpdateReplicationSchema; } });
|
|
61
|
-
const blueprints_1 = require("
|
|
60
|
+
const blueprints_1 = require("./schema/blueprints");
|
|
62
61
|
Object.defineProperty(exports, "BlueprintSchema", { enumerable: true, get: function () { return blueprints_1.BlueprintSchema; } });
|
|
63
62
|
Object.defineProperty(exports, "CreateBlueprintSchema", { enumerable: true, get: function () { return blueprints_1.CreateBlueprintSchema; } });
|
|
64
63
|
Object.defineProperty(exports, "UpdateBlueprintSchema", { enumerable: true, get: function () { return blueprints_1.UpdateBlueprintSchema; } });
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,gDAK2B;AA2IzB,8FA/IA,wBAAa,OA+IA;AACb,oGA/IA,8BAAmB,OA+IA;AA1IrB,4CAiByB;AA4HvB,oGA5IA,4BAAmB,OA4IA;AACnB,iGA5IA,yBAAgB,OA4IA;AApBhB,2FAvHA,mBAAU,OAuHA;AACV,iGAvHA,yBAAgB,OAuHA;AAChB,mGAvHA,2BAAkB,OAuHA;AAClB,iGAvHA,yBAAgB,OAuHA;AAChB,gGAvHA,wBAAe,OAuHA;AACf,gGAvHA,wBAAe,OAuHA;AA5GjB,0DASgC;AAsH9B,8FA9HA,6BAAa,OA8HA;AACb,yGA9HA,wCAAwB,OA8HA;AACxB,yGA9HA,wCAAwB,OA8HA;AACxB,mGA9HA,kCAAkB,OA8HA;AAvHpB,gDAS2B;AAoHzB,8FA5HA,wBAAa,OA4HA;AACb,4GA5HA,sCAA2B,OA4HA;AAC3B,8GA5HA,wCAA6B,OA4HA;AAC7B,oGA5HA,8BAAmB,OA4HA;AArHrB,0CAAuD;AA2HrD,2FA3HO,kBAAU,OA2HP;AAzHZ,0DAA+E;AA4H7E,mGA5HO,kCAAkB,OA4HP;AA1HpB,0DAKgC;AAwH9B,oGA5HA,mCAAmB,OA4HA;AACnB,iGA5HA,gCAAgB,OA4HA;AAvHlB,0CAiBwB;AA0GtB,6FA1HA,oBAAY,OA0HA;AACZ,8FA1HA,qBAAa,OA0HA;AACb,2FA1HA,kBAAU,OA0HA;AACV,iGA1HA,wBAAgB,OA0HA;AAChB,gGA1HA,uBAAe,OA0HA;AACf,+FA1HA,sBAAc,OA0HA;AACd,gGA1HA,uBAAe,OA0HA;AACf,iGA1HA,wBAAgB,OA0HA;AA/GlB,gDAO2B;AAkHzB,4FAxHA,sBAAW,OAwHA;AACX,8FAxHA,wBAAa,OAwHA;AACb,yFAxHA,mBAAQ,OAwHA;AAlHV,0CAWwB;AA4GtB,2FAtHA,kBAAU,OAsHA;AACV,iGAtHA,wBAAgB,OAsHA;AAChB,+FAtHA,sBAAc,OAsHA;AACd,gGAtHA,uBAAe,OAsHA;AACf,iGAtHA,wBAAgB,OAsHA;AA9GlB,0CAOwB;AA8GtB,8FApHA,qBAAa,OAoHA;AACb,kGApHA,yBAAiB,OAoHA;AACjB,oGApHA,2BAAmB,OAoHA;AA9GrB,wDAO+B;AA4G7B,kGAlHA,gCAAiB,OAkHA;AACjB,wGAlHA,sCAAuB,OAkHA;AACvB,wGAlHA,sCAAuB,OAkHA;AA5GzB,oDAO6B;AA0G3B,gGAhHA,4BAAe,OAgHA;AACf,sGAhHA,kCAAqB,OAgHA;AACrB,sGAhHA,kCAAqB,OAgHA"}
|
package/dist/schema/assets.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AssetSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
6
|
-
const organizations_1 = require("
|
|
7
|
-
const teams_1 = require("
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
const organizations_1 = require("./organizations");
|
|
7
|
+
const teams_1 = require("./teams");
|
|
8
8
|
const users_1 = require("./users");
|
|
9
9
|
const AssetSchema = zod_1.z.object({
|
|
10
10
|
id: zod_1.z.string().uuid(),
|
|
@@ -15,14 +15,14 @@ const AssetSchema = zod_1.z.object({
|
|
|
15
15
|
team_id: zod_1.z.string().uuid(),
|
|
16
16
|
team: teams_1.TeamSchema.partial().optional(),
|
|
17
17
|
parent_id: zod_1.z.string().uuid().optional().nullable(),
|
|
18
|
-
asset_type:
|
|
18
|
+
asset_type: common_1.AssetTypeSchema,
|
|
19
19
|
name: zod_1.z.string(),
|
|
20
20
|
name_url_slug: zod_1.z.string().optional().nullable(),
|
|
21
21
|
slug: zod_1.z.string().optional().nullable(),
|
|
22
22
|
description: zod_1.z.string().nullable().optional(),
|
|
23
|
-
visibility:
|
|
23
|
+
visibility: common_1.VisibilitySchema,
|
|
24
24
|
// Product information
|
|
25
|
-
monetization:
|
|
25
|
+
monetization: common_1.MonetizationSchema,
|
|
26
26
|
price: zod_1.z.number().nullable().optional(),
|
|
27
27
|
unit_cost: zod_1.z.number().nullable().optional(),
|
|
28
28
|
cost_accounting: zod_1.z.enum(["fixed", "variable"]).optional().nullable(),
|
|
@@ -36,3 +36,4 @@ const AssetSchema = zod_1.z.object({
|
|
|
36
36
|
last_updated: zod_1.z.string(),
|
|
37
37
|
});
|
|
38
38
|
exports.AssetSchema = AssetSchema;
|
|
39
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/schema/assets.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAIkB;AAClB,mDAAsD;AACtD,mCAAqC;AAErC,mCAAwC;AAExC,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,OAAO,EAAE,OAAC,CAAC,MAAM,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EAAE,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1C,uBAAuB;IACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1D,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClE,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAGM,kCAAW"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateBlueprintSchema = exports.CreateBlueprintSchema = exports.BlueprintSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("
|
|
7
|
-
const
|
|
6
|
+
const assets_1 = require("./assets");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
8
|
const BlueprintSchema = assets_1.AssetSchema.extend({
|
|
9
|
-
asset_type:
|
|
9
|
+
asset_type: common_1.AssetTypeSchema.refine((val) => val === "blueprint"),
|
|
10
10
|
});
|
|
11
11
|
exports.BlueprintSchema = BlueprintSchema;
|
|
12
12
|
const CreateBlueprintSchema = assets_1.AssetSchema.partial().extend({
|
|
@@ -30,8 +30,9 @@ const UpdateBlueprintSchema = zod_1.z.object({
|
|
|
30
30
|
name_url_slug: zod_1.z.string().nullable().optional(),
|
|
31
31
|
name: zod_1.z.string().nullable().optional(),
|
|
32
32
|
description: zod_1.z.string().nullable().optional(),
|
|
33
|
-
visibility:
|
|
33
|
+
visibility: common_1.VisibilitySchema.nullable().optional(),
|
|
34
34
|
metadata: zod_1.z.object({}).passthrough().optional().nullable(),
|
|
35
35
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
36
36
|
});
|
|
37
37
|
exports.UpdateBlueprintSchema = UpdateBlueprintSchema;
|
|
38
|
+
//# sourceMappingURL=blueprints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blueprints.js","sourceRoot":"","sources":["../../src/schema/blueprints.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAIkB;AAElB,MAAM,eAAe,GAAG,oBAAW,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,WAAW,CAAC;CACjE,CAAC,CAAC;AAiCD,0CAAe;AA/BjB,MAAM,qBAAqB,GAAG,oBAAW,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IACzD,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,IAAI,EAAE;SACN,OAAO,CAAC,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC;IAC1E,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC;IACzE,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,QAAQ,EAAE,OAAC;SACR,MAAM,CAAC;QACN,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC1C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;KAC3C,CAAC;SACD,WAAW,EAAE;CACjB,CAAC,CAAC;AAkBD,sDAAqB;AAhBvB,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,yBAAgB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1D,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AASD,sDAAqB"}
|
package/dist/schema/comments.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreateCommentSchema = exports.CommentSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("
|
|
7
|
-
const
|
|
6
|
+
const assets_1 = require("./assets");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
8
|
const CommentSchema = assets_1.AssetSchema.extend({
|
|
9
|
-
asset_type:
|
|
9
|
+
asset_type: common_1.AssetTypeSchema.refine((x) => ["comment"].includes(x)),
|
|
10
10
|
preview: zod_1.z
|
|
11
11
|
.object({
|
|
12
12
|
type: zod_1.z.string().refine((x) => x === "doc"),
|
|
@@ -23,10 +23,11 @@ const CreateCommentSchema = CommentSchema.partial()
|
|
|
23
23
|
user_id: true,
|
|
24
24
|
})
|
|
25
25
|
.extend({
|
|
26
|
-
asset_type:
|
|
26
|
+
asset_type: common_1.AssetTypeSchema.default("comment").refine((x) => x === "comment"),
|
|
27
27
|
id: zod_1.z.string().default(() => (0, uuidv7_1.uuidv7)()),
|
|
28
28
|
name: zod_1.z.string().default(""),
|
|
29
29
|
created_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
30
30
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
31
31
|
});
|
|
32
32
|
exports.CreateCommentSchema = CreateCommentSchema;
|
|
33
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../../src/schema/comments.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAA2C;AAE3C,MAAM,aAAa,GAAG,oBAAW,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClE,OAAO,EAAE,OAAC;SACP,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC;QAC3C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;KAC7C,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;CACzC,CAAC,CAAC;AAiBM,sCAAa;AAftB,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,EAAE;KAChD,IAAI,CAAC;IACJ,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,IAAI;CACd,CAAC;KACD,MAAM,CAAC;IACN,UAAU,EAAE,wBAAe,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CACnD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CACvB;IACD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC;IACtC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9D,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AAEmB,kDAAmB"}
|
package/dist/schema/common.d.ts
CHANGED
|
@@ -1,4 +1,76 @@
|
|
|
1
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
|
+
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", "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
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
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" | "component";
|
|
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
|
+
}>;
|
|
2
74
|
declare const PurchaseAssetSchema: z.ZodObject<{
|
|
3
75
|
assetId: z.ZodString;
|
|
4
76
|
method: z.ZodEnum<["checkout", "api"]>;
|
|
@@ -32,6 +104,12 @@ declare const PermissionSchema: z.ZodObject<{
|
|
|
32
104
|
user_id: string;
|
|
33
105
|
};
|
|
34
106
|
}>;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
107
|
+
type Role = z.infer<typeof RoleSchema>;
|
|
108
|
+
type Connection = z.infer<typeof ConnectionSchema>;
|
|
109
|
+
type Embedding = z.infer<typeof EmbeddingSchema>;
|
|
110
|
+
type Visibility = z.infer<typeof VisibilitySchema>;
|
|
111
|
+
type Monetization = z.infer<typeof MonetizationSchema>;
|
|
112
|
+
type AssetTypes = z.infer<typeof AssetTypeSchema>;
|
|
113
|
+
type PurchaseAsset = z.infer<typeof PurchaseAssetSchema>;
|
|
114
|
+
type Permission = z.infer<typeof PermissionSchema>;
|
|
115
|
+
export { RoleSchema, VisibilitySchema, MonetizationSchema, ConnectionSchema, EmbeddingSchema, AssetTypeSchema, PurchaseAssetSchema, PermissionSchema, type Role, type Connection, type Embedding, type Visibility, type Monetization, type AssetTypes, type PurchaseAsset, type Permission, };
|
package/dist/schema/common.js
CHANGED
|
@@ -1,18 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PermissionSchema = exports.PurchaseAssetSchema = void 0;
|
|
3
|
+
exports.PermissionSchema = exports.PurchaseAssetSchema = exports.AssetTypeSchema = exports.EmbeddingSchema = exports.ConnectionSchema = exports.MonetizationSchema = exports.VisibilitySchema = exports.RoleSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
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;
|
|
6
65
|
const PurchaseAssetSchema = zod_1.z.object({
|
|
7
66
|
assetId: zod_1.z.string().uuid(),
|
|
8
67
|
method: zod_1.z.enum(["checkout", "api"]),
|
|
9
|
-
assetType:
|
|
68
|
+
assetType: AssetTypeSchema,
|
|
10
69
|
});
|
|
11
70
|
exports.PurchaseAssetSchema = PurchaseAssetSchema;
|
|
12
71
|
const PermissionSchema = zod_1.z.object({
|
|
13
|
-
role:
|
|
72
|
+
role: RoleSchema,
|
|
14
73
|
user: zod_1.z.object({
|
|
15
74
|
user_id: zod_1.z.string().uuid(),
|
|
16
75
|
}),
|
|
17
76
|
});
|
|
18
77
|
exports.PermissionSchema = PermissionSchema;
|
|
78
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schema/common.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,eAAe,GAAG,OAAC,CAAC,IAAI,CAAC;IAC7B,MAAM;IACN,cAAc;IACd,MAAM;IACN,SAAS;IACT,MAAM;IACN,SAAS;IACT,OAAO;IACP,MAAM;IACN,SAAS;IACT,cAAc;IACd,WAAW;IACX,aAAa;CACd,CAAC,CAAC;AA4ED,0CAAe;AA1EjB,MAAM,gBAAgB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC9B,QAAQ;IACR,SAAS;IACT,cAAc;IACd,WAAW;IACX,SAAS;CACV,CAAC,CAAC;AAgED,4CAAgB;AA9DlB,MAAM,UAAU,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,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AAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,iBAAiB,EAAE,eAAe;IAClC,iBAAiB,EAAE,eAAe;IAClC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AA4BD,4CAAgB;AA1BlB,MAAM,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IACnC,SAAS,EAAE,eAAe;CAC3B,CAAC,CAAC;AAyBD,kDAAmB;AAvBrB,MAAM,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC;QACb,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;KAC3B,CAAC;CACH,CAAC,CAAC;AAmBD,4CAAgB"}
|
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ConversationSchema = exports.CreateConversationSchema = exports.UpdateConversationSchema = exports.MessageSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const
|
|
6
|
+
const common_1 = require("./common");
|
|
7
7
|
const assets_1 = require("./assets");
|
|
8
8
|
const posts_1 = require("./posts");
|
|
9
9
|
const ConversationSchema = assets_1.AssetSchema.extend({
|
|
10
10
|
metadata: zod_1.z.object({
|
|
11
11
|
members: zod_1.z.array(zod_1.z.string()),
|
|
12
12
|
}),
|
|
13
|
-
asset_type:
|
|
13
|
+
asset_type: common_1.AssetTypeSchema.default("conversation"),
|
|
14
14
|
});
|
|
15
15
|
exports.ConversationSchema = ConversationSchema;
|
|
16
16
|
const CreateConversationSchema = ConversationSchema.omit({
|
|
@@ -26,8 +26,8 @@ const CreateConversationSchema = ConversationSchema.omit({
|
|
|
26
26
|
.default(() => (0, uuidv7_1.uuidv7)()),
|
|
27
27
|
org_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
28
28
|
team_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
29
|
-
monetization:
|
|
30
|
-
visibility:
|
|
29
|
+
monetization: common_1.MonetizationSchema.default("none"),
|
|
30
|
+
visibility: common_1.VisibilitySchema.default("private"),
|
|
31
31
|
});
|
|
32
32
|
exports.CreateConversationSchema = CreateConversationSchema;
|
|
33
33
|
// Partial because we can make updates to conversations without providing all fields
|
|
@@ -51,3 +51,4 @@ const MessageSchema = zod_1.z.object({
|
|
|
51
51
|
metadata: zod_1.z.object({}).passthrough().nullable().optional(),
|
|
52
52
|
});
|
|
53
53
|
exports.MessageSchema = MessageSchema;
|
|
54
|
+
//# sourceMappingURL=conversations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/schema/conversations.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAIkB;AAClB,qCAAuC;AACvC,mCAAuC;AAEvC,MAAM,kBAAkB,GAAG,oBAAW,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;QACjB,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,UAAU,EAAE,wBAAe,CAAC,OAAO,CAAC,cAAc,CAAC;CACpD,CAAC,CAAC;AAiDD,gDAAkB;AA/CpB,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACvD,MAAM,EAAE,IAAI;IACZ,O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,IAAI,EAAE,CAAC;IACnC,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC;AAQD,sCAAa"}
|
package/dist/schema/datasets.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateDatasetSchema = exports.CreateDatasetFromSchemaSchema = exports.CreateDatasetFromFileSchema = exports.DatasetSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("
|
|
7
|
-
const
|
|
6
|
+
const assets_1 = require("./assets");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
8
|
const DatasetMetadataSchema = zod_1.z.object({
|
|
9
9
|
table_name: zod_1.z.string(),
|
|
10
10
|
schema: zod_1.z
|
|
@@ -23,7 +23,7 @@ const DatasetMetadataSchema = zod_1.z.object({
|
|
|
23
23
|
id: zod_1.z.string().uuid().optional(),
|
|
24
24
|
});
|
|
25
25
|
const DatasetSchema = assets_1.AssetSchema.extend({
|
|
26
|
-
asset_type:
|
|
26
|
+
asset_type: common_1.AssetTypeSchema.refine((val) => val === "dataset"),
|
|
27
27
|
metadata: DatasetMetadataSchema,
|
|
28
28
|
preview: zod_1.z.array(zod_1.z.object({}).passthrough()).optional().nullable(),
|
|
29
29
|
});
|
|
@@ -87,8 +87,8 @@ const updateDatasetSchema = zod_1.z.object({
|
|
|
87
87
|
name_url_slug: zod_1.z.string().nullable().optional(),
|
|
88
88
|
name: zod_1.z.string().nullable().optional(),
|
|
89
89
|
description: zod_1.z.string().nullable().optional(),
|
|
90
|
-
visibility:
|
|
91
|
-
monetization:
|
|
90
|
+
visibility: common_1.VisibilitySchema.nullable().optional(),
|
|
91
|
+
monetization: common_1.MonetizationSchema.nullable().optional(),
|
|
92
92
|
price: zod_1.z.number().nullable().optional(),
|
|
93
93
|
metadata: zod_1.z
|
|
94
94
|
.object({
|
|
@@ -101,3 +101,4 @@ const updateDatasetSchema = zod_1.z.object({
|
|
|
101
101
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
102
102
|
});
|
|
103
103
|
exports.updateDatasetSchema = updateDatasetSchema;
|
|
104
|
+
//# sourceMappingURL=datasets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/schema/datasets.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAIkB;AAElB,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,OAAO,CAAC,UAAU,CAAC;SACnB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC;IACtC,iDAAiD;IACjD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,Q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,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,yBAAgB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClD,YAAY,EAAE,2BAAkB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvC,QAAQ,EAAE,OAAC;SACR,MAAM,CAAC;QACN,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;KACvB,CAAC;SACD,WAAW,EAAE;SACb,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClE,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AAWD,kDAAmB"}
|
package/dist/schema/files.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const assets_1 = require("
|
|
5
|
+
const assets_1 = require("./assets");
|
|
6
6
|
const FileSchema = assets_1.AssetSchema.extend({
|
|
7
7
|
metadata: zod_1.z.object({
|
|
8
8
|
eTag: zod_1.z.string(),
|
|
@@ -14,3 +14,4 @@ const FileSchema = assets_1.AssetSchema.extend({
|
|
|
14
14
|
// preview: z.array(z.object({}).passthrough()).optional().nullable(),
|
|
15
15
|
});
|
|
16
16
|
exports.FileSchema = FileSchema;
|
|
17
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/schema/files.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAAuC;AAEvC,MAAM,UAAU,GAAG,oBAAW,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;QACpB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;QACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;KACzB,CAAC;IACF,sEAAsE;CACvE,CAAC,CAAC;AAIM,gCAAU"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotificationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("./common");
|
|
6
6
|
const NotificationTypeSchema = zod_1.z.enum([
|
|
7
7
|
"follow",
|
|
8
8
|
"like",
|
|
@@ -28,7 +28,7 @@ const NotificationSchema = zod_1.z.object({
|
|
|
28
28
|
asset: zod_1.z
|
|
29
29
|
.object({
|
|
30
30
|
assetId: zod_1.z.string(),
|
|
31
|
-
assetType:
|
|
31
|
+
assetType: common_1.AssetTypeSchema,
|
|
32
32
|
})
|
|
33
33
|
.optional(),
|
|
34
34
|
mention: zod_1.z.object({}).optional(),
|
|
@@ -43,3 +43,4 @@ const NotificationSchema = zod_1.z.object({
|
|
|
43
43
|
last_updated: zod_1.z.string(),
|
|
44
44
|
});
|
|
45
45
|
exports.NotificationSchema = NotificationSchema;
|
|
46
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@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AC,CAAC,OAAO,EAAE;IACnB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAIM,gDAAkB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MembershipSchema = exports.OrganizationsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("./common");
|
|
6
6
|
const OrganizationsSchema = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.string().uuid(),
|
|
8
8
|
owner_id: zod_1.z.string().uuid(),
|
|
@@ -18,7 +18,7 @@ const OrganizationsSchema = zod_1.z.object({
|
|
|
18
18
|
}))
|
|
19
19
|
.nullable()
|
|
20
20
|
.optional(),
|
|
21
|
-
base_role:
|
|
21
|
+
base_role: common_1.RoleSchema.default("write"),
|
|
22
22
|
});
|
|
23
23
|
exports.OrganizationsSchema = OrganizationsSchema;
|
|
24
24
|
const MembershipSchema = zod_1.z.object({
|
|
@@ -26,8 +26,9 @@ const MembershipSchema = zod_1.z.object({
|
|
|
26
26
|
user_id: zod_1.z.string().uuid(),
|
|
27
27
|
org_id: zod_1.z.string().uuid(),
|
|
28
28
|
team_id: zod_1.z.string().uuid(),
|
|
29
|
-
role:
|
|
29
|
+
role: common_1.RoleSchema,
|
|
30
30
|
added_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
31
|
-
visibility:
|
|
31
|
+
visibility: common_1.VisibilitySchema.default("public"),
|
|
32
32
|
});
|
|
33
33
|
exports.MembershipSchema = MembershipSchema;
|
|
34
|
+
//# sourceMappingURL=organizations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../src/schema/organizations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAAwD;AAExD,MAAM,mBAAmB,GAAG,OAA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E,CAAC;IAC5D,UAAU,EAAE,yBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC;CAC/C,CAAC,CAAC;AAOD,4CAAgB"}
|
package/dist/schema/posts.d.ts
CHANGED
|
@@ -732,7 +732,7 @@ declare const ReadPostSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.
|
|
|
732
732
|
parent: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
733
733
|
id: z.ZodString;
|
|
734
734
|
user_id: z.ZodString;
|
|
735
|
-
type: z.ZodEnum<["comment", "reference", "mention", "action"]>;
|
|
735
|
+
type: z.ZodEnum<["comment", "reference", "mention", "action", "component"]>;
|
|
736
736
|
action_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
737
737
|
source_id: z.ZodString;
|
|
738
738
|
target_id: z.ZodString;
|
|
@@ -741,7 +741,7 @@ declare const ReadPostSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.
|
|
|
741
741
|
created_at: z.ZodString;
|
|
742
742
|
last_updated: z.ZodString;
|
|
743
743
|
}, "strip", z.ZodTypeAny, {
|
|
744
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
744
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
745
745
|
id: string;
|
|
746
746
|
user_id: string;
|
|
747
747
|
created_at: string;
|
|
@@ -752,7 +752,7 @@ declare const ReadPostSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.
|
|
|
752
752
|
target_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
753
753
|
action_id?: string | null | undefined;
|
|
754
754
|
}, {
|
|
755
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
755
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
756
756
|
id: string;
|
|
757
757
|
user_id: string;
|
|
758
758
|
created_at: string;
|
|
@@ -793,7 +793,7 @@ declare const ReadPostSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.
|
|
|
793
793
|
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
794
794
|
description?: string | null | undefined;
|
|
795
795
|
parent?: {
|
|
796
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
796
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
797
797
|
id: string;
|
|
798
798
|
user_id: string;
|
|
799
799
|
created_at: string;
|
|
@@ -868,7 +868,7 @@ declare const ReadPostSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.
|
|
|
868
868
|
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
869
869
|
description?: string | null | undefined;
|
|
870
870
|
parent?: {
|
|
871
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
871
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
872
872
|
id: string;
|
|
873
873
|
user_id: string;
|
|
874
874
|
created_at: string;
|
|
@@ -1103,7 +1103,7 @@ declare const ReadPostsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1103
1103
|
parent: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1104
1104
|
id: z.ZodString;
|
|
1105
1105
|
user_id: z.ZodString;
|
|
1106
|
-
type: z.ZodEnum<["comment", "reference", "mention", "action"]>;
|
|
1106
|
+
type: z.ZodEnum<["comment", "reference", "mention", "action", "component"]>;
|
|
1107
1107
|
action_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1108
1108
|
source_id: z.ZodString;
|
|
1109
1109
|
target_id: z.ZodString;
|
|
@@ -1112,7 +1112,7 @@ declare const ReadPostsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1112
1112
|
created_at: z.ZodString;
|
|
1113
1113
|
last_updated: z.ZodString;
|
|
1114
1114
|
}, "strip", z.ZodTypeAny, {
|
|
1115
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
1115
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
1116
1116
|
id: string;
|
|
1117
1117
|
user_id: string;
|
|
1118
1118
|
created_at: string;
|
|
@@ -1123,7 +1123,7 @@ declare const ReadPostsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1123
1123
|
target_asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
1124
1124
|
action_id?: string | null | undefined;
|
|
1125
1125
|
}, {
|
|
1126
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
1126
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
1127
1127
|
id: string;
|
|
1128
1128
|
user_id: string;
|
|
1129
1129
|
created_at: string;
|
|
@@ -1164,7 +1164,7 @@ declare const ReadPostsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1164
1164
|
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
1165
1165
|
description?: string | null | undefined;
|
|
1166
1166
|
parent?: {
|
|
1167
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
1167
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
1168
1168
|
id: string;
|
|
1169
1169
|
user_id: string;
|
|
1170
1170
|
created_at: string;
|
|
@@ -1239,7 +1239,7 @@ declare const ReadPostsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
1239
1239
|
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
1240
1240
|
description?: string | null | undefined;
|
|
1241
1241
|
parent?: {
|
|
1242
|
-
type: "action" | "comment" | "reference" | "mention";
|
|
1242
|
+
type: "action" | "comment" | "reference" | "mention" | "component";
|
|
1243
1243
|
id: string;
|
|
1244
1244
|
user_id: string;
|
|
1245
1245
|
created_at: string;
|
package/dist/schema/posts.js
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updatePostSchema = exports.ReadPostsSchema = exports.ReadPostSchema = exports.ListPostsSchema = exports.CreatePostSchema = exports.PostSchema = exports.ContentSchema = exports.TipTapSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("
|
|
7
|
-
const
|
|
6
|
+
const assets_1 = require("./assets");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
8
|
const PostSchema = assets_1.AssetSchema.extend({
|
|
9
9
|
name: zod_1.z.string().nullable(),
|
|
10
|
-
asset_type:
|
|
10
|
+
asset_type: common_1.AssetTypeSchema.refine((x) => ["post", "comment"].includes(x)),
|
|
11
11
|
preview: zod_1.z
|
|
12
12
|
.object({
|
|
13
13
|
type: zod_1.z.string().refine((x) => x === "doc"),
|
|
@@ -40,14 +40,14 @@ const CreatePostSchema = PostSchema.partial()
|
|
|
40
40
|
.default(() => (0, uuidv7_1.uuidv7)()),
|
|
41
41
|
team_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
42
42
|
org_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
43
|
-
asset_type:
|
|
43
|
+
asset_type: common_1.AssetTypeSchema.default("post").refine((x) => x === "post"),
|
|
44
44
|
name: zod_1.z
|
|
45
45
|
.string()
|
|
46
46
|
.default("")
|
|
47
47
|
.transform((x) => x.trim())
|
|
48
48
|
.transform((x) => x || null),
|
|
49
|
-
visibility:
|
|
50
|
-
monetization:
|
|
49
|
+
visibility: common_1.VisibilitySchema.default("private"),
|
|
50
|
+
monetization: common_1.MonetizationSchema.default("none"),
|
|
51
51
|
// preview: z.object({
|
|
52
52
|
// type: z.string().refine((x) => x === "doc"),
|
|
53
53
|
// content: z.array(z.object({}).passthrough()),
|
|
@@ -66,7 +66,7 @@ const ReadPostSchema = PostSchema.extend({
|
|
|
66
66
|
reactions: zod_1.z.array(zod_1.z.object({}).passthrough()).default([]),
|
|
67
67
|
views: zod_1.z.number().default(0),
|
|
68
68
|
commentCount: zod_1.z.number().default(0),
|
|
69
|
-
parent:
|
|
69
|
+
parent: common_1.ConnectionSchema.optional().nullable(),
|
|
70
70
|
pinned: zod_1.z.boolean().default(false),
|
|
71
71
|
});
|
|
72
72
|
exports.ReadPostSchema = ReadPostSchema;
|
|
@@ -77,8 +77,8 @@ exports.ListPostsSchema = ListPostsSchema;
|
|
|
77
77
|
const updatePostSchema = zod_1.z.object({
|
|
78
78
|
name: zod_1.z.string().nullable().optional(),
|
|
79
79
|
description: zod_1.z.string().nullable().optional(),
|
|
80
|
-
visibility:
|
|
81
|
-
monetization:
|
|
80
|
+
visibility: common_1.VisibilitySchema.nullable().optional(),
|
|
81
|
+
monetization: common_1.MonetizationSchema.nullable().optional(),
|
|
82
82
|
price: zod_1.z.number().nullable().optional(),
|
|
83
83
|
metadata: zod_1.z
|
|
84
84
|
.object({
|
|
@@ -91,3 +91,4 @@ const updatePostSchema = zod_1.z.object({
|
|
|
91
91
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
92
92
|
});
|
|
93
93
|
exports.updatePostSchema = updatePostSchema;
|
|
94
|
+
//# sourceMappingURL=posts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/schema/posts.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAKkB;AAElB,MAAM,UAAU,GAAG,oBAAW,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1E,OAAO,EAAE,OAAC;SACP,MAAM,CAAC;QACN,IAAI,EAAE,OAAC,CAAC,MAA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EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AAmBD,4CAAgB"}
|
|
@@ -128,10 +128,42 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
128
128
|
last_updated: z.ZodString;
|
|
129
129
|
}, {
|
|
130
130
|
asset_type: z.ZodEffects<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>, "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication", "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication">;
|
|
131
|
+
metadata: z.ZodObject<{
|
|
132
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
cron: z.ZodString;
|
|
134
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
135
|
+
cron: z.ZodString;
|
|
136
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
137
|
+
cron: z.ZodString;
|
|
138
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
139
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
140
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
cron: z.ZodString;
|
|
142
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
143
|
+
cron: z.ZodString;
|
|
144
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
145
|
+
cron: z.ZodString;
|
|
146
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
147
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
148
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
cron: z.ZodString;
|
|
150
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
151
|
+
cron: z.ZodString;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
153
|
+
cron: z.ZodString;
|
|
154
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
155
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
131
156
|
}>, "strip", z.ZodTypeAny, {
|
|
132
157
|
id: string;
|
|
133
158
|
name: string;
|
|
134
159
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
160
|
+
metadata: {
|
|
161
|
+
schedule?: z.objectOutputType<{
|
|
162
|
+
cron: z.ZodString;
|
|
163
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
164
|
+
} & {
|
|
165
|
+
[k: string]: unknown;
|
|
166
|
+
};
|
|
135
167
|
user_id: string;
|
|
136
168
|
org_id: string;
|
|
137
169
|
asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
@@ -139,7 +171,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
139
171
|
last_updated: string;
|
|
140
172
|
team_id: string;
|
|
141
173
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
142
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
143
174
|
description?: string | null | undefined;
|
|
144
175
|
user?: {
|
|
145
176
|
id?: string | undefined;
|
|
@@ -189,6 +220,13 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
189
220
|
id: string;
|
|
190
221
|
name: string;
|
|
191
222
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
223
|
+
metadata: {
|
|
224
|
+
schedule?: z.objectInputType<{
|
|
225
|
+
cron: z.ZodString;
|
|
226
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
227
|
+
} & {
|
|
228
|
+
[k: string]: unknown;
|
|
229
|
+
};
|
|
192
230
|
user_id: string;
|
|
193
231
|
org_id: string;
|
|
194
232
|
asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
@@ -196,7 +234,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
196
234
|
last_updated: string;
|
|
197
235
|
team_id: string;
|
|
198
236
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
199
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
200
237
|
description?: string | null | undefined;
|
|
201
238
|
user?: {
|
|
202
239
|
id?: string | undefined;
|
|
@@ -365,39 +402,56 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
365
402
|
cost_unit: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
366
403
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
367
404
|
price_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
368
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
369
405
|
preview: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>>;
|
|
370
406
|
created_at: z.ZodOptional<z.ZodString>;
|
|
371
407
|
last_updated: z.ZodOptional<z.ZodString>;
|
|
372
408
|
asset_type: z.ZodOptional<z.ZodEffects<z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>, "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication", "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication">>;
|
|
409
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
cron: z.ZodString;
|
|
412
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
413
|
+
cron: z.ZodString;
|
|
414
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
415
|
+
cron: z.ZodString;
|
|
416
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
417
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
418
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
419
|
+
cron: z.ZodString;
|
|
420
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
421
|
+
cron: z.ZodString;
|
|
422
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
423
|
+
cron: z.ZodString;
|
|
424
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
425
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
426
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
427
|
+
cron: z.ZodString;
|
|
428
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
429
|
+
cron: z.ZodString;
|
|
430
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
431
|
+
cron: z.ZodString;
|
|
432
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
433
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
373
434
|
}, {
|
|
374
435
|
id: z.ZodDefault<z.ZodString>;
|
|
375
436
|
team_id: z.ZodDefault<z.ZodString>;
|
|
376
437
|
org_id: z.ZodDefault<z.ZodString>;
|
|
377
438
|
name_url_slug: z.ZodString;
|
|
378
|
-
metadata: z.ZodObject<{
|
|
379
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
380
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
381
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
382
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
383
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
384
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
385
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
386
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
387
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
388
439
|
}>, "strip", z.ZodTypeAny, {
|
|
389
440
|
id: string;
|
|
390
|
-
metadata: {
|
|
391
|
-
edges: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
392
|
-
nodes: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
393
|
-
} & {
|
|
394
|
-
[k: string]: unknown;
|
|
395
|
-
};
|
|
396
441
|
org_id: string;
|
|
397
442
|
team_id: string;
|
|
398
443
|
name_url_slug: string;
|
|
399
444
|
name?: string | undefined;
|
|
400
445
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
446
|
+
metadata?: z.objectOutputType<{
|
|
447
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
448
|
+
cron: z.ZodString;
|
|
449
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
450
|
+
cron: z.ZodString;
|
|
451
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
452
|
+
cron: z.ZodString;
|
|
453
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
454
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
401
455
|
description?: string | null | undefined;
|
|
402
456
|
user?: {
|
|
403
457
|
id?: string | undefined;
|
|
@@ -448,16 +502,19 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
448
502
|
price_id?: string | null | undefined;
|
|
449
503
|
preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
|
|
450
504
|
}, {
|
|
451
|
-
metadata: {
|
|
452
|
-
edges: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
453
|
-
nodes: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
454
|
-
} & {
|
|
455
|
-
[k: string]: unknown;
|
|
456
|
-
};
|
|
457
505
|
name_url_slug: string;
|
|
458
506
|
id?: string | undefined;
|
|
459
507
|
name?: string | undefined;
|
|
460
508
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
509
|
+
metadata?: z.objectInputType<{
|
|
510
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
cron: z.ZodString;
|
|
512
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
513
|
+
cron: z.ZodString;
|
|
514
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
515
|
+
cron: z.ZodString;
|
|
516
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
517
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
461
518
|
description?: string | null | undefined;
|
|
462
519
|
user?: {
|
|
463
520
|
id?: string | undefined;
|
|
@@ -3,10 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateReplicationSchema = exports.CreateReplicationSchema = exports.ReplicationSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("
|
|
7
|
-
const
|
|
6
|
+
const assets_1 = require("./assets");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
8
|
const ReplicationSchema = assets_1.AssetSchema.extend({
|
|
9
|
-
asset_type:
|
|
9
|
+
asset_type: common_1.AssetTypeSchema.refine((val) => val === "replication"),
|
|
10
|
+
metadata: zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
schedule: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
cron: zod_1.z.string(),
|
|
15
|
+
})
|
|
16
|
+
.passthrough()
|
|
17
|
+
.optional(),
|
|
18
|
+
})
|
|
19
|
+
.passthrough(),
|
|
10
20
|
});
|
|
11
21
|
exports.ReplicationSchema = ReplicationSchema;
|
|
12
22
|
const CreateReplicationSchema = ReplicationSchema.partial().extend({
|
|
@@ -17,12 +27,6 @@ const CreateReplicationSchema = ReplicationSchema.partial().extend({
|
|
|
17
27
|
team_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
18
28
|
org_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
19
29
|
name_url_slug: zod_1.z.string(),
|
|
20
|
-
metadata: zod_1.z
|
|
21
|
-
.object({
|
|
22
|
-
edges: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
23
|
-
nodes: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
24
|
-
})
|
|
25
|
-
.passthrough(),
|
|
26
30
|
});
|
|
27
31
|
exports.CreateReplicationSchema = CreateReplicationSchema;
|
|
28
32
|
const UpdateReplicationSchema = zod_1.z.object({
|
|
@@ -30,8 +34,9 @@ const UpdateReplicationSchema = zod_1.z.object({
|
|
|
30
34
|
name_url_slug: zod_1.z.string().nullable().optional(),
|
|
31
35
|
name: zod_1.z.string().nullable().optional(),
|
|
32
36
|
description: zod_1.z.string().nullable().optional(),
|
|
33
|
-
visibility:
|
|
37
|
+
visibility: common_1.VisibilitySchema.nullable().optional(),
|
|
34
38
|
metadata: zod_1.z.object({}).passthrough().optional().nullable(),
|
|
35
39
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
36
40
|
});
|
|
37
41
|
exports.UpdateReplicationSchema = UpdateReplicationSchema;
|
|
42
|
+
//# sourceMappingURL=replications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replications.js","sourceRoot":"","sources":["../../src/schema/replications.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAA6D;AAE7D,MAAM,iBAAiB,GAAG,oBAAW,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,aAAa,CAAC;IAClE,QAAQ,EAAE,OAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,OAAC;aACR,MAAM,CAAC;YACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;SACjB,CAAC;aACD,WAAW,EAAE;aACb,QAAQ,EAAE;KACd,CAAC;SACD,WAAW,EAAE;CACjB,CAAC,CAAC;AA2BD,8CAAiB;AAzBnB,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;IACjE,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,IAAI,EAAE;SACN,OAAO,CAAC,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC;IAC1E,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,sCAAsC,CAAC;IACzE,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAkBD,0DAAuB;AAhBzB,MAAM,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,yBAAgB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1D,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AASD,0DAAuB"}
|
package/dist/schema/services.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.authType = exports.serviceSchema = exports.routeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("./common");
|
|
6
6
|
const authType = zod_1.z.enum(["Personal Access Token", "None", "OAuth 2.0"]);
|
|
7
7
|
exports.authType = authType;
|
|
8
8
|
const serviceSchema = zod_1.z.object({
|
|
@@ -11,7 +11,7 @@ const serviceSchema = zod_1.z.object({
|
|
|
11
11
|
org_id: zod_1.z.string().nullable().optional(),
|
|
12
12
|
name: zod_1.z.string(),
|
|
13
13
|
description: zod_1.z.string().nullable().optional(),
|
|
14
|
-
visibility:
|
|
14
|
+
visibility: common_1.VisibilitySchema,
|
|
15
15
|
version: zod_1.z.string().nullable().optional(),
|
|
16
16
|
authentication: authType,
|
|
17
17
|
base_url: zod_1.z.string(),
|
|
@@ -36,3 +36,4 @@ const routeSchema = zod_1.z.object({
|
|
|
36
36
|
last_updated: zod_1.z.string(),
|
|
37
37
|
});
|
|
38
38
|
exports.routeSchema = routeSchema;
|
|
39
|
+
//# sourceMappingURL=services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/schema/services.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAA4C;AAE5C,MAAM,QAAQ,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,uBAAuB,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAwCtE,4BAAQ;AAtCV,MAAM,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACxC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,yBAAgB;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzC,cAAc,EAAE,QAAQ;IACxB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,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AOD,kCAAW"}
|
package/dist/schema/teams.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateTeamSchema = exports.ReadTeamsSchema = exports.ReadTeamSchema = exports.CreateTeamSchema = exports.TeamSchema = void 0;
|
|
4
4
|
const uuidv7_1 = require("uuidv7");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const
|
|
6
|
+
const common_1 = require("./common");
|
|
7
7
|
const organizations_1 = require("./organizations");
|
|
8
8
|
const users_1 = require("./users");
|
|
9
9
|
const TeamSchema = zod_1.z.object({
|
|
@@ -11,15 +11,15 @@ const TeamSchema = zod_1.z.object({
|
|
|
11
11
|
org_id: zod_1.z.string().uuid(),
|
|
12
12
|
name: zod_1.z.string(),
|
|
13
13
|
description: zod_1.z.string().nullable().optional(),
|
|
14
|
-
default_role:
|
|
15
|
-
visibility:
|
|
14
|
+
default_role: common_1.RoleSchema,
|
|
15
|
+
visibility: common_1.VisibilitySchema,
|
|
16
16
|
created_at: zod_1.z.string(),
|
|
17
17
|
});
|
|
18
18
|
exports.TeamSchema = TeamSchema;
|
|
19
19
|
const CreateTeamSchema = TeamSchema.extend({
|
|
20
20
|
id: zod_1.z.string().default(() => (0, uuidv7_1.uuidv7)()),
|
|
21
|
-
default_role:
|
|
22
|
-
visibility:
|
|
21
|
+
default_role: common_1.RoleSchema.default("write").refine((v) => v === "read" || v === "write"),
|
|
22
|
+
visibility: common_1.VisibilitySchema.default("public").refine((v) => v === "public" || v === "organization"),
|
|
23
23
|
created_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
24
24
|
});
|
|
25
25
|
exports.CreateTeamSchema = CreateTeamSchema;
|
|
@@ -27,14 +27,14 @@ const ReadTeamSchema = TeamSchema.extend({
|
|
|
27
27
|
userMembership: zod_1.z
|
|
28
28
|
.object({
|
|
29
29
|
user_id: zod_1.z.string().uuid(),
|
|
30
|
-
role:
|
|
30
|
+
role: common_1.RoleSchema,
|
|
31
31
|
})
|
|
32
32
|
.optional()
|
|
33
33
|
.nullable(),
|
|
34
34
|
memberCount: zod_1.z.number(),
|
|
35
35
|
members: zod_1.z.array(zod_1.z.object({
|
|
36
36
|
user_id: zod_1.z.string().uuid(),
|
|
37
|
-
role:
|
|
37
|
+
role: common_1.RoleSchema,
|
|
38
38
|
user: users_1.ProfileSchema.partial().optional().nullable(),
|
|
39
39
|
})),
|
|
40
40
|
organization: organizations_1.OrganizationsSchema.partial().optional().nullable(),
|
|
@@ -54,3 +54,4 @@ const UpdateTeamSchema = TeamSchema.partial()
|
|
|
54
54
|
id: zod_1.z.string().uuid(),
|
|
55
55
|
});
|
|
56
56
|
exports.UpdateTeamSchema = UpdateTeamSchema;
|
|
57
|
+
//# sourceMappingURL=teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams.js","sourceRoot":"","sources":["../../src/schema/teams.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAwD;AAExD,mDAAsD;AACtD,mCAAwC;AAExC,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,YAAY,EAAE,mBAAU;IACxB,UAAU,EAAE,yBAAgB;IAC5B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAuDD,gCAAU;AArDZ,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,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xB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IACvB,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CACjC,CAAC,CAAC;AAkBD,8CAAiB;AAhBnB,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;IACvD,EAAE,EAAE,IAAI;IACR,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,IAAI;IACjB,kEAAkE;CACnE,CAAC,CAAC;AAYD,kDAAmB"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ourofoundation/ouro-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Interact with the Ouro platform in browser and node.js environments",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "tsc",
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|