Skip to content

Commit 62a06f9

Browse files
magic-hour-sdk-bot[bot]sdk-github-actions[bot]davidhu2000
authored
feat: add support for multi-image edits in /v1/ai-image-editor (#126)
Co-authored-by: sdk-github-actions[bot] <sdk-github-actions[bot]@users.noreply.github.com> Co-authored-by: David Hu <davidhu314@gmail.com>
1 parent 1c50d9a commit 62a06f9

File tree

59 files changed

+1248
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1248
-108
lines changed

.sdk.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "b4a720d1-545c-494f-a7a5-df7d60093894",
2+
"id": "d284dafd-bc4c-4bf3-9d8f-022e1bfc293f",
33
"tracked_paths": [
44
{
55
"editable": true,
@@ -581,6 +581,10 @@
581581
"editable": false,
582582
"path": "src/types/v1-ai-image-editor-create-body-assets.ts"
583583
},
584+
{
585+
"editable": false,
586+
"path": "src/types/v1-ai-image-editor-create-body-style-model-enum.ts"
587+
},
584588
{
585589
"editable": false,
586590
"path": "src/types/v1-ai-image-editor-create-body-style.ts"
@@ -597,6 +601,10 @@
597601
"editable": false,
598602
"path": "src/types/v1-ai-image-generator-create-body-orientation-enum.ts"
599603
},
604+
{
605+
"editable": false,
606+
"path": "src/types/v1-ai-image-generator-create-body-style-quality-mode-enum.ts"
607+
},
600608
{
601609
"editable": false,
602610
"path": "src/types/v1-ai-image-generator-create-body-style-tool-enum.ts"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "magic-hour",
3-
"version": "0.42.0",
3+
"version": "0.43.0",
44
"main": "./dist/index.js",
55
"types": "./dist/index.d.ts",
66
"exports": {

src/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Base Client
22

3-
4-
53
## Submodules
64
- [ai-clothes-changer](resources/v1/ai-clothes-changer/README.md) - ai-clothes-changer
75
- [ai-face-editor](resources/v1/ai-face-editor/README.md) - ai-face-editor

src/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export enum Environment {
22
Environment = "https://api.magichour.ai",
3-
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.41.0",
3+
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.42.1",
44
}

src/helpers/generate-type.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ export type GenerateOptions = RequestOptions & {
2424
downloadDirectory?: string | undefined;
2525
};
2626

27-
type FilePathKeys<T> = Extract<keyof T, `${string}FilePath`>;
27+
type FilePathKeys<T> = Extract<
28+
keyof T,
29+
`${string}FilePath` | `${string}FilePaths`
30+
>;
2831

2932
// Extract FilePath properties as they are (preserving optional/required)
3033
type FilePathProps<T> = Pick<T, FilePathKeys<T>>;

src/resources/v1/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# v1
22

3-
4-
53
## Submodules
64
- [ai-clothes-changer](ai-clothes-changer/README.md) - ai-clothes-changer
75
- [ai-face-editor](ai-face-editor/README.md) - ai-face-editor

src/resources/v1/ai-clothes-changer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66

7+
78
<!-- CUSTOM DOCS START -->
89
### AI Clothes Changer Generate Workflow <a name="generate"></a>
910

@@ -91,4 +92,3 @@ const res = await client.v1.aiClothesChanger.create({
9192
##### Example
9293
`{"creditsCharged": 25, "frameCost": 25, "id": "cuid-example"}`
9394

94-

src/resources/v1/ai-face-editor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66

7+
78
<!-- CUSTOM DOCS START -->
89
### AI Face Editor Generate Workflow <a name="generate"></a>
910

@@ -131,4 +132,3 @@ const res = await client.v1.aiFaceEditor.create({
131132
##### Example
132133
`{"creditsCharged": 1, "frameCost": 1, "id": "cuid-example"}`
133134

134-

src/resources/v1/ai-gif-generator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66

7+
78
<!-- CUSTOM DOCS START -->
89
### AI Gif Generator Generate Workflow <a name="generate"></a>
910

@@ -46,7 +47,7 @@ const res = await client.v1.aiGifGenerator.generate(
4647
```
4748

4849
<!-- CUSTOM DOCS END -->
49-
### AI GIFs <a name="create"></a>
50+
### AI GIF Generator <a name="create"></a>
5051

5152
Create an AI GIF. Each GIF costs 50 credits.
5253

@@ -83,4 +84,3 @@ const res = await client.v1.aiGifGenerator.create({
8384
##### Example
8485
`{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}`
8586

86-

src/resources/v1/ai-gif-generator/resource-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class AiGifGeneratorClient extends CoreResourceClient {
8383
}
8484

8585
/**
86-
* AI GIFs
86+
* AI GIF Generator
8787
*
8888
* Create an AI GIF. Each GIF costs 50 credits.
8989
*

0 commit comments

Comments
 (0)