@caartzee/theme-sdk 1.2.0 → 1.2.2
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/bin/caartzee-theme.js +469 -54
- package/dist/lib/index.js +469 -54
- package/dist/types/src/blocks/block-contract.d.ts +10 -10
- package/dist/types/src/cli/mcp/ui-patterns-tools.d.ts +26 -0
- package/dist/types/src/cli/mcp/v2-api-catalog.d.ts +69 -0
- package/dist/types/src/cli/mcp/v2-commerce-tools.d.ts +18 -0
- package/dist/types/src/contracts/manifest.d.ts +77 -77
- package/dist/types/src/scaffold/design-presets.d.ts +41 -0
- package/dist/types/src/scaffold/template-generator.d.ts +2 -0
- package/dist/types/src/sections/section-contract.d.ts +12 -12
- package/package.json +1 -1
- package/templates/commerce/manifest.json +1 -1
|
@@ -10,7 +10,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
10
10
|
allowedParentSections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
11
|
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
12
|
id: z.ZodString;
|
|
13
|
-
type: z.ZodEnum<["text", "textarea", "richtext", "inline_richtext", "header", "paragraph", "number", "boolean", "checkbox", "radio", "color", "image", "image_picker", "select", "range", "url", "json", "code", "javascript", "category_list", "product_picker", "collection_picker", "font", "spacing"]>;
|
|
13
|
+
type: z.ZodEnum<["text", "textarea", "richtext", "inline_richtext", "header", "paragraph", "number", "boolean", "checkbox", "radio", "color", "image", "image_picker", "select", "range", "url", "json", "html", "code", "javascript", "category_list", "product_picker", "collection_picker", "font", "spacing"]>;
|
|
14
14
|
label: z.ZodString;
|
|
15
15
|
default: z.ZodOptional<z.ZodUnknown>;
|
|
16
16
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -30,7 +30,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
30
30
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
id: string;
|
|
33
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
33
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
34
34
|
label: string;
|
|
35
35
|
options?: {
|
|
36
36
|
value: string | number | boolean;
|
|
@@ -44,7 +44,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
44
44
|
placeholder?: string | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
id: string;
|
|
47
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
47
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
48
48
|
label: string;
|
|
49
49
|
options?: {
|
|
50
50
|
value: string | number | boolean;
|
|
@@ -59,7 +59,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
59
59
|
}>, "many">>;
|
|
60
60
|
settingsSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
61
|
id: z.ZodString;
|
|
62
|
-
type: z.ZodEnum<["text", "textarea", "richtext", "inline_richtext", "header", "paragraph", "number", "boolean", "checkbox", "radio", "color", "image", "image_picker", "select", "range", "url", "json", "code", "javascript", "category_list", "product_picker", "collection_picker", "font", "spacing"]>;
|
|
62
|
+
type: z.ZodEnum<["text", "textarea", "richtext", "inline_richtext", "header", "paragraph", "number", "boolean", "checkbox", "radio", "color", "image", "image_picker", "select", "range", "url", "json", "html", "code", "javascript", "category_list", "product_picker", "collection_picker", "font", "spacing"]>;
|
|
63
63
|
label: z.ZodString;
|
|
64
64
|
default: z.ZodOptional<z.ZodUnknown>;
|
|
65
65
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -79,7 +79,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
79
79
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
81
|
id: string;
|
|
82
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
82
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
83
83
|
label: string;
|
|
84
84
|
options?: {
|
|
85
85
|
value: string | number | boolean;
|
|
@@ -93,7 +93,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
93
93
|
placeholder?: string | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
id: string;
|
|
96
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
96
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
97
97
|
label: string;
|
|
98
98
|
options?: {
|
|
99
99
|
value: string | number | boolean;
|
|
@@ -111,7 +111,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
111
111
|
type: string;
|
|
112
112
|
settings?: {
|
|
113
113
|
id: string;
|
|
114
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
114
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
115
115
|
label: string;
|
|
116
116
|
options?: {
|
|
117
117
|
value: string | number | boolean;
|
|
@@ -130,7 +130,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
130
130
|
description?: string | undefined;
|
|
131
131
|
settingsSchema?: {
|
|
132
132
|
id: string;
|
|
133
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
133
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
134
134
|
label: string;
|
|
135
135
|
options?: {
|
|
136
136
|
value: string | number | boolean;
|
|
@@ -150,7 +150,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
150
150
|
type: string;
|
|
151
151
|
settings?: {
|
|
152
152
|
id: string;
|
|
153
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
153
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
154
154
|
label: string;
|
|
155
155
|
options?: {
|
|
156
156
|
value: string | number | boolean;
|
|
@@ -169,7 +169,7 @@ export declare const BlockContractSchema: z.ZodObject<{
|
|
|
169
169
|
description?: string | undefined;
|
|
170
170
|
settingsSchema?: {
|
|
171
171
|
id: string;
|
|
172
|
-
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
172
|
+
type: "number" | "boolean" | "code" | "header" | "text" | "textarea" | "richtext" | "inline_richtext" | "paragraph" | "checkbox" | "radio" | "color" | "image" | "image_picker" | "select" | "range" | "url" | "json" | "html" | "javascript" | "category_list" | "product_picker" | "collection_picker" | "font" | "spacing";
|
|
173
173
|
label: string;
|
|
174
174
|
options?: {
|
|
175
175
|
value: string | number | boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export interface CandyUiPattern {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
category: 'hero' | 'merchandising' | 'social-proof' | 'conversion' | 'commerce-page';
|
|
6
|
+
targetFile: string;
|
|
7
|
+
description: string;
|
|
8
|
+
candySource: string;
|
|
9
|
+
cssSnippet: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const CANDY_UI_PATTERNS: CandyUiPattern[];
|
|
12
|
+
export declare function auditCandyUiConsistency(themeDir: string): {
|
|
13
|
+
themeDir: string;
|
|
14
|
+
status: string;
|
|
15
|
+
summary: {
|
|
16
|
+
passed: number;
|
|
17
|
+
failed: number;
|
|
18
|
+
warnings: number;
|
|
19
|
+
};
|
|
20
|
+
checks: {
|
|
21
|
+
id: string;
|
|
22
|
+
status: string;
|
|
23
|
+
message: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
export declare function registerUiPatternsTools(server: McpServer): void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Complete Caartzee Developer V2 Commerce API Catalog
|
|
3
|
+
* Includes every externally exposed endpoint, required scopes, auth modes,
|
|
4
|
+
* query/path parameters, request body examples, response shapes, and @caartzee/storefront-sdk snippets.
|
|
5
|
+
*/
|
|
6
|
+
export type V2AuthMode = 'publishable_or_secret' | 'customer_required' | 'confidential_only';
|
|
7
|
+
export type V2RateTier = 'read' | 'write' | 'auth' | 'checkout';
|
|
8
|
+
export interface V2EndpointCatalogEntry {
|
|
9
|
+
id: string;
|
|
10
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
11
|
+
/** Relative to /api/developer/v2 */
|
|
12
|
+
path: string;
|
|
13
|
+
fullPath: string;
|
|
14
|
+
tag: string;
|
|
15
|
+
summary: string;
|
|
16
|
+
requiredScope: string;
|
|
17
|
+
authMode: V2AuthMode;
|
|
18
|
+
rateTier: V2RateTier;
|
|
19
|
+
idempotent?: boolean;
|
|
20
|
+
sdkMethod?: string;
|
|
21
|
+
headers: Array<{
|
|
22
|
+
name: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
}>;
|
|
26
|
+
pathParams?: Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}>;
|
|
31
|
+
queryParams?: Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
description: string;
|
|
36
|
+
}>;
|
|
37
|
+
requestBody?: Record<string, unknown>;
|
|
38
|
+
responseExample?: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export declare const CAARTZEE_V2_API_CATALOG: V2EndpointCatalogEntry[];
|
|
41
|
+
export declare const CAARTZEE_V2_SCOPES: {
|
|
42
|
+
storefront: string[];
|
|
43
|
+
merchantConfidentialOnly: string[];
|
|
44
|
+
testing: string[];
|
|
45
|
+
};
|
|
46
|
+
export declare const CAARTZEE_V2_RATE_LIMITS: {
|
|
47
|
+
read: {
|
|
48
|
+
windowSeconds: number;
|
|
49
|
+
maxRequests: number;
|
|
50
|
+
};
|
|
51
|
+
write: {
|
|
52
|
+
windowSeconds: number;
|
|
53
|
+
maxRequests: number;
|
|
54
|
+
};
|
|
55
|
+
auth: {
|
|
56
|
+
windowSeconds: number;
|
|
57
|
+
maxRequests: number;
|
|
58
|
+
};
|
|
59
|
+
checkout: {
|
|
60
|
+
windowSeconds: number;
|
|
61
|
+
maxRequests: number;
|
|
62
|
+
};
|
|
63
|
+
headers: string[];
|
|
64
|
+
};
|
|
65
|
+
export declare const CAARTZEE_V2_ERRORS: {
|
|
66
|
+
status: number;
|
|
67
|
+
code: string;
|
|
68
|
+
message: string;
|
|
69
|
+
}[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Caartzee Developer V2 Commerce MCP Tools & Reusable Prompts
|
|
4
|
+
* Enables AI agents to discover all 78+ V2 REST APIs, full request/response schemas,
|
|
5
|
+
* scopes, rate limits, webhooks, @caartzee/storefront-sdk, and mobile/Next.js headless guides.
|
|
6
|
+
*/
|
|
7
|
+
export declare const V2_COMMERCE_ENDPOINTS_SUMMARY: {
|
|
8
|
+
id: string;
|
|
9
|
+
method: "POST" | "GET" | "PATCH" | "PUT" | "DELETE";
|
|
10
|
+
path: string;
|
|
11
|
+
tag: string;
|
|
12
|
+
summary: string;
|
|
13
|
+
scope: string;
|
|
14
|
+
auth: string;
|
|
15
|
+
rateTier: import("./v2-api-catalog").V2RateTier;
|
|
16
|
+
sdkMethod: string | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
export declare function registerV2CommerceMcpTools(server: McpServer): void;
|