@makeplane/plane-node-sdk 0.2.12 → 0.2.13

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 (85) hide show
  1. package/README.md +4 -1
  2. package/dist/api/Pages.d.ts +47 -1
  3. package/dist/api/Pages.d.ts.map +1 -1
  4. package/dist/api/Pages.js +62 -0
  5. package/dist/api/Pages.js.map +1 -1
  6. package/dist/api/WorkItemTypeGovernance/Pins.d.ts +26 -0
  7. package/dist/api/WorkItemTypeGovernance/Pins.d.ts.map +1 -0
  8. package/dist/api/WorkItemTypeGovernance/Pins.js +38 -0
  9. package/dist/api/WorkItemTypeGovernance/Pins.js.map +1 -0
  10. package/dist/api/WorkItemTypeGovernance/ProjectWorkflows.d.ts +37 -0
  11. package/dist/api/WorkItemTypeGovernance/ProjectWorkflows.d.ts.map +1 -0
  12. package/dist/api/WorkItemTypeGovernance/ProjectWorkflows.js +56 -0
  13. package/dist/api/WorkItemTypeGovernance/ProjectWorkflows.js.map +1 -0
  14. package/dist/api/WorkItemTypeGovernance/index.d.ts +36 -0
  15. package/dist/api/WorkItemTypeGovernance/index.d.ts.map +1 -0
  16. package/dist/api/WorkItemTypeGovernance/index.js +50 -0
  17. package/dist/api/WorkItemTypeGovernance/index.js.map +1 -0
  18. package/dist/api/Workflows/Hooks.d.ts +34 -0
  19. package/dist/api/Workflows/Hooks.d.ts.map +1 -0
  20. package/dist/api/Workflows/Hooks.js +52 -0
  21. package/dist/api/Workflows/Hooks.js.map +1 -0
  22. package/dist/api/Workflows/States.d.ts +13 -1
  23. package/dist/api/Workflows/States.d.ts.map +1 -1
  24. package/dist/api/Workflows/States.js +20 -0
  25. package/dist/api/Workflows/States.js.map +1 -1
  26. package/dist/api/Workflows/Transitions.d.ts +4 -0
  27. package/dist/api/Workflows/Transitions.d.ts.map +1 -1
  28. package/dist/api/Workflows/Transitions.js +6 -0
  29. package/dist/api/Workflows/Transitions.js.map +1 -1
  30. package/dist/api/Workflows/index.d.ts +29 -2
  31. package/dist/api/Workflows/index.d.ts.map +1 -1
  32. package/dist/api/Workflows/index.js +34 -1
  33. package/dist/api/Workflows/index.js.map +1 -1
  34. package/dist/api/WorkspaceStates.d.ts +55 -0
  35. package/dist/api/WorkspaceStates.d.ts.map +1 -0
  36. package/dist/api/WorkspaceStates.js +73 -0
  37. package/dist/api/WorkspaceStates.js.map +1 -0
  38. package/dist/api/WorkspaceWorkflows/Hooks.d.ts +56 -0
  39. package/dist/api/WorkspaceWorkflows/Hooks.d.ts.map +1 -0
  40. package/dist/api/WorkspaceWorkflows/Hooks.js +65 -0
  41. package/dist/api/WorkspaceWorkflows/Hooks.js.map +1 -0
  42. package/dist/api/WorkspaceWorkflows/States.d.ts +34 -0
  43. package/dist/api/WorkspaceWorkflows/States.d.ts.map +1 -0
  44. package/dist/api/WorkspaceWorkflows/States.js +47 -0
  45. package/dist/api/WorkspaceWorkflows/States.js.map +1 -0
  46. package/dist/api/WorkspaceWorkflows/Transitions.d.ts +31 -0
  47. package/dist/api/WorkspaceWorkflows/Transitions.d.ts.map +1 -0
  48. package/dist/api/WorkspaceWorkflows/Transitions.js +46 -0
  49. package/dist/api/WorkspaceWorkflows/Transitions.js.map +1 -0
  50. package/dist/api/WorkspaceWorkflows/index.d.ts +67 -0
  51. package/dist/api/WorkspaceWorkflows/index.d.ts.map +1 -0
  52. package/dist/api/WorkspaceWorkflows/index.js +73 -0
  53. package/dist/api/WorkspaceWorkflows/index.js.map +1 -0
  54. package/dist/client/plane-client.d.ts +6 -0
  55. package/dist/client/plane-client.d.ts.map +1 -1
  56. package/dist/client/plane-client.js +6 -0
  57. package/dist/client/plane-client.js.map +1 -1
  58. package/dist/index.d.ts +9 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +20 -2
  61. package/dist/index.js.map +1 -1
  62. package/dist/models/Page.d.ts +21 -0
  63. package/dist/models/Page.d.ts.map +1 -1
  64. package/dist/models/Project.d.ts +1 -0
  65. package/dist/models/Project.d.ts.map +1 -1
  66. package/dist/models/State.d.ts +31 -0
  67. package/dist/models/State.d.ts.map +1 -1
  68. package/dist/models/WorkItemTypeGovernance.d.ts +130 -0
  69. package/dist/models/WorkItemTypeGovernance.d.ts.map +1 -0
  70. package/dist/models/WorkItemTypeGovernance.js +3 -0
  71. package/dist/models/WorkItemTypeGovernance.js.map +1 -0
  72. package/dist/models/Workflow.d.ts +62 -0
  73. package/dist/models/Workflow.d.ts.map +1 -1
  74. package/dist/models/WorkspaceFeatures.d.ts +18 -7
  75. package/dist/models/WorkspaceFeatures.d.ts.map +1 -1
  76. package/dist/models/WorkspaceWorkflow.d.ts +145 -0
  77. package/dist/models/WorkspaceWorkflow.d.ts.map +1 -0
  78. package/dist/models/WorkspaceWorkflow.js +3 -0
  79. package/dist/models/WorkspaceWorkflow.js.map +1 -0
  80. package/dist/models/index.d.ts +2 -0
  81. package/dist/models/index.d.ts.map +1 -1
  82. package/dist/models/index.js +2 -0
  83. package/dist/models/index.js.map +1 -1
  84. package/dist/types.bundle.d.ts +835 -8
  85. package/package.json +1 -1
@@ -148,6 +148,7 @@ export interface Project extends BaseModel {
148
148
  cover_image_url: null;
149
149
  name: string;
150
150
  description: string;
151
+ description_html?: string;
151
152
  network?: number;
152
153
  identifier?: string;
153
154
  emoji?: null;
@@ -520,6 +521,37 @@ export type ListStatesParams = {
520
521
  offset?: number;
521
522
  };
522
523
  export type GroupEnum = "backlog" | "unstarted" | "started" | "completed" | "cancelled" | "triage";
524
+ /**
525
+ * Workspace (catalog) states accept only the five lifecycle groups — the
526
+ * triage state is system-managed under workspace governance.
527
+ */
528
+ export type CatalogGroupEnum = "backlog" | "unstarted" | "started" | "completed" | "cancelled";
529
+ /**
530
+ * Request model for creating a workspace (catalog) state.
531
+ *
532
+ * Only accepted when the workspace owns states and workflows (workspace
533
+ * governance). `group` is required and must be one of the five lifecycle
534
+ * groups. Catalog states carry no `default` flag; the workspace default lives
535
+ * on the workflow's default state.
536
+ */
537
+ export type CreateWorkspaceState = {
538
+ name: string;
539
+ color: string;
540
+ group: CatalogGroupEnum;
541
+ description?: string;
542
+ external_source?: string;
543
+ external_id?: string;
544
+ };
545
+ /**
546
+ * Request model for updating a workspace (catalog) state.
547
+ * `default` is not accepted for catalog states — the API rejects it with
548
+ * code `workspace_managed`.
549
+ */
550
+ export type UpdateWorkspaceState = Partial<CreateWorkspaceState>;
551
+ export type ListWorkspaceStatesParams = {
552
+ cursor?: string;
553
+ per_page?: number;
554
+ };
523
555
  /**
524
556
  * WorkItem model interfaces
525
557
  */
@@ -1855,6 +1887,19 @@ export interface Page extends BaseModel {
1855
1887
  description_stripped?: string;
1856
1888
  created_by: string;
1857
1889
  updated_by?: string;
1890
+ /** 0 = public, 1 = private */
1891
+ access?: number;
1892
+ is_locked?: boolean;
1893
+ /** Set when the page is archived; deleting a page requires it to be archived first */
1894
+ archived_at?: string;
1895
+ parent_id?: string;
1896
+ /**
1897
+ * Where the page is filed, and the id of the row that files it there -- the
1898
+ * second is what addresses the membership when moving the page between
1899
+ * collections. Both are null for a page in no collection.
1900
+ */
1901
+ collection_id?: string;
1902
+ page_collection_id?: string;
1858
1903
  [key: string]: any;
1859
1904
  }
1860
1905
  export type CreatePage = Partial<Page> & {
@@ -1863,6 +1908,14 @@ export type CreatePage = Partial<Page> & {
1863
1908
  /** Create the page directly inside this collection */
1864
1909
  collection_id?: string;
1865
1910
  };
1911
+ /**
1912
+ * Fields a page update may change. At least one is required; sending neither is
1913
+ * refused with 400 "Either name or description_html is required."
1914
+ */
1915
+ export interface UpdatePage {
1916
+ name?: string;
1917
+ description_html?: string;
1918
+ }
1866
1919
  /**
1867
1920
  * Pages API resource
1868
1921
  * Handles both workspace and project page operations
@@ -1881,6 +1934,29 @@ declare class Pages$1 extends BaseResource {
1881
1934
  * List workspace pages
1882
1935
  */
1883
1936
  listWorkspacePages(workspaceSlug: string, params?: any): Promise<PaginatedResponse<Page>>;
1937
+ /**
1938
+ * Update a workspace page's name, content, or both. A page that is locked or
1939
+ * archived is refused.
1940
+ *
1941
+ * Content is written through Plane's live collaboration service, which owns the
1942
+ * document. If it is unreachable the API answers 502 and nothing is written,
1943
+ * rather than leaving the editor showing the old text.
1944
+ */
1945
+ updateWorkspacePage(workspaceSlug: string, pageId: string, updatePage: UpdatePage): Promise<Page>;
1946
+ /**
1947
+ * Archive a workspace page. Archiving is the reversible step the API requires
1948
+ * before a page can be deleted.
1949
+ */
1950
+ archiveWorkspacePage(workspaceSlug: string, pageId: string): Promise<void>;
1951
+ /**
1952
+ * Restore an archived workspace page
1953
+ */
1954
+ unarchiveWorkspacePage(workspaceSlug: string, pageId: string): Promise<void>;
1955
+ /**
1956
+ * Delete a workspace page. The page must be archived first; the API answers 400
1957
+ * "The page should be archived before deleting" otherwise.
1958
+ */
1959
+ deleteWorkspacePage(workspaceSlug: string, pageId: string): Promise<void>;
1884
1960
  /**
1885
1961
  * Create a project page
1886
1962
  */
@@ -1893,6 +1969,29 @@ declare class Pages$1 extends BaseResource {
1893
1969
  * List project pages
1894
1970
  */
1895
1971
  listProjectPages(workspaceSlug: string, projectId: string, params?: any): Promise<PaginatedResponse<Page>>;
1972
+ /**
1973
+ * Update a project page's name, content, or both. A page that is locked or
1974
+ * archived is refused.
1975
+ *
1976
+ * Content is written through Plane's live collaboration service, which owns the
1977
+ * document. If it is unreachable the API answers 502 and nothing is written,
1978
+ * rather than leaving the editor showing the old text.
1979
+ */
1980
+ updateProjectPage(workspaceSlug: string, projectId: string, pageId: string, updatePage: UpdatePage): Promise<Page>;
1981
+ /**
1982
+ * Archive a project page. Archiving is the reversible step the API requires
1983
+ * before a page can be deleted.
1984
+ */
1985
+ archiveProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<void>;
1986
+ /**
1987
+ * Restore an archived project page
1988
+ */
1989
+ unarchiveProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<void>;
1990
+ /**
1991
+ * Delete a project page. The page must be archived first; the API answers 400
1992
+ * "The page should be archived before deleting" otherwise.
1993
+ */
1994
+ deleteProjectPage(workspaceSlug: string, projectId: string, pageId: string): Promise<void>;
1896
1995
  /**
1897
1996
  * Retrieve workspace page
1898
1997
  */
@@ -2206,16 +2305,27 @@ export declare class Users extends BaseResource {
2206
2305
  }
2207
2306
  /**
2208
2307
  * Workspace Features model interfaces
2308
+ *
2309
+ * All fields are optional so a caller can toggle a single feature; the update
2310
+ * endpoint is a partial (PATCH) that only applies the fields that are sent.
2209
2311
  */
2210
2312
  export interface WorkspaceFeatures {
2211
- project_grouping: boolean;
2212
- initiatives: boolean;
2213
- teams: boolean;
2214
- customers: boolean;
2215
- wiki: boolean;
2216
- pi: boolean;
2313
+ project_grouping?: boolean;
2314
+ initiatives?: boolean;
2315
+ teams?: boolean;
2316
+ customers?: boolean;
2317
+ wiki?: boolean;
2318
+ pi?: boolean;
2319
+ work_item_types?: boolean;
2320
+ releases?: boolean;
2321
+ /**
2322
+ * Read-only: reports whether states and workflows live at the workspace
2323
+ * level (workspace governance). Only the governance migration can change
2324
+ * it — the update endpoint rejects it as an input.
2325
+ */
2326
+ states_owned_by_workspace?: boolean;
2217
2327
  }
2218
- export type UpdateWorkspaceFeatures = Partial<WorkspaceFeatures>;
2328
+ export type UpdateWorkspaceFeatures = Partial<Omit<WorkspaceFeatures, "states_owned_by_workspace">>;
2219
2329
  /**
2220
2330
  * Workspace API resource
2221
2331
  * Handles all workspace-related operations
@@ -3960,20 +4070,94 @@ export interface WorkflowTransition extends BaseModel {
3960
4070
  }
3961
4071
  export type CreateWorkflowTransition = Required<Pick<WorkflowTransition, "state_id" | "transition_state_id">> & Partial<Pick<WorkflowTransition, "type" | "member_ids" | "pre_rules" | "post_rules">>;
3962
4072
  export type UpdateWorkflowTransition = Partial<Pick<WorkflowTransition, "pre_rules" | "post_rules">>;
4073
+ /**
4074
+ * A state's membership row within a workflow chain. `id` is the membership
4075
+ * row's ID and `state_id` the state's own — the inverse of
4076
+ * `WorkspaceWorkflowState`, whose rows are keyed by state ID.
4077
+ */
4078
+ export interface WorkflowState {
4079
+ id?: string;
4080
+ state_id?: string;
4081
+ workflow_id?: string;
4082
+ type?: string;
4083
+ allow_issue_creation?: boolean;
4084
+ is_default?: boolean;
4085
+ created_at?: string;
4086
+ updated_at?: string;
4087
+ }
4088
+ export type UpdateWorkflowState = Partial<Pick<WorkflowState, "type" | "allow_issue_creation" | "is_default">>;
4089
+ /**
4090
+ * One workflow activity/audit entry
4091
+ */
4092
+ export interface WorkflowActivity {
4093
+ id?: string;
4094
+ verb?: string;
4095
+ field?: string;
4096
+ old_value?: unknown;
4097
+ new_value?: unknown;
4098
+ actor?: unknown;
4099
+ created_at?: string;
4100
+ }
4101
+ /**
4102
+ * Request model for approving or rejecting a work item's pending workflow
4103
+ * transition
4104
+ */
4105
+ export interface SubmitWorkItemApproval {
4106
+ type: "approve" | "reject";
4107
+ }
4108
+ /**
4109
+ * Response of a work item workflow approval: the state the item moved to
4110
+ */
4111
+ export interface WorkItemApprovalResult {
4112
+ state_id?: string;
4113
+ }
4114
+ /**
4115
+ * A validation/action hook attached to a workflow transition.
4116
+ * `config.secret` is masked for send_webhook handlers; the one-shot
4117
+ * `secret_plaintext` appears on create and regenerate responses only.
4118
+ */
4119
+ export interface WorkflowTransitionHook {
4120
+ id?: string;
4121
+ phase?: string;
4122
+ handler_name?: string;
4123
+ rule_type?: string;
4124
+ execution_order?: number;
4125
+ is_enabled?: boolean;
4126
+ config?: Record<string, unknown>;
4127
+ secret_plaintext?: string;
4128
+ }
4129
+ /**
4130
+ * Request model for creating a workflow transition hook. `phase` and
4131
+ * `handler_name` are immutable post-create.
4132
+ */
4133
+ export type CreateWorkflowTransitionHook = Pick<WorkflowTransitionHook, "phase" | "handler_name" | "config"> & Partial<Pick<WorkflowTransitionHook, "is_enabled">>;
4134
+ export type UpdateWorkflowTransitionHook = Partial<Pick<WorkflowTransitionHook, "config" | "is_enabled">>;
3963
4135
  /**
3964
4136
  * WorkflowStates sub-resource
3965
4137
  * Manages state attachments on a workflow
3966
4138
  */
3967
4139
  declare class States$1 extends BaseResource {
3968
4140
  constructor(config: Configuration);
4141
+ /**
4142
+ * List the states attached to a workflow
4143
+ */
4144
+ list(workspaceSlug: string, projectId: string, workflowId: string): Promise<WorkflowState[]>;
3969
4145
  /**
3970
4146
  * Attach states to a workflow
3971
4147
  */
3972
4148
  attach(workspaceSlug: string, projectId: string, workflowId: string, data: AttachWorkflowStates): Promise<void>;
4149
+ /**
4150
+ * Update a state's membership row (type, allow_issue_creation, is_default)
4151
+ */
4152
+ update(workspaceSlug: string, projectId: string, workflowId: string, stateId: string, data: UpdateWorkflowState): Promise<WorkflowState | null>;
3973
4153
  /**
3974
4154
  * Detach a state from a workflow
3975
4155
  */
3976
4156
  detach(workspaceSlug: string, projectId: string, workflowId: string, stateId: string): Promise<void>;
4157
+ /**
4158
+ * Transfer work items off a state and remove it from the workflow
4159
+ */
4160
+ transfer(workspaceSlug: string, projectId: string, workflowId: string, stateId: string, newStateId: string): Promise<void>;
3977
4161
  }
3978
4162
  /**
3979
4163
  * WorkflowTransitions sub-resource
@@ -3985,6 +4169,10 @@ declare class Transitions extends BaseResource {
3985
4169
  * List all state transitions for a workflow
3986
4170
  */
3987
4171
  list(workspaceSlug: string, projectId: string, workflowId: string): Promise<WorkflowTransition[]>;
4172
+ /**
4173
+ * Retrieve a workflow state transition by ID
4174
+ */
4175
+ retrieve(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string): Promise<WorkflowTransition>;
3988
4176
  /**
3989
4177
  * Create a state transition for a workflow.
3990
4178
  * Returns null if the transition already exists (HTTP 400 "already exists").
@@ -3999,13 +4187,52 @@ declare class Transitions extends BaseResource {
3999
4187
  */
4000
4188
  del(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string): Promise<void>;
4001
4189
  }
4190
+ /**
4191
+ * WorkflowTransitionHooks sub-resource
4192
+ * Manages hooks attached to project workflow transitions
4193
+ */
4194
+ declare class Hooks extends BaseResource {
4195
+ constructor(config: Configuration);
4196
+ private basePath;
4197
+ /**
4198
+ * List hooks on a workflow transition
4199
+ */
4200
+ list(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string): Promise<WorkflowTransitionHook[]>;
4201
+ /**
4202
+ * Create a hook on a workflow transition.
4203
+ * For send_webhook handlers the one-shot `secret_plaintext` is included in
4204
+ * the response of this call only.
4205
+ */
4206
+ create(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string, data: CreateWorkflowTransitionHook): Promise<WorkflowTransitionHook>;
4207
+ /**
4208
+ * Retrieve a hook by ID
4209
+ */
4210
+ retrieve(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string, hookId: string): Promise<WorkflowTransitionHook>;
4211
+ /**
4212
+ * Update a hook (`phase` and `handler_name` are immutable)
4213
+ */
4214
+ update(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string, hookId: string, data: UpdateWorkflowTransitionHook): Promise<WorkflowTransitionHook>;
4215
+ /**
4216
+ * Delete a hook
4217
+ */
4218
+ del(workspaceSlug: string, projectId: string, workflowId: string, transitionId: string, hookId: string): Promise<void>;
4219
+ }
4220
+ export type ListWorkflowActivitiesParams = {
4221
+ created_at__gt?: string;
4222
+ };
4002
4223
  /**
4003
4224
  * Workflows API resource
4004
- * Handles project workflow operations and exposes states/transitions sub-resources
4225
+ * Handles project workflow operations and exposes states/transitions/hooks
4226
+ * sub-resources.
4227
+ *
4228
+ * Under workspace governance, workflows are managed at the workspace level
4229
+ * (see `WorkspaceWorkflows`) and project-scoped writes respond 400 with code
4230
+ * `workspace_managed`.
4005
4231
  */
4006
4232
  export declare class Workflows extends BaseResource {
4007
4233
  states: States$1;
4008
4234
  transitions: Transitions;
4235
+ hooks: Hooks;
4009
4236
  constructor(config: Configuration);
4010
4237
  /**
4011
4238
  * List all workflows for a project
@@ -4015,10 +4242,27 @@ export declare class Workflows extends BaseResource {
4015
4242
  * Create a new workflow for a project
4016
4243
  */
4017
4244
  create(workspaceSlug: string, projectId: string, data: CreateWorkflow): Promise<Workflow>;
4245
+ /**
4246
+ * Retrieve a workflow by ID
4247
+ */
4248
+ retrieve(workspaceSlug: string, projectId: string, workflowId: string): Promise<Workflow>;
4018
4249
  /**
4019
4250
  * Update a workflow by ID
4020
4251
  */
4021
4252
  update(workspaceSlug: string, projectId: string, workflowId: string, data: UpdateWorkflow): Promise<Workflow>;
4253
+ /**
4254
+ * Delete a workflow by ID.
4255
+ * The default workflow cannot be deleted.
4256
+ */
4257
+ delete(workspaceSlug: string, projectId: string, workflowId: string): Promise<void>;
4258
+ /**
4259
+ * List the workflow's activity/audit entries
4260
+ */
4261
+ activities(workspaceSlug: string, projectId: string, workflowId: string, params?: ListWorkflowActivitiesParams): Promise<WorkflowActivity[]>;
4262
+ /**
4263
+ * Approve or reject a work item's pending workflow transition
4264
+ */
4265
+ submitWorkItemApproval(workspaceSlug: string, projectId: string, workItemId: string, data: SubmitWorkItemApproval): Promise<WorkItemApprovalResult>;
4022
4266
  }
4023
4267
  /**
4024
4268
  * Project template model interfaces
@@ -4098,6 +4342,580 @@ export declare class ProjectTemplates extends BaseResource {
4098
4342
  pages: Pages$4;
4099
4343
  constructor(config: Configuration);
4100
4344
  }
4345
+ /**
4346
+ * WorkspaceStates API resource
4347
+ * Manages workspace-level work-item states.
4348
+ *
4349
+ * Reads are dual-mode: under workspace governance, `list`/`retrieve` serve
4350
+ * the workspace states catalog; in ungoverned workspaces they aggregate the
4351
+ * states of every project the caller can access. Writes are only available
4352
+ * when the workspace owns states and workflows — otherwise the API responds
4353
+ * 400 with code `workspace_not_managed`. Check
4354
+ * `Workspace.retrieveFeatures(...).states_owned_by_workspace` to know which
4355
+ * mode a workspace is in.
4356
+ *
4357
+ * Not to be confused with `WorkspaceProjectStates` (`{slug}/project-states/`),
4358
+ * which manages project *lifecycle* states.
4359
+ */
4360
+ export declare class WorkspaceStates extends BaseResource {
4361
+ constructor(config: Configuration);
4362
+ /**
4363
+ * List states at workspace scope (works in both modes)
4364
+ */
4365
+ list(workspaceSlug: string, params?: ListWorkspaceStatesParams): Promise<PaginatedResponse<State>>;
4366
+ /**
4367
+ * Retrieve a workspace state by its external ID and source
4368
+ */
4369
+ retrieveByExternalId(workspaceSlug: string, externalId: string, externalSource: string): Promise<State>;
4370
+ /**
4371
+ * Create a new workspace (catalog) state.
4372
+ * Governed workspaces only (400 `workspace_not_managed` otherwise).
4373
+ * Catalog state names are workspace-unique — a duplicate name responds 409
4374
+ * with code `state_name_in_use`.
4375
+ */
4376
+ create(workspaceSlug: string, data: CreateWorkspaceState): Promise<State>;
4377
+ /**
4378
+ * Retrieve a workspace state by ID
4379
+ */
4380
+ retrieve(workspaceSlug: string, stateId: string): Promise<State>;
4381
+ /**
4382
+ * Update a workspace (catalog) state by ID.
4383
+ * Governed workspaces only. The triage state cannot be updated, and the
4384
+ * `default` flag is managed by the workflow's default state.
4385
+ */
4386
+ update(workspaceSlug: string, stateId: string, data: UpdateWorkspaceState): Promise<State>;
4387
+ /**
4388
+ * Delete a workspace (catalog) state by ID.
4389
+ * Governed workspaces only. Deletion is blocked (400) while any workflow
4390
+ * chain references the state or any work item still points at it; the
4391
+ * triage state is never deletable.
4392
+ */
4393
+ delete(workspaceSlug: string, stateId: string): Promise<void>;
4394
+ }
4395
+ /**
4396
+ * One state row in a workspace workflow's chain.
4397
+ *
4398
+ * Rows are keyed by catalog state IDs, so `id` is the state's own ID — the
4399
+ * inverse of the project-scoped `WorkflowState` (see `./Workflow`), where
4400
+ * `id` is the membership row's ID and `state_id` is the state's. The API
4401
+ * never sends `state_id` on these rows; treat `id` as the state ID.
4402
+ *
4403
+ * `transitions` embeds the outgoing transitions (with approvers) when the
4404
+ * payload is the full chain projection.
4405
+ */
4406
+ export interface WorkspaceWorkflowState {
4407
+ id?: string;
4408
+ state_id?: string;
4409
+ type?: string;
4410
+ allow_issue_creation?: boolean;
4411
+ is_default?: boolean;
4412
+ sequence?: number;
4413
+ transitions?: Record<string, unknown>[];
4414
+ }
4415
+ /**
4416
+ * Workspace workflow model (catalog list row / detail superset).
4417
+ *
4418
+ * The list endpoint returns the count fields only; `retrieve` adds the full
4419
+ * `states` chain, `project_ids`/`work_item_type_ids` usage, and
4420
+ * `referenced_resources`.
4421
+ */
4422
+ export interface WorkspaceWorkflow {
4423
+ id?: string;
4424
+ name: string;
4425
+ description?: string;
4426
+ is_default?: boolean;
4427
+ is_active?: boolean;
4428
+ workspace_id?: string;
4429
+ project_id?: string;
4430
+ states_count?: number;
4431
+ projects_count?: number;
4432
+ work_item_types_count?: number;
4433
+ project_ids?: string[];
4434
+ work_item_type_ids?: string[];
4435
+ states?: WorkspaceWorkflowState[];
4436
+ referenced_resources?: unknown;
4437
+ created_at?: string;
4438
+ updated_at?: string;
4439
+ created_by?: string;
4440
+ updated_by?: string;
4441
+ }
4442
+ export type PaginatedWorkspaceWorkflowResponse = PaginatedResponse<WorkspaceWorkflow>;
4443
+ /**
4444
+ * Request model for creating a workspace workflow (a draft until its chain
4445
+ * is configured via the states endpoints)
4446
+ */
4447
+ export type CreateWorkspaceWorkflow = {
4448
+ name: string;
4449
+ description?: string;
4450
+ };
4451
+ /**
4452
+ * Request model for updating workspace workflow metadata
4453
+ */
4454
+ export type UpdateWorkspaceWorkflow = Partial<{
4455
+ name: string;
4456
+ description: string;
4457
+ is_active: boolean;
4458
+ }>;
4459
+ /**
4460
+ * Request model for appending catalog states to a workflow's chain
4461
+ */
4462
+ export interface AddWorkspaceWorkflowStates {
4463
+ state_ids: string[];
4464
+ }
4465
+ /**
4466
+ * Request model for updating a chain membership row.
4467
+ * Changing `type` (e.g. to/from `approval`) removes the row's existing
4468
+ * transitions server-side.
4469
+ */
4470
+ export type UpdateWorkspaceWorkflowState = Partial<{
4471
+ type: string;
4472
+ allow_issue_creation: boolean;
4473
+ is_default: boolean;
4474
+ }>;
4475
+ /**
4476
+ * Request body for removing a state from a chain.
4477
+ * Orphan-gated: every work item stranded by the removal must be covered by
4478
+ * `state_mapping` (409 with an orphan report otherwise). Removing the default
4479
+ * state requires `new_default_state_id`.
4480
+ */
4481
+ export interface RemoveWorkspaceWorkflowState {
4482
+ new_default_state_id?: string;
4483
+ state_mapping?: Record<string, string>;
4484
+ }
4485
+ /**
4486
+ * One project resolving to a workflow in the usage report
4487
+ */
4488
+ export interface WorkspaceWorkflowUsageProject {
4489
+ project_id?: string;
4490
+ name?: string;
4491
+ types: (string | null)[];
4492
+ }
4493
+ /**
4494
+ * Usage report for a workspace workflow: projects/types resolving to it, plus
4495
+ * the types mandating or allowing it
4496
+ */
4497
+ export interface WorkspaceWorkflowUsage {
4498
+ projects: WorkspaceWorkflowUsageProject[];
4499
+ types_mandating: string[];
4500
+ types_allowing: string[];
4501
+ }
4502
+ /**
4503
+ * State transition within a workspace workflow
4504
+ */
4505
+ export interface WorkspaceWorkflowTransition {
4506
+ id?: string;
4507
+ workflow_state_id?: string;
4508
+ transition_state_id?: string;
4509
+ rejection_state_id?: string;
4510
+ required_approvals?: number;
4511
+ member_ids?: string[];
4512
+ pre_hooks?: Record<string, unknown>[];
4513
+ post_hooks?: Record<string, unknown>[];
4514
+ created_at?: string;
4515
+ updated_at?: string;
4516
+ }
4517
+ /**
4518
+ * Request model for creating a workspace workflow transition.
4519
+ * `state_id` is the chain state the transition starts from; `member_ids` are
4520
+ * the approvers (approval-type states only).
4521
+ */
4522
+ export type CreateWorkspaceWorkflowTransition = {
4523
+ state_id: string;
4524
+ transition_state_id: string;
4525
+ rejection_state_id?: string;
4526
+ required_approvals?: number;
4527
+ member_ids?: string[];
4528
+ };
4529
+ /**
4530
+ * Request model for updating a workspace workflow transition
4531
+ */
4532
+ export type UpdateWorkspaceWorkflowTransition = Partial<{
4533
+ transition_state_id: string;
4534
+ rejection_state_id: string;
4535
+ required_approvals: number;
4536
+ member_ids: string[];
4537
+ }>;
4538
+ /**
4539
+ * WorkspaceWorkflows.states sub-resource
4540
+ * Manages a workspace workflow's chain (state memberships)
4541
+ */
4542
+ declare class States$2 extends BaseResource {
4543
+ constructor(config: Configuration);
4544
+ /**
4545
+ * Append catalog states to the workflow's chain.
4546
+ * Returns the updated chain rows.
4547
+ */
4548
+ add(workspaceSlug: string, workflowId: string, data: AddWorkspaceWorkflowStates): Promise<WorkspaceWorkflowState[]>;
4549
+ /**
4550
+ * Update a chain membership row (type, allow_issue_creation, is_default).
4551
+ * Changing `type` removes the row's existing transitions server-side.
4552
+ */
4553
+ update(workspaceSlug: string, workflowId: string, stateId: string, data: UpdateWorkspaceWorkflowState): Promise<WorkspaceWorkflowState>;
4554
+ /**
4555
+ * Remove a state from the chain.
4556
+ * Orphan-gated: every work item stranded by the removal must be covered by
4557
+ * `data.state_mapping` (409 with an orphan report otherwise). Removing the
4558
+ * default state requires `data.new_default_state_id`; transitions
4559
+ * referencing the state must be removed first.
4560
+ */
4561
+ remove(workspaceSlug: string, workflowId: string, stateId: string, data?: RemoveWorkspaceWorkflowState): Promise<void>;
4562
+ /**
4563
+ * Mark a chain state as the workflow's default.
4564
+ * Also force-enables work-item creation on that state.
4565
+ */
4566
+ markDefault(workspaceSlug: string, workflowId: string, stateId: string): Promise<WorkspaceWorkflowState>;
4567
+ }
4568
+ /**
4569
+ * WorkspaceWorkflows.transitions sub-resource
4570
+ * Manages state transitions within a workspace workflow
4571
+ */
4572
+ declare class Transitions$1 extends BaseResource {
4573
+ constructor(config: Configuration);
4574
+ /**
4575
+ * List all state transitions for a workspace workflow
4576
+ */
4577
+ list(workspaceSlug: string, workflowId: string): Promise<WorkspaceWorkflowTransition[]>;
4578
+ /**
4579
+ * Create a state transition for a workspace workflow
4580
+ */
4581
+ create(workspaceSlug: string, workflowId: string, data: CreateWorkspaceWorkflowTransition): Promise<WorkspaceWorkflowTransition>;
4582
+ /**
4583
+ * Retrieve a workspace workflow transition by ID
4584
+ */
4585
+ retrieve(workspaceSlug: string, workflowId: string, transitionId: string): Promise<WorkspaceWorkflowTransition>;
4586
+ /**
4587
+ * Update a workspace workflow transition
4588
+ */
4589
+ update(workspaceSlug: string, workflowId: string, transitionId: string, data: UpdateWorkspaceWorkflowTransition): Promise<WorkspaceWorkflowTransition>;
4590
+ /**
4591
+ * Delete a workspace workflow transition
4592
+ */
4593
+ del(workspaceSlug: string, workflowId: string, transitionId: string): Promise<void>;
4594
+ }
4595
+ /**
4596
+ * One execution history entry for a workflow transition hook
4597
+ */
4598
+ export interface WorkflowTransitionHookExecution {
4599
+ id: string;
4600
+ status: string;
4601
+ started_at?: string;
4602
+ completed_at?: string;
4603
+ input_data?: unknown;
4604
+ output_data?: unknown;
4605
+ error_message?: string;
4606
+ issue_id?: string;
4607
+ }
4608
+ /**
4609
+ * WorkspaceWorkflows.hooks sub-resource
4610
+ * Manages hooks attached to workspace workflow transitions
4611
+ */
4612
+ declare class Hooks$1 extends BaseResource {
4613
+ constructor(config: Configuration);
4614
+ private basePath;
4615
+ /**
4616
+ * List hooks on a workspace workflow transition
4617
+ */
4618
+ list(workspaceSlug: string, workflowId: string, transitionId: string): Promise<WorkflowTransitionHook[]>;
4619
+ /**
4620
+ * Create a hook on a workspace workflow transition.
4621
+ * For send_webhook handlers the one-shot `secret_plaintext` is included in
4622
+ * the response of this call only.
4623
+ */
4624
+ create(workspaceSlug: string, workflowId: string, transitionId: string, data: CreateWorkflowTransitionHook): Promise<WorkflowTransitionHook>;
4625
+ /**
4626
+ * Retrieve a hook by ID
4627
+ */
4628
+ retrieve(workspaceSlug: string, workflowId: string, transitionId: string, hookId: string): Promise<WorkflowTransitionHook>;
4629
+ /**
4630
+ * Update a hook (`phase` and `handler_name` are immutable)
4631
+ */
4632
+ update(workspaceSlug: string, workflowId: string, transitionId: string, hookId: string, data: UpdateWorkflowTransitionHook): Promise<WorkflowTransitionHook>;
4633
+ /**
4634
+ * Delete a hook
4635
+ */
4636
+ del(workspaceSlug: string, workflowId: string, transitionId: string, hookId: string): Promise<void>;
4637
+ /**
4638
+ * Regenerate a send_webhook hook's secret.
4639
+ * The new one-shot `secret_plaintext` is included in this response only.
4640
+ */
4641
+ regenerateSecret(workspaceSlug: string, workflowId: string, transitionId: string, hookId: string): Promise<WorkflowTransitionHook>;
4642
+ /**
4643
+ * List a hook's execution history entries
4644
+ */
4645
+ executions(workspaceSlug: string, workflowId: string, transitionId: string, hookId: string): Promise<WorkflowTransitionHookExecution[]>;
4646
+ }
4647
+ export type ListWorkspaceWorkflowsParams = {
4648
+ search?: string;
4649
+ is_active?: boolean;
4650
+ sort_by?: "name" | "created_at" | "updated_at";
4651
+ sort_order?: "asc" | "desc";
4652
+ cursor?: string;
4653
+ per_page?: number;
4654
+ };
4655
+ export type ListWorkspaceWorkflowActivitiesParams = {
4656
+ created_at__gt?: string;
4657
+ };
4658
+ /**
4659
+ * WorkspaceWorkflows API resource
4660
+ * Manages the workspace workflow catalog (workspace governance) and exposes
4661
+ * states/transitions/hooks sub-resources.
4662
+ *
4663
+ * `list` is dual-mode: under workspace governance it serves the workspace
4664
+ * workflow catalog; in ungoverned workspaces it aggregates project workflows.
4665
+ * All writes require the workspace to own states and workflows — otherwise
4666
+ * the API responds 400 with code `workspace_not_managed`.
4667
+ */
4668
+ export declare class WorkspaceWorkflows extends BaseResource {
4669
+ states: States$2;
4670
+ transitions: Transitions$1;
4671
+ hooks: Hooks$1;
4672
+ constructor(config: Configuration);
4673
+ /**
4674
+ * List workspace workflows
4675
+ */
4676
+ list(workspaceSlug: string, params?: ListWorkspaceWorkflowsParams): Promise<PaginatedResponse<WorkspaceWorkflow>>;
4677
+ /**
4678
+ * Create a workspace workflow draft (configure its chain via `states`).
4679
+ * Workflow names are workspace-unique.
4680
+ */
4681
+ create(workspaceSlug: string, data: CreateWorkspaceWorkflow): Promise<WorkspaceWorkflow>;
4682
+ /**
4683
+ * Retrieve a workspace workflow with its full chain
4684
+ */
4685
+ retrieve(workspaceSlug: string, workflowId: string): Promise<WorkspaceWorkflow>;
4686
+ /**
4687
+ * Update workspace workflow metadata (name, description, is_active)
4688
+ */
4689
+ update(workspaceSlug: string, workflowId: string, data: UpdateWorkspaceWorkflow): Promise<WorkspaceWorkflow>;
4690
+ /**
4691
+ * Delete a workspace workflow.
4692
+ * The default workflow and workflows in use by projects cannot be deleted.
4693
+ */
4694
+ delete(workspaceSlug: string, workflowId: string): Promise<void>;
4695
+ /**
4696
+ * Report which projects/types resolve to this workflow, and which types
4697
+ * mandate or allow it
4698
+ */
4699
+ usage(workspaceSlug: string, workflowId: string): Promise<WorkspaceWorkflowUsage>;
4700
+ /**
4701
+ * List the workflow's activity/audit entries
4702
+ */
4703
+ activities(workspaceSlug: string, workflowId: string, params?: ListWorkspaceWorkflowActivitiesParams): Promise<WorkflowActivity[]>;
4704
+ }
4705
+ /**
4706
+ * Minimal workflow shape for embedding (pickers, pins)
4707
+ */
4708
+ export interface WorkflowLite {
4709
+ id?: string;
4710
+ name?: string;
4711
+ }
4712
+ /**
4713
+ * Minimal project reference in governance payloads
4714
+ */
4715
+ export interface GovernanceProjectRef {
4716
+ id?: string;
4717
+ name?: string;
4718
+ }
4719
+ /**
4720
+ * One allowlist/mandate row, enriched with its in-use projects.
4721
+ * `locked` marks workflows a project's pick already uses — a constrained
4722
+ * allowlist must retain them.
4723
+ */
4724
+ export interface GovernanceAllowlistEntry {
4725
+ workflow_id?: string;
4726
+ name?: string;
4727
+ in_use_by_projects: GovernanceProjectRef[];
4728
+ locked?: boolean;
4729
+ }
4730
+ export type TypeGovernanceMode = "any" | "constrained" | "required";
4731
+ /**
4732
+ * Governance settings for a work item type: mode, required workflow, and
4733
+ * allowlist. Pins are served by the dedicated pins endpoints.
4734
+ */
4735
+ export interface TypeGovernance {
4736
+ mode?: TypeGovernanceMode;
4737
+ required_workflow?: WorkflowLite | null;
4738
+ allowlist: GovernanceAllowlistEntry[];
4739
+ }
4740
+ /**
4741
+ * Request model for changing a type's governance mode.
4742
+ *
4743
+ * - `any`: no restriction; `workflow_ids`/`required_workflow_id` unused.
4744
+ * - `constrained`: `workflow_ids` is the allowlist (in-use workflows are
4745
+ * locked in). Removing picks in use requires `acknowledge` and may need a
4746
+ * `state_mapping` for orphaned work items.
4747
+ * - `required`: `required_workflow_id` mandates one workflow everywhere;
4748
+ * requires `acknowledge` and may need a `state_mapping`.
4749
+ */
4750
+ export interface UpdateTypeGovernance {
4751
+ mode: TypeGovernanceMode;
4752
+ workflow_ids?: string[];
4753
+ required_workflow_id?: string;
4754
+ acknowledge?: boolean;
4755
+ state_mapping?: Record<string, string>;
4756
+ }
4757
+ /**
4758
+ * Request model for previewing a governance mode change (no writes)
4759
+ */
4760
+ export interface TypeGovernancePreviewRequest {
4761
+ mode: TypeGovernanceMode;
4762
+ workflow_ids?: string[];
4763
+ required_workflow_id?: string;
4764
+ }
4765
+ /**
4766
+ * Dry-run impact report for a governance change or workflow fallback
4767
+ */
4768
+ export interface GovernancePreview {
4769
+ total?: number;
4770
+ type_total?: number;
4771
+ per_state?: Record<string, unknown>[];
4772
+ }
4773
+ /**
4774
+ * A single project-to-workflow pin for a work item type
4775
+ */
4776
+ export interface WorkItemTypeWorkflowPin {
4777
+ id?: string;
4778
+ project?: GovernanceProjectRef;
4779
+ workflow?: WorkflowLite;
4780
+ }
4781
+ /**
4782
+ * Request model for pinning a workflow across one or more projects
4783
+ */
4784
+ export interface CreateWorkItemTypeWorkflowPins {
4785
+ workflow_id: string;
4786
+ project_ids: string[];
4787
+ }
4788
+ /**
4789
+ * A pickable workflow option for a project's type
4790
+ */
4791
+ export interface WorkflowOption {
4792
+ workflow_id?: string;
4793
+ name?: string;
4794
+ }
4795
+ /**
4796
+ * One active type's governance pill, effective workflow, and pickable
4797
+ * options within a project
4798
+ */
4799
+ export interface ProjectTypeWorkflow {
4800
+ type_id?: string;
4801
+ /** any | constrained | required | pinned */
4802
+ governance?: string;
4803
+ allowlist_count?: number;
4804
+ allowlist_total?: number;
4805
+ effective_workflow_id?: string;
4806
+ source?: string;
4807
+ options: WorkflowOption[];
4808
+ }
4809
+ /**
4810
+ * Request model for setting a project's workflow pick for a type.
4811
+ * Orphan-gated: work items whose state falls outside the target chain must
4812
+ * be covered by `state_mapping`.
4813
+ */
4814
+ export interface SetProjectWorkflowPick {
4815
+ workflow_id: string;
4816
+ state_mapping?: Record<string, string>;
4817
+ }
4818
+ /**
4819
+ * Response of setting a project's workflow pick: the workflow now in effect
4820
+ */
4821
+ export interface ProjectWorkflowPickResult {
4822
+ workflow_id?: string;
4823
+ }
4824
+ /**
4825
+ * Request model for previewing the project workflow fallback.
4826
+ * Provide `new_type_id` (+ current `type_id`) for a re-type preview, or
4827
+ * `workflow_id` (+ `type_id`) for a workflow-switch preview.
4828
+ */
4829
+ export interface WorkflowFallbackPreviewRequest {
4830
+ type_id?: string;
4831
+ new_type_id?: string;
4832
+ workflow_id?: string;
4833
+ }
4834
+ /**
4835
+ * WorkItemTypeGovernance.pins sub-resource
4836
+ *
4837
+ * A pin forces one project to resolve a type to a specific workflow,
4838
+ * overriding the workspace default and the constrained allowlist.
4839
+ */
4840
+ declare class Pins extends BaseResource {
4841
+ constructor(config: Configuration);
4842
+ /**
4843
+ * List a type's project-to-workflow pins
4844
+ */
4845
+ list(workspaceSlug: string, typeId: string): Promise<WorkItemTypeWorkflowPin[]>;
4846
+ /**
4847
+ * Pin a workflow for this type across one or more projects.
4848
+ * Returns the type's pins after the change.
4849
+ */
4850
+ create(workspaceSlug: string, typeId: string, data: CreateWorkItemTypeWorkflowPins): Promise<WorkItemTypeWorkflowPin[]>;
4851
+ /**
4852
+ * Remove a pin
4853
+ */
4854
+ delete(workspaceSlug: string, typeId: string, pinId: string): Promise<void>;
4855
+ }
4856
+ /**
4857
+ * WorkItemTypeGovernance.projectWorkflows sub-resource
4858
+ *
4859
+ * Reports each active type's governance mode and the workflow it effectively
4860
+ * resolves to within a project, and manages the project's own workflow pick
4861
+ * for a type.
4862
+ */
4863
+ declare class ProjectWorkflows extends BaseResource {
4864
+ constructor(config: Configuration);
4865
+ /**
4866
+ * List every active type's governance mode, effective workflow, and
4867
+ * pickable options for a project
4868
+ */
4869
+ list(workspaceSlug: string, projectId: string): Promise<ProjectTypeWorkflow[]>;
4870
+ /**
4871
+ * Retrieve one type's governance mode and effective workflow in a project
4872
+ */
4873
+ retrieve(workspaceSlug: string, projectId: string, typeId: string): Promise<ProjectTypeWorkflow>;
4874
+ /**
4875
+ * Retrieve the project's current workflow pick context for a type
4876
+ */
4877
+ retrievePick(workspaceSlug: string, projectId: string, typeId: string): Promise<ProjectTypeWorkflow>;
4878
+ /**
4879
+ * Set the project's workflow pick for a type.
4880
+ * Runs the workflow fallback for stranded work items; every orphan must be
4881
+ * covered by `data.state_mapping` (400 with an orphan report otherwise).
4882
+ */
4883
+ updatePick(workspaceSlug: string, projectId: string, typeId: string, data: SetProjectWorkflowPick): Promise<ProjectWorkflowPickResult>;
4884
+ /**
4885
+ * Dry-run the project's workflow fallback (re-type / switch dialogs)
4886
+ */
4887
+ previewFallback(workspaceSlug: string, projectId: string, data: WorkflowFallbackPreviewRequest): Promise<GovernancePreview>;
4888
+ }
4889
+ /**
4890
+ * WorkItemTypeGovernance API resource (workspace governance only)
4891
+ *
4892
+ * Governs which workflows a workspace-level work item type may use
4893
+ * (`any` / `constrained` / `required` modes and allowlists). Per-project pins
4894
+ * live on `.pins`; the project-side view of effective workflows and picks
4895
+ * lives on `.projectWorkflows`. Every endpoint requires the workspace to own
4896
+ * states and workflows — otherwise the API responds 400 with code
4897
+ * `workspace_not_managed`.
4898
+ */
4899
+ export declare class WorkItemTypeGovernance extends BaseResource {
4900
+ pins: Pins;
4901
+ projectWorkflows: ProjectWorkflows;
4902
+ constructor(config: Configuration);
4903
+ /**
4904
+ * Retrieve a type's governance settings (mode, required workflow, allowlist)
4905
+ */
4906
+ retrieve(workspaceSlug: string, typeId: string): Promise<TypeGovernance>;
4907
+ /**
4908
+ * Update a type's governance mode / allowlist / required workflow.
4909
+ * Destructive changes (dropping in-use workflows, mandating one) require
4910
+ * `data.acknowledge` and may need a `data.state_mapping` for orphaned work
4911
+ * items.
4912
+ */
4913
+ update(workspaceSlug: string, typeId: string, data: UpdateTypeGovernance): Promise<TypeGovernance>;
4914
+ /**
4915
+ * Dry-run a governance change and report affected work items (no writes)
4916
+ */
4917
+ preview(workspaceSlug: string, typeId: string, data: TypeGovernancePreviewRequest): Promise<GovernancePreview>;
4918
+ }
4101
4919
  /**
4102
4920
  * Main Plane Client class
4103
4921
  * Provides access to all Plane API resources
@@ -4136,6 +4954,9 @@ export declare class PlaneClient {
4136
4954
  releases: Releases;
4137
4955
  workflows: Workflows;
4138
4956
  projectTemplates: ProjectTemplates;
4957
+ workspaceStates: WorkspaceStates;
4958
+ workspaceWorkflows: WorkspaceWorkflows;
4959
+ workItemTypeGovernance: WorkItemTypeGovernance;
4139
4960
  constructor(config: {
4140
4961
  baseUrl?: string;
4141
4962
  apiKey?: string;
@@ -4250,6 +5071,8 @@ export {
4250
5071
  CustomRelations as WorkItemCustomRelations,
4251
5072
  Dependencies as WorkItemDependencies,
4252
5073
  Epics$1 as InitiativeEpics,
5074
+ Hooks as WorkflowTransitionHooks,
5075
+ Hooks$1 as WorkspaceWorkflowTransitionHooks,
4253
5076
  ItemLabels as ReleaseItemLabels,
4254
5077
  Labels$1 as InitiativeLabels,
4255
5078
  Labels$2 as ReleaseLabels,
@@ -4263,6 +5086,8 @@ export {
4263
5086
  Pages$2 as CollectionPagesResource,
4264
5087
  Pages$3 as WorkspacePageTemplates,
4265
5088
  Pages$4 as ProjectPageTemplates,
5089
+ Pins as WorkItemTypeWorkflowPins,
5090
+ ProjectWorkflows as ProjectTypeWorkflows,
4266
5091
  Projects$1 as TeamspaceProjects,
4267
5092
  Projects$2 as InitiativeProjects,
4268
5093
  Projects$3 as WorkspaceProjectTemplates,
@@ -4271,8 +5096,10 @@ export {
4271
5096
  Relations as WorkItemRelations,
4272
5097
  Requests as CustomerRequests,
4273
5098
  States$1 as WorkflowStates,
5099
+ States$2 as WorkspaceWorkflowStates,
4274
5100
  Tags as ReleaseTags,
4275
5101
  Transitions as WorkflowTransitions,
5102
+ Transitions$1 as WorkspaceWorkflowTransitions,
4276
5103
  Values as WorkItemPropertyValues,
4277
5104
  WorkItems$1 as WorkspaceWorkItemTemplates,
4278
5105
  WorkItems$2 as ReleaseWorkItems,