@plyaz/types 1.45.6 → 1.45.7

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.
@@ -2,5 +2,5 @@
2
2
  * Core Frontend Types
3
3
  * Type definitions for @plyaz/core frontend services
4
4
  */
5
- export type { CoreBaseFrontendStore, CoreBaseFrontendServiceConfig, CoreBaseFrontendServiceInterface, CoreStoreHandlers, CoreOptimisticUpdateConfig, OptimisticConflictResolution, CoreFetcherFunction, CoreServiceFetchers, CorePlyazApiConfig, FrontendFeatureFlagProvider, CorePlyazFeatureFlagConfig, CorePlyazStoreConfig, CorePlyazStreamConfig, CorePlyazConfig, CoreFeatureFlagServiceLike, CoreFeatureFlagFetcherOptions, CoreFeatureFlagStoreInitConfig, CoreBaseFrontendServiceConstructorConfig, CoreInitializationErrorProps, CoreInitializationLoadingProps, CorePlyazServices, CorePlyazContextValue, CorePlyazProviderProps, CoreStreamStoreGetter, CoreStreamHandlerIds, CoreStreamHandlerDeclaration, } from './types';
5
+ export type { CoreBaseFrontendStore, CoreBaseFrontendServiceConfig, CoreBaseFrontendServiceInterface, CoreStoreHandlers, CoreOptimisticUpdateConfig, OptimisticConflictResolution, CoreFetcherFunction, CoreServiceFetchers, CorePlyazApiConfig, FrontendFeatureFlagProvider, CorePlyazFeatureFlagConfig, CorePlyazStoreConfig, CorePlyazStreamConfig, CorePlyazConfig, CoreFeatureFlagServiceLike, CoreFeatureFlagFetcherOptions, CoreFeatureFlagStoreInitConfig, CoreBaseFrontendServiceConstructorConfig, CoreInitializationErrorProps, CoreInitializationLoadingProps, CorePlyazServices, CorePlyazContextValue, CorePlyazProviderProps, CoreStreamStoreGetter, CoreStreamHandlerIds, CoreStreamHandlerDeclaration, UseServiceAsyncResult, } from './types';
6
6
  export type { CoreFrontendFeatureFlagEventType, CoreFeatureFlagStore, CoreFeatureFlagServiceConfig, CoreFeatureFlagServiceInitConfig, CoreFeatureFlagServiceInterface, } from './featureFlags';
@@ -1304,6 +1304,30 @@ export type CoreStreamStoreGetter = () => RootStoreSlice | undefined;
1304
1304
  * ```
1305
1305
  */
1306
1306
  export type CoreStreamHandlerIds<TKeys extends string> = Readonly<Record<TKeys, string>>;
1307
+ /**
1308
+ * Result type for async service hooks (useServiceAsync).
1309
+ *
1310
+ * Used by domain service hooks that may have loading state.
1311
+ *
1312
+ * @typeParam TService - The service type
1313
+ *
1314
+ * @example
1315
+ * ```typescript
1316
+ * import type { UseServiceAsyncResult } from '@plyaz/types/core';
1317
+ *
1318
+ * export function useNotificationsService(): UseServiceAsyncResult<FrontendNotificationsDomainService> {
1319
+ * return useServiceAsync<FrontendNotificationsDomainService>(NOTIFICATIONS_SERVICE_KEY);
1320
+ * }
1321
+ * ```
1322
+ */
1323
+ export interface UseServiceAsyncResult<TService> {
1324
+ /** The service instance (null while loading or on error) */
1325
+ service: TService | null;
1326
+ /** Whether the service is still loading */
1327
+ isLoading: boolean;
1328
+ /** Error if service initialization failed */
1329
+ error: Error | null;
1330
+ }
1307
1331
  /**
1308
1332
  * Declarative stream handler configuration.
1309
1333
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.45.6",
3
+ "version": "1.45.7",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",