@ourofoundation/ouro-js 3.3.0 → 3.4.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.
Files changed (49) hide show
  1. package/dist/chunk-36UOEIZN.js +2 -0
  2. package/dist/chunk-36UOEIZN.js.map +1 -0
  3. package/dist/chunk-4KDHR4VP.js +2 -0
  4. package/dist/chunk-4KDHR4VP.js.map +1 -0
  5. package/dist/chunk-IU7AKVYI.cjs +2 -0
  6. package/dist/chunk-IU7AKVYI.cjs.map +1 -0
  7. package/dist/chunk-NRZCTFCQ.cjs +2 -0
  8. package/dist/chunk-NRZCTFCQ.cjs.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.d.cts +2 -1
  11. package/dist/index.d.ts +2 -1
  12. package/dist/index.js +1 -1
  13. package/dist/schema/assets.d.cts +84 -84
  14. package/dist/schema/assets.d.ts +84 -84
  15. package/dist/schema/comments.d.cts +136 -136
  16. package/dist/schema/comments.d.ts +136 -136
  17. package/dist/schema/common.d.cts +16 -16
  18. package/dist/schema/common.d.ts +16 -16
  19. package/dist/schema/conversations.d.cts +69 -69
  20. package/dist/schema/conversations.d.ts +69 -69
  21. package/dist/schema/datasets.d.cts +106 -106
  22. package/dist/schema/datasets.d.ts +106 -106
  23. package/dist/schema/files.d.cts +100 -100
  24. package/dist/schema/files.d.ts +100 -100
  25. package/dist/schema/notifications.d.cts +2 -2
  26. package/dist/schema/notifications.d.ts +2 -2
  27. package/dist/schema/organizations.d.cts +1 -1
  28. package/dist/schema/organizations.d.ts +1 -1
  29. package/dist/schema/posts.d.cts +127 -127
  30. package/dist/schema/posts.d.ts +127 -127
  31. package/dist/schema/quests.cjs +2 -0
  32. package/dist/schema/quests.cjs.map +1 -0
  33. package/dist/schema/quests.d.cts +1140 -0
  34. package/dist/schema/quests.d.ts +1140 -0
  35. package/dist/schema/quests.js +2 -0
  36. package/dist/schema/quests.js.map +1 -0
  37. package/dist/schema/services.cjs +1 -1
  38. package/dist/schema/services.d.cts +159 -120
  39. package/dist/schema/services.d.ts +159 -120
  40. package/dist/schema/services.js +1 -1
  41. package/dist/schema/tags.d.cts +7 -7
  42. package/dist/schema/tags.d.ts +7 -7
  43. package/dist/schema/teams.d.cts +18 -18
  44. package/dist/schema/teams.d.ts +18 -18
  45. package/package.json +1 -1
  46. package/dist/chunk-42EQ7ULD.cjs +0 -2
  47. package/dist/chunk-42EQ7ULD.cjs.map +0 -1
  48. package/dist/chunk-FDKZIS34.js +0 -2
  49. package/dist/chunk-FDKZIS34.js.map +0 -1
@@ -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";
@@ -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";
@@ -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";
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ourofoundation/ouro-js",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Interact with the Ouro platform in browser and node.js environments",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.cjs",
@@ -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,CA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zC,CAAA,eAAA,CAAiBpB,YAASC,CAAAA,YAAAA,CAASmB,QAAK,EAAC,CAAC,CAAA,CAC1C,WAAapB,CAAAA,YAAAA,CAASC,YAASI,CAAAA,mBAAW,CAAC,CAC3C,CAAA,YAAA,CAAcL,YAASC,CAAAA,YAAAA,CAASa,SAAMC,CAAAA,UAAAA,CAAOhB,YAAUiB,CAAAA,OAAAA,EAAK,CAAC,CAAC,CAAC,EAC/D,YAAchB,CAAAA,YAAAA,CAASC,YAASI,CAAAA,mBAAW,CAAC,CAAA,CAC5C,WAAaL,CAAAA,YAAAA,CAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACxC,CAAA,aAAA,CAAeC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CAC1C,CAAA,MAAA,CAAQuB,mBACR,CAAA,UAAA,CAAYvB,UAAO,EAAA,CACnB,YAAcA,CAAAA,UAAAA,EACd,CAAA,UAAA,CAAYC,aAASC,YAASF,CAAAA,UAAAA,EAAQ,CAAC,CACvC,CAAA,WAAA,CAAaC,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"]}
@@ -1,2 +0,0 @@
1
- import {b,c,d,a as a$1}from'./chunk-G2MXCB7Q.js';import {a,j}from'./chunk-WRHPQNEL.js';import {enum as _enum,object,optional,string,nullable,number,record,any,array,boolean,uuid}from'zod';var x=_enum(["Personal Access Token","Ouro","None","OAuth 2.0"]),A=object({authentication:x,base_url:string(),version:optional(nullable(string())),spec_path:optional(nullable(string())),spec_url:optional(nullable(string())),auth_url:optional(nullable(string()))}),h=A.extend(b.partial().shape),v=c.extend({asset_type:a.refine(s=>s==="service"),metadata:h}),R=d.extend({asset_type:a.refine(s=>s==="service"),metadata:h}).transform(s=>a$1(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:string().default(()=>new Date().toISOString())}).transform(s=>a$1(s)),T=object({id:string(),user_id:string(),service_id:string(),path:string(),method:_enum(["GET","POST","PUT","PATCH","DELETE"]),summary:optional(nullable(string())),parameters:optional(nullable(array(record(string(),any())))),request_body:optional(nullable(record(string(),any()))),responses:optional(nullable(array(record(string(),any())))),input_assets:optional(nullable(record(string(),any()))),input_type:optional(nullable(_enum(["file","dataset","post"]))),input_filter:optional(nullable(_enum(["audio","video","image","pdf","3d model","atomic structure"]))),input_file_extension:optional(nullable(string())),input_file_extensions:optional(nullable(array(string()))),output_type:optional(nullable(_enum(["file","dataset","post"]))),output_assets:optional(nullable(record(string(),any()))),output_file_extension:optional(nullable(string())),security:optional(nullable(record(string(),any()))),rate_limit:optional(nullable(number())),last_updated:string()}),E=c.extend({asset_type:a.refine(s=>s==="route"),route:T}),P=object({id:uuid(),user_id:uuid(),route_id:uuid(),metadata:optional(nullable(record(string(),any()))),response:optional(nullable(record(string(),any()))),side_effects:boolean().default(true),input_asset_id:optional(nullable(uuid())),output_asset_id:optional(nullable(uuid())),input_asset:optional(nullable(c)),input_assets:optional(nullable(array(record(string(),any())))),output_asset:optional(nullable(c)),webhook_url:optional(nullable(string())),webhook_token:optional(nullable(string())),status:j,created_at:string(),last_updated:string(),started_at:optional(nullable(string())),finished_at:optional(nullable(string()))});export{v as a,R as b,D as c,E as d,P as e};//# sourceMappingURL=chunk-FDKZIS34.js.map
2
- //# sourceMappingURL=chunk-FDKZIS34.js.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":"4LAuBMA,IAAAA,CAAAA,CAAWC,KAAQ,CAAA,CAAC,wBAAyB,MAAQ,CAAA,MAAA,CAAQ,WAAW,CAAC,CAEzEC,CAAAA,CAAAA,CAA4BC,OAAO,CACvC,cAAA,CAAgBH,CAChB,CAAA,QAAA,CAAUI,MAAO,EAAA,CACjB,QAASC,QAASC,CAAAA,QAAAA,CAASF,MAAO,EAAC,CAAC,CAAA,CACpC,SAAWC,CAAAA,QAAAA,CAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACtC,CAAA,QAAA,CAAUC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACrC,C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AAAA,CAASC,QAASI,CAAAA,CAAW,CAAC,CAAA,CAC5C,WAAaL,CAAAA,QAAAA,CAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACxC,CAAA,aAAA,CAAeC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CAC1C,CAAA,MAAA,CAAQuB,CACR,CAAA,UAAA,CAAYvB,MAAO,EAAA,CACnB,YAAcA,CAAAA,MAAAA,EACd,CAAA,UAAA,CAAYC,SAASC,QAASF,CAAAA,MAAAA,EAAQ,CAAC,CACvC,CAAA,WAAA,CAAaC,QAASC,CAAAA,QAAAA,CAASF,MAAO,EAAC,CAAC,CAC1C,CAAC","file":"chunk-FDKZIS34.js","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"]}