@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
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.UpdateBlueprintSchema = exports.CreateBlueprintSchema = exports.BlueprintSchema = void 0;
|
|
4
|
-
const uuidv7_1 = require("uuidv7");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("./assets");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
const BlueprintSchema = assets_1.AssetSchema.extend({
|
|
9
|
-
asset_type: common_1.AssetTypeSchema.refine((val) => val === "blueprint"),
|
|
10
|
-
});
|
|
11
|
-
exports.BlueprintSchema = BlueprintSchema;
|
|
12
|
-
const CreateBlueprintSchema = assets_1.AssetSchema.partial().extend({
|
|
13
|
-
id: zod_1.z
|
|
14
|
-
.string()
|
|
15
|
-
.uuid()
|
|
16
|
-
.default(() => (0, uuidv7_1.uuidv7)()),
|
|
17
|
-
team_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
18
|
-
org_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
19
|
-
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
|
-
});
|
|
27
|
-
exports.CreateBlueprintSchema = CreateBlueprintSchema;
|
|
28
|
-
const UpdateBlueprintSchema = zod_1.z.object({
|
|
29
|
-
team_id: zod_1.z.string().uuid().nullable().optional(),
|
|
30
|
-
name_url_slug: zod_1.z.string().nullable().optional(),
|
|
31
|
-
name: zod_1.z.string().nullable().optional(),
|
|
32
|
-
description: zod_1.z.string().nullable().optional(),
|
|
33
|
-
visibility: common_1.VisibilitySchema.nullable().optional(),
|
|
34
|
-
metadata: zod_1.z.object({}).passthrough().optional().nullable(),
|
|
35
|
-
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
36
|
-
});
|
|
37
|
-
exports.UpdateBlueprintSchema = UpdateBlueprintSchema;
|
|
38
|
-
//# sourceMappingURL=blueprints.js.map
|
|
1
|
+
"use strict";var e=require("uuidv7"),t=require("zod"),a=require("./assets.js"),i=require("./common.js");const s=a.AssetSchema.extend({asset_type:i.AssetTypeSchema.refine((e=>"blueprint"===e))}),r=a.AssetSchema.partial().extend({id:t.z.string().uuid().default((()=>e.uuidv7())),team_id:t.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),org_id:t.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),name_url_slug:t.z.string(),metadata:t.z.object({edges:t.z.array(t.z.object({}).passthrough()),nodes:t.z.array(t.z.object({}).passthrough())}).passthrough()}),l=t.z.object({team_id:t.z.string().uuid().nullable().optional(),name_url_slug:t.z.string().nullable().optional(),name:t.z.string().nullable().optional(),description:t.z.string().nullable().optional(),visibility:i.VisibilitySchema.nullable().optional(),metadata:t.z.object({}).passthrough().optional().nullable(),last_updated:t.z.string().default((()=>(new Date).toISOString()))});exports.BlueprintSchema=s,exports.CreateBlueprintSchema=r,exports.UpdateBlueprintSchema=l;
|
|
2
|
+
//# sourceMappingURL=blueprints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprints.js","
|
|
1
|
+
{"version":3,"file":"blueprints.js","sources":["../../src/schema/blueprints.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport { AssetSchema } from \"./assets\";\nimport {\n AssetTypeSchema,\n MonetizationSchema,\n VisibilitySchema,\n} from \"./common\";\n\nconst BlueprintSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((val) => val === \"blueprint\"),\n});\n\nconst CreateBlueprintSchema = AssetSchema.partial().extend({\n id: z\n .string()\n .uuid()\n .default(() => uuidv7()),\n team_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n org_id: z.string().uuid().default(\"00000000-0000-0000-0000-000000000000\"),\n name_url_slug: z.string(),\n metadata: z\n .object({\n edges: z.array(z.object({}).passthrough()),\n nodes: z.array(z.object({}).passthrough()),\n })\n .passthrough(),\n});\n\nconst UpdateBlueprintSchema = z.object({\n team_id: z.string().uuid().nullable().optional(),\n name_url_slug: z.string().nullable().optional(),\n name: z.string().nullable().optional(),\n description: z.string().nullable().optional(),\n visibility: VisibilitySchema.nullable().optional(),\n metadata: z.object({}).passthrough().optional().nullable(),\n last_updated: z.string().default(() => new Date().toISOString()),\n});\n\nexport { BlueprintSchema, CreateBlueprintSchema, UpdateBlueprintSchema };\nexport type Blueprint = z.infer<typeof BlueprintSchema>;\nexport type CreateBlueprint = z.infer<typeof CreateBlueprintSchema>;\nexport type UpdateBlueprint = z.infer<typeof UpdateBlueprintSchema>;\n"],"names":["BlueprintSchema","AssetSchema","extend","asset_type","AssetTypeSchema","refine","val","CreateBlueprintSchema","partial","id","z","string","uuid","default","uuidv7","team_id","org_id","name_url_slug","metadata","object","edges","array","passthrough","nodes","UpdateBlueprintSchema","nullable","optional","name","description","visibility","VisibilitySchema","last_updated","Date","toISOString"],"mappings":"wGAUA,MAAMA,EAAkBC,EAAWA,YAACC,OAAO,CACzCC,WAAYC,EAAeA,gBAACC,QAAQC,GAAgB,cAARA,MAGxCC,EAAwBN,EAAWA,YAACO,UAAUN,OAAO,CACzDO,GAAIC,EAAAA,EACDC,SACAC,OACAC,SAAQ,IAAMC,EAAAA,WACjBC,QAASL,EAACA,EAACC,SAASC,OAAOC,QAAQ,wCACnCG,OAAQN,EAACA,EAACC,SAASC,OAAOC,QAAQ,wCAClCI,cAAeP,EAACA,EAACC,SACjBO,SAAUR,EAAAA,EACPS,OAAO,CACNC,MAAOV,EAACA,EAACW,MAAMX,EAAAA,EAAES,OAAO,CAAE,GAAEG,eAC5BC,MAAOb,EAACA,EAACW,MAAMX,EAAAA,EAAES,OAAO,CAAE,GAAEG,iBAE7BA,gBAGCE,EAAwBd,EAACA,EAACS,OAAO,CACrCJ,QAASL,EAACA,EAACC,SAASC,OAAOa,WAAWC,WACtCT,cAAeP,EAAAA,EAAEC,SAASc,WAAWC,WACrCC,KAAMjB,EAAAA,EAAEC,SAASc,WAAWC,WAC5BE,YAAalB,EAAAA,EAAEC,SAASc,WAAWC,WACnCG,WAAYC,EAAgBA,iBAACL,WAAWC,WACxCR,SAAUR,EAAAA,EAAES,OAAO,CAAE,GAAEG,cAAcI,WAAWD,WAChDM,aAAcrB,EAAAA,EAAEC,SAASE,SAAQ,KAAM,IAAImB,MAAOC"}
|
|
@@ -57,27 +57,27 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
id?: string | undefined;
|
|
59
59
|
name?: string | undefined;
|
|
60
|
-
size?: string | undefined;
|
|
61
|
-
email?: string | null | undefined;
|
|
62
60
|
avatar_path?: string | null | undefined;
|
|
63
61
|
mission?: string | null | undefined;
|
|
62
|
+
size?: string | undefined;
|
|
63
|
+
email?: string | null | undefined;
|
|
64
64
|
domain?: string | null | undefined;
|
|
65
65
|
urls?: {
|
|
66
66
|
value: string;
|
|
67
67
|
}[] | null | undefined;
|
|
68
|
-
base_role?: "
|
|
68
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
id?: string | undefined;
|
|
71
71
|
name?: string | undefined;
|
|
72
|
-
size?: string | undefined;
|
|
73
|
-
email?: string | null | undefined;
|
|
74
72
|
avatar_path?: string | null | undefined;
|
|
75
73
|
mission?: string | null | undefined;
|
|
74
|
+
size?: string | undefined;
|
|
75
|
+
email?: string | null | undefined;
|
|
76
76
|
domain?: string | null | undefined;
|
|
77
77
|
urls?: {
|
|
78
78
|
value: string;
|
|
79
79
|
}[] | null | undefined;
|
|
80
|
-
base_role?: "
|
|
80
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
81
81
|
}>>;
|
|
82
82
|
team_id: z.ZodString;
|
|
83
83
|
team: z.ZodOptional<z.ZodObject<{
|
|
@@ -90,20 +90,20 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
90
90
|
created_at: z.ZodOptional<z.ZodString>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
id?: string | undefined;
|
|
93
|
-
name?: string | undefined;
|
|
94
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
95
|
-
description?: string | null | undefined;
|
|
96
93
|
org_id?: string | undefined;
|
|
97
94
|
created_at?: string | undefined;
|
|
98
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
99
|
-
}, {
|
|
100
|
-
id?: string | undefined;
|
|
101
95
|
name?: string | undefined;
|
|
102
|
-
visibility?: "
|
|
96
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
103
97
|
description?: string | null | undefined;
|
|
98
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
id?: string | undefined;
|
|
104
101
|
org_id?: string | undefined;
|
|
105
102
|
created_at?: string | undefined;
|
|
106
|
-
|
|
103
|
+
name?: string | undefined;
|
|
104
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
105
|
+
description?: string | null | undefined;
|
|
106
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
107
107
|
}>>;
|
|
108
108
|
parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
109
109
|
parent: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
|
@@ -139,23 +139,19 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
139
139
|
}>>>>;
|
|
140
140
|
}>, "strip", z.ZodTypeAny, {
|
|
141
141
|
id: string;
|
|
142
|
-
name: string;
|
|
143
|
-
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
144
142
|
user_id: string;
|
|
145
143
|
org_id: string;
|
|
146
144
|
asset_type: "comment";
|
|
147
145
|
created_at: string;
|
|
148
146
|
last_updated: string;
|
|
147
|
+
name: string;
|
|
149
148
|
team_id: string;
|
|
149
|
+
visibility: "organization" | "public" | "private" | "monetized" | "inherit";
|
|
150
150
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
151
151
|
preview: {
|
|
152
152
|
type: string;
|
|
153
153
|
content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
154
154
|
} | null;
|
|
155
|
-
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
156
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
157
|
-
description?: string | null | undefined;
|
|
158
|
-
parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
159
155
|
user?: {
|
|
160
156
|
id?: string | undefined;
|
|
161
157
|
user_id?: string | undefined;
|
|
@@ -170,26 +166,29 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
170
166
|
organization?: {
|
|
171
167
|
id?: string | undefined;
|
|
172
168
|
name?: string | undefined;
|
|
173
|
-
size?: string | undefined;
|
|
174
|
-
email?: string | null | undefined;
|
|
175
169
|
avatar_path?: string | null | undefined;
|
|
176
170
|
mission?: string | null | undefined;
|
|
171
|
+
size?: string | undefined;
|
|
172
|
+
email?: string | null | undefined;
|
|
177
173
|
domain?: string | null | undefined;
|
|
178
174
|
urls?: {
|
|
179
175
|
value: string;
|
|
180
176
|
}[] | null | undefined;
|
|
181
|
-
base_role?: "
|
|
177
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
182
178
|
} | undefined;
|
|
183
179
|
team?: {
|
|
184
180
|
id?: string | undefined;
|
|
185
|
-
name?: string | undefined;
|
|
186
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
187
|
-
description?: string | null | undefined;
|
|
188
181
|
org_id?: string | undefined;
|
|
189
182
|
created_at?: string | undefined;
|
|
190
|
-
|
|
183
|
+
name?: string | undefined;
|
|
184
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
185
|
+
description?: string | null | undefined;
|
|
186
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
191
187
|
} | undefined;
|
|
188
|
+
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
189
|
+
description?: string | null | undefined;
|
|
192
190
|
parent_id?: string | null | undefined;
|
|
191
|
+
parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
193
192
|
name_url_slug?: string | null | undefined;
|
|
194
193
|
slug?: string | null | undefined;
|
|
195
194
|
price?: number | null | undefined;
|
|
@@ -198,20 +197,17 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
198
197
|
cost_unit?: string | null | undefined;
|
|
199
198
|
product_id?: string | null | undefined;
|
|
200
199
|
price_id?: string | null | undefined;
|
|
200
|
+
state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
|
|
201
201
|
}, {
|
|
202
202
|
id: string;
|
|
203
|
-
name: string;
|
|
204
|
-
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
205
203
|
user_id: string;
|
|
206
204
|
org_id: string;
|
|
207
205
|
created_at: string;
|
|
208
206
|
last_updated: string;
|
|
207
|
+
name: string;
|
|
209
208
|
team_id: string;
|
|
209
|
+
visibility: "organization" | "public" | "private" | "monetized" | "inherit";
|
|
210
210
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
211
|
-
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
212
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
213
|
-
description?: string | null | undefined;
|
|
214
|
-
parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
215
211
|
user?: {
|
|
216
212
|
id?: string | undefined;
|
|
217
213
|
user_id?: string | undefined;
|
|
@@ -226,27 +222,30 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
226
222
|
organization?: {
|
|
227
223
|
id?: string | undefined;
|
|
228
224
|
name?: string | undefined;
|
|
229
|
-
size?: string | undefined;
|
|
230
|
-
email?: string | null | undefined;
|
|
231
225
|
avatar_path?: string | null | undefined;
|
|
232
226
|
mission?: string | null | undefined;
|
|
227
|
+
size?: string | undefined;
|
|
228
|
+
email?: string | null | undefined;
|
|
233
229
|
domain?: string | null | undefined;
|
|
234
230
|
urls?: {
|
|
235
231
|
value: string;
|
|
236
232
|
}[] | null | undefined;
|
|
237
|
-
base_role?: "
|
|
233
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
238
234
|
} | undefined;
|
|
239
235
|
team?: {
|
|
240
236
|
id?: string | undefined;
|
|
241
|
-
name?: string | undefined;
|
|
242
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
243
|
-
description?: string | null | undefined;
|
|
244
237
|
org_id?: string | undefined;
|
|
245
238
|
created_at?: string | undefined;
|
|
246
|
-
|
|
239
|
+
name?: string | undefined;
|
|
240
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
241
|
+
description?: string | null | undefined;
|
|
242
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
247
243
|
} | undefined;
|
|
248
244
|
asset_type?: "comment" | undefined;
|
|
245
|
+
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
246
|
+
description?: string | null | undefined;
|
|
249
247
|
parent_id?: string | null | undefined;
|
|
248
|
+
parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
250
249
|
name_url_slug?: string | null | undefined;
|
|
251
250
|
slug?: string | null | undefined;
|
|
252
251
|
price?: number | null | undefined;
|
|
@@ -259,6 +258,7 @@ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
259
258
|
type: string;
|
|
260
259
|
content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
261
260
|
} | null | undefined;
|
|
261
|
+
state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
|
|
262
262
|
}>;
|
|
263
263
|
declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
264
264
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -318,27 +318,27 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
318
318
|
}, "strip", z.ZodTypeAny, {
|
|
319
319
|
id?: string | undefined;
|
|
320
320
|
name?: string | undefined;
|
|
321
|
-
size?: string | undefined;
|
|
322
|
-
email?: string | null | undefined;
|
|
323
321
|
avatar_path?: string | null | undefined;
|
|
324
322
|
mission?: string | null | undefined;
|
|
323
|
+
size?: string | undefined;
|
|
324
|
+
email?: string | null | undefined;
|
|
325
325
|
domain?: string | null | undefined;
|
|
326
326
|
urls?: {
|
|
327
327
|
value: string;
|
|
328
328
|
}[] | null | undefined;
|
|
329
|
-
base_role?: "
|
|
329
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
330
330
|
}, {
|
|
331
331
|
id?: string | undefined;
|
|
332
332
|
name?: string | undefined;
|
|
333
|
-
size?: string | undefined;
|
|
334
|
-
email?: string | null | undefined;
|
|
335
333
|
avatar_path?: string | null | undefined;
|
|
336
334
|
mission?: string | null | undefined;
|
|
335
|
+
size?: string | undefined;
|
|
336
|
+
email?: string | null | undefined;
|
|
337
337
|
domain?: string | null | undefined;
|
|
338
338
|
urls?: {
|
|
339
339
|
value: string;
|
|
340
340
|
}[] | null | undefined;
|
|
341
|
-
base_role?: "
|
|
341
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
342
342
|
}>>>;
|
|
343
343
|
team_id: z.ZodOptional<z.ZodString>;
|
|
344
344
|
team: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -351,20 +351,20 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
351
351
|
created_at: z.ZodOptional<z.ZodString>;
|
|
352
352
|
}, "strip", z.ZodTypeAny, {
|
|
353
353
|
id?: string | undefined;
|
|
354
|
-
name?: string | undefined;
|
|
355
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
356
|
-
description?: string | null | undefined;
|
|
357
354
|
org_id?: string | undefined;
|
|
358
355
|
created_at?: string | undefined;
|
|
359
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
360
|
-
}, {
|
|
361
|
-
id?: string | undefined;
|
|
362
356
|
name?: string | undefined;
|
|
363
|
-
visibility?: "
|
|
357
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
364
358
|
description?: string | null | undefined;
|
|
359
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
id?: string | undefined;
|
|
365
362
|
org_id?: string | undefined;
|
|
366
363
|
created_at?: string | undefined;
|
|
367
|
-
|
|
364
|
+
name?: string | undefined;
|
|
365
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
366
|
+
description?: string | null | undefined;
|
|
367
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
368
368
|
}>>>;
|
|
369
369
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
370
370
|
parent: z.ZodOptional<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
@@ -403,15 +403,10 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
403
403
|
last_updated: z.ZodDefault<z.ZodString>;
|
|
404
404
|
}>, "strip", z.ZodTypeAny, {
|
|
405
405
|
id: string;
|
|
406
|
-
name: string;
|
|
407
406
|
asset_type: "comment";
|
|
408
407
|
created_at: string;
|
|
409
408
|
last_updated: string;
|
|
410
|
-
|
|
411
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
412
|
-
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
413
|
-
description?: string | null | undefined;
|
|
414
|
-
parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
409
|
+
name: string;
|
|
415
410
|
user?: {
|
|
416
411
|
id?: string | undefined;
|
|
417
412
|
user_id?: string | undefined;
|
|
@@ -426,28 +421,32 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
426
421
|
organization?: {
|
|
427
422
|
id?: string | undefined;
|
|
428
423
|
name?: string | undefined;
|
|
429
|
-
size?: string | undefined;
|
|
430
|
-
email?: string | null | undefined;
|
|
431
424
|
avatar_path?: string | null | undefined;
|
|
432
425
|
mission?: string | null | undefined;
|
|
426
|
+
size?: string | undefined;
|
|
427
|
+
email?: string | null | undefined;
|
|
433
428
|
domain?: string | null | undefined;
|
|
434
429
|
urls?: {
|
|
435
430
|
value: string;
|
|
436
431
|
}[] | null | undefined;
|
|
437
|
-
base_role?: "
|
|
432
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
438
433
|
} | undefined;
|
|
439
434
|
team?: {
|
|
440
435
|
id?: string | undefined;
|
|
441
|
-
name?: string | undefined;
|
|
442
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
443
|
-
description?: string | null | undefined;
|
|
444
436
|
org_id?: string | undefined;
|
|
445
437
|
created_at?: string | undefined;
|
|
446
|
-
|
|
438
|
+
name?: string | undefined;
|
|
439
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
440
|
+
description?: string | null | undefined;
|
|
441
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
447
442
|
} | undefined;
|
|
448
443
|
org_id?: string | undefined;
|
|
444
|
+
metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
449
445
|
team_id?: string | undefined;
|
|
446
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
447
|
+
description?: string | null | undefined;
|
|
450
448
|
parent_id?: string | null | undefined;
|
|
449
|
+
parent?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
451
450
|
name_url_slug?: string | null | undefined;
|
|
452
451
|
slug?: string | null | undefined;
|
|
453
452
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
@@ -461,14 +460,8 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
461
460
|
type: string;
|
|
462
461
|
content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
463
462
|
} | null | undefined;
|
|
463
|
+
state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
|
|
464
464
|
}, {
|
|
465
|
-
id?: string | undefined;
|
|
466
|
-
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
467
|
-
name?: string | undefined;
|
|
468
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
469
|
-
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
470
|
-
description?: string | null | undefined;
|
|
471
|
-
parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
472
465
|
user?: {
|
|
473
466
|
id?: string | undefined;
|
|
474
467
|
user_id?: string | undefined;
|
|
@@ -483,31 +476,37 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
483
476
|
organization?: {
|
|
484
477
|
id?: string | undefined;
|
|
485
478
|
name?: string | undefined;
|
|
486
|
-
size?: string | undefined;
|
|
487
|
-
email?: string | null | undefined;
|
|
488
479
|
avatar_path?: string | null | undefined;
|
|
489
480
|
mission?: string | null | undefined;
|
|
481
|
+
size?: string | undefined;
|
|
482
|
+
email?: string | null | undefined;
|
|
490
483
|
domain?: string | null | undefined;
|
|
491
484
|
urls?: {
|
|
492
485
|
value: string;
|
|
493
486
|
}[] | null | undefined;
|
|
494
|
-
base_role?: "
|
|
487
|
+
base_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
495
488
|
} | undefined;
|
|
496
489
|
team?: {
|
|
497
490
|
id?: string | undefined;
|
|
498
|
-
name?: string | undefined;
|
|
499
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
500
|
-
description?: string | null | undefined;
|
|
501
491
|
org_id?: string | undefined;
|
|
502
492
|
created_at?: string | undefined;
|
|
503
|
-
|
|
493
|
+
name?: string | undefined;
|
|
494
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
495
|
+
description?: string | null | undefined;
|
|
496
|
+
default_role?: "admin" | "read" | "write" | "none" | undefined;
|
|
504
497
|
} | undefined;
|
|
498
|
+
id?: string | undefined;
|
|
505
499
|
org_id?: string | undefined;
|
|
506
500
|
asset_type?: "comment" | undefined;
|
|
501
|
+
metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
507
502
|
created_at?: string | undefined;
|
|
508
503
|
last_updated?: string | undefined;
|
|
504
|
+
name?: string | undefined;
|
|
509
505
|
team_id?: string | undefined;
|
|
506
|
+
visibility?: "organization" | "public" | "private" | "monetized" | "inherit" | undefined;
|
|
507
|
+
description?: string | null | undefined;
|
|
510
508
|
parent_id?: string | null | undefined;
|
|
509
|
+
parent?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
511
510
|
name_url_slug?: string | null | undefined;
|
|
512
511
|
slug?: string | null | undefined;
|
|
513
512
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
@@ -521,6 +520,7 @@ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
521
520
|
type: string;
|
|
522
521
|
content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
523
522
|
} | null | undefined;
|
|
523
|
+
state?: "queued" | "in-progress" | "success" | "error" | null | undefined;
|
|
524
524
|
}>;
|
|
525
525
|
export { CommentSchema, CreateCommentSchema };
|
|
526
526
|
export type Comment = z.infer<typeof CommentSchema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{uuidv7 as t}from"uuidv7";import{z as e}from"zod";import{AssetSchema as a}from"./assets.esm.js";const o=a.extend({asset_type:e.literal("comment").default("comment"),preview:e.object({type:e.string().refine((t=>"doc"===t)),content:e.array(e.object({}).passthrough())}).optional().nullable().default({type:"doc",content:[]})}),n=o.partial().omit({id:!0,user_id:!0}).extend({asset_type:e.literal("comment").default("comment"),id:e.string().default((()=>t())),name:e.string().default(""),created_at:e.string().default((()=>(new Date).toISOString())),last_updated:e.string().default((()=>(new Date).toISOString()))});export{o as CommentSchema,n as CreateCommentSchema};
|
|
2
|
+
//# sourceMappingURL=comments.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.esm.js","sources":["../../src/schema/comments.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport { AssetSchema } from \"./assets\";\n\nconst CommentSchema = AssetSchema.extend({\n asset_type: z.literal(\"comment\").default(\"comment\"),\n preview: z\n .object({\n type: z.string().refine((x) => x === \"doc\"),\n content: z.array(z.object({}).passthrough()),\n })\n .optional()\n .nullable()\n .default({ type: \"doc\", content: [] }),\n});\n\nconst CreateCommentSchema = CommentSchema.partial()\n .omit({\n id: true,\n user_id: true,\n })\n .extend({\n asset_type: z.literal(\"comment\").default(\"comment\"),\n id: z.string().default(() => uuidv7()),\n name: z.string().default(\"\"),\n created_at: z.string().default(() => new Date().toISOString()),\n last_updated: z.string().default(() => new Date().toISOString()),\n });\n\nexport { CommentSchema, CreateCommentSchema };\nexport type Comment = z.infer<typeof CommentSchema>;\nexport type CreateComment = z.infer<typeof CreateCommentSchema>;\n"],"names":["CommentSchema","AssetSchema","extend","asset_type","z","literal","default","preview","object","type","string","refine","x","content","array","passthrough","optional","nullable","CreateCommentSchema","partial","omit","id","user_id","uuidv7","name","created_at","Date","toISOString","last_updated"],"mappings":"sGAKA,MAAMA,EAAgBC,EAAYC,OAAO,CACvCC,WAAYC,EAAEC,QAAQ,WAAWC,QAAQ,WACzCC,QAASH,EACNI,OAAO,CACNC,KAAML,EAAEM,SAASC,QAAQC,GAAY,QAANA,IAC/BC,QAAST,EAAEU,MAAMV,EAAEI,OAAO,CAAE,GAAEO,iBAE/BC,WACAC,WACAX,QAAQ,CAAEG,KAAM,MAAOI,QAAS,OAG/BK,EAAsBlB,EAAcmB,UACvCC,KAAK,CACJC,IAAI,EACJC,SAAS,IAEVpB,OAAO,CACNC,WAAYC,EAAEC,QAAQ,WAAWC,QAAQ,WACzCe,GAAIjB,EAAEM,SAASJ,SAAQ,IAAMiB,MAC7BC,KAAMpB,EAAEM,SAASJ,QAAQ,IACzBmB,WAAYrB,EAAEM,SAASJ,SAAQ,KAAM,IAAIoB,MAAOC,gBAChDC,aAAcxB,EAAEM,SAASJ,SAAQ,KAAM,IAAIoB,MAAOC"}
|
package/dist/schema/comments.js
CHANGED
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.CreateCommentSchema = exports.CommentSchema = void 0;
|
|
4
|
-
const uuidv7_1 = require("uuidv7");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const assets_1 = require("./assets");
|
|
7
|
-
const CommentSchema = assets_1.AssetSchema.extend({
|
|
8
|
-
asset_type: zod_1.z.literal("comment").default("comment"),
|
|
9
|
-
preview: zod_1.z
|
|
10
|
-
.object({
|
|
11
|
-
type: zod_1.z.string().refine((x) => x === "doc"),
|
|
12
|
-
content: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
13
|
-
})
|
|
14
|
-
.optional()
|
|
15
|
-
.nullable()
|
|
16
|
-
.default({ type: "doc", content: [] }),
|
|
17
|
-
});
|
|
18
|
-
exports.CommentSchema = CommentSchema;
|
|
19
|
-
const CreateCommentSchema = CommentSchema.partial()
|
|
20
|
-
.omit({
|
|
21
|
-
id: true,
|
|
22
|
-
user_id: true,
|
|
23
|
-
})
|
|
24
|
-
.extend({
|
|
25
|
-
asset_type: zod_1.z.literal("comment").default("comment"),
|
|
26
|
-
id: zod_1.z.string().default(() => (0, uuidv7_1.uuidv7)()),
|
|
27
|
-
name: zod_1.z.string().default(""),
|
|
28
|
-
created_at: zod_1.z.string().default(() => new Date().toISOString()),
|
|
29
|
-
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
30
|
-
});
|
|
31
|
-
exports.CreateCommentSchema = CreateCommentSchema;
|
|
32
|
-
//# sourceMappingURL=comments.js.map
|
|
1
|
+
"use strict";var e=require("uuidv7"),t=require("zod");const a=require("./assets.js").AssetSchema.extend({asset_type:t.z.literal("comment").default("comment"),preview:t.z.object({type:t.z.string().refine((e=>"doc"===e)),content:t.z.array(t.z.object({}).passthrough())}).optional().nullable().default({type:"doc",content:[]})}),r=a.partial().omit({id:!0,user_id:!0}).extend({asset_type:t.z.literal("comment").default("comment"),id:t.z.string().default((()=>e.uuidv7())),name:t.z.string().default(""),created_at:t.z.string().default((()=>(new Date).toISOString())),last_updated:t.z.string().default((()=>(new Date).toISOString()))});exports.CommentSchema=a,exports.CreateCommentSchema=r;
|
|
2
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","
|
|
1
|
+
{"version":3,"file":"comments.js","sources":["../../src/schema/comments.ts"],"sourcesContent":["import { uuidv7 } from \"uuidv7\";\nimport { z } from \"zod\";\n\nimport { AssetSchema } from \"./assets\";\n\nconst CommentSchema = AssetSchema.extend({\n asset_type: z.literal(\"comment\").default(\"comment\"),\n preview: z\n .object({\n type: z.string().refine((x) => x === \"doc\"),\n content: z.array(z.object({}).passthrough()),\n })\n .optional()\n .nullable()\n .default({ type: \"doc\", content: [] }),\n});\n\nconst CreateCommentSchema = CommentSchema.partial()\n .omit({\n id: true,\n user_id: true,\n })\n .extend({\n asset_type: z.literal(\"comment\").default(\"comment\"),\n id: z.string().default(() => uuidv7()),\n name: z.string().default(\"\"),\n created_at: z.string().default(() => new Date().toISOString()),\n last_updated: z.string().default(() => new Date().toISOString()),\n });\n\nexport { CommentSchema, CreateCommentSchema };\nexport type Comment = z.infer<typeof CommentSchema>;\nexport type CreateComment = z.infer<typeof CreateCommentSchema>;\n"],"names":["CommentSchema","AssetSchema","extend","asset_type","z","literal","default","preview","object","type","string","refine","x","content","array","passthrough","optional","nullable","CreateCommentSchema","partial","omit","id","user_id","uuidv7","name","created_at","Date","toISOString","last_updated"],"mappings":"sDAKA,MAAMA,yBAA2BC,YAACC,OAAO,CACvCC,WAAYC,EAACA,EAACC,QAAQ,WAAWC,QAAQ,WACzCC,QAASH,EAAAA,EACNI,OAAO,CACNC,KAAML,EAACA,EAACM,SAASC,QAAQC,GAAY,QAANA,IAC/BC,QAAST,EAACA,EAACU,MAAMV,EAAAA,EAAEI,OAAO,CAAE,GAAEO,iBAE/BC,WACAC,WACAX,QAAQ,CAAEG,KAAM,MAAOI,QAAS,OAG/BK,EAAsBlB,EAAcmB,UACvCC,KAAK,CACJC,IAAI,EACJC,SAAS,IAEVpB,OAAO,CACNC,WAAYC,EAACA,EAACC,QAAQ,WAAWC,QAAQ,WACzCe,GAAIjB,EAACA,EAACM,SAASJ,SAAQ,IAAMiB,EAAMA,WACnCC,KAAMpB,EAAAA,EAAEM,SAASJ,QAAQ,IACzBmB,WAAYrB,EAAAA,EAAEM,SAASJ,SAAQ,KAAM,IAAIoB,MAAOC,gBAChDC,aAAcxB,EAAAA,EAAEM,SAASJ,SAAQ,KAAM,IAAIoB,MAAOC"}
|