@magichourhq/api-types 0.0.0-dev.1
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/LICENSE +21 -0
- package/README.md +29 -0
- package/package.json +32 -0
- package/src/index.d.ts +7398 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Magic Hour AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Magic Hour API Types
|
|
2
|
+
|
|
3
|
+
TypeScript types for the [Magic Hour API](https://docs.magichour.ai), generated from its OpenAPI spec.
|
|
4
|
+
|
|
5
|
+
> **Internal package.** This supports Magic Hour's own integrations, and its types can change without notice. Don't install it directly. Use a [Magic Hour SDK](https://docs.magichour.ai) in your own projects.
|
|
6
|
+
|
|
7
|
+
It will be published to npm as `@magichourhq/api-types`. The package is not available yet.
|
|
8
|
+
|
|
9
|
+
The package contains only types, so import it with `import type`:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import type {
|
|
13
|
+
AiImageGeneratorCreateBody,
|
|
14
|
+
VideoProjectsGetResponse,
|
|
15
|
+
VideoProjectsGetResponse404,
|
|
16
|
+
} from "@magichourhq/api-types";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Type names follow the Node SDK, without its `V1` prefix. Fields use the same snake_case names as the REST API.
|
|
20
|
+
|
|
21
|
+
## Update the types
|
|
22
|
+
|
|
23
|
+
Replace `openapi.json`, then run:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
yarn generate
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The generator stops on any OpenAPI keyword it doesn't support, so it can't silently produce wrong types.
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@magichourhq/api-types",
|
|
3
|
+
"version": "0.0.0-dev.1",
|
|
4
|
+
"description": "Internal TypeScript types for the Magic Hour API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"packageManager": "yarn@4.18.0",
|
|
8
|
+
"types": "./src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/index.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/magichourhq/api-types.git"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"generate": "node scripts/generate.mjs",
|
|
23
|
+
"check": "tsc -p tsconfig.json",
|
|
24
|
+
"prepack": "yarn check"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"typescript": "7.0.2"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|