@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.
- package/dist/generated/Collections.d.ts +46 -373
- package/dist/generated/Collections.js +67 -46
- package/dist/generated/Extract.d.ts +12 -57
- package/dist/generated/Extract.js +3 -1
- package/dist/generated/Files.d.ts +1526 -0
- package/dist/generated/Files.js +124 -0
- package/dist/generated/Segmentations.d.ts +1076 -0
- package/dist/generated/Segmentations.js +77 -0
- package/dist/generated/Transcribe.d.ts +13 -58
- package/dist/generated/Transcribe.js +14 -12
- package/dist/generated/Webhooks.d.ts +3 -3
- package/dist/generated/Webhooks.js +3 -3
- package/dist/generated/common.d.ts +894 -0
- package/dist/generated/common.js +70 -1
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +3 -1
- package/dist/src/client.d.ts +413 -20
- package/dist/src/client.js +59 -18
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +16 -7
- package/dist/src/types.d.ts +23 -1
- package/package.json +2 -2
- package/dist/generated/Describe.d.ts +0 -7027
- package/dist/generated/Describe.js +0 -159
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentationsApi = void 0;
|
|
4
|
+
exports.createApiClient = createApiClient;
|
|
5
|
+
const core_1 = require("@zodios/core");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const endpoints = (0, core_1.makeApi)([
|
|
9
|
+
{
|
|
10
|
+
method: "get",
|
|
11
|
+
path: "/segmentations/:segmentation_id",
|
|
12
|
+
alias: "getSegmentation",
|
|
13
|
+
description: `Retrieve details about a specific segmentation including its segments`,
|
|
14
|
+
requestFormat: "json",
|
|
15
|
+
parameters: [
|
|
16
|
+
{
|
|
17
|
+
name: "segmentation_id",
|
|
18
|
+
type: "Path",
|
|
19
|
+
schema: zod_1.z.string().uuid(),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "limit",
|
|
23
|
+
type: "Query",
|
|
24
|
+
schema: zod_1.z.number().int().gte(1).lte(100).optional().default(10),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "offset",
|
|
28
|
+
type: "Query",
|
|
29
|
+
schema: zod_1.z.number().int().gte(0).optional().default(0),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
response: common_1.Segmentation,
|
|
33
|
+
errors: [
|
|
34
|
+
{
|
|
35
|
+
status: 404,
|
|
36
|
+
description: `Segmentation not found`,
|
|
37
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
status: 500,
|
|
41
|
+
description: `An unexpected error occurred on the server`,
|
|
42
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
method: "delete",
|
|
48
|
+
path: "/segmentations/:segmentation_id",
|
|
49
|
+
alias: "deleteSegmentation",
|
|
50
|
+
description: `Delete a specific segmentation`,
|
|
51
|
+
requestFormat: "json",
|
|
52
|
+
parameters: [
|
|
53
|
+
{
|
|
54
|
+
name: "segmentation_id",
|
|
55
|
+
type: "Path",
|
|
56
|
+
schema: zod_1.z.string().uuid(),
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
response: zod_1.z.object({ id: zod_1.z.string().uuid() }).strict().passthrough(),
|
|
60
|
+
errors: [
|
|
61
|
+
{
|
|
62
|
+
status: 404,
|
|
63
|
+
description: `Segmentation not found`,
|
|
64
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
status: 500,
|
|
68
|
+
description: `An unexpected error occurred on the server`,
|
|
69
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
]);
|
|
74
|
+
exports.SegmentationsApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
|
|
75
|
+
function createApiClient(baseUrl, options) {
|
|
76
|
+
return new core_1.Zodios(baseUrl, endpoints, options);
|
|
77
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type ZodiosOptions } from "@zodios/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { FileSegmentationConfig } from "./common";
|
|
3
4
|
type Transcribe = {
|
|
4
5
|
job_id: string;
|
|
5
6
|
status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
|
|
6
7
|
url?: string | undefined;
|
|
7
8
|
created_at?: number | undefined;
|
|
8
9
|
transcribe_config?: Partial<{
|
|
9
|
-
|
|
10
|
+
enable_summary: boolean;
|
|
10
11
|
enable_speech: boolean;
|
|
11
12
|
enable_visual_scene_description: boolean;
|
|
12
13
|
enable_scene_text: boolean;
|
|
@@ -33,36 +34,26 @@ type Transcribe = {
|
|
|
33
34
|
}> | undefined;
|
|
34
35
|
error?: string | undefined;
|
|
35
36
|
};
|
|
37
|
+
type NewTranscribe = {
|
|
38
|
+
url: string;
|
|
39
|
+
enable_summary?: boolean | undefined;
|
|
40
|
+
enable_speech?: boolean | undefined;
|
|
41
|
+
enable_visual_scene_description?: boolean | undefined;
|
|
42
|
+
enable_scene_text?: boolean | undefined;
|
|
43
|
+
} & FileSegmentationConfig;
|
|
36
44
|
type TranscribeList = {
|
|
37
45
|
object: "list";
|
|
38
46
|
data: Array<Transcribe>;
|
|
39
47
|
total: number;
|
|
40
48
|
limit: number;
|
|
41
49
|
};
|
|
50
|
+
declare const NewTranscribe: z.ZodType<NewTranscribe>;
|
|
42
51
|
declare const Transcribe: z.ZodType<Transcribe>;
|
|
43
52
|
declare const TranscribeList: z.ZodType<TranscribeList>;
|
|
44
53
|
export declare const schemas: {
|
|
54
|
+
NewTranscribe: z.ZodType<NewTranscribe, z.ZodTypeDef, NewTranscribe>;
|
|
45
55
|
Transcribe: z.ZodType<Transcribe, z.ZodTypeDef, Transcribe>;
|
|
46
56
|
TranscribeList: z.ZodType<TranscribeList, z.ZodTypeDef, TranscribeList>;
|
|
47
|
-
NewTranscribe: z.ZodObject<{
|
|
48
|
-
url: z.ZodString;
|
|
49
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
50
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
51
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
52
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
53
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
54
|
-
url: z.ZodString;
|
|
55
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
56
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
57
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
59
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
60
|
-
url: z.ZodString;
|
|
61
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
62
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
63
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
64
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
65
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
66
57
|
};
|
|
67
58
|
export declare const TranscribeApi: import("@zodios/core").ZodiosInstance<[{
|
|
68
59
|
method: "post";
|
|
@@ -74,25 +65,7 @@ export declare const TranscribeApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
74
65
|
name: "body";
|
|
75
66
|
description: string;
|
|
76
67
|
type: "Body";
|
|
77
|
-
schema: z.
|
|
78
|
-
url: z.ZodString;
|
|
79
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
80
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
81
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
82
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
83
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
84
|
-
url: z.ZodString;
|
|
85
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
86
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
87
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
88
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
89
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
90
|
-
url: z.ZodString;
|
|
91
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
92
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
93
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
94
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
95
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
68
|
+
schema: z.ZodType<NewTranscribe, z.ZodTypeDef, NewTranscribe>;
|
|
96
69
|
}];
|
|
97
70
|
response: z.ZodType<Transcribe, z.ZodTypeDef, Transcribe>;
|
|
98
71
|
errors: [{
|
|
@@ -241,25 +214,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
241
214
|
name: "body";
|
|
242
215
|
description: string;
|
|
243
216
|
type: "Body";
|
|
244
|
-
schema: z.
|
|
245
|
-
url: z.ZodString;
|
|
246
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
247
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
248
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
249
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
250
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
251
|
-
url: z.ZodString;
|
|
252
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
253
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
254
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
255
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
256
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
257
|
-
url: z.ZodString;
|
|
258
|
-
enable_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
259
|
-
enable_speech: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
260
|
-
enable_visual_scene_description: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
261
|
-
enable_scene_text: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
262
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
217
|
+
schema: z.ZodType<NewTranscribe, z.ZodTypeDef, NewTranscribe>;
|
|
263
218
|
}];
|
|
264
219
|
response: z.ZodType<Transcribe, z.ZodTypeDef, Transcribe>;
|
|
265
220
|
errors: [{
|
|
@@ -4,6 +4,18 @@ exports.TranscribeApi = exports.schemas = void 0;
|
|
|
4
4
|
exports.createApiClient = createApiClient;
|
|
5
5
|
const core_1 = require("@zodios/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const NewTranscribe = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
url: zod_1.z.string(),
|
|
11
|
+
enable_summary: zod_1.z.boolean().optional().default(true),
|
|
12
|
+
enable_speech: zod_1.z.boolean().optional().default(true),
|
|
13
|
+
enable_visual_scene_description: zod_1.z.boolean().optional().default(false),
|
|
14
|
+
enable_scene_text: zod_1.z.boolean().optional().default(false),
|
|
15
|
+
})
|
|
16
|
+
.strict()
|
|
17
|
+
.passthrough()
|
|
18
|
+
.and(common_1.FileSegmentationConfig);
|
|
7
19
|
const Transcribe = zod_1.z
|
|
8
20
|
.object({
|
|
9
21
|
job_id: zod_1.z.string(),
|
|
@@ -18,7 +30,7 @@ const Transcribe = zod_1.z
|
|
|
18
30
|
created_at: zod_1.z.number().int().optional(),
|
|
19
31
|
transcribe_config: zod_1.z
|
|
20
32
|
.object({
|
|
21
|
-
|
|
33
|
+
enable_summary: zod_1.z.boolean(),
|
|
22
34
|
enable_speech: zod_1.z.boolean(),
|
|
23
35
|
enable_visual_scene_description: zod_1.z.boolean(),
|
|
24
36
|
enable_scene_text: zod_1.z.boolean(),
|
|
@@ -77,20 +89,10 @@ const TranscribeList = zod_1.z
|
|
|
77
89
|
})
|
|
78
90
|
.strict()
|
|
79
91
|
.passthrough();
|
|
80
|
-
const NewTranscribe = zod_1.z
|
|
81
|
-
.object({
|
|
82
|
-
url: zod_1.z.string(),
|
|
83
|
-
enable_summary: zod_1.z.boolean().optional().default(true),
|
|
84
|
-
enable_speech: zod_1.z.boolean().optional().default(true),
|
|
85
|
-
enable_visual_scene_description: zod_1.z.boolean().optional().default(false),
|
|
86
|
-
enable_scene_text: zod_1.z.boolean().optional().default(false),
|
|
87
|
-
})
|
|
88
|
-
.strict()
|
|
89
|
-
.passthrough();
|
|
90
92
|
exports.schemas = {
|
|
93
|
+
NewTranscribe,
|
|
91
94
|
Transcribe,
|
|
92
95
|
TranscribeList,
|
|
93
|
-
NewTranscribe,
|
|
94
96
|
};
|
|
95
97
|
const endpoints = (0, core_1.makeApi)([
|
|
96
98
|
{
|
|
@@ -17,12 +17,12 @@ type Webhook = {
|
|
|
17
17
|
description?: string | undefined;
|
|
18
18
|
subscribed_events: Array<WebhookEvents>;
|
|
19
19
|
};
|
|
20
|
-
type WebhookEvents = "
|
|
21
|
-
declare const WebhookEvents: z.ZodEnum<["
|
|
20
|
+
type WebhookEvents = "describe.job.processing" | "describe.job.completed" | "describe.job.failed" | "extract.job.processing" | "extract.job.completed" | "extract.job.failed" | "file.job.processing" | "file.job.completed" | "file.job.failed" | "file.job.deleted" | "collection.file.job.processing" | "collection.file.job.completed" | "collection.file.job.failed" | "collection.file.job.deleted";
|
|
21
|
+
declare const WebhookEvents: z.ZodEnum<["describe.job.processing", "describe.job.completed", "describe.job.failed", "extract.job.processing", "extract.job.completed", "extract.job.failed", "file.job.processing", "file.job.completed", "file.job.failed", "file.job.deleted", "collection.file.job.processing", "collection.file.job.completed", "collection.file.job.failed", "collection.file.job.deleted"]>;
|
|
22
22
|
declare const Webhook: z.ZodType<Webhook>;
|
|
23
23
|
declare const WebhookList: z.ZodType<WebhookList>;
|
|
24
24
|
export declare const schemas: {
|
|
25
|
-
WebhookEvents: z.ZodEnum<["
|
|
25
|
+
WebhookEvents: z.ZodEnum<["describe.job.processing", "describe.job.completed", "describe.job.failed", "extract.job.processing", "extract.job.completed", "extract.job.failed", "file.job.processing", "file.job.completed", "file.job.failed", "file.job.deleted", "collection.file.job.processing", "collection.file.job.completed", "collection.file.job.failed", "collection.file.job.deleted"]>;
|
|
26
26
|
Webhook: z.ZodType<Webhook, z.ZodTypeDef, Webhook>;
|
|
27
27
|
WebhookList: z.ZodType<WebhookList, z.ZodTypeDef, WebhookList>;
|
|
28
28
|
WebhookCreateRequest: z.ZodType<Partial<{
|
|
@@ -5,9 +5,9 @@ exports.createApiClient = createApiClient;
|
|
|
5
5
|
const core_1 = require("@zodios/core");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const WebhookEvents = zod_1.z.enum([
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"describe.job.processing",
|
|
9
|
+
"describe.job.completed",
|
|
10
|
+
"describe.job.failed",
|
|
11
11
|
"extract.job.processing",
|
|
12
12
|
"extract.job.completed",
|
|
13
13
|
"extract.job.failed",
|