chamelaion 0.4.0 → 0.7.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.
- package/CHANGELOG.md +52 -0
- package/api-promise.js.map +1 -1
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +75 -16
- package/client.js.map +1 -1
- package/client.mjs +77 -18
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js +2 -2
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/error.js.map +1 -1
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +5 -5
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +5 -5
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.d.mts.map +1 -1
- package/internal/detect-platform.d.ts.map +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.js +6 -5
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +6 -5
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.js +2 -2
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +2 -2
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +7 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +7 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shim-types.d.mts.map +1 -1
- package/internal/shim-types.d.ts.map +1 -1
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +17 -11
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +17 -11
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +9 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +9 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +2 -4
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +2 -4
- package/internal/utils/uuid.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.js.map +1 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js.map +1 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +0 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -4
- package/resources/index.mjs.map +1 -1
- package/resources/lipsync/index.d.mts +1 -1
- package/resources/lipsync/index.d.mts.map +1 -1
- package/resources/lipsync/index.d.ts +1 -1
- package/resources/lipsync/index.d.ts.map +1 -1
- package/resources/lipsync/index.js +0 -2
- package/resources/lipsync/index.js.map +1 -1
- package/resources/lipsync/index.mjs +1 -3
- package/resources/lipsync/index.mjs.map +1 -1
- package/resources/lipsync/lipsync.d.mts +5 -10
- package/resources/lipsync/lipsync.d.mts.map +1 -1
- package/resources/lipsync/lipsync.d.ts +5 -10
- package/resources/lipsync/lipsync.d.ts.map +1 -1
- package/resources/lipsync/lipsync.js +3 -4
- package/resources/lipsync/lipsync.js.map +1 -1
- package/resources/lipsync/lipsync.mjs +3 -4
- package/resources/lipsync/lipsync.mjs.map +1 -1
- package/resources/lipsync/requests.d.mts +1 -1
- package/resources/lipsync/requests.d.mts.map +1 -1
- package/resources/lipsync/requests.d.ts +1 -1
- package/resources/lipsync/requests.d.ts.map +1 -1
- package/resources/lipsync/requests.js.map +1 -1
- package/resources/lipsync/requests.mjs.map +1 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/src/api-promise.ts +1 -1
- package/src/client.ts +163 -62
- package/src/core/api-promise.ts +7 -2
- package/src/core/error.ts +22 -24
- package/src/error.ts +1 -1
- package/src/index.ts +15 -1
- package/src/internal/builtin-types.ts +14 -9
- package/src/internal/detect-platform.ts +5 -1
- package/src/internal/errors.ts +7 -7
- package/src/internal/headers.ts +2 -2
- package/src/internal/parse.ts +10 -2
- package/src/internal/request-options.ts +2 -6
- package/src/internal/shim-types.ts +2 -2
- package/src/internal/shims.ts +3 -1
- package/src/internal/to-file.ts +7 -7
- package/src/internal/types.ts +20 -16
- package/src/internal/utils/log.ts +30 -8
- package/src/internal/utils/uuid.ts +3 -5
- package/src/resource.ts +1 -1
- package/src/resources/health.ts +2 -4
- package/src/resources/index.ts +8 -3
- package/src/resources/lipsync/index.ts +7 -2
- package/src/resources/lipsync/lipsync.ts +13 -13
- package/src/resources/lipsync/requests.ts +5 -2
- package/src/resources/users.ts +1 -3
- package/src/uploads.ts +1 -1
- package/src/version.ts +1 -1
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -75,17 +75,13 @@ export type RequestOptions = {
|
|
|
75
75
|
*/
|
|
76
76
|
defaultBaseURL?: string | undefined;
|
|
77
77
|
|
|
78
|
-
__security?: { bearerAuth?: boolean
|
|
78
|
+
__security?: { bearerAuth?: boolean; apiKeyAuth?: boolean };
|
|
79
79
|
|
|
80
80
|
__binaryResponse?: boolean | undefined;
|
|
81
|
-
|
|
82
81
|
};
|
|
83
82
|
|
|
84
83
|
export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit };
|
|
85
|
-
export type RequestEncoder = (request: {
|
|
86
|
-
headers: NullableHeaders;
|
|
87
|
-
body: unknown;
|
|
88
|
-
}) => EncodedContent;
|
|
84
|
+
export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent;
|
|
89
85
|
|
|
90
86
|
export const FallbackEncoder: RequestEncoder = ({ headers, body }) => {
|
|
91
87
|
return {
|
|
@@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream<R = any> =
|
|
|
19
19
|
typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream<R>;
|
|
20
20
|
|
|
21
21
|
type _ReadableStream<R = any> = NeverToAny<
|
|
22
|
-
([0] extends [1 & _DOMReadableStream<R>] ? never : _DOMReadableStream<R>)
|
|
23
|
-
([0] extends [1 & _ConditionalNodeReadableStream<R>] ? never : _ConditionalNodeReadableStream<R>)
|
|
22
|
+
| ([0] extends [1 & _DOMReadableStream<R>] ? never : _DOMReadableStream<R>)
|
|
23
|
+
| ([0] extends [1 & _ConditionalNodeReadableStream<R>] ? never : _ConditionalNodeReadableStream<R>)
|
|
24
24
|
>;
|
|
25
25
|
|
|
26
26
|
export type { _ReadableStream as ReadableStream };
|
package/src/internal/shims.ts
CHANGED
|
@@ -27,7 +27,9 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream
|
|
|
27
27
|
if (typeof ReadableStream === 'undefined') {
|
|
28
28
|
// Note: All of the platforms / runtimes we officially support already define
|
|
29
29
|
// `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.
|
|
30
|
-
throw new Error(
|
|
30
|
+
throw new Error(
|
|
31
|
+
'`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`',
|
|
32
|
+
);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
return new ReadableStream(...args);
|
package/src/internal/to-file.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlobPart, getName, makeFile, isAsyncIterable } from
|
|
1
|
+
import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads';
|
|
2
2
|
import type { FilePropertyBag } from './builtin-types';
|
|
3
3
|
import { checkFileSupport } from './uploads';
|
|
4
4
|
|
|
@@ -65,8 +65,11 @@ const isResponseLike = (value: any): value is ResponseLike =>
|
|
|
65
65
|
typeof value.url === 'string' &&
|
|
66
66
|
typeof value.blob === 'function';
|
|
67
67
|
|
|
68
|
-
export type ToFileInput =
|
|
69
|
-
|
|
68
|
+
export type ToFileInput =
|
|
69
|
+
| FileLike
|
|
70
|
+
| ResponseLike
|
|
71
|
+
| Exclude<BlobLikePart, string>
|
|
72
|
+
| AsyncIterable<BlobLikePart>;
|
|
70
73
|
|
|
71
74
|
/**
|
|
72
75
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
@@ -116,9 +119,7 @@ export async function toFile(
|
|
|
116
119
|
return makeFile(parts, name, options);
|
|
117
120
|
}
|
|
118
121
|
|
|
119
|
-
async function getBytes(
|
|
120
|
-
value: BlobLikePart | AsyncIterable<BlobLikePart>,
|
|
121
|
-
): Promise<Array<BlobPart>> {
|
|
122
|
+
async function getBytes(value: BlobLikePart | AsyncIterable<BlobLikePart>): Promise<Array<BlobPart>> {
|
|
122
123
|
let parts: Array<BlobPart> = [];
|
|
123
124
|
if (
|
|
124
125
|
typeof value === 'string' ||
|
|
@@ -151,4 +152,3 @@ function propsForError(value: unknown): string {
|
|
|
151
152
|
const props = Object.getOwnPropertyNames(value);
|
|
152
153
|
return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`;
|
|
153
154
|
}
|
|
154
|
-
|
package/src/internal/types.ts
CHANGED
|
@@ -7,34 +7,39 @@ export type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
|
|
7
7
|
|
|
8
8
|
export type FinalizedRequestInit = RequestInit & { headers: Headers };
|
|
9
9
|
|
|
10
|
-
type NotAny<T> = [0] extends [
|
|
10
|
+
type NotAny<T> = [0] extends [1 & T] ? never : T;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
14
14
|
*/
|
|
15
|
-
type OverloadedParameters<T> =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(...args: infer C): unknown;
|
|
19
|
-
(...args: infer D): unknown;
|
|
20
|
-
}
|
|
21
|
-
? A | B | C | D
|
|
22
|
-
: T extends {
|
|
15
|
+
type OverloadedParameters<T> =
|
|
16
|
+
T extends (
|
|
17
|
+
{
|
|
23
18
|
(...args: infer A): unknown;
|
|
24
19
|
(...args: infer B): unknown;
|
|
25
20
|
(...args: infer C): unknown;
|
|
21
|
+
(...args: infer D): unknown;
|
|
26
22
|
}
|
|
27
|
-
?
|
|
28
|
-
|
|
23
|
+
) ?
|
|
24
|
+
A | B | C | D
|
|
25
|
+
: T extends (
|
|
26
|
+
{
|
|
27
|
+
(...args: infer A): unknown;
|
|
28
|
+
(...args: infer B): unknown;
|
|
29
|
+
(...args: infer C): unknown;
|
|
30
|
+
}
|
|
31
|
+
) ?
|
|
32
|
+
A | B | C
|
|
33
|
+
: T extends (
|
|
34
|
+
{
|
|
29
35
|
(...args: infer A): unknown;
|
|
30
36
|
(...args: infer B): unknown;
|
|
31
37
|
}
|
|
32
|
-
?
|
|
33
|
-
|
|
34
|
-
? A
|
|
38
|
+
) ?
|
|
39
|
+
A | B
|
|
40
|
+
: T extends (...args: infer A) => unknown ? A
|
|
35
41
|
: never;
|
|
36
42
|
|
|
37
|
-
|
|
38
43
|
/**
|
|
39
44
|
* These imports attempt to get types from a parent package's dependencies.
|
|
40
45
|
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
@@ -69,7 +74,6 @@ type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/in
|
|
|
69
74
|
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
70
75
|
/** @ts-ignore For users who use Deno */ /* prettier-ignore */
|
|
71
76
|
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
72
|
-
|
|
73
77
|
|
|
74
78
|
type RequestInits =
|
|
75
79
|
| NotAny<UndiciTypesRequestInit>
|
|
@@ -4,7 +4,7 @@ import { hasOwn } from './values';
|
|
|
4
4
|
import { type Chamelaion } from '../../client';
|
|
5
5
|
import { RequestOptions } from '../request-options';
|
|
6
6
|
|
|
7
|
-
type LogFn = (message: string, ...rest: unknown[]) => void
|
|
7
|
+
type LogFn = (message: string, ...rest: unknown[]) => void;
|
|
8
8
|
export type Logger = {
|
|
9
9
|
error: LogFn;
|
|
10
10
|
warn: LogFn;
|
|
@@ -21,14 +21,22 @@ const levelNumbers = {
|
|
|
21
21
|
debug: 500,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export const parseLogLevel = (
|
|
24
|
+
export const parseLogLevel = (
|
|
25
|
+
maybeLevel: string | undefined,
|
|
26
|
+
sourceName: string,
|
|
27
|
+
client: Chamelaion,
|
|
28
|
+
): LogLevel | undefined => {
|
|
25
29
|
if (!maybeLevel) {
|
|
26
30
|
return undefined;
|
|
27
31
|
}
|
|
28
32
|
if (hasOwn(levelNumbers, maybeLevel)) {
|
|
29
33
|
return maybeLevel;
|
|
30
|
-
}
|
|
31
|
-
loggerFor(client).warn(
|
|
34
|
+
}
|
|
35
|
+
loggerFor(client).warn(
|
|
36
|
+
`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(
|
|
37
|
+
Object.keys(levelNumbers),
|
|
38
|
+
)}`,
|
|
39
|
+
);
|
|
32
40
|
return undefined;
|
|
33
41
|
};
|
|
34
42
|
|
|
@@ -89,11 +97,25 @@ export const formatRequestDetails = (details: {
|
|
|
89
97
|
body?: unknown;
|
|
90
98
|
}) => {
|
|
91
99
|
if (details.options) {
|
|
92
|
-
details.options = {...details.options};
|
|
100
|
+
details.options = { ...details.options };
|
|
93
101
|
delete details.options['headers']; // redundant + leaks internals
|
|
94
102
|
}
|
|
95
103
|
if (details.headers) {
|
|
96
|
-
details.headers = Object.fromEntries(
|
|
104
|
+
details.headers = Object.fromEntries(
|
|
105
|
+
(details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(
|
|
106
|
+
([name, value]) => [
|
|
107
|
+
name,
|
|
108
|
+
(
|
|
109
|
+
name.toLowerCase() === 'authorization' ||
|
|
110
|
+
name.toLowerCase() === 'x-api-key' ||
|
|
111
|
+
name.toLowerCase() === 'cookie' ||
|
|
112
|
+
name.toLowerCase() === 'set-cookie'
|
|
113
|
+
) ?
|
|
114
|
+
'***'
|
|
115
|
+
: value,
|
|
116
|
+
],
|
|
117
|
+
),
|
|
118
|
+
);
|
|
97
119
|
}
|
|
98
120
|
if ('retryOfRequestLogID' in details) {
|
|
99
121
|
if (details.retryOfRequestLogID) {
|
|
@@ -101,5 +123,5 @@ export const formatRequestDetails = (details: {
|
|
|
101
123
|
}
|
|
102
124
|
delete details.retryOfRequestLogID;
|
|
103
125
|
}
|
|
104
|
-
return details
|
|
105
|
-
}
|
|
126
|
+
return details;
|
|
127
|
+
};
|
|
@@ -10,10 +10,8 @@ export let uuid4 = function () {
|
|
|
10
10
|
return crypto.randomUUID();
|
|
11
11
|
}
|
|
12
12
|
const u8 = new Uint8Array(1);
|
|
13
|
-
const randomByte = crypto
|
|
14
|
-
|
|
15
|
-
: () => (Math.random() * 0xff) & 0xff;
|
|
16
|
-
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) =>
|
|
13
|
+
const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff;
|
|
14
|
+
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) =>
|
|
17
15
|
(+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16),
|
|
18
16
|
);
|
|
19
|
-
}
|
|
17
|
+
};
|
package/src/resource.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @deprecated Import from ./core/resource instead */
|
|
2
|
-
export * from
|
|
2
|
+
export * from './core/resource';
|
package/src/resources/health.ts
CHANGED
|
@@ -12,7 +12,7 @@ export class Health extends APIResource {
|
|
|
12
12
|
* Returns HTTP 200 when the service is running. No authentication required.
|
|
13
13
|
*/
|
|
14
14
|
check(options?: RequestOptions): APIPromise<HealthCheckResponse> {
|
|
15
|
-
return this._client.get('/health', { ...options, __security: {
|
|
15
|
+
return this._client.get('/health', { ...options, __security: {} });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -21,7 +21,5 @@ export interface HealthCheckResponse {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export declare namespace Health {
|
|
24
|
-
export {
|
|
25
|
-
type HealthCheckResponse as HealthCheckResponse
|
|
26
|
-
};
|
|
24
|
+
export { type HealthCheckResponse as HealthCheckResponse };
|
|
27
25
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Health, type HealthCheckResponse } from './health'
|
|
4
|
-
export {
|
|
5
|
-
|
|
3
|
+
export { Health, type HealthCheckResponse } from './health';
|
|
4
|
+
export {
|
|
5
|
+
Lipsync,
|
|
6
|
+
type LipsyncGenerate,
|
|
7
|
+
type LipsyncGenerateParams,
|
|
8
|
+
type LipsyncGenerateWithMediaParams,
|
|
9
|
+
} from './lipsync/lipsync';
|
|
10
|
+
export { Users, type UserRetrieveCurrentResponse } from './users';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
|
|
3
|
+
export {
|
|
4
|
+
Lipsync,
|
|
5
|
+
type LipsyncGenerate,
|
|
6
|
+
type LipsyncGenerateParams,
|
|
7
|
+
type LipsyncGenerateWithMediaParams,
|
|
8
|
+
} from './lipsync';
|
|
9
|
+
export { Requests, type LipsyncRequest, type RequestListResponse, type RequestListParams } from './requests';
|
|
@@ -24,14 +24,14 @@ export class Lipsync extends APIResource {
|
|
|
24
24
|
* inputs: [
|
|
25
25
|
* {
|
|
26
26
|
* type: 'video',
|
|
27
|
-
* url: 'https://
|
|
27
|
+
* url: 'https://storage.googleapis.com/chamelaion-test-media/Example_Active_Speaker_Detection.mp4',
|
|
28
28
|
* },
|
|
29
29
|
* {
|
|
30
30
|
* type: 'audio',
|
|
31
|
-
* url: 'https://
|
|
31
|
+
* url: 'https://storage.googleapis.com/chamelaion-test-media/Example_Active_Speaker_Detection.wav',
|
|
32
32
|
* },
|
|
33
33
|
* ],
|
|
34
|
-
* reference_id: '
|
|
34
|
+
* reference_id: 'normal-lipsync-demo',
|
|
35
35
|
* });
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
@@ -49,13 +49,18 @@ export class Lipsync extends APIResource {
|
|
|
49
49
|
* await client.lipsync.generateWithMedia({
|
|
50
50
|
* audio: fs.createReadStream('path/to/file'),
|
|
51
51
|
* video: fs.createReadStream('path/to/file'),
|
|
52
|
-
* model: 'lipsync-2',
|
|
53
52
|
* reference_id: 'upload-demo-01',
|
|
54
53
|
* });
|
|
55
54
|
* ```
|
|
56
55
|
*/
|
|
57
|
-
generateWithMedia(
|
|
58
|
-
|
|
56
|
+
generateWithMedia(
|
|
57
|
+
body: LipsyncGenerateWithMediaParams,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): APIPromise<LipsyncGenerate> {
|
|
60
|
+
return this._client.post(
|
|
61
|
+
'/v1/lipsync/generate-with-media',
|
|
62
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
63
|
+
);
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -118,11 +123,6 @@ export interface LipsyncGenerateWithMediaParams {
|
|
|
118
123
|
*/
|
|
119
124
|
disable_active_speaker_detection?: boolean;
|
|
120
125
|
|
|
121
|
-
/**
|
|
122
|
-
* Optional model selector.
|
|
123
|
-
*/
|
|
124
|
-
model?: 'lipsync-2';
|
|
125
|
-
|
|
126
126
|
/**
|
|
127
127
|
* Optional client-provided identifier for later retrieval.
|
|
128
128
|
*/
|
|
@@ -135,13 +135,13 @@ export declare namespace Lipsync {
|
|
|
135
135
|
export {
|
|
136
136
|
type LipsyncGenerate as LipsyncGenerate,
|
|
137
137
|
type LipsyncGenerateParams as LipsyncGenerateParams,
|
|
138
|
-
type LipsyncGenerateWithMediaParams as LipsyncGenerateWithMediaParams
|
|
138
|
+
type LipsyncGenerateWithMediaParams as LipsyncGenerateWithMediaParams,
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
export {
|
|
142
142
|
Requests as Requests,
|
|
143
143
|
type LipsyncRequest as LipsyncRequest,
|
|
144
144
|
type RequestListResponse as RequestListResponse,
|
|
145
|
-
type RequestListParams as RequestListParams
|
|
145
|
+
type RequestListParams as RequestListParams,
|
|
146
146
|
};
|
|
147
147
|
}
|
|
@@ -32,7 +32,10 @@ export class Requests extends APIResource {
|
|
|
32
32
|
* const requests = await client.lipsync.requests.list();
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
list(
|
|
35
|
+
list(
|
|
36
|
+
query: RequestListParams | null | undefined = {},
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<RequestListResponse> {
|
|
36
39
|
return this._client.get('/v1/lipsync/requests', { query, ...options });
|
|
37
40
|
}
|
|
38
41
|
}
|
|
@@ -125,6 +128,6 @@ export declare namespace Requests {
|
|
|
125
128
|
export {
|
|
126
129
|
type LipsyncRequest as LipsyncRequest,
|
|
127
130
|
type RequestListResponse as RequestListResponse,
|
|
128
|
-
type RequestListParams as RequestListParams
|
|
131
|
+
type RequestListParams as RequestListParams,
|
|
129
132
|
};
|
|
130
133
|
}
|
package/src/resources/users.ts
CHANGED
package/src/uploads.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @deprecated Import from ./core/uploads instead */
|
|
2
|
-
export * from
|
|
2
|
+
export * from './core/uploads';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0'; // x-release-please-version
|
package/uploads.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA+B"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,2BAA2B"}
|