@messenger-box/platform-server 10.0.3-alpha.95 → 10.0.3-alpha.96

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 (68) hide show
  1. package/lib/containers/containers.js +1 -4
  2. package/lib/containers/containers.js.map +1 -1
  3. package/lib/containers/context-services-from-container.js +1 -2
  4. package/lib/containers/context-services-from-container.js.map +1 -1
  5. package/lib/graphql/resolvers/channel.js +2 -10
  6. package/lib/graphql/resolvers/channel.js.map +1 -1
  7. package/lib/graphql/resolvers/index.js +1 -1
  8. package/lib/graphql/resolvers/index.js.map +1 -1
  9. package/lib/graphql/resolvers/post.js +3 -30
  10. package/lib/graphql/resolvers/post.js.map +1 -1
  11. package/lib/graphql/schema/channel.graphql +17 -2
  12. package/lib/graphql/schema/channel.graphql.js +1 -1
  13. package/lib/graphql/schema/index.js +2 -2
  14. package/lib/graphql/schema/index.js.map +1 -1
  15. package/lib/graphql/schema/post.graphql +16 -2
  16. package/lib/graphql/schema/post.graphql.js +1 -1
  17. package/lib/inngest/factory.js +2 -2
  18. package/lib/inngest/factory.js.map +1 -1
  19. package/lib/inngest/functions.d.ts +0 -96
  20. package/lib/inngest/functions.js +88 -815
  21. package/lib/inngest/functions.js.map +1 -1
  22. package/lib/module.js +2 -2
  23. package/lib/module.js.map +1 -1
  24. package/lib/plugins/index.d.ts +0 -1
  25. package/lib/services/channel-service.js +2 -2
  26. package/lib/services/channel-service.js.map +1 -1
  27. package/lib/services/index.d.ts +0 -1
  28. package/lib/services/post-service.d.ts +2 -3
  29. package/lib/services/post-service.js +8 -10
  30. package/lib/services/post-service.js.map +1 -1
  31. package/lib/services/proxy-services/index.d.ts +0 -1
  32. package/lib/store/models/index.d.ts +0 -1
  33. package/lib/store/repositories/channel-repository.js +1 -1
  34. package/lib/store/repositories/channel-repository.js.map +1 -1
  35. package/lib/store/repositories/index.d.ts +0 -1
  36. package/lib/store/repositories/post-repository.js +1 -1
  37. package/lib/store/repositories/post-repository.js.map +1 -1
  38. package/lib/store/repositories/post-thread-repository.js +1 -1
  39. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  40. package/lib/store/repositories/reaction-repository.js +1 -1
  41. package/lib/store/repositories/reaction-repository.js.map +1 -1
  42. package/lib/templates/constants/SERVER_TYPES.ts.template +0 -3
  43. package/lib/templates/constants/WorkflowNamespace.ts.template +10 -0
  44. package/lib/templates/services/PostService.ts.template +8 -8
  45. package/package.json +6 -7
  46. package/lib/graphql/resolvers/ai-fragment.d.ts +0 -3
  47. package/lib/graphql/resolvers/ai-fragment.js +0 -276
  48. package/lib/graphql/resolvers/ai-fragment.js.map +0 -1
  49. package/lib/graphql/schema/ai-fragment.graphql +0 -311
  50. package/lib/graphql/schema/ai-fragment.graphql.js +0 -1
  51. package/lib/graphql/schema/ai-fragment.graphql.js.map +0 -1
  52. package/lib/plugins/ai-fragment-moleculer-service.d.ts +0 -29
  53. package/lib/plugins/ai-fragment-moleculer-service.js +0 -516
  54. package/lib/plugins/ai-fragment-moleculer-service.js.map +0 -1
  55. package/lib/services/ai-fragment-service.d.ts +0 -195
  56. package/lib/services/ai-fragment-service.js +0 -631
  57. package/lib/services/ai-fragment-service.js.map +0 -1
  58. package/lib/services/proxy-services/ai-fragment-microservice.d.ts +0 -23
  59. package/lib/services/proxy-services/ai-fragment-microservice.js +0 -75
  60. package/lib/services/proxy-services/ai-fragment-microservice.js.map +0 -1
  61. package/lib/store/models/ai-fragment.d.ts +0 -4
  62. package/lib/store/models/ai-fragment.js +0 -125
  63. package/lib/store/models/ai-fragment.js.map +0 -1
  64. package/lib/store/repositories/ai-fragment-repository.d.ts +0 -15
  65. package/lib/store/repositories/ai-fragment-repository.js +0 -69
  66. package/lib/store/repositories/ai-fragment-repository.js.map +0 -1
  67. package/lib/templates/repositories/AiFragmentRepository.ts.template +0 -4
  68. package/lib/templates/services/AiFragmentService.ts.template +0 -123
@@ -1,195 +0,0 @@
1
- import { ServiceBroker } from 'moleculer';
2
- import { IAiFragmentModel, IAiFragmentRepository, IAiFragmentService, IAiFragmentCreateInput, AsDomainType, Disposable, AiFragmentSyncStatus } from 'common/server';
3
- import { CdmLogger } from '@cdm-logger/core';
4
- import { DisposableCollection } from '@adminide-stack/core';
5
- /**
6
- * AI Fragment Service Implementation
7
- *
8
- * This service handles comprehensive AI fragment management within the messenger platform,
9
- * providing operations for creating, managing, and synchronizing AI-generated code fragments
10
- * with sandbox environments and file version control.
11
- *
12
- * Key capabilities:
13
- * - AI fragment creation and lifecycle management
14
- * - Sandbox URL management and synchronization
15
- * - File version control and conflict resolution
16
- * - Canvas layer support for visual components
17
- * - Template-based fragment generation
18
- * - Organization and user-based fragment retrieval
19
- * - Real-time file synchronization status tracking
20
- * - Batch operations for fragment management
21
- * - Cross-platform fragment compatibility
22
- *
23
- * The service integrates with the AI fragment repository and provides comprehensive
24
- * error handling and logging for fragment management workflows.
25
- */
26
- export declare class AiFragmentService implements IAiFragmentService, Disposable {
27
- private readonly aiFragmentRepository;
28
- private readonly broker;
29
- protected readonly toDispose: DisposableCollection;
30
- private logger;
31
- constructor(aiFragmentRepository: IAiFragmentRepository, broker: ServiceBroker, logger: CdmLogger.ILogger);
32
- /**
33
- * Disposes of resources used by the service
34
- */
35
- dispose(): void;
36
- /**
37
- * Retrieves documents with pagination and total count
38
- */
39
- getAllWithCount(options: any): Promise<{
40
- data: AsDomainType<IAiFragmentModel>[];
41
- totalCount: number;
42
- }>;
43
- /**
44
- * Counts documents matching the specified conditions
45
- */
46
- count(conditions?: any): Promise<number>;
47
- /**
48
- * Retrieves a single document by ID or matching the specified conditions
49
- */
50
- get(conditions: string | any): Promise<AsDomainType<IAiFragmentModel> | null>;
51
- /**
52
- * Retrieves a single document by name field
53
- */
54
- getByName(name: string): Promise<AsDomainType<IAiFragmentModel> | null>;
55
- /**
56
- * Retrieves documents matching the specified options
57
- */
58
- getAll(options: any): Promise<AsDomainType<IAiFragmentModel>[]>;
59
- /**
60
- * Retrieves multiple documents by their IDs
61
- */
62
- getByIds(ids: string[]): Promise<AsDomainType<IAiFragmentModel>[]>;
63
- /**
64
- * Creates a new document
65
- */
66
- create(data: any): Promise<AsDomainType<IAiFragmentModel>>;
67
- /**
68
- * Creates multiple documents in a single operation
69
- */
70
- bulkCreate(data: any[]): Promise<AsDomainType<IAiFragmentModel>[]>;
71
- /**
72
- * Updates a document by ID
73
- */
74
- update(id: string, data: any): Promise<AsDomainType<IAiFragmentModel> | null>;
75
- /**
76
- * Updates multiple documents
77
- */
78
- bulkUpdate(conditions: any, data: any): Promise<number>;
79
- /**
80
- * Deletes a document by ID
81
- */
82
- delete(id: string): Promise<boolean>;
83
- /**
84
- * Deletes multiple documents
85
- */
86
- bulkDelete(conditions: any): Promise<number>;
87
- /**
88
- * Inserts a new document
89
- */
90
- insert(data: any): Promise<AsDomainType<IAiFragmentModel>>;
91
- /**
92
- * Creates a new AI fragment with the specified parameters
93
- *
94
- * @description Creates a new AI fragment with all necessary metadata including
95
- * sandbox URL, files, canvas layers, and template information
96
- *
97
- * @param {IAiFragmentCreateInput & { owner: string; orgName: string }} input - The fragment creation data
98
- * @returns {Promise<AsDomainType<IAiFragmentModel>>} - The created fragment
99
- */
100
- createFragment(input: IAiFragmentCreateInput & {
101
- owner: string;
102
- orgName: string;
103
- }): Promise<AsDomainType<IAiFragmentModel>>;
104
- /**
105
- * Retrieves an AI fragment by its message ID
106
- *
107
- * @description Finds a fragment using its associated message ID
108
- *
109
- * @param {string} messageId - The message ID to search for
110
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The found fragment or null
111
- */
112
- getFragmentByMessageId(messageId: string): Promise<AsDomainType<IAiFragmentModel> | null>;
113
- /**
114
- * Retrieves AI fragments for a specific user and organization
115
- *
116
- * @description Gets paginated fragments for a user within an organization
117
- *
118
- * @param {string} orgName - Organization name
119
- * @param {string} owner - Owner identifier
120
- * @param {number} [limit=20] - Maximum number of fragments to return
121
- * @param {number} [skip=0] - Number of fragments to skip
122
- * @returns {Promise<AsDomainType<IAiFragmentModel>[]>} - Array of fragments
123
- */
124
- getFragmentsByUser(orgName: string, owner: string, limit?: number, skip?: number): Promise<AsDomainType<IAiFragmentModel>[]>;
125
- /**
126
- * Updates the files associated with a fragment
127
- *
128
- * @description Updates the files data for a fragment identified by message ID
129
- *
130
- * @param {string} messageId - The message ID of the fragment to update
131
- * @param {Record<string, any>} files - The new files data
132
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The updated fragment or null
133
- */
134
- updateFragmentFiles(messageId: string, files: Record<string, any>): Promise<AsDomainType<IAiFragmentModel> | null>;
135
- /**
136
- * Deletes an AI fragment by its ID
137
- *
138
- * @description Removes a fragment from the database
139
- *
140
- * @param {string} id - The fragment ID to delete
141
- * @returns {Promise<boolean>} - Success status
142
- */
143
- deleteFragment(id: string): Promise<boolean>;
144
- /**
145
- * Deletes an AI fragment by its message ID
146
- *
147
- * @description Removes a fragment using its message ID
148
- *
149
- * @param {string} messageId - The message ID of the fragment to delete
150
- * @returns {Promise<boolean>} - Success status
151
- */
152
- deleteFragmentByMessageId(messageId: string): Promise<boolean>;
153
- /**
154
- * Retrieves an AI fragment by its ID
155
- *
156
- * @description Gets a fragment using its database ID
157
- *
158
- * @param {string} fragmentId - The fragment ID to retrieve
159
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The found fragment or null
160
- */
161
- getFragmentById(fragmentId: string): Promise<AsDomainType<IAiFragmentModel> | null>;
162
- /**
163
- * Updates the sandbox URL for a fragment
164
- *
165
- * @description Updates the sandbox URL for a fragment identified by its ID
166
- *
167
- * @param {string} fragmentId - The fragment ID to update
168
- * @param {string} newSandboxUrl - The new sandbox URL
169
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The updated fragment or null
170
- */
171
- updateSandboxUrl(fragmentId: string, newSandboxUrl: string): Promise<AsDomainType<IAiFragmentModel> | null>;
172
- /**
173
- * Updates file synchronization status and versions
174
- *
175
- * @description Updates the sync status and file versions for a fragment
176
- *
177
- * @param {string} fragmentId - The fragment ID to update
178
- * @param {Record<string, number>} fileVersions - File version mapping
179
- * @param {AiFragmentSyncStatus} syncStatus - Current synchronization status
180
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The updated fragment or null
181
- */
182
- updateFileSync(fragmentId: string, fileVersions: Record<string, number>, syncStatus: AiFragmentSyncStatus): Promise<AsDomainType<IAiFragmentModel> | null>;
183
- /**
184
- * Updates both files and synchronization status in a single operation
185
- *
186
- * @description Performs a comprehensive update of files and sync status
187
- *
188
- * @param {string} messageId - The message ID of the fragment to update
189
- * @param {Record<string, any>} files - The new files data
190
- * @param {Record<string, number>} fileVersions - File version mapping
191
- * @param {AiFragmentSyncStatus} syncStatus - Current synchronization status
192
- * @returns {Promise<AsDomainType<IAiFragmentModel> | null>} - The updated fragment or null
193
- */
194
- updateFilesAndSync(messageId: string, files: Record<string, any>, fileVersions: Record<string, number>, syncStatus: AiFragmentSyncStatus): Promise<AsDomainType<IAiFragmentModel> | null>;
195
- }