@webtypen/webframez-core 0.3.46 → 0.3.48

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.
@@ -55,6 +55,7 @@ export declare function apiFunctionParamToJsonSchema(definition: ApiFunctionPara
55
55
  pattern?: undefined;
56
56
  items?: undefined;
57
57
  additionalProperties?: undefined;
58
+ required?: undefined;
58
59
  properties?: undefined;
59
60
  "x-webframez-type"?: undefined;
60
61
  enum?: undefined;
@@ -63,6 +64,7 @@ export declare function apiFunctionParamToJsonSchema(definition: ApiFunctionPara
63
64
  pattern: string;
64
65
  items?: undefined;
65
66
  additionalProperties?: undefined;
67
+ required?: undefined;
66
68
  properties?: undefined;
67
69
  "x-webframez-type"?: undefined;
68
70
  enum?: undefined;
@@ -71,12 +73,14 @@ export declare function apiFunctionParamToJsonSchema(definition: ApiFunctionPara
71
73
  items: {};
72
74
  pattern?: undefined;
73
75
  additionalProperties?: undefined;
76
+ required?: undefined;
74
77
  properties?: undefined;
75
78
  "x-webframez-type"?: undefined;
76
79
  enum?: undefined;
77
80
  } | {
78
81
  type: string;
79
82
  additionalProperties: boolean;
83
+ required: string[];
80
84
  properties: {
81
85
  download_url: {
82
86
  type: string;
@@ -90,33 +94,6 @@ export declare function apiFunctionParamToJsonSchema(definition: ApiFunctionPara
90
94
  file_name: {
91
95
  type: string;
92
96
  };
93
- url: {
94
- type: string;
95
- };
96
- download_link: {
97
- type: string;
98
- };
99
- file_url: {
100
- type: string;
101
- };
102
- content_base64: {
103
- type: string;
104
- };
105
- data_url: {
106
- type: string;
107
- };
108
- id: {
109
- type: string;
110
- };
111
- filename: {
112
- type: string;
113
- };
114
- name: {
115
- type: string;
116
- };
117
- mime: {
118
- type: string;
119
- };
120
97
  };
121
98
  "x-webframez-type": string;
122
99
  pattern?: undefined;
@@ -128,6 +105,7 @@ export declare function apiFunctionParamToJsonSchema(definition: ApiFunctionPara
128
105
  pattern?: undefined;
129
106
  items?: undefined;
130
107
  additionalProperties?: undefined;
108
+ required?: undefined;
131
109
  properties?: undefined;
132
110
  "x-webframez-type"?: undefined;
133
111
  };
@@ -254,16 +254,7 @@ function coerceApiFunctionParam(key, value, definition) {
254
254
  if (isPlainApiObject(value)) {
255
255
  return value;
256
256
  }
257
- if (typeof value === "string") {
258
- try {
259
- const parsed = JSON.parse(value);
260
- if (isPlainApiObject(parsed)) {
261
- return parsed;
262
- }
263
- }
264
- catch (_error) { }
265
- }
266
- throw new ApiFunctionRuntimeError(`Parameter "${key}" must be a file reference object`, 400);
257
+ throw new ApiFunctionRuntimeError(`Parameter "${key}" must be an OpenAI file reference object`, 400);
267
258
  }
268
259
  return value;
269
260
  }
@@ -311,20 +302,12 @@ function apiFunctionParamToJsonSchema(definition) {
311
302
  return {
312
303
  type: "object",
313
304
  additionalProperties: true,
305
+ required: ["download_url", "file_id"],
314
306
  properties: {
315
307
  download_url: { type: "string" },
316
308
  file_id: { type: "string" },
317
309
  mime_type: { type: "string" },
318
310
  file_name: { type: "string" },
319
- url: { type: "string" },
320
- download_link: { type: "string" },
321
- file_url: { type: "string" },
322
- content_base64: { type: "string" },
323
- data_url: { type: "string" },
324
- id: { type: "string" },
325
- filename: { type: "string" },
326
- name: { type: "string" },
327
- mime: { type: "string" },
328
311
  },
329
312
  "x-webframez-type": "file",
330
313
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.3.46",
3
+ "version": "0.3.48",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",