@ecomweb/sdk 0.4.0 → 0.6.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/dist/index.d.ts CHANGED
@@ -2867,7 +2867,7 @@ type ThemeSetting = (SettingBase<"text" | "textarea"> & {
2867
2867
  readonly placeholder?: string;
2868
2868
  }) | (SettingBase<"richtext" | "url" | "color" | "menu"> & {
2869
2869
  readonly default?: string;
2870
- }) | SettingBase<"image_picker" | "collection"> | (SettingBase<"checkbox"> & {
2870
+ }) | SettingBase<"image_picker" | "collection" | "page" | "blog_post" | "blog_category" | "blog_tag" | "product"> | (SettingBase<"checkbox"> & {
2871
2871
  readonly default?: boolean;
2872
2872
  }) | (SettingBase<"number"> & {
2873
2873
  readonly default?: number;
@@ -3009,6 +3009,61 @@ declare const themeSchemaSchema: z.ZodArray<z.ZodObject<{
3009
3009
  not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3010
3010
  is_set: z.ZodOptional<z.ZodBoolean>;
3011
3011
  }, z.core.$strip>>;
3012
+ }, z.core.$strip>, z.ZodObject<{
3013
+ type: z.ZodLiteral<"page">;
3014
+ id: z.ZodString;
3015
+ label: z.ZodString;
3016
+ info: z.ZodOptional<z.ZodString>;
3017
+ visible_if: z.ZodOptional<z.ZodObject<{
3018
+ setting: z.ZodString;
3019
+ equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3020
+ not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3021
+ is_set: z.ZodOptional<z.ZodBoolean>;
3022
+ }, z.core.$strip>>;
3023
+ }, z.core.$strip>, z.ZodObject<{
3024
+ type: z.ZodLiteral<"blog_post">;
3025
+ id: z.ZodString;
3026
+ label: z.ZodString;
3027
+ info: z.ZodOptional<z.ZodString>;
3028
+ visible_if: z.ZodOptional<z.ZodObject<{
3029
+ setting: z.ZodString;
3030
+ equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3031
+ not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3032
+ is_set: z.ZodOptional<z.ZodBoolean>;
3033
+ }, z.core.$strip>>;
3034
+ }, z.core.$strip>, z.ZodObject<{
3035
+ type: z.ZodLiteral<"blog_category">;
3036
+ id: z.ZodString;
3037
+ label: z.ZodString;
3038
+ info: z.ZodOptional<z.ZodString>;
3039
+ visible_if: z.ZodOptional<z.ZodObject<{
3040
+ setting: z.ZodString;
3041
+ equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3042
+ not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3043
+ is_set: z.ZodOptional<z.ZodBoolean>;
3044
+ }, z.core.$strip>>;
3045
+ }, z.core.$strip>, z.ZodObject<{
3046
+ type: z.ZodLiteral<"blog_tag">;
3047
+ id: z.ZodString;
3048
+ label: z.ZodString;
3049
+ info: z.ZodOptional<z.ZodString>;
3050
+ visible_if: z.ZodOptional<z.ZodObject<{
3051
+ setting: z.ZodString;
3052
+ equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3053
+ not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3054
+ is_set: z.ZodOptional<z.ZodBoolean>;
3055
+ }, z.core.$strip>>;
3056
+ }, z.core.$strip>, z.ZodObject<{
3057
+ type: z.ZodLiteral<"product">;
3058
+ id: z.ZodString;
3059
+ label: z.ZodString;
3060
+ info: z.ZodOptional<z.ZodString>;
3061
+ visible_if: z.ZodOptional<z.ZodObject<{
3062
+ setting: z.ZodString;
3063
+ equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3064
+ not_equals: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
3065
+ is_set: z.ZodOptional<z.ZodBoolean>;
3066
+ }, z.core.$strip>>;
3012
3067
  }, z.core.$strip>, z.ZodObject<{
3013
3068
  type: z.ZodLiteral<"checkbox">;
3014
3069
  default: z.ZodOptional<z.ZodBoolean>;
@@ -3094,6 +3149,380 @@ declare function resolveThemeSettings(schema: ThemeSchema, input: unknown): {
3094
3149
  /** "Set" means not null, not "" and not false. */
3095
3150
  declare function isSettingVisible(setting: ThemeSetting, values: ThemeValues): boolean;
3096
3151
 
3152
+ /**
3153
+ * Metafields and metaobjects: the type engine (spec 2026-10-05
3154
+ * metafields-metaobjects §5). Plain TypeScript with no imports and no I/O, so
3155
+ * it runs unchanged in the API, the dashboard and storefronts.
3156
+ *
3157
+ * ecomweb-api (src/modules/metafields/domain/metafield-engine.ts) and
3158
+ * ecomweb-dashboard (lib/metafields/engine.ts) keep VERBATIM copies of
3159
+ * everything below the marker line. To change the engine: edit it here, update
3160
+ * ENGINE_BODY_SHA256 in metafield-engine.body-hash.spec.ts, then re-copy the
3161
+ * body into both repos with the new hash in their headers.
3162
+ */
3163
+ declare const METAFIELD_OWNER_TYPES: readonly ["product", "variant", "collection", "customer", "order", "page", "blog_post", "location", "shop"];
3164
+ type MetafieldOwnerType = (typeof METAFIELD_OWNER_TYPES)[number];
3165
+ declare const METAFIELD_BASE_TYPES: readonly ["single_line_text", "multi_line_text", "rich_text", "email", "integer", "decimal", "date", "date_time", "url", "link", "weight", "volume", "dimension", "boolean", "color", "rating", "money", "language", "json", "file", "image", "video", "product", "variant", "collection", "page", "blog_post", "customer", "order", "metaobject_reference", "mixed_reference"];
3166
+ type MetafieldBaseType = (typeof METAFIELD_BASE_TYPES)[number];
3167
+ type MetafieldListType = `list.${MetafieldBaseType}`;
3168
+ type MetafieldType = MetafieldBaseType | MetafieldListType;
3169
+ declare function isMetafieldType(value: unknown): value is MetafieldType;
3170
+ declare function isListType(type: MetafieldType): type is MetafieldListType;
3171
+ declare function baseTypeOf(type: MetafieldType): MetafieldBaseType;
3172
+ type MetafieldTypeGroup = "text" | "media" | "reference" | "link" | "date_time" | "number" | "measurement" | "other" | "advanced";
3173
+ /** Type picker groups in display order (spec §7.2). Labels are the consumer's. */
3174
+ declare const METAFIELD_TYPE_GROUPS: readonly {
3175
+ readonly group: MetafieldTypeGroup;
3176
+ readonly types: readonly MetafieldBaseType[];
3177
+ }[];
3178
+ declare const RESOURCE_REFERENCE_TYPES: readonly ["product", "variant", "collection", "page", "blog_post", "customer", "order"];
3179
+ declare const METAOBJECT_REFERENCE_TYPES: readonly ["metaobject_reference", "mixed_reference"];
3180
+ declare const MEDIA_TYPES: readonly ["file", "image", "video"];
3181
+ /** Never resolved outside the admin (spec §6.5). */
3182
+ declare const PRIVATE_REFERENCE_TYPES: readonly ["customer", "order"];
3183
+ declare const METAFIELD_LIMITS: {
3184
+ readonly definitions_per_owner_type: 100;
3185
+ readonly pinned_per_owner_type: 20;
3186
+ readonly metaobject_definitions: 100;
3187
+ readonly fields_per_metaobject: 40;
3188
+ readonly filter_keys: 5;
3189
+ readonly value_bytes: 65536;
3190
+ readonly list_items: 128;
3191
+ readonly choices: 128;
3192
+ readonly allowed_domains: 20;
3193
+ readonly regex_length: 200;
3194
+ readonly regex_value_length: 500;
3195
+ readonly single_line_text_length: 5000;
3196
+ readonly multi_line_text_length: 65000;
3197
+ readonly link_text_length: 255;
3198
+ readonly email_length: 254;
3199
+ readonly name_length: 255;
3200
+ readonly description_length: 5000;
3201
+ readonly mixed_reference_definitions_min: 2;
3202
+ readonly mixed_reference_definitions_max: 10;
3203
+ };
3204
+ type MetafieldIssueCode = "blank" | "required" | "unknown_key" | "duplicate" | "immutable" | "not_allowed" | "invalid_type" | "invalid_format" | "too_short" | "too_long" | "too_small" | "too_big" | "too_large" | "pattern_mismatch" | "not_a_choice" | "precision_exceeded" | "domain_not_allowed" | "invalid_unit" | "scale_mismatch" | "currency_mismatch" | "list_too_short" | "list_too_long" | "invalid_node" | "unsafe_url" | "invalid_validation" | "unsafe_regex";
3205
+ /** `path` is relative to the validated input: "", "[2]", "[2].amount", "fields[0].type". */
3206
+ interface MetafieldIssue {
3207
+ path: string;
3208
+ code: MetafieldIssueCode;
3209
+ message: string;
3210
+ }
3211
+ /** `errors` and `value` are optional-undefined on the other arm so both read cleanly without strictNullChecks. */
3212
+ type EngineResult<T> = {
3213
+ ok: true;
3214
+ value: T;
3215
+ errors?: undefined;
3216
+ } | {
3217
+ ok: false;
3218
+ errors: MetafieldIssue[];
3219
+ value?: undefined;
3220
+ };
3221
+ type FileKind = "image" | "video" | "document";
3222
+ interface MeasurementValue {
3223
+ value: string;
3224
+ unit: string;
3225
+ }
3226
+ interface LinkValue {
3227
+ url: string;
3228
+ text: string;
3229
+ }
3230
+ interface RatingValue {
3231
+ value: string;
3232
+ scale_min: string;
3233
+ scale_max: string;
3234
+ }
3235
+ interface MoneyValue {
3236
+ amount: string;
3237
+ currency_code: string;
3238
+ }
3239
+ /** integer: number; decimal: decimal string; date/date_time: canonical string; measurements: MeasurementValue. */
3240
+ type MetafieldBound = number | string | MeasurementValue;
3241
+ /** Canonical validations, as validateValidations returns them (spec §5.2). */
3242
+ interface MetafieldValidations {
3243
+ min_length?: number;
3244
+ max_length?: number;
3245
+ regex?: string;
3246
+ choices?: string[];
3247
+ min?: MetafieldBound;
3248
+ max?: MetafieldBound;
3249
+ max_precision?: number;
3250
+ allowed_domains?: string[];
3251
+ scale_min?: string;
3252
+ scale_max?: string;
3253
+ file_types?: FileKind[];
3254
+ metaobject_definition_id?: string;
3255
+ metaobject_definition_ids?: string[];
3256
+ list_min?: number;
3257
+ list_max?: number;
3258
+ }
3259
+ /** Store facts a value check needs. The engine never looks anything up. */
3260
+ interface MetafieldContext {
3261
+ currency_code: string;
3262
+ }
3263
+ declare const METAFIELD_KEY_PATTERN: RegExp;
3264
+ declare const METAOBJECT_TYPE_PATTERN: RegExp;
3265
+ declare const ENTRY_HANDLE_PATTERN: RegExp;
3266
+ /** "Đánh giá khách hàng" → "danh_gia_khach_hang". "" when nothing usable remains. */
3267
+ declare function toMetafieldKey(text: string): string;
3268
+ /** "Lan Anh – Hà Nội" → "lan-anh-ha-noi". "" when nothing usable remains. */
3269
+ declare function toEntryHandle(text: string): string;
3270
+ /** True for a well-formed entry handle that is not a reserved name. */
3271
+ declare function isValidEntryHandle(handle: string): boolean;
3272
+ declare function metafieldIdentifier(namespace: string, key: string): string;
3273
+ declare function parseMetafieldIdentifier(identifier: string): {
3274
+ namespace: string;
3275
+ key: string;
3276
+ } | null;
3277
+ /**
3278
+ * A canonical decimal string ("7.5", "-0.25", "0"), or null when the input is not a plain decimal.
3279
+ * Numbers JS prints in exponent form (1e-7, 1e21) are rejected; send them as decimal strings.
3280
+ */
3281
+ declare function normalizeDecimal(input: unknown): string | null;
3282
+ /** Compares two canonical decimal strings exactly. */
3283
+ declare function compareDecimal(a: string, b: string): -1 | 0 | 1;
3284
+ /** "YYYY-MM-DD" when the input is a real calendar date, else null. */
3285
+ declare function normalizeDate(input: unknown): string | null;
3286
+ /** "YYYY-MM-DDTHH:mm:ssZ" in UTC, or null. Milliseconds are dropped. */
3287
+ declare function normalizeDateTime(input: unknown): string | null;
3288
+ interface RichTextText {
3289
+ type: "text";
3290
+ value: string;
3291
+ bold?: boolean;
3292
+ italic?: boolean;
3293
+ }
3294
+ interface RichTextLink {
3295
+ type: "link";
3296
+ url: string;
3297
+ title?: string;
3298
+ children: RichTextText[];
3299
+ }
3300
+ type RichTextInline = RichTextText | RichTextLink;
3301
+ interface RichTextParagraph {
3302
+ type: "paragraph";
3303
+ children: RichTextInline[];
3304
+ }
3305
+ interface RichTextHeading {
3306
+ type: "heading";
3307
+ level: 1 | 2 | 3 | 4 | 5 | 6;
3308
+ children: RichTextInline[];
3309
+ }
3310
+ interface RichTextListItem {
3311
+ type: "list-item";
3312
+ children: RichTextInline[];
3313
+ }
3314
+ interface RichTextList {
3315
+ type: "list";
3316
+ listType: "ordered" | "unordered";
3317
+ children: RichTextListItem[];
3318
+ }
3319
+ type RichTextBlock = RichTextParagraph | RichTextHeading | RichTextList;
3320
+ interface RichTextRoot {
3321
+ type: "root";
3322
+ children: RichTextBlock[];
3323
+ }
3324
+ type RichTextNode = RichTextRoot | RichTextBlock | RichTextListItem | RichTextInline;
3325
+ /** Validates a rich-text tree (spec §5.3). There is no HTML anywhere in it. */
3326
+ declare function validateRichText(input: unknown, path?: string): EngineResult<RichTextRoot>;
3327
+ /** Characters of text in the tree, links and list items included. */
3328
+ declare function richTextLength(root: RichTextRoot): number;
3329
+ /** Conversion factors to the first unit of each type (g, ml, mm). */
3330
+ declare const MEASUREMENT_UNITS: {
3331
+ readonly weight: {
3332
+ readonly g: 1;
3333
+ readonly kg: 1000;
3334
+ readonly oz: 28.349523125;
3335
+ readonly lb: 453.59237;
3336
+ };
3337
+ readonly volume: {
3338
+ readonly ml: 1;
3339
+ readonly cl: 10;
3340
+ readonly l: 1000;
3341
+ readonly m3: 1000000;
3342
+ readonly fl_oz: 29.5735295625;
3343
+ readonly pt: 473.176473;
3344
+ readonly qt: 946.352946;
3345
+ readonly gal: 3785.411784;
3346
+ };
3347
+ readonly dimension: {
3348
+ readonly mm: 1;
3349
+ readonly cm: 10;
3350
+ readonly m: 1000;
3351
+ readonly in: 25.4;
3352
+ readonly ft: 304.8;
3353
+ readonly yd: 914.4;
3354
+ };
3355
+ };
3356
+ type MeasurementType = keyof typeof MEASUREMENT_UNITS;
3357
+ /** The value in g, ml or mm, or null for an unknown unit. For bounds only: it uses floats. */
3358
+ declare function measurementInBaseUnit(measurement: MeasurementValue, type: MeasurementType): number | null;
3359
+ /** File kinds a media value may point at; null means any kind (or not a media type). */
3360
+ declare function allowedFileKinds(type: MetafieldType, validations: MetafieldValidations): readonly FileKind[] | null;
3361
+ /** A positive bigint id as a string, or null. */
3362
+ declare function normalizeId(input: unknown): string | null;
3363
+ /**
3364
+ * Values a caller without a type should treat as "clear this field": null,
3365
+ * undefined, "" and []. Use isBlankValueFor when the field's type is known.
3366
+ */
3367
+ declare function isBlankValue(value: unknown): boolean;
3368
+ /**
3369
+ * Type-aware blank check: whitespace-only text is blank for text types, an
3370
+ * empty root is blank for rich_text, and neither is blank for json.
3371
+ */
3372
+ declare function isBlankValueFor(type: MetafieldType, value: unknown): boolean;
3373
+ /**
3374
+ * Validates one value against its type and its definition's (already
3375
+ * validated) validations, returning the canonical value. Blank values fail
3376
+ * with "blank": callers decide whether blank means "delete" or "required".
3377
+ */
3378
+ declare function validateMetafieldValue(type: MetafieldType, validations: MetafieldValidations, value: unknown, ctx: MetafieldContext, path?: string): EngineResult<unknown>;
3379
+ type MetafieldValidationKey = keyof MetafieldValidations;
3380
+ declare const VALIDATION_KEYS: Readonly<Record<MetafieldBaseType, readonly MetafieldValidationKey[]>>;
3381
+ /**
3382
+ * Restricts merchant regexes to a dialect whose work is bounded: no
3383
+ * backreferences or lookaround, nothing but "?" after a group, at most two
3384
+ * quantifiers (*, +, ?, {n,}, {n,m}; a lazy "?" is part of its quantifier,
3385
+ * exact {n} is free) and at most four alternatives. Deliberately conservative.
3386
+ */
3387
+ declare function isSafeRegex(pattern: string): boolean;
3388
+ /**
3389
+ * Validates and canonicalises a definition's `validations` for its type
3390
+ * (spec §5.2). Unknown keys, unsafe regexes and contradictory bounds fail.
3391
+ */
3392
+ declare function validateValidations(type: MetafieldType, input: unknown, path?: string): EngineResult<MetafieldValidations>;
3393
+ type CustomerAccess = "none" | "read" | "read_write";
3394
+ /** Customer, order and location data never reaches the public storefront (spec s.4.1). */
3395
+ declare function storefrontAccessAllowed(owner: MetafieldOwnerType): boolean;
3396
+ declare function allowedCustomerAccess(owner: MetafieldOwnerType): readonly CustomerAccess[];
3397
+ interface MetafieldDefinitionShape {
3398
+ owner_type: MetafieldOwnerType;
3399
+ namespace: string;
3400
+ key: string;
3401
+ name: string;
3402
+ description: string | null;
3403
+ type: MetafieldType;
3404
+ validations: MetafieldValidations;
3405
+ storefront_access: boolean;
3406
+ customer_access: CustomerAccess;
3407
+ }
3408
+ /** Validates a full metafield definition; the API merges a PATCH into the stored row first. */
3409
+ declare function validateMetafieldDefinition(input: unknown): EngineResult<MetafieldDefinitionShape>;
3410
+ interface MetaobjectFieldShape {
3411
+ key: string;
3412
+ name: string;
3413
+ description: string | null;
3414
+ type: MetafieldType;
3415
+ required: boolean;
3416
+ validations: MetafieldValidations;
3417
+ }
3418
+ /** Field types usable as filter keys (spec s.4.3). List types never are. */
3419
+ declare const FILTERABLE_TYPES: readonly MetafieldBaseType[];
3420
+ interface MetaobjectDefinitionShape {
3421
+ type: string;
3422
+ name: string;
3423
+ description: string | null;
3424
+ fields: MetaobjectFieldShape[];
3425
+ display_name_key: string | null;
3426
+ filter_keys: string[];
3427
+ has_status: boolean;
3428
+ storefront_access: boolean;
3429
+ customer_access: "none" | "read";
3430
+ }
3431
+ /** Validates a full metaobject definition; the API merges a PATCH into the stored row first. */
3432
+ declare function validateMetaobjectDefinition(input: unknown): EngineResult<MetaobjectDefinitionShape>;
3433
+ /** Validates an entry's field values against its definition; blank optional fields are omitted. */
3434
+ declare function validateMetaobjectEntry(fields: readonly MetaobjectFieldShape[], input: unknown, ctx: MetafieldContext): EngineResult<Record<string, unknown>>;
3435
+ /** The display-name field's text, else the handle (spec s.4.4). */
3436
+ declare function entryDisplayName(definition: Pick<MetaobjectDefinitionShape, "display_name_key">, fields: Record<string, unknown>, handle: string): string;
3437
+ /**
3438
+ * A field's type is fixed once saved (spec s.4.5). Reports removed keys so the
3439
+ * API can strip them from entries. Assumes `after` already passed
3440
+ * validateMetaobjectDefinition (unique keys).
3441
+ */
3442
+ declare function checkMetaobjectFieldChanges(before: readonly MetaobjectFieldShape[], after: readonly MetaobjectFieldShape[]): EngineResult<{
3443
+ removed: string[];
3444
+ added: string[];
3445
+ }>;
3446
+
3447
+ /**
3448
+ * Metafields as the public and customer APIs return them (spec §6.4): only
3449
+ * definitions with storefront (or customer) access, keyed "namespace.key",
3450
+ * with references already resolved (spec §6.5).
3451
+ */
3452
+ interface StorefrontMetafield<V = unknown> {
3453
+ type: MetafieldType;
3454
+ value: V;
3455
+ }
3456
+ type StorefrontMetafields = Record<string, StorefrontMetafield>;
3457
+ interface WithMetafields {
3458
+ metafields?: StorefrontMetafields;
3459
+ }
3460
+ /** One write in a customer PUT. `value: null` clears the metafield. */
3461
+ interface MetafieldWrite {
3462
+ namespace: string;
3463
+ key: string;
3464
+ value: unknown;
3465
+ }
3466
+ interface ResolvedImage {
3467
+ url: string;
3468
+ alt: string | null;
3469
+ width: number | null;
3470
+ height: number | null;
3471
+ }
3472
+ /** file, image and video values. */
3473
+ interface ResolvedAsset extends ResolvedImage {
3474
+ mime_type: string;
3475
+ }
3476
+ interface ResolvedProductRef {
3477
+ id: string;
3478
+ name: string;
3479
+ slug: string | null;
3480
+ image_url: string | null;
3481
+ min_price: number | null;
3482
+ max_price: number | null;
3483
+ available: boolean;
3484
+ }
3485
+ interface ResolvedVariantRef {
3486
+ id: string;
3487
+ product_id: string;
3488
+ product_slug: string | null;
3489
+ /** Option values joined with " / ", e.g. "Red / M". */
3490
+ title: string;
3491
+ price: number;
3492
+ image_url: string | null;
3493
+ available: boolean;
3494
+ }
3495
+ interface ResolvedCollectionRef {
3496
+ id: string;
3497
+ name: string;
3498
+ slug: string;
3499
+ image_url: string | null;
3500
+ }
3501
+ interface ResolvedPageRef {
3502
+ id: string;
3503
+ title: string;
3504
+ slug: string;
3505
+ }
3506
+ interface ResolvedBlogPostRef {
3507
+ id: string;
3508
+ title: string;
3509
+ slug: string;
3510
+ featured_image_url: string | null;
3511
+ published_at: string | null;
3512
+ }
3513
+ /** A metaobject reference beyond the resolution depth (2). */
3514
+ interface ResolvedMetaobjectStub {
3515
+ type: string;
3516
+ handle: string;
3517
+ }
3518
+ interface ResolvedMetaobjectRef extends ResolvedMetaobjectStub {
3519
+ display_name: string;
3520
+ fields: StorefrontMetafields;
3521
+ }
3522
+ interface StorefrontMetaobjectEntry extends ResolvedMetaobjectRef {
3523
+ updated_at: string;
3524
+ }
3525
+
3097
3526
  type ResizeMode = "cover" | "contain" | "inside" | "outside";
3098
3527
  type ImageFormat = "origin" | "avif" | "webp" | "png" | "jpeg";
3099
3528
  interface ImageTransformOptions {
@@ -3205,6 +3634,7 @@ type ProductDetail = Product & {
3205
3634
  }>;
3206
3635
  promotions?: PromotionData[];
3207
3636
  promotion_price?: number;
3637
+ metafields?: StorefrontMetafields;
3208
3638
  })[];
3209
3639
  } & {
3210
3640
  categories: Category[];
@@ -3214,6 +3644,7 @@ type ProductDetail = Product & {
3214
3644
  review_stats?: ProductReviewStats | null;
3215
3645
  services?: ProductService[];
3216
3646
  product_attributes?: AttributeLink[];
3647
+ metafields?: StorefrontMetafields;
3217
3648
  } & WithSeoMetadata$3;
3218
3649
 
3219
3650
  declare class ProductsApi {
@@ -3487,6 +3918,7 @@ interface Collection extends WithSeoMetadata$2 {
3487
3918
  collection_sort: string | null;
3488
3919
  created_at: string;
3489
3920
  updated_at: string;
3921
+ metafields?: StorefrontMetafields;
3490
3922
  }
3491
3923
  interface CollectionQueryParams extends BaseQueryParams {
3492
3924
  /** Fetch a specific set of collections — how collection_grid resolves its configured collection_ids. */
@@ -3701,7 +4133,7 @@ declare class OrdersApi {
3701
4133
  * Full detail for one of the authenticated customer's orders. The API
3702
4134
  * verifies ownership and returns 404 — not 403 — for someone else's order.
3703
4135
  */
3704
- getCustomerOrder(storeRef: string, orderId: Id): Promise<OrderWithItems>;
4136
+ getCustomerOrder(storeRef: string, orderId: Id): Promise<OrderWithItems & WithMetafields>;
3705
4137
  /**
3706
4138
  * Customers may only cancel orders that are still pending, confirmed or
3707
4139
  * processing; the API rejects anything else with ORDER_NOT_CANCELLABLE.
@@ -3716,7 +4148,7 @@ interface SeoMetadata$1 {
3716
4148
  interface WithSeoMetadata$1 {
3717
4149
  seo_metadata?: SeoMetadata$1 | null;
3718
4150
  }
3719
- type BlogPost = BlogPost$1 & WithSeoMetadata$1 & {
4151
+ type BlogPost = BlogPost$1 & WithSeoMetadata$1 & WithMetafields & {
3720
4152
  product_ids?: number[];
3721
4153
  };
3722
4154
  interface BlogPostQueryParams extends BaseQueryParams {
@@ -3763,7 +4195,12 @@ declare class BlogApi {
3763
4195
  interface PublishedStoreTheme {
3764
4196
  id: string | null;
3765
4197
  name: string;
3766
- kind: "hosted" | "custom";
4198
+ /** `external`: the merchant's own site serves the storefront. */
4199
+ kind: "hosted" | "custom" | "external";
4200
+ /** Where the theme runs; absent from APIs older than external themes. */
4201
+ hosting?: "ecomweb" | "external";
4202
+ /** The external site's URL (https, no trailing slash); external themes only. */
4203
+ external_url?: string | null;
3767
4204
  source_theme_id: string;
3768
4205
  values: Record<string, unknown>;
3769
4206
  }
@@ -3771,6 +4208,16 @@ type StoreConfigurationInfo = Store & {
3771
4208
  config: StoreConfig;
3772
4209
  settings: StoreSettings;
3773
4210
  theme?: PublishedStoreTheme;
4211
+ /** Shop metafields with storefront access (spec §6.4). */
4212
+ metafields?: StorefrontMetafields;
4213
+ };
4214
+ /** `GET /public/stores/domain/:domain`: the store a host serves. */
4215
+ type StoreByDomainInfo = StoreConfigurationInfo & {
4216
+ /**
4217
+ * The live theme's URL when it is external (the shared storefront sends
4218
+ * shoppers there), else null. Absent from APIs older than external themes.
4219
+ */
4220
+ storefront_url?: string | null;
3774
4221
  };
3775
4222
 
3776
4223
  declare class StoresApi {
@@ -3782,7 +4229,7 @@ declare class StoresApi {
3782
4229
  includeEmbeddedScripts?: boolean;
3783
4230
  }): Promise<StoreConfigurationInfo | null>;
3784
4231
  getBySubdomain(subdomain: string): Promise<Store | null>;
3785
- getByDomain(domain: string): Promise<StoreConfigurationInfo | null>;
4232
+ getByDomain(domain: string): Promise<StoreByDomainInfo | null>;
3786
4233
  }
3787
4234
 
3788
4235
  declare class ThemesApi {
@@ -3792,6 +4239,36 @@ declare class ThemesApi {
3792
4239
  getPreview(storeRef: string, token: string): Promise<PublishedStoreTheme | null>;
3793
4240
  }
3794
4241
 
4242
+ interface MetaobjectListParams {
4243
+ /** Equality filters on the definition's filter keys (spec §6.4). */
4244
+ filter?: Record<string, string | number | boolean>;
4245
+ cursor?: string;
4246
+ /** At most 50. */
4247
+ limit?: number;
4248
+ /** Send the customer session, for definitions with customer access only. */
4249
+ as_customer?: boolean;
4250
+ }
4251
+ interface MetaobjectListResult {
4252
+ items: StorefrontMetaobjectEntry[];
4253
+ next_cursor: string | null;
4254
+ }
4255
+
4256
+ declare class MetaobjectsApi {
4257
+ private publicHttp;
4258
+ private authHttp;
4259
+ constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
4260
+ /**
4261
+ * Active entries of a metaobject type. A type that is unknown or hidden
4262
+ * from this reader lists as empty: the API answers 404 for both, the same
4263
+ * as a missing type, so it never reveals which types exist.
4264
+ */
4265
+ list(storeRef: string, type: string, params?: MetaobjectListParams): Promise<MetaobjectListResult>;
4266
+ /** One active entry by handle; null when it, or its type, is missing or hidden. */
4267
+ get(storeRef: string, type: string, handle: string, options?: {
4268
+ as_customer?: boolean;
4269
+ }): Promise<StorefrontMetaobjectEntry | null>;
4270
+ }
4271
+
3795
4272
  declare const searchCatalogParamsSchema: z.ZodObject<{
3796
4273
  q: z.ZodOptional<z.ZodString>;
3797
4274
  collection: z.ZodString;
@@ -4371,6 +4848,13 @@ declare class CustomersApi {
4371
4848
  private http;
4372
4849
  constructor(http: IHttpClient);
4373
4850
  upsertForAuth(storeRef: string, payload: UpsertCustomerForAuthPayload): Promise<ApiResponse<Customer>>;
4851
+ /** The signed-in customer's metafields with customer access (spec §6.6). */
4852
+ getMetafields(storeRef: string): Promise<StorefrontMetafields>;
4853
+ /**
4854
+ * Writes read_write metafields; `value: null` clears one. Throws
4855
+ * METAFIELD_VALUE_INVALID (details.errors[] by path) or METAFIELD_NOT_WRITABLE.
4856
+ */
4857
+ updateMetafields(storeRef: string, values: MetafieldWrite[]): Promise<StorefrontMetafields>;
4374
4858
  }
4375
4859
 
4376
4860
  interface Address {
@@ -4428,7 +4912,7 @@ interface SeoMetadata {
4428
4912
  interface WithSeoMetadata {
4429
4913
  seo_metadata?: SeoMetadata | null;
4430
4914
  }
4431
- type ContentPage = ContentPage$1 & WithSeoMetadata;
4915
+ type ContentPage = ContentPage$1 & WithSeoMetadata & WithMetafields;
4432
4916
 
4433
4917
  declare class ContentPagesApi {
4434
4918
  private http;
@@ -4669,6 +5153,7 @@ declare function createEcomwebSdk(options: EcomwebSdkOptions): {
4669
5153
  blog: BlogApi;
4670
5154
  stores: StoresApi;
4671
5155
  themes: ThemesApi;
5156
+ metaobjects: MetaobjectsApi;
4672
5157
  search: SearchApi;
4673
5158
  banners: BannersApi;
4674
5159
  shipping: ShippingApi;
@@ -4684,4 +5169,4 @@ declare function createEcomwebSdk(options: EcomwebSdkOptions): {
4684
5169
  };
4685
5170
  type EcomwebSdk = ReturnType<typeof createEcomwebSdk>;
4686
5171
 
4687
- export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type Banner, type BannerQueryParams, BannersApi, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, type BlogSettings, type BlogTag, type BlogTagQueryParams, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBanner, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, type EcomwebSdk, type EcomwebSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type GuestOrderLookupResult, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MERCHANT_ADJUSTMENT_REASONS, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RULE_FIELDS, RedirectsApi, type RegisterPayload, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingRate, type ShippingRateType, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBanner, type UpdateBannerPosition, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithSeoMetadata$3 as WithSeoMetadata, allowedValuesFor, appliedPromotionSchema, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, bannerSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, colorSchema, contentPageSchema, createAuthAwareHttpClient, createBannerSchema, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isEditableStatus, isPublishableStatus, isRuleField, isSettingVisible, isUnpublishedStatus, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, messageOutboxStatusSchema, moneySchema, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseStorageUrl, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, strictUrlSchema, themeDefaults, themeSchemaSchema, themeSettings, timestampSchema, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBannerPositionSchema, updateBannerSchema, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validatePaginationMeta, validateThemeValues, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema };
5172
+ export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type Banner, type BannerQueryParams, BannersApi, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, type BlogSettings, type BlogTag, type BlogTagQueryParams, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBanner, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerAccess, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, ENTRY_HANDLE_PATTERN, type EcomwebSdk, type EcomwebSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type EngineResult, FILTERABLE_TYPES, type FileKind, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type GuestOrderLookupResult, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LinkValue, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MEASUREMENT_UNITS, MEDIA_TYPES, MERCHANT_ADJUSTMENT_REASONS, METAFIELD_BASE_TYPES, METAFIELD_KEY_PATTERN, METAFIELD_LIMITS, METAFIELD_OWNER_TYPES, METAFIELD_TYPE_GROUPS, METAOBJECT_REFERENCE_TYPES, METAOBJECT_TYPE_PATTERN, type MeasurementType, type MeasurementValue, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MetafieldBaseType, type MetafieldBound, type MetafieldContext, type MetafieldDefinitionShape, type MetafieldIssue, type MetafieldIssueCode, type MetafieldListType, type MetafieldOwnerType, type MetafieldType, type MetafieldTypeGroup, type MetafieldValidationKey, type MetafieldValidations, type MetafieldWrite, type MetaobjectDefinitionShape, type MetaobjectFieldShape, type MetaobjectListParams, type MetaobjectListResult, MetaobjectsApi, type MoneyValue, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRIVATE_REFERENCE_TYPES, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RESOURCE_REFERENCE_TYPES, RULE_FIELDS, type RatingValue, RedirectsApi, type RegisterPayload, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ResolvedAsset, type ResolvedBlogPostRef, type ResolvedCollectionRef, type ResolvedImage, type ResolvedMetaobjectRef, type ResolvedMetaobjectStub, type ResolvedPageRef, type ResolvedProductRef, type ResolvedVariantRef, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, type RichTextBlock, type RichTextHeading, type RichTextInline, type RichTextLink, type RichTextList, type RichTextListItem, type RichTextNode, type RichTextParagraph, type RichTextRoot, type RichTextText, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingRate, type ShippingRateType, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreByDomainInfo, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, type StorefrontMetafield, type StorefrontMetafields, type StorefrontMetaobjectEntry, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBanner, type UpdateBannerPosition, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, VALIDATION_KEYS, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithMetafields, type WithSeoMetadata$3 as WithSeoMetadata, allowedCustomerAccess, allowedFileKinds, allowedValuesFor, appliedPromotionSchema, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, bannerSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, baseTypeOf, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, checkMetaobjectFieldChanges, colorSchema, compareDecimal, contentPageSchema, createAuthAwareHttpClient, createBannerSchema, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, entryDisplayName, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isBlankValue, isBlankValueFor, isEditableStatus, isListType, isMetafieldType, isPublishableStatus, isRuleField, isSafeRegex, isSettingVisible, isUnpublishedStatus, isValidEntryHandle, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, measurementInBaseUnit, messageOutboxStatusSchema, metafieldIdentifier, moneySchema, normalizeDate, normalizeDateTime, normalizeDecimal, normalizeId, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseMetafieldIdentifier, parseStorageUrl, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, richTextLength, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, storefrontAccessAllowed, strictUrlSchema, themeDefaults, themeSchemaSchema, themeSettings, timestampSchema, toEntryHandle, toMetafieldKey, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBannerPositionSchema, updateBannerSchema, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validateMetafieldDefinition, validateMetafieldValue, validateMetaobjectDefinition, validateMetaobjectEntry, validatePaginationMeta, validateRichText, validateThemeValues, validateValidations, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema };