@ourofoundation/ouro-js 1.0.1 → 1.0.3
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 +5 -3
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/assets.d.ts +254 -10
- package/dist/schema/assets.js +27 -1
- package/dist/schema/assets.js.map +1 -1
- package/dist/schema/blueprints.d.ts +21 -25
- package/dist/schema/comments.d.ts +20 -24
- package/dist/schema/common.d.ts +19 -17
- package/dist/schema/common.js +7 -4
- package/dist/schema/common.js.map +1 -1
- package/dist/schema/conversations.d.ts +27 -33
- package/dist/schema/datasets.d.ts +401 -161
- package/dist/schema/datasets.js +28 -82
- package/dist/schema/datasets.js.map +1 -1
- package/dist/schema/files.d.ts +879 -29
- package/dist/schema/files.js +44 -9
- package/dist/schema/files.js.map +1 -1
- package/dist/schema/notifications.d.ts +7 -7
- package/dist/schema/organizations.d.ts +0 -3
- package/dist/schema/organizations.js +0 -1
- package/dist/schema/organizations.js.map +1 -1
- package/dist/schema/posts.d.ts +330 -173
- package/dist/schema/posts.js +9 -14
- package/dist/schema/posts.js.map +1 -1
- package/dist/schema/replications.d.ts +103 -50
- package/dist/schema/replications.js +10 -6
- package/dist/schema/replications.js.map +1 -1
- package/dist/schema/teams.d.ts +0 -10
- package/dist/utils/dataset.d.ts +7 -0
- package/dist/utils/dataset.js +19 -0
- package/dist/utils/dataset.js.map +1 -0
- package/dist/utils/navigate.d.ts +11 -0
- package/dist/utils/navigate.js +67 -0
- package/dist/utils/navigate.js.map +1 -0
- package/package.json +1 -1
package/dist/schema/posts.js
CHANGED
|
@@ -5,21 +5,8 @@ const uuidv7_1 = require("uuidv7");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const assets_1 = require("./assets");
|
|
7
7
|
const common_1 = require("./common");
|
|
8
|
-
const PostSchema = assets_1.AssetSchema.extend({
|
|
9
|
-
name: zod_1.z.string().nullable(),
|
|
10
|
-
asset_type: common_1.AssetTypeSchema.refine((x) => ["post", "comment"].includes(x)),
|
|
11
|
-
preview: zod_1.z
|
|
12
|
-
.object({
|
|
13
|
-
type: zod_1.z.string().refine((x) => x === "doc"),
|
|
14
|
-
content: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
15
|
-
})
|
|
16
|
-
.optional()
|
|
17
|
-
.nullable()
|
|
18
|
-
.default({ type: "doc", content: [] }),
|
|
19
|
-
});
|
|
20
|
-
exports.PostSchema = PostSchema;
|
|
21
8
|
const TipTapSchema = zod_1.z.object({
|
|
22
|
-
type: zod_1.z.
|
|
9
|
+
type: zod_1.z.literal("doc"),
|
|
23
10
|
content: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
24
11
|
});
|
|
25
12
|
exports.TipTapSchema = TipTapSchema;
|
|
@@ -28,6 +15,14 @@ const ContentSchema = zod_1.z.object({
|
|
|
28
15
|
text: zod_1.z.string(),
|
|
29
16
|
});
|
|
30
17
|
exports.ContentSchema = ContentSchema;
|
|
18
|
+
const PostSchema = assets_1.AssetSchema.extend({
|
|
19
|
+
name: zod_1.z.string().nullable(),
|
|
20
|
+
asset_type: common_1.AssetTypeSchema.refine((x) => ["post", "comment"].includes(x)),
|
|
21
|
+
// TODO: make this ContentSchema
|
|
22
|
+
preview: TipTapSchema.default({ type: "doc", content: [] }),
|
|
23
|
+
content: ContentSchema,
|
|
24
|
+
});
|
|
25
|
+
exports.PostSchema = PostSchema;
|
|
31
26
|
const CreatePostSchema = PostSchema.partial()
|
|
32
27
|
.omit({
|
|
33
28
|
id: true,
|
package/dist/schema/posts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/schema/posts.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAKkB;AAElB,MAAM,
|
|
1
|
+
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/schema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C,QAAQ,EAAE;IAClE,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;CACjE,CAAC,CAAC;AAmBD,4CAAgB"}
|
|
@@ -40,7 +40,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
40
40
|
org_id: z.ZodString;
|
|
41
41
|
organization: z.ZodOptional<z.ZodObject<{
|
|
42
42
|
id: z.ZodOptional<z.ZodString>;
|
|
43
|
-
owner_id: z.ZodOptional<z.ZodString>;
|
|
44
43
|
name: z.ZodOptional<z.ZodString>;
|
|
45
44
|
avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
46
45
|
mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -60,7 +59,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
60
59
|
name?: string | undefined;
|
|
61
60
|
size?: string | undefined;
|
|
62
61
|
email?: string | null | undefined;
|
|
63
|
-
owner_id?: string | undefined;
|
|
64
62
|
avatar_path?: string | null | undefined;
|
|
65
63
|
mission?: string | null | undefined;
|
|
66
64
|
domain?: string | null | undefined;
|
|
@@ -73,7 +71,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
73
71
|
name?: string | undefined;
|
|
74
72
|
size?: string | undefined;
|
|
75
73
|
email?: string | null | undefined;
|
|
76
|
-
owner_id?: string | undefined;
|
|
77
74
|
avatar_path?: string | null | undefined;
|
|
78
75
|
mission?: string | null | undefined;
|
|
79
76
|
domain?: string | null | undefined;
|
|
@@ -109,7 +106,7 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
109
106
|
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
110
107
|
}>>;
|
|
111
108
|
parent_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
112
|
-
asset_type: z.ZodEnum<["
|
|
109
|
+
asset_type: z.ZodEnum<["dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>;
|
|
113
110
|
name: z.ZodString;
|
|
114
111
|
name_url_slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
115
112
|
slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -124,22 +121,55 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
124
121
|
price_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
125
122
|
metadata: z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
|
|
126
123
|
preview: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
124
|
+
state: z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>;
|
|
127
125
|
created_at: z.ZodString;
|
|
128
126
|
last_updated: z.ZodString;
|
|
129
127
|
}, {
|
|
130
|
-
asset_type: z.ZodEffects<z.ZodEnum<["
|
|
128
|
+
asset_type: z.ZodEffects<z.ZodEnum<["dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>, "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication", "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication">;
|
|
129
|
+
metadata: z.ZodObject<{
|
|
130
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
cron: z.ZodString;
|
|
132
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
133
|
+
cron: z.ZodString;
|
|
134
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
135
|
+
cron: z.ZodString;
|
|
136
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
137
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
138
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
cron: z.ZodString;
|
|
140
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
141
|
+
cron: z.ZodString;
|
|
142
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
143
|
+
cron: z.ZodString;
|
|
144
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
145
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
146
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
cron: z.ZodString;
|
|
148
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
149
|
+
cron: z.ZodString;
|
|
150
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
151
|
+
cron: z.ZodString;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
153
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
131
154
|
}>, "strip", z.ZodTypeAny, {
|
|
132
155
|
id: string;
|
|
133
156
|
name: string;
|
|
134
157
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
158
|
+
metadata: {
|
|
159
|
+
schedule?: z.objectOutputType<{
|
|
160
|
+
cron: z.ZodString;
|
|
161
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
162
|
+
} & {
|
|
163
|
+
[k: string]: unknown;
|
|
164
|
+
};
|
|
135
165
|
user_id: string;
|
|
136
166
|
org_id: string;
|
|
137
|
-
asset_type: "file" | "dataset" | "
|
|
167
|
+
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
138
168
|
created_at: string;
|
|
139
169
|
last_updated: string;
|
|
140
170
|
team_id: string;
|
|
141
171
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
142
|
-
|
|
172
|
+
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
143
173
|
description?: string | null | undefined;
|
|
144
174
|
user?: {
|
|
145
175
|
id?: string | undefined;
|
|
@@ -157,7 +187,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
157
187
|
name?: string | undefined;
|
|
158
188
|
size?: string | undefined;
|
|
159
189
|
email?: string | null | undefined;
|
|
160
|
-
owner_id?: string | undefined;
|
|
161
190
|
avatar_path?: string | null | undefined;
|
|
162
191
|
mission?: string | null | undefined;
|
|
163
192
|
domain?: string | null | undefined;
|
|
@@ -189,14 +218,21 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
189
218
|
id: string;
|
|
190
219
|
name: string;
|
|
191
220
|
visibility: "inherit" | "private" | "public" | "organization" | "monetized";
|
|
221
|
+
metadata: {
|
|
222
|
+
schedule?: z.objectInputType<{
|
|
223
|
+
cron: z.ZodString;
|
|
224
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
225
|
+
} & {
|
|
226
|
+
[k: string]: unknown;
|
|
227
|
+
};
|
|
192
228
|
user_id: string;
|
|
193
229
|
org_id: string;
|
|
194
|
-
asset_type: "file" | "dataset" | "
|
|
230
|
+
asset_type: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication";
|
|
195
231
|
created_at: string;
|
|
196
232
|
last_updated: string;
|
|
197
233
|
team_id: string;
|
|
198
234
|
monetization: "none" | "pay-to-unlock" | "pay-per-use";
|
|
199
|
-
|
|
235
|
+
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
200
236
|
description?: string | null | undefined;
|
|
201
237
|
user?: {
|
|
202
238
|
id?: string | undefined;
|
|
@@ -214,7 +250,6 @@ declare const ReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
214
250
|
name?: string | undefined;
|
|
215
251
|
size?: string | undefined;
|
|
216
252
|
email?: string | null | undefined;
|
|
217
|
-
owner_id?: string | undefined;
|
|
218
253
|
avatar_path?: string | null | undefined;
|
|
219
254
|
mission?: string | null | undefined;
|
|
220
255
|
domain?: string | null | undefined;
|
|
@@ -284,7 +319,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
284
319
|
org_id: z.ZodOptional<z.ZodString>;
|
|
285
320
|
organization: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
286
321
|
id: z.ZodOptional<z.ZodString>;
|
|
287
|
-
owner_id: z.ZodOptional<z.ZodString>;
|
|
288
322
|
name: z.ZodOptional<z.ZodString>;
|
|
289
323
|
avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
290
324
|
mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -304,7 +338,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
304
338
|
name?: string | undefined;
|
|
305
339
|
size?: string | undefined;
|
|
306
340
|
email?: string | null | undefined;
|
|
307
|
-
owner_id?: string | undefined;
|
|
308
341
|
avatar_path?: string | null | undefined;
|
|
309
342
|
mission?: string | null | undefined;
|
|
310
343
|
domain?: string | null | undefined;
|
|
@@ -317,7 +350,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
317
350
|
name?: string | undefined;
|
|
318
351
|
size?: string | undefined;
|
|
319
352
|
email?: string | null | undefined;
|
|
320
|
-
owner_id?: string | undefined;
|
|
321
353
|
avatar_path?: string | null | undefined;
|
|
322
354
|
mission?: string | null | undefined;
|
|
323
355
|
domain?: string | null | undefined;
|
|
@@ -365,39 +397,58 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
365
397
|
cost_unit: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
366
398
|
product_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
367
399
|
price_id: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
368
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
|
|
369
400
|
preview: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>>>;
|
|
401
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["queued", "in-progress", "success", "error"]>>>>;
|
|
370
402
|
created_at: z.ZodOptional<z.ZodString>;
|
|
371
403
|
last_updated: z.ZodOptional<z.ZodString>;
|
|
372
|
-
asset_type: z.ZodOptional<z.ZodEffects<z.ZodEnum<["
|
|
404
|
+
asset_type: z.ZodOptional<z.ZodEffects<z.ZodEnum<["dataset", "file", "service", "route", "post", "comment", "conversation", "blueprint", "replication"]>, "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication", "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication">>;
|
|
405
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
406
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
407
|
+
cron: z.ZodString;
|
|
408
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
409
|
+
cron: z.ZodString;
|
|
410
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
411
|
+
cron: z.ZodString;
|
|
412
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
413
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
414
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
415
|
+
cron: z.ZodString;
|
|
416
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
417
|
+
cron: z.ZodString;
|
|
418
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
419
|
+
cron: z.ZodString;
|
|
420
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
421
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
422
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
423
|
+
cron: z.ZodString;
|
|
424
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
425
|
+
cron: z.ZodString;
|
|
426
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
427
|
+
cron: z.ZodString;
|
|
428
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
429
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
373
430
|
}, {
|
|
374
431
|
id: z.ZodDefault<z.ZodString>;
|
|
375
432
|
team_id: z.ZodDefault<z.ZodString>;
|
|
376
433
|
org_id: z.ZodDefault<z.ZodString>;
|
|
377
434
|
name_url_slug: z.ZodString;
|
|
378
|
-
metadata: z.ZodObject<{
|
|
379
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
380
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
381
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
382
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
383
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
384
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
385
|
-
edges: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
386
|
-
nodes: z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
387
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
388
435
|
}>, "strip", z.ZodTypeAny, {
|
|
389
436
|
id: string;
|
|
390
|
-
metadata: {
|
|
391
|
-
edges: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
392
|
-
nodes: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
393
|
-
} & {
|
|
394
|
-
[k: string]: unknown;
|
|
395
|
-
};
|
|
396
437
|
org_id: string;
|
|
397
438
|
team_id: string;
|
|
398
439
|
name_url_slug: string;
|
|
440
|
+
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
399
441
|
name?: string | undefined;
|
|
400
442
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
443
|
+
metadata?: z.objectOutputType<{
|
|
444
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
445
|
+
cron: z.ZodString;
|
|
446
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
447
|
+
cron: z.ZodString;
|
|
448
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
449
|
+
cron: z.ZodString;
|
|
450
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
451
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
401
452
|
description?: string | null | undefined;
|
|
402
453
|
user?: {
|
|
403
454
|
id?: string | undefined;
|
|
@@ -415,7 +466,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
415
466
|
name?: string | undefined;
|
|
416
467
|
size?: string | undefined;
|
|
417
468
|
email?: string | null | undefined;
|
|
418
|
-
owner_id?: string | undefined;
|
|
419
469
|
avatar_path?: string | null | undefined;
|
|
420
470
|
mission?: string | null | undefined;
|
|
421
471
|
domain?: string | null | undefined;
|
|
@@ -424,6 +474,10 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
424
474
|
}[] | null | undefined;
|
|
425
475
|
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
426
476
|
} | undefined;
|
|
477
|
+
user_id?: string | undefined;
|
|
478
|
+
asset_type?: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
479
|
+
created_at?: string | undefined;
|
|
480
|
+
last_updated?: string | undefined;
|
|
427
481
|
team?: {
|
|
428
482
|
id?: string | undefined;
|
|
429
483
|
name?: string | undefined;
|
|
@@ -433,10 +487,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
433
487
|
created_at?: string | undefined;
|
|
434
488
|
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
435
489
|
} | undefined;
|
|
436
|
-
user_id?: string | undefined;
|
|
437
|
-
asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
438
|
-
created_at?: string | undefined;
|
|
439
|
-
last_updated?: string | undefined;
|
|
440
490
|
parent_id?: string | null | undefined;
|
|
441
491
|
slug?: string | null | undefined;
|
|
442
492
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
@@ -448,16 +498,20 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
448
498
|
price_id?: string | null | undefined;
|
|
449
499
|
preview?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | null | undefined;
|
|
450
500
|
}, {
|
|
451
|
-
metadata: {
|
|
452
|
-
edges: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
453
|
-
nodes: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[];
|
|
454
|
-
} & {
|
|
455
|
-
[k: string]: unknown;
|
|
456
|
-
};
|
|
457
501
|
name_url_slug: string;
|
|
458
502
|
id?: string | undefined;
|
|
503
|
+
state?: "error" | "in-progress" | "success" | "queued" | null | undefined;
|
|
459
504
|
name?: string | undefined;
|
|
460
505
|
visibility?: "inherit" | "private" | "public" | "organization" | "monetized" | undefined;
|
|
506
|
+
metadata?: z.objectInputType<{
|
|
507
|
+
schedule: z.ZodOptional<z.ZodObject<{
|
|
508
|
+
cron: z.ZodString;
|
|
509
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
510
|
+
cron: z.ZodString;
|
|
511
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
512
|
+
cron: z.ZodString;
|
|
513
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
514
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
461
515
|
description?: string | null | undefined;
|
|
462
516
|
user?: {
|
|
463
517
|
id?: string | undefined;
|
|
@@ -475,7 +529,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
475
529
|
name?: string | undefined;
|
|
476
530
|
size?: string | undefined;
|
|
477
531
|
email?: string | null | undefined;
|
|
478
|
-
owner_id?: string | undefined;
|
|
479
532
|
avatar_path?: string | null | undefined;
|
|
480
533
|
mission?: string | null | undefined;
|
|
481
534
|
domain?: string | null | undefined;
|
|
@@ -484,6 +537,12 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
484
537
|
}[] | null | undefined;
|
|
485
538
|
base_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
486
539
|
} | undefined;
|
|
540
|
+
user_id?: string | undefined;
|
|
541
|
+
org_id?: string | undefined;
|
|
542
|
+
asset_type?: "file" | "dataset" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
543
|
+
created_at?: string | undefined;
|
|
544
|
+
last_updated?: string | undefined;
|
|
545
|
+
team_id?: string | undefined;
|
|
487
546
|
team?: {
|
|
488
547
|
id?: string | undefined;
|
|
489
548
|
name?: string | undefined;
|
|
@@ -493,12 +552,6 @@ declare const CreateReplicationSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
493
552
|
created_at?: string | undefined;
|
|
494
553
|
default_role?: "none" | "admin" | "read" | "write" | undefined;
|
|
495
554
|
} | undefined;
|
|
496
|
-
user_id?: string | undefined;
|
|
497
|
-
org_id?: string | undefined;
|
|
498
|
-
asset_type?: "file" | "dataset" | "user" | "organization" | "team" | "service" | "route" | "post" | "comment" | "conversation" | "blueprint" | "replication" | undefined;
|
|
499
|
-
created_at?: string | undefined;
|
|
500
|
-
last_updated?: string | undefined;
|
|
501
|
-
team_id?: string | undefined;
|
|
502
555
|
parent_id?: string | null | undefined;
|
|
503
556
|
slug?: string | null | undefined;
|
|
504
557
|
monetization?: "none" | "pay-to-unlock" | "pay-per-use" | undefined;
|
|
@@ -7,6 +7,16 @@ const assets_1 = require("./assets");
|
|
|
7
7
|
const common_1 = require("./common");
|
|
8
8
|
const ReplicationSchema = assets_1.AssetSchema.extend({
|
|
9
9
|
asset_type: common_1.AssetTypeSchema.refine((val) => val === "replication"),
|
|
10
|
+
metadata: zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
schedule: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
cron: zod_1.z.string(),
|
|
15
|
+
})
|
|
16
|
+
.passthrough()
|
|
17
|
+
.optional(),
|
|
18
|
+
})
|
|
19
|
+
.passthrough(),
|
|
10
20
|
});
|
|
11
21
|
exports.ReplicationSchema = ReplicationSchema;
|
|
12
22
|
const CreateReplicationSchema = ReplicationSchema.partial().extend({
|
|
@@ -17,12 +27,6 @@ const CreateReplicationSchema = ReplicationSchema.partial().extend({
|
|
|
17
27
|
team_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
18
28
|
org_id: zod_1.z.string().uuid().default("00000000-0000-0000-0000-000000000000"),
|
|
19
29
|
name_url_slug: zod_1.z.string(),
|
|
20
|
-
metadata: zod_1.z
|
|
21
|
-
.object({
|
|
22
|
-
edges: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
23
|
-
nodes: zod_1.z.array(zod_1.z.object({}).passthrough()),
|
|
24
|
-
})
|
|
25
|
-
.passthrough(),
|
|
26
30
|
});
|
|
27
31
|
exports.CreateReplicationSchema = CreateReplicationSchema;
|
|
28
32
|
const UpdateReplicationSchema = zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replications.js","sourceRoot":"","sources":["../../src/schema/replications.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"replications.js","sourceRoot":"","sources":["../../src/schema/replications.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,6BAAwB;AAExB,qCAAuC;AACvC,qCAA6D;AAE7D,MAAM,iBAAiB,GAAG,oBAAW,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,aAAa,CAAC;IAClE,QAAQ,EAAE,OAAC;SACR,MAAM,CAAC;QACN,QAAQ,EAAE,OAAC;aACR,MAAM,CAAC;YACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;SACjB,CAAC;aACD,WAAW,EAAE;aACb,QAAQ,EAAE;KACd,CAAC;SACD,WAAW,EAAE;CACjB,CAAC,CAAC;AA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143,7 +143,6 @@ declare const ReadTeamSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
143
143
|
}>, "many">;
|
|
144
144
|
organization: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
145
145
|
id: z.ZodOptional<z.ZodString>;
|
|
146
|
-
owner_id: z.ZodOptional<z.ZodString>;
|
|
147
146
|
name: z.ZodOptional<z.ZodString>;
|
|
148
147
|
avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
149
148
|
mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -163,7 +162,6 @@ declare const ReadTeamSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
163
162
|
name?: string | undefined;
|
|
164
163
|
size?: string | undefined;
|
|
165
164
|
email?: string | null | undefined;
|
|
166
|
-
owner_id?: string | undefined;
|
|
167
165
|
avatar_path?: string | null | undefined;
|
|
168
166
|
mission?: string | null | undefined;
|
|
169
167
|
domain?: string | null | undefined;
|
|
@@ -176,7 +174,6 @@ declare const ReadTeamSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
176
174
|
name?: string | undefined;
|
|
177
175
|
size?: string | undefined;
|
|
178
176
|
email?: string | null | undefined;
|
|
179
|
-
owner_id?: string | undefined;
|
|
180
177
|
avatar_path?: string | null | undefined;
|
|
181
178
|
mission?: string | null | undefined;
|
|
182
179
|
domain?: string | null | undefined;
|
|
@@ -214,7 +211,6 @@ declare const ReadTeamSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
214
211
|
name?: string | undefined;
|
|
215
212
|
size?: string | undefined;
|
|
216
213
|
email?: string | null | undefined;
|
|
217
|
-
owner_id?: string | undefined;
|
|
218
214
|
avatar_path?: string | null | undefined;
|
|
219
215
|
mission?: string | null | undefined;
|
|
220
216
|
domain?: string | null | undefined;
|
|
@@ -256,7 +252,6 @@ declare const ReadTeamSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
256
252
|
name?: string | undefined;
|
|
257
253
|
size?: string | undefined;
|
|
258
254
|
email?: string | null | undefined;
|
|
259
|
-
owner_id?: string | undefined;
|
|
260
255
|
avatar_path?: string | null | undefined;
|
|
261
256
|
mission?: string | null | undefined;
|
|
262
257
|
domain?: string | null | undefined;
|
|
@@ -359,7 +354,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
359
354
|
}>, "many">;
|
|
360
355
|
organization: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
361
356
|
id: z.ZodOptional<z.ZodString>;
|
|
362
|
-
owner_id: z.ZodOptional<z.ZodString>;
|
|
363
357
|
name: z.ZodOptional<z.ZodString>;
|
|
364
358
|
avatar_path: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
365
359
|
mission: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -379,7 +373,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
379
373
|
name?: string | undefined;
|
|
380
374
|
size?: string | undefined;
|
|
381
375
|
email?: string | null | undefined;
|
|
382
|
-
owner_id?: string | undefined;
|
|
383
376
|
avatar_path?: string | null | undefined;
|
|
384
377
|
mission?: string | null | undefined;
|
|
385
378
|
domain?: string | null | undefined;
|
|
@@ -392,7 +385,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
392
385
|
name?: string | undefined;
|
|
393
386
|
size?: string | undefined;
|
|
394
387
|
email?: string | null | undefined;
|
|
395
|
-
owner_id?: string | undefined;
|
|
396
388
|
avatar_path?: string | null | undefined;
|
|
397
389
|
mission?: string | null | undefined;
|
|
398
390
|
domain?: string | null | undefined;
|
|
@@ -435,7 +427,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
435
427
|
name?: string | undefined;
|
|
436
428
|
size?: string | undefined;
|
|
437
429
|
email?: string | null | undefined;
|
|
438
|
-
owner_id?: string | undefined;
|
|
439
430
|
avatar_path?: string | null | undefined;
|
|
440
431
|
mission?: string | null | undefined;
|
|
441
432
|
domain?: string | null | undefined;
|
|
@@ -479,7 +470,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<z
|
|
|
479
470
|
name?: string | undefined;
|
|
480
471
|
size?: string | undefined;
|
|
481
472
|
email?: string | null | undefined;
|
|
482
|
-
owner_id?: string | undefined;
|
|
483
473
|
avatar_path?: string | null | undefined;
|
|
484
474
|
mission?: string | null | undefined;
|
|
485
475
|
domain?: string | null | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterListToString = void 0;
|
|
4
|
+
// Convert a list of filter object into a filter string for URL
|
|
5
|
+
function filterListToString(filters, onlyActive = false) {
|
|
6
|
+
if (!filters || !Array.isArray(filters))
|
|
7
|
+
return "";
|
|
8
|
+
return filters
|
|
9
|
+
.map((filter) => {
|
|
10
|
+
// If onlyActive is true, only include filters that have active property true, or without active property (different creation source)
|
|
11
|
+
if (onlyActive &&
|
|
12
|
+
(filter.hasOwnProperty("active") ? !filter.active : false))
|
|
13
|
+
return "";
|
|
14
|
+
return `${filter.column}.${filter.operator}.${filter.value}`;
|
|
15
|
+
})
|
|
16
|
+
.join(",");
|
|
17
|
+
}
|
|
18
|
+
exports.filterListToString = filterListToString;
|
|
19
|
+
//# sourceMappingURL=dataset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../src/utils/dataset.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAC/D,SAAS,kBAAkB,CACzB,OAKG,EACH,UAAU,GAAG,KAAK;IAElB,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnD,OAAO,OAAO;SACX,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,qIAAqI;QACrI,IACE,UAAU;YACV,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;YAE1D,OAAO,EAAE,CAAC;QACZ,OAAO,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/D,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AAEQ,gDAAkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const createNameUrlSlug: (name: string) => string;
|
|
2
|
+
declare const createUrlSlug: (asset: any) => string;
|
|
3
|
+
declare const getAssetUrl: (asset: any, config?: {
|
|
4
|
+
intent?: "share";
|
|
5
|
+
filters?: {
|
|
6
|
+
column: string;
|
|
7
|
+
value: string;
|
|
8
|
+
operator: string;
|
|
9
|
+
}[];
|
|
10
|
+
}) => string;
|
|
11
|
+
export { getAssetUrl, createUrlSlug, createNameUrlSlug };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNameUrlSlug = exports.createUrlSlug = exports.getAssetUrl = void 0;
|
|
4
|
+
const dataset_1 = require("./dataset");
|
|
5
|
+
const createNameUrlSlug = (name) => {
|
|
6
|
+
return (name
|
|
7
|
+
// Convert to lowercase
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
// Normalize unicode characters
|
|
10
|
+
.normalize("NFD")
|
|
11
|
+
// Remove diacritical marks
|
|
12
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
13
|
+
// Replace spaces, forward slashes, and underscores with hyphens
|
|
14
|
+
.replace(/[\s\/\_]+/g, "-")
|
|
15
|
+
// Remove special characters
|
|
16
|
+
.replace(/[^\w\-]+/g, "")
|
|
17
|
+
// Remove multiple consecutive hyphens
|
|
18
|
+
.replace(/\-\-+/g, "-")
|
|
19
|
+
// Trim hyphens from start and end
|
|
20
|
+
.replace(/^-+/, "")
|
|
21
|
+
.replace(/-+$/, ""));
|
|
22
|
+
};
|
|
23
|
+
exports.createNameUrlSlug = createNameUrlSlug;
|
|
24
|
+
const createUrlSlug = (asset) => {
|
|
25
|
+
if (asset.asset_type === "conversation") {
|
|
26
|
+
return `/conversations/${asset.id}`;
|
|
27
|
+
}
|
|
28
|
+
const entityName = asset.org_id !== "00000000-0000-0000-0000-000000000000"
|
|
29
|
+
? asset.organization.name
|
|
30
|
+
: asset.user.username;
|
|
31
|
+
const name = asset.name ? createNameUrlSlug(asset.name) : asset.id;
|
|
32
|
+
const assetType = asset.asset_type;
|
|
33
|
+
return `/${assetType}s/${entityName}/${name}`;
|
|
34
|
+
};
|
|
35
|
+
exports.createUrlSlug = createUrlSlug;
|
|
36
|
+
const getParentAssetUrl = (asset, config) => {
|
|
37
|
+
if (!(asset === null || asset === void 0 ? void 0 : asset.parent))
|
|
38
|
+
return "#";
|
|
39
|
+
const postfix = asset.asset_type === "comment" ? `#comment-${asset.id}` : "";
|
|
40
|
+
return `${getAssetUrl(asset.parent, config)}${postfix}`;
|
|
41
|
+
};
|
|
42
|
+
const getAssetUrl = (asset, config) => {
|
|
43
|
+
const assetType = (asset === null || asset === void 0 ? void 0 : asset.asset_type) || (asset === null || asset === void 0 ? void 0 : asset.assetType);
|
|
44
|
+
const slug = (asset === null || asset === void 0 ? void 0 : asset.slug) || createUrlSlug(asset);
|
|
45
|
+
const pathPostfix = (config === null || config === void 0 ? void 0 : config.intent) ? `?intent=${config.intent}` : "";
|
|
46
|
+
// Gradual conversion to new URL
|
|
47
|
+
let url = [
|
|
48
|
+
"file",
|
|
49
|
+
"dataset",
|
|
50
|
+
"service",
|
|
51
|
+
"route",
|
|
52
|
+
"post",
|
|
53
|
+
"blueprint",
|
|
54
|
+
"replication",
|
|
55
|
+
"conversation",
|
|
56
|
+
].includes(assetType)
|
|
57
|
+
? `${slug}${pathPostfix}`
|
|
58
|
+
: ["comment"].includes(assetType)
|
|
59
|
+
? getParentAssetUrl(asset, config)
|
|
60
|
+
: "#";
|
|
61
|
+
if (config === null || config === void 0 ? void 0 : config.filters) {
|
|
62
|
+
url += `?filters=${(0, dataset_1.filterListToString)(config.filters)}`;
|
|
63
|
+
}
|
|
64
|
+
return url;
|
|
65
|
+
};
|
|
66
|
+
exports.getAssetUrl = getAssetUrl;
|
|
67
|
+
//# sourceMappingURL=navigate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigate.js","sourceRoot":"","sources":["../../src/utils/navigate.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IACzC,OAAO,CACL,IAAI;QACF,uBAAuB;SACtB,WAAW,EAAE;QACd,+BAA+B;SAC9B,SAAS,CAAC,KAAK,CAAC;QACjB,2BAA2B;SAC1B,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;QAChC,gEAAgE;SAC/D,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC;QAC3B,4BAA4B;SAC3B,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QACzB,sCAAsC;SACrC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;QACvB,kCAAkC;SACjC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACtB,CAAC;AACJ,CAAC,CAAC;AAsDmC,8CAAiB;AApDtD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE;IACnC,IAAI,KAAK,CAAC,UAAU,KAAK,cAAc,EAAE;QACvC,OAAO,kBAAkB,KAAK,CAAC,EAAE,EAAE,CAAC;KACrC;IACD,MAAM,UAAU,GACd,KAAK,CAAC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