@makeplane/plane-node-sdk 0.2.10 → 0.2.12

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.
Files changed (296) hide show
  1. package/README.md +14 -1
  2. package/dist/Configuration.d.ts.map +1 -1
  3. package/dist/Configuration.js +3 -3
  4. package/dist/Configuration.js.map +1 -1
  5. package/dist/api/BaseResource.d.ts +1 -1
  6. package/dist/api/BaseResource.d.ts.map +1 -1
  7. package/dist/api/BaseResource.js +18 -2
  8. package/dist/api/BaseResource.js.map +1 -1
  9. package/dist/api/Collections/Members.d.ts +31 -0
  10. package/dist/api/Collections/Members.d.ts.map +1 -0
  11. package/dist/api/Collections/Members.js +44 -0
  12. package/dist/api/Collections/Members.js.map +1 -0
  13. package/dist/api/Collections/Pages.d.ts +40 -0
  14. package/dist/api/Collections/Pages.d.ts.map +1 -0
  15. package/dist/api/Collections/Pages.js +55 -0
  16. package/dist/api/Collections/Pages.js.map +1 -0
  17. package/dist/api/Collections/index.d.ts +41 -0
  18. package/dist/api/Collections/index.d.ts.map +1 -0
  19. package/dist/api/Collections/index.js +57 -0
  20. package/dist/api/Collections/index.js.map +1 -0
  21. package/dist/api/Customers/Properties.d.ts +10 -1
  22. package/dist/api/Customers/Properties.d.ts.map +1 -1
  23. package/dist/api/Customers/Properties.js +11 -0
  24. package/dist/api/Customers/Properties.js.map +1 -1
  25. package/dist/api/Customers/index.d.ts +6 -0
  26. package/dist/api/Customers/index.d.ts.map +1 -1
  27. package/dist/api/Customers/index.js +11 -0
  28. package/dist/api/Customers/index.js.map +1 -1
  29. package/dist/api/Cycles.d.ts +12 -4
  30. package/dist/api/Cycles.d.ts.map +1 -1
  31. package/dist/api/Cycles.js +14 -3
  32. package/dist/api/Cycles.js.map +1 -1
  33. package/dist/api/Epics.d.ts +21 -1
  34. package/dist/api/Epics.d.ts.map +1 -1
  35. package/dist/api/Epics.js +30 -0
  36. package/dist/api/Epics.js.map +1 -1
  37. package/dist/api/Estimates.d.ts +50 -0
  38. package/dist/api/Estimates.d.ts.map +1 -0
  39. package/dist/api/Estimates.js +73 -0
  40. package/dist/api/Estimates.js.map +1 -0
  41. package/dist/api/Initiatives/Epics.d.ts.map +1 -1
  42. package/dist/api/Initiatives/Epics.js.map +1 -1
  43. package/dist/api/Initiatives/Labels.d.ts.map +1 -1
  44. package/dist/api/Initiatives/Labels.js.map +1 -1
  45. package/dist/api/Initiatives/Projects.d.ts.map +1 -1
  46. package/dist/api/Initiatives/Projects.js.map +1 -1
  47. package/dist/api/Intake.d.ts +8 -1
  48. package/dist/api/Intake.d.ts.map +1 -1
  49. package/dist/api/Intake.js +9 -0
  50. package/dist/api/Intake.js.map +1 -1
  51. package/dist/api/Modules.d.ts +12 -4
  52. package/dist/api/Modules.d.ts.map +1 -1
  53. package/dist/api/Modules.js +14 -3
  54. package/dist/api/Modules.js.map +1 -1
  55. package/dist/api/Pages.d.ts +9 -0
  56. package/dist/api/Pages.d.ts.map +1 -1
  57. package/dist/api/Pages.js +12 -0
  58. package/dist/api/Pages.js.map +1 -1
  59. package/dist/api/ProjectTemplates/Pages.d.ts +27 -0
  60. package/dist/api/ProjectTemplates/Pages.d.ts.map +1 -0
  61. package/dist/api/ProjectTemplates/Pages.js +40 -0
  62. package/dist/api/ProjectTemplates/Pages.js.map +1 -0
  63. package/dist/api/ProjectTemplates/WorkItems.d.ts +27 -0
  64. package/dist/api/ProjectTemplates/WorkItems.d.ts.map +1 -0
  65. package/dist/api/ProjectTemplates/WorkItems.js +40 -0
  66. package/dist/api/ProjectTemplates/WorkItems.js.map +1 -0
  67. package/dist/api/ProjectTemplates/index.d.ts +14 -0
  68. package/dist/api/ProjectTemplates/index.d.ts.map +1 -0
  69. package/dist/api/ProjectTemplates/index.js +19 -0
  70. package/dist/api/ProjectTemplates/index.js.map +1 -0
  71. package/dist/api/Projects.d.ts +15 -4
  72. package/dist/api/Projects.d.ts.map +1 -1
  73. package/dist/api/Projects.js +18 -3
  74. package/dist/api/Projects.js.map +1 -1
  75. package/dist/api/Releases/Changelog.d.ts +19 -0
  76. package/dist/api/Releases/Changelog.d.ts.map +1 -0
  77. package/dist/api/Releases/Changelog.js +27 -0
  78. package/dist/api/Releases/Changelog.js.map +1 -0
  79. package/dist/api/Releases/Comments.d.ts +31 -0
  80. package/dist/api/Releases/Comments.d.ts.map +1 -0
  81. package/dist/api/Releases/Comments.js +46 -0
  82. package/dist/api/Releases/Comments.js.map +1 -0
  83. package/dist/api/Releases/ItemLabels.d.ts +23 -0
  84. package/dist/api/Releases/ItemLabels.d.ts.map +1 -0
  85. package/dist/api/Releases/ItemLabels.js +39 -0
  86. package/dist/api/Releases/ItemLabels.js.map +1 -0
  87. package/dist/api/Releases/Labels.d.ts +16 -0
  88. package/dist/api/Releases/Labels.d.ts.map +1 -0
  89. package/dist/api/Releases/Labels.js +31 -0
  90. package/dist/api/Releases/Labels.js.map +1 -0
  91. package/dist/api/Releases/Links.d.ts +31 -0
  92. package/dist/api/Releases/Links.d.ts.map +1 -0
  93. package/dist/api/Releases/Links.js +46 -0
  94. package/dist/api/Releases/Links.js.map +1 -0
  95. package/dist/api/Releases/Tags.d.ts +16 -0
  96. package/dist/api/Releases/Tags.d.ts.map +1 -0
  97. package/dist/api/Releases/Tags.js +31 -0
  98. package/dist/api/Releases/Tags.js.map +1 -0
  99. package/dist/api/Releases/WorkItems.d.ts +23 -0
  100. package/dist/api/Releases/WorkItems.d.ts.map +1 -0
  101. package/dist/api/Releases/WorkItems.js +38 -0
  102. package/dist/api/Releases/WorkItems.js.map +1 -0
  103. package/dist/api/Releases/index.d.ts +31 -0
  104. package/dist/api/Releases/index.d.ts.map +1 -0
  105. package/dist/api/Releases/index.js +46 -0
  106. package/dist/api/Releases/index.js.map +1 -0
  107. package/dist/api/Roles.d.ts +26 -0
  108. package/dist/api/Roles.d.ts.map +1 -0
  109. package/dist/api/Roles.js +33 -0
  110. package/dist/api/Roles.js.map +1 -0
  111. package/dist/api/Teamspaces/Members.d.ts.map +1 -1
  112. package/dist/api/Teamspaces/Members.js.map +1 -1
  113. package/dist/api/Teamspaces/Projects.d.ts.map +1 -1
  114. package/dist/api/Teamspaces/Projects.js.map +1 -1
  115. package/dist/api/Users.d.ts +5 -1
  116. package/dist/api/Users.d.ts.map +1 -1
  117. package/dist/api/Users.js +6 -0
  118. package/dist/api/Users.js.map +1 -1
  119. package/dist/api/WorkItemProperties/Options.d.ts.map +1 -1
  120. package/dist/api/WorkItemProperties/Options.js.map +1 -1
  121. package/dist/api/WorkItemProperties/index.d.ts +30 -0
  122. package/dist/api/WorkItemProperties/index.d.ts.map +1 -1
  123. package/dist/api/WorkItemProperties/index.js +46 -0
  124. package/dist/api/WorkItemProperties/index.js.map +1 -1
  125. package/dist/api/WorkItemRelationDefinitions.d.ts +15 -0
  126. package/dist/api/WorkItemRelationDefinitions.d.ts.map +1 -0
  127. package/dist/api/WorkItemRelationDefinitions.js +33 -0
  128. package/dist/api/WorkItemRelationDefinitions.js.map +1 -0
  129. package/dist/api/WorkItemTypes.d.ts +7 -0
  130. package/dist/api/WorkItemTypes.d.ts.map +1 -1
  131. package/dist/api/WorkItemTypes.js +11 -0
  132. package/dist/api/WorkItemTypes.js.map +1 -1
  133. package/dist/api/WorkItems/Attachments.d.ts.map +1 -1
  134. package/dist/api/WorkItems/Attachments.js.map +1 -1
  135. package/dist/api/WorkItems/CustomRelations.d.ts +29 -0
  136. package/dist/api/WorkItems/CustomRelations.d.ts.map +1 -0
  137. package/dist/api/WorkItems/CustomRelations.js +39 -0
  138. package/dist/api/WorkItems/CustomRelations.js.map +1 -0
  139. package/dist/api/WorkItems/Dependencies.d.ts +24 -0
  140. package/dist/api/WorkItems/Dependencies.d.ts.map +1 -0
  141. package/dist/api/WorkItems/Dependencies.js +34 -0
  142. package/dist/api/WorkItems/Dependencies.js.map +1 -0
  143. package/dist/api/WorkItems/Pages.d.ts +28 -0
  144. package/dist/api/WorkItems/Pages.d.ts.map +1 -0
  145. package/dist/api/WorkItems/Pages.js +39 -0
  146. package/dist/api/WorkItems/Pages.js.map +1 -0
  147. package/dist/api/WorkItems/WorkLogs.d.ts.map +1 -1
  148. package/dist/api/WorkItems/WorkLogs.js.map +1 -1
  149. package/dist/api/WorkItems/index.d.ts +65 -2
  150. package/dist/api/WorkItems/index.d.ts.map +1 -1
  151. package/dist/api/WorkItems/index.js +83 -2
  152. package/dist/api/WorkItems/index.js.map +1 -1
  153. package/dist/api/Workflows/States.d.ts +19 -0
  154. package/dist/api/Workflows/States.d.ts.map +1 -0
  155. package/dist/api/Workflows/States.js +27 -0
  156. package/dist/api/Workflows/States.js.map +1 -0
  157. package/dist/api/Workflows/Transitions.d.ts +28 -0
  158. package/dist/api/Workflows/Transitions.d.ts.map +1 -0
  159. package/dist/api/Workflows/Transitions.js +61 -0
  160. package/dist/api/Workflows/Transitions.js.map +1 -0
  161. package/dist/api/Workflows/index.d.ts +27 -0
  162. package/dist/api/Workflows/index.d.ts.map +1 -0
  163. package/dist/api/Workflows/index.js +38 -0
  164. package/dist/api/Workflows/index.js.map +1 -0
  165. package/dist/api/Workspace.d.ts +16 -3
  166. package/dist/api/Workspace.d.ts.map +1 -1
  167. package/dist/api/Workspace.js +17 -1
  168. package/dist/api/Workspace.js.map +1 -1
  169. package/dist/api/WorkspaceProjectLabels.d.ts +15 -0
  170. package/dist/api/WorkspaceProjectLabels.d.ts.map +1 -0
  171. package/dist/api/WorkspaceProjectLabels.js +28 -0
  172. package/dist/api/WorkspaceProjectLabels.js.map +1 -0
  173. package/dist/api/WorkspaceProjectStates.d.ts +15 -0
  174. package/dist/api/WorkspaceProjectStates.d.ts.map +1 -0
  175. package/dist/api/WorkspaceProjectStates.js +28 -0
  176. package/dist/api/WorkspaceProjectStates.js.map +1 -0
  177. package/dist/api/WorkspaceTemplates/Pages.d.ts +15 -0
  178. package/dist/api/WorkspaceTemplates/Pages.d.ts.map +1 -0
  179. package/dist/api/WorkspaceTemplates/Pages.js +28 -0
  180. package/dist/api/WorkspaceTemplates/Pages.js.map +1 -0
  181. package/dist/api/WorkspaceTemplates/Projects.d.ts +15 -0
  182. package/dist/api/WorkspaceTemplates/Projects.d.ts.map +1 -0
  183. package/dist/api/WorkspaceTemplates/Projects.js +28 -0
  184. package/dist/api/WorkspaceTemplates/Projects.js.map +1 -0
  185. package/dist/api/WorkspaceTemplates/WorkItems.d.ts +15 -0
  186. package/dist/api/WorkspaceTemplates/WorkItems.d.ts.map +1 -0
  187. package/dist/api/WorkspaceTemplates/WorkItems.js +28 -0
  188. package/dist/api/WorkspaceTemplates/WorkItems.js.map +1 -0
  189. package/dist/api/WorkspaceTemplates/index.d.ts +16 -0
  190. package/dist/api/WorkspaceTemplates/index.d.ts.map +1 -0
  191. package/dist/api/WorkspaceTemplates/index.js +21 -0
  192. package/dist/api/WorkspaceTemplates/index.js.map +1 -0
  193. package/dist/api/WorkspaceWorkItemProperties/Options.d.ts +16 -0
  194. package/dist/api/WorkspaceWorkItemProperties/Options.d.ts.map +1 -0
  195. package/dist/api/WorkspaceWorkItemProperties/Options.js +31 -0
  196. package/dist/api/WorkspaceWorkItemProperties/Options.js.map +1 -0
  197. package/dist/api/WorkspaceWorkItemProperties/index.d.ts +18 -0
  198. package/dist/api/WorkspaceWorkItemProperties/index.d.ts.map +1 -0
  199. package/dist/api/WorkspaceWorkItemProperties/index.js +33 -0
  200. package/dist/api/WorkspaceWorkItemProperties/index.js.map +1 -0
  201. package/dist/api/WorkspaceWorkItemTypes/Properties.d.ts +15 -0
  202. package/dist/api/WorkspaceWorkItemTypes/Properties.d.ts.map +1 -0
  203. package/dist/api/WorkspaceWorkItemTypes/Properties.js +25 -0
  204. package/dist/api/WorkspaceWorkItemTypes/Properties.js.map +1 -0
  205. package/dist/api/WorkspaceWorkItemTypes/index.d.ts +18 -0
  206. package/dist/api/WorkspaceWorkItemTypes/index.d.ts.map +1 -0
  207. package/dist/api/WorkspaceWorkItemTypes/index.js +33 -0
  208. package/dist/api/WorkspaceWorkItemTypes/index.js.map +1 -0
  209. package/dist/client/plane-client.d.ts +24 -2
  210. package/dist/client/plane-client.d.ts.map +1 -1
  211. package/dist/client/plane-client.js +24 -2
  212. package/dist/client/plane-client.js.map +1 -1
  213. package/dist/index.d.ts +33 -1
  214. package/dist/index.d.ts.map +1 -1
  215. package/dist/index.js +68 -3
  216. package/dist/index.js.map +1 -1
  217. package/dist/models/Collection.d.ts +147 -0
  218. package/dist/models/Collection.d.ts.map +1 -0
  219. package/dist/models/Collection.js +19 -0
  220. package/dist/models/Collection.js.map +1 -0
  221. package/dist/models/Customer.d.ts +9 -0
  222. package/dist/models/Customer.d.ts.map +1 -1
  223. package/dist/models/Cycle.d.ts +25 -0
  224. package/dist/models/Cycle.d.ts.map +1 -1
  225. package/dist/models/Epic.d.ts +54 -0
  226. package/dist/models/Epic.d.ts.map +1 -1
  227. package/dist/models/Estimate.d.ts +72 -0
  228. package/dist/models/Estimate.d.ts.map +1 -0
  229. package/dist/models/Estimate.js +7 -0
  230. package/dist/models/Estimate.js.map +1 -0
  231. package/dist/models/Initiative.d.ts +4 -2
  232. package/dist/models/Initiative.d.ts.map +1 -1
  233. package/dist/models/Intake.d.ts +8 -0
  234. package/dist/models/Intake.d.ts.map +1 -1
  235. package/dist/models/Member.d.ts +54 -0
  236. package/dist/models/Member.d.ts.map +1 -0
  237. package/dist/models/Member.js +3 -0
  238. package/dist/models/Member.js.map +1 -0
  239. package/dist/models/Module.d.ts +21 -0
  240. package/dist/models/Module.d.ts.map +1 -1
  241. package/dist/models/Page.d.ts +6 -1
  242. package/dist/models/Page.d.ts.map +1 -1
  243. package/dist/models/Project.d.ts +26 -0
  244. package/dist/models/Project.d.ts.map +1 -1
  245. package/dist/models/ProjectTemplate.d.ts +25 -0
  246. package/dist/models/ProjectTemplate.d.ts.map +1 -0
  247. package/dist/models/ProjectTemplate.js +3 -0
  248. package/dist/models/ProjectTemplate.js.map +1 -0
  249. package/dist/models/Release.d.ts +157 -0
  250. package/dist/models/Release.d.ts.map +1 -0
  251. package/dist/models/Release.js +3 -0
  252. package/dist/models/Release.js.map +1 -0
  253. package/dist/models/Role.d.ts +31 -0
  254. package/dist/models/Role.d.ts.map +1 -0
  255. package/dist/models/Role.js +11 -0
  256. package/dist/models/Role.js.map +1 -0
  257. package/dist/models/User.d.ts +23 -0
  258. package/dist/models/User.d.ts.map +1 -1
  259. package/dist/models/WorkItem.d.ts +102 -0
  260. package/dist/models/WorkItem.d.ts.map +1 -1
  261. package/dist/models/WorkItemPage.d.ts +37 -0
  262. package/dist/models/WorkItemPage.d.ts.map +1 -0
  263. package/dist/models/WorkItemPage.js +3 -0
  264. package/dist/models/WorkItemPage.js.map +1 -0
  265. package/dist/models/WorkItemRelationDefinition.d.ts +21 -0
  266. package/dist/models/WorkItemRelationDefinition.d.ts.map +1 -0
  267. package/dist/models/WorkItemRelationDefinition.js +3 -0
  268. package/dist/models/WorkItemRelationDefinition.js.map +1 -0
  269. package/dist/models/WorkItemType.d.ts +6 -0
  270. package/dist/models/WorkItemType.d.ts.map +1 -1
  271. package/dist/models/Workflow.d.ts +30 -0
  272. package/dist/models/Workflow.d.ts.map +1 -0
  273. package/dist/models/Workflow.js +3 -0
  274. package/dist/models/Workflow.js.map +1 -0
  275. package/dist/models/WorkspaceProjectLabel.d.ts +13 -0
  276. package/dist/models/WorkspaceProjectLabel.d.ts.map +1 -0
  277. package/dist/models/WorkspaceProjectLabel.js +3 -0
  278. package/dist/models/WorkspaceProjectLabel.js.map +1 -0
  279. package/dist/models/WorkspaceProjectState.d.ts +16 -0
  280. package/dist/models/WorkspaceProjectState.d.ts.map +1 -0
  281. package/dist/models/WorkspaceProjectState.js +3 -0
  282. package/dist/models/WorkspaceProjectState.js.map +1 -0
  283. package/dist/models/WorkspaceTemplate.d.ts +35 -0
  284. package/dist/models/WorkspaceTemplate.d.ts.map +1 -0
  285. package/dist/models/WorkspaceTemplate.js +3 -0
  286. package/dist/models/WorkspaceTemplate.js.map +1 -0
  287. package/dist/models/index.d.ts +12 -0
  288. package/dist/models/index.d.ts.map +1 -1
  289. package/dist/models/index.js +12 -0
  290. package/dist/models/index.js.map +1 -1
  291. package/dist/types.bundle.d.ts +2236 -560
  292. package/package.json +11 -23
  293. package/dist/api/Members.d.ts +0 -56
  294. package/dist/api/Members.d.ts.map +0 -1
  295. package/dist/api/Members.js +0 -45
  296. package/dist/api/Members.js.map +0 -1
@@ -55,7 +55,7 @@ export declare abstract class BaseResource {
55
55
  /**
56
56
  * DELETE request
57
57
  */
58
- protected httpDelete(endpoint: string, data?: any): Promise<void>;
58
+ protected httpDelete(endpoint: string, data?: any, params?: any): Promise<void>;
59
59
  /**
60
60
  * Builds the complete URL for API requests
61
61
  */
@@ -178,6 +178,32 @@ export interface ListProjectsParams {
178
178
  limit?: number;
179
179
  offset?: number;
180
180
  }
181
+ /**
182
+ * Lite project shape returned by the read-only projects-lite list endpoint,
183
+ * intended for pickers and reference lookups.
184
+ */
185
+ export interface ProjectLite {
186
+ id: string;
187
+ identifier: string;
188
+ name: string;
189
+ cover_image?: string;
190
+ icon_prop?: Record<string, unknown>;
191
+ emoji?: string;
192
+ description?: string;
193
+ cover_image_url?: string;
194
+ archived_at?: string;
195
+ }
196
+ /**
197
+ * Query params for the paginated projects-lite endpoint.
198
+ */
199
+ export interface ListProjectsLiteParams {
200
+ /** Include archived projects in the results (defaults to false) */
201
+ include_archived?: boolean;
202
+ order_by?: string;
203
+ per_page?: number;
204
+ cursor?: string;
205
+ [key: string]: unknown;
206
+ }
181
207
  export interface User {
182
208
  id?: string;
183
209
  first_name?: string;
@@ -187,6 +213,81 @@ export interface User {
187
213
  avatar_url?: string;
188
214
  display_name?: string;
189
215
  }
216
+ /**
217
+ * Type of user asset being uploaded.
218
+ */
219
+ export type UserAssetEntityType = "USER_AVATAR" | "USER_COVER";
220
+ /**
221
+ * Request model for uploading a user asset (avatar or cover).
222
+ */
223
+ export interface UserAssetUploadRequest {
224
+ /** Original filename of the asset */
225
+ name: string;
226
+ /** MIME type of the file */
227
+ type?: "image/jpeg" | "image/png" | "image/webp" | "image/jpg" | "image/gif";
228
+ /** File size in bytes */
229
+ size: number;
230
+ /** Type of user asset */
231
+ entity_type: UserAssetEntityType;
232
+ }
233
+ /**
234
+ * Response from the user asset upload endpoint.
235
+ */
236
+ export interface UserAssetUploadResponse {
237
+ [key: string]: unknown;
238
+ }
239
+ /**
240
+ * A project member — a User with an additional role and role_slug field.
241
+ *
242
+ * Returned by Projects.getMembers(). The role field is the numeric role value
243
+ * (e.g. 20 = Member, 15 = Viewer, 10 = Guest, 5 = Viewer), role_slug is the
244
+ * human-readable equivalent (e.g. "member", "viewer").
245
+ */
246
+ export interface ProjectMember extends User {
247
+ role: number | null;
248
+ role_slug: string | null;
249
+ }
250
+ /**
251
+ * A workspace member — a User with an additional role and role_slug field.
252
+ *
253
+ * Returned by Workspace.getMembers().
254
+ */
255
+ export interface WorkspaceMember extends User {
256
+ role: number | null;
257
+ role_slug: string | null;
258
+ }
259
+ /**
260
+ * Query params for the paginated members-lite endpoints.
261
+ */
262
+ export interface ListMembersLiteParams {
263
+ /** Number of results per page */
264
+ per_page?: number;
265
+ /** Pagination cursor from a previous response's next_cursor */
266
+ cursor?: string;
267
+ [key: string]: unknown;
268
+ }
269
+ /**
270
+ * One role's aggregate membership counts within a workspace.
271
+ */
272
+ export interface ProjectRoleDistributionEntry {
273
+ role_id?: string;
274
+ name?: string;
275
+ slug?: string;
276
+ is_system?: boolean;
277
+ level?: number;
278
+ membership_count?: number;
279
+ distinct_member_count?: number;
280
+ }
281
+ /**
282
+ * Aggregate count of project members by role across a workspace.
283
+ * Counts span all active (non-archived) projects and include both
284
+ * built-in roles (admin, contributor, commenter, guest) and custom roles.
285
+ */
286
+ export interface ProjectRoleDistribution {
287
+ total_memberships?: number;
288
+ total_distinct_members?: number;
289
+ roles: ProjectRoleDistributionEntry[];
290
+ }
190
291
  /**
191
292
  * Project Features model interfaces
192
293
  */
@@ -227,9 +328,20 @@ export declare class Projects extends BaseResource {
227
328
  */
228
329
  list(workspaceSlug: string, params?: ListProjectsParams): Promise<PaginatedResponse<Project>>;
229
330
  /**
230
- * Get project members
331
+ * List projects as a paginated "lite" response, intended for pickers and
332
+ * reference lookups.
333
+ */
334
+ listLite(workspaceSlug: string, params?: ListProjectsLiteParams): Promise<PaginatedResponse<ProjectLite>>;
335
+ /**
336
+ * Get project members with their role information.
231
337
  */
232
- getMembers(workspaceSlug: string, projectId: string): Promise<User[]>;
338
+ getMembers(workspaceSlug: string, projectId: string): Promise<ProjectMember[]>;
339
+ /**
340
+ * List project members as a paginated "lite" response.
341
+ * Unlike getMembers() (which returns a bare list), this returns a
342
+ * cursor-paginated envelope.
343
+ */
344
+ getMembersLite(workspaceSlug: string, projectId: string, params?: ListMembersLiteParams): Promise<PaginatedResponse<ProjectMember>>;
233
345
  /**
234
346
  * Get total work logs for a project
235
347
  */
@@ -267,6 +379,12 @@ export interface WorkItemType extends BaseModel {
267
379
  }
268
380
  export type CreateWorkItemType = Partial<WorkItemType>;
269
381
  export type UpdateWorkItemType = Partial<WorkItemType>;
382
+ /**
383
+ * DTO for linking a property to a workspace work item type
384
+ */
385
+ export interface WorkspaceWorkItemTypePropertyLink {
386
+ property_id: string;
387
+ }
270
388
  export interface CreateModuleRequest {
271
389
  name: string;
272
390
  description?: string;
@@ -324,6 +442,27 @@ export interface ListModulesParamsRequest {
324
442
  limit?: number;
325
443
  offset?: number;
326
444
  }
445
+ /**
446
+ * Lite module shape returned by the read-only modules-lite list endpoint.
447
+ */
448
+ export interface ModuleLite {
449
+ id: string;
450
+ name: string;
451
+ description?: string;
452
+ created_at?: string;
453
+ updated_at?: string;
454
+ deleted_at?: string;
455
+ [key: string]: unknown;
456
+ }
457
+ /**
458
+ * Query params for the paginated modules-lite endpoint.
459
+ */
460
+ export interface ListModulesLiteParams {
461
+ order_by?: string;
462
+ per_page?: number;
463
+ cursor?: string;
464
+ [key: string]: unknown;
465
+ }
327
466
  export interface Label {
328
467
  id?: string;
329
468
  created_at?: string;
@@ -455,7 +594,26 @@ export interface ListWorkItemsParams {
455
594
  assignee?: string;
456
595
  limit?: number;
457
596
  offset?: number;
597
+ /**
598
+ * Plane Query Language expression — a string-based alternative to the
599
+ * structured `filters` object. The two have equivalent expressive power.
600
+ * Example: `priority = "urgent" AND assignee = currentUser()`.
601
+ */
458
602
  pql?: string;
603
+ /**
604
+ * Structured filter expression. Supports nested `and`/`or`/`not` groups and
605
+ * field operators like `__in`, `__gte`, `__range`, `__icontains`. The SDK
606
+ * JSON-encodes this object into the `filters=` query parameter before sending.
607
+ */
608
+ filters?: Record<string, unknown>;
609
+ order_by?: string;
610
+ cursor?: string;
611
+ per_page?: number;
612
+ /** Comma-separated field list to return */
613
+ fields?: string;
614
+ /** Comma-separated relations to expand */
615
+ expand?: string;
616
+ [key: string]: unknown;
459
617
  }
460
618
  export interface WorkItemActivity {
461
619
  id: string;
@@ -503,6 +661,11 @@ export type AdvancedSearchFilter = {
503
661
  export interface AdvancedSearchWorkItem {
504
662
  query?: string;
505
663
  filters?: AdvancedSearchFilter;
664
+ /**
665
+ * Plane Query Language expression. Alternative to `filters` with the same
666
+ * expressive power. The backend accepts either or both.
667
+ */
668
+ pql?: string;
506
669
  limit?: number;
507
670
  }
508
671
  /**
@@ -521,6 +684,84 @@ export interface AdvancedSearchResult {
521
684
  target_date?: string | null;
522
685
  start_date?: string | null;
523
686
  }
687
+ /**
688
+ * Query params for workspace-wide work item count.
689
+ */
690
+ export interface WorkItemCountParams {
691
+ /** JSON-encoded filters object */
692
+ filters?: string;
693
+ /** PQL query string */
694
+ pql?: string;
695
+ group_by?: string;
696
+ sub_group_by?: string;
697
+ [key: string]: unknown;
698
+ }
699
+ export interface WorkItemCountEntry {
700
+ count: number;
701
+ sub_grouped_counts?: Record<string, {
702
+ count: number;
703
+ }>;
704
+ }
705
+ /**
706
+ * Response for GET /workspaces/{slug}/work-items/count.
707
+ * grouped_counts keys are raw ORM field values ("None" for empty).
708
+ */
709
+ export interface WorkItemCountResponse {
710
+ grouped_by?: string | null;
711
+ sub_grouped_by?: string | null;
712
+ total_count: number;
713
+ grouped_counts?: Record<string, WorkItemCountEntry>;
714
+ }
715
+ /**
716
+ * Built-in dependency directions, from the perspective of the work item.
717
+ */
718
+ export type DependencyType = "blocking" | "blocked_by" | "start_before" | "start_after" | "finish_before" | "finish_after";
719
+ /**
720
+ * Work item with an injected relation_type label.
721
+ */
722
+ export interface WorkItemWithRelationType {
723
+ id: string;
724
+ name?: string;
725
+ sequence_id?: number;
726
+ project_id?: string;
727
+ state_id?: string;
728
+ priority?: string;
729
+ type_id?: string;
730
+ is_epic?: boolean;
731
+ relation_type?: string;
732
+ [key: string]: unknown;
733
+ }
734
+ /**
735
+ * Response for GET .../work-items/{id}/dependencies/ grouped by direction.
736
+ */
737
+ export interface WorkItemDependencyResponse {
738
+ blocking: WorkItemWithRelationType[];
739
+ blocked_by: WorkItemWithRelationType[];
740
+ start_before: WorkItemWithRelationType[];
741
+ start_after: WorkItemWithRelationType[];
742
+ finish_before: WorkItemWithRelationType[];
743
+ finish_after: WorkItemWithRelationType[];
744
+ }
745
+ /**
746
+ * Request model for creating work item dependency relations.
747
+ */
748
+ export interface CreateWorkItemDependencyRequest {
749
+ /** Dependency direction from the perspective of this work item */
750
+ relation_type: DependencyType;
751
+ /** UUIDs of work items to create dependencies with (min 1) */
752
+ work_item_ids: string[];
753
+ }
754
+ /**
755
+ * Request model for creating a custom (definition-based) work item relation.
756
+ */
757
+ export interface CreateWorkItemCustomRelationRequest {
758
+ /** UUID of the workspace relation definition */
759
+ relation_definition_id: string;
760
+ /** The outward or inward label of the definition (controls directionality) */
761
+ relation_definition_type: string;
762
+ /** UUIDs of work items to create the relation with (min 1) */
763
+ work_item_ids: string[];
764
+ }
524
765
  /**
525
766
  * Link model interfaces
526
767
  * TODO: Replace with proper types after API verification
@@ -822,6 +1063,109 @@ export declare class WorkLogs extends BaseResource {
822
1063
  */
823
1064
  delete(workspaceSlug: string, projectId: string, workItemId: string, workLogId: string): Promise<void>;
824
1065
  }
1066
+ /**
1067
+ * WorkItemDependencies API resource
1068
+ * Manages work item dependency relations across the six built-in directions:
1069
+ * blocking / blocked_by / start_before / start_after / finish_before / finish_after
1070
+ */
1071
+ declare class Dependencies extends BaseResource {
1072
+ constructor(config: Configuration);
1073
+ /**
1074
+ * List all dependency relations for a work item grouped by direction
1075
+ */
1076
+ list(workspaceSlug: string, projectId: string, workItemId: string): Promise<WorkItemDependencyResponse>;
1077
+ /**
1078
+ * Create one or more dependency relations for a work item
1079
+ */
1080
+ create(workspaceSlug: string, projectId: string, workItemId: string, createDependency: CreateWorkItemDependencyRequest): Promise<WorkItemWithRelationType[]>;
1081
+ /**
1082
+ * Remove a dependency relation between this work item and a target
1083
+ */
1084
+ remove(workspaceSlug: string, projectId: string, workItemId: string, relatedWorkItemId: string): Promise<void>;
1085
+ }
1086
+ /**
1087
+ * WorkItemCustomRelations API resource
1088
+ * Manages custom (definition-based) work item relations.
1089
+ *
1090
+ * Custom relations are workspace-level types defined via the
1091
+ * work-item-relation-definitions endpoint. Each definition has an outward
1092
+ * label and an inward label that controls directionality.
1093
+ */
1094
+ declare class CustomRelations extends BaseResource {
1095
+ constructor(config: Configuration);
1096
+ /**
1097
+ * List all custom relations for a work item grouped by definition label.
1098
+ * Response keys are the outward/inward labels from active workspace relation
1099
+ * definitions (e.g. "implements", "implemented by", "relates to").
1100
+ */
1101
+ list(workspaceSlug: string, projectId: string, workItemId: string): Promise<Record<string, WorkItemWithRelationType[]>>;
1102
+ /**
1103
+ * Create one or more custom relations for a work item
1104
+ */
1105
+ create(workspaceSlug: string, projectId: string, workItemId: string, createRelation: CreateWorkItemCustomRelationRequest): Promise<WorkItemWithRelationType[]>;
1106
+ /**
1107
+ * Remove a custom relation between this work item and a target
1108
+ */
1109
+ remove(workspaceSlug: string, projectId: string, workItemId: string, relatedWorkItemId: string): Promise<void>;
1110
+ }
1111
+ /**
1112
+ * Work item page link model interfaces
1113
+ * Represents a page linked to a work item.
1114
+ */
1115
+ /**
1116
+ * Nested page info returned inside a WorkItemPage response
1117
+ */
1118
+ export interface WorkItemPageLite {
1119
+ id?: string;
1120
+ name?: string;
1121
+ created_at?: string;
1122
+ updated_at?: string;
1123
+ created_by?: string;
1124
+ is_global?: boolean;
1125
+ logo_props?: LogoProps;
1126
+ }
1127
+ /**
1128
+ * Work item to page link
1129
+ */
1130
+ export interface WorkItemPage {
1131
+ id?: string;
1132
+ page?: WorkItemPageLite;
1133
+ issue?: string;
1134
+ project?: string;
1135
+ workspace?: string;
1136
+ created_at?: string;
1137
+ updated_at?: string;
1138
+ created_by?: string;
1139
+ }
1140
+ /**
1141
+ * Request model for linking a page to a work item
1142
+ */
1143
+ export interface CreateWorkItemPageRequest {
1144
+ page_id: string;
1145
+ }
1146
+ /**
1147
+ * WorkItemPages API resource
1148
+ * Manages page links on a work item
1149
+ */
1150
+ declare class Pages extends BaseResource {
1151
+ constructor(config: Configuration);
1152
+ /**
1153
+ * List page links for a work item
1154
+ */
1155
+ list(workspaceSlug: string, projectId: string, workItemId: string, params?: any): Promise<PaginatedResponse<WorkItemPage>>;
1156
+ /**
1157
+ * Retrieve a specific page link for a work item
1158
+ */
1159
+ retrieve(workspaceSlug: string, projectId: string, workItemId: string, workItemPageId: string): Promise<WorkItemPage>;
1160
+ /**
1161
+ * Link a page to a work item
1162
+ */
1163
+ create(workspaceSlug: string, projectId: string, workItemId: string, createPage: CreateWorkItemPageRequest): Promise<WorkItemPage>;
1164
+ /**
1165
+ * Remove a page link from a work item
1166
+ */
1167
+ delete(workspaceSlug: string, projectId: string, workItemId: string, workItemPageId: string): Promise<void>;
1168
+ }
825
1169
  /**
826
1170
  * WorkItems API resource
827
1171
  * Handles all work item (issue) related operations
@@ -833,6 +1177,9 @@ export declare class WorkItems extends BaseResource {
833
1177
  comments: Comments;
834
1178
  activities: Activities;
835
1179
  workLogs: WorkLogs;
1180
+ dependencies: Dependencies;
1181
+ customRelations: CustomRelations;
1182
+ pages: Pages;
836
1183
  constructor(config: Configuration);
837
1184
  /**
838
1185
  * Create a new work item
@@ -849,9 +1196,54 @@ export declare class WorkItems extends BaseResource {
849
1196
  */
850
1197
  delete(workspaceSlug: string, projectId: string, workItemId: string): Promise<void>;
851
1198
  /**
852
- * List work items with optional filtering
1199
+ * List work items in a project with optional filtering.
1200
+ *
1201
+ * Supports rich filtering via `filters` (a structured object, JSON-encoded
1202
+ * into a single `filters=` query param) and `pql` (Plane Query Language).
1203
+ *
1204
+ * @example
1205
+ * ```ts
1206
+ * await client.workItems.list("my-workspace", "project-id", {
1207
+ * filters: { and: [{ priority: "urgent" }, { state_group__in: ["unstarted", "started"] }] },
1208
+ * order_by: "-created_at",
1209
+ * per_page: 50,
1210
+ * });
1211
+ * ```
853
1212
  */
854
1213
  list(workspaceSlug: string, projectId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
1214
+ /**
1215
+ * List work items across an entire workspace.
1216
+ *
1217
+ * Returns a paginated envelope of work items the caller can view, spanning
1218
+ * every project in the workspace (per-project authorization is honored
1219
+ * server-side). Supports the same `filters` and `pql` query params as
1220
+ * {@link WorkItems.list}, plus `order_by`, `cursor`, `per_page`, `fields`,
1221
+ * and `expand`.
1222
+ */
1223
+ listWorkspace(workspaceSlug: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
1224
+ /**
1225
+ * Return the count of work items across an entire workspace.
1226
+ *
1227
+ * Supports `filters`, `pql`, `group_by`, and `sub_group_by` query params.
1228
+ * `grouped_counts` keys are raw ORM field values: UUID strings for FK/M2M
1229
+ * dimensions, plain strings for `priority` / `state__group`, ISO-date strings
1230
+ * for `target_date` / `start_date`. "None" is used for empty values.
1231
+ */
1232
+ countWorkspace(workspaceSlug: string, params?: WorkItemCountParams): Promise<WorkItemCountResponse>;
1233
+ /**
1234
+ * List archived work items in a project.
1235
+ * Supports the same `filters` and `pql` query parameters as list().
1236
+ */
1237
+ listArchived(workspaceSlug: string, projectId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
1238
+ /**
1239
+ * Archive a work item.
1240
+ * Only work items in a completed or cancelled state can be archived.
1241
+ */
1242
+ archive(workspaceSlug: string, projectId: string, workItemId: string): Promise<void>;
1243
+ /**
1244
+ * Unarchive a work item — restore it to active status.
1245
+ */
1246
+ unarchive(workspaceSlug: string, projectId: string, workItemId: string): Promise<void>;
855
1247
  retrieveByIdentifier(workspaceSlug: string, identifier: string): Promise<WorkItemBase>;
856
1248
  retrieveByIdentifier<E extends WorkItemExpandableFieldName>(workspaceSlug: string, identifier: string, expand: E[]): Promise<WorkItem<E>>;
857
1249
  /**
@@ -897,6 +1289,13 @@ export declare class WorkItemTypes extends BaseResource {
897
1289
  * List work item types with optional filtering
898
1290
  */
899
1291
  list(workspaceSlug: string, projectId: string, params?: ListWorkItemTypesParams): Promise<WorkItemType[]>;
1292
+ /**
1293
+ * Import workspace-level work item types into a project.
1294
+ *
1295
+ * @param workItemTypeIds - IDs of the workspace work item types to import.
1296
+ * @returns The resulting project-level work item types after import.
1297
+ */
1298
+ importToProject(workspaceSlug: string, projectId: string, workItemTypeIds: string[]): Promise<WorkItemType[]>;
900
1299
  }
901
1300
  export type WorkItemPropertySettings = TextSettings | undefined;
902
1301
  /**
@@ -1147,6 +1546,36 @@ export declare class WorkItemProperties extends BaseResource {
1147
1546
  * List work item properties with optional filtering
1148
1547
  */
1149
1548
  list(workspaceSlug: string, projectId: string, workItemTypeId: string, params?: ListWorkItemPropertiesParams): Promise<WorkItemProperty[]>;
1549
+ /**
1550
+ * List project-level work item properties (not scoped to a type)
1551
+ */
1552
+ listProject(workspaceSlug: string, projectId: string, params?: ListWorkItemPropertiesParams): Promise<WorkItemProperty[]>;
1553
+ /**
1554
+ * Create a project-level work item property
1555
+ */
1556
+ createProject(workspaceSlug: string, projectId: string, createWorkItemProperty: CreateWorkItemProperty): Promise<WorkItemProperty>;
1557
+ /**
1558
+ * Retrieve a project-level work item property
1559
+ */
1560
+ retrieveProject(workspaceSlug: string, projectId: string, propertyId: string): Promise<WorkItemProperty>;
1561
+ /**
1562
+ * Update a project-level work item property
1563
+ */
1564
+ updateProject(workspaceSlug: string, projectId: string, propertyId: string, updateWorkItemProperty: UpdateWorkItemProperty): Promise<WorkItemProperty>;
1565
+ /**
1566
+ * Delete a project-level work item property
1567
+ */
1568
+ deleteProject(workspaceSlug: string, projectId: string, propertyId: string): Promise<void>;
1569
+ /**
1570
+ * Attach existing project-level properties to a work item type.
1571
+ *
1572
+ * @returns The property ids now attached to the type.
1573
+ */
1574
+ attachToType(workspaceSlug: string, projectId: string, workItemTypeId: string, propertyIds: string[]): Promise<string[]>;
1575
+ /**
1576
+ * Detach a property from a work item type
1577
+ */
1578
+ detachFromType(workspaceSlug: string, projectId: string, workItemTypeId: string, propertyId: string): Promise<void>;
1150
1579
  }
1151
1580
  /**
1152
1581
  * Customer model interfaces
@@ -1282,6 +1711,15 @@ export interface LinkedIssue {
1282
1711
  project_id: string;
1283
1712
  project__identifier: string;
1284
1713
  }
1714
+ /**
1715
+ * Request model for setting several customer property values at once.
1716
+ * Maps property id to its list of values. Every value is sent as a string
1717
+ * regardless of the property's type — dates as YYYY-MM-DD, booleans as
1718
+ * "True"/"False", options and relations as UUIDs.
1719
+ */
1720
+ export interface SetCustomerPropertyValues {
1721
+ customer_property_values: Record<string, string[]>;
1722
+ }
1285
1723
  /**
1286
1724
  * Customer Properties API resource
1287
1725
  * Handles customer property definitions and property value operations
@@ -1312,6 +1750,15 @@ declare class Properties extends BaseResource {
1312
1750
  * Get customer property values
1313
1751
  */
1314
1752
  listValues(workspaceSlug: string, customerId: string, params?: ListCustomerPropertyValuesParams): Promise<CustomPropertyValueResponse>;
1753
+ /**
1754
+ * Set several of a customer's property values at once.
1755
+ *
1756
+ * Acts as an upsert: the properties named are given these values, replacing
1757
+ * any they already held. Properties absent from the payload are untouched.
1758
+ * Every value is sent as a string — dates as YYYY-MM-DD, booleans as
1759
+ * "True"/"False", options and relations as UUIDs.
1760
+ */
1761
+ createValues(workspaceSlug: string, customerId: string, values: SetCustomerPropertyValues): Promise<void>;
1315
1762
  /**
1316
1763
  * Get single property value
1317
1764
  */
@@ -1373,6 +1820,12 @@ export declare class Customers extends BaseResource {
1373
1820
  * Delete a customer
1374
1821
  */
1375
1822
  delete(workspaceSlug: string, customerId: string): Promise<void>;
1823
+ /**
1824
+ * Delete a customer addressed by its external reference
1825
+ * (external_source + external_id query params) instead of its id.
1826
+ * Deleting by an external reference that matches nothing succeeds silently.
1827
+ */
1828
+ deleteByExternalId(workspaceSlug: string, externalSource: string, externalId: string): Promise<void>;
1376
1829
  /**
1377
1830
  * List customers with optional filtering
1378
1831
  */
@@ -1404,12 +1857,17 @@ export interface Page extends BaseModel {
1404
1857
  updated_by?: string;
1405
1858
  [key: string]: any;
1406
1859
  }
1407
- export type CreatePage = Partial<Page>;
1860
+ export type CreatePage = Partial<Page> & {
1861
+ /** Create the page as a sub-page of this parent page */
1862
+ parent_id?: string;
1863
+ /** Create the page directly inside this collection */
1864
+ collection_id?: string;
1865
+ };
1408
1866
  /**
1409
1867
  * Pages API resource
1410
1868
  * Handles both workspace and project page operations
1411
1869
  */
1412
- export declare class Pages extends BaseResource {
1870
+ declare class Pages$1 extends BaseResource {
1413
1871
  constructor(config: Configuration);
1414
1872
  /**
1415
1873
  * Create a workspace page
@@ -1419,6 +1877,10 @@ export declare class Pages extends BaseResource {
1419
1877
  * Get a workspace page by ID
1420
1878
  */
1421
1879
  getWorkspacePage(workspaceSlug: string, pageId: string): Promise<Page>;
1880
+ /**
1881
+ * List workspace pages
1882
+ */
1883
+ listWorkspacePages(workspaceSlug: string, params?: any): Promise<PaginatedResponse<Page>>;
1422
1884
  /**
1423
1885
  * Create a project page
1424
1886
  */
@@ -1427,6 +1889,10 @@ export declare class Pages extends BaseResource {
1427
1889
  * Get a project page by ID
1428
1890
  */
1429
1891
  getProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<Page>;
1892
+ /**
1893
+ * List project pages
1894
+ */
1895
+ listProjectPages(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Page>>;
1430
1896
  /**
1431
1897
  * Retrieve workspace page
1432
1898
  */
@@ -1514,59 +1980,6 @@ export declare class States extends BaseResource {
1514
1980
  */
1515
1981
  list(workspaceSlug: string, projectId: string, params?: ListStatesParams): Promise<PaginatedResponse<State>>;
1516
1982
  }
1517
- /**
1518
- * Member model interfaces
1519
- */
1520
- export interface Member {
1521
- id: string;
1522
- user: string;
1523
- project: string;
1524
- role: string;
1525
- created_at: string;
1526
- updated_at: string;
1527
- }
1528
- export interface CreateMember {
1529
- user: string;
1530
- project: string;
1531
- role: string;
1532
- }
1533
- export interface UpdateMember {
1534
- role?: string;
1535
- }
1536
- export interface ListMembersParams {
1537
- project?: string;
1538
- user?: string;
1539
- role?: string;
1540
- limit?: number;
1541
- offset?: number;
1542
- }
1543
- /**
1544
- * Members API resource
1545
- * Handles all team membership related operations
1546
- */
1547
- export declare class Members extends BaseResource {
1548
- constructor(config: Configuration);
1549
- /**
1550
- * Create a new member
1551
- */
1552
- create(createMember: CreateMember): Promise<Member>;
1553
- /**
1554
- * Retrieve a member by ID
1555
- */
1556
- retrieve(memberId: string): Promise<Member>;
1557
- /**
1558
- * Update a member
1559
- */
1560
- update(memberId: string, updateMember: UpdateMember): Promise<Member>;
1561
- /**
1562
- * Delete a member
1563
- */
1564
- delete(memberId: string): Promise<void>;
1565
- /**
1566
- * List members with optional filtering
1567
- */
1568
- list(params?: ListMembersParams): Promise<Member[]>;
1569
- }
1570
1983
  /**
1571
1984
  * Modules API resource
1572
1985
  * Handles all module related operations
@@ -1594,9 +2007,17 @@ export declare class Modules extends BaseResource {
1594
2007
  */
1595
2008
  list(workspaceSlug: string, projectId: string, params?: ListModulesParamsRequest): Promise<PaginatedResponse<Module>>;
1596
2009
  /**
1597
- * List work items in module
2010
+ * List modules as a paginated "lite" response, intended for pickers and
2011
+ * reference lookups.
2012
+ */
2013
+ listLite(workspaceSlug: string, projectId: string, params?: ListModulesLiteParams): Promise<PaginatedResponse<ModuleLite>>;
2014
+ /**
2015
+ * List work items in a module.
2016
+ *
2017
+ * Supports the same `filters` and `pql` query parameters as
2018
+ * {@link WorkItems.list}.
1598
2019
  */
1599
- listWorkItemsInModule(workspaceSlug: string, projectId: string, moduleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
2020
+ listWorkItemsInModule(workspaceSlug: string, projectId: string, moduleId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
1600
2021
  /**
1601
2022
  * Add work items to module
1602
2023
  */
@@ -1681,22 +2102,47 @@ export interface TransferCycleIssueRequestRequest {
1681
2102
  new_cycle_id: string;
1682
2103
  }
1683
2104
  /**
1684
- * Cycles API resource
1685
- * Handles all cycle (sprint) related operations
2105
+ * Lite cycle shape returned by the read-only cycles-lite list endpoint.
1686
2106
  */
1687
- export declare class Cycles extends BaseResource {
1688
- constructor(config: Configuration);
1689
- /**
1690
- * Create a new cycle
1691
- */
1692
- create(workspaceSlug: string, projectId: string, createCycle: CreateCycleRequest): Promise<Cycle>;
1693
- /**
1694
- * Retrieve a cycle by ID
1695
- */
1696
- retrieve(workspaceSlug: string, projectId: string, cycleId: string): Promise<Cycle>;
1697
- /**
1698
- * Update a cycle
1699
- */
2107
+ export interface CycleLite {
2108
+ id: string;
2109
+ name: string;
2110
+ description?: string;
2111
+ start_date?: string;
2112
+ end_date?: string;
2113
+ created_at?: string;
2114
+ updated_at?: string;
2115
+ deleted_at?: string;
2116
+ [key: string]: unknown;
2117
+ }
2118
+ /**
2119
+ * Query params for the paginated cycles-lite endpoint.
2120
+ */
2121
+ export interface ListCyclesLiteParams {
2122
+ /** Filter by cycle status: current | upcoming | completed | draft */
2123
+ status?: string;
2124
+ order_by?: string;
2125
+ per_page?: number;
2126
+ cursor?: string;
2127
+ [key: string]: unknown;
2128
+ }
2129
+ /**
2130
+ * Cycles API resource
2131
+ * Handles all cycle (sprint) related operations
2132
+ */
2133
+ export declare class Cycles extends BaseResource {
2134
+ constructor(config: Configuration);
2135
+ /**
2136
+ * Create a new cycle
2137
+ */
2138
+ create(workspaceSlug: string, projectId: string, createCycle: CreateCycleRequest): Promise<Cycle>;
2139
+ /**
2140
+ * Retrieve a cycle by ID
2141
+ */
2142
+ retrieve(workspaceSlug: string, projectId: string, cycleId: string): Promise<Cycle>;
2143
+ /**
2144
+ * Update a cycle
2145
+ */
1700
2146
  update(workspaceSlug: string, projectId: string, cycleId: string, updateCycle: UpdateCycleRequest): Promise<Cycle>;
1701
2147
  /**
1702
2148
  * Delete a cycle
@@ -1706,6 +2152,11 @@ export declare class Cycles extends BaseResource {
1706
2152
  * List cycles with optional filtering
1707
2153
  */
1708
2154
  list(workspaceSlug: string, projectId: string): Promise<PaginatedResponse<Cycle>>;
2155
+ /**
2156
+ * List cycles as a paginated "lite" response, intended for pickers and
2157
+ * reference lookups. Accepts an optional status filter.
2158
+ */
2159
+ listLite(workspaceSlug: string, projectId: string, params?: ListCyclesLiteParams): Promise<PaginatedResponse<CycleLite>>;
1709
2160
  /**
1710
2161
  * List archived cycles
1711
2162
  */
@@ -1719,9 +2170,12 @@ export declare class Cycles extends BaseResource {
1719
2170
  */
1720
2171
  archive(workspaceSlug: string, projectId: string, cycleId: string): Promise<void>;
1721
2172
  /**
1722
- * List work items in cycle
2173
+ * List work items in a cycle.
2174
+ *
2175
+ * Supports the same `filters` and `pql` query parameters as
2176
+ * {@link WorkItems.list}.
1723
2177
  */
1724
- listWorkItemsInCycle(workspaceSlug: string, projectId: string, cycleId: string, params?: any): Promise<PaginatedResponse<WorkItem>>;
2178
+ listWorkItemsInCycle(workspaceSlug: string, projectId: string, cycleId: string, params?: ListWorkItemsParams): Promise<PaginatedResponse<WorkItem>>;
1725
2179
  /**
1726
2180
  * Add work items to cycle
1727
2181
  */
@@ -1745,6 +2199,10 @@ export declare class Users extends BaseResource {
1745
2199
  * Get current user information
1746
2200
  */
1747
2201
  me(): Promise<User>;
2202
+ /**
2203
+ * Upload a user asset (avatar or cover)
2204
+ */
2205
+ uploadAsset(assetData: UserAssetUploadRequest): Promise<UserAssetUploadResponse>;
1748
2206
  }
1749
2207
  /**
1750
2208
  * Workspace Features model interfaces
@@ -1765,9 +2223,21 @@ export type UpdateWorkspaceFeatures = Partial<WorkspaceFeatures>;
1765
2223
  export declare class Workspace extends BaseResource {
1766
2224
  constructor(config: Configuration);
1767
2225
  /**
1768
- * Get workspace members
2226
+ * Get workspace members with their role information.
2227
+ */
2228
+ getMembers(workspaceSlug: string): Promise<WorkspaceMember[]>;
2229
+ /**
2230
+ * List workspace members as a paginated "lite" response.
2231
+ * Unlike getMembers() (which returns a bare list), this returns a
2232
+ * cursor-paginated envelope.
2233
+ */
2234
+ getMembersLite(workspaceSlug: string, params?: ListMembersLiteParams): Promise<PaginatedResponse<WorkspaceMember>>;
2235
+ /**
2236
+ * Aggregate count of project members by role across the workspace.
2237
+ * Counts span all active (non-archived) projects and include both built-in
2238
+ * and custom roles.
1769
2239
  */
1770
- getMembers(workspaceSlug: string): Promise<User[]>;
2240
+ getProjectRoleDistribution(workspaceSlug: string): Promise<ProjectRoleDistribution>;
1771
2241
  /**
1772
2242
  * Retrieve workspace features
1773
2243
  */
@@ -1777,683 +2247,1856 @@ export declare class Workspace extends BaseResource {
1777
2247
  */
1778
2248
  updateFeatures(workspaceSlug: string, updateFeatures: UpdateWorkspaceFeatures): Promise<WorkspaceFeatures>;
1779
2249
  }
1780
- export interface Epic {
1781
- id?: string;
1782
- deleted_at?: string;
1783
- created_at?: string;
1784
- updated_at?: string;
1785
- point?: number;
2250
+ /**
2251
+ * Estimate model interfaces
2252
+ * An estimate is the sizing scale configured for a project (categories, points, or time).
2253
+ */
2254
+ export type EstimateType = "categories" | "points" | "time";
2255
+ export interface Estimate {
2256
+ id: string;
1786
2257
  name: string;
1787
- description?: any;
1788
- description_html?: string;
1789
- description_stripped?: string;
1790
- description_binary?: string;
1791
- priority?: PriorityEnum;
1792
- start_date?: string;
1793
- target_date?: string;
1794
- sequence_id?: number;
1795
- sort_order?: number;
1796
- completed_at?: string;
1797
- archived_at?: string;
1798
- is_draft?: boolean;
1799
- external_source?: string;
2258
+ description?: string;
2259
+ type?: EstimateType;
2260
+ last_used?: boolean;
1800
2261
  external_id?: string;
2262
+ external_source?: string;
2263
+ created_at?: string;
2264
+ updated_at?: string;
1801
2265
  created_by?: string;
1802
2266
  updated_by?: string;
1803
- project: string;
1804
- workspace: string;
1805
- parent?: string;
1806
- state?: string;
1807
- estimate_point?: string;
1808
- type?: string;
1809
- assignees?: string[];
1810
- labels?: string[];
2267
+ project?: string;
2268
+ workspace?: string;
2269
+ }
2270
+ export interface CreateEstimateRequest {
2271
+ name: string;
2272
+ description?: string;
2273
+ type?: EstimateType;
2274
+ last_used?: boolean;
2275
+ external_id?: string;
2276
+ external_source?: string;
1811
2277
  }
1812
2278
  /**
1813
- * Epics API resource
1814
- * Handles all epic-related operations
2279
+ * Only name, description, external_id, and external_source are updatable.
1815
2280
  */
1816
- export declare class Epics extends BaseResource {
1817
- constructor(config: Configuration);
1818
- /**
1819
- * Retrieve an epic by ID
1820
- */
1821
- retrieve(workspaceSlug: string, projectId: string, epicId: string): Promise<Epic>;
1822
- /**
1823
- * List epics with optional filtering
1824
- */
1825
- list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Epic>>;
2281
+ export interface UpdateEstimateRequest {
2282
+ name?: string;
2283
+ description?: string;
2284
+ external_id?: string;
2285
+ external_source?: string;
1826
2286
  }
1827
- export interface IntakeWorkItem {
2287
+ /**
2288
+ * An individual value within an estimate scale (e.g. "1", "2", "3" for story points).
2289
+ */
2290
+ export interface EstimatePoint {
1828
2291
  id: string;
1829
- issue_detail?: WorkItem;
1830
- inbox?: string;
2292
+ estimate?: string;
2293
+ key?: number;
2294
+ value: string;
2295
+ description?: string;
2296
+ external_id?: string;
2297
+ external_source?: string;
1831
2298
  created_at?: string;
1832
2299
  updated_at?: string;
1833
- deleted_at?: string;
1834
- status?: IntakeWorkItemStatusEnum;
1835
- snoozed_till?: string;
1836
- source?: string;
1837
- source_email?: string;
1838
- external_source?: string;
1839
- external_id?: string;
1840
- extra?: any;
1841
2300
  created_by?: string;
1842
2301
  updated_by?: string;
1843
2302
  project?: string;
1844
2303
  workspace?: string;
1845
- intake: string;
1846
- issue?: string;
1847
- duplicate_to?: string;
1848
- }
1849
- export interface IntakeWorkItemCreateRequest {
1850
- issue: WorkItemForIntakeRequest;
1851
- intake?: string;
1852
- status?: IntakeWorkItemStatusEnum;
1853
- snoozed_till?: string;
1854
- duplicate_to?: string;
1855
- source?: string;
1856
- source_email?: string;
1857
2304
  }
1858
- export type IntakeWorkItemStatusEnum = number;
1859
- export interface WorkItemForIntakeRequest {
1860
- name: string;
1861
- description_html?: string;
1862
- priority?: PriorityEnum;
2305
+ export interface CreateEstimatePointRequest {
2306
+ /** Max length 20 characters */
2307
+ value: string;
2308
+ key?: number;
2309
+ description?: string;
2310
+ external_id?: string;
2311
+ external_source?: string;
1863
2312
  }
1864
- export interface UpdateIntakeWorkItemRequest {
1865
- status?: IntakeWorkItemStatusEnum;
1866
- snoozed_till?: string;
1867
- duplicate_to?: string;
1868
- source?: string;
1869
- source_email?: string;
1870
- issue?: WorkItemForIntakeRequest;
2313
+ export interface UpdateEstimatePointRequest {
2314
+ key?: number;
2315
+ /** Max length 20 characters */
2316
+ value?: string;
2317
+ description?: string;
2318
+ external_id?: string;
2319
+ external_source?: string;
1871
2320
  }
1872
2321
  /**
1873
- * Intake API resource
1874
- * Handles all intake issue operations
2322
+ * Estimates API resource
2323
+ * Manages project estimates and estimate points
1875
2324
  */
1876
- export declare class Intake extends BaseResource {
2325
+ export declare class Estimates extends BaseResource {
1877
2326
  constructor(config: Configuration);
1878
2327
  /**
1879
- * Retrieve an intake issue by ID
1880
- */
1881
- retrieve(workspaceSlug: string, projectId: string, intakeId: string): Promise<IntakeWorkItem>;
1882
- /**
1883
- * List intake issues
2328
+ * Create a new estimate for a project
1884
2329
  */
1885
- list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<IntakeWorkItem>>;
2330
+ create(workspaceSlug: string, projectId: string, createEstimate: CreateEstimateRequest): Promise<Estimate>;
1886
2331
  /**
1887
- * Create an intake issue
2332
+ * Retrieve the estimate configured for a project
1888
2333
  */
1889
- create(workspaceSlug: string, projectId: string, intakeData: IntakeWorkItemCreateRequest): Promise<IntakeWorkItem>;
2334
+ retrieve(workspaceSlug: string, projectId: string): Promise<Estimate>;
1890
2335
  /**
1891
- * Update an intake issue
2336
+ * Update the estimate for a project
1892
2337
  */
1893
- update(workspaceSlug: string, projectId: string, intakeId: string, updateData: UpdateIntakeWorkItemRequest): Promise<IntakeWorkItem>;
2338
+ update(workspaceSlug: string, projectId: string, updateEstimate: UpdateEstimateRequest): Promise<Estimate>;
1894
2339
  /**
1895
- * Delete an intake issue
2340
+ * Delete the estimate for a project
1896
2341
  */
1897
- delete(workspaceSlug: string, projectId: string, intakeId: string): Promise<void>;
1898
- }
1899
- /**
1900
- * Sticky model interfaces
1901
- */
1902
- export interface Sticky extends BaseModel {
1903
- name?: string;
1904
- description?: Record<string, any>;
1905
- description_html?: string;
1906
- description_stripped?: string;
1907
- description_binary?: string;
1908
- logo_props?: LogoProps;
1909
- color?: string;
1910
- background_color?: string;
1911
- workspace: string;
1912
- owner: string;
1913
- sort_order: number;
1914
- }
1915
- 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">;
1916
- export type UpdateSticky = Partial<CreateSticky>;
1917
- export interface ListStickiesParams {
1918
- limit?: number;
1919
- offset?: number;
1920
- [key: string]: any;
1921
- }
1922
- /**
1923
- * Sticky API resource
1924
- * Handles all sticky related operations
1925
- */
1926
- export declare class Stickies extends BaseResource {
1927
- constructor(config: Configuration);
2342
+ delete(workspaceSlug: string, projectId: string): Promise<void>;
1928
2343
  /**
1929
- * Create a new sticky
2344
+ * Link an estimate to a project so it becomes the active estimate system.
2345
+ * Delegates to the project update endpoint (PATCH .../projects/{projectId}).
1930
2346
  */
1931
- create(workspaceSlug: string, createSticky: CreateSticky): Promise<Sticky>;
2347
+ linkToProject(workspaceSlug: string, projectId: string, estimateId: string): Promise<Project>;
1932
2348
  /**
1933
- * Retrieve a sticky by ID
2349
+ * List all estimate points for a project estimate
1934
2350
  */
1935
- retrieve(workspaceSlug: string, stickyId: string): Promise<Sticky>;
2351
+ listPoints(workspaceSlug: string, projectId: string, estimateId: string): Promise<EstimatePoint[]>;
1936
2352
  /**
1937
- * Update a sticky
2353
+ * Create estimate points for a project estimate.
2354
+ * The API accepts a JSON array directly as the request body.
1938
2355
  */
1939
- update(workspaceSlug: string, stickyId: string, updateSticky: UpdateSticky): Promise<Sticky>;
2356
+ createPoints(workspaceSlug: string, projectId: string, estimateId: string, points: CreateEstimatePointRequest[]): Promise<EstimatePoint[]>;
1940
2357
  /**
1941
- * Delete a sticky
2358
+ * Update a single estimate point
1942
2359
  */
1943
- delete(workspaceSlug: string, stickyId: string): Promise<void>;
2360
+ updatePoint(workspaceSlug: string, projectId: string, estimateId: string, estimatePointId: string, updatePoint: UpdateEstimatePointRequest): Promise<EstimatePoint>;
1944
2361
  /**
1945
- * List stickies with optional filtering
2362
+ * Delete a single estimate point
1946
2363
  */
1947
- list(workspaceSlug: string, params?: ListStickiesParams): Promise<PaginatedResponse<Sticky>>;
2364
+ deletePoint(workspaceSlug: string, projectId: string, estimateId: string, estimatePointId: string): Promise<void>;
1948
2365
  }
1949
2366
  /**
1950
- * Teamspace model interfaces
2367
+ * Role model interfaces
2368
+ *
2369
+ * Roles are defined at the workspace level. namespace "workspace" covers
2370
+ * workspace-level roles (Owner / Admin / Member / Guest); namespace "project"
2371
+ * covers the project-role definitions shared by every project in the workspace
2372
+ * (Admin / Contributor / Commenter / Guest).
1951
2373
  */
1952
- export interface Teamspace extends BaseModel {
1953
- name: string;
1954
- description_json?: Record<string, any>;
1955
- description_html?: string;
1956
- description_stripped?: string;
1957
- description_binary?: string;
1958
- logo_props?: LogoProps;
1959
- lead?: string;
1960
- workspace: string;
1961
- }
1962
- export type CreateTeamspace = Omit<Teamspace, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
1963
- export type UpdateTeamspace = Partial<CreateTeamspace>;
1964
- export interface ListTeamspacesParams {
1965
- limit?: number;
1966
- offset?: number;
1967
- [key: string]: any;
1968
- }
1969
- export interface AddTeamspaceProjectsRequest {
1970
- project_ids: string[];
1971
- }
1972
- export interface RemoveTeamspaceProjectsRequest {
1973
- project_ids: string[];
1974
- }
1975
- export interface AddTeamspaceMembersRequest {
1976
- member_ids: string[];
2374
+ export type RoleNamespace = "workspace" | "project";
2375
+ export interface Role {
2376
+ id?: string;
2377
+ name?: string;
2378
+ /**
2379
+ * Stable identifier to use in code. Not globally unique — e.g. "admin" and
2380
+ * "guest" exist in both namespaces — so key roles by (namespace, slug).
2381
+ */
2382
+ slug?: string;
2383
+ namespace?: RoleNamespace | string;
2384
+ level?: number;
2385
+ is_system?: boolean;
2386
+ [key: string]: unknown;
1977
2387
  }
1978
- export interface RemoveTeamspaceMembersRequest {
1979
- member_ids: string[];
2388
+ export interface ListRolesParams {
2389
+ /** Filter by namespace. When omitted, both are returned. */
2390
+ namespace?: RoleNamespace;
2391
+ /** Number of results per page (server default 20) */
2392
+ per_page?: number;
2393
+ /** Pagination cursor from a previous response's next_cursor */
2394
+ cursor?: string;
1980
2395
  }
1981
2396
  /**
1982
- * Teamspace Projects API resource
1983
- * Handles teamspace project relationships
2397
+ * Roles API resource
2398
+ * Read-only access to workspace and project role definitions.
2399
+ *
2400
+ * Roles are defined at the workspace level. The project-role definitions are
2401
+ * shared by every project in the workspace — there is no per-project roles
2402
+ * endpoint, so this resource takes no project id.
1984
2403
  */
1985
- declare class Projects$1 extends BaseResource {
2404
+ export declare class Roles extends BaseResource {
1986
2405
  constructor(config: Configuration);
1987
2406
  /**
1988
- * Get projects associated with a teamspace
1989
- */
1990
- list(workspaceSlug: string, teamspaceId: string, params?: {
1991
- limit?: number;
1992
- offset?: number;
1993
- }): Promise<PaginatedResponse<Project>>;
1994
- /**
1995
- * Add projects to a teamspace
2407
+ * List role definitions in a workspace.
2408
+ * Filter with params.namespace ("workspace" | "project"); when omitted,
2409
+ * both are returned, ordered by namespace, sort order, then name.
1996
2410
  */
1997
- add(workspaceSlug: string, teamspaceId: string, addProjects: AddTeamspaceProjectsRequest): Promise<Project[]>;
2411
+ list(workspaceSlug: string, params?: ListRolesParams): Promise<PaginatedResponse<Role>>;
1998
2412
  /**
1999
- * Remove projects from a teamspace
2413
+ * Retrieve a single role definition by id
2000
2414
  */
2001
- remove(workspaceSlug: string, teamspaceId: string, removeProjects: RemoveTeamspaceProjectsRequest): Promise<void>;
2415
+ retrieve(workspaceSlug: string, roleId: string): Promise<Role>;
2002
2416
  }
2003
2417
  /**
2004
- * Teamspace Members API resource
2005
- * Handles teamspace member relationships
2418
+ * Collection model interfaces
2419
+ * A collection is a folder that groups workspace pages.
2006
2420
  */
2007
- declare class Members$1 extends BaseResource {
2008
- constructor(config: Configuration);
2009
- /**
2010
- * Get members associated with a teamspace
2011
- */
2012
- list(workspaceSlug: string, teamspaceId: string, params?: {
2013
- limit?: number;
2014
- offset?: number;
2015
- }): Promise<PaginatedResponse<User>>;
2421
+ /** Access level of a collection: 0 = public, 1 = private */
2422
+ export declare const CollectionAccess: {
2423
+ readonly PUBLIC: 0;
2424
+ readonly PRIVATE: 1;
2425
+ };
2426
+ export type CollectionAccessEnum = (typeof CollectionAccess)[keyof typeof CollectionAccess];
2427
+ /** Access level of a member within a collection: 0 = view, 1 = comment, 2 = edit */
2428
+ export declare const CollectionMemberAccess: {
2429
+ readonly VIEW: 0;
2430
+ readonly COMMENT: 1;
2431
+ readonly EDIT: 2;
2432
+ };
2433
+ export type CollectionMemberAccessEnum = (typeof CollectionMemberAccess)[keyof typeof CollectionMemberAccess];
2434
+ export interface Collection {
2435
+ id: string;
2436
+ name?: string;
2437
+ owned_by_id?: string;
2438
+ access?: CollectionAccessEnum;
2439
+ current_user_access?: CollectionMemberAccessEnum;
2440
+ has_pages?: boolean;
2441
+ is_default?: boolean;
2442
+ is_global?: boolean;
2443
+ logo_props?: LogoProps;
2444
+ sort_order?: number;
2445
+ workspace?: string;
2446
+ created_at?: string;
2447
+ updated_at?: string;
2448
+ created_by?: string;
2449
+ updated_by?: string;
2450
+ [key: string]: unknown;
2451
+ }
2452
+ export interface CreateCollection {
2453
+ name: string;
2454
+ access?: CollectionAccessEnum;
2455
+ logo_props?: LogoProps;
2456
+ }
2457
+ /**
2458
+ * Request model for updating a collection.
2459
+ * Deliberately has no `access` field — the API rejects (400) any attempt to
2460
+ * change a collection's access level after creation.
2461
+ */
2462
+ export interface UpdateCollection {
2463
+ name?: string;
2464
+ logo_props?: LogoProps;
2465
+ sort_order?: number;
2466
+ }
2467
+ export interface CollectionMember {
2468
+ id: string;
2469
+ collection?: string;
2470
+ member?: string;
2471
+ access?: CollectionMemberAccessEnum;
2472
+ workspace?: string;
2473
+ created_at?: string;
2474
+ updated_at?: string;
2475
+ created_by?: string;
2476
+ updated_by?: string;
2477
+ [key: string]: unknown;
2478
+ }
2479
+ export interface CreateCollectionMember {
2480
+ /** User id of the member to add */
2481
+ member: string;
2482
+ access: CollectionMemberAccessEnum;
2483
+ }
2484
+ export interface UpdateCollectionMember {
2485
+ access: CollectionMemberAccessEnum;
2486
+ }
2487
+ /**
2488
+ * Flat page-collection membership record, returned by the move/reorder endpoint.
2489
+ */
2490
+ export interface CollectionPage {
2491
+ id: string;
2492
+ collection?: string;
2493
+ page?: string;
2494
+ workspace?: string;
2495
+ sort_order?: number;
2496
+ created_at?: string;
2497
+ updated_at?: string;
2498
+ created_by?: string;
2499
+ updated_by?: string;
2500
+ [key: string]: unknown;
2501
+ }
2502
+ /**
2503
+ * Nested page object inside a CollectionBranchPage row.
2504
+ */
2505
+ export interface CollectionBranchPageDetail {
2506
+ id?: string;
2507
+ name?: string;
2508
+ logo_props?: LogoProps;
2509
+ [key: string]: unknown;
2510
+ }
2511
+ /**
2512
+ * A row in the list-pages-in-collection response, with a nested page object.
2513
+ */
2514
+ export interface CollectionBranchPage {
2515
+ page_collection_id?: string;
2516
+ collection_id?: string;
2517
+ parent_id?: string;
2518
+ sort_order?: number;
2519
+ page?: CollectionBranchPageDetail;
2520
+ [key: string]: unknown;
2521
+ }
2522
+ export interface AddCollectionPages {
2523
+ page_ids: string[];
2524
+ /** Optional explicit sort order per page id */
2525
+ sort_orders?: Record<string, number>;
2526
+ placement?: Record<string, unknown>;
2527
+ }
2528
+ /**
2529
+ * Request model for moving/reordering a page within or between collections.
2530
+ * Omit `collection` entirely to reorder the page within its current collection
2531
+ * — setting it triggers a move to that target collection.
2532
+ */
2533
+ export interface UpdateCollectionPage {
2534
+ collection?: string;
2535
+ sort_order?: number;
2536
+ placement?: Record<string, unknown>;
2537
+ }
2538
+ /**
2539
+ * A page eligible to be added to a collection.
2540
+ */
2541
+ export interface CollectionPageSearchResult {
2542
+ id: string;
2543
+ name?: string;
2544
+ logo_props?: LogoProps;
2545
+ [key: string]: unknown;
2546
+ }
2547
+ /**
2548
+ * Query params for the list-pages-in-collection endpoint.
2549
+ */
2550
+ export interface ListCollectionPagesParams {
2551
+ /** Case-insensitive substring filter on page name */
2552
+ search?: string;
2016
2553
  /**
2017
- * Add members to a teamspace
2554
+ * Filter to direct children of this page within the collection.
2555
+ * Omit to return only top-level (non-sub) pages.
2018
2556
  */
2019
- add(workspaceSlug: string, teamspaceId: string, addMembers: AddTeamspaceMembersRequest): Promise<User[]>;
2557
+ parent_id?: string;
2558
+ per_page?: number;
2559
+ cursor?: string;
2560
+ [key: string]: unknown;
2561
+ }
2562
+ /**
2563
+ * CollectionMembers sub-resource
2564
+ * Manages members of a (typically private) collection
2565
+ */
2566
+ declare class Members extends BaseResource {
2567
+ constructor(config: Configuration);
2020
2568
  /**
2021
- * Remove members from a teamspace
2569
+ * List members of a collection
2022
2570
  */
2023
- remove(workspaceSlug: string, teamspaceId: string, removeMembers: RemoveTeamspaceMembersRequest): Promise<void>;
2571
+ list(workspaceSlug: string, collectionId: string): Promise<CollectionMember[]>;
2572
+ /**
2573
+ * Add a member to a collection
2574
+ */
2575
+ add(workspaceSlug: string, collectionId: string, memberData: CreateCollectionMember): Promise<CollectionMember>;
2576
+ /**
2577
+ * Update a collection member's access level.
2578
+ *
2579
+ * @param memberId - UUID of the CollectionMember row (not the user id)
2580
+ */
2581
+ update(workspaceSlug: string, collectionId: string, memberId: string, memberData: UpdateCollectionMember): Promise<CollectionMember>;
2582
+ /**
2583
+ * Remove a member from a collection.
2584
+ *
2585
+ * @param memberId - UUID of the CollectionMember row (not the user id)
2586
+ */
2587
+ remove(workspaceSlug: string, collectionId: string, memberId: string): Promise<void>;
2024
2588
  }
2025
2589
  /**
2026
- * Teamspaces API resource
2027
- * Handles all teamspace-related operations
2590
+ * CollectionPages sub-resource
2591
+ * Manages the pages that belong to a collection
2028
2592
  */
2029
- export declare class Teamspaces extends BaseResource {
2030
- projects: Projects$1;
2031
- members: Members$1;
2593
+ declare class Pages$2 extends BaseResource {
2032
2594
  constructor(config: Configuration);
2033
2595
  /**
2034
- * Create a new teamspace
2596
+ * List pages that belong to a collection.
2597
+ * Without `parent_id`, returns only top-level (non-sub) pages.
2035
2598
  */
2036
- create(workspaceSlug: string, createTeamspace: CreateTeamspace): Promise<Teamspace>;
2599
+ list(workspaceSlug: string, collectionId: string, params?: ListCollectionPagesParams): Promise<PaginatedResponse<CollectionBranchPage>>;
2037
2600
  /**
2038
- * Retrieve a teamspace by ID
2601
+ * Add existing page(s) to a collection
2039
2602
  */
2040
- retrieve(workspaceSlug: string, teamspaceId: string): Promise<Teamspace>;
2603
+ add(workspaceSlug: string, collectionId: string, pagesData: AddCollectionPages): Promise<CollectionPage[]>;
2041
2604
  /**
2042
- * Update a teamspace
2605
+ * Search pages that are not yet in a collection, to add them.
2606
+ *
2607
+ * @param search - Optional case-insensitive substring filter on page name
2043
2608
  */
2044
- update(workspaceSlug: string, teamspaceId: string, updateTeamspace: UpdateTeamspace): Promise<Teamspace>;
2609
+ search(workspaceSlug: string, collectionId: string, search?: string): Promise<CollectionPageSearchResult[]>;
2045
2610
  /**
2046
- * Delete a teamspace
2611
+ * Move a page to a different collection, or reorder it within the current one.
2612
+ * Omit `collection` in the payload to just reorder.
2613
+ *
2614
+ * @param pageCollectionId - UUID of the page-collection membership row
2047
2615
  */
2048
- delete(workspaceSlug: string, teamspaceId: string): Promise<void>;
2616
+ update(workspaceSlug: string, collectionId: string, pageCollectionId: string, updateData: UpdateCollectionPage): Promise<CollectionPage>;
2049
2617
  /**
2050
- * List teamspaces with optional filtering
2618
+ * Remove a page from a collection (does not delete the page itself).
2619
+ *
2620
+ * @param pageCollectionId - UUID of the page-collection membership row
2051
2621
  */
2052
- list(workspaceSlug: string, params?: ListTeamspacesParams): Promise<PaginatedResponse<Teamspace>>;
2053
- }
2054
- export declare enum InitiativeState {
2055
- DRAFT = "DRAFT",
2056
- PLANNED = "PLANNED",
2057
- ACTIVE = "ACTIVE",
2058
- COMPLETED = "COMPLETED",
2059
- CLOSED = "CLOSED"
2622
+ remove(workspaceSlug: string, collectionId: string, pageCollectionId: string): Promise<void>;
2060
2623
  }
2061
2624
  /**
2062
- * Initiative model interfaces
2625
+ * Collections API resource
2626
+ * Manages collections (folders that group workspace pages) with member and
2627
+ * page sub-resources
2063
2628
  */
2064
- export interface Initiative extends BaseModel {
2629
+ export declare class Collections extends BaseResource {
2630
+ members: Members;
2631
+ pages: Pages$2;
2632
+ constructor(config: Configuration);
2633
+ /**
2634
+ * List all collections in a workspace
2635
+ */
2636
+ list(workspaceSlug: string): Promise<Collection[]>;
2637
+ /**
2638
+ * Create a new collection in a workspace
2639
+ */
2640
+ create(workspaceSlug: string, createCollection: CreateCollection): Promise<Collection>;
2641
+ /**
2642
+ * Retrieve a collection by ID
2643
+ */
2644
+ retrieve(workspaceSlug: string, collectionId: string): Promise<Collection>;
2645
+ /**
2646
+ * Update a collection's name, logo, or sort order.
2647
+ * A collection's access level cannot be changed after creation.
2648
+ */
2649
+ update(workspaceSlug: string, collectionId: string, updateCollection: UpdateCollection): Promise<Collection>;
2650
+ /**
2651
+ * Delete a collection.
2652
+ *
2653
+ * @param archivePages - Whether to archive the collection's pages instead of
2654
+ * leaving them unfiled. Omit to use the server's default (true). Private
2655
+ * collections always archive their pages regardless.
2656
+ */
2657
+ delete(workspaceSlug: string, collectionId: string, archivePages?: boolean): Promise<void>;
2658
+ }
2659
+ export interface Epic {
2660
+ id?: string;
2661
+ deleted_at?: string;
2662
+ created_at?: string;
2663
+ updated_at?: string;
2664
+ point?: number;
2065
2665
  name: string;
2066
- description?: string;
2666
+ description?: any;
2067
2667
  description_html?: string;
2068
2668
  description_stripped?: string;
2069
2669
  description_binary?: string;
2070
- lead?: string;
2670
+ priority?: PriorityEnum;
2071
2671
  start_date?: string;
2072
- end_date?: string;
2073
- logo_props?: LogoProps;
2074
- state?: InitiativeState;
2672
+ target_date?: string;
2673
+ sequence_id?: number;
2674
+ sort_order?: number;
2675
+ completed_at?: string;
2676
+ archived_at?: string;
2677
+ is_draft?: boolean;
2678
+ external_source?: string;
2679
+ external_id?: string;
2680
+ created_by?: string;
2681
+ updated_by?: string;
2682
+ project: string;
2075
2683
  workspace: string;
2684
+ parent?: string;
2685
+ state?: string;
2686
+ estimate_point?: string;
2687
+ type?: string;
2688
+ assignees?: string[];
2689
+ labels?: string[];
2076
2690
  }
2077
- export type CreateInitiative = Omit<Initiative, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
2078
- export type UpdateInitiative = Partial<CreateInitiative>;
2079
- export interface ListInitiativesParams {
2080
- limit?: number;
2081
- offset?: number;
2082
- [key: string]: any;
2083
- }
2084
- export interface AddInitiativeLabelsRequest {
2085
- label_ids: string[];
2086
- }
2087
- export interface RemoveInitiativeLabelsRequest {
2088
- label_ids: string[];
2089
- }
2090
- export interface AddInitiativeProjectsRequest {
2091
- project_ids: string[];
2092
- }
2093
- export interface RemoveInitiativeProjectsRequest {
2094
- project_ids: string[];
2095
- }
2096
- export interface AddInitiativeEpicsRequest {
2097
- epic_ids: string[];
2691
+ export interface CreateEpic {
2692
+ name: string;
2693
+ description_html?: string;
2694
+ state_id?: string;
2695
+ parent_id?: string;
2696
+ assignee_ids?: string[];
2697
+ label_ids?: string[];
2698
+ priority?: PriorityEnum;
2699
+ start_date?: string;
2700
+ target_date?: string;
2701
+ estimate_point?: string;
2702
+ external_source?: string;
2703
+ external_id?: string;
2098
2704
  }
2099
- export interface RemoveInitiativeEpicsRequest {
2100
- epic_ids: string[];
2705
+ export type UpdateEpic = Partial<CreateEpic>;
2706
+ export interface AddEpicWorkItems {
2707
+ work_item_ids: string[];
2101
2708
  }
2102
2709
  /**
2103
- * InitiativeLabel model interfaces
2710
+ * A work item nested under an epic, as returned by the epic issues endpoints.
2104
2711
  */
2105
- export interface InitiativeLabel extends BaseModel {
2712
+ export interface EpicIssue {
2713
+ id: string;
2714
+ type_id?: string | null;
2715
+ parent?: string | null;
2716
+ created_at?: string;
2717
+ updated_at?: string;
2718
+ deleted_at?: string | null;
2719
+ point?: number | null;
2106
2720
  name: string;
2107
- description?: string;
2108
- color?: string;
2109
- sort_order: number;
2110
- workspace: string;
2111
- }
2112
- export type CreateInitiativeLabel = Omit<InitiativeLabel, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace"> & {
2721
+ description_html?: string;
2722
+ description_stripped?: string;
2723
+ description_binary?: string | null;
2724
+ priority?: PriorityEnum;
2725
+ start_date?: string | null;
2726
+ target_date?: string | null;
2727
+ sequence_id?: number;
2113
2728
  sort_order?: number;
2114
- };
2115
- export type UpdateInitiativeLabel = Partial<CreateInitiativeLabel>;
2116
- export interface ListInitiativeLabelsParams {
2117
- limit?: number;
2118
- offset?: number;
2119
- [key: string]: any;
2729
+ completed_at?: string | null;
2730
+ archived_at?: string | null;
2731
+ last_activity_at?: string;
2732
+ is_draft?: boolean;
2733
+ external_source?: string | null;
2734
+ external_id?: string | null;
2735
+ created_by?: string;
2736
+ updated_by?: string | null;
2737
+ project?: string;
2738
+ workspace?: string;
2739
+ state?: string;
2740
+ estimate_point?: string | null;
2741
+ type?: string | null;
2742
+ assignees?: string[];
2743
+ labels?: string[];
2120
2744
  }
2121
2745
  /**
2122
- * Initiative Labels API resource
2123
- * Handles initiative label relationships
2746
+ * Epics API resource
2747
+ * Handles all epic-related operations
2124
2748
  */
2125
- declare class Labels$1 extends BaseResource {
2749
+ export declare class Epics extends BaseResource {
2126
2750
  constructor(config: Configuration);
2127
2751
  /**
2128
- * Create a new initiative label
2129
- */
2130
- create(workspaceSlug: string, createInitiativeLabel: CreateInitiativeLabel): Promise<InitiativeLabel>;
2131
- /**
2132
- * Retrieve an initiative label by ID
2752
+ * Create a new epic in the specified project
2133
2753
  */
2134
- retrieve(workspaceSlug: string, initiativeLabelId: string): Promise<InitiativeLabel>;
2754
+ create(workspaceSlug: string, projectId: string, data: CreateEpic): Promise<Epic>;
2135
2755
  /**
2136
- * Update an initiative label
2756
+ * Retrieve an epic by ID
2137
2757
  */
2138
- update(workspaceSlug: string, initiativeLabelId: string, updateInitiativeLabel: UpdateInitiativeLabel): Promise<InitiativeLabel>;
2758
+ retrieve(workspaceSlug: string, projectId: string, epicId: string): Promise<Epic>;
2139
2759
  /**
2140
- * Delete an initiative label
2760
+ * Partially update an existing epic
2141
2761
  */
2142
- delete(workspaceSlug: string, initiativeLabelId: string): Promise<void>;
2762
+ update(workspaceSlug: string, projectId: string, epicId: string, data: UpdateEpic): Promise<Epic>;
2143
2763
  /**
2144
- * List initiative labels with optional filtering
2764
+ * Delete an epic
2145
2765
  */
2146
- list(workspaceSlug: string, params?: ListInitiativeLabelsParams): Promise<PaginatedResponse<InitiativeLabel>>;
2766
+ delete(workspaceSlug: string, projectId: string, epicId: string): Promise<void>;
2147
2767
  /**
2148
- * Add labels to an initiative
2768
+ * List epics with optional filtering
2149
2769
  */
2150
- addLabels(workspaceSlug: string, initiativeId: string, addLabels: AddInitiativeLabelsRequest): Promise<InitiativeLabel[]>;
2770
+ list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Epic>>;
2151
2771
  /**
2152
- * Remove labels from an initiative
2772
+ * List work items under an epic
2153
2773
  */
2154
- removeLabels(workspaceSlug: string, initiativeId: string, removeLabels: RemoveInitiativeLabelsRequest): Promise<void>;
2774
+ listIssues(workspaceSlug: string, projectId: string, epicId: string, params?: any): Promise<PaginatedResponse<EpicIssue>>;
2155
2775
  /**
2156
- * Get labels associated with an initiative
2776
+ * Add work items as sub-issues under an epic
2157
2777
  */
2158
- listLabels(workspaceSlug: string, initiativeId: string, params?: {
2159
- limit?: number;
2160
- offset?: number;
2161
- }): Promise<PaginatedResponse<InitiativeLabel>>;
2778
+ addIssues(workspaceSlug: string, projectId: string, epicId: string, data: AddEpicWorkItems): Promise<EpicIssue[]>;
2779
+ }
2780
+ export interface IntakeWorkItem {
2781
+ id: string;
2782
+ issue_detail?: WorkItem;
2783
+ inbox?: string;
2784
+ created_at?: string;
2785
+ updated_at?: string;
2786
+ deleted_at?: string;
2787
+ status?: IntakeWorkItemStatusEnum;
2788
+ snoozed_till?: string;
2789
+ source?: string;
2790
+ source_email?: string;
2791
+ external_source?: string;
2792
+ external_id?: string;
2793
+ extra?: any;
2794
+ created_by?: string;
2795
+ updated_by?: string;
2796
+ project?: string;
2797
+ workspace?: string;
2798
+ intake: string;
2799
+ issue?: string;
2800
+ duplicate_to?: string;
2801
+ }
2802
+ export interface IntakeWorkItemCreateRequest {
2803
+ issue: WorkItemForIntakeRequest;
2804
+ intake?: string;
2805
+ status?: IntakeWorkItemStatusEnum;
2806
+ snoozed_till?: string;
2807
+ duplicate_to?: string;
2808
+ source?: string;
2809
+ source_email?: string;
2810
+ }
2811
+ export type IntakeWorkItemStatusEnum = number;
2812
+ export interface WorkItemForIntakeRequest {
2813
+ name: string;
2814
+ description_html?: string;
2815
+ priority?: PriorityEnum;
2816
+ }
2817
+ export interface UpdateIntakeWorkItemRequest {
2818
+ status?: IntakeWorkItemStatusEnum;
2819
+ snoozed_till?: string;
2820
+ duplicate_to?: string;
2821
+ source?: string;
2822
+ source_email?: string;
2823
+ issue?: WorkItemForIntakeRequest;
2162
2824
  }
2163
2825
  /**
2164
- * Initiative Projects API resource
2165
- * Handles initiative project relationships
2826
+ * Request model for updating the triage status of an intake work item.
2166
2827
  */
2167
- declare class Projects$2 extends BaseResource {
2828
+ export interface UpdateIntakeStatusRequest {
2829
+ status?: IntakeWorkItemStatusEnum;
2830
+ snoozed_till?: string;
2831
+ duplicate_to?: string;
2832
+ }
2833
+ /**
2834
+ * Intake API resource
2835
+ * Handles all intake issue operations
2836
+ */
2837
+ export declare class Intake extends BaseResource {
2168
2838
  constructor(config: Configuration);
2169
2839
  /**
2170
- * Get projects associated with an initiative
2840
+ * Retrieve an intake issue by ID
2171
2841
  */
2172
- list(workspaceSlug: string, initiativeId: string, params?: {
2842
+ retrieve(workspaceSlug: string, projectId: string, intakeId: string): Promise<IntakeWorkItem>;
2843
+ /**
2844
+ * List intake issues
2845
+ */
2846
+ list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<IntakeWorkItem>>;
2847
+ /**
2848
+ * Create an intake issue
2849
+ */
2850
+ create(workspaceSlug: string, projectId: string, intakeData: IntakeWorkItemCreateRequest): Promise<IntakeWorkItem>;
2851
+ /**
2852
+ * Update an intake issue
2853
+ */
2854
+ update(workspaceSlug: string, projectId: string, intakeId: string, updateData: UpdateIntakeWorkItemRequest): Promise<IntakeWorkItem>;
2855
+ /**
2856
+ * Update the triage status of an intake work item.
2857
+ *
2858
+ * @param workItemId - UUID of the underlying work item (the `issue` field
2859
+ * from the IntakeWorkItem response, not the intake issue ID)
2860
+ */
2861
+ updateStatus(workspaceSlug: string, projectId: string, workItemId: string, statusData: UpdateIntakeStatusRequest): Promise<IntakeWorkItem>;
2862
+ /**
2863
+ * Delete an intake issue
2864
+ */
2865
+ delete(workspaceSlug: string, projectId: string, intakeId: string): Promise<void>;
2866
+ }
2867
+ /**
2868
+ * Sticky model interfaces
2869
+ */
2870
+ export interface Sticky extends BaseModel {
2871
+ name?: string;
2872
+ description?: Record<string, any>;
2873
+ description_html?: string;
2874
+ description_stripped?: string;
2875
+ description_binary?: string;
2876
+ logo_props?: LogoProps;
2877
+ color?: string;
2878
+ background_color?: string;
2879
+ workspace: string;
2880
+ owner: string;
2881
+ sort_order: number;
2882
+ }
2883
+ 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">;
2884
+ export type UpdateSticky = Partial<CreateSticky>;
2885
+ export interface ListStickiesParams {
2886
+ limit?: number;
2887
+ offset?: number;
2888
+ [key: string]: any;
2889
+ }
2890
+ /**
2891
+ * Sticky API resource
2892
+ * Handles all sticky related operations
2893
+ */
2894
+ export declare class Stickies extends BaseResource {
2895
+ constructor(config: Configuration);
2896
+ /**
2897
+ * Create a new sticky
2898
+ */
2899
+ create(workspaceSlug: string, createSticky: CreateSticky): Promise<Sticky>;
2900
+ /**
2901
+ * Retrieve a sticky by ID
2902
+ */
2903
+ retrieve(workspaceSlug: string, stickyId: string): Promise<Sticky>;
2904
+ /**
2905
+ * Update a sticky
2906
+ */
2907
+ update(workspaceSlug: string, stickyId: string, updateSticky: UpdateSticky): Promise<Sticky>;
2908
+ /**
2909
+ * Delete a sticky
2910
+ */
2911
+ delete(workspaceSlug: string, stickyId: string): Promise<void>;
2912
+ /**
2913
+ * List stickies with optional filtering
2914
+ */
2915
+ list(workspaceSlug: string, params?: ListStickiesParams): Promise<PaginatedResponse<Sticky>>;
2916
+ }
2917
+ /**
2918
+ * Teamspace model interfaces
2919
+ */
2920
+ export interface Teamspace extends BaseModel {
2921
+ name: string;
2922
+ description_json?: Record<string, any>;
2923
+ description_html?: string;
2924
+ description_stripped?: string;
2925
+ description_binary?: string;
2926
+ logo_props?: LogoProps;
2927
+ lead?: string;
2928
+ workspace: string;
2929
+ }
2930
+ export type CreateTeamspace = Omit<Teamspace, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
2931
+ export type UpdateTeamspace = Partial<CreateTeamspace>;
2932
+ export interface ListTeamspacesParams {
2933
+ limit?: number;
2934
+ offset?: number;
2935
+ [key: string]: any;
2936
+ }
2937
+ export interface AddTeamspaceProjectsRequest {
2938
+ project_ids: string[];
2939
+ }
2940
+ export interface RemoveTeamspaceProjectsRequest {
2941
+ project_ids: string[];
2942
+ }
2943
+ export interface AddTeamspaceMembersRequest {
2944
+ member_ids: string[];
2945
+ }
2946
+ export interface RemoveTeamspaceMembersRequest {
2947
+ member_ids: string[];
2948
+ }
2949
+ /**
2950
+ * Teamspace Projects API resource
2951
+ * Handles teamspace project relationships
2952
+ */
2953
+ declare class Projects$1 extends BaseResource {
2954
+ constructor(config: Configuration);
2955
+ /**
2956
+ * Get projects associated with a teamspace
2957
+ */
2958
+ list(workspaceSlug: string, teamspaceId: string, params?: {
2173
2959
  limit?: number;
2174
2960
  offset?: number;
2175
2961
  }): Promise<PaginatedResponse<Project>>;
2176
2962
  /**
2177
- * Add projects to an initiative
2963
+ * Add projects to a teamspace
2964
+ */
2965
+ add(workspaceSlug: string, teamspaceId: string, addProjects: AddTeamspaceProjectsRequest): Promise<Project[]>;
2966
+ /**
2967
+ * Remove projects from a teamspace
2968
+ */
2969
+ remove(workspaceSlug: string, teamspaceId: string, removeProjects: RemoveTeamspaceProjectsRequest): Promise<void>;
2970
+ }
2971
+ /**
2972
+ * Teamspace Members API resource
2973
+ * Handles teamspace member relationships
2974
+ */
2975
+ declare class Members$1 extends BaseResource {
2976
+ constructor(config: Configuration);
2977
+ /**
2978
+ * Get members associated with a teamspace
2979
+ */
2980
+ list(workspaceSlug: string, teamspaceId: string, params?: {
2981
+ limit?: number;
2982
+ offset?: number;
2983
+ }): Promise<PaginatedResponse<User>>;
2984
+ /**
2985
+ * Add members to a teamspace
2986
+ */
2987
+ add(workspaceSlug: string, teamspaceId: string, addMembers: AddTeamspaceMembersRequest): Promise<User[]>;
2988
+ /**
2989
+ * Remove members from a teamspace
2990
+ */
2991
+ remove(workspaceSlug: string, teamspaceId: string, removeMembers: RemoveTeamspaceMembersRequest): Promise<void>;
2992
+ }
2993
+ /**
2994
+ * Teamspaces API resource
2995
+ * Handles all teamspace-related operations
2996
+ */
2997
+ export declare class Teamspaces extends BaseResource {
2998
+ projects: Projects$1;
2999
+ members: Members$1;
3000
+ constructor(config: Configuration);
3001
+ /**
3002
+ * Create a new teamspace
3003
+ */
3004
+ create(workspaceSlug: string, createTeamspace: CreateTeamspace): Promise<Teamspace>;
3005
+ /**
3006
+ * Retrieve a teamspace by ID
3007
+ */
3008
+ retrieve(workspaceSlug: string, teamspaceId: string): Promise<Teamspace>;
3009
+ /**
3010
+ * Update a teamspace
3011
+ */
3012
+ update(workspaceSlug: string, teamspaceId: string, updateTeamspace: UpdateTeamspace): Promise<Teamspace>;
3013
+ /**
3014
+ * Delete a teamspace
3015
+ */
3016
+ delete(workspaceSlug: string, teamspaceId: string): Promise<void>;
3017
+ /**
3018
+ * List teamspaces with optional filtering
3019
+ */
3020
+ list(workspaceSlug: string, params?: ListTeamspacesParams): Promise<PaginatedResponse<Teamspace>>;
3021
+ }
3022
+ export declare enum InitiativeState {
3023
+ DRAFT = "DRAFT",
3024
+ PLANNED = "PLANNED",
3025
+ ACTIVE = "ACTIVE",
3026
+ COMPLETED = "COMPLETED",
3027
+ CLOSED = "CLOSED"
3028
+ }
3029
+ /**
3030
+ * Initiative model interfaces
3031
+ */
3032
+ export interface Initiative extends BaseModel {
3033
+ name: string;
3034
+ description?: string;
3035
+ description_html?: string;
3036
+ description_stripped?: string;
3037
+ description_binary?: string;
3038
+ lead?: string;
3039
+ start_date?: string;
3040
+ end_date?: string;
3041
+ logo_props?: LogoProps;
3042
+ state?: InitiativeState;
3043
+ workspace: string;
3044
+ }
3045
+ export type CreateInitiative = Omit<Initiative, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace">;
3046
+ export type UpdateInitiative = Partial<CreateInitiative>;
3047
+ export interface ListInitiativesParams {
3048
+ /** Page size. Maps to the API's `per_page` query param. */
3049
+ per_page?: number;
3050
+ /** Pagination position. Use `next_cursor` from the previous response. */
3051
+ cursor?: string;
3052
+ [key: string]: any;
3053
+ }
3054
+ export interface AddInitiativeLabelsRequest {
3055
+ label_ids: string[];
3056
+ }
3057
+ export interface RemoveInitiativeLabelsRequest {
3058
+ label_ids: string[];
3059
+ }
3060
+ export interface AddInitiativeProjectsRequest {
3061
+ project_ids: string[];
3062
+ }
3063
+ export interface RemoveInitiativeProjectsRequest {
3064
+ project_ids: string[];
3065
+ }
3066
+ export interface AddInitiativeEpicsRequest {
3067
+ epic_ids: string[];
3068
+ }
3069
+ export interface RemoveInitiativeEpicsRequest {
3070
+ epic_ids: string[];
3071
+ }
3072
+ /**
3073
+ * InitiativeLabel model interfaces
3074
+ */
3075
+ export interface InitiativeLabel extends BaseModel {
3076
+ name: string;
3077
+ description?: string;
3078
+ color?: string;
3079
+ sort_order: number;
3080
+ workspace: string;
3081
+ }
3082
+ export type CreateInitiativeLabel = Omit<InitiativeLabel, "id" | "created_at" | "updated_at" | "deleted_at" | "created_by" | "updated_by" | "workspace"> & {
3083
+ sort_order?: number;
3084
+ };
3085
+ export type UpdateInitiativeLabel = Partial<CreateInitiativeLabel>;
3086
+ export interface ListInitiativeLabelsParams {
3087
+ limit?: number;
3088
+ offset?: number;
3089
+ [key: string]: any;
3090
+ }
3091
+ /**
3092
+ * Initiative Labels API resource
3093
+ * Handles initiative label relationships
3094
+ */
3095
+ declare class Labels$1 extends BaseResource {
3096
+ constructor(config: Configuration);
3097
+ /**
3098
+ * Create a new initiative label
3099
+ */
3100
+ create(workspaceSlug: string, createInitiativeLabel: CreateInitiativeLabel): Promise<InitiativeLabel>;
3101
+ /**
3102
+ * Retrieve an initiative label by ID
3103
+ */
3104
+ retrieve(workspaceSlug: string, initiativeLabelId: string): Promise<InitiativeLabel>;
3105
+ /**
3106
+ * Update an initiative label
3107
+ */
3108
+ update(workspaceSlug: string, initiativeLabelId: string, updateInitiativeLabel: UpdateInitiativeLabel): Promise<InitiativeLabel>;
3109
+ /**
3110
+ * Delete an initiative label
3111
+ */
3112
+ delete(workspaceSlug: string, initiativeLabelId: string): Promise<void>;
3113
+ /**
3114
+ * List initiative labels with optional filtering
3115
+ */
3116
+ list(workspaceSlug: string, params?: ListInitiativeLabelsParams): Promise<PaginatedResponse<InitiativeLabel>>;
3117
+ /**
3118
+ * Add labels to an initiative
3119
+ */
3120
+ addLabels(workspaceSlug: string, initiativeId: string, addLabels: AddInitiativeLabelsRequest): Promise<InitiativeLabel[]>;
3121
+ /**
3122
+ * Remove labels from an initiative
3123
+ */
3124
+ removeLabels(workspaceSlug: string, initiativeId: string, removeLabels: RemoveInitiativeLabelsRequest): Promise<void>;
3125
+ /**
3126
+ * Get labels associated with an initiative
3127
+ */
3128
+ listLabels(workspaceSlug: string, initiativeId: string, params?: {
3129
+ limit?: number;
3130
+ offset?: number;
3131
+ }): Promise<PaginatedResponse<InitiativeLabel>>;
3132
+ }
3133
+ /**
3134
+ * Initiative Projects API resource
3135
+ * Handles initiative project relationships
3136
+ */
3137
+ declare class Projects$2 extends BaseResource {
3138
+ constructor(config: Configuration);
3139
+ /**
3140
+ * Get projects associated with an initiative
3141
+ */
3142
+ list(workspaceSlug: string, initiativeId: string, params?: {
3143
+ limit?: number;
3144
+ offset?: number;
3145
+ }): Promise<PaginatedResponse<Project>>;
3146
+ /**
3147
+ * Add projects to an initiative
3148
+ */
3149
+ add(workspaceSlug: string, initiativeId: string, addProjects: AddInitiativeProjectsRequest): Promise<Project[]>;
3150
+ /**
3151
+ * Remove projects from an initiative
3152
+ */
3153
+ remove(workspaceSlug: string, initiativeId: string, removeProjects: RemoveInitiativeProjectsRequest): Promise<void>;
3154
+ }
3155
+ /**
3156
+ * Initiative Epics API resource
3157
+ * Handles initiative epic relationships
3158
+ */
3159
+ declare class Epics$1 extends BaseResource {
3160
+ constructor(config: Configuration);
3161
+ /**
3162
+ * Get epics associated with an initiative
3163
+ */
3164
+ list(workspaceSlug: string, initiativeId: string, params?: {
3165
+ limit?: number;
3166
+ offset?: number;
3167
+ }): Promise<PaginatedResponse<Epic>>;
3168
+ /**
3169
+ * Add epics to an initiative
3170
+ */
3171
+ add(workspaceSlug: string, initiativeId: string, addEpics: AddInitiativeEpicsRequest): Promise<Epic[]>;
3172
+ /**
3173
+ * Remove epics from an initiative
3174
+ */
3175
+ remove(workspaceSlug: string, initiativeId: string, removeEpics: RemoveInitiativeEpicsRequest): Promise<void>;
3176
+ }
3177
+ /**
3178
+ * Initiatives API resource
3179
+ * Handles all initiative-related operations
3180
+ */
3181
+ export declare class Initiatives extends BaseResource {
3182
+ labels: Labels$1;
3183
+ projects: Projects$2;
3184
+ epics: Epics$1;
3185
+ constructor(config: Configuration);
3186
+ /**
3187
+ * Create a new initiative
3188
+ */
3189
+ create(workspaceSlug: string, createInitiative: CreateInitiative): Promise<Initiative>;
3190
+ /**
3191
+ * Retrieve an initiative by ID
3192
+ */
3193
+ retrieve(workspaceSlug: string, initiativeId: string): Promise<Initiative>;
3194
+ /**
3195
+ * Update an initiative
3196
+ */
3197
+ update(workspaceSlug: string, initiativeId: string, updateInitiative: UpdateInitiative): Promise<Initiative>;
3198
+ /**
3199
+ * Delete an initiative
3200
+ */
3201
+ delete(workspaceSlug: string, initiativeId: string): Promise<void>;
3202
+ /**
3203
+ * List initiatives with optional filtering
3204
+ */
3205
+ list(workspaceSlug: string, params?: ListInitiativesParams): Promise<PaginatedResponse<Initiative>>;
3206
+ }
3207
+ export interface Milestone extends BaseModel {
3208
+ title: string;
3209
+ target_date?: string;
3210
+ project: string;
3211
+ workspace: string;
3212
+ }
3213
+ export interface MilestoneLite {
3214
+ id?: string;
3215
+ title: string;
3216
+ target_date?: string;
3217
+ external_source?: string;
3218
+ external_id?: string;
3219
+ created_at?: string;
3220
+ updated_at?: string;
3221
+ }
3222
+ export interface CreateMilestoneRequest {
3223
+ title: string;
3224
+ target_date?: string;
3225
+ external_source?: string;
3226
+ external_id?: string;
3227
+ }
3228
+ export interface UpdateMilestoneRequest {
3229
+ title?: string;
3230
+ target_date?: string;
3231
+ external_source?: string;
3232
+ external_id?: string;
3233
+ }
3234
+ export interface MilestoneWorkItem {
3235
+ id?: string;
3236
+ issue?: string;
3237
+ milestone?: string;
3238
+ }
3239
+ /**
3240
+ * Milestones API resource
3241
+ * Handles all milestone related operations
3242
+ */
3243
+ export declare class Milestones extends BaseResource {
3244
+ constructor(config: Configuration);
3245
+ /**
3246
+ * Create a new milestone
3247
+ */
3248
+ create(workspaceSlug: string, projectId: string, createMilestone: CreateMilestoneRequest): Promise<Milestone>;
3249
+ /**
3250
+ * Retrieve a milestone by ID
3251
+ */
3252
+ retrieve(workspaceSlug: string, projectId: string, milestoneId: string): Promise<Milestone>;
3253
+ /**
3254
+ * Update a milestone
3255
+ */
3256
+ update(workspaceSlug: string, projectId: string, milestoneId: string, updateMilestone: UpdateMilestoneRequest): Promise<Milestone>;
3257
+ /**
3258
+ * Delete a milestone
3259
+ */
3260
+ delete(workspaceSlug: string, projectId: string, milestoneId: string): Promise<void>;
3261
+ /**
3262
+ * List milestones with optional filtering
3263
+ */
3264
+ list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Milestone>>;
3265
+ /**
3266
+ * Add work items to a milestone
3267
+ */
3268
+ addWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
3269
+ /**
3270
+ * Remove work items from a milestone
3271
+ */
3272
+ removeWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
3273
+ /**
3274
+ * List work items in a milestone
3275
+ */
3276
+ listWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, params?: any): Promise<PaginatedResponse<MilestoneWorkItem>>;
3277
+ }
3278
+ /**
3279
+ * Agent run status enum
3280
+ */
3281
+ export type AgentRunStatus = "created" | "in_progress" | "awaiting" | "completed" | "stopping" | "stopped" | "failed" | "stale";
3282
+ /**
3283
+ * Agent run type enum
3284
+ */
3285
+ export type AgentRunType = "comment_thread";
3286
+ /**
3287
+ * Agent run activity signal enum
3288
+ */
3289
+ export type AgentRunActivitySignal = "auth_request" | "continue" | "select" | "stop";
3290
+ /**
3291
+ * Agent run activity type enum
3292
+ */
3293
+ export type AgentRunActivityType = "action" | "elicitation" | "error" | "prompt" | "response" | "thought";
3294
+ /**
3295
+ * Agent Run interface
3296
+ */
3297
+ export interface AgentRun extends BaseModel {
3298
+ agent_user: string;
3299
+ comment?: string;
3300
+ source_comment?: string;
3301
+ creator: string;
3302
+ stopped_at?: string;
3303
+ stopped_by?: string;
3304
+ started_at: string;
3305
+ ended_at?: string;
3306
+ external_link?: string;
3307
+ issue?: string;
3308
+ workspace: string;
3309
+ project?: string;
3310
+ status: AgentRunStatus;
3311
+ error_metadata?: Record<string, any>;
3312
+ type: AgentRunType;
3313
+ }
3314
+ /**
3315
+ * Create agent run request interface
3316
+ */
3317
+ export interface CreateAgentRunRequest {
3318
+ agent_slug: string;
3319
+ issue?: string;
3320
+ project?: string;
3321
+ comment?: string;
3322
+ source_comment?: string;
3323
+ external_link?: string;
3324
+ type?: AgentRunType;
3325
+ }
3326
+ /**
3327
+ * Agent run activity content for action type
3328
+ */
3329
+ export interface AgentRunActivityActionContent {
3330
+ type: "action";
3331
+ action: string;
3332
+ parameters: Record<string, string>;
3333
+ }
3334
+ /**
3335
+ * Agent run activity content for other types
3336
+ */
3337
+ export interface AgentRunActivityTextContent {
3338
+ type: Exclude<AgentRunActivityType, "action">;
3339
+ body: string;
3340
+ }
3341
+ /**
3342
+ * Agent run activity content
3343
+ */
3344
+ export type AgentRunActivityContent = AgentRunActivityActionContent | AgentRunActivityTextContent;
3345
+ /**
3346
+ * Agent Run Activity interface
3347
+ */
3348
+ export interface AgentRunActivity extends BaseModel {
3349
+ agent_run: string;
3350
+ content: AgentRunActivityContent;
3351
+ content_metadata?: Record<string, any>;
3352
+ ephemeral: boolean;
3353
+ signal: AgentRunActivitySignal;
3354
+ signal_metadata?: Record<string, any>;
3355
+ comment?: string;
3356
+ actor?: string;
3357
+ type: AgentRunActivityType;
3358
+ project?: string;
3359
+ workspace: string;
3360
+ }
3361
+ /**
3362
+ * Create agent run activity request interface
3363
+ */
3364
+ export interface CreateAgentRunActivityRequest {
3365
+ content: AgentRunActivityContent;
3366
+ content_metadata?: Record<string, any>;
3367
+ signal?: AgentRunActivitySignal;
3368
+ signal_metadata?: Record<string, any>;
3369
+ type: Exclude<AgentRunActivityType, "prompt">;
3370
+ project?: string;
3371
+ }
3372
+ /**
3373
+ * Agent Run Activities API resource
3374
+ * Handles all agent run activity operations
3375
+ */
3376
+ declare class Activities$1 extends BaseResource {
3377
+ constructor(config: Configuration);
3378
+ /**
3379
+ * List activities for an agent run
3380
+ * @param workspaceSlug - The workspace slug
3381
+ * @param runId - The agent run ID
3382
+ * @param params - Optional query parameters for pagination
3383
+ * @returns Paginated list of agent run activities
3384
+ */
3385
+ list(workspaceSlug: string, runId: string, params?: {
3386
+ per_page?: number;
3387
+ cursor?: string;
3388
+ }): Promise<PaginatedResponse<AgentRunActivity>>;
3389
+ /**
3390
+ * Retrieve a specific agent run activity by ID
3391
+ * @param workspaceSlug - The workspace slug
3392
+ * @param runId - The agent run ID
3393
+ * @param activityId - The activity ID
3394
+ * @returns The agent run activity
3395
+ */
3396
+ retrieve(workspaceSlug: string, runId: string, activityId: string): Promise<AgentRunActivity>;
3397
+ /**
3398
+ * Create a new agent run activity
3399
+ * @param workspaceSlug - The workspace slug
3400
+ * @param runId - The agent run ID
3401
+ * @param data - The activity data to create
3402
+ * @returns The created agent run activity
3403
+ */
3404
+ create(workspaceSlug: string, runId: string, data: CreateAgentRunActivityRequest): Promise<AgentRunActivity>;
3405
+ }
3406
+ /**
3407
+ * Agent Runs API resource
3408
+ * Handles all agent run operations
3409
+ */
3410
+ export declare class AgentRuns extends BaseResource {
3411
+ activities: Activities$1;
3412
+ constructor(config: Configuration);
3413
+ /**
3414
+ * Create a new agent run
3415
+ * @param workspaceSlug - The workspace slug
3416
+ * @param data - The agent run data to create
3417
+ * @returns The created agent run
3418
+ */
3419
+ create(workspaceSlug: string, data: CreateAgentRunRequest): Promise<AgentRun>;
3420
+ /**
3421
+ * Retrieve an agent run by ID
3422
+ * @param workspaceSlug - The workspace slug
3423
+ * @param runId - The agent run ID
3424
+ * @returns The agent run
3425
+ */
3426
+ retrieve(workspaceSlug: string, runId: string): Promise<AgentRun>;
3427
+ }
3428
+ /**
3429
+ * Workspace-level template model interfaces
3430
+ * These are distinct from project-scoped templates (ProjectTemplate.ts)
3431
+ */
3432
+ export interface WorkspaceWorkItemTemplate extends BaseModel {
3433
+ name: string;
3434
+ description?: string;
3435
+ description_html?: string;
3436
+ template_data?: Record<string, unknown>;
3437
+ logo_props?: Record<string, unknown>;
3438
+ workspace: string;
3439
+ }
3440
+ export type CreateWorkspaceWorkItemTemplate = Pick<WorkspaceWorkItemTemplate, "name" | "description" | "description_html" | "template_data" | "logo_props">;
3441
+ export type UpdateWorkspaceWorkItemTemplate = Partial<CreateWorkspaceWorkItemTemplate>;
3442
+ export interface WorkspaceProjectTemplate extends BaseModel {
3443
+ name: string;
3444
+ description?: string;
3445
+ logo_props?: Record<string, unknown>;
3446
+ template_data?: Record<string, unknown>;
3447
+ workspace: string;
3448
+ }
3449
+ export type CreateWorkspaceProjectTemplate = Pick<WorkspaceProjectTemplate, "name" | "description" | "logo_props" | "template_data">;
3450
+ export type UpdateWorkspaceProjectTemplate = Partial<CreateWorkspaceProjectTemplate>;
3451
+ export interface WorkspacePageTemplate extends BaseModel {
3452
+ name: string;
3453
+ description?: string;
3454
+ description_html?: string;
3455
+ template_data?: Record<string, unknown>;
3456
+ logo_props?: Record<string, unknown>;
3457
+ workspace: string;
3458
+ }
3459
+ export type CreateWorkspacePageTemplate = Pick<WorkspacePageTemplate, "name" | "description" | "description_html" | "template_data" | "logo_props">;
3460
+ export type UpdateWorkspacePageTemplate = Partial<CreateWorkspacePageTemplate>;
3461
+ /**
3462
+ * WorkspaceWorkItemTemplates sub-resource
3463
+ * Manages work item templates at the workspace level
3464
+ */
3465
+ declare class WorkItems$1 extends BaseResource {
3466
+ constructor(config: Configuration);
3467
+ list(workspaceSlug: string): Promise<WorkspaceWorkItemTemplate[]>;
3468
+ create(workspaceSlug: string, data: CreateWorkspaceWorkItemTemplate): Promise<WorkspaceWorkItemTemplate>;
3469
+ update(workspaceSlug: string, templateId: string, data: UpdateWorkspaceWorkItemTemplate): Promise<WorkspaceWorkItemTemplate>;
3470
+ del(workspaceSlug: string, templateId: string): Promise<void>;
3471
+ }
3472
+ /**
3473
+ * WorkspaceProjectTemplates sub-resource
3474
+ * Manages project templates at the workspace level
3475
+ */
3476
+ declare class Projects$3 extends BaseResource {
3477
+ constructor(config: Configuration);
3478
+ list(workspaceSlug: string): Promise<WorkspaceProjectTemplate[]>;
3479
+ create(workspaceSlug: string, data: CreateWorkspaceProjectTemplate): Promise<WorkspaceProjectTemplate>;
3480
+ update(workspaceSlug: string, templateId: string, data: UpdateWorkspaceProjectTemplate): Promise<WorkspaceProjectTemplate>;
3481
+ del(workspaceSlug: string, templateId: string): Promise<void>;
3482
+ }
3483
+ /**
3484
+ * WorkspacePageTemplates sub-resource
3485
+ * Manages page templates at the workspace level
3486
+ */
3487
+ declare class Pages$3 extends BaseResource {
3488
+ constructor(config: Configuration);
3489
+ list(workspaceSlug: string): Promise<WorkspacePageTemplate[]>;
3490
+ create(workspaceSlug: string, data: CreateWorkspacePageTemplate): Promise<WorkspacePageTemplate>;
3491
+ update(workspaceSlug: string, templateId: string, data: UpdateWorkspacePageTemplate): Promise<WorkspacePageTemplate>;
3492
+ del(workspaceSlug: string, templateId: string): Promise<void>;
3493
+ }
3494
+ /**
3495
+ * WorkspaceTemplates API resource
3496
+ * Container for workspace-level template sub-resources
3497
+ */
3498
+ export declare class WorkspaceTemplates extends BaseResource {
3499
+ workItems: WorkItems$1;
3500
+ projects: Projects$3;
3501
+ pages: Pages$3;
3502
+ constructor(config: Configuration);
3503
+ }
3504
+ /**
3505
+ * WorkspaceWorkItemTypeProperties sub-resource
3506
+ * Manages property links on workspace-level work item types
3507
+ */
3508
+ declare class Properties$1 extends BaseResource {
3509
+ constructor(config: Configuration);
3510
+ list(workspaceSlug: string, typeId: string): Promise<WorkItemProperty[]>;
3511
+ create(workspaceSlug: string, typeId: string, data: WorkspaceWorkItemTypePropertyLink): Promise<WorkItemProperty>;
3512
+ del(workspaceSlug: string, typeId: string, propertyId: string): Promise<void>;
3513
+ }
3514
+ /**
3515
+ * WorkspaceWorkItemTypes API resource
3516
+ * Manages work item types at the workspace level
3517
+ */
3518
+ export declare class WorkspaceWorkItemTypes extends BaseResource {
3519
+ properties: Properties$1;
3520
+ constructor(config: Configuration);
3521
+ list(workspaceSlug: string): Promise<WorkItemType[]>;
3522
+ create(workspaceSlug: string, data: CreateWorkItemType): Promise<WorkItemType>;
3523
+ retrieve(workspaceSlug: string, typeId: string): Promise<WorkItemType>;
3524
+ update(workspaceSlug: string, typeId: string, data: UpdateWorkItemType): Promise<WorkItemType>;
3525
+ delete(workspaceSlug: string, typeId: string): Promise<void>;
3526
+ }
3527
+ /**
3528
+ * WorkspaceWorkItemPropertyOptions sub-resource
3529
+ * Manages options on workspace-level work item properties
3530
+ */
3531
+ declare class Options$1 extends BaseResource {
3532
+ constructor(config: Configuration);
3533
+ list(workspaceSlug: string, propertyId: string): Promise<WorkItemPropertyOption[]>;
3534
+ create(workspaceSlug: string, propertyId: string, data: CreateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
3535
+ retrieve(workspaceSlug: string, propertyId: string, optionId: string): Promise<WorkItemPropertyOption>;
3536
+ update(workspaceSlug: string, propertyId: string, optionId: string, data: UpdateWorkItemPropertyOption): Promise<WorkItemPropertyOption>;
3537
+ delete(workspaceSlug: string, propertyId: string, optionId: string): Promise<void>;
3538
+ }
3539
+ /**
3540
+ * WorkspaceWorkItemProperties API resource
3541
+ * Manages work item properties at the workspace level
3542
+ */
3543
+ export declare class WorkspaceWorkItemProperties extends BaseResource {
3544
+ options: Options$1;
3545
+ constructor(config: Configuration);
3546
+ list(workspaceSlug: string): Promise<WorkItemProperty[]>;
3547
+ create(workspaceSlug: string, data: CreateWorkItemProperty): Promise<WorkItemProperty>;
3548
+ retrieve(workspaceSlug: string, propertyId: string): Promise<WorkItemProperty>;
3549
+ update(workspaceSlug: string, propertyId: string, data: UpdateWorkItemProperty): Promise<WorkItemProperty>;
3550
+ del(workspaceSlug: string, propertyId: string): Promise<void>;
3551
+ }
3552
+ /**
3553
+ * Workspace project label model interfaces
3554
+ */
3555
+ export interface WorkspaceProjectLabel extends BaseModel {
3556
+ name: string;
3557
+ color?: string;
3558
+ sort_order?: number;
3559
+ workspace: string;
3560
+ }
3561
+ export type CreateWorkspaceProjectLabel = Pick<WorkspaceProjectLabel, "name" | "color" | "sort_order">;
3562
+ export type UpdateWorkspaceProjectLabel = Partial<CreateWorkspaceProjectLabel>;
3563
+ /**
3564
+ * WorkspaceProjectLabels API resource
3565
+ * Manages project labels at the workspace level
3566
+ */
3567
+ export declare class WorkspaceProjectLabels extends BaseResource {
3568
+ constructor(config: Configuration);
3569
+ list(workspaceSlug: string): Promise<WorkspaceProjectLabel[]>;
3570
+ create(workspaceSlug: string, data: CreateWorkspaceProjectLabel): Promise<WorkspaceProjectLabel>;
3571
+ update(workspaceSlug: string, labelId: string, data: UpdateWorkspaceProjectLabel): Promise<WorkspaceProjectLabel>;
3572
+ del(workspaceSlug: string, labelId: string): Promise<void>;
3573
+ }
3574
+ /**
3575
+ * Workspace project state model interfaces
3576
+ */
3577
+ export interface WorkspaceProjectState extends BaseModel {
3578
+ name: string;
3579
+ color?: string;
3580
+ group?: string;
3581
+ sequence?: number;
3582
+ default?: boolean;
3583
+ description?: string;
3584
+ workspace: string;
3585
+ }
3586
+ export type CreateWorkspaceProjectState = Pick<WorkspaceProjectState, "name" | "color" | "group" | "sequence" | "default" | "description">;
3587
+ export type UpdateWorkspaceProjectState = Partial<CreateWorkspaceProjectState>;
3588
+ /**
3589
+ * WorkspaceProjectStates API resource
3590
+ * Manages project states at the workspace level
3591
+ */
3592
+ export declare class WorkspaceProjectStates extends BaseResource {
3593
+ constructor(config: Configuration);
3594
+ list(workspaceSlug: string): Promise<WorkspaceProjectState[]>;
3595
+ create(workspaceSlug: string, data: CreateWorkspaceProjectState): Promise<WorkspaceProjectState>;
3596
+ update(workspaceSlug: string, stateId: string, data: UpdateWorkspaceProjectState): Promise<WorkspaceProjectState>;
3597
+ del(workspaceSlug: string, stateId: string): Promise<void>;
3598
+ }
3599
+ /**
3600
+ * Work item relation definition model interfaces
3601
+ */
3602
+ export interface WorkItemRelationDefinition extends BaseModel {
3603
+ name: string;
3604
+ outward?: string;
3605
+ inward?: string;
3606
+ is_default?: boolean;
3607
+ is_active?: boolean;
3608
+ color?: string;
3609
+ sort_order?: number;
3610
+ workspace: string;
3611
+ }
3612
+ export type CreateWorkItemRelationDefinition = Pick<WorkItemRelationDefinition, "name" | "outward" | "inward" | "is_default" | "is_active" | "color" | "sort_order">;
3613
+ export type UpdateWorkItemRelationDefinition = Partial<CreateWorkItemRelationDefinition>;
3614
+ export interface ListWorkItemRelationDefinitionsParams {
3615
+ is_default?: boolean;
3616
+ is_active?: boolean;
3617
+ }
3618
+ /**
3619
+ * WorkItemRelationDefinitions API resource
3620
+ * Manages work item relation definitions at the workspace level
3621
+ */
3622
+ export declare class WorkItemRelationDefinitions extends BaseResource {
3623
+ constructor(config: Configuration);
3624
+ list(workspaceSlug: string, params?: ListWorkItemRelationDefinitionsParams): Promise<WorkItemRelationDefinition[]>;
3625
+ create(workspaceSlug: string, data: CreateWorkItemRelationDefinition): Promise<WorkItemRelationDefinition>;
3626
+ update(workspaceSlug: string, definitionId: string, data: UpdateWorkItemRelationDefinition): Promise<WorkItemRelationDefinition>;
3627
+ del(workspaceSlug: string, definitionId: string): Promise<void>;
3628
+ }
3629
+ /**
3630
+ * Release model interfaces
3631
+ */
3632
+ export type ReleaseStatus = "unreleased" | "released" | "cancelled";
3633
+ export interface Release extends BaseModel {
3634
+ name: string;
3635
+ /**
3636
+ * Returned as a nested object ({description_html, description_json, ...}),
3637
+ * not a plain string. Write it with description_html / description_json.
3638
+ */
3639
+ description?: Record<string, unknown> | string;
3640
+ start_date?: string;
3641
+ target_date?: string;
3642
+ release_date?: string;
3643
+ status?: ReleaseStatus | string;
3644
+ lead?: string;
3645
+ tag?: string;
3646
+ is_latest?: boolean;
3647
+ is_prerelease?: boolean;
3648
+ logo_props?: Record<string, unknown>;
3649
+ workspace: string;
3650
+ }
3651
+ export interface CreateRelease {
3652
+ name: string;
3653
+ description_html?: string;
3654
+ description_json?: Record<string, unknown>;
3655
+ status?: ReleaseStatus | string;
3656
+ target_date?: string;
3657
+ release_date?: string;
3658
+ lead?: string;
3659
+ tag?: string;
3660
+ is_prerelease?: boolean;
3661
+ external_source?: string;
3662
+ external_id?: string;
3663
+ }
3664
+ export type UpdateRelease = Partial<CreateRelease>;
3665
+ /**
3666
+ * A tag is a version marker (version + optional git metadata), not a label.
3667
+ */
3668
+ export interface ReleaseTag extends BaseModel {
3669
+ version: string;
3670
+ description?: string;
3671
+ commit_hash?: string;
3672
+ git_tag?: string;
3673
+ workspace: string;
3674
+ /** @deprecated Ignored by the API. Kept for backward compatibility. */
3675
+ name?: string;
3676
+ /** @deprecated Ignored by the API. Kept for backward compatibility. */
3677
+ color?: string;
3678
+ }
3679
+ export interface CreateReleaseTag {
3680
+ /** Must be unique in the workspace */
3681
+ version: string;
3682
+ description?: string;
3683
+ commit_hash?: string;
3684
+ git_tag?: string;
3685
+ /** @deprecated Ignored by the API. Kept for backward compatibility. */
3686
+ name?: string;
3687
+ /** @deprecated Ignored by the API. Kept for backward compatibility. */
3688
+ color?: string;
3689
+ }
3690
+ export interface UpdateReleaseTag {
3691
+ version?: string;
3692
+ description?: string;
3693
+ commit_hash?: string;
3694
+ git_tag?: string;
3695
+ }
3696
+ export interface ReleaseLabel extends BaseModel {
3697
+ name: string;
3698
+ color?: string;
3699
+ sort_order?: number;
3700
+ workspace: string;
3701
+ }
3702
+ export type CreateReleaseLabel = Pick<ReleaseLabel, "name" | "color">;
3703
+ export interface UpdateReleaseLabel {
3704
+ name?: string;
3705
+ color?: string;
3706
+ sort_order?: number;
3707
+ }
3708
+ export interface AddReleaseItemLabel {
3709
+ label_ids: string[];
3710
+ }
3711
+ export interface RemoveReleaseItemLabel {
3712
+ label_ids: string[];
3713
+ }
3714
+ export interface ReleaseChangelog {
3715
+ id?: string;
3716
+ /** Nested description object; write it with description_html / description_json */
3717
+ description?: Record<string, unknown> | string;
3718
+ release?: string;
3719
+ workspace?: string;
3720
+ created_at?: string;
3721
+ updated_at?: string;
3722
+ created_by?: string;
3723
+ updated_by?: string;
3724
+ [key: string]: unknown;
3725
+ }
3726
+ export interface UpdateReleaseChangelog {
3727
+ description_html?: string;
3728
+ description_json?: Record<string, unknown>;
3729
+ }
3730
+ export interface ReleaseComment {
3731
+ id?: string;
3732
+ /** Nested object ({description_html, ...}). Write it with comment_html. */
3733
+ comment?: Record<string, unknown> | string;
3734
+ is_hidden?: boolean;
3735
+ is_resolved?: boolean;
3736
+ parent?: string;
3737
+ edited_at?: string;
3738
+ created_at?: string;
3739
+ updated_at?: string;
3740
+ created_by?: string;
3741
+ updated_by?: string;
3742
+ [key: string]: unknown;
3743
+ }
3744
+ export interface CreateReleaseComment {
3745
+ comment_html: string;
3746
+ parent?: string;
3747
+ }
3748
+ export interface UpdateReleaseComment {
3749
+ comment_html?: string;
3750
+ is_resolved?: boolean;
3751
+ }
3752
+ export interface ReleaseLink {
3753
+ id?: string;
3754
+ title?: string;
3755
+ url?: string;
3756
+ metadata?: Record<string, unknown>;
3757
+ created_at?: string;
3758
+ updated_at?: string;
3759
+ workspace?: string;
3760
+ release?: string;
3761
+ }
3762
+ export interface CreateReleaseLink {
3763
+ url: string;
3764
+ title?: string;
3765
+ metadata?: Record<string, unknown>;
3766
+ }
3767
+ export interface UpdateReleaseLink {
3768
+ url?: string;
3769
+ title?: string;
3770
+ metadata?: Record<string, unknown>;
3771
+ }
3772
+ export interface ReleaseWorkItem {
3773
+ id: string;
3774
+ name?: string;
3775
+ project_id?: string;
3776
+ [key: string]: unknown;
3777
+ }
3778
+ export interface AddReleaseWorkItems {
3779
+ work_item_ids: string[];
3780
+ }
3781
+ export interface RemoveReleaseWorkItems {
3782
+ work_item_ids: string[];
3783
+ }
3784
+ /**
3785
+ * ReleaseTags sub-resource
3786
+ * Manages release tags at the workspace level
3787
+ */
3788
+ declare class Tags extends BaseResource {
3789
+ constructor(config: Configuration);
3790
+ list(workspaceSlug: string): Promise<ReleaseTag[]>;
3791
+ create(workspaceSlug: string, data: CreateReleaseTag): Promise<ReleaseTag>;
3792
+ retrieve(workspaceSlug: string, tagId: string): Promise<ReleaseTag>;
3793
+ update(workspaceSlug: string, tagId: string, data: UpdateReleaseTag): Promise<ReleaseTag>;
3794
+ delete(workspaceSlug: string, tagId: string): Promise<void>;
3795
+ }
3796
+ /**
3797
+ * ReleaseLabels sub-resource
3798
+ * Manages release labels at the workspace level
3799
+ */
3800
+ declare class Labels$2 extends BaseResource {
3801
+ constructor(config: Configuration);
3802
+ list(workspaceSlug: string): Promise<ReleaseLabel[]>;
3803
+ create(workspaceSlug: string, data: CreateReleaseLabel): Promise<ReleaseLabel>;
3804
+ retrieve(workspaceSlug: string, labelId: string): Promise<ReleaseLabel>;
3805
+ update(workspaceSlug: string, labelId: string, data: UpdateReleaseLabel): Promise<ReleaseLabel>;
3806
+ delete(workspaceSlug: string, labelId: string): Promise<void>;
3807
+ }
3808
+ /**
3809
+ * ReleaseItemLabels sub-resource
3810
+ * Manages labels assigned to a specific release
3811
+ */
3812
+ declare class ItemLabels extends BaseResource {
3813
+ constructor(config: Configuration);
3814
+ list(workspaceSlug: string, releaseId: string): Promise<ReleaseLabel[]>;
3815
+ create(workspaceSlug: string, releaseId: string, data: AddReleaseItemLabel): Promise<ReleaseLabel[]>;
3816
+ /**
3817
+ * Detach labels from a release. The API takes the label ids in the request
3818
+ * body (DELETE .../releases/{releaseId}/labels/) — there is no per-label path.
2178
3819
  */
2179
- add(workspaceSlug: string, initiativeId: string, addProjects: AddInitiativeProjectsRequest): Promise<Project[]>;
3820
+ delete(workspaceSlug: string, releaseId: string, labelIds: string[]): Promise<void>;
2180
3821
  /**
2181
- * Remove projects from an initiative
3822
+ * @deprecated Use delete(workspaceSlug, releaseId, [labelId]) — the API
3823
+ * removes labels via ids in the request body, not a per-label path.
2182
3824
  */
2183
- remove(workspaceSlug: string, initiativeId: string, removeProjects: RemoveInitiativeProjectsRequest): Promise<void>;
3825
+ del(workspaceSlug: string, releaseId: string, labelId: string): Promise<void>;
2184
3826
  }
2185
3827
  /**
2186
- * Initiative Epics API resource
2187
- * Handles initiative epic relationships
3828
+ * ReleaseChangelog sub-resource
3829
+ * Manages the changelog document attached to a release
2188
3830
  */
2189
- declare class Epics$1 extends BaseResource {
3831
+ declare class Changelog extends BaseResource {
2190
3832
  constructor(config: Configuration);
2191
3833
  /**
2192
- * Get epics associated with an initiative
2193
- */
2194
- list(workspaceSlug: string, initiativeId: string, params?: {
2195
- limit?: number;
2196
- offset?: number;
2197
- }): Promise<PaginatedResponse<Epic>>;
2198
- /**
2199
- * Add epics to an initiative
3834
+ * Retrieve the changelog for a release
2200
3835
  */
2201
- add(workspaceSlug: string, initiativeId: string, addEpics: AddInitiativeEpicsRequest): Promise<Epic[]>;
3836
+ retrieve(workspaceSlug: string, releaseId: string): Promise<ReleaseChangelog>;
2202
3837
  /**
2203
- * Remove epics from an initiative
3838
+ * Update the changelog for a release
2204
3839
  */
2205
- remove(workspaceSlug: string, initiativeId: string, removeEpics: RemoveInitiativeEpicsRequest): Promise<void>;
3840
+ update(workspaceSlug: string, releaseId: string, data: UpdateReleaseChangelog): Promise<ReleaseChangelog>;
2206
3841
  }
2207
3842
  /**
2208
- * Initiatives API resource
2209
- * Handles all initiative-related operations
3843
+ * ReleaseComments sub-resource
3844
+ * Manages comments on a release
2210
3845
  */
2211
- export declare class Initiatives extends BaseResource {
2212
- labels: Labels$1;
2213
- projects: Projects$2;
2214
- epics: Epics$1;
3846
+ declare class Comments$1 extends BaseResource {
2215
3847
  constructor(config: Configuration);
2216
3848
  /**
2217
- * Create a new initiative
3849
+ * List comments on a release
2218
3850
  */
2219
- create(workspaceSlug: string, createInitiative: CreateInitiative): Promise<Initiative>;
3851
+ list(workspaceSlug: string, releaseId: string, params?: any): Promise<ReleaseComment[]>;
2220
3852
  /**
2221
- * Retrieve an initiative by ID
3853
+ * Retrieve a single release comment
2222
3854
  */
2223
- retrieve(workspaceSlug: string, initiativeId: string): Promise<Initiative>;
3855
+ retrieve(workspaceSlug: string, releaseId: string, commentId: string): Promise<ReleaseComment>;
2224
3856
  /**
2225
- * Update an initiative
3857
+ * Create a comment on a release
2226
3858
  */
2227
- update(workspaceSlug: string, initiativeId: string, updateInitiative: UpdateInitiative): Promise<Initiative>;
3859
+ create(workspaceSlug: string, releaseId: string, data: CreateReleaseComment): Promise<ReleaseComment>;
2228
3860
  /**
2229
- * Delete an initiative
3861
+ * Update a release comment
2230
3862
  */
2231
- delete(workspaceSlug: string, initiativeId: string): Promise<void>;
3863
+ update(workspaceSlug: string, releaseId: string, commentId: string, data: UpdateReleaseComment): Promise<ReleaseComment>;
2232
3864
  /**
2233
- * List initiatives with optional filtering
3865
+ * Delete a release comment
2234
3866
  */
2235
- list(workspaceSlug: string, params?: ListInitiativesParams): Promise<PaginatedResponse<Initiative>>;
2236
- }
2237
- export interface Milestone extends BaseModel {
2238
- title: string;
2239
- target_date?: string;
2240
- project: string;
2241
- workspace: string;
2242
- }
2243
- export interface MilestoneLite {
2244
- id?: string;
2245
- title: string;
2246
- target_date?: string;
2247
- external_source?: string;
2248
- external_id?: string;
2249
- created_at?: string;
2250
- updated_at?: string;
2251
- }
2252
- export interface CreateMilestoneRequest {
2253
- title: string;
2254
- target_date?: string;
2255
- external_source?: string;
2256
- external_id?: string;
2257
- }
2258
- export interface UpdateMilestoneRequest {
2259
- title?: string;
2260
- target_date?: string;
2261
- external_source?: string;
2262
- external_id?: string;
2263
- }
2264
- export interface MilestoneWorkItem {
2265
- id?: string;
2266
- issue?: string;
2267
- milestone?: string;
3867
+ delete(workspaceSlug: string, releaseId: string, commentId: string): Promise<void>;
2268
3868
  }
2269
3869
  /**
2270
- * Milestones API resource
2271
- * Handles all milestone related operations
3870
+ * ReleaseLinks sub-resource
3871
+ * Manages external links attached to a release
2272
3872
  */
2273
- export declare class Milestones extends BaseResource {
3873
+ declare class Links$1 extends BaseResource {
2274
3874
  constructor(config: Configuration);
2275
3875
  /**
2276
- * Create a new milestone
3876
+ * List links on a release
2277
3877
  */
2278
- create(workspaceSlug: string, projectId: string, createMilestone: CreateMilestoneRequest): Promise<Milestone>;
3878
+ list(workspaceSlug: string, releaseId: string, params?: any): Promise<ReleaseLink[]>;
2279
3879
  /**
2280
- * Retrieve a milestone by ID
3880
+ * Retrieve a single release link
2281
3881
  */
2282
- retrieve(workspaceSlug: string, projectId: string, milestoneId: string): Promise<Milestone>;
3882
+ retrieve(workspaceSlug: string, releaseId: string, linkId: string): Promise<ReleaseLink>;
2283
3883
  /**
2284
- * Update a milestone
3884
+ * Create a link on a release
2285
3885
  */
2286
- update(workspaceSlug: string, projectId: string, milestoneId: string, updateMilestone: UpdateMilestoneRequest): Promise<Milestone>;
3886
+ create(workspaceSlug: string, releaseId: string, data: CreateReleaseLink): Promise<ReleaseLink>;
2287
3887
  /**
2288
- * Delete a milestone
3888
+ * Update a release link
2289
3889
  */
2290
- delete(workspaceSlug: string, projectId: string, milestoneId: string): Promise<void>;
3890
+ update(workspaceSlug: string, releaseId: string, linkId: string, data: UpdateReleaseLink): Promise<ReleaseLink>;
2291
3891
  /**
2292
- * List milestones with optional filtering
3892
+ * Delete a release link
2293
3893
  */
2294
- list(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Milestone>>;
3894
+ delete(workspaceSlug: string, releaseId: string, linkId: string): Promise<void>;
3895
+ }
3896
+ /**
3897
+ * ReleaseWorkItems sub-resource
3898
+ * Manages the work items attached to a release
3899
+ */
3900
+ declare class WorkItems$2 extends BaseResource {
3901
+ constructor(config: Configuration);
2295
3902
  /**
2296
- * Add work items to a milestone
3903
+ * List work items attached to a release
2297
3904
  */
2298
- addWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
3905
+ list(workspaceSlug: string, releaseId: string, params?: any): Promise<ReleaseWorkItem[]>;
2299
3906
  /**
2300
- * Remove work items from a milestone
3907
+ * Attach work items to a release
2301
3908
  */
2302
- removeWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, issueIds: string[]): Promise<void>;
3909
+ create(workspaceSlug: string, releaseId: string, workItemIds: string[]): Promise<void>;
2303
3910
  /**
2304
- * List work items in a milestone
3911
+ * Detach work items from a release (ids in body)
2305
3912
  */
2306
- listWorkItems(workspaceSlug: string, projectId: string, milestoneId: string, params?: any): Promise<PaginatedResponse<MilestoneWorkItem>>;
3913
+ delete(workspaceSlug: string, releaseId: string, workItemIds: string[]): Promise<void>;
2307
3914
  }
2308
3915
  /**
2309
- * Agent run status enum
2310
- */
2311
- export type AgentRunStatus = "created" | "in_progress" | "awaiting" | "completed" | "stopping" | "stopped" | "failed" | "stale";
2312
- /**
2313
- * Agent run type enum
2314
- */
2315
- export type AgentRunType = "comment_thread";
2316
- /**
2317
- * Agent run activity signal enum
2318
- */
2319
- export type AgentRunActivitySignal = "auth_request" | "continue" | "select" | "stop";
2320
- /**
2321
- * Agent run activity type enum
3916
+ * Releases API resource
3917
+ * Manages releases at the workspace level with tags, labels, item-label,
3918
+ * changelog, comment, link, and work-item sub-resources
2322
3919
  */
2323
- export type AgentRunActivityType = "action" | "elicitation" | "error" | "prompt" | "response" | "thought";
3920
+ export declare class Releases extends BaseResource {
3921
+ tags: Tags;
3922
+ labels: Labels$2;
3923
+ itemLabels: ItemLabels;
3924
+ changelog: Changelog;
3925
+ comments: Comments$1;
3926
+ links: Links$1;
3927
+ workItems: WorkItems$2;
3928
+ constructor(config: Configuration);
3929
+ list(workspaceSlug: string): Promise<Release[]>;
3930
+ retrieve(workspaceSlug: string, releaseId: string): Promise<Release>;
3931
+ create(workspaceSlug: string, data: CreateRelease): Promise<Release>;
3932
+ update(workspaceSlug: string, releaseId: string, data: UpdateRelease): Promise<Release>;
3933
+ delete(workspaceSlug: string, releaseId: string): Promise<void>;
3934
+ }
2324
3935
  /**
2325
- * Agent Run interface
3936
+ * Workflow model interfaces
2326
3937
  */
2327
- export interface AgentRun extends BaseModel {
2328
- agent_user: string;
2329
- comment?: string;
2330
- source_comment?: string;
2331
- creator: string;
2332
- stopped_at?: string;
2333
- stopped_by?: string;
2334
- started_at: string;
2335
- ended_at?: string;
2336
- external_link?: string;
2337
- issue?: string;
3938
+ export interface Workflow extends BaseModel {
3939
+ name: string;
3940
+ description?: string;
3941
+ is_active?: boolean;
3942
+ is_default?: boolean;
3943
+ work_item_type_ids?: string[];
3944
+ project: string;
2338
3945
  workspace: string;
2339
- project?: string;
2340
- status: AgentRunStatus;
2341
- error_metadata?: Record<string, any>;
2342
- type: AgentRunType;
2343
3946
  }
2344
- /**
2345
- * Create agent run request interface
2346
- */
2347
- export interface CreateAgentRunRequest {
2348
- agent_slug: string;
2349
- issue?: string;
2350
- project?: string;
2351
- comment?: string;
2352
- source_comment?: string;
2353
- external_link?: string;
2354
- type?: AgentRunType;
3947
+ export type CreateWorkflow = Pick<Workflow, "name" | "description" | "is_active" | "work_item_type_ids">;
3948
+ export type UpdateWorkflow = Partial<CreateWorkflow>;
3949
+ export interface AttachWorkflowStates {
3950
+ state_ids: string[];
3951
+ }
3952
+ export interface WorkflowTransition extends BaseModel {
3953
+ state_id?: string;
3954
+ transition_state_id?: string;
3955
+ type?: string;
3956
+ member_ids?: string[];
3957
+ pre_rules?: Record<string, unknown>[];
3958
+ post_rules?: Record<string, unknown>[];
3959
+ workflow_state_id?: string;
2355
3960
  }
3961
+ export type CreateWorkflowTransition = Required<Pick<WorkflowTransition, "state_id" | "transition_state_id">> & Partial<Pick<WorkflowTransition, "type" | "member_ids" | "pre_rules" | "post_rules">>;
3962
+ export type UpdateWorkflowTransition = Partial<Pick<WorkflowTransition, "pre_rules" | "post_rules">>;
2356
3963
  /**
2357
- * Agent run activity content for action type
3964
+ * WorkflowStates sub-resource
3965
+ * Manages state attachments on a workflow
2358
3966
  */
2359
- export interface AgentRunActivityActionContent {
2360
- type: "action";
2361
- action: string;
2362
- parameters: Record<string, string>;
3967
+ declare class States$1 extends BaseResource {
3968
+ constructor(config: Configuration);
3969
+ /**
3970
+ * Attach states to a workflow
3971
+ */
3972
+ attach(workspaceSlug: string, projectId: string, workflowId: string, data: AttachWorkflowStates): Promise<void>;
3973
+ /**
3974
+ * Detach a state from a workflow
3975
+ */
3976
+ detach(workspaceSlug: string, projectId: string, workflowId: string, stateId: string): Promise<void>;
2363
3977
  }
2364
3978
  /**
2365
- * Agent run activity content for other types
3979
+ * WorkflowTransitions sub-resource
3980
+ * Manages state transitions within a workflow
2366
3981
  */
2367
- export interface AgentRunActivityTextContent {
2368
- type: Exclude<AgentRunActivityType, "action">;
2369
- body: string;
3982
+ declare class Transitions extends BaseResource {
3983
+ constructor(config: Configuration);
3984
+ /**
3985
+ * List all state transitions for a workflow
3986
+ */
3987
+ list(workspaceSlug: string, projectId: string, workflowId: string): Promise<WorkflowTransition[]>;
3988
+ /**
3989
+ * Create a state transition for a workflow.
3990
+ * Returns null if the transition already exists (HTTP 400 "already exists").
3991
+ */
3992
+ create(workspaceSlug: string, projectId: string, workflowId: string, data: CreateWorkflowTransition): Promise<WorkflowTransition | null>;
3993
+ /**
3994
+ * Update a workflow state transition
3995
+ */
3996
+ update(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string, data: UpdateWorkflowTransition): Promise<WorkflowTransition>;
3997
+ /**
3998
+ * Delete a workflow state transition
3999
+ */
4000
+ del(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string): Promise<void>;
2370
4001
  }
2371
4002
  /**
2372
- * Agent run activity content
4003
+ * Workflows API resource
4004
+ * Handles project workflow operations and exposes states/transitions sub-resources
2373
4005
  */
2374
- export type AgentRunActivityContent = AgentRunActivityActionContent | AgentRunActivityTextContent;
4006
+ export declare class Workflows extends BaseResource {
4007
+ states: States$1;
4008
+ transitions: Transitions;
4009
+ constructor(config: Configuration);
4010
+ /**
4011
+ * List all workflows for a project
4012
+ */
4013
+ list(workspaceSlug: string, projectId: string): Promise<Workflow[]>;
4014
+ /**
4015
+ * Create a new workflow for a project
4016
+ */
4017
+ create(workspaceSlug: string, projectId: string, data: CreateWorkflow): Promise<Workflow>;
4018
+ /**
4019
+ * Update a workflow by ID
4020
+ */
4021
+ update(workspaceSlug: string, projectId: string, workflowId: string, data: UpdateWorkflow): Promise<Workflow>;
4022
+ }
2375
4023
  /**
2376
- * Agent Run Activity interface
4024
+ * Project template model interfaces
2377
4025
  */
2378
- export interface AgentRunActivity extends BaseModel {
2379
- agent_run: string;
2380
- content: AgentRunActivityContent;
2381
- content_metadata?: Record<string, any>;
2382
- ephemeral: boolean;
2383
- signal: AgentRunActivitySignal;
2384
- signal_metadata?: Record<string, any>;
2385
- comment?: string;
2386
- actor?: string;
2387
- type: AgentRunActivityType;
2388
- project?: string;
4026
+ export interface WorkItemTemplate extends BaseModel {
4027
+ name: string;
4028
+ short_description?: string;
4029
+ template_data?: Record<string, unknown>;
4030
+ template_type?: string;
4031
+ project: string;
2389
4032
  workspace: string;
2390
4033
  }
2391
- /**
2392
- * Create agent run activity request interface
2393
- */
2394
- export interface CreateAgentRunActivityRequest {
2395
- content: AgentRunActivityContent;
2396
- content_metadata?: Record<string, any>;
2397
- signal?: AgentRunActivitySignal;
2398
- signal_metadata?: Record<string, any>;
2399
- type: Exclude<AgentRunActivityType, "prompt">;
2400
- project?: string;
4034
+ export type CreateWorkItemTemplate = Pick<WorkItemTemplate, "name" | "short_description" | "template_data">;
4035
+ export type UpdateWorkItemTemplate = Partial<CreateWorkItemTemplate>;
4036
+ export interface PageTemplate extends BaseModel {
4037
+ name: string;
4038
+ short_description?: string;
4039
+ template_data?: Record<string, unknown>;
4040
+ template_type?: string;
4041
+ project: string;
4042
+ workspace: string;
2401
4043
  }
4044
+ export type CreatePageTemplate = Pick<PageTemplate, "name" | "short_description" | "template_data">;
4045
+ export type UpdatePageTemplate = Partial<CreatePageTemplate>;
2402
4046
  /**
2403
- * Agent Run Activities API resource
2404
- * Handles all agent run activity operations
4047
+ * ProjectWorkItemTemplates sub-resource
4048
+ * Manages work item templates within a project
2405
4049
  */
2406
- declare class Activities$1 extends BaseResource {
4050
+ declare class WorkItems$3 extends BaseResource {
2407
4051
  constructor(config: Configuration);
2408
4052
  /**
2409
- * List activities for an agent run
2410
- * @param workspaceSlug - The workspace slug
2411
- * @param runId - The agent run ID
2412
- * @param params - Optional query parameters for pagination
2413
- * @returns Paginated list of agent run activities
4053
+ * List all work item templates for a project
2414
4054
  */
2415
- list(workspaceSlug: string, runId: string, params?: {
2416
- per_page?: number;
2417
- cursor?: string;
2418
- }): Promise<PaginatedResponse<AgentRunActivity>>;
4055
+ list(workspaceSlug: string, projectId: string): Promise<WorkItemTemplate[]>;
2419
4056
  /**
2420
- * Retrieve a specific agent run activity by ID
2421
- * @param workspaceSlug - The workspace slug
2422
- * @param runId - The agent run ID
2423
- * @param activityId - The activity ID
2424
- * @returns The agent run activity
4057
+ * Create a new work item template for a project
2425
4058
  */
2426
- retrieve(workspaceSlug: string, runId: string, activityId: string): Promise<AgentRunActivity>;
4059
+ create(workspaceSlug: string, projectId: string, data: CreateWorkItemTemplate): Promise<WorkItemTemplate>;
2427
4060
  /**
2428
- * Create a new agent run activity
2429
- * @param workspaceSlug - The workspace slug
2430
- * @param runId - The agent run ID
2431
- * @param data - The activity data to create
2432
- * @returns The created agent run activity
4061
+ * Update a work item template by ID
2433
4062
  */
2434
- create(workspaceSlug: string, runId: string, data: CreateAgentRunActivityRequest): Promise<AgentRunActivity>;
4063
+ update(workspaceSlug: string, projectId: string, templateId: string, data: UpdateWorkItemTemplate): Promise<WorkItemTemplate>;
4064
+ /**
4065
+ * Delete a work item template by ID
4066
+ */
4067
+ del(workspaceSlug: string, projectId: string, templateId: string): Promise<void>;
2435
4068
  }
2436
4069
  /**
2437
- * Agent Runs API resource
2438
- * Handles all agent run operations
4070
+ * ProjectPageTemplates sub-resource
4071
+ * Manages page templates within a project
2439
4072
  */
2440
- export declare class AgentRuns extends BaseResource {
2441
- activities: Activities$1;
4073
+ declare class Pages$4 extends BaseResource {
2442
4074
  constructor(config: Configuration);
2443
4075
  /**
2444
- * Create a new agent run
2445
- * @param workspaceSlug - The workspace slug
2446
- * @param data - The agent run data to create
2447
- * @returns The created agent run
4076
+ * List all page templates for a project
2448
4077
  */
2449
- create(workspaceSlug: string, data: CreateAgentRunRequest): Promise<AgentRun>;
4078
+ list(workspaceSlug: string, projectId: string): Promise<PageTemplate[]>;
2450
4079
  /**
2451
- * Retrieve an agent run by ID
2452
- * @param workspaceSlug - The workspace slug
2453
- * @param runId - The agent run ID
2454
- * @returns The agent run
4080
+ * Create a new page template for a project
2455
4081
  */
2456
- retrieve(workspaceSlug: string, runId: string): Promise<AgentRun>;
4082
+ create(workspaceSlug: string, projectId: string, data: CreatePageTemplate): Promise<PageTemplate>;
4083
+ /**
4084
+ * Update a page template by ID
4085
+ */
4086
+ update(workspaceSlug: string, projectId: string, templateId: string, data: UpdatePageTemplate): Promise<PageTemplate>;
4087
+ /**
4088
+ * Delete a page template by ID
4089
+ */
4090
+ del(workspaceSlug: string, projectId: string, templateId: string): Promise<void>;
4091
+ }
4092
+ /**
4093
+ * ProjectTemplates API resource
4094
+ * Container for work item and page template sub-resources
4095
+ */
4096
+ export declare class ProjectTemplates extends BaseResource {
4097
+ workItems: WorkItems$3;
4098
+ pages: Pages$4;
4099
+ constructor(config: Configuration);
2457
4100
  }
2458
4101
  /**
2459
4102
  * Main Plane Client class
@@ -2466,15 +4109,17 @@ export declare class PlaneClient {
2466
4109
  workItemProperties: WorkItemProperties;
2467
4110
  links: Links;
2468
4111
  customers: Customers;
2469
- pages: Pages;
4112
+ pages: Pages$1;
2470
4113
  projects: Projects;
2471
4114
  labels: Labels;
2472
4115
  states: States;
2473
- members: Members;
2474
4116
  modules: Modules;
2475
4117
  cycles: Cycles;
2476
4118
  users: Users;
2477
4119
  workspace: Workspace;
4120
+ estimates: Estimates;
4121
+ roles: Roles;
4122
+ collections: Collections;
2478
4123
  epics: Epics;
2479
4124
  intake: Intake;
2480
4125
  stickies: Stickies;
@@ -2482,6 +4127,15 @@ export declare class PlaneClient {
2482
4127
  milestones: Milestones;
2483
4128
  initiatives: Initiatives;
2484
4129
  agentRuns: AgentRuns;
4130
+ workspaceTemplates: WorkspaceTemplates;
4131
+ workspaceWorkItemTypes: WorkspaceWorkItemTypes;
4132
+ workspaceWorkItemProperties: WorkspaceWorkItemProperties;
4133
+ workspaceProjectLabels: WorkspaceProjectLabels;
4134
+ workspaceProjectStates: WorkspaceProjectStates;
4135
+ workItemRelationDefinitions: WorkItemRelationDefinitions;
4136
+ releases: Releases;
4137
+ workflows: Workflows;
4138
+ projectTemplates: ProjectTemplates;
2485
4139
  constructor(config: {
2486
4140
  baseUrl?: string;
2487
4141
  apiKey?: string;
@@ -2590,17 +4244,39 @@ export {
2590
4244
  Activities as WorkItemActivities,
2591
4245
  Activities$1 as AgentRunActivities,
2592
4246
  Attachments as WorkItemAttachments,
4247
+ Changelog as ReleaseChangelogResource,
2593
4248
  Comments as WorkItemComments,
4249
+ Comments$1 as ReleaseComments,
4250
+ CustomRelations as WorkItemCustomRelations,
4251
+ Dependencies as WorkItemDependencies,
2594
4252
  Epics$1 as InitiativeEpics,
4253
+ ItemLabels as ReleaseItemLabels,
2595
4254
  Labels$1 as InitiativeLabels,
4255
+ Labels$2 as ReleaseLabels,
4256
+ Links$1 as ReleaseLinks,
4257
+ Members as CollectionMembersResource,
2596
4258
  Members$1 as TeamspaceMembers,
2597
4259
  Options as WorkItemPropertyOptions,
4260
+ Options$1 as WorkspaceWorkItemPropertyOptions,
4261
+ Pages as WorkItemPages,
4262
+ Pages$1 as Pages,
4263
+ Pages$2 as CollectionPagesResource,
4264
+ Pages$3 as WorkspacePageTemplates,
4265
+ Pages$4 as ProjectPageTemplates,
2598
4266
  Projects$1 as TeamspaceProjects,
2599
4267
  Projects$2 as InitiativeProjects,
4268
+ Projects$3 as WorkspaceProjectTemplates,
2600
4269
  Properties as CustomerProperties,
4270
+ Properties$1 as WorkspaceWorkItemTypeProperties,
2601
4271
  Relations as WorkItemRelations,
2602
4272
  Requests as CustomerRequests,
4273
+ States$1 as WorkflowStates,
4274
+ Tags as ReleaseTags,
4275
+ Transitions as WorkflowTransitions,
2603
4276
  Values as WorkItemPropertyValues,
4277
+ WorkItems$1 as WorkspaceWorkItemTemplates,
4278
+ WorkItems$2 as ReleaseWorkItems,
4279
+ WorkItems$3 as ProjectWorkItemTemplates,
2604
4280
  };
2605
4281
 
2606
4282
  export {};