@resolution/jira-api-client 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/package.json +10 -3
- package/.eslintrc.js +0 -3
- package/config/api-typescript-generator.config.ts +0 -91
- package/config/compare-schemas.ts +0 -307
- package/src/index.ts +0 -47
- package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
- package/src/openapi/platform/core/common-http-client.ts +0 -723
- package/src/openapi/platform/core/common-http-service.ts +0 -22
- package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/platform/models/announcement-banner.ts +0 -59
- package/src/openapi/platform/models/app-data-policies.ts +0 -79
- package/src/openapi/platform/models/app-migration.ts +0 -172
- package/src/openapi/platform/models/app-properties.ts +0 -32
- package/src/openapi/platform/models/audit-records.ts +0 -140
- package/src/openapi/platform/models/avatars.ts +0 -48
- package/src/openapi/platform/models/classification-levels.ts +0 -58
- package/src/openapi/platform/models/common.ts +0 -2669
- package/src/openapi/platform/models/dashboards.ts +0 -849
- package/src/openapi/platform/models/dynamic-modules.ts +0 -121
- package/src/openapi/platform/models/filter-sharing.ts +0 -103
- package/src/openapi/platform/models/filters.ts +0 -319
- package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
- package/src/openapi/platform/models/groups.ts +0 -247
- package/src/openapi/platform/models/issue-attachments.ts +0 -290
- package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
- package/src/openapi/platform/models/issue-comments.ts +0 -91
- package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
- package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
- package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
- package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
- package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
- package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
- package/src/openapi/platform/models/issue-fields.ts +0 -392
- package/src/openapi/platform/models/issue-link-types.ts +0 -28
- package/src/openapi/platform/models/issue-links.ts +0 -185
- package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
- package/src/openapi/platform/models/issue-priorities.ts +0 -196
- package/src/openapi/platform/models/issue-properties.ts +0 -259
- package/src/openapi/platform/models/issue-remote-links.ts +0 -207
- package/src/openapi/platform/models/issue-resolutions.ts +0 -180
- package/src/openapi/platform/models/issue-search.ts +0 -367
- package/src/openapi/platform/models/issue-security-level.ts +0 -76
- package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
- package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
- package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
- package/src/openapi/platform/models/issue-types.ts +0 -66
- package/src/openapi/platform/models/issue-votes.ts +0 -38
- package/src/openapi/platform/models/issue-watchers.ts +0 -67
- package/src/openapi/platform/models/issue-worklogs.ts +0 -190
- package/src/openapi/platform/models/issues.ts +0 -1268
- package/src/openapi/platform/models/jira-expressions.ts +0 -578
- package/src/openapi/platform/models/jira-settings.ts +0 -118
- package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
- package/src/openapi/platform/models/jql.ts +0 -783
- package/src/openapi/platform/models/labels.ts +0 -42
- package/src/openapi/platform/models/license-metrics.ts +0 -68
- package/src/openapi/platform/models/myself.ts +0 -29
- package/src/openapi/platform/models/permission-schemes.ts +0 -89
- package/src/openapi/platform/models/permissions.ts +0 -308
- package/src/openapi/platform/models/priority-schemes.ts +0 -527
- package/src/openapi/platform/models/project-avatars.ts +0 -29
- package/src/openapi/platform/models/project-classification-levels.ts +0 -24
- package/src/openapi/platform/models/project-components.ts +0 -231
- package/src/openapi/platform/models/project-email.ts +0 -27
- package/src/openapi/platform/models/project-features.ts +0 -78
- package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
- package/src/openapi/platform/models/project-role-actors.ts +0 -107
- package/src/openapi/platform/models/project-roles.ts +0 -76
- package/src/openapi/platform/models/project-types.ts +0 -36
- package/src/openapi/platform/models/project-versions.ts +0 -216
- package/src/openapi/platform/models/projects.ts +0 -429
- package/src/openapi/platform/models/screen-schemes.ts +0 -192
- package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
- package/src/openapi/platform/models/screens.ts +0 -171
- package/src/openapi/platform/models/server-info.ts +0 -100
- package/src/openapi/platform/models/service-registry.ts +0 -68
- package/src/openapi/platform/models/status.ts +0 -229
- package/src/openapi/platform/models/time-tracking.ts +0 -38
- package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
- package/src/openapi/platform/models/user-search.ts +0 -69
- package/src/openapi/platform/models/users.ts +0 -121
- package/src/openapi/platform/models/webhooks.ts +0 -307
- package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
- package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
- package/src/openapi/platform/models/workflow-schemes.ts +0 -545
- package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
- package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
- package/src/openapi/platform/models/workflows.ts +0 -1943
- package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
- package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
- package/src/openapi/platform/services/app-migration-service.ts +0 -289
- package/src/openapi/platform/services/app-properties-service.ts +0 -441
- package/src/openapi/platform/services/application-roles-service.ts +0 -247
- package/src/openapi/platform/services/audit-records-service.ts +0 -164
- package/src/openapi/platform/services/avatars-service.ts +0 -769
- package/src/openapi/platform/services/classification-levels-service.ts +0 -131
- package/src/openapi/platform/services/dashboards-service.ts +0 -1721
- package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
- package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
- package/src/openapi/platform/services/filters-service.ts +0 -1901
- package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
- package/src/openapi/platform/services/groups-service.ts +0 -751
- package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
- package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
- package/src/openapi/platform/services/issue-comments-service.ts +0 -812
- package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
- package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
- package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
- package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
- package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
- package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
- package/src/openapi/platform/services/issue-fields-service.ts +0 -837
- package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
- package/src/openapi/platform/services/issue-links-service.ts +0 -345
- package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
- package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
- package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
- package/src/openapi/platform/services/issue-properties-service.ts +0 -606
- package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
- package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
- package/src/openapi/platform/services/issue-search-service.ts +0 -1139
- package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
- package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
- package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
- package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
- package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
- package/src/openapi/platform/services/issue-types-service.ts +0 -679
- package/src/openapi/platform/services/issue-votes-service.ts +0 -221
- package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
- package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
- package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
- package/src/openapi/platform/services/issues-service.ts +0 -3346
- package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
- package/src/openapi/platform/services/jira-settings-service.ts +0 -415
- package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
- package/src/openapi/platform/services/jql-service.ts +0 -896
- package/src/openapi/platform/services/labels-service.ts +0 -89
- package/src/openapi/platform/services/license-metrics-service.ts +0 -216
- package/src/openapi/platform/services/myself-service.ts +0 -520
- package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
- package/src/openapi/platform/services/permissions-service.ts +0 -407
- package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
- package/src/openapi/platform/services/project-avatars-service.ts +0 -341
- package/src/openapi/platform/services/project-categories-service.ts +0 -318
- package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
- package/src/openapi/platform/services/project-components-service.ts +0 -1332
- package/src/openapi/platform/services/project-email-service.ts +0 -161
- package/src/openapi/platform/services/project-features-service.ts +0 -207
- package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
- package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
- package/src/openapi/platform/services/project-properties-service.ts +0 -320
- package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
- package/src/openapi/platform/services/project-roles-service.ts +0 -867
- package/src/openapi/platform/services/project-types-service.ts +0 -297
- package/src/openapi/platform/services/project-versions-service.ts +0 -1287
- package/src/openapi/platform/services/projects-service.ts +0 -2196
- package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
- package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
- package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
- package/src/openapi/platform/services/screens-service.ts +0 -528
- package/src/openapi/platform/services/server-info-service.ts +0 -88
- package/src/openapi/platform/services/service-registry-service.ts +0 -89
- package/src/openapi/platform/services/status-service.ts +0 -498
- package/src/openapi/platform/services/tasks-service.ts +0 -159
- package/src/openapi/platform/services/time-tracking-service.ts +0 -386
- package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
- package/src/openapi/platform/services/user-properties-service.ts +0 -413
- package/src/openapi/platform/services/user-search-service.ts +0 -1214
- package/src/openapi/platform/services/users-service.ts +0 -1108
- package/src/openapi/platform/services/webhooks-service.ts +0 -458
- package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
- package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
- package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
- package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
- package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
- package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
- package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
- package/src/openapi/platform/services/workflows-service.ts +0 -3477
- package/src/openapi/platform/validation-schema-storage.ts +0 -186
- package/src/openapi/software/base-jira-software-api-client.ts +0 -447
- package/src/openapi/software/core/common-http-client.ts +0 -723
- package/src/openapi/software/core/common-http-service.ts +0 -22
- package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/software/models/board.ts +0 -918
- package/src/openapi/software/services/backlog-service.ts +0 -160
- package/src/openapi/software/services/board-service.ts +0 -4189
- package/src/openapi/software/services/builds-service.ts +0 -571
- package/src/openapi/software/services/deployments-service.ts +0 -403
- package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
- package/src/openapi/software/services/development-information-service.ts +0 -2357
- package/src/openapi/software/services/epic-service.ts +0 -854
- package/src/openapi/software/services/feature-flags-service.ts +0 -303
- package/src/openapi/software/services/issue-service.ts +0 -529
- package/src/openapi/software/services/operations-service.ts +0 -741
- package/src/openapi/software/services/remote-links-service.ts +0 -653
- package/src/openapi/software/services/security-information-service.ts +0 -495
- package/src/openapi/software/services/sprint-service.ts +0 -969
- package/src/openapi/software/validation-schema-storage.ts +0 -186
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -4
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z, type ZodTypeAny } from "zod";
|
|
5
|
-
|
|
6
|
-
import type { CommonValidationSchemaStorage } from "../core/common-validation-schema-storage";
|
|
7
|
-
import {
|
|
8
|
-
type DocumentVersion,
|
|
9
|
-
registerCommonValidationSchemas,
|
|
10
|
-
type WorkflowScheme,
|
|
11
|
-
type WorkflowScope,
|
|
12
|
-
} from "./common";
|
|
13
|
-
/**
|
|
14
|
-
* Overrides, for the selected issue types, any status mappings provided in
|
|
15
|
-
* `statusMappingsByWorkflows`. Status mappings are required when the new workflow
|
|
16
|
-
* for an issue type doesn't contain all statuses that the old workflow has.
|
|
17
|
-
* Status mappings can be provided by a combination of `statusMappingsByWorkflows`
|
|
18
|
-
* and `statusMappingsByIssueTypeOverride`.
|
|
19
|
-
*/
|
|
20
|
-
export interface MappingsByIssueTypeOverride {
|
|
21
|
-
/** The ID of the issue type for this mapping. */
|
|
22
|
-
issueTypeId: string;
|
|
23
|
-
/** The list of status mappings. */
|
|
24
|
-
statusMappings: WorkflowAssociationStatusMapping[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The status mappings by workflows. Status mappings are required when the new
|
|
28
|
-
* workflow for an issue type doesn't contain all statuses that the old workflow
|
|
29
|
-
* has. Status mappings can be provided by a combination of
|
|
30
|
-
* `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`.
|
|
31
|
-
*/
|
|
32
|
-
export interface MappingsByWorkflow {
|
|
33
|
-
/** The ID of the new workflow. */
|
|
34
|
-
newWorkflowId: string;
|
|
35
|
-
/** The ID of the old workflow. */
|
|
36
|
-
oldWorkflowId: string;
|
|
37
|
-
/** The list of status mappings. */
|
|
38
|
-
statusMappings: WorkflowAssociationStatusMapping[];
|
|
39
|
-
}
|
|
40
|
-
/** A page of items. */
|
|
41
|
-
export interface PageBeanWorkflowScheme {
|
|
42
|
-
/** Whether this is the last page. */
|
|
43
|
-
isLast?: boolean;
|
|
44
|
-
/** The maximum number of items that could be returned. */
|
|
45
|
-
maxResults?: number;
|
|
46
|
-
/** If there is another page of results, the URL of the next page. */
|
|
47
|
-
nextPage?: string;
|
|
48
|
-
/** The URL of the page. */
|
|
49
|
-
self?: string;
|
|
50
|
-
/** The index of the first item returned. */
|
|
51
|
-
startAt?: number;
|
|
52
|
-
/** The number of items returned. */
|
|
53
|
-
total?: number;
|
|
54
|
-
/** The list of items. */
|
|
55
|
-
values?: WorkflowScheme[];
|
|
56
|
-
}
|
|
57
|
-
/** The list of required status mappings by issue type. */
|
|
58
|
-
export interface RequiredMappingByIssueType {
|
|
59
|
-
/** The ID of the issue type. */
|
|
60
|
-
issueTypeId?: string;
|
|
61
|
-
/** The status IDs requiring mapping. */
|
|
62
|
-
statusIds?: string[];
|
|
63
|
-
}
|
|
64
|
-
/** The list of required status mappings by workflow. */
|
|
65
|
-
export interface RequiredMappingByWorkflows {
|
|
66
|
-
/** The ID of the source workflow. */
|
|
67
|
-
sourceWorkflowId?: string;
|
|
68
|
-
/** The status IDs requiring mapping. */
|
|
69
|
-
statusIds?: string[];
|
|
70
|
-
/** The ID of the target workflow. */
|
|
71
|
-
targetWorkflowId?: string;
|
|
72
|
-
}
|
|
73
|
-
/** Represents a usage of an entity by a project ID and related issue type IDs. */
|
|
74
|
-
export interface SimpleUsage {
|
|
75
|
-
/** The issue type IDs for the usage. */
|
|
76
|
-
issueTypeIds: string[];
|
|
77
|
-
/** The project ID for the usage. */
|
|
78
|
-
projectId: string;
|
|
79
|
-
}
|
|
80
|
-
/** The statuses associated with each workflow. */
|
|
81
|
-
export interface StatusesPerWorkflow {
|
|
82
|
-
/** The ID of the initial status for the workflow. */
|
|
83
|
-
initialStatusId?: string;
|
|
84
|
-
/** The status IDs associated with the workflow. */
|
|
85
|
-
statuses?: string[];
|
|
86
|
-
/** The ID of the workflow. */
|
|
87
|
-
workflowId?: string;
|
|
88
|
-
}
|
|
89
|
-
/** The details of the statuses in the associated workflows. */
|
|
90
|
-
export interface StatusMetadata {
|
|
91
|
-
/** The category of the status. */
|
|
92
|
-
category?: "TODO" | "IN_PROGRESS" | "DONE";
|
|
93
|
-
/** The ID of the status. */
|
|
94
|
-
id?: string;
|
|
95
|
-
/** The name of the status. */
|
|
96
|
-
name?: string;
|
|
97
|
-
}
|
|
98
|
-
/** The list of status mappings. */
|
|
99
|
-
export interface WorkflowAssociationStatusMapping {
|
|
100
|
-
/** The ID of the status in the new workflow. */
|
|
101
|
-
newStatusId: string;
|
|
102
|
-
/** The ID of the status in the old workflow that isn't present in the new workflow. */
|
|
103
|
-
oldStatusId: string;
|
|
104
|
-
}
|
|
105
|
-
/** The workflow metadata and issue type IDs which use this workflow. */
|
|
106
|
-
export interface WorkflowMetadataAndIssueTypeRestModel {
|
|
107
|
-
/** The list of issue type IDs for the mapping. */
|
|
108
|
-
issueTypeIds: string[];
|
|
109
|
-
/** Workflow metadata and usage detail. */
|
|
110
|
-
workflow: WorkflowMetadataRestModel;
|
|
111
|
-
}
|
|
112
|
-
/** Workflow metadata and usage detail. */
|
|
113
|
-
export interface WorkflowMetadataRestModel {
|
|
114
|
-
/** The description of the workflow. */
|
|
115
|
-
description: string;
|
|
116
|
-
/** The ID of the workflow. */
|
|
117
|
-
id: string;
|
|
118
|
-
/** The name of the workflow. */
|
|
119
|
-
name: string;
|
|
120
|
-
/**
|
|
121
|
-
* Use the optional `workflows.usages` expand to get additional information about
|
|
122
|
-
* the projects and issue types associated with the workflows in the workflow
|
|
123
|
-
* scheme.
|
|
124
|
-
*/
|
|
125
|
-
usage: SimpleUsage[];
|
|
126
|
-
/** The current version details of this workflow scheme. */
|
|
127
|
-
version: DocumentVersion;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* The explicit association between issue types and a workflow in a workflow
|
|
131
|
-
* scheme.
|
|
132
|
-
*/
|
|
133
|
-
export interface WorkflowSchemeAssociation {
|
|
134
|
-
/** The issue types assigned to the workflow. */
|
|
135
|
-
issueTypeIds: string[];
|
|
136
|
-
/** The ID of the workflow. */
|
|
137
|
-
workflowId: string;
|
|
138
|
-
}
|
|
139
|
-
/** The workflow scheme read request body. */
|
|
140
|
-
export interface WorkflowSchemeReadRequest {
|
|
141
|
-
/** The list of project IDs to query. */
|
|
142
|
-
projectIds?: (string | null)[] | null;
|
|
143
|
-
/** The list of workflow scheme IDs to query. */
|
|
144
|
-
workflowSchemeIds?: (string | null)[] | null;
|
|
145
|
-
}
|
|
146
|
-
export interface WorkflowSchemeReadResponse {
|
|
147
|
-
/** Workflow metadata and usage detail. */
|
|
148
|
-
defaultWorkflow?: WorkflowMetadataRestModel;
|
|
149
|
-
/** The description of the workflow scheme. */
|
|
150
|
-
description?: string | null;
|
|
151
|
-
/** The ID of the workflow scheme. */
|
|
152
|
-
id: string;
|
|
153
|
-
/** The name of the workflow scheme. */
|
|
154
|
-
name: string;
|
|
155
|
-
/** The IDs of projects using the workflow scheme. */
|
|
156
|
-
projectIdsUsingScheme: string[];
|
|
157
|
-
/** The scope of the workflow. */
|
|
158
|
-
scope: WorkflowScope;
|
|
159
|
-
/**
|
|
160
|
-
* Indicates if there's an [asynchronous task](#async-operations) for this
|
|
161
|
-
* workflow scheme.
|
|
162
|
-
*/
|
|
163
|
-
taskId?: string | null;
|
|
164
|
-
/** The current version details of this workflow scheme. */
|
|
165
|
-
version: DocumentVersion;
|
|
166
|
-
/** Mappings from workflows to issue types. */
|
|
167
|
-
workflowsForIssueTypes: WorkflowMetadataAndIssueTypeRestModel[];
|
|
168
|
-
}
|
|
169
|
-
/** The update workflow scheme payload. */
|
|
170
|
-
export interface WorkflowSchemeUpdateRequest extends Record<string, unknown> {
|
|
171
|
-
/**
|
|
172
|
-
* The ID of the workflow for issue types without having a mapping defined in this
|
|
173
|
-
* workflow scheme. Only used in global-scoped workflow schemes. If the
|
|
174
|
-
* `defaultWorkflowId` isn't specified, this is set to *Jira Workflow (jira)*.
|
|
175
|
-
*/
|
|
176
|
-
defaultWorkflowId?: string;
|
|
177
|
-
/** The new description for this workflow scheme. */
|
|
178
|
-
description: string;
|
|
179
|
-
/** The ID of this workflow scheme. */
|
|
180
|
-
id: string;
|
|
181
|
-
/** The new name for this workflow scheme. */
|
|
182
|
-
name: string;
|
|
183
|
-
/**
|
|
184
|
-
* Overrides, for the selected issue types, any status mappings provided in
|
|
185
|
-
* `statusMappingsByWorkflows`. Status mappings are required when the new workflow
|
|
186
|
-
* for an issue type doesn't contain all statuses that the old workflow has.
|
|
187
|
-
* Status mappings can be provided by a combination of `statusMappingsByWorkflows`
|
|
188
|
-
* and `statusMappingsByIssueTypeOverride`.
|
|
189
|
-
*/
|
|
190
|
-
statusMappingsByIssueTypeOverride?: MappingsByIssueTypeOverride[];
|
|
191
|
-
/**
|
|
192
|
-
* The status mappings by workflows. Status mappings are required when the new
|
|
193
|
-
* workflow for an issue type doesn't contain all statuses that the old workflow
|
|
194
|
-
* has. Status mappings can be provided by a combination of
|
|
195
|
-
* `statusMappingsByWorkflows` and `statusMappingsByIssueTypeOverride`.
|
|
196
|
-
*/
|
|
197
|
-
statusMappingsByWorkflows?: MappingsByWorkflow[];
|
|
198
|
-
/** The current version details of this workflow scheme. */
|
|
199
|
-
version: DocumentVersion;
|
|
200
|
-
/** Mappings from workflows to issue types. */
|
|
201
|
-
workflowsForIssueTypes?: WorkflowSchemeAssociation[];
|
|
202
|
-
}
|
|
203
|
-
/** The request payload to get the required mappings for updating a workflow scheme. */
|
|
204
|
-
export interface WorkflowSchemeUpdateRequiredMappingsRequest {
|
|
205
|
-
/**
|
|
206
|
-
* The ID of the new default workflow for this workflow scheme. Only used in
|
|
207
|
-
* global-scoped workflow schemes. If it isn't specified, is set to *Jira Workflow
|
|
208
|
-
* (jira)*.
|
|
209
|
-
*/
|
|
210
|
-
defaultWorkflowId?: string | null;
|
|
211
|
-
/** The ID of the workflow scheme. */
|
|
212
|
-
id: string;
|
|
213
|
-
/** The new workflow to issue type mappings for this workflow scheme. */
|
|
214
|
-
workflowsForIssueTypes: WorkflowSchemeAssociation[];
|
|
215
|
-
}
|
|
216
|
-
export interface WorkflowSchemeUpdateRequiredMappingsResponse {
|
|
217
|
-
/** The list of required status mappings by issue type. */
|
|
218
|
-
statusMappingsByIssueTypes?: RequiredMappingByIssueType[];
|
|
219
|
-
/** The list of required status mappings by workflow. */
|
|
220
|
-
statusMappingsByWorkflows?: RequiredMappingByWorkflows[];
|
|
221
|
-
/** The details of the statuses in the associated workflows. */
|
|
222
|
-
statuses?: StatusMetadata[];
|
|
223
|
-
/** The statuses associated with each workflow. */
|
|
224
|
-
statusesPerWorkflow?: StatusesPerWorkflow[];
|
|
225
|
-
}
|
|
226
|
-
export function registerWorkflowSchemesValidationSchemas(
|
|
227
|
-
validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
|
|
228
|
-
) {
|
|
229
|
-
validationSchemaStorage.register(
|
|
230
|
-
"MappingsByIssueTypeOverride",
|
|
231
|
-
z
|
|
232
|
-
.object({
|
|
233
|
-
issueTypeId: z.string(),
|
|
234
|
-
statusMappings: z.array(
|
|
235
|
-
validationSchemaStorage.lazy("WorkflowAssociationStatusMapping"),
|
|
236
|
-
),
|
|
237
|
-
})
|
|
238
|
-
.strict()
|
|
239
|
-
.describe("MappingsByIssueTypeOverride"),
|
|
240
|
-
);
|
|
241
|
-
validationSchemaStorage.register(
|
|
242
|
-
"MappingsByWorkflow",
|
|
243
|
-
z
|
|
244
|
-
.object({
|
|
245
|
-
newWorkflowId: z.string(),
|
|
246
|
-
oldWorkflowId: z.string(),
|
|
247
|
-
statusMappings: z.array(
|
|
248
|
-
validationSchemaStorage.lazy("WorkflowAssociationStatusMapping"),
|
|
249
|
-
),
|
|
250
|
-
})
|
|
251
|
-
.strict()
|
|
252
|
-
.describe("MappingsByWorkflow"),
|
|
253
|
-
);
|
|
254
|
-
validationSchemaStorage.register(
|
|
255
|
-
"PageBeanWorkflowScheme",
|
|
256
|
-
z
|
|
257
|
-
.object({
|
|
258
|
-
isLast: z.boolean().optional(),
|
|
259
|
-
maxResults: z.number().int().optional(),
|
|
260
|
-
nextPage: z.string().optional(),
|
|
261
|
-
self: z.string().optional(),
|
|
262
|
-
startAt: z.number().int().optional(),
|
|
263
|
-
total: z.number().int().optional(),
|
|
264
|
-
values: z
|
|
265
|
-
.array(validationSchemaStorage.lazy("WorkflowScheme"))
|
|
266
|
-
.optional(),
|
|
267
|
-
})
|
|
268
|
-
.strict()
|
|
269
|
-
.describe("PageBeanWorkflowScheme"),
|
|
270
|
-
);
|
|
271
|
-
validationSchemaStorage.register(
|
|
272
|
-
"RequiredMappingByIssueType",
|
|
273
|
-
z
|
|
274
|
-
.object({
|
|
275
|
-
issueTypeId: z.string().optional(),
|
|
276
|
-
statusIds: z
|
|
277
|
-
.array(z.string())
|
|
278
|
-
.superRefine((items, ctx) => {
|
|
279
|
-
if (new Set(items).size !== items.length) {
|
|
280
|
-
ctx.addIssue({
|
|
281
|
-
code: z.ZodIssueCode.custom,
|
|
282
|
-
path: [],
|
|
283
|
-
message: "Array items must be unique",
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
})
|
|
287
|
-
.optional(),
|
|
288
|
-
})
|
|
289
|
-
.strict()
|
|
290
|
-
.describe("RequiredMappingByIssueType"),
|
|
291
|
-
);
|
|
292
|
-
validationSchemaStorage.register(
|
|
293
|
-
"RequiredMappingByWorkflows",
|
|
294
|
-
z
|
|
295
|
-
.object({
|
|
296
|
-
sourceWorkflowId: z.string().optional(),
|
|
297
|
-
statusIds: z
|
|
298
|
-
.array(z.string())
|
|
299
|
-
.superRefine((items, ctx) => {
|
|
300
|
-
if (new Set(items).size !== items.length) {
|
|
301
|
-
ctx.addIssue({
|
|
302
|
-
code: z.ZodIssueCode.custom,
|
|
303
|
-
path: [],
|
|
304
|
-
message: "Array items must be unique",
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
})
|
|
308
|
-
.optional(),
|
|
309
|
-
targetWorkflowId: z.string().optional(),
|
|
310
|
-
})
|
|
311
|
-
.strict()
|
|
312
|
-
.describe("RequiredMappingByWorkflows"),
|
|
313
|
-
);
|
|
314
|
-
validationSchemaStorage.register(
|
|
315
|
-
"SimpleUsage",
|
|
316
|
-
z
|
|
317
|
-
.object({
|
|
318
|
-
issueTypeIds: z.array(z.string()),
|
|
319
|
-
projectId: z.string(),
|
|
320
|
-
})
|
|
321
|
-
.strict()
|
|
322
|
-
.describe("SimpleUsage"),
|
|
323
|
-
);
|
|
324
|
-
validationSchemaStorage.register(
|
|
325
|
-
"StatusesPerWorkflow",
|
|
326
|
-
z
|
|
327
|
-
.object({
|
|
328
|
-
initialStatusId: z.string().optional(),
|
|
329
|
-
statuses: z
|
|
330
|
-
.array(z.string())
|
|
331
|
-
.superRefine((items, ctx) => {
|
|
332
|
-
if (new Set(items).size !== items.length) {
|
|
333
|
-
ctx.addIssue({
|
|
334
|
-
code: z.ZodIssueCode.custom,
|
|
335
|
-
path: [],
|
|
336
|
-
message: "Array items must be unique",
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
})
|
|
340
|
-
.optional(),
|
|
341
|
-
workflowId: z.string().optional(),
|
|
342
|
-
})
|
|
343
|
-
.strict()
|
|
344
|
-
.describe("StatusesPerWorkflow"),
|
|
345
|
-
);
|
|
346
|
-
validationSchemaStorage.register(
|
|
347
|
-
"StatusMetadata",
|
|
348
|
-
z
|
|
349
|
-
.object({
|
|
350
|
-
category: z.enum(["TODO", "IN_PROGRESS", "DONE"]).optional(),
|
|
351
|
-
id: z.string().optional(),
|
|
352
|
-
name: z.string().optional(),
|
|
353
|
-
})
|
|
354
|
-
.strict()
|
|
355
|
-
.describe("StatusMetadata"),
|
|
356
|
-
);
|
|
357
|
-
validationSchemaStorage.register(
|
|
358
|
-
"WorkflowAssociationStatusMapping",
|
|
359
|
-
z
|
|
360
|
-
.object({
|
|
361
|
-
newStatusId: z.string(),
|
|
362
|
-
oldStatusId: z.string(),
|
|
363
|
-
})
|
|
364
|
-
.strict()
|
|
365
|
-
.describe("WorkflowAssociationStatusMapping"),
|
|
366
|
-
);
|
|
367
|
-
validationSchemaStorage.register(
|
|
368
|
-
"WorkflowMetadataAndIssueTypeRestModel",
|
|
369
|
-
z
|
|
370
|
-
.object({
|
|
371
|
-
issueTypeIds: z.array(z.string()),
|
|
372
|
-
workflow: validationSchemaStorage.lazy("WorkflowMetadataRestModel"),
|
|
373
|
-
})
|
|
374
|
-
.strict()
|
|
375
|
-
.describe("WorkflowMetadataAndIssueTypeRestModel"),
|
|
376
|
-
);
|
|
377
|
-
validationSchemaStorage.register(
|
|
378
|
-
"WorkflowMetadataRestModel",
|
|
379
|
-
z
|
|
380
|
-
.object({
|
|
381
|
-
description: z.string(),
|
|
382
|
-
id: z.string(),
|
|
383
|
-
name: z.string(),
|
|
384
|
-
usage: z.array(validationSchemaStorage.lazy("SimpleUsage")),
|
|
385
|
-
version: validationSchemaStorage.lazy("DocumentVersion"),
|
|
386
|
-
})
|
|
387
|
-
.strict()
|
|
388
|
-
.describe("WorkflowMetadataRestModel"),
|
|
389
|
-
);
|
|
390
|
-
validationSchemaStorage.register(
|
|
391
|
-
"WorkflowSchemeAssociation",
|
|
392
|
-
z
|
|
393
|
-
.object({
|
|
394
|
-
issueTypeIds: z.array(z.string()).superRefine((items, ctx) => {
|
|
395
|
-
if (new Set(items).size !== items.length) {
|
|
396
|
-
ctx.addIssue({
|
|
397
|
-
code: z.ZodIssueCode.custom,
|
|
398
|
-
path: [],
|
|
399
|
-
message: "Array items must be unique",
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
}),
|
|
403
|
-
workflowId: z.string(),
|
|
404
|
-
})
|
|
405
|
-
.strict()
|
|
406
|
-
.describe("WorkflowSchemeAssociation"),
|
|
407
|
-
);
|
|
408
|
-
validationSchemaStorage.register(
|
|
409
|
-
"WorkflowSchemeReadRequest",
|
|
410
|
-
z
|
|
411
|
-
.object({
|
|
412
|
-
projectIds: z.nullable(z.array(z.nullable(z.string()))).optional(),
|
|
413
|
-
workflowSchemeIds: z
|
|
414
|
-
.nullable(z.array(z.nullable(z.string())))
|
|
415
|
-
.optional(),
|
|
416
|
-
})
|
|
417
|
-
.strict()
|
|
418
|
-
.describe("WorkflowSchemeReadRequest"),
|
|
419
|
-
);
|
|
420
|
-
validationSchemaStorage.register(
|
|
421
|
-
"WorkflowSchemeReadResponse",
|
|
422
|
-
z
|
|
423
|
-
.object({
|
|
424
|
-
defaultWorkflow: validationSchemaStorage
|
|
425
|
-
.lazy("WorkflowMetadataRestModel")
|
|
426
|
-
.optional(),
|
|
427
|
-
description: z.nullable(z.string()).optional(),
|
|
428
|
-
id: z.string(),
|
|
429
|
-
name: z.string(),
|
|
430
|
-
projectIdsUsingScheme: z.array(z.string()),
|
|
431
|
-
scope: validationSchemaStorage.lazy("WorkflowScope"),
|
|
432
|
-
taskId: z.nullable(z.string()).optional(),
|
|
433
|
-
version: validationSchemaStorage.lazy("DocumentVersion"),
|
|
434
|
-
workflowsForIssueTypes: z.array(
|
|
435
|
-
validationSchemaStorage.lazy("WorkflowMetadataAndIssueTypeRestModel"),
|
|
436
|
-
),
|
|
437
|
-
})
|
|
438
|
-
.strict()
|
|
439
|
-
.describe("WorkflowSchemeReadResponse"),
|
|
440
|
-
);
|
|
441
|
-
validationSchemaStorage.register(
|
|
442
|
-
"WorkflowSchemeUpdateRequest",
|
|
443
|
-
z
|
|
444
|
-
.object({
|
|
445
|
-
defaultWorkflowId: z.string().optional(),
|
|
446
|
-
description: z.string(),
|
|
447
|
-
id: z.string(),
|
|
448
|
-
name: z.string(),
|
|
449
|
-
statusMappingsByIssueTypeOverride: z
|
|
450
|
-
.array(validationSchemaStorage.lazy("MappingsByIssueTypeOverride"))
|
|
451
|
-
.optional(),
|
|
452
|
-
statusMappingsByWorkflows: z
|
|
453
|
-
.array(validationSchemaStorage.lazy("MappingsByWorkflow"))
|
|
454
|
-
.optional(),
|
|
455
|
-
version: validationSchemaStorage.lazy("DocumentVersion"),
|
|
456
|
-
workflowsForIssueTypes: z
|
|
457
|
-
.array(validationSchemaStorage.lazy("WorkflowSchemeAssociation"))
|
|
458
|
-
.optional(),
|
|
459
|
-
})
|
|
460
|
-
.catchall(z.unknown())
|
|
461
|
-
.describe("WorkflowSchemeUpdateRequest"),
|
|
462
|
-
);
|
|
463
|
-
validationSchemaStorage.register(
|
|
464
|
-
"WorkflowSchemeUpdateRequiredMappingsRequest",
|
|
465
|
-
z
|
|
466
|
-
.object({
|
|
467
|
-
defaultWorkflowId: z.nullable(z.string()).optional(),
|
|
468
|
-
id: z.string(),
|
|
469
|
-
workflowsForIssueTypes: z.array(
|
|
470
|
-
validationSchemaStorage.lazy("WorkflowSchemeAssociation"),
|
|
471
|
-
),
|
|
472
|
-
})
|
|
473
|
-
.strict()
|
|
474
|
-
.describe("WorkflowSchemeUpdateRequiredMappingsRequest"),
|
|
475
|
-
);
|
|
476
|
-
validationSchemaStorage.register(
|
|
477
|
-
"WorkflowSchemeUpdateRequiredMappingsResponse",
|
|
478
|
-
z
|
|
479
|
-
.object({
|
|
480
|
-
statusMappingsByIssueTypes: z
|
|
481
|
-
.array(validationSchemaStorage.lazy("RequiredMappingByIssueType"))
|
|
482
|
-
.superRefine((items, ctx) => {
|
|
483
|
-
if (
|
|
484
|
-
new Set(items.map((item) => JSON.stringify(item))).size !==
|
|
485
|
-
items.length
|
|
486
|
-
) {
|
|
487
|
-
ctx.addIssue({
|
|
488
|
-
code: z.ZodIssueCode.custom,
|
|
489
|
-
path: [],
|
|
490
|
-
message: "Array items must be unique",
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
})
|
|
494
|
-
.optional(),
|
|
495
|
-
statusMappingsByWorkflows: z
|
|
496
|
-
.array(validationSchemaStorage.lazy("RequiredMappingByWorkflows"))
|
|
497
|
-
.superRefine((items, ctx) => {
|
|
498
|
-
if (
|
|
499
|
-
new Set(items.map((item) => JSON.stringify(item))).size !==
|
|
500
|
-
items.length
|
|
501
|
-
) {
|
|
502
|
-
ctx.addIssue({
|
|
503
|
-
code: z.ZodIssueCode.custom,
|
|
504
|
-
path: [],
|
|
505
|
-
message: "Array items must be unique",
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
})
|
|
509
|
-
.optional(),
|
|
510
|
-
statuses: z
|
|
511
|
-
.array(validationSchemaStorage.lazy("StatusMetadata"))
|
|
512
|
-
.superRefine((items, ctx) => {
|
|
513
|
-
if (
|
|
514
|
-
new Set(items.map((item) => JSON.stringify(item))).size !==
|
|
515
|
-
items.length
|
|
516
|
-
) {
|
|
517
|
-
ctx.addIssue({
|
|
518
|
-
code: z.ZodIssueCode.custom,
|
|
519
|
-
path: [],
|
|
520
|
-
message: "Array items must be unique",
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
})
|
|
524
|
-
.optional(),
|
|
525
|
-
statusesPerWorkflow: z
|
|
526
|
-
.array(validationSchemaStorage.lazy("StatusesPerWorkflow"))
|
|
527
|
-
.superRefine((items, ctx) => {
|
|
528
|
-
if (
|
|
529
|
-
new Set(items.map((item) => JSON.stringify(item))).size !==
|
|
530
|
-
items.length
|
|
531
|
-
) {
|
|
532
|
-
ctx.addIssue({
|
|
533
|
-
code: z.ZodIssueCode.custom,
|
|
534
|
-
path: [],
|
|
535
|
-
message: "Array items must be unique",
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
})
|
|
539
|
-
.optional(),
|
|
540
|
-
})
|
|
541
|
-
.strict()
|
|
542
|
-
.describe("WorkflowSchemeUpdateRequiredMappingsResponse"),
|
|
543
|
-
);
|
|
544
|
-
validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
|
|
545
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z, type ZodTypeAny } from "zod";
|
|
5
|
-
|
|
6
|
-
import type { CommonValidationSchemaStorage } from "../core/common-validation-schema-storage";
|
|
7
|
-
/** Details about the server Jira is running on. */
|
|
8
|
-
export interface WorkflowTransitionProperty extends Record<string, unknown> {
|
|
9
|
-
/** The ID of the transition property. */
|
|
10
|
-
id?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The key of the transition property. Also known as the name of the transition
|
|
13
|
-
* property.
|
|
14
|
-
*/
|
|
15
|
-
key?: string;
|
|
16
|
-
/** The value of the transition property. */
|
|
17
|
-
value: string;
|
|
18
|
-
}
|
|
19
|
-
export function registerWorkflowTransitionPropertiesValidationSchemas(
|
|
20
|
-
validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
|
|
21
|
-
) {
|
|
22
|
-
validationSchemaStorage.register(
|
|
23
|
-
"WorkflowTransitionProperty",
|
|
24
|
-
z
|
|
25
|
-
.object({
|
|
26
|
-
id: z.string().optional(),
|
|
27
|
-
key: z.string().optional(),
|
|
28
|
-
value: z.string(),
|
|
29
|
-
})
|
|
30
|
-
.catchall(z.unknown())
|
|
31
|
-
.describe("WorkflowTransitionProperty"),
|
|
32
|
-
);
|
|
33
|
-
}
|