@ourofoundation/ouro-js 3.3.0 → 3.5.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.
- package/dist/chunk-7F26V24D.js +2 -0
- package/dist/chunk-7F26V24D.js.map +1 -0
- package/dist/chunk-CONKY65O.cjs +2 -0
- package/dist/chunk-CONKY65O.cjs.map +1 -0
- package/dist/chunk-JKTQY4RU.js +2 -0
- package/dist/chunk-JKTQY4RU.js.map +1 -0
- package/dist/chunk-JW7FACNZ.cjs +2 -0
- package/dist/chunk-JW7FACNZ.cjs.map +1 -0
- package/dist/chunk-XWXLCG4E.cjs +2 -0
- package/dist/chunk-XWXLCG4E.cjs.map +1 -0
- package/dist/chunk-Z3ALIFYO.js +2 -0
- package/dist/chunk-Z3ALIFYO.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/schema/assets.d.cts +84 -84
- package/dist/schema/assets.d.ts +84 -84
- package/dist/schema/comments.d.cts +136 -136
- package/dist/schema/comments.d.ts +136 -136
- package/dist/schema/common.d.cts +16 -16
- package/dist/schema/common.d.ts +16 -16
- package/dist/schema/conversations.d.cts +69 -69
- package/dist/schema/conversations.d.ts +69 -69
- package/dist/schema/datasets.d.cts +106 -106
- package/dist/schema/datasets.d.ts +106 -106
- package/dist/schema/files.d.cts +100 -100
- package/dist/schema/files.d.ts +100 -100
- package/dist/schema/notifications.d.cts +2 -2
- package/dist/schema/notifications.d.ts +2 -2
- package/dist/schema/organizations.d.cts +1 -1
- package/dist/schema/organizations.d.ts +1 -1
- package/dist/schema/posts.d.cts +127 -127
- package/dist/schema/posts.d.ts +127 -127
- package/dist/schema/quests.cjs +2 -0
- package/dist/schema/quests.cjs.map +1 -0
- package/dist/schema/quests.d.cts +1517 -0
- package/dist/schema/quests.d.ts +1517 -0
- package/dist/schema/quests.js +2 -0
- package/dist/schema/quests.js.map +1 -0
- package/dist/schema/services.cjs +1 -1
- package/dist/schema/services.d.cts +275 -124
- package/dist/schema/services.d.ts +275 -124
- package/dist/schema/services.js +1 -1
- package/dist/schema/tags.d.cts +7 -7
- package/dist/schema/tags.d.ts +7 -7
- package/dist/schema/teams.d.cts +18 -18
- package/dist/schema/teams.d.ts +18 -18
- package/dist/utils/quest-submission.cjs +2 -0
- package/dist/utils/quest-submission.cjs.map +1 -0
- package/dist/utils/quest-submission.d.cts +134 -0
- package/dist/utils/quest-submission.d.ts +134 -0
- package/dist/utils/quest-submission.js +2 -0
- package/dist/utils/quest-submission.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-42EQ7ULD.cjs +0 -2
- package/dist/chunk-42EQ7ULD.cjs.map +0 -1
- package/dist/chunk-FDKZIS34.js +0 -2
- package/dist/chunk-FDKZIS34.js.map +0 -1
package/dist/schema/services.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{k as ActionSchema,b as CreateServiceSchema,d as ExecutionModeSchema,e as RouteInputAssetDeclarationSchema,g as RouteInputAssetsSchema,i as RouteMetricsSchema,f as RouteOutputAssetDeclarationSchema,h as RouteOutputAssetsSchema,j as RouteSchema,a as ServiceSchema,c as UpdateServiceSchema}from'../chunk-7F26V24D.js';import'../chunk-G2MXCB7Q.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=services.js.map
|
|
2
2
|
//# sourceMappingURL=services.js.map
|
package/dist/schema/tags.d.cts
CHANGED
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
declare const TagTypeSchema: z.ZodEnum<{
|
|
4
4
|
domain: "domain";
|
|
5
|
+
task: "task";
|
|
5
6
|
other: "other";
|
|
6
7
|
modality: "modality";
|
|
7
|
-
task: "task";
|
|
8
8
|
intent: "intent";
|
|
9
9
|
property: "property";
|
|
10
10
|
scale: "scale";
|
|
@@ -22,9 +22,9 @@ declare const TagSchema: z.ZodObject<{
|
|
|
22
22
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
23
23
|
type: z.ZodEnum<{
|
|
24
24
|
domain: "domain";
|
|
25
|
+
task: "task";
|
|
25
26
|
other: "other";
|
|
26
27
|
modality: "modality";
|
|
27
|
-
task: "task";
|
|
28
28
|
intent: "intent";
|
|
29
29
|
property: "property";
|
|
30
30
|
scale: "scale";
|
|
@@ -43,9 +43,9 @@ declare const TagWithParentSchema: z.ZodObject<{
|
|
|
43
43
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
44
44
|
type: z.ZodEnum<{
|
|
45
45
|
domain: "domain";
|
|
46
|
+
task: "task";
|
|
46
47
|
other: "other";
|
|
47
48
|
modality: "modality";
|
|
48
|
-
task: "task";
|
|
49
49
|
intent: "intent";
|
|
50
50
|
property: "property";
|
|
51
51
|
scale: "scale";
|
|
@@ -63,9 +63,9 @@ declare const TagWithParentSchema: z.ZodObject<{
|
|
|
63
63
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
64
64
|
type: z.ZodEnum<{
|
|
65
65
|
domain: "domain";
|
|
66
|
+
task: "task";
|
|
66
67
|
other: "other";
|
|
67
68
|
modality: "modality";
|
|
68
|
-
task: "task";
|
|
69
69
|
intent: "intent";
|
|
70
70
|
property: "property";
|
|
71
71
|
scale: "scale";
|
|
@@ -108,9 +108,9 @@ declare const AssetTagWithTagSchema: z.ZodObject<{
|
|
|
108
108
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
109
109
|
type: z.ZodEnum<{
|
|
110
110
|
domain: "domain";
|
|
111
|
+
task: "task";
|
|
111
112
|
other: "other";
|
|
112
113
|
modality: "modality";
|
|
113
|
-
task: "task";
|
|
114
114
|
intent: "intent";
|
|
115
115
|
property: "property";
|
|
116
116
|
scale: "scale";
|
|
@@ -133,9 +133,9 @@ declare const CreateAssetTagSchema: z.ZodObject<{
|
|
|
133
133
|
declare const TagsByTypeSchema: z.ZodObject<{
|
|
134
134
|
type: z.ZodEnum<{
|
|
135
135
|
domain: "domain";
|
|
136
|
+
task: "task";
|
|
136
137
|
other: "other";
|
|
137
138
|
modality: "modality";
|
|
138
|
-
task: "task";
|
|
139
139
|
intent: "intent";
|
|
140
140
|
property: "property";
|
|
141
141
|
scale: "scale";
|
|
@@ -149,9 +149,9 @@ declare const TagsByTypeSchema: z.ZodObject<{
|
|
|
149
149
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
150
150
|
type: z.ZodEnum<{
|
|
151
151
|
domain: "domain";
|
|
152
|
+
task: "task";
|
|
152
153
|
other: "other";
|
|
153
154
|
modality: "modality";
|
|
154
|
-
task: "task";
|
|
155
155
|
intent: "intent";
|
|
156
156
|
property: "property";
|
|
157
157
|
scale: "scale";
|
package/dist/schema/tags.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
declare const TagTypeSchema: z.ZodEnum<{
|
|
4
4
|
domain: "domain";
|
|
5
|
+
task: "task";
|
|
5
6
|
other: "other";
|
|
6
7
|
modality: "modality";
|
|
7
|
-
task: "task";
|
|
8
8
|
intent: "intent";
|
|
9
9
|
property: "property";
|
|
10
10
|
scale: "scale";
|
|
@@ -22,9 +22,9 @@ declare const TagSchema: z.ZodObject<{
|
|
|
22
22
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
23
23
|
type: z.ZodEnum<{
|
|
24
24
|
domain: "domain";
|
|
25
|
+
task: "task";
|
|
25
26
|
other: "other";
|
|
26
27
|
modality: "modality";
|
|
27
|
-
task: "task";
|
|
28
28
|
intent: "intent";
|
|
29
29
|
property: "property";
|
|
30
30
|
scale: "scale";
|
|
@@ -43,9 +43,9 @@ declare const TagWithParentSchema: z.ZodObject<{
|
|
|
43
43
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
44
44
|
type: z.ZodEnum<{
|
|
45
45
|
domain: "domain";
|
|
46
|
+
task: "task";
|
|
46
47
|
other: "other";
|
|
47
48
|
modality: "modality";
|
|
48
|
-
task: "task";
|
|
49
49
|
intent: "intent";
|
|
50
50
|
property: "property";
|
|
51
51
|
scale: "scale";
|
|
@@ -63,9 +63,9 @@ declare const TagWithParentSchema: z.ZodObject<{
|
|
|
63
63
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
64
64
|
type: z.ZodEnum<{
|
|
65
65
|
domain: "domain";
|
|
66
|
+
task: "task";
|
|
66
67
|
other: "other";
|
|
67
68
|
modality: "modality";
|
|
68
|
-
task: "task";
|
|
69
69
|
intent: "intent";
|
|
70
70
|
property: "property";
|
|
71
71
|
scale: "scale";
|
|
@@ -108,9 +108,9 @@ declare const AssetTagWithTagSchema: z.ZodObject<{
|
|
|
108
108
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
109
109
|
type: z.ZodEnum<{
|
|
110
110
|
domain: "domain";
|
|
111
|
+
task: "task";
|
|
111
112
|
other: "other";
|
|
112
113
|
modality: "modality";
|
|
113
|
-
task: "task";
|
|
114
114
|
intent: "intent";
|
|
115
115
|
property: "property";
|
|
116
116
|
scale: "scale";
|
|
@@ -133,9 +133,9 @@ declare const CreateAssetTagSchema: z.ZodObject<{
|
|
|
133
133
|
declare const TagsByTypeSchema: z.ZodObject<{
|
|
134
134
|
type: z.ZodEnum<{
|
|
135
135
|
domain: "domain";
|
|
136
|
+
task: "task";
|
|
136
137
|
other: "other";
|
|
137
138
|
modality: "modality";
|
|
138
|
-
task: "task";
|
|
139
139
|
intent: "intent";
|
|
140
140
|
property: "property";
|
|
141
141
|
scale: "scale";
|
|
@@ -149,9 +149,9 @@ declare const TagsByTypeSchema: z.ZodObject<{
|
|
|
149
149
|
parent_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
150
150
|
type: z.ZodEnum<{
|
|
151
151
|
domain: "domain";
|
|
152
|
+
task: "task";
|
|
152
153
|
other: "other";
|
|
153
154
|
modality: "modality";
|
|
154
|
-
task: "task";
|
|
155
155
|
intent: "intent";
|
|
156
156
|
property: "property";
|
|
157
157
|
scale: "scale";
|
package/dist/schema/teams.d.cts
CHANGED
|
@@ -47,9 +47,9 @@ declare const TeamSchema: z.ZodObject<{
|
|
|
47
47
|
none: "none";
|
|
48
48
|
}>;
|
|
49
49
|
visibility: z.ZodEnum<{
|
|
50
|
+
organization: "organization";
|
|
50
51
|
public: "public";
|
|
51
52
|
private: "private";
|
|
52
|
-
organization: "organization";
|
|
53
53
|
monetized: "monetized";
|
|
54
54
|
inherit: "inherit";
|
|
55
55
|
}>;
|
|
@@ -110,16 +110,9 @@ declare const TeamSchema: z.ZodObject<{
|
|
|
110
110
|
created_at: z.ZodString;
|
|
111
111
|
}, z.core.$strip>;
|
|
112
112
|
declare const CreateTeamSchema: z.ZodObject<{
|
|
113
|
-
visibility: z.ZodDefault<z.ZodEnum<{
|
|
114
|
-
public: "public";
|
|
115
|
-
private: "private";
|
|
116
|
-
organization: "organization";
|
|
117
|
-
monetized: "monetized";
|
|
118
|
-
inherit: "inherit";
|
|
119
|
-
}>>;
|
|
120
113
|
id: z.ZodDefault<z.ZodString>;
|
|
121
|
-
name: z.ZodString;
|
|
122
114
|
org_id: z.ZodUUID;
|
|
115
|
+
name: z.ZodString;
|
|
123
116
|
actor_type_policy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
124
117
|
any: "any";
|
|
125
118
|
verified_only: "verified_only";
|
|
@@ -130,6 +123,13 @@ declare const CreateTeamSchema: z.ZodObject<{
|
|
|
130
123
|
web_only: "web_only";
|
|
131
124
|
api_only: "api_only";
|
|
132
125
|
}>>>;
|
|
126
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
127
|
+
organization: "organization";
|
|
128
|
+
public: "public";
|
|
129
|
+
private: "private";
|
|
130
|
+
monetized: "monetized";
|
|
131
|
+
inherit: "inherit";
|
|
132
|
+
}>>;
|
|
133
133
|
default_role: z.ZodDefault<z.ZodEnum<{
|
|
134
134
|
admin: "admin";
|
|
135
135
|
read: "read";
|
|
@@ -156,9 +156,9 @@ declare const ReadTeamSchema: z.ZodObject<{
|
|
|
156
156
|
none: "none";
|
|
157
157
|
}>;
|
|
158
158
|
visibility: z.ZodEnum<{
|
|
159
|
+
organization: "organization";
|
|
159
160
|
public: "public";
|
|
160
161
|
private: "private";
|
|
161
|
-
organization: "organization";
|
|
162
162
|
monetized: "monetized";
|
|
163
163
|
inherit: "inherit";
|
|
164
164
|
}>;
|
|
@@ -290,9 +290,9 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<{
|
|
|
290
290
|
none: "none";
|
|
291
291
|
}>;
|
|
292
292
|
visibility: z.ZodEnum<{
|
|
293
|
+
organization: "organization";
|
|
293
294
|
public: "public";
|
|
294
295
|
private: "private";
|
|
295
|
-
organization: "organization";
|
|
296
296
|
monetized: "monetized";
|
|
297
297
|
inherit: "inherit";
|
|
298
298
|
}>;
|
|
@@ -412,13 +412,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<{
|
|
|
412
412
|
value: z.ZodString;
|
|
413
413
|
}, z.core.$strip>>;
|
|
414
414
|
declare const UpdateTeamSchema: z.ZodObject<{
|
|
415
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
416
|
-
public: "public";
|
|
417
|
-
private: "private";
|
|
418
|
-
organization: "organization";
|
|
419
|
-
monetized: "monetized";
|
|
420
|
-
inherit: "inherit";
|
|
421
|
-
}>>;
|
|
422
415
|
name: z.ZodOptional<z.ZodString>;
|
|
423
416
|
actor_type_policy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
424
417
|
any: "any";
|
|
@@ -430,6 +423,13 @@ declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
430
423
|
web_only: "web_only";
|
|
431
424
|
api_only: "api_only";
|
|
432
425
|
}>>>>;
|
|
426
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
427
|
+
organization: "organization";
|
|
428
|
+
public: "public";
|
|
429
|
+
private: "private";
|
|
430
|
+
monetized: "monetized";
|
|
431
|
+
inherit: "inherit";
|
|
432
|
+
}>>;
|
|
433
433
|
default_role: z.ZodOptional<z.ZodEnum<{
|
|
434
434
|
admin: "admin";
|
|
435
435
|
read: "read";
|
package/dist/schema/teams.d.ts
CHANGED
|
@@ -47,9 +47,9 @@ declare const TeamSchema: z.ZodObject<{
|
|
|
47
47
|
none: "none";
|
|
48
48
|
}>;
|
|
49
49
|
visibility: z.ZodEnum<{
|
|
50
|
+
organization: "organization";
|
|
50
51
|
public: "public";
|
|
51
52
|
private: "private";
|
|
52
|
-
organization: "organization";
|
|
53
53
|
monetized: "monetized";
|
|
54
54
|
inherit: "inherit";
|
|
55
55
|
}>;
|
|
@@ -110,16 +110,9 @@ declare const TeamSchema: z.ZodObject<{
|
|
|
110
110
|
created_at: z.ZodString;
|
|
111
111
|
}, z.core.$strip>;
|
|
112
112
|
declare const CreateTeamSchema: z.ZodObject<{
|
|
113
|
-
visibility: z.ZodDefault<z.ZodEnum<{
|
|
114
|
-
public: "public";
|
|
115
|
-
private: "private";
|
|
116
|
-
organization: "organization";
|
|
117
|
-
monetized: "monetized";
|
|
118
|
-
inherit: "inherit";
|
|
119
|
-
}>>;
|
|
120
113
|
id: z.ZodDefault<z.ZodString>;
|
|
121
|
-
name: z.ZodString;
|
|
122
114
|
org_id: z.ZodUUID;
|
|
115
|
+
name: z.ZodString;
|
|
123
116
|
actor_type_policy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
124
117
|
any: "any";
|
|
125
118
|
verified_only: "verified_only";
|
|
@@ -130,6 +123,13 @@ declare const CreateTeamSchema: z.ZodObject<{
|
|
|
130
123
|
web_only: "web_only";
|
|
131
124
|
api_only: "api_only";
|
|
132
125
|
}>>>;
|
|
126
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
127
|
+
organization: "organization";
|
|
128
|
+
public: "public";
|
|
129
|
+
private: "private";
|
|
130
|
+
monetized: "monetized";
|
|
131
|
+
inherit: "inherit";
|
|
132
|
+
}>>;
|
|
133
133
|
default_role: z.ZodDefault<z.ZodEnum<{
|
|
134
134
|
admin: "admin";
|
|
135
135
|
read: "read";
|
|
@@ -156,9 +156,9 @@ declare const ReadTeamSchema: z.ZodObject<{
|
|
|
156
156
|
none: "none";
|
|
157
157
|
}>;
|
|
158
158
|
visibility: z.ZodEnum<{
|
|
159
|
+
organization: "organization";
|
|
159
160
|
public: "public";
|
|
160
161
|
private: "private";
|
|
161
|
-
organization: "organization";
|
|
162
162
|
monetized: "monetized";
|
|
163
163
|
inherit: "inherit";
|
|
164
164
|
}>;
|
|
@@ -290,9 +290,9 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<{
|
|
|
290
290
|
none: "none";
|
|
291
291
|
}>;
|
|
292
292
|
visibility: z.ZodEnum<{
|
|
293
|
+
organization: "organization";
|
|
293
294
|
public: "public";
|
|
294
295
|
private: "private";
|
|
295
|
-
organization: "organization";
|
|
296
296
|
monetized: "monetized";
|
|
297
297
|
inherit: "inherit";
|
|
298
298
|
}>;
|
|
@@ -412,13 +412,6 @@ declare const ReadTeamsSchema: z.ZodArray<z.ZodObject<{
|
|
|
412
412
|
value: z.ZodString;
|
|
413
413
|
}, z.core.$strip>>;
|
|
414
414
|
declare const UpdateTeamSchema: z.ZodObject<{
|
|
415
|
-
visibility: z.ZodOptional<z.ZodEnum<{
|
|
416
|
-
public: "public";
|
|
417
|
-
private: "private";
|
|
418
|
-
organization: "organization";
|
|
419
|
-
monetized: "monetized";
|
|
420
|
-
inherit: "inherit";
|
|
421
|
-
}>>;
|
|
422
415
|
name: z.ZodOptional<z.ZodString>;
|
|
423
416
|
actor_type_policy: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
424
417
|
any: "any";
|
|
@@ -430,6 +423,13 @@ declare const UpdateTeamSchema: z.ZodObject<{
|
|
|
430
423
|
web_only: "web_only";
|
|
431
424
|
api_only: "api_only";
|
|
432
425
|
}>>>>;
|
|
426
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
427
|
+
organization: "organization";
|
|
428
|
+
public: "public";
|
|
429
|
+
private: "private";
|
|
430
|
+
monetized: "monetized";
|
|
431
|
+
inherit: "inherit";
|
|
432
|
+
}>>;
|
|
433
433
|
default_role: z.ZodOptional<z.ZodEnum<{
|
|
434
434
|
admin: "admin";
|
|
435
435
|
read: "read";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkCONKY65O_cjs=require('../chunk-CONKY65O.cjs');require('../chunk-JW7FACNZ.cjs'),require('../chunk-IP4OVRZB.cjs'),require('../chunk-UY43EQTO.cjs'),require('../chunk-VOY623ZD.cjs'),require('../chunk-GY6SLMMJ.cjs'),require('../chunk-43KB23BA.cjs'),require('../chunk-7HF5VHUN.cjs');Object.defineProperty(exports,"KeyedAssetInputSchema",{enumerable:true,get:function(){return chunkCONKY65O_cjs.c}});Object.defineProperty(exports,"KeyedAssetInputValueSchema",{enumerable:true,get:function(){return chunkCONKY65O_cjs.b}});Object.defineProperty(exports,"KeyedAssetRefsSchema",{enumerable:true,get:function(){return chunkCONKY65O_cjs.a}});Object.defineProperty(exports,"QuestSubmissionAssetDeclarationSchema",{enumerable:true,get:function(){return chunkCONKY65O_cjs.d}});Object.defineProperty(exports,"assetMatchesDeclaration",{enumerable:true,get:function(){return chunkCONKY65O_cjs.k}});Object.defineProperty(exports,"declarationToPickerFilters",{enumerable:true,get:function(){return chunkCONKY65O_cjs.j}});Object.defineProperty(exports,"declarationToSubmissionDeclaration",{enumerable:true,get:function(){return chunkCONKY65O_cjs.f}});Object.defineProperty(exports,"getPrimaryAssetRef",{enumerable:true,get:function(){return chunkCONKY65O_cjs.l}});Object.defineProperty(exports,"getPrimaryDeclarationKey",{enumerable:true,get:function(){return chunkCONKY65O_cjs.h}});Object.defineProperty(exports,"getRouteInputDeclarationsFromRoute",{enumerable:true,get:function(){return chunkCONKY65O_cjs.e}});Object.defineProperty(exports,"getSubmissionAssetShape",{enumerable:true,get:function(){return chunkCONKY65O_cjs.i}});Object.defineProperty(exports,"materializeContributorSubmissionAssets",{enumerable:true,get:function(){return chunkCONKY65O_cjs.g}});Object.defineProperty(exports,"toRouteInputAssets",{enumerable:true,get:function(){return chunkCONKY65O_cjs.m}});//# sourceMappingURL=quest-submission.cjs.map
|
|
2
|
+
//# sourceMappingURL=quest-submission.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"quest-submission.cjs"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Stored on entries and eval_static_inputs after server normalization. */
|
|
4
|
+
declare const KeyedAssetRefsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5
|
+
asset_id: z.ZodUUID;
|
|
6
|
+
asset_type: z.ZodEnum<{
|
|
7
|
+
user: "user";
|
|
8
|
+
organization: "organization";
|
|
9
|
+
team: "team";
|
|
10
|
+
dataset: "dataset";
|
|
11
|
+
file: "file";
|
|
12
|
+
service: "service";
|
|
13
|
+
route: "route";
|
|
14
|
+
post: "post";
|
|
15
|
+
quest: "quest";
|
|
16
|
+
comment: "comment";
|
|
17
|
+
conversation: "conversation";
|
|
18
|
+
}>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
/** Accepted on POST /quests/:id/entries/create — server fills asset_type. */
|
|
21
|
+
declare const KeyedAssetInputValueSchema: z.ZodUnion<readonly [z.ZodUUID, z.ZodObject<{
|
|
22
|
+
asset_id: z.ZodUUID;
|
|
23
|
+
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
user: "user";
|
|
25
|
+
organization: "organization";
|
|
26
|
+
team: "team";
|
|
27
|
+
dataset: "dataset";
|
|
28
|
+
file: "file";
|
|
29
|
+
service: "service";
|
|
30
|
+
route: "route";
|
|
31
|
+
post: "post";
|
|
32
|
+
quest: "quest";
|
|
33
|
+
comment: "comment";
|
|
34
|
+
conversation: "conversation";
|
|
35
|
+
}>>;
|
|
36
|
+
}, z.core.$strip>]>;
|
|
37
|
+
declare const KeyedAssetInputSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUUID, z.ZodObject<{
|
|
38
|
+
asset_id: z.ZodUUID;
|
|
39
|
+
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
user: "user";
|
|
41
|
+
organization: "organization";
|
|
42
|
+
team: "team";
|
|
43
|
+
dataset: "dataset";
|
|
44
|
+
file: "file";
|
|
45
|
+
service: "service";
|
|
46
|
+
route: "route";
|
|
47
|
+
post: "post";
|
|
48
|
+
quest: "quest";
|
|
49
|
+
comment: "comment";
|
|
50
|
+
conversation: "conversation";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strip>]>>;
|
|
53
|
+
declare const QuestSubmissionAssetDeclarationSchema: z.ZodObject<{
|
|
54
|
+
asset_type: z.ZodEnum<{
|
|
55
|
+
dataset: "dataset";
|
|
56
|
+
file: "file";
|
|
57
|
+
post: "post";
|
|
58
|
+
}>;
|
|
59
|
+
primary: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
input_filter: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
61
|
+
audio: "audio";
|
|
62
|
+
video: "video";
|
|
63
|
+
image: "image";
|
|
64
|
+
pdf: "pdf";
|
|
65
|
+
"3d model": "3d model";
|
|
66
|
+
"atomic structure": "atomic structure";
|
|
67
|
+
}>>>;
|
|
68
|
+
file_extensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
69
|
+
contains_file_extensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
70
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
71
|
+
}, z.core.$catchall<z.ZodAny>>;
|
|
72
|
+
type KeyedAssetRefs = z.infer<typeof KeyedAssetRefsSchema>;
|
|
73
|
+
type KeyedAssetInput = z.infer<typeof KeyedAssetInputSchema>;
|
|
74
|
+
type QuestSubmissionAssetDeclaration = z.infer<typeof QuestSubmissionAssetDeclarationSchema>;
|
|
75
|
+
type AssetDeclarationPickerFilters = {
|
|
76
|
+
assetType?: string;
|
|
77
|
+
fileType?: string;
|
|
78
|
+
extensions?: string[];
|
|
79
|
+
hasConstraints: boolean;
|
|
80
|
+
};
|
|
81
|
+
type QuestSubmissionItemInput = {
|
|
82
|
+
eval_route_id?: string | null;
|
|
83
|
+
submission_assets?: Record<string, QuestSubmissionAssetDeclaration> | null;
|
|
84
|
+
eval_static_inputs?: KeyedAssetRefs | null;
|
|
85
|
+
expected_asset_type?: string | null;
|
|
86
|
+
};
|
|
87
|
+
type RouteInputDeclarationLike = {
|
|
88
|
+
asset_type?: string | null;
|
|
89
|
+
primary?: boolean;
|
|
90
|
+
input_filter?: string | null;
|
|
91
|
+
filter?: string | null;
|
|
92
|
+
file_extensions?: string[] | null;
|
|
93
|
+
input_file_extensions?: string[] | null;
|
|
94
|
+
};
|
|
95
|
+
type RouteForSubmissionShape = {
|
|
96
|
+
route?: {
|
|
97
|
+
input_assets?: Record<string, RouteInputDeclarationLike> | null;
|
|
98
|
+
input_type?: string | null;
|
|
99
|
+
input_filter?: string | null;
|
|
100
|
+
input_file_extensions?: string[] | null;
|
|
101
|
+
} | null;
|
|
102
|
+
} | null;
|
|
103
|
+
/** Route keyed inputs as a flat map (includes legacy input_type fallback). */
|
|
104
|
+
declare function getRouteInputDeclarationsFromRoute(route: RouteForSubmissionShape): Record<string, RouteInputDeclarationLike>;
|
|
105
|
+
declare function declarationToSubmissionDeclaration(declaration: RouteInputDeclarationLike): QuestSubmissionAssetDeclaration;
|
|
106
|
+
/** Materialize contributor declarations from route inputs minus pinned keys. */
|
|
107
|
+
declare function materializeContributorSubmissionAssets(routeInputs: Record<string, RouteInputDeclarationLike>, pinnedKeys: string[]): Record<string, QuestSubmissionAssetDeclaration>;
|
|
108
|
+
declare function getPrimaryDeclarationKey(declarations: Record<string, QuestSubmissionAssetDeclaration>): string | null;
|
|
109
|
+
declare function getSubmissionAssetShape(item: QuestSubmissionItemInput, route?: RouteForSubmissionShape | null): {
|
|
110
|
+
contributorKeys: string[];
|
|
111
|
+
declarations: Record<string, QuestSubmissionAssetDeclaration>;
|
|
112
|
+
pinned: KeyedAssetRefs;
|
|
113
|
+
};
|
|
114
|
+
declare function declarationToPickerFilters(declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined): AssetDeclarationPickerFilters | null;
|
|
115
|
+
declare function assetMatchesDeclaration(asset: {
|
|
116
|
+
assetType?: string | null;
|
|
117
|
+
asset_type?: string | null;
|
|
118
|
+
asset?: {
|
|
119
|
+
metadata?: Record<string, unknown>;
|
|
120
|
+
} | null;
|
|
121
|
+
} | null | undefined, declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined): boolean;
|
|
122
|
+
declare function getPrimaryAssetRef(refs: KeyedAssetRefs | null | undefined, declarations?: Record<string, QuestSubmissionAssetDeclaration> | null): {
|
|
123
|
+
key: string;
|
|
124
|
+
asset_id: string;
|
|
125
|
+
asset_type: string;
|
|
126
|
+
} | null;
|
|
127
|
+
declare function toRouteInputAssets(refs: KeyedAssetRefs | null | undefined): Record<string, {
|
|
128
|
+
assetId: string;
|
|
129
|
+
assetType: string;
|
|
130
|
+
}>;
|
|
131
|
+
/** @deprecated Use declarationToPickerFilters */
|
|
132
|
+
type EvalSubmissionFilters = AssetDeclarationPickerFilters;
|
|
133
|
+
|
|
134
|
+
export { type AssetDeclarationPickerFilters, type EvalSubmissionFilters, type KeyedAssetInput, KeyedAssetInputSchema, KeyedAssetInputValueSchema, type KeyedAssetRefs, KeyedAssetRefsSchema, type QuestSubmissionAssetDeclaration, QuestSubmissionAssetDeclarationSchema, type QuestSubmissionItemInput, type RouteForSubmissionShape, type RouteInputDeclarationLike, assetMatchesDeclaration, declarationToPickerFilters, declarationToSubmissionDeclaration, getPrimaryAssetRef, getPrimaryDeclarationKey, getRouteInputDeclarationsFromRoute, getSubmissionAssetShape, materializeContributorSubmissionAssets, toRouteInputAssets };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Stored on entries and eval_static_inputs after server normalization. */
|
|
4
|
+
declare const KeyedAssetRefsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5
|
+
asset_id: z.ZodUUID;
|
|
6
|
+
asset_type: z.ZodEnum<{
|
|
7
|
+
user: "user";
|
|
8
|
+
organization: "organization";
|
|
9
|
+
team: "team";
|
|
10
|
+
dataset: "dataset";
|
|
11
|
+
file: "file";
|
|
12
|
+
service: "service";
|
|
13
|
+
route: "route";
|
|
14
|
+
post: "post";
|
|
15
|
+
quest: "quest";
|
|
16
|
+
comment: "comment";
|
|
17
|
+
conversation: "conversation";
|
|
18
|
+
}>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
/** Accepted on POST /quests/:id/entries/create — server fills asset_type. */
|
|
21
|
+
declare const KeyedAssetInputValueSchema: z.ZodUnion<readonly [z.ZodUUID, z.ZodObject<{
|
|
22
|
+
asset_id: z.ZodUUID;
|
|
23
|
+
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
user: "user";
|
|
25
|
+
organization: "organization";
|
|
26
|
+
team: "team";
|
|
27
|
+
dataset: "dataset";
|
|
28
|
+
file: "file";
|
|
29
|
+
service: "service";
|
|
30
|
+
route: "route";
|
|
31
|
+
post: "post";
|
|
32
|
+
quest: "quest";
|
|
33
|
+
comment: "comment";
|
|
34
|
+
conversation: "conversation";
|
|
35
|
+
}>>;
|
|
36
|
+
}, z.core.$strip>]>;
|
|
37
|
+
declare const KeyedAssetInputSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUUID, z.ZodObject<{
|
|
38
|
+
asset_id: z.ZodUUID;
|
|
39
|
+
asset_type: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
user: "user";
|
|
41
|
+
organization: "organization";
|
|
42
|
+
team: "team";
|
|
43
|
+
dataset: "dataset";
|
|
44
|
+
file: "file";
|
|
45
|
+
service: "service";
|
|
46
|
+
route: "route";
|
|
47
|
+
post: "post";
|
|
48
|
+
quest: "quest";
|
|
49
|
+
comment: "comment";
|
|
50
|
+
conversation: "conversation";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strip>]>>;
|
|
53
|
+
declare const QuestSubmissionAssetDeclarationSchema: z.ZodObject<{
|
|
54
|
+
asset_type: z.ZodEnum<{
|
|
55
|
+
dataset: "dataset";
|
|
56
|
+
file: "file";
|
|
57
|
+
post: "post";
|
|
58
|
+
}>;
|
|
59
|
+
primary: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
input_filter: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
61
|
+
audio: "audio";
|
|
62
|
+
video: "video";
|
|
63
|
+
image: "image";
|
|
64
|
+
pdf: "pdf";
|
|
65
|
+
"3d model": "3d model";
|
|
66
|
+
"atomic structure": "atomic structure";
|
|
67
|
+
}>>>;
|
|
68
|
+
file_extensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
69
|
+
contains_file_extensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
70
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
71
|
+
}, z.core.$catchall<z.ZodAny>>;
|
|
72
|
+
type KeyedAssetRefs = z.infer<typeof KeyedAssetRefsSchema>;
|
|
73
|
+
type KeyedAssetInput = z.infer<typeof KeyedAssetInputSchema>;
|
|
74
|
+
type QuestSubmissionAssetDeclaration = z.infer<typeof QuestSubmissionAssetDeclarationSchema>;
|
|
75
|
+
type AssetDeclarationPickerFilters = {
|
|
76
|
+
assetType?: string;
|
|
77
|
+
fileType?: string;
|
|
78
|
+
extensions?: string[];
|
|
79
|
+
hasConstraints: boolean;
|
|
80
|
+
};
|
|
81
|
+
type QuestSubmissionItemInput = {
|
|
82
|
+
eval_route_id?: string | null;
|
|
83
|
+
submission_assets?: Record<string, QuestSubmissionAssetDeclaration> | null;
|
|
84
|
+
eval_static_inputs?: KeyedAssetRefs | null;
|
|
85
|
+
expected_asset_type?: string | null;
|
|
86
|
+
};
|
|
87
|
+
type RouteInputDeclarationLike = {
|
|
88
|
+
asset_type?: string | null;
|
|
89
|
+
primary?: boolean;
|
|
90
|
+
input_filter?: string | null;
|
|
91
|
+
filter?: string | null;
|
|
92
|
+
file_extensions?: string[] | null;
|
|
93
|
+
input_file_extensions?: string[] | null;
|
|
94
|
+
};
|
|
95
|
+
type RouteForSubmissionShape = {
|
|
96
|
+
route?: {
|
|
97
|
+
input_assets?: Record<string, RouteInputDeclarationLike> | null;
|
|
98
|
+
input_type?: string | null;
|
|
99
|
+
input_filter?: string | null;
|
|
100
|
+
input_file_extensions?: string[] | null;
|
|
101
|
+
} | null;
|
|
102
|
+
} | null;
|
|
103
|
+
/** Route keyed inputs as a flat map (includes legacy input_type fallback). */
|
|
104
|
+
declare function getRouteInputDeclarationsFromRoute(route: RouteForSubmissionShape): Record<string, RouteInputDeclarationLike>;
|
|
105
|
+
declare function declarationToSubmissionDeclaration(declaration: RouteInputDeclarationLike): QuestSubmissionAssetDeclaration;
|
|
106
|
+
/** Materialize contributor declarations from route inputs minus pinned keys. */
|
|
107
|
+
declare function materializeContributorSubmissionAssets(routeInputs: Record<string, RouteInputDeclarationLike>, pinnedKeys: string[]): Record<string, QuestSubmissionAssetDeclaration>;
|
|
108
|
+
declare function getPrimaryDeclarationKey(declarations: Record<string, QuestSubmissionAssetDeclaration>): string | null;
|
|
109
|
+
declare function getSubmissionAssetShape(item: QuestSubmissionItemInput, route?: RouteForSubmissionShape | null): {
|
|
110
|
+
contributorKeys: string[];
|
|
111
|
+
declarations: Record<string, QuestSubmissionAssetDeclaration>;
|
|
112
|
+
pinned: KeyedAssetRefs;
|
|
113
|
+
};
|
|
114
|
+
declare function declarationToPickerFilters(declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined): AssetDeclarationPickerFilters | null;
|
|
115
|
+
declare function assetMatchesDeclaration(asset: {
|
|
116
|
+
assetType?: string | null;
|
|
117
|
+
asset_type?: string | null;
|
|
118
|
+
asset?: {
|
|
119
|
+
metadata?: Record<string, unknown>;
|
|
120
|
+
} | null;
|
|
121
|
+
} | null | undefined, declaration: RouteInputDeclarationLike | QuestSubmissionAssetDeclaration | null | undefined): boolean;
|
|
122
|
+
declare function getPrimaryAssetRef(refs: KeyedAssetRefs | null | undefined, declarations?: Record<string, QuestSubmissionAssetDeclaration> | null): {
|
|
123
|
+
key: string;
|
|
124
|
+
asset_id: string;
|
|
125
|
+
asset_type: string;
|
|
126
|
+
} | null;
|
|
127
|
+
declare function toRouteInputAssets(refs: KeyedAssetRefs | null | undefined): Record<string, {
|
|
128
|
+
assetId: string;
|
|
129
|
+
assetType: string;
|
|
130
|
+
}>;
|
|
131
|
+
/** @deprecated Use declarationToPickerFilters */
|
|
132
|
+
type EvalSubmissionFilters = AssetDeclarationPickerFilters;
|
|
133
|
+
|
|
134
|
+
export { type AssetDeclarationPickerFilters, type EvalSubmissionFilters, type KeyedAssetInput, KeyedAssetInputSchema, KeyedAssetInputValueSchema, type KeyedAssetRefs, KeyedAssetRefsSchema, type QuestSubmissionAssetDeclaration, QuestSubmissionAssetDeclarationSchema, type QuestSubmissionItemInput, type RouteForSubmissionShape, type RouteInputDeclarationLike, assetMatchesDeclaration, declarationToPickerFilters, declarationToSubmissionDeclaration, getPrimaryAssetRef, getPrimaryDeclarationKey, getRouteInputDeclarationsFromRoute, getSubmissionAssetShape, materializeContributorSubmissionAssets, toRouteInputAssets };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{c as KeyedAssetInputSchema,b as KeyedAssetInputValueSchema,a as KeyedAssetRefsSchema,d as QuestSubmissionAssetDeclarationSchema,k as assetMatchesDeclaration,j as declarationToPickerFilters,f as declarationToSubmissionDeclaration,l as getPrimaryAssetRef,h as getPrimaryDeclarationKey,e as getRouteInputDeclarationsFromRoute,i as getSubmissionAssetShape,g as materializeContributorSubmissionAssets,m as toRouteInputAssets}from'../chunk-JKTQY4RU.js';import'../chunk-7F26V24D.js';import'../chunk-G2MXCB7Q.js';import'../chunk-CF56NFUG.js';import'../chunk-WLGOABHV.js';import'../chunk-3N56ERWF.js';import'../chunk-WRHPQNEL.js';import'../chunk-DUBPWSCA.js';//# sourceMappingURL=quest-submission.js.map
|
|
2
|
+
//# sourceMappingURL=quest-submission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"quest-submission.js"}
|
package/package.json
CHANGED
package/dist/chunk-42EQ7ULD.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkIP4OVRZB_cjs=require('./chunk-IP4OVRZB.cjs'),chunk43KB23BA_cjs=require('./chunk-43KB23BA.cjs'),zod=require('zod');var x=zod.enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),A=zod.object({authentication:x,base_url:zod.string(),version:zod.optional(zod.nullable(zod.string())),spec_path:zod.optional(zod.nullable(zod.string())),spec_url:zod.optional(zod.nullable(zod.string())),auth_url:zod.optional(zod.nullable(zod.string()))}),h=A.extend(chunkIP4OVRZB_cjs.b.partial().shape),v=chunkIP4OVRZB_cjs.c.extend({asset_type:chunk43KB23BA_cjs.a.refine(s=>s==="service"),metadata:h}),R=chunkIP4OVRZB_cjs.d.extend({asset_type:chunk43KB23BA_cjs.a.refine(s=>s==="service"),metadata:h}).transform(s=>chunkIP4OVRZB_cjs.a(s)),D=v.partial().omit({user_id:true,id:true,created_at:true,last_updated:true,organization:true,user:true,team:true,slug:true}).extend({last_updated:zod.string().default(()=>new Date().toISOString())}).transform(s=>chunkIP4OVRZB_cjs.a(s)),T=zod.object({id:zod.string(),user_id:zod.string(),service_id:zod.string(),path:zod.string(),method:zod.enum(["GET","POST","PUT","PATCH","DELETE"]),summary:zod.optional(zod.nullable(zod.string())),parameters:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),request_body:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),responses:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),input_assets:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),input_type:zod.optional(zod.nullable(zod.enum(["file","dataset","post"]))),input_filter:zod.optional(zod.nullable(zod.enum(["audio","video","image","pdf","3d model","atomic structure"]))),input_file_extension:zod.optional(zod.nullable(zod.string())),input_file_extensions:zod.optional(zod.nullable(zod.array(zod.string()))),output_type:zod.optional(zod.nullable(zod.enum(["file","dataset","post"]))),output_assets:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),output_file_extension:zod.optional(zod.nullable(zod.string())),security:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),rate_limit:zod.optional(zod.nullable(zod.number())),last_updated:zod.string()}),E=chunkIP4OVRZB_cjs.c.extend({asset_type:chunk43KB23BA_cjs.a.refine(s=>s==="route"),route:T}),P=zod.object({id:zod.uuid(),user_id:zod.uuid(),route_id:zod.uuid(),metadata:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),response:zod.optional(zod.nullable(zod.record(zod.string(),zod.any()))),side_effects:zod.boolean().default(true),input_asset_id:zod.optional(zod.nullable(zod.uuid())),output_asset_id:zod.optional(zod.nullable(zod.uuid())),input_asset:zod.optional(zod.nullable(chunkIP4OVRZB_cjs.c)),input_assets:zod.optional(zod.nullable(zod.array(zod.record(zod.string(),zod.any())))),output_asset:zod.optional(zod.nullable(chunkIP4OVRZB_cjs.c)),webhook_url:zod.optional(zod.nullable(zod.string())),webhook_token:zod.optional(zod.nullable(zod.string())),status:chunk43KB23BA_cjs.j,created_at:zod.string(),last_updated:zod.string(),started_at:zod.optional(zod.nullable(zod.string())),finished_at:zod.optional(zod.nullable(zod.string()))});exports.a=v;exports.b=R;exports.c=D;exports.d=E;exports.e=P;//# sourceMappingURL=chunk-42EQ7ULD.cjs.map
|
|
2
|
-
//# sourceMappingURL=chunk-42EQ7ULD.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schema/services.ts"],"names":["AuthType","zodEnum","BaseServiceMetadataSchema","object","string","optional","nullable","ServiceMetadataSchema","AssetMetadataSchema","ServiceSchema","AssetSchema","AssetTypeSchema","x","CreateServiceSchema","CreateAssetSchema","value","normalizeAssetConfigForParsing","UpdateServiceSchema","RouteDetailSchema","array","record","any","number","RouteSchema","ActionSchema","uuid","boolean","StatusSchema"],"mappings":"wIAuBMA,IAAAA,CAAAA,CAAWC,QAAQ,CAAA,CAAC,wBAAyB,MAAQ,CAAA,MAAA,CAAQ,WAAW,CAAC,CAEzEC,CAAAA,CAAAA,CAA4BC,WAAO,CACvC,cAAA,CAAgBH,CAChB,CAAA,QAAA,CAAUI,UAAO,EAAA,CACjB,QAASC,YAASC,CAAAA,YAAAA,CAASF,UAAO,EAAC,CAAC,CAAA,CACpC,SAAWC,CAAAA,YAAAA,CAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACtC,CAAA,QAAA,CAAUC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACrC,CAAA,QAAA,CAAUC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACvC,CAAC,EAEKG,CAAwBL,CAAAA,CAAAA,CAA0B,MACtDM,CAAAA,mBAAAA,CAAoB,OAAQ,EAAA,CAAE,KAChC,CAAA,CAEMC,CAAgBC,CAAAA,mBAAAA,CAAY,MAAO,CAAA,CACvC,UAAYC,CAAAA,mBAAAA,CAAgB,OAAQC,CAAoBA,EAAAA,CAAAA,GAAd,SAAe,CAAA,CACzD,QAAUL,CAAAA,CACZ,CAAC,CAAA,CAEKM,CAAsBC,CAAAA,mBA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AAaC,YAASC,CAAAA,YAAAA,CAASF,UAAO,EAAC,CAAC,CAC1C,CAAC","file":"chunk-42EQ7ULD.cjs","sourcesContent":["import {\n object,\n string,\n uuid,\n number,\n array,\n type z,\n record,\n any,\n enum as zodEnum,\n optional,\n nullable,\n boolean\n} from \"zod\";\n\nimport { AssetTypeSchema, StatusSchema } from \"./common\";\nimport {\n AssetMetadataSchema,\n AssetSchema,\n CreateAssetSchema,\n normalizeAssetConfigForParsing,\n} from \"./assets\";\n\nconst AuthType = zodEnum([\"Personal Access Token\", \"Ouro\", \"None\", \"OAuth 2.0\"]);\n\nconst BaseServiceMetadataSchema = object({\n authentication: AuthType,\n base_url: string(),\n version: optional(nullable(string())),\n spec_path: optional(nullable(string())),\n spec_url: optional(nullable(string())),\n auth_url: optional(nullable(string())),\n});\n\nconst ServiceMetadataSchema = BaseServiceMetadataSchema.extend(\n AssetMetadataSchema.partial().shape\n);\n\nconst ServiceSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"service\" === x),\n metadata: ServiceMetadataSchema,\n});\n\nconst CreateServiceSchema = CreateAssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"service\" === x),\n metadata: ServiceMetadataSchema,\n}).transform((value) => normalizeAssetConfigForParsing(value));\n\nconst UpdateServiceSchema = ServiceSchema.partial()\n .omit({\n user_id: true,\n id: true,\n created_at: true,\n last_updated: true,\n organization: true,\n user: true,\n team: true,\n slug: true,\n })\n .extend({\n last_updated: string().default(() => new Date().toISOString()),\n })\n .transform((value) => normalizeAssetConfigForParsing(value));\n\nconst RouteDetailSchema = object({\n id: string(),\n user_id: string(),\n service_id: string(),\n path: string(),\n method: zodEnum([\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]),\n summary: optional(nullable(string())),\n parameters: optional(nullable(array(record(string(), any())))),\n request_body: optional(nullable(record(string(), any()))),\n responses: optional(nullable(array(record(string(), any())))),\n input_assets: optional(nullable(record(string(), any()))),\n input_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n input_filter: optional(nullable(zodEnum([\"audio\", \"video\", \"image\", \"pdf\", \"3d model\", \"atomic structure\"]))),\n input_file_extension: optional(nullable(string())),\n input_file_extensions: optional(nullable(array(string()))),\n output_type: optional(nullable(zodEnum([\"file\", \"dataset\", \"post\"]))),\n output_assets: optional(nullable(record(string(), any()))),\n output_file_extension: optional(nullable(string())),\n security: optional(nullable(record(string(), any()))),\n rate_limit: optional(nullable(number())),\n last_updated: string(),\n});\n\nconst RouteSchema = AssetSchema.extend({\n asset_type: AssetTypeSchema.refine((x) => \"route\" === x),\n route: RouteDetailSchema,\n});\n\nconst ActionSchema = object({\n id: uuid(),\n user_id: uuid(),\n route_id: uuid(),\n metadata: optional(nullable(record(string(), any()))),\n response: optional(nullable(record(string(), any()))),\n side_effects: boolean().default(true),\n input_asset_id: optional(nullable(uuid())),\n output_asset_id: optional(nullable(uuid())),\n input_asset: optional(nullable(AssetSchema)),\n input_assets: optional(nullable(array(record(string(), any())))),\n output_asset: optional(nullable(AssetSchema)),\n webhook_url: optional(nullable(string())),\n webhook_token: optional(nullable(string())),\n status: StatusSchema,\n created_at: string(),\n last_updated: string(),\n started_at: optional(nullable(string())),\n finished_at: optional(nullable(string())),\n});\n\nexport { RouteSchema, ServiceSchema, CreateServiceSchema, UpdateServiceSchema, ActionSchema };\nexport type Service = z.infer<typeof ServiceSchema>;\nexport type Route = z.infer<typeof RouteSchema>;\nexport type RouteDetail = z.infer<typeof RouteDetailSchema>;\nexport type AuthType = z.infer<typeof AuthType>;\nexport type Action = z.infer<typeof ActionSchema>;\n"]}
|