@plyaz/core 1.2.0 → 1.3.0

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.
Files changed (240) hide show
  1. package/README.md +248 -183
  2. package/dist/adapters/index.d.ts +16 -0
  3. package/dist/adapters/index.d.ts.map +1 -0
  4. package/dist/adapters/nestjs.d.ts +79 -0
  5. package/dist/adapters/nestjs.d.ts.map +1 -0
  6. package/dist/adapters/nextjs.d.ts +28 -0
  7. package/dist/adapters/nextjs.d.ts.map +1 -0
  8. package/dist/backend/example/example.controller.d.ts +121 -0
  9. package/dist/backend/example/example.controller.d.ts.map +1 -0
  10. package/dist/backend/example/example.module.d.ts +29 -0
  11. package/dist/backend/example/example.module.d.ts.map +1 -0
  12. package/dist/backend/example/index.d.ts +8 -0
  13. package/dist/backend/example/index.d.ts.map +1 -0
  14. package/dist/backend/featureFlags/FeatureFlagDomainService.d.ts +150 -0
  15. package/dist/backend/featureFlags/FeatureFlagDomainService.d.ts.map +1 -0
  16. package/dist/backend/featureFlags/config/feature-flag.config.d.ts +28 -50
  17. package/dist/backend/featureFlags/config/feature-flag.config.d.ts.map +1 -1
  18. package/dist/backend/featureFlags/config/validation.d.ts +6 -6
  19. package/dist/backend/featureFlags/config/validation.d.ts.map +1 -1
  20. package/dist/backend/featureFlags/feature-flag.controller.d.ts +14 -55
  21. package/dist/backend/featureFlags/feature-flag.controller.d.ts.map +1 -1
  22. package/dist/backend/featureFlags/feature-flag.module.d.ts +36 -43
  23. package/dist/backend/featureFlags/feature-flag.module.d.ts.map +1 -1
  24. package/dist/backend/featureFlags/guards/feature-flag.guard.d.ts +16 -2
  25. package/dist/backend/featureFlags/guards/feature-flag.guard.d.ts.map +1 -1
  26. package/dist/backend/featureFlags/index.d.ts +6 -7
  27. package/dist/backend/featureFlags/index.d.ts.map +1 -1
  28. package/dist/backend/featureFlags/interceptors/error-handling-interceptor.d.ts.map +1 -1
  29. package/dist/backend/featureFlags/interceptors/feature-flag-logging-interceptor.d.ts.map +1 -1
  30. package/dist/backend/featureFlags/middleware/feature-flag-middleware.d.ts +6 -11
  31. package/dist/backend/featureFlags/middleware/feature-flag-middleware.d.ts.map +1 -1
  32. package/dist/backend/index.d.ts +5 -0
  33. package/dist/backend/index.d.ts.map +1 -1
  34. package/dist/base/cache/CacheKeyBuilder.d.ts +115 -0
  35. package/dist/base/cache/CacheKeyBuilder.d.ts.map +1 -0
  36. package/dist/base/cache/index.d.ts +1 -0
  37. package/dist/base/cache/index.d.ts.map +1 -1
  38. package/dist/base/cache/strategies/redis.d.ts.map +1 -1
  39. package/dist/base/observability/BaseAdapter.d.ts +79 -0
  40. package/dist/base/observability/BaseAdapter.d.ts.map +1 -0
  41. package/dist/base/observability/CompositeAdapter.d.ts +72 -0
  42. package/dist/base/observability/CompositeAdapter.d.ts.map +1 -0
  43. package/dist/base/observability/DatadogAdapter.d.ts +117 -0
  44. package/dist/base/observability/DatadogAdapter.d.ts.map +1 -0
  45. package/dist/base/observability/LoggerAdapter.d.ts +54 -0
  46. package/dist/base/observability/LoggerAdapter.d.ts.map +1 -0
  47. package/dist/base/observability/ObservabilityService.d.ts +160 -0
  48. package/dist/base/observability/ObservabilityService.d.ts.map +1 -0
  49. package/dist/base/observability/index.d.ts +17 -0
  50. package/dist/base/observability/index.d.ts.map +1 -0
  51. package/dist/domain/base/BaseBackendDomainService.d.ts +528 -0
  52. package/dist/domain/base/BaseBackendDomainService.d.ts.map +1 -0
  53. package/dist/domain/base/BaseDomainService.d.ts +284 -0
  54. package/dist/domain/base/BaseDomainService.d.ts.map +1 -0
  55. package/dist/domain/base/BaseFrontendDomainService.d.ts +493 -0
  56. package/dist/domain/base/BaseFrontendDomainService.d.ts.map +1 -0
  57. package/dist/domain/base/BaseMapper.d.ts +100 -0
  58. package/dist/domain/base/BaseMapper.d.ts.map +1 -0
  59. package/dist/domain/base/BaseValidator.d.ts +105 -0
  60. package/dist/domain/base/BaseValidator.d.ts.map +1 -0
  61. package/dist/domain/base/index.d.ts +10 -0
  62. package/dist/domain/base/index.d.ts.map +1 -0
  63. package/dist/domain/example/BackendExampleDomainService.d.ts +257 -0
  64. package/dist/domain/example/BackendExampleDomainService.d.ts.map +1 -0
  65. package/dist/domain/example/FrontendExampleDomainService.d.ts +164 -0
  66. package/dist/domain/example/FrontendExampleDomainService.d.ts.map +1 -0
  67. package/dist/domain/example/index.d.ts +10 -0
  68. package/dist/domain/example/index.d.ts.map +1 -0
  69. package/dist/domain/example/mappers/ExampleMapper.d.ts +67 -0
  70. package/dist/domain/example/mappers/ExampleMapper.d.ts.map +1 -0
  71. package/dist/domain/example/validators/ExampleValidator.d.ts +33 -0
  72. package/dist/domain/example/validators/ExampleValidator.d.ts.map +1 -0
  73. package/dist/domain/featureFlags/FrontendFeatureFlagDomainService.d.ts +86 -0
  74. package/dist/domain/featureFlags/FrontendFeatureFlagDomainService.d.ts.map +1 -0
  75. package/dist/domain/featureFlags/index.d.ts +10 -5
  76. package/dist/domain/featureFlags/index.d.ts.map +1 -1
  77. package/dist/domain/featureFlags/mappers/FeatureFlagMapper.d.ts +72 -0
  78. package/dist/domain/featureFlags/mappers/FeatureFlagMapper.d.ts.map +1 -0
  79. package/dist/domain/featureFlags/mappers/index.d.ts +8 -0
  80. package/dist/domain/featureFlags/mappers/index.d.ts.map +1 -0
  81. package/dist/domain/featureFlags/module.d.ts +20 -0
  82. package/dist/domain/featureFlags/module.d.ts.map +1 -0
  83. package/dist/domain/featureFlags/provider.d.ts +40 -1
  84. package/dist/domain/featureFlags/provider.d.ts.map +1 -1
  85. package/dist/domain/featureFlags/providers/api.d.ts +59 -34
  86. package/dist/domain/featureFlags/providers/api.d.ts.map +1 -1
  87. package/dist/domain/featureFlags/providers/database.d.ts +54 -47
  88. package/dist/domain/featureFlags/providers/database.d.ts.map +1 -1
  89. package/dist/domain/featureFlags/providers/factory.d.ts +50 -33
  90. package/dist/domain/featureFlags/providers/factory.d.ts.map +1 -1
  91. package/dist/domain/featureFlags/providers/file.d.ts +48 -1
  92. package/dist/domain/featureFlags/providers/file.d.ts.map +1 -1
  93. package/dist/domain/featureFlags/providers/memory.d.ts +32 -6
  94. package/dist/domain/featureFlags/providers/memory.d.ts.map +1 -1
  95. package/dist/domain/featureFlags/providers/redis.d.ts +6 -1
  96. package/dist/domain/featureFlags/providers/redis.d.ts.map +1 -1
  97. package/dist/domain/featureFlags/service.d.ts +112 -0
  98. package/dist/domain/featureFlags/service.d.ts.map +1 -0
  99. package/dist/domain/index.d.ts +2 -0
  100. package/dist/domain/index.d.ts.map +1 -1
  101. package/dist/engine/featureFlags/engine.d.ts +8 -0
  102. package/dist/engine/featureFlags/engine.d.ts.map +1 -1
  103. package/dist/entry-backend.d.ts +26 -0
  104. package/dist/entry-backend.d.ts.map +1 -0
  105. package/dist/entry-backend.js +15455 -0
  106. package/dist/entry-backend.js.map +1 -0
  107. package/dist/entry-backend.mjs +15339 -0
  108. package/dist/entry-backend.mjs.map +1 -0
  109. package/dist/entry-frontend.d.ts +23 -0
  110. package/dist/entry-frontend.d.ts.map +1 -0
  111. package/dist/entry-frontend.js +11340 -0
  112. package/dist/entry-frontend.js.map +1 -0
  113. package/dist/entry-frontend.mjs +11278 -0
  114. package/dist/entry-frontend.mjs.map +1 -0
  115. package/dist/events/CoreEventManager.d.ts +116 -0
  116. package/dist/events/CoreEventManager.d.ts.map +1 -0
  117. package/dist/events/index.d.ts +27 -0
  118. package/dist/events/index.d.ts.map +1 -0
  119. package/dist/frontend/base/index.d.ts +8 -0
  120. package/dist/frontend/base/index.d.ts.map +1 -0
  121. package/dist/frontend/components/InitializationError.d.ts +25 -0
  122. package/dist/frontend/components/InitializationError.d.ts.map +1 -0
  123. package/dist/frontend/components/InitializationLoading.d.ts +22 -0
  124. package/dist/frontend/components/InitializationLoading.d.ts.map +1 -0
  125. package/dist/frontend/components/index.d.ts +9 -0
  126. package/dist/frontend/components/index.d.ts.map +1 -0
  127. package/dist/frontend/example/index.d.ts +9 -0
  128. package/dist/frontend/example/index.d.ts.map +1 -0
  129. package/dist/frontend/featureFlags/index.d.ts +28 -7
  130. package/dist/frontend/featureFlags/index.d.ts.map +1 -1
  131. package/dist/frontend/index.d.ts +4 -0
  132. package/dist/frontend/index.d.ts.map +1 -1
  133. package/dist/frontend/providers/ApiProvider.d.ts +2 -2
  134. package/dist/frontend/providers/ApiProvider.d.ts.map +1 -1
  135. package/dist/frontend/providers/PlyazProvider.d.ts +305 -0
  136. package/dist/frontend/providers/PlyazProvider.d.ts.map +1 -0
  137. package/dist/frontend/providers/index.d.ts +1 -0
  138. package/dist/frontend/providers/index.d.ts.map +1 -1
  139. package/dist/frontend/store/feature-flags.d.ts +63 -0
  140. package/dist/frontend/store/feature-flags.d.ts.map +1 -0
  141. package/dist/frontend/store/index.d.ts +14 -0
  142. package/dist/frontend/store/index.d.ts.map +1 -0
  143. package/dist/frontend/store/integrations.d.ts +36 -0
  144. package/dist/frontend/store/integrations.d.ts.map +1 -0
  145. package/dist/frontend/store/service-accessors.d.ts +78 -0
  146. package/dist/frontend/store/service-accessors.d.ts.map +1 -0
  147. package/dist/index.d.ts +5 -2
  148. package/dist/index.d.ts.map +1 -1
  149. package/dist/index.js +15262 -0
  150. package/dist/index.js.map +1 -0
  151. package/dist/index.mjs +13667 -4861
  152. package/dist/index.mjs.map +1 -1
  153. package/dist/init/CoreInitializer.d.ts +583 -0
  154. package/dist/init/CoreInitializer.d.ts.map +1 -0
  155. package/dist/init/ServiceRegistry.d.ts +256 -0
  156. package/dist/init/ServiceRegistry.d.ts.map +1 -0
  157. package/dist/init/index.d.ts +14 -0
  158. package/dist/init/index.d.ts.map +1 -0
  159. package/dist/init/nestjs/CoreModule.d.ts +63 -0
  160. package/dist/init/nestjs/CoreModule.d.ts.map +1 -0
  161. package/dist/init/nestjs/index.d.ts +5 -0
  162. package/dist/init/nestjs/index.d.ts.map +1 -0
  163. package/dist/init/nestjs/index.js +9234 -0
  164. package/dist/init/nestjs/index.js.map +1 -0
  165. package/dist/init/nestjs/index.mjs +9230 -0
  166. package/dist/init/nestjs/index.mjs.map +1 -0
  167. package/dist/init/react.d.ts +33 -0
  168. package/dist/init/react.d.ts.map +1 -0
  169. package/dist/models/example/ExampleRepository.d.ts +166 -0
  170. package/dist/models/example/ExampleRepository.d.ts.map +1 -0
  171. package/dist/models/example/index.d.ts +7 -0
  172. package/dist/models/example/index.d.ts.map +1 -0
  173. package/dist/models/featureFlags/FeatureFlagRepository.d.ts +161 -0
  174. package/dist/models/featureFlags/FeatureFlagRepository.d.ts.map +1 -0
  175. package/dist/models/featureFlags/index.d.ts +7 -0
  176. package/dist/models/featureFlags/index.d.ts.map +1 -0
  177. package/dist/models/index.d.ts +9 -0
  178. package/dist/models/index.d.ts.map +1 -0
  179. package/dist/services/ApiClientService.d.ts +92 -4
  180. package/dist/services/ApiClientService.d.ts.map +1 -1
  181. package/dist/services/CacheService.d.ts +176 -0
  182. package/dist/services/CacheService.d.ts.map +1 -0
  183. package/dist/services/DbService.d.ts +393 -0
  184. package/dist/services/DbService.d.ts.map +1 -0
  185. package/dist/services/NotificationService.d.ts +153 -0
  186. package/dist/services/NotificationService.d.ts.map +1 -0
  187. package/dist/services/StorageService.d.ts +146 -0
  188. package/dist/services/StorageService.d.ts.map +1 -0
  189. package/dist/services/index.d.ts +4 -0
  190. package/dist/services/index.d.ts.map +1 -1
  191. package/dist/utils/common/id.d.ts +83 -0
  192. package/dist/utils/common/id.d.ts.map +1 -0
  193. package/dist/utils/common/index.d.ts +2 -0
  194. package/dist/utils/common/index.d.ts.map +1 -1
  195. package/dist/utils/common/object.d.ts +70 -0
  196. package/dist/utils/common/object.d.ts.map +1 -0
  197. package/dist/utils/featureFlags/conditions.d.ts.map +1 -1
  198. package/dist/utils/featureFlags/context.d.ts +0 -1
  199. package/dist/utils/featureFlags/context.d.ts.map +1 -1
  200. package/dist/utils/index.d.ts +1 -0
  201. package/dist/utils/index.d.ts.map +1 -1
  202. package/dist/utils/mapperUtils.d.ts +38 -0
  203. package/dist/utils/mapperUtils.d.ts.map +1 -0
  204. package/dist/utils/runtime.d.ts +15 -0
  205. package/dist/utils/runtime.d.ts.map +1 -0
  206. package/dist/version.d.ts +24 -0
  207. package/dist/version.d.ts.map +1 -0
  208. package/dist/web_app/auth/add_user.d.ts +2 -2
  209. package/dist/web_app/auth/add_user.d.ts.map +1 -1
  210. package/dist/web_app/auth/update_user.d.ts +1 -1
  211. package/dist/web_app/auth/update_user.d.ts.map +1 -1
  212. package/package.json +89 -15
  213. package/dist/backend/featureFlags/database/connection.d.ts +0 -321
  214. package/dist/backend/featureFlags/database/connection.d.ts.map +0 -1
  215. package/dist/backend/featureFlags/database/repository.d.ts +0 -518
  216. package/dist/backend/featureFlags/database/repository.d.ts.map +0 -1
  217. package/dist/backend/featureFlags/feature-flag.repository.d.ts +0 -85
  218. package/dist/backend/featureFlags/feature-flag.repository.d.ts.map +0 -1
  219. package/dist/backend/featureFlags/feature-flag.service.d.ts +0 -264
  220. package/dist/backend/featureFlags/feature-flag.service.d.ts.map +0 -1
  221. package/dist/frontend/featureFlags/hooks/useFeatureFlag.d.ts +0 -103
  222. package/dist/frontend/featureFlags/hooks/useFeatureFlag.d.ts.map +0 -1
  223. package/dist/frontend/featureFlags/hooks/useFeatureFlagActions.d.ts +0 -35
  224. package/dist/frontend/featureFlags/hooks/useFeatureFlagActions.d.ts.map +0 -1
  225. package/dist/frontend/featureFlags/hooks/useFeatureFlagHelpers.d.ts +0 -55
  226. package/dist/frontend/featureFlags/hooks/useFeatureFlagHelpers.d.ts.map +0 -1
  227. package/dist/frontend/featureFlags/hooks/useFeatureFlagProvider.d.ts +0 -57
  228. package/dist/frontend/featureFlags/hooks/useFeatureFlagProvider.d.ts.map +0 -1
  229. package/dist/frontend/featureFlags/providers/FeatureFlagProvider.d.ts +0 -99
  230. package/dist/frontend/featureFlags/providers/FeatureFlagProvider.d.ts.map +0 -1
  231. package/dist/frontend/featureFlags/providers/FeatureFlagProviderHelpers.d.ts +0 -31
  232. package/dist/frontend/featureFlags/providers/FeatureFlagProviderHelpers.d.ts.map +0 -1
  233. package/dist/frontend/featureFlags/providers/types.d.ts +0 -21
  234. package/dist/frontend/featureFlags/providers/types.d.ts.map +0 -1
  235. package/dist/index.cjs +0 -6435
  236. package/dist/index.cjs.map +0 -1
  237. package/dist/utils/db/databaseService.d.ts +0 -6
  238. package/dist/utils/db/databaseService.d.ts.map +0 -1
  239. package/dist/utils/db/index.d.ts +0 -2
  240. package/dist/utils/db/index.d.ts.map +0 -1
@@ -0,0 +1,153 @@
1
+ /**
2
+ * NotificationService - Singleton Notification Manager
3
+ *
4
+ * @description Manages notification delivery for the entire application using a singleton pattern.
5
+ * This service wraps @plyaz/notifications and provides a centralized way to initialize and access
6
+ * notification capabilities across all domains (transactional, marketing, system alerts, etc.).
7
+ *
8
+ * **Architecture:**
9
+ * - Uses `NotificationService` from @plyaz/notifications which supports multi-provider setup
10
+ * - Supports email (Infobip primary, SendGrid fallback), SMS, and push notifications
11
+ * - Automatic failover between providers based on health status
12
+ * - Event-driven architecture for tracking delivery, opens, clicks
13
+ * - **Proxy-based method forwarding**: All methods from the underlying service are
14
+ * automatically available with error handling - no manual wrapping needed
15
+ *
16
+ * **Provider Configuration:**
17
+ * - **Infobip**: Primary email provider (unified omnichannel platform)
18
+ * - **SendGrid**: Fallback email provider for transactional emails
19
+ *
20
+ * **Required Environment Variables (Infobip):**
21
+ * - INFOBIP_API_KEY: Your Infobip API key
22
+ * - INFOBIP_BASE_URL: Infobip API base URL
23
+ * - FROM_EMAIL: Default sender email address
24
+ *
25
+ * **Required Environment Variables (SendGrid):**
26
+ * - SENDGRID_API_KEY: Your SendGrid API key
27
+ * - FROM_EMAIL: Default sender email address
28
+ *
29
+ * @example Using with Core.initialize() (Recommended)
30
+ * ```typescript
31
+ * import { Core } from '@plyaz/core';
32
+ *
33
+ * await Core.initialize({
34
+ * notifications: {
35
+ * providers: {
36
+ * email: [infobipAdapter, sendGridAdapter],
37
+ * sms: [],
38
+ * push: [],
39
+ * },
40
+ * events: {
41
+ * onSent: (event) => console.log('Notification sent:', event),
42
+ * onFailed: (event) => console.error('Notification failed:', event),
43
+ * },
44
+ * },
45
+ * });
46
+ *
47
+ * // Access via Core.notifications - all methods automatically available
48
+ * await Core.notifications.sendEmail({
49
+ * recipientId: 'user-123',
50
+ * to: 'user@example.com',
51
+ * templateId: 'welcome',
52
+ * templateData: { userName: 'John' },
53
+ * });
54
+ * ```
55
+ *
56
+ * @module services
57
+ */
58
+ import { NotificationService as NotificationServiceImpl } from '@plyaz/notifications';
59
+ import type { CoreNotificationConfig } from '@plyaz/types/core';
60
+ export type { CoreNotificationConfig } from '@plyaz/types/core';
61
+ /**
62
+ * NotificationService - Singleton Notification Manager with Proxy-based method forwarding
63
+ *
64
+ * Provides centralized notification management for all domains.
65
+ * Uses @plyaz/notifications under the hood with configurable providers and templates.
66
+ *
67
+ * All methods from the underlying NotificationServiceImpl are automatically available
68
+ * via Proxy - when new methods are added to @plyaz/notifications, they're instantly
69
+ * accessible here with automatic error handling.
70
+ */
71
+ export declare class NotificationService {
72
+ private static instance;
73
+ private notificationService;
74
+ private config;
75
+ private initialized;
76
+ private constructor();
77
+ /**
78
+ * Emits a notification error event via CoreEventManager.
79
+ * Called when notification operations fail to integrate with global error handling.
80
+ */
81
+ private emitNotificationError;
82
+ /**
83
+ * Gets the singleton instance of NotificationService
84
+ */
85
+ static getInstance(): NotificationService;
86
+ /**
87
+ * Checks if the notification service has been initialized
88
+ */
89
+ static isInitialized(): boolean;
90
+ /**
91
+ * Resets the notification service by clearing the singleton instance
92
+ */
93
+ static reset(): Promise<void>;
94
+ /**
95
+ * Initializes the notification service
96
+ *
97
+ * @param config - Notification service configuration
98
+ * @returns The initialized NotificationService instance
99
+ */
100
+ static initialize(config: CoreNotificationConfig): Promise<NotificationService>;
101
+ /**
102
+ * Gets the raw underlying notification service instance without error handling wrapper.
103
+ * Use this only if you need direct access to the underlying service.
104
+ *
105
+ * @returns The raw NotificationService instance from @plyaz/notifications
106
+ * @throws {NotificationsPackageError} When notifications is not initialized
107
+ */
108
+ private getRawNotifications;
109
+ /**
110
+ * Gets the notification service with automatic error handling.
111
+ * All method calls are wrapped with try/catch and emit error events on failure.
112
+ * Any method added to @plyaz/notifications will be automatically available.
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const notifications = NotificationService.getInstance().getNotifications();
117
+ * await notifications.sendEmail({ to: 'user@example.com', templateId: 'welcome' });
118
+ * await notifications.sendSMS({ to: '+1234567890', message: 'Hello!' });
119
+ * ```
120
+ *
121
+ * @returns NotificationServiceImpl with automatic error handling
122
+ */
123
+ getNotifications(): NotificationServiceImpl;
124
+ /**
125
+ * Performs a health check on the notification service.
126
+ * This method has special handling to transform the response format.
127
+ */
128
+ healthCheck(): Promise<{
129
+ isHealthy: boolean;
130
+ providers?: unknown[];
131
+ error?: string;
132
+ }>;
133
+ /**
134
+ * Gets the current configuration
135
+ */
136
+ getConfig(): CoreNotificationConfig | null;
137
+ /**
138
+ * Closes the notification service and cleans up resources
139
+ */
140
+ close(): Promise<void>;
141
+ /**
142
+ * Creates a dedicated notification service instance (NOT the singleton)
143
+ *
144
+ * Use this when you need an isolated notification service with its own configuration.
145
+ *
146
+ * @param config - Notification service configuration
147
+ * @returns Promise that resolves to a new dedicated NotificationService instance
148
+ */
149
+ static createInstance(config: CoreNotificationConfig): Promise<NotificationService>;
150
+ }
151
+ /** Type alias for NotificationService instance (use for type-only imports to avoid bundling) */
152
+ export type NotificationServiceInstance = NotificationService;
153
+ //# sourceMappingURL=NotificationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationService.d.ts","sourceRoot":"","sources":["../../src/services/NotificationService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMhE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAShE;;;;;;;;;GASG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAoC;IAC3D,OAAO,CAAC,mBAAmB,CAAwC;IACnE,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO;IAMP;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAmB7B;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,mBAAmB;IAKzC;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,OAAO;IAI/B;;OAEG;WACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IASnC;;;;;OAKG;WACU,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAcrF;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;;;;;;;;;;OAaG;IACH,gBAAgB,IAAI,uBAAuB;IA6C3C;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAyB3F;;OAEG;IACH,SAAS,IAAI,sBAAsB,GAAG,IAAI;IAI1C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B;;;;;;;OAOG;WACU,cAAc,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAO1F;AAED,gGAAgG;AAChG,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * StorageService - Singleton File Storage Manager
3
+ *
4
+ * @description Manages file storage operations for the entire application using a singleton pattern.
5
+ * This service wraps @plyaz/storage and provides a centralized way to initialize and access
6
+ * file storage across all domains (media uploads, compliance documents, user avatars, etc.).
7
+ *
8
+ * **Architecture:**
9
+ * - Uses `StorageService` from @plyaz/storage which supports multi-provider setup
10
+ * - Supports Cloudflare R2 (compliance documents) and Supabase Storage (assets/media)
11
+ * - Automatic failover between providers based on health status
12
+ * - Event-driven architecture with 40+ event types
13
+ * - **Proxy-based method forwarding**: All methods from the underlying service are
14
+ * automatically available with error handling - no manual wrapping needed
15
+ *
16
+ * **Provider Configuration:**
17
+ * - **Cloudflare R2**: For compliance documents (tax, invoices, KYC) with zero egress fees
18
+ * - **Supabase Storage**: For assets like images, user avatars, media files
19
+ *
20
+ * **Required Environment Variables (Cloudflare R2):**
21
+ * - CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
22
+ * - R2_ACCESS_KEY_ID: R2 access key
23
+ * - R2_SECRET_ACCESS_KEY: R2 secret key
24
+ * - R2_BUCKET_NAME: Default bucket name
25
+ *
26
+ * **Required Environment Variables (Supabase Storage):**
27
+ * - SUPABASE_URL: Your Supabase project URL
28
+ * - SUPABASE_SERVICE_ROLE_KEY: Service role key for storage operations
29
+ *
30
+ * @example Using with Core.initialize() (Recommended)
31
+ * ```typescript
32
+ * import { Core } from '@plyaz/core';
33
+ *
34
+ * await Core.initialize({
35
+ * storage: {
36
+ * adapters: [r2Adapter, supabaseAdapter],
37
+ * plugins: [virusScanPlugin, sharpImagePlugin],
38
+ * },
39
+ * });
40
+ *
41
+ * // Access via Core.storage - all methods automatically available
42
+ * const result = await Core.storage.uploadFile({
43
+ * file: buffer,
44
+ * filename: 'document.pdf',
45
+ * category: FILE_CATEGORY.COMPLIANCE_DOCUMENT,
46
+ * });
47
+ * ```
48
+ *
49
+ * @module services
50
+ */
51
+ import { StorageService as StorageServiceImpl } from '@plyaz/storage';
52
+ import type { CoreStorageConfig } from '@plyaz/types/core';
53
+ export type { CoreStorageConfig } from '@plyaz/types/core';
54
+ /**
55
+ * StorageService - Singleton File Storage Manager with Proxy-based method forwarding
56
+ *
57
+ * Provides centralized file storage management for all domains.
58
+ * Uses @plyaz/storage under the hood with configurable providers and plugins.
59
+ *
60
+ * All methods from the underlying StorageServiceImpl are automatically available
61
+ * via Proxy - when new methods are added to @plyaz/storage, they're instantly
62
+ * accessible here with automatic error handling.
63
+ */
64
+ export declare class StorageService {
65
+ private static instance;
66
+ private storageService;
67
+ private config;
68
+ private initialized;
69
+ private constructor();
70
+ /**
71
+ * Emits a storage error event via CoreEventManager.
72
+ * Called when storage operations fail to integrate with global error handling.
73
+ */
74
+ private emitStorageError;
75
+ /**
76
+ * Gets the singleton instance of StorageService
77
+ */
78
+ static getInstance(): StorageService;
79
+ /**
80
+ * Checks if the storage service has been initialized
81
+ */
82
+ static isInitialized(): boolean;
83
+ /**
84
+ * Resets the storage service by clearing the singleton instance
85
+ */
86
+ static reset(): Promise<void>;
87
+ /**
88
+ * Initializes the storage service
89
+ *
90
+ * @param config - Storage service configuration
91
+ * @returns The initialized StorageService instance
92
+ */
93
+ static initialize(config: CoreStorageConfig): Promise<StorageService>;
94
+ /**
95
+ * Gets the raw underlying storage service instance without error handling wrapper.
96
+ * Use this only if you need direct access to the underlying service.
97
+ *
98
+ * @returns The raw StorageService instance from @plyaz/storage
99
+ * @throws {StoragePackageError} When storage is not initialized
100
+ */
101
+ private getRawStorage;
102
+ /**
103
+ * Gets the storage service with automatic error handling.
104
+ * All method calls are wrapped with try/catch and emit error events on failure.
105
+ * Any method added to @plyaz/storage will be automatically available.
106
+ *
107
+ * @example
108
+ * ```typescript
109
+ * const storage = StorageService.getInstance().getStorage();
110
+ * await storage.uploadFile({ file, filename: 'doc.pdf' });
111
+ * await storage.deleteFile({ fileId: '123' });
112
+ * ```
113
+ *
114
+ * @returns StorageServiceImpl with automatic error handling
115
+ */
116
+ getStorage(): StorageServiceImpl;
117
+ /**
118
+ * Performs a health check on the storage service by checking all adapter health.
119
+ * This method has special handling to transform the response format.
120
+ */
121
+ healthCheck(): Promise<{
122
+ isHealthy: boolean;
123
+ responseTime?: number;
124
+ error?: string;
125
+ }>;
126
+ /**
127
+ * Gets the current configuration
128
+ */
129
+ getConfig(): CoreStorageConfig | null;
130
+ /**
131
+ * Closes the storage service and cleans up resources
132
+ */
133
+ close(): Promise<void>;
134
+ /**
135
+ * Creates a dedicated storage service instance (NOT the singleton)
136
+ *
137
+ * Use this when you need an isolated storage connection with its own configuration.
138
+ *
139
+ * @param config - Storage service configuration
140
+ * @returns Promise that resolves to a new dedicated StorageService instance
141
+ */
142
+ static createInstance(config: CoreStorageConfig): Promise<StorageService>;
143
+ }
144
+ /** Type alias for StorageService instance (use for type-only imports to avoid bundling) */
145
+ export type StorageServiceInstance = StorageService;
146
+ //# sourceMappingURL=StorageService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageService.d.ts","sourceRoot":"","sources":["../../src/services/StorageService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAGH,OAAO,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAO3D,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAY3D;;;;;;;;;GASG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA+B;IACtD,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO;IAMP;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAexB;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,cAAc;IAKpC;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,OAAO;IAI/B;;OAEG;WACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IASnC;;;;;OAKG;WACU,UAAU,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAgB3E;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAcrB;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,kBAAkB;IA6ChC;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAkC3F;;OAEG;IACH,SAAS,IAAI,iBAAiB,GAAG,IAAI;IAIrC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B;;;;;;;OAOG;WACU,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;CAShF;AAED,2FAA2F;AAC3F,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC"}
@@ -5,4 +5,8 @@
5
5
  * @module services
6
6
  */
7
7
  export * from './ApiClientService';
8
+ export * from './CacheService';
9
+ export * from './DbService';
10
+ export * from './StorageService';
11
+ export * from './NotificationService';
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * ID Generation Utilities
3
+ *
4
+ * Provides consistent ID generation across the application.
5
+ * Uses globalThis.crypto when available, with a fallback for environments without it.
6
+ *
7
+ * @fileoverview ID generation utility functions
8
+ */
9
+ /**
10
+ * Generate a UUID v4 string.
11
+ * Uses crypto.randomUUID when available, otherwise falls back to a timestamp-based ID.
12
+ *
13
+ * @returns A UUID v4 string or fallback ID
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const id = generateId();
18
+ * // => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' (crypto available)
19
+ * // => '1701475200000-x7k9m2' (fallback)
20
+ * ```
21
+ */
22
+ export declare function generateId(): string;
23
+ /**
24
+ * Generate a short random ID (8 characters).
25
+ * Useful for correlation IDs, short references, etc.
26
+ *
27
+ * @returns A short random string
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const shortId = generateShortId();
32
+ * // => 'x7k9m2ab'
33
+ * ```
34
+ */
35
+ export declare function generateShortId(): string;
36
+ /**
37
+ * Generate a correlation ID for tracing.
38
+ * Format: timestamp-randomString
39
+ *
40
+ * @returns A correlation ID string
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const correlationId = generateCorrelationId();
45
+ * // => '1701475200000-x7k9m2'
46
+ * ```
47
+ */
48
+ export declare function generateCorrelationId(): string;
49
+ /**
50
+ * Generate a trace ID for distributed tracing (32 hex characters / 128 bits).
51
+ *
52
+ * @returns A 32-character hex string
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * const traceId = generateTraceId();
57
+ * // => 'a1b2c3d4e5f67890abcdef1234567890'
58
+ * ```
59
+ */
60
+ export declare function generateTraceId(): string;
61
+ /**
62
+ * Generate a span ID for distributed tracing (16 hex characters / 64 bits).
63
+ *
64
+ * @returns A 16-character hex string
65
+ *
66
+ * @example
67
+ * ```typescript
68
+ * const spanId = generateSpanId();
69
+ * // => 'a1b2c3d4e5f67890'
70
+ * ```
71
+ */
72
+ export declare function generateSpanId(): string;
73
+ /**
74
+ * ID generation utilities object for convenient access.
75
+ */
76
+ export declare const IdUtils: {
77
+ readonly generate: typeof generateId;
78
+ readonly generateShort: typeof generateShortId;
79
+ readonly generateCorrelation: typeof generateCorrelationId;
80
+ readonly generateTraceId: typeof generateTraceId;
81
+ readonly generateSpanId: typeof generateSpanId;
82
+ };
83
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/utils/common/id.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAWxC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAQvC;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;CAMV,CAAC"}
@@ -6,6 +6,8 @@
6
6
  * @fileoverview Common utilities export
7
7
  */
8
8
  export { hashString, isInRollout, createRolloutIdentifier, HashUtils } from './hash';
9
+ export { generateId, generateShortId, generateCorrelationId, generateTraceId, generateSpanId, IdUtils, } from './id';
9
10
  export { isTruthy, toBoolean, ValueUtils } from './values';
11
+ export { setNestedProperty, getNestedProperty, hasNestedProperty, ObjectUtils } from './object';
10
12
  export * from './validation';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGrF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3D,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGrF,OAAO,EACL,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,OAAO,GACR,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhG,cAAc,cAAc,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Object Utilities
3
+ *
4
+ * Provides utilities for working with nested object paths and property access.
5
+ *
6
+ * @fileoverview Object manipulation utilities
7
+ */
8
+ /**
9
+ * Sets a value at a nested path in an object, creating intermediate objects as needed.
10
+ *
11
+ * @param obj - The target object to modify
12
+ * @param path - Dot-separated path to the property (e.g., 'user.profile.name')
13
+ * @param value - The value to set at the path
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const obj = { user: { id: 1 } };
18
+ * setNestedProperty(obj, 'user.profile.name', 'John');
19
+ * // Result: { user: { id: 1, profile: { name: 'John' } } }
20
+ * ```
21
+ */
22
+ export declare function setNestedProperty(obj: Record<string, unknown>, path: string, value: unknown): void;
23
+ /**
24
+ * Gets a value at a nested path in an object.
25
+ *
26
+ * @param obj - The source object to read from
27
+ * @param path - Dot-separated path to the property (e.g., 'user.profile.name')
28
+ * @param defaultValue - Optional default value if the path doesn't exist
29
+ * @returns The value at the path, or defaultValue if not found
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * const obj = { user: { profile: { name: 'John' } } };
34
+ * getNestedProperty(obj, 'user.profile.name'); // 'John'
35
+ * getNestedProperty(obj, 'user.settings.theme', 'dark'); // 'dark' (default)
36
+ * ```
37
+ */
38
+ export declare function getNestedProperty<T = unknown>(obj: Record<string, unknown>, path: string, defaultValue?: T): T | undefined;
39
+ /**
40
+ * Checks if a nested path exists in an object.
41
+ *
42
+ * @param obj - The object to check
43
+ * @param path - Dot-separated path to check (e.g., 'user.profile.name')
44
+ * @returns True if the path exists and is not undefined
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * const obj = { user: { profile: { name: 'John' } } };
49
+ * hasNestedProperty(obj, 'user.profile.name'); // true
50
+ * hasNestedProperty(obj, 'user.settings.theme'); // false
51
+ * ```
52
+ */
53
+ export declare function hasNestedProperty(obj: Record<string, unknown>, path: string): boolean;
54
+ /**
55
+ * Object utilities namespace for convenient grouped access.
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * import { ObjectUtils } from '@plyaz/core/utils';
60
+ *
61
+ * ObjectUtils.setNestedProperty(obj, 'user.name', 'John');
62
+ * const name = ObjectUtils.getNestedProperty(obj, 'user.name');
63
+ * ```
64
+ */
65
+ export declare const ObjectUtils: {
66
+ readonly setNestedProperty: typeof setNestedProperty;
67
+ readonly getNestedProperty: typeof getNestedProperty;
68
+ readonly hasNestedProperty: typeof hasNestedProperty;
69
+ };
70
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/common/object.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,IAAI,CAgBN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAC3C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,CAAC,GACf,CAAC,GAAG,SAAS,CAaf;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAA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;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,GACtB,OAAO,CAeT;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,EACvB,YAAY,EAAE,OAAO,GACpB,OAAO,CAQT;AAqBD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,GACtB,OAAO,CAeT;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;;OAMG;iDAEW,oBAAoB,EAAE,gBACpB,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,KACvC,OAAO;IAUV;;;;;;OAMG;gDAEW,oBAAoB,EAAE,gBACpB,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,KACvC,OAAO;IAUV;;;;;OAKG;4CAEU,OAAO,CAAC,oBAAoB,CAAC,KACvC;QACD,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB;IAmCD;;;;;;;OAOG;sCAEM,MAAM,YACH,oBAAoB,CAAC,UAAU,CAAC,SACnC,oBAAoB,CAAC,OAAO,CAAC,KACnC,oBAAoB;CAaf,CAAC"}
@@ -2,7 +2,6 @@
2
2
  * Feature Flag Context Utilities
3
3
  *
4
4
  * Utilities for building, validating, and manipulating feature flag contexts.
5
- * Re-exports the context builder and utilities from domain layer for convenience.
6
5
  *
7
6
  * @fileoverview Feature flag context utilities
8
7
  * @version 1.0.0
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/utils/featureFlags/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD;;;;;;;;;;;;;;;;GAgBG;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ClB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAWA;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,GAAG;IACF,WAAW,EAAE,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAWA"}
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export * from './common';
5
5
  export * from './featureFlags';
6
+ export * from './runtime';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Mapper Utility Functions
3
+ *
4
+ * Common utilities for data transformation in mappers.
5
+ */
6
+ /**
7
+ * Convert snake_case to camelCase
8
+ */
9
+ export declare function snakeToCamel(str: string): string;
10
+ /**
11
+ * Convert camelCase to snake_case
12
+ */
13
+ export declare function camelToSnake(str: string): string;
14
+ /**
15
+ * Parse ISO date string to Date object
16
+ */
17
+ export declare function parseDate(dateString: string | null | undefined): Date | null;
18
+ /**
19
+ * Format Date to ISO string for API
20
+ */
21
+ export declare function formatDate(date: Date | null | undefined): string | null;
22
+ /**
23
+ * Trim string if defined
24
+ */
25
+ export declare function trimString(str: string | undefined): string | undefined;
26
+ /**
27
+ * Pick only defined values from object (for PATCH requests)
28
+ */
29
+ export declare function pickDefined<T extends Record<string, unknown>>(obj: T): Partial<T>;
30
+ /**
31
+ * Convert object keys from snake_case to camelCase
32
+ */
33
+ export declare function keysToCamel<T extends Record<string, unknown>>(obj: T): Record<string, unknown>;
34
+ /**
35
+ * Convert object keys from camelCase to snake_case
36
+ */
37
+ export declare function keysToSnake<T extends Record<string, unknown>>(obj: T): Record<string, unknown>;
38
+ //# sourceMappingURL=mapperUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapperUtils.d.ts","sourceRoot":"","sources":["../../src/utils/mapperUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAI5E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAEvE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEtE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAQjF;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM9F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM9F"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Runtime Detection Utilities
3
+ *
4
+ * Utilities for detecting the current JavaScript runtime environment.
5
+ */
6
+ import type { CoreRuntimeEnvironment } from '@plyaz/types/core';
7
+ /**
8
+ * Detect the current runtime environment
9
+ */
10
+ export declare function detectRuntime(): CoreRuntimeEnvironment;
11
+ /**
12
+ * Load environment variables from a .env file
13
+ */
14
+ export declare function loadEnvFile(envPath: string, verbose?: boolean): Promise<void>;
15
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/utils/runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AA6DhE;;GAEG;AACH,wBAAgB,aAAa,IAAI,sBAAsB,CAmBtD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAanF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Package version - single source of truth
3
+ *
4
+ * Reads version from package.json to ensure consistency across:
5
+ * - Health check endpoints
6
+ * - API headers (X-Version)
7
+ * - Observability tags
8
+ * - Logging metadata
9
+ */
10
+ /**
11
+ * Get the package version from package.json
12
+ * Caches the result for subsequent calls
13
+ */
14
+ export declare function getPackageVersion(): string;
15
+ /**
16
+ * Package version constant
17
+ * Use this for static contexts where async/dynamic loading isn't needed
18
+ */
19
+ export declare const VERSION: string;
20
+ /**
21
+ * Package name
22
+ */
23
+ export declare const PACKAGE_NAME = "@plyaz/core";
24
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAuB1C;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,QAAsB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,YAAY,gBAAgB,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type DBUser } from '@plyaz/types';
2
- export declare const userData: DBUser;
1
+ import type { CoreDBUser } from '@plyaz/types/core';
2
+ export declare const userData: CoreDBUser;
3
3
  //# sourceMappingURL=add_user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add_user.d.ts","sourceRoot":"","sources":["../../../src/web_app/auth/add_user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,QAAQ,EAAE,MAiBtB,CAAC"}
1
+ {"version":3,"file":"add_user.d.ts","sourceRoot":"","sources":["../../../src/web_app/auth/add_user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,QAAQ,EAAE,UAiBtB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const UpdateUser: <T extends Object>(table: string, id: string, input: T) => Promise<unknown>;
1
+ export declare const UpdateUser: <T extends Record<string, unknown>>(table: string, id: string, input: T) => Promise<unknown>;
2
2
  //# sourceMappingURL=update_user.d.ts.map