upres-cli 0.1.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.
@@ -0,0 +1,62 @@
1
+ type JobStatus = "pending" | "processing" | "completed" | "failed";
2
+ type ModelCategory = "image-upscale" | "image-enhance" | "video-upscale";
3
+ interface Job {
4
+ id: string;
5
+ status: JobStatus;
6
+ model: string;
7
+ scale: number;
8
+ result_url: string | null;
9
+ error: string | null;
10
+ original_filename: string;
11
+ created_at: string;
12
+ updated_at: string;
13
+ }
14
+ interface JobCreateRequest {
15
+ image_url?: string;
16
+ model?: string;
17
+ scale?: number;
18
+ }
19
+ interface JobListResponse {
20
+ data: Job[];
21
+ has_more: boolean;
22
+ next_cursor: string | null;
23
+ }
24
+ interface ApiError {
25
+ error: string;
26
+ quota?: number;
27
+ used?: number;
28
+ }
29
+ interface ModelParam {
30
+ name: string;
31
+ type: "string" | "number" | "integer" | "boolean";
32
+ required: boolean;
33
+ description: string;
34
+ default?: string | number | boolean;
35
+ options?: (string | number)[];
36
+ range?: string;
37
+ }
38
+ interface ModelDefinition {
39
+ id: string;
40
+ name: string;
41
+ description: string;
42
+ category: ModelCategory;
43
+ price: string;
44
+ inputTypes: string[];
45
+ params: ModelParam[];
46
+ }
47
+ interface UpresConfig {
48
+ apiKey?: string;
49
+ baseUrl?: string;
50
+ }
51
+ interface UpscaleOptions {
52
+ model?: string;
53
+ scale?: number;
54
+ resolution?: string;
55
+ output?: string;
56
+ wait?: boolean;
57
+ }
58
+ interface BatchOptions extends UpscaleOptions {
59
+ concurrency?: number;
60
+ }
61
+
62
+ export type { ApiError, BatchOptions, Job, JobCreateRequest, JobListResponse, JobStatus, ModelCategory, ModelDefinition, ModelParam, UpresConfig, UpscaleOptions };
@@ -0,0 +1,62 @@
1
+ type JobStatus = "pending" | "processing" | "completed" | "failed";
2
+ type ModelCategory = "image-upscale" | "image-enhance" | "video-upscale";
3
+ interface Job {
4
+ id: string;
5
+ status: JobStatus;
6
+ model: string;
7
+ scale: number;
8
+ result_url: string | null;
9
+ error: string | null;
10
+ original_filename: string;
11
+ created_at: string;
12
+ updated_at: string;
13
+ }
14
+ interface JobCreateRequest {
15
+ image_url?: string;
16
+ model?: string;
17
+ scale?: number;
18
+ }
19
+ interface JobListResponse {
20
+ data: Job[];
21
+ has_more: boolean;
22
+ next_cursor: string | null;
23
+ }
24
+ interface ApiError {
25
+ error: string;
26
+ quota?: number;
27
+ used?: number;
28
+ }
29
+ interface ModelParam {
30
+ name: string;
31
+ type: "string" | "number" | "integer" | "boolean";
32
+ required: boolean;
33
+ description: string;
34
+ default?: string | number | boolean;
35
+ options?: (string | number)[];
36
+ range?: string;
37
+ }
38
+ interface ModelDefinition {
39
+ id: string;
40
+ name: string;
41
+ description: string;
42
+ category: ModelCategory;
43
+ price: string;
44
+ inputTypes: string[];
45
+ params: ModelParam[];
46
+ }
47
+ interface UpresConfig {
48
+ apiKey?: string;
49
+ baseUrl?: string;
50
+ }
51
+ interface UpscaleOptions {
52
+ model?: string;
53
+ scale?: number;
54
+ resolution?: string;
55
+ output?: string;
56
+ wait?: boolean;
57
+ }
58
+ interface BatchOptions extends UpscaleOptions {
59
+ concurrency?: number;
60
+ }
61
+
62
+ export type { ApiError, BatchOptions, Job, JobCreateRequest, JobListResponse, JobStatus, ModelCategory, ModelDefinition, ModelParam, UpresConfig, UpscaleOptions };
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "upres-cli",
3
+ "version": "0.1.0",
4
+ "description": "Official CLI + SDK for upres.ai — AI image & video upscaling",
5
+ "type": "module",
6
+ "main": "./dist/client.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/client.d.ts",
10
+ "import": "./dist/client.js",
11
+ "require": "./dist/client.cjs"
12
+ },
13
+ "./types": {
14
+ "types": "./dist/types.d.ts",
15
+ "import": "./dist/types.js",
16
+ "require": "./dist/types.cjs"
17
+ }
18
+ },
19
+ "bin": {
20
+ "upres": "./dist/cli.js"
21
+ },
22
+ "scripts": {
23
+ "build": "tsup",
24
+ "dev": "tsx src/cli.ts",
25
+ "typecheck": "tsc --noEmit",
26
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
27
+ "prepublishOnly": "npm run build"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "keywords": [
35
+ "ai",
36
+ "upscaling",
37
+ "cli",
38
+ "real-esrgan",
39
+ "seedvr2",
40
+ "image-processing",
41
+ "video-upscaling",
42
+ "8k",
43
+ "upscaler",
44
+ "ai-tools",
45
+ "image-upscaler",
46
+ "ai-image-upscaler"
47
+ ],
48
+ "author": "upres.ai <support@upres.ai>",
49
+ "license": "MIT",
50
+ "homepage": "https://upres.ai",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/auroracapital/upres-cli"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/auroracapital/upres-cli/issues"
57
+ },
58
+ "engines": {
59
+ "node": ">=18.0.0"
60
+ },
61
+ "devDependencies": {
62
+ "@types/jest": "^29.5.12",
63
+ "@types/node": "^20.11.0",
64
+ "jest": "^29.7.0",
65
+ "ts-jest": "^29.1.2",
66
+ "tsup": "^8.0.2",
67
+ "tsx": "^4.7.1",
68
+ "typescript": "^5.3.3"
69
+ }
70
+ }