@makeplane/plane-node-sdk 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/Milestones.d.ts +44 -0
- package/dist/api/Milestones.d.ts.map +1 -0
- package/dist/api/Milestones.js +67 -0
- package/dist/api/Milestones.js.map +1 -0
- package/dist/api/WorkItems/index.d.ts +8 -1
- package/dist/api/WorkItems/index.d.ts.map +1 -1
- package/dist/api/WorkItems/index.js +9 -0
- package/dist/api/WorkItems/index.js.map +1 -1
- package/dist/client/plane-client.d.ts +2 -0
- package/dist/client/plane-client.d.ts.map +1 -1
- package/dist/client/plane-client.js +2 -0
- package/dist/client/plane-client.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/models/Milestone.d.ts +34 -0
- package/dist/models/Milestone.d.ts.map +1 -0
- package/dist/models/Milestone.js +3 -0
- package/dist/models/Milestone.js.map +1 -0
- package/dist/models/WorkItem.d.ts +33 -0
- package/dist/models/WorkItem.d.ts.map +1 -1
- package/dist/models/index.d.ts +22 -11
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +22 -11
- package/dist/models/index.js.map +1 -1
- package/dist/types.bundle.d.ts +2597 -0
- package/package.json +4 -2
|
@@ -0,0 +1,2597 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration class for Plane SDK
|
|
5
|
+
* Handles authentication and base URL configuration
|
|
6
|
+
*/
|
|
7
|
+
export declare class Configuration {
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
accessToken?: string;
|
|
11
|
+
enableLogging: boolean;
|
|
12
|
+
constructor(config: {
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
accessToken?: string;
|
|
16
|
+
enableLogging?: boolean;
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Validates that required configuration is present
|
|
20
|
+
*/
|
|
21
|
+
validate(): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Base resource class containing HTTP logic and authentication
|
|
25
|
+
* All API resources should extend this class
|
|
26
|
+
*/
|
|
27
|
+
export declare abstract class BaseResource {
|
|
28
|
+
protected config: Configuration;
|
|
29
|
+
protected apiBasePath: string;
|
|
30
|
+
constructor(config: Configuration);
|
|
31
|
+
/**
|
|
32
|
+
* Sanitize headers to remove sensitive information
|
|
33
|
+
*/
|
|
34
|
+
private sanitizeHeaders;
|
|
35
|
+
/**
|
|
36
|
+
* Sanitize data to remove sensitive information and limit size
|
|
37
|
+
*/
|
|
38
|
+
private sanitizeData;
|
|
39
|
+
/**
|
|
40
|
+
* GET request
|
|
41
|
+
*/
|
|
42
|
+
protected get<T>(endpoint: string, params?: any): Promise<T>;
|
|
43
|
+
/**
|
|
44
|
+
* POST request
|
|
45
|
+
*/
|
|
46
|
+
protected post<T>(endpoint: string, data?: any): Promise<T>;
|
|
47
|
+
/**
|
|
48
|
+
* PUT request
|
|
49
|
+
*/
|
|
50
|
+
protected put<T>(endpoint: string, data?: any): Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* PATCH request
|
|
53
|
+
*/
|
|
54
|
+
protected patch<T>(endpoint: string, data?: any): Promise<T>;
|
|
55
|
+
/**
|
|
56
|
+
* DELETE request
|
|
57
|
+
*/
|
|
58
|
+
protected httpDelete(endpoint: string, data?: any): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Builds the complete URL for API requests
|
|
61
|
+
*/
|
|
62
|
+
protected buildUrl(endpoint: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Gets headers for API requests including authentication
|
|
65
|
+
*/
|
|
66
|
+
protected getHeaders(): Record<string, string>;
|
|
67
|
+
/**
|
|
68
|
+
* Centralized error handling
|
|
69
|
+
*/
|
|
70
|
+
protected handleError(error: any): never;
|
|
71
|
+
/**
|
|
72
|
+
* Setup axios interceptors for request and response logging
|
|
73
|
+
*/
|
|
74
|
+
private setupInterceptors;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Common types
|
|
78
|
+
*/
|
|
79
|
+
export interface BaseModel {
|
|
80
|
+
id: string;
|
|
81
|
+
created_at: Date;
|
|
82
|
+
updated_at: Date;
|
|
83
|
+
deleted_at?: Date;
|
|
84
|
+
created_by: string;
|
|
85
|
+
updated_by?: string;
|
|
86
|
+
external_source?: string;
|
|
87
|
+
external_id?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface PaginatedResponse<T> {
|
|
90
|
+
grouped_by?: string;
|
|
91
|
+
sub_grouped_by?: string;
|
|
92
|
+
total_count: number;
|
|
93
|
+
next_cursor?: string;
|
|
94
|
+
prev_cursor?: string;
|
|
95
|
+
next_page_results?: boolean;
|
|
96
|
+
prev_page_results?: boolean;
|
|
97
|
+
count: number;
|
|
98
|
+
total_pages: number;
|
|
99
|
+
total_results: number;
|
|
100
|
+
extra_stats?: any;
|
|
101
|
+
results: T[];
|
|
102
|
+
}
|
|
103
|
+
export interface Assignee {
|
|
104
|
+
id: string;
|
|
105
|
+
first_name?: string;
|
|
106
|
+
last_name?: string;
|
|
107
|
+
email: string;
|
|
108
|
+
avatar?: string;
|
|
109
|
+
avatar_url?: string;
|
|
110
|
+
display_name?: string;
|
|
111
|
+
}
|
|
112
|
+
export type EmojiProps = {
|
|
113
|
+
in_use: "emoji";
|
|
114
|
+
emoji: {
|
|
115
|
+
value?: string;
|
|
116
|
+
url?: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export type IconProps = {
|
|
120
|
+
in_use: "icon";
|
|
121
|
+
icon: {
|
|
122
|
+
name?: string;
|
|
123
|
+
color?: string;
|
|
124
|
+
background_color?: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export type LogoProps = EmojiProps | IconProps;
|
|
128
|
+
export type ServerGeneratedFields = "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "external_source" | "external_id";
|
|
129
|
+
export type CreateEntity<T> = Omit<T, ServerGeneratedFields>;
|
|
130
|
+
export type UpdateEntity<T> = Partial<Omit<T, ServerGeneratedFields | "id">>;
|
|
131
|
+
export type ResponseEntity<T> = T;
|
|
132
|
+
export type PriorityEnum = "urgent" | "high" | "medium" | "low" | "none";
|
|
133
|
+
export type PropertyType = "TEXT" | "DECIMAL" | "OPTION" | "BOOLEAN" | "DATETIME" | "RELATION";
|
|
134
|
+
export type PropertyRelationType = "USER" | "ISSUE";
|
|
135
|
+
export type AccessEnum = "INTERNAL" | "EXTERNAL";
|
|
136
|
+
export type TimezoneEnum = "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Ciudad_Juarez" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Fort_Nelson" | "America/Fortaleza" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/Port_of_Spain" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Colombo" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Riyadh" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/Isle_of_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Ulyanovsk" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Wake" | "Pacific/Wallis" | "US/Alaska" | "US/Arizona" | "US/Central" | "US/Eastern" | "US/Hawaii" | "US/Mountain" | "US/Pacific" | "UTC";
|
|
137
|
+
/**
|
|
138
|
+
* Project model interfaces
|
|
139
|
+
*/
|
|
140
|
+
export interface Project extends BaseModel {
|
|
141
|
+
id: string;
|
|
142
|
+
total_members: number;
|
|
143
|
+
total_cycles: number;
|
|
144
|
+
total_modules: number;
|
|
145
|
+
is_member: boolean;
|
|
146
|
+
member_role: number;
|
|
147
|
+
is_deployed: boolean;
|
|
148
|
+
cover_image_url: null;
|
|
149
|
+
name: string;
|
|
150
|
+
description: string;
|
|
151
|
+
network?: number;
|
|
152
|
+
identifier?: string;
|
|
153
|
+
emoji?: null;
|
|
154
|
+
icon_prop?: null;
|
|
155
|
+
module_view: boolean;
|
|
156
|
+
cycle_view: boolean;
|
|
157
|
+
issue_views_view: boolean;
|
|
158
|
+
page_view: boolean;
|
|
159
|
+
intake_view: boolean;
|
|
160
|
+
is_time_tracking_enabled?: boolean;
|
|
161
|
+
is_issue_type_enabled?: boolean;
|
|
162
|
+
guest_view_all_features: boolean;
|
|
163
|
+
cover_image?: string;
|
|
164
|
+
archive_in: number;
|
|
165
|
+
close_in: number;
|
|
166
|
+
archived_at?: Date;
|
|
167
|
+
timezone: string;
|
|
168
|
+
workspace: string;
|
|
169
|
+
default_assignee: null;
|
|
170
|
+
project_lead: null;
|
|
171
|
+
cover_image_asset: null;
|
|
172
|
+
estimate: null;
|
|
173
|
+
default_state: null;
|
|
174
|
+
}
|
|
175
|
+
export type CreateProject = Pick<Project, "name" | "identifier"> & Partial<Omit<Project, "name" | "identifier">>;
|
|
176
|
+
export type UpdateProject = Partial<Project>;
|
|
177
|
+
export interface ListProjectsParams {
|
|
178
|
+
limit?: number;
|
|
179
|
+
offset?: number;
|
|
180
|
+
}
|
|
181
|
+
export interface User {
|
|
182
|
+
id?: string;
|
|
183
|
+
first_name?: string;
|
|
184
|
+
last_name?: string;
|
|
185
|
+
email?: string;
|
|
186
|
+
avatar?: string;
|
|
187
|
+
avatar_url?: string;
|
|
188
|
+
display_name?: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Project Features model interfaces
|
|
192
|
+
*/
|
|
193
|
+
export interface ProjectFeatures {
|
|
194
|
+
epics: boolean;
|
|
195
|
+
modules: boolean;
|
|
196
|
+
cycles: boolean;
|
|
197
|
+
views: boolean;
|
|
198
|
+
pages: boolean;
|
|
199
|
+
intakes: boolean;
|
|
200
|
+
work_item_types: boolean;
|
|
201
|
+
}
|
|
202
|
+
export type UpdateProjectFeatures = Partial<ProjectFeatures>;
|
|
203
|
+
/**
|
|
204
|
+
* Project API resource
|
|
205
|
+
* Handles all project-related operations
|
|
206
|
+
*/
|
|
207
|
+
export declare class Projects extends BaseResource {
|
|
208
|
+
constructor(config: Configuration);
|
|
209
|
+
/**
|
|
210
|
+
* Create a new project
|
|
211
|
+
*/
|
|
212
|
+
create(workspaceSlug: string, createProject: CreateProject): Promise<Project>;
|
|
213
|
+
/**
|
|
214
|
+
* Retrieve a project by ID
|
|
215
|
+
*/
|
|
216
|
+
retrieve(workspaceSlug: string, projectId: string): Promise<Project>;
|
|
217
|
+
/**
|
|
218
|
+
* Update a project
|
|
219
|
+
*/
|
|
220
|
+
update(workspaceSlug: string, projectId: string, updateProject: UpdateProject): Promise<Project>;
|
|
221
|
+
/**
|
|
222
|
+
* Delete a project
|
|
223
|
+
*/
|
|
224
|
+
delete(workspaceSlug: string, projectId: string): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* List projects with optional filtering
|
|
227
|
+
*/
|
|
228
|
+
list(workspaceSlug: string, params?: ListProjectsParams): Promise<PaginatedResponse<Project>>;
|
|
229
|
+
/**
|
|
230
|
+
* Get project members
|
|
231
|
+
*/
|
|
232
|
+
getMembers(workspaceSlug: string, projectId: string): Promise<User[]>;
|
|
233
|
+
/**
|
|
234
|
+
* Get total work logs for a project
|
|
235
|
+
*/
|
|
236
|
+
getTotalWorkLogs(workspaceSlug: string, projectId: string): Promise<any>;
|
|
237
|
+
/**
|
|
238
|
+
* Retrieve project features
|
|
239
|
+
*/
|
|
240
|
+
retrieveFeatures(workspaceSlug: string, projectId: string): Promise<ProjectFeatures>;
|
|
241
|
+
/**
|
|
242
|
+
* Update project features
|
|
243
|
+
*/
|
|
244
|
+
updateFeatures(workspaceSlug: string, projectId: string, updateFeatures: UpdateProjectFeatures): Promise<ProjectFeatures>;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* WorkItemType model interfaces
|
|
248
|
+
*/
|
|
249
|
+
export interface WorkItemType extends BaseModel {
|
|
250
|
+
name: string;
|
|
251
|
+
description?: string;
|
|
252
|
+
logo_props: LogoProps;
|
|
253
|
+
is_epic: boolean;
|
|
254
|
+
is_default: boolean;
|
|
255
|
+
is_active: boolean;
|
|
256
|
+
level: number;
|
|
257
|
+
workspace: string;
|
|
258
|
+
project: string;
|
|
259
|
+
}
|
|
260
|
+
export type CreateWorkItemType = Partial<WorkItemType>;
|
|
261
|
+
export type UpdateWorkItemType = Partial<WorkItemType>;
|
|
262
|
+
export interface CreateModuleRequest {
|
|
263
|
+
name: string;
|
|
264
|
+
description?: string;
|
|
265
|
+
start_date?: string;
|
|
266
|
+
target_date?: string;
|
|
267
|
+
status?: ModuleStatusEnum;
|
|
268
|
+
lead?: string;
|
|
269
|
+
members?: string[];
|
|
270
|
+
external_source?: string;
|
|
271
|
+
external_id?: string;
|
|
272
|
+
}
|
|
273
|
+
export interface UpdateModuleRequest {
|
|
274
|
+
name?: string;
|
|
275
|
+
description?: string;
|
|
276
|
+
start_date?: string;
|
|
277
|
+
target_date?: string;
|
|
278
|
+
status?: ModuleStatusEnum;
|
|
279
|
+
lead?: string;
|
|
280
|
+
members?: string[];
|
|
281
|
+
external_source?: string;
|
|
282
|
+
external_id?: string;
|
|
283
|
+
}
|
|
284
|
+
export interface ModuleWorkItem {
|
|
285
|
+
id?: string;
|
|
286
|
+
sub_issues_count?: number;
|
|
287
|
+
created_at?: string;
|
|
288
|
+
updated_at?: string;
|
|
289
|
+
deleted_at: string;
|
|
290
|
+
created_by?: string;
|
|
291
|
+
updated_by?: string;
|
|
292
|
+
project?: string;
|
|
293
|
+
workspace?: string;
|
|
294
|
+
module?: string;
|
|
295
|
+
issue: string;
|
|
296
|
+
}
|
|
297
|
+
export interface Module extends BaseModel {
|
|
298
|
+
name: string;
|
|
299
|
+
description?: string;
|
|
300
|
+
description_text?: any;
|
|
301
|
+
description_html?: any;
|
|
302
|
+
start_date?: string;
|
|
303
|
+
target_date?: string;
|
|
304
|
+
status?: ModuleStatusEnum;
|
|
305
|
+
view_props?: any;
|
|
306
|
+
sort_order?: number;
|
|
307
|
+
archived_at?: string;
|
|
308
|
+
logo_props?: any;
|
|
309
|
+
project: string;
|
|
310
|
+
workspace: string;
|
|
311
|
+
lead?: string;
|
|
312
|
+
members?: string[];
|
|
313
|
+
}
|
|
314
|
+
export type ModuleStatusEnum = "backlog" | "planned" | "in-progress" | "paused" | "completed" | "cancelled";
|
|
315
|
+
export interface ListModulesParamsRequest {
|
|
316
|
+
limit?: number;
|
|
317
|
+
offset?: number;
|
|
318
|
+
}
|
|
319
|
+
export interface Label {
|
|
320
|
+
id?: string;
|
|
321
|
+
created_at?: string;
|
|
322
|
+
updated_at?: string;
|
|
323
|
+
deleted_at?: string;
|
|
324
|
+
name: string;
|
|
325
|
+
description?: string;
|
|
326
|
+
color?: string;
|
|
327
|
+
sort_order?: number;
|
|
328
|
+
external_source?: string;
|
|
329
|
+
external_id?: string;
|
|
330
|
+
created_by?: string;
|
|
331
|
+
updated_by?: string;
|
|
332
|
+
workspace?: string;
|
|
333
|
+
project?: string;
|
|
334
|
+
parent?: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* State model interfaces
|
|
338
|
+
*/
|
|
339
|
+
export type State = {
|
|
340
|
+
id: string;
|
|
341
|
+
name: string;
|
|
342
|
+
description?: string;
|
|
343
|
+
color: string;
|
|
344
|
+
sequence?: number;
|
|
345
|
+
group?: GroupEnum;
|
|
346
|
+
is_triage?: boolean;
|
|
347
|
+
default?: boolean;
|
|
348
|
+
project?: string;
|
|
349
|
+
workspace?: string;
|
|
350
|
+
external_source?: string;
|
|
351
|
+
external_id?: string;
|
|
352
|
+
created_at: string;
|
|
353
|
+
updated_at: string;
|
|
354
|
+
deleted_at: string;
|
|
355
|
+
created_by: string;
|
|
356
|
+
updated_by: string;
|
|
357
|
+
};
|
|
358
|
+
export type CreateState = {
|
|
359
|
+
name: string;
|
|
360
|
+
description?: string;
|
|
361
|
+
color: string;
|
|
362
|
+
sequence?: number;
|
|
363
|
+
group?: GroupEnum;
|
|
364
|
+
is_triage?: boolean;
|
|
365
|
+
default?: boolean;
|
|
366
|
+
external_source?: string;
|
|
367
|
+
external_id?: string;
|
|
368
|
+
};
|
|
369
|
+
export type UpdateState = Partial<CreateState>;
|
|
370
|
+
export type ListStatesParams = {
|
|
371
|
+
project?: string;
|
|
372
|
+
limit?: number;
|
|
373
|
+
offset?: number;
|
|
374
|
+
};
|
|
375
|
+
export type GroupEnum = "backlog" | "unstarted" | "started" | "completed" | "cancelled" | "triage";
|
|
376
|
+
/**
|
|
377
|
+
* WorkItem model interfaces
|
|
378
|
+
*/
|
|
379
|
+
export interface WorkItemBase extends BaseModel {
|
|
380
|
+
name: string;
|
|
381
|
+
sequence_id: number;
|
|
382
|
+
description_html?: string;
|
|
383
|
+
project: string;
|
|
384
|
+
labels?: string[];
|
|
385
|
+
assignees?: string[];
|
|
386
|
+
type?: string;
|
|
387
|
+
estimate_point?: string;
|
|
388
|
+
state?: string;
|
|
389
|
+
parent?: string;
|
|
390
|
+
is_draft?: boolean;
|
|
391
|
+
archived_at?: string;
|
|
392
|
+
completed_at?: string;
|
|
393
|
+
sort_order?: number;
|
|
394
|
+
target_date?: string;
|
|
395
|
+
start_date?: string;
|
|
396
|
+
priority?: PriorityEnum;
|
|
397
|
+
description_stripped?: string;
|
|
398
|
+
description_binary?: string;
|
|
399
|
+
}
|
|
400
|
+
export type WorkItemExpandableFields = {
|
|
401
|
+
type: WorkItemType;
|
|
402
|
+
module: Module;
|
|
403
|
+
labels: Label[];
|
|
404
|
+
assignees: User[];
|
|
405
|
+
state: State;
|
|
406
|
+
project: Project;
|
|
407
|
+
};
|
|
408
|
+
export type WorkItemExpandableFieldName = keyof WorkItemExpandableFields;
|
|
409
|
+
export type WorkItem<Expanded extends WorkItemExpandableFieldName = never> = [
|
|
410
|
+
Expanded
|
|
411
|
+
] extends [
|
|
412
|
+
never
|
|
413
|
+
] ? WorkItemBase : Omit<WorkItemBase, Expanded> & {
|
|
414
|
+
[K in Expanded]: K extends keyof WorkItemExpandableFields ? WorkItemExpandableFields[K] : never;
|
|
415
|
+
};
|
|
416
|
+
export interface CreateWorkItem {
|
|
417
|
+
name: string;
|
|
418
|
+
description_html?: string;
|
|
419
|
+
state?: string;
|
|
420
|
+
assignees?: string[];
|
|
421
|
+
labels?: string[];
|
|
422
|
+
parent?: string;
|
|
423
|
+
estimate_point?: string;
|
|
424
|
+
type?: string;
|
|
425
|
+
module?: string;
|
|
426
|
+
target_date?: string;
|
|
427
|
+
start_date?: string;
|
|
428
|
+
priority?: PriorityEnum;
|
|
429
|
+
}
|
|
430
|
+
export interface UpdateWorkItem {
|
|
431
|
+
name?: string;
|
|
432
|
+
description_html?: string;
|
|
433
|
+
state?: string;
|
|
434
|
+
assignees?: string[];
|
|
435
|
+
labels?: string[];
|
|
436
|
+
parent?: string;
|
|
437
|
+
estimate_point?: string;
|
|
438
|
+
type?: string;
|
|
439
|
+
module?: string;
|
|
440
|
+
target_date?: string;
|
|
441
|
+
start_date?: string;
|
|
442
|
+
priority?: PriorityEnum;
|
|
443
|
+
}
|
|
444
|
+
export interface ListWorkItemsParams {
|
|
445
|
+
project?: string;
|
|
446
|
+
state?: string;
|
|
447
|
+
assignee?: string;
|
|
448
|
+
limit?: number;
|
|
449
|
+
offset?: number;
|
|
450
|
+
}
|
|
451
|
+
export interface WorkItemActivity {
|
|
452
|
+
id: string;
|
|
453
|
+
created_at?: string;
|
|
454
|
+
updated_at?: string;
|
|
455
|
+
deleted_at?: string;
|
|
456
|
+
verb?: string;
|
|
457
|
+
field?: string;
|
|
458
|
+
old_value?: string;
|
|
459
|
+
new_value?: string;
|
|
460
|
+
comment?: string;
|
|
461
|
+
attachments?: string[];
|
|
462
|
+
old_identifier?: string;
|
|
463
|
+
new_identifier?: string;
|
|
464
|
+
epoch?: number;
|
|
465
|
+
project: string;
|
|
466
|
+
workspace: string;
|
|
467
|
+
issue?: string;
|
|
468
|
+
issue_comment?: string;
|
|
469
|
+
actor?: string;
|
|
470
|
+
}
|
|
471
|
+
export interface WorkItemSearch {
|
|
472
|
+
issues: WorkItemSearchItem[];
|
|
473
|
+
}
|
|
474
|
+
export interface WorkItemSearchItem {
|
|
475
|
+
id: string;
|
|
476
|
+
name: string;
|
|
477
|
+
sequence_id: string;
|
|
478
|
+
project__identifier: string;
|
|
479
|
+
project_id: string;
|
|
480
|
+
workspace__slug: string;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Filter condition for advanced search.
|
|
484
|
+
* Either a leaf condition (e.g. { state_id: "..." }) or a group with "and"/"or" keys.
|
|
485
|
+
*/
|
|
486
|
+
export type AdvancedSearchFilter = {
|
|
487
|
+
and?: AdvancedSearchFilter[];
|
|
488
|
+
or?: AdvancedSearchFilter[];
|
|
489
|
+
[key: string]: unknown;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Request body for advanced work item search.
|
|
493
|
+
*/
|
|
494
|
+
export interface AdvancedSearchWorkItem {
|
|
495
|
+
query?: string;
|
|
496
|
+
filters?: AdvancedSearchFilter;
|
|
497
|
+
limit?: number;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Result item from advanced work item search.
|
|
501
|
+
*/
|
|
502
|
+
export interface AdvancedSearchResult {
|
|
503
|
+
id: string;
|
|
504
|
+
name: string;
|
|
505
|
+
sequence_id: number;
|
|
506
|
+
project_identifier: string;
|
|
507
|
+
project_id: string;
|
|
508
|
+
workspace_id: string;
|
|
509
|
+
type_id?: string | null;
|
|
510
|
+
state_id?: string | null;
|
|
511
|
+
priority?: string | null;
|
|
512
|
+
target_date?: string | null;
|
|
513
|
+
start_date?: string | null;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Link model interfaces
|
|
517
|
+
* TODO: Replace with proper types after API verification
|
|
518
|
+
*/
|
|
519
|
+
export interface Link extends BaseModel {
|
|
520
|
+
title: string;
|
|
521
|
+
url: string;
|
|
522
|
+
issue: string;
|
|
523
|
+
workspace: string;
|
|
524
|
+
project: string;
|
|
525
|
+
created_by: string;
|
|
526
|
+
updated_by?: string;
|
|
527
|
+
[key: string]: any;
|
|
528
|
+
}
|
|
529
|
+
export type CreateLink = Partial<Link>;
|
|
530
|
+
export type UpdateLink = Partial<Link>;
|
|
531
|
+
export interface ListLinksParams {
|
|
532
|
+
issue?: string;
|
|
533
|
+
project?: string;
|
|
534
|
+
workspace?: string;
|
|
535
|
+
limit?: number;
|
|
536
|
+
offset?: number;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Links API resource
|
|
540
|
+
* Handles all link related operations for work items
|
|
541
|
+
*/
|
|
542
|
+
export declare class Links extends BaseResource {
|
|
543
|
+
constructor(config: Configuration);
|
|
544
|
+
/**
|
|
545
|
+
* Create a new link for a work item
|
|
546
|
+
*/
|
|
547
|
+
create(workspaceSlug: string, projectId: string, issueId: string, createLink: CreateLink): Promise<Link>;
|
|
548
|
+
/**
|
|
549
|
+
* Retrieve a link by ID
|
|
550
|
+
*/
|
|
551
|
+
retrieve(workspaceSlug: string, projectId: string, issueId: string, linkId: string): Promise<Link>;
|
|
552
|
+
/**
|
|
553
|
+
* Update a link
|
|
554
|
+
*/
|
|
555
|
+
update(workspaceSlug: string, projectId: string, issueId: string, linkId: string, updateLink: UpdateLink): Promise<Link>;
|
|
556
|
+
/**
|
|
557
|
+
* Delete a link
|
|
558
|
+
*/
|
|
559
|
+
delete(workspaceSlug: string, projectId: string, issueId: string, linkId: string): Promise<void>;
|
|
560
|
+
/**
|
|
561
|
+
* List links for a work item with optional filtering
|
|
562
|
+
*/
|
|
563
|
+
list(workspaceSlug: string, projectId: string, issueId: string, params?: ListLinksParams): Promise<PaginatedResponse<Link>>;
|
|
564
|
+
}
|
|
565
|
+
export interface WorkItemRelation {
|
|
566
|
+
id?: string;
|
|
567
|
+
project_id?: string;
|
|
568
|
+
sequence_id?: number;
|
|
569
|
+
relation_type?: string;
|
|
570
|
+
name?: string;
|
|
571
|
+
type_id?: string;
|
|
572
|
+
is_epic?: boolean;
|
|
573
|
+
state_id?: string;
|
|
574
|
+
priority?: string;
|
|
575
|
+
created_by?: string;
|
|
576
|
+
created_at?: string;
|
|
577
|
+
updated_at?: string;
|
|
578
|
+
updated_by?: string;
|
|
579
|
+
}
|
|
580
|
+
export type IssueRelationCreateRelationTypeEnum = "blocking" | "blocked_by" | "duplicate" | "relates_to" | "start_before" | "start_after" | "finish_before" | "finish_after";
|
|
581
|
+
export interface WorkItemRelationCreateRequest {
|
|
582
|
+
relation_type: IssueRelationCreateRelationTypeEnum;
|
|
583
|
+
issues: string[];
|
|
584
|
+
}
|
|
585
|
+
export interface WorkItemRelationRemoveRequest {
|
|
586
|
+
related_issue: string;
|
|
587
|
+
}
|
|
588
|
+
export interface WorkItemRelationResponse {
|
|
589
|
+
blocking: string[];
|
|
590
|
+
blocked_by: string[];
|
|
591
|
+
duplicate: string[];
|
|
592
|
+
relates_to: string[];
|
|
593
|
+
start_after: string[];
|
|
594
|
+
start_before: string[];
|
|
595
|
+
finish_after: string[];
|
|
596
|
+
finish_before: string[];
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* WorkItemRelations API resource
|
|
600
|
+
* Handles all work item relation operations
|
|
601
|
+
*/
|
|
602
|
+
declare class Relations extends BaseResource {
|
|
603
|
+
constructor(config: Configuration);
|
|
604
|
+
/**
|
|
605
|
+
* Create relations between work items
|
|
606
|
+
*/
|
|
607
|
+
create(workspaceSlug: string, projectId: string, workItemId: string, relationData: WorkItemRelationCreateRequest): Promise<void>;
|
|
608
|
+
/**
|
|
609
|
+
* Delete a relation between work items
|
|
610
|
+
*/
|
|
611
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string, relationData: WorkItemRelationRemoveRequest): Promise<void>;
|
|
612
|
+
/**
|
|
613
|
+
* List relations for a work item
|
|
614
|
+
*/
|
|
615
|
+
list(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkItemRelationResponse>;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Attachment model interfaces
|
|
619
|
+
*
|
|
620
|
+
*/
|
|
621
|
+
export interface ListAttachmentsParams {
|
|
622
|
+
issue?: string;
|
|
623
|
+
project?: string;
|
|
624
|
+
workspace?: string;
|
|
625
|
+
limit?: number;
|
|
626
|
+
offset?: number;
|
|
627
|
+
}
|
|
628
|
+
export interface WorkItemAttachment {
|
|
629
|
+
id?: string;
|
|
630
|
+
created_at?: string;
|
|
631
|
+
updated_at?: string;
|
|
632
|
+
deleted_at?: string;
|
|
633
|
+
attributes?: any;
|
|
634
|
+
asset: string;
|
|
635
|
+
entity_type?: string;
|
|
636
|
+
entity_identifier?: string;
|
|
637
|
+
is_deleted?: boolean;
|
|
638
|
+
is_archived?: boolean;
|
|
639
|
+
external_id?: string;
|
|
640
|
+
external_source?: string;
|
|
641
|
+
size?: number;
|
|
642
|
+
is_uploaded?: boolean;
|
|
643
|
+
storage_metadata?: any;
|
|
644
|
+
created_by?: string;
|
|
645
|
+
updated_by?: string;
|
|
646
|
+
user?: string;
|
|
647
|
+
workspace?: string;
|
|
648
|
+
draft_issue?: string;
|
|
649
|
+
project?: string;
|
|
650
|
+
issue?: string;
|
|
651
|
+
comment?: string;
|
|
652
|
+
page?: string;
|
|
653
|
+
}
|
|
654
|
+
export interface WorkItemAttachmentUploadRequest {
|
|
655
|
+
name: string;
|
|
656
|
+
type?: string;
|
|
657
|
+
size: number;
|
|
658
|
+
external_id?: string;
|
|
659
|
+
external_source?: string;
|
|
660
|
+
}
|
|
661
|
+
export type UpdateWorkItemAttachmentRequest = Partial<WorkItemAttachment>;
|
|
662
|
+
/**
|
|
663
|
+
* WorkItemAttachments API resource
|
|
664
|
+
* Handles all work item attachment operations
|
|
665
|
+
*/
|
|
666
|
+
declare class Attachments extends BaseResource {
|
|
667
|
+
constructor(config: Configuration);
|
|
668
|
+
/**
|
|
669
|
+
* Retrieve an attachment by ID
|
|
670
|
+
*/
|
|
671
|
+
retrieve(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<WorkItemAttachment>;
|
|
672
|
+
/**
|
|
673
|
+
* List attachments for a work item
|
|
674
|
+
*/
|
|
675
|
+
list(workspaceSlug: string, projectId: string, workItemId: string, params?: any): Promise<WorkItemAttachment[]>;
|
|
676
|
+
/**
|
|
677
|
+
* Create/upload an attachment for a work item
|
|
678
|
+
*/
|
|
679
|
+
create(workspaceSlug: string, projectId: string, workItemId: string, uploadData: WorkItemAttachmentUploadRequest): Promise<WorkItemAttachment>;
|
|
680
|
+
/**
|
|
681
|
+
* Update an attachment
|
|
682
|
+
*/
|
|
683
|
+
update(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string, updateData: UpdateWorkItemAttachmentRequest): Promise<WorkItemAttachment>;
|
|
684
|
+
/**
|
|
685
|
+
* Delete an attachment
|
|
686
|
+
*/
|
|
687
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<void>;
|
|
688
|
+
}
|
|
689
|
+
export interface WorkItemComment {
|
|
690
|
+
id: string;
|
|
691
|
+
is_member?: boolean;
|
|
692
|
+
created_at?: string;
|
|
693
|
+
updated_at?: string;
|
|
694
|
+
deleted_at?: string;
|
|
695
|
+
comment_stripped?: string;
|
|
696
|
+
comment_html?: string;
|
|
697
|
+
attachments?: string[];
|
|
698
|
+
access?: AccessEnum;
|
|
699
|
+
external_source?: string;
|
|
700
|
+
external_id?: string;
|
|
701
|
+
edited_at?: string;
|
|
702
|
+
created_by?: string;
|
|
703
|
+
updated_by?: string;
|
|
704
|
+
project?: string;
|
|
705
|
+
workspace?: string;
|
|
706
|
+
issue?: string;
|
|
707
|
+
actor?: string;
|
|
708
|
+
}
|
|
709
|
+
export interface WorkItemCommentCreateRequest {
|
|
710
|
+
comment_json?: any;
|
|
711
|
+
comment_html?: string;
|
|
712
|
+
access?: AccessEnum;
|
|
713
|
+
external_source?: string;
|
|
714
|
+
external_id?: string;
|
|
715
|
+
}
|
|
716
|
+
export interface WorkItemCommentUpdateRequest {
|
|
717
|
+
comment_json?: any;
|
|
718
|
+
comment_html?: string;
|
|
719
|
+
access?: AccessEnum;
|
|
720
|
+
external_source?: string;
|
|
721
|
+
external_id?: string;
|
|
722
|
+
}
|
|
723
|
+
export interface ListCommentsParams {
|
|
724
|
+
issue?: string;
|
|
725
|
+
project?: string;
|
|
726
|
+
workspace?: string;
|
|
727
|
+
limit?: number;
|
|
728
|
+
offset?: number;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* WorkItemComments API resource
|
|
732
|
+
* Handles all work item comment operations
|
|
733
|
+
*/
|
|
734
|
+
declare class Comments extends BaseResource {
|
|
735
|
+
constructor(config: Configuration);
|
|
736
|
+
/**
|
|
737
|
+
* Retrieve a comment by ID
|
|
738
|
+
*/
|
|
739
|
+
retrieve(workspaceSlug: string, projectId: string, workItemId: string, commentId: string): Promise<WorkItemComment>;
|
|
740
|
+
/**
|
|
741
|
+
* List comments for a work item
|
|
742
|
+
*/
|
|
743
|
+
list(workspaceSlug: string, projectId: string, workItemId: string, params?: ListCommentsParams): Promise<PaginatedResponse<WorkItemComment>>;
|
|
744
|
+
/**
|
|
745
|
+
* Create a comment for a work item
|
|
746
|
+
*/
|
|
747
|
+
create(workspaceSlug: string, projectId: string, workItemId: string, commentData: WorkItemCommentCreateRequest): Promise<WorkItemComment>;
|
|
748
|
+
/**
|
|
749
|
+
* Update a comment
|
|
750
|
+
*/
|
|
751
|
+
update(workspaceSlug: string, projectId: string, workItemId: string, commentId: string, updateData: WorkItemCommentUpdateRequest): Promise<WorkItemComment>;
|
|
752
|
+
/**
|
|
753
|
+
* Delete a comment
|
|
754
|
+
*/
|
|
755
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string, commentId: string): Promise<void>;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* WorkItemActivities API resource
|
|
759
|
+
* Handles all work item activity operations
|
|
760
|
+
*/
|
|
761
|
+
declare class Activities extends BaseResource {
|
|
762
|
+
constructor(config: Configuration);
|
|
763
|
+
/**
|
|
764
|
+
* List activities for a work item
|
|
765
|
+
*/
|
|
766
|
+
list(workspaceSlug: string, projectId: string, workItemId: string, params?: any): Promise<PaginatedResponse<WorkItemActivity>>;
|
|
767
|
+
/**
|
|
768
|
+
* Retrieve a specific activity by ID
|
|
769
|
+
*/
|
|
770
|
+
retrieve(workspaceSlug: string, projectId: string, workItemId: string, activityId: string): Promise<WorkItemActivity>;
|
|
771
|
+
}
|
|
772
|
+
export interface WorkLog extends BaseModel {
|
|
773
|
+
description: string;
|
|
774
|
+
duration: number;
|
|
775
|
+
project_id: string;
|
|
776
|
+
workspace_id: string;
|
|
777
|
+
logged_by: string;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Create work log request
|
|
781
|
+
*
|
|
782
|
+
* @param description - The description of the work log
|
|
783
|
+
* @param duration - The duration of the work log in minutes
|
|
784
|
+
*/
|
|
785
|
+
export interface CreateWorkLogRequest {
|
|
786
|
+
description?: string;
|
|
787
|
+
duration: number;
|
|
788
|
+
}
|
|
789
|
+
export interface UpdateWorkLogRequest {
|
|
790
|
+
description?: string;
|
|
791
|
+
duration?: number;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* WorkLogs API resource
|
|
795
|
+
* Handles all work log operations for work items
|
|
796
|
+
*/
|
|
797
|
+
export declare class WorkLogs extends BaseResource {
|
|
798
|
+
constructor(config: Configuration);
|
|
799
|
+
/**
|
|
800
|
+
* List work logs for a work item
|
|
801
|
+
*/
|
|
802
|
+
list(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkLog[]>;
|
|
803
|
+
/**
|
|
804
|
+
* Create a work log for a work item
|
|
805
|
+
*/
|
|
806
|
+
create(workspaceSlug: string, projectId: string, workItemId: string, workLogData: CreateWorkLogRequest): Promise<WorkLog>;
|
|
807
|
+
/**
|
|
808
|
+
* Update a work log
|
|
809
|
+
*/
|
|
810
|
+
update(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string, updateData: UpdateWorkLogRequest): Promise<WorkLog>;
|
|
811
|
+
/**
|
|
812
|
+
* Delete a work log
|
|
813
|
+
*/
|
|
814
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void>;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* WorkItems API resource
|
|
818
|
+
* Handles all work item (issue) related operations
|
|
819
|
+
*/
|
|
820
|
+
export declare class WorkItems extends BaseResource {
|
|
821
|
+
links: Links;
|
|
822
|
+
relations: Relations;
|
|
823
|
+
attachments: Attachments;
|
|
824
|
+
comments: Comments;
|
|
825
|
+
activities: Activities;
|
|
826
|
+
workLogs: WorkLogs;
|
|
827
|
+
constructor(config: Configuration);
|
|
828
|
+
/**
|
|
829
|
+
* Create a new work item
|
|
830
|
+
*/
|
|
831
|
+
create(workspaceSlug: string, projectId: string, createWorkItem: CreateWorkItem): Promise<WorkItem>;
|
|
832
|
+
retrieve(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkItemBase>;
|
|
833
|
+
retrieve<E extends WorkItemExpandableFieldName>(workspaceSlug: string, projectId: string, workItemId: string, expand: E[]): Promise<WorkItem<E>>;
|
|
834
|
+
/**
|
|
835
|
+
* Update a work item
|
|
836
|
+
*/
|
|
837
|
+
update(workspaceSlug: string, projectId: string, workItemId: string, updateWorkItem: UpdateWorkItem): Promise<WorkItem>;
|
|
838
|
+
/**
|
|
839
|
+
* Delete a work item
|
|
840
|
+
*/
|
|
841
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string): Promise<void>;
|
|
842
|
+
/**
|
|
843
|
+
* List work items with optional filtering
|
|
844
|
+
*/
|
|
845
|
+
list(workspaceSlug: string, projectId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
|
|
846
|
+
retrieveByIdentifier(workspaceSlug: string, identifier: string): Promise<WorkItemBase>;
|
|
847
|
+
retrieveByIdentifier<E extends WorkItemExpandableFieldName>(workspaceSlug: string, identifier: string, expand: E[]): Promise<WorkItem<E>>;
|
|
848
|
+
/**
|
|
849
|
+
* Search work items
|
|
850
|
+
*/
|
|
851
|
+
search(workspaceSlug: string, query: string, projectId?: string, params?: any): Promise<WorkItemSearch>;
|
|
852
|
+
/**
|
|
853
|
+
* Perform advanced search on work items with filters.
|
|
854
|
+
*
|
|
855
|
+
* Supports text-based search via `query` and/or structured filters
|
|
856
|
+
* using recursive AND/OR groups.
|
|
857
|
+
*/
|
|
858
|
+
advancedSearch(workspaceSlug: string, data: AdvancedSearchWorkItem): Promise<AdvancedSearchResult[]>;
|
|
859
|
+
}
|
|
860
|
+
export interface ListWorkItemTypesParams {
|
|
861
|
+
project?: string;
|
|
862
|
+
limit?: number;
|
|
863
|
+
offset?: number;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* WorkItemTypes API resource
|
|
867
|
+
* Handles all work item type related operations
|
|
868
|
+
*/
|
|
869
|
+
export declare class WorkItemTypes extends BaseResource {
|
|
870
|
+
constructor(config: Configuration);
|
|
871
|
+
/**
|
|
872
|
+
* Create a new work item type
|
|
873
|
+
*/
|
|
874
|
+
create(workspaceSlug: string, projectId: string, createWorkItemType: CreateWorkItemType): Promise<WorkItemType>;
|
|
875
|
+
/**
|
|
876
|
+
* Retrieve a work item type by ID
|
|
877
|
+
*/
|
|
878
|
+
retrieve(workspaceSlug: string, projectId: string, workItemTypeId: string): Promise<WorkItemType>;
|
|
879
|
+
/**
|
|
880
|
+
* Update a work item type
|
|
881
|
+
*/
|
|
882
|
+
update(workspaceSlug: string, projectId: string, workItemTypeId: string, updateWorkItemType: UpdateWorkItemType): Promise<WorkItemType>;
|
|
883
|
+
/**
|
|
884
|
+
* Delete a work item type
|
|
885
|
+
*/
|
|
886
|
+
delete(workspaceSlug: string, projectId: string, workItemTypeId: string): Promise<void>;
|
|
887
|
+
/**
|
|
888
|
+
* List work item types with optional filtering
|
|
889
|
+
*/
|
|
890
|
+
list(workspaceSlug: string, projectId: string, params?: ListWorkItemTypesParams): Promise<WorkItemType[]>;
|
|
891
|
+
}
|
|
892
|
+
export type WorkItemPropertySettings = TextSettings | undefined;
|
|
893
|
+
/**
|
|
894
|
+
* WorkItemProperty model interfaces
|
|
895
|
+
*/
|
|
896
|
+
export interface WorkItemProperty extends BaseModel {
|
|
897
|
+
name: string;
|
|
898
|
+
property_type: PropertyType;
|
|
899
|
+
display_name: string;
|
|
900
|
+
description?: string;
|
|
901
|
+
relation_type: PropertyRelationType | undefined;
|
|
902
|
+
options?: Partial<WorkItemPropertyOption>[];
|
|
903
|
+
settings?: WorkItemPropertySettings;
|
|
904
|
+
logo_props: LogoProps;
|
|
905
|
+
sort_order: number;
|
|
906
|
+
is_required: boolean;
|
|
907
|
+
default_value: any;
|
|
908
|
+
is_active: boolean;
|
|
909
|
+
is_multi: boolean;
|
|
910
|
+
validation_rules: any;
|
|
911
|
+
issue_type: string;
|
|
912
|
+
workspace: string;
|
|
913
|
+
project: string;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* CreateWorkItemProperty model interface
|
|
917
|
+
* This is the model used to create a new work item property to add validations according to the property type
|
|
918
|
+
* as defined above.
|
|
919
|
+
*/
|
|
920
|
+
export interface BaseCreateWorkItemProperty {
|
|
921
|
+
name: string;
|
|
922
|
+
display_name: string;
|
|
923
|
+
description?: string;
|
|
924
|
+
property_type: PropertyType;
|
|
925
|
+
settings?: WorkItemPropertySettings;
|
|
926
|
+
logo_props?: LogoProps;
|
|
927
|
+
sort_order?: number;
|
|
928
|
+
is_required: boolean;
|
|
929
|
+
default_value?: any;
|
|
930
|
+
is_active?: boolean;
|
|
931
|
+
relation_type?: PropertyRelationType;
|
|
932
|
+
options?: Partial<WorkItemPropertyOption>[];
|
|
933
|
+
is_multi?: boolean;
|
|
934
|
+
}
|
|
935
|
+
export interface CreateTextWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
936
|
+
property_type: "TEXT";
|
|
937
|
+
settings?: TextSettings;
|
|
938
|
+
}
|
|
939
|
+
export interface CreateDecimalWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
940
|
+
property_type: "DECIMAL";
|
|
941
|
+
}
|
|
942
|
+
export interface CreateOptionWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
943
|
+
property_type: "OPTION";
|
|
944
|
+
options?: Partial<WorkItemPropertyOption>[];
|
|
945
|
+
is_multi?: boolean;
|
|
946
|
+
}
|
|
947
|
+
export interface CreateBooleanWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
948
|
+
property_type: "BOOLEAN";
|
|
949
|
+
}
|
|
950
|
+
export interface CreateDateTimeWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
951
|
+
property_type: "DATETIME";
|
|
952
|
+
}
|
|
953
|
+
export interface CreateRelationWorkItemProperty extends BaseCreateWorkItemProperty {
|
|
954
|
+
property_type: "RELATION";
|
|
955
|
+
relation_type?: PropertyRelationType;
|
|
956
|
+
}
|
|
957
|
+
export type CreateWorkItemProperty = CreateTextWorkItemProperty | CreateDecimalWorkItemProperty | CreateOptionWorkItemProperty | CreateBooleanWorkItemProperty | CreateDateTimeWorkItemProperty | CreateRelationWorkItemProperty;
|
|
958
|
+
export type UpdateWorkItemProperty = Partial<WorkItemProperty>;
|
|
959
|
+
export interface ListWorkItemPropertiesParams {
|
|
960
|
+
project?: string;
|
|
961
|
+
limit?: number;
|
|
962
|
+
offset?: number;
|
|
963
|
+
}
|
|
964
|
+
export type TextSettings = {
|
|
965
|
+
display_format: "single-line" | "multi-line" | "readonly";
|
|
966
|
+
};
|
|
967
|
+
/**
|
|
968
|
+
* WorkItemPropertyOption model interfaces
|
|
969
|
+
*/
|
|
970
|
+
export interface WorkItemPropertyOption extends BaseModel {
|
|
971
|
+
name: string;
|
|
972
|
+
description?: string;
|
|
973
|
+
property: string;
|
|
974
|
+
is_active?: boolean;
|
|
975
|
+
sort_order?: number;
|
|
976
|
+
parent?: string;
|
|
977
|
+
project?: string;
|
|
978
|
+
is_default?: boolean;
|
|
979
|
+
logo_props?: LogoProps;
|
|
980
|
+
}
|
|
981
|
+
export type CreateWorkItemPropertyOption = Partial<WorkItemPropertyOption>;
|
|
982
|
+
export type UpdateWorkItemPropertyOption = Partial<WorkItemPropertyOption>;
|
|
983
|
+
export interface ListWorkItemPropertyOptionsParams {
|
|
984
|
+
property?: string;
|
|
985
|
+
limit?: number;
|
|
986
|
+
offset?: number;
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* WorkItemPropertyValue model interfaces
|
|
990
|
+
*/
|
|
991
|
+
export interface WorkItemPropertyValue extends BaseModel {
|
|
992
|
+
value: any;
|
|
993
|
+
property: string;
|
|
994
|
+
issue: string;
|
|
995
|
+
workspace: string;
|
|
996
|
+
project: string;
|
|
997
|
+
}
|
|
998
|
+
export type WorkItemPropertyValues = {
|
|
999
|
+
property_id: string;
|
|
1000
|
+
values: any[];
|
|
1001
|
+
}[];
|
|
1002
|
+
/**
|
|
1003
|
+
* UpdateWorkItemPropertyValue model interface
|
|
1004
|
+
* Request model for creating/updating a work item property value.
|
|
1005
|
+
*
|
|
1006
|
+
* The value type depends on the property type:
|
|
1007
|
+
* - TEXT/URL/EMAIL/FILE: string
|
|
1008
|
+
* - DATETIME: string (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)
|
|
1009
|
+
* - DECIMAL: number (int or float)
|
|
1010
|
+
* - BOOLEAN: boolean (true/false)
|
|
1011
|
+
* - OPTION/RELATION (single): string (UUID)
|
|
1012
|
+
* - OPTION/RELATION (multi, when is_multi=True): list of strings (UUIDs) or single string
|
|
1013
|
+
*
|
|
1014
|
+
* For multi-value properties (is_multi=True):
|
|
1015
|
+
* - Accept either a single UUID string or a list of UUID strings
|
|
1016
|
+
* - Multiple IssuePropertyValue records are created
|
|
1017
|
+
* - Response will be a list of values
|
|
1018
|
+
*
|
|
1019
|
+
* For single-value properties:
|
|
1020
|
+
* - Only one value is allowed per work item/property combination
|
|
1021
|
+
*/
|
|
1022
|
+
export type UpdateWorkItemPropertyValue = {
|
|
1023
|
+
value: string | boolean | number | string[];
|
|
1024
|
+
external_id?: string;
|
|
1025
|
+
external_source?: string;
|
|
1026
|
+
};
|
|
1027
|
+
export interface ListWorkItemPropertyValuesParams {
|
|
1028
|
+
issue?: string;
|
|
1029
|
+
property?: string;
|
|
1030
|
+
limit?: number;
|
|
1031
|
+
offset?: number;
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* WorkItemPropertyOptions API resource
|
|
1035
|
+
* Handles all work item property option operations
|
|
1036
|
+
*/
|
|
1037
|
+
declare class Options extends BaseResource {
|
|
1038
|
+
constructor(config: Configuration);
|
|
1039
|
+
/**
|
|
1040
|
+
* Retrieve a property option by ID
|
|
1041
|
+
*/
|
|
1042
|
+
retrieve(workspaceSlug: string, projectId: string, propertyId: string, optionId: string): Promise<WorkItemPropertyOption>;
|
|
1043
|
+
/**
|
|
1044
|
+
* List property options
|
|
1045
|
+
*/
|
|
1046
|
+
list(workspaceSlug: string, projectId: string, propertyId: string, params?: ListWorkItemPropertyOptionsParams): Promise<WorkItemPropertyOption[]>;
|
|
1047
|
+
/**
|
|
1048
|
+
* Create a property option
|
|
1049
|
+
*/
|
|
1050
|
+
create(workspaceSlug: string, projectId: string, propertyId: string, optionData: CreateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
|
|
1051
|
+
/**
|
|
1052
|
+
* Update a property option
|
|
1053
|
+
*/
|
|
1054
|
+
update(workspaceSlug: string, projectId: string, propertyId: string, optionId: string, updateData: UpdateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
|
|
1055
|
+
/**
|
|
1056
|
+
* Delete a property option
|
|
1057
|
+
*/
|
|
1058
|
+
delete(workspaceSlug: string, projectId: string, propertyId: string, optionId: string): Promise<void>;
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* WorkItemPropertyValues API resource
|
|
1062
|
+
* Handles all work item property value operations
|
|
1063
|
+
*/
|
|
1064
|
+
declare class Values extends BaseResource {
|
|
1065
|
+
constructor(config: Configuration);
|
|
1066
|
+
/**
|
|
1067
|
+
* Retrieve a property value by ID
|
|
1068
|
+
*/
|
|
1069
|
+
retrieve(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string): Promise<WorkItemPropertyValues>;
|
|
1070
|
+
/**
|
|
1071
|
+
* List property values for a work item
|
|
1072
|
+
*/
|
|
1073
|
+
list(workspaceSlug: string, projectId: string, workItemId: string, params?: ListWorkItemPropertyValuesParams): Promise<WorkItemPropertyValues>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Create/update a property value
|
|
1076
|
+
*
|
|
1077
|
+
* For single-value properties:
|
|
1078
|
+
* - Acts as an upsert operation (create or update)
|
|
1079
|
+
* - Returns a single WorkItemPropertyValues
|
|
1080
|
+
*
|
|
1081
|
+
* For multi-value properties (is_multi=True):
|
|
1082
|
+
* - Replaces all existing values with the new ones (sync operation)
|
|
1083
|
+
* - Returns a list of values
|
|
1084
|
+
*/
|
|
1085
|
+
create(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string, updateData: UpdateWorkItemPropertyValue): Promise<WorkItemPropertyValues>;
|
|
1086
|
+
/**
|
|
1087
|
+
* Update an existing property value(s) (partial update)
|
|
1088
|
+
*
|
|
1089
|
+
* For single-value properties:
|
|
1090
|
+
* - Updates the existing value
|
|
1091
|
+
* - Returns a single WorkItemPropertyValues
|
|
1092
|
+
*
|
|
1093
|
+
* For multi-value properties (is_multi=True):
|
|
1094
|
+
* - Replaces all existing values with the new ones (sync operation)
|
|
1095
|
+
* - Returns a list of values
|
|
1096
|
+
*
|
|
1097
|
+
* @throws {HttpError} If the property value does not exist (404)
|
|
1098
|
+
*/
|
|
1099
|
+
update(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string, updateData: UpdateWorkItemPropertyValue): Promise<WorkItemPropertyValues>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Delete the property value(s) for a work item
|
|
1102
|
+
*
|
|
1103
|
+
* For single-value properties:
|
|
1104
|
+
* - Deletes the single value
|
|
1105
|
+
*
|
|
1106
|
+
* For multi-value properties (is_multi=True):
|
|
1107
|
+
* - Deletes all values for that property
|
|
1108
|
+
*
|
|
1109
|
+
* @throws {HttpError} If the property value does not exist (404)
|
|
1110
|
+
*/
|
|
1111
|
+
delete(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string): Promise<void>;
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* WorkItemProperties API resource
|
|
1115
|
+
* Handles all work item property related operations
|
|
1116
|
+
*/
|
|
1117
|
+
export declare class WorkItemProperties extends BaseResource {
|
|
1118
|
+
options: Options;
|
|
1119
|
+
values: Values;
|
|
1120
|
+
constructor(config: Configuration);
|
|
1121
|
+
/**
|
|
1122
|
+
* Create a new work item property
|
|
1123
|
+
*/
|
|
1124
|
+
create(workspaceSlug: string, projectId: string, workItemTypeId: string, createWorkItemProperty: CreateWorkItemProperty): Promise<WorkItemProperty>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Retrieve a work item property by ID
|
|
1127
|
+
*/
|
|
1128
|
+
retrieve(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string): Promise<WorkItemProperty>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Update a work item property
|
|
1131
|
+
*/
|
|
1132
|
+
update(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string, updateWorkItemProperty: UpdateWorkItemProperty): Promise<WorkItemProperty>;
|
|
1133
|
+
/**
|
|
1134
|
+
* Delete a work item property
|
|
1135
|
+
*/
|
|
1136
|
+
delete(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string): Promise<void>;
|
|
1137
|
+
/**
|
|
1138
|
+
* List work item properties with optional filtering
|
|
1139
|
+
*/
|
|
1140
|
+
list(workspaceSlug: string, projectId: string, workItemTypeId: string, params?: ListWorkItemPropertiesParams): Promise<WorkItemProperty[]>;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Customer model interfaces
|
|
1144
|
+
* TODO: Replace with proper types after API verification
|
|
1145
|
+
*/
|
|
1146
|
+
export interface Customer extends BaseModel {
|
|
1147
|
+
name: string;
|
|
1148
|
+
email?: string;
|
|
1149
|
+
workspace: string;
|
|
1150
|
+
created_by: string;
|
|
1151
|
+
updated_by?: string;
|
|
1152
|
+
[key: string]: any;
|
|
1153
|
+
}
|
|
1154
|
+
export type CreateCustomer = Partial<Customer>;
|
|
1155
|
+
export type UpdateCustomer = Partial<Customer>;
|
|
1156
|
+
export interface ListCustomersParams {
|
|
1157
|
+
workspace?: string;
|
|
1158
|
+
limit?: number;
|
|
1159
|
+
offset?: number;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Customer Property Value model interfaces
|
|
1163
|
+
* TODO: Replace with proper types after API verification
|
|
1164
|
+
*/
|
|
1165
|
+
export interface CustomerPropertyValue extends BaseModel {
|
|
1166
|
+
value: any;
|
|
1167
|
+
property: string;
|
|
1168
|
+
customer: string;
|
|
1169
|
+
workspace: string;
|
|
1170
|
+
[key: string]: any;
|
|
1171
|
+
}
|
|
1172
|
+
export interface CustomPropertyValueResponse {
|
|
1173
|
+
[propertyId: string]: any[];
|
|
1174
|
+
}
|
|
1175
|
+
export type UpdateCustomerPropertyValue = {
|
|
1176
|
+
values: any[];
|
|
1177
|
+
};
|
|
1178
|
+
export interface ListCustomerPropertyValuesParams {
|
|
1179
|
+
customer?: string;
|
|
1180
|
+
property?: string;
|
|
1181
|
+
workspace?: string;
|
|
1182
|
+
limit?: number;
|
|
1183
|
+
offset?: number;
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* Customer Request model interfaces
|
|
1187
|
+
* TODO: Replace with proper types after API verification
|
|
1188
|
+
*/
|
|
1189
|
+
export interface CustomerRequest extends BaseModel {
|
|
1190
|
+
title: string;
|
|
1191
|
+
description?: string;
|
|
1192
|
+
customer: string;
|
|
1193
|
+
workspace: string;
|
|
1194
|
+
created_by: string;
|
|
1195
|
+
updated_by?: string;
|
|
1196
|
+
[key: string]: any;
|
|
1197
|
+
}
|
|
1198
|
+
export type CreateCustomerRequest = Partial<CustomerRequest>;
|
|
1199
|
+
export type UpdateCustomerRequest = Partial<CustomerRequest>;
|
|
1200
|
+
export interface ListCustomerRequestsParams {
|
|
1201
|
+
customer?: string;
|
|
1202
|
+
workspace?: string;
|
|
1203
|
+
limit?: number;
|
|
1204
|
+
offset?: number;
|
|
1205
|
+
}
|
|
1206
|
+
export interface ListCustomerPropertiesParams {
|
|
1207
|
+
workspace?: string;
|
|
1208
|
+
limit?: number;
|
|
1209
|
+
offset?: number;
|
|
1210
|
+
}
|
|
1211
|
+
export interface CustomerProperty extends BaseModel {
|
|
1212
|
+
name?: string;
|
|
1213
|
+
display_name: string;
|
|
1214
|
+
description?: string;
|
|
1215
|
+
logo_props?: any;
|
|
1216
|
+
sort_order?: number;
|
|
1217
|
+
property_type: PropertyType;
|
|
1218
|
+
relation_type?: PropertyRelationType;
|
|
1219
|
+
is_required?: boolean;
|
|
1220
|
+
default_value?: string[];
|
|
1221
|
+
settings?: any;
|
|
1222
|
+
is_active?: boolean;
|
|
1223
|
+
is_multi?: boolean;
|
|
1224
|
+
validation_rules?: any;
|
|
1225
|
+
workspace?: string;
|
|
1226
|
+
}
|
|
1227
|
+
export interface CreateCustomerPropertyRequest {
|
|
1228
|
+
name?: string;
|
|
1229
|
+
display_name?: string;
|
|
1230
|
+
description?: string;
|
|
1231
|
+
logo_props?: any;
|
|
1232
|
+
sort_order?: number;
|
|
1233
|
+
property_type?: PropertyType;
|
|
1234
|
+
relation_type?: PropertyRelationType;
|
|
1235
|
+
is_required?: boolean;
|
|
1236
|
+
default_value?: string[];
|
|
1237
|
+
settings?: any;
|
|
1238
|
+
is_active?: boolean;
|
|
1239
|
+
is_multi?: boolean;
|
|
1240
|
+
validation_rules?: any;
|
|
1241
|
+
external_source?: string;
|
|
1242
|
+
external_id?: string;
|
|
1243
|
+
created_by?: string;
|
|
1244
|
+
updated_by?: string;
|
|
1245
|
+
}
|
|
1246
|
+
export interface UpdateCustomerPropertyRequest {
|
|
1247
|
+
name?: string;
|
|
1248
|
+
display_name?: string;
|
|
1249
|
+
description?: string;
|
|
1250
|
+
logo_props?: any;
|
|
1251
|
+
sort_order?: number;
|
|
1252
|
+
property_type?: PropertyType;
|
|
1253
|
+
relation_type?: PropertyRelationType;
|
|
1254
|
+
is_required?: boolean;
|
|
1255
|
+
default_value?: string[];
|
|
1256
|
+
settings?: any;
|
|
1257
|
+
is_active?: boolean;
|
|
1258
|
+
is_multi?: boolean;
|
|
1259
|
+
validation_rules?: any;
|
|
1260
|
+
external_source?: string;
|
|
1261
|
+
external_id?: string;
|
|
1262
|
+
created_by?: string;
|
|
1263
|
+
updated_by?: string;
|
|
1264
|
+
}
|
|
1265
|
+
export interface LinkIssuesToCustomerResponse {
|
|
1266
|
+
message: string;
|
|
1267
|
+
linked_issues: LinkedIssue[];
|
|
1268
|
+
}
|
|
1269
|
+
export interface LinkedIssue {
|
|
1270
|
+
id: string;
|
|
1271
|
+
name: string;
|
|
1272
|
+
sequence_id: number;
|
|
1273
|
+
project_id: string;
|
|
1274
|
+
project__identifier: string;
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Customer Properties API resource
|
|
1278
|
+
* Handles customer property definitions and property value operations
|
|
1279
|
+
*/
|
|
1280
|
+
declare class Properties extends BaseResource {
|
|
1281
|
+
constructor(config: Configuration);
|
|
1282
|
+
/**
|
|
1283
|
+
* List customer properties
|
|
1284
|
+
*/
|
|
1285
|
+
listPropertyDefinitions(workspaceSlug: string, params?: ListCustomerPropertiesParams): Promise<PaginatedResponse<CustomerProperty>>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Create customer property
|
|
1288
|
+
*/
|
|
1289
|
+
createPropertyDefinition(workspaceSlug: string, createProperty: CreateCustomerPropertyRequest): Promise<CustomerProperty>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Retrieve customer property
|
|
1292
|
+
*/
|
|
1293
|
+
retrievePropertyDefinition(workspaceSlug: string, propertyId: string): Promise<CustomerProperty>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Update customer property
|
|
1296
|
+
*/
|
|
1297
|
+
updatePropertyDefinition(workspaceSlug: string, propertyId: string, updateProperty: UpdateCustomerPropertyRequest): Promise<CustomerProperty>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Delete customer property
|
|
1300
|
+
*/
|
|
1301
|
+
deletePropertyDefinition(workspaceSlug: string, propertyId: string): Promise<void>;
|
|
1302
|
+
/**
|
|
1303
|
+
* Get customer property values
|
|
1304
|
+
*/
|
|
1305
|
+
listValues(workspaceSlug: string, customerId: string, params?: ListCustomerPropertyValuesParams): Promise<CustomPropertyValueResponse>;
|
|
1306
|
+
/**
|
|
1307
|
+
* Get single property value
|
|
1308
|
+
*/
|
|
1309
|
+
retrieveValue(workspaceSlug: string, customerId: string, propertyId: string): Promise<CustomerPropertyValue>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Update single property value
|
|
1312
|
+
*/
|
|
1313
|
+
updateValue(workspaceSlug: string, customerId: string, propertyId: string, updatePropertyValue: UpdateCustomerPropertyValue): Promise<CustomerPropertyValue>;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Customer Requests API resource
|
|
1317
|
+
* Handles customer request operations
|
|
1318
|
+
*/
|
|
1319
|
+
declare class Requests extends BaseResource {
|
|
1320
|
+
constructor(config: Configuration);
|
|
1321
|
+
/**
|
|
1322
|
+
* List customer requests
|
|
1323
|
+
*/
|
|
1324
|
+
list(workspaceSlug: string, customerId: string, params?: ListCustomerRequestsParams): Promise<PaginatedResponse<CustomerRequest>>;
|
|
1325
|
+
/**
|
|
1326
|
+
* Create customer request
|
|
1327
|
+
*/
|
|
1328
|
+
create(workspaceSlug: string, customerId: string, createRequest: CreateCustomerRequest): Promise<CustomerRequest>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Retrieve customer request
|
|
1331
|
+
*/
|
|
1332
|
+
retrieve(workspaceSlug: string, customerId: string, requestId: string): Promise<CustomerRequest>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Update customer request
|
|
1335
|
+
*/
|
|
1336
|
+
update(workspaceSlug: string, customerId: string, requestId: string, updateRequest: UpdateCustomerRequest): Promise<CustomerRequest>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Delete customer request
|
|
1339
|
+
*/
|
|
1340
|
+
delete(workspaceSlug: string, customerId: string, requestId: string): Promise<void>;
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Customers API resource
|
|
1344
|
+
* Handles basic customer operations
|
|
1345
|
+
* Note: Based on the API documentation, this handles customer-level operations
|
|
1346
|
+
*/
|
|
1347
|
+
export declare class Customers extends BaseResource {
|
|
1348
|
+
properties: Properties;
|
|
1349
|
+
requests: Requests;
|
|
1350
|
+
constructor(config: Configuration);
|
|
1351
|
+
/**
|
|
1352
|
+
* Create a new customer
|
|
1353
|
+
*/
|
|
1354
|
+
create(workspaceSlug: string, createCustomer: CreateCustomer): Promise<Customer>;
|
|
1355
|
+
/**
|
|
1356
|
+
* Retrieve a customer by ID
|
|
1357
|
+
*/
|
|
1358
|
+
retrieve(workspaceSlug: string, customerId: string): Promise<Customer>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Update a customer
|
|
1361
|
+
*/
|
|
1362
|
+
update(workspaceSlug: string, customerId: string, updateCustomer: UpdateCustomer): Promise<Customer>;
|
|
1363
|
+
/**
|
|
1364
|
+
* Delete a customer
|
|
1365
|
+
*/
|
|
1366
|
+
delete(workspaceSlug: string, customerId: string): Promise<void>;
|
|
1367
|
+
/**
|
|
1368
|
+
* List customers with optional filtering
|
|
1369
|
+
*/
|
|
1370
|
+
list(workspaceSlug: string, params?: ListCustomersParams): Promise<PaginatedResponse<Customer>>;
|
|
1371
|
+
/**
|
|
1372
|
+
* List customer issues
|
|
1373
|
+
*/
|
|
1374
|
+
listCustomerIssues(workspaceSlug: string, customerId: string): Promise<any[]>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Link issues to customer
|
|
1377
|
+
*/
|
|
1378
|
+
linkIssuesToCustomer(workspaceSlug: string, customerId: string, issueIds: string[]): Promise<LinkIssuesToCustomerResponse>;
|
|
1379
|
+
/**
|
|
1380
|
+
* Unlink issue from customer
|
|
1381
|
+
*/
|
|
1382
|
+
unlinkIssueFromCustomer(workspaceSlug: string, customerId: string, issueId: string): Promise<void>;
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Page model interfaces
|
|
1386
|
+
* TODO: Replace with proper types after API verification
|
|
1387
|
+
*/
|
|
1388
|
+
export interface Page extends BaseModel {
|
|
1389
|
+
name: string;
|
|
1390
|
+
description_html?: string;
|
|
1391
|
+
description_binary?: string;
|
|
1392
|
+
description?: string;
|
|
1393
|
+
description_stripped?: string;
|
|
1394
|
+
created_by: string;
|
|
1395
|
+
updated_by?: string;
|
|
1396
|
+
[key: string]: any;
|
|
1397
|
+
}
|
|
1398
|
+
export type CreatePage = Partial<Page>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Pages API resource
|
|
1401
|
+
* Handles both workspace and project page operations
|
|
1402
|
+
*/
|
|
1403
|
+
export declare class Pages extends BaseResource {
|
|
1404
|
+
constructor(config: Configuration);
|
|
1405
|
+
/**
|
|
1406
|
+
* Create a workspace page
|
|
1407
|
+
*/
|
|
1408
|
+
createWorkspacePage(workspaceSlug: string, createPage: CreatePage): Promise<Page>;
|
|
1409
|
+
/**
|
|
1410
|
+
* Get a workspace page by ID
|
|
1411
|
+
*/
|
|
1412
|
+
getWorkspacePage(workspaceSlug: string, pageId: string): Promise<Page>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Create a project page
|
|
1415
|
+
*/
|
|
1416
|
+
createProjectPage(workspaceSlug: string, projectId: string, createPage: CreatePage): Promise<Page>;
|
|
1417
|
+
/**
|
|
1418
|
+
* Get a project page by ID
|
|
1419
|
+
*/
|
|
1420
|
+
getProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<Page>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Retrieve workspace page
|
|
1423
|
+
*/
|
|
1424
|
+
retrieveWorkspacePage(workspaceSlug: string, pageId: string): Promise<Page>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Retrieve project page
|
|
1427
|
+
*/
|
|
1428
|
+
retrieveProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<Page>;
|
|
1429
|
+
}
|
|
1430
|
+
interface Label$1 {
|
|
1431
|
+
id: string;
|
|
1432
|
+
name: string;
|
|
1433
|
+
color?: string;
|
|
1434
|
+
description?: string;
|
|
1435
|
+
project: string;
|
|
1436
|
+
created_at: string;
|
|
1437
|
+
updated_at: string;
|
|
1438
|
+
}
|
|
1439
|
+
export interface CreateLabel {
|
|
1440
|
+
name: string;
|
|
1441
|
+
color?: string;
|
|
1442
|
+
description?: string;
|
|
1443
|
+
}
|
|
1444
|
+
export interface UpdateLabel {
|
|
1445
|
+
name?: string;
|
|
1446
|
+
color?: string;
|
|
1447
|
+
description?: string;
|
|
1448
|
+
}
|
|
1449
|
+
export interface ListLabelsParams {
|
|
1450
|
+
project?: string;
|
|
1451
|
+
limit?: number;
|
|
1452
|
+
offset?: number;
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* Labels API resource
|
|
1456
|
+
* Handles all label related operations
|
|
1457
|
+
*/
|
|
1458
|
+
export declare class Labels extends BaseResource {
|
|
1459
|
+
constructor(config: Configuration);
|
|
1460
|
+
/**
|
|
1461
|
+
* Create a new label
|
|
1462
|
+
*/
|
|
1463
|
+
create(workspaceSlug: string, projectId: string, createLabel: CreateLabel): Promise<Label$1>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Retrieve a label by ID
|
|
1466
|
+
*/
|
|
1467
|
+
retrieve(workspaceSlug: string, projectId: string, labelId: string): Promise<Label$1>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Update a label
|
|
1470
|
+
*/
|
|
1471
|
+
update(workspaceSlug: string, projectId: string, labelId: string, updateLabel: UpdateLabel): Promise<Label$1>;
|
|
1472
|
+
/**
|
|
1473
|
+
* Delete a label
|
|
1474
|
+
*/
|
|
1475
|
+
delete(workspaceSlug: string, projectId: string, labelId: string): Promise<void>;
|
|
1476
|
+
/**
|
|
1477
|
+
* List labels with optional filtering
|
|
1478
|
+
*/
|
|
1479
|
+
list(workspaceSlug: string, projectId: string, params?: ListLabelsParams): Promise<PaginatedResponse<Label$1>>;
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* States API resource
|
|
1483
|
+
* Handles all state related operations
|
|
1484
|
+
*/
|
|
1485
|
+
export declare class States extends BaseResource {
|
|
1486
|
+
constructor(config: Configuration);
|
|
1487
|
+
/**
|
|
1488
|
+
* Create a new state
|
|
1489
|
+
*/
|
|
1490
|
+
create(workspaceSlug: string, projectId: string, createState: CreateState): Promise<State>;
|
|
1491
|
+
/**
|
|
1492
|
+
* Retrieve a state by ID
|
|
1493
|
+
*/
|
|
1494
|
+
retrieve(workspaceSlug: string, projectId: string, stateId: string): Promise<State>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Update a state
|
|
1497
|
+
*/
|
|
1498
|
+
update(workspaceSlug: string, projectId: string, stateId: string, updateState: UpdateState): Promise<State>;
|
|
1499
|
+
/**
|
|
1500
|
+
* Delete a state
|
|
1501
|
+
*/
|
|
1502
|
+
delete(workspaceSlug: string, projectId: string, stateId: string): Promise<void>;
|
|
1503
|
+
/**
|
|
1504
|
+
* List states with optional filtering
|
|
1505
|
+
*/
|
|
1506
|
+
list(workspaceSlug: string, projectId: string, params?: ListStatesParams): Promise<PaginatedResponse<State>>;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Member model interfaces
|
|
1510
|
+
*/
|
|
1511
|
+
export interface Member {
|
|
1512
|
+
id: string;
|
|
1513
|
+
user: string;
|
|
1514
|
+
project: string;
|
|
1515
|
+
role: string;
|
|
1516
|
+
created_at: string;
|
|
1517
|
+
updated_at: string;
|
|
1518
|
+
}
|
|
1519
|
+
export interface CreateMember {
|
|
1520
|
+
user: string;
|
|
1521
|
+
project: string;
|
|
1522
|
+
role: string;
|
|
1523
|
+
}
|
|
1524
|
+
export interface UpdateMember {
|
|
1525
|
+
role?: string;
|
|
1526
|
+
}
|
|
1527
|
+
export interface ListMembersParams {
|
|
1528
|
+
project?: string;
|
|
1529
|
+
user?: string;
|
|
1530
|
+
role?: string;
|
|
1531
|
+
limit?: number;
|
|
1532
|
+
offset?: number;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Members API resource
|
|
1536
|
+
* Handles all team membership related operations
|
|
1537
|
+
*/
|
|
1538
|
+
export declare class Members extends BaseResource {
|
|
1539
|
+
constructor(config: Configuration);
|
|
1540
|
+
/**
|
|
1541
|
+
* Create a new member
|
|
1542
|
+
*/
|
|
1543
|
+
create(createMember: CreateMember): Promise<Member>;
|
|
1544
|
+
/**
|
|
1545
|
+
* Retrieve a member by ID
|
|
1546
|
+
*/
|
|
1547
|
+
retrieve(memberId: string): Promise<Member>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Update a member
|
|
1550
|
+
*/
|
|
1551
|
+
update(memberId: string, updateMember: UpdateMember): Promise<Member>;
|
|
1552
|
+
/**
|
|
1553
|
+
* Delete a member
|
|
1554
|
+
*/
|
|
1555
|
+
delete(memberId: string): Promise<void>;
|
|
1556
|
+
/**
|
|
1557
|
+
* List members with optional filtering
|
|
1558
|
+
*/
|
|
1559
|
+
list(params?: ListMembersParams): Promise<Member[]>;
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Modules API resource
|
|
1563
|
+
* Handles all module related operations
|
|
1564
|
+
*/
|
|
1565
|
+
export declare class Modules extends BaseResource {
|
|
1566
|
+
constructor(config: Configuration);
|
|
1567
|
+
/**
|
|
1568
|
+
* Create a new module
|
|
1569
|
+
*/
|
|
1570
|
+
create(workspaceSlug: string, projectId: string, createModule: CreateModuleRequest): Promise<Module>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Retrieve a module by ID
|
|
1573
|
+
*/
|
|
1574
|
+
retrieve(workspaceSlug: string, projectId: string, moduleId: string): Promise<Module>;
|
|
1575
|
+
/**
|
|
1576
|
+
* Update a module
|
|
1577
|
+
*/
|
|
1578
|
+
update(workspaceSlug: string, projectId: string, moduleId: string, updateModule: UpdateModuleRequest): Promise<Module>;
|
|
1579
|
+
/**
|
|
1580
|
+
* Delete a module
|
|
1581
|
+
*/
|
|
1582
|
+
delete(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
|
|
1583
|
+
/**
|
|
1584
|
+
* List modules with optional filtering
|
|
1585
|
+
*/
|
|
1586
|
+
list(workspaceSlug: string, projectId: string, params?: ListModulesParamsRequest): Promise<PaginatedResponse<Module>>;
|
|
1587
|
+
/**
|
|
1588
|
+
* List work items in module
|
|
1589
|
+
*/
|
|
1590
|
+
listWorkItemsInModule(workspaceSlug: string, projectId: string, moduleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
|
|
1591
|
+
/**
|
|
1592
|
+
* Add work items to module
|
|
1593
|
+
*/
|
|
1594
|
+
addWorkItemsToModule(workspaceSlug: string, projectId: string, moduleId: string, workItemIds: string[]): Promise<void>;
|
|
1595
|
+
/**
|
|
1596
|
+
* Delete work item from module
|
|
1597
|
+
*/
|
|
1598
|
+
removeWorkItemFromModule(workspaceSlug: string, projectId: string, moduleId: string, workItemId: string): Promise<void>;
|
|
1599
|
+
/**
|
|
1600
|
+
* List archived modules
|
|
1601
|
+
*/
|
|
1602
|
+
listArchivedModules(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Module>>;
|
|
1603
|
+
/**
|
|
1604
|
+
* Archive a module
|
|
1605
|
+
*/
|
|
1606
|
+
archiveModule(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
|
|
1607
|
+
/**
|
|
1608
|
+
* Unarchive a module
|
|
1609
|
+
*/
|
|
1610
|
+
unArchiveModule(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
|
|
1611
|
+
}
|
|
1612
|
+
export interface TransferCycleWorkItemRequest {
|
|
1613
|
+
new_cycle_id: string;
|
|
1614
|
+
}
|
|
1615
|
+
export interface CycleWorkItem {
|
|
1616
|
+
id?: string;
|
|
1617
|
+
sub_issues_count?: number;
|
|
1618
|
+
created_at?: string;
|
|
1619
|
+
updated_at?: string;
|
|
1620
|
+
deleted_at: string;
|
|
1621
|
+
created_by?: string;
|
|
1622
|
+
updated_by?: string;
|
|
1623
|
+
project?: string;
|
|
1624
|
+
workspace?: string;
|
|
1625
|
+
issue: string;
|
|
1626
|
+
cycle?: string;
|
|
1627
|
+
}
|
|
1628
|
+
export interface Cycle extends BaseModel {
|
|
1629
|
+
name: string;
|
|
1630
|
+
description?: string;
|
|
1631
|
+
start_date?: string;
|
|
1632
|
+
end_date?: string;
|
|
1633
|
+
view_props?: any;
|
|
1634
|
+
sort_order?: number;
|
|
1635
|
+
progress_snapshot?: any;
|
|
1636
|
+
archived_at?: string;
|
|
1637
|
+
logo_props?: any;
|
|
1638
|
+
timezone?: TimezoneEnum;
|
|
1639
|
+
version?: number;
|
|
1640
|
+
project: string;
|
|
1641
|
+
workspace: string;
|
|
1642
|
+
owned_by: string;
|
|
1643
|
+
}
|
|
1644
|
+
export interface CreateCycleRequest {
|
|
1645
|
+
name: string;
|
|
1646
|
+
description?: string;
|
|
1647
|
+
start_date?: string;
|
|
1648
|
+
end_date?: string;
|
|
1649
|
+
owned_by: string;
|
|
1650
|
+
external_source?: string;
|
|
1651
|
+
external_id?: string;
|
|
1652
|
+
timezone?: TimezoneEnum;
|
|
1653
|
+
project_id: string;
|
|
1654
|
+
}
|
|
1655
|
+
export interface UpdateCycleRequest {
|
|
1656
|
+
name?: string;
|
|
1657
|
+
description?: string;
|
|
1658
|
+
start_date?: string;
|
|
1659
|
+
end_date?: string;
|
|
1660
|
+
owned_by?: string;
|
|
1661
|
+
external_source?: string;
|
|
1662
|
+
external_id?: string;
|
|
1663
|
+
timezone?: TimezoneEnum;
|
|
1664
|
+
}
|
|
1665
|
+
export interface AddWorkItemsToCycleRequest {
|
|
1666
|
+
issues: string[];
|
|
1667
|
+
}
|
|
1668
|
+
export interface RemoveCycleIssuesRequestRequest {
|
|
1669
|
+
issues: string[];
|
|
1670
|
+
}
|
|
1671
|
+
export interface TransferCycleIssueRequestRequest {
|
|
1672
|
+
new_cycle_id: string;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* Cycles API resource
|
|
1676
|
+
* Handles all cycle (sprint) related operations
|
|
1677
|
+
*/
|
|
1678
|
+
export declare class Cycles extends BaseResource {
|
|
1679
|
+
constructor(config: Configuration);
|
|
1680
|
+
/**
|
|
1681
|
+
* Create a new cycle
|
|
1682
|
+
*/
|
|
1683
|
+
create(workspaceSlug: string, projectId: string, createCycle: CreateCycleRequest): Promise<Cycle>;
|
|
1684
|
+
/**
|
|
1685
|
+
* Retrieve a cycle by ID
|
|
1686
|
+
*/
|
|
1687
|
+
retrieve(workspaceSlug: string, projectId: string, cycleId: string): Promise<Cycle>;
|
|
1688
|
+
/**
|
|
1689
|
+
* Update a cycle
|
|
1690
|
+
*/
|
|
1691
|
+
update(workspaceSlug: string, projectId: string, cycleId: string, updateCycle: UpdateCycleRequest): Promise<Cycle>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Delete a cycle
|
|
1694
|
+
*/
|
|
1695
|
+
delete(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
|
|
1696
|
+
/**
|
|
1697
|
+
* List cycles with optional filtering
|
|
1698
|
+
*/
|
|
1699
|
+
list(workspaceSlug: string, projectId: string): Promise<PaginatedResponse<Cycle>>;
|
|
1700
|
+
/**
|
|
1701
|
+
* List archived cycles
|
|
1702
|
+
*/
|
|
1703
|
+
listArchived(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Cycle>>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Unarchive a cycle
|
|
1706
|
+
*/
|
|
1707
|
+
unArchive(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
|
|
1708
|
+
/**
|
|
1709
|
+
* Archive a cycle
|
|
1710
|
+
*/
|
|
1711
|
+
archive(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
|
|
1712
|
+
/**
|
|
1713
|
+
* List work items in cycle
|
|
1714
|
+
*/
|
|
1715
|
+
listWorkItemsInCycle(workspaceSlug: string, projectId: string, cycleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Add work items to cycle
|
|
1718
|
+
*/
|
|
1719
|
+
addWorkItemsToCycle(workspaceSlug: string, projectId: string, cycleId: string, workItemIds: string[]): Promise<void>;
|
|
1720
|
+
/**
|
|
1721
|
+
* Remove work item from cycle
|
|
1722
|
+
*/
|
|
1723
|
+
removeWorkItemFromCycle(workspaceSlug: string, projectId: string, cycleId: string, workItemId: string): Promise<void>;
|
|
1724
|
+
/**
|
|
1725
|
+
* Transfer work items to another cycle
|
|
1726
|
+
*/
|
|
1727
|
+
transferWorkItemsToAnotherCycle(workspaceSlug: string, projectId: string, cycleId: string, transferData: TransferCycleWorkItemRequest): Promise<void>;
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* User API resource
|
|
1731
|
+
* Handles all user-related operations
|
|
1732
|
+
*/
|
|
1733
|
+
export declare class Users extends BaseResource {
|
|
1734
|
+
constructor(config: Configuration);
|
|
1735
|
+
/**
|
|
1736
|
+
* Get current user information
|
|
1737
|
+
*/
|
|
1738
|
+
me(): Promise<User>;
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Workspace Features model interfaces
|
|
1742
|
+
*/
|
|
1743
|
+
export interface WorkspaceFeatures {
|
|
1744
|
+
project_grouping: boolean;
|
|
1745
|
+
initiatives: boolean;
|
|
1746
|
+
teams: boolean;
|
|
1747
|
+
customers: boolean;
|
|
1748
|
+
wiki: boolean;
|
|
1749
|
+
pi: boolean;
|
|
1750
|
+
}
|
|
1751
|
+
export type UpdateWorkspaceFeatures = Partial<WorkspaceFeatures>;
|
|
1752
|
+
/**
|
|
1753
|
+
* Workspace API resource
|
|
1754
|
+
* Handles all workspace-related operations
|
|
1755
|
+
*/
|
|
1756
|
+
export declare class Workspace extends BaseResource {
|
|
1757
|
+
constructor(config: Configuration);
|
|
1758
|
+
/**
|
|
1759
|
+
* Get workspace members
|
|
1760
|
+
*/
|
|
1761
|
+
getMembers(workspaceSlug: string): Promise<User[]>;
|
|
1762
|
+
/**
|
|
1763
|
+
* Retrieve workspace features
|
|
1764
|
+
*/
|
|
1765
|
+
retrieveFeatures(workspaceSlug: string): Promise<WorkspaceFeatures>;
|
|
1766
|
+
/**
|
|
1767
|
+
* Update workspace features
|
|
1768
|
+
*/
|
|
1769
|
+
updateFeatures(workspaceSlug: string, updateFeatures: UpdateWorkspaceFeatures): Promise<WorkspaceFeatures>;
|
|
1770
|
+
}
|
|
1771
|
+
export interface Epic {
|
|
1772
|
+
id?: string;
|
|
1773
|
+
deleted_at?: string;
|
|
1774
|
+
created_at?: string;
|
|
1775
|
+
updated_at?: string;
|
|
1776
|
+
point?: number;
|
|
1777
|
+
name: string;
|
|
1778
|
+
description?: any;
|
|
1779
|
+
description_html?: string;
|
|
1780
|
+
description_stripped?: string;
|
|
1781
|
+
description_binary?: string;
|
|
1782
|
+
priority?: PriorityEnum;
|
|
1783
|
+
start_date?: string;
|
|
1784
|
+
target_date?: string;
|
|
1785
|
+
sequence_id?: number;
|
|
1786
|
+
sort_order?: number;
|
|
1787
|
+
completed_at?: string;
|
|
1788
|
+
archived_at?: string;
|
|
1789
|
+
is_draft?: boolean;
|
|
1790
|
+
external_source?: string;
|
|
1791
|
+
external_id?: string;
|
|
1792
|
+
created_by?: string;
|
|
1793
|
+
updated_by?: string;
|
|
1794
|
+
project: string;
|
|
1795
|
+
workspace: string;
|
|
1796
|
+
parent?: string;
|
|
1797
|
+
state?: string;
|
|
1798
|
+
estimate_point?: string;
|
|
1799
|
+
type?: string;
|
|
1800
|
+
assignees?: string[];
|
|
1801
|
+
labels?: string[];
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* Epics API resource
|
|
1805
|
+
* Handles all epic-related operations
|
|
1806
|
+
*/
|
|
1807
|
+
export declare class Epics extends BaseResource {
|
|
1808
|
+
constructor(config: Configuration);
|
|
1809
|
+
/**
|
|
1810
|
+
* Retrieve an epic by ID
|
|
1811
|
+
*/
|
|
1812
|
+
retrieve(workspaceSlug: string, projectId: string, epicId: string): Promise<Epic>;
|
|
1813
|
+
/**
|
|
1814
|
+
* List epics with optional filtering
|
|
1815
|
+
*/
|
|
1816
|
+
list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Epic>>;
|
|
1817
|
+
}
|
|
1818
|
+
export interface IntakeWorkItem {
|
|
1819
|
+
id: string;
|
|
1820
|
+
issue_detail?: WorkItem;
|
|
1821
|
+
inbox?: string;
|
|
1822
|
+
created_at?: string;
|
|
1823
|
+
updated_at?: string;
|
|
1824
|
+
deleted_at?: string;
|
|
1825
|
+
status?: IntakeWorkItemStatusEnum;
|
|
1826
|
+
snoozed_till?: string;
|
|
1827
|
+
source?: string;
|
|
1828
|
+
source_email?: string;
|
|
1829
|
+
external_source?: string;
|
|
1830
|
+
external_id?: string;
|
|
1831
|
+
extra?: any;
|
|
1832
|
+
created_by?: string;
|
|
1833
|
+
updated_by?: string;
|
|
1834
|
+
project?: string;
|
|
1835
|
+
workspace?: string;
|
|
1836
|
+
intake: string;
|
|
1837
|
+
issue?: string;
|
|
1838
|
+
duplicate_to?: string;
|
|
1839
|
+
}
|
|
1840
|
+
export interface IntakeWorkItemCreateRequest {
|
|
1841
|
+
issue: WorkItemForIntakeRequest;
|
|
1842
|
+
intake?: string;
|
|
1843
|
+
status?: IntakeWorkItemStatusEnum;
|
|
1844
|
+
snoozed_till?: string;
|
|
1845
|
+
duplicate_to?: string;
|
|
1846
|
+
source?: string;
|
|
1847
|
+
source_email?: string;
|
|
1848
|
+
}
|
|
1849
|
+
export type IntakeWorkItemStatusEnum = number;
|
|
1850
|
+
export interface WorkItemForIntakeRequest {
|
|
1851
|
+
name: string;
|
|
1852
|
+
description_html?: string;
|
|
1853
|
+
priority?: PriorityEnum;
|
|
1854
|
+
}
|
|
1855
|
+
export interface UpdateIntakeWorkItemRequest {
|
|
1856
|
+
status?: IntakeWorkItemStatusEnum;
|
|
1857
|
+
snoozed_till?: string;
|
|
1858
|
+
duplicate_to?: string;
|
|
1859
|
+
source?: string;
|
|
1860
|
+
source_email?: string;
|
|
1861
|
+
issue?: WorkItemForIntakeRequest;
|
|
1862
|
+
}
|
|
1863
|
+
/**
|
|
1864
|
+
* Intake API resource
|
|
1865
|
+
* Handles all intake issue operations
|
|
1866
|
+
*/
|
|
1867
|
+
export declare class Intake extends BaseResource {
|
|
1868
|
+
constructor(config: Configuration);
|
|
1869
|
+
/**
|
|
1870
|
+
* Retrieve an intake issue by ID
|
|
1871
|
+
*/
|
|
1872
|
+
retrieve(workspaceSlug: string, projectId: string, intakeId: string): Promise<IntakeWorkItem>;
|
|
1873
|
+
/**
|
|
1874
|
+
* List intake issues
|
|
1875
|
+
*/
|
|
1876
|
+
list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<IntakeWorkItem>>;
|
|
1877
|
+
/**
|
|
1878
|
+
* Create an intake issue
|
|
1879
|
+
*/
|
|
1880
|
+
create(workspaceSlug: string, projectId: string, intakeData: IntakeWorkItemCreateRequest): Promise<IntakeWorkItem>;
|
|
1881
|
+
/**
|
|
1882
|
+
* Update an intake issue
|
|
1883
|
+
*/
|
|
1884
|
+
update(workspaceSlug: string, projectId: string, intakeId: string, updateData: UpdateIntakeWorkItemRequest): Promise<IntakeWorkItem>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Delete an intake issue
|
|
1887
|
+
*/
|
|
1888
|
+
delete(workspaceSlug: string, projectId: string, intakeId: string): Promise<void>;
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Sticky model interfaces
|
|
1892
|
+
*/
|
|
1893
|
+
export interface Sticky extends BaseModel {
|
|
1894
|
+
name?: string;
|
|
1895
|
+
description?: Record<string, any>;
|
|
1896
|
+
description_html?: string;
|
|
1897
|
+
description_stripped?: string;
|
|
1898
|
+
description_binary?: string;
|
|
1899
|
+
logo_props?: LogoProps;
|
|
1900
|
+
color?: string;
|
|
1901
|
+
background_color?: string;
|
|
1902
|
+
workspace: string;
|
|
1903
|
+
owner: string;
|
|
1904
|
+
sort_order: number;
|
|
1905
|
+
}
|
|
1906
|
+
export type CreateSticky = Omit<Sticky, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace" | "owner" | "sort_order" | "description_binary" | "description_stripped" | "description">;
|
|
1907
|
+
export type UpdateSticky = Partial<CreateSticky>;
|
|
1908
|
+
export interface ListStickiesParams {
|
|
1909
|
+
limit?: number;
|
|
1910
|
+
offset?: number;
|
|
1911
|
+
[key: string]: any;
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* Sticky API resource
|
|
1915
|
+
* Handles all sticky related operations
|
|
1916
|
+
*/
|
|
1917
|
+
export declare class Stickies extends BaseResource {
|
|
1918
|
+
constructor(config: Configuration);
|
|
1919
|
+
/**
|
|
1920
|
+
* Create a new sticky
|
|
1921
|
+
*/
|
|
1922
|
+
create(workspaceSlug: string, createSticky: CreateSticky): Promise<Sticky>;
|
|
1923
|
+
/**
|
|
1924
|
+
* Retrieve a sticky by ID
|
|
1925
|
+
*/
|
|
1926
|
+
retrieve(workspaceSlug: string, stickyId: string): Promise<Sticky>;
|
|
1927
|
+
/**
|
|
1928
|
+
* Update a sticky
|
|
1929
|
+
*/
|
|
1930
|
+
update(workspaceSlug: string, stickyId: string, updateSticky: UpdateSticky): Promise<Sticky>;
|
|
1931
|
+
/**
|
|
1932
|
+
* Delete a sticky
|
|
1933
|
+
*/
|
|
1934
|
+
delete(workspaceSlug: string, stickyId: string): Promise<void>;
|
|
1935
|
+
/**
|
|
1936
|
+
* List stickies with optional filtering
|
|
1937
|
+
*/
|
|
1938
|
+
list(workspaceSlug: string, params?: ListStickiesParams): Promise<PaginatedResponse<Sticky>>;
|
|
1939
|
+
}
|
|
1940
|
+
/**
|
|
1941
|
+
* Teamspace model interfaces
|
|
1942
|
+
*/
|
|
1943
|
+
export interface Teamspace extends BaseModel {
|
|
1944
|
+
name: string;
|
|
1945
|
+
description_json?: Record<string, any>;
|
|
1946
|
+
description_html?: string;
|
|
1947
|
+
description_stripped?: string;
|
|
1948
|
+
description_binary?: string;
|
|
1949
|
+
logo_props?: LogoProps;
|
|
1950
|
+
lead?: string;
|
|
1951
|
+
workspace: string;
|
|
1952
|
+
}
|
|
1953
|
+
export type CreateTeamspace = Omit<Teamspace, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
|
|
1954
|
+
export type UpdateTeamspace = Partial<CreateTeamspace>;
|
|
1955
|
+
export interface ListTeamspacesParams {
|
|
1956
|
+
limit?: number;
|
|
1957
|
+
offset?: number;
|
|
1958
|
+
[key: string]: any;
|
|
1959
|
+
}
|
|
1960
|
+
export interface AddTeamspaceProjectsRequest {
|
|
1961
|
+
project_ids: string[];
|
|
1962
|
+
}
|
|
1963
|
+
export interface RemoveTeamspaceProjectsRequest {
|
|
1964
|
+
project_ids: string[];
|
|
1965
|
+
}
|
|
1966
|
+
export interface AddTeamspaceMembersRequest {
|
|
1967
|
+
member_ids: string[];
|
|
1968
|
+
}
|
|
1969
|
+
export interface RemoveTeamspaceMembersRequest {
|
|
1970
|
+
member_ids: string[];
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* Teamspace Projects API resource
|
|
1974
|
+
* Handles teamspace project relationships
|
|
1975
|
+
*/
|
|
1976
|
+
declare class Projects$1 extends BaseResource {
|
|
1977
|
+
constructor(config: Configuration);
|
|
1978
|
+
/**
|
|
1979
|
+
* Get projects associated with a teamspace
|
|
1980
|
+
*/
|
|
1981
|
+
list(workspaceSlug: string, teamspaceId: string, params?: {
|
|
1982
|
+
limit?: number;
|
|
1983
|
+
offset?: number;
|
|
1984
|
+
}): Promise<PaginatedResponse<Project>>;
|
|
1985
|
+
/**
|
|
1986
|
+
* Add projects to a teamspace
|
|
1987
|
+
*/
|
|
1988
|
+
add(workspaceSlug: string, teamspaceId: string, addProjects: AddTeamspaceProjectsRequest): Promise<Project[]>;
|
|
1989
|
+
/**
|
|
1990
|
+
* Remove projects from a teamspace
|
|
1991
|
+
*/
|
|
1992
|
+
remove(workspaceSlug: string, teamspaceId: string, removeProjects: RemoveTeamspaceProjectsRequest): Promise<void>;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* Teamspace Members API resource
|
|
1996
|
+
* Handles teamspace member relationships
|
|
1997
|
+
*/
|
|
1998
|
+
declare class Members$1 extends BaseResource {
|
|
1999
|
+
constructor(config: Configuration);
|
|
2000
|
+
/**
|
|
2001
|
+
* Get members associated with a teamspace
|
|
2002
|
+
*/
|
|
2003
|
+
list(workspaceSlug: string, teamspaceId: string, params?: {
|
|
2004
|
+
limit?: number;
|
|
2005
|
+
offset?: number;
|
|
2006
|
+
}): Promise<PaginatedResponse<User>>;
|
|
2007
|
+
/**
|
|
2008
|
+
* Add members to a teamspace
|
|
2009
|
+
*/
|
|
2010
|
+
add(workspaceSlug: string, teamspaceId: string, addMembers: AddTeamspaceMembersRequest): Promise<User[]>;
|
|
2011
|
+
/**
|
|
2012
|
+
* Remove members from a teamspace
|
|
2013
|
+
*/
|
|
2014
|
+
remove(workspaceSlug: string, teamspaceId: string, removeMembers: RemoveTeamspaceMembersRequest): Promise<void>;
|
|
2015
|
+
}
|
|
2016
|
+
/**
|
|
2017
|
+
* Teamspaces API resource
|
|
2018
|
+
* Handles all teamspace-related operations
|
|
2019
|
+
*/
|
|
2020
|
+
export declare class Teamspaces extends BaseResource {
|
|
2021
|
+
projects: Projects$1;
|
|
2022
|
+
members: Members$1;
|
|
2023
|
+
constructor(config: Configuration);
|
|
2024
|
+
/**
|
|
2025
|
+
* Create a new teamspace
|
|
2026
|
+
*/
|
|
2027
|
+
create(workspaceSlug: string, createTeamspace: CreateTeamspace): Promise<Teamspace>;
|
|
2028
|
+
/**
|
|
2029
|
+
* Retrieve a teamspace by ID
|
|
2030
|
+
*/
|
|
2031
|
+
retrieve(workspaceSlug: string, teamspaceId: string): Promise<Teamspace>;
|
|
2032
|
+
/**
|
|
2033
|
+
* Update a teamspace
|
|
2034
|
+
*/
|
|
2035
|
+
update(workspaceSlug: string, teamspaceId: string, updateTeamspace: UpdateTeamspace): Promise<Teamspace>;
|
|
2036
|
+
/**
|
|
2037
|
+
* Delete a teamspace
|
|
2038
|
+
*/
|
|
2039
|
+
delete(workspaceSlug: string, teamspaceId: string): Promise<void>;
|
|
2040
|
+
/**
|
|
2041
|
+
* List teamspaces with optional filtering
|
|
2042
|
+
*/
|
|
2043
|
+
list(workspaceSlug: string, params?: ListTeamspacesParams): Promise<PaginatedResponse<Teamspace>>;
|
|
2044
|
+
}
|
|
2045
|
+
export declare enum InitiativeState {
|
|
2046
|
+
DRAFT = "DRAFT",
|
|
2047
|
+
PLANNED = "PLANNED",
|
|
2048
|
+
ACTIVE = "ACTIVE",
|
|
2049
|
+
COMPLETED = "COMPLETED",
|
|
2050
|
+
CLOSED = "CLOSED"
|
|
2051
|
+
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Initiative model interfaces
|
|
2054
|
+
*/
|
|
2055
|
+
export interface Initiative extends BaseModel {
|
|
2056
|
+
name: string;
|
|
2057
|
+
description?: string;
|
|
2058
|
+
description_html?: string;
|
|
2059
|
+
description_stripped?: string;
|
|
2060
|
+
description_binary?: string;
|
|
2061
|
+
lead?: string;
|
|
2062
|
+
start_date?: string;
|
|
2063
|
+
end_date?: string;
|
|
2064
|
+
logo_props?: LogoProps;
|
|
2065
|
+
state?: InitiativeState;
|
|
2066
|
+
workspace: string;
|
|
2067
|
+
}
|
|
2068
|
+
export type CreateInitiative = Omit<Initiative, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
|
|
2069
|
+
export type UpdateInitiative = Partial<CreateInitiative>;
|
|
2070
|
+
export interface ListInitiativesParams {
|
|
2071
|
+
limit?: number;
|
|
2072
|
+
offset?: number;
|
|
2073
|
+
[key: string]: any;
|
|
2074
|
+
}
|
|
2075
|
+
export interface AddInitiativeLabelsRequest {
|
|
2076
|
+
label_ids: string[];
|
|
2077
|
+
}
|
|
2078
|
+
export interface RemoveInitiativeLabelsRequest {
|
|
2079
|
+
label_ids: string[];
|
|
2080
|
+
}
|
|
2081
|
+
export interface AddInitiativeProjectsRequest {
|
|
2082
|
+
project_ids: string[];
|
|
2083
|
+
}
|
|
2084
|
+
export interface RemoveInitiativeProjectsRequest {
|
|
2085
|
+
project_ids: string[];
|
|
2086
|
+
}
|
|
2087
|
+
export interface AddInitiativeEpicsRequest {
|
|
2088
|
+
epic_ids: string[];
|
|
2089
|
+
}
|
|
2090
|
+
export interface RemoveInitiativeEpicsRequest {
|
|
2091
|
+
epic_ids: string[];
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* InitiativeLabel model interfaces
|
|
2095
|
+
*/
|
|
2096
|
+
export interface InitiativeLabel extends BaseModel {
|
|
2097
|
+
name: string;
|
|
2098
|
+
description?: string;
|
|
2099
|
+
color?: string;
|
|
2100
|
+
sort_order: number;
|
|
2101
|
+
workspace: string;
|
|
2102
|
+
}
|
|
2103
|
+
export type CreateInitiativeLabel = Omit<InitiativeLabel, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace"> & {
|
|
2104
|
+
sort_order?: number;
|
|
2105
|
+
};
|
|
2106
|
+
export type UpdateInitiativeLabel = Partial<CreateInitiativeLabel>;
|
|
2107
|
+
export interface ListInitiativeLabelsParams {
|
|
2108
|
+
limit?: number;
|
|
2109
|
+
offset?: number;
|
|
2110
|
+
[key: string]: any;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Initiative Labels API resource
|
|
2114
|
+
* Handles initiative label relationships
|
|
2115
|
+
*/
|
|
2116
|
+
declare class Labels$1 extends BaseResource {
|
|
2117
|
+
constructor(config: Configuration);
|
|
2118
|
+
/**
|
|
2119
|
+
* Create a new initiative label
|
|
2120
|
+
*/
|
|
2121
|
+
create(workspaceSlug: string, createInitiativeLabel: CreateInitiativeLabel): Promise<InitiativeLabel>;
|
|
2122
|
+
/**
|
|
2123
|
+
* Retrieve an initiative label by ID
|
|
2124
|
+
*/
|
|
2125
|
+
retrieve(workspaceSlug: string, initiativeLabelId: string): Promise<InitiativeLabel>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Update an initiative label
|
|
2128
|
+
*/
|
|
2129
|
+
update(workspaceSlug: string, initiativeLabelId: string, updateInitiativeLabel: UpdateInitiativeLabel): Promise<InitiativeLabel>;
|
|
2130
|
+
/**
|
|
2131
|
+
* Delete an initiative label
|
|
2132
|
+
*/
|
|
2133
|
+
delete(workspaceSlug: string, initiativeLabelId: string): Promise<void>;
|
|
2134
|
+
/**
|
|
2135
|
+
* List initiative labels with optional filtering
|
|
2136
|
+
*/
|
|
2137
|
+
list(workspaceSlug: string, params?: ListInitiativeLabelsParams): Promise<PaginatedResponse<InitiativeLabel>>;
|
|
2138
|
+
/**
|
|
2139
|
+
* Add labels to an initiative
|
|
2140
|
+
*/
|
|
2141
|
+
addLabels(workspaceSlug: string, initiativeId: string, addLabels: AddInitiativeLabelsRequest): Promise<InitiativeLabel[]>;
|
|
2142
|
+
/**
|
|
2143
|
+
* Remove labels from an initiative
|
|
2144
|
+
*/
|
|
2145
|
+
removeLabels(workspaceSlug: string, initiativeId: string, removeLabels: RemoveInitiativeLabelsRequest): Promise<void>;
|
|
2146
|
+
/**
|
|
2147
|
+
* Get labels associated with an initiative
|
|
2148
|
+
*/
|
|
2149
|
+
listLabels(workspaceSlug: string, initiativeId: string, params?: {
|
|
2150
|
+
limit?: number;
|
|
2151
|
+
offset?: number;
|
|
2152
|
+
}): Promise<PaginatedResponse<InitiativeLabel>>;
|
|
2153
|
+
}
|
|
2154
|
+
/**
|
|
2155
|
+
* Initiative Projects API resource
|
|
2156
|
+
* Handles initiative project relationships
|
|
2157
|
+
*/
|
|
2158
|
+
declare class Projects$2 extends BaseResource {
|
|
2159
|
+
constructor(config: Configuration);
|
|
2160
|
+
/**
|
|
2161
|
+
* Get projects associated with an initiative
|
|
2162
|
+
*/
|
|
2163
|
+
list(workspaceSlug: string, initiativeId: string, params?: {
|
|
2164
|
+
limit?: number;
|
|
2165
|
+
offset?: number;
|
|
2166
|
+
}): Promise<PaginatedResponse<Project>>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Add projects to an initiative
|
|
2169
|
+
*/
|
|
2170
|
+
add(workspaceSlug: string, initiativeId: string, addProjects: AddInitiativeProjectsRequest): Promise<Project[]>;
|
|
2171
|
+
/**
|
|
2172
|
+
* Remove projects from an initiative
|
|
2173
|
+
*/
|
|
2174
|
+
remove(workspaceSlug: string, initiativeId: string, removeProjects: RemoveInitiativeProjectsRequest): Promise<void>;
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Initiative Epics API resource
|
|
2178
|
+
* Handles initiative epic relationships
|
|
2179
|
+
*/
|
|
2180
|
+
declare class Epics$1 extends BaseResource {
|
|
2181
|
+
constructor(config: Configuration);
|
|
2182
|
+
/**
|
|
2183
|
+
* Get epics associated with an initiative
|
|
2184
|
+
*/
|
|
2185
|
+
list(workspaceSlug: string, initiativeId: string, params?: {
|
|
2186
|
+
limit?: number;
|
|
2187
|
+
offset?: number;
|
|
2188
|
+
}): Promise<PaginatedResponse<Epic>>;
|
|
2189
|
+
/**
|
|
2190
|
+
* Add epics to an initiative
|
|
2191
|
+
*/
|
|
2192
|
+
add(workspaceSlug: string, initiativeId: string, addEpics: AddInitiativeEpicsRequest): Promise<Epic[]>;
|
|
2193
|
+
/**
|
|
2194
|
+
* Remove epics from an initiative
|
|
2195
|
+
*/
|
|
2196
|
+
remove(workspaceSlug: string, initiativeId: string, removeEpics: RemoveInitiativeEpicsRequest): Promise<void>;
|
|
2197
|
+
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Initiatives API resource
|
|
2200
|
+
* Handles all initiative-related operations
|
|
2201
|
+
*/
|
|
2202
|
+
export declare class Initiatives extends BaseResource {
|
|
2203
|
+
labels: Labels$1;
|
|
2204
|
+
projects: Projects$2;
|
|
2205
|
+
epics: Epics$1;
|
|
2206
|
+
constructor(config: Configuration);
|
|
2207
|
+
/**
|
|
2208
|
+
* Create a new initiative
|
|
2209
|
+
*/
|
|
2210
|
+
create(workspaceSlug: string, createInitiative: CreateInitiative): Promise<Initiative>;
|
|
2211
|
+
/**
|
|
2212
|
+
* Retrieve an initiative by ID
|
|
2213
|
+
*/
|
|
2214
|
+
retrieve(workspaceSlug: string, initiativeId: string): Promise<Initiative>;
|
|
2215
|
+
/**
|
|
2216
|
+
* Update an initiative
|
|
2217
|
+
*/
|
|
2218
|
+
update(workspaceSlug: string, initiativeId: string, updateInitiative: UpdateInitiative): Promise<Initiative>;
|
|
2219
|
+
/**
|
|
2220
|
+
* Delete an initiative
|
|
2221
|
+
*/
|
|
2222
|
+
delete(workspaceSlug: string, initiativeId: string): Promise<void>;
|
|
2223
|
+
/**
|
|
2224
|
+
* List initiatives with optional filtering
|
|
2225
|
+
*/
|
|
2226
|
+
list(workspaceSlug: string, params?: ListInitiativesParams): Promise<PaginatedResponse<Initiative>>;
|
|
2227
|
+
}
|
|
2228
|
+
export interface Milestone extends BaseModel {
|
|
2229
|
+
title: string;
|
|
2230
|
+
target_date?: string;
|
|
2231
|
+
project: string;
|
|
2232
|
+
workspace: string;
|
|
2233
|
+
}
|
|
2234
|
+
export interface MilestoneLite {
|
|
2235
|
+
id?: string;
|
|
2236
|
+
title: string;
|
|
2237
|
+
target_date?: string;
|
|
2238
|
+
external_source?: string;
|
|
2239
|
+
external_id?: string;
|
|
2240
|
+
created_at?: string;
|
|
2241
|
+
updated_at?: string;
|
|
2242
|
+
}
|
|
2243
|
+
export interface CreateMilestoneRequest {
|
|
2244
|
+
title: string;
|
|
2245
|
+
target_date?: string;
|
|
2246
|
+
external_source?: string;
|
|
2247
|
+
external_id?: string;
|
|
2248
|
+
}
|
|
2249
|
+
export interface UpdateMilestoneRequest {
|
|
2250
|
+
title?: string;
|
|
2251
|
+
target_date?: string;
|
|
2252
|
+
external_source?: string;
|
|
2253
|
+
external_id?: string;
|
|
2254
|
+
}
|
|
2255
|
+
export interface MilestoneWorkItem {
|
|
2256
|
+
id?: string;
|
|
2257
|
+
issue?: string;
|
|
2258
|
+
milestone?: string;
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Milestones API resource
|
|
2262
|
+
* Handles all milestone related operations
|
|
2263
|
+
*/
|
|
2264
|
+
export declare class Milestones extends BaseResource {
|
|
2265
|
+
constructor(config: Configuration);
|
|
2266
|
+
/**
|
|
2267
|
+
* Create a new milestone
|
|
2268
|
+
*/
|
|
2269
|
+
create(workspaceSlug: string, projectId: string, createMilestone: CreateMilestoneRequest): Promise<Milestone>;
|
|
2270
|
+
/**
|
|
2271
|
+
* Retrieve a milestone by ID
|
|
2272
|
+
*/
|
|
2273
|
+
retrieve(workspaceSlug: string, projectId: string, milestoneId: string): Promise<Milestone>;
|
|
2274
|
+
/**
|
|
2275
|
+
* Update a milestone
|
|
2276
|
+
*/
|
|
2277
|
+
update(workspaceSlug: string, projectId: string, milestoneId: string, updateMilestone: UpdateMilestoneRequest): Promise<Milestone>;
|
|
2278
|
+
/**
|
|
2279
|
+
* Delete a milestone
|
|
2280
|
+
*/
|
|
2281
|
+
delete(workspaceSlug: string, projectId: string, milestoneId: string): Promise<void>;
|
|
2282
|
+
/**
|
|
2283
|
+
* List milestones with optional filtering
|
|
2284
|
+
*/
|
|
2285
|
+
list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Milestone>>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Add work items to a milestone
|
|
2288
|
+
*/
|
|
2289
|
+
addWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
|
|
2290
|
+
/**
|
|
2291
|
+
* Remove work items from a milestone
|
|
2292
|
+
*/
|
|
2293
|
+
removeWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
|
|
2294
|
+
/**
|
|
2295
|
+
* List work items in a milestone
|
|
2296
|
+
*/
|
|
2297
|
+
listWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, params?: any): Promise<PaginatedResponse<MilestoneWorkItem>>;
|
|
2298
|
+
}
|
|
2299
|
+
/**
|
|
2300
|
+
* Agent run status enum
|
|
2301
|
+
*/
|
|
2302
|
+
export type AgentRunStatus = "created" | "in_progress" | "awaiting" | "completed" | "stopping" | "stopped" | "failed" | "stale";
|
|
2303
|
+
/**
|
|
2304
|
+
* Agent run type enum
|
|
2305
|
+
*/
|
|
2306
|
+
export type AgentRunType = "comment_thread";
|
|
2307
|
+
/**
|
|
2308
|
+
* Agent run activity signal enum
|
|
2309
|
+
*/
|
|
2310
|
+
export type AgentRunActivitySignal = "auth_request" | "continue" | "select" | "stop";
|
|
2311
|
+
/**
|
|
2312
|
+
* Agent run activity type enum
|
|
2313
|
+
*/
|
|
2314
|
+
export type AgentRunActivityType = "action" | "elicitation" | "error" | "prompt" | "response" | "thought";
|
|
2315
|
+
/**
|
|
2316
|
+
* Agent Run interface
|
|
2317
|
+
*/
|
|
2318
|
+
export interface AgentRun extends BaseModel {
|
|
2319
|
+
agent_user: string;
|
|
2320
|
+
comment?: string;
|
|
2321
|
+
source_comment?: string;
|
|
2322
|
+
creator: string;
|
|
2323
|
+
stopped_at?: string;
|
|
2324
|
+
stopped_by?: string;
|
|
2325
|
+
started_at: string;
|
|
2326
|
+
ended_at?: string;
|
|
2327
|
+
external_link?: string;
|
|
2328
|
+
issue?: string;
|
|
2329
|
+
workspace: string;
|
|
2330
|
+
project?: string;
|
|
2331
|
+
status: AgentRunStatus;
|
|
2332
|
+
error_metadata?: Record<string, any>;
|
|
2333
|
+
type: AgentRunType;
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* Create agent run request interface
|
|
2337
|
+
*/
|
|
2338
|
+
export interface CreateAgentRunRequest {
|
|
2339
|
+
agent_slug: string;
|
|
2340
|
+
issue?: string;
|
|
2341
|
+
project?: string;
|
|
2342
|
+
comment?: string;
|
|
2343
|
+
source_comment?: string;
|
|
2344
|
+
external_link?: string;
|
|
2345
|
+
type?: AgentRunType;
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Agent run activity content for action type
|
|
2349
|
+
*/
|
|
2350
|
+
export interface AgentRunActivityActionContent {
|
|
2351
|
+
type: "action";
|
|
2352
|
+
action: string;
|
|
2353
|
+
parameters: Record<string, string>;
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* Agent run activity content for other types
|
|
2357
|
+
*/
|
|
2358
|
+
export interface AgentRunActivityTextContent {
|
|
2359
|
+
type: Exclude<AgentRunActivityType, "action">;
|
|
2360
|
+
body: string;
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* Agent run activity content
|
|
2364
|
+
*/
|
|
2365
|
+
export type AgentRunActivityContent = AgentRunActivityActionContent | AgentRunActivityTextContent;
|
|
2366
|
+
/**
|
|
2367
|
+
* Agent Run Activity interface
|
|
2368
|
+
*/
|
|
2369
|
+
export interface AgentRunActivity extends BaseModel {
|
|
2370
|
+
agent_run: string;
|
|
2371
|
+
content: AgentRunActivityContent;
|
|
2372
|
+
content_metadata?: Record<string, any>;
|
|
2373
|
+
ephemeral: boolean;
|
|
2374
|
+
signal: AgentRunActivitySignal;
|
|
2375
|
+
signal_metadata?: Record<string, any>;
|
|
2376
|
+
comment?: string;
|
|
2377
|
+
actor?: string;
|
|
2378
|
+
type: AgentRunActivityType;
|
|
2379
|
+
project?: string;
|
|
2380
|
+
workspace: string;
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* Create agent run activity request interface
|
|
2384
|
+
*/
|
|
2385
|
+
export interface CreateAgentRunActivityRequest {
|
|
2386
|
+
content: AgentRunActivityContent;
|
|
2387
|
+
content_metadata?: Record<string, any>;
|
|
2388
|
+
signal?: AgentRunActivitySignal;
|
|
2389
|
+
signal_metadata?: Record<string, any>;
|
|
2390
|
+
type: Exclude<AgentRunActivityType, "prompt">;
|
|
2391
|
+
project?: string;
|
|
2392
|
+
}
|
|
2393
|
+
/**
|
|
2394
|
+
* Agent Run Activities API resource
|
|
2395
|
+
* Handles all agent run activity operations
|
|
2396
|
+
*/
|
|
2397
|
+
declare class Activities$1 extends BaseResource {
|
|
2398
|
+
constructor(config: Configuration);
|
|
2399
|
+
/**
|
|
2400
|
+
* List activities for an agent run
|
|
2401
|
+
* @param workspaceSlug - The workspace slug
|
|
2402
|
+
* @param runId - The agent run ID
|
|
2403
|
+
* @param params - Optional query parameters for pagination
|
|
2404
|
+
* @returns Paginated list of agent run activities
|
|
2405
|
+
*/
|
|
2406
|
+
list(workspaceSlug: string, runId: string, params?: {
|
|
2407
|
+
per_page?: number;
|
|
2408
|
+
cursor?: string;
|
|
2409
|
+
}): Promise<PaginatedResponse<AgentRunActivity>>;
|
|
2410
|
+
/**
|
|
2411
|
+
* Retrieve a specific agent run activity by ID
|
|
2412
|
+
* @param workspaceSlug - The workspace slug
|
|
2413
|
+
* @param runId - The agent run ID
|
|
2414
|
+
* @param activityId - The activity ID
|
|
2415
|
+
* @returns The agent run activity
|
|
2416
|
+
*/
|
|
2417
|
+
retrieve(workspaceSlug: string, runId: string, activityId: string): Promise<AgentRunActivity>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Create a new agent run activity
|
|
2420
|
+
* @param workspaceSlug - The workspace slug
|
|
2421
|
+
* @param runId - The agent run ID
|
|
2422
|
+
* @param data - The activity data to create
|
|
2423
|
+
* @returns The created agent run activity
|
|
2424
|
+
*/
|
|
2425
|
+
create(workspaceSlug: string, runId: string, data: CreateAgentRunActivityRequest): Promise<AgentRunActivity>;
|
|
2426
|
+
}
|
|
2427
|
+
/**
|
|
2428
|
+
* Agent Runs API resource
|
|
2429
|
+
* Handles all agent run operations
|
|
2430
|
+
*/
|
|
2431
|
+
export declare class AgentRuns extends BaseResource {
|
|
2432
|
+
activities: Activities$1;
|
|
2433
|
+
constructor(config: Configuration);
|
|
2434
|
+
/**
|
|
2435
|
+
* Create a new agent run
|
|
2436
|
+
* @param workspaceSlug - The workspace slug
|
|
2437
|
+
* @param data - The agent run data to create
|
|
2438
|
+
* @returns The created agent run
|
|
2439
|
+
*/
|
|
2440
|
+
create(workspaceSlug: string, data: CreateAgentRunRequest): Promise<AgentRun>;
|
|
2441
|
+
/**
|
|
2442
|
+
* Retrieve an agent run by ID
|
|
2443
|
+
* @param workspaceSlug - The workspace slug
|
|
2444
|
+
* @param runId - The agent run ID
|
|
2445
|
+
* @returns The agent run
|
|
2446
|
+
*/
|
|
2447
|
+
retrieve(workspaceSlug: string, runId: string): Promise<AgentRun>;
|
|
2448
|
+
}
|
|
2449
|
+
/**
|
|
2450
|
+
* Main Plane Client class
|
|
2451
|
+
* Provides access to all Plane API resources
|
|
2452
|
+
*/
|
|
2453
|
+
export declare class PlaneClient {
|
|
2454
|
+
config: Configuration;
|
|
2455
|
+
workItems: WorkItems;
|
|
2456
|
+
workItemTypes: WorkItemTypes;
|
|
2457
|
+
workItemProperties: WorkItemProperties;
|
|
2458
|
+
links: Links;
|
|
2459
|
+
customers: Customers;
|
|
2460
|
+
pages: Pages;
|
|
2461
|
+
projects: Projects;
|
|
2462
|
+
labels: Labels;
|
|
2463
|
+
states: States;
|
|
2464
|
+
members: Members;
|
|
2465
|
+
modules: Modules;
|
|
2466
|
+
cycles: Cycles;
|
|
2467
|
+
users: Users;
|
|
2468
|
+
workspace: Workspace;
|
|
2469
|
+
epics: Epics;
|
|
2470
|
+
intake: Intake;
|
|
2471
|
+
stickies: Stickies;
|
|
2472
|
+
teamspaces: Teamspaces;
|
|
2473
|
+
milestones: Milestones;
|
|
2474
|
+
initiatives: Initiatives;
|
|
2475
|
+
agentRuns: AgentRuns;
|
|
2476
|
+
constructor(config: {
|
|
2477
|
+
baseUrl?: string;
|
|
2478
|
+
apiKey?: string;
|
|
2479
|
+
accessToken?: string;
|
|
2480
|
+
enableLogging?: boolean;
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
export interface PlaneOAuthTokenResponse {
|
|
2484
|
+
access_token: string;
|
|
2485
|
+
expires_in?: number;
|
|
2486
|
+
token_type: string;
|
|
2487
|
+
scope?: string;
|
|
2488
|
+
refresh_token?: string;
|
|
2489
|
+
}
|
|
2490
|
+
export interface WorkspaceDetail {
|
|
2491
|
+
name: string;
|
|
2492
|
+
slug: string;
|
|
2493
|
+
id: string;
|
|
2494
|
+
logo_url?: string;
|
|
2495
|
+
}
|
|
2496
|
+
export interface PlaneOAuthAppInstallation {
|
|
2497
|
+
id: string;
|
|
2498
|
+
workspace_detail: WorkspaceDetail;
|
|
2499
|
+
created_at: string;
|
|
2500
|
+
updated_at: string;
|
|
2501
|
+
deleted_at?: string;
|
|
2502
|
+
status: string;
|
|
2503
|
+
created_by?: string;
|
|
2504
|
+
updated_by?: string;
|
|
2505
|
+
workspace: string;
|
|
2506
|
+
application: string;
|
|
2507
|
+
installed_by: string;
|
|
2508
|
+
app_bot: string;
|
|
2509
|
+
webhook?: string;
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* Standalone OAuth client for app development
|
|
2513
|
+
* Does not require API authentication - perfect for OAuth app development
|
|
2514
|
+
*/
|
|
2515
|
+
export declare class OAuthClient {
|
|
2516
|
+
private clientId;
|
|
2517
|
+
private clientSecret;
|
|
2518
|
+
private redirectUri;
|
|
2519
|
+
private baseUrl;
|
|
2520
|
+
constructor(config: {
|
|
2521
|
+
baseUrl?: string;
|
|
2522
|
+
clientId: string;
|
|
2523
|
+
clientSecret: string;
|
|
2524
|
+
redirectUri: string;
|
|
2525
|
+
});
|
|
2526
|
+
/**
|
|
2527
|
+
* Get the authorization URL for the OAuth flow
|
|
2528
|
+
* @param responseType - The response type (default: "code")
|
|
2529
|
+
* @param state - Optional state parameter for security
|
|
2530
|
+
* @returns The authorization URL
|
|
2531
|
+
*/
|
|
2532
|
+
getAuthorizationUrl(responseType?: string, state?: string): string;
|
|
2533
|
+
/**
|
|
2534
|
+
* Exchange authorization code for access token
|
|
2535
|
+
* @param code - The authorization code
|
|
2536
|
+
* @param grantType - The grant type (default: "authorization_code")
|
|
2537
|
+
* @returns Promise resolving to token response
|
|
2538
|
+
*/
|
|
2539
|
+
exchangeCodeForToken(code: string, grantType?: string): Promise<PlaneOAuthTokenResponse>;
|
|
2540
|
+
/**
|
|
2541
|
+
* Get a new access token using a refresh token
|
|
2542
|
+
* @param refreshToken - The refresh token
|
|
2543
|
+
* @returns Promise resolving to token response
|
|
2544
|
+
*/
|
|
2545
|
+
getRefreshToken(refreshToken: string): Promise<PlaneOAuthTokenResponse>;
|
|
2546
|
+
/**
|
|
2547
|
+
* Get a new access token using client credentials for bot/app installations
|
|
2548
|
+
* @param appInstallationId - The app installation ID
|
|
2549
|
+
* @returns Promise resolving to token response
|
|
2550
|
+
*/
|
|
2551
|
+
getBotToken(appInstallationId: string): Promise<PlaneOAuthTokenResponse>;
|
|
2552
|
+
/**
|
|
2553
|
+
* Get an app installation by ID using the bot token
|
|
2554
|
+
* @param token - The bot token from getBotToken method
|
|
2555
|
+
* @param appInstallationId - The app installation ID
|
|
2556
|
+
* @returns Promise resolving to app installation
|
|
2557
|
+
*/
|
|
2558
|
+
getAppInstallations(token: string, appInstallationId?: string): Promise<PlaneOAuthAppInstallation[]>;
|
|
2559
|
+
/**
|
|
2560
|
+
* Generate basic auth token from client_id and client_secret
|
|
2561
|
+
* @returns Base64 encoded basic auth token
|
|
2562
|
+
*/
|
|
2563
|
+
private getBasicAuthToken;
|
|
2564
|
+
}
|
|
2565
|
+
/**
|
|
2566
|
+
* Base error class for all Plane SDK errors
|
|
2567
|
+
*/
|
|
2568
|
+
export declare class PlaneError extends Error {
|
|
2569
|
+
statusCode?: number;
|
|
2570
|
+
response?: any;
|
|
2571
|
+
constructor(message: string, statusCode?: number, response?: any);
|
|
2572
|
+
}
|
|
2573
|
+
/**
|
|
2574
|
+
* HTTP-specific error class for API request failures
|
|
2575
|
+
*/
|
|
2576
|
+
export declare class HttpError extends PlaneError {
|
|
2577
|
+
constructor(message: string, statusCode: number, response?: any);
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
export {
|
|
2581
|
+
Activities as WorkItemActivities,
|
|
2582
|
+
Activities$1 as AgentRunActivities,
|
|
2583
|
+
Attachments as WorkItemAttachments,
|
|
2584
|
+
Comments as WorkItemComments,
|
|
2585
|
+
Epics$1 as InitiativeEpics,
|
|
2586
|
+
Labels$1 as InitiativeLabels,
|
|
2587
|
+
Members$1 as TeamspaceMembers,
|
|
2588
|
+
Options as WorkItemPropertyOptions,
|
|
2589
|
+
Projects$1 as TeamspaceProjects,
|
|
2590
|
+
Projects$2 as InitiativeProjects,
|
|
2591
|
+
Properties as CustomerProperties,
|
|
2592
|
+
Relations as WorkItemRelations,
|
|
2593
|
+
Requests as CustomerRequests,
|
|
2594
|
+
Values as WorkItemPropertyValues,
|
|
2595
|
+
};
|
|
2596
|
+
|
|
2597
|
+
export {};
|