@thorprovider/types 5.7.8 → 5.7.9

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/src/storefront.ts CHANGED
@@ -15,9 +15,11 @@
15
15
  * Supported commerce platform types for storefront identification.
16
16
  *
17
17
  * @remarks
18
- * Keep this type in sync with SupportedProviderType from provider.ts.
19
- * When adding a new provider, update both packages/types/src/provider.ts
20
- * and this type.
18
+ * Keep this type in sync with ProviderTypeString from provider.ts and the
19
+ * runtime registry in @thorprovider/adapters
20
+ * (packages/adapters/src/factory/provider-types.ts).
21
+ * When adding a new provider, update packages/types/src/provider.ts, this
22
+ * type, and the adapters registry.
21
23
  *
22
24
  * Currently supported:
23
25
  * - ✅ 'mock': Backend-optional layout/design mode using fixture data
@@ -98,32 +100,3 @@ export interface StorefrontContext {
98
100
  */
99
101
  metadata?: Record<string, unknown>;
100
102
  }
101
-
102
- /**
103
- * Storefront validation error.
104
- * Thrown when storefront configuration is invalid or missing.
105
- *
106
- * @example
107
- * ```typescript
108
- * throw new StorefrontConfigError(
109
- * 'Medusa requires NEXT_PUBLIC_SALES_CHANNEL_ID',
110
- * 'medusa',
111
- * 'NEXT_PUBLIC_SALES_CHANNEL_ID',
112
- * );
113
- * ```
114
- */
115
- export class StorefrontConfigError extends Error {
116
- public readonly platformType: string;
117
- public readonly requiredEnvVar?: string;
118
-
119
- constructor(
120
- message: string,
121
- platformType: string,
122
- requiredEnvVar?: string,
123
- ) {
124
- super(message);
125
- this.name = 'StorefrontConfigError';
126
- this.platformType = platformType;
127
- this.requiredEnvVar = requiredEnvVar;
128
- }
129
- }