magic-hour 0.43.1 → 0.44.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/README.md +82 -77
- package/dist/core/api-error.d.ts +6 -0
- package/dist/core/api-error.js +11 -0
- package/dist/core/api-promise.d.ts +28 -0
- package/dist/core/api-promise.js +252 -0
- package/dist/core/auth.d.ts +76 -0
- package/dist/core/auth.js +232 -0
- package/dist/core/binary-response.d.ts +6 -0
- package/dist/core/binary-response.js +10 -0
- package/dist/core/content-type.d.ts +4 -0
- package/dist/core/content-type.js +12 -0
- package/dist/core/core-client.d.ts +58 -0
- package/dist/core/core-client.js +168 -0
- package/dist/core/form-data.d.ts +26 -0
- package/dist/core/form-data.js +83 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.js +28 -0
- package/dist/core/logger.d.ts +48 -0
- package/dist/core/logger.js +82 -0
- package/dist/core/query.d.ts +8 -0
- package/dist/core/query.js +77 -0
- package/dist/core/runtime.d.ts +4 -0
- package/dist/core/runtime.js +20 -0
- package/dist/core/zod.d.ts +13 -0
- package/dist/core/zod.js +60 -0
- package/dist/environment.d.ts +1 -1
- package/dist/environment.js +1 -1
- package/dist/examples/logging-example.d.ts +10 -0
- package/dist/examples/logging-example.js +137 -0
- package/dist/logging-client.d.ts +39 -0
- package/dist/logging-client.js +116 -0
- package/dist/resources/v1/ai-voice-cloner/index.d.ts +2 -0
- package/dist/resources/v1/ai-voice-cloner/index.js +5 -0
- package/dist/resources/v1/ai-voice-cloner/request-types.d.ts +31 -0
- package/dist/resources/v1/ai-voice-cloner/request-types.js +77 -0
- package/dist/resources/v1/ai-voice-cloner/resource-client.d.ts +55 -0
- package/dist/resources/v1/ai-voice-cloner/resource-client.js +99 -0
- package/dist/resources/v1/index.d.ts +1 -0
- package/dist/resources/v1/index.js +2 -1
- package/dist/resources/v1/resource-client.d.ts +3 -0
- package/dist/resources/v1/resource-client.js +6 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/v1-ai-voice-cloner-create-body-assets.d.ts +27 -0
- package/dist/types/v1-ai-voice-cloner-create-body-assets.js +67 -0
- package/dist/types/v1-ai-voice-cloner-create-body-style.d.ts +22 -0
- package/dist/types/v1-ai-voice-cloner-create-body-style.js +67 -0
- package/dist/types/v1-ai-voice-cloner-create-body.d.ts +31 -0
- package/dist/types/v1-ai-voice-cloner-create-body.js +77 -0
- package/dist/types/v1-ai-voice-cloner-create-response.d.ts +29 -0
- package/dist/types/v1-ai-voice-cloner-create-response.js +71 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Success
|
|
4
|
+
*/
|
|
5
|
+
export type V1AiVoiceClonerCreateResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
8
|
+
*
|
|
9
|
+
* If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
10
|
+
*/
|
|
11
|
+
creditsCharged: number;
|
|
12
|
+
/**
|
|
13
|
+
* Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
* V1AiVoiceClonerCreateResponse without any key transformation, this is what
|
|
20
|
+
* we expect to come in as network data
|
|
21
|
+
*/
|
|
22
|
+
export type External$V1AiVoiceClonerCreateResponse = {
|
|
23
|
+
credits_charged: number;
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const Schemas$V1AiVoiceClonerCreateResponse: {
|
|
27
|
+
in: z.ZodType<V1AiVoiceClonerCreateResponse, z.ZodTypeDef, unknown>;
|
|
28
|
+
out: z.ZodType<External$V1AiVoiceClonerCreateResponse, z.ZodTypeDef, V1AiVoiceClonerCreateResponse>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Schemas$V1AiVoiceClonerCreateResponse = void 0;
|
|
37
|
+
const make_api_request_js_1 = require("make-api-request-js");
|
|
38
|
+
const z = __importStar(require("zod"));
|
|
39
|
+
/**
|
|
40
|
+
* Takes network data, validates it, and transforms keys to match typescript object V1AiVoiceClonerCreateResponse
|
|
41
|
+
*/
|
|
42
|
+
const SchemaIn$V1AiVoiceClonerCreateResponse = z
|
|
43
|
+
.object({
|
|
44
|
+
credits_charged: z.number().int(),
|
|
45
|
+
id: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.transform((obj) => {
|
|
48
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
49
|
+
credits_charged: "creditsCharged",
|
|
50
|
+
id: "id",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* Takes typescript data, validates it, and maps keys to match the expected external object External$V1AiVoiceClonerCreateResponse
|
|
56
|
+
*/
|
|
57
|
+
const SchemaOut$V1AiVoiceClonerCreateResponse = z
|
|
58
|
+
.object({
|
|
59
|
+
creditsCharged: z.number().int(),
|
|
60
|
+
id: z.string(),
|
|
61
|
+
})
|
|
62
|
+
.transform((obj) => {
|
|
63
|
+
return (0, make_api_request_js_1.zodTransform)(obj, {
|
|
64
|
+
creditsCharged: "credits_charged",
|
|
65
|
+
id: "id",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
exports.Schemas$V1AiVoiceClonerCreateResponse = {
|
|
69
|
+
in: SchemaIn$V1AiVoiceClonerCreateResponse,
|
|
70
|
+
out: SchemaOut$V1AiVoiceClonerCreateResponse,
|
|
71
|
+
};
|