planning-center-api
Version:
A TypeScript toolkit for building applications on top of the Planning Center API.
55 lines (54 loc) • 1.8 kB
TypeScript
import { PlanningCenterConfig } from "./types.js";
import { PeopleApp } from "./apps/people.js";
import { ServicesApp } from "./apps/services.js";
import { GroupsApp } from "./apps/groups.js";
import { CheckInsApp } from "./apps/check-ins.js";
import { HomeApp } from "./apps/home.js";
import { ChatApp } from "./apps/chat.js";
import { RegistrationsApp } from "./apps/registrations.js";
import { CalendarApp } from "./apps/calendar.js";
import { GivingApp } from "./apps/giving.js";
import { ApiApp } from "./apps/api.js";
import { PublishingApp } from "./apps/publishing.js";
import { WebhooksApp } from "./apps/webhooks.js";
export declare class PlanningCenter {
private config;
private auth;
private baseUrl;
private currentTokens?;
private lastRequestTime;
private tokenRefreshedAt?;
private tokenExpiryMs;
constructor(config?: PlanningCenterConfig);
private parseTimestamp;
private getDefaultAuth;
get people(): PeopleApp;
get services(): ServicesApp;
get groups(): GroupsApp;
get checkIns(): CheckInsApp;
get home(): HomeApp;
get chat(): ChatApp;
get registrations(): RegistrationsApp;
get calendar(): CalendarApp;
get giving(): GivingApp;
get api(): ApiApp;
get publishing(): PublishingApp;
get webhooks(): WebhooksApp;
request<T = any>(method: string, path: string, body?: any, options?: {
autoPaginate?: boolean;
per_page?: number;
offset?: number;
}): Promise<{
data: T;
meta?: any;
links?: any;
}>;
private singleRequest;
private requestWithPagination;
private getHeaders;
private handleRateLimit;
private sleep;
private shouldAutoRefresh;
private shouldProactivelyRefresh;
private refreshAccessToken;
}