@donotdev/core 0.0.2 → 0.0.4

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/server.d.ts CHANGED
@@ -4087,1539 +4087,1617 @@ declare const COMMON_TIER_CONFIGS: {
4087
4087
  declare const DEFAULT_SUBSCRIPTION: SubscriptionClaims;
4088
4088
 
4089
4089
  /**
4090
- * @fileoverview Billing Types
4091
- * @description Type definitions for billing domain. Defines billing provider types, checkout modes, billing adapter interfaces, subscription types, and billing-related interfaces.
4092
- *
4093
- * @version 0.0.1
4090
+ * @fileoverview DoNotDev Framework - Unified Types & Constants
4091
+ * @description Single source of truth for all framework types and constants
4092
+ * @package @donotdev/types
4093
+ * @version 0.0.3
4094
4094
  * @since 0.0.1
4095
4095
  * @author AMBROISE PARK Consulting
4096
+ *
4097
+ * @remarks
4098
+ * This file consolidates all framework types and constants to prevent unnecessary splitting
4099
+ * and ensure DRY principles. All magic strings are replaced with typed constants.
4096
4100
  */
4097
4101
 
4098
- /** Billing provider types - Stripe only
4099
- *
4100
- * @version 0.0.1
4101
- * @since 0.0.1
4102
- * @author AMBROISE PARK Consulting
4102
+ /**
4103
+ * Supported platform identifiers
4104
+ * @constant
4103
4105
  */
4104
- type BillingProvider = 'stripe';
4105
- /** Unified checkout mode type used everywhere
4106
- *
4107
- * @version 0.0.1
4108
- * @since 0.0.1
4109
- * @author AMBROISE PARK Consulting
4106
+ declare const PLATFORMS: {
4107
+ readonly VITE: "vite";
4108
+ readonly NEXTJS: "nextjs";
4109
+ readonly UNKNOWN: "unknown";
4110
+ };
4111
+ /**
4112
+ * Platform type derived from PLATFORMS constant
4110
4113
  */
4111
- type CheckoutMode = 'payment' | 'subscription';
4112
- /** Billing adapter interface
4113
- *
4114
- * @version 0.0.1
4115
- * @since 0.0.1
4116
- * @author AMBROISE PARK Consulting
4114
+ type Platform = (typeof PLATFORMS)[keyof typeof PLATFORMS];
4115
+ /**
4116
+ * Supported environment modes
4117
+ * @constant
4117
4118
  */
4118
- interface BillingAdapter {
4119
- createCheckoutSession(request: CreateCheckoutSessionRequest): Promise<CreateCheckoutSessionResponse>;
4120
- getProvider(): Promise<BillingProvider>;
4121
- isAvailable(): Promise<boolean>;
4122
- }
4123
- /** Billing event types
4124
- *
4125
- * @version 0.0.1
4126
- * @since 0.0.1
4127
- * @author AMBROISE PARK Consulting
4119
+ declare const ENVIRONMENTS: {
4120
+ readonly DEVELOPMENT: "development";
4121
+ readonly PRODUCTION: "production";
4122
+ readonly TEST: "test";
4123
+ };
4124
+ /**
4125
+ * Environment mode type derived from ENVIRONMENTS constant
4128
4126
  */
4129
- type BillingEvent = {
4130
- type: 'subscription_updated';
4131
- data: any;
4132
- } | {
4133
- type: 'payment_succeeded';
4134
- data: any;
4135
- } | {
4136
- type: 'payment_failed';
4137
- data: any;
4127
+ type EnvironmentMode = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];
4128
+ /**
4129
+ * Supported execution contexts
4130
+ * @constant
4131
+ */
4132
+ declare const CONTEXTS: {
4133
+ readonly CLIENT: "client";
4134
+ readonly SERVER: "server";
4135
+ readonly BUILD: "build";
4138
4136
  };
4139
- /** Payment method types
4140
- *
4141
- * @version 0.0.1
4142
- * @since 0.0.1
4143
- * @author AMBROISE PARK Consulting
4137
+ /**
4138
+ * Context type derived from CONTEXTS constant
4144
4139
  */
4145
- type PaymentMethodType = 'card' | 'bank_account' | 'paypal' | 'apple_pay' | 'google_pay';
4146
- /** Payment method interface
4147
- *
4148
- * @version 0.0.1
4149
- * @since 0.0.1
4150
- * @author AMBROISE PARK Consulting
4140
+ type Context = (typeof CONTEXTS)[keyof typeof CONTEXTS];
4141
+ /**
4142
+ * Platform detection confidence thresholds
4143
+ * @constant
4151
4144
  */
4152
- interface PaymentMethod {
4153
- id: string;
4154
- userId: string;
4155
- type: PaymentMethodType;
4156
- isDefault: boolean;
4157
- last4?: string;
4158
- brand?: string;
4159
- expiryMonth?: number;
4160
- expiryYear?: number;
4161
- createdAt: string;
4162
- updatedAt: string;
4163
- }
4164
- /** Billing provider configuration interface
4165
- *
4166
- * @version 0.0.1
4167
- * @since 0.0.1
4168
- * @author AMBROISE PARK Consulting
4145
+ declare const CONFIDENCE_LEVELS: {
4146
+ readonly HIGH: 0.95;
4147
+ readonly MEDIUM: 0.8;
4148
+ readonly LOW: 0.7;
4149
+ readonly MINIMUM: 0.3;
4150
+ };
4151
+ /**
4152
+ * Confidence level type derived from CONFIDENCE_LEVELS constant
4169
4153
  */
4170
- interface BillingProviderConfig {
4171
- provider: BillingProvider;
4172
- apiKey?: string;
4173
- webhookSecret?: string;
4174
- publishableKey?: string;
4175
- testMode?: boolean;
4176
- }
4177
- /** Invoice interface
4154
+ type ConfidenceLevel = (typeof CONFIDENCE_LEVELS)[keyof typeof CONFIDENCE_LEVELS];
4155
+ /**
4156
+ * Unified feature status for all feature packages
4157
+ * Replaces combinatorial boolean flags (initialized, authStateChecked, loading) with single-source-of-truth enum.
4178
4158
  *
4179
- * @version 0.0.1
4180
- * @since 0.0.1
4181
- * @author AMBROISE PARK Consulting
4159
+ * **Status values:**
4160
+ * - `initializing`: Feature is loading/initializing (show skeleton/loader, DON'T redirect yet)
4161
+ * - `ready`: Feature fully operational (check user state, redirect if needed)
4162
+ * - `degraded`: Feature unavailable but app continues (protected routes redirect with error, public routes allow access)
4163
+ * - `error`: Feature encountered recoverable error (protected routes redirect with error)
4164
+ *
4165
+ * **Usage in guards:**
4166
+ * - Protected routes with `degraded` status redirect to auth route with `?error=auth_unavailable`
4167
+ * - Protected routes with `error` status redirect to auth route with `?error=auth_error`
4168
+ * - `initializing` shows loader, doesn't redirect
4169
+ * - `ready` performs normal auth checks
4170
+ *
4171
+ * @example
4172
+ * ```typescript
4173
+ * switch (status) {
4174
+ * case FEATURE_STATUS.INITIALIZING: return <Skeleton />;
4175
+ * case FEATURE_STATUS.DEGRADED:
4176
+ * // Protected route → redirect with error
4177
+ * // Public route → allow access
4178
+ * return authRequired ? <Redirect to="/auth?error=auth_unavailable" /> : children;
4179
+ * case FEATURE_STATUS.READY: return user ? children : <Redirect />;
4180
+ * case FEATURE_STATUS.ERROR: return <ErrorBoundary />;
4181
+ * }
4182
+ * ```
4182
4183
  */
4183
- interface Invoice {
4184
- id: string;
4185
- userId: string;
4186
- amount: number;
4187
- currency: string;
4188
- status: 'draft' | 'open' | 'paid' | 'void' | 'uncollectible';
4189
- createdAt: string;
4190
- dueDate?: string;
4191
- paidAt?: string;
4192
- description?: string;
4193
- items: InvoiceItem[];
4194
- }
4184
+ declare const FEATURE_STATUS: {
4185
+ readonly INITIALIZING: "initializing";
4186
+ readonly READY: "ready";
4187
+ readonly DEGRADED: "degraded";
4188
+ readonly ERROR: "error";
4189
+ };
4195
4190
  /**
4196
- * Invoice item interface
4197
- *
4198
- * @version 0.0.1
4199
- * @since 0.0.1
4200
- * @author AMBROISE PARK Consulting
4191
+ * Feature status type derived from FEATURE_STATUS constant
4201
4192
  */
4202
- interface InvoiceItem {
4203
- id: string;
4204
- description: string;
4205
- amount: number;
4206
- quantity: number;
4207
- unitPrice: number;
4208
- }
4193
+ type FeatureStatus = (typeof FEATURE_STATUS)[keyof typeof FEATURE_STATUS];
4209
4194
  /**
4210
- * Subscription interface
4211
- *
4212
- * @version 0.0.1
4213
- * @since 0.0.1
4214
- * @author AMBROISE PARK Consulting
4195
+ * Supported storage backend types
4196
+ * @constant
4215
4197
  */
4216
- interface Subscription {
4217
- id: string;
4218
- userId: string;
4219
- status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid';
4220
- currentPeriodStart: string;
4221
- currentPeriodEnd: string;
4222
- cancelAtPeriodEnd: boolean;
4223
- canceledAt?: string;
4224
- trialStart?: string;
4225
- trialEnd?: string;
4226
- createdAt: string;
4227
- updatedAt: string;
4228
- }
4198
+ declare const STORAGE_TYPES: {
4199
+ readonly LOCAL: "localStorage";
4200
+ readonly SESSION: "sessionStorage";
4201
+ readonly INDEXED_DB: "indexedDB";
4202
+ readonly MEMORY: "memory";
4203
+ };
4229
4204
  /**
4230
- * Stripe webhook event data
4231
- *
4232
- * @version 0.0.1
4233
- * @since 0.0.1
4234
- * @author AMBROISE PARK Consulting
4205
+ * Storage type derived from STORAGE_TYPES constant
4235
4206
  */
4236
- interface StripeWebhookEvent {
4237
- id: string;
4238
- type: string;
4239
- data: {
4240
- object: any;
4241
- };
4242
- created: number;
4243
- livemode: boolean;
4244
- pending_webhooks: number;
4245
- request?: {
4246
- id: string;
4247
- idempotency_key?: string;
4248
- };
4249
- }
4207
+ type StorageType = (typeof STORAGE_TYPES)[keyof typeof STORAGE_TYPES];
4250
4208
  /**
4251
- * Schema for creating checkout session
4209
+ * Storage scope levels for data isolation
4210
+ * @constant
4252
4211
  */
4212
+ declare const STORAGE_SCOPES: {
4213
+ readonly USER: "user";
4214
+ readonly GLOBAL: "global";
4215
+ readonly SESSION: "session";
4216
+ };
4253
4217
  /**
4254
- * Schema for processing payment success
4218
+ * Storage scope type derived from STORAGE_SCOPES constant
4255
4219
  */
4220
+ type StorageScope = (typeof STORAGE_SCOPES)[keyof typeof STORAGE_SCOPES];
4256
4221
  /**
4257
- * Checkout session creation request
4222
+ * PWA display modes
4223
+ * @constant
4258
4224
  */
4225
+ declare const PWA_DISPLAY_MODES: {
4226
+ readonly STANDALONE: "standalone";
4227
+ readonly FULLSCREEN: "fullscreen";
4228
+ readonly MINIMAL_UI: "minimal-ui";
4229
+ readonly BROWSER: "browser";
4230
+ };
4259
4231
  /**
4260
- * Checkout session response
4232
+ * PWA display mode type derived from PWA_DISPLAY_MODES constant
4261
4233
  */
4234
+ type PWADisplayMode = (typeof PWA_DISPLAY_MODES)[keyof typeof PWA_DISPLAY_MODES];
4262
4235
  /**
4263
- * Refresh subscription request
4264
- *
4265
- * @version 0.0.1
4266
- * @since 0.0.1
4267
- * @author AMBROISE PARK Consulting
4236
+ * PWA asset types
4237
+ * @constant
4268
4238
  */
4269
- interface RefreshSubscriptionRequest {
4270
- userId: string;
4271
- }
4239
+ declare const PWA_ASSET_TYPES: {
4240
+ readonly MANIFEST: "manifest";
4241
+ readonly SERVICE_WORKER: "service-worker";
4242
+ readonly ICON: "icon";
4243
+ };
4272
4244
  /**
4273
- * Stripe provider interface for billing operations
4274
- *
4275
- * @version 0.0.1
4276
- * @since 0.0.1
4277
- * @author AMBROISE PARK Consulting
4245
+ * PWA asset type derived from PWA_ASSET_TYPES constant
4278
4246
  */
4279
- interface StripeProvider {
4280
- createCheckoutSession(params: {
4281
- priceId: string;
4282
- userId: string;
4283
- successUrl: string;
4284
- cancelUrl: string;
4285
- metadata?: Record<string, string>;
4286
- customerEmail?: string;
4287
- allowPromotionCodes?: boolean;
4288
- }): Promise<CreateCheckoutSessionResponse>;
4289
- getSubscription(userId: string): Promise<Subscription | null>;
4290
- cancelSubscription(subscriptionId: string): Promise<boolean>;
4291
- updateSubscription(subscriptionId: string, updates: Partial<Subscription>): Promise<Subscription>;
4247
+ type PWAAssetType = (typeof PWA_ASSET_TYPES)[keyof typeof PWA_ASSET_TYPES];
4248
+ /**
4249
+ * Route discovery sources
4250
+ * @constant
4251
+ */
4252
+ declare const ROUTE_SOURCES: {
4253
+ readonly AUTO: "auto-discovery";
4254
+ readonly MANUAL: "manual";
4255
+ readonly HYBRID: "hybrid";
4256
+ };
4257
+ /**
4258
+ * Route source type derived from ROUTE_SOURCES constant
4259
+ */
4260
+ type RouteSource = (typeof ROUTE_SOURCES)[keyof typeof ROUTE_SOURCES];
4261
+ /**
4262
+ * Generic ID type used throughout the application
4263
+ * @description Currently a string, but typed for future flexibility
4264
+ */
4265
+ type ID = string;
4266
+ /**
4267
+ * Generic timestamp format for dates and times
4268
+ * @description ISO 8601 string format (e.g., "2025-01-15T10:30:00.000Z")
4269
+ */
4270
+ type Timestamp = string;
4271
+ /**
4272
+ * Generic pagination options for fetching paginated data
4273
+ */
4274
+ interface PaginationOptions {
4275
+ /** The page number (1-indexed) */
4276
+ page: number;
4277
+ /** The number of items per page */
4278
+ pageSize: number;
4292
4279
  }
4293
4280
  /**
4294
- * Refresh subscription response
4295
- *
4296
- * @version 0.0.1
4297
- * @since 0.0.1
4298
- * @author AMBROISE PARK Consulting
4281
+ * Generic API response format for consistent error handling
4282
+ * @template T - The type of data in the response
4299
4283
  */
4300
- interface RefreshSubscriptionResponse {
4284
+ interface ApiResponse<T> {
4285
+ /** Indicates whether the operation was successful */
4301
4286
  success: boolean;
4302
- subscription: Subscription;
4287
+ /** The data returned by the operation (if successful) */
4288
+ data?: T;
4289
+ /** Error information (if the operation failed) */
4290
+ error?: {
4291
+ /** A machine-readable error code */
4292
+ code: string;
4293
+ /** A human-readable error message */
4294
+ message: string;
4295
+ };
4303
4296
  }
4304
4297
  /**
4305
- * Process payment success request
4306
- *
4307
- * @version 0.0.1
4308
- * @since 0.0.1
4309
- * @author AMBROISE PARK Consulting
4298
+ * Basic user information that can be shared in various contexts
4310
4299
  */
4311
- interface ProcessPaymentSuccessRequest {
4312
- sessionId: string;
4300
+ interface BasicUserInfo {
4301
+ /** The unique identifier for the user */
4302
+ id: ID;
4303
+ /** The user's display name (if available) */
4304
+ displayName?: string | null;
4305
+ /** The user's email address (if available) */
4306
+ email?: string | null;
4307
+ /** The URL of the user's profile photo (if available) */
4308
+ photoURL?: string | null;
4313
4309
  }
4314
4310
  /**
4315
- * Process payment success response
4316
- *
4317
- * @version 0.0.1
4318
- * @since 0.0.1
4319
- * @author AMBROISE PARK Consulting
4311
+ * Basic document with ID and timestamps
4312
+ * @description All entity documents in the system should extend this interface
4320
4313
  */
4321
- interface ProcessPaymentSuccessResponse {
4322
- success: boolean;
4323
- sessionId: string;
4314
+ interface BaseDocument {
4315
+ /** The unique identifier for the document */
4316
+ id: ID;
4317
+ /** When the document was created */
4318
+ createdAt: Timestamp;
4319
+ /** When the document was last updated */
4320
+ updatedAt: Timestamp;
4321
+ /** The ID of the user who created the document (if available) */
4322
+ createdById?: ID;
4323
+ /** The ID of the user who last updated the document (if available) */
4324
+ updatedById?: ID;
4324
4325
  }
4325
4326
  /**
4326
- * Billing-specific error codes for functions
4327
- *
4328
- * @version 0.0.1
4329
- * @since 0.0.1
4330
- * @author AMBROISE PARK Consulting
4327
+ * Page-level authentication requirements
4328
+ * @description Used in PageMeta and NavigationRoute for route-level auth
4331
4329
  */
4332
- type BillingErrorCode = 'unknown' | 'unauthenticated' | 'invalid_request' | 'stripe_error' | 'subscription_not_found' | 'checkout_session_not_found' | 'webhook_verification_failed' | 'rate_limit_exceeded' | 'insufficient_permissions' | 'invalid_webhook_signature';
4330
+ type PageAuth = boolean | {
4331
+ /** Whether authentication is required */
4332
+ required?: boolean;
4333
+ /** Required user role */
4334
+ role?: UserRole;
4335
+ /** Required subscription tier */
4336
+ tier?: SubscriptionTier;
4337
+ /** Custom validation function */
4338
+ validate?: (role: string, tier: string) => boolean;
4339
+ };
4333
4340
  /**
4334
- * Stripe checkout session creation request
4341
+ * Page metadata interface for route discovery and configuration
4335
4342
  *
4336
- * @version 0.0.1
4337
- * @since 0.0.1
4338
- * @author AMBROISE PARK Consulting
4343
+ * @remarks
4344
+ * **ALL PROPERTIES ARE OPTIONAL** - Framework provides smart defaults:
4345
+ *
4346
+ * - `auth`: false (public) by default - YOU must specify auth requirements explicitly
4347
+ * - `title`: Auto-extracted from filename (ShowcasePage → "Showcase")
4348
+ * - `entity`: Auto-extracted from path (pages/showcase/ → "showcase")
4349
+ * - `action`: Auto-extracted from filename patterns (ListPage → "list", FormPage → "form")
4350
+ * - `route`: Only needed for custom paths or dynamic routes like :id, :slug
4351
+ *
4352
+ * @example Simple page (no meta needed):
4353
+ * ```tsx
4354
+ * export function HomePage() {
4355
+ * return <PageContainer>...</PageContainer>;
4356
+ * }
4357
+ * // Framework provides: auth=false, title from home.title, entity=home
4358
+ * ```
4359
+ *
4360
+ * @example Dynamic route (just define the path you want):
4361
+ * ```tsx
4362
+ * export const meta: PageMeta = {
4363
+ * route: '/blog/:slug' // Creates /blog/:slug
4364
+ * };
4365
+ * // Framework provides: auth=false, title from blog.title, entity=blog
4366
+ * ```
4367
+ *
4368
+ * @example Auth-required (developer must be explicit):
4369
+ * ```tsx
4370
+ * export const meta: PageMeta = {
4371
+ * auth: { required: true } // YOU decide what needs auth
4372
+ * };
4373
+ * ```
4339
4374
  */
4340
- interface StripeCheckoutRequest {
4341
- /** Stripe price ID for the subscription plan */
4342
- priceId: string;
4343
- /** User ID for the subscription */
4344
- userId: string;
4345
- /** User email for the subscription */
4346
- userEmail: string;
4347
- /** URL to redirect to on successful payment */
4348
- successUrl: string;
4349
- /** URL to redirect to on cancelled payment */
4350
- cancelUrl: string;
4351
- /** Optional metadata to attach to the session */
4352
- metadata?: Record<string, string>;
4353
- /** Customer email address */
4354
- customerEmail?: string;
4355
- /** Whether to allow promotion codes */
4356
- allowPromotionCodes?: boolean;
4357
- /** Trial period in days */
4358
- trialPeriodDays?: number;
4359
- /** Collection method for the subscription */
4360
- collectionMethod?: 'charge_automatically' | 'send_invoice';
4361
- /** Payment method types to allow */
4362
- paymentMethodTypes?: string[];
4363
- /** Billing address collection requirement */
4364
- billingAddressCollection?: 'auto' | 'required';
4365
- /** Tax ID collection requirement */
4366
- taxIdCollection?: {
4367
- enabled: boolean;
4375
+ interface PageMeta {
4376
+ /** Authentication requirements for this route */
4377
+ auth?: PageAuth;
4378
+ /** Route configuration - just define the exact path you want */
4379
+ route?: string | {
4380
+ params?: string[];
4368
4381
  };
4369
- /** Checkout mode - payment or subscription */
4370
- mode?: CheckoutMode;
4382
+ /** Page title (optional - framework auto-extracts from filename if not provided) */
4383
+ title?: string;
4384
+ /**
4385
+ * Translation/SEO namespace for this page
4386
+ * @description Used for meta tags and translations
4387
+ */
4388
+ namespace?: string;
4389
+ /**
4390
+ * Icon for navigation (optional - framework provides smart defaults)
4391
+ * @description **ONLY lucide-react JSX components** - extracted as component name string at build time for tree-shaking.
4392
+ *
4393
+ * **RESTRICTIONS:**
4394
+ * - ✅ Only: `<Rocket />`, `<ShoppingCart />`, `<Home />` (lucide-react JSX components)
4395
+ * - ❌ NOT: Emojis (`"🚀"`), strings (`"Rocket"`), or custom ReactNode
4396
+ *
4397
+ * **Why?** This is for build-time extraction and tree-shaking. The component name is extracted and stored as a string.
4398
+ *
4399
+ * **For flexible icons** (emojis, strings, custom components), use the `Icon` component directly in your JSX, not in PageMeta.
4400
+ *
4401
+ * @example
4402
+ * ```tsx
4403
+ * import { Rocket } from 'lucide-react';
4404
+ * export const meta: PageMeta = {
4405
+ * icon: <Rocket /> // ✅ Correct - lucide-react component
4406
+ * };
4407
+ * ```
4408
+ *
4409
+ * @example
4410
+ * ```tsx
4411
+ * // ❌ WRONG - Don't use emojis or strings in PageMeta
4412
+ * export const meta: PageMeta = {
4413
+ * icon: "🚀" // ❌ Not supported in PageMeta
4414
+ * };
4415
+ * ```
4416
+ */
4417
+ icon?: ReactNode;
4418
+ /**
4419
+ * Hide from navigation menu (default: false - shows in navigation)
4420
+ * @description Set to true to exclude this route from navigation menus
4421
+ * @default false
4422
+ * @example
4423
+ * ```tsx
4424
+ * export const meta: PageMeta = {
4425
+ * hideFromMenu: true // Won't appear in HeaderNavigation, Sidebar, etc.
4426
+ * };
4427
+ * ```
4428
+ */
4429
+ hideFromMenu?: boolean;
4371
4430
  }
4372
4431
  /**
4373
- * Stripe checkout session response
4432
+ * Route metadata (discovery-generated)
4433
+ * @description Complete route metadata including auto-discovered fields from RouteDiscovery
4434
+ *
4435
+ * This extends PageMeta with fields that are automatically discovered from file paths:
4436
+ * - `entity`: Auto-extracted from path (pages/showcase/ → "showcase")
4437
+ * - `action`: Auto-extracted from filename patterns (ListPage → "list", FormPage → "form")
4438
+ *
4439
+ * These fields are always present in discovered routes but cannot be set in PageMeta.
4374
4440
  *
4375
4441
  * @version 0.0.1
4376
4442
  * @since 0.0.1
4377
4443
  * @author AMBROISE PARK Consulting
4378
4444
  */
4379
- interface StripeCheckoutResponse {
4380
- /** Stripe session ID */
4381
- sessionId: string;
4382
- /** URL to redirect the user to complete payment */
4383
- sessionUrl: string | null;
4384
- /** Whether the session was created successfully */
4385
- success: boolean;
4386
- /** Error message if creation failed */
4387
- error?: string;
4388
- }
4389
- /**
4390
- * Stripe subscription data structure
4391
- *
4392
- * @version 0.0.1
4393
- * @since 0.0.1
4394
- * @author AMBROISE PARK Consulting
4395
- */
4396
- interface StripeSubscriptionData {
4397
- /** Stripe subscription ID */
4398
- id: string;
4399
- /** Customer ID */
4400
- customer: string;
4401
- /** Subscription status */
4402
- status: 'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
4403
- /** Current period start timestamp */
4404
- current_period_start: number;
4405
- /** Current period end timestamp */
4406
- current_period_end: number;
4407
- /** Whether the subscription will cancel at period end */
4408
- cancel_at_period_end: boolean;
4409
- /** When the subscription was canceled */
4410
- canceled_at?: number;
4411
- /** Trial start timestamp */
4412
- trial_start?: number;
4413
- /** Trial end timestamp */
4414
- trial_end?: number;
4415
- /** When the subscription was created */
4416
- created: number;
4417
- /** When the subscription was last updated */
4418
- updated: number;
4419
- /** Subscription items */
4420
- items: {
4421
- data: Array<{
4422
- id: string;
4423
- price: {
4424
- id: string;
4425
- unit_amount: number;
4426
- currency: string;
4427
- recurring: {
4428
- interval: 'day' | 'week' | 'month' | 'year';
4429
- interval_count: number;
4430
- };
4431
- product: string;
4432
- };
4433
- quantity: number;
4434
- }>;
4435
- };
4436
- /** Default payment method */
4437
- default_payment_method?: string;
4438
- /** Collection method */
4439
- collection_method: 'charge_automatically' | 'send_invoice';
4440
- /** Days until due for invoices */
4441
- days_until_due?: number;
4442
- /** Subscription metadata */
4443
- metadata: Record<string, string>;
4445
+ interface RouteMeta extends PageMeta {
4446
+ /** Entity/domain grouping - auto-discovered from file path (not user-configurable) */
4447
+ entity?: string;
4448
+ /** Action type for route categorization - auto-discovered from filename patterns (not user-configurable) */
4449
+ action?: string | null;
4450
+ /** File path where route was discovered */
4451
+ file?: string;
4444
4452
  }
4445
4453
  /**
4446
- * Stripe payment method data structure
4447
- *
4448
- * @version 0.0.1
4449
- * @since 0.0.1
4450
- * @author AMBROISE PARK Consulting
4454
+ * Navigation route interface
4455
+ * @description Single source of truth for all navigation routes
4451
4456
  */
4452
- interface StripePaymentMethod {
4453
- /** Stripe payment method ID */
4454
- id: string;
4455
- /** Customer ID */
4456
- customer: string;
4457
- /** Payment method type */
4458
- type: 'card' | 'bank_account' | 'us_bank_account' | 'sepa_debit' | 'ideal' | 'sofort' | 'bancontact' | 'p24' | 'giropay' | 'eps' | 'alipay' | 'wechat_pay';
4459
- /** Card details (if type is 'card') */
4460
- card?: {
4461
- brand: 'amex' | 'diners' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa' | 'unknown';
4462
- country: string;
4463
- exp_month: number;
4464
- exp_year: number;
4465
- fingerprint: string;
4466
- funding: 'credit' | 'debit' | 'prepaid' | 'unknown';
4467
- last4: string;
4468
- three_d_secure_usage?: {
4469
- supported: boolean;
4470
- };
4471
- wallet?: {
4472
- type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout';
4473
- dynamic_last4?: string;
4474
- };
4475
- };
4476
- /** Bank account details (if type is 'bank_account') */
4477
- bank_account?: {
4478
- account_holder_type: 'individual' | 'company';
4479
- bank_name: string;
4480
- country: string;
4481
- currency: string;
4482
- fingerprint: string;
4483
- last4: string;
4484
- routing_number: string;
4485
- status: 'new' | 'validated' | 'verified' | 'verification_failed' | 'errored';
4486
- };
4487
- /** Billing details */
4488
- billing_details: {
4489
- address?: {
4490
- city?: string;
4491
- country?: string;
4492
- line1?: string;
4493
- line2?: string;
4494
- postal_code?: string;
4495
- state?: string;
4496
- };
4497
- email?: string;
4498
- name?: string;
4499
- phone?: string;
4500
- };
4501
- /** When the payment method was created */
4502
- created: number;
4503
- /** Whether this is the default payment method */
4504
- is_default?: boolean;
4505
- /** Payment method metadata */
4506
- metadata: Record<string, string>;
4457
+ interface NavigationRoute {
4458
+ /** Route path */
4459
+ path: string;
4460
+ /** Display label for navigation */
4461
+ label: string;
4462
+ /** Optional icon identifier or component */
4463
+ icon?: string | ReactNode;
4464
+ /** Whether route is external */
4465
+ external?: boolean;
4466
+ /** Whether route is disabled */
4467
+ disabled?: boolean;
4468
+ /** Badge content for notifications */
4469
+ badge?: string | number;
4470
+ /** Authentication configuration */
4471
+ auth?: PageAuth;
4472
+ /** Route metadata (includes auto-discovered fields) */
4473
+ meta?: RouteMeta;
4474
+ /** Nested child routes */
4475
+ children?: NavigationRoute[];
4507
4476
  }
4508
4477
  /**
4509
- * Stripe invoice data structure
4510
- *
4511
- * @version 0.0.1
4512
- * @since 0.0.1
4513
- * @author AMBROISE PARK Consulting
4478
+ * Storage options for get/set operations
4514
4479
  */
4515
- interface StripeInvoice {
4516
- /** Stripe invoice ID */
4517
- id: string;
4518
- /** Customer ID */
4519
- customer: string;
4520
- /** Invoice amount */
4521
- amount_due: number;
4522
- /** Invoice amount paid */
4523
- amount_paid: number;
4524
- /** Invoice amount remaining */
4525
- amount_remaining: number;
4526
- /** Currency code */
4527
- currency: string;
4528
- /** Invoice status */
4529
- status: 'draft' | 'open' | 'paid' | 'void' | 'uncollectible';
4530
- /** When the invoice was created */
4531
- created: number;
4532
- /** When the invoice is due */
4533
- due_date?: number;
4534
- /** When the invoice was paid */
4535
- paid_at?: number;
4536
- /** When the invoice was voided */
4537
- voided_at?: number;
4538
- /** Invoice description */
4539
- description?: string;
4540
- /** Invoice line items */
4541
- lines: {
4542
- data: Array<{
4543
- id: string;
4544
- amount: number;
4545
- currency: string;
4546
- description?: string;
4547
- quantity: number;
4548
- unit_amount: number;
4549
- price?: {
4550
- id: string;
4551
- unit_amount: number;
4552
- currency: string;
4553
- recurring?: {
4554
- interval: 'day' | 'week' | 'month' | 'year';
4555
- interval_count: number;
4556
- };
4557
- product: string;
4558
- };
4559
- }>;
4560
- };
4561
- /** Invoice metadata */
4562
- metadata: Record<string, string>;
4563
- /** Subscription ID (if applicable) */
4564
- subscription?: string;
4565
- /** Total amount */
4566
- total: number;
4567
- /** Tax amount */
4568
- tax?: number;
4569
- /** Tax rate applied */
4570
- tax_rate?: number;
4480
+ interface StorageOptions {
4481
+ /**
4482
+ * Whether to encrypt the data
4483
+ * @default false for most data, true for sensitive data
4484
+ */
4485
+ encryption?: boolean;
4486
+ /**
4487
+ * Time in seconds after which the data expires
4488
+ * @description Set to 0 for no expiration
4489
+ * @default 0
4490
+ */
4491
+ expiry?: number;
4492
+ /**
4493
+ * Storage scope for data isolation
4494
+ * @description
4495
+ * - 'user': User-specific data, tied to user ID (requires auth)
4496
+ * - 'global': Application-wide data, not tied to specific user
4497
+ * - 'session': Session-only data, cleared on logout/browser close
4498
+ * @default 'user'
4499
+ */
4500
+ scope?: StorageScope;
4571
4501
  }
4572
4502
  /**
4573
- * Stripe customer data structure
4574
- *
4575
- * @version 0.0.1
4576
- * @since 0.0.1
4577
- * @author AMBROISE PARK Consulting
4503
+ * Storage manager interface
4504
+ * @description Main interface for all storage operations
4578
4505
  */
4579
- interface StripeCustomer {
4580
- /** Stripe customer ID */
4581
- id: string;
4582
- /** Customer email */
4583
- email?: string;
4584
- /** Customer name */
4585
- name?: string;
4586
- /** Customer description */
4587
- description?: string;
4588
- /** Customer phone */
4589
- phone?: string;
4590
- /** Customer address */
4591
- address?: {
4592
- city?: string;
4593
- country?: string;
4594
- line1?: string;
4595
- line2?: string;
4596
- postal_code?: string;
4597
- state?: string;
4598
- };
4599
- /** Customer balance */
4600
- balance: number;
4601
- /** Currency code */
4602
- currency?: string;
4603
- /** When the customer was created */
4604
- created: number;
4605
- /** When the customer was last updated */
4606
- updated: number;
4607
- /** Customer metadata */
4608
- metadata: Record<string, string>;
4609
- /** Default payment method */
4610
- default_source?: string;
4611
- /** Whether the customer is deleted */
4612
- deleted?: boolean;
4613
- /** Customer tax IDs */
4614
- tax_ids?: {
4615
- data: Array<{
4616
- id: string;
4617
- type: 'eu_vat' | 'br_cnpj' | 'br_cpf' | 'gb_vat' | 'nz_gst' | 'au_abn' | 'au_arn' | 'in_gst' | 'no_vat' | 'za_vat' | 'ch_vat' | 'mx_rfc' | 'sg_uen' | 'ru_inn' | 'ru_kpp' | 'ca_bn' | 'hk_br' | 'es_cif' | 'tw_vat' | 'th_vat' | 'jp_cn' | 'jp_rn' | 'li_uid' | 'my_itn' | 'us_ein' | 'kr_brn' | 'ca_gst_hst' | 'ca_qst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'my_sst' | 'sg_gst' | 'ae_trn' | 'cl_tin' | 'sa_vat' | 'id_npwp' | 'za_vat' | 'mx_rfc' | 'sg_uen' | 'ru_inn' | 'ru_kpp' | 'ca_bn' | 'hk_br' | 'es_cif' | 'tw_vat' | 'th_vat' | 'jp_cn' | 'jp_rn' | 'li_uid' | 'my_itn' | 'us_ein' | 'kr_brn' | 'ca_gst_hst' | 'ca_qst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'my_sst' | 'sg_gst' | 'ae_trn' | 'cl_tin' | 'sa_vat' | 'id_npwp';
4618
- value: string;
4619
- }>;
4620
- };
4506
+ interface IStorageManager {
4507
+ /**
4508
+ * Retrieve data from storage
4509
+ * @param key - Storage key
4510
+ * @param options - Storage options
4511
+ * @returns Promise resolving to the stored data or null if not found
4512
+ */
4513
+ get<T>(key: string, options?: StorageOptions): Promise<T | null>;
4514
+ /**
4515
+ * Store data
4516
+ * @param key - Storage key
4517
+ * @param value - Data to store
4518
+ * @param options - Storage options
4519
+ * @returns Promise resolving when data is stored
4520
+ */
4521
+ set<T>(key: string, value: T, options?: StorageOptions): Promise<void>;
4522
+ /**
4523
+ * Remove data from storage
4524
+ * @param key - Storage key
4525
+ * @returns Promise resolving when data is removed
4526
+ */
4527
+ remove(key: string): Promise<void>;
4528
+ /**
4529
+ * Clear all data in the specified scope
4530
+ * @param scope - Scope to clear, or all scopes if not specified
4531
+ * @returns Promise resolving when data is cleared
4532
+ */
4533
+ clear(scope?: StorageScope): Promise<void>;
4534
+ /**
4535
+ * Store sensitive data with encryption
4536
+ * @description Shorthand for set() with encryption=true
4537
+ * @param key - Storage key
4538
+ * @param value - Data to store
4539
+ * @param options - Storage options (encryption will be set to true)
4540
+ * @returns Promise resolving when data is stored
4541
+ */
4542
+ setSecure<T>(key: string, value: T, options?: Omit<StorageOptions, 'encryption'>): Promise<void>;
4543
+ /**
4544
+ * Retrieve sensitive data with decryption
4545
+ * @description Shorthand for get() with encryption=true
4546
+ * @param key - Storage key
4547
+ * @param options - Storage options (encryption will be set to true)
4548
+ * @returns Promise resolving to the decrypted data or null if not found
4549
+ */
4550
+ getSecure<T>(key: string, options?: Omit<StorageOptions, 'encryption'>): Promise<T | null>;
4621
4551
  }
4622
4552
  /**
4623
- * Stripe product data structure
4624
- *
4625
- * @version 0.0.1
4626
- * @since 0.0.1
4627
- * @author AMBROISE PARK Consulting
4553
+ * Storage strategy interface
4554
+ * @description Used by StorageManager to delegate storage operations
4628
4555
  */
4629
- interface StripeProduct {
4630
- /** Stripe product ID */
4631
- id: string;
4632
- /** Product name */
4633
- name: string;
4634
- /** Product description */
4635
- description?: string;
4636
- /** Product images */
4637
- images: string[];
4638
- /** Product metadata */
4639
- metadata: Record<string, string>;
4640
- /** Whether the product is active */
4641
- active: boolean;
4642
- /** When the product was created */
4643
- created: number;
4644
- /** When the product was last updated */
4645
- updated: number;
4646
- /** Product type */
4647
- type: 'service' | 'good';
4648
- /** Product URL */
4649
- url?: string;
4650
- /** Product statement descriptor */
4651
- statement_descriptor?: string;
4652
- /** Product unit label */
4653
- unit_label?: string;
4654
- /** Product tax code */
4655
- tax_code?: string;
4556
+ interface IStorageStrategy {
4557
+ /**
4558
+ * Retrieve data from storage
4559
+ * @param key - Storage key
4560
+ * @param options - Storage options
4561
+ * @returns Promise resolving to the stored data or null if not found
4562
+ */
4563
+ get<T>(key: string, options?: StorageOptions): Promise<T | null>;
4564
+ /**
4565
+ * Store data
4566
+ * @param key - Storage key
4567
+ * @param value - Data to store
4568
+ * @param options - Storage options
4569
+ * @returns Promise resolving when data is stored
4570
+ */
4571
+ set<T>(key: string, value: T, options?: StorageOptions): Promise<void>;
4572
+ /**
4573
+ * Remove data from storage
4574
+ * @param key - Storage key
4575
+ * @returns Promise resolving when data is removed
4576
+ */
4577
+ remove(key: string): Promise<void>;
4578
+ /**
4579
+ * Clear all data in the specified scope
4580
+ * @param scope - Scope to clear, or all scopes if not specified
4581
+ * @returns Promise resolving when data is cleared
4582
+ */
4583
+ clear(scope?: StorageScope): Promise<void>;
4656
4584
  }
4657
4585
  /**
4658
- * Stripe price data structure
4659
- *
4660
- * @version 0.0.1
4661
- * @since 0.0.1
4662
- * @author AMBROISE PARK Consulting
4586
+ * i18n Plugin Configuration
4587
+ * @description Configuration for internationalization system
4663
4588
  */
4664
- interface StripePrice {
4665
- /** Stripe price ID */
4666
- id: string;
4667
- /** Product ID */
4668
- product: string;
4669
- /** Price amount in cents */
4670
- unit_amount: number;
4671
- /** Currency code */
4672
- currency: string;
4673
- /** Price type */
4674
- type: 'one_time' | 'recurring';
4675
- /** Recurring interval (if type is 'recurring') */
4676
- recurring?: {
4677
- interval: 'day' | 'week' | 'month' | 'year';
4678
- interval_count: number;
4679
- trial_period_days?: number;
4680
- usage_type: 'licensed' | 'metered';
4589
+ interface I18nPluginConfig {
4590
+ /** Mapping of language → namespace → loader function */
4591
+ mapping: Record<string, Record<string, () => Promise<any>>>;
4592
+ /** List of available language codes */
4593
+ languages: string[];
4594
+ /** List of eagerly loaded namespace identifiers */
4595
+ eager: string[];
4596
+ /** Fallback language code */
4597
+ fallback: string;
4598
+ /** Preloaded translation content (optional) */
4599
+ content?: Record<string, Record<string, any>>;
4600
+ /** Storage configuration */
4601
+ storage: {
4602
+ /** Storage backend type */
4603
+ type: StorageType;
4604
+ /** Storage key prefix */
4605
+ prefix: string;
4606
+ /** Time-to-live in seconds */
4607
+ ttl: number;
4608
+ /** Whether to encrypt stored data */
4609
+ encryption: boolean;
4610
+ /** Maximum storage size in bytes */
4611
+ maxSize: number;
4681
4612
  };
4682
- /** Whether the price is active */
4683
- active: boolean;
4684
- /** When the price was created */
4685
- created: number;
4686
- /** When the price was last updated */
4687
- updated: number;
4688
- /** Price metadata */
4689
- metadata: Record<string, string>;
4690
- /** Price nickname */
4691
- nickname?: string;
4692
- /** Price tiers (for graduated pricing) */
4693
- tiers?: Array<{
4694
- up_to: number | 'inf';
4695
- unit_amount: number;
4696
- flat_amount?: number;
4697
- }>;
4698
- /** Price tiers mode */
4699
- tiers_mode?: 'graduated' | 'volume';
4700
- /** Price transform quantity */
4701
- transform_quantity?: {
4702
- divide_by: number;
4703
- round: 'up' | 'down';
4613
+ /** Performance configuration */
4614
+ performance: {
4615
+ /** Maximum cache size */
4616
+ cacheSize: number;
4617
+ /** Error cache TTL in seconds */
4618
+ errorCacheTTL: number;
4704
4619
  };
4705
- /** Price lookup key */
4706
- lookup_key?: string;
4707
- }
4708
- /**
4709
- * Checkout options for Stripe checkout session
4710
- *
4711
- * @version 0.0.1
4712
- * @since 0.0.1
4713
- * @author AMBROISE PARK Consulting
4714
- */
4715
- interface CheckoutOptions {
4716
- priceId: string;
4717
- mode: 'payment' | 'subscription';
4718
- successUrl?: string;
4719
- cancelUrl?: string;
4720
- metadata?: Record<string, string>;
4721
- allowPromotionCodes?: boolean;
4620
+ /** Discovery manifest metadata */
4621
+ manifest: {
4622
+ /** Total number of translation files */
4623
+ totalFiles: number;
4624
+ /** Total number of namespaces */
4625
+ totalNamespaces: number;
4626
+ /** Total number of languages */
4627
+ totalLanguages: number;
4628
+ /** Number of eagerly loaded namespaces */
4629
+ eagerNamespaces: number;
4630
+ /** ISO timestamp of generation */
4631
+ generatedAt: string;
4632
+ };
4633
+ /** Whether debug mode is enabled */
4634
+ debug: boolean;
4722
4635
  }
4723
4636
  /**
4724
- * Billing API type - complete interface for useStripeBilling hook
4725
- *
4726
- * @version 0.0.1
4727
- * @since 0.0.1
4728
- * @author AMBROISE PARK Consulting
4637
+ * Routes Plugin Configuration
4638
+ * @description Complete route configuration populated by discovery system
4729
4639
  */
4730
- interface BillingAPI {
4731
- loading: boolean;
4732
- error: string | null;
4733
- checkout: (options: CheckoutOptions) => Promise<StripeCheckoutResponse>;
4734
- cancelSubscription: () => Promise<{
4735
- success: boolean;
4736
- endsAt: string;
4737
- }>;
4738
- changePlan: (newPriceId: string, billingConfigKey: string) => Promise<{
4739
- success: boolean;
4740
- }>;
4741
- refreshStatus: () => Promise<void>;
4742
- openCustomerPortal: (returnUrl?: string) => Promise<void>;
4743
- clearError: () => void;
4744
- isAvailable: boolean;
4640
+ interface RoutesPluginConfig {
4641
+ /**
4642
+ * Array of discovered routes
4643
+ * @description All routes discovered by the route discovery system
4644
+ */
4645
+ mapping: Array<{
4646
+ /**
4647
+ * URL path for the route (platform-agnostic)
4648
+ * @description The URL path that users see in their browser
4649
+ * @example '/showcase/layouts', '/users/:id', '/dashboard'
4650
+ */
4651
+ path: string;
4652
+ /**
4653
+ * Lazy component reference (Vite-specific)
4654
+ * @description React.lazy() component for code splitting
4655
+ * @example lazy(() => import("/src/pages/showcase/LayoutsPage"))
4656
+ */
4657
+ component: any;
4658
+ /**
4659
+ * Absolute file system path (Next.js-specific)
4660
+ * @description The absolute path to the component file
4661
+ * @example '/src/pages/showcase/LayoutsPage.tsx'
4662
+ */
4663
+ importPath: string;
4664
+ /**
4665
+ * Export name for named exports
4666
+ * @example 'HomePage', 'AboutPage'
4667
+ */
4668
+ exportName?: string;
4669
+ /**
4670
+ * Authentication configuration (platform-agnostic)
4671
+ * @description Defines whether the route requires authentication
4672
+ */
4673
+ auth: PageAuth;
4674
+ /**
4675
+ * Route metadata (platform-agnostic)
4676
+ * @description Additional information about the route, including auto-discovered fields
4677
+ */
4678
+ meta: RouteMeta;
4679
+ }>;
4680
+ /**
4681
+ * Discovery metadata and statistics
4682
+ * @description Information about the route discovery process
4683
+ */
4684
+ manifest: {
4685
+ /** Total number of discovered routes */
4686
+ totalRoutes: number;
4687
+ /** Number of routes requiring authentication */
4688
+ authRequired: number;
4689
+ /** Number of public routes */
4690
+ publicRoutes: number;
4691
+ /** Source of routes (auto-discovery vs manual) */
4692
+ source: RouteSource;
4693
+ /** ISO timestamp when routes were generated */
4694
+ generatedAt: string;
4695
+ };
4745
4696
  }
4746
4697
  /**
4747
- * Frontend billing configuration type
4748
- *
4749
- * @version 0.0.1
4750
- * @since 0.0.1
4751
- * @author AMBROISE PARK Consulting
4698
+ * Themes Plugin Configuration
4699
+ * @description Configuration for theme discovery and management
4752
4700
  */
4753
- type StripeFrontConfig = v.InferOutput<typeof StripeFrontConfigSchema>;
4701
+ interface ThemesPluginConfig {
4702
+ /** Mapping of theme names to theme configurations */
4703
+ mapping: Record<string, any>;
4704
+ /** Array of discovered themes */
4705
+ discovered: Array<{
4706
+ /** Theme identifier */
4707
+ name: string;
4708
+ /** Human-readable theme name */
4709
+ displayName: string;
4710
+ /** Whether this is a dark theme */
4711
+ isDark: boolean;
4712
+ /** Theme metadata */
4713
+ meta: {
4714
+ /** Icon identifier */
4715
+ icon: string;
4716
+ /** Theme description */
4717
+ description?: string;
4718
+ /** Theme category */
4719
+ category?: string;
4720
+ /** Theme author */
4721
+ author?: string;
4722
+ /** Additional metadata */
4723
+ [key: string]: any;
4724
+ };
4725
+ /** Source file path */
4726
+ source: string;
4727
+ /** Whether theme is essential (cannot be disabled) */
4728
+ essential: boolean;
4729
+ }>;
4730
+ /** CSS custom property variables */
4731
+ variables: Record<string, string>;
4732
+ /** Utility class mappings */
4733
+ utilities: Record<string, Record<string, string>>;
4734
+ /** Discovery manifest metadata */
4735
+ manifest: {
4736
+ /** Total number of discovered themes */
4737
+ totalThemes: number;
4738
+ /** Total number of CSS variables */
4739
+ totalVariables: number;
4740
+ /** Total number of utility classes */
4741
+ totalUtilities: number;
4742
+ /** ISO timestamp of generation */
4743
+ generatedAt: string;
4744
+ };
4745
+ }
4754
4746
  /**
4755
- * Backend billing configuration type with hooks
4756
- *
4757
- * @version 0.0.1
4758
- * @since 0.0.1
4759
- * @author AMBROISE PARK Consulting
4747
+ * Assets Plugin Configuration
4748
+ * @description Configuration for static asset management
4760
4749
  */
4761
- type StripeBackConfig = {
4762
- [key: string]: {
4763
- type: 'StripePayment' | 'StripeSubscription';
4764
- name: string;
4765
- price: number;
4766
- currency: string;
4767
- priceId: string;
4768
- tier: string;
4769
- duration: string;
4770
- description?: string;
4771
- metadata?: Record<string, string>;
4772
- allowPromotionCodes?: boolean;
4773
- onPurchaseSuccess?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4774
- onPurchaseFailure?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4775
- onSubscriptionCreated?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4776
- onSubscriptionRenewed?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4777
- onSubscriptionCancelled?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4778
- onPaymentFailed?: (userId: string, metadata: Record<string, string>) => Promise<void>;
4750
+ interface AssetsPluginConfig {
4751
+ /** Mapping of asset paths to asset metadata */
4752
+ mapping: Record<string, any>;
4753
+ /** SVG content of logo.svg for inline rendering with CSS variable theming */
4754
+ logoSvgContent?: string | null;
4755
+ /** Discovery manifest metadata */
4756
+ manifest: {
4757
+ /** Total number of discovered assets */
4758
+ totalAssets: number;
4759
+ /** ISO timestamp of generation */
4760
+ generatedAt: string;
4779
4761
  };
4780
- };
4762
+ }
4781
4763
  /**
4782
- * Stripe configuration interface
4783
- *
4784
- * @version 0.0.1
4785
- * @since 0.0.1
4786
- * @author AMBROISE PARK Consulting
4764
+ * PWA Plugin Configuration
4765
+ * @description Configuration for Progressive Web App features
4787
4766
  */
4788
- interface StripeConfig {
4789
- /** Stripe secret key for server-side operations */
4790
- secretKey: string;
4791
- /** Stripe publishable key for client-side operations */
4792
- publishableKey: string;
4793
- /** Stripe webhook secret for webhook verification */
4794
- webhookSecret: string;
4795
- /** Whether to use test mode */
4796
- testMode: boolean;
4797
- /** API version to use */
4798
- apiVersion?: string;
4799
- /** Maximum number of retries for failed requests */
4800
- maxNetworkRetries?: number;
4801
- /** Request timeout in milliseconds */
4802
- timeout?: number;
4803
- /** Additional configuration options */
4804
- options?: {
4805
- /** Whether to enable telemetry */
4806
- telemetry?: boolean;
4807
- /** App information */
4808
- appInfo?: {
4809
- name: string;
4810
- version: string;
4811
- url?: string;
4812
- };
4767
+ interface PWAPluginConfig {
4768
+ /** Array of PWA assets */
4769
+ assets: Array<{
4770
+ /** Type of PWA asset */
4771
+ type: PWAAssetType;
4772
+ /** Asset file path */
4773
+ path: string;
4774
+ /** Asset file size in bytes */
4775
+ size?: number;
4776
+ /** Asset content (for inline assets) */
4777
+ content?: any;
4778
+ /** Asset format (for images) */
4779
+ format?: string;
4780
+ /** Asset purpose (for icons) */
4781
+ purpose?: string;
4782
+ }>;
4783
+ /** PWA manifest configuration */
4784
+ manifest: {
4785
+ /** Application name */
4786
+ name: string;
4787
+ /** Short application name */
4788
+ short_name: string;
4789
+ /** Application description */
4790
+ description: string;
4791
+ /** Start URL */
4792
+ start_url: string;
4793
+ /** Display mode */
4794
+ display: PWADisplayMode;
4795
+ /** Background color */
4796
+ background_color: string;
4797
+ /** Theme color */
4798
+ theme_color: string;
4799
+ /** Array of app icons */
4800
+ icons: Array<{
4801
+ /** Icon source path */
4802
+ src: string;
4803
+ /** Icon sizes (e.g., '192x192') */
4804
+ sizes: string;
4805
+ /** Icon MIME type */
4806
+ type: string;
4807
+ /** Icon purpose (e.g., 'any', 'maskable') */
4808
+ purpose: string;
4809
+ }>;
4810
+ };
4811
+ /** Discovery manifest metadata */
4812
+ manifestInfo: {
4813
+ /** Total number of PWA assets */
4814
+ totalAssets: number;
4815
+ /** Total number of icons */
4816
+ totalIcons: number;
4817
+ /** Whether service worker is present */
4818
+ hasServiceWorker: boolean;
4819
+ /** ISO timestamp of generation */
4820
+ generatedAt: string;
4813
4821
  };
4814
4822
  }
4815
-
4816
4823
  /**
4817
- * @fileoverview DoNotDev Framework - Unified Types & Constants
4818
- * @description Single source of truth for all framework types and constants
4819
- * @package @donotdev/types
4820
- * @version 0.0.1
4821
- * @since 0.0.1
4822
- * @author AMBROISE PARK Consulting
4824
+ * Features Plugin Configuration
4825
+ * @description Configuration for feature discovery and enablement
4823
4826
  *
4824
4827
  * @remarks
4825
- * This file consolidates all framework types and constants to prevent unnecessary splitting
4826
- * and ensure DRY principles. All magic strings are replaced with typed constants.
4827
- */
4828
-
4829
- /**
4830
- * Supported platform identifiers
4831
- * @constant
4832
- */
4833
- declare const PLATFORMS: {
4834
- readonly VITE: "vite";
4835
- readonly NEXTJS: "nextjs";
4836
- readonly UNKNOWN: "unknown";
4837
- };
4838
- /**
4839
- * Platform type derived from PLATFORMS constant
4840
- */
4841
- type Platform = (typeof PLATFORMS)[keyof typeof PLATFORMS];
4842
- /**
4843
- * Supported environment modes
4844
- * @constant
4828
+ * This interface defines the structure for feature discovery data that is populated
4829
+ * at build time and made available at runtime for feature availability checking.
4830
+ *
4831
+ * @example
4832
+ * ```typescript
4833
+ * // Generated by feature discovery system
4834
+ * const featuresConfig: FeaturesPluginConfig = {
4835
+ * available: ['auth', 'billing', 'i18n', 'oauth'],
4836
+ * enabled: ['auth', 'i18n'],
4837
+ * overridden: false
4838
+ * };
4839
+ * ```
4845
4840
  */
4846
- declare const ENVIRONMENTS: {
4847
- readonly DEVELOPMENT: "development";
4848
- readonly PRODUCTION: "production";
4849
- readonly TEST: "test";
4850
- };
4841
+ interface FeaturesPluginConfig {
4842
+ /**
4843
+ * List of all available features discovered in packages/features/
4844
+ * @example ['auth', 'billing', 'i18n', 'oauth']
4845
+ */
4846
+ available: string[];
4847
+ }
4851
4848
  /**
4852
- * Environment mode type derived from ENVIRONMENTS constant
4849
+ * Complete DoNotDev framework configuration structure
4850
+ * @description Single source of truth for all framework configuration
4851
+ *
4852
+ * @remarks
4853
+ * All discovery plugins add their data to this unified config.
4854
+ * Available at runtime via globalThis._DNDEV_CONFIG_ or window._DNDEV_CONFIG_
4853
4855
  */
4854
- type EnvironmentMode = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];
4856
+ interface DndevFrameworkConfig {
4857
+ /** Framework platform (Vite or Next.js) */
4858
+ platform: Platform;
4859
+ /** Current environment mode */
4860
+ mode: EnvironmentMode;
4861
+ /** Framework version */
4862
+ version: string;
4863
+ /** Execution context */
4864
+ context: Context;
4865
+ /** Unix timestamp of config generation */
4866
+ timestamp: number;
4867
+ /** i18n plugin configuration (optional) */
4868
+ i18n?: I18nPluginConfig;
4869
+ /** Routes plugin configuration (optional) */
4870
+ routes?: RoutesPluginConfig;
4871
+ /** Themes plugin configuration (optional) */
4872
+ themes?: ThemesPluginConfig;
4873
+ /** Assets plugin configuration (optional) */
4874
+ assets?: AssetsPluginConfig;
4875
+ /** PWA plugin configuration (optional) */
4876
+ pwa?: PWAPluginConfig;
4877
+ /** Features plugin configuration (optional) */
4878
+ features?: FeaturesPluginConfig;
4879
+ /** Environment variables (VITE_* variables from .env files) */
4880
+ env?: Record<string, string>;
4881
+ }
4882
+ declare global {
4883
+ interface Window {
4884
+ /**
4885
+ * Single source of truth for all DoNotDev framework configuration
4886
+ * @description Set by platform detection and populated by discovery plugins
4887
+ */
4888
+ _DNDEV_CONFIG_?: DndevFrameworkConfig;
4889
+ /**
4890
+ * Global store registry for singleton Zustand stores
4891
+ * @description Ensures single instance across code-split chunks
4892
+ */
4893
+ _DNDEV_STORES_?: Record<string, any>;
4894
+ /** PapaParse CSV parser library (external) */
4895
+ Papa?: {
4896
+ parse: (input: string | File, config?: any) => any;
4897
+ unparse: (data: any[], config?: any) => string;
4898
+ };
4899
+ /** Sentry error tracking library (external) */
4900
+ Sentry?: {
4901
+ captureException: (error: unknown) => void;
4902
+ withScope: (callback: (scope: any) => void) => void;
4903
+ getClient: () => {
4904
+ close: () => Promise<boolean>;
4905
+ } | undefined;
4906
+ };
4907
+ /**
4908
+ * Google APIs (Maps, One Tap, etc.)
4909
+ * @description Unified type for all Google services
4910
+ */
4911
+ google?: {
4912
+ /** Google Maps API */
4913
+ maps?: {
4914
+ places?: {
4915
+ AutocompleteService: new () => any;
4916
+ PlacesService: new (element: HTMLElement) => any;
4917
+ PlacesServiceStatus: {
4918
+ OK: string;
4919
+ };
4920
+ };
4921
+ [key: string]: any;
4922
+ };
4923
+ /** Google Identity Services (One Tap) */
4924
+ accounts?: {
4925
+ id?: {
4926
+ initialize: (config: any) => void;
4927
+ prompt: (callback?: (notification: any) => void) => void;
4928
+ cancel?: () => void;
4929
+ disableAutoSelect?: () => void;
4930
+ };
4931
+ };
4932
+ [key: string]: any;
4933
+ };
4934
+ /** FedCM Identity Credential API */
4935
+ IdentityCredential?: any;
4936
+ }
4937
+ namespace NodeJS {
4938
+ interface ProcessEnv {
4939
+ /** Serialized framework config for Node.js environment */
4940
+ _DNDEV_CONFIG_?: string;
4941
+ }
4942
+ }
4943
+ namespace globalThis {
4944
+ /** Framework configuration (same as window._DNDEV_CONFIG_) */
4945
+ var _DNDEV_CONFIG_: DndevFrameworkConfig | undefined;
4946
+ /** Store registry (same as window._DNDEV_STORES_) */
4947
+ var _DNDEV_STORES_: Record<string, any> | undefined;
4948
+ var __vite_plugin_react_preamble_installed__: boolean | undefined;
4949
+ var __vite_hmr_port: number | undefined;
4950
+ var __NEXT_DATA__: any | undefined;
4951
+ var __REACT_QUERY_CLIENT__: any | undefined;
4952
+ var __REACT_QUERY_PROVIDER__: any | undefined;
4953
+ var __DNDEV_DEBUG: boolean | undefined;
4954
+ var __FIREBASE_DEMO_MODE__: boolean | undefined;
4955
+ var getAvailableThemes: (() => string[]) | undefined;
4956
+ }
4957
+ }
4958
+
4855
4959
  /**
4856
- * Supported execution contexts
4857
- * @constant
4960
+ * @fileoverview Billing Types
4961
+ * @description Type definitions for billing domain. Defines billing provider types, checkout modes, billing adapter interfaces, subscription types, and billing-related interfaces.
4962
+ * Uses unified FeatureStatus enum for feature state management.
4963
+ *
4964
+ * @version 0.0.3
4965
+ * @since 0.0.1
4966
+ * @author AMBROISE PARK Consulting
4858
4967
  */
4859
- declare const CONTEXTS: {
4860
- readonly CLIENT: "client";
4861
- readonly SERVER: "server";
4862
- readonly BUILD: "build";
4863
- };
4864
- /**
4865
- * Context type derived from CONTEXTS constant
4968
+
4969
+ /** Billing provider types - Stripe only
4970
+ *
4971
+ * @version 0.0.1
4972
+ * @since 0.0.1
4973
+ * @author AMBROISE PARK Consulting
4866
4974
  */
4867
- type Context = (typeof CONTEXTS)[keyof typeof CONTEXTS];
4868
- /**
4869
- * Platform detection confidence thresholds
4870
- * @constant
4975
+ type BillingProvider = 'stripe';
4976
+ /** Unified checkout mode type used everywhere
4977
+ *
4978
+ * @version 0.0.1
4979
+ * @since 0.0.1
4980
+ * @author AMBROISE PARK Consulting
4871
4981
  */
4872
- declare const CONFIDENCE_LEVELS: {
4873
- readonly HIGH: 0.95;
4874
- readonly MEDIUM: 0.8;
4875
- readonly LOW: 0.7;
4876
- readonly MINIMUM: 0.3;
4877
- };
4878
- /**
4879
- * Confidence level type derived from CONFIDENCE_LEVELS constant
4982
+ type CheckoutMode = 'payment' | 'subscription';
4983
+ /** Billing adapter interface
4984
+ *
4985
+ * @version 0.0.1
4986
+ * @since 0.0.1
4987
+ * @author AMBROISE PARK Consulting
4880
4988
  */
4881
- type ConfidenceLevel = (typeof CONFIDENCE_LEVELS)[keyof typeof CONFIDENCE_LEVELS];
4882
- /**
4883
- * Supported storage backend types
4884
- * @constant
4989
+ interface BillingAdapter {
4990
+ createCheckoutSession(request: CreateCheckoutSessionRequest): Promise<CreateCheckoutSessionResponse>;
4991
+ getProvider(): Promise<BillingProvider>;
4992
+ isAvailable(): Promise<boolean>;
4993
+ }
4994
+ /** Billing event types
4995
+ *
4996
+ * @version 0.0.1
4997
+ * @since 0.0.1
4998
+ * @author AMBROISE PARK Consulting
4885
4999
  */
4886
- declare const STORAGE_TYPES: {
4887
- readonly LOCAL: "localStorage";
4888
- readonly SESSION: "sessionStorage";
4889
- readonly INDEXED_DB: "indexedDB";
4890
- readonly MEMORY: "memory";
5000
+ type BillingEvent = {
5001
+ type: 'subscription_updated';
5002
+ data: any;
5003
+ } | {
5004
+ type: 'payment_succeeded';
5005
+ data: any;
5006
+ } | {
5007
+ type: 'payment_failed';
5008
+ data: any;
4891
5009
  };
4892
- /**
4893
- * Storage type derived from STORAGE_TYPES constant
5010
+ /** Payment method types
5011
+ *
5012
+ * @version 0.0.1
5013
+ * @since 0.0.1
5014
+ * @author AMBROISE PARK Consulting
4894
5015
  */
4895
- type StorageType = (typeof STORAGE_TYPES)[keyof typeof STORAGE_TYPES];
4896
- /**
4897
- * Storage scope levels for data isolation
4898
- * @constant
5016
+ type PaymentMethodType = 'card' | 'bank_account' | 'paypal' | 'apple_pay' | 'google_pay';
5017
+ /** Payment method interface
5018
+ *
5019
+ * @version 0.0.1
5020
+ * @since 0.0.1
5021
+ * @author AMBROISE PARK Consulting
4899
5022
  */
4900
- declare const STORAGE_SCOPES: {
4901
- readonly USER: "user";
4902
- readonly GLOBAL: "global";
4903
- readonly SESSION: "session";
4904
- };
4905
- /**
4906
- * Storage scope type derived from STORAGE_SCOPES constant
5023
+ interface PaymentMethod {
5024
+ id: string;
5025
+ userId: string;
5026
+ type: PaymentMethodType;
5027
+ isDefault: boolean;
5028
+ last4?: string;
5029
+ brand?: string;
5030
+ expiryMonth?: number;
5031
+ expiryYear?: number;
5032
+ createdAt: string;
5033
+ updatedAt: string;
5034
+ }
5035
+ /** Billing provider configuration interface
5036
+ *
5037
+ * @version 0.0.1
5038
+ * @since 0.0.1
5039
+ * @author AMBROISE PARK Consulting
4907
5040
  */
4908
- type StorageScope = (typeof STORAGE_SCOPES)[keyof typeof STORAGE_SCOPES];
4909
- /**
4910
- * PWA display modes
4911
- * @constant
5041
+ interface BillingProviderConfig {
5042
+ provider: BillingProvider;
5043
+ apiKey?: string;
5044
+ webhookSecret?: string;
5045
+ publishableKey?: string;
5046
+ testMode?: boolean;
5047
+ }
5048
+ /** Invoice interface
5049
+ *
5050
+ * @version 0.0.1
5051
+ * @since 0.0.1
5052
+ * @author AMBROISE PARK Consulting
4912
5053
  */
4913
- declare const PWA_DISPLAY_MODES: {
4914
- readonly STANDALONE: "standalone";
4915
- readonly FULLSCREEN: "fullscreen";
4916
- readonly MINIMAL_UI: "minimal-ui";
4917
- readonly BROWSER: "browser";
4918
- };
5054
+ interface Invoice {
5055
+ id: string;
5056
+ userId: string;
5057
+ amount: number;
5058
+ currency: string;
5059
+ status: 'draft' | 'open' | 'paid' | 'void' | 'uncollectible';
5060
+ createdAt: string;
5061
+ dueDate?: string;
5062
+ paidAt?: string;
5063
+ description?: string;
5064
+ items: InvoiceItem[];
5065
+ }
4919
5066
  /**
4920
- * PWA display mode type derived from PWA_DISPLAY_MODES constant
5067
+ * Invoice item interface
5068
+ *
5069
+ * @version 0.0.1
5070
+ * @since 0.0.1
5071
+ * @author AMBROISE PARK Consulting
4921
5072
  */
4922
- type PWADisplayMode = (typeof PWA_DISPLAY_MODES)[keyof typeof PWA_DISPLAY_MODES];
5073
+ interface InvoiceItem {
5074
+ id: string;
5075
+ description: string;
5076
+ amount: number;
5077
+ quantity: number;
5078
+ unitPrice: number;
5079
+ }
4923
5080
  /**
4924
- * PWA asset types
4925
- * @constant
5081
+ * Subscription interface
5082
+ *
5083
+ * @version 0.0.1
5084
+ * @since 0.0.1
5085
+ * @author AMBROISE PARK Consulting
4926
5086
  */
4927
- declare const PWA_ASSET_TYPES: {
4928
- readonly MANIFEST: "manifest";
4929
- readonly SERVICE_WORKER: "service-worker";
4930
- readonly ICON: "icon";
4931
- };
5087
+ interface Subscription {
5088
+ id: string;
5089
+ userId: string;
5090
+ status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid';
5091
+ currentPeriodStart: string;
5092
+ currentPeriodEnd: string;
5093
+ cancelAtPeriodEnd: boolean;
5094
+ canceledAt?: string;
5095
+ trialStart?: string;
5096
+ trialEnd?: string;
5097
+ createdAt: string;
5098
+ updatedAt: string;
5099
+ }
4932
5100
  /**
4933
- * PWA asset type derived from PWA_ASSET_TYPES constant
5101
+ * Stripe webhook event data
5102
+ *
5103
+ * @version 0.0.1
5104
+ * @since 0.0.1
5105
+ * @author AMBROISE PARK Consulting
4934
5106
  */
4935
- type PWAAssetType = (typeof PWA_ASSET_TYPES)[keyof typeof PWA_ASSET_TYPES];
5107
+ interface StripeWebhookEvent {
5108
+ id: string;
5109
+ type: string;
5110
+ data: {
5111
+ object: any;
5112
+ };
5113
+ created: number;
5114
+ livemode: boolean;
5115
+ pending_webhooks: number;
5116
+ request?: {
5117
+ id: string;
5118
+ idempotency_key?: string;
5119
+ };
5120
+ }
4936
5121
  /**
4937
- * Route discovery sources
4938
- * @constant
5122
+ * Schema for creating checkout session
4939
5123
  */
4940
- declare const ROUTE_SOURCES: {
4941
- readonly AUTO: "auto-discovery";
4942
- readonly MANUAL: "manual";
4943
- readonly HYBRID: "hybrid";
4944
- };
4945
5124
  /**
4946
- * Route source type derived from ROUTE_SOURCES constant
5125
+ * Schema for processing payment success
4947
5126
  */
4948
- type RouteSource = (typeof ROUTE_SOURCES)[keyof typeof ROUTE_SOURCES];
4949
5127
  /**
4950
- * Generic ID type used throughout the application
4951
- * @description Currently a string, but typed for future flexibility
5128
+ * Checkout session creation request
4952
5129
  */
4953
- type ID = string;
4954
5130
  /**
4955
- * Generic timestamp format for dates and times
4956
- * @description ISO 8601 string format (e.g., "2025-01-15T10:30:00.000Z")
5131
+ * Checkout session response
4957
5132
  */
4958
- type Timestamp = string;
4959
5133
  /**
4960
- * Generic pagination options for fetching paginated data
5134
+ * Refresh subscription request
5135
+ *
5136
+ * @version 0.0.1
5137
+ * @since 0.0.1
5138
+ * @author AMBROISE PARK Consulting
4961
5139
  */
4962
- interface PaginationOptions {
4963
- /** The page number (1-indexed) */
4964
- page: number;
4965
- /** The number of items per page */
4966
- pageSize: number;
5140
+ interface RefreshSubscriptionRequest {
5141
+ userId: string;
4967
5142
  }
4968
5143
  /**
4969
- * Generic API response format for consistent error handling
4970
- * @template T - The type of data in the response
5144
+ * Stripe provider interface for billing operations
5145
+ *
5146
+ * @version 0.0.1
5147
+ * @since 0.0.1
5148
+ * @author AMBROISE PARK Consulting
4971
5149
  */
4972
- interface ApiResponse<T> {
4973
- /** Indicates whether the operation was successful */
4974
- success: boolean;
4975
- /** The data returned by the operation (if successful) */
4976
- data?: T;
4977
- /** Error information (if the operation failed) */
4978
- error?: {
4979
- /** A machine-readable error code */
4980
- code: string;
4981
- /** A human-readable error message */
4982
- message: string;
4983
- };
5150
+ interface StripeProvider {
5151
+ createCheckoutSession(params: {
5152
+ priceId: string;
5153
+ userId: string;
5154
+ successUrl: string;
5155
+ cancelUrl: string;
5156
+ metadata?: Record<string, string>;
5157
+ customerEmail?: string;
5158
+ allowPromotionCodes?: boolean;
5159
+ }): Promise<CreateCheckoutSessionResponse>;
5160
+ getSubscription(userId: string): Promise<Subscription | null>;
5161
+ cancelSubscription(subscriptionId: string): Promise<boolean>;
5162
+ updateSubscription(subscriptionId: string, updates: Partial<Subscription>): Promise<Subscription>;
4984
5163
  }
4985
5164
  /**
4986
- * Basic user information that can be shared in various contexts
5165
+ * Refresh subscription response
5166
+ *
5167
+ * @version 0.0.1
5168
+ * @since 0.0.1
5169
+ * @author AMBROISE PARK Consulting
4987
5170
  */
4988
- interface BasicUserInfo {
4989
- /** The unique identifier for the user */
4990
- id: ID;
4991
- /** The user's display name (if available) */
4992
- displayName?: string | null;
4993
- /** The user's email address (if available) */
4994
- email?: string | null;
4995
- /** The URL of the user's profile photo (if available) */
4996
- photoURL?: string | null;
5171
+ interface RefreshSubscriptionResponse {
5172
+ success: boolean;
5173
+ subscription: Subscription;
4997
5174
  }
4998
5175
  /**
4999
- * Basic document with ID and timestamps
5000
- * @description All entity documents in the system should extend this interface
5176
+ * Process payment success request
5177
+ *
5178
+ * @version 0.0.1
5179
+ * @since 0.0.1
5180
+ * @author AMBROISE PARK Consulting
5001
5181
  */
5002
- interface BaseDocument {
5003
- /** The unique identifier for the document */
5004
- id: ID;
5005
- /** When the document was created */
5006
- createdAt: Timestamp;
5007
- /** When the document was last updated */
5008
- updatedAt: Timestamp;
5009
- /** The ID of the user who created the document (if available) */
5010
- createdById?: ID;
5011
- /** The ID of the user who last updated the document (if available) */
5012
- updatedById?: ID;
5182
+ interface ProcessPaymentSuccessRequest {
5183
+ sessionId: string;
5013
5184
  }
5014
5185
  /**
5015
- * Page-level authentication requirements
5016
- * @description Used in PageMeta and NavigationRoute for route-level auth
5186
+ * Process payment success response
5187
+ *
5188
+ * @version 0.0.1
5189
+ * @since 0.0.1
5190
+ * @author AMBROISE PARK Consulting
5017
5191
  */
5018
- type PageAuth = boolean | {
5019
- /** Whether authentication is required */
5020
- required?: boolean;
5021
- /** Required user role */
5022
- role?: UserRole;
5023
- /** Required subscription tier */
5024
- tier?: SubscriptionTier;
5025
- /** Custom validation function */
5026
- validate?: (role: string, tier: string) => boolean;
5027
- };
5192
+ interface ProcessPaymentSuccessResponse {
5193
+ success: boolean;
5194
+ sessionId: string;
5195
+ }
5028
5196
  /**
5029
- * Page metadata interface for route discovery and configuration
5030
- *
5031
- * @remarks
5032
- * **ALL PROPERTIES ARE OPTIONAL** - Framework provides smart defaults:
5033
- *
5034
- * - `auth`: false (public) by default - YOU must specify auth requirements explicitly
5035
- * - `title`: Auto-extracted from filename (ShowcasePage → "Showcase")
5036
- * - `entity`: Auto-extracted from path (pages/showcase/ → "showcase")
5037
- * - `action`: Auto-extracted from filename patterns (ListPage → "list", FormPage → "form")
5038
- * - `route`: Only needed for custom paths or dynamic routes like :id, :slug
5039
- *
5040
- * @example Simple page (no meta needed):
5041
- * ```tsx
5042
- * export function HomePage() {
5043
- * return <PageContainer>...</PageContainer>;
5044
- * }
5045
- * // Framework provides: auth=false, title from home.title, entity=home
5046
- * ```
5197
+ * Billing-specific error codes for functions
5047
5198
  *
5048
- * @example Dynamic route (just define the path you want):
5049
- * ```tsx
5050
- * export const meta: PageMeta = {
5051
- * route: '/blog/:slug' // Creates /blog/:slug
5052
- * };
5053
- * // Framework provides: auth=false, title from blog.title, entity=blog
5054
- * ```
5199
+ * @version 0.0.1
5200
+ * @since 0.0.1
5201
+ * @author AMBROISE PARK Consulting
5202
+ */
5203
+ type BillingErrorCode = 'unknown' | 'unauthenticated' | 'invalid_request' | 'stripe_error' | 'subscription_not_found' | 'checkout_session_not_found' | 'webhook_verification_failed' | 'rate_limit_exceeded' | 'insufficient_permissions' | 'invalid_webhook_signature';
5204
+ /**
5205
+ * Stripe checkout session creation request
5055
5206
  *
5056
- * @example Auth-required (developer must be explicit):
5057
- * ```tsx
5058
- * export const meta: PageMeta = {
5059
- * auth: { required: true } // YOU decide what needs auth
5060
- * };
5061
- * ```
5207
+ * @version 0.0.1
5208
+ * @since 0.0.1
5209
+ * @author AMBROISE PARK Consulting
5062
5210
  */
5063
- interface PageMeta {
5064
- /** Authentication requirements for this route */
5065
- auth?: PageAuth;
5066
- /** Route configuration - just define the exact path you want */
5067
- route?: string | {
5068
- params?: string[];
5069
- };
5070
- /** Page title (optional - framework auto-extracts from filename if not provided) */
5071
- title?: string;
5072
- /**
5073
- * Translation/SEO namespace for this page
5074
- * @description Used for meta tags and translations
5075
- */
5076
- namespace?: string;
5077
- /**
5078
- * Icon for navigation (optional - framework provides smart defaults)
5079
- * @description **ONLY lucide-react JSX components** - extracted as component name string at build time for tree-shaking.
5080
- *
5081
- * **RESTRICTIONS:**
5082
- * - Only: `<Rocket />`, `<ShoppingCart />`, `<Home />` (lucide-react JSX components)
5083
- * - NOT: Emojis (`"🚀"`), strings (`"Rocket"`), or custom ReactNode
5084
- *
5085
- * **Why?** This is for build-time extraction and tree-shaking. The component name is extracted and stored as a string.
5086
- *
5087
- * **For flexible icons** (emojis, strings, custom components), use the `Icon` component directly in your JSX, not in PageMeta.
5088
- *
5089
- * @example
5090
- * ```tsx
5091
- * import { Rocket } from 'lucide-react';
5092
- * export const meta: PageMeta = {
5093
- * icon: <Rocket /> // ✅ Correct - lucide-react component
5094
- * };
5095
- * ```
5096
- *
5097
- * @example
5098
- * ```tsx
5099
- * // ❌ WRONG - Don't use emojis or strings in PageMeta
5100
- * export const meta: PageMeta = {
5101
- * icon: "🚀" // ❌ Not supported in PageMeta
5102
- * };
5103
- * ```
5104
- */
5105
- icon?: ReactNode;
5106
- /**
5107
- * Hide from navigation menu (default: false - shows in navigation)
5108
- * @description Set to true to exclude this route from navigation menus
5109
- * @default false
5110
- * @example
5111
- * ```tsx
5112
- * export const meta: PageMeta = {
5113
- * hideFromMenu: true // Won't appear in HeaderNavigation, Sidebar, etc.
5114
- * };
5115
- * ```
5116
- */
5117
- hideFromMenu?: boolean;
5211
+ interface StripeCheckoutRequest {
5212
+ /** Stripe price ID for the subscription plan */
5213
+ priceId: string;
5214
+ /** User ID for the subscription */
5215
+ userId: string;
5216
+ /** User email for the subscription */
5217
+ userEmail: string;
5218
+ /** URL to redirect to on successful payment */
5219
+ successUrl: string;
5220
+ /** URL to redirect to on cancelled payment */
5221
+ cancelUrl: string;
5222
+ /** Optional metadata to attach to the session */
5223
+ metadata?: Record<string, string>;
5224
+ /** Customer email address */
5225
+ customerEmail?: string;
5226
+ /** Whether to allow promotion codes */
5227
+ allowPromotionCodes?: boolean;
5228
+ /** Trial period in days */
5229
+ trialPeriodDays?: number;
5230
+ /** Collection method for the subscription */
5231
+ collectionMethod?: 'charge_automatically' | 'send_invoice';
5232
+ /** Payment method types to allow */
5233
+ paymentMethodTypes?: string[];
5234
+ /** Billing address collection requirement */
5235
+ billingAddressCollection?: 'auto' | 'required';
5236
+ /** Tax ID collection requirement */
5237
+ taxIdCollection?: {
5238
+ enabled: boolean;
5239
+ };
5240
+ /** Checkout mode - payment or subscription */
5241
+ mode?: CheckoutMode;
5118
5242
  }
5119
5243
  /**
5120
- * Route metadata (discovery-generated)
5121
- * @description Complete route metadata including auto-discovered fields from RouteDiscovery
5122
- *
5123
- * This extends PageMeta with fields that are automatically discovered from file paths:
5124
- * - `entity`: Auto-extracted from path (pages/showcase/ → "showcase")
5125
- * - `action`: Auto-extracted from filename patterns (ListPage → "list", FormPage → "form")
5126
- *
5127
- * These fields are always present in discovered routes but cannot be set in PageMeta.
5244
+ * Stripe checkout session response
5128
5245
  *
5129
5246
  * @version 0.0.1
5130
5247
  * @since 0.0.1
5131
5248
  * @author AMBROISE PARK Consulting
5132
5249
  */
5133
- interface RouteMeta extends PageMeta {
5134
- /** Entity/domain grouping - auto-discovered from file path (not user-configurable) */
5135
- entity?: string;
5136
- /** Action type for route categorization - auto-discovered from filename patterns (not user-configurable) */
5137
- action?: string | null;
5138
- /** File path where route was discovered */
5139
- file?: string;
5140
- }
5141
- /**
5142
- * Navigation route interface
5143
- * @description Single source of truth for all navigation routes
5144
- */
5145
- interface NavigationRoute {
5146
- /** Route path */
5147
- path: string;
5148
- /** Display label for navigation */
5149
- label: string;
5150
- /** Optional icon identifier or component */
5151
- icon?: string | ReactNode;
5152
- /** Whether route is external */
5153
- external?: boolean;
5154
- /** Whether route is disabled */
5155
- disabled?: boolean;
5156
- /** Badge content for notifications */
5157
- badge?: string | number;
5158
- /** Authentication configuration */
5159
- auth?: PageAuth;
5160
- /** Route metadata (includes auto-discovered fields) */
5161
- meta?: RouteMeta;
5162
- /** Nested child routes */
5163
- children?: NavigationRoute[];
5164
- }
5165
- /**
5166
- * Storage options for get/set operations
5167
- */
5168
- interface StorageOptions {
5169
- /**
5170
- * Whether to encrypt the data
5171
- * @default false for most data, true for sensitive data
5172
- */
5173
- encryption?: boolean;
5174
- /**
5175
- * Time in seconds after which the data expires
5176
- * @description Set to 0 for no expiration
5177
- * @default 0
5178
- */
5179
- expiry?: number;
5180
- /**
5181
- * Storage scope for data isolation
5182
- * @description
5183
- * - 'user': User-specific data, tied to user ID (requires auth)
5184
- * - 'global': Application-wide data, not tied to specific user
5185
- * - 'session': Session-only data, cleared on logout/browser close
5186
- * @default 'user'
5187
- */
5188
- scope?: StorageScope;
5250
+ interface StripeCheckoutResponse {
5251
+ /** Stripe session ID */
5252
+ sessionId: string;
5253
+ /** URL to redirect the user to complete payment */
5254
+ sessionUrl: string | null;
5255
+ /** Whether the session was created successfully */
5256
+ success: boolean;
5257
+ /** Error message if creation failed */
5258
+ error?: string;
5189
5259
  }
5190
5260
  /**
5191
- * Storage manager interface
5192
- * @description Main interface for all storage operations
5261
+ * Stripe subscription data structure
5262
+ *
5263
+ * @version 0.0.1
5264
+ * @since 0.0.1
5265
+ * @author AMBROISE PARK Consulting
5193
5266
  */
5194
- interface IStorageManager {
5195
- /**
5196
- * Retrieve data from storage
5197
- * @param key - Storage key
5198
- * @param options - Storage options
5199
- * @returns Promise resolving to the stored data or null if not found
5200
- */
5201
- get<T>(key: string, options?: StorageOptions): Promise<T | null>;
5202
- /**
5203
- * Store data
5204
- * @param key - Storage key
5205
- * @param value - Data to store
5206
- * @param options - Storage options
5207
- * @returns Promise resolving when data is stored
5208
- */
5209
- set<T>(key: string, value: T, options?: StorageOptions): Promise<void>;
5210
- /**
5211
- * Remove data from storage
5212
- * @param key - Storage key
5213
- * @returns Promise resolving when data is removed
5214
- */
5215
- remove(key: string): Promise<void>;
5216
- /**
5217
- * Clear all data in the specified scope
5218
- * @param scope - Scope to clear, or all scopes if not specified
5219
- * @returns Promise resolving when data is cleared
5220
- */
5221
- clear(scope?: StorageScope): Promise<void>;
5222
- /**
5223
- * Store sensitive data with encryption
5224
- * @description Shorthand for set() with encryption=true
5225
- * @param key - Storage key
5226
- * @param value - Data to store
5227
- * @param options - Storage options (encryption will be set to true)
5228
- * @returns Promise resolving when data is stored
5229
- */
5230
- setSecure<T>(key: string, value: T, options?: Omit<StorageOptions, 'encryption'>): Promise<void>;
5231
- /**
5232
- * Retrieve sensitive data with decryption
5233
- * @description Shorthand for get() with encryption=true
5234
- * @param key - Storage key
5235
- * @param options - Storage options (encryption will be set to true)
5236
- * @returns Promise resolving to the decrypted data or null if not found
5237
- */
5238
- getSecure<T>(key: string, options?: Omit<StorageOptions, 'encryption'>): Promise<T | null>;
5267
+ interface StripeSubscriptionData {
5268
+ /** Stripe subscription ID */
5269
+ id: string;
5270
+ /** Customer ID */
5271
+ customer: string;
5272
+ /** Subscription status */
5273
+ status: 'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
5274
+ /** Current period start timestamp */
5275
+ current_period_start: number;
5276
+ /** Current period end timestamp */
5277
+ current_period_end: number;
5278
+ /** Whether the subscription will cancel at period end */
5279
+ cancel_at_period_end: boolean;
5280
+ /** When the subscription was canceled */
5281
+ canceled_at?: number;
5282
+ /** Trial start timestamp */
5283
+ trial_start?: number;
5284
+ /** Trial end timestamp */
5285
+ trial_end?: number;
5286
+ /** When the subscription was created */
5287
+ created: number;
5288
+ /** When the subscription was last updated */
5289
+ updated: number;
5290
+ /** Subscription items */
5291
+ items: {
5292
+ data: Array<{
5293
+ id: string;
5294
+ price: {
5295
+ id: string;
5296
+ unit_amount: number;
5297
+ currency: string;
5298
+ recurring: {
5299
+ interval: 'day' | 'week' | 'month' | 'year';
5300
+ interval_count: number;
5301
+ };
5302
+ product: string;
5303
+ };
5304
+ quantity: number;
5305
+ }>;
5306
+ };
5307
+ /** Default payment method */
5308
+ default_payment_method?: string;
5309
+ /** Collection method */
5310
+ collection_method: 'charge_automatically' | 'send_invoice';
5311
+ /** Days until due for invoices */
5312
+ days_until_due?: number;
5313
+ /** Subscription metadata */
5314
+ metadata: Record<string, string>;
5239
5315
  }
5240
5316
  /**
5241
- * Storage strategy interface
5242
- * @description Used by StorageManager to delegate storage operations
5317
+ * Stripe payment method data structure
5318
+ *
5319
+ * @version 0.0.1
5320
+ * @since 0.0.1
5321
+ * @author AMBROISE PARK Consulting
5243
5322
  */
5244
- interface IStorageStrategy {
5245
- /**
5246
- * Retrieve data from storage
5247
- * @param key - Storage key
5248
- * @param options - Storage options
5249
- * @returns Promise resolving to the stored data or null if not found
5250
- */
5251
- get<T>(key: string, options?: StorageOptions): Promise<T | null>;
5252
- /**
5253
- * Store data
5254
- * @param key - Storage key
5255
- * @param value - Data to store
5256
- * @param options - Storage options
5257
- * @returns Promise resolving when data is stored
5258
- */
5259
- set<T>(key: string, value: T, options?: StorageOptions): Promise<void>;
5260
- /**
5261
- * Remove data from storage
5262
- * @param key - Storage key
5263
- * @returns Promise resolving when data is removed
5264
- */
5265
- remove(key: string): Promise<void>;
5266
- /**
5267
- * Clear all data in the specified scope
5268
- * @param scope - Scope to clear, or all scopes if not specified
5269
- * @returns Promise resolving when data is cleared
5270
- */
5271
- clear(scope?: StorageScope): Promise<void>;
5323
+ interface StripePaymentMethod {
5324
+ /** Stripe payment method ID */
5325
+ id: string;
5326
+ /** Customer ID */
5327
+ customer: string;
5328
+ /** Payment method type */
5329
+ type: 'card' | 'bank_account' | 'us_bank_account' | 'sepa_debit' | 'ideal' | 'sofort' | 'bancontact' | 'p24' | 'giropay' | 'eps' | 'alipay' | 'wechat_pay';
5330
+ /** Card details (if type is 'card') */
5331
+ card?: {
5332
+ brand: 'amex' | 'diners' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa' | 'unknown';
5333
+ country: string;
5334
+ exp_month: number;
5335
+ exp_year: number;
5336
+ fingerprint: string;
5337
+ funding: 'credit' | 'debit' | 'prepaid' | 'unknown';
5338
+ last4: string;
5339
+ three_d_secure_usage?: {
5340
+ supported: boolean;
5341
+ };
5342
+ wallet?: {
5343
+ type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout';
5344
+ dynamic_last4?: string;
5345
+ };
5346
+ };
5347
+ /** Bank account details (if type is 'bank_account') */
5348
+ bank_account?: {
5349
+ account_holder_type: 'individual' | 'company';
5350
+ bank_name: string;
5351
+ country: string;
5352
+ currency: string;
5353
+ fingerprint: string;
5354
+ last4: string;
5355
+ routing_number: string;
5356
+ status: 'new' | 'validated' | 'verified' | 'verification_failed' | 'errored';
5357
+ };
5358
+ /** Billing details */
5359
+ billing_details: {
5360
+ address?: {
5361
+ city?: string;
5362
+ country?: string;
5363
+ line1?: string;
5364
+ line2?: string;
5365
+ postal_code?: string;
5366
+ state?: string;
5367
+ };
5368
+ email?: string;
5369
+ name?: string;
5370
+ phone?: string;
5371
+ };
5372
+ /** When the payment method was created */
5373
+ created: number;
5374
+ /** Whether this is the default payment method */
5375
+ is_default?: boolean;
5376
+ /** Payment method metadata */
5377
+ metadata: Record<string, string>;
5272
5378
  }
5273
5379
  /**
5274
- * i18n Plugin Configuration
5275
- * @description Configuration for internationalization system
5380
+ * Stripe invoice data structure
5381
+ *
5382
+ * @version 0.0.1
5383
+ * @since 0.0.1
5384
+ * @author AMBROISE PARK Consulting
5276
5385
  */
5277
- interface I18nPluginConfig {
5278
- /** Mapping of language → namespace → loader function */
5279
- mapping: Record<string, Record<string, () => Promise<any>>>;
5280
- /** List of available language codes */
5281
- languages: string[];
5282
- /** List of eagerly loaded namespace identifiers */
5283
- eager: string[];
5284
- /** Fallback language code */
5285
- fallback: string;
5286
- /** Preloaded translation content (optional) */
5287
- content?: Record<string, Record<string, any>>;
5288
- /** Storage configuration */
5289
- storage: {
5290
- /** Storage backend type */
5291
- type: StorageType;
5292
- /** Storage key prefix */
5293
- prefix: string;
5294
- /** Time-to-live in seconds */
5295
- ttl: number;
5296
- /** Whether to encrypt stored data */
5297
- encryption: boolean;
5298
- /** Maximum storage size in bytes */
5299
- maxSize: number;
5386
+ interface StripeInvoice {
5387
+ /** Stripe invoice ID */
5388
+ id: string;
5389
+ /** Customer ID */
5390
+ customer: string;
5391
+ /** Invoice amount */
5392
+ amount_due: number;
5393
+ /** Invoice amount paid */
5394
+ amount_paid: number;
5395
+ /** Invoice amount remaining */
5396
+ amount_remaining: number;
5397
+ /** Currency code */
5398
+ currency: string;
5399
+ /** Invoice status */
5400
+ status: 'draft' | 'open' | 'paid' | 'void' | 'uncollectible';
5401
+ /** When the invoice was created */
5402
+ created: number;
5403
+ /** When the invoice is due */
5404
+ due_date?: number;
5405
+ /** When the invoice was paid */
5406
+ paid_at?: number;
5407
+ /** When the invoice was voided */
5408
+ voided_at?: number;
5409
+ /** Invoice description */
5410
+ description?: string;
5411
+ /** Invoice line items */
5412
+ lines: {
5413
+ data: Array<{
5414
+ id: string;
5415
+ amount: number;
5416
+ currency: string;
5417
+ description?: string;
5418
+ quantity: number;
5419
+ unit_amount: number;
5420
+ price?: {
5421
+ id: string;
5422
+ unit_amount: number;
5423
+ currency: string;
5424
+ recurring?: {
5425
+ interval: 'day' | 'week' | 'month' | 'year';
5426
+ interval_count: number;
5427
+ };
5428
+ product: string;
5429
+ };
5430
+ }>;
5300
5431
  };
5301
- /** Performance configuration */
5302
- performance: {
5303
- /** Maximum cache size */
5304
- cacheSize: number;
5305
- /** Error cache TTL in seconds */
5306
- errorCacheTTL: number;
5432
+ /** Invoice metadata */
5433
+ metadata: Record<string, string>;
5434
+ /** Subscription ID (if applicable) */
5435
+ subscription?: string;
5436
+ /** Total amount */
5437
+ total: number;
5438
+ /** Tax amount */
5439
+ tax?: number;
5440
+ /** Tax rate applied */
5441
+ tax_rate?: number;
5442
+ }
5443
+ /**
5444
+ * Stripe customer data structure
5445
+ *
5446
+ * @version 0.0.1
5447
+ * @since 0.0.1
5448
+ * @author AMBROISE PARK Consulting
5449
+ */
5450
+ interface StripeCustomer {
5451
+ /** Stripe customer ID */
5452
+ id: string;
5453
+ /** Customer email */
5454
+ email?: string;
5455
+ /** Customer name */
5456
+ name?: string;
5457
+ /** Customer description */
5458
+ description?: string;
5459
+ /** Customer phone */
5460
+ phone?: string;
5461
+ /** Customer address */
5462
+ address?: {
5463
+ city?: string;
5464
+ country?: string;
5465
+ line1?: string;
5466
+ line2?: string;
5467
+ postal_code?: string;
5468
+ state?: string;
5307
5469
  };
5308
- /** Discovery manifest metadata */
5309
- manifest: {
5310
- /** Total number of translation files */
5311
- totalFiles: number;
5312
- /** Total number of namespaces */
5313
- totalNamespaces: number;
5314
- /** Total number of languages */
5315
- totalLanguages: number;
5316
- /** Number of eagerly loaded namespaces */
5317
- eagerNamespaces: number;
5318
- /** ISO timestamp of generation */
5319
- generatedAt: string;
5470
+ /** Customer balance */
5471
+ balance: number;
5472
+ /** Currency code */
5473
+ currency?: string;
5474
+ /** When the customer was created */
5475
+ created: number;
5476
+ /** When the customer was last updated */
5477
+ updated: number;
5478
+ /** Customer metadata */
5479
+ metadata: Record<string, string>;
5480
+ /** Default payment method */
5481
+ default_source?: string;
5482
+ /** Whether the customer is deleted */
5483
+ deleted?: boolean;
5484
+ /** Customer tax IDs */
5485
+ tax_ids?: {
5486
+ data: Array<{
5487
+ id: string;
5488
+ type: 'eu_vat' | 'br_cnpj' | 'br_cpf' | 'gb_vat' | 'nz_gst' | 'au_abn' | 'au_arn' | 'in_gst' | 'no_vat' | 'za_vat' | 'ch_vat' | 'mx_rfc' | 'sg_uen' | 'ru_inn' | 'ru_kpp' | 'ca_bn' | 'hk_br' | 'es_cif' | 'tw_vat' | 'th_vat' | 'jp_cn' | 'jp_rn' | 'li_uid' | 'my_itn' | 'us_ein' | 'kr_brn' | 'ca_gst_hst' | 'ca_qst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'my_sst' | 'sg_gst' | 'ae_trn' | 'cl_tin' | 'sa_vat' | 'id_npwp' | 'za_vat' | 'mx_rfc' | 'sg_uen' | 'ru_inn' | 'ru_kpp' | 'ca_bn' | 'hk_br' | 'es_cif' | 'tw_vat' | 'th_vat' | 'jp_cn' | 'jp_rn' | 'li_uid' | 'my_itn' | 'us_ein' | 'kr_brn' | 'ca_gst_hst' | 'ca_qst' | 'ca_pst_bc' | 'ca_pst_mb' | 'ca_pst_sk' | 'my_sst' | 'sg_gst' | 'ae_trn' | 'cl_tin' | 'sa_vat' | 'id_npwp';
5489
+ value: string;
5490
+ }>;
5320
5491
  };
5321
- /** Whether debug mode is enabled */
5322
- debug: boolean;
5323
5492
  }
5324
5493
  /**
5325
- * Routes Plugin Configuration
5326
- * @description Complete route configuration populated by discovery system
5494
+ * Stripe product data structure
5495
+ *
5496
+ * @version 0.0.1
5497
+ * @since 0.0.1
5498
+ * @author AMBROISE PARK Consulting
5327
5499
  */
5328
- interface RoutesPluginConfig {
5329
- /**
5330
- * Array of discovered routes
5331
- * @description All routes discovered by the route discovery system
5332
- */
5333
- mapping: Array<{
5334
- /**
5335
- * URL path for the route (platform-agnostic)
5336
- * @description The URL path that users see in their browser
5337
- * @example '/showcase/layouts', '/users/:id', '/dashboard'
5338
- */
5339
- path: string;
5340
- /**
5341
- * Lazy component reference (Vite-specific)
5342
- * @description React.lazy() component for code splitting
5343
- * @example lazy(() => import("/src/pages/showcase/LayoutsPage"))
5344
- */
5345
- component: any;
5346
- /**
5347
- * Absolute file system path (Next.js-specific)
5348
- * @description The absolute path to the component file
5349
- * @example '/src/pages/showcase/LayoutsPage.tsx'
5350
- */
5351
- importPath: string;
5352
- /**
5353
- * Export name for named exports
5354
- * @example 'HomePage', 'AboutPage'
5355
- */
5356
- exportName?: string;
5357
- /**
5358
- * Authentication configuration (platform-agnostic)
5359
- * @description Defines whether the route requires authentication
5360
- */
5361
- auth: PageAuth;
5362
- /**
5363
- * Route metadata (platform-agnostic)
5364
- * @description Additional information about the route, including auto-discovered fields
5365
- */
5366
- meta: RouteMeta;
5367
- }>;
5368
- /**
5369
- * Discovery metadata and statistics
5370
- * @description Information about the route discovery process
5371
- */
5372
- manifest: {
5373
- /** Total number of discovered routes */
5374
- totalRoutes: number;
5375
- /** Number of routes requiring authentication */
5376
- authRequired: number;
5377
- /** Number of public routes */
5378
- publicRoutes: number;
5379
- /** Source of routes (auto-discovery vs manual) */
5380
- source: RouteSource;
5381
- /** ISO timestamp when routes were generated */
5382
- generatedAt: string;
5383
- };
5500
+ interface StripeProduct {
5501
+ /** Stripe product ID */
5502
+ id: string;
5503
+ /** Product name */
5504
+ name: string;
5505
+ /** Product description */
5506
+ description?: string;
5507
+ /** Product images */
5508
+ images: string[];
5509
+ /** Product metadata */
5510
+ metadata: Record<string, string>;
5511
+ /** Whether the product is active */
5512
+ active: boolean;
5513
+ /** When the product was created */
5514
+ created: number;
5515
+ /** When the product was last updated */
5516
+ updated: number;
5517
+ /** Product type */
5518
+ type: 'service' | 'good';
5519
+ /** Product URL */
5520
+ url?: string;
5521
+ /** Product statement descriptor */
5522
+ statement_descriptor?: string;
5523
+ /** Product unit label */
5524
+ unit_label?: string;
5525
+ /** Product tax code */
5526
+ tax_code?: string;
5384
5527
  }
5385
5528
  /**
5386
- * Themes Plugin Configuration
5387
- * @description Configuration for theme discovery and management
5529
+ * Stripe price data structure
5530
+ *
5531
+ * @version 0.0.1
5532
+ * @since 0.0.1
5533
+ * @author AMBROISE PARK Consulting
5388
5534
  */
5389
- interface ThemesPluginConfig {
5390
- /** Mapping of theme names to theme configurations */
5391
- mapping: Record<string, any>;
5392
- /** Array of discovered themes */
5393
- discovered: Array<{
5394
- /** Theme identifier */
5395
- name: string;
5396
- /** Human-readable theme name */
5397
- displayName: string;
5398
- /** Whether this is a dark theme */
5399
- isDark: boolean;
5400
- /** Theme metadata */
5401
- meta: {
5402
- /** Icon identifier */
5403
- icon: string;
5404
- /** Theme description */
5405
- description?: string;
5406
- /** Theme category */
5407
- category?: string;
5408
- /** Theme author */
5409
- author?: string;
5410
- /** Additional metadata */
5411
- [key: string]: any;
5412
- };
5413
- /** Source file path */
5414
- source: string;
5415
- /** Whether theme is essential (cannot be disabled) */
5416
- essential: boolean;
5535
+ interface StripePrice {
5536
+ /** Stripe price ID */
5537
+ id: string;
5538
+ /** Product ID */
5539
+ product: string;
5540
+ /** Price amount in cents */
5541
+ unit_amount: number;
5542
+ /** Currency code */
5543
+ currency: string;
5544
+ /** Price type */
5545
+ type: 'one_time' | 'recurring';
5546
+ /** Recurring interval (if type is 'recurring') */
5547
+ recurring?: {
5548
+ interval: 'day' | 'week' | 'month' | 'year';
5549
+ interval_count: number;
5550
+ trial_period_days?: number;
5551
+ usage_type: 'licensed' | 'metered';
5552
+ };
5553
+ /** Whether the price is active */
5554
+ active: boolean;
5555
+ /** When the price was created */
5556
+ created: number;
5557
+ /** When the price was last updated */
5558
+ updated: number;
5559
+ /** Price metadata */
5560
+ metadata: Record<string, string>;
5561
+ /** Price nickname */
5562
+ nickname?: string;
5563
+ /** Price tiers (for graduated pricing) */
5564
+ tiers?: Array<{
5565
+ up_to: number | 'inf';
5566
+ unit_amount: number;
5567
+ flat_amount?: number;
5417
5568
  }>;
5418
- /** CSS custom property variables */
5419
- variables: Record<string, string>;
5420
- /** Utility class mappings */
5421
- utilities: Record<string, Record<string, string>>;
5422
- /** Discovery manifest metadata */
5423
- manifest: {
5424
- /** Total number of discovered themes */
5425
- totalThemes: number;
5426
- /** Total number of CSS variables */
5427
- totalVariables: number;
5428
- /** Total number of utility classes */
5429
- totalUtilities: number;
5430
- /** ISO timestamp of generation */
5431
- generatedAt: string;
5569
+ /** Price tiers mode */
5570
+ tiers_mode?: 'graduated' | 'volume';
5571
+ /** Price transform quantity */
5572
+ transform_quantity?: {
5573
+ divide_by: number;
5574
+ round: 'up' | 'down';
5432
5575
  };
5576
+ /** Price lookup key */
5577
+ lookup_key?: string;
5433
5578
  }
5434
5579
  /**
5435
- * Assets Plugin Configuration
5436
- * @description Configuration for static asset management
5580
+ * Checkout options for Stripe checkout session
5581
+ *
5582
+ * @version 0.0.1
5583
+ * @since 0.0.1
5584
+ * @author AMBROISE PARK Consulting
5437
5585
  */
5438
- interface AssetsPluginConfig {
5439
- /** Mapping of asset paths to asset metadata */
5440
- mapping: Record<string, any>;
5441
- /** SVG content of logo.svg for inline rendering with CSS variable theming */
5442
- logoSvgContent?: string | null;
5443
- /** Discovery manifest metadata */
5444
- manifest: {
5445
- /** Total number of discovered assets */
5446
- totalAssets: number;
5447
- /** ISO timestamp of generation */
5448
- generatedAt: string;
5449
- };
5586
+ interface CheckoutOptions {
5587
+ priceId: string;
5588
+ mode: 'payment' | 'subscription';
5589
+ successUrl?: string;
5590
+ cancelUrl?: string;
5591
+ metadata?: Record<string, string>;
5592
+ allowPromotionCodes?: boolean;
5450
5593
  }
5451
5594
  /**
5452
- * PWA Plugin Configuration
5453
- * @description Configuration for Progressive Web App features
5595
+ * Billing API type - complete interface for useStripeBilling hook
5596
+ *
5597
+ * @version 0.0.3
5598
+ * @since 0.0.1
5599
+ * @author AMBROISE PARK Consulting
5454
5600
  */
5455
- interface PWAPluginConfig {
5456
- /** Array of PWA assets */
5457
- assets: Array<{
5458
- /** Type of PWA asset */
5459
- type: PWAAssetType;
5460
- /** Asset file path */
5461
- path: string;
5462
- /** Asset file size in bytes */
5463
- size?: number;
5464
- /** Asset content (for inline assets) */
5465
- content?: any;
5466
- /** Asset format (for images) */
5467
- format?: string;
5468
- /** Asset purpose (for icons) */
5469
- purpose?: string;
5601
+ interface BillingAPI {
5602
+ /**
5603
+ * Unified feature status - single source of truth for billing state.
5604
+ * Replaces deprecated `loading` boolean flag.
5605
+ * - `initializing`: Billing is loading/initializing
5606
+ * - `ready`: Billing fully operational
5607
+ * - `degraded`: Billing unavailable (feature not installed/consent not given)
5608
+ * - `error`: Billing encountered error
5609
+ */
5610
+ status: FeatureStatus;
5611
+ error: string | null;
5612
+ checkout: (options: CheckoutOptions) => Promise<StripeCheckoutResponse>;
5613
+ cancelSubscription: () => Promise<{
5614
+ success: boolean;
5615
+ endsAt: string;
5470
5616
  }>;
5471
- /** PWA manifest configuration */
5472
- manifest: {
5473
- /** Application name */
5474
- name: string;
5475
- /** Short application name */
5476
- short_name: string;
5477
- /** Application description */
5478
- description: string;
5479
- /** Start URL */
5480
- start_url: string;
5481
- /** Display mode */
5482
- display: PWADisplayMode;
5483
- /** Background color */
5484
- background_color: string;
5485
- /** Theme color */
5486
- theme_color: string;
5487
- /** Array of app icons */
5488
- icons: Array<{
5489
- /** Icon source path */
5490
- src: string;
5491
- /** Icon sizes (e.g., '192x192') */
5492
- sizes: string;
5493
- /** Icon MIME type */
5494
- type: string;
5495
- /** Icon purpose (e.g., 'any', 'maskable') */
5496
- purpose: string;
5497
- }>;
5498
- };
5499
- /** Discovery manifest metadata */
5500
- manifestInfo: {
5501
- /** Total number of PWA assets */
5502
- totalAssets: number;
5503
- /** Total number of icons */
5504
- totalIcons: number;
5505
- /** Whether service worker is present */
5506
- hasServiceWorker: boolean;
5507
- /** ISO timestamp of generation */
5508
- generatedAt: string;
5509
- };
5617
+ changePlan: (newPriceId: string, billingConfigKey: string) => Promise<{
5618
+ success: boolean;
5619
+ }>;
5620
+ refreshStatus: () => Promise<void>;
5621
+ openCustomerPortal: (returnUrl?: string) => Promise<void>;
5622
+ clearError: () => void;
5623
+ isAvailable: boolean;
5510
5624
  }
5511
5625
  /**
5512
- * Features Plugin Configuration
5513
- * @description Configuration for feature discovery and enablement
5626
+ * Frontend billing configuration type
5514
5627
  *
5515
- * @remarks
5516
- * This interface defines the structure for feature discovery data that is populated
5517
- * at build time and made available at runtime for feature availability checking.
5628
+ * @version 0.0.1
5629
+ * @since 0.0.1
5630
+ * @author AMBROISE PARK Consulting
5631
+ */
5632
+ type StripeFrontConfig = v.InferOutput<typeof StripeFrontConfigSchema>;
5633
+ /**
5634
+ * Backend billing configuration type with hooks
5518
5635
  *
5519
- * @example
5520
- * ```typescript
5521
- * // Generated by feature discovery system
5522
- * const featuresConfig: FeaturesPluginConfig = {
5523
- * available: ['auth', 'billing', 'i18n', 'oauth'],
5524
- * enabled: ['auth', 'i18n'],
5525
- * overridden: false
5526
- * };
5527
- * ```
5636
+ * @version 0.0.1
5637
+ * @since 0.0.1
5638
+ * @author AMBROISE PARK Consulting
5528
5639
  */
5529
- interface FeaturesPluginConfig {
5530
- /**
5531
- * List of all available features discovered in packages/features/
5532
- * @example ['auth', 'billing', 'i18n', 'oauth']
5533
- */
5534
- available: string[];
5535
- }
5640
+ type StripeBackConfig = {
5641
+ [key: string]: {
5642
+ type: 'StripePayment' | 'StripeSubscription';
5643
+ name: string;
5644
+ price: number;
5645
+ currency: string;
5646
+ priceId: string;
5647
+ tier: string;
5648
+ duration: string;
5649
+ description?: string;
5650
+ metadata?: Record<string, string>;
5651
+ allowPromotionCodes?: boolean;
5652
+ onPurchaseSuccess?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5653
+ onPurchaseFailure?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5654
+ onSubscriptionCreated?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5655
+ onSubscriptionRenewed?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5656
+ onSubscriptionCancelled?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5657
+ onPaymentFailed?: (userId: string, metadata: Record<string, string>) => Promise<void>;
5658
+ };
5659
+ };
5536
5660
  /**
5537
- * Complete DoNotDev framework configuration structure
5538
- * @description Single source of truth for all framework configuration
5661
+ * Stripe configuration interface
5539
5662
  *
5540
- * @remarks
5541
- * All discovery plugins add their data to this unified config.
5542
- * Available at runtime via globalThis._DNDEV_CONFIG_ or window._DNDEV_CONFIG_
5663
+ * @version 0.0.1
5664
+ * @since 0.0.1
5665
+ * @author AMBROISE PARK Consulting
5543
5666
  */
5544
- interface DndevFrameworkConfig {
5545
- /** Framework platform (Vite or Next.js) */
5546
- platform: Platform;
5547
- /** Current environment mode */
5548
- mode: EnvironmentMode;
5549
- /** Framework version */
5550
- version: string;
5551
- /** Execution context */
5552
- context: Context;
5553
- /** Unix timestamp of config generation */
5554
- timestamp: number;
5555
- /** i18n plugin configuration (optional) */
5556
- i18n?: I18nPluginConfig;
5557
- /** Routes plugin configuration (optional) */
5558
- routes?: RoutesPluginConfig;
5559
- /** Themes plugin configuration (optional) */
5560
- themes?: ThemesPluginConfig;
5561
- /** Assets plugin configuration (optional) */
5562
- assets?: AssetsPluginConfig;
5563
- /** PWA plugin configuration (optional) */
5564
- pwa?: PWAPluginConfig;
5565
- /** Features plugin configuration (optional) */
5566
- features?: FeaturesPluginConfig;
5567
- /** Environment variables (VITE_* variables from .env files) */
5568
- env?: Record<string, string>;
5569
- }
5570
- declare global {
5571
- interface Window {
5572
- /**
5573
- * Single source of truth for all DoNotDev framework configuration
5574
- * @description Set by platform detection and populated by discovery plugins
5575
- */
5576
- _DNDEV_CONFIG_?: DndevFrameworkConfig;
5577
- /**
5578
- * Global store registry for singleton Zustand stores
5579
- * @description Ensures single instance across code-split chunks
5580
- */
5581
- _DNDEV_STORES_?: Record<string, any>;
5582
- /** PapaParse CSV parser library (external) */
5583
- Papa?: {
5584
- parse: (input: string | File, config?: any) => any;
5585
- unparse: (data: any[], config?: any) => string;
5586
- };
5587
- /** Sentry error tracking library (external) */
5588
- Sentry?: {
5589
- captureException: (error: unknown) => void;
5590
- withScope: (callback: (scope: any) => void) => void;
5591
- getClient: () => {
5592
- close: () => Promise<boolean>;
5593
- } | undefined;
5594
- };
5595
- }
5596
- namespace NodeJS {
5597
- interface ProcessEnv {
5598
- /** Serialized framework config for Node.js environment */
5599
- _DNDEV_CONFIG_?: string;
5600
- }
5601
- }
5602
- namespace globalThis {
5603
- /** Framework configuration (same as window._DNDEV_CONFIG_) */
5604
- var _DNDEV_CONFIG_: DndevFrameworkConfig | undefined;
5605
- /** Store registry (same as window._DNDEV_STORES_) */
5606
- var _DNDEV_STORES_: Record<string, any> | undefined;
5607
- var __vite_plugin_react_preamble_installed__: boolean | undefined;
5608
- var __vite_hmr_port: number | undefined;
5609
- var __NEXT_DATA__: any | undefined;
5610
- var __REACT_QUERY_CLIENT__: any | undefined;
5611
- var __REACT_QUERY_PROVIDER__: any | undefined;
5612
- var __DNDEV_DEBUG: boolean | undefined;
5613
- var __FIREBASE_DEMO_MODE__: boolean | undefined;
5614
- var getAvailableThemes: (() => string[]) | undefined;
5615
- }
5667
+ interface StripeConfig {
5668
+ /** Stripe secret key for server-side operations */
5669
+ secretKey: string;
5670
+ /** Stripe publishable key for client-side operations */
5671
+ publishableKey: string;
5672
+ /** Stripe webhook secret for webhook verification */
5673
+ webhookSecret: string;
5674
+ /** Whether to use test mode */
5675
+ testMode: boolean;
5676
+ /** API version to use */
5677
+ apiVersion?: string;
5678
+ /** Maximum number of retries for failed requests */
5679
+ maxNetworkRetries?: number;
5680
+ /** Request timeout in milliseconds */
5681
+ timeout?: number;
5682
+ /** Additional configuration options */
5683
+ options?: {
5684
+ /** Whether to enable telemetry */
5685
+ telemetry?: boolean;
5686
+ /** App information */
5687
+ appInfo?: {
5688
+ name: string;
5689
+ version: string;
5690
+ url?: string;
5691
+ };
5692
+ };
5616
5693
  }
5617
5694
 
5618
5695
  /**
5619
5696
  * @fileoverview Authentication Types
5620
5697
  * @description Type definitions for authentication domain. Defines authentication partner types, user types, session types, and authentication-related interfaces.
5698
+ * Uses unified FeatureStatus enum for feature state management.
5621
5699
  *
5622
- * @version 0.0.1
5700
+ * @version 0.0.3
5623
5701
  * @since 0.0.1
5624
5702
  * @author AMBROISE PARK Consulting
5625
5703
  */
@@ -6045,24 +6123,24 @@ interface AuthState {
6045
6123
  };
6046
6124
  authService: any;
6047
6125
  /**
6048
- * Whether the auth service is initialized and methods can be called.
6049
- * Maps to `BaseStoreState.isReady` in the standard store pattern.
6126
+ * Unified feature status - single source of truth for auth state.
6127
+ * Replaces deprecated boolean flags (initialized, authStateChecked).
6050
6128
  *
6051
- * @see BaseStoreState.isReady
6052
- */
6053
- initialized: boolean;
6054
- /**
6055
- * Whether the first onAuthStateChanged callback has fired (user data resolved).
6056
- * Maps to `BaseStoreState.isDataResolved` in the standard store pattern.
6129
+ * **Lifecycle timeline:**
6130
+ * 1. Store created → `status: 'initializing'` (show loader)
6131
+ * 2. Auth service init + first callback → `status: 'ready'` (normal operation)
6132
+ * 3. If feature disabled/unavailable → `status: 'degraded'` (protected routes redirect with error)
6133
+ * 4. If init fails `status: 'error'` (protected routes redirect with error)
6057
6134
  *
6058
- * Timeline:
6059
- * 1. Store createdinitialized: false, authStateChecked: false
6060
- * 2. Auth service initinitialized: true, authStateChecked: false
6061
- * 3. First callback initialized: true, authStateChecked: true
6135
+ * **Guard behavior:**
6136
+ * - `degraded` + protected route redirect to auth route with `?error=auth_unavailable`
6137
+ * - `error` + protected route redirect to auth route with `?error=auth_error`
6138
+ * - `initializing`show loader, don't redirect
6139
+ * - `ready` → perform normal auth checks
6062
6140
  *
6063
- * @see BaseStoreState.isDataResolved
6141
+ * @see FEATURE_STATUS for possible values
6064
6142
  */
6065
- authStateChecked: boolean;
6143
+ status: FeatureStatus;
6066
6144
  }
6067
6145
  /**
6068
6146
  * Authentication actions interface
@@ -6080,10 +6158,8 @@ interface AuthActions {
6080
6158
  setAuthLoading: (loading: boolean) => void;
6081
6159
  setAuthError: (error: AuthError) => void;
6082
6160
  clearAuthError: () => void;
6083
- /** Set initialized state. @see BaseStoreActions.setReady */
6084
- setInitialized: (initialized: boolean) => void;
6085
- /** Set auth state checked. @see BaseStoreActions.setDataResolved */
6086
- setAuthStateChecked: (checked: boolean) => void;
6161
+ /** Set unified status - single source of truth */
6162
+ setStatus: (status: FeatureStatus) => void;
6087
6163
  getCustomClaim: (claim: string) => any;
6088
6164
  getCustomClaims: () => Record<string, any>;
6089
6165
  emailVerification: {
@@ -6341,10 +6417,11 @@ interface AuthAPI {
6341
6417
  partnerId: AuthPartnerId;
6342
6418
  error: string;
6343
6419
  } | null;
6344
- /** Auth service initialized. @see BaseStoreState.isReady */
6345
- initialized: boolean;
6346
- /** First onAuthStateChanged fired. @see BaseStoreState.isDataResolved */
6347
- authStateChecked: boolean;
6420
+ /**
6421
+ * Unified feature status - single source of truth for auth state.
6422
+ * Replaces deprecated boolean flags. See AuthState.status for detailed lifecycle.
6423
+ */
6424
+ status: FeatureStatus;
6348
6425
  getPartnerState: (partnerId: AuthPartnerId) => string;
6349
6426
  setPartnerState: (partnerId: AuthPartnerId, state: string, error?: string) => void;
6350
6427
  hasRole: (role: string) => Promise<boolean>;
@@ -6375,9 +6452,48 @@ interface AuthAPI {
6375
6452
  isAuthenticated: boolean;
6376
6453
  userRole: string;
6377
6454
  userTier: string;
6378
- canAccess: (config: PageAuth | false) => boolean;
6455
+ /**
6456
+ * Capability-based access control object.
6457
+ * Usage: `const can = useAuth('can'); if (can.edit('licenses')) { ... }`
6458
+ */
6459
+ can: CanAPI;
6379
6460
  isAvailable: boolean;
6380
6461
  }
6462
+ /**
6463
+ * Capability-based access control API
6464
+ *
6465
+ * Provides granular permission checks based on resources and custom capabilities.
6466
+ * Permissions are derived from userProfile.permissions array (format: "resource:action")
6467
+ * and user role (admin bypasses all checks).
6468
+ *
6469
+ * @example
6470
+ * ```typescript
6471
+ * const can = useAuth('can');
6472
+ * if (can.view('dashboard')) { ... }
6473
+ * if (can.edit('licenses')) { ... }
6474
+ * if (can.perform('approve-budget', { amount: 5000 })) { ... }
6475
+ * ```
6476
+ *
6477
+ * @version 0.0.1
6478
+ * @since 0.0.3
6479
+ * @author AMBROISE PARK Consulting
6480
+ */
6481
+ interface CanAPI {
6482
+ /** Check if user can navigate to a route (replaces canAccess) */
6483
+ navigate: (config: PageAuth | false) => boolean;
6484
+ /** Check if user can view a resource */
6485
+ view: (resource: string) => boolean;
6486
+ /** Check if user can edit a resource */
6487
+ edit: (resource: string) => boolean;
6488
+ /** Check if user can delete a resource */
6489
+ delete: (resource: string) => boolean;
6490
+ /** Check if user can create a resource */
6491
+ create: (resource: string) => boolean;
6492
+ /** Check custom capability with optional context */
6493
+ perform: (action: string, context?: Record<string, any>) => boolean;
6494
+ /** Check if user has specific permission string */
6495
+ has: (permission: string) => boolean;
6496
+ }
6381
6497
 
6382
6498
  /**
6383
6499
  * @fileoverview CRUD Constants
@@ -6403,7 +6519,7 @@ declare const VISIBILITY: {
6403
6519
  * @since 0.0.1
6404
6520
  * @author AMBROISE PARK Consulting
6405
6521
  */
6406
- declare const FIELD_TYPES: readonly ["array", "avatar", "badge", "boolean", "checkbox", "color", "date", "datetime-local", "email", "file", "geopoint", "hidden", "image", "map", "month", "multiselect", "number", "password", "radio", "reference", "range", "reset", "select", "submit", "tel", "text", "textarea", "time", "timestamp", "url", "week"];
6522
+ declare const FIELD_TYPES: readonly ["address", "array", "avatar", "badge", "boolean", "checkbox", "color", "date", "datetime-local", "email", "file", "geopoint", "hidden", "image", "map", "month", "multiselect", "number", "password", "radio", "reference", "range", "reset", "select", "submit", "tel", "text", "textarea", "time", "timestamp", "url", "week"];
6407
6523
 
6408
6524
  /**
6409
6525
  * @fileoverview Schema-Related Type Definitions
@@ -6449,6 +6565,12 @@ type FieldType = (typeof FIELD_TYPES)[number];
6449
6565
  * @author AMBROISE PARK Consulting
6450
6566
  */
6451
6567
  type FieldTypeToValue = {
6568
+ address: {
6569
+ formatted_address: string;
6570
+ latitude: number;
6571
+ longitude: number;
6572
+ [key: string]: any;
6573
+ };
6452
6574
  array: any[];
6453
6575
  avatar: string;
6454
6576
  badge: string;
@@ -6949,21 +7071,31 @@ interface ListEntitiesResponse {
6949
7071
  /**
6950
7072
  * @fileoverview CRUD Types
6951
7073
  * @description Type definitions for CRUD domain. Defines entity types, field types, and CRUD-related interfaces.
7074
+ * Uses unified FeatureStatus enum for feature state management.
6952
7075
  *
6953
- * @version 0.0.1
7076
+ * @version 0.0.3
6954
7077
  * @since 0.0.1
6955
7078
  * @author AMBROISE PARK Consulting
6956
7079
  */
7080
+
6957
7081
  /**
6958
7082
  * CRUD API type - complete interface for useCrud hook
6959
7083
  *
6960
- * @version 0.0.1
7084
+ * @version 0.0.3
6961
7085
  * @since 0.0.1
6962
7086
  * @author AMBROISE PARK Consulting
6963
7087
  */
6964
7088
  interface CrudAPI<T = unknown> {
7089
+ /**
7090
+ * Unified feature status - single source of truth for CRUD state.
7091
+ * Replaces deprecated `loading` boolean flag.
7092
+ * - `initializing`: CRUD is loading/initializing
7093
+ * - `ready`: CRUD fully operational
7094
+ * - `degraded`: CRUD unavailable (feature not installed/consent not given)
7095
+ * - `error`: CRUD encountered error
7096
+ */
7097
+ status: FeatureStatus;
6965
7098
  data: T | null;
6966
- loading: boolean;
6967
7099
  error: Error | null;
6968
7100
  get: (id: string) => Promise<T | null>;
6969
7101
  set: (id: string, data: T) => Promise<void>;
@@ -8721,6 +8853,14 @@ interface UIFieldOptions<T extends FieldType = FieldType> {
8721
8853
  defaultCountry?: string;
8722
8854
  /** Whether to show country flags */
8723
8855
  showFlags?: boolean;
8856
+ } : T extends 'address' ? {
8857
+ /**
8858
+ * Whether to enable Google Maps autocomplete (default: false)
8859
+ * Requires env var: VITE_GOOGLE_MAPS_API_KEY (Vite) or NEXT_PUBLIC_GOOGLE_MAPS_API_KEY (Next.js)
8860
+ */
8861
+ enableGoogleMaps?: boolean;
8862
+ /** Whether to extract district code for Paris addresses */
8863
+ extractDistrictCode?: boolean;
8724
8864
  } : never;
8725
8865
  }
8726
8866
  /**
@@ -9654,25 +9794,6 @@ interface AppConfig {
9654
9794
  preset?: string;
9655
9795
  /** Feature flags */
9656
9796
  features?: FeaturesConfig;
9657
- /** Observability configuration for monitoring and debugging */
9658
- observability?: ObservabilityConfig;
9659
- }
9660
- /**
9661
- * Observability configuration for monitoring and debugging
9662
- *
9663
- * @version 0.0.2
9664
- * @since 0.0.1
9665
- * @author AMBROISE PARK Consulting
9666
- */
9667
- interface ObservabilityConfig {
9668
- /** Enable store initialization metrics collection */
9669
- metrics?: boolean;
9670
- /** Enable health check endpoints */
9671
- healthChecks?: boolean;
9672
- /** Enable performance monitoring */
9673
- performance?: boolean;
9674
- /** Enable enhanced debugging information */
9675
- debugging?: boolean;
9676
9797
  }
9677
9798
  /**
9678
9799
  * Custom store configuration for app-specific stores
@@ -9681,7 +9802,6 @@ interface ObservabilityConfig {
9681
9802
  * store initialization system. Custom stores benefit from:
9682
9803
  * - Shell loader integration (critical stores block render)
9683
9804
  * - Retry logic and error handling
9684
- * - Observability and monitoring
9685
9805
  * - Unified initialization flow
9686
9806
  *
9687
9807
  * @example
@@ -9798,7 +9918,7 @@ interface AppProvidersProps {
9798
9918
  * Custom store configurations
9799
9919
  *
9800
9920
  * Register Zustand stores to benefit from shell loader, retry logic,
9801
- * error handling, and observability. Critical stores block render.
9921
+ * error handling. Critical stores block render.
9802
9922
  *
9803
9923
  * @example
9804
9924
  * ```typescript
@@ -10457,8 +10577,9 @@ declare const getConnectionsSchema: v.ObjectSchema<{
10457
10577
  /**
10458
10578
  * @fileoverview OAuth Types
10459
10579
  * @description Type definitions for OAuth domain. Defines base credentials, user profiles, OAuth partner types, and OAuth-related interfaces.
10580
+ * Uses unified FeatureStatus enum for feature state management.
10460
10581
  *
10461
- * @version 0.0.1
10582
+ * @version 0.0.3
10462
10583
  * @since 0.0.1
10463
10584
  * @author AMBROISE PARK Consulting
10464
10585
  */
@@ -10780,12 +10901,20 @@ type GitHubPermission = v.InferOutput<typeof githubPermissionSchema>;
10780
10901
  /**
10781
10902
  * OAuth API type - complete interface for useOAuth hook
10782
10903
  *
10783
- * @version 0.0.1
10904
+ * @version 0.0.3
10784
10905
  * @since 0.0.1
10785
10906
  * @author AMBROISE PARK Consulting
10786
10907
  */
10787
10908
  interface OAuthAPI {
10788
- loading: boolean;
10909
+ /**
10910
+ * Unified feature status - single source of truth for OAuth state.
10911
+ * Replaces deprecated `loading` boolean flag.
10912
+ * - `initializing`: OAuth is loading/initializing
10913
+ * - `ready`: OAuth fully operational
10914
+ * - `degraded`: OAuth unavailable (feature not installed/consent not given)
10915
+ * - `error`: OAuth encountered error
10916
+ */
10917
+ status: FeatureStatus;
10789
10918
  error: string | null;
10790
10919
  partners: Record<OAuthPartnerId, any>;
10791
10920
  connectedPartners: OAuthPartnerId[];
@@ -11692,324 +11821,6 @@ declare function withGracefulDegradation<T>(init: () => Promise<T>, fallback: ()
11692
11821
  */
11693
11822
  declare function lazyImport<T>(importFn: () => Promise<T>, cacheKey: string): Promise<T>;
11694
11823
 
11695
- /**
11696
- * @fileoverview Observability metrics collector
11697
- * @description CSR/SSR safe observability system with React 19 compatibility
11698
- *
11699
- * @version 0.0.1
11700
- * @since 0.0.1
11701
- * @author AMBROISE PARK Consulting
11702
- */
11703
-
11704
- /**
11705
- * Observability metrics collector
11706
- * CSR/SSR safe with React 19 compatibility
11707
- *
11708
- * @version 0.0.1
11709
- * @since 0.0.1
11710
- * @author AMBROISE PARK Consulting
11711
- */
11712
- declare class ObservabilityCollector {
11713
- private static instance;
11714
- private metrics;
11715
- private isEnabled;
11716
- private config;
11717
- private constructor();
11718
- static getInstance(): ObservabilityCollector;
11719
- /**
11720
- * Initialize observability with configuration
11721
- */
11722
- initialize(config: ObservabilityConfig): void;
11723
- /**
11724
- * Track store initialization metrics
11725
- */
11726
- trackStoreInit(storeName: string, startTime: number, endTime: number, success: boolean): void;
11727
- /**
11728
- * Track performance metrics
11729
- */
11730
- trackPerformance(metricName: string, value: number, metadata?: Record<string, any>): void;
11731
- /**
11732
- * Track health check status
11733
- */
11734
- trackHealthCheck(service: string, status: 'healthy' | 'unhealthy', details?: any): void;
11735
- /**
11736
- * Track debugging information
11737
- */
11738
- trackDebug(event: string, data: any): void;
11739
- /**
11740
- * Get all metrics
11741
- */
11742
- getMetrics(): Record<string, any>;
11743
- /**
11744
- * Clear metrics
11745
- */
11746
- clearMetrics(): void;
11747
- /**
11748
- * Emit metric to external systems
11749
- */
11750
- private emitMetric;
11751
- /**
11752
- * Get platform information
11753
- */
11754
- private getPlatform;
11755
- }
11756
- /**
11757
- * Global observability instance
11758
- */
11759
- declare const observability: ObservabilityCollector;
11760
- /**
11761
- * Initialize observability with configuration
11762
- *
11763
- * @version 0.0.1
11764
- * @since 0.0.1
11765
- * @author AMBROISE PARK Consulting
11766
- */
11767
- declare function initializeObservability(config: ObservabilityConfig): void;
11768
- /**
11769
- * Track store initialization
11770
- *
11771
- * @version 0.0.1
11772
- * @since 0.0.1
11773
- * @author AMBROISE PARK Consulting
11774
- */
11775
- declare function trackStoreInitialization(storeName: string, startTime: number, endTime: number, success: boolean): void;
11776
- /**
11777
- * Track performance metrics
11778
- *
11779
- * @version 0.0.1
11780
- * @since 0.0.1
11781
- * @author AMBROISE PARK Consulting
11782
- */
11783
- declare function trackPerformance(metricName: string, value: number, metadata?: Record<string, any>): void;
11784
- /**
11785
- * Track health check
11786
- *
11787
- * @version 0.0.1
11788
- * @since 0.0.1
11789
- * @author AMBROISE PARK Consulting
11790
- */
11791
- declare function trackHealthCheck(service: string, status: 'healthy' | 'unhealthy', details?: any): void;
11792
- /**
11793
- * Track debug information
11794
- *
11795
- * @version 0.0.1
11796
- * @since 0.0.1
11797
- * @author AMBROISE PARK Consulting
11798
- */
11799
- declare function trackDebug(event: string, data: any): void;
11800
- /**
11801
- * Get observability metrics
11802
- *
11803
- * @version 0.0.1
11804
- * @since 0.0.1
11805
- * @author AMBROISE PARK Consulting
11806
- */
11807
- declare function getObservabilityMetrics(): Record<string, any>;
11808
-
11809
- /**
11810
- * Health check status interface
11811
- *
11812
- * @version 0.0.1
11813
- * @since 0.0.1
11814
- * @author AMBROISE PARK Consulting
11815
- */
11816
- interface HealthStatus {
11817
- service: string;
11818
- status: 'healthy' | 'unhealthy';
11819
- timestamp: number;
11820
- details?: any;
11821
- }
11822
- /**
11823
- * Health check registry
11824
- *
11825
- * @version 0.0.1
11826
- * @since 0.0.1
11827
- * @author AMBROISE PARK Consulting
11828
- */
11829
- declare class HealthCheckRegistry {
11830
- private checks;
11831
- /**
11832
- * Register a health check
11833
- */
11834
- register(service: string, check: () => Promise<boolean>): void;
11835
- /**
11836
- * Run all health checks
11837
- */
11838
- runAll(): Promise<HealthStatus[]>;
11839
- /**
11840
- * Run specific health check
11841
- */
11842
- run(service: string): Promise<HealthStatus | null>;
11843
- }
11844
- /**
11845
- * Global health check registry
11846
- *
11847
- * @version 0.0.1
11848
- * @since 0.0.1
11849
- * @author AMBROISE PARK Consulting
11850
- */
11851
- declare const healthChecks: HealthCheckRegistry;
11852
- /**
11853
- * Register store health checks
11854
- *
11855
- * @version 0.0.1
11856
- * @since 0.0.1
11857
- * @author AMBROISE PARK Consulting
11858
- */
11859
- declare function registerStoreHealthChecks(): void;
11860
- /**
11861
- * Get health status for all services
11862
- *
11863
- * @version 0.0.1
11864
- * @since 0.0.1
11865
- * @author AMBROISE PARK Consulting
11866
- */
11867
- declare function getHealthStatus(): Promise<HealthStatus[]>;
11868
- /**
11869
- * Get health status for specific service
11870
- *
11871
- * @version 0.0.1
11872
- * @since 0.0.1
11873
- * @author AMBROISE PARK Consulting
11874
- */
11875
- declare function getServiceHealth(service: string): Promise<HealthStatus | null>;
11876
-
11877
- /**
11878
- * Performance metrics collector
11879
- * CSR/SSR safe with React 19 compatibility
11880
- *
11881
- * @version 0.0.1
11882
- * @since 0.0.1
11883
- * @author AMBROISE PARK Consulting
11884
- */
11885
- declare class PerformanceMonitor {
11886
- private static instance;
11887
- private marks;
11888
- private measures;
11889
- private constructor();
11890
- static getInstance(): PerformanceMonitor;
11891
- /**
11892
- * Mark a performance point
11893
- */
11894
- mark(name: string): void;
11895
- /**
11896
- * Measure performance between two marks
11897
- */
11898
- measure(name: string, startMark: string, endMark?: string): number;
11899
- /**
11900
- * Get performance measure
11901
- */
11902
- getMeasure(name: string): number | undefined;
11903
- /**
11904
- * Get all measures
11905
- */
11906
- getAllMeasures(): Record<string, number>;
11907
- /**
11908
- * Clear all marks and measures
11909
- */
11910
- clear(): void;
11911
- /**
11912
- * Get timestamp (CSR/SSR safe)
11913
- */
11914
- private getTimestamp;
11915
- }
11916
- /**
11917
- * Global performance monitor
11918
- *
11919
- * @version 0.0.1
11920
- * @since 0.0.1
11921
- * @author AMBROISE PARK Consulting
11922
- */
11923
- declare const performanceMonitor: PerformanceMonitor;
11924
- /**
11925
- * Mark performance point
11926
- *
11927
- * @version 0.0.1
11928
- * @since 0.0.1
11929
- * @author AMBROISE PARK Consulting
11930
- */
11931
- declare function markPerformance(name: string): void;
11932
- /**
11933
- * Measure performance
11934
- *
11935
- * @version 0.0.1
11936
- * @since 0.0.1
11937
- * @author AMBROISE PARK Consulting
11938
- */
11939
- declare function measurePerformance(name: string, startMark: string, endMark?: string): number;
11940
- /**
11941
- * Get performance measure
11942
- *
11943
- * @version 0.0.1
11944
- * @since 0.0.1
11945
- * @author AMBROISE PARK Consulting
11946
- */
11947
- declare function getPerformanceMeasure(name: string): number | undefined;
11948
- /**
11949
- * Get all performance measures
11950
- *
11951
- * @version 0.0.1
11952
- * @since 0.0.1
11953
- * @author AMBROISE PARK Consulting
11954
- */
11955
- declare function getAllPerformanceMeasures(): Record<string, number>;
11956
- /**
11957
- * Clear performance data
11958
- *
11959
- * @version 0.0.1
11960
- * @since 0.0.1
11961
- * @author AMBROISE PARK Consulting
11962
- */
11963
- declare function clearPerformanceData(): void;
11964
- /**
11965
- * Track Core Web Vitals
11966
- *
11967
- * @version 0.0.1
11968
- * @since 0.0.1
11969
- * @author AMBROISE PARK Consulting
11970
- */
11971
- declare function trackCoreWebVitals(): void;
11972
-
11973
- /**
11974
- * Health check endpoint response
11975
- *
11976
- * @version 0.0.1
11977
- * @since 0.0.1
11978
- * @author AMBROISE PARK Consulting
11979
- */
11980
- interface HealthEndpointResponse {
11981
- status: 'healthy' | 'unhealthy';
11982
- timestamp: number;
11983
- services: Array<{
11984
- service: string;
11985
- status: 'healthy' | 'unhealthy';
11986
- timestamp: number;
11987
- details?: any;
11988
- }>;
11989
- metrics?: Record<string, any>;
11990
- }
11991
- /**
11992
- * Create health check endpoint handler
11993
- * Compatible with Next.js API routes
11994
- *
11995
- * @version 0.0.1
11996
- * @since 0.0.1
11997
- * @author AMBROISE PARK Consulting
11998
- */
11999
- declare function createHealthEndpoint(): () => Promise<Response>;
12000
- /**
12001
- * Register health check endpoint for Next.js
12002
- * Usage: Create app/api/health/route.ts with:
12003
- *
12004
- * import { createHealthEndpoint } from '@donotdev/utils/observability';
12005
- * export const GET = createHealthEndpoint();
12006
- *
12007
- * @version 0.0.1
12008
- * @since 0.0.1
12009
- * @author AMBROISE PARK Consulting
12010
- */
12011
- declare const healthEndpoint: () => Promise<Response>;
12012
-
12013
11824
  /**
12014
11825
  * @fileoverview Singleton utility functions
12015
11826
  * @description Provides singleton pattern implementation for the framework
@@ -12547,25 +12358,17 @@ declare function parseServerCookie(cookieHeader: string | undefined, name: strin
12547
12358
  type index_d_DateFormatOptions = DateFormatOptions;
12548
12359
  type index_d_DateFormatPreset = DateFormatPreset;
12549
12360
  type index_d_HandleServerErrorOptions = HandleServerErrorOptions;
12550
- type index_d_HealthEndpointResponse = HealthEndpointResponse;
12551
- type index_d_HealthStatus = HealthStatus;
12552
12361
  type index_d_LogEntry = LogEntry;
12553
12362
  type index_d_LogLevel = LogLevel;
12554
12363
  declare const index_d_LogLevel: typeof LogLevel;
12555
- type index_d_ObservabilityCollector = ObservabilityCollector;
12556
- declare const index_d_ObservabilityCollector: typeof ObservabilityCollector;
12557
- type index_d_PerformanceMonitor = PerformanceMonitor;
12558
- declare const index_d_PerformanceMonitor: typeof PerformanceMonitor;
12559
12364
  type index_d_SingletonManager = SingletonManager;
12560
12365
  declare const index_d_SingletonManager: typeof SingletonManager;
12561
12366
  declare const index_d_addMonths: typeof addMonths;
12562
12367
  declare const index_d_addYears: typeof addYears;
12563
12368
  declare const index_d_calculateSubscriptionEndDate: typeof calculateSubscriptionEndDate;
12564
- declare const index_d_clearPerformanceData: typeof clearPerformanceData;
12565
12369
  declare const index_d_compactToISOString: typeof compactToISOString;
12566
12370
  declare const index_d_createAsyncSingleton: typeof createAsyncSingleton;
12567
12371
  declare const index_d_createChildLogger: typeof createChildLogger;
12568
- declare const index_d_createHealthEndpoint: typeof createHealthEndpoint;
12569
12372
  declare const index_d_createMetadata: typeof createMetadata;
12570
12373
  declare const index_d_createMethodProxy: typeof createMethodProxy;
12571
12374
  declare const index_d_createServerErrorMessage: typeof createServerErrorMessage;
@@ -12576,17 +12379,9 @@ declare const index_d_formatRelativeTime: typeof formatRelativeTime;
12576
12379
  declare const index_d_generateCodeChallenge: typeof generateCodeChallenge;
12577
12380
  declare const index_d_generateCodeVerifier: typeof generateCodeVerifier;
12578
12381
  declare const index_d_generatePKCEPair: typeof generatePKCEPair;
12579
- declare const index_d_getAllPerformanceMeasures: typeof getAllPerformanceMeasures;
12580
12382
  declare const index_d_getCurrentTimestamp: typeof getCurrentTimestamp;
12581
- declare const index_d_getHealthStatus: typeof getHealthStatus;
12582
- declare const index_d_getObservabilityMetrics: typeof getObservabilityMetrics;
12583
- declare const index_d_getPerformanceMeasure: typeof getPerformanceMeasure;
12584
- declare const index_d_getServiceHealth: typeof getServiceHealth;
12585
12383
  declare const index_d_getWeekFromISOString: typeof getWeekFromISOString;
12586
12384
  declare const index_d_handleServerError: typeof handleServerError;
12587
- declare const index_d_healthChecks: typeof healthChecks;
12588
- declare const index_d_healthEndpoint: typeof healthEndpoint;
12589
- declare const index_d_initializeObservability: typeof initializeObservability;
12590
12385
  declare const index_d_isCompactDateString: typeof isCompactDateString;
12591
12386
  declare const index_d_isEmailVerificationRequired: typeof isEmailVerificationRequired;
12592
12387
  declare const index_d_isPKCESupported: typeof isPKCESupported;
@@ -12594,26 +12389,16 @@ declare const index_d_isoToCompactString: typeof isoToCompactString;
12594
12389
  declare const index_d_lazyImport: typeof lazyImport;
12595
12390
  declare const index_d_logServerErrorOnly: typeof logServerErrorOnly;
12596
12391
  declare const index_d_logger: typeof logger;
12597
- declare const index_d_markPerformance: typeof markPerformance;
12598
12392
  declare const index_d_maybeTranslate: typeof maybeTranslate;
12599
- declare const index_d_measurePerformance: typeof measurePerformance;
12600
12393
  declare const index_d_normalizeToISOString: typeof normalizeToISOString;
12601
- declare const index_d_observability: typeof observability;
12602
12394
  declare const index_d_parseDate: typeof parseDate;
12603
12395
  declare const index_d_parseDateToNoonUTC: typeof parseDateToNoonUTC;
12604
12396
  declare const index_d_parseISODate: typeof parseISODate;
12605
12397
  declare const index_d_parseServerCookie: typeof parseServerCookie;
12606
- declare const index_d_performanceMonitor: typeof performanceMonitor;
12607
- declare const index_d_registerStoreHealthChecks: typeof registerStoreHealthChecks;
12608
12398
  declare const index_d_shouldShowEmailVerification: typeof shouldShowEmailVerification;
12609
12399
  declare const index_d_timestampToISOString: typeof timestampToISOString;
12610
12400
  declare const index_d_toDateOnly: typeof toDateOnly;
12611
12401
  declare const index_d_toISOString: typeof toISOString;
12612
- declare const index_d_trackCoreWebVitals: typeof trackCoreWebVitals;
12613
- declare const index_d_trackDebug: typeof trackDebug;
12614
- declare const index_d_trackHealthCheck: typeof trackHealthCheck;
12615
- declare const index_d_trackPerformance: typeof trackPerformance;
12616
- declare const index_d_trackStoreInitialization: typeof trackStoreInitialization;
12617
12402
  declare const index_d_translateArray: typeof translateArray;
12618
12403
  declare const index_d_translateArrayRange: typeof translateArrayRange;
12619
12404
  declare const index_d_translateArrayWithIndices: typeof translateArrayWithIndices;
@@ -12626,8 +12411,8 @@ declare const index_d_validateMetadata: typeof validateMetadata;
12626
12411
  declare const index_d_validateUrl: typeof validateUrl;
12627
12412
  declare const index_d_withGracefulDegradation: typeof withGracefulDegradation;
12628
12413
  declare namespace index_d {
12629
- export { index_d_LogLevel as LogLevel, index_d_ObservabilityCollector as ObservabilityCollector, index_d_PerformanceMonitor as PerformanceMonitor, index_d_SingletonManager as SingletonManager, index_d_addMonths as addMonths, index_d_addYears as addYears, index_d_calculateSubscriptionEndDate as calculateSubscriptionEndDate, index_d_clearPerformanceData as clearPerformanceData, index_d_compactToISOString as compactToISOString, index_d_createAsyncSingleton as createAsyncSingleton, index_d_createChildLogger as createChildLogger, index_d_createHealthEndpoint as createHealthEndpoint, index_d_createMetadata as createMetadata, index_d_createMethodProxy as createMethodProxy, index_d_createServerErrorMessage as createServerErrorMessage, index_d_createSingleton as createSingleton, index_d_createSingletonWithParams as createSingletonWithParams, index_d_formatDate as formatDate, index_d_formatRelativeTime as formatRelativeTime, index_d_generateCodeChallenge as generateCodeChallenge, index_d_generateCodeVerifier as generateCodeVerifier, index_d_generatePKCEPair as generatePKCEPair, index_d_getAllPerformanceMeasures as getAllPerformanceMeasures, index_d_getCurrentTimestamp as getCurrentTimestamp, index_d_getHealthStatus as getHealthStatus, index_d_getObservabilityMetrics as getObservabilityMetrics, index_d_getPerformanceMeasure as getPerformanceMeasure, index_d_getServiceHealth as getServiceHealth, index_d_getWeekFromISOString as getWeekFromISOString, index_d_handleServerError as handleServerError, index_d_healthChecks as healthChecks, index_d_healthEndpoint as healthEndpoint, index_d_initializeObservability as initializeObservability, index_d_isCompactDateString as isCompactDateString, index_d_isEmailVerificationRequired as isEmailVerificationRequired, index_d_isPKCESupported as isPKCESupported, index_d_isoToCompactString as isoToCompactString, index_d_lazyImport as lazyImport, index_d_logServerErrorOnly as logServerErrorOnly, index_d_logger as logger, index_d_markPerformance as markPerformance, index_d_maybeTranslate as maybeTranslate, index_d_measurePerformance as measurePerformance, index_d_normalizeToISOString as normalizeToISOString, index_d_observability as observability, index_d_parseDate as parseDate, index_d_parseDateToNoonUTC as parseDateToNoonUTC, index_d_parseISODate as parseISODate, index_d_parseServerCookie as parseServerCookie, index_d_performanceMonitor as performanceMonitor, index_d_registerStoreHealthChecks as registerStoreHealthChecks, index_d_shouldShowEmailVerification as shouldShowEmailVerification, index_d_timestampToISOString as timestampToISOString, index_d_toDateOnly as toDateOnly, index_d_toISOString as toISOString, index_d_trackCoreWebVitals as trackCoreWebVitals, index_d_trackDebug as trackDebug, index_d_trackHealthCheck as trackHealthCheck, index_d_trackPerformance as trackPerformance, index_d_trackStoreInitialization as trackStoreInitialization, index_d_translateArray as translateArray, index_d_translateArrayRange as translateArrayRange, index_d_translateArrayWithIndices as translateArrayWithIndices, index_d_translateObjectArray as translateObjectArray, index_d_updateMetadata as updateMetadata, index_d_validateCodeChallenge as validateCodeChallenge, index_d_validateCodeVerifier as validateCodeVerifier, index_d_validateEnvVar as validateEnvVar, index_d_validateMetadata as validateMetadata, index_d_validateUrl as validateUrl, index_d_withGracefulDegradation as withGracefulDegradation };
12630
- export type { index_d_DateFormatOptions as DateFormatOptions, index_d_DateFormatPreset as DateFormatPreset, index_d_HandleServerErrorOptions as HandleServerErrorOptions, index_d_HealthEndpointResponse as HealthEndpointResponse, index_d_HealthStatus as HealthStatus, index_d_LogEntry as LogEntry };
12414
+ export { index_d_LogLevel as LogLevel, index_d_SingletonManager as SingletonManager, index_d_addMonths as addMonths, index_d_addYears as addYears, index_d_calculateSubscriptionEndDate as calculateSubscriptionEndDate, index_d_compactToISOString as compactToISOString, index_d_createAsyncSingleton as createAsyncSingleton, index_d_createChildLogger as createChildLogger, index_d_createMetadata as createMetadata, index_d_createMethodProxy as createMethodProxy, index_d_createServerErrorMessage as createServerErrorMessage, index_d_createSingleton as createSingleton, index_d_createSingletonWithParams as createSingletonWithParams, index_d_formatDate as formatDate, index_d_formatRelativeTime as formatRelativeTime, index_d_generateCodeChallenge as generateCodeChallenge, index_d_generateCodeVerifier as generateCodeVerifier, index_d_generatePKCEPair as generatePKCEPair, index_d_getCurrentTimestamp as getCurrentTimestamp, index_d_getWeekFromISOString as getWeekFromISOString, index_d_handleServerError as handleServerError, index_d_isCompactDateString as isCompactDateString, index_d_isEmailVerificationRequired as isEmailVerificationRequired, index_d_isPKCESupported as isPKCESupported, index_d_isoToCompactString as isoToCompactString, index_d_lazyImport as lazyImport, index_d_logServerErrorOnly as logServerErrorOnly, index_d_logger as logger, index_d_maybeTranslate as maybeTranslate, index_d_normalizeToISOString as normalizeToISOString, index_d_parseDate as parseDate, index_d_parseDateToNoonUTC as parseDateToNoonUTC, index_d_parseISODate as parseISODate, index_d_parseServerCookie as parseServerCookie, index_d_shouldShowEmailVerification as shouldShowEmailVerification, index_d_timestampToISOString as timestampToISOString, index_d_toDateOnly as toDateOnly, index_d_toISOString as toISOString, index_d_translateArray as translateArray, index_d_translateArrayRange as translateArrayRange, index_d_translateArrayWithIndices as translateArrayWithIndices, index_d_translateObjectArray as translateObjectArray, index_d_updateMetadata as updateMetadata, index_d_validateCodeChallenge as validateCodeChallenge, index_d_validateCodeVerifier as validateCodeVerifier, index_d_validateEnvVar as validateEnvVar, index_d_validateMetadata as validateMetadata, index_d_validateUrl as validateUrl, index_d_withGracefulDegradation as withGracefulDegradation };
12415
+ export type { index_d_DateFormatOptions as DateFormatOptions, index_d_DateFormatPreset as DateFormatPreset, index_d_HandleServerErrorOptions as HandleServerErrorOptions, index_d_LogEntry as LogEntry };
12631
12416
  }
12632
12417
 
12633
12418
  /**
@@ -12829,5 +12614,5 @@ declare const baseFields: Record<string, EntityField>;
12829
12614
  */
12830
12615
  declare function defineEntity(entity: BusinessEntity): Entity;
12831
12616
 
12832
- export { AUTH_EVENTS, AUTH_PARTNERS, AUTH_PARTNER_STATE, AuthUserSchema, BILLING_EVENTS, BREAKPOINT_RANGES, BREAKPOINT_THRESHOLDS, COMMON_TIER_CONFIGS, CONFIDENCE_LEVELS, CONSENT_CATEGORY, CONTEXTS, CheckoutSessionMetadataSchema, CreateCheckoutSessionRequestSchema, CreateCheckoutSessionResponseSchema, CustomClaimsSchema, DEFAULT_LAYOUT_PRESET, DEFAULT_SUBSCRIPTION, DENSITY, DoNotDevError, ENVIRONMENTS, EntityHookError, FEATURES, FEATURE_CONSENT_MATRIX, FIREBASE_ERROR_MAP, FIRESTORE_ID_PATTERN, GITHUB_PERMISSION_LEVELS, LAYOUT_PRESET, LogLevel, OAUTH_EVENTS, OAUTH_PARTNERS, ObservabilityCollector, PARTNER_ICONS, PAYLOAD_EVENTS, PERMISSIONS, PLATFORMS, PWA_ASSET_TYPES, PWA_DISPLAY_MODES, PerformanceMonitor, ProductDeclarationSchema, ProductDeclarationsSchema, ROUTE_SOURCES, STORAGE_SCOPES, STORAGE_TYPES, STRIPE_EVENTS, STRIPE_MODES, SUBSCRIPTION_DURATIONS, SUBSCRIPTION_STATUS, SUBSCRIPTION_TIERS, index_d as ServerUtils, SingletonManager, StripeBackConfigSchema, StripeFrontConfigSchema, StripePaymentSchema, StripeSubscriptionSchema, SubscriptionClaimsSchema, SubscriptionDataSchema, USER_ROLES, UserSubscriptionSchema, WebhookEventSchema, addMonths, addYears, baseFields, calculateSubscriptionEndDate, checkGitHubAccessSchema, clearPerformanceData, compactToISOString, createAsyncSingleton, createChildLogger, createDefaultSubscriptionClaims, createDefaultUserProfile, createEntitySchema, createHealthEndpoint, createMetadata, createMethodProxy, createSchemas, createServerErrorMessage, createSingleton, createSingletonWithParams, defineEntity, deleteEntitySchema, disconnectOAuthSchema, enhanceSchema, exchangeTokenSchema, formatDate, formatRelativeTime, generateCodeChallenge, generateCodeVerifier, generatePKCEPair, getAllPerformanceMeasures, getBreakpointFromWidth, getBreakpointUtils, getCollectionName, getConnectionsSchema, getCurrentTimestamp, getEntitySchema, getHealthStatus, getObservabilityMetrics, getPerformanceMeasure, getSchemaType, getServiceHealth, getVisibleFieldsFromEntity, getWeekFromISOString, githubPermissionSchema, githubRepoConfigSchema, grantGitHubAccessSchema, handleServerError, hasMetadata, healthChecks, healthEndpoint, initializeObservability, isAuthPartnerId, isBreakpoint, isCompactDateString, isEmailVerificationRequired, isFieldVisible, isOAuthPartnerId, isPKCESupported, isoToCompactString, lazyImport, listEntitiesSchema, logServerErrorOnly, logger, markPerformance, maybeTranslate, measurePerformance, normalizeToISOString, observability, overrideFeatures, overridePaymentModes, overridePermissions, overrideSubscriptionStatus, overrideSubscriptionTiers, overrideUserRoles, parseDate, parseDateToNoonUTC, parseISODate, parseServerCookie, performanceMonitor, refreshTokenSchema, registerStoreHealthChecks, registerUniqueConstraintValidator, revokeGitHubAccessSchema, shouldShowEmailVerification, timestampToISOString, toDateOnly, toISOString, trackCoreWebVitals, trackDebug, trackHealthCheck, trackPerformance, trackStoreInitialization, translateArray, translateArrayRange, translateArrayWithIndices, translateObjectArray, updateEntitySchema, updateMetadata, validateAuthPartners, validateAuthSchemas, validateAuthUser, validateBillingSchemas, validateCheckoutSessionMetadata, validateCodeChallenge, validateCodeVerifier, validateCreateCheckoutSessionRequest, validateCreateCheckoutSessionResponse, validateCustomClaims, validateDates, validateDocument, validateEnvVar, validateMetadata, validateOAuthPartners, validateStripeBackConfig, validateStripeFrontConfig, validateSubscriptionClaims, validateSubscriptionData, validateUniqueFields, validateUrl, validateUserSubscription, validateWebhookEvent, withGracefulDegradation };
12833
- export type { AccountLinkResult, AccountLinkingInfo, AdminCheckHookResult, AdminClaims, ApiResponse, AppConfig, AppCookieCategories, AppMetadata, AppProvidersProps, AssetsPluginConfig, AttemptRecord, AuthAPI, AuthActions, AuthConfig, AuthContextValue, AuthCoreHookResult, AuthError, AuthEventData, AuthEventKey, AuthEventName, AuthMethod, AuthPartner, AuthPartnerButton, AuthPartnerHookResult, AuthPartnerId, AuthPartnerResult, AuthPartnerState, AuthProvider, AuthProviderProps, AuthRedirectHookResult, AuthRedirectOptions, AuthResult, AuthState, AuthStateStore, AuthStatus, AuthTokenHookResult, AuthUser, BaseActions, BaseCredentials, BaseDocument, BaseEntityFields, BasePartnerState, BaseState, BaseStoreActions, BaseStoreState, BaseUserProfile, BasicUserInfo, BillingAPI, BillingAdapter, BillingErrorCode, BillingEvent, BillingEventData, BillingEventKey, BillingEventName, BillingProvider, BillingProviderConfig, Breakpoint, BreakpointUtils, BusinessEntity, CachedError, CheckGitHubAccessRequest, CheckoutMode, CheckoutOptions, CheckoutSessionMetadata, ColumnDef, CommonSubscriptionFeatures, CommonTranslations, ConfidenceLevel, ConsentAPI, ConsentActions, ConsentCategory, ConsentState, Context, CookieOptions, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse, CreateEntityData, CreateEntityRequest, CreateEntityResponse, CrudAPI, CustomClaims, CustomStoreConfig, DateFormatOptions, DateFormatPreset, DateValue, DeleteEntityRequest, DeleteEntityResponse, Density, DnDevLayoutProps, DnDevOverride, DndevFrameworkConfig, DoNotDevCookieCategories, DynamicFormRule, EffectiveConnectionType, EmailVerificationHookResult, EmailVerificationStatus, Entity, EntityField, EntityHookErrors, EntityMetadata, EntitySchemas, EntityTemplateProps, EntityTranslations, EnvironmentMode, ErrorCode, ErrorSeverity, ErrorSource, ExchangeTokenParams, ExchangeTokenRequest, FaviconConfig, Feature, FeatureAccessHookResult, FeatureConsentRequirement, FeatureHookResult, FeatureId, FeatureName, FeaturesConfig, FeaturesPluginConfig, FeaturesRequiringAnyConsent, FeaturesRequiringConsent, FeaturesWithoutConsent, FieldCondition, FieldConfig, FieldType, FieldTypeToValue, FirebaseCallOptions, FirebaseConfig, FirestoreTimestamp, FirestoreUniqueConstraintValidator, FooterConfig, FooterZoneConfig, FormConfig, FormStep, FunctionCallConfig, FunctionCallContext, FunctionCallOptions, FunctionCallResult, FunctionClient, FunctionClientFactoryOptions, FunctionError, FunctionLoader, FunctionPlatform, FunctionResponse, FunctionSchema, FunctionSchemas, FunctionSystem, GetCustomClaimsResponse, GetEntityData, GetEntityRequest, GetEntityResponse, GetUserAuthStatusResponse, GitHubPermission, GitHubRepoConfig, GrantGitHubAccessRequest, HandleServerErrorOptions, HeaderZoneConfig, HealthEndpointResponse, HealthStatus, I18nConfig, I18nPluginConfig, I18nProviderProps, ID, INetworkManager, IStorageManager, IStorageStrategy, Invoice, InvoiceItem, LanguageInfo, LayoutConfig, LayoutInput, LayoutPreset, LegalCompanyInfo, LegalConfig, LegalContactInfo, LegalDirectorInfo, LegalHostingInfo, LegalJurisdictionInfo, LegalSectionsConfig, LegalWebsiteInfo, ListEntitiesRequest, ListEntitiesResponse, ListEntityData, ListOptions, ListResponse, LoadingActions, LoadingState, LogEntry, MergedBarConfig, MobileBehaviorConfig, ModalActions, ModalState, MutationResponse, NavigationRoute, NetworkCheckConfig, NetworkConnectionType, NetworkReconnectCallback, NetworkState, NetworkStatus, NetworkStatusHookResult, OAuthAPI, OAuthApiRequestOptions, OAuthCallbackHookResult, OAuthConnection, OAuthConnectionInfo, OAuthConnectionRequest, OAuthConnectionStatus, OAuthCredentials, OAuthEventData, OAuthEventKey, OAuthEventName, OAuthPartner, OAuthPartnerButton, OAuthPartnerHookResult, OAuthPartnerId, OAuthPartnerResult, OAuthPartnerState, OAuthPurpose, OAuthRefreshRequest, OAuthRefreshResponse, OAuthResult, OAuthStoreActions, OAuthStoreState, ObservabilityConfig, Observable, OrderByClause, PWAAssetType, PWADisplayMode, PWAPluginConfig, PageAuth, PageMeta, PaginationOptions, PartnerButton, PartnerConnectionState, PartnerIconId, PartnerId, PartnerResult, PartnerType, PayloadCacheEventData, PayloadDocument, PayloadDocumentEventData, PayloadEventKey, PayloadEventName, PayloadGlobalEventData, PayloadMediaEventData, PayloadPageRegenerationEventData, PayloadRequest, PayloadUserEventData, PaymentEventData, PaymentMethod, PaymentMethodType, PaymentMode, Permission, Platform, PresetConfig, PresetRegistry, ProcessPaymentSuccessRequest, ProcessPaymentSuccessResponse, ProductDeclaration, ProviderInstances, RateLimitConfig, RateLimitManager, RateLimitResult, RateLimitState, RateLimiter, ReadCallback, Reference, RefreshSubscriptionRequest, RefreshSubscriptionResponse, RemoveCustomClaimsResponse, ResolvedLayoutConfig, RevokeGitHubAccessRequest, RouteMeta, RouteSource, RoutesPluginConfig, SEOConfig, SchemaMetadata, SetCustomClaimsResponse, SidebarZoneConfig, SlotContent, StorageOptions, StorageScope, StorageType, Store, StoreApi, StripeBackConfig, StripeCheckoutRequest, StripeCheckoutResponse, StripeCheckoutSessionEventData, StripeConfig, StripeCustomer, StripeCustomerEventData, StripeEventData, StripeEventKey, StripeEventName, StripeFrontConfig, StripeInvoice, StripeInvoiceEventData, StripePayment, StripePaymentIntentEventData, StripePaymentMethod, StripePrice, StripeProduct, StripeProvider, StripeSubscription, StripeSubscriptionData, StripeWebhookEvent, StripeWebhookEventData, Subscription, SubscriptionClaims, SubscriptionConfig, SubscriptionData, SubscriptionDuration, SubscriptionEventData, SubscriptionHookResult, SubscriptionInfo, SubscriptionStatus, SubscriptionTier, SupportedLanguage, ThemeActions, ThemeInfo, ThemeMode, ThemeState, ThemesPluginConfig, TierAccessHookResult, Timestamp, TokenInfo, TokenResponse, TokenState, TokenStatus, TranslationOptions, TranslationResource, UIFieldOptions, UniqueConstraintValidator, UnsubscribeFn, UpdateEntityData, UpdateEntityRequest, UpdateEntityResponse, UseFunctionsMutationOptions, UseFunctionsQueryOptions, UseTranslationOptionsEnhanced, UserContext, UserProfile, UserProviderData, UserRole, UserSubscription, ValidationRules, ValueTypeForField, Visibility, WebhookEvent, WebhookEventData, WhereClause, WhereOperator, WithMetadata, dndevSchema };
12617
+ export { AUTH_EVENTS, AUTH_PARTNERS, AUTH_PARTNER_STATE, AuthUserSchema, BILLING_EVENTS, BREAKPOINT_RANGES, BREAKPOINT_THRESHOLDS, COMMON_TIER_CONFIGS, CONFIDENCE_LEVELS, CONSENT_CATEGORY, CONTEXTS, CheckoutSessionMetadataSchema, CreateCheckoutSessionRequestSchema, CreateCheckoutSessionResponseSchema, CustomClaimsSchema, DEFAULT_LAYOUT_PRESET, DEFAULT_SUBSCRIPTION, DENSITY, DoNotDevError, ENVIRONMENTS, EntityHookError, FEATURES, FEATURE_CONSENT_MATRIX, FEATURE_STATUS, FIREBASE_ERROR_MAP, FIRESTORE_ID_PATTERN, GITHUB_PERMISSION_LEVELS, LAYOUT_PRESET, LogLevel, OAUTH_EVENTS, OAUTH_PARTNERS, PARTNER_ICONS, PAYLOAD_EVENTS, PERMISSIONS, PLATFORMS, PWA_ASSET_TYPES, PWA_DISPLAY_MODES, ProductDeclarationSchema, ProductDeclarationsSchema, ROUTE_SOURCES, STORAGE_SCOPES, STORAGE_TYPES, STRIPE_EVENTS, STRIPE_MODES, SUBSCRIPTION_DURATIONS, SUBSCRIPTION_STATUS, SUBSCRIPTION_TIERS, index_d as ServerUtils, SingletonManager, StripeBackConfigSchema, StripeFrontConfigSchema, StripePaymentSchema, StripeSubscriptionSchema, SubscriptionClaimsSchema, SubscriptionDataSchema, USER_ROLES, UserSubscriptionSchema, WebhookEventSchema, addMonths, addYears, baseFields, calculateSubscriptionEndDate, checkGitHubAccessSchema, compactToISOString, createAsyncSingleton, createChildLogger, createDefaultSubscriptionClaims, createDefaultUserProfile, createEntitySchema, createMetadata, createMethodProxy, createSchemas, createServerErrorMessage, createSingleton, createSingletonWithParams, defineEntity, deleteEntitySchema, disconnectOAuthSchema, enhanceSchema, exchangeTokenSchema, formatDate, formatRelativeTime, generateCodeChallenge, generateCodeVerifier, generatePKCEPair, getBreakpointFromWidth, getBreakpointUtils, getCollectionName, getConnectionsSchema, getCurrentTimestamp, getEntitySchema, getSchemaType, getVisibleFieldsFromEntity, getWeekFromISOString, githubPermissionSchema, githubRepoConfigSchema, grantGitHubAccessSchema, handleServerError, hasMetadata, isAuthPartnerId, isBreakpoint, isCompactDateString, isEmailVerificationRequired, isFieldVisible, isOAuthPartnerId, isPKCESupported, isoToCompactString, lazyImport, listEntitiesSchema, logServerErrorOnly, logger, maybeTranslate, normalizeToISOString, overrideFeatures, overridePaymentModes, overridePermissions, overrideSubscriptionStatus, overrideSubscriptionTiers, overrideUserRoles, parseDate, parseDateToNoonUTC, parseISODate, parseServerCookie, refreshTokenSchema, registerUniqueConstraintValidator, revokeGitHubAccessSchema, shouldShowEmailVerification, timestampToISOString, toDateOnly, toISOString, translateArray, translateArrayRange, translateArrayWithIndices, translateObjectArray, updateEntitySchema, updateMetadata, validateAuthPartners, validateAuthSchemas, validateAuthUser, validateBillingSchemas, validateCheckoutSessionMetadata, validateCodeChallenge, validateCodeVerifier, validateCreateCheckoutSessionRequest, validateCreateCheckoutSessionResponse, validateCustomClaims, validateDates, validateDocument, validateEnvVar, validateMetadata, validateOAuthPartners, validateStripeBackConfig, validateStripeFrontConfig, validateSubscriptionClaims, validateSubscriptionData, validateUniqueFields, validateUrl, validateUserSubscription, validateWebhookEvent, withGracefulDegradation };
12618
+ export type { AccountLinkResult, AccountLinkingInfo, AdminCheckHookResult, AdminClaims, ApiResponse, AppConfig, AppCookieCategories, AppMetadata, AppProvidersProps, AssetsPluginConfig, AttemptRecord, AuthAPI, AuthActions, AuthConfig, AuthContextValue, AuthCoreHookResult, AuthError, AuthEventData, AuthEventKey, AuthEventName, AuthMethod, AuthPartner, AuthPartnerButton, AuthPartnerHookResult, AuthPartnerId, AuthPartnerResult, AuthPartnerState, AuthProvider, AuthProviderProps, AuthRedirectHookResult, AuthRedirectOptions, AuthResult, AuthState, AuthStateStore, AuthStatus, AuthTokenHookResult, AuthUser, BaseActions, BaseCredentials, BaseDocument, BaseEntityFields, BasePartnerState, BaseState, BaseStoreActions, BaseStoreState, BaseUserProfile, BasicUserInfo, BillingAPI, BillingAdapter, BillingErrorCode, BillingEvent, BillingEventData, BillingEventKey, BillingEventName, BillingProvider, BillingProviderConfig, Breakpoint, BreakpointUtils, BusinessEntity, CachedError, CanAPI, CheckGitHubAccessRequest, CheckoutMode, CheckoutOptions, CheckoutSessionMetadata, ColumnDef, CommonSubscriptionFeatures, CommonTranslations, ConfidenceLevel, ConsentAPI, ConsentActions, ConsentCategory, ConsentState, Context, CookieOptions, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse, CreateEntityData, CreateEntityRequest, CreateEntityResponse, CrudAPI, CustomClaims, CustomStoreConfig, DateFormatOptions, DateFormatPreset, DateValue, DeleteEntityRequest, DeleteEntityResponse, Density, DnDevLayoutProps, DnDevOverride, DndevFrameworkConfig, DoNotDevCookieCategories, DynamicFormRule, EffectiveConnectionType, EmailVerificationHookResult, EmailVerificationStatus, Entity, EntityField, EntityHookErrors, EntityMetadata, EntitySchemas, EntityTemplateProps, EntityTranslations, EnvironmentMode, ErrorCode, ErrorSeverity, ErrorSource, ExchangeTokenParams, ExchangeTokenRequest, FaviconConfig, Feature, FeatureAccessHookResult, FeatureConsentRequirement, FeatureHookResult, FeatureId, FeatureName, FeatureStatus, FeaturesConfig, FeaturesPluginConfig, FeaturesRequiringAnyConsent, FeaturesRequiringConsent, FeaturesWithoutConsent, FieldCondition, FieldConfig, FieldType, FieldTypeToValue, FirebaseCallOptions, FirebaseConfig, FirestoreTimestamp, FirestoreUniqueConstraintValidator, FooterConfig, FooterZoneConfig, FormConfig, FormStep, FunctionCallConfig, FunctionCallContext, FunctionCallOptions, FunctionCallResult, FunctionClient, FunctionClientFactoryOptions, FunctionError, FunctionLoader, FunctionPlatform, FunctionResponse, FunctionSchema, FunctionSchemas, FunctionSystem, GetCustomClaimsResponse, GetEntityData, GetEntityRequest, GetEntityResponse, GetUserAuthStatusResponse, GitHubPermission, GitHubRepoConfig, GrantGitHubAccessRequest, HandleServerErrorOptions, HeaderZoneConfig, I18nConfig, I18nPluginConfig, I18nProviderProps, ID, INetworkManager, IStorageManager, IStorageStrategy, Invoice, InvoiceItem, LanguageInfo, LayoutConfig, LayoutInput, LayoutPreset, LegalCompanyInfo, LegalConfig, LegalContactInfo, LegalDirectorInfo, LegalHostingInfo, LegalJurisdictionInfo, LegalSectionsConfig, LegalWebsiteInfo, ListEntitiesRequest, ListEntitiesResponse, ListEntityData, ListOptions, ListResponse, LoadingActions, LoadingState, LogEntry, MergedBarConfig, MobileBehaviorConfig, ModalActions, ModalState, MutationResponse, NavigationRoute, NetworkCheckConfig, NetworkConnectionType, NetworkReconnectCallback, NetworkState, NetworkStatus, NetworkStatusHookResult, OAuthAPI, OAuthApiRequestOptions, OAuthCallbackHookResult, OAuthConnection, OAuthConnectionInfo, OAuthConnectionRequest, OAuthConnectionStatus, OAuthCredentials, OAuthEventData, OAuthEventKey, OAuthEventName, OAuthPartner, OAuthPartnerButton, OAuthPartnerHookResult, OAuthPartnerId, OAuthPartnerResult, OAuthPartnerState, OAuthPurpose, OAuthRefreshRequest, OAuthRefreshResponse, OAuthResult, OAuthStoreActions, OAuthStoreState, Observable, OrderByClause, PWAAssetType, PWADisplayMode, PWAPluginConfig, PageAuth, PageMeta, PaginationOptions, PartnerButton, PartnerConnectionState, PartnerIconId, PartnerId, PartnerResult, PartnerType, PayloadCacheEventData, PayloadDocument, PayloadDocumentEventData, PayloadEventKey, PayloadEventName, PayloadGlobalEventData, PayloadMediaEventData, PayloadPageRegenerationEventData, PayloadRequest, PayloadUserEventData, PaymentEventData, PaymentMethod, PaymentMethodType, PaymentMode, Permission, Platform, PresetConfig, PresetRegistry, ProcessPaymentSuccessRequest, ProcessPaymentSuccessResponse, ProductDeclaration, ProviderInstances, RateLimitConfig, RateLimitManager, RateLimitResult, RateLimitState, RateLimiter, ReadCallback, Reference, RefreshSubscriptionRequest, RefreshSubscriptionResponse, RemoveCustomClaimsResponse, ResolvedLayoutConfig, RevokeGitHubAccessRequest, RouteMeta, RouteSource, RoutesPluginConfig, SEOConfig, SchemaMetadata, SetCustomClaimsResponse, SidebarZoneConfig, SlotContent, StorageOptions, StorageScope, StorageType, Store, StoreApi, StripeBackConfig, StripeCheckoutRequest, StripeCheckoutResponse, StripeCheckoutSessionEventData, StripeConfig, StripeCustomer, StripeCustomerEventData, StripeEventData, StripeEventKey, StripeEventName, StripeFrontConfig, StripeInvoice, StripeInvoiceEventData, StripePayment, StripePaymentIntentEventData, StripePaymentMethod, StripePrice, StripeProduct, StripeProvider, StripeSubscription, StripeSubscriptionData, StripeWebhookEvent, StripeWebhookEventData, Subscription, SubscriptionClaims, SubscriptionConfig, SubscriptionData, SubscriptionDuration, SubscriptionEventData, SubscriptionHookResult, SubscriptionInfo, SubscriptionStatus, SubscriptionTier, SupportedLanguage, ThemeActions, ThemeInfo, ThemeMode, ThemeState, ThemesPluginConfig, TierAccessHookResult, Timestamp, TokenInfo, TokenResponse, TokenState, TokenStatus, TranslationOptions, TranslationResource, UIFieldOptions, UniqueConstraintValidator, UnsubscribeFn, UpdateEntityData, UpdateEntityRequest, UpdateEntityResponse, UseFunctionsMutationOptions, UseFunctionsQueryOptions, UseTranslationOptionsEnhanced, UserContext, UserProfile, UserProviderData, UserRole, UserSubscription, ValidationRules, ValueTypeForField, Visibility, WebhookEvent, WebhookEventData, WhereClause, WhereOperator, WithMetadata, dndevSchema };