@actschurch/ccms-sdk 0.0.4 → 0.0.5
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/README.md +55 -1
- package/dist/core/Config.d.ts +21 -2
- package/dist/core/Config.d.ts.map +1 -1
- package/dist/core/Config.js.map +1 -1
- package/dist/core/HttpClient.d.ts +5 -0
- package/dist/core/HttpClient.d.ts.map +1 -1
- package/dist/core/HttpClient.js +75 -0
- package/dist/core/HttpClient.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/file/Folder.d.ts +179 -0
- package/dist/models/file/Folder.d.ts.map +1 -0
- package/dist/models/file/Folder.js +6 -0
- package/dist/models/file/Folder.js.map +1 -0
- package/dist/models/file/ModelView/FileRecordModelView.d.ts +3 -0
- package/dist/models/file/ModelView/FileRecordModelView.d.ts.map +1 -1
- package/dist/models/file/PresignUploadRequest.d.ts +4 -0
- package/dist/models/file/PresignUploadRequest.d.ts.map +1 -1
- package/dist/models/file/index.d.ts +1 -0
- package/dist/models/file/index.d.ts.map +1 -1
- package/dist/models/file/index.js +1 -0
- package/dist/models/file/index.js.map +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/socialmedia/index.d.ts +322 -0
- package/dist/models/socialmedia/index.d.ts.map +1 -0
- package/dist/models/socialmedia/index.js +6 -0
- package/dist/models/socialmedia/index.js.map +1 -0
- package/dist/models/system/ModelView/Health.d.ts +14 -11
- package/dist/models/system/ModelView/Health.d.ts.map +1 -1
- package/dist/models/system/ModelView/Health.js +1 -0
- package/dist/models/system/ModelView/Health.js.map +1 -1
- package/dist/models/system/ModelView/RabbitMQManagement.d.ts +93 -92
- package/dist/models/system/ModelView/RabbitMQManagement.d.ts.map +1 -1
- package/dist/models/system/ModelView/RedisManagement.d.ts +94 -42
- package/dist/models/system/ModelView/RedisManagement.d.ts.map +1 -1
- package/dist/models/task/ModelView/CreateTask.d.ts +14 -17
- package/dist/models/task/ModelView/CreateTask.d.ts.map +1 -1
- package/dist/models/task/ModelView/UpdateTaskPriorityRequest.d.ts +10 -0
- package/dist/models/task/ModelView/UpdateTaskPriorityRequest.d.ts.map +1 -0
- package/dist/models/task/ModelView/UpdateTaskPriorityRequest.js +2 -0
- package/dist/models/task/ModelView/UpdateTaskPriorityRequest.js.map +1 -0
- package/dist/models/task/ModelView/UpdateTaskProjectRequest.d.ts +10 -0
- package/dist/models/task/ModelView/UpdateTaskProjectRequest.d.ts.map +1 -0
- package/dist/models/task/ModelView/UpdateTaskProjectRequest.js +2 -0
- package/dist/models/task/ModelView/UpdateTaskProjectRequest.js.map +1 -0
- package/dist/models/task/ModelView/index.d.ts +2 -0
- package/dist/models/task/ModelView/index.d.ts.map +1 -1
- package/dist/models/task/ModelView/index.js +2 -0
- package/dist/models/task/ModelView/index.js.map +1 -1
- package/dist/react/CCMSProvider.d.ts +1 -19
- package/dist/react/CCMSProvider.d.ts.map +1 -1
- package/dist/react/CCMSProvider.js +71 -56
- package/dist/react/CCMSProvider.js.map +1 -1
- package/dist/react/hooks/index.d.ts +0 -1
- package/dist/react/hooks/index.d.ts.map +1 -1
- package/dist/react/hooks/index.js +1 -3
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/services/index.d.ts +1 -0
- package/dist/react/hooks/services/index.d.ts.map +1 -1
- package/dist/react/hooks/services/index.js +2 -0
- package/dist/react/hooks/services/index.js.map +1 -1
- package/dist/react/hooks/services/useSocialMediaServices.d.ts +43 -0
- package/dist/react/hooks/services/useSocialMediaServices.d.ts.map +1 -0
- package/dist/react/hooks/services/useSocialMediaServices.js +65 -0
- package/dist/react/hooks/services/useSocialMediaServices.js.map +1 -0
- package/dist/react/hooks/services/useUsersServices.d.ts +5 -1
- package/dist/react/hooks/services/useUsersServices.d.ts.map +1 -1
- package/dist/react/hooks/services/useUsersServices.js +6 -0
- package/dist/react/hooks/services/useUsersServices.js.map +1 -1
- package/dist/react/hooks/useCCMS.d.ts +7 -4
- package/dist/react/hooks/useCCMS.d.ts.map +1 -1
- package/dist/react/hooks/useCCMS.js +8 -4
- package/dist/react/hooks/useCCMS.js.map +1 -1
- package/dist/realtime/index.d.ts +1 -1
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime/index.js +2 -5
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime/presence/ActivityTracker.d.ts +141 -0
- package/dist/realtime/presence/ActivityTracker.d.ts.map +1 -0
- package/dist/realtime/presence/ActivityTracker.js +342 -0
- package/dist/realtime/presence/ActivityTracker.js.map +1 -0
- package/dist/realtime/presence/AutoHeartbeatManager.d.ts +68 -0
- package/dist/realtime/presence/AutoHeartbeatManager.d.ts.map +1 -0
- package/dist/realtime/presence/AutoHeartbeatManager.js +160 -0
- package/dist/realtime/presence/AutoHeartbeatManager.js.map +1 -0
- package/dist/realtime/presence/IdleDetector.d.ts +107 -0
- package/dist/realtime/presence/IdleDetector.d.ts.map +1 -0
- package/dist/realtime/presence/IdleDetector.js +270 -0
- package/dist/realtime/presence/IdleDetector.js.map +1 -0
- package/dist/realtime/presence/PresenceClient.d.ts +18 -2
- package/dist/realtime/presence/PresenceClient.d.ts.map +1 -1
- package/dist/realtime/presence/PresenceClient.js +54 -1
- package/dist/realtime/presence/PresenceClient.js.map +1 -1
- package/dist/realtime/presence/PresenceManager.d.ts +191 -0
- package/dist/realtime/presence/PresenceManager.d.ts.map +1 -0
- package/dist/realtime/presence/PresenceManager.js +314 -0
- package/dist/realtime/presence/PresenceManager.js.map +1 -0
- package/dist/realtime/presence/PresenceProvider.d.ts +16 -0
- package/dist/realtime/presence/PresenceProvider.d.ts.map +1 -1
- package/dist/realtime/presence/PresenceProvider.js +16 -0
- package/dist/realtime/presence/PresenceProvider.js.map +1 -1
- package/dist/realtime/presence/index.d.ts +5 -0
- package/dist/realtime/presence/index.d.ts.map +1 -1
- package/dist/realtime/presence/index.js +10 -0
- package/dist/realtime/presence/index.js.map +1 -1
- package/dist/realtime/presence/types.d.ts +23 -5
- package/dist/realtime/presence/types.d.ts.map +1 -1
- package/dist/realtime/presence/types.js +5 -5
- package/dist/realtime/presence/types.js.map +1 -1
- package/dist/realtime/presence/utils.d.ts +87 -0
- package/dist/realtime/presence/utils.d.ts.map +1 -0
- package/dist/realtime/presence/utils.js +191 -0
- package/dist/realtime/presence/utils.js.map +1 -0
- package/dist/realtime/shared/BaseSignalRClient.d.ts.map +1 -1
- package/dist/realtime/shared/BaseSignalRClient.js +38 -4
- package/dist/realtime/shared/BaseSignalRClient.js.map +1 -1
- package/dist/services/file/FileService.d.ts +55 -1
- package/dist/services/file/FileService.d.ts.map +1 -1
- package/dist/services/file/FileService.js +114 -0
- package/dist/services/file/FileService.js.map +1 -1
- package/dist/services/file/FolderService.d.ts +99 -0
- package/dist/services/file/FolderService.d.ts.map +1 -0
- package/dist/services/file/FolderService.js +147 -0
- package/dist/services/file/FolderService.js.map +1 -0
- package/dist/services/file/index.d.ts +3 -0
- package/dist/services/file/index.d.ts.map +1 -1
- package/dist/services/file/index.js +3 -0
- package/dist/services/file/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/socialmedia/SocialMediaAccountService.d.ts +38 -0
- package/dist/services/socialmedia/SocialMediaAccountService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaAccountService.js +59 -0
- package/dist/services/socialmedia/SocialMediaAccountService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaAdsService.d.ts +74 -0
- package/dist/services/socialmedia/SocialMediaAdsService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaAdsService.js +130 -0
- package/dist/services/socialmedia/SocialMediaAdsService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaDashboardService.d.ts +137 -0
- package/dist/services/socialmedia/SocialMediaDashboardService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaDashboardService.js +179 -0
- package/dist/services/socialmedia/SocialMediaDashboardService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaMetricsService.d.ts +56 -0
- package/dist/services/socialmedia/SocialMediaMetricsService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaMetricsService.js +105 -0
- package/dist/services/socialmedia/SocialMediaMetricsService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaPostService.d.ts +56 -0
- package/dist/services/socialmedia/SocialMediaPostService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaPostService.js +94 -0
- package/dist/services/socialmedia/SocialMediaPostService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaStoryService.d.ts +47 -0
- package/dist/services/socialmedia/SocialMediaStoryService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaStoryService.js +77 -0
- package/dist/services/socialmedia/SocialMediaStoryService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaThresholdService.d.ts +47 -0
- package/dist/services/socialmedia/SocialMediaThresholdService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaThresholdService.js +75 -0
- package/dist/services/socialmedia/SocialMediaThresholdService.js.map +1 -0
- package/dist/services/socialmedia/SocialMediaVideoService.d.ts +47 -0
- package/dist/services/socialmedia/SocialMediaVideoService.d.ts.map +1 -0
- package/dist/services/socialmedia/SocialMediaVideoService.js +77 -0
- package/dist/services/socialmedia/SocialMediaVideoService.js.map +1 -0
- package/dist/services/socialmedia/index.d.ts +43 -0
- package/dist/services/socialmedia/index.d.ts.map +1 -0
- package/dist/services/socialmedia/index.js +41 -0
- package/dist/services/socialmedia/index.js.map +1 -0
- package/dist/services/system/HealthService.d.ts +15 -0
- package/dist/services/system/HealthService.d.ts.map +1 -1
- package/dist/services/system/HealthService.js +21 -15
- package/dist/services/system/HealthService.js.map +1 -1
- package/dist/services/system/RabbitMQManagementService.d.ts +13 -9
- package/dist/services/system/RabbitMQManagementService.d.ts.map +1 -1
- package/dist/services/system/RabbitMQManagementService.js +23 -40
- package/dist/services/system/RabbitMQManagementService.js.map +1 -1
- package/dist/services/system/RedisManagementService.d.ts +13 -6
- package/dist/services/system/RedisManagementService.d.ts.map +1 -1
- package/dist/services/system/RedisManagementService.js +42 -20
- package/dist/services/system/RedisManagementService.js.map +1 -1
- package/dist/services/task/TaskService.d.ts +100 -1
- package/dist/services/task/TaskService.d.ts.map +1 -1
- package/dist/services/task/TaskService.js +167 -0
- package/dist/services/task/TaskService.js.map +1 -1
- package/dist/services/types.d.ts +2 -0
- package/dist/services/types.d.ts.map +1 -1
- package/dist/services/users/PresenceAnalyticsService.d.ts +179 -0
- package/dist/services/users/PresenceAnalyticsService.d.ts.map +1 -0
- package/dist/services/users/PresenceAnalyticsService.js +232 -0
- package/dist/services/users/PresenceAnalyticsService.js.map +1 -0
- package/dist/services/users/RightService.d.ts +16 -20
- package/dist/services/users/RightService.d.ts.map +1 -1
- package/dist/services/users/RightService.js +3 -37
- package/dist/services/users/RightService.js.map +1 -1
- package/dist/services/users/RoleService.d.ts +27 -0
- package/dist/services/users/RoleService.d.ts.map +1 -1
- package/dist/services/users/RoleService.js +54 -0
- package/dist/services/users/RoleService.js.map +1 -1
- package/dist/services/users/SystemService.d.ts +9 -0
- package/dist/services/users/SystemService.d.ts.map +1 -1
- package/dist/services/users/SystemService.js +20 -0
- package/dist/services/users/SystemService.js.map +1 -1
- package/dist/services/users/UserPreferencesService.d.ts +27 -0
- package/dist/services/users/UserPreferencesService.d.ts.map +1 -1
- package/dist/services/users/UserPreferencesService.js +54 -0
- package/dist/services/users/UserPreferencesService.js.map +1 -1
- package/dist/services/users/UserPushDeviceService.d.ts +18 -0
- package/dist/services/users/UserPushDeviceService.d.ts.map +1 -1
- package/dist/services/users/UserPushDeviceService.js +35 -0
- package/dist/services/users/UserPushDeviceService.js.map +1 -1
- package/dist/services/users/UserService.d.ts +142 -1
- package/dist/services/users/UserService.d.ts.map +1 -1
- package/dist/services/users/UserService.js +265 -0
- package/dist/services/users/UserService.js.map +1 -1
- package/dist/services/users/index.d.ts +5 -2
- package/dist/services/users/index.d.ts.map +1 -1
- package/dist/services/users/index.js +3 -0
- package/dist/services/users/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/react/hooks/useRealtime.d.ts +0 -63
- package/dist/react/hooks/useRealtime.d.ts.map +0 -1
- package/dist/react/hooks/useRealtime.js +0 -146
- package/dist/react/hooks/useRealtime.js.map +0 -1
- package/dist/realtime/RealtimeClient.d.ts +0 -99
- package/dist/realtime/RealtimeClient.d.ts.map +0 -1
- package/dist/realtime/RealtimeClient.js +0 -278
- package/dist/realtime/RealtimeClient.js.map +0 -1
- package/dist/realtime/types.d.ts +0 -76
- package/dist/realtime/types.d.ts.map +0 -1
- package/dist/realtime/types.js +0 -55
- package/dist/realtime/types.js.map +0 -1
|
@@ -7,8 +7,9 @@ import { ServiceConfig } from '../types';
|
|
|
7
7
|
export { AdminService } from './AdminService';
|
|
8
8
|
export { AuditService } from './AuditService';
|
|
9
9
|
export { AuthService } from './AuthService';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
10
|
+
export { PresenceAnalyticsService, type UserPresenceStats, type SystemPresenceStats, type PresenceTimelineEntry, type PresenceHeatmap, type UserActivitySummary, } from './PresenceAnalyticsService';
|
|
11
|
+
export { RightService, type CreateRightRequest, type UpdateRightRequest } from './RightService';
|
|
12
|
+
export { RoleService, type CreateRoleRequest, type UpdateRoleRequest } from './RoleService';
|
|
12
13
|
export { SystemHealthService } from './SystemService';
|
|
13
14
|
export { UserPreferencesService } from './UserPreferencesService';
|
|
14
15
|
export { UserPushDeviceService } from './UserPushDeviceService';
|
|
@@ -16,6 +17,7 @@ export { UserService } from './UserService';
|
|
|
16
17
|
import { AdminService } from './AdminService';
|
|
17
18
|
import { AuditService } from './AuditService';
|
|
18
19
|
import { AuthService } from './AuthService';
|
|
20
|
+
import { PresenceAnalyticsService } from './PresenceAnalyticsService';
|
|
19
21
|
import { RightService } from './RightService';
|
|
20
22
|
import { RoleService } from './RoleService';
|
|
21
23
|
import { SystemHealthService } from './SystemService';
|
|
@@ -29,6 +31,7 @@ export interface UsersServices {
|
|
|
29
31
|
admin: AdminService;
|
|
30
32
|
audit: AuditService;
|
|
31
33
|
auth: AuthService;
|
|
34
|
+
presenceAnalytics: PresenceAnalyticsService;
|
|
32
35
|
right: RightService;
|
|
33
36
|
role: RoleService;
|
|
34
37
|
system: SystemHealthService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/users/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/users/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,GAC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AAE,qBAAqB,CAAC;IACtC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,aAAa,GACrB,aAAa,CAaf"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
export { AdminService } from './AdminService';
|
|
7
7
|
export { AuditService } from './AuditService';
|
|
8
8
|
export { AuthService } from './AuthService';
|
|
9
|
+
export { PresenceAnalyticsService, } from './PresenceAnalyticsService';
|
|
9
10
|
export { RightService } from './RightService';
|
|
10
11
|
export { RoleService } from './RoleService';
|
|
11
12
|
export { SystemHealthService } from './SystemService';
|
|
@@ -16,6 +17,7 @@ export { UserService } from './UserService';
|
|
|
16
17
|
import { AdminService } from './AdminService';
|
|
17
18
|
import { AuditService } from './AuditService';
|
|
18
19
|
import { AuthService } from './AuthService';
|
|
20
|
+
import { PresenceAnalyticsService } from './PresenceAnalyticsService';
|
|
19
21
|
import { RightService } from './RightService';
|
|
20
22
|
import { RoleService } from './RoleService';
|
|
21
23
|
import { SystemHealthService } from './SystemService';
|
|
@@ -33,6 +35,7 @@ export function createUsersServices(http, config) {
|
|
|
33
35
|
admin: new AdminService(http, config),
|
|
34
36
|
audit: new AuditService(http, config),
|
|
35
37
|
auth: new AuthService(http, config),
|
|
38
|
+
presenceAnalytics: new PresenceAnalyticsService(http, config),
|
|
36
39
|
right: new RightService(http, config),
|
|
37
40
|
role: new RoleService(http, config),
|
|
38
41
|
system: new SystemHealthService(http, config),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/users/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,qEAAqE;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC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gB,EAChB,MAAsB;IAEtB,OAAO;QACL,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;QACrC,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;QACrC,IAAI,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;QACnC,iBAAiB,EAAE,IAAI,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC;QAC7D,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;QACrC,IAAI,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;QACnC,MAAM,EAAE,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC;QAC7C,eAAe,EAAE,IAAI,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC;QACzD,cAAc,EAAE,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC;QACvD,IAAI,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;KACpC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ConnectionState, EventHandler, RealTimeEventName, WebSocketMessage } from '../../realtime/types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to manage realtime connection state
|
|
4
|
-
*
|
|
5
|
-
* @deprecated Use the new SignalR-based hooks instead:
|
|
6
|
-
* - For presence: usePresence() from '@ccms/sdk/realtime/presence'
|
|
7
|
-
* - For logs: useApplicationLogs(), useApiLogs(), useQueryLogs(), useDashboard()
|
|
8
|
-
*
|
|
9
|
-
* This hook will be removed in version 2.0.0
|
|
10
|
-
*/
|
|
11
|
-
export declare function useConnectionState(): ConnectionState;
|
|
12
|
-
/**
|
|
13
|
-
* Hook to connect/disconnect from realtime server
|
|
14
|
-
*
|
|
15
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useRealtimeConnection(): {
|
|
18
|
-
state: ConnectionState;
|
|
19
|
-
isConnected: boolean;
|
|
20
|
-
isConnecting: boolean;
|
|
21
|
-
isReconnecting: boolean;
|
|
22
|
-
connect: () => Promise<void>;
|
|
23
|
-
disconnect: () => void;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Hook to subscribe to a realtime event
|
|
27
|
-
*
|
|
28
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
29
|
-
*/
|
|
30
|
-
export declare function useRealtimeEvent<T = unknown>(event: string | RealTimeEventName, handler: EventHandler<T>, deps?: React.DependencyList): void;
|
|
31
|
-
/**
|
|
32
|
-
* Hook to track last received message for an event
|
|
33
|
-
*
|
|
34
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
35
|
-
*/
|
|
36
|
-
export declare function useRealtimeMessage<T = unknown>(event: string | RealTimeEventName): WebSocketMessage<T> | null;
|
|
37
|
-
/**
|
|
38
|
-
* Hook to send realtime messages
|
|
39
|
-
*
|
|
40
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
41
|
-
*/
|
|
42
|
-
export declare function useRealtimeSend(): <T = unknown>(event: string, data?: T, targetId?: string) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Hook to manage group membership
|
|
45
|
-
*
|
|
46
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
47
|
-
*/
|
|
48
|
-
export declare function useRealtimeGroup(groupName: string, autoJoin?: boolean): {
|
|
49
|
-
isJoined: boolean;
|
|
50
|
-
join: () => Promise<void>;
|
|
51
|
-
leave: () => Promise<void>;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Hook to manage user presence
|
|
55
|
-
*
|
|
56
|
-
* @deprecated Use the new presence hooks instead:
|
|
57
|
-
* - import { usePresence, usePresenceStatus } from 'ccms-sdk/react'
|
|
58
|
-
* - Use PresenceProvider at the app root for auto-connect and activity detection
|
|
59
|
-
*/
|
|
60
|
-
export declare function useLegacyPresence(initialStatus?: string): {
|
|
61
|
-
updateStatus: (status: string, statusMessage?: string) => void;
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=useRealtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRealtime.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/useRealtime.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAUpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB;;;;;;;EAoBpC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAC1C,KAAK,EAAE,MAAM,GAAG,iBAAiB,EACjC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EACxB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC9B,IAAI,CAkBN;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,OAAO,EAC5C,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAChC,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAQ5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,KAI1B,CAAC,mBAAmB,MAAM,SAAS,CAAC,aAAa,MAAM,UAO3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,UAAO;;;;EAgClE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,CAAC,EAAE,MAAM;2BAK3C,MAAM,kBAAkB,MAAM;EAgB1C"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
|
-
import { useRealtimeClient } from './useCCMS';
|
|
3
|
-
import { ConnectionState, } from '../../realtime/types';
|
|
4
|
-
/**
|
|
5
|
-
* Hook to manage realtime connection state
|
|
6
|
-
*
|
|
7
|
-
* @deprecated Use the new SignalR-based hooks instead:
|
|
8
|
-
* - For presence: usePresence() from '@ccms/sdk/realtime/presence'
|
|
9
|
-
* - For logs: useApplicationLogs(), useApiLogs(), useQueryLogs(), useDashboard()
|
|
10
|
-
*
|
|
11
|
-
* This hook will be removed in version 2.0.0
|
|
12
|
-
*/
|
|
13
|
-
export function useConnectionState() {
|
|
14
|
-
const realtime = useRealtimeClient();
|
|
15
|
-
const [state, setState] = useState(realtime.getState());
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const unsubscribe = realtime.onStateChange(setState);
|
|
18
|
-
return unsubscribe;
|
|
19
|
-
}, [realtime]);
|
|
20
|
-
return state;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Hook to connect/disconnect from realtime server
|
|
24
|
-
*
|
|
25
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
26
|
-
*/
|
|
27
|
-
export function useRealtimeConnection() {
|
|
28
|
-
const realtime = useRealtimeClient();
|
|
29
|
-
const state = useConnectionState();
|
|
30
|
-
const connect = useCallback(async () => {
|
|
31
|
-
await realtime.connect();
|
|
32
|
-
}, [realtime]);
|
|
33
|
-
const disconnect = useCallback(() => {
|
|
34
|
-
realtime.disconnect();
|
|
35
|
-
}, [realtime]);
|
|
36
|
-
return {
|
|
37
|
-
state,
|
|
38
|
-
isConnected: state === ConnectionState.Connected,
|
|
39
|
-
isConnecting: state === ConnectionState.Connecting,
|
|
40
|
-
isReconnecting: state === ConnectionState.Reconnecting,
|
|
41
|
-
connect,
|
|
42
|
-
disconnect,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Hook to subscribe to a realtime event
|
|
47
|
-
*
|
|
48
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
49
|
-
*/
|
|
50
|
-
export function useRealtimeEvent(event, handler, deps = []) {
|
|
51
|
-
const realtime = useRealtimeClient();
|
|
52
|
-
const handlerRef = useRef(handler);
|
|
53
|
-
// Update handler ref on each render
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
handlerRef.current = handler;
|
|
56
|
-
});
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
const wrappedHandler = (data, message) => {
|
|
59
|
-
handlerRef.current(data, message);
|
|
60
|
-
};
|
|
61
|
-
const unsubscribe = realtime.on(event, wrappedHandler);
|
|
62
|
-
return unsubscribe;
|
|
63
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
-
}, [realtime, event, ...deps]);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Hook to track last received message for an event
|
|
68
|
-
*
|
|
69
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
70
|
-
*/
|
|
71
|
-
export function useRealtimeMessage(event) {
|
|
72
|
-
const [message, setMessage] = useState(null);
|
|
73
|
-
useRealtimeEvent(event, (data, msg) => {
|
|
74
|
-
setMessage(msg);
|
|
75
|
-
});
|
|
76
|
-
return message;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Hook to send realtime messages
|
|
80
|
-
*
|
|
81
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
82
|
-
*/
|
|
83
|
-
export function useRealtimeSend() {
|
|
84
|
-
const realtime = useRealtimeClient();
|
|
85
|
-
const send = useCallback((event, data, targetId) => {
|
|
86
|
-
realtime.send(event, data, targetId);
|
|
87
|
-
}, [realtime]);
|
|
88
|
-
return send;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Hook to manage group membership
|
|
92
|
-
*
|
|
93
|
-
* @deprecated Use the new SignalR-based hooks instead. See useConnectionState() for migration details.
|
|
94
|
-
*/
|
|
95
|
-
export function useRealtimeGroup(groupName, autoJoin = true) {
|
|
96
|
-
const realtime = useRealtimeClient();
|
|
97
|
-
const connectionState = useConnectionState();
|
|
98
|
-
const [isJoined, setIsJoined] = useState(false);
|
|
99
|
-
const join = useCallback(async () => {
|
|
100
|
-
await realtime.joinGroup(groupName);
|
|
101
|
-
setIsJoined(true);
|
|
102
|
-
}, [realtime, groupName]);
|
|
103
|
-
const leave = useCallback(async () => {
|
|
104
|
-
await realtime.leaveGroup(groupName);
|
|
105
|
-
setIsJoined(false);
|
|
106
|
-
}, [realtime, groupName]);
|
|
107
|
-
// Auto-join on connect
|
|
108
|
-
useEffect(() => {
|
|
109
|
-
if (autoJoin && connectionState === ConnectionState.Connected && !isJoined) {
|
|
110
|
-
join();
|
|
111
|
-
}
|
|
112
|
-
}, [autoJoin, connectionState, isJoined, join]);
|
|
113
|
-
// Leave on unmount
|
|
114
|
-
useEffect(() => {
|
|
115
|
-
return () => {
|
|
116
|
-
if (isJoined) {
|
|
117
|
-
realtime.leaveGroup(groupName);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
}, [realtime, groupName, isJoined]);
|
|
121
|
-
return { isJoined, join, leave };
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Hook to manage user presence
|
|
125
|
-
*
|
|
126
|
-
* @deprecated Use the new presence hooks instead:
|
|
127
|
-
* - import { usePresence, usePresenceStatus } from 'ccms-sdk/react'
|
|
128
|
-
* - Use PresenceProvider at the app root for auto-connect and activity detection
|
|
129
|
-
*/
|
|
130
|
-
export function useLegacyPresence(initialStatus) {
|
|
131
|
-
const realtime = useRealtimeClient();
|
|
132
|
-
const connectionState = useConnectionState();
|
|
133
|
-
const updateStatus = useCallback((status, statusMessage) => {
|
|
134
|
-
if (connectionState === ConnectionState.Connected) {
|
|
135
|
-
realtime.updatePresence(status, statusMessage);
|
|
136
|
-
}
|
|
137
|
-
}, [realtime, connectionState]);
|
|
138
|
-
// Set initial status on connect
|
|
139
|
-
useEffect(() => {
|
|
140
|
-
if (initialStatus && connectionState === ConnectionState.Connected) {
|
|
141
|
-
realtime.updatePresence(initialStatus);
|
|
142
|
-
}
|
|
143
|
-
}, [realtime, connectionState, initialStatus]);
|
|
144
|
-
return { updateStatus };
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=useRealtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRealtime.js","sourceRoot":"","sources":["../../../src/react/hooks/useRealtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EACL,eAAe,GAIhB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAkB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACrD,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IAEnC,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACrC,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,QAAQ,CAAC,UAAU,EAA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,EAAE,IAAI,CAAC,CAAC,CAAC;IAEhD,mBAAmB;IACnB,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YACjC,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,aAAsB;IACtD,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAE7C,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,MAAc,EAAE,aAAsB,EAAE,EAAE;QACzC,IAAI,eAAe,KAAK,eAAe,CAAC,SAAS,EAAE,CAAC;YAClD,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,EACD,CAAC,QAAQ,EAAE,eAAe,CAAC,CAC5B,CAAC;IAEF,gCAAgC;IAChC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,IAAI,eAAe,KAAK,eAAe,CAAC,SAAS,EAAE,CAAC;YACnE,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC;IAE/C,OAAO,EAAE,YAAY,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { CCMSConfig } from '../core/Config';
|
|
2
|
-
import { ConnectionState, EventHandler, RealtimeClientOptions, RealTimeEventName } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Real-time client for WebSocket/SignalR communication with CCMS backend
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Use the new SignalR-based clients instead:
|
|
7
|
-
* - For presence tracking: Use PresenceProvider and usePresence() hooks
|
|
8
|
-
* - For log streaming: Use useApplicationLogs(), useApiLogs(), useQueryLogs(), useDashboard() hooks
|
|
9
|
-
*
|
|
10
|
-
* This class will be removed in version 2.0.0
|
|
11
|
-
*
|
|
12
|
-
* Migration guide:
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // Old way (deprecated):
|
|
15
|
-
* const realtime = new RealtimeClient(config);
|
|
16
|
-
* await realtime.connect();
|
|
17
|
-
* realtime.updatePresence('Online');
|
|
18
|
-
*
|
|
19
|
-
* // New way:
|
|
20
|
-
* <PresenceProvider authManager={authManager} baseUrl={baseUrl}>
|
|
21
|
-
* <YourApp />
|
|
22
|
-
* </PresenceProvider>
|
|
23
|
-
*
|
|
24
|
-
* // In component:
|
|
25
|
-
* const { updateStatus } = usePresence();
|
|
26
|
-
* updateStatus(PresenceStatus.Online);
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare class RealtimeClient {
|
|
30
|
-
private config;
|
|
31
|
-
private options;
|
|
32
|
-
private ws;
|
|
33
|
-
private connectionState;
|
|
34
|
-
private eventHandlers;
|
|
35
|
-
private reconnectAttempts;
|
|
36
|
-
private reconnectTimeout;
|
|
37
|
-
private pingInterval;
|
|
38
|
-
private connectionId;
|
|
39
|
-
private stateChangeListeners;
|
|
40
|
-
constructor(config: CCMSConfig, options?: RealtimeClientOptions);
|
|
41
|
-
/**
|
|
42
|
-
* Get current connection state
|
|
43
|
-
*/
|
|
44
|
-
getState(): ConnectionState;
|
|
45
|
-
/**
|
|
46
|
-
* Get connection ID (available after connected)
|
|
47
|
-
*/
|
|
48
|
-
getConnectionId(): string | null;
|
|
49
|
-
/**
|
|
50
|
-
* Subscribe to connection state changes
|
|
51
|
-
*/
|
|
52
|
-
onStateChange(listener: (state: ConnectionState) => void): () => void;
|
|
53
|
-
/**
|
|
54
|
-
* Connect to the WebSocket server
|
|
55
|
-
*/
|
|
56
|
-
connect(): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Disconnect from the WebSocket server
|
|
59
|
-
*/
|
|
60
|
-
disconnect(): void;
|
|
61
|
-
/**
|
|
62
|
-
* Subscribe to an event
|
|
63
|
-
*/
|
|
64
|
-
on<T = unknown>(event: string | RealTimeEventName, handler: EventHandler<T>): () => void;
|
|
65
|
-
/**
|
|
66
|
-
* Unsubscribe from an event
|
|
67
|
-
*/
|
|
68
|
-
off<T = unknown>(event: string | RealTimeEventName, handler: EventHandler<T>): void;
|
|
69
|
-
/**
|
|
70
|
-
* Subscribe to an event once
|
|
71
|
-
*/
|
|
72
|
-
once<T = unknown>(event: string | RealTimeEventName, handler: EventHandler<T>): () => void;
|
|
73
|
-
/**
|
|
74
|
-
* Send a message to the server
|
|
75
|
-
*/
|
|
76
|
-
send<T = unknown>(event: string, data?: T, targetId?: string): void;
|
|
77
|
-
/**
|
|
78
|
-
* Join a group/channel
|
|
79
|
-
*/
|
|
80
|
-
joinGroup(groupName: string): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Leave a group/channel
|
|
83
|
-
*/
|
|
84
|
-
leaveGroup(groupName: string): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Update user presence status
|
|
87
|
-
*/
|
|
88
|
-
updatePresence(status: string, statusMessage?: string): void;
|
|
89
|
-
private buildWebSocketUrl;
|
|
90
|
-
private setConnectionState;
|
|
91
|
-
private handleMessage;
|
|
92
|
-
private handleDisconnect;
|
|
93
|
-
private scheduleReconnect;
|
|
94
|
-
private clearReconnectTimeout;
|
|
95
|
-
private startPingInterval;
|
|
96
|
-
private stopPingInterval;
|
|
97
|
-
private generateMessageId;
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=RealtimeClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RealtimeClient.d.ts","sourceRoot":"","sources":["../../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