@hyprcart/app-sdk 1.0.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.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @hyprcart/app-sdk
2
+
3
+ Public SDK helpers for building Hyprcart app surfaces.
4
+
5
+ Use this package from standalone app projects for typed surface contexts, rendering helpers, translations, fixtures, validation helpers, and redacted diagnostics.
@@ -0,0 +1,97 @@
1
+ export { validateManifest } from '@hyprcart/app-manifest';
2
+
3
+ interface HyprcartFixturePack {
4
+ id: string;
5
+ name: string;
6
+ locale: string;
7
+ currency: string;
8
+ market: string;
9
+ product: Record<string, unknown>;
10
+ cart: Record<string, unknown>;
11
+ checkout: Record<string, unknown>;
12
+ customerSegment: Record<string, unknown>;
13
+ adminResource: Record<string, unknown>;
14
+ consent: Record<string, unknown>;
15
+ }
16
+ declare function createDefaultFixturePack(overrides?: Partial<HyprcartFixturePack>): HyprcartFixturePack;
17
+ declare function fallbackFixturePack(reason: string): HyprcartFixturePack;
18
+
19
+ interface HyprcartSurfaceContext {
20
+ surface: string;
21
+ requestId: string;
22
+ locale: string;
23
+ currency: string;
24
+ fixture: HyprcartFixturePack;
25
+ settings: Record<string, unknown>;
26
+ }
27
+ declare function createSurfaceContext(input: {
28
+ surface: string;
29
+ fixture: HyprcartFixturePack;
30
+ requestId?: string;
31
+ settings?: Record<string, unknown>;
32
+ }): HyprcartSurfaceContext;
33
+
34
+ declare function adminActionResponse(action: string, data?: Record<string, unknown>): {
35
+ kind: string;
36
+ action: string;
37
+ data: Record<string, unknown>;
38
+ };
39
+ declare function getAdminResource(context: HyprcartSurfaceContext): Record<string, unknown>;
40
+
41
+ declare function flowDeclaration(name: string, inputSchema: Record<string, unknown>): {
42
+ kind: string;
43
+ name: string;
44
+ inputSchema: Record<string, unknown>;
45
+ };
46
+ declare function mcpToolDescriptor(name: string, inputSchema: Record<string, unknown>): {
47
+ kind: string;
48
+ name: string;
49
+ inputSchema: Record<string, unknown>;
50
+ };
51
+
52
+ declare function checkoutFunctionResult(valid: boolean, message?: string): {
53
+ kind: string;
54
+ valid: boolean;
55
+ message: string | undefined;
56
+ };
57
+ declare function getCheckout(context: HyprcartSurfaceContext): Record<string, unknown>;
58
+
59
+ declare function pixelEvent(name: string, payload: Record<string, unknown>): {
60
+ kind: string;
61
+ name: string;
62
+ payload: Record<string, unknown>;
63
+ };
64
+ declare function lifecycleEvent(topic: string, payload: Record<string, unknown>): {
65
+ kind: string;
66
+ topic: string;
67
+ payload: Record<string, unknown>;
68
+ };
69
+
70
+ declare function storefrontBlockResponse(html: string, data?: Record<string, unknown>): {
71
+ kind: string;
72
+ html: string;
73
+ data: Record<string, unknown>;
74
+ };
75
+ declare function getProduct(context: HyprcartSurfaceContext): Record<string, unknown>;
76
+
77
+ declare function redact(value: unknown): unknown;
78
+ declare function createSafeLogger(write: (level: string, message: string, data?: unknown) => void): {
79
+ info(message: string, data?: unknown): void;
80
+ warn(message: string, data?: unknown): void;
81
+ error(message: string, data?: unknown): void;
82
+ };
83
+
84
+ type RenderHandler = (context: HyprcartSurfaceContext) => string | Promise<string>;
85
+ declare function renderSurface(context: HyprcartSurfaceContext, handler: RenderHandler): Promise<{
86
+ html: string;
87
+ requestId: string;
88
+ }>;
89
+
90
+ type TranslationCatalog = Record<string, Record<string, string>>;
91
+ declare function t(catalog: TranslationCatalog, locale: string, key: string, fallbackLocale?: string): string;
92
+ declare function missingTranslationKeys(catalog: TranslationCatalog, locales: string[], keys: string[]): string[];
93
+
94
+ declare const hyprcartSdkVersion = "1.0.0";
95
+ declare const hyprcartPlatformCompatibility = "2026-06";
96
+
97
+ export { type HyprcartFixturePack, type HyprcartSurfaceContext, type RenderHandler, type TranslationCatalog, adminActionResponse, checkoutFunctionResult, createDefaultFixturePack, createSafeLogger, createSurfaceContext, fallbackFixturePack, flowDeclaration, getAdminResource, getCheckout, getProduct, hyprcartPlatformCompatibility, hyprcartSdkVersion, lifecycleEvent, mcpToolDescriptor, missingTranslationKeys, pixelEvent, redact, renderSurface, storefrontBlockResponse, t };
package/dist/index.js ADDED
@@ -0,0 +1,191 @@
1
+ // src/contexts/index.ts
2
+ function createSurfaceContext(input) {
3
+ return {
4
+ surface: input.surface,
5
+ requestId: input.requestId ?? `req_local_${Date.now().toString(36)}`,
6
+ locale: input.fixture.locale,
7
+ currency: input.fixture.currency,
8
+ fixture: input.fixture,
9
+ settings: input.settings ?? {}
10
+ };
11
+ }
12
+
13
+ // src/contexts/admin.ts
14
+ function adminActionResponse(action, data = {}) {
15
+ return { kind: "admin_action", action, data };
16
+ }
17
+ function getAdminResource(context) {
18
+ return context.fixture.adminResource;
19
+ }
20
+
21
+ // src/contexts/automation-ai.ts
22
+ function flowDeclaration(name, inputSchema) {
23
+ return { kind: "flow_declaration", name, inputSchema };
24
+ }
25
+ function mcpToolDescriptor(name, inputSchema) {
26
+ return { kind: "mcp_tool", name, inputSchema };
27
+ }
28
+
29
+ // src/contexts/checkout.ts
30
+ function checkoutFunctionResult(valid, message) {
31
+ return { kind: "checkout_function", valid, message };
32
+ }
33
+ function getCheckout(context) {
34
+ return context.fixture.checkout;
35
+ }
36
+
37
+ // src/contexts/pixel-event.ts
38
+ function pixelEvent(name, payload) {
39
+ return { kind: "pixel_event", name, payload };
40
+ }
41
+ function lifecycleEvent(topic, payload) {
42
+ return { kind: "lifecycle_event", topic, payload };
43
+ }
44
+
45
+ // src/contexts/storefront.ts
46
+ function storefrontBlockResponse(html, data = {}) {
47
+ return { kind: "storefront_block", html, data };
48
+ }
49
+ function getProduct(context) {
50
+ return context.fixture.product;
51
+ }
52
+
53
+ // src/fixtures/index.ts
54
+ function createDefaultFixturePack(overrides = {}) {
55
+ return {
56
+ id: "fixture_default",
57
+ name: "Default commerce fixture",
58
+ locale: "en",
59
+ currency: "EUR",
60
+ market: "DE",
61
+ product: {
62
+ id: "prod_fixture_1",
63
+ title: "Deep Moisture",
64
+ price: { amount: 79, currency: "EUR" },
65
+ handle: "deep-moisture"
66
+ },
67
+ cart: {
68
+ id: "cart_fixture_1",
69
+ lines: [],
70
+ subtotal: { amount: 0, currency: "EUR" }
71
+ },
72
+ checkout: {
73
+ id: "checkout_fixture_1",
74
+ step: "information"
75
+ },
76
+ customerSegment: {
77
+ id: "segment_fixture_1",
78
+ tags: ["retail"]
79
+ },
80
+ adminResource: {
81
+ type: "product",
82
+ id: "prod_fixture_1"
83
+ },
84
+ consent: {
85
+ analytics: true,
86
+ marketing: false
87
+ },
88
+ ...overrides
89
+ };
90
+ }
91
+ function fallbackFixturePack(reason) {
92
+ return createDefaultFixturePack({
93
+ id: "fixture_fallback",
94
+ name: `Fallback fixture: ${reason}`
95
+ });
96
+ }
97
+
98
+ // src/logging/safe-log.ts
99
+ var redactionPatterns = [
100
+ /hcdev_[a-z0-9_]+/gi,
101
+ /hcil_[a-z0-9_]+/gi,
102
+ /Bearer\s+[a-z0-9._-]+/gi,
103
+ /(__Secure-)?hc_[a-z0-9_]+=[^;\s]+/gi,
104
+ /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi
105
+ ];
106
+ function redact(value) {
107
+ if (typeof value === "string") {
108
+ return redactionPatterns.reduce((text, pattern) => text.replace(pattern, "[redacted]"), value);
109
+ }
110
+ if (Array.isArray(value)) {
111
+ return value.map(redact);
112
+ }
113
+ if (value && typeof value === "object") {
114
+ return Object.fromEntries(
115
+ Object.entries(value).map(([key, entry]) => [
116
+ key,
117
+ isSecretKey(key) ? "[redacted]" : redact(entry)
118
+ ])
119
+ );
120
+ }
121
+ return value;
122
+ }
123
+ function createSafeLogger(write) {
124
+ return {
125
+ info(message, data) {
126
+ write("info", String(redact(message)), redact(data));
127
+ },
128
+ warn(message, data) {
129
+ write("warn", String(redact(message)), redact(data));
130
+ },
131
+ error(message, data) {
132
+ write("error", String(redact(message)), redact(data));
133
+ }
134
+ };
135
+ }
136
+ function isSecretKey(key) {
137
+ return /token|secret|cookie|password|authorization|session/i.test(key);
138
+ }
139
+
140
+ // src/render/index.ts
141
+ async function renderSurface(context, handler) {
142
+ const html = await handler(context);
143
+ return { html, requestId: context.requestId };
144
+ }
145
+
146
+ // src/translations/index.ts
147
+ function t(catalog, locale, key, fallbackLocale = "en") {
148
+ return catalog[locale]?.[key] ?? catalog[fallbackLocale]?.[key] ?? key;
149
+ }
150
+ function missingTranslationKeys(catalog, locales, keys) {
151
+ const missing = [];
152
+ for (const locale of locales) {
153
+ for (const key of keys) {
154
+ if (!catalog[locale]?.[key]) {
155
+ missing.push(`${locale}.${key}`);
156
+ }
157
+ }
158
+ }
159
+ return missing;
160
+ }
161
+
162
+ // src/validation/index.ts
163
+ import { validateManifest } from "@hyprcart/app-manifest";
164
+
165
+ // src/index.ts
166
+ var hyprcartSdkVersion = "1.0.0";
167
+ var hyprcartPlatformCompatibility = "2026-06";
168
+ export {
169
+ adminActionResponse,
170
+ checkoutFunctionResult,
171
+ createDefaultFixturePack,
172
+ createSafeLogger,
173
+ createSurfaceContext,
174
+ fallbackFixturePack,
175
+ flowDeclaration,
176
+ getAdminResource,
177
+ getCheckout,
178
+ getProduct,
179
+ hyprcartPlatformCompatibility,
180
+ hyprcartSdkVersion,
181
+ lifecycleEvent,
182
+ mcpToolDescriptor,
183
+ missingTranslationKeys,
184
+ pixelEvent,
185
+ redact,
186
+ renderSurface,
187
+ storefrontBlockResponse,
188
+ t,
189
+ validateManifest
190
+ };
191
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/contexts/index.ts","../src/contexts/admin.ts","../src/contexts/automation-ai.ts","../src/contexts/checkout.ts","../src/contexts/pixel-event.ts","../src/contexts/storefront.ts","../src/fixtures/index.ts","../src/logging/safe-log.ts","../src/render/index.ts","../src/translations/index.ts","../src/validation/index.ts","../src/index.ts"],"sourcesContent":["import type { HyprcartFixturePack } from \"../fixtures\";\n\nexport interface HyprcartSurfaceContext {\n surface: string;\n requestId: string;\n locale: string;\n currency: string;\n fixture: HyprcartFixturePack;\n settings: Record<string, unknown>;\n}\n\nexport function createSurfaceContext(input: {\n surface: string;\n fixture: HyprcartFixturePack;\n requestId?: string;\n settings?: Record<string, unknown>;\n}): HyprcartSurfaceContext {\n return {\n surface: input.surface,\n requestId: input.requestId ?? `req_local_${Date.now().toString(36)}`,\n locale: input.fixture.locale,\n currency: input.fixture.currency,\n fixture: input.fixture,\n settings: input.settings ?? {},\n };\n}\n","import type { HyprcartSurfaceContext } from \"./index\";\n\nexport function adminActionResponse(action: string, data: Record<string, unknown> = {}) {\n return { kind: \"admin_action\", action, data };\n}\n\nexport function getAdminResource(context: HyprcartSurfaceContext) {\n return context.fixture.adminResource;\n}\n","export function flowDeclaration(name: string, inputSchema: Record<string, unknown>) {\n return { kind: \"flow_declaration\", name, inputSchema };\n}\n\nexport function mcpToolDescriptor(name: string, inputSchema: Record<string, unknown>) {\n return { kind: \"mcp_tool\", name, inputSchema };\n}\n","import type { HyprcartSurfaceContext } from \"./index\";\n\nexport function checkoutFunctionResult(valid: boolean, message?: string) {\n return { kind: \"checkout_function\", valid, message };\n}\n\nexport function getCheckout(context: HyprcartSurfaceContext) {\n return context.fixture.checkout;\n}\n","export function pixelEvent(name: string, payload: Record<string, unknown>) {\n return { kind: \"pixel_event\", name, payload };\n}\n\nexport function lifecycleEvent(topic: string, payload: Record<string, unknown>) {\n return { kind: \"lifecycle_event\", topic, payload };\n}\n","import type { HyprcartSurfaceContext } from \"./index\";\n\nexport function storefrontBlockResponse(html: string, data: Record<string, unknown> = {}) {\n return { kind: \"storefront_block\", html, data };\n}\n\nexport function getProduct(context: HyprcartSurfaceContext) {\n return context.fixture.product;\n}\n","export interface HyprcartFixturePack {\n id: string;\n name: string;\n locale: string;\n currency: string;\n market: string;\n product: Record<string, unknown>;\n cart: Record<string, unknown>;\n checkout: Record<string, unknown>;\n customerSegment: Record<string, unknown>;\n adminResource: Record<string, unknown>;\n consent: Record<string, unknown>;\n}\n\nexport function createDefaultFixturePack(overrides: Partial<HyprcartFixturePack> = {}): HyprcartFixturePack {\n return {\n id: \"fixture_default\",\n name: \"Default commerce fixture\",\n locale: \"en\",\n currency: \"EUR\",\n market: \"DE\",\n product: {\n id: \"prod_fixture_1\",\n title: \"Deep Moisture\",\n price: { amount: 79, currency: \"EUR\" },\n handle: \"deep-moisture\",\n },\n cart: {\n id: \"cart_fixture_1\",\n lines: [],\n subtotal: { amount: 0, currency: \"EUR\" },\n },\n checkout: {\n id: \"checkout_fixture_1\",\n step: \"information\",\n },\n customerSegment: {\n id: \"segment_fixture_1\",\n tags: [\"retail\"],\n },\n adminResource: {\n type: \"product\",\n id: \"prod_fixture_1\",\n },\n consent: {\n analytics: true,\n marketing: false,\n },\n ...overrides,\n };\n}\n\nexport function fallbackFixturePack(reason: string): HyprcartFixturePack {\n return createDefaultFixturePack({\n id: \"fixture_fallback\",\n name: `Fallback fixture: ${reason}`,\n });\n}\n","const redactionPatterns = [\n /hcdev_[a-z0-9_]+/gi,\n /hcil_[a-z0-9_]+/gi,\n /Bearer\\s+[a-z0-9._-]+/gi,\n /(__Secure-)?hc_[a-z0-9_]+=[^;\\s]+/gi,\n /[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/gi,\n];\n\nexport function redact(value: unknown): unknown {\n if (typeof value === \"string\") {\n return redactionPatterns.reduce((text, pattern) => text.replace(pattern, \"[redacted]\"), value);\n }\n\n if (Array.isArray(value)) {\n return value.map(redact);\n }\n\n if (value && typeof value === \"object\") {\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>).map(([key, entry]) => [\n key,\n isSecretKey(key) ? \"[redacted]\" : redact(entry),\n ]),\n );\n }\n\n return value;\n}\n\nexport function createSafeLogger(write: (level: string, message: string, data?: unknown) => void) {\n return {\n info(message: string, data?: unknown) {\n write(\"info\", String(redact(message)), redact(data));\n },\n warn(message: string, data?: unknown) {\n write(\"warn\", String(redact(message)), redact(data));\n },\n error(message: string, data?: unknown) {\n write(\"error\", String(redact(message)), redact(data));\n },\n };\n}\n\nfunction isSecretKey(key: string): boolean {\n return /token|secret|cookie|password|authorization|session/i.test(key);\n}\n","import type { HyprcartSurfaceContext } from \"../contexts\";\n\nexport type RenderHandler = (context: HyprcartSurfaceContext) => string | Promise<string>;\n\nexport async function renderSurface(context: HyprcartSurfaceContext, handler: RenderHandler) {\n const html = await handler(context);\n return { html, requestId: context.requestId };\n}\n","export type TranslationCatalog = Record<string, Record<string, string>>;\n\nexport function t(catalog: TranslationCatalog, locale: string, key: string, fallbackLocale = \"en\"): string {\n return catalog[locale]?.[key] ?? catalog[fallbackLocale]?.[key] ?? key;\n}\n\nexport function missingTranslationKeys(catalog: TranslationCatalog, locales: string[], keys: string[]): string[] {\n const missing: string[] = [];\n for (const locale of locales) {\n for (const key of keys) {\n if (!catalog[locale]?.[key]) {\n missing.push(`${locale}.${key}`);\n }\n }\n }\n return missing;\n}\n","export { validateManifest } from \"@hyprcart/app-manifest\";\n","export * from \"./contexts\";\nexport * from \"./contexts/admin\";\nexport * from \"./contexts/automation-ai\";\nexport * from \"./contexts/checkout\";\nexport * from \"./contexts/pixel-event\";\nexport * from \"./contexts/storefront\";\nexport * from \"./fixtures\";\nexport * from \"./logging/safe-log\";\nexport * from \"./render\";\nexport * from \"./translations\";\nexport * from \"./validation\";\n\nexport const hyprcartSdkVersion = \"1.0.0\";\nexport const hyprcartPlatformCompatibility = \"2026-06\";\n"],"mappings":";AAWO,SAAS,qBAAqB,OAKV;AACzB,SAAO;AAAA,IACL,SAAS,MAAM;AAAA,IACf,WAAW,MAAM,aAAa,aAAa,KAAK,IAAI,EAAE,SAAS,EAAE,CAAC;AAAA,IAClE,QAAQ,MAAM,QAAQ;AAAA,IACtB,UAAU,MAAM,QAAQ;AAAA,IACxB,SAAS,MAAM;AAAA,IACf,UAAU,MAAM,YAAY,CAAC;AAAA,EAC/B;AACF;;;ACvBO,SAAS,oBAAoB,QAAgB,OAAgC,CAAC,GAAG;AACtF,SAAO,EAAE,MAAM,gBAAgB,QAAQ,KAAK;AAC9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F;AAEA,SAAS,YAAY,KAAsB;AACzC,SAAO,sDAAsD,KAAK,GAAG;AACvE;;;ACzCA,eAAsB,cAAc,SAAiC,SAAwB;AAC3F,QAAM,OAAO,MAAM,QAAQ,OAAO;AAClC,SAAO,EAAE,MAAM,WAAW,QAAQ,UAAU;AAC9C;;;ACLO,SAAS,EAAE,SAA6B,QAAgB,KAAa,iBAAiB,MAAc;AACzG,SAAO,QAAQ,MAAM,IAAI,GAAG,KAAK,QAAQ,cAAc,IAAI,GAAG,KAAK;AACrE;AAEO,SAAS,uBAAuB,SAA6B,SAAmB,MAA0B;AAC/G,QAAM,UAAoB,CAAC;AAC3B,aAAW,UAAU,SAAS;AAC5B,eAAW,OAAO,MAAM;AACtB,UAAI,CAAC,QAAQ,MAAM,IAAI,GAAG,GAAG;AAC3B,gBAAQ,KAAK,GAAG,MAAM,IAAI,GAAG,EAAE;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AChBA,SAAS,wBAAwB;;;ACY1B,IAAM,qBAAqB;AAC3B,IAAM,gCAAgC;","names":[]}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@hyprcart/app-sdk",
3
+ "version": "1.0.0",
4
+ "description": "Public SDK helpers for building Hyprcart app surfaces.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "files": [
8
+ "dist",
9
+ "README.md"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public",
13
+ "registry": "https://registry.npmjs.org/"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ }
22
+ },
23
+ "dependencies": {
24
+ "@hyprcart/app-manifest": "1.0.0"
25
+ },
26
+ "devDependencies": {
27
+ "tsup": "^8.3.5",
28
+ "typescript": "^5.7.2",
29
+ "vitest": "^4.0.18",
30
+ "@repo/typescript-config": "0.0.1"
31
+ },
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "dev": "tsup --watch",
35
+ "lint": "tsc --noEmit",
36
+ "type-check": "tsc --noEmit",
37
+ "test": "vitest run",
38
+ "clean": "rm -rf dist .turbo"
39
+ }
40
+ }