-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplane-client.ts
More file actions
83 lines (79 loc) · 2.93 KB
/
plane-client.ts
File metadata and controls
83 lines (79 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { Configuration } from "../Configuration";
import { Projects } from "../api/Projects";
import { WorkItems } from "../api/WorkItems";
import { WorkItemTypes } from "../api/WorkItemTypes";
import { WorkItemProperties } from "../api/WorkItemProperties";
import { Links } from "../api/Links";
import { Customers } from "../api/Customers";
import { Pages } from "../api/Pages";
import { Labels } from "../api/Labels";
import { States } from "../api/States";
import { Members } from "../api/Members";
import { Modules } from "../api/Modules";
import { Cycles } from "../api/Cycles";
import { Users } from "../api/Users";
import { Workspace } from "../api/Workspace";
import { Epics } from "../api/Epics";
import { Intake } from "../api/Intake";
import { Stickies } from "../api/Stickies";
import { Teamspaces } from "../api/Teamspaces";
import { Initiatives } from "../api/Initiatives";
import { AgentRuns } from "../api/AgentRuns";
/**
* Main Plane Client class
* Provides access to all Plane API resources
*/
export class PlaneClient {
public config: Configuration;
public workItems: WorkItems;
public workItemTypes: WorkItemTypes;
public workItemProperties: WorkItemProperties;
public links: Links;
public customers: Customers;
public pages: Pages;
public projects: Projects;
public labels: Labels;
public states: States;
public members: Members;
public modules: Modules;
public cycles: Cycles;
public users: Users;
public workspace: Workspace;
public epics: Epics;
public intake: Intake;
public stickies: Stickies;
public teamspaces: Teamspaces;
public initiatives: Initiatives;
public agentRuns: AgentRuns;
constructor(config: { baseUrl?: string; apiKey?: string; accessToken?: string; enableLogging?: boolean }) {
this.config = new Configuration({
baseUrl: config.baseUrl,
apiKey: config.apiKey,
accessToken: config.accessToken,
enableLogging: config.enableLogging,
});
// Validate configuration
this.config.validate();
// Initialize API resources
this.workItems = new WorkItems(this.config);
this.workItemTypes = new WorkItemTypes(this.config);
this.workItemProperties = new WorkItemProperties(this.config);
this.links = new Links(this.config);
this.customers = new Customers(this.config);
this.pages = new Pages(this.config);
this.projects = new Projects(this.config);
this.labels = new Labels(this.config);
this.states = new States(this.config);
this.members = new Members(this.config);
this.modules = new Modules(this.config);
this.cycles = new Cycles(this.config);
this.users = new Users(this.config);
this.workspace = new Workspace(this.config);
this.epics = new Epics(this.config);
this.intake = new Intake(this.config);
this.stickies = new Stickies(this.config);
this.teamspaces = new Teamspaces(this.config);
this.initiatives = new Initiatives(this.config);
this.agentRuns = new AgentRuns(this.config);
}
}