@memberjunction/actions-bizapps-social
Version:
Social Media Actions for MemberJunction - Twitter, LinkedIn, Facebook, Instagram, TikTok, YouTube, HootSuite, Buffer
95 lines • 2.96 kB
TypeScript
import { BaseSocialMediaAction, SocialPost, SocialAnalytics, MediaFile } from '../../base/base-social.action';
import { AxiosInstance } from 'axios';
/**
* Base class for all Buffer social media actions.
* Handles Buffer-specific authentication and API interaction patterns.
*/
export declare abstract class BufferBaseAction extends BaseSocialMediaAction {
protected get platformName(): string;
protected get apiBaseUrl(): string;
private axiosInstance;
/**
* Get axios instance with authentication
*/
protected getAxiosInstance(): AxiosInstance;
/**
* Refresh access token using refresh token
*/
protected refreshAccessToken(): Promise<void>;
/**
* Get Buffer profiles for the authenticated user
*/
protected getProfiles(): Promise<any[]>;
/**
* Upload media to Buffer
*/
protected uploadSingleMedia(file: MediaFile): Promise<string>;
/**
* Create a Buffer update (post)
*/
protected createUpdate(profileIds: string[], text: string, media?: {
link?: string;
description?: string;
picture?: string;
}[], scheduledAt?: Date, options?: {
shorten?: boolean;
now?: boolean;
top?: boolean;
attachment?: boolean;
}): Promise<any>;
/**
* Get updates (posts) from Buffer
*/
protected getUpdates(profileId: string, status: 'pending' | 'sent', options?: {
page?: number;
count?: number;
since?: Date;
utc?: boolean;
}): Promise<any>;
/**
* Delete a Buffer update
*/
protected deleteUpdate(updateId: string): Promise<boolean>;
/**
* Reorder updates in the queue
*/
protected reorderUpdates(profileId: string, updateIds: string[], offset?: number): Promise<any>;
/**
* Get analytics for sent posts
*/
protected getAnalytics(updateId: string): Promise<any>;
/**
* Search posts implementation for Buffer
* Buffer doesn't have a native search API, so we'll fetch posts and filter client-side
*/
protected searchPosts(params: {
query?: string;
hashtags?: string[];
startDate?: Date;
endDate?: Date;
limit?: number;
offset?: number;
profileIds?: string[];
}): Promise<SocialPost[]>;
/**
* Check if a post matches search criteria
*/
private matchesSearchCriteria;
/**
* Extract hashtags from post content
*/
protected extractHashtags(content: string): string[];
/**
* Normalize Buffer post to common format
*/
protected normalizePost(bufferPost: any): SocialPost;
/**
* Normalize Buffer analytics to common format
*/
protected normalizeAnalytics(bufferStats: any): SocialAnalytics;
/**
* Map Buffer error to our error codes
*/
protected mapBufferError(error: any): string;
}
//# sourceMappingURL=buffer-base.action.d.ts.map