@mynthio/sdk 0.0.39 → 0.0.41
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/README.md +49 -9
- package/dist/convex/index.d.ts +39 -90
- package/dist/convex/index.js +41 -2
- package/dist/handler.d.ts +28 -0
- package/dist/handler.js +121 -0
- package/dist/index.d.ts +675 -328
- package/dist/index.js +1469 -2
- package/dist/next/index.d.ts +14 -22
- package/dist/next/index.js +25 -2
- package/dist/tanstack-start/index.d.ts +18 -21
- package/dist/tanstack-start/index.js +11 -2
- package/dist/types.d.ts +610 -592
- package/package.json +16 -21
- package/dist/client.d.ts +0 -41
- package/dist/client.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -94
- package/dist/constants.d.ts.map +0 -1
- package/dist/convex/index.d.ts.map +0 -1
- package/dist/convex/utils.d.ts +0 -2
- package/dist/convex/utils.d.ts.map +0 -1
- package/dist/image-alt-result.d.ts +0 -22
- package/dist/image-alt-result.d.ts.map +0 -1
- package/dist/image-generation-result.d.ts +0 -58
- package/dist/image-generation-result.d.ts.map +0 -1
- package/dist/image-rate-result.d.ts +0 -24
- package/dist/image-rate-result.d.ts.map +0 -1
- package/dist/image-review-result.d.ts +0 -31
- package/dist/image-review-result.d.ts.map +0 -1
- package/dist/index-apss16tr.js +0 -3
- package/dist/index-pjgsme75.js +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/next/index.d.ts.map +0 -1
- package/dist/tanstack-start/index.d.ts.map +0 -1
- package/dist/task-async.d.ts +0 -95
- package/dist/task-async.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/uploads.d.ts +0 -31
- package/dist/uploads.d.ts.map +0 -1
- package/dist/video-generation-result.d.ts +0 -46
- package/dist/video-generation-result.d.ts.map +0 -1
- package/dist/webhooks/utils.d.ts +0 -5
- package/dist/webhooks/utils.d.ts.map +0 -1
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { MynthSDKTypes } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a completed video generation task.
|
|
4
|
-
*
|
|
5
|
-
* @template MetadataT - Type of the metadata attached to the request
|
|
6
|
-
*/
|
|
7
|
-
export declare class VideoGenerationResult<MetadataT = Record<string, unknown> | undefined> {
|
|
8
|
-
/** Raw task data from the API */
|
|
9
|
-
readonly data: MynthSDKTypes.VideoGenerationTaskData;
|
|
10
|
-
constructor(data: MynthSDKTypes.VideoGenerationTaskData);
|
|
11
|
-
/** Unique identifier for this task */
|
|
12
|
-
get id(): string;
|
|
13
|
-
/** Current status of the task */
|
|
14
|
-
get status(): MynthSDKTypes.TaskStatus;
|
|
15
|
-
/**
|
|
16
|
-
* The generation result containing videos and model info.
|
|
17
|
-
* Returns `null` if the task hasn't completed yet.
|
|
18
|
-
*/
|
|
19
|
-
get result(): MynthSDKTypes.VideoResult | null;
|
|
20
|
-
/** Whether the task completed successfully */
|
|
21
|
-
get isCompleted(): boolean;
|
|
22
|
-
/** Whether the task failed */
|
|
23
|
-
get isFailed(): boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Get all successfully generated video URLs.
|
|
26
|
-
* Convenience method that extracts just the URLs from successful videos.
|
|
27
|
-
*/
|
|
28
|
-
get urls(): string[];
|
|
29
|
-
/**
|
|
30
|
-
* Get generated videos from the task result.
|
|
31
|
-
*
|
|
32
|
-
* @param options.includeFailed - If true, includes failed video results
|
|
33
|
-
* @returns Array of video results
|
|
34
|
-
*/
|
|
35
|
-
getVideos(options: {
|
|
36
|
-
includeFailed: true;
|
|
37
|
-
}): MynthSDKTypes.VideoResultVideo[];
|
|
38
|
-
getVideos(options?: {
|
|
39
|
-
includeFailed?: false;
|
|
40
|
-
}): MynthSDKTypes.VideoResultVideoSuccess[];
|
|
41
|
-
/**
|
|
42
|
-
* Get the metadata that was attached to the generation request.
|
|
43
|
-
*/
|
|
44
|
-
getMetadata(): MetadataT;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=video-generation-result.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-generation-result.d.ts","sourceRoot":"","sources":["../src/video-generation-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,qBAAqB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAChF,iCAAiC;IACjC,SAAgB,IAAI,EAAE,aAAa,CAAC,uBAAuB,CAAC;gBAEhD,IAAI,EAAE,aAAa,CAAC,uBAAuB;IAIvD,sCAAsC;IACtC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,iCAAiC;IACjC,IAAI,MAAM,IAAI,aAAa,CAAC,UAAU,CAErC;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,aAAa,CAAC,WAAW,GAAG,IAAI,CAE7C;IAED,8CAA8C;IAC9C,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,8BAA8B;IAC9B,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,EAAE,CAEnB;IAED;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,GAAG,aAAa,CAAC,gBAAgB,EAAE;IAC7E,SAAS,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,KAAK,CAAA;KAAE,GAAG,aAAa,CAAC,uBAAuB,EAAE;IAUvF;;OAEG;IACH,WAAW,IAAI,SAAS;CAGzB"}
|
package/dist/webhooks/utils.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Read the webhook secret without assuming a Node.js runtime. */
|
|
2
|
-
export declare function getWebhookSecretFromEnv(): string | undefined;
|
|
3
|
-
/** Verify a Mynth HMAC-SHA256 signature against the unmodified request body. */
|
|
4
|
-
export declare function verifySignature(body: string, signatureHeader: string, secret: string, toleranceSeconds?: number): Promise<boolean>;
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/webhooks/utils.ts"],"names":[],"mappings":"AAGA,kEAAkE;AAClE,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAM5D;AAyBD,gFAAgF;AAChF,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,OAAO,CAAC,CA2BlB"}
|