@bernierllc/social-media-manager 1.0.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.
- package/README.md +407 -0
- package/dist/SocialMediaManager.d.ts +95 -0
- package/dist/SocialMediaManager.d.ts.map +1 -0
- package/dist/SocialMediaManager.js +265 -0
- package/dist/SocialMediaManager.js.map +1 -0
- package/dist/content-type/ContentTypeMatching.d.ts +26 -0
- package/dist/content-type/ContentTypeMatching.d.ts.map +1 -0
- package/dist/content-type/ContentTypeMatching.js +113 -0
- package/dist/content-type/ContentTypeMatching.js.map +1 -0
- package/dist/content-type/ContentTypeRegistry.d.ts +25 -0
- package/dist/content-type/ContentTypeRegistry.d.ts.map +1 -0
- package/dist/content-type/ContentTypeRegistry.js +113 -0
- package/dist/content-type/ContentTypeRegistry.js.map +1 -0
- package/dist/content-type/TransformationPipeline.d.ts +50 -0
- package/dist/content-type/TransformationPipeline.d.ts.map +1 -0
- package/dist/content-type/TransformationPipeline.js +169 -0
- package/dist/content-type/TransformationPipeline.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/MultiPlatformOrchestrator.d.ts +37 -0
- package/dist/orchestration/MultiPlatformOrchestrator.d.ts.map +1 -0
- package/dist/orchestration/MultiPlatformOrchestrator.js +167 -0
- package/dist/orchestration/MultiPlatformOrchestrator.js.map +1 -0
- package/dist/platforms/ConnectionManager.d.ts +31 -0
- package/dist/platforms/ConnectionManager.d.ts.map +1 -0
- package/dist/platforms/ConnectionManager.js +136 -0
- package/dist/platforms/ConnectionManager.js.map +1 -0
- package/dist/platforms/PlatformRegistry.d.ts +73 -0
- package/dist/platforms/PlatformRegistry.d.ts.map +1 -0
- package/dist/platforms/PlatformRegistry.js +93 -0
- package/dist/platforms/PlatformRegistry.js.map +1 -0
- package/dist/scheduling/JitterCalculator.d.ts +37 -0
- package/dist/scheduling/JitterCalculator.d.ts.map +1 -0
- package/dist/scheduling/JitterCalculator.js +93 -0
- package/dist/scheduling/JitterCalculator.js.map +1 -0
- package/dist/scheduling/ScheduleManager.d.ts +48 -0
- package/dist/scheduling/ScheduleManager.d.ts.map +1 -0
- package/dist/scheduling/ScheduleManager.js +125 -0
- package/dist/scheduling/ScheduleManager.js.map +1 -0
- package/dist/types.d.ts +214 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/package.json +92 -0
package/README.md
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
# @bernierllc/social-media-manager
|
|
2
|
+
|
|
3
|
+
Platform-agnostic social media orchestration service for multi-platform posting with content transformation and scheduling.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Multi-Platform Posting**: Post to Twitter, LinkedIn, Facebook, Instagram, Mastodon, and Bluesky simultaneously
|
|
8
|
+
- **Content Transformation**: Automatically transform generic content to platform-specific formats
|
|
9
|
+
- **Intelligent Scheduling**: Schedule posts with jitter (uniform, normal, or exponential distribution)
|
|
10
|
+
- **Content Validation**: Validate content against platform constraints before posting
|
|
11
|
+
- **Platform Management**: Connect, disconnect, and monitor platform connections
|
|
12
|
+
- **Batch Operations**: Post or schedule multiple posts at once
|
|
13
|
+
- **NeverHub Integration**: Content-type matching and transformation pipeline system
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @bernierllc/social-media-manager
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { SocialMediaManager } from '@bernierllc/social-media-manager';
|
|
25
|
+
|
|
26
|
+
const manager = new SocialMediaManager({
|
|
27
|
+
platforms: {
|
|
28
|
+
twitter: { enabled: true },
|
|
29
|
+
linkedin: { enabled: true },
|
|
30
|
+
},
|
|
31
|
+
schedulerConfig: {
|
|
32
|
+
enableJitter: true,
|
|
33
|
+
defaultJitter: {
|
|
34
|
+
enabled: true,
|
|
35
|
+
minMinutes: -5,
|
|
36
|
+
maxMinutes: 5,
|
|
37
|
+
distribution: 'uniform',
|
|
38
|
+
},
|
|
39
|
+
timezone: 'UTC',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Post to all connected platforms
|
|
44
|
+
const result = await manager.postToAll({
|
|
45
|
+
content: {
|
|
46
|
+
text: 'Hello from all platforms!',
|
|
47
|
+
images: [{ url: 'https://example.com/image.jpg' }],
|
|
48
|
+
hashtags: ['social', 'automation'],
|
|
49
|
+
},
|
|
50
|
+
platforms: ['twitter', 'linkedin'],
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
console.log(`Posted to ${result.summary.successCount} platforms`);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Multi-Platform Posting
|
|
57
|
+
|
|
58
|
+
### Post to All Platforms
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
const result = await manager.postToAll({
|
|
62
|
+
content: {
|
|
63
|
+
text: 'Universal message for all platforms',
|
|
64
|
+
images: [{ url: 'image.jpg' }],
|
|
65
|
+
hashtags: ['announcement'],
|
|
66
|
+
},
|
|
67
|
+
platforms: ['twitter', 'linkedin', 'facebook'],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (result.success) {
|
|
71
|
+
console.log('Posted to all platforms successfully!');
|
|
72
|
+
} else if (result.summary.partialSuccess) {
|
|
73
|
+
console.log(`Posted to ${result.summary.successCount} out of ${result.summary.totalPlatforms} platforms`);
|
|
74
|
+
console.log('Errors:', result.errors);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Post to Specific Platforms
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
const result = await manager.postToPlatforms(
|
|
82
|
+
['twitter', 'mastodon'],
|
|
83
|
+
{
|
|
84
|
+
content: {
|
|
85
|
+
text: 'Short-form post for Twitter and Mastodon',
|
|
86
|
+
hashtags: ['tech', 'news'],
|
|
87
|
+
},
|
|
88
|
+
platforms: ['twitter', 'mastodon'],
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Platform-Specific Content
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const result = await manager.postToAll({
|
|
97
|
+
content: {
|
|
98
|
+
text: 'Generic content',
|
|
99
|
+
},
|
|
100
|
+
platforms: ['twitter', 'linkedin'],
|
|
101
|
+
platformSpecificContent: {
|
|
102
|
+
twitter: {
|
|
103
|
+
text: 'Short tweet optimized for Twitter',
|
|
104
|
+
hashtags: ['twitter'],
|
|
105
|
+
},
|
|
106
|
+
linkedin: {
|
|
107
|
+
text: 'Professional post optimized for LinkedIn with more detail and context.',
|
|
108
|
+
hashtags: ['linkedin', 'professional'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Scheduling with Jitter
|
|
115
|
+
|
|
116
|
+
### Schedule a Post
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
const result = await manager.schedulePost({
|
|
120
|
+
content: {
|
|
121
|
+
text: 'Scheduled post',
|
|
122
|
+
},
|
|
123
|
+
platforms: ['twitter', 'linkedin'],
|
|
124
|
+
scheduledTime: new Date('2025-12-01T12:00:00Z'),
|
|
125
|
+
jitter: {
|
|
126
|
+
enabled: true,
|
|
127
|
+
minMinutes: -5,
|
|
128
|
+
maxMinutes: 5,
|
|
129
|
+
distribution: 'uniform',
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
console.log('Schedule ID:', result.scheduleId);
|
|
134
|
+
console.log('Scheduled times:', result.scheduledTimes);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Jitter Distributions
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
// Uniform distribution (equal probability)
|
|
141
|
+
const uniform = await manager.schedulePost({
|
|
142
|
+
content: { text: 'Post' },
|
|
143
|
+
platforms: ['twitter'],
|
|
144
|
+
scheduledTime: new Date('2025-12-01T12:00:00Z'),
|
|
145
|
+
jitter: {
|
|
146
|
+
enabled: true,
|
|
147
|
+
minMinutes: -10,
|
|
148
|
+
maxMinutes: 10,
|
|
149
|
+
distribution: 'uniform',
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Normal distribution (bell curve)
|
|
154
|
+
const normal = await manager.schedulePost({
|
|
155
|
+
content: { text: 'Post' },
|
|
156
|
+
platforms: ['twitter'],
|
|
157
|
+
scheduledTime: new Date('2025-12-01T12:00:00Z'),
|
|
158
|
+
jitter: {
|
|
159
|
+
enabled: true,
|
|
160
|
+
minMinutes: -10,
|
|
161
|
+
maxMinutes: 10,
|
|
162
|
+
distribution: 'normal',
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Exponential distribution (weighted toward minimum)
|
|
167
|
+
const exponential = await manager.schedulePost({
|
|
168
|
+
content: { text: 'Post' },
|
|
169
|
+
platforms: ['twitter'],
|
|
170
|
+
scheduledTime: new Date('2025-12-01T12:00:00Z'),
|
|
171
|
+
jitter: {
|
|
172
|
+
enabled: true,
|
|
173
|
+
minMinutes: 0,
|
|
174
|
+
maxMinutes: 15,
|
|
175
|
+
distribution: 'exponential',
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Manage Scheduled Posts
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
// List all scheduled posts
|
|
184
|
+
const allPosts = await manager.listScheduledPosts();
|
|
185
|
+
|
|
186
|
+
// Filter by status
|
|
187
|
+
const pendingPosts = await manager.listScheduledPosts({
|
|
188
|
+
status: ['pending'],
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// Filter by platform
|
|
192
|
+
const twitterPosts = await manager.listScheduledPosts({
|
|
193
|
+
platforms: ['twitter'],
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
// Cancel a scheduled post
|
|
197
|
+
await manager.cancelScheduledPost(scheduleId);
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Content Transformation
|
|
201
|
+
|
|
202
|
+
### Transform Content
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
const genericContent = {
|
|
206
|
+
text: 'Long article text that needs to be adapted for each platform...',
|
|
207
|
+
images: [{ url: 'large-image.jpg', width: 5000, height: 5000 }],
|
|
208
|
+
hashtags: Array(50).fill('tag'),
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// Transform for Twitter (will truncate text, resize images, limit hashtags)
|
|
212
|
+
const twitterContent = await manager.transformContent(genericContent, 'twitter');
|
|
213
|
+
|
|
214
|
+
// Transform for LinkedIn (will apply professional tone)
|
|
215
|
+
const linkedinContent = await manager.transformContent(genericContent, 'linkedin');
|
|
216
|
+
|
|
217
|
+
// Transform for Instagram (will ensure media is present)
|
|
218
|
+
const instagramContent = await manager.transformContent(genericContent, 'instagram');
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Validate Content
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
const content = {
|
|
225
|
+
text: 'Test post',
|
|
226
|
+
images: [{ url: 'image.jpg' }],
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const validation = await manager.validateContentForPlatform(content, 'twitter');
|
|
230
|
+
|
|
231
|
+
if (!validation.valid) {
|
|
232
|
+
console.error('Validation errors:', validation.errors);
|
|
233
|
+
console.warn('Validation warnings:', validation.warnings);
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Optimize Content
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
const optimized = await manager.optimizeForPlatform(
|
|
241
|
+
{
|
|
242
|
+
text: 'Post with too many hashtags',
|
|
243
|
+
hashtags: Array(50).fill('tag'),
|
|
244
|
+
},
|
|
245
|
+
'twitter'
|
|
246
|
+
);
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Platform Management
|
|
250
|
+
|
|
251
|
+
### Connect Platform
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
const connection = await manager.connectPlatform('twitter', {
|
|
255
|
+
apiKey: 'your-api-key',
|
|
256
|
+
apiSecret: 'your-api-secret',
|
|
257
|
+
accessToken: 'your-access-token',
|
|
258
|
+
accessTokenSecret: 'your-access-token-secret',
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
console.log('Connected:', connection.connected);
|
|
262
|
+
console.log('Username:', connection.username);
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Disconnect Platform
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
await manager.disconnectPlatform('twitter');
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Test Connection
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
274
|
+
const test = await manager.testPlatformConnection('twitter');
|
|
275
|
+
|
|
276
|
+
console.log('Connected:', test.connected);
|
|
277
|
+
console.log('Healthy:', test.healthy);
|
|
278
|
+
console.log('Response time:', test.responseTime, 'ms');
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### List Connections
|
|
282
|
+
|
|
283
|
+
```typescript
|
|
284
|
+
const connections = await manager.listConnectedPlatforms();
|
|
285
|
+
|
|
286
|
+
for (const conn of connections) {
|
|
287
|
+
console.log(`${conn.platform}: ${conn.connected ? 'Connected' : 'Disconnected'}`);
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Get Platform Status
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
const status = await manager.getPlatformStatus();
|
|
295
|
+
|
|
296
|
+
for (const [platform, platformStatus] of Object.entries(status)) {
|
|
297
|
+
console.log(`${platform}:`, {
|
|
298
|
+
connected: platformStatus.connected,
|
|
299
|
+
healthy: platformStatus.healthy,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Batch Operations
|
|
305
|
+
|
|
306
|
+
### Batch Post
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
const result = await manager.postBatch({
|
|
310
|
+
requests: [
|
|
311
|
+
{
|
|
312
|
+
content: { text: 'Post 1' },
|
|
313
|
+
platforms: ['twitter'],
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
content: { text: 'Post 2' },
|
|
317
|
+
platforms: ['linkedin'],
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
content: { text: 'Post 3' },
|
|
321
|
+
platforms: ['facebook'],
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
parallelExecution: true,
|
|
325
|
+
maxConcurrency: 3,
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
console.log(`${result.summary.successful} out of ${result.summary.total} posts succeeded`);
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Batch Schedule
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
const result = await manager.scheduleBatch([
|
|
335
|
+
{
|
|
336
|
+
content: { text: 'Post 1' },
|
|
337
|
+
platforms: ['twitter'],
|
|
338
|
+
scheduledTime: new Date('2025-12-01T12:00:00Z'),
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
content: { text: 'Post 2' },
|
|
342
|
+
platforms: ['linkedin'],
|
|
343
|
+
scheduledTime: new Date('2025-12-01T13:00:00Z'),
|
|
344
|
+
},
|
|
345
|
+
]);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
## Content Type Registry
|
|
349
|
+
|
|
350
|
+
The package includes a content-type registry system for NeverHub integration:
|
|
351
|
+
|
|
352
|
+
```typescript
|
|
353
|
+
import { CONTENT_TYPE_REGISTRY, ContentTypeMatching } from '@bernierllc/social-media-manager';
|
|
354
|
+
|
|
355
|
+
const matching = new ContentTypeMatching();
|
|
356
|
+
|
|
357
|
+
// Find compatible platforms
|
|
358
|
+
const platforms = await matching.findCompatibleTypes('generic-social-content');
|
|
359
|
+
console.log('Supported platforms:', platforms);
|
|
360
|
+
|
|
361
|
+
// Get transformation pipeline
|
|
362
|
+
const pipeline = await matching.getTransformationPipeline(
|
|
363
|
+
'generic-social-content',
|
|
364
|
+
'social-media-content:twitter'
|
|
365
|
+
);
|
|
366
|
+
console.log('Transformations:', pipeline);
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## Statistics and Cleanup
|
|
370
|
+
|
|
371
|
+
### Get Schedule Statistics
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
374
|
+
const stats = manager.getScheduleStatistics();
|
|
375
|
+
|
|
376
|
+
console.log('Total scheduled:', stats.total);
|
|
377
|
+
console.log('Pending:', stats.pending);
|
|
378
|
+
console.log('Posted:', stats.posted);
|
|
379
|
+
console.log('Failed:', stats.failed);
|
|
380
|
+
console.log('Cancelled:', stats.cancelled);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Clean Up Old Posts
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
// Remove completed/cancelled posts older than 30 days
|
|
387
|
+
const removed = manager.cleanupOldScheduledPosts(30);
|
|
388
|
+
console.log(`Removed ${removed} old posts`);
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
## TypeScript Support
|
|
392
|
+
|
|
393
|
+
Full TypeScript support with comprehensive type definitions:
|
|
394
|
+
|
|
395
|
+
```typescript
|
|
396
|
+
import type {
|
|
397
|
+
SocialMediaManagerConfig,
|
|
398
|
+
GenericSocialContent,
|
|
399
|
+
MultiPlatformPostRequest,
|
|
400
|
+
SchedulePostRequest,
|
|
401
|
+
JitterConfig,
|
|
402
|
+
} from '@bernierllc/social-media-manager';
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
## License
|
|
406
|
+
|
|
407
|
+
Copyright (c) 2025 Bernier LLC. See LICENSE for details.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { SocialMediaManagerConfig, MultiPlatformPostRequest, MultiPlatformPostResult, SchedulePostRequest, SchedulePostResult, ScheduledPost, ScheduleFilters, PlatformConnection, PlatformConnectionTest, ValidationResult, GenericSocialContent, PlatformStatus, BatchPostRequest, BatchPostResult, BatchScheduleResult } from './types.js';
|
|
2
|
+
export declare class SocialMediaManager {
|
|
3
|
+
private platformRegistry;
|
|
4
|
+
private connectionManager;
|
|
5
|
+
private transformationPipeline;
|
|
6
|
+
private jitterCalculator;
|
|
7
|
+
private scheduleManager;
|
|
8
|
+
private orchestrator;
|
|
9
|
+
private config;
|
|
10
|
+
constructor(config: SocialMediaManagerConfig);
|
|
11
|
+
/**
|
|
12
|
+
* Initialize platforms from configuration
|
|
13
|
+
*/
|
|
14
|
+
private initializePlatforms;
|
|
15
|
+
/**
|
|
16
|
+
* Post to all connected platforms
|
|
17
|
+
*/
|
|
18
|
+
postToAll(request: MultiPlatformPostRequest): Promise<MultiPlatformPostResult>;
|
|
19
|
+
/**
|
|
20
|
+
* Post to specific platforms
|
|
21
|
+
*/
|
|
22
|
+
postToPlatforms(platforms: string[], request: MultiPlatformPostRequest): Promise<MultiPlatformPostResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Schedule a post
|
|
25
|
+
*/
|
|
26
|
+
schedulePost(request: SchedulePostRequest): Promise<SchedulePostResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Schedule post with jitter
|
|
29
|
+
*/
|
|
30
|
+
scheduleWithJitter(request: SchedulePostRequest, jitter: SchedulePostRequest['jitter']): Promise<SchedulePostResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Cancel a scheduled post
|
|
33
|
+
*/
|
|
34
|
+
cancelScheduledPost(scheduleId: string): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* List scheduled posts
|
|
37
|
+
*/
|
|
38
|
+
listScheduledPosts(filters?: ScheduleFilters): Promise<ScheduledPost[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Connect to a platform
|
|
41
|
+
*/
|
|
42
|
+
connectPlatform(platform: string, credentials: unknown): Promise<PlatformConnection>;
|
|
43
|
+
/**
|
|
44
|
+
* Disconnect from a platform
|
|
45
|
+
*/
|
|
46
|
+
disconnectPlatform(platform: string): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* List connected platforms
|
|
49
|
+
*/
|
|
50
|
+
listConnectedPlatforms(): Promise<PlatformConnection[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Test platform connection
|
|
53
|
+
*/
|
|
54
|
+
testPlatformConnection(platform: string): Promise<PlatformConnectionTest>;
|
|
55
|
+
/**
|
|
56
|
+
* Transform generic content to platform-specific format
|
|
57
|
+
*/
|
|
58
|
+
transformContent(sourceContent: GenericSocialContent, targetPlatform: string): Promise<unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* Validate content for a platform
|
|
61
|
+
*/
|
|
62
|
+
validateContentForPlatform(content: GenericSocialContent, platform: string): Promise<ValidationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Optimize content for a platform
|
|
65
|
+
*/
|
|
66
|
+
optimizeForPlatform(content: GenericSocialContent, platform: string): Promise<unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* Post batch of requests
|
|
69
|
+
*/
|
|
70
|
+
postBatch(request: BatchPostRequest): Promise<BatchPostResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Schedule batch of posts
|
|
73
|
+
*/
|
|
74
|
+
scheduleBatch(requests: SchedulePostRequest[]): Promise<BatchScheduleResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Get platform status
|
|
77
|
+
*/
|
|
78
|
+
getPlatformStatus(): Promise<Record<string, PlatformStatus>>;
|
|
79
|
+
/**
|
|
80
|
+
* Get schedule statistics
|
|
81
|
+
*/
|
|
82
|
+
getScheduleStatistics(): {
|
|
83
|
+
total: number;
|
|
84
|
+
pending: number;
|
|
85
|
+
posted: number;
|
|
86
|
+
partial: number;
|
|
87
|
+
failed: number;
|
|
88
|
+
cancelled: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Clean up old scheduled posts
|
|
92
|
+
*/
|
|
93
|
+
cleanupOldScheduledPosts(olderThanDays?: number): number;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=SocialMediaManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialMediaManager.d.ts","sourceRoot":"","sources":["../src/SocialMediaManager.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,sBAAsB,CAAgC;IAC9D,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,MAAM,CAA2B;gBAE7B,MAAM,EAAE,wBAAwB;IAgB5C;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIpF;;OAEG;IACG,eAAe,CACnB,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC;IAInC;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAoC7E;;OAEG;IACG,kBAAkB,CACtB,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,GACpC,OAAO,CAAC,kBAAkB,CAAC;IAO9B;;OAEG;IACG,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/D;;OAEG;IACG,kBAAkB,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAI7E;;OAEG;IACG,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI1F;;OAEG;IACG,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5D;;OAEG;IACG,sBAAsB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAI7D;;OAEG;IACG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI/E;;OAEG;IACG,gBAAgB,CACpB,aAAa,EAAE,oBAAoB,EACnC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,OAAO,CAAC;IAInB;;OAEG;IACG,0BAA0B,CAC9B,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,gBAAgB,CAAC;IAI5B;;OAEG;IACG,mBAAmB,CACvB,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;IAKnB;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAwCpE;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAiClF;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IA2BlE;;OAEG;IACH,qBAAqB;;;;;;;;IAIrB;;OAEG;IACH,wBAAwB,CAAC,aAAa,SAAK,GAAG,MAAM;CAGrD"}
|