@posiwise/common-services 0.2.18 → 0.2.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/common-services",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.6",
6
6
  "@angular/core": "^21.2.6",
@@ -115,6 +115,28 @@ declare class MainApiHttpService extends BaseHttpService {
115
115
  static ɵprov: i0.ɵɵInjectableDeclaration<MainApiHttpService>;
116
116
  }
117
117
 
118
+ /**
119
+ * Centralized feature flag evaluation service.
120
+ * Reads the `feature_flags` hash from the current user object
121
+ * (populated by the backend FeatureFlags::Evaluator via GET /v1/user).
122
+ *
123
+ * Usage (programmatic):
124
+ * if (this.featureFlagService.isEnabled('smart_crm_dashboard')) { ... }
125
+ *
126
+ * Usage (template — via *featureFlag directive):
127
+ * <div *featureFlag="'smart_crm_dashboard'">...</div>
128
+ */
129
+ declare class FeatureFlagService {
130
+ user: User;
131
+ /**
132
+ * Returns true if the given flag key is enabled for the current user.
133
+ * Defaults to false when the flag is missing or user is not set.
134
+ */
135
+ isEnabled(flagKey: string): boolean;
136
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeatureFlagService, never>;
137
+ static ɵprov: i0.ɵɵInjectableDeclaration<FeatureFlagService>;
138
+ }
139
+
118
140
  declare class PermissionService {
119
141
  private readonly api;
120
142
  static selectedProduct: any;
@@ -1183,5 +1205,5 @@ declare class BrainApiService {
1183
1205
  static ɵprov: i0.ɵɵInjectableDeclaration<BrainApiService>;
1184
1206
  }
1185
1207
 
1186
- export { AbTestService, AhoyService, AuthService, BaseHttpService, BrainApiHttpService, BrainApiService, CommonService, CommonServicesModule, CustomPreloadingStrategy, CustomToastService, DashboardService, DataService, FormHelperService, GeoService, GoogleAnalyticsService, GroupService, HopscotchService, IntegrationsApiHttpService, LinkService, LocalStorage, LogoCacheService, MailBoxService, MainApiHttpService, McpJsonRpcService, NgbDateCustomParserFormatter, NotificationService, NumberPickerService, PermissionService, PrimeNgHelper, ProductService, ProfileService, QualificationService, ScriptLoaderService, SecureTokenStorageService, SentryErrorHandler, SeoService, SubscriptionService, TagService, TipsService, UserEffects, UserService, ValidationService, WebsocketService, WindowService };
1208
+ export { AbTestService, AhoyService, AuthService, BaseHttpService, BrainApiHttpService, BrainApiService, CommonService, CommonServicesModule, CustomPreloadingStrategy, CustomToastService, DashboardService, DataService, FeatureFlagService, FormHelperService, GeoService, GoogleAnalyticsService, GroupService, HopscotchService, IntegrationsApiHttpService, LinkService, LocalStorage, LogoCacheService, MailBoxService, MainApiHttpService, McpJsonRpcService, NgbDateCustomParserFormatter, NotificationService, NumberPickerService, PermissionService, PrimeNgHelper, ProductService, ProfileService, QualificationService, ScriptLoaderService, SecureTokenStorageService, SentryErrorHandler, SeoService, SubscriptionService, TagService, TipsService, UserEffects, UserService, ValidationService, WebsocketService, WindowService };
1187
1209
  export type { McpJsonRpcError, McpJsonRpcRequest, McpJsonRpcResponse, McpToolDefinition, McpToolsListResult };