mirror of
https://github.com/Gimanh/taskview-community.git
synced 2026-12-04 06:12:29 +00:00
151 lines
4.2 KiB
TypeScript
151 lines
4.2 KiB
TypeScript
import TvTaskApi from "@/api/tasks";
|
|
import type { AxiosInstance } from "axios";
|
|
import TvGraph from "./api/graph";
|
|
import TvGoalApi from "./api/goals";
|
|
import { TvCollaborationApi } from "./api/collaboration";
|
|
import TvGoalListApi from "./api/goals-list";
|
|
import TvTagsApi from "./api/tags";
|
|
import TvIntegrationsApi from "./api/integrations";
|
|
import TvKanban from "./api/kanban";
|
|
import TvNotificationsApi from "./api/notifications";
|
|
import TvWebhooks from "./api/webhooks";
|
|
import TvImport from "./api/import";
|
|
import TvMessagingApi from "./api/messaging";
|
|
import TvApiTokens from "./api/api-tokens";
|
|
import TvOAuth from "./api/oauth";
|
|
import TvStartApi from "./api/start";
|
|
import TvSessions from "./api/sessions";
|
|
import TvOrganizationsApi from "./api/organizations";
|
|
import TvSsoApi from "./api/sso";
|
|
import TvAnalyticsApi from "./api/analytics";
|
|
import TvTimeTrackingApi from "./api/time-tracking";
|
|
import TvUiPreferencesApi from "./api/ui-preferences";
|
|
import TvOnboardingApi from "./api/onboarding";
|
|
import TvSprintApi from "./api/sprints";
|
|
import TvRecurrenceApi from "./api/recurrence";
|
|
import TvBillingApi from "./api/billing";
|
|
import TvInvoicesApi from "./api/invoices";
|
|
import TvFilesApi from "./api/files";
|
|
import TvAutomationsApi from "./api/automations";
|
|
import TvCommentsApi from "./api/comments";
|
|
|
|
export class TvApi {
|
|
|
|
protected $axios: AxiosInstance;
|
|
|
|
public tasks: TvTaskApi;
|
|
|
|
public graph: TvGraph;
|
|
|
|
public goals: TvGoalApi;
|
|
|
|
public collaboration: TvCollaborationApi;
|
|
|
|
public goalLists: TvGoalListApi;
|
|
|
|
public tags: TvTagsApi;
|
|
|
|
public kanban: TvKanban;
|
|
|
|
public integrations: TvIntegrationsApi;
|
|
|
|
public notifications: TvNotificationsApi;
|
|
|
|
public webhooks: TvWebhooks;
|
|
public import: TvImport;
|
|
|
|
public messaging: TvMessagingApi;
|
|
|
|
public apiTokens: TvApiTokens;
|
|
public oauth: TvOAuth;
|
|
public start: TvStartApi;
|
|
|
|
public sessions: TvSessions;
|
|
|
|
public organizations: TvOrganizationsApi;
|
|
|
|
public sso: TvSsoApi;
|
|
|
|
public analytics: TvAnalyticsApi;
|
|
|
|
public timeTracking: TvTimeTrackingApi;
|
|
|
|
public uiPreferences: TvUiPreferencesApi;
|
|
|
|
public onboarding: TvOnboardingApi;
|
|
|
|
public sprints: TvSprintApi;
|
|
|
|
public recurrence: TvRecurrenceApi;
|
|
|
|
public billing: TvBillingApi;
|
|
|
|
public invoices: TvInvoicesApi;
|
|
public files: TvFilesApi;
|
|
public automations: TvAutomationsApi;
|
|
public comments: TvCommentsApi;
|
|
|
|
constructor($axios: AxiosInstance) {
|
|
this.$axios = $axios;
|
|
|
|
this.tasks = new TvTaskApi(this.$axios);
|
|
|
|
this.graph = new TvGraph(this.$axios);
|
|
|
|
this.goals = new TvGoalApi(this.$axios);
|
|
|
|
this.collaboration = new TvCollaborationApi(this.$axios);
|
|
|
|
this.goalLists = new TvGoalListApi(this.$axios);
|
|
|
|
this.tags = new TvTagsApi(this.$axios);
|
|
|
|
this.kanban = new TvKanban(this.$axios);
|
|
|
|
this.integrations = new TvIntegrationsApi(this.$axios);
|
|
|
|
this.notifications = new TvNotificationsApi(this.$axios);
|
|
|
|
this.webhooks = new TvWebhooks(this.$axios);
|
|
this.import = new TvImport(this.$axios);
|
|
|
|
this.messaging = new TvMessagingApi(this.$axios);
|
|
|
|
this.apiTokens = new TvApiTokens(this.$axios);
|
|
this.oauth = new TvOAuth(this.$axios);
|
|
this.start = new TvStartApi(this.$axios);
|
|
|
|
this.sessions = new TvSessions(this.$axios);
|
|
|
|
this.organizations = new TvOrganizationsApi(this.$axios);
|
|
|
|
this.sso = new TvSsoApi(this.$axios);
|
|
|
|
this.analytics = new TvAnalyticsApi(this.$axios);
|
|
|
|
this.timeTracking = new TvTimeTrackingApi(this.$axios);
|
|
|
|
this.uiPreferences = new TvUiPreferencesApi(this.$axios);
|
|
|
|
this.onboarding = new TvOnboardingApi(this.$axios);
|
|
|
|
this.sprints = new TvSprintApi(this.$axios);
|
|
|
|
this.recurrence = new TvRecurrenceApi(this.$axios);
|
|
|
|
this.billing = new TvBillingApi(this.$axios);
|
|
|
|
this.invoices = new TvInvoicesApi(this.$axios);
|
|
this.files = new TvFilesApi(this.$axios);
|
|
this.automations = new TvAutomationsApi(this.$axios);
|
|
this.comments = new TvCommentsApi(this.$axios);
|
|
}
|
|
|
|
public get baseUrl(): string | undefined {
|
|
return this.$axios.defaults.baseURL;
|
|
}
|
|
|
|
public setBaseUrl(baseUrl: string) {
|
|
this.$axios.defaults.baseURL = baseUrl;
|
|
}
|
|
} |