@aviaryhq/cloudglue-js 0.4.9 → 0.4.11
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/Describe.d.ts +86 -0
- package/dist/generated/Describe.js +32 -0
- package/dist/generated/Extract.d.ts +86 -0
- package/dist/generated/Extract.js +32 -0
- package/dist/src/client.d.ts +8 -0
- package/dist/src/client.js +7 -1
- package/package.json +10 -3
|
@@ -140,6 +140,10 @@ export declare const DescribeApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
140
140
|
name: "response_format";
|
|
141
141
|
type: "Query";
|
|
142
142
|
schema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json", "markdown"]>>>;
|
|
143
|
+
}, {
|
|
144
|
+
name: "include_data";
|
|
145
|
+
type: "Query";
|
|
146
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
143
147
|
}];
|
|
144
148
|
response: z.ZodType<DescribeList, z.ZodTypeDef, DescribeList>;
|
|
145
149
|
errors: [{
|
|
@@ -208,6 +212,45 @@ export declare const DescribeApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
208
212
|
error: z.ZodString;
|
|
209
213
|
}, z.ZodTypeAny, "passthrough">>;
|
|
210
214
|
}];
|
|
215
|
+
}, {
|
|
216
|
+
method: "delete";
|
|
217
|
+
path: "/describe/:job_id";
|
|
218
|
+
alias: "deleteDescribe";
|
|
219
|
+
description: "Delete a media description job";
|
|
220
|
+
requestFormat: "json";
|
|
221
|
+
parameters: [{
|
|
222
|
+
name: "job_id";
|
|
223
|
+
type: "Path";
|
|
224
|
+
schema: z.ZodString;
|
|
225
|
+
}];
|
|
226
|
+
response: z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
229
|
+
id: z.ZodString;
|
|
230
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
233
|
+
errors: [{
|
|
234
|
+
status: 404;
|
|
235
|
+
description: string;
|
|
236
|
+
schema: z.ZodObject<{
|
|
237
|
+
error: z.ZodString;
|
|
238
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
239
|
+
error: z.ZodString;
|
|
240
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
241
|
+
error: z.ZodString;
|
|
242
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
243
|
+
}, {
|
|
244
|
+
status: 500;
|
|
245
|
+
description: string;
|
|
246
|
+
schema: z.ZodObject<{
|
|
247
|
+
error: z.ZodString;
|
|
248
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
249
|
+
error: z.ZodString;
|
|
250
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
251
|
+
error: z.ZodString;
|
|
252
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
253
|
+
}];
|
|
211
254
|
}]>;
|
|
212
255
|
export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
|
|
213
256
|
method: "post";
|
|
@@ -297,6 +340,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
297
340
|
name: "response_format";
|
|
298
341
|
type: "Query";
|
|
299
342
|
schema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["json", "markdown"]>>>;
|
|
343
|
+
}, {
|
|
344
|
+
name: "include_data";
|
|
345
|
+
type: "Query";
|
|
346
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
300
347
|
}];
|
|
301
348
|
response: z.ZodType<DescribeList, z.ZodTypeDef, DescribeList>;
|
|
302
349
|
errors: [{
|
|
@@ -365,5 +412,44 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
365
412
|
error: z.ZodString;
|
|
366
413
|
}, z.ZodTypeAny, "passthrough">>;
|
|
367
414
|
}];
|
|
415
|
+
}, {
|
|
416
|
+
method: "delete";
|
|
417
|
+
path: "/describe/:job_id";
|
|
418
|
+
alias: "deleteDescribe";
|
|
419
|
+
description: "Delete a media description job";
|
|
420
|
+
requestFormat: "json";
|
|
421
|
+
parameters: [{
|
|
422
|
+
name: "job_id";
|
|
423
|
+
type: "Path";
|
|
424
|
+
schema: z.ZodString;
|
|
425
|
+
}];
|
|
426
|
+
response: z.ZodObject<{
|
|
427
|
+
id: z.ZodString;
|
|
428
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
429
|
+
id: z.ZodString;
|
|
430
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
431
|
+
id: z.ZodString;
|
|
432
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
433
|
+
errors: [{
|
|
434
|
+
status: 404;
|
|
435
|
+
description: string;
|
|
436
|
+
schema: z.ZodObject<{
|
|
437
|
+
error: z.ZodString;
|
|
438
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
439
|
+
error: z.ZodString;
|
|
440
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
441
|
+
error: z.ZodString;
|
|
442
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
443
|
+
}, {
|
|
444
|
+
status: 500;
|
|
445
|
+
description: string;
|
|
446
|
+
schema: z.ZodObject<{
|
|
447
|
+
error: z.ZodString;
|
|
448
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
449
|
+
error: z.ZodString;
|
|
450
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
451
|
+
error: z.ZodString;
|
|
452
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
453
|
+
}];
|
|
368
454
|
}]>;
|
|
369
455
|
export {};
|
|
@@ -173,6 +173,11 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
173
173
|
type: "Query",
|
|
174
174
|
schema: zod_1.z.enum(["json", "markdown"]).optional().default("json"),
|
|
175
175
|
},
|
|
176
|
+
{
|
|
177
|
+
name: "include_data",
|
|
178
|
+
type: "Query",
|
|
179
|
+
schema: zod_1.z.boolean().optional().default(true),
|
|
180
|
+
},
|
|
176
181
|
],
|
|
177
182
|
response: DescribeList,
|
|
178
183
|
errors: [
|
|
@@ -230,6 +235,33 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
230
235
|
},
|
|
231
236
|
],
|
|
232
237
|
},
|
|
238
|
+
{
|
|
239
|
+
method: "delete",
|
|
240
|
+
path: "/describe/:job_id",
|
|
241
|
+
alias: "deleteDescribe",
|
|
242
|
+
description: `Delete a media description job`,
|
|
243
|
+
requestFormat: "json",
|
|
244
|
+
parameters: [
|
|
245
|
+
{
|
|
246
|
+
name: "job_id",
|
|
247
|
+
type: "Path",
|
|
248
|
+
schema: zod_1.z.string(),
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
response: zod_1.z.object({ id: zod_1.z.string() }).strict().passthrough(),
|
|
252
|
+
errors: [
|
|
253
|
+
{
|
|
254
|
+
status: 404,
|
|
255
|
+
description: `Job not found`,
|
|
256
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
status: 500,
|
|
260
|
+
description: `An unexpected error occurred on the server`,
|
|
261
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
},
|
|
233
265
|
]);
|
|
234
266
|
exports.DescribeApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
|
|
235
267
|
function createApiClient(baseUrl, options) {
|
|
@@ -134,6 +134,10 @@ export declare const ExtractApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
134
134
|
name: "url";
|
|
135
135
|
type: "Query";
|
|
136
136
|
schema: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, {
|
|
138
|
+
name: "include_data";
|
|
139
|
+
type: "Query";
|
|
140
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
137
141
|
}];
|
|
138
142
|
response: z.ZodType<ExtractList, z.ZodTypeDef, ExtractList>;
|
|
139
143
|
errors: [{
|
|
@@ -218,6 +222,45 @@ export declare const ExtractApi: import("@zodios/core").ZodiosInstance<[{
|
|
|
218
222
|
error: z.ZodString;
|
|
219
223
|
}, z.ZodTypeAny, "passthrough">>;
|
|
220
224
|
}];
|
|
225
|
+
}, {
|
|
226
|
+
method: "delete";
|
|
227
|
+
path: "/extract/:job_id";
|
|
228
|
+
alias: "deleteExtract";
|
|
229
|
+
description: "Delete an extraction job";
|
|
230
|
+
requestFormat: "json";
|
|
231
|
+
parameters: [{
|
|
232
|
+
name: "job_id";
|
|
233
|
+
type: "Path";
|
|
234
|
+
schema: z.ZodString;
|
|
235
|
+
}];
|
|
236
|
+
response: z.ZodObject<{
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
239
|
+
id: z.ZodString;
|
|
240
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
243
|
+
errors: [{
|
|
244
|
+
status: 404;
|
|
245
|
+
description: string;
|
|
246
|
+
schema: z.ZodObject<{
|
|
247
|
+
error: z.ZodString;
|
|
248
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
249
|
+
error: z.ZodString;
|
|
250
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
251
|
+
error: z.ZodString;
|
|
252
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
253
|
+
}, {
|
|
254
|
+
status: 500;
|
|
255
|
+
description: string;
|
|
256
|
+
schema: z.ZodObject<{
|
|
257
|
+
error: z.ZodString;
|
|
258
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
259
|
+
error: z.ZodString;
|
|
260
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
261
|
+
error: z.ZodString;
|
|
262
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
263
|
+
}];
|
|
221
264
|
}]>;
|
|
222
265
|
export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
|
|
223
266
|
method: "post";
|
|
@@ -303,6 +346,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
303
346
|
name: "url";
|
|
304
347
|
type: "Query";
|
|
305
348
|
schema: z.ZodOptional<z.ZodString>;
|
|
349
|
+
}, {
|
|
350
|
+
name: "include_data";
|
|
351
|
+
type: "Query";
|
|
352
|
+
schema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
306
353
|
}];
|
|
307
354
|
response: z.ZodType<ExtractList, z.ZodTypeDef, ExtractList>;
|
|
308
355
|
errors: [{
|
|
@@ -387,5 +434,44 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
387
434
|
error: z.ZodString;
|
|
388
435
|
}, z.ZodTypeAny, "passthrough">>;
|
|
389
436
|
}];
|
|
437
|
+
}, {
|
|
438
|
+
method: "delete";
|
|
439
|
+
path: "/extract/:job_id";
|
|
440
|
+
alias: "deleteExtract";
|
|
441
|
+
description: "Delete an extraction job";
|
|
442
|
+
requestFormat: "json";
|
|
443
|
+
parameters: [{
|
|
444
|
+
name: "job_id";
|
|
445
|
+
type: "Path";
|
|
446
|
+
schema: z.ZodString;
|
|
447
|
+
}];
|
|
448
|
+
response: z.ZodObject<{
|
|
449
|
+
id: z.ZodString;
|
|
450
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
451
|
+
id: z.ZodString;
|
|
452
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
453
|
+
id: z.ZodString;
|
|
454
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
455
|
+
errors: [{
|
|
456
|
+
status: 404;
|
|
457
|
+
description: string;
|
|
458
|
+
schema: z.ZodObject<{
|
|
459
|
+
error: z.ZodString;
|
|
460
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
461
|
+
error: z.ZodString;
|
|
462
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
463
|
+
error: z.ZodString;
|
|
464
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
465
|
+
}, {
|
|
466
|
+
status: 500;
|
|
467
|
+
description: string;
|
|
468
|
+
schema: z.ZodObject<{
|
|
469
|
+
error: z.ZodString;
|
|
470
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
471
|
+
error: z.ZodString;
|
|
472
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
473
|
+
error: z.ZodString;
|
|
474
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
475
|
+
}];
|
|
390
476
|
}]>;
|
|
391
477
|
export {};
|
|
@@ -165,6 +165,11 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
165
165
|
type: "Query",
|
|
166
166
|
schema: zod_1.z.string().optional(),
|
|
167
167
|
},
|
|
168
|
+
{
|
|
169
|
+
name: "include_data",
|
|
170
|
+
type: "Query",
|
|
171
|
+
schema: zod_1.z.boolean().optional().default(true),
|
|
172
|
+
},
|
|
168
173
|
],
|
|
169
174
|
response: ExtractList,
|
|
170
175
|
errors: [
|
|
@@ -227,6 +232,33 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
227
232
|
},
|
|
228
233
|
],
|
|
229
234
|
},
|
|
235
|
+
{
|
|
236
|
+
method: "delete",
|
|
237
|
+
path: "/extract/:job_id",
|
|
238
|
+
alias: "deleteExtract",
|
|
239
|
+
description: `Delete an extraction job`,
|
|
240
|
+
requestFormat: "json",
|
|
241
|
+
parameters: [
|
|
242
|
+
{
|
|
243
|
+
name: "job_id",
|
|
244
|
+
type: "Path",
|
|
245
|
+
schema: zod_1.z.string(),
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
response: zod_1.z.object({ id: zod_1.z.string() }).strict().passthrough(),
|
|
249
|
+
errors: [
|
|
250
|
+
{
|
|
251
|
+
status: 404,
|
|
252
|
+
description: `Job not found`,
|
|
253
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
status: 500,
|
|
257
|
+
description: `An unexpected error occurred on the server`,
|
|
258
|
+
schema: zod_1.z.object({ error: zod_1.z.string() }).strict().passthrough(),
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
},
|
|
230
262
|
]);
|
|
231
263
|
exports.ExtractApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
|
|
232
264
|
function createApiClient(baseUrl, options) {
|
package/dist/src/client.d.ts
CHANGED
|
@@ -1630,6 +1630,7 @@ declare class EnhancedExtractApi {
|
|
|
1630
1630
|
created_before?: string;
|
|
1631
1631
|
created_after?: string;
|
|
1632
1632
|
url?: string;
|
|
1633
|
+
include_data?: boolean;
|
|
1633
1634
|
}): Promise<{
|
|
1634
1635
|
object: "list";
|
|
1635
1636
|
data: Array<{
|
|
@@ -1661,6 +1662,9 @@ declare class EnhancedExtractApi {
|
|
|
1661
1662
|
limit: number;
|
|
1662
1663
|
offset: number;
|
|
1663
1664
|
}>;
|
|
1665
|
+
deleteExtract(jobId: string): Promise<import("zod").objectOutputType<{
|
|
1666
|
+
id: import("zod").ZodString;
|
|
1667
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
1664
1668
|
/**
|
|
1665
1669
|
* Waits for an extraction job to be ready by polling the getExtract endpoint until
|
|
1666
1670
|
* the job reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
|
@@ -2255,6 +2259,7 @@ declare class EnhancedDescribeApi {
|
|
|
2255
2259
|
created_after?: string;
|
|
2256
2260
|
url?: string;
|
|
2257
2261
|
response_format?: "json" | "markdown";
|
|
2262
|
+
include_data?: boolean;
|
|
2258
2263
|
}): Promise<{
|
|
2259
2264
|
object: "list";
|
|
2260
2265
|
data: Array<{
|
|
@@ -2286,6 +2291,9 @@ declare class EnhancedDescribeApi {
|
|
|
2286
2291
|
total: number;
|
|
2287
2292
|
limit: number;
|
|
2288
2293
|
}>;
|
|
2294
|
+
deleteDescribe(jobId: string): Promise<import("zod").objectOutputType<{
|
|
2295
|
+
id: import("zod").ZodString;
|
|
2296
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
2289
2297
|
/**
|
|
2290
2298
|
* Waits for a description job to be ready by polling the getDescribe endpoint until
|
|
2291
2299
|
* the job reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
package/dist/src/client.js
CHANGED
|
@@ -360,6 +360,9 @@ class EnhancedExtractApi {
|
|
|
360
360
|
async listExtracts(params = {}) {
|
|
361
361
|
return this.api.listExtracts({ queries: params });
|
|
362
362
|
}
|
|
363
|
+
async deleteExtract(jobId) {
|
|
364
|
+
return this.api.deleteExtract(undefined, { params: { job_id: jobId } });
|
|
365
|
+
}
|
|
363
366
|
/**
|
|
364
367
|
* Waits for an extraction job to be ready by polling the getExtract endpoint until
|
|
365
368
|
* the job reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
|
@@ -448,6 +451,9 @@ class EnhancedDescribeApi {
|
|
|
448
451
|
async listDescribes(params = {}) {
|
|
449
452
|
return this.api.listDescribes({ queries: params });
|
|
450
453
|
}
|
|
454
|
+
async deleteDescribe(jobId) {
|
|
455
|
+
return this.api.deleteDescribe(undefined, { params: { job_id: jobId } });
|
|
456
|
+
}
|
|
451
457
|
/**
|
|
452
458
|
* Waits for a description job to be ready by polling the getDescribe endpoint until
|
|
453
459
|
* the job reaches a terminal state (completed, failed, or not_applicable) or until maxAttempts is reached.
|
|
@@ -645,7 +651,7 @@ class CloudGlue {
|
|
|
645
651
|
headers: {
|
|
646
652
|
Authorization: `Bearer ${this.apiKey}`,
|
|
647
653
|
'x-sdk-client': 'cloudglue-js',
|
|
648
|
-
'x-sdk-version': '0.4.
|
|
654
|
+
'x-sdk-version': '0.4.11',
|
|
649
655
|
},
|
|
650
656
|
baseURL: this.baseUrl,
|
|
651
657
|
timeout: this.timeout,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aviaryhq/cloudglue-js",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"description": "Cloudglue API client for Node.js",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -33,16 +33,23 @@
|
|
|
33
33
|
"homepage": "https://github.com/aviaryhq/cloudglue-js#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@zodios/core": "^10.0.0",
|
|
36
|
-
"axios": "^1.
|
|
36
|
+
"axios": "^1.12.0",
|
|
37
37
|
"zod": "^3.22.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^20.0.0",
|
|
41
41
|
"openapi-zod-client": "^1.18.3",
|
|
42
|
-
"rimraf": "^
|
|
42
|
+
"rimraf": "^6.1.2",
|
|
43
43
|
"typescript": "^5.3.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@zodios/core": "^10.0.0"
|
|
47
|
+
},
|
|
48
|
+
"pnpm": {
|
|
49
|
+
"overrides": {
|
|
50
|
+
"js-yaml": "^4.1.1",
|
|
51
|
+
"axios": "^1.12.0",
|
|
52
|
+
"glob": "^10.5.0"
|
|
53
|
+
}
|
|
47
54
|
}
|
|
48
55
|
}
|