@ourofoundation/ouro-js 1.0.4 → 1.0.6
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 +3 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/schema/assets.d.ts +8 -73
- package/dist/schema/assets.js +16 -0
- package/dist/schema/assets.js.map +1 -1
- package/dist/schema/comments.d.ts +7 -7
- package/dist/schema/comments.js +2 -3
- package/dist/schema/comments.js.map +1 -1
- package/dist/schema/conversations.d.ts +26 -5
- package/dist/schema/datasets.d.ts +45 -175
- package/dist/schema/datasets.js +5 -6
- package/dist/schema/datasets.js.map +1 -1
- package/dist/schema/files.d.ts +32 -163
- package/dist/schema/files.js +5 -7
- package/dist/schema/files.js.map +1 -1
- package/dist/schema/posts.d.ts +637 -265
- package/dist/schema/posts.js +21 -42
- package/dist/schema/posts.js.map +1 -1
- package/dist/utils/air/markdown-parser.d.ts +1 -0
- package/dist/utils/air/markdown-parser.js +118 -0
- package/dist/utils/air/markdown-parser.js.map +1 -0
- package/package.json +2 -2
|
@@ -125,10 +125,10 @@ declare const DatasetSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
125
125
|
created_at: z.ZodString;
|
|
126
126
|
last_updated: z.ZodString;
|
|
127
127
|
}, {
|
|
128
|
-
asset_type: z.
|
|
128
|
+
asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
|
|
129
129
|
metadata: z.ZodObject<z.objectUtil.extendShape<{
|
|
130
130
|
table_name: z.ZodString;
|
|
131
|
-
schema: z.ZodLiteral<"datasets"
|
|
131
|
+
schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
|
|
132
132
|
columns: z.ZodArray<z.ZodString, "many">;
|
|
133
133
|
}, {
|
|
134
134
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -149,13 +149,13 @@ declare const DatasetSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
149
149
|
bucket?: "public-files" | "files" | undefined;
|
|
150
150
|
}, {
|
|
151
151
|
columns: string[];
|
|
152
|
-
schema: "datasets";
|
|
153
152
|
table_name: string;
|
|
154
153
|
type?: string | undefined;
|
|
155
154
|
id?: string | undefined;
|
|
156
155
|
name?: string | undefined;
|
|
157
156
|
path?: string | undefined;
|
|
158
157
|
size?: number | undefined;
|
|
158
|
+
schema?: "datasets" | undefined;
|
|
159
159
|
bucket?: "public-files" | "files" | undefined;
|
|
160
160
|
}>;
|
|
161
161
|
preview: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
@@ -176,7 +176,7 @@ declare const DatasetSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
176
176
|
};
|
|
177
177
|
user_id: string;
|
|
178
178
|
org_id: string;
|
|
179
|
-
asset_type: "
|
|
179
|
+
asset_type: "dataset";
|
|
180
180
|
created_at: string;
|
|
181
181
|
last_updated: string;
|
|
182
182
|
team_id: string;
|
|
@@ -232,18 +232,17 @@ declare const DatasetSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
232
232
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
233
233
|
metadata: {
|
|
234
234
|
columns: string[];
|
|
235
|
-
schema: "datasets";
|
|
236
235
|
table_name: string;
|
|
237
236
|
type?: string | undefined;
|
|
238
237
|
id?: string | undefined;
|
|
239
238
|
name?: string | undefined;
|
|
240
239
|
path?: string | undefined;
|
|
241
240
|
size?: number | undefined;
|
|
241
|
+
schema?: "datasets" | undefined;
|
|
242
242
|
bucket?: "public-files" | "files" | undefined;
|
|
243
243
|
};
|
|
244
244
|
user_id: string;
|
|
245
245
|
org_id: string;
|
|
246
|
-
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
247
246
|
created_at: string;
|
|
248
247
|
last_updated: string;
|
|
249
248
|
team_id: string;
|
|
@@ -275,6 +274,7 @@ declare const DatasetSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
275
274
|
}[] | null | undefined;
|
|
276
275
|
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
277
276
|
} | undefined;
|
|
277
|
+
asset_type?: "dataset" | undefined;
|
|
278
278
|
team?: {
|
|
279
279
|
id?: string | undefined;
|
|
280
280
|
name?: string | undefined;
|
|
@@ -419,18 +419,21 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
419
419
|
state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
|
|
420
420
|
created_at: z.ZodOptional<z.ZodString>;
|
|
421
421
|
last_updated: z.ZodOptional<z.ZodString>;
|
|
422
|
-
}, "user_id">, {
|
|
422
|
+
}, "user" | "organization" | "user_id" | "team" | "slug">, {
|
|
423
423
|
id: z.ZodDefault<z.ZodString>;
|
|
424
424
|
team_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
425
425
|
org_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
426
|
+
name: z.ZodString;
|
|
426
427
|
name_url_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
427
428
|
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>;
|
|
428
429
|
visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>>;
|
|
430
|
+
created_at: z.ZodDefault<z.ZodString>;
|
|
431
|
+
last_updated: z.ZodDefault<z.ZodString>;
|
|
429
432
|
}>, {
|
|
430
|
-
asset_type: z.
|
|
433
|
+
asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
|
|
431
434
|
metadata: z.ZodObject<z.objectUtil.extendShape<{
|
|
432
435
|
table_name: z.ZodString;
|
|
433
|
-
schema: z.ZodLiteral<"datasets"
|
|
436
|
+
schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
|
|
434
437
|
columns: z.ZodArray<z.ZodString, "many">;
|
|
435
438
|
}, {
|
|
436
439
|
type: z.ZodString;
|
|
@@ -447,8 +450,8 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
447
450
|
path: string;
|
|
448
451
|
size: number;
|
|
449
452
|
schema: "datasets";
|
|
450
|
-
table_name: string;
|
|
451
453
|
bucket: "public-files" | "files";
|
|
454
|
+
table_name: string;
|
|
452
455
|
}, {
|
|
453
456
|
type: string;
|
|
454
457
|
id: string;
|
|
@@ -456,14 +459,15 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
456
459
|
columns: string[];
|
|
457
460
|
path: string;
|
|
458
461
|
size: number;
|
|
459
|
-
schema: "datasets";
|
|
460
|
-
table_name: string;
|
|
461
462
|
bucket: "public-files" | "files";
|
|
463
|
+
table_name: string;
|
|
464
|
+
schema?: "datasets" | undefined;
|
|
462
465
|
}>;
|
|
463
466
|
preview: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
464
467
|
}>, "strip", z.ZodTypeAny, {
|
|
465
468
|
id: string;
|
|
466
469
|
state: "error" | "in-progress" | "success" | "queued";
|
|
470
|
+
name: string;
|
|
467
471
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
468
472
|
metadata: {
|
|
469
473
|
type: string;
|
|
@@ -473,53 +477,18 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
473
477
|
path: string;
|
|
474
478
|
size: number;
|
|
475
479
|
schema: "datasets";
|
|
476
|
-
table_name: string;
|
|
477
480
|
bucket: "public-files" | "files";
|
|
481
|
+
table_name: string;
|
|
478
482
|
};
|
|
479
483
|
org_id: string | null;
|
|
480
|
-
asset_type: "
|
|
484
|
+
asset_type: "dataset";
|
|
485
|
+
created_at: string;
|
|
486
|
+
last_updated: string;
|
|
481
487
|
team_id: string | null;
|
|
482
488
|
preview: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
483
|
-
name?: string | undefined;
|
|
484
489
|
description?: string | null | undefined;
|
|
485
|
-
user?: {
|
|
486
|
-
id?: string | undefined;
|
|
487
|
-
user_id?: string | undefined;
|
|
488
|
-
avatar_path?: string | null | undefined;
|
|
489
|
-
urls?: {
|
|
490
|
-
value: string;
|
|
491
|
-
}[] | undefined;
|
|
492
|
-
username?: string | null | undefined;
|
|
493
|
-
bio?: string | null | undefined;
|
|
494
|
-
last_active?: string | undefined;
|
|
495
|
-
} | undefined;
|
|
496
|
-
organization?: {
|
|
497
|
-
id?: string | undefined;
|
|
498
|
-
name?: string | undefined;
|
|
499
|
-
size?: string | undefined;
|
|
500
|
-
email?: string | null | undefined;
|
|
501
|
-
avatar_path?: string | null | undefined;
|
|
502
|
-
mission?: string | null | undefined;
|
|
503
|
-
domain?: string | null | undefined;
|
|
504
|
-
urls?: {
|
|
505
|
-
value: string;
|
|
506
|
-
}[] | null | undefined;
|
|
507
|
-
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
508
|
-
} | undefined;
|
|
509
|
-
created_at?: string | undefined;
|
|
510
|
-
last_updated?: string | undefined;
|
|
511
|
-
team?: {
|
|
512
|
-
id?: string | undefined;
|
|
513
|
-
name?: string | undefined;
|
|
514
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
515
|
-
description?: string | null | undefined;
|
|
516
|
-
org_id?: string | undefined;
|
|
517
|
-
created_at?: string | undefined;
|
|
518
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
519
|
-
} | undefined;
|
|
520
490
|
parent_id?: string | null | undefined;
|
|
521
491
|
name_url_slug?: string | null | undefined;
|
|
522
|
-
slug?: string | null | undefined;
|
|
523
492
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
524
493
|
price?: number | null | undefined;
|
|
525
494
|
unit_cost?: number | null | undefined;
|
|
@@ -528,6 +497,7 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
528
497
|
product_id?: string | null | undefined;
|
|
529
498
|
price_id?: string | null | undefined;
|
|
530
499
|
}, {
|
|
500
|
+
name: string;
|
|
531
501
|
metadata: {
|
|
532
502
|
type: string;
|
|
533
503
|
id: string;
|
|
@@ -535,57 +505,22 @@ declare const CreateDatasetFromFileSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
535
505
|
columns: string[];
|
|
536
506
|
path: string;
|
|
537
507
|
size: number;
|
|
538
|
-
schema: "datasets";
|
|
539
|
-
table_name: string;
|
|
540
508
|
bucket: "public-files" | "files";
|
|
509
|
+
table_name: string;
|
|
510
|
+
schema?: "datasets" | undefined;
|
|
541
511
|
};
|
|
542
|
-
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
543
512
|
preview: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
544
513
|
id?: string | undefined;
|
|
545
514
|
state?: "error" | "in-progress" | "success" | "queued" | undefined;
|
|
546
|
-
name?: string | undefined;
|
|
547
515
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
548
516
|
description?: string | null | undefined;
|
|
549
|
-
user?: {
|
|
550
|
-
id?: string | undefined;
|
|
551
|
-
user_id?: string | undefined;
|
|
552
|
-
avatar_path?: string | null | undefined;
|
|
553
|
-
urls?: {
|
|
554
|
-
value: string;
|
|
555
|
-
}[] | undefined;
|
|
556
|
-
username?: string | null | undefined;
|
|
557
|
-
bio?: string | null | undefined;
|
|
558
|
-
last_active?: string | undefined;
|
|
559
|
-
} | undefined;
|
|
560
|
-
organization?: {
|
|
561
|
-
id?: string | undefined;
|
|
562
|
-
name?: string | undefined;
|
|
563
|
-
size?: string | undefined;
|
|
564
|
-
email?: string | null | undefined;
|
|
565
|
-
avatar_path?: string | null | undefined;
|
|
566
|
-
mission?: string | null | undefined;
|
|
567
|
-
domain?: string | null | undefined;
|
|
568
|
-
urls?: {
|
|
569
|
-
value: string;
|
|
570
|
-
}[] | null | undefined;
|
|
571
|
-
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
572
|
-
} | undefined;
|
|
573
517
|
org_id?: string | null | undefined;
|
|
518
|
+
asset_type?: "dataset" | undefined;
|
|
574
519
|
created_at?: string | undefined;
|
|
575
520
|
last_updated?: string | undefined;
|
|
576
521
|
team_id?: string | null | undefined;
|
|
577
|
-
team?: {
|
|
578
|
-
id?: string | undefined;
|
|
579
|
-
name?: string | undefined;
|
|
580
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
581
|
-
description?: string | null | undefined;
|
|
582
|
-
org_id?: string | undefined;
|
|
583
|
-
created_at?: string | undefined;
|
|
584
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
585
|
-
} | undefined;
|
|
586
522
|
parent_id?: string | null | undefined;
|
|
587
523
|
name_url_slug?: string | null | undefined;
|
|
588
|
-
slug?: string | null | undefined;
|
|
589
524
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
590
525
|
price?: number | null | undefined;
|
|
591
526
|
unit_cost?: number | null | undefined;
|
|
@@ -719,18 +654,21 @@ declare const CreateDatasetFromSchemaSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
719
654
|
state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
|
|
720
655
|
created_at: z.ZodOptional<z.ZodString>;
|
|
721
656
|
last_updated: z.ZodOptional<z.ZodString>;
|
|
722
|
-
}, "user_id">, {
|
|
657
|
+
}, "user" | "organization" | "user_id" | "team" | "slug">, {
|
|
723
658
|
id: z.ZodDefault<z.ZodString>;
|
|
724
659
|
team_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
725
660
|
org_id: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
661
|
+
name: z.ZodString;
|
|
726
662
|
name_url_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
727
663
|
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>;
|
|
728
664
|
visibility: z.ZodDefault<z.ZodOptional<z.ZodEnum<["public", "private", "organization", "monetized", "inherit"]>>>;
|
|
665
|
+
created_at: z.ZodDefault<z.ZodString>;
|
|
666
|
+
last_updated: z.ZodDefault<z.ZodString>;
|
|
729
667
|
}>, {
|
|
730
|
-
asset_type: z.
|
|
668
|
+
asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
|
|
731
669
|
metadata: z.ZodObject<{
|
|
732
670
|
table_name: z.ZodString;
|
|
733
|
-
schema: z.ZodLiteral<"datasets"
|
|
671
|
+
schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
|
|
734
672
|
columns: z.ZodArray<z.ZodString, "many">;
|
|
735
673
|
}, "strip", z.ZodTypeAny, {
|
|
736
674
|
columns: string[];
|
|
@@ -738,13 +676,14 @@ declare const CreateDatasetFromSchemaSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
738
676
|
table_name: string;
|
|
739
677
|
}, {
|
|
740
678
|
columns: string[];
|
|
741
|
-
schema: "datasets";
|
|
742
679
|
table_name: string;
|
|
680
|
+
schema?: "datasets" | undefined;
|
|
743
681
|
}>;
|
|
744
682
|
preview: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
745
683
|
}>, "strip", z.ZodTypeAny, {
|
|
746
684
|
id: string;
|
|
747
685
|
state: "error" | "in-progress" | "success" | "queued";
|
|
686
|
+
name: string;
|
|
748
687
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
749
688
|
metadata: {
|
|
750
689
|
columns: string[];
|
|
@@ -752,49 +691,14 @@ declare const CreateDatasetFromSchemaSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
752
691
|
table_name: string;
|
|
753
692
|
};
|
|
754
693
|
org_id: string | null;
|
|
755
|
-
asset_type: "
|
|
694
|
+
asset_type: "dataset";
|
|
695
|
+
created_at: string;
|
|
696
|
+
last_updated: string;
|
|
756
697
|
team_id: string | null;
|
|
757
698
|
preview: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
758
|
-
name?: string | undefined;
|
|
759
699
|
description?: string | null | undefined;
|
|
760
|
-
user?: {
|
|
761
|
-
id?: string | undefined;
|
|
762
|
-
user_id?: string | undefined;
|
|
763
|
-
avatar_path?: string | null | undefined;
|
|
764
|
-
urls?: {
|
|
765
|
-
value: string;
|
|
766
|
-
}[] | undefined;
|
|
767
|
-
username?: string | null | undefined;
|
|
768
|
-
bio?: string | null | undefined;
|
|
769
|
-
last_active?: string | undefined;
|
|
770
|
-
} | undefined;
|
|
771
|
-
organization?: {
|
|
772
|
-
id?: string | undefined;
|
|
773
|
-
name?: string | undefined;
|
|
774
|
-
size?: string | undefined;
|
|
775
|
-
email?: string | null | undefined;
|
|
776
|
-
avatar_path?: string | null | undefined;
|
|
777
|
-
mission?: string | null | undefined;
|
|
778
|
-
domain?: string | null | undefined;
|
|
779
|
-
urls?: {
|
|
780
|
-
value: string;
|
|
781
|
-
}[] | null | undefined;
|
|
782
|
-
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
783
|
-
} | undefined;
|
|
784
|
-
created_at?: string | undefined;
|
|
785
|
-
last_updated?: string | undefined;
|
|
786
|
-
team?: {
|
|
787
|
-
id?: string | undefined;
|
|
788
|
-
name?: string | undefined;
|
|
789
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
790
|
-
description?: string | null | undefined;
|
|
791
|
-
org_id?: string | undefined;
|
|
792
|
-
created_at?: string | undefined;
|
|
793
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
794
|
-
} | undefined;
|
|
795
700
|
parent_id?: string | null | undefined;
|
|
796
701
|
name_url_slug?: string | null | undefined;
|
|
797
|
-
slug?: string | null | undefined;
|
|
798
702
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
799
703
|
price?: number | null | undefined;
|
|
800
704
|
unit_cost?: number | null | undefined;
|
|
@@ -803,58 +707,24 @@ declare const CreateDatasetFromSchemaSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
803
707
|
product_id?: string | null | undefined;
|
|
804
708
|
price_id?: string | null | undefined;
|
|
805
709
|
}, {
|
|
710
|
+
name: string;
|
|
806
711
|
metadata: {
|
|
807
712
|
columns: string[];
|
|
808
|
-
schema: "datasets";
|
|
809
713
|
table_name: string;
|
|
714
|
+
schema?: "datasets" | undefined;
|
|
810
715
|
};
|
|
811
|
-
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
812
716
|
preview: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
813
717
|
id?: string | undefined;
|
|
814
718
|
state?: "error" | "in-progress" | "success" | "queued" | undefined;
|
|
815
|
-
name?: string | undefined;
|
|
816
719
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
817
720
|
description?: string | null | undefined;
|
|
818
|
-
user?: {
|
|
819
|
-
id?: string | undefined;
|
|
820
|
-
user_id?: string | undefined;
|
|
821
|
-
avatar_path?: string | null | undefined;
|
|
822
|
-
urls?: {
|
|
823
|
-
value: string;
|
|
824
|
-
}[] | undefined;
|
|
825
|
-
username?: string | null | undefined;
|
|
826
|
-
bio?: string | null | undefined;
|
|
827
|
-
last_active?: string | undefined;
|
|
828
|
-
} | undefined;
|
|
829
|
-
organization?: {
|
|
830
|
-
id?: string | undefined;
|
|
831
|
-
name?: string | undefined;
|
|
832
|
-
size?: string | undefined;
|
|
833
|
-
email?: string | null | undefined;
|
|
834
|
-
avatar_path?: string | null | undefined;
|
|
835
|
-
mission?: string | null | undefined;
|
|
836
|
-
domain?: string | null | undefined;
|
|
837
|
-
urls?: {
|
|
838
|
-
value: string;
|
|
839
|
-
}[] | null | undefined;
|
|
840
|
-
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
841
|
-
} | undefined;
|
|
842
721
|
org_id?: string | null | undefined;
|
|
722
|
+
asset_type?: "dataset" | undefined;
|
|
843
723
|
created_at?: string | undefined;
|
|
844
724
|
last_updated?: string | undefined;
|
|
845
725
|
team_id?: string | null | undefined;
|
|
846
|
-
team?: {
|
|
847
|
-
id?: string | undefined;
|
|
848
|
-
name?: string | undefined;
|
|
849
|
-
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
850
|
-
description?: string | null | undefined;
|
|
851
|
-
org_id?: string | undefined;
|
|
852
|
-
created_at?: string | undefined;
|
|
853
|
-
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
854
|
-
} | undefined;
|
|
855
726
|
parent_id?: string | null | undefined;
|
|
856
727
|
name_url_slug?: string | null | undefined;
|
|
857
|
-
slug?: string | null | undefined;
|
|
858
728
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
859
729
|
price?: number | null | undefined;
|
|
860
730
|
unit_cost?: number | null | undefined;
|
|
@@ -985,10 +855,10 @@ declare const updateDatasetSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
985
855
|
state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
|
|
986
856
|
created_at: z.ZodOptional<z.ZodString>;
|
|
987
857
|
last_updated: z.ZodOptional<z.ZodString>;
|
|
988
|
-
asset_type: z.ZodOptional<z.
|
|
858
|
+
asset_type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"dataset">>>;
|
|
989
859
|
metadata: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
990
860
|
table_name: z.ZodString;
|
|
991
|
-
schema: z.ZodLiteral<"datasets"
|
|
861
|
+
schema: z.ZodDefault<z.ZodLiteral<"datasets">>;
|
|
992
862
|
columns: z.ZodArray<z.ZodString, "many">;
|
|
993
863
|
}, {
|
|
994
864
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -1009,21 +879,21 @@ declare const updateDatasetSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
1009
879
|
bucket?: "public-files" | "files" | undefined;
|
|
1010
880
|
}, {
|
|
1011
881
|
columns: string[];
|
|
1012
|
-
schema: "datasets";
|
|
1013
882
|
table_name: string;
|
|
1014
883
|
type?: string | undefined;
|
|
1015
884
|
id?: string | undefined;
|
|
1016
885
|
name?: string | undefined;
|
|
1017
886
|
path?: string | undefined;
|
|
1018
887
|
size?: number | undefined;
|
|
888
|
+
schema?: "datasets" | undefined;
|
|
1019
889
|
bucket?: "public-files" | "files" | undefined;
|
|
1020
890
|
}>>;
|
|
1021
891
|
preview: z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1022
892
|
}, "id" | "user_id" | "created_at" | "last_updated">, {
|
|
1023
|
-
asset_type: z.
|
|
893
|
+
asset_type: z.ZodDefault<z.ZodLiteral<"dataset">>;
|
|
1024
894
|
last_updated: z.ZodDefault<z.ZodString>;
|
|
1025
895
|
}>, "strip", z.ZodTypeAny, {
|
|
1026
|
-
asset_type: "
|
|
896
|
+
asset_type: "dataset";
|
|
1027
897
|
last_updated: string;
|
|
1028
898
|
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
1029
899
|
name?: string | undefined;
|
|
@@ -1087,19 +957,18 @@ declare const updateDatasetSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
1087
957
|
price_id?: string | null | undefined;
|
|
1088
958
|
preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | undefined;
|
|
1089
959
|
}, {
|
|
1090
|
-
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
1091
960
|
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
1092
961
|
name?: string | undefined;
|
|
1093
962
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
1094
963
|
metadata?: {
|
|
1095
964
|
columns: string[];
|
|
1096
|
-
schema: "datasets";
|
|
1097
965
|
table_name: string;
|
|
1098
966
|
type?: string | undefined;
|
|
1099
967
|
id?: string | undefined;
|
|
1100
968
|
name?: string | undefined;
|
|
1101
969
|
path?: string | undefined;
|
|
1102
970
|
size?: number | undefined;
|
|
971
|
+
schema?: "datasets" | undefined;
|
|
1103
972
|
bucket?: "public-files" | "files" | undefined;
|
|
1104
973
|
} | undefined;
|
|
1105
974
|
description?: string | null | undefined;
|
|
@@ -1128,6 +997,7 @@ declare const updateDatasetSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
1128
997
|
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
1129
998
|
} | undefined;
|
|
1130
999
|
org_id?: string | undefined;
|
|
1000
|
+
asset_type?: "dataset" | undefined;
|
|
1131
1001
|
last_updated?: string | undefined;
|
|
1132
1002
|
team_id?: string | undefined;
|
|
1133
1003
|
team?: {
|
package/dist/schema/datasets.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateDatasetSchema = exports.CreateDatasetFromSchemaSchema = exports.CreateDatasetFromFileSchema = exports.DatasetSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const assets_1 = require("./assets");
|
|
6
|
-
const common_1 = require("./common");
|
|
7
6
|
const DatasetFromFileMetadataSchema = zod_1.z.object({
|
|
8
7
|
type: zod_1.z.string(),
|
|
9
8
|
size: zod_1.z.number(),
|
|
@@ -14,23 +13,23 @@ const DatasetFromFileMetadataSchema = zod_1.z.object({
|
|
|
14
13
|
});
|
|
15
14
|
const DatasetMetadataSchema = zod_1.z.object({
|
|
16
15
|
table_name: zod_1.z.string(),
|
|
17
|
-
schema: zod_1.z.literal("datasets"),
|
|
16
|
+
schema: zod_1.z.literal("datasets").default("datasets"),
|
|
18
17
|
columns: zod_1.z.array(zod_1.z.string()),
|
|
19
18
|
});
|
|
20
19
|
const DatasetSchema = assets_1.AssetSchema.extend({
|
|
21
|
-
asset_type:
|
|
20
|
+
asset_type: zod_1.z.literal("dataset").default("dataset"),
|
|
22
21
|
metadata: DatasetMetadataSchema.extend(Object.assign({}, DatasetFromFileMetadataSchema.partial().shape)),
|
|
23
22
|
preview: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
24
23
|
});
|
|
25
24
|
exports.DatasetSchema = DatasetSchema;
|
|
26
25
|
const CreateDatasetFromFileSchema = assets_1.CreateAssetSchema.extend({
|
|
27
|
-
asset_type:
|
|
26
|
+
asset_type: zod_1.z.literal("dataset").default("dataset"),
|
|
28
27
|
metadata: DatasetMetadataSchema.extend(Object.assign({}, DatasetFromFileMetadataSchema.shape)),
|
|
29
28
|
preview: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
30
29
|
});
|
|
31
30
|
exports.CreateDatasetFromFileSchema = CreateDatasetFromFileSchema;
|
|
32
31
|
const CreateDatasetFromSchemaSchema = assets_1.CreateAssetSchema.extend({
|
|
33
|
-
asset_type:
|
|
32
|
+
asset_type: zod_1.z.literal("dataset").default("dataset"),
|
|
34
33
|
metadata: DatasetMetadataSchema,
|
|
35
34
|
preview: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
36
35
|
});
|
|
@@ -43,7 +42,7 @@ const updateDatasetSchema = DatasetSchema.partial()
|
|
|
43
42
|
last_updated: true,
|
|
44
43
|
})
|
|
45
44
|
.extend({
|
|
46
|
-
asset_type:
|
|
45
|
+
asset_type: zod_1.z.literal("dataset").default("dataset"),
|
|
47
46
|
last_updated: zod_1.z.string().default(() => new Date().toISOString()),
|
|
48
47
|
});
|
|
49
48
|
exports.updateDatasetSchema = updateDatasetSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/schema/datasets.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAA0D;
|
|
1
|
+
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/schema/datasets.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qCAA0D;AAG1D,MAAM,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IACjD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,oBAAW,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACnD,QAAQ,EAAE,qBAAqB,CAAC,MAAM,mBACjC,6BAA6B,CAAC,OAAO,EAAE,CAAC,KAAK,EAChD;IACF,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;CAC7C,CAAC,CAAC;AAkCD,sCAAa;AAhCf,MAAM,2BAA2B,GAAG,0BAAiB,CAAC,MAAM,CAAC;IAC3D,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACnD,QAAQ,EAAE,qBAAqB,CAAC,MAAM,mBACjC,6BAA6B,CAAC,KAAK,EACtC;IACF,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;CAC7C,CAAC,CAAC;AA2BD,kEAA2B;AAzB7B,MAAM,6BAA6B,GAAG,0BAAiB,CAAC,MAAM,CAAC;IAC7D,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACnD,QAAQ,EAAE,qBAAqB;IAC/B,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;CAC7C,CAAC,CAAC;AAsBD,sEAA6B;AApB/B,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,EAAE;KAChD,IAAI,CAAC;IACJ,OAAO,EAAE,IAAI;IACb,EAAE,EAAE,IAAI;IACR,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;CACnB,CAAC;KACD,MAAM,CAAC;IACN,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IACnD,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AAWH,kDAAmB"}
|