@superdesign/cli 0.1.0 → 0.1.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/dist/api/brand.d.ts +55 -0
- package/dist/api/designs.d.ts +28 -0
- package/dist/api/projects.d.ts +5 -0
- package/dist/api/prompts.d.ts +53 -0
- package/dist/commands/extract-brand-guide.d.ts +5 -0
- package/dist/commands/fetch-design-nodes.d.ts +5 -0
- package/dist/commands/get-design.d.ts +5 -0
- package/dist/commands/get-prompts.d.ts +5 -0
- package/dist/commands/search-prompts.d.ts +5 -0
- package/dist/index.cjs +554 -213
- package/dist/index.d.ts +3 -0
- package/dist/index.js +531 -205
- package/dist/utils/job-runner.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand API endpoints
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Color from brand guide
|
|
6
|
+
*/
|
|
7
|
+
export interface BrandColor {
|
|
8
|
+
hex: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
usage?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Font from brand guide
|
|
14
|
+
*/
|
|
15
|
+
export interface BrandFont {
|
|
16
|
+
family: string;
|
|
17
|
+
weight?: string;
|
|
18
|
+
style?: string;
|
|
19
|
+
usage?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Screenshot data from brand guide
|
|
23
|
+
*/
|
|
24
|
+
export interface BrandScreenshot {
|
|
25
|
+
url: string;
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Brand guide data structure
|
|
31
|
+
*/
|
|
32
|
+
export interface BrandGuideData {
|
|
33
|
+
colors?: BrandColor[];
|
|
34
|
+
fonts?: BrandFont[];
|
|
35
|
+
logo?: {
|
|
36
|
+
url?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
};
|
|
39
|
+
screenshot?: BrandScreenshot;
|
|
40
|
+
title?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Response for brand guide extraction
|
|
45
|
+
*/
|
|
46
|
+
export interface ExtractBrandGuideResponse {
|
|
47
|
+
success: boolean;
|
|
48
|
+
data?: BrandGuideData;
|
|
49
|
+
error?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Extract brand guide from a URL
|
|
53
|
+
* This is a sync endpoint (not async job)
|
|
54
|
+
*/
|
|
55
|
+
export declare function extractBrandGuide(url: string): Promise<ExtractBrandGuideResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Designs API endpoints
|
|
3
|
+
*/
|
|
4
|
+
export interface DesignNodeInfo {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
screenshot: {
|
|
9
|
+
url: string;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
} | null;
|
|
13
|
+
parentDraftId: string | null;
|
|
14
|
+
iterationDepth: number;
|
|
15
|
+
previewUrl: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
}
|
|
18
|
+
export interface FetchDesignNodesResponse {
|
|
19
|
+
projectId: string;
|
|
20
|
+
nodes: DesignNodeInfo[];
|
|
21
|
+
}
|
|
22
|
+
export interface GetDesignHtmlResponse {
|
|
23
|
+
draftId: string;
|
|
24
|
+
title: string;
|
|
25
|
+
htmlContent: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function fetchDesignNodes(projectId: string): Promise<FetchDesignNodesResponse>;
|
|
28
|
+
export declare function getDesignHtml(draftId: string): Promise<GetDesignHtmlResponse>;
|
package/dist/api/projects.d.ts
CHANGED
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface CreateProjectRequest {
|
|
5
5
|
title: string;
|
|
6
|
+
html?: string;
|
|
7
|
+
prompt?: string;
|
|
8
|
+
deviceMode?: 'mobile' | 'tablet' | 'desktop';
|
|
6
9
|
}
|
|
7
10
|
export interface CreateProjectResponse {
|
|
8
11
|
projectId: string;
|
|
9
12
|
title: string;
|
|
10
13
|
shareToken?: string;
|
|
11
14
|
projectUrl: string;
|
|
15
|
+
draftId?: string;
|
|
16
|
+
previewUrl?: string;
|
|
12
17
|
}
|
|
13
18
|
export interface AddDraftRequest {
|
|
14
19
|
title: string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompts API endpoints
|
|
3
|
+
*/
|
|
4
|
+
export interface PromptSearchResult {
|
|
5
|
+
slug: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
tags: string[];
|
|
9
|
+
previewUrl: string | null;
|
|
10
|
+
viewCount: number;
|
|
11
|
+
remixCount: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SearchPromptsRequest {
|
|
14
|
+
keyword?: string;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface SearchPromptsResponse {
|
|
20
|
+
prompts: PromptSearchResult[];
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
export interface PromptDetail {
|
|
24
|
+
slug: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description: string | null;
|
|
27
|
+
prompt: string;
|
|
28
|
+
tags: string[];
|
|
29
|
+
previewUrl: string | null;
|
|
30
|
+
images: Array<{
|
|
31
|
+
url: string;
|
|
32
|
+
}> | null;
|
|
33
|
+
thumbnail: {
|
|
34
|
+
type: string;
|
|
35
|
+
url: string;
|
|
36
|
+
} | null;
|
|
37
|
+
viewCount: number;
|
|
38
|
+
remixCount: number;
|
|
39
|
+
}
|
|
40
|
+
export interface GetPromptsRequest {
|
|
41
|
+
slugs: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface GetPromptsResponse {
|
|
44
|
+
prompts: PromptDetail[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Search prompts in the library
|
|
48
|
+
*/
|
|
49
|
+
export declare function searchPrompts(data: SearchPromptsRequest): Promise<SearchPromptsResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Get prompts by slugs
|
|
52
|
+
*/
|
|
53
|
+
export declare function getPrompts(data: GetPromptsRequest): Promise<GetPromptsResponse>;
|