UNPKG

@elusion-sdk/briq

Version:

A modern TypeScript SDK for Briq SMS API integration

47 lines 3.3 kB
export { Briq } from "./client/BriqClient"; import { Briq } from "./client/BriqClient"; import type { CampaignService } from "./services/CampaignService"; import type { MessageService } from "./services/MessageService"; import type { WorkspaceService } from "./services/WorkspaceService"; import type { ApiResponse, BaseEntity, BriqConfig, PaginatedResponse } from "./types/common"; export { WorkspaceService } from "./services/WorkspaceService"; export { MessageService } from "./services/MessageService"; export { CampaignService } from "./services/CampaignService"; export { BaseClient } from "./client/BaseClient"; export { BaseService } from "./services/BaseService"; export { HttpClient } from "./client/HttpClient"; export type { BriqConfig, ApiResponse, ApiError, HttpMethod, RequestConfig, PaginationParams, PaginatedResponse, BaseEntity, OperationStatus, RetryConfig, } from "./types/common"; export type { Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, WorkspaceListParams, } from "./types/workspace"; export type { Message, MessageStatus, SendInstantMessageRequest, SendCampaignMessageRequest, MessageLogsParams, MessageHistoryParams, } from "./types/message"; export type { Campaign, CreateCampaignRequest, UpdateCampaignRequest, CampaignListParams, } from "./types/campaign"; export { BriqError, AuthenticationError, AuthorizationError, ValidationError, NotFoundError, RateLimitError, NetworkError, ServerError, ConfigurationError, TimeoutError, } from "./utils/errors"; export { validateApiKey, validatePhoneNumber, validatePhoneNumbers, validateMessage, validateWorkspaceName, validateCampaignName, validateUUID, validatePaginationParams, validateISODate, } from "./utils/validators"; export { formatPhoneNumber, formatPhoneNumbers, calculateSMSSegments, normalizePaginationParams, delay, calculateBackoffDelay, isRetryableError, deepClone, } from "./utils/helpers"; export { API_CONFIG, ENDPOINTS, HTTP_STATUS, VALIDATION_PATTERNS, PAGINATION_DEFAULTS, RETRY_CONFIG, } from "./utils/constants"; export default Briq; export { briq } from "./factory"; export declare function createClient(config: BriqConfig): Briq; export declare const VERSION = "0.1.0"; export type { BriqConfig as Config, ApiResponse as Response, PaginatedResponse as PaginatedResult, }; export type ResponseData<T> = T extends ApiResponse<infer U> ? U : never; export type RequestOf<T> = Omit<T, keyof BaseEntity>; export interface SDKMethods { workspaces: WorkspaceService; messages: MessageService; campaigns: CampaignService; testConnection(): Promise<boolean>; getConfig(): Omit<Required<BriqConfig>, "apiKey">; } export declare const SDK_INFO: { readonly name: "briq-sdk"; readonly packageName: "@elusion-sdk/briq"; readonly version: "0.1.0"; readonly description: "TypeScript/JavaScript SDK for Karibu Briq SMS API"; readonly author: "Elusion Lab <elusion.lab@gmail.com>"; readonly maintainers: readonly ["Elusion Lab <elusion.lab@gmail.com>", "Eric Kweyunga <maverickweyunga@gmail.com>", "Briq Team <sms@briq.tz>"]; readonly license: "MIT"; readonly repository: "https://github.com/elusionhub/briq-sdk.git"; readonly documentation: "https://briq.tz/documentation/home"; readonly apiVersion: "v1"; }; //# sourceMappingURL=index.d.ts.map