@aviaryhq/cloudglue-js 0.4.11 → 0.4.13

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.
Files changed (66) hide show
  1. package/dist/generated/Chat.d.ts +8 -8
  2. package/dist/generated/Chat.js +30 -30
  3. package/dist/generated/Collections.d.ts +25 -23
  4. package/dist/generated/Collections.js +266 -264
  5. package/dist/generated/Describe.d.ts +7 -7
  6. package/dist/generated/Describe.js +58 -58
  7. package/dist/generated/Extract.d.ts +6 -6
  8. package/dist/generated/Extract.js +52 -52
  9. package/dist/generated/Face_Detection.d.ts +6 -6
  10. package/dist/generated/Face_Detection.js +25 -25
  11. package/dist/generated/Face_Match.d.ts +6 -6
  12. package/dist/generated/Face_Match.js +26 -26
  13. package/dist/generated/Files.d.ts +1009 -10
  14. package/dist/generated/Files.js +247 -115
  15. package/dist/generated/Frames.d.ts +2 -2
  16. package/dist/generated/Frames.js +17 -17
  17. package/dist/generated/Search.d.ts +212 -19
  18. package/dist/generated/Search.js +143 -30
  19. package/dist/generated/Segmentations.d.ts +208 -2
  20. package/dist/generated/Segmentations.js +34 -29
  21. package/dist/generated/Segments.d.ts +13 -13
  22. package/dist/generated/Segments.js +49 -49
  23. package/dist/generated/Tags.d.ts +660 -0
  24. package/dist/generated/Tags.js +160 -0
  25. package/dist/generated/Transcribe.d.ts +7 -7
  26. package/dist/generated/Transcribe.js +46 -46
  27. package/dist/generated/Webhooks.d.ts +5 -5
  28. package/dist/generated/Webhooks.js +61 -61
  29. package/dist/generated/common.d.ts +391 -11
  30. package/dist/generated/common.js +63 -28
  31. package/dist/generated/index.d.ts +14 -13
  32. package/dist/generated/index.js +3 -1
  33. package/dist/src/api/chat-completion.api.d.ts +38 -0
  34. package/dist/src/api/chat-completion.api.js +15 -0
  35. package/dist/src/api/collections.api.d.ts +666 -0
  36. package/dist/src/api/collections.api.js +134 -0
  37. package/dist/src/api/describe.api.d.ts +153 -0
  38. package/dist/src/api/describe.api.js +57 -0
  39. package/dist/src/api/extract.api.d.ts +144 -0
  40. package/dist/src/api/extract.api.js +55 -0
  41. package/dist/src/api/face-detection.api.d.ts +77 -0
  42. package/dist/src/api/face-detection.api.js +41 -0
  43. package/dist/src/api/face-match.api.d.ts +94 -0
  44. package/dist/src/api/face-match.api.js +41 -0
  45. package/dist/src/api/files.api.d.ts +705 -0
  46. package/dist/src/api/files.api.js +146 -0
  47. package/dist/src/api/frame-extraction.api.d.ts +264 -0
  48. package/dist/src/api/frame-extraction.api.js +37 -0
  49. package/dist/src/api/search.api.d.ts +316 -0
  50. package/dist/src/api/search.api.js +22 -0
  51. package/dist/src/api/segmentations.api.d.ts +395 -0
  52. package/dist/src/api/segmentations.api.js +36 -0
  53. package/dist/src/api/segments.api.d.ts +141 -0
  54. package/dist/src/api/segments.api.js +40 -0
  55. package/dist/src/api/tags.api.d.ts +71 -0
  56. package/dist/src/api/tags.api.js +31 -0
  57. package/dist/src/api/transcribe.api.d.ts +150 -0
  58. package/dist/src/api/transcribe.api.js +65 -0
  59. package/dist/src/api/webhooks.api.d.ts +69 -0
  60. package/dist/src/api/webhooks.api.js +28 -0
  61. package/dist/src/client.d.ts +20 -2967
  62. package/dist/src/client.js +55 -643
  63. package/dist/src/error.d.ts +7 -0
  64. package/dist/src/error.js +14 -0
  65. package/dist/src/types.d.ts +20 -8
  66. package/package.json +2 -1
@@ -1,26 +1,26 @@
1
- import { type ZodiosOptions } from "@zodios/core";
2
- import { z } from "zod";
3
- import { DescribeOutput } from "./common";
1
+ import { type ZodiosOptions } from '@zodios/core';
2
+ import { z } from 'zod';
3
+ import { DescribeOutput } from './common';
4
4
  type ChatCompletionRequest = {
5
- model: "nimbus-001";
5
+ model: 'nimbus-001';
6
6
  messages: Array<ChatMessage>;
7
7
  collections: Array<string>;
8
8
  filter?: Partial<{
9
9
  metadata: Array<{
10
10
  path: string;
11
- operator: "NotEqual" | "Equal" | "LessThan" | "GreaterThan" | "In" | "ContainsAny" | "ContainsAll";
11
+ operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
12
12
  valueText?: string | undefined;
13
13
  valueTextArray?: Array<string> | undefined;
14
14
  }>;
15
15
  video_info: Array<{
16
16
  path: string;
17
- operator: "NotEqual" | "Equal" | "LessThan" | "GreaterThan" | "In" | "ContainsAny" | "ContainsAll";
17
+ operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
18
18
  valueText?: string | undefined;
19
19
  valueTextArray?: Array<string> | undefined;
20
20
  }>;
21
21
  file: Array<{
22
22
  path: string;
23
- operator: "NotEqual" | "Equal" | "LessThan" | "GreaterThan" | "In" | "ContainsAny" | "ContainsAll";
23
+ operator: 'NotEqual' | 'Equal' | 'LessThan' | 'GreaterThan' | 'In' | 'ContainsAny' | 'ContainsAll';
24
24
  valueText?: string | undefined;
25
25
  valueTextArray?: Array<string> | undefined;
26
26
  }>;
@@ -28,7 +28,7 @@ type ChatCompletionRequest = {
28
28
  temperature?: number | undefined;
29
29
  };
30
30
  type ChatMessage = {
31
- role: "system" | "user" | "assistant";
31
+ role: 'system' | 'user' | 'assistant';
32
32
  content: string;
33
33
  name?: string | undefined;
34
34
  };
@@ -7,7 +7,7 @@ const zod_1 = require("zod");
7
7
  const common_1 = require("./common");
8
8
  const ChatMessage = zod_1.z
9
9
  .object({
10
- role: zod_1.z.enum(["system", "user", "assistant"]),
10
+ role: zod_1.z.enum(['system', 'user', 'assistant']),
11
11
  content: zod_1.z.string(),
12
12
  name: zod_1.z.string().optional(),
13
13
  })
@@ -15,7 +15,7 @@ const ChatMessage = zod_1.z
15
15
  .passthrough();
16
16
  const ChatCompletionRequest = zod_1.z
17
17
  .object({
18
- model: zod_1.z.literal("nimbus-001"),
18
+ model: zod_1.z.literal('nimbus-001'),
19
19
  messages: zod_1.z.array(ChatMessage),
20
20
  collections: zod_1.z.array(zod_1.z.string()).min(1).max(1),
21
21
  filter: zod_1.z
@@ -24,13 +24,13 @@ const ChatCompletionRequest = zod_1.z
24
24
  .object({
25
25
  path: zod_1.z.string(),
26
26
  operator: zod_1.z.enum([
27
- "NotEqual",
28
- "Equal",
29
- "LessThan",
30
- "GreaterThan",
31
- "In",
32
- "ContainsAny",
33
- "ContainsAll",
27
+ 'NotEqual',
28
+ 'Equal',
29
+ 'LessThan',
30
+ 'GreaterThan',
31
+ 'In',
32
+ 'ContainsAny',
33
+ 'ContainsAll',
34
34
  ]),
35
35
  valueText: zod_1.z.string().optional(),
36
36
  valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
@@ -41,13 +41,13 @@ const ChatCompletionRequest = zod_1.z
41
41
  .object({
42
42
  path: zod_1.z.string(),
43
43
  operator: zod_1.z.enum([
44
- "NotEqual",
45
- "Equal",
46
- "LessThan",
47
- "GreaterThan",
48
- "In",
49
- "ContainsAny",
50
- "ContainsAll",
44
+ 'NotEqual',
45
+ 'Equal',
46
+ 'LessThan',
47
+ 'GreaterThan',
48
+ 'In',
49
+ 'ContainsAny',
50
+ 'ContainsAll',
51
51
  ]),
52
52
  valueText: zod_1.z.string().optional(),
53
53
  valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
@@ -58,13 +58,13 @@ const ChatCompletionRequest = zod_1.z
58
58
  .object({
59
59
  path: zod_1.z.string(),
60
60
  operator: zod_1.z.enum([
61
- "NotEqual",
62
- "Equal",
63
- "LessThan",
64
- "GreaterThan",
65
- "In",
66
- "ContainsAny",
67
- "ContainsAll",
61
+ 'NotEqual',
62
+ 'Equal',
63
+ 'LessThan',
64
+ 'GreaterThan',
65
+ 'In',
66
+ 'ContainsAny',
67
+ 'ContainsAll',
68
68
  ]),
69
69
  valueText: zod_1.z.string().optional(),
70
70
  valueTextArray: zod_1.z.array(zod_1.z.string()).optional(),
@@ -133,16 +133,16 @@ exports.schemas = {
133
133
  };
134
134
  const endpoints = (0, core_1.makeApi)([
135
135
  {
136
- method: "post",
137
- path: "/chat/completions",
138
- alias: "createCompletion",
136
+ method: 'post',
137
+ path: '/chat/completions',
138
+ alias: 'createCompletion',
139
139
  description: `Generate a model response to a conversation that can include references to video content`,
140
- requestFormat: "json",
140
+ requestFormat: 'json',
141
141
  parameters: [
142
142
  {
143
- name: "body",
143
+ name: 'body',
144
144
  description: `Chat completion parameters`,
145
- type: "Body",
145
+ type: 'Body',
146
146
  schema: ChatCompletionRequest,
147
147
  },
148
148
  ],
@@ -171,7 +171,7 @@ const endpoints = (0, core_1.makeApi)([
171
171
  ],
172
172
  },
173
173
  ]);
174
- exports.ChatApi = new core_1.Zodios("https://api.cloudglue.dev/v1", endpoints);
174
+ exports.ChatApi = new core_1.Zodios('https://api.cloudglue.dev/v1', endpoints);
175
175
  function createApiClient(baseUrl, options) {
176
176
  return new core_1.Zodios(baseUrl, endpoints, options);
177
177
  }
@@ -1,18 +1,19 @@
1
- import { type ZodiosOptions } from "@zodios/core";
2
- import { z } from "zod";
3
- import { SegmentationConfig } from "./common";
4
- import { SegmentationUniformConfig } from "./common";
5
- import { SegmentationShotDetectorConfig } from "./common";
6
- import { ThumbnailsConfig } from "./common";
7
- import { File } from "./common";
8
- import { FileSegmentationConfig } from "./common";
9
- import { DescribeOutput } from "./common";
1
+ import { type ZodiosOptions } from '@zodios/core';
2
+ import { z } from 'zod';
3
+ import { SegmentationConfig } from './common';
4
+ import { SegmentationUniformConfig } from './common';
5
+ import { SegmentationShotDetectorConfig } from './common';
6
+ import { KeyframeConfig } from './common';
7
+ import { ThumbnailsConfig } from './common';
8
+ import { File } from './common';
9
+ import { FileSegmentationConfig } from './common';
10
+ import { DescribeOutput } from './common';
10
11
  type Collection = {
11
12
  id: string;
12
- object: "collection";
13
+ object: 'collection';
13
14
  name: string;
14
15
  description?: (string | null) | undefined;
15
- collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
16
+ collection_type: 'media-descriptions' | 'entities' | 'rich-transcripts' | 'face-analysis';
16
17
  extract_config?: Partial<{
17
18
  prompt: string;
18
19
  schema: {};
@@ -37,7 +38,7 @@ type Collection = {
37
38
  default_thumbnails_config?: ThumbnailsConfig | undefined;
38
39
  face_detection_config?: Partial<{
39
40
  frame_extraction_config: {
40
- strategy: "uniform";
41
+ strategy: 'uniform';
41
42
  uniform_config?: Partial<{
42
43
  frames_per_second: number;
43
44
  max_width: number;
@@ -51,7 +52,7 @@ type Collection = {
51
52
  file_count: number;
52
53
  };
53
54
  type NewCollection = {
54
- collection_type: "media-descriptions" | "entities" | "rich-transcripts" | "face-analysis";
55
+ collection_type: 'media-descriptions' | 'entities' | 'rich-transcripts' | 'face-analysis';
55
56
  name: string;
56
57
  description?: (string | null) | undefined;
57
58
  describe_config?: Partial<{
@@ -78,7 +79,7 @@ type NewCollection = {
78
79
  default_thumbnails_config?: ThumbnailsConfig | undefined;
79
80
  face_detection_config?: Partial<{
80
81
  frame_extraction_config: {
81
- strategy: "uniform";
82
+ strategy: 'uniform';
82
83
  uniform_config?: Partial<{
83
84
  frames_per_second: number;
84
85
  max_width: number;
@@ -90,14 +91,15 @@ type NewCollection = {
90
91
  }> | null | undefined;
91
92
  };
92
93
  type DefaultSegmentationConfig = {
93
- strategy: "uniform" | "shot-detector";
94
+ strategy: 'uniform' | 'shot-detector';
94
95
  uniform_config?: SegmentationUniformConfig | undefined;
95
96
  shot_detector_config?: SegmentationShotDetectorConfig | undefined;
97
+ keyframe_config?: KeyframeConfig | undefined;
96
98
  start_time_seconds?: number | undefined;
97
99
  end_time_seconds?: number | undefined;
98
100
  };
99
101
  type CollectionList = {
100
- object: "list";
102
+ object: 'list';
101
103
  data: Array<Collection>;
102
104
  total: number;
103
105
  limit: number;
@@ -106,13 +108,13 @@ type CollectionList = {
106
108
  type CollectionFile = {
107
109
  collection_id: string;
108
110
  file_id: string;
109
- object: "collection_file";
111
+ object: 'collection_file';
110
112
  added_at: number;
111
- status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
113
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
112
114
  file?: File | undefined;
113
115
  segmentation?: {
114
116
  id: string;
115
- status: "pending" | "processing" | "completed" | "failed" | "not_applicable";
117
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'not_applicable';
116
118
  file_id: string;
117
119
  segmentation_config: SegmentationConfig;
118
120
  } | undefined;
@@ -125,7 +127,7 @@ type AddCollectionFile = ({
125
127
  thumbnails_config: ThumbnailsConfig;
126
128
  }>;
127
129
  type CollectionFileList = {
128
- object: "list";
130
+ object: 'list';
129
131
  data: Array<CollectionFile>;
130
132
  total: number;
131
133
  limit: number;
@@ -146,7 +148,7 @@ type RichTranscript = {
146
148
  }>> | undefined;
147
149
  } & DescribeOutput;
148
150
  type CollectionRichTranscriptsList = {
149
- object: "list";
151
+ object: 'list';
150
152
  data: Array<{
151
153
  file_id: string;
152
154
  duration_seconds?: number | undefined;
@@ -167,11 +169,11 @@ type CollectionRichTranscriptsList = {
167
169
  offset: number;
168
170
  };
169
171
  type CollectionMediaDescriptionsList = {
170
- object: "list";
172
+ object: 'list';
171
173
  data: Array<{
172
174
  file_id: string;
173
175
  added_at: number;
174
- object: "collection_file";
176
+ object: 'collection_file';
175
177
  duration_seconds?: number | undefined;
176
178
  data: Partial<{
177
179
  content: string;