magic-hour 0.29.0 → 0.30.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.
Files changed (51) hide show
  1. package/README.md +5 -0
  2. package/dist/environment.d.ts +1 -1
  3. package/dist/environment.js +1 -1
  4. package/dist/resources/v1/face-detection/index.d.ts +2 -0
  5. package/dist/resources/v1/face-detection/index.js +5 -0
  6. package/dist/resources/v1/face-detection/request-types.d.ts +51 -0
  7. package/dist/resources/v1/face-detection/request-types.js +101 -0
  8. package/dist/resources/v1/face-detection/resource-client.d.ts +24 -0
  9. package/dist/resources/v1/face-detection/resource-client.js +48 -0
  10. package/dist/resources/v1/index.d.ts +1 -0
  11. package/dist/resources/v1/index.js +2 -1
  12. package/dist/resources/v1/resource-client.d.ts +3 -0
  13. package/dist/resources/v1/resource-client.js +6 -0
  14. package/dist/types/index.d.ts +18 -0
  15. package/dist/types/v1-face-detection-create-body-assets.d.ts +22 -0
  16. package/dist/types/v1-face-detection-create-body-assets.js +67 -0
  17. package/dist/types/v1-face-detection-create-body.d.ts +30 -0
  18. package/dist/types/v1-face-detection-create-body.js +72 -0
  19. package/dist/types/v1-face-detection-create-response.d.ts +27 -0
  20. package/dist/types/v1-face-detection-create-response.js +71 -0
  21. package/dist/types/v1-face-detection-create-response400.d.ts +19 -0
  22. package/dist/types/v1-face-detection-create-response400.js +67 -0
  23. package/dist/types/v1-face-detection-create-response401-message-enum.d.ts +4 -0
  24. package/dist/types/v1-face-detection-create-response401-message-enum.js +2 -0
  25. package/dist/types/v1-face-detection-create-response401.d.ts +19 -0
  26. package/dist/types/v1-face-detection-create-response401.js +67 -0
  27. package/dist/types/v1-face-detection-create-response404-message-enum.d.ts +4 -0
  28. package/dist/types/v1-face-detection-create-response404-message-enum.js +2 -0
  29. package/dist/types/v1-face-detection-create-response404.d.ts +19 -0
  30. package/dist/types/v1-face-detection-create-response404.js +67 -0
  31. package/dist/types/v1-face-detection-create-response422.d.ts +19 -0
  32. package/dist/types/v1-face-detection-create-response422.js +67 -0
  33. package/dist/types/v1-face-detection-get-response-faces-item.d.ts +27 -0
  34. package/dist/types/v1-face-detection-get-response-faces-item.js +71 -0
  35. package/dist/types/v1-face-detection-get-response-status-enum.d.ts +4 -0
  36. package/dist/types/v1-face-detection-get-response-status-enum.js +2 -0
  37. package/dist/types/v1-face-detection-get-response.d.ts +38 -0
  38. package/dist/types/v1-face-detection-get-response.js +80 -0
  39. package/dist/types/v1-face-detection-get-response400.d.ts +19 -0
  40. package/dist/types/v1-face-detection-get-response400.js +67 -0
  41. package/dist/types/v1-face-detection-get-response401-message-enum.d.ts +4 -0
  42. package/dist/types/v1-face-detection-get-response401-message-enum.js +2 -0
  43. package/dist/types/v1-face-detection-get-response401.d.ts +19 -0
  44. package/dist/types/v1-face-detection-get-response401.js +67 -0
  45. package/dist/types/v1-face-detection-get-response404-message-enum.d.ts +4 -0
  46. package/dist/types/v1-face-detection-get-response404-message-enum.js +2 -0
  47. package/dist/types/v1-face-detection-get-response404.d.ts +19 -0
  48. package/dist/types/v1-face-detection-get-response404.js +67 -0
  49. package/dist/types/v1-face-detection-get-response422.d.ts +19 -0
  50. package/dist/types/v1-face-detection-get-response422.js +67 -0
  51. package/package.json +1 -1
package/README.md CHANGED
@@ -84,6 +84,11 @@ const client = new Client({
84
84
 
85
85
  * [create](src/resources/v1/auto-subtitle-generator/README.md#create) - Auto Subtitle Generator
86
86
 
87
+ ### [v1.faceDetection](src/resources/v1/face-detection/README.md)
88
+
89
+ * [create](src/resources/v1/face-detection/README.md#create) - Face Detection
90
+ * [get](src/resources/v1/face-detection/README.md#get) - Get face detection details
91
+
87
92
  ### [v1.faceSwap](src/resources/v1/face-swap/README.md)
88
93
 
89
94
  * [create](src/resources/v1/face-swap/README.md#create) - Face Swap video
@@ -1,4 +1,4 @@
1
1
  export declare enum Environment {
2
2
  Environment = "https://api.magichour.ai",
3
- MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.29.0"
3
+ MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.30.0"
4
4
  }
@@ -4,5 +4,5 @@ exports.Environment = void 0;
4
4
  var Environment;
5
5
  (function (Environment) {
6
6
  Environment["Environment"] = "https://api.magichour.ai";
7
- Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.29.0";
7
+ Environment["MockServer"] = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.30.0";
8
8
  })(Environment || (exports.Environment = Environment = {}));
@@ -0,0 +1,2 @@
1
+ export { CreateRequest, GetRequest } from "./request-types";
2
+ export { FaceDetectionClient } from "./resource-client";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FaceDetectionClient = void 0;
4
+ var resource_client_1 = require("./resource-client");
5
+ Object.defineProperty(exports, "FaceDetectionClient", { enumerable: true, get: function () { return resource_client_1.FaceDetectionClient; } });
@@ -0,0 +1,51 @@
1
+ import { External$V1FaceDetectionCreateBodyAssets, V1FaceDetectionCreateBodyAssets } from "../../../types/v1-face-detection-create-body-assets";
2
+ import * as z from "zod";
3
+ /**
4
+ * GetRequest
5
+ */
6
+ export type GetRequest = {
7
+ /**
8
+ * The id of the task
9
+ */
10
+ id: string;
11
+ };
12
+ /**
13
+ * @internal
14
+ * GetRequest without any key transformation, this is what
15
+ * we expect to come in as network data
16
+ */
17
+ export type External$GetRequest = {
18
+ id: string;
19
+ };
20
+ export declare const Schemas$GetRequest: {
21
+ in: z.ZodType<GetRequest, z.ZodTypeDef, unknown>;
22
+ out: z.ZodType<External$GetRequest, z.ZodTypeDef, GetRequest>;
23
+ };
24
+ /**
25
+ * CreateRequest
26
+ */
27
+ export type CreateRequest = {
28
+ /**
29
+ * Provide the assets for face detection
30
+ */
31
+ assets: V1FaceDetectionCreateBodyAssets;
32
+ /**
33
+ * Confidence threshold for filtering detected faces.
34
+ * * Higher values (e.g., 0.9) include only faces detected with high certainty, reducing false positives.
35
+ * * Lower values (e.g., 0.3) include more faces, but may increase the chance of incorrect detections.
36
+ */
37
+ confidenceScore?: number | undefined;
38
+ };
39
+ /**
40
+ * @internal
41
+ * CreateRequest without any key transformation, this is what
42
+ * we expect to come in as network data
43
+ */
44
+ export type External$CreateRequest = {
45
+ assets: External$V1FaceDetectionCreateBodyAssets;
46
+ confidence_score?: number | undefined;
47
+ };
48
+ export declare const Schemas$CreateRequest: {
49
+ in: z.ZodType<CreateRequest, z.ZodTypeDef, unknown>;
50
+ out: z.ZodType<External$CreateRequest, z.ZodTypeDef, CreateRequest>;
51
+ };
@@ -0,0 +1,101 @@
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$CreateRequest = exports.Schemas$GetRequest = void 0;
37
+ const core_1 = require("../../../core");
38
+ const v1_face_detection_create_body_assets_1 = require("../../../types/v1-face-detection-create-body-assets");
39
+ const z = __importStar(require("zod"));
40
+ /**
41
+ * Takes network data, validates it, and transforms keys to match typescript object GetRequest
42
+ */
43
+ const SchemaIn$GetRequest = z
44
+ .object({
45
+ id: z.string(),
46
+ })
47
+ .transform((obj) => {
48
+ return (0, core_1.zodTransform)(obj, {
49
+ id: "id",
50
+ });
51
+ });
52
+ /**
53
+ * @internal
54
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$GetRequest
55
+ */
56
+ const SchemaOut$GetRequest = z
57
+ .object({
58
+ id: z.string(),
59
+ })
60
+ .transform((obj) => {
61
+ return (0, core_1.zodTransform)(obj, {
62
+ id: "id",
63
+ });
64
+ });
65
+ exports.Schemas$GetRequest = {
66
+ in: SchemaIn$GetRequest,
67
+ out: SchemaOut$GetRequest,
68
+ };
69
+ /**
70
+ * Takes network data, validates it, and transforms keys to match typescript object CreateRequest
71
+ */
72
+ const SchemaIn$CreateRequest = z
73
+ .object({
74
+ assets: v1_face_detection_create_body_assets_1.Schemas$V1FaceDetectionCreateBodyAssets.in,
75
+ confidence_score: z.number().optional(),
76
+ })
77
+ .transform((obj) => {
78
+ return (0, core_1.zodTransform)(obj, {
79
+ assets: "assets",
80
+ confidence_score: "confidenceScore",
81
+ });
82
+ });
83
+ /**
84
+ * @internal
85
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$CreateRequest
86
+ */
87
+ const SchemaOut$CreateRequest = z
88
+ .object({
89
+ assets: v1_face_detection_create_body_assets_1.Schemas$V1FaceDetectionCreateBodyAssets.out,
90
+ confidenceScore: z.number().optional(),
91
+ })
92
+ .transform((obj) => {
93
+ return (0, core_1.zodTransform)(obj, {
94
+ assets: "assets",
95
+ confidenceScore: "confidence_score",
96
+ });
97
+ });
98
+ exports.Schemas$CreateRequest = {
99
+ in: SchemaIn$CreateRequest,
100
+ out: SchemaOut$CreateRequest,
101
+ };
@@ -0,0 +1,24 @@
1
+ import { types } from "../../../index.js";
2
+ import { ApiPromise, CoreClient, CoreResourceClient, RequestOptions, ResourceClientOptions } from "../../../core";
3
+ import * as requests from "../../../resources/v1/face-detection/request-types";
4
+ export declare class FaceDetectionClient extends CoreResourceClient {
5
+ constructor(coreClient: CoreClient, opts: ResourceClientOptions);
6
+ /**
7
+ * Get face detection details
8
+ *
9
+ * Get the details of a face detection task.
10
+ *
11
+ * GET /v1/face-detection/{id}
12
+ */
13
+ get(request: requests.GetRequest, opts?: RequestOptions): ApiPromise<types.V1FaceDetectionGetResponse>;
14
+ /**
15
+ * Face Detection
16
+ *
17
+ * Detect faces in an image or video.
18
+ *
19
+ * Note: Face detection is free to use for the near future. Pricing may change in the future.
20
+ *
21
+ * POST /v1/face-detection
22
+ */
23
+ create(request: requests.CreateRequest, opts?: RequestOptions): ApiPromise<types.V1FaceDetectionCreateResponse>;
24
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FaceDetectionClient = void 0;
4
+ const core_1 = require("../../../core");
5
+ const v1_face_detection_create_body_1 = require("../../../types/v1-face-detection-create-body");
6
+ const v1_face_detection_create_response_1 = require("../../../types/v1-face-detection-create-response");
7
+ const v1_face_detection_get_response_1 = require("../../../types/v1-face-detection-get-response");
8
+ class FaceDetectionClient extends core_1.CoreResourceClient {
9
+ constructor(coreClient, opts) {
10
+ super(coreClient, opts);
11
+ }
12
+ /**
13
+ * Get face detection details
14
+ *
15
+ * Get the details of a face detection task.
16
+ *
17
+ * GET /v1/face-detection/{id}
18
+ */
19
+ get(request, opts) {
20
+ return this._client.makeRequest({
21
+ method: "get",
22
+ path: `/v1/face-detection/${request.id}`,
23
+ responseSchema: v1_face_detection_get_response_1.Schemas$V1FaceDetectionGetResponse.in,
24
+ opts,
25
+ });
26
+ }
27
+ /**
28
+ * Face Detection
29
+ *
30
+ * Detect faces in an image or video.
31
+ *
32
+ * Note: Face detection is free to use for the near future. Pricing may change in the future.
33
+ *
34
+ * POST /v1/face-detection
35
+ */
36
+ create(request, opts) {
37
+ return this._client.makeRequest({
38
+ method: "post",
39
+ path: "/v1/face-detection",
40
+ auth: ["bearerAuth"],
41
+ contentType: "application/json",
42
+ body: v1_face_detection_create_body_1.Schemas$V1FaceDetectionCreateBody.out.parse(request),
43
+ responseSchema: v1_face_detection_create_response_1.Schemas$V1FaceDetectionCreateResponse.in,
44
+ opts,
45
+ });
46
+ }
47
+ }
48
+ exports.FaceDetectionClient = FaceDetectionClient;
@@ -11,6 +11,7 @@ export * as aiQrCodeGenerator from "./ai-qr-code-generator";
11
11
  export * as aiTalkingPhoto from "./ai-talking-photo";
12
12
  export * as animation from "./animation";
13
13
  export * as autoSubtitleGenerator from "./auto-subtitle-generator";
14
+ export * as faceDetection from "./face-detection";
14
15
  export * as faceSwap from "./face-swap";
15
16
  export * as faceSwapPhoto from "./face-swap-photo";
16
17
  export * as files from "./files";
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.autoSubtitleGenerator = exports.animation = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiPhotoEditor = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = void 0;
36
+ exports.videoToVideo = exports.videoProjects = exports.textToVideo = exports.V1Client = exports.photoColorizer = exports.lipSync = exports.imageToVideo = exports.imageProjects = exports.imageBackgroundRemover = exports.files = exports.faceSwapPhoto = exports.faceSwap = exports.faceDetection = exports.autoSubtitleGenerator = exports.animation = exports.aiTalkingPhoto = exports.aiQrCodeGenerator = exports.aiPhotoEditor = exports.aiMemeGenerator = exports.aiImageUpscaler = exports.aiImageGenerator = exports.aiImageEditor = exports.aiHeadshotGenerator = exports.aiGifGenerator = exports.aiFaceEditor = exports.aiClothesChanger = void 0;
37
37
  exports.aiClothesChanger = __importStar(require("./ai-clothes-changer"));
38
38
  exports.aiFaceEditor = __importStar(require("./ai-face-editor"));
39
39
  exports.aiGifGenerator = __importStar(require("./ai-gif-generator"));
@@ -47,6 +47,7 @@ exports.aiQrCodeGenerator = __importStar(require("./ai-qr-code-generator"));
47
47
  exports.aiTalkingPhoto = __importStar(require("./ai-talking-photo"));
48
48
  exports.animation = __importStar(require("./animation"));
49
49
  exports.autoSubtitleGenerator = __importStar(require("./auto-subtitle-generator"));
50
+ exports.faceDetection = __importStar(require("./face-detection"));
50
51
  exports.faceSwap = __importStar(require("./face-swap"));
51
52
  exports.faceSwapPhoto = __importStar(require("./face-swap-photo"));
52
53
  exports.files = __importStar(require("./files"));
@@ -12,6 +12,7 @@ import { AiQrCodeGeneratorClient } from "../../resources/v1/ai-qr-code-generator
12
12
  import { AiTalkingPhotoClient } from "../../resources/v1/ai-talking-photo";
13
13
  import { AnimationClient } from "../../resources/v1/animation";
14
14
  import { AutoSubtitleGeneratorClient } from "../../resources/v1/auto-subtitle-generator";
15
+ import { FaceDetectionClient } from "../../resources/v1/face-detection";
15
16
  import { FaceSwapClient } from "../../resources/v1/face-swap";
16
17
  import { FaceSwapPhotoClient } from "../../resources/v1/face-swap-photo";
17
18
  import { FilesClient } from "../../resources/v1/files";
@@ -26,6 +27,7 @@ import { VideoToVideoClient } from "../../resources/v1/video-to-video";
26
27
  export declare class V1Client extends CoreResourceClient {
27
28
  private _imageProjectsLazy?;
28
29
  private _videoProjectsLazy?;
30
+ private _faceDetectionLazy?;
29
31
  private _aiClothesChangerLazy?;
30
32
  private _aiFaceEditorLazy?;
31
33
  private _aiGifGeneratorLazy?;
@@ -51,6 +53,7 @@ export declare class V1Client extends CoreResourceClient {
51
53
  constructor(coreClient: CoreClient, opts: ResourceClientOptions);
52
54
  get imageProjects(): ImageProjectsClient;
53
55
  get videoProjects(): VideoProjectsClient;
56
+ get faceDetection(): FaceDetectionClient;
54
57
  get aiClothesChanger(): AiClothesChangerClient;
55
58
  get aiFaceEditor(): AiFaceEditorClient;
56
59
  get aiGifGenerator(): AiGifGeneratorClient;
@@ -8,6 +8,7 @@ class V1Client extends core_1.CoreResourceClient {
8
8
  if (this._opts.lazyLoad === false) {
9
9
  this.imageProjects;
10
10
  this.videoProjects;
11
+ this.faceDetection;
11
12
  this.aiClothesChanger;
12
13
  this.aiFaceEditor;
13
14
  this.aiGifGenerator;
@@ -42,6 +43,11 @@ class V1Client extends core_1.CoreResourceClient {
42
43
  return ((_a = this._videoProjectsLazy) !== null && _a !== void 0 ? _a : (this._videoProjectsLazy =
43
44
  new (require("./video-projects").VideoProjectsClient)(this._client, this._opts)));
44
45
  }
46
+ get faceDetection() {
47
+ var _a;
48
+ return ((_a = this._faceDetectionLazy) !== null && _a !== void 0 ? _a : (this._faceDetectionLazy =
49
+ new (require("./face-detection").FaceDetectionClient)(this._client, this._opts)));
50
+ }
45
51
  get aiClothesChanger() {
46
52
  var _a;
47
53
  return ((_a = this._aiClothesChangerLazy) !== null && _a !== void 0 ? _a : (this._aiClothesChangerLazy =
@@ -135,6 +135,24 @@ export { V1AutoSubtitleGeneratorCreateResponse401MessageEnum } from "./v1-auto-s
135
135
  export { V1AutoSubtitleGeneratorCreateResponse404 } from "./v1-auto-subtitle-generator-create-response404";
136
136
  export { V1AutoSubtitleGeneratorCreateResponse404MessageEnum } from "./v1-auto-subtitle-generator-create-response404-message-enum";
137
137
  export { V1AutoSubtitleGeneratorCreateResponse422 } from "./v1-auto-subtitle-generator-create-response422";
138
+ export { V1FaceDetectionCreateBody } from "./v1-face-detection-create-body";
139
+ export { V1FaceDetectionCreateBodyAssets } from "./v1-face-detection-create-body-assets";
140
+ export { V1FaceDetectionCreateResponse } from "./v1-face-detection-create-response";
141
+ export { V1FaceDetectionCreateResponse400 } from "./v1-face-detection-create-response400";
142
+ export { V1FaceDetectionCreateResponse401 } from "./v1-face-detection-create-response401";
143
+ export { V1FaceDetectionCreateResponse401MessageEnum } from "./v1-face-detection-create-response401-message-enum";
144
+ export { V1FaceDetectionCreateResponse404 } from "./v1-face-detection-create-response404";
145
+ export { V1FaceDetectionCreateResponse404MessageEnum } from "./v1-face-detection-create-response404-message-enum";
146
+ export { V1FaceDetectionCreateResponse422 } from "./v1-face-detection-create-response422";
147
+ export { V1FaceDetectionGetResponse } from "./v1-face-detection-get-response";
148
+ export { V1FaceDetectionGetResponseFacesItem } from "./v1-face-detection-get-response-faces-item";
149
+ export { V1FaceDetectionGetResponseStatusEnum } from "./v1-face-detection-get-response-status-enum";
150
+ export { V1FaceDetectionGetResponse400 } from "./v1-face-detection-get-response400";
151
+ export { V1FaceDetectionGetResponse401 } from "./v1-face-detection-get-response401";
152
+ export { V1FaceDetectionGetResponse401MessageEnum } from "./v1-face-detection-get-response401-message-enum";
153
+ export { V1FaceDetectionGetResponse404 } from "./v1-face-detection-get-response404";
154
+ export { V1FaceDetectionGetResponse404MessageEnum } from "./v1-face-detection-get-response404-message-enum";
155
+ export { V1FaceDetectionGetResponse422 } from "./v1-face-detection-get-response422";
138
156
  export { V1FaceSwapCreateBody } from "./v1-face-swap-create-body";
139
157
  export { V1FaceSwapCreateBodyAssets } from "./v1-face-swap-create-body-assets";
140
158
  export { V1FaceSwapCreateBodyAssetsVideoSourceEnum } from "./v1-face-swap-create-body-assets-video-source-enum";
@@ -0,0 +1,22 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * Provide the assets for face detection
4
+ */
5
+ export type V1FaceDetectionCreateBodyAssets = {
6
+ /**
7
+ * This is the image or video where the face will be detected. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
8
+ */
9
+ targetFilePath: string;
10
+ };
11
+ /**
12
+ * @internal
13
+ * V1FaceDetectionCreateBodyAssets without any key transformation, this is what
14
+ * we expect to come in as network data
15
+ */
16
+ export type External$V1FaceDetectionCreateBodyAssets = {
17
+ target_file_path: string;
18
+ };
19
+ export declare const Schemas$V1FaceDetectionCreateBodyAssets: {
20
+ in: z.ZodType<V1FaceDetectionCreateBodyAssets, z.ZodTypeDef, unknown>;
21
+ out: z.ZodType<External$V1FaceDetectionCreateBodyAssets, z.ZodTypeDef, V1FaceDetectionCreateBodyAssets>;
22
+ };
@@ -0,0 +1,67 @@
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$V1FaceDetectionCreateBodyAssets = void 0;
37
+ const core_1 = require("../core");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1FaceDetectionCreateBodyAssets
41
+ */
42
+ const SchemaIn$V1FaceDetectionCreateBodyAssets = z
43
+ .object({
44
+ target_file_path: z.string(),
45
+ })
46
+ .transform((obj) => {
47
+ return (0, core_1.zodTransform)(obj, {
48
+ target_file_path: "targetFilePath",
49
+ });
50
+ });
51
+ /**
52
+ * @internal
53
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1FaceDetectionCreateBodyAssets
54
+ */
55
+ const SchemaOut$V1FaceDetectionCreateBodyAssets = z
56
+ .object({
57
+ targetFilePath: z.string(),
58
+ })
59
+ .transform((obj) => {
60
+ return (0, core_1.zodTransform)(obj, {
61
+ targetFilePath: "target_file_path",
62
+ });
63
+ });
64
+ exports.Schemas$V1FaceDetectionCreateBodyAssets = {
65
+ in: SchemaIn$V1FaceDetectionCreateBodyAssets,
66
+ out: SchemaOut$V1FaceDetectionCreateBodyAssets,
67
+ };
@@ -0,0 +1,30 @@
1
+ import { External$V1FaceDetectionCreateBodyAssets, V1FaceDetectionCreateBodyAssets } from "./v1-face-detection-create-body-assets";
2
+ import * as z from "zod";
3
+ /**
4
+ * V1FaceDetectionCreateBody
5
+ */
6
+ export type V1FaceDetectionCreateBody = {
7
+ /**
8
+ * Provide the assets for face detection
9
+ */
10
+ assets: V1FaceDetectionCreateBodyAssets;
11
+ /**
12
+ * Confidence threshold for filtering detected faces.
13
+ * * Higher values (e.g., 0.9) include only faces detected with high certainty, reducing false positives.
14
+ * * Lower values (e.g., 0.3) include more faces, but may increase the chance of incorrect detections.
15
+ */
16
+ confidenceScore?: number | undefined;
17
+ };
18
+ /**
19
+ * @internal
20
+ * V1FaceDetectionCreateBody without any key transformation, this is what
21
+ * we expect to come in as network data
22
+ */
23
+ export type External$V1FaceDetectionCreateBody = {
24
+ assets: External$V1FaceDetectionCreateBodyAssets;
25
+ confidence_score?: number | undefined;
26
+ };
27
+ export declare const Schemas$V1FaceDetectionCreateBody: {
28
+ in: z.ZodType<V1FaceDetectionCreateBody, z.ZodTypeDef, unknown>;
29
+ out: z.ZodType<External$V1FaceDetectionCreateBody, z.ZodTypeDef, V1FaceDetectionCreateBody>;
30
+ };
@@ -0,0 +1,72 @@
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$V1FaceDetectionCreateBody = void 0;
37
+ const v1_face_detection_create_body_assets_1 = require("./v1-face-detection-create-body-assets");
38
+ const core_1 = require("../core");
39
+ const z = __importStar(require("zod"));
40
+ /**
41
+ * Takes network data, validates it, and transforms keys to match typescript object V1FaceDetectionCreateBody
42
+ */
43
+ const SchemaIn$V1FaceDetectionCreateBody = z
44
+ .object({
45
+ assets: v1_face_detection_create_body_assets_1.Schemas$V1FaceDetectionCreateBodyAssets.in,
46
+ confidence_score: z.number().optional(),
47
+ })
48
+ .transform((obj) => {
49
+ return (0, core_1.zodTransform)(obj, {
50
+ assets: "assets",
51
+ confidence_score: "confidenceScore",
52
+ });
53
+ });
54
+ /**
55
+ * @internal
56
+ * Takes typescript data, validates it, and maps keys to match the expected external object External$V1FaceDetectionCreateBody
57
+ */
58
+ const SchemaOut$V1FaceDetectionCreateBody = z
59
+ .object({
60
+ assets: v1_face_detection_create_body_assets_1.Schemas$V1FaceDetectionCreateBodyAssets.out,
61
+ confidenceScore: z.number().optional(),
62
+ })
63
+ .transform((obj) => {
64
+ return (0, core_1.zodTransform)(obj, {
65
+ assets: "assets",
66
+ confidenceScore: "confidence_score",
67
+ });
68
+ });
69
+ exports.Schemas$V1FaceDetectionCreateBody = {
70
+ in: SchemaIn$V1FaceDetectionCreateBody,
71
+ out: SchemaOut$V1FaceDetectionCreateBody,
72
+ };
@@ -0,0 +1,27 @@
1
+ import * as z from "zod";
2
+ /**
3
+ * V1FaceDetectionCreateResponse
4
+ */
5
+ export type V1FaceDetectionCreateResponse = {
6
+ /**
7
+ * The credits charged for the task.
8
+ */
9
+ creditsCharged: number;
10
+ /**
11
+ * The id of the task
12
+ */
13
+ id: string;
14
+ };
15
+ /**
16
+ * @internal
17
+ * V1FaceDetectionCreateResponse without any key transformation, this is what
18
+ * we expect to come in as network data
19
+ */
20
+ export type External$V1FaceDetectionCreateResponse = {
21
+ credits_charged: number;
22
+ id: string;
23
+ };
24
+ export declare const Schemas$V1FaceDetectionCreateResponse: {
25
+ in: z.ZodType<V1FaceDetectionCreateResponse, z.ZodTypeDef, unknown>;
26
+ out: z.ZodType<External$V1FaceDetectionCreateResponse, z.ZodTypeDef, V1FaceDetectionCreateResponse>;
27
+ };
@@ -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$V1FaceDetectionCreateResponse = void 0;
37
+ const core_1 = require("../core");
38
+ const z = __importStar(require("zod"));
39
+ /**
40
+ * Takes network data, validates it, and transforms keys to match typescript object V1FaceDetectionCreateResponse
41
+ */
42
+ const SchemaIn$V1FaceDetectionCreateResponse = z
43
+ .object({
44
+ credits_charged: z.number().int(),
45
+ id: z.string(),
46
+ })
47
+ .transform((obj) => {
48
+ return (0, core_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$V1FaceDetectionCreateResponse
56
+ */
57
+ const SchemaOut$V1FaceDetectionCreateResponse = z
58
+ .object({
59
+ creditsCharged: z.number().int(),
60
+ id: z.string(),
61
+ })
62
+ .transform((obj) => {
63
+ return (0, core_1.zodTransform)(obj, {
64
+ creditsCharged: "credits_charged",
65
+ id: "id",
66
+ });
67
+ });
68
+ exports.Schemas$V1FaceDetectionCreateResponse = {
69
+ in: SchemaIn$V1FaceDetectionCreateResponse,
70
+ out: SchemaOut$V1FaceDetectionCreateResponse,
71
+ };