@aviaryhq/cloudglue-js 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.File = void 0;
3
+ exports.Segmentation = exports.File = exports.FileSegmentationConfig = exports.SegmentationConfig = exports.SegmentationShotDetectorConfig = exports.SegmentationUniformConfig = void 0;
4
4
  const zod_1 = require("zod");
5
+ exports.SegmentationUniformConfig = zod_1.z
6
+ .object({
7
+ window_seconds: zod_1.z.number().gte(2).lte(60),
8
+ hop_seconds: zod_1.z.number().gte(1).lte(60).optional(),
9
+ })
10
+ .strict()
11
+ .passthrough();
12
+ exports.SegmentationShotDetectorConfig = zod_1.z
13
+ .object({
14
+ threshold: zod_1.z.number().gte(0).nullish(),
15
+ min_seconds: zod_1.z.number().gte(2).lte(60).nullish(),
16
+ max_seconds: zod_1.z.number().gte(2).lte(60).nullish(),
17
+ detector: zod_1.z.enum(["adaptive", "content"]),
18
+ })
19
+ .strict()
20
+ .passthrough();
21
+ exports.SegmentationConfig = zod_1.z
22
+ .object({
23
+ strategy: zod_1.z.enum(["uniform", "shot-detector"]),
24
+ uniform_config: exports.SegmentationUniformConfig.optional(),
25
+ shot_detector_config: exports.SegmentationShotDetectorConfig.optional(),
26
+ start_time_seconds: zod_1.z.number().gte(0).optional(),
27
+ end_time_seconds: zod_1.z.number().gte(0).optional(),
28
+ })
29
+ .strict()
30
+ .passthrough();
31
+ exports.FileSegmentationConfig = zod_1.z
32
+ .object({
33
+ segmentation_id: zod_1.z.string().uuid(),
34
+ segmentation_config: exports.SegmentationConfig,
35
+ })
36
+ .partial()
37
+ .strict()
38
+ .passthrough();
5
39
  exports.File = zod_1.z
6
40
  .object({
7
41
  id: zod_1.z.string(),
@@ -34,3 +68,38 @@ exports.File = zod_1.z
34
68
  })
35
69
  .strict()
36
70
  .passthrough();
71
+ exports.Segmentation = zod_1.z
72
+ .object({
73
+ segmentation_id: zod_1.z.string().uuid(),
74
+ status: zod_1.z.enum([
75
+ "pending",
76
+ "processing",
77
+ "completed",
78
+ "failed",
79
+ "not_applicable",
80
+ ]),
81
+ created_at: zod_1.z.number().gte(0),
82
+ file_id: zod_1.z.string().uuid(),
83
+ segmentation_config: exports.SegmentationConfig,
84
+ total_segments: zod_1.z.number().gte(0).optional(),
85
+ data: zod_1.z
86
+ .object({
87
+ object: zod_1.z.literal("list"),
88
+ segments: zod_1.z.array(zod_1.z
89
+ .object({
90
+ id: zod_1.z.string().uuid(),
91
+ start_time: zod_1.z.number(),
92
+ end_time: zod_1.z.number(),
93
+ })
94
+ .strict()
95
+ .passthrough()),
96
+ total: zod_1.z.number().int(),
97
+ limit: zod_1.z.number().int(),
98
+ offset: zod_1.z.number().int(),
99
+ })
100
+ .strict()
101
+ .passthrough()
102
+ .optional(),
103
+ })
104
+ .strict()
105
+ .passthrough();
@@ -4,3 +4,4 @@ export { CollectionsApi } from "./Collections";
4
4
  export { ChatApi } from "./Chat";
5
5
  export { TranscribeApi } from "./Transcribe";
6
6
  export { WebhooksApi } from "./Webhooks";
7
+ export { SegmentationsApi } from "./Segmentations";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebhooksApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = void 0;
3
+ exports.SegmentationsApi = exports.WebhooksApi = exports.TranscribeApi = exports.ChatApi = exports.CollectionsApi = exports.FilesApi = exports.ExtractApi = void 0;
4
4
  var Extract_1 = require("./Extract");
5
5
  Object.defineProperty(exports, "ExtractApi", { enumerable: true, get: function () { return Extract_1.ExtractApi; } });
6
6
  var Files_1 = require("./Files");
@@ -13,3 +13,5 @@ var Transcribe_1 = require("./Transcribe");
13
13
  Object.defineProperty(exports, "TranscribeApi", { enumerable: true, get: function () { return Transcribe_1.TranscribeApi; } });
14
14
  var Webhooks_1 = require("./Webhooks");
15
15
  Object.defineProperty(exports, "WebhooksApi", { enumerable: true, get: function () { return Webhooks_1.WebhooksApi; } });
16
+ var Segmentations_1 = require("./Segmentations");
17
+ Object.defineProperty(exports, "SegmentationsApi", { enumerable: true, get: function () { return Segmentations_1.SegmentationsApi; } });