@caartzee/theme-sdk 1.2.1 → 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 +5 -1
- package/dist/lib/index.js +5 -1
- package/dist/types/src/blocks/block-contract.d.ts +10 -10
- package/dist/types/src/cli/mcp/v2-api-catalog.d.ts +69 -0
- package/dist/types/src/cli/mcp/v2-commerce-tools.d.ts +6 -4
- package/dist/types/src/contracts/manifest.d.ts +77 -77
- package/dist/types/src/sections/section-contract.d.ts +12 -12
- package/package.json +1 -1
- package/templates/commerce/manifest.json +1 -1
|
@@ -3812,6 +3812,7 @@ var SettingTypeSchema = z3.enum([
|
|
|
3812
3812
|
"range",
|
|
3813
3813
|
"url",
|
|
3814
3814
|
"json",
|
|
3815
|
+
"html",
|
|
3815
3816
|
"code",
|
|
3816
3817
|
"javascript",
|
|
3817
3818
|
"category_list",
|
|
@@ -3924,7 +3925,7 @@ var RAW_HTML_SECTION_MANIFEST = {
|
|
|
3924
3925
|
settings: [
|
|
3925
3926
|
{
|
|
3926
3927
|
id: "html",
|
|
3927
|
-
type: "
|
|
3928
|
+
type: "html",
|
|
3928
3929
|
label: "HTML Content",
|
|
3929
3930
|
placeholder: "<div>Custom HTML content...</div>",
|
|
3930
3931
|
required: false,
|
|
@@ -6917,6 +6918,9 @@ function loadCandyThemeFromSource(source, fallbackSlug = "candy-theme") {
|
|
|
6917
6918
|
});
|
|
6918
6919
|
}
|
|
6919
6920
|
}
|
|
6921
|
+
if (!sectionSchemas["raw-html"]) {
|
|
6922
|
+
sectionSchemas["raw-html"] = RAW_HTML_SECTION_MANIFEST;
|
|
6923
|
+
}
|
|
6920
6924
|
for (const entry of source.list("assets")) {
|
|
6921
6925
|
assets[entry] = source.read(`assets/${entry}`) ?? "";
|
|
6922
6926
|
}
|
package/dist/lib/index.js
CHANGED
|
@@ -622,6 +622,7 @@ var SettingTypeSchema = z2.enum([
|
|
|
622
622
|
"range",
|
|
623
623
|
"url",
|
|
624
624
|
"json",
|
|
625
|
+
"html",
|
|
625
626
|
"code",
|
|
626
627
|
"javascript",
|
|
627
628
|
"category_list",
|
|
@@ -734,7 +735,7 @@ var RAW_HTML_SECTION_MANIFEST = {
|
|
|
734
735
|
settings: [
|
|
735
736
|
{
|
|
736
737
|
id: "html",
|
|
737
|
-
type: "
|
|
738
|
+
type: "html",
|
|
738
739
|
label: "HTML Content",
|
|
739
740
|
placeholder: "<div>Custom HTML content...</div>",
|
|
740
741
|
required: false,
|
|
@@ -4866,6 +4867,9 @@ function loadCandyThemeFromSource(source, fallbackSlug = "candy-theme") {
|
|
|
4866
4867
|
});
|
|
4867
4868
|
}
|
|
4868
4869
|
}
|
|
4870
|
+
if (!sectionSchemas["raw-html"]) {
|
|
4871
|
+
sectionSchemas["raw-html"] = RAW_HTML_SECTION_MANIFEST;
|
|
4872
|
+
}
|
|
4869
4873
|
for (const entry of source.list("assets")) {
|
|
4870
4874
|
assets[entry] = source.read(`assets/${entry}`) ?? "";
|
|
4871
4875
|
}
|
|
@@ -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,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
|
+
}[];
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
/**
|
|
3
3
|
* Caartzee Developer V2 Commerce MCP Tools & Reusable Prompts
|
|
4
|
-
* Enables AI agents to discover V2 REST APIs,
|
|
5
|
-
* @caartzee/storefront-sdk, mobile
|
|
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
6
|
*/
|
|
7
7
|
export declare const V2_COMMERCE_ENDPOINTS_SUMMARY: {
|
|
8
8
|
id: string;
|
|
9
|
-
method:
|
|
9
|
+
method: "POST" | "GET" | "PATCH" | "PUT" | "DELETE";
|
|
10
10
|
path: string;
|
|
11
11
|
tag: string;
|
|
12
|
+
summary: string;
|
|
12
13
|
scope: string;
|
|
13
14
|
auth: string;
|
|
14
|
-
rateTier:
|
|
15
|
+
rateTier: import("./v2-api-catalog").V2RateTier;
|
|
16
|
+
sdkMethod: string | undefined;
|
|
15
17
|
}[];
|
|
16
18
|
export declare function registerV2CommerceMcpTools(server: McpServer): void;
|