@hyprcart/app-manifest 1.0.0 → 1.0.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/LICENSE +21 -0
- package/dist/index.d.ts +556 -4
- package/dist/index.js +776 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 admorris GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,260 @@
|
|
|
1
|
-
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const privacyManifestCapabilitySchema: z.ZodObject<{
|
|
4
|
+
key: z.ZodString;
|
|
5
|
+
type: z.ZodEnum<{
|
|
6
|
+
app_block: "app_block";
|
|
7
|
+
client_island: "client_island";
|
|
8
|
+
checkout_extension: "checkout_extension";
|
|
9
|
+
pixel: "pixel";
|
|
10
|
+
server_event: "server_event";
|
|
11
|
+
background_delivery: "background_delivery";
|
|
12
|
+
analytics_destination: "analytics_destination";
|
|
13
|
+
platform_feature: "platform_feature";
|
|
14
|
+
}>;
|
|
15
|
+
purposes: z.ZodArray<z.ZodString>;
|
|
16
|
+
dataCategories: z.ZodArray<z.ZodString>;
|
|
17
|
+
terminalAccess: z.ZodArray<z.ZodObject<{
|
|
18
|
+
type: z.ZodEnum<{
|
|
19
|
+
cookie: "cookie";
|
|
20
|
+
local_storage: "local_storage";
|
|
21
|
+
session_storage: "session_storage";
|
|
22
|
+
indexed_db: "indexed_db";
|
|
23
|
+
cache_storage: "cache_storage";
|
|
24
|
+
device_access: "device_access";
|
|
25
|
+
memory: "memory";
|
|
26
|
+
}>;
|
|
27
|
+
key: z.ZodString;
|
|
28
|
+
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
removable: z.ZodBoolean;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
endpoint: z.ZodString;
|
|
34
|
+
retentionDays: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
boundedOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
eventClasses: z.ZodArray<z.ZodString>;
|
|
39
|
+
fieldKeys: z.ZodArray<z.ZodString>;
|
|
40
|
+
limits: z.ZodObject<{
|
|
41
|
+
eventCount: z.ZodNumber;
|
|
42
|
+
byteCount: z.ZodNumber;
|
|
43
|
+
maximumAgeSeconds: z.ZodNumber;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
cleanupTriggers: z.ZodArray<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>>>;
|
|
47
|
+
regions: z.ZodArray<z.ZodString>;
|
|
48
|
+
fallbackMessageKey: z.ZodString;
|
|
49
|
+
cleanup: z.ZodObject<{
|
|
50
|
+
supported: z.ZodBoolean;
|
|
51
|
+
callback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
exportSupport: z.ZodEnum<{
|
|
54
|
+
supported: "supported";
|
|
55
|
+
unsupported: "unsupported";
|
|
56
|
+
not_applicable: "not_applicable";
|
|
57
|
+
}>;
|
|
58
|
+
erasureSupport: z.ZodEnum<{
|
|
59
|
+
supported: "supported";
|
|
60
|
+
unsupported: "unsupported";
|
|
61
|
+
not_applicable: "not_applicable";
|
|
62
|
+
}>;
|
|
63
|
+
strictNecessity: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
claimed: z.ZodBoolean;
|
|
65
|
+
justification: z.ZodString;
|
|
66
|
+
platformApprovalId: z.ZodNullable<z.ZodString>;
|
|
67
|
+
}, z.core.$strict>>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
declare const privacyManifestSchema: z.ZodObject<{
|
|
70
|
+
schemaVersion: z.ZodLiteral<"2026-07-01">;
|
|
71
|
+
messageKeys: z.ZodObject<{
|
|
72
|
+
benefit: z.ZodString;
|
|
73
|
+
refusal: z.ZodString;
|
|
74
|
+
fallback: z.ZodString;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
77
|
+
key: z.ZodString;
|
|
78
|
+
type: z.ZodEnum<{
|
|
79
|
+
app_block: "app_block";
|
|
80
|
+
client_island: "client_island";
|
|
81
|
+
checkout_extension: "checkout_extension";
|
|
82
|
+
pixel: "pixel";
|
|
83
|
+
server_event: "server_event";
|
|
84
|
+
background_delivery: "background_delivery";
|
|
85
|
+
analytics_destination: "analytics_destination";
|
|
86
|
+
platform_feature: "platform_feature";
|
|
87
|
+
}>;
|
|
88
|
+
purposes: z.ZodArray<z.ZodString>;
|
|
89
|
+
dataCategories: z.ZodArray<z.ZodString>;
|
|
90
|
+
terminalAccess: z.ZodArray<z.ZodObject<{
|
|
91
|
+
type: z.ZodEnum<{
|
|
92
|
+
cookie: "cookie";
|
|
93
|
+
local_storage: "local_storage";
|
|
94
|
+
session_storage: "session_storage";
|
|
95
|
+
indexed_db: "indexed_db";
|
|
96
|
+
cache_storage: "cache_storage";
|
|
97
|
+
device_access: "device_access";
|
|
98
|
+
memory: "memory";
|
|
99
|
+
}>;
|
|
100
|
+
key: z.ZodString;
|
|
101
|
+
durationSeconds: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
removable: z.ZodBoolean;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
endpoint: z.ZodString;
|
|
107
|
+
retentionDays: z.ZodNumber;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
boundedOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
eventClasses: z.ZodArray<z.ZodString>;
|
|
112
|
+
fieldKeys: z.ZodArray<z.ZodString>;
|
|
113
|
+
limits: z.ZodObject<{
|
|
114
|
+
eventCount: z.ZodNumber;
|
|
115
|
+
byteCount: z.ZodNumber;
|
|
116
|
+
maximumAgeSeconds: z.ZodNumber;
|
|
117
|
+
}, z.core.$strict>;
|
|
118
|
+
cleanupTriggers: z.ZodArray<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>>>;
|
|
120
|
+
regions: z.ZodArray<z.ZodString>;
|
|
121
|
+
fallbackMessageKey: z.ZodString;
|
|
122
|
+
cleanup: z.ZodObject<{
|
|
123
|
+
supported: z.ZodBoolean;
|
|
124
|
+
callback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
exportSupport: z.ZodEnum<{
|
|
127
|
+
supported: "supported";
|
|
128
|
+
unsupported: "unsupported";
|
|
129
|
+
not_applicable: "not_applicable";
|
|
130
|
+
}>;
|
|
131
|
+
erasureSupport: z.ZodEnum<{
|
|
132
|
+
supported: "supported";
|
|
133
|
+
unsupported: "unsupported";
|
|
134
|
+
not_applicable: "not_applicable";
|
|
135
|
+
}>;
|
|
136
|
+
strictNecessity: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
claimed: z.ZodBoolean;
|
|
138
|
+
justification: z.ZodString;
|
|
139
|
+
platformApprovalId: z.ZodNullable<z.ZodString>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
}, z.core.$strict>>;
|
|
142
|
+
removed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
143
|
+
}, z.core.$strict>;
|
|
144
|
+
type PrivacyManifest = z.infer<typeof privacyManifestSchema>;
|
|
145
|
+
interface PrivacyManifestIssue {
|
|
146
|
+
code: string;
|
|
147
|
+
path: string;
|
|
148
|
+
}
|
|
149
|
+
interface ValidatePrivacyManifestOptions {
|
|
150
|
+
/**
|
|
151
|
+
* App intake may persist a strict-necessity claim without an approval so the
|
|
152
|
+
* platform review workflow can decide it. Certification and direct
|
|
153
|
+
* validation remain fail-closed by default.
|
|
154
|
+
*/
|
|
155
|
+
allowPendingNecessityReview?: boolean;
|
|
156
|
+
}
|
|
157
|
+
declare function validatePrivacyManifest(input: unknown, catalogs: Record<string, Record<string, string>>, options?: ValidatePrivacyManifestOptions): {
|
|
158
|
+
valid: boolean;
|
|
159
|
+
issues: PrivacyManifestIssue[];
|
|
160
|
+
};
|
|
161
|
+
declare function classifyPrivacyManifestChange(previous: unknown, next: unknown): {
|
|
162
|
+
material: boolean;
|
|
163
|
+
reasons: string[];
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare const supportedSurfaces: readonly ["storefront_block", "admin_surface", "checkout_ui", "deterministic_function", "checkout_function", "pixel", "event_subscription", "background_job", "event", "flow", "mcp"];
|
|
2
167
|
type AppSurfaceKind = (typeof supportedSurfaces)[number];
|
|
168
|
+
declare const storefrontBlockRenderTiers: readonly ["static", "edge_render", "edge_stream"];
|
|
169
|
+
type StorefrontBlockRenderTier = (typeof storefrontBlockRenderTiers)[number];
|
|
170
|
+
declare const legacyStorefrontBlockRenderTiers: readonly ["edge-function", "edge-stream"];
|
|
171
|
+
type LegacyStorefrontBlockRenderTier = (typeof legacyStorefrontBlockRenderTiers)[number];
|
|
172
|
+
declare const hydrationTriggers: readonly ["load", "visible", "interaction", "idle", "manual"];
|
|
173
|
+
type HydrationTrigger = (typeof hydrationTriggers)[number];
|
|
3
174
|
type LocaleMessages = Record<string, string>;
|
|
175
|
+
interface AppSurfaceSetting {
|
|
176
|
+
name: string;
|
|
177
|
+
type: "string" | "number" | "boolean" | "select" | "color" | "text" | "rich_text";
|
|
178
|
+
label?: Record<string, string> | string;
|
|
179
|
+
default?: unknown;
|
|
180
|
+
required?: boolean;
|
|
181
|
+
options?: Array<{
|
|
182
|
+
label: Record<string, string> | string;
|
|
183
|
+
value: string;
|
|
184
|
+
}>;
|
|
185
|
+
min?: number;
|
|
186
|
+
max?: number;
|
|
187
|
+
}
|
|
188
|
+
interface StorefrontBlockPlaceholder {
|
|
189
|
+
width: string;
|
|
190
|
+
height: string;
|
|
191
|
+
skeleton: "list" | "card" | "text" | "custom";
|
|
192
|
+
timeoutMs?: number;
|
|
193
|
+
}
|
|
194
|
+
interface StorefrontBlockClientIsland {
|
|
195
|
+
artifactId: string;
|
|
196
|
+
bundleUrl?: string;
|
|
197
|
+
compressedSizeBytes: number;
|
|
198
|
+
hydrationTrigger: HydrationTrigger;
|
|
199
|
+
domBoundarySelector: string;
|
|
200
|
+
consentCategory?: string;
|
|
201
|
+
exceptionId?: string;
|
|
202
|
+
}
|
|
4
203
|
interface AppManifestSurface {
|
|
5
204
|
id: string;
|
|
6
205
|
type: AppSurfaceKind;
|
|
7
206
|
entry: string;
|
|
8
207
|
label: Record<string, string>;
|
|
9
|
-
|
|
208
|
+
adminSurfaceType?: "app_home" | "settings_page" | "dashboard_widget" | "resource_panel" | "resource_action" | "bulk_action" | "command_palette_action" | "global_search_contribution" | "notification_task_contribution" | "modal_action" | "admin_ui_block";
|
|
209
|
+
settings?: AppSurfaceSetting[];
|
|
10
210
|
scopes?: string[];
|
|
211
|
+
roles?: string[];
|
|
11
212
|
deployable?: boolean;
|
|
213
|
+
renderTier?: StorefrontBlockRenderTier | LegacyStorefrontBlockRenderTier;
|
|
214
|
+
tier?: StorefrontBlockRenderTier | LegacyStorefrontBlockRenderTier;
|
|
215
|
+
category?: string;
|
|
216
|
+
compatiblePageTypes?: string[];
|
|
217
|
+
compatibleSlots?: string[];
|
|
218
|
+
requiredContexts?: string[];
|
|
219
|
+
cache?: {
|
|
220
|
+
maxAgeSeconds?: number;
|
|
221
|
+
staleWhileRevalidateSeconds?: number;
|
|
222
|
+
tags?: string[];
|
|
223
|
+
vary?: string[];
|
|
224
|
+
};
|
|
225
|
+
placeholder?: StorefrontBlockPlaceholder;
|
|
226
|
+
fallbackPolicy?: "omit_block" | "static_placeholder" | "previous_healthy" | "none";
|
|
227
|
+
clientIslands?: StorefrontBlockClientIsland[];
|
|
228
|
+
placement?: string | string[];
|
|
229
|
+
inputSchema?: Record<string, unknown>;
|
|
230
|
+
outputSchema?: Record<string, unknown>;
|
|
231
|
+
sandboxPolicy?: Record<string, unknown>;
|
|
232
|
+
componentKit?: {
|
|
233
|
+
minVersion: string;
|
|
234
|
+
components: string[];
|
|
235
|
+
};
|
|
236
|
+
removalBehavior?: string[];
|
|
237
|
+
dimensions?: Record<string, unknown>;
|
|
238
|
+
dataRequirements?: Record<string, unknown>;
|
|
239
|
+
consent?: {
|
|
240
|
+
category?: string;
|
|
241
|
+
events?: string[];
|
|
242
|
+
destinations?: string[];
|
|
243
|
+
retentionDays?: number;
|
|
244
|
+
regions?: string[];
|
|
245
|
+
fields?: string[];
|
|
246
|
+
bypass?: boolean;
|
|
247
|
+
};
|
|
248
|
+
determinism?: {
|
|
249
|
+
networkAccess?: boolean;
|
|
250
|
+
mutationSideEffects?: boolean;
|
|
251
|
+
operations?: string[];
|
|
252
|
+
};
|
|
253
|
+
schedule?: Record<string, unknown>;
|
|
254
|
+
retryPolicy?: Record<string, unknown>;
|
|
255
|
+
overlapPolicy?: string;
|
|
256
|
+
checkpointPolicy?: Record<string, unknown>;
|
|
257
|
+
quotaClass?: string;
|
|
12
258
|
}
|
|
13
259
|
interface AppManifest {
|
|
14
260
|
id?: string;
|
|
@@ -20,6 +266,11 @@ interface AppManifest {
|
|
|
20
266
|
surfaces: AppManifestSurface[];
|
|
21
267
|
scopes: string[];
|
|
22
268
|
translations: Record<string, LocaleMessages>;
|
|
269
|
+
customerPrivacy?: PrivacyManifest;
|
|
270
|
+
launch?: LaunchReadinessDeclaration;
|
|
271
|
+
fixedSlots?: FixedSlotManifestDeclaration[];
|
|
272
|
+
storefrontTranslations?: StorefrontTranslationManifestDeclaration;
|
|
273
|
+
certification?: AppCertificationManifestDeclaration;
|
|
23
274
|
egress?: string[];
|
|
24
275
|
resources?: {
|
|
25
276
|
bundleSizeBytes?: number;
|
|
@@ -27,8 +278,163 @@ interface AppManifest {
|
|
|
27
278
|
memoryMb?: number;
|
|
28
279
|
};
|
|
29
280
|
}
|
|
281
|
+
interface LaunchReadinessDeclaration {
|
|
282
|
+
adminApi?: LaunchAdminApiDeclaration;
|
|
283
|
+
appData?: LaunchAppDataDeclaration[];
|
|
284
|
+
environments?: LaunchEnvironmentDeclaration[];
|
|
285
|
+
secrets?: LaunchSecretDeclaration[];
|
|
286
|
+
settings?: LaunchMerchantSettingDeclaration[];
|
|
287
|
+
consent?: LaunchConsentMetadataDeclaration;
|
|
288
|
+
lifecycleCallbacks?: LaunchLifecycleCallbackDeclaration[];
|
|
289
|
+
assets?: LaunchAssetDeclaration[];
|
|
290
|
+
sandbox?: LaunchSandboxFixtureDeclaration;
|
|
291
|
+
evidence?: LaunchEvidenceDeclaration;
|
|
292
|
+
compatibility?: LaunchCompatibilityDeclaration;
|
|
293
|
+
}
|
|
294
|
+
interface LaunchAdminApiDeclaration {
|
|
295
|
+
minApiVersion: string;
|
|
296
|
+
operations: Array<{
|
|
297
|
+
operationName: string;
|
|
298
|
+
mode: "offline_app_token" | "online_app_user_token";
|
|
299
|
+
requiredScopes: string[];
|
|
300
|
+
idempotencyKeyRequired?: boolean;
|
|
301
|
+
expectedCostClass?: string;
|
|
302
|
+
examples?: string[];
|
|
303
|
+
}>;
|
|
304
|
+
}
|
|
305
|
+
interface LaunchAppDataDeclaration {
|
|
306
|
+
namespace: string;
|
|
307
|
+
labelKey: string;
|
|
308
|
+
purposeKey: string;
|
|
309
|
+
visibility: "private" | "merchant_visible" | "storefront_public";
|
|
310
|
+
retentionPolicyKey: string;
|
|
311
|
+
storefrontMaterialization?: {
|
|
312
|
+
enabled: boolean;
|
|
313
|
+
fields: string[];
|
|
314
|
+
cacheTags: string[];
|
|
315
|
+
varyBy: string[];
|
|
316
|
+
maxAgeSeconds?: number;
|
|
317
|
+
};
|
|
318
|
+
migrations?: Array<{
|
|
319
|
+
key: string;
|
|
320
|
+
idempotent: boolean;
|
|
321
|
+
rollbackPolicy?: Record<string, unknown>;
|
|
322
|
+
}>;
|
|
323
|
+
}
|
|
324
|
+
interface LaunchEnvironmentDeclaration {
|
|
325
|
+
key: "development" | "staging" | "production";
|
|
326
|
+
labelKey: string;
|
|
327
|
+
runtimeChannel: "preview" | "private" | "production";
|
|
328
|
+
promotionRequiresCertification: boolean;
|
|
329
|
+
requiredSecrets: string[];
|
|
330
|
+
optionalSecrets?: string[];
|
|
331
|
+
allowedInstallModes: Array<"sandbox" | "private_install">;
|
|
332
|
+
}
|
|
333
|
+
interface LaunchSecretDeclaration {
|
|
334
|
+
key: string;
|
|
335
|
+
labelKey: string;
|
|
336
|
+
purposeKey: string;
|
|
337
|
+
required: boolean;
|
|
338
|
+
scope: "app_environment" | "installation" | "storefront" | "market" | "locale";
|
|
339
|
+
runtimeExposure: "runtime_only" | "server_callback_only" | "not_exposed";
|
|
340
|
+
rotation?: {
|
|
341
|
+
overlapSeconds?: number;
|
|
342
|
+
requiredBeforePromotion?: boolean;
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
interface LaunchMerchantSettingDeclaration {
|
|
346
|
+
key: string;
|
|
347
|
+
label: Record<string, string>;
|
|
348
|
+
helpText?: Record<string, string>;
|
|
349
|
+
scope: Array<"organization" | "storefront" | "market" | "locale" | "role" | "resource">;
|
|
350
|
+
fields: AppSurfaceSetting[];
|
|
351
|
+
}
|
|
352
|
+
interface LaunchConsentMetadataDeclaration {
|
|
353
|
+
appIcon: string;
|
|
354
|
+
screenshots: string[];
|
|
355
|
+
developerName: string;
|
|
356
|
+
supportUrl: string;
|
|
357
|
+
supportEmail?: string;
|
|
358
|
+
privacyPolicyUrl: string;
|
|
359
|
+
termsUrl: string;
|
|
360
|
+
dataProcessingUrl?: string;
|
|
361
|
+
dataCategories: string[];
|
|
362
|
+
egressDestinations: string[];
|
|
363
|
+
reviewerInstructions: string;
|
|
364
|
+
}
|
|
365
|
+
interface LaunchLifecycleCallbackDeclaration {
|
|
366
|
+
event: "install" | "update" | "uninstall" | "disable" | "enable" | "scope_change" | "secret_rotation" | "settings_change" | "data_export" | "data_delete" | "version_promotion";
|
|
367
|
+
endpoint: string;
|
|
368
|
+
signingSecretRef: string;
|
|
369
|
+
idempotencyWindowSeconds: number;
|
|
370
|
+
}
|
|
371
|
+
interface LaunchAssetDeclaration {
|
|
372
|
+
key: string;
|
|
373
|
+
kind: "icon" | "screenshot" | "admin_media" | "storefront_asset" | "email_media" | "reviewer_instruction_media";
|
|
374
|
+
source: string;
|
|
375
|
+
locale?: string;
|
|
376
|
+
cacheMaxAgeSeconds?: number;
|
|
377
|
+
}
|
|
378
|
+
interface LaunchSandboxFixtureDeclaration {
|
|
379
|
+
fixturePackId: string;
|
|
380
|
+
seedVersion: string;
|
|
381
|
+
anonymizationRequired: boolean;
|
|
382
|
+
testModeIntegrations: string[];
|
|
383
|
+
}
|
|
384
|
+
interface LaunchEvidenceDeclaration {
|
|
385
|
+
repositoryUrl?: string;
|
|
386
|
+
testCommand: string;
|
|
387
|
+
buildCommand: string;
|
|
388
|
+
playwrightCoverage: string[];
|
|
389
|
+
}
|
|
390
|
+
interface LaunchCompatibilityDeclaration {
|
|
391
|
+
adminApiVersion: string;
|
|
392
|
+
appDataApiVersion: string;
|
|
393
|
+
runtimeVersion: string;
|
|
394
|
+
sdkVersion: string;
|
|
395
|
+
componentKitVersion: string;
|
|
396
|
+
}
|
|
397
|
+
interface FixedSlotManifestDeclaration {
|
|
398
|
+
pageType: "product" | "collection" | "cart" | "checkout" | "customer_profile" | "customer_account" | "order_detail" | "app_landing";
|
|
399
|
+
slotKey: string;
|
|
400
|
+
blockIds: string[];
|
|
401
|
+
settingsSchema: AppSurfaceSetting[];
|
|
402
|
+
cachePolicy: {
|
|
403
|
+
privateData: "never_shared_html" | "not_applicable";
|
|
404
|
+
tags: string[];
|
|
405
|
+
varyBy: string[];
|
|
406
|
+
};
|
|
407
|
+
previewMode: "safe_sample_buyer" | "public_only";
|
|
408
|
+
}
|
|
409
|
+
interface StorefrontTranslationManifestDeclaration {
|
|
410
|
+
defaultLocale: string;
|
|
411
|
+
requiredLocales: string[];
|
|
412
|
+
keys: Array<{
|
|
413
|
+
key: string;
|
|
414
|
+
description: string;
|
|
415
|
+
defaults: Record<string, string>;
|
|
416
|
+
}>;
|
|
417
|
+
fallback: {
|
|
418
|
+
mode: "locale_then_default" | "default_only";
|
|
419
|
+
missingKeyBehavior: "block_release" | "use_key";
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
interface AppCertificationManifestDeclaration {
|
|
423
|
+
requiredEvidence: string[];
|
|
424
|
+
playwrightCoverage: string[];
|
|
425
|
+
performanceBudgets: {
|
|
426
|
+
storefrontP95Ms: number;
|
|
427
|
+
checkoutP95Ms: number;
|
|
428
|
+
cacheHitRatio: number;
|
|
429
|
+
};
|
|
430
|
+
gapPolicy: {
|
|
431
|
+
blockOnOpenRequiredGaps: boolean;
|
|
432
|
+
requireNonLoyaltyEvidence: boolean;
|
|
433
|
+
};
|
|
434
|
+
}
|
|
30
435
|
declare const defaultRequiredLocales: readonly ["en", "de"];
|
|
31
436
|
declare function isSupportedSurface(value: string): value is AppSurfaceKind;
|
|
437
|
+
declare function normalizeStorefrontBlockRenderTier(value: string | undefined): StorefrontBlockRenderTier;
|
|
32
438
|
|
|
33
439
|
type ValidationSeverity = "info" | "warning" | "error" | "blocker";
|
|
34
440
|
interface ValidationIssue {
|
|
@@ -71,6 +477,25 @@ interface ValidationOptions {
|
|
|
71
477
|
declare function validateManifest(manifest: AppManifest, options?: ValidationOptions): ValidationResult;
|
|
72
478
|
declare function getTranslationStatus(manifest: AppManifest, requiredLocales: string[]): TranslationStatus;
|
|
73
479
|
|
|
480
|
+
type SurfaceContractStatus = "active" | "preview" | "deferred" | "unsupported" | "rejected";
|
|
481
|
+
type SurfaceContractSeverity = "info" | "warning" | "error" | "blocking";
|
|
482
|
+
interface SurfaceContractDiagnostic {
|
|
483
|
+
code: string;
|
|
484
|
+
severity: SurfaceContractSeverity;
|
|
485
|
+
path: string;
|
|
486
|
+
message: string;
|
|
487
|
+
docsUrl?: string;
|
|
488
|
+
}
|
|
489
|
+
interface SurfaceContractResult {
|
|
490
|
+
surfaceId: string;
|
|
491
|
+
surfaceType: AppSurfaceKind;
|
|
492
|
+
status: SurfaceContractStatus;
|
|
493
|
+
runtimeOwner: "049c" | "049e" | "075a" | "deferred";
|
|
494
|
+
diagnostics: SurfaceContractDiagnostic[];
|
|
495
|
+
}
|
|
496
|
+
declare function validateExtensionSurfaceDeclarations(manifest: AppManifest): SurfaceContractResult[];
|
|
497
|
+
declare function validateExtensionSurface(surface: AppManifestSurface, basePath?: string): SurfaceContractResult;
|
|
498
|
+
|
|
74
499
|
interface GeneratedContractFile {
|
|
75
500
|
path: string;
|
|
76
501
|
content: string;
|
|
@@ -80,6 +505,7 @@ interface ContractGenerationResult {
|
|
|
80
505
|
manifestHash: string;
|
|
81
506
|
schemaVersion: string;
|
|
82
507
|
sdkVersion: string;
|
|
508
|
+
surfaces: SurfaceContractResult[];
|
|
83
509
|
files: GeneratedContractFile[];
|
|
84
510
|
}
|
|
85
511
|
declare function generateContracts(manifest: AppManifest, schemaVersion?: string): ContractGenerationResult;
|
|
@@ -101,7 +527,7 @@ declare function generateIdeMetadata(manifest: AppManifest): {
|
|
|
101
527
|
schemaVersion: string;
|
|
102
528
|
platformVersion: string;
|
|
103
529
|
surfaceContracts: {
|
|
104
|
-
surface: "storefront_block" | "admin_surface" | "checkout_ui" | "checkout_function" | "
|
|
530
|
+
surface: "pixel" | "storefront_block" | "admin_surface" | "checkout_ui" | "deterministic_function" | "checkout_function" | "event_subscription" | "background_job" | "event" | "flow" | "mcp";
|
|
105
531
|
inputTypeName: string;
|
|
106
532
|
outputTypeName: string;
|
|
107
533
|
fixtureTypeName: string;
|
|
@@ -132,4 +558,130 @@ declare const developerToolingOperationMetadata: readonly [{
|
|
|
132
558
|
readonly stability: "preview";
|
|
133
559
|
}];
|
|
134
560
|
|
|
135
|
-
|
|
561
|
+
declare const supportedAdminComponentKitComponents: ("Page" | "Section" | "Stack" | "InlineStack" | "Grid" | "ResourcePanel" | "AdminBlock" | "Modal" | "Sheet" | "Text" | "Heading" | "Badge" | "Status" | "DescriptionList" | "DataTable" | "Timeline" | "Metric" | "EmptyState" | "Skeleton" | "Form" | "TextField" | "NumberField" | "Select" | "Combobox" | "Checkbox" | "RadioGroup" | "DatePicker" | "FilePicker" | "ResourcePicker" | "ValidationMessage" | "Button" | "IconButton" | "Banner" | "Toast" | "InlineError" | "Progress" | "Spinner" | "Tooltip" | "ConfirmDialog" | "TitleBar" | "Breadcrumbs" | "Tabs" | "ActionList" | "ContextualSaveBar" | "CommandAction" | "SearchResult")[];
|
|
562
|
+
interface AdminComponentKitManifestValidationInput {
|
|
563
|
+
minVersion?: string;
|
|
564
|
+
components?: string[];
|
|
565
|
+
tokens?: Record<string, unknown>;
|
|
566
|
+
css?: string;
|
|
567
|
+
supportedComponents?: readonly string[];
|
|
568
|
+
}
|
|
569
|
+
interface AdminComponentKitManifestValidationResult {
|
|
570
|
+
valid: boolean;
|
|
571
|
+
diagnostics: Array<{
|
|
572
|
+
code: string;
|
|
573
|
+
path: string;
|
|
574
|
+
message: string;
|
|
575
|
+
}>;
|
|
576
|
+
}
|
|
577
|
+
declare function validateAdminComponentKitManifest(input: AdminComponentKitManifestValidationInput): AdminComponentKitManifestValidationResult;
|
|
578
|
+
|
|
579
|
+
declare const appGovernanceCapabilityTypes: readonly ["api_operation", "storefront_block", "admin_surface", "checkout_surface", "pixel", "event_subscription", "mcp_tool", "mcp_resource", "mcp_resource_template", "mcp_prompt", "background_job"];
|
|
580
|
+
type AppGovernanceCapabilityType = (typeof appGovernanceCapabilityTypes)[number];
|
|
581
|
+
declare const appGovernanceDataClasses: readonly ["public", "merchant_operational", "restricted_customer", "payment_adjacent", "auth_sensitive", "security", "operator_only"];
|
|
582
|
+
type AppGovernanceDataClass = (typeof appGovernanceDataClasses)[number];
|
|
583
|
+
declare const appGovernanceRiskClasses: readonly ["low", "medium", "high", "critical"];
|
|
584
|
+
type AppGovernanceRiskClass = (typeof appGovernanceRiskClasses)[number];
|
|
585
|
+
declare const appGovernanceCostClasses: readonly ["free", "low", "medium", "high", "operator"];
|
|
586
|
+
type AppGovernanceCostClass = (typeof appGovernanceCostClasses)[number];
|
|
587
|
+
declare const appGovernanceApprovalPolicies: readonly ["required", "optional", "operator_only", "automation_policy_required", "not_approvable"];
|
|
588
|
+
type AppGovernanceApprovalPolicy = (typeof appGovernanceApprovalPolicies)[number];
|
|
589
|
+
interface AppCapabilityDeclaration {
|
|
590
|
+
key: string;
|
|
591
|
+
type: AppGovernanceCapabilityType;
|
|
592
|
+
surface: string;
|
|
593
|
+
requiredScopes: string[];
|
|
594
|
+
optionalScopes?: string[];
|
|
595
|
+
dataClass: AppGovernanceDataClass;
|
|
596
|
+
riskClass: AppGovernanceRiskClass;
|
|
597
|
+
costClass: AppGovernanceCostClass;
|
|
598
|
+
approvalPolicy: AppGovernanceApprovalPolicy;
|
|
599
|
+
buyerVisible: boolean;
|
|
600
|
+
aiExposed?: boolean;
|
|
601
|
+
mutating?: boolean;
|
|
602
|
+
}
|
|
603
|
+
interface AppEgressDeclaration {
|
|
604
|
+
key: string;
|
|
605
|
+
hosts: string[];
|
|
606
|
+
class: string;
|
|
607
|
+
requiredForCapabilities: string[];
|
|
608
|
+
defaultAction: "allow" | "block" | "broker" | "log_only";
|
|
609
|
+
}
|
|
610
|
+
interface AppRetentionDeclaration {
|
|
611
|
+
key: string;
|
|
612
|
+
appliesTo: string[];
|
|
613
|
+
retentionMode: string;
|
|
614
|
+
uninstallAction: string;
|
|
615
|
+
merchantVisible: boolean;
|
|
616
|
+
}
|
|
617
|
+
interface CapabilityValidationIssue {
|
|
618
|
+
code: string;
|
|
619
|
+
path: string;
|
|
620
|
+
message: string;
|
|
621
|
+
}
|
|
622
|
+
interface CapabilityValidationResult {
|
|
623
|
+
valid: boolean;
|
|
624
|
+
issues: CapabilityValidationIssue[];
|
|
625
|
+
}
|
|
626
|
+
declare function validateAppCapabilityDeclarations(input: {
|
|
627
|
+
capabilities?: AppCapabilityDeclaration[];
|
|
628
|
+
egress?: AppEgressDeclaration[];
|
|
629
|
+
dataRetention?: AppRetentionDeclaration[];
|
|
630
|
+
}): CapabilityValidationResult;
|
|
631
|
+
declare function isNormalizedHostPattern(host: string): boolean;
|
|
632
|
+
|
|
633
|
+
declare const aiMcpDescriptorTypes: readonly ["tool", "resource", "resource_template", "prompt"];
|
|
634
|
+
type AiMcpDescriptorType = (typeof aiMcpDescriptorTypes)[number];
|
|
635
|
+
declare const aiMcpHumanApprovalPolicies: readonly ["not_required", "required", "required_for_mutation", "automation_policy_allowed"];
|
|
636
|
+
type AiMcpHumanApprovalPolicy = (typeof aiMcpHumanApprovalPolicies)[number];
|
|
637
|
+
interface AiMcpDescriptorDeclaration {
|
|
638
|
+
name: string;
|
|
639
|
+
descriptorType: AiMcpDescriptorType;
|
|
640
|
+
capabilityKey: string;
|
|
641
|
+
requiredScopes: string[];
|
|
642
|
+
dataClass: string;
|
|
643
|
+
riskClass: string;
|
|
644
|
+
mutating: boolean;
|
|
645
|
+
humanApprovalPolicy: AiMcpHumanApprovalPolicy;
|
|
646
|
+
description?: string;
|
|
647
|
+
promptTemplate?: string;
|
|
648
|
+
resourceUriTemplate?: string;
|
|
649
|
+
}
|
|
650
|
+
interface AiMcpMetadataValidationIssue {
|
|
651
|
+
code: string;
|
|
652
|
+
path: string;
|
|
653
|
+
message: string;
|
|
654
|
+
}
|
|
655
|
+
interface AiMcpMetadataValidationResult {
|
|
656
|
+
valid: boolean;
|
|
657
|
+
issues: AiMcpMetadataValidationIssue[];
|
|
658
|
+
}
|
|
659
|
+
declare function validateAiMcpDescriptorMetadata(descriptors: AiMcpDescriptorDeclaration[]): AiMcpMetadataValidationResult;
|
|
660
|
+
declare function classifyAiMcpMetadataAuthority(text: string): "safe_descriptor" | "untrusted_authority_claim";
|
|
661
|
+
|
|
662
|
+
interface LaunchManifestValidationIssue {
|
|
663
|
+
code: string;
|
|
664
|
+
path: string;
|
|
665
|
+
message: string;
|
|
666
|
+
}
|
|
667
|
+
interface LaunchManifestValidationResult {
|
|
668
|
+
valid: boolean;
|
|
669
|
+
issues: LaunchManifestValidationIssue[];
|
|
670
|
+
}
|
|
671
|
+
declare function validateLaunchReadinessManifest(manifest: AppManifest): LaunchManifestValidationResult;
|
|
672
|
+
declare function assertLaunchReadinessManifest(manifest: AppManifest): asserts manifest is AppManifest & {
|
|
673
|
+
launch: LaunchReadinessDeclaration;
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
interface NoDeployPreviewValidationResult {
|
|
677
|
+
readonly status: "valid" | "invalid";
|
|
678
|
+
readonly createdProductionState: false;
|
|
679
|
+
readonly diagnostics: readonly {
|
|
680
|
+
readonly code: string;
|
|
681
|
+
readonly message: string;
|
|
682
|
+
readonly path?: string;
|
|
683
|
+
}[];
|
|
684
|
+
}
|
|
685
|
+
declare function validateNoDeployPreviewManifest(manifest: AppManifest): NoDeployPreviewValidationResult;
|
|
686
|
+
|
|
687
|
+
export { type AdminComponentKitManifestValidationInput, type AdminComponentKitManifestValidationResult, type AiMcpDescriptorDeclaration, type AiMcpDescriptorType, type AiMcpHumanApprovalPolicy, type AiMcpMetadataValidationIssue, type AiMcpMetadataValidationResult, type AppCapabilityDeclaration, type AppCertificationManifestDeclaration, type AppEgressDeclaration, type AppGovernanceApprovalPolicy, type AppGovernanceCapabilityType, type AppGovernanceCostClass, type AppGovernanceDataClass, type AppGovernanceRiskClass, type AppManifest, type AppManifestSurface, type AppRetentionDeclaration, type AppSurfaceKind, type AppSurfaceSetting, type CapabilityValidationIssue, type CapabilityValidationResult, type CompatibilityResult, type ContractGenerationResult, type FixedSlotManifestDeclaration, type GeneratedContractFile, type HydrationTrigger, type LaunchAdminApiDeclaration, type LaunchAppDataDeclaration, type LaunchAssetDeclaration, type LaunchCompatibilityDeclaration, type LaunchConsentMetadataDeclaration, type LaunchEnvironmentDeclaration, type LaunchEvidenceDeclaration, type LaunchLifecycleCallbackDeclaration, type LaunchManifestValidationIssue, type LaunchManifestValidationResult, type LaunchMerchantSettingDeclaration, type LaunchReadinessDeclaration, type LaunchSandboxFixtureDeclaration, type LaunchSecretDeclaration, type LegacyStorefrontBlockRenderTier, type LocaleMessages, type NoDeployPreviewValidationResult, type PrivacyManifest, type PrivacyManifestIssue, type ScopeImpact, type StorefrontBlockClientIsland, type StorefrontBlockPlaceholder, type StorefrontBlockRenderTier, type StorefrontTranslationManifestDeclaration, type SurfaceContractDiagnostic, type SurfaceContractResult, type SurfaceContractSeverity, type SurfaceContractStatus, type TranslationGap, type TranslationStatus, type ValidatePrivacyManifestOptions, type ValidationIssue, type ValidationOptions, type ValidationResult, type ValidationSeverity, aiMcpDescriptorTypes, aiMcpHumanApprovalPolicies, appGovernanceApprovalPolicies, appGovernanceCapabilityTypes, appGovernanceCostClasses, appGovernanceDataClasses, appGovernanceRiskClasses, assertLaunchReadinessManifest, checkCompatibility, classifyAiMcpMetadataAuthority, classifyPrivacyManifestChange, defaultRequiredLocales, developerToolingOperationMetadata, generateContracts, generateIdeMetadata, getTranslationStatus, hydrationTriggers, isNormalizedHostPattern, isSupportedSurface, legacyStorefrontBlockRenderTiers, normalizeStorefrontBlockRenderTier, privacyManifestCapabilitySchema, privacyManifestSchema, storefrontBlockRenderTiers, supportedAdminComponentKitComponents, supportedSurfaces, validateAdminComponentKitManifest, validateAiMcpDescriptorMetadata, validateAppCapabilityDeclarations, validateExtensionSurface, validateExtensionSurfaceDeclarations, validateLaunchReadinessManifest, validateManifest, validateNoDeployPreviewManifest, validatePrivacyManifest };
|