@makeplane/plane-node-sdk 0.2.4 → 0.2.6

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.
@@ -0,0 +1,2457 @@
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 type EmojiProps = {
104
+ in_use: "emoji";
105
+ emoji: {
106
+ value?: string;
107
+ url?: string;
108
+ };
109
+ };
110
+ export type IconProps = {
111
+ in_use: "icon";
112
+ icon: {
113
+ name?: string;
114
+ color?: string;
115
+ background_color?: string;
116
+ };
117
+ };
118
+ export type LogoProps = EmojiProps | IconProps;
119
+ export type PriorityEnum = "urgent" | "high" | "medium" | "low" | "none";
120
+ export type PropertyType = "TEXT" | "DECIMAL" | "OPTION" | "BOOLEAN" | "DATETIME" | "RELATION";
121
+ export type PropertyRelationType = "USER" | "ISSUE";
122
+ export type AccessEnum = "INTERNAL" | "EXTERNAL";
123
+ 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";
124
+ /**
125
+ * Project model interfaces
126
+ */
127
+ export interface Project extends BaseModel {
128
+ id: string;
129
+ total_members: number;
130
+ total_cycles: number;
131
+ total_modules: number;
132
+ is_member: boolean;
133
+ member_role: number;
134
+ is_deployed: boolean;
135
+ cover_image_url: null;
136
+ name: string;
137
+ description: string;
138
+ network?: number;
139
+ identifier?: string;
140
+ emoji?: null;
141
+ icon_prop?: null;
142
+ module_view: boolean;
143
+ cycle_view: boolean;
144
+ issue_views_view: boolean;
145
+ page_view: boolean;
146
+ intake_view: boolean;
147
+ is_time_tracking_enabled?: boolean;
148
+ is_issue_type_enabled?: boolean;
149
+ guest_view_all_features: boolean;
150
+ cover_image?: string;
151
+ archive_in: number;
152
+ close_in: number;
153
+ archived_at?: Date;
154
+ timezone: string;
155
+ workspace: string;
156
+ default_assignee: null;
157
+ project_lead: null;
158
+ cover_image_asset: null;
159
+ estimate: null;
160
+ default_state: null;
161
+ }
162
+ export type CreateProject = Pick<Project, "name" | "identifier"> & Partial<Omit<Project, "name" | "identifier">>;
163
+ export type UpdateProject = Partial<Project>;
164
+ export interface ListProjectsParams {
165
+ limit?: number;
166
+ offset?: number;
167
+ }
168
+ export interface User {
169
+ id?: string;
170
+ first_name?: string;
171
+ last_name?: string;
172
+ email?: string;
173
+ avatar?: string;
174
+ avatar_url?: string;
175
+ display_name?: string;
176
+ }
177
+ /**
178
+ * Project Features model interfaces
179
+ */
180
+ export interface ProjectFeatures {
181
+ epics: boolean;
182
+ modules: boolean;
183
+ cycles: boolean;
184
+ views: boolean;
185
+ pages: boolean;
186
+ intakes: boolean;
187
+ work_item_types: boolean;
188
+ }
189
+ export type UpdateProjectFeatures = Partial<ProjectFeatures>;
190
+ /**
191
+ * Project API resource
192
+ * Handles all project-related operations
193
+ */
194
+ export declare class Projects extends BaseResource {
195
+ constructor(config: Configuration);
196
+ /**
197
+ * Create a new project
198
+ */
199
+ create(workspaceSlug: string, createProject: CreateProject): Promise<Project>;
200
+ /**
201
+ * Retrieve a project by ID
202
+ */
203
+ retrieve(workspaceSlug: string, projectId: string): Promise<Project>;
204
+ /**
205
+ * Update a project
206
+ */
207
+ update(workspaceSlug: string, projectId: string, updateProject: UpdateProject): Promise<Project>;
208
+ /**
209
+ * Delete a project
210
+ */
211
+ delete(workspaceSlug: string, projectId: string): Promise<void>;
212
+ /**
213
+ * List projects with optional filtering
214
+ */
215
+ list(workspaceSlug: string, params?: ListProjectsParams): Promise<PaginatedResponse<Project>>;
216
+ /**
217
+ * Get project members
218
+ */
219
+ getMembers(workspaceSlug: string, projectId: string): Promise<User[]>;
220
+ /**
221
+ * Get total work logs for a project
222
+ */
223
+ getTotalWorkLogs(workspaceSlug: string, projectId: string): Promise<any>;
224
+ /**
225
+ * Retrieve project features
226
+ */
227
+ retrieveFeatures(workspaceSlug: string, projectId: string): Promise<ProjectFeatures>;
228
+ /**
229
+ * Update project features
230
+ */
231
+ updateFeatures(workspaceSlug: string, projectId: string, updateFeatures: UpdateProjectFeatures): Promise<ProjectFeatures>;
232
+ }
233
+ /**
234
+ * WorkItemType model interfaces
235
+ */
236
+ export interface WorkItemType extends BaseModel {
237
+ name: string;
238
+ description?: string;
239
+ logo_props: LogoProps;
240
+ is_epic: boolean;
241
+ is_default: boolean;
242
+ is_active: boolean;
243
+ level: number;
244
+ workspace: string;
245
+ project: string;
246
+ }
247
+ export type CreateWorkItemType = Partial<WorkItemType>;
248
+ export type UpdateWorkItemType = Partial<WorkItemType>;
249
+ export interface CreateModuleRequest {
250
+ name: string;
251
+ description?: string;
252
+ start_date?: string;
253
+ target_date?: string;
254
+ status?: ModuleStatusEnum;
255
+ lead?: string;
256
+ members?: string[];
257
+ external_source?: string;
258
+ external_id?: string;
259
+ }
260
+ export interface UpdateModuleRequest {
261
+ name?: string;
262
+ description?: string;
263
+ start_date?: string;
264
+ target_date?: string;
265
+ status?: ModuleStatusEnum;
266
+ lead?: string;
267
+ members?: string[];
268
+ external_source?: string;
269
+ external_id?: string;
270
+ }
271
+ export interface ModuleWorkItem {
272
+ id?: string;
273
+ sub_issues_count?: number;
274
+ created_at?: string;
275
+ updated_at?: string;
276
+ deleted_at: string;
277
+ created_by?: string;
278
+ updated_by?: string;
279
+ project?: string;
280
+ workspace?: string;
281
+ module?: string;
282
+ issue: string;
283
+ }
284
+ export interface Module extends BaseModel {
285
+ name: string;
286
+ description?: string;
287
+ description_text?: any;
288
+ description_html?: any;
289
+ start_date?: string;
290
+ target_date?: string;
291
+ status?: ModuleStatusEnum;
292
+ view_props?: any;
293
+ sort_order?: number;
294
+ archived_at?: string;
295
+ logo_props?: any;
296
+ project: string;
297
+ workspace: string;
298
+ lead?: string;
299
+ members?: string[];
300
+ }
301
+ export type ModuleStatusEnum = "backlog" | "planned" | "in-progress" | "paused" | "completed" | "cancelled";
302
+ export interface ListModulesParamsRequest {
303
+ limit?: number;
304
+ offset?: number;
305
+ }
306
+ export interface Label {
307
+ id?: string;
308
+ created_at?: string;
309
+ updated_at?: string;
310
+ deleted_at?: string;
311
+ name: string;
312
+ description?: string;
313
+ color?: string;
314
+ sort_order?: number;
315
+ external_source?: string;
316
+ external_id?: string;
317
+ created_by?: string;
318
+ updated_by?: string;
319
+ workspace?: string;
320
+ project?: string;
321
+ parent?: string;
322
+ }
323
+ /**
324
+ * State model interfaces
325
+ */
326
+ export type State = {
327
+ id: string;
328
+ name: string;
329
+ description?: string;
330
+ color: string;
331
+ sequence?: number;
332
+ group?: GroupEnum;
333
+ is_triage?: boolean;
334
+ default?: boolean;
335
+ project?: string;
336
+ workspace?: string;
337
+ external_source?: string;
338
+ external_id?: string;
339
+ created_at: string;
340
+ updated_at: string;
341
+ deleted_at: string;
342
+ created_by: string;
343
+ updated_by: string;
344
+ };
345
+ export type CreateState = {
346
+ name: string;
347
+ description?: string;
348
+ color: string;
349
+ sequence?: number;
350
+ group?: GroupEnum;
351
+ is_triage?: boolean;
352
+ default?: boolean;
353
+ external_source?: string;
354
+ external_id?: string;
355
+ };
356
+ export type UpdateState = Partial<CreateState>;
357
+ export type ListStatesParams = {
358
+ project?: string;
359
+ limit?: number;
360
+ offset?: number;
361
+ };
362
+ export type GroupEnum = "backlog" | "unstarted" | "started" | "completed" | "cancelled" | "triage";
363
+ /**
364
+ * WorkItem model interfaces
365
+ */
366
+ export interface WorkItemBase extends BaseModel {
367
+ name: string;
368
+ sequence_id: number;
369
+ description_html?: string;
370
+ project: string;
371
+ labels?: string[];
372
+ assignees?: string[];
373
+ type?: string;
374
+ estimate_point?: string;
375
+ state?: string;
376
+ parent?: string;
377
+ is_draft?: boolean;
378
+ archived_at?: string;
379
+ completed_at?: string;
380
+ sort_order?: number;
381
+ target_date?: string;
382
+ start_date?: string;
383
+ priority?: PriorityEnum;
384
+ description_stripped?: string;
385
+ description_binary?: string;
386
+ }
387
+ export type WorkItemExpandableFields = {
388
+ type: WorkItemType;
389
+ module: Module;
390
+ labels: Label[];
391
+ assignees: User[];
392
+ state: State;
393
+ project: Project;
394
+ };
395
+ export type WorkItemExpandableFieldName = keyof WorkItemExpandableFields;
396
+ export type WorkItem<Expanded extends WorkItemExpandableFieldName = never> = [
397
+ Expanded
398
+ ] extends [
399
+ never
400
+ ] ? WorkItemBase : Omit<WorkItemBase, Expanded> & {
401
+ [K in Expanded]: K extends keyof WorkItemExpandableFields ? WorkItemExpandableFields[K] : never;
402
+ };
403
+ export interface CreateWorkItem {
404
+ name: string;
405
+ description_html?: string;
406
+ state?: string;
407
+ assignees?: string[];
408
+ labels?: string[];
409
+ parent?: string;
410
+ estimate_point?: string;
411
+ type?: string;
412
+ module?: string;
413
+ target_date?: string;
414
+ start_date?: string;
415
+ priority?: PriorityEnum;
416
+ }
417
+ export interface UpdateWorkItem {
418
+ name?: string;
419
+ description_html?: string;
420
+ state?: string;
421
+ assignees?: string[];
422
+ labels?: string[];
423
+ parent?: string;
424
+ estimate_point?: string;
425
+ type?: string;
426
+ module?: string;
427
+ target_date?: string;
428
+ start_date?: string;
429
+ priority?: PriorityEnum;
430
+ }
431
+ export interface ListWorkItemsParams {
432
+ project?: string;
433
+ state?: string;
434
+ assignee?: string;
435
+ limit?: number;
436
+ offset?: number;
437
+ }
438
+ export interface WorkItemActivity {
439
+ id: string;
440
+ created_at?: string;
441
+ updated_at?: string;
442
+ deleted_at?: string;
443
+ verb?: string;
444
+ field?: string;
445
+ old_value?: string;
446
+ new_value?: string;
447
+ comment?: string;
448
+ attachments?: string[];
449
+ old_identifier?: string;
450
+ new_identifier?: string;
451
+ epoch?: number;
452
+ project: string;
453
+ workspace: string;
454
+ issue?: string;
455
+ issue_comment?: string;
456
+ actor?: string;
457
+ }
458
+ export interface WorkItemSearch {
459
+ issues: WorkItemSearchItem[];
460
+ }
461
+ export interface WorkItemSearchItem {
462
+ id: string;
463
+ name: string;
464
+ sequence_id: string;
465
+ project__identifier: string;
466
+ project_id: string;
467
+ workspace__slug: string;
468
+ }
469
+ /**
470
+ * Link model interfaces
471
+ * TODO: Replace with proper types after API verification
472
+ */
473
+ export interface Link extends BaseModel {
474
+ title: string;
475
+ url: string;
476
+ issue: string;
477
+ workspace: string;
478
+ project: string;
479
+ created_by: string;
480
+ updated_by?: string;
481
+ [key: string]: any;
482
+ }
483
+ export type CreateLink = Partial<Link>;
484
+ export type UpdateLink = Partial<Link>;
485
+ export interface ListLinksParams {
486
+ issue?: string;
487
+ project?: string;
488
+ workspace?: string;
489
+ limit?: number;
490
+ offset?: number;
491
+ }
492
+ /**
493
+ * Links API resource
494
+ * Handles all link related operations for work items
495
+ */
496
+ export declare class Links extends BaseResource {
497
+ constructor(config: Configuration);
498
+ /**
499
+ * Create a new link for a work item
500
+ */
501
+ create(workspaceSlug: string, projectId: string, issueId: string, createLink: CreateLink): Promise<Link>;
502
+ /**
503
+ * Retrieve a link by ID
504
+ */
505
+ retrieve(workspaceSlug: string, projectId: string, issueId: string, linkId: string): Promise<Link>;
506
+ /**
507
+ * Update a link
508
+ */
509
+ update(workspaceSlug: string, projectId: string, issueId: string, linkId: string, updateLink: UpdateLink): Promise<Link>;
510
+ /**
511
+ * Delete a link
512
+ */
513
+ delete(workspaceSlug: string, projectId: string, issueId: string, linkId: string): Promise<void>;
514
+ /**
515
+ * List links for a work item with optional filtering
516
+ */
517
+ list(workspaceSlug: string, projectId: string, issueId: string, params?: ListLinksParams): Promise<PaginatedResponse<Link>>;
518
+ }
519
+ export type IssueRelationCreateRelationTypeEnum = "blocking" | "blocked_by" | "duplicate" | "relates_to" | "start_before" | "start_after" | "finish_before" | "finish_after";
520
+ export interface WorkItemRelationCreateRequest {
521
+ relation_type: IssueRelationCreateRelationTypeEnum;
522
+ issues: string[];
523
+ }
524
+ export interface WorkItemRelationRemoveRequest {
525
+ related_issue: string;
526
+ }
527
+ export interface WorkItemRelationResponse {
528
+ blocking: string[];
529
+ blocked_by: string[];
530
+ duplicate: string[];
531
+ relates_to: string[];
532
+ start_after: string[];
533
+ start_before: string[];
534
+ finish_after: string[];
535
+ finish_before: string[];
536
+ }
537
+ /**
538
+ * WorkItemRelations API resource
539
+ * Handles all work item relation operations
540
+ */
541
+ declare class Relations extends BaseResource {
542
+ constructor(config: Configuration);
543
+ /**
544
+ * Create relations between work items
545
+ */
546
+ create(workspaceSlug: string, projectId: string, workItemId: string, relationData: WorkItemRelationCreateRequest): Promise<void>;
547
+ /**
548
+ * Delete a relation between work items
549
+ */
550
+ delete(workspaceSlug: string, projectId: string, workItemId: string, relationData: WorkItemRelationRemoveRequest): Promise<void>;
551
+ /**
552
+ * List relations for a work item
553
+ */
554
+ list(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkItemRelationResponse>;
555
+ }
556
+ /**
557
+ * Attachment model interfaces
558
+ *
559
+ */
560
+ export interface ListAttachmentsParams {
561
+ issue?: string;
562
+ project?: string;
563
+ workspace?: string;
564
+ limit?: number;
565
+ offset?: number;
566
+ }
567
+ export interface WorkItemAttachment {
568
+ id?: string;
569
+ created_at?: string;
570
+ updated_at?: string;
571
+ deleted_at?: string;
572
+ attributes?: any;
573
+ asset: string;
574
+ entity_type?: string;
575
+ entity_identifier?: string;
576
+ is_deleted?: boolean;
577
+ is_archived?: boolean;
578
+ external_id?: string;
579
+ external_source?: string;
580
+ size?: number;
581
+ is_uploaded?: boolean;
582
+ storage_metadata?: any;
583
+ created_by?: string;
584
+ updated_by?: string;
585
+ user?: string;
586
+ workspace?: string;
587
+ draft_issue?: string;
588
+ project?: string;
589
+ issue?: string;
590
+ comment?: string;
591
+ page?: string;
592
+ }
593
+ export interface WorkItemAttachmentUploadRequest {
594
+ name: string;
595
+ type?: string;
596
+ size: number;
597
+ external_id?: string;
598
+ external_source?: string;
599
+ }
600
+ export type UpdateWorkItemAttachmentRequest = Partial<WorkItemAttachment>;
601
+ /**
602
+ * WorkItemAttachments API resource
603
+ * Handles all work item attachment operations
604
+ */
605
+ declare class Attachments extends BaseResource {
606
+ constructor(config: Configuration);
607
+ /**
608
+ * Retrieve an attachment by ID
609
+ */
610
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<WorkItemAttachment>;
611
+ /**
612
+ * List attachments for a work item
613
+ */
614
+ list(workspaceSlug: string, projectId: string, workItemId: string, params?: any): Promise<WorkItemAttachment[]>;
615
+ /**
616
+ * Create/upload an attachment for a work item
617
+ */
618
+ create(workspaceSlug: string, projectId: string, workItemId: string, uploadData: WorkItemAttachmentUploadRequest): Promise<WorkItemAttachment>;
619
+ /**
620
+ * Update an attachment
621
+ */
622
+ update(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string, updateData: UpdateWorkItemAttachmentRequest): Promise<WorkItemAttachment>;
623
+ /**
624
+ * Delete an attachment
625
+ */
626
+ delete(workspaceSlug: string, projectId: string, workItemId: string, attachmentId: string): Promise<void>;
627
+ }
628
+ export interface WorkItemComment {
629
+ id: string;
630
+ is_member?: boolean;
631
+ created_at?: string;
632
+ updated_at?: string;
633
+ deleted_at?: string;
634
+ comment_stripped?: string;
635
+ comment_html?: string;
636
+ attachments?: string[];
637
+ access?: AccessEnum;
638
+ external_source?: string;
639
+ external_id?: string;
640
+ edited_at?: string;
641
+ created_by?: string;
642
+ updated_by?: string;
643
+ project?: string;
644
+ workspace?: string;
645
+ issue?: string;
646
+ actor?: string;
647
+ }
648
+ export interface WorkItemCommentCreateRequest {
649
+ comment_json?: any;
650
+ comment_html?: string;
651
+ access?: AccessEnum;
652
+ external_source?: string;
653
+ external_id?: string;
654
+ }
655
+ export interface WorkItemCommentUpdateRequest {
656
+ comment_json?: any;
657
+ comment_html?: string;
658
+ access?: AccessEnum;
659
+ external_source?: string;
660
+ external_id?: string;
661
+ }
662
+ export interface ListCommentsParams {
663
+ issue?: string;
664
+ project?: string;
665
+ workspace?: string;
666
+ limit?: number;
667
+ offset?: number;
668
+ }
669
+ /**
670
+ * WorkItemComments API resource
671
+ * Handles all work item comment operations
672
+ */
673
+ declare class Comments extends BaseResource {
674
+ constructor(config: Configuration);
675
+ /**
676
+ * Retrieve a comment by ID
677
+ */
678
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string, commentId: string): Promise<WorkItemComment>;
679
+ /**
680
+ * List comments for a work item
681
+ */
682
+ list(workspaceSlug: string, projectId: string, workItemId: string, params?: ListCommentsParams): Promise<PaginatedResponse<WorkItemComment>>;
683
+ /**
684
+ * Create a comment for a work item
685
+ */
686
+ create(workspaceSlug: string, projectId: string, workItemId: string, commentData: WorkItemCommentCreateRequest): Promise<WorkItemComment>;
687
+ /**
688
+ * Update a comment
689
+ */
690
+ update(workspaceSlug: string, projectId: string, workItemId: string, commentId: string, updateData: WorkItemCommentUpdateRequest): Promise<WorkItemComment>;
691
+ /**
692
+ * Delete a comment
693
+ */
694
+ delete(workspaceSlug: string, projectId: string, workItemId: string, commentId: string): Promise<void>;
695
+ }
696
+ /**
697
+ * WorkItemActivities API resource
698
+ * Handles all work item activity operations
699
+ */
700
+ declare class Activities extends BaseResource {
701
+ constructor(config: Configuration);
702
+ /**
703
+ * List activities for a work item
704
+ */
705
+ list(workspaceSlug: string, projectId: string, workItemId: string, params?: any): Promise<PaginatedResponse<WorkItemActivity>>;
706
+ /**
707
+ * Retrieve a specific activity by ID
708
+ */
709
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string, activityId: string): Promise<WorkItemActivity>;
710
+ }
711
+ export interface WorkLog extends BaseModel {
712
+ description: string;
713
+ duration: number;
714
+ project_id: string;
715
+ workspace_id: string;
716
+ logged_by: string;
717
+ }
718
+ /**
719
+ * Create work log request
720
+ *
721
+ * @param description - The description of the work log
722
+ * @param duration - The duration of the work log in minutes
723
+ */
724
+ export interface CreateWorkLogRequest {
725
+ description?: string;
726
+ duration: number;
727
+ }
728
+ export interface UpdateWorkLogRequest {
729
+ description?: string;
730
+ duration?: number;
731
+ }
732
+ /**
733
+ * WorkLogs API resource
734
+ * Handles all work log operations for work items
735
+ */
736
+ export declare class WorkLogs extends BaseResource {
737
+ constructor(config: Configuration);
738
+ /**
739
+ * List work logs for a work item
740
+ */
741
+ list(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkLog[]>;
742
+ /**
743
+ * Create a work log for a work item
744
+ */
745
+ create(workspaceSlug: string, projectId: string, workItemId: string, workLogData: CreateWorkLogRequest): Promise<WorkLog>;
746
+ /**
747
+ * Update a work log
748
+ */
749
+ update(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string, updateData: UpdateWorkLogRequest): Promise<WorkLog>;
750
+ /**
751
+ * Delete a work log
752
+ */
753
+ delete(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void>;
754
+ }
755
+ /**
756
+ * WorkItems API resource
757
+ * Handles all work item (issue) related operations
758
+ */
759
+ export declare class WorkItems extends BaseResource {
760
+ links: Links;
761
+ relations: Relations;
762
+ attachments: Attachments;
763
+ comments: Comments;
764
+ activities: Activities;
765
+ workLogs: WorkLogs;
766
+ constructor(config: Configuration);
767
+ /**
768
+ * Create a new work item
769
+ */
770
+ create(workspaceSlug: string, projectId: string, createWorkItem: CreateWorkItem): Promise<WorkItem>;
771
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkItemBase>;
772
+ retrieve<E extends WorkItemExpandableFieldName>(workspaceSlug: string, projectId: string, workItemId: string, expand: E[]): Promise<WorkItem<E>>;
773
+ /**
774
+ * Update a work item
775
+ */
776
+ update(workspaceSlug: string, projectId: string, workItemId: string, updateWorkItem: UpdateWorkItem): Promise<WorkItem>;
777
+ /**
778
+ * Delete a work item
779
+ */
780
+ delete(workspaceSlug: string, projectId: string, workItemId: string): Promise<void>;
781
+ /**
782
+ * List work items with optional filtering
783
+ */
784
+ list(workspaceSlug: string, projectId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
785
+ retrieveByIdentifier(workspaceSlug: string, identifier: string): Promise<WorkItemBase>;
786
+ retrieveByIdentifier<E extends WorkItemExpandableFieldName>(workspaceSlug: string, identifier: string, expand: E[]): Promise<WorkItem<E>>;
787
+ /**
788
+ * Search work items
789
+ */
790
+ search(workspaceSlug: string, query: string, projectId?: string, params?: any): Promise<WorkItemSearch>;
791
+ }
792
+ export interface ListWorkItemTypesParams {
793
+ project?: string;
794
+ limit?: number;
795
+ offset?: number;
796
+ }
797
+ /**
798
+ * WorkItemTypes API resource
799
+ * Handles all work item type related operations
800
+ */
801
+ export declare class WorkItemTypes extends BaseResource {
802
+ constructor(config: Configuration);
803
+ /**
804
+ * Create a new work item type
805
+ */
806
+ create(workspaceSlug: string, projectId: string, createWorkItemType: CreateWorkItemType): Promise<WorkItemType>;
807
+ /**
808
+ * Retrieve a work item type by ID
809
+ */
810
+ retrieve(workspaceSlug: string, projectId: string, workItemTypeId: string): Promise<WorkItemType>;
811
+ /**
812
+ * Update a work item type
813
+ */
814
+ update(workspaceSlug: string, projectId: string, workItemTypeId: string, updateWorkItemType: UpdateWorkItemType): Promise<WorkItemType>;
815
+ /**
816
+ * Delete a work item type
817
+ */
818
+ delete(workspaceSlug: string, projectId: string, workItemTypeId: string): Promise<void>;
819
+ /**
820
+ * List work item types with optional filtering
821
+ */
822
+ list(workspaceSlug: string, projectId: string, params?: ListWorkItemTypesParams): Promise<WorkItemType[]>;
823
+ }
824
+ export type WorkItemPropertySettings = TextSettings | undefined;
825
+ /**
826
+ * WorkItemProperty model interfaces
827
+ */
828
+ export interface WorkItemProperty extends BaseModel {
829
+ name: string;
830
+ property_type: PropertyType;
831
+ display_name: string;
832
+ description?: string;
833
+ relation_type: PropertyRelationType | undefined;
834
+ options?: Partial<WorkItemPropertyOption>[];
835
+ settings?: WorkItemPropertySettings;
836
+ logo_props: LogoProps;
837
+ sort_order: number;
838
+ is_required: boolean;
839
+ default_value: any;
840
+ is_active: boolean;
841
+ is_multi: boolean;
842
+ validation_rules: any;
843
+ issue_type: string;
844
+ workspace: string;
845
+ project: string;
846
+ }
847
+ /**
848
+ * CreateWorkItemProperty model interface
849
+ * This is the model used to create a new work item property to add validations according to the property type
850
+ * as defined above.
851
+ */
852
+ export interface BaseCreateWorkItemProperty {
853
+ name: string;
854
+ display_name: string;
855
+ description?: string;
856
+ property_type: PropertyType;
857
+ settings?: WorkItemPropertySettings;
858
+ logo_props?: LogoProps;
859
+ sort_order?: number;
860
+ is_required: boolean;
861
+ default_value?: any;
862
+ is_active?: boolean;
863
+ relation_type?: PropertyRelationType;
864
+ options?: Partial<WorkItemPropertyOption>[];
865
+ is_multi?: boolean;
866
+ }
867
+ export interface CreateTextWorkItemProperty extends BaseCreateWorkItemProperty {
868
+ property_type: "TEXT";
869
+ settings?: TextSettings;
870
+ }
871
+ export interface CreateDecimalWorkItemProperty extends BaseCreateWorkItemProperty {
872
+ property_type: "DECIMAL";
873
+ }
874
+ export interface CreateOptionWorkItemProperty extends BaseCreateWorkItemProperty {
875
+ property_type: "OPTION";
876
+ options?: Partial<WorkItemPropertyOption>[];
877
+ is_multi?: boolean;
878
+ }
879
+ export interface CreateBooleanWorkItemProperty extends BaseCreateWorkItemProperty {
880
+ property_type: "BOOLEAN";
881
+ }
882
+ export interface CreateDateTimeWorkItemProperty extends BaseCreateWorkItemProperty {
883
+ property_type: "DATETIME";
884
+ }
885
+ export interface CreateRelationWorkItemProperty extends BaseCreateWorkItemProperty {
886
+ property_type: "RELATION";
887
+ relation_type?: PropertyRelationType;
888
+ }
889
+ export type CreateWorkItemProperty = CreateTextWorkItemProperty | CreateDecimalWorkItemProperty | CreateOptionWorkItemProperty | CreateBooleanWorkItemProperty | CreateDateTimeWorkItemProperty | CreateRelationWorkItemProperty;
890
+ export type UpdateWorkItemProperty = Partial<WorkItemProperty>;
891
+ export interface ListWorkItemPropertiesParams {
892
+ project?: string;
893
+ limit?: number;
894
+ offset?: number;
895
+ }
896
+ export type TextSettings = {
897
+ display_format: "single-line" | "multi-line" | "readonly";
898
+ };
899
+ /**
900
+ * WorkItemPropertyOption model interfaces
901
+ */
902
+ export interface WorkItemPropertyOption extends BaseModel {
903
+ name: string;
904
+ description?: string;
905
+ property: string;
906
+ is_active?: boolean;
907
+ sort_order?: number;
908
+ parent?: string;
909
+ project?: string;
910
+ is_default?: boolean;
911
+ logo_props?: LogoProps;
912
+ }
913
+ export type CreateWorkItemPropertyOption = Partial<WorkItemPropertyOption>;
914
+ export type UpdateWorkItemPropertyOption = Partial<WorkItemPropertyOption>;
915
+ export interface ListWorkItemPropertyOptionsParams {
916
+ property?: string;
917
+ limit?: number;
918
+ offset?: number;
919
+ }
920
+ /**
921
+ * WorkItemPropertyValue model interfaces
922
+ */
923
+ export interface WorkItemPropertyValue extends BaseModel {
924
+ value: any;
925
+ property: string;
926
+ issue: string;
927
+ workspace: string;
928
+ project: string;
929
+ }
930
+ export type WorkItemPropertyValues = {
931
+ property_id: string;
932
+ values: any[];
933
+ }[];
934
+ /**
935
+ * UpdateWorkItemPropertyValue model interface
936
+ * Request model for creating/updating a work item property value.
937
+ *
938
+ * The value type depends on the property type:
939
+ * - TEXT/URL/EMAIL/FILE: string
940
+ * - DATETIME: string (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)
941
+ * - DECIMAL: number (int or float)
942
+ * - BOOLEAN: boolean (true/false)
943
+ * - OPTION/RELATION (single): string (UUID)
944
+ * - OPTION/RELATION (multi, when is_multi=True): list of strings (UUIDs) or single string
945
+ *
946
+ * For multi-value properties (is_multi=True):
947
+ * - Accept either a single UUID string or a list of UUID strings
948
+ * - Multiple IssuePropertyValue records are created
949
+ * - Response will be a list of values
950
+ *
951
+ * For single-value properties:
952
+ * - Only one value is allowed per work item/property combination
953
+ */
954
+ export type UpdateWorkItemPropertyValue = {
955
+ value: string | boolean | number | string[];
956
+ external_id?: string;
957
+ external_source?: string;
958
+ };
959
+ export interface ListWorkItemPropertyValuesParams {
960
+ issue?: string;
961
+ property?: string;
962
+ limit?: number;
963
+ offset?: number;
964
+ }
965
+ /**
966
+ * WorkItemPropertyOptions API resource
967
+ * Handles all work item property option operations
968
+ */
969
+ declare class Options extends BaseResource {
970
+ constructor(config: Configuration);
971
+ /**
972
+ * Retrieve a property option by ID
973
+ */
974
+ retrieve(workspaceSlug: string, projectId: string, propertyId: string, optionId: string): Promise<WorkItemPropertyOption>;
975
+ /**
976
+ * List property options
977
+ */
978
+ list(workspaceSlug: string, projectId: string, propertyId: string, params?: ListWorkItemPropertyOptionsParams): Promise<WorkItemPropertyOption[]>;
979
+ /**
980
+ * Create a property option
981
+ */
982
+ create(workspaceSlug: string, projectId: string, propertyId: string, optionData: CreateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
983
+ /**
984
+ * Update a property option
985
+ */
986
+ update(workspaceSlug: string, projectId: string, propertyId: string, optionId: string, updateData: UpdateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
987
+ /**
988
+ * Delete a property option
989
+ */
990
+ delete(workspaceSlug: string, projectId: string, propertyId: string, optionId: string): Promise<void>;
991
+ }
992
+ /**
993
+ * WorkItemPropertyValues API resource
994
+ * Handles all work item property value operations
995
+ */
996
+ declare class Values extends BaseResource {
997
+ constructor(config: Configuration);
998
+ /**
999
+ * Retrieve a property value by ID
1000
+ */
1001
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string): Promise<WorkItemPropertyValues>;
1002
+ /**
1003
+ * List property values for a work item
1004
+ */
1005
+ list(workspaceSlug: string, projectId: string, workItemId: string, params?: ListWorkItemPropertyValuesParams): Promise<WorkItemPropertyValues>;
1006
+ /**
1007
+ * Create/update a property value
1008
+ *
1009
+ * For single-value properties:
1010
+ * - Acts as an upsert operation (create or update)
1011
+ * - Returns a single WorkItemPropertyValues
1012
+ *
1013
+ * For multi-value properties (is_multi=True):
1014
+ * - Replaces all existing values with the new ones (sync operation)
1015
+ * - Returns a list of values
1016
+ */
1017
+ create(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string, updateData: UpdateWorkItemPropertyValue): Promise<WorkItemPropertyValues>;
1018
+ /**
1019
+ * Update an existing property value(s) (partial update)
1020
+ *
1021
+ * For single-value properties:
1022
+ * - Updates the existing value
1023
+ * - Returns a single WorkItemPropertyValues
1024
+ *
1025
+ * For multi-value properties (is_multi=True):
1026
+ * - Replaces all existing values with the new ones (sync operation)
1027
+ * - Returns a list of values
1028
+ *
1029
+ * @throws {HttpError} If the property value does not exist (404)
1030
+ */
1031
+ update(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string, updateData: UpdateWorkItemPropertyValue): Promise<WorkItemPropertyValues>;
1032
+ /**
1033
+ * Delete the property value(s) for a work item
1034
+ *
1035
+ * For single-value properties:
1036
+ * - Deletes the single value
1037
+ *
1038
+ * For multi-value properties (is_multi=True):
1039
+ * - Deletes all values for that property
1040
+ *
1041
+ * @throws {HttpError} If the property value does not exist (404)
1042
+ */
1043
+ delete(workspaceSlug: string, projectId: string, workItemId: string, propertyId: string): Promise<void>;
1044
+ }
1045
+ /**
1046
+ * WorkItemProperties API resource
1047
+ * Handles all work item property related operations
1048
+ */
1049
+ export declare class WorkItemProperties extends BaseResource {
1050
+ options: Options;
1051
+ values: Values;
1052
+ constructor(config: Configuration);
1053
+ /**
1054
+ * Create a new work item property
1055
+ */
1056
+ create(workspaceSlug: string, projectId: string, workItemTypeId: string, createWorkItemProperty: CreateWorkItemProperty): Promise<WorkItemProperty>;
1057
+ /**
1058
+ * Retrieve a work item property by ID
1059
+ */
1060
+ retrieve(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string): Promise<WorkItemProperty>;
1061
+ /**
1062
+ * Update a work item property
1063
+ */
1064
+ update(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string, updateWorkItemProperty: UpdateWorkItemProperty): Promise<WorkItemProperty>;
1065
+ /**
1066
+ * Delete a work item property
1067
+ */
1068
+ delete(workspaceSlug: string, projectId: string, workItemTypeId: string, workItemPropertyId: string): Promise<void>;
1069
+ /**
1070
+ * List work item properties with optional filtering
1071
+ */
1072
+ list(workspaceSlug: string, projectId: string, workItemTypeId: string, params?: ListWorkItemPropertiesParams): Promise<WorkItemProperty[]>;
1073
+ }
1074
+ /**
1075
+ * Customer model interfaces
1076
+ * TODO: Replace with proper types after API verification
1077
+ */
1078
+ export interface Customer extends BaseModel {
1079
+ name: string;
1080
+ email?: string;
1081
+ workspace: string;
1082
+ created_by: string;
1083
+ updated_by?: string;
1084
+ [key: string]: any;
1085
+ }
1086
+ export type CreateCustomer = Partial<Customer>;
1087
+ export type UpdateCustomer = Partial<Customer>;
1088
+ export interface ListCustomersParams {
1089
+ workspace?: string;
1090
+ limit?: number;
1091
+ offset?: number;
1092
+ }
1093
+ /**
1094
+ * Customer Property Value model interfaces
1095
+ * TODO: Replace with proper types after API verification
1096
+ */
1097
+ export interface CustomerPropertyValue extends BaseModel {
1098
+ value: any;
1099
+ property: string;
1100
+ customer: string;
1101
+ workspace: string;
1102
+ [key: string]: any;
1103
+ }
1104
+ export interface CustomPropertyValueResponse {
1105
+ [propertyId: string]: any[];
1106
+ }
1107
+ export type UpdateCustomerPropertyValue = {
1108
+ values: any[];
1109
+ };
1110
+ export interface ListCustomerPropertyValuesParams {
1111
+ customer?: string;
1112
+ property?: string;
1113
+ workspace?: string;
1114
+ limit?: number;
1115
+ offset?: number;
1116
+ }
1117
+ /**
1118
+ * Customer Request model interfaces
1119
+ * TODO: Replace with proper types after API verification
1120
+ */
1121
+ export interface CustomerRequest extends BaseModel {
1122
+ title: string;
1123
+ description?: string;
1124
+ customer: string;
1125
+ workspace: string;
1126
+ created_by: string;
1127
+ updated_by?: string;
1128
+ [key: string]: any;
1129
+ }
1130
+ export type CreateCustomerRequest = Partial<CustomerRequest>;
1131
+ export type UpdateCustomerRequest = Partial<CustomerRequest>;
1132
+ export interface ListCustomerRequestsParams {
1133
+ customer?: string;
1134
+ workspace?: string;
1135
+ limit?: number;
1136
+ offset?: number;
1137
+ }
1138
+ export interface ListCustomerPropertiesParams {
1139
+ workspace?: string;
1140
+ limit?: number;
1141
+ offset?: number;
1142
+ }
1143
+ export interface CustomerProperty extends BaseModel {
1144
+ name?: string;
1145
+ display_name: string;
1146
+ description?: string;
1147
+ logo_props?: any;
1148
+ sort_order?: number;
1149
+ property_type: PropertyType;
1150
+ relation_type?: PropertyRelationType;
1151
+ is_required?: boolean;
1152
+ default_value?: string[];
1153
+ settings?: any;
1154
+ is_active?: boolean;
1155
+ is_multi?: boolean;
1156
+ validation_rules?: any;
1157
+ workspace?: string;
1158
+ }
1159
+ export interface CreateCustomerPropertyRequest {
1160
+ name?: string;
1161
+ display_name?: string;
1162
+ description?: string;
1163
+ logo_props?: any;
1164
+ sort_order?: number;
1165
+ property_type?: PropertyType;
1166
+ relation_type?: PropertyRelationType;
1167
+ is_required?: boolean;
1168
+ default_value?: string[];
1169
+ settings?: any;
1170
+ is_active?: boolean;
1171
+ is_multi?: boolean;
1172
+ validation_rules?: any;
1173
+ external_source?: string;
1174
+ external_id?: string;
1175
+ created_by?: string;
1176
+ updated_by?: string;
1177
+ }
1178
+ export interface UpdateCustomerPropertyRequest {
1179
+ name?: string;
1180
+ display_name?: string;
1181
+ description?: string;
1182
+ logo_props?: any;
1183
+ sort_order?: number;
1184
+ property_type?: PropertyType;
1185
+ relation_type?: PropertyRelationType;
1186
+ is_required?: boolean;
1187
+ default_value?: string[];
1188
+ settings?: any;
1189
+ is_active?: boolean;
1190
+ is_multi?: boolean;
1191
+ validation_rules?: any;
1192
+ external_source?: string;
1193
+ external_id?: string;
1194
+ created_by?: string;
1195
+ updated_by?: string;
1196
+ }
1197
+ export interface LinkIssuesToCustomerResponse {
1198
+ message: string;
1199
+ linked_issues: LinkedIssue[];
1200
+ }
1201
+ export interface LinkedIssue {
1202
+ id: string;
1203
+ name: string;
1204
+ sequence_id: number;
1205
+ project_id: string;
1206
+ project__identifier: string;
1207
+ }
1208
+ /**
1209
+ * Customer Properties API resource
1210
+ * Handles customer property definitions and property value operations
1211
+ */
1212
+ declare class Properties extends BaseResource {
1213
+ constructor(config: Configuration);
1214
+ /**
1215
+ * List customer properties
1216
+ */
1217
+ listPropertyDefinitions(workspaceSlug: string, params?: ListCustomerPropertiesParams): Promise<PaginatedResponse<CustomerProperty>>;
1218
+ /**
1219
+ * Create customer property
1220
+ */
1221
+ createPropertyDefinition(workspaceSlug: string, createProperty: CreateCustomerPropertyRequest): Promise<CustomerProperty>;
1222
+ /**
1223
+ * Retrieve customer property
1224
+ */
1225
+ retrievePropertyDefinition(workspaceSlug: string, propertyId: string): Promise<CustomerProperty>;
1226
+ /**
1227
+ * Update customer property
1228
+ */
1229
+ updatePropertyDefinition(workspaceSlug: string, propertyId: string, updateProperty: UpdateCustomerPropertyRequest): Promise<CustomerProperty>;
1230
+ /**
1231
+ * Delete customer property
1232
+ */
1233
+ deletePropertyDefinition(workspaceSlug: string, propertyId: string): Promise<void>;
1234
+ /**
1235
+ * Get customer property values
1236
+ */
1237
+ listValues(workspaceSlug: string, customerId: string, params?: ListCustomerPropertyValuesParams): Promise<CustomPropertyValueResponse>;
1238
+ /**
1239
+ * Get single property value
1240
+ */
1241
+ retrieveValue(workspaceSlug: string, customerId: string, propertyId: string): Promise<CustomerPropertyValue>;
1242
+ /**
1243
+ * Update single property value
1244
+ */
1245
+ updateValue(workspaceSlug: string, customerId: string, propertyId: string, updatePropertyValue: UpdateCustomerPropertyValue): Promise<CustomerPropertyValue>;
1246
+ }
1247
+ /**
1248
+ * Customer Requests API resource
1249
+ * Handles customer request operations
1250
+ */
1251
+ declare class Requests extends BaseResource {
1252
+ constructor(config: Configuration);
1253
+ /**
1254
+ * List customer requests
1255
+ */
1256
+ list(workspaceSlug: string, customerId: string, params?: ListCustomerRequestsParams): Promise<PaginatedResponse<CustomerRequest>>;
1257
+ /**
1258
+ * Create customer request
1259
+ */
1260
+ create(workspaceSlug: string, customerId: string, createRequest: CreateCustomerRequest): Promise<CustomerRequest>;
1261
+ /**
1262
+ * Retrieve customer request
1263
+ */
1264
+ retrieve(workspaceSlug: string, customerId: string, requestId: string): Promise<CustomerRequest>;
1265
+ /**
1266
+ * Update customer request
1267
+ */
1268
+ update(workspaceSlug: string, customerId: string, requestId: string, updateRequest: UpdateCustomerRequest): Promise<CustomerRequest>;
1269
+ /**
1270
+ * Delete customer request
1271
+ */
1272
+ delete(workspaceSlug: string, customerId: string, requestId: string): Promise<void>;
1273
+ }
1274
+ /**
1275
+ * Customers API resource
1276
+ * Handles basic customer operations
1277
+ * Note: Based on the API documentation, this handles customer-level operations
1278
+ */
1279
+ export declare class Customers extends BaseResource {
1280
+ properties: Properties;
1281
+ requests: Requests;
1282
+ constructor(config: Configuration);
1283
+ /**
1284
+ * Create a new customer
1285
+ */
1286
+ create(workspaceSlug: string, createCustomer: CreateCustomer): Promise<Customer>;
1287
+ /**
1288
+ * Retrieve a customer by ID
1289
+ */
1290
+ retrieve(workspaceSlug: string, customerId: string): Promise<Customer>;
1291
+ /**
1292
+ * Update a customer
1293
+ */
1294
+ update(workspaceSlug: string, customerId: string, updateCustomer: UpdateCustomer): Promise<Customer>;
1295
+ /**
1296
+ * Delete a customer
1297
+ */
1298
+ delete(workspaceSlug: string, customerId: string): Promise<void>;
1299
+ /**
1300
+ * List customers with optional filtering
1301
+ */
1302
+ list(workspaceSlug: string, params?: ListCustomersParams): Promise<PaginatedResponse<Customer>>;
1303
+ /**
1304
+ * List customer issues
1305
+ */
1306
+ listCustomerIssues(workspaceSlug: string, customerId: string): Promise<any[]>;
1307
+ /**
1308
+ * Link issues to customer
1309
+ */
1310
+ linkIssuesToCustomer(workspaceSlug: string, customerId: string, issueIds: string[]): Promise<LinkIssuesToCustomerResponse>;
1311
+ /**
1312
+ * Unlink issue from customer
1313
+ */
1314
+ unlinkIssueFromCustomer(workspaceSlug: string, customerId: string, issueId: string): Promise<void>;
1315
+ }
1316
+ /**
1317
+ * Page model interfaces
1318
+ * TODO: Replace with proper types after API verification
1319
+ */
1320
+ export interface Page extends BaseModel {
1321
+ name: string;
1322
+ description_html?: string;
1323
+ description_binary?: string;
1324
+ description?: string;
1325
+ description_stripped?: string;
1326
+ created_by: string;
1327
+ updated_by?: string;
1328
+ [key: string]: any;
1329
+ }
1330
+ export type CreatePage = Partial<Page>;
1331
+ /**
1332
+ * Pages API resource
1333
+ * Handles both workspace and project page operations
1334
+ */
1335
+ export declare class Pages extends BaseResource {
1336
+ constructor(config: Configuration);
1337
+ /**
1338
+ * Create a workspace page
1339
+ */
1340
+ createWorkspacePage(workspaceSlug: string, createPage: CreatePage): Promise<Page>;
1341
+ /**
1342
+ * Get a workspace page by ID
1343
+ */
1344
+ getWorkspacePage(workspaceSlug: string, pageId: string): Promise<Page>;
1345
+ /**
1346
+ * Create a project page
1347
+ */
1348
+ createProjectPage(workspaceSlug: string, projectId: string, createPage: CreatePage): Promise<Page>;
1349
+ /**
1350
+ * Get a project page by ID
1351
+ */
1352
+ getProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<Page>;
1353
+ /**
1354
+ * Retrieve workspace page
1355
+ */
1356
+ retrieveWorkspacePage(workspaceSlug: string, pageId: string): Promise<Page>;
1357
+ /**
1358
+ * Retrieve project page
1359
+ */
1360
+ retrieveProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<Page>;
1361
+ }
1362
+ interface Label$1 {
1363
+ id: string;
1364
+ name: string;
1365
+ color?: string;
1366
+ description?: string;
1367
+ project: string;
1368
+ created_at: string;
1369
+ updated_at: string;
1370
+ }
1371
+ export interface CreateLabel {
1372
+ name: string;
1373
+ color?: string;
1374
+ description?: string;
1375
+ }
1376
+ export interface UpdateLabel {
1377
+ name?: string;
1378
+ color?: string;
1379
+ description?: string;
1380
+ }
1381
+ export interface ListLabelsParams {
1382
+ project?: string;
1383
+ limit?: number;
1384
+ offset?: number;
1385
+ }
1386
+ /**
1387
+ * Labels API resource
1388
+ * Handles all label related operations
1389
+ */
1390
+ export declare class Labels extends BaseResource {
1391
+ constructor(config: Configuration);
1392
+ /**
1393
+ * Create a new label
1394
+ */
1395
+ create(workspaceSlug: string, projectId: string, createLabel: CreateLabel): Promise<Label$1>;
1396
+ /**
1397
+ * Retrieve a label by ID
1398
+ */
1399
+ retrieve(workspaceSlug: string, projectId: string, labelId: string): Promise<Label$1>;
1400
+ /**
1401
+ * Update a label
1402
+ */
1403
+ update(workspaceSlug: string, projectId: string, labelId: string, updateLabel: UpdateLabel): Promise<Label$1>;
1404
+ /**
1405
+ * Delete a label
1406
+ */
1407
+ delete(workspaceSlug: string, projectId: string, labelId: string): Promise<void>;
1408
+ /**
1409
+ * List labels with optional filtering
1410
+ */
1411
+ list(workspaceSlug: string, projectId: string, params?: ListLabelsParams): Promise<PaginatedResponse<Label$1>>;
1412
+ }
1413
+ /**
1414
+ * States API resource
1415
+ * Handles all state related operations
1416
+ */
1417
+ export declare class States extends BaseResource {
1418
+ constructor(config: Configuration);
1419
+ /**
1420
+ * Create a new state
1421
+ */
1422
+ create(workspaceSlug: string, projectId: string, createState: CreateState): Promise<State>;
1423
+ /**
1424
+ * Retrieve a state by ID
1425
+ */
1426
+ retrieve(workspaceSlug: string, projectId: string, stateId: string): Promise<State>;
1427
+ /**
1428
+ * Update a state
1429
+ */
1430
+ update(workspaceSlug: string, projectId: string, stateId: string, updateState: UpdateState): Promise<State>;
1431
+ /**
1432
+ * Delete a state
1433
+ */
1434
+ delete(workspaceSlug: string, projectId: string, stateId: string): Promise<void>;
1435
+ /**
1436
+ * List states with optional filtering
1437
+ */
1438
+ list(workspaceSlug: string, projectId: string, params?: ListStatesParams): Promise<PaginatedResponse<State>>;
1439
+ }
1440
+ /**
1441
+ * Member model interfaces
1442
+ */
1443
+ export interface Member {
1444
+ id: string;
1445
+ user: string;
1446
+ project: string;
1447
+ role: string;
1448
+ created_at: string;
1449
+ updated_at: string;
1450
+ }
1451
+ export interface CreateMember {
1452
+ user: string;
1453
+ project: string;
1454
+ role: string;
1455
+ }
1456
+ export interface UpdateMember {
1457
+ role?: string;
1458
+ }
1459
+ export interface ListMembersParams {
1460
+ project?: string;
1461
+ user?: string;
1462
+ role?: string;
1463
+ limit?: number;
1464
+ offset?: number;
1465
+ }
1466
+ /**
1467
+ * Members API resource
1468
+ * Handles all team membership related operations
1469
+ */
1470
+ export declare class Members extends BaseResource {
1471
+ constructor(config: Configuration);
1472
+ /**
1473
+ * Create a new member
1474
+ */
1475
+ create(createMember: CreateMember): Promise<Member>;
1476
+ /**
1477
+ * Retrieve a member by ID
1478
+ */
1479
+ retrieve(memberId: string): Promise<Member>;
1480
+ /**
1481
+ * Update a member
1482
+ */
1483
+ update(memberId: string, updateMember: UpdateMember): Promise<Member>;
1484
+ /**
1485
+ * Delete a member
1486
+ */
1487
+ delete(memberId: string): Promise<void>;
1488
+ /**
1489
+ * List members with optional filtering
1490
+ */
1491
+ list(params?: ListMembersParams): Promise<Member[]>;
1492
+ }
1493
+ /**
1494
+ * Modules API resource
1495
+ * Handles all module related operations
1496
+ */
1497
+ export declare class Modules extends BaseResource {
1498
+ constructor(config: Configuration);
1499
+ /**
1500
+ * Create a new module
1501
+ */
1502
+ create(workspaceSlug: string, projectId: string, createModule: CreateModuleRequest): Promise<Module>;
1503
+ /**
1504
+ * Retrieve a module by ID
1505
+ */
1506
+ retrieve(workspaceSlug: string, projectId: string, moduleId: string): Promise<Module>;
1507
+ /**
1508
+ * Update a module
1509
+ */
1510
+ update(workspaceSlug: string, projectId: string, moduleId: string, updateModule: UpdateModuleRequest): Promise<Module>;
1511
+ /**
1512
+ * Delete a module
1513
+ */
1514
+ delete(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
1515
+ /**
1516
+ * List modules with optional filtering
1517
+ */
1518
+ list(workspaceSlug: string, projectId: string, params?: ListModulesParamsRequest): Promise<PaginatedResponse<Module>>;
1519
+ /**
1520
+ * List work items in module
1521
+ */
1522
+ listWorkItemsInModule(workspaceSlug: string, projectId: string, moduleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
1523
+ /**
1524
+ * Add work items to module
1525
+ */
1526
+ addWorkItemsToModule(workspaceSlug: string, projectId: string, moduleId: string, workItemIds: string[]): Promise<void>;
1527
+ /**
1528
+ * Delete work item from module
1529
+ */
1530
+ removeWorkItemFromModule(workspaceSlug: string, projectId: string, moduleId: string, workItemId: string): Promise<void>;
1531
+ /**
1532
+ * List archived modules
1533
+ */
1534
+ listArchivedModules(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Module>>;
1535
+ /**
1536
+ * Archive a module
1537
+ */
1538
+ archiveModule(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
1539
+ /**
1540
+ * Unarchive a module
1541
+ */
1542
+ unArchiveModule(workspaceSlug: string, projectId: string, moduleId: string): Promise<void>;
1543
+ }
1544
+ export interface TransferCycleWorkItemRequest {
1545
+ new_cycle_id: string;
1546
+ }
1547
+ export interface CycleWorkItem {
1548
+ id?: string;
1549
+ sub_issues_count?: number;
1550
+ created_at?: string;
1551
+ updated_at?: string;
1552
+ deleted_at: string;
1553
+ created_by?: string;
1554
+ updated_by?: string;
1555
+ project?: string;
1556
+ workspace?: string;
1557
+ issue: string;
1558
+ cycle?: string;
1559
+ }
1560
+ export interface Cycle extends BaseModel {
1561
+ name: string;
1562
+ description?: string;
1563
+ start_date?: string;
1564
+ end_date?: string;
1565
+ view_props?: any;
1566
+ sort_order?: number;
1567
+ progress_snapshot?: any;
1568
+ archived_at?: string;
1569
+ logo_props?: any;
1570
+ timezone?: TimezoneEnum;
1571
+ version?: number;
1572
+ project: string;
1573
+ workspace: string;
1574
+ owned_by: string;
1575
+ }
1576
+ export interface CreateCycleRequest {
1577
+ name: string;
1578
+ description?: string;
1579
+ start_date?: string;
1580
+ end_date?: string;
1581
+ owned_by: string;
1582
+ external_source?: string;
1583
+ external_id?: string;
1584
+ timezone?: TimezoneEnum;
1585
+ project_id: string;
1586
+ }
1587
+ export interface UpdateCycleRequest {
1588
+ name?: string;
1589
+ description?: string;
1590
+ start_date?: string;
1591
+ end_date?: string;
1592
+ owned_by?: string;
1593
+ external_source?: string;
1594
+ external_id?: string;
1595
+ timezone?: TimezoneEnum;
1596
+ }
1597
+ export interface AddWorkItemsToCycleRequest {
1598
+ issues: string[];
1599
+ }
1600
+ export interface RemoveCycleIssuesRequestRequest {
1601
+ issues: string[];
1602
+ }
1603
+ export interface TransferCycleIssueRequestRequest {
1604
+ new_cycle_id: string;
1605
+ }
1606
+ /**
1607
+ * Cycles API resource
1608
+ * Handles all cycle (sprint) related operations
1609
+ */
1610
+ export declare class Cycles extends BaseResource {
1611
+ constructor(config: Configuration);
1612
+ /**
1613
+ * Create a new cycle
1614
+ */
1615
+ create(workspaceSlug: string, projectId: string, createCycle: CreateCycleRequest): Promise<Cycle>;
1616
+ /**
1617
+ * Retrieve a cycle by ID
1618
+ */
1619
+ retrieve(workspaceSlug: string, projectId: string, cycleId: string): Promise<Cycle>;
1620
+ /**
1621
+ * Update a cycle
1622
+ */
1623
+ update(workspaceSlug: string, projectId: string, cycleId: string, updateCycle: UpdateCycleRequest): Promise<Cycle>;
1624
+ /**
1625
+ * Delete a cycle
1626
+ */
1627
+ delete(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
1628
+ /**
1629
+ * List cycles with optional filtering
1630
+ */
1631
+ list(workspaceSlug: string, projectId: string): Promise<PaginatedResponse<Cycle>>;
1632
+ /**
1633
+ * List archived cycles
1634
+ */
1635
+ listArchived(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Cycle>>;
1636
+ /**
1637
+ * Unarchive a cycle
1638
+ */
1639
+ unArchive(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
1640
+ /**
1641
+ * Archive a cycle
1642
+ */
1643
+ archive(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
1644
+ /**
1645
+ * List work items in cycle
1646
+ */
1647
+ listWorkItemsInCycle(workspaceSlug: string, projectId: string, cycleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
1648
+ /**
1649
+ * Add work items to cycle
1650
+ */
1651
+ addWorkItemsToCycle(workspaceSlug: string, projectId: string, cycleId: string, workItemIds: string[]): Promise<void>;
1652
+ /**
1653
+ * Remove work item from cycle
1654
+ */
1655
+ removeWorkItemFromCycle(workspaceSlug: string, projectId: string, cycleId: string, workItemId: string): Promise<void>;
1656
+ /**
1657
+ * Transfer work items to another cycle
1658
+ */
1659
+ transferWorkItemsToAnotherCycle(workspaceSlug: string, projectId: string, cycleId: string, transferData: TransferCycleWorkItemRequest): Promise<void>;
1660
+ }
1661
+ /**
1662
+ * User API resource
1663
+ * Handles all user-related operations
1664
+ */
1665
+ export declare class Users extends BaseResource {
1666
+ constructor(config: Configuration);
1667
+ /**
1668
+ * Get current user information
1669
+ */
1670
+ me(): Promise<User>;
1671
+ }
1672
+ /**
1673
+ * Workspace Features model interfaces
1674
+ */
1675
+ export interface WorkspaceFeatures {
1676
+ project_grouping: boolean;
1677
+ initiatives: boolean;
1678
+ teams: boolean;
1679
+ customers: boolean;
1680
+ wiki: boolean;
1681
+ pi: boolean;
1682
+ }
1683
+ export type UpdateWorkspaceFeatures = Partial<WorkspaceFeatures>;
1684
+ /**
1685
+ * Workspace API resource
1686
+ * Handles all workspace-related operations
1687
+ */
1688
+ export declare class Workspace extends BaseResource {
1689
+ constructor(config: Configuration);
1690
+ /**
1691
+ * Get workspace members
1692
+ */
1693
+ getMembers(workspaceSlug: string): Promise<User[]>;
1694
+ /**
1695
+ * Retrieve workspace features
1696
+ */
1697
+ retrieveFeatures(workspaceSlug: string): Promise<WorkspaceFeatures>;
1698
+ /**
1699
+ * Update workspace features
1700
+ */
1701
+ updateFeatures(workspaceSlug: string, updateFeatures: UpdateWorkspaceFeatures): Promise<WorkspaceFeatures>;
1702
+ }
1703
+ export interface Epic {
1704
+ id?: string;
1705
+ deleted_at?: string;
1706
+ created_at?: string;
1707
+ updated_at?: string;
1708
+ point?: number;
1709
+ name: string;
1710
+ description?: any;
1711
+ description_html?: string;
1712
+ description_stripped?: string;
1713
+ description_binary?: string;
1714
+ priority?: PriorityEnum;
1715
+ start_date?: string;
1716
+ target_date?: string;
1717
+ sequence_id?: number;
1718
+ sort_order?: number;
1719
+ completed_at?: string;
1720
+ archived_at?: string;
1721
+ is_draft?: boolean;
1722
+ external_source?: string;
1723
+ external_id?: string;
1724
+ created_by?: string;
1725
+ updated_by?: string;
1726
+ project: string;
1727
+ workspace: string;
1728
+ parent?: string;
1729
+ state?: string;
1730
+ estimate_point?: string;
1731
+ type?: string;
1732
+ assignees?: string[];
1733
+ labels?: string[];
1734
+ }
1735
+ /**
1736
+ * Epics API resource
1737
+ * Handles all epic-related operations
1738
+ */
1739
+ export declare class Epics extends BaseResource {
1740
+ constructor(config: Configuration);
1741
+ /**
1742
+ * Retrieve an epic by ID
1743
+ */
1744
+ retrieve(workspaceSlug: string, projectId: string, epicId: string): Promise<Epic>;
1745
+ /**
1746
+ * List epics with optional filtering
1747
+ */
1748
+ list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Epic>>;
1749
+ }
1750
+ export interface IntakeWorkItem {
1751
+ id: string;
1752
+ issue_detail?: WorkItem;
1753
+ inbox?: string;
1754
+ created_at?: string;
1755
+ updated_at?: string;
1756
+ deleted_at?: string;
1757
+ status?: IntakeWorkItemStatusEnum;
1758
+ snoozed_till?: string;
1759
+ source?: string;
1760
+ source_email?: string;
1761
+ external_source?: string;
1762
+ external_id?: string;
1763
+ extra?: any;
1764
+ created_by?: string;
1765
+ updated_by?: string;
1766
+ project?: string;
1767
+ workspace?: string;
1768
+ intake: string;
1769
+ issue?: string;
1770
+ duplicate_to?: string;
1771
+ }
1772
+ export interface IntakeWorkItemCreateRequest {
1773
+ issue: WorkItemForIntakeRequest;
1774
+ intake?: string;
1775
+ status?: IntakeWorkItemStatusEnum;
1776
+ snoozed_till?: string;
1777
+ duplicate_to?: string;
1778
+ source?: string;
1779
+ source_email?: string;
1780
+ }
1781
+ export type IntakeWorkItemStatusEnum = number;
1782
+ export interface WorkItemForIntakeRequest {
1783
+ name: string;
1784
+ description_html?: string;
1785
+ priority?: PriorityEnum;
1786
+ }
1787
+ export interface UpdateIntakeWorkItemRequest {
1788
+ status?: IntakeWorkItemStatusEnum;
1789
+ snoozed_till?: string;
1790
+ duplicate_to?: string;
1791
+ source?: string;
1792
+ source_email?: string;
1793
+ issue?: WorkItemForIntakeRequest;
1794
+ }
1795
+ /**
1796
+ * Intake API resource
1797
+ * Handles all intake issue operations
1798
+ */
1799
+ export declare class Intake extends BaseResource {
1800
+ constructor(config: Configuration);
1801
+ /**
1802
+ * Retrieve an intake issue by ID
1803
+ */
1804
+ retrieve(workspaceSlug: string, projectId: string, intakeId: string): Promise<IntakeWorkItem>;
1805
+ /**
1806
+ * List intake issues
1807
+ */
1808
+ list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<IntakeWorkItem>>;
1809
+ /**
1810
+ * Create an intake issue
1811
+ */
1812
+ create(workspaceSlug: string, projectId: string, intakeData: IntakeWorkItemCreateRequest): Promise<IntakeWorkItem>;
1813
+ /**
1814
+ * Update an intake issue
1815
+ */
1816
+ update(workspaceSlug: string, projectId: string, intakeId: string, updateData: UpdateIntakeWorkItemRequest): Promise<IntakeWorkItem>;
1817
+ /**
1818
+ * Delete an intake issue
1819
+ */
1820
+ delete(workspaceSlug: string, projectId: string, intakeId: string): Promise<void>;
1821
+ }
1822
+ /**
1823
+ * Sticky model interfaces
1824
+ */
1825
+ export interface Sticky extends BaseModel {
1826
+ name?: string;
1827
+ description?: Record<string, any>;
1828
+ description_html?: string;
1829
+ description_stripped?: string;
1830
+ description_binary?: string;
1831
+ logo_props?: LogoProps;
1832
+ color?: string;
1833
+ background_color?: string;
1834
+ workspace: string;
1835
+ owner: string;
1836
+ sort_order: number;
1837
+ }
1838
+ 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">;
1839
+ export type UpdateSticky = Partial<CreateSticky>;
1840
+ export interface ListStickiesParams {
1841
+ limit?: number;
1842
+ offset?: number;
1843
+ [key: string]: any;
1844
+ }
1845
+ /**
1846
+ * Sticky API resource
1847
+ * Handles all sticky related operations
1848
+ */
1849
+ export declare class Stickies extends BaseResource {
1850
+ constructor(config: Configuration);
1851
+ /**
1852
+ * Create a new sticky
1853
+ */
1854
+ create(workspaceSlug: string, createSticky: CreateSticky): Promise<Sticky>;
1855
+ /**
1856
+ * Retrieve a sticky by ID
1857
+ */
1858
+ retrieve(workspaceSlug: string, stickyId: string): Promise<Sticky>;
1859
+ /**
1860
+ * Update a sticky
1861
+ */
1862
+ update(workspaceSlug: string, stickyId: string, updateSticky: UpdateSticky): Promise<Sticky>;
1863
+ /**
1864
+ * Delete a sticky
1865
+ */
1866
+ delete(workspaceSlug: string, stickyId: string): Promise<void>;
1867
+ /**
1868
+ * List stickies with optional filtering
1869
+ */
1870
+ list(workspaceSlug: string, params?: ListStickiesParams): Promise<PaginatedResponse<Sticky>>;
1871
+ }
1872
+ /**
1873
+ * Teamspace model interfaces
1874
+ */
1875
+ export interface Teamspace extends BaseModel {
1876
+ name: string;
1877
+ description_json?: Record<string, any>;
1878
+ description_html?: string;
1879
+ description_stripped?: string;
1880
+ description_binary?: string;
1881
+ logo_props?: LogoProps;
1882
+ lead?: string;
1883
+ workspace: string;
1884
+ }
1885
+ export type CreateTeamspace = Omit<Teamspace, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
1886
+ export type UpdateTeamspace = Partial<CreateTeamspace>;
1887
+ export interface ListTeamspacesParams {
1888
+ limit?: number;
1889
+ offset?: number;
1890
+ [key: string]: any;
1891
+ }
1892
+ export interface AddTeamspaceProjectsRequest {
1893
+ project_ids: string[];
1894
+ }
1895
+ export interface RemoveTeamspaceProjectsRequest {
1896
+ project_ids: string[];
1897
+ }
1898
+ export interface AddTeamspaceMembersRequest {
1899
+ member_ids: string[];
1900
+ }
1901
+ export interface RemoveTeamspaceMembersRequest {
1902
+ member_ids: string[];
1903
+ }
1904
+ /**
1905
+ * Teamspace Projects API resource
1906
+ * Handles teamspace project relationships
1907
+ */
1908
+ declare class Projects$1 extends BaseResource {
1909
+ constructor(config: Configuration);
1910
+ /**
1911
+ * Get projects associated with a teamspace
1912
+ */
1913
+ list(workspaceSlug: string, teamspaceId: string, params?: {
1914
+ limit?: number;
1915
+ offset?: number;
1916
+ }): Promise<PaginatedResponse<Project>>;
1917
+ /**
1918
+ * Add projects to a teamspace
1919
+ */
1920
+ add(workspaceSlug: string, teamspaceId: string, addProjects: AddTeamspaceProjectsRequest): Promise<Project[]>;
1921
+ /**
1922
+ * Remove projects from a teamspace
1923
+ */
1924
+ remove(workspaceSlug: string, teamspaceId: string, removeProjects: RemoveTeamspaceProjectsRequest): Promise<void>;
1925
+ }
1926
+ /**
1927
+ * Teamspace Members API resource
1928
+ * Handles teamspace member relationships
1929
+ */
1930
+ declare class Members$1 extends BaseResource {
1931
+ constructor(config: Configuration);
1932
+ /**
1933
+ * Get members associated with a teamspace
1934
+ */
1935
+ list(workspaceSlug: string, teamspaceId: string, params?: {
1936
+ limit?: number;
1937
+ offset?: number;
1938
+ }): Promise<PaginatedResponse<User>>;
1939
+ /**
1940
+ * Add members to a teamspace
1941
+ */
1942
+ add(workspaceSlug: string, teamspaceId: string, addMembers: AddTeamspaceMembersRequest): Promise<User[]>;
1943
+ /**
1944
+ * Remove members from a teamspace
1945
+ */
1946
+ remove(workspaceSlug: string, teamspaceId: string, removeMembers: RemoveTeamspaceMembersRequest): Promise<void>;
1947
+ }
1948
+ /**
1949
+ * Teamspaces API resource
1950
+ * Handles all teamspace-related operations
1951
+ */
1952
+ export declare class Teamspaces extends BaseResource {
1953
+ projects: Projects$1;
1954
+ members: Members$1;
1955
+ constructor(config: Configuration);
1956
+ /**
1957
+ * Create a new teamspace
1958
+ */
1959
+ create(workspaceSlug: string, createTeamspace: CreateTeamspace): Promise<Teamspace>;
1960
+ /**
1961
+ * Retrieve a teamspace by ID
1962
+ */
1963
+ retrieve(workspaceSlug: string, teamspaceId: string): Promise<Teamspace>;
1964
+ /**
1965
+ * Update a teamspace
1966
+ */
1967
+ update(workspaceSlug: string, teamspaceId: string, updateTeamspace: UpdateTeamspace): Promise<Teamspace>;
1968
+ /**
1969
+ * Delete a teamspace
1970
+ */
1971
+ delete(workspaceSlug: string, teamspaceId: string): Promise<void>;
1972
+ /**
1973
+ * List teamspaces with optional filtering
1974
+ */
1975
+ list(workspaceSlug: string, params?: ListTeamspacesParams): Promise<PaginatedResponse<Teamspace>>;
1976
+ }
1977
+ export declare enum InitiativeState {
1978
+ DRAFT = "DRAFT",
1979
+ PLANNED = "PLANNED",
1980
+ ACTIVE = "ACTIVE",
1981
+ COMPLETED = "COMPLETED",
1982
+ CLOSED = "CLOSED"
1983
+ }
1984
+ /**
1985
+ * Initiative model interfaces
1986
+ */
1987
+ export interface Initiative extends BaseModel {
1988
+ name: string;
1989
+ description?: string;
1990
+ description_html?: string;
1991
+ description_stripped?: string;
1992
+ description_binary?: string;
1993
+ lead?: string;
1994
+ start_date?: string;
1995
+ end_date?: string;
1996
+ logo_props?: LogoProps;
1997
+ state?: InitiativeState;
1998
+ workspace: string;
1999
+ }
2000
+ export type CreateInitiative = Omit<Initiative, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
2001
+ export type UpdateInitiative = Partial<CreateInitiative>;
2002
+ export interface ListInitiativesParams {
2003
+ limit?: number;
2004
+ offset?: number;
2005
+ [key: string]: any;
2006
+ }
2007
+ export interface AddInitiativeLabelsRequest {
2008
+ label_ids: string[];
2009
+ }
2010
+ export interface RemoveInitiativeLabelsRequest {
2011
+ label_ids: string[];
2012
+ }
2013
+ export interface AddInitiativeProjectsRequest {
2014
+ project_ids: string[];
2015
+ }
2016
+ export interface RemoveInitiativeProjectsRequest {
2017
+ project_ids: string[];
2018
+ }
2019
+ export interface AddInitiativeEpicsRequest {
2020
+ epic_ids: string[];
2021
+ }
2022
+ export interface RemoveInitiativeEpicsRequest {
2023
+ epic_ids: string[];
2024
+ }
2025
+ /**
2026
+ * InitiativeLabel model interfaces
2027
+ */
2028
+ export interface InitiativeLabel extends BaseModel {
2029
+ name: string;
2030
+ description?: string;
2031
+ color?: string;
2032
+ sort_order: number;
2033
+ workspace: string;
2034
+ }
2035
+ export type CreateInitiativeLabel = Omit<InitiativeLabel, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace"> & {
2036
+ sort_order?: number;
2037
+ };
2038
+ export type UpdateInitiativeLabel = Partial<CreateInitiativeLabel>;
2039
+ export interface ListInitiativeLabelsParams {
2040
+ limit?: number;
2041
+ offset?: number;
2042
+ [key: string]: any;
2043
+ }
2044
+ /**
2045
+ * Initiative Labels API resource
2046
+ * Handles initiative label relationships
2047
+ */
2048
+ declare class Labels$1 extends BaseResource {
2049
+ constructor(config: Configuration);
2050
+ /**
2051
+ * Create a new initiative label
2052
+ */
2053
+ create(workspaceSlug: string, createInitiativeLabel: CreateInitiativeLabel): Promise<InitiativeLabel>;
2054
+ /**
2055
+ * Retrieve an initiative label by ID
2056
+ */
2057
+ retrieve(workspaceSlug: string, initiativeLabelId: string): Promise<InitiativeLabel>;
2058
+ /**
2059
+ * Update an initiative label
2060
+ */
2061
+ update(workspaceSlug: string, initiativeLabelId: string, updateInitiativeLabel: UpdateInitiativeLabel): Promise<InitiativeLabel>;
2062
+ /**
2063
+ * Delete an initiative label
2064
+ */
2065
+ delete(workspaceSlug: string, initiativeLabelId: string): Promise<void>;
2066
+ /**
2067
+ * List initiative labels with optional filtering
2068
+ */
2069
+ list(workspaceSlug: string, params?: ListInitiativeLabelsParams): Promise<PaginatedResponse<InitiativeLabel>>;
2070
+ /**
2071
+ * Add labels to an initiative
2072
+ */
2073
+ addLabels(workspaceSlug: string, initiativeId: string, addLabels: AddInitiativeLabelsRequest): Promise<InitiativeLabel[]>;
2074
+ /**
2075
+ * Remove labels from an initiative
2076
+ */
2077
+ removeLabels(workspaceSlug: string, initiativeId: string, removeLabels: RemoveInitiativeLabelsRequest): Promise<void>;
2078
+ /**
2079
+ * Get labels associated with an initiative
2080
+ */
2081
+ listLabels(workspaceSlug: string, initiativeId: string, params?: {
2082
+ limit?: number;
2083
+ offset?: number;
2084
+ }): Promise<PaginatedResponse<InitiativeLabel>>;
2085
+ }
2086
+ /**
2087
+ * Initiative Projects API resource
2088
+ * Handles initiative project relationships
2089
+ */
2090
+ declare class Projects$2 extends BaseResource {
2091
+ constructor(config: Configuration);
2092
+ /**
2093
+ * Get projects associated with an initiative
2094
+ */
2095
+ list(workspaceSlug: string, initiativeId: string, params?: {
2096
+ limit?: number;
2097
+ offset?: number;
2098
+ }): Promise<PaginatedResponse<Project>>;
2099
+ /**
2100
+ * Add projects to an initiative
2101
+ */
2102
+ add(workspaceSlug: string, initiativeId: string, addProjects: AddInitiativeProjectsRequest): Promise<Project[]>;
2103
+ /**
2104
+ * Remove projects from an initiative
2105
+ */
2106
+ remove(workspaceSlug: string, initiativeId: string, removeProjects: RemoveInitiativeProjectsRequest): Promise<void>;
2107
+ }
2108
+ /**
2109
+ * Initiative Epics API resource
2110
+ * Handles initiative epic relationships
2111
+ */
2112
+ declare class Epics$1 extends BaseResource {
2113
+ constructor(config: Configuration);
2114
+ /**
2115
+ * Get epics associated with an initiative
2116
+ */
2117
+ list(workspaceSlug: string, initiativeId: string, params?: {
2118
+ limit?: number;
2119
+ offset?: number;
2120
+ }): Promise<PaginatedResponse<Epic>>;
2121
+ /**
2122
+ * Add epics to an initiative
2123
+ */
2124
+ add(workspaceSlug: string, initiativeId: string, addEpics: AddInitiativeEpicsRequest): Promise<Epic[]>;
2125
+ /**
2126
+ * Remove epics from an initiative
2127
+ */
2128
+ remove(workspaceSlug: string, initiativeId: string, removeEpics: RemoveInitiativeEpicsRequest): Promise<void>;
2129
+ }
2130
+ /**
2131
+ * Initiatives API resource
2132
+ * Handles all initiative-related operations
2133
+ */
2134
+ export declare class Initiatives extends BaseResource {
2135
+ labels: Labels$1;
2136
+ projects: Projects$2;
2137
+ epics: Epics$1;
2138
+ constructor(config: Configuration);
2139
+ /**
2140
+ * Create a new initiative
2141
+ */
2142
+ create(workspaceSlug: string, createInitiative: CreateInitiative): Promise<Initiative>;
2143
+ /**
2144
+ * Retrieve an initiative by ID
2145
+ */
2146
+ retrieve(workspaceSlug: string, initiativeId: string): Promise<Initiative>;
2147
+ /**
2148
+ * Update an initiative
2149
+ */
2150
+ update(workspaceSlug: string, initiativeId: string, updateInitiative: UpdateInitiative): Promise<Initiative>;
2151
+ /**
2152
+ * Delete an initiative
2153
+ */
2154
+ delete(workspaceSlug: string, initiativeId: string): Promise<void>;
2155
+ /**
2156
+ * List initiatives with optional filtering
2157
+ */
2158
+ list(workspaceSlug: string, params?: ListInitiativesParams): Promise<PaginatedResponse<Initiative>>;
2159
+ }
2160
+ /**
2161
+ * Agent run status enum
2162
+ */
2163
+ export type AgentRunStatus = "created" | "in_progress" | "awaiting" | "completed" | "stopping" | "stopped" | "failed" | "stale";
2164
+ /**
2165
+ * Agent run type enum
2166
+ */
2167
+ export type AgentRunType = "comment_thread";
2168
+ /**
2169
+ * Agent run activity signal enum
2170
+ */
2171
+ export type AgentRunActivitySignal = "auth_request" | "continue" | "select" | "stop";
2172
+ /**
2173
+ * Agent run activity type enum
2174
+ */
2175
+ export type AgentRunActivityType = "action" | "elicitation" | "error" | "prompt" | "response" | "thought";
2176
+ /**
2177
+ * Agent Run interface
2178
+ */
2179
+ export interface AgentRun extends BaseModel {
2180
+ agent_user: string;
2181
+ comment?: string;
2182
+ source_comment?: string;
2183
+ creator: string;
2184
+ stopped_at?: string;
2185
+ stopped_by?: string;
2186
+ started_at: string;
2187
+ ended_at?: string;
2188
+ external_link?: string;
2189
+ issue?: string;
2190
+ workspace: string;
2191
+ project?: string;
2192
+ status: AgentRunStatus;
2193
+ error_metadata?: Record<string, any>;
2194
+ type: AgentRunType;
2195
+ }
2196
+ /**
2197
+ * Create agent run request interface
2198
+ */
2199
+ export interface CreateAgentRunRequest {
2200
+ agent_slug: string;
2201
+ issue?: string;
2202
+ project?: string;
2203
+ comment?: string;
2204
+ source_comment?: string;
2205
+ external_link?: string;
2206
+ type?: AgentRunType;
2207
+ }
2208
+ /**
2209
+ * Agent run activity content for action type
2210
+ */
2211
+ export interface AgentRunActivityActionContent {
2212
+ type: "action";
2213
+ action: string;
2214
+ parameters: Record<string, string>;
2215
+ }
2216
+ /**
2217
+ * Agent run activity content for other types
2218
+ */
2219
+ export interface AgentRunActivityTextContent {
2220
+ type: Exclude<AgentRunActivityType, "action">;
2221
+ body: string;
2222
+ }
2223
+ /**
2224
+ * Agent run activity content
2225
+ */
2226
+ export type AgentRunActivityContent = AgentRunActivityActionContent | AgentRunActivityTextContent;
2227
+ /**
2228
+ * Agent Run Activity interface
2229
+ */
2230
+ export interface AgentRunActivity extends BaseModel {
2231
+ agent_run: string;
2232
+ content: AgentRunActivityContent;
2233
+ content_metadata?: Record<string, any>;
2234
+ ephemeral: boolean;
2235
+ signal: AgentRunActivitySignal;
2236
+ signal_metadata?: Record<string, any>;
2237
+ comment?: string;
2238
+ actor?: string;
2239
+ type: AgentRunActivityType;
2240
+ project?: string;
2241
+ workspace: string;
2242
+ }
2243
+ /**
2244
+ * Create agent run activity request interface
2245
+ */
2246
+ export interface CreateAgentRunActivityRequest {
2247
+ content: AgentRunActivityContent;
2248
+ content_metadata?: Record<string, any>;
2249
+ signal?: AgentRunActivitySignal;
2250
+ signal_metadata?: Record<string, any>;
2251
+ type: Exclude<AgentRunActivityType, "prompt">;
2252
+ project?: string;
2253
+ }
2254
+ /**
2255
+ * Agent Run Activities API resource
2256
+ * Handles all agent run activity operations
2257
+ */
2258
+ declare class Activities$1 extends BaseResource {
2259
+ constructor(config: Configuration);
2260
+ /**
2261
+ * List activities for an agent run
2262
+ * @param workspaceSlug - The workspace slug
2263
+ * @param runId - The agent run ID
2264
+ * @param params - Optional query parameters for pagination
2265
+ * @returns Paginated list of agent run activities
2266
+ */
2267
+ list(workspaceSlug: string, runId: string, params?: {
2268
+ per_page?: number;
2269
+ cursor?: string;
2270
+ }): Promise<PaginatedResponse<AgentRunActivity>>;
2271
+ /**
2272
+ * Retrieve a specific agent run activity by ID
2273
+ * @param workspaceSlug - The workspace slug
2274
+ * @param runId - The agent run ID
2275
+ * @param activityId - The activity ID
2276
+ * @returns The agent run activity
2277
+ */
2278
+ retrieve(workspaceSlug: string, runId: string, activityId: string): Promise<AgentRunActivity>;
2279
+ /**
2280
+ * Create a new agent run activity
2281
+ * @param workspaceSlug - The workspace slug
2282
+ * @param runId - The agent run ID
2283
+ * @param data - The activity data to create
2284
+ * @returns The created agent run activity
2285
+ */
2286
+ create(workspaceSlug: string, runId: string, data: CreateAgentRunActivityRequest): Promise<AgentRunActivity>;
2287
+ }
2288
+ /**
2289
+ * Agent Runs API resource
2290
+ * Handles all agent run operations
2291
+ */
2292
+ export declare class AgentRuns extends BaseResource {
2293
+ activities: Activities$1;
2294
+ constructor(config: Configuration);
2295
+ /**
2296
+ * Create a new agent run
2297
+ * @param workspaceSlug - The workspace slug
2298
+ * @param data - The agent run data to create
2299
+ * @returns The created agent run
2300
+ */
2301
+ create(workspaceSlug: string, data: CreateAgentRunRequest): Promise<AgentRun>;
2302
+ /**
2303
+ * Retrieve an agent run by ID
2304
+ * @param workspaceSlug - The workspace slug
2305
+ * @param runId - The agent run ID
2306
+ * @returns The agent run
2307
+ */
2308
+ retrieve(workspaceSlug: string, runId: string): Promise<AgentRun>;
2309
+ }
2310
+ /**
2311
+ * Main Plane Client class
2312
+ * Provides access to all Plane API resources
2313
+ */
2314
+ export declare class PlaneClient {
2315
+ config: Configuration;
2316
+ workItems: WorkItems;
2317
+ workItemTypes: WorkItemTypes;
2318
+ workItemProperties: WorkItemProperties;
2319
+ links: Links;
2320
+ customers: Customers;
2321
+ pages: Pages;
2322
+ projects: Projects;
2323
+ labels: Labels;
2324
+ states: States;
2325
+ members: Members;
2326
+ modules: Modules;
2327
+ cycles: Cycles;
2328
+ users: Users;
2329
+ workspace: Workspace;
2330
+ epics: Epics;
2331
+ intake: Intake;
2332
+ stickies: Stickies;
2333
+ teamspaces: Teamspaces;
2334
+ initiatives: Initiatives;
2335
+ agentRuns: AgentRuns;
2336
+ constructor(config: {
2337
+ baseUrl?: string;
2338
+ apiKey?: string;
2339
+ accessToken?: string;
2340
+ enableLogging?: boolean;
2341
+ });
2342
+ }
2343
+ export interface PlaneOAuthTokenResponse {
2344
+ access_token: string;
2345
+ expires_in?: number;
2346
+ token_type: string;
2347
+ scope?: string;
2348
+ refresh_token?: string;
2349
+ }
2350
+ export interface WorkspaceDetail {
2351
+ name: string;
2352
+ slug: string;
2353
+ id: string;
2354
+ logo_url?: string;
2355
+ }
2356
+ export interface PlaneOAuthAppInstallation {
2357
+ id: string;
2358
+ workspace_detail: WorkspaceDetail;
2359
+ created_at: string;
2360
+ updated_at: string;
2361
+ deleted_at?: string;
2362
+ status: string;
2363
+ created_by?: string;
2364
+ updated_by?: string;
2365
+ workspace: string;
2366
+ application: string;
2367
+ installed_by: string;
2368
+ app_bot: string;
2369
+ webhook?: string;
2370
+ }
2371
+ /**
2372
+ * Standalone OAuth client for app development
2373
+ * Does not require API authentication - perfect for OAuth app development
2374
+ */
2375
+ export declare class OAuthClient {
2376
+ private clientId;
2377
+ private clientSecret;
2378
+ private redirectUri;
2379
+ private baseUrl;
2380
+ constructor(config: {
2381
+ baseUrl?: string;
2382
+ clientId: string;
2383
+ clientSecret: string;
2384
+ redirectUri: string;
2385
+ });
2386
+ /**
2387
+ * Get the authorization URL for the OAuth flow
2388
+ * @param responseType - The response type (default: "code")
2389
+ * @param state - Optional state parameter for security
2390
+ * @returns The authorization URL
2391
+ */
2392
+ getAuthorizationUrl(responseType?: string, state?: string): string;
2393
+ /**
2394
+ * Exchange authorization code for access token
2395
+ * @param code - The authorization code
2396
+ * @param grantType - The grant type (default: "authorization_code")
2397
+ * @returns Promise resolving to token response
2398
+ */
2399
+ exchangeCodeForToken(code: string, grantType?: string): Promise<PlaneOAuthTokenResponse>;
2400
+ /**
2401
+ * Get a new access token using a refresh token
2402
+ * @param refreshToken - The refresh token
2403
+ * @returns Promise resolving to token response
2404
+ */
2405
+ getRefreshToken(refreshToken: string): Promise<PlaneOAuthTokenResponse>;
2406
+ /**
2407
+ * Get a new access token using client credentials for bot/app installations
2408
+ * @param appInstallationId - The app installation ID
2409
+ * @returns Promise resolving to token response
2410
+ */
2411
+ getBotToken(appInstallationId: string): Promise<PlaneOAuthTokenResponse>;
2412
+ /**
2413
+ * Get an app installation by ID using the bot token
2414
+ * @param token - The bot token from getBotToken method
2415
+ * @param appInstallationId - The app installation ID
2416
+ * @returns Promise resolving to app installation
2417
+ */
2418
+ getAppInstallations(token: string, appInstallationId?: string): Promise<PlaneOAuthAppInstallation[]>;
2419
+ /**
2420
+ * Generate basic auth token from client_id and client_secret
2421
+ * @returns Base64 encoded basic auth token
2422
+ */
2423
+ private getBasicAuthToken;
2424
+ }
2425
+ /**
2426
+ * Base error class for all Plane SDK errors
2427
+ */
2428
+ export declare class PlaneError extends Error {
2429
+ statusCode?: number;
2430
+ response?: any;
2431
+ constructor(message: string, statusCode?: number, response?: any);
2432
+ }
2433
+ /**
2434
+ * HTTP-specific error class for API request failures
2435
+ */
2436
+ export declare class HttpError extends PlaneError {
2437
+ constructor(message: string, statusCode: number, response?: any);
2438
+ }
2439
+
2440
+ export {
2441
+ Activities as WorkItemActivities,
2442
+ Activities$1 as AgentRunActivities,
2443
+ Attachments as WorkItemAttachments,
2444
+ Comments as WorkItemComments,
2445
+ Epics$1 as InitiativeEpics,
2446
+ Labels$1 as InitiativeLabels,
2447
+ Members$1 as TeamspaceMembers,
2448
+ Options as WorkItemPropertyOptions,
2449
+ Projects$1 as TeamspaceProjects,
2450
+ Projects$2 as InitiativeProjects,
2451
+ Properties as CustomerProperties,
2452
+ Relations as WorkItemRelations,
2453
+ Requests as CustomerRequests,
2454
+ Values as WorkItemPropertyValues,
2455
+ };
2456
+
2457
+ export {};