@ourofoundation/ouro-js 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,525 @@
1
+ import { z } from "zod";
2
+ declare const CommentSchema: z.ZodObject<z.objectUtil.extendShape<{
3
+ id: z.ZodString;
4
+ user_id: z.ZodString;
5
+ user: z.ZodOptional<z.ZodObject<{
6
+ id: z.ZodOptional<z.ZodString>;
7
+ user_id: z.ZodOptional<z.ZodString>;
8
+ username: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
9
+ avatar_path: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
10
+ bio: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
11
+ urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
12
+ value: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ value: string;
15
+ }, {
16
+ value: string;
17
+ }>, "many">>>;
18
+ last_active: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id?: string | undefined;
21
+ user_id?: string | undefined;
22
+ avatar_path?: string | null | undefined;
23
+ urls?: {
24
+ value: string;
25
+ }[] | undefined;
26
+ username?: string | null | undefined;
27
+ bio?: string | null | undefined;
28
+ last_active?: string | undefined;
29
+ }, {
30
+ id?: string | undefined;
31
+ user_id?: string | undefined;
32
+ avatar_path?: string | null | undefined;
33
+ urls?: {
34
+ value: string;
35
+ }[] | undefined;
36
+ username?: string | null | undefined;
37
+ bio?: string | null | undefined;
38
+ last_active?: string | undefined;
39
+ }>>;
40
+ org_id: z.ZodString;
41
+ organization: z.ZodOptional<z.ZodObject<{
42
+ id: z.ZodOptional<z.ZodString>;
43
+ owner_id: z.ZodOptional<z.ZodString>;
44
+ name: z.ZodOptional<z.ZodString>;
45
+ avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
46
+ mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
47
+ size: z.ZodOptional<z.ZodString>;
48
+ email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
49
+ domain: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
50
+ urls: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
51
+ value: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ value: string;
54
+ }, {
55
+ value: string;
56
+ }>, "many">>>>;
57
+ base_role: z.ZodOptional<z.ZodDefault<z.ZodEnum<["admin", "read", "write", "none"]>>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ id?: string | undefined;
60
+ name?: string | undefined;
61
+ size?: string | undefined;
62
+ email?: string | null | undefined;
63
+ owner_id?: string | undefined;
64
+ avatar_path?: string | null | undefined;
65
+ mission?: string | null | undefined;
66
+ domain?: string | null | undefined;
67
+ urls?: {
68
+ value: string;
69
+ }[] | null | undefined;
70
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
71
+ }, {
72
+ id?: string | undefined;
73
+ name?: string | undefined;
74
+ size?: string | undefined;
75
+ email?: string | null | undefined;
76
+ owner_id?: string | undefined;
77
+ avatar_path?: string | null | undefined;
78
+ mission?: string | null | undefined;
79
+ domain?: string | null | undefined;
80
+ urls?: {
81
+ value: string;
82
+ }[] | null | undefined;
83
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
84
+ }>>;
85
+ team_id: z.ZodString;
86
+ team: z.ZodOptional<z.ZodObject<{
87
+ id: z.ZodOptional<z.ZodString>;
88
+ org_id: z.ZodOptional<z.ZodString>;
89
+ name: z.ZodOptional<z.ZodString>;
90
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
91
+ default_role: z.ZodOptional<z.ZodEnum<["admin", "read", "write", "none"]>>;
92
+ visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
93
+ created_at: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ id?: string | undefined;
96
+ name?: string | undefined;
97
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
98
+ description?: string | null | undefined;
99
+ org_id?: string | undefined;
100
+ created_at?: string | undefined;
101
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
102
+ }, {
103
+ id?: string | undefined;
104
+ name?: string | undefined;
105
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
106
+ description?: string | null | undefined;
107
+ org_id?: string | undefined;
108
+ created_at?: string | undefined;
109
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
110
+ }>>;
111
+ parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
112
+ asset_type: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
113
+ name: z.ZodString;
114
+ name_url_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
115
+ slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
116
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
+ visibility: z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>;
118
+ monetization: z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>;
119
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
120
+ unit_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
121
+ cost_accounting: z.ZodNullable<z.ZodOptional<z.ZodEnum<["fixed", "variable"]>>>;
122
+ cost_unit: z.ZodNullable<z.ZodOptional<z.ZodString>>;
123
+ product_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
124
+ price_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
125
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
126
+ preview: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>;
127
+ created_at: z.ZodString;
128
+ last_updated: z.ZodString;
129
+ }, {
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
+ preview: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodObject<{
132
+ type: z.ZodEffects<z.ZodString, string, string>;
133
+ content: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
134
+ }, "strip", z.ZodTypeAny, {
135
+ type: string;
136
+ content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
137
+ }, {
138
+ type: string;
139
+ content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
140
+ }>>>>;
141
+ }>, "strip", z.ZodTypeAny, {
142
+ id: string;
143
+ name: string;
144
+ visibility: "inherit" | "private" | "public" | "organization" | "monetized";
145
+ user_id: string;
146
+ org_id: string;
147
+ asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
148
+ created_at: string;
149
+ last_updated: string;
150
+ team_id: string;
151
+ monetization: "none" | "pay-to-unlock" | "pay-per-use";
152
+ preview: {
153
+ type: string;
154
+ content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
155
+ } | null;
156
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
157
+ description?: string | null | undefined;
158
+ user?: {
159
+ id?: string | undefined;
160
+ user_id?: string | undefined;
161
+ avatar_path?: string | null | undefined;
162
+ urls?: {
163
+ value: string;
164
+ }[] | undefined;
165
+ username?: string | null | undefined;
166
+ bio?: string | null | undefined;
167
+ last_active?: string | undefined;
168
+ } | undefined;
169
+ organization?: {
170
+ id?: string | undefined;
171
+ name?: string | undefined;
172
+ size?: string | undefined;
173
+ email?: string | null | undefined;
174
+ owner_id?: string | undefined;
175
+ avatar_path?: string | null | undefined;
176
+ mission?: string | null | undefined;
177
+ domain?: string | null | undefined;
178
+ urls?: {
179
+ value: string;
180
+ }[] | null | undefined;
181
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
182
+ } | undefined;
183
+ team?: {
184
+ id?: string | undefined;
185
+ name?: string | undefined;
186
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
187
+ description?: string | null | undefined;
188
+ org_id?: string | undefined;
189
+ created_at?: string | undefined;
190
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
191
+ } | undefined;
192
+ parent_id?: string | null | undefined;
193
+ name_url_slug?: string | null | undefined;
194
+ slug?: string | null | undefined;
195
+ price?: number | null | undefined;
196
+ unit_cost?: number | null | undefined;
197
+ cost_accounting?: "fixed" | "variable" | null | undefined;
198
+ cost_unit?: string | null | undefined;
199
+ product_id?: string | null | undefined;
200
+ price_id?: string | null | undefined;
201
+ }, {
202
+ id: string;
203
+ name: string;
204
+ visibility: "inherit" | "private" | "public" | "organization" | "monetized";
205
+ user_id: string;
206
+ org_id: string;
207
+ asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
208
+ created_at: string;
209
+ last_updated: string;
210
+ team_id: string;
211
+ monetization: "none" | "pay-to-unlock" | "pay-per-use";
212
+ metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
213
+ description?: string | null | undefined;
214
+ user?: {
215
+ id?: string | undefined;
216
+ user_id?: string | undefined;
217
+ avatar_path?: string | null | undefined;
218
+ urls?: {
219
+ value: string;
220
+ }[] | undefined;
221
+ username?: string | null | undefined;
222
+ bio?: string | null | undefined;
223
+ last_active?: string | undefined;
224
+ } | undefined;
225
+ organization?: {
226
+ id?: string | undefined;
227
+ name?: string | undefined;
228
+ size?: string | undefined;
229
+ email?: string | null | undefined;
230
+ owner_id?: string | undefined;
231
+ avatar_path?: string | null | undefined;
232
+ mission?: string | null | undefined;
233
+ domain?: string | null | undefined;
234
+ urls?: {
235
+ value: string;
236
+ }[] | null | undefined;
237
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
238
+ } | undefined;
239
+ team?: {
240
+ id?: string | undefined;
241
+ name?: string | undefined;
242
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
243
+ description?: string | null | undefined;
244
+ org_id?: string | undefined;
245
+ created_at?: string | undefined;
246
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
247
+ } | undefined;
248
+ parent_id?: string | null | undefined;
249
+ name_url_slug?: string | null | undefined;
250
+ slug?: string | null | undefined;
251
+ price?: number | null | undefined;
252
+ unit_cost?: number | null | undefined;
253
+ cost_accounting?: "fixed" | "variable" | null | undefined;
254
+ cost_unit?: string | null | undefined;
255
+ product_id?: string | null | undefined;
256
+ price_id?: string | null | undefined;
257
+ preview?: {
258
+ type: string;
259
+ content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
260
+ } | null | undefined;
261
+ }>;
262
+ declare const CreateCommentSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
263
+ id: z.ZodOptional<z.ZodString>;
264
+ user_id: z.ZodOptional<z.ZodString>;
265
+ user: z.ZodOptional<z.ZodOptional<z.ZodObject<{
266
+ id: z.ZodOptional<z.ZodString>;
267
+ user_id: z.ZodOptional<z.ZodString>;
268
+ username: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
269
+ avatar_path: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
270
+ bio: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
271
+ urls: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
272
+ value: z.ZodString;
273
+ }, "strip", z.ZodTypeAny, {
274
+ value: string;
275
+ }, {
276
+ value: string;
277
+ }>, "many">>>;
278
+ last_active: z.ZodOptional<z.ZodString>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ id?: string | undefined;
281
+ user_id?: string | undefined;
282
+ avatar_path?: string | null | undefined;
283
+ urls?: {
284
+ value: string;
285
+ }[] | undefined;
286
+ username?: string | null | undefined;
287
+ bio?: string | null | undefined;
288
+ last_active?: string | undefined;
289
+ }, {
290
+ id?: string | undefined;
291
+ user_id?: string | undefined;
292
+ avatar_path?: string | null | undefined;
293
+ urls?: {
294
+ value: string;
295
+ }[] | undefined;
296
+ username?: string | null | undefined;
297
+ bio?: string | null | undefined;
298
+ last_active?: string | undefined;
299
+ }>>>;
300
+ org_id: z.ZodOptional<z.ZodString>;
301
+ organization: z.ZodOptional<z.ZodOptional<z.ZodObject<{
302
+ id: z.ZodOptional<z.ZodString>;
303
+ owner_id: z.ZodOptional<z.ZodString>;
304
+ name: z.ZodOptional<z.ZodString>;
305
+ avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
306
+ mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
307
+ size: z.ZodOptional<z.ZodString>;
308
+ email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
309
+ domain: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
310
+ urls: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
311
+ value: z.ZodString;
312
+ }, "strip", z.ZodTypeAny, {
313
+ value: string;
314
+ }, {
315
+ value: string;
316
+ }>, "many">>>>;
317
+ base_role: z.ZodOptional<z.ZodDefault<z.ZodEnum<["admin", "read", "write", "none"]>>>;
318
+ }, "strip", z.ZodTypeAny, {
319
+ id?: string | undefined;
320
+ name?: string | undefined;
321
+ size?: string | undefined;
322
+ email?: string | null | undefined;
323
+ owner_id?: string | undefined;
324
+ avatar_path?: string | null | undefined;
325
+ mission?: string | null | undefined;
326
+ domain?: string | null | undefined;
327
+ urls?: {
328
+ value: string;
329
+ }[] | null | undefined;
330
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
331
+ }, {
332
+ id?: string | undefined;
333
+ name?: string | undefined;
334
+ size?: string | undefined;
335
+ email?: string | null | undefined;
336
+ owner_id?: string | undefined;
337
+ avatar_path?: string | null | undefined;
338
+ mission?: string | null | undefined;
339
+ domain?: string | null | undefined;
340
+ urls?: {
341
+ value: string;
342
+ }[] | null | undefined;
343
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
344
+ }>>>;
345
+ team_id: z.ZodOptional<z.ZodString>;
346
+ team: z.ZodOptional<z.ZodOptional<z.ZodObject<{
347
+ id: z.ZodOptional<z.ZodString>;
348
+ org_id: z.ZodOptional<z.ZodString>;
349
+ name: z.ZodOptional<z.ZodString>;
350
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
351
+ default_role: z.ZodOptional<z.ZodEnum<["admin", "read", "write", "none"]>>;
352
+ visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
353
+ created_at: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ id?: string | undefined;
356
+ name?: string | undefined;
357
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
358
+ description?: string | null | undefined;
359
+ org_id?: string | undefined;
360
+ created_at?: string | undefined;
361
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
362
+ }, {
363
+ id?: string | undefined;
364
+ name?: string | undefined;
365
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
366
+ description?: string | null | undefined;
367
+ org_id?: string | undefined;
368
+ created_at?: string | undefined;
369
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
370
+ }>>>;
371
+ parent_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
372
+ name: z.ZodOptional<z.ZodString>;
373
+ name_url_slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
374
+ slug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
375
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
376
+ visibility: z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>;
377
+ monetization: z.ZodOptional<z.ZodEnum<["none", "pay-to-unlock", "pay-per-use"]>>;
378
+ price: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
379
+ unit_cost: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
380
+ cost_accounting: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["fixed", "variable"]>>>>;
381
+ cost_unit: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
382
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
383
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
384
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
385
+ created_at: z.ZodOptional<z.ZodString>;
386
+ last_updated: z.ZodOptional<z.ZodString>;
387
+ 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">>;
388
+ preview: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodObject<{
389
+ type: z.ZodEffects<z.ZodString, string, string>;
390
+ content: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
391
+ }, "strip", z.ZodTypeAny, {
392
+ type: string;
393
+ content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
394
+ }, {
395
+ type: string;
396
+ content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
397
+ }>>>>>;
398
+ }, "id" | "user_id">, {
399
+ asset_type: z.ZodEffects<z.ZodDefault<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" | undefined>;
400
+ id: z.ZodDefault<z.ZodString>;
401
+ name: z.ZodDefault<z.ZodString>;
402
+ created_at: z.ZodDefault<z.ZodString>;
403
+ last_updated: z.ZodDefault<z.ZodString>;
404
+ }>, "strip", z.ZodTypeAny, {
405
+ id: string;
406
+ name: string;
407
+ asset_type: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
408
+ created_at: string;
409
+ last_updated: string;
410
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
411
+ metadata?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
412
+ description?: string | null | undefined;
413
+ user?: {
414
+ id?: string | undefined;
415
+ user_id?: string | undefined;
416
+ avatar_path?: string | null | undefined;
417
+ urls?: {
418
+ value: string;
419
+ }[] | undefined;
420
+ username?: string | null | undefined;
421
+ bio?: string | null | undefined;
422
+ last_active?: string | undefined;
423
+ } | undefined;
424
+ organization?: {
425
+ id?: string | undefined;
426
+ name?: string | undefined;
427
+ size?: string | undefined;
428
+ email?: string | null | undefined;
429
+ owner_id?: string | undefined;
430
+ avatar_path?: string | null | undefined;
431
+ mission?: string | null | undefined;
432
+ domain?: string | null | undefined;
433
+ urls?: {
434
+ value: string;
435
+ }[] | null | undefined;
436
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
437
+ } | undefined;
438
+ team?: {
439
+ id?: string | undefined;
440
+ name?: string | undefined;
441
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
442
+ description?: string | null | undefined;
443
+ org_id?: string | undefined;
444
+ created_at?: string | undefined;
445
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
446
+ } | undefined;
447
+ org_id?: string | undefined;
448
+ team_id?: string | undefined;
449
+ parent_id?: string | null | undefined;
450
+ name_url_slug?: string | null | undefined;
451
+ slug?: string | null | undefined;
452
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
453
+ price?: number | null | undefined;
454
+ unit_cost?: number | null | undefined;
455
+ cost_accounting?: "fixed" | "variable" | null | undefined;
456
+ cost_unit?: string | null | undefined;
457
+ product_id?: string | null | undefined;
458
+ price_id?: string | null | undefined;
459
+ preview?: {
460
+ type: string;
461
+ content: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
462
+ } | null | undefined;
463
+ }, {
464
+ id?: string | undefined;
465
+ name?: string | undefined;
466
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
467
+ metadata?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
468
+ description?: string | null | undefined;
469
+ user?: {
470
+ id?: string | undefined;
471
+ user_id?: string | undefined;
472
+ avatar_path?: string | null | undefined;
473
+ urls?: {
474
+ value: string;
475
+ }[] | undefined;
476
+ username?: string | null | undefined;
477
+ bio?: string | null | undefined;
478
+ last_active?: string | undefined;
479
+ } | undefined;
480
+ organization?: {
481
+ id?: string | undefined;
482
+ name?: string | undefined;
483
+ size?: string | undefined;
484
+ email?: string | null | undefined;
485
+ owner_id?: string | undefined;
486
+ avatar_path?: string | null | undefined;
487
+ mission?: string | null | undefined;
488
+ domain?: string | null | undefined;
489
+ urls?: {
490
+ value: string;
491
+ }[] | null | undefined;
492
+ base_role?: "none" | "admin" | "read" | "write" | undefined;
493
+ } | undefined;
494
+ team?: {
495
+ id?: string | undefined;
496
+ name?: string | undefined;
497
+ visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
498
+ description?: string | null | undefined;
499
+ org_id?: string | undefined;
500
+ created_at?: string | undefined;
501
+ default_role?: "none" | "admin" | "read" | "write" | undefined;
502
+ } | undefined;
503
+ org_id?: string | undefined;
504
+ asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
505
+ created_at?: string | undefined;
506
+ last_updated?: string | undefined;
507
+ team_id?: string | undefined;
508
+ parent_id?: string | null | undefined;
509
+ name_url_slug?: string | null | undefined;
510
+ slug?: string | null | undefined;
511
+ monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
512
+ price?: number | null | undefined;
513
+ unit_cost?: number | null | undefined;
514
+ cost_accounting?: "fixed" | "variable" | null | undefined;
515
+ cost_unit?: string | null | undefined;
516
+ product_id?: string | null | undefined;
517
+ price_id?: string | null | undefined;
518
+ preview?: {
519
+ type: string;
520
+ content: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
521
+ } | null | undefined;
522
+ }>;
523
+ export { CommentSchema, CreateCommentSchema };
524
+ export type Comment = z.infer<typeof CommentSchema>;
525
+ export type CreateComment = z.infer<typeof CreateCommentSchema>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateCommentSchema = exports.CommentSchema = void 0;
4
+ const uuidv7_1 = require("uuidv7");
5
+ const zod_1 = require("zod");
6
+ const assets_1 = require("@/schema/assets");
7
+ const index_1 = require("@/schema/index");
8
+ const CommentSchema = assets_1.AssetSchema.extend({
9
+ asset_type: index_1.AssetTypeSchema.refine((x) => ["comment"].includes(x)),
10
+ preview: zod_1.z
11
+ .object({
12
+ type: zod_1.z.string().refine((x) => x === "doc"),
13
+ content: zod_1.z.array(zod_1.z.object({}).passthrough()),
14
+ })
15
+ .optional()
16
+ .nullable()
17
+ .default({ type: "doc", content: [] }),
18
+ });
19
+ exports.CommentSchema = CommentSchema;
20
+ const CreateCommentSchema = CommentSchema.partial()
21
+ .omit({
22
+ id: true,
23
+ user_id: true,
24
+ })
25
+ .extend({
26
+ asset_type: index_1.AssetTypeSchema.default("comment").refine((x) => x === "comment"),
27
+ id: zod_1.z.string().default(() => (0, uuidv7_1.uuidv7)()),
28
+ name: zod_1.z.string().default(""),
29
+ created_at: zod_1.z.string().default(() => new Date().toISOString()),
30
+ last_updated: zod_1.z.string().default(() => new Date().toISOString()),
31
+ });
32
+ exports.CreateCommentSchema = CreateCommentSchema;
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ declare const PurchaseAssetSchema: z.ZodObject<{
3
+ assetId: z.ZodString;
4
+ method: z.ZodEnum<["checkout", "api"]>;
5
+ assetType: z.ZodEnum<["user", "organization", "team", "dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ method: "checkout" | "api";
8
+ assetId: string;
9
+ assetType: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
10
+ }, {
11
+ method: "checkout" | "api";
12
+ assetId: string;
13
+ assetType: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
14
+ }>;
15
+ declare const PermissionSchema: z.ZodObject<{
16
+ role: z.ZodEnum<["admin", "read", "write", "none"]>;
17
+ user: z.ZodObject<{
18
+ user_id: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ user_id: string;
21
+ }, {
22
+ user_id: string;
23
+ }>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ role: "none" | "admin" | "read" | "write";
26
+ user: {
27
+ user_id: string;
28
+ };
29
+ }, {
30
+ role: "none" | "admin" | "read" | "write";
31
+ user: {
32
+ user_id: string;
33
+ };
34
+ }>;
35
+ export { PurchaseAssetSchema, PermissionSchema };
36
+ export type PurchaseAsset = z.infer<typeof PurchaseAssetSchema>;
37
+ export type Permission = z.infer<typeof PermissionSchema>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PermissionSchema = exports.PurchaseAssetSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const index_1 = require("@/schema/index");
6
+ const PurchaseAssetSchema = zod_1.z.object({
7
+ assetId: zod_1.z.string().uuid(),
8
+ method: zod_1.z.enum(["checkout", "api"]),
9
+ assetType: index_1.AssetTypeSchema,
10
+ });
11
+ exports.PurchaseAssetSchema = PurchaseAssetSchema;
12
+ const PermissionSchema = zod_1.z.object({
13
+ role: index_1.RoleSchema,
14
+ user: zod_1.z.object({
15
+ user_id: zod_1.z.string().uuid(),
16
+ }),
17
+ });
18
+ exports.PermissionSchema = PermissionSchema;