@aviaryhq/cloudglue-js 0.1.1 → 0.1.2

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.
@@ -31,6 +31,16 @@ export declare const schemas: {
31
31
  id: z.ZodString;
32
32
  object: z.ZodLiteral<"file">;
33
33
  }, z.ZodTypeAny, "passthrough">>;
34
+ FileUpdate: z.ZodObject<{
35
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
36
+ filename: z.ZodOptional<z.ZodString>;
37
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
38
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
39
+ filename: z.ZodOptional<z.ZodString>;
40
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
41
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
42
+ filename: z.ZodOptional<z.ZodString>;
43
+ }, z.ZodTypeAny, "passthrough">>;
34
44
  };
35
45
  export declare const FilesApi: import("@zodios/core").ZodiosInstance<[{
36
46
  method: "post";
@@ -379,6 +389,124 @@ export declare const FilesApi: import("@zodios/core").ZodiosInstance<[{
379
389
  error: z.ZodString;
380
390
  }, z.ZodTypeAny, "passthrough">>;
381
391
  }];
392
+ }, {
393
+ method: "put";
394
+ path: "/files/:file_id";
395
+ alias: "updateFile";
396
+ description: "Update a file";
397
+ requestFormat: "json";
398
+ parameters: [{
399
+ name: "body";
400
+ description: string;
401
+ type: "Body";
402
+ schema: z.ZodObject<{
403
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
404
+ filename: z.ZodOptional<z.ZodString>;
405
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
406
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
407
+ filename: z.ZodOptional<z.ZodString>;
408
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
409
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
410
+ filename: z.ZodOptional<z.ZodString>;
411
+ }, z.ZodTypeAny, "passthrough">>;
412
+ }, {
413
+ name: "file_id";
414
+ type: "Path";
415
+ schema: z.ZodString;
416
+ }];
417
+ response: z.ZodObject<{
418
+ id: z.ZodString;
419
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
420
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
421
+ created_at: z.ZodOptional<z.ZodNumber>;
422
+ filename: z.ZodOptional<z.ZodString>;
423
+ uri: z.ZodString;
424
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
425
+ video_info: z.ZodOptional<z.ZodObject<{
426
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
427
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
428
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
429
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
430
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
431
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
432
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
433
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
434
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
435
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
436
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
437
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
438
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
439
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
440
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
441
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
442
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
443
+ }, z.ZodTypeAny, "passthrough">>>;
444
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
445
+ id: z.ZodString;
446
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
447
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
448
+ created_at: z.ZodOptional<z.ZodNumber>;
449
+ filename: z.ZodOptional<z.ZodString>;
450
+ uri: z.ZodString;
451
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
452
+ video_info: z.ZodOptional<z.ZodObject<{
453
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
454
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
455
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
456
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
457
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
458
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
459
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
460
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
461
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
462
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
463
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
464
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
465
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
466
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
467
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
468
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
469
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
470
+ }, z.ZodTypeAny, "passthrough">>>;
471
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
472
+ id: z.ZodString;
473
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
474
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
475
+ created_at: z.ZodOptional<z.ZodNumber>;
476
+ filename: z.ZodOptional<z.ZodString>;
477
+ uri: z.ZodString;
478
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
479
+ video_info: z.ZodOptional<z.ZodObject<{
480
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
481
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
482
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
483
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
484
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
485
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
486
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
487
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
488
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
489
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
490
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
491
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
492
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
493
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
494
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
495
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
496
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
497
+ }, z.ZodTypeAny, "passthrough">>>;
498
+ }, z.ZodTypeAny, "passthrough">>;
499
+ errors: [{
500
+ status: 400;
501
+ description: string;
502
+ schema: z.ZodObject<{
503
+ error: z.ZodString;
504
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
505
+ error: z.ZodString;
506
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
507
+ error: z.ZodString;
508
+ }, z.ZodTypeAny, "passthrough">>;
509
+ }];
382
510
  }]>;
383
511
  export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
384
512
  method: "post";
@@ -727,5 +855,123 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
727
855
  error: z.ZodString;
728
856
  }, z.ZodTypeAny, "passthrough">>;
729
857
  }];
858
+ }, {
859
+ method: "put";
860
+ path: "/files/:file_id";
861
+ alias: "updateFile";
862
+ description: "Update a file";
863
+ requestFormat: "json";
864
+ parameters: [{
865
+ name: "body";
866
+ description: string;
867
+ type: "Body";
868
+ schema: z.ZodObject<{
869
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
870
+ filename: z.ZodOptional<z.ZodString>;
871
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
872
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
873
+ filename: z.ZodOptional<z.ZodString>;
874
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
875
+ metadata: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
876
+ filename: z.ZodOptional<z.ZodString>;
877
+ }, z.ZodTypeAny, "passthrough">>;
878
+ }, {
879
+ name: "file_id";
880
+ type: "Path";
881
+ schema: z.ZodString;
882
+ }];
883
+ response: z.ZodObject<{
884
+ id: z.ZodString;
885
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
886
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
887
+ created_at: z.ZodOptional<z.ZodNumber>;
888
+ filename: z.ZodOptional<z.ZodString>;
889
+ uri: z.ZodString;
890
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
891
+ video_info: z.ZodOptional<z.ZodObject<{
892
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
893
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
894
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
895
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
896
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
897
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
898
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
899
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
900
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
901
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
902
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
903
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
904
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
905
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
906
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
907
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
908
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
909
+ }, z.ZodTypeAny, "passthrough">>>;
910
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
911
+ id: z.ZodString;
912
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
913
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
914
+ created_at: z.ZodOptional<z.ZodNumber>;
915
+ filename: z.ZodOptional<z.ZodString>;
916
+ uri: z.ZodString;
917
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
918
+ video_info: z.ZodOptional<z.ZodObject<{
919
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
920
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
921
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
922
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
923
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
924
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
925
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
926
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
927
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
928
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
929
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
930
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
931
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
932
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
933
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
934
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
935
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
936
+ }, z.ZodTypeAny, "passthrough">>>;
937
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
938
+ id: z.ZodString;
939
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
940
+ bytes: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
941
+ created_at: z.ZodOptional<z.ZodNumber>;
942
+ filename: z.ZodOptional<z.ZodString>;
943
+ uri: z.ZodString;
944
+ metadata: z.ZodOptional<z.ZodUnion<[z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, z.ZodNull]>>;
945
+ video_info: z.ZodOptional<z.ZodObject<{
946
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
947
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
948
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
949
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
950
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
951
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
952
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
953
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
954
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
955
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
956
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
957
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
958
+ duration_seconds: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
959
+ height: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
960
+ width: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
961
+ format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
962
+ has_audio: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodNull]>>;
963
+ }, z.ZodTypeAny, "passthrough">>>;
964
+ }, z.ZodTypeAny, "passthrough">>;
965
+ errors: [{
966
+ status: 400;
967
+ description: string;
968
+ schema: z.ZodObject<{
969
+ error: z.ZodString;
970
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
971
+ error: z.ZodString;
972
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
973
+ error: z.ZodString;
974
+ }, z.ZodTypeAny, "passthrough">>;
975
+ }];
730
976
  }]>;
731
977
  export {};
@@ -26,10 +26,19 @@ const FileDelete = zod_1.z
26
26
  .object({ id: zod_1.z.string(), object: zod_1.z.literal("file") })
27
27
  .strict()
28
28
  .passthrough();
29
+ const FileUpdate = zod_1.z
30
+ .object({
31
+ metadata: zod_1.z.object({}).partial().strict().passthrough(),
32
+ filename: zod_1.z.string(),
33
+ })
34
+ .partial()
35
+ .strict()
36
+ .passthrough();
29
37
  exports.schemas = {
30
38
  FileList,
31
39
  FileUpload,
32
40
  FileDelete,
41
+ FileUpdate,
33
42
  };
34
43
  const endpoints = (0, core_1.makeApi)([
35
44
  {
@@ -187,6 +196,34 @@ const endpoints = (0, core_1.makeApi)([
187
196
  },
188
197
  ],
189
198
  },
199
+ {
200
+ method: "put",
201
+ path: "/files/:file_id",
202
+ alias: "updateFile",
203
+ description: `Update a file`,
204
+ requestFormat: "json",
205
+ parameters: [
206
+ {
207
+ name: "body",
208
+ description: `File update parameters`,
209
+ type: "Body",
210
+ schema: FileUpdate,
211
+ },
212
+ {
213
+ name: "file_id",
214
+ type: "Path",
215
+ schema: zod_1.z.string(),
216
+ },
217
+ ],
218
+ response: common_1.File,
219
+ errors: [
220
+ {
221
+ status: 400,
222
+ description: `Invalid request or malformed file update parameters`,
223
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
224
+ },
225
+ ],
226
+ },
190
227
  ]);
191
228
  exports.FilesApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
192
229
  function createApiClient(baseUrl, options) {
@@ -1,5 +1,5 @@
1
1
  import { FilesApi, CollectionsApi, ChatApi, TranscribeApi, ExtractApi } from "../generated";
2
- import type { File } from "./types";
2
+ import type { File, UpdateFileParams } from "./types";
3
3
  export declare class CloudGlueError extends Error {
4
4
  readonly statusCode?: number | undefined;
5
5
  readonly data?: string | undefined;
@@ -163,6 +163,34 @@ declare class EnhancedFilesApi {
163
163
  id: import("zod").ZodString;
164
164
  object: import("zod").ZodLiteral<"file">;
165
165
  }, import("zod").ZodTypeAny, "passthrough">>;
166
+ updateFile(fileId: string, params: UpdateFileParams): Promise<import("zod").objectOutputType<{
167
+ id: import("zod").ZodString;
168
+ status: import("zod").ZodEnum<["pending", "processing", "completed", "failed", "not_applicable"]>;
169
+ bytes: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
170
+ created_at: import("zod").ZodOptional<import("zod").ZodNumber>;
171
+ filename: import("zod").ZodOptional<import("zod").ZodString>;
172
+ uri: import("zod").ZodString;
173
+ metadata: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodNull]>>;
174
+ video_info: import("zod").ZodOptional<import("zod").ZodObject<{
175
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
176
+ height: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
177
+ width: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
178
+ format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNull]>>;
179
+ has_audio: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNull]>>;
180
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
181
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
182
+ height: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
183
+ width: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
184
+ format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNull]>>;
185
+ has_audio: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNull]>>;
186
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
187
+ duration_seconds: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
188
+ height: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
189
+ width: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodNull]>>;
190
+ format: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNull]>>;
191
+ has_audio: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodNull]>>;
192
+ }, import("zod").ZodTypeAny, "passthrough">>>;
193
+ }, import("zod").ZodTypeAny, "passthrough">>;
166
194
  /**
167
195
  * Waits for a file to finish processing by polling the getFile endpoint until the file
168
196
  * reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
@@ -54,6 +54,9 @@ class EnhancedFilesApi {
54
54
  params: { file_id: fileId },
55
55
  });
56
56
  }
57
+ async updateFile(fileId, params) {
58
+ return this.api.updateFile(params, { params: { file_id: fileId } });
59
+ }
57
60
  /**
58
61
  * Waits for a file to finish processing by polling the getFile endpoint until the file
59
62
  * reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
@@ -10,4 +10,4 @@ export { FilesApi, CollectionsApi, ChatApi, TranscribeApi, ExtractApi } from '..
10
10
  /**
11
11
  * Common type definitions used throughout the SDK
12
12
  */
13
- export type { File, Collection, CollectionFile, CollectionFileList, ChatMessage, ChatCompletionResponse, Transcribe, TranscribeList, Extract, ExtractList, EntitySegment, CollectionVideoEntities, NewCollectionParams, RichTranscript, CollectionEntitiesList, CollectionRichTranscriptsList, } from './types';
13
+ export type { File, UpdateFileParams, Collection, CollectionFile, CollectionFileList, ChatMessage, ChatCompletionResponse, Transcribe, TranscribeList, Extract, ExtractList, EntitySegment, CollectionVideoEntities, NewCollectionParams, RichTranscript, CollectionEntitiesList, CollectionRichTranscriptsList, } from './types';
@@ -8,6 +8,14 @@ import { schemas as extractSchemas } from '../generated/Extract';
8
8
  * Contains metadata about the file including its status, size, and video information
9
9
  */
10
10
  export type { File } from '../generated/common';
11
+ /**
12
+ * Parameters for updating an existing file
13
+ */
14
+ export interface UpdateFileParams {
15
+ filename?: string;
16
+ metadata?: Record<string, any>;
17
+ [key: string]: any;
18
+ }
11
19
  /**
12
20
  * Parameters for creating a new collection
13
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aviaryhq/cloudglue-js",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Cloudglue API client for Node.js",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",