@aviaryhq/cloudglue-js 0.5.9 → 0.6.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.
@@ -6,6 +6,7 @@ const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
7
  const common_1 = require("./common");
8
8
  const common_2 = require("./common");
9
+ const common_3 = require("./common");
9
10
  const endpoints = (0, core_1.makeApi)([
10
11
  {
11
12
  method: 'get',
@@ -118,6 +119,53 @@ const endpoints = (0, core_1.makeApi)([
118
119
  },
119
120
  ],
120
121
  },
122
+ {
123
+ method: 'get',
124
+ path: '/segmentations/:segmentation_id/describes',
125
+ alias: 'listSegmentationDescribes',
126
+ description: `List all describe jobs that referenced the specified segmentation. Returns describe job records associated with the segmentation.`,
127
+ requestFormat: 'json',
128
+ parameters: [
129
+ {
130
+ name: 'segmentation_id',
131
+ type: 'Path',
132
+ schema: zod_1.z.string().uuid(),
133
+ },
134
+ {
135
+ name: 'include_data',
136
+ type: 'Query',
137
+ schema: zod_1.z.boolean().optional().default(false),
138
+ },
139
+ {
140
+ name: 'response_format',
141
+ type: 'Query',
142
+ schema: zod_1.z.enum(['json', 'markdown']).optional().default('json'),
143
+ },
144
+ {
145
+ name: 'limit',
146
+ type: 'Query',
147
+ schema: zod_1.z.number().int().gte(1).lte(100).optional().default(50),
148
+ },
149
+ {
150
+ name: 'offset',
151
+ type: 'Query',
152
+ schema: zod_1.z.number().int().gte(0).optional().default(0),
153
+ },
154
+ ],
155
+ response: common_3.DescribeList,
156
+ errors: [
157
+ {
158
+ status: 404,
159
+ description: `Segmentation not found`,
160
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
161
+ },
162
+ {
163
+ status: 500,
164
+ description: `An unexpected error occurred on the server`,
165
+ schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
166
+ },
167
+ ],
168
+ },
121
169
  ]);
122
170
  exports.SegmentationsApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
123
171
  function createApiClient(baseUrl, options) {
@@ -1,6 +1,8 @@
1
1
  import { type ZodiosOptions } from '@zodios/core';
2
2
  import { z } from 'zod';
3
+ import { NarrativeConfig } from './common';
3
4
  import { Shot } from './common';
5
+ import { Chapter } from './common';
4
6
  type Segments = {
5
7
  job_id: string;
6
8
  file_id: string;
@@ -12,8 +14,10 @@ type Segments = {
12
14
  narrative_config?: NarrativeConfig | undefined;
13
15
  total_segments?: number | undefined;
14
16
  total_shots?: number | undefined;
17
+ total_chapters?: number | undefined;
15
18
  segments?: Array<Segment> | undefined;
16
19
  shots?: Array<Shot> | undefined;
20
+ chapters?: Array<Chapter> | undefined;
17
21
  };
18
22
  type NewSegments = {
19
23
  url: string;
@@ -26,13 +30,6 @@ type ShotConfig = Partial<{
26
30
  max_duration_seconds: number;
27
31
  min_duration_seconds: number;
28
32
  }>;
29
- type NarrativeConfig = Partial<{
30
- prompt: string;
31
- strategy: 'comprehensive' | 'balanced';
32
- number_of_chapters: number;
33
- min_chapters: number;
34
- max_chapters: number;
35
- }>;
36
33
  type Segment = {
37
34
  start_time: number;
38
35
  end_time: number;
@@ -58,7 +55,6 @@ type SegmentsListItem = {
58
55
  narrative_config?: NarrativeConfig | undefined;
59
56
  };
60
57
  declare const ShotConfig: z.ZodType<ShotConfig>;
61
- declare const NarrativeConfig: z.ZodType<NarrativeConfig>;
62
58
  declare const NewSegments: z.ZodType<NewSegments>;
63
59
  declare const Segment: z.ZodType<Segment>;
64
60
  declare const Segments: z.ZodType<Segments>;
@@ -74,19 +70,6 @@ export declare const schemas: {
74
70
  max_duration_seconds: number;
75
71
  min_duration_seconds: number;
76
72
  }>>;
77
- NarrativeConfig: z.ZodType<Partial<{
78
- prompt: string;
79
- strategy: "comprehensive" | "balanced";
80
- number_of_chapters: number;
81
- min_chapters: number;
82
- max_chapters: number;
83
- }>, z.ZodTypeDef, Partial<{
84
- prompt: string;
85
- strategy: "comprehensive" | "balanced";
86
- number_of_chapters: number;
87
- min_chapters: number;
88
- max_chapters: number;
89
- }>>;
90
73
  NewSegments: z.ZodType<NewSegments, z.ZodTypeDef, NewSegments>;
91
74
  Segment: z.ZodType<Segment, z.ZodTypeDef, Segment>;
92
75
  Segments: z.ZodType<Segments, z.ZodTypeDef, Segments>;
@@ -5,6 +5,8 @@ exports.createApiClient = createApiClient;
5
5
  const core_1 = require("@zodios/core");
6
6
  const zod_1 = require("zod");
7
7
  const common_1 = require("./common");
8
+ const common_2 = require("./common");
9
+ const common_3 = require("./common");
8
10
  const ShotConfig = zod_1.z
9
11
  .object({
10
12
  detector: zod_1.z.enum(['content', 'adaptive']).default('adaptive'),
@@ -14,23 +16,12 @@ const ShotConfig = zod_1.z
14
16
  .partial()
15
17
  .strict()
16
18
  .passthrough();
17
- const NarrativeConfig = zod_1.z
18
- .object({
19
- prompt: zod_1.z.string(),
20
- strategy: zod_1.z.enum(['comprehensive', 'balanced']).default('balanced'),
21
- number_of_chapters: zod_1.z.number().int().gte(1),
22
- min_chapters: zod_1.z.number().int().gte(1),
23
- max_chapters: zod_1.z.number().int().gte(1),
24
- })
25
- .partial()
26
- .strict()
27
- .passthrough();
28
19
  const NewSegments = zod_1.z
29
20
  .object({
30
21
  url: zod_1.z.string(),
31
22
  criteria: zod_1.z.enum(['shot', 'narrative']),
32
23
  shot_config: ShotConfig.optional(),
33
- narrative_config: NarrativeConfig.optional(),
24
+ narrative_config: common_1.NarrativeConfig.optional(),
34
25
  })
35
26
  .strict()
36
27
  .passthrough();
@@ -53,11 +44,13 @@ const Segments = zod_1.z
53
44
  criteria: zod_1.z.enum(['shot', 'narrative']),
54
45
  created_at: zod_1.z.number().int(),
55
46
  shot_config: ShotConfig.optional(),
56
- narrative_config: NarrativeConfig.optional(),
47
+ narrative_config: common_1.NarrativeConfig.optional(),
57
48
  total_segments: zod_1.z.number().int().gte(0).optional(),
58
49
  total_shots: zod_1.z.number().int().gte(0).optional(),
50
+ total_chapters: zod_1.z.number().int().gte(0).optional(),
59
51
  segments: zod_1.z.array(Segment).optional(),
60
- shots: zod_1.z.array(common_1.Shot).optional(),
52
+ shots: zod_1.z.array(common_2.Shot).optional(),
53
+ chapters: zod_1.z.array(common_3.Chapter).optional(),
61
54
  })
62
55
  .strict()
63
56
  .passthrough();
@@ -70,7 +63,7 @@ const SegmentsListItem = zod_1.z
70
63
  criteria: zod_1.z.enum(['shot', 'narrative']),
71
64
  created_at: zod_1.z.number().int(),
72
65
  shot_config: ShotConfig.optional(),
73
- narrative_config: NarrativeConfig.optional(),
66
+ narrative_config: common_1.NarrativeConfig.optional(),
74
67
  })
75
68
  .strict()
76
69
  .passthrough();
@@ -86,7 +79,6 @@ const SegmentsList = zod_1.z
86
79
  .passthrough();
87
80
  exports.schemas = {
88
81
  ShotConfig,
89
- NarrativeConfig,
90
82
  NewSegments,
91
83
  Segment,
92
84
  Segments,