platform-types 1.10.676 → 1.10.677

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/cjs/index.js CHANGED
@@ -100,6 +100,7 @@ __exportStar(require("./storefrontDesign.js"), exports);
100
100
  __exportStar(require("./storefrontDesignRegistry.js"), exports);
101
101
  __exportStar(require("./storefrontTheme.js"), exports);
102
102
  __exportStar(require("./storeNetwork.js"), exports);
103
+ __exportStar(require("./storefrontAssets.js"), exports);
103
104
  __exportStar(require("./storefrontEvent.js"), exports);
104
105
  __exportStar(require("./subscription.js"), exports);
105
106
  __exportStar(require("./support.js"), exports);
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_STOREFRONT_ASSETS = exports.STOREFRONT_ASSET_VARIANTS = void 0;
4
+ exports.STOREFRONT_ASSET_VARIANTS = [
5
+ 'original',
6
+ '200x200',
7
+ '400x400',
8
+ '800x800',
9
+ '1200x1200',
10
+ '1600x1600',
11
+ ];
12
+ exports.MAX_STOREFRONT_ASSETS = 200;
package/dist/index.d.ts CHANGED
@@ -76,6 +76,7 @@ export * from './storefrontDesign.ts';
76
76
  export * from './storefrontDesignRegistry.ts';
77
77
  export * from './storefrontTheme.ts';
78
78
  export * from './storeNetwork.ts';
79
+ export * from './storefrontAssets.ts';
79
80
  export * from './storefrontEvent.ts';
80
81
  export * from './subscription.ts';
81
82
  export * from './support.ts';
package/dist/index.js CHANGED
@@ -84,6 +84,7 @@ export * from "./storefrontDesign.js";
84
84
  export * from "./storefrontDesignRegistry.js";
85
85
  export * from "./storefrontTheme.js";
86
86
  export * from "./storeNetwork.js";
87
+ export * from "./storefrontAssets.js";
87
88
  export * from "./storefrontEvent.js";
88
89
  export * from "./subscription.js";
89
90
  export * from "./support.js";
@@ -0,0 +1,62 @@
1
+ export declare const STOREFRONT_ASSET_VARIANTS: readonly ["original", "200x200", "400x400", "800x800", "1200x1200", "1600x1600"];
2
+ export declare const MAX_STOREFRONT_ASSETS = 200;
3
+ declare global {
4
+ type StorefrontAssetErrorCode = 'ROLE_FORBIDDEN' | 'PLAN_UPGRADE_REQUIRED' | 'SUBSCRIPTION_READONLY' | 'STOREFRONT_ASSET_ENTITLEMENT_UNAVAILABLE' | 'STOREFRONT_ASSET_REQUEST_TOO_LARGE' | 'STOREFRONT_ASSET_TIMEOUT' | 'VALIDATION_FAILED' | 'ASSET_ARCHIVE_UNCERTAIN' | 'ASSET_CAPACITY_EXCEEDED' | 'ASSET_NOT_FOUND' | 'ASSET_REQUEST_CONFLICT' | 'ASSET_STORAGE_CONFLICT' | 'ASSET_TOO_LARGE' | 'ASSET_UPLOAD_FAILED' | 'ASSET_UPLOAD_PENDING' | 'ASSET_UPLOAD_UNCERTAIN' | 'INVALID_ACTOR' | 'INVALID_ASSET_CURSOR' | 'INVALID_ASSET_ID' | 'INVALID_ASSET_IMAGE' | 'INVALID_ASSET_LIMIT' | 'INVALID_ASSET_PLACEMENT' | 'INVALID_ASSET_STAGE' | 'INVALID_ASSET_VARIANT' | 'INVALID_REQUEST_ID' | 'INVALID_STORE_CONTEXT' | 'LEGACY_LOGO_MAPPING_CONFLICT';
5
+ interface StorefrontAssetResponse {
6
+ message: string;
7
+ data: StorefrontAsset;
8
+ }
9
+ interface StorefrontAssetListResponse {
10
+ message: string;
11
+ data: {
12
+ items: StorefrontAsset[];
13
+ cursor?: string;
14
+ };
15
+ }
16
+ interface StorefrontAssetErrorResponse {
17
+ message: string;
18
+ error: StorefrontAssetErrorCode;
19
+ fieldErrors?: StorefrontAssetFieldError[];
20
+ feature?: 'storefront';
21
+ source?: EntitlementSource;
22
+ requiredPlan?: PlanTier | null;
23
+ currentPlan?: PlanTier | null;
24
+ }
25
+ type StorefrontAssetVariant = (typeof STOREFRONT_ASSET_VARIANTS)[number];
26
+ interface StorefrontAssetUploadRequest {
27
+ requestId: string;
28
+ base64: string;
29
+ }
30
+ interface StorefrontAssetArchiveRequest {
31
+ requestId: string;
32
+ }
33
+ interface StorefrontAssetListQuery {
34
+ limit?: number;
35
+ cursor?: string;
36
+ }
37
+ interface StorefrontAssetFieldError {
38
+ path: string;
39
+ code: string;
40
+ }
41
+ interface StorefrontAssetImageQuery {
42
+ variant?: StorefrontAssetVariant;
43
+ }
44
+ interface StorefrontAsset {
45
+ assetId: string;
46
+ status: 'ready' | 'archived';
47
+ width: number;
48
+ height: number;
49
+ contentType: 'image/jpeg' | 'image/png' | 'image/webp';
50
+ createdAt: number;
51
+ }
52
+ interface StorefrontAssetPlacement {
53
+ assetId: string;
54
+ mobileAssetId?: string;
55
+ alt?: string;
56
+ decorative: boolean;
57
+ focalPoint?: {
58
+ x: number;
59
+ y: number;
60
+ };
61
+ }
62
+ }
@@ -0,0 +1,9 @@
1
+ export const STOREFRONT_ASSET_VARIANTS = [
2
+ 'original',
3
+ '200x200',
4
+ '400x400',
5
+ '800x800',
6
+ '1200x1200',
7
+ '1600x1600',
8
+ ];
9
+ export const MAX_STOREFRONT_ASSETS = 200;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.676",
3
+ "version": "1.10.677",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",