@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,384 +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 } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import {
|
|
9
|
-
type PermissionScheme,
|
|
10
|
-
registerCommonValidationSchemas,
|
|
11
|
-
type SecurityScheme,
|
|
12
|
-
} from "../models/common";
|
|
13
|
-
import {
|
|
14
|
-
type IdBean,
|
|
15
|
-
type ProjectIssueSecurityLevels,
|
|
16
|
-
registerProjectPermissionSchemesValidationSchemas,
|
|
17
|
-
} from "../models/project-permission-schemes";
|
|
18
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
19
|
-
/**
|
|
20
|
-
* This resource represents permission schemes for a project. Use this resource to:
|
|
21
|
-
*
|
|
22
|
-
* * get details of a project's issue security levels available to the calling
|
|
23
|
-
* user.
|
|
24
|
-
* * get the permission scheme associated with the project or assign different
|
|
25
|
-
* permission scheme to the project.
|
|
26
|
-
* * get details of a project's issue security scheme.
|
|
27
|
-
*
|
|
28
|
-
* See [Managing project permissions](https://confluence.atlassian.com/x/yodKLg)
|
|
29
|
-
* for more information about permission schemes.
|
|
30
|
-
*/
|
|
31
|
-
export class ProjectPermissionSchemesService extends CommonHttpService {
|
|
32
|
-
/**
|
|
33
|
-
* Assigns a permission scheme with a project. See [Managing project
|
|
34
|
-
* permissions](https://confluence.atlassian.com/x/yodKLg) for more information
|
|
35
|
-
* about permission schemes.
|
|
36
|
-
*
|
|
37
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
38
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg)
|
|
39
|
-
*
|
|
40
|
-
* @returns Returned if the request is successful.
|
|
41
|
-
*
|
|
42
|
-
* example: {
|
|
43
|
-
* "description": "description",
|
|
44
|
-
* "id": 10000,
|
|
45
|
-
* "name": "Example permission scheme",
|
|
46
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
|
|
47
|
-
* }
|
|
48
|
-
* @path {PUT} /rest/api/3/project/{projectKeyOrId}/permissionscheme
|
|
49
|
-
* @scopes-current manage:jira-project
|
|
50
|
-
* @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
|
|
51
|
-
* read:permission-scheme:jira, read:permission:jira, read:project-role:jira,
|
|
52
|
-
* read:user:jira, write:project:jira, read:avatar:jira,
|
|
53
|
-
* read:project-category:jira, read:project:jira
|
|
54
|
-
*/
|
|
55
|
-
assignPermissionScheme({
|
|
56
|
-
projectKeyOrId,
|
|
57
|
-
expand,
|
|
58
|
-
idBean,
|
|
59
|
-
}: {
|
|
60
|
-
/** The project ID or project key (case sensitive). */
|
|
61
|
-
projectKeyOrId: string;
|
|
62
|
-
/**
|
|
63
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
64
|
-
* This parameter accepts a comma-separated list. Note that permissions are
|
|
65
|
-
* included when you specify any value. Expand options include:
|
|
66
|
-
*
|
|
67
|
-
* * `all` Returns all expandable information.
|
|
68
|
-
* * `field` Returns information about the custom field granted the permission.
|
|
69
|
-
* * `group` Returns information about the group that is granted the permission.
|
|
70
|
-
* * `permissions` Returns all permission grants for each permission scheme.
|
|
71
|
-
* * `projectRole` Returns information about the project role granted the
|
|
72
|
-
* permission.
|
|
73
|
-
* * `user` Returns information about the user who is granted the permission.
|
|
74
|
-
*/
|
|
75
|
-
expand?: string;
|
|
76
|
-
/**
|
|
77
|
-
* @example {
|
|
78
|
-
* "id": 10000
|
|
79
|
-
* }
|
|
80
|
-
*/
|
|
81
|
-
idBean: IdBean;
|
|
82
|
-
}): Promise<PermissionScheme> {
|
|
83
|
-
return this.getClientInstance()
|
|
84
|
-
.request({
|
|
85
|
-
path: "/rest/api/3/project/{projectKeyOrId}/permissionscheme",
|
|
86
|
-
method: "PUT",
|
|
87
|
-
pathParams: {
|
|
88
|
-
projectKeyOrId,
|
|
89
|
-
},
|
|
90
|
-
query: {
|
|
91
|
-
expand,
|
|
92
|
-
},
|
|
93
|
-
headers: {
|
|
94
|
-
"Content-Type": "application/json",
|
|
95
|
-
},
|
|
96
|
-
body: idBean,
|
|
97
|
-
})
|
|
98
|
-
.then(
|
|
99
|
-
this.getClientInstance().responseHandler({
|
|
100
|
-
200: {
|
|
101
|
-
"application/json": "json",
|
|
102
|
-
},
|
|
103
|
-
}),
|
|
104
|
-
)
|
|
105
|
-
.then(
|
|
106
|
-
commonHttpClient.castResponse<{
|
|
107
|
-
status: 200;
|
|
108
|
-
mediaType: "application/json";
|
|
109
|
-
body: PermissionScheme;
|
|
110
|
-
}>(),
|
|
111
|
-
)
|
|
112
|
-
.then(
|
|
113
|
-
validationSchemaStorage.validator(
|
|
114
|
-
"ProjectPermissionSchemesService.assignPermissionScheme.response",
|
|
115
|
-
),
|
|
116
|
-
)
|
|
117
|
-
.then(commonHttpClient.getBody);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Gets the [permission scheme](https://confluence.atlassian.com/x/yodKLg)
|
|
121
|
-
* associated with the project.
|
|
122
|
-
*
|
|
123
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
124
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer projects*
|
|
125
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg).
|
|
126
|
-
*
|
|
127
|
-
* @returns Returned if the request is successful.
|
|
128
|
-
*
|
|
129
|
-
* example: {
|
|
130
|
-
* "description": "description",
|
|
131
|
-
* "id": 10000,
|
|
132
|
-
* "name": "Example permission scheme",
|
|
133
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
|
|
134
|
-
* }
|
|
135
|
-
* @path {GET} /rest/api/3/project/{projectKeyOrId}/permissionscheme
|
|
136
|
-
* @scopes-current read:jira-work
|
|
137
|
-
* @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
|
|
138
|
-
* read:permission-scheme:jira, read:permission:jira, read:project-role:jira,
|
|
139
|
-
* read:user:jira, read:avatar:jira, read:project-category:jira, read:project:jira
|
|
140
|
-
*/
|
|
141
|
-
getAssignedPermissionScheme({
|
|
142
|
-
projectKeyOrId,
|
|
143
|
-
expand,
|
|
144
|
-
}: {
|
|
145
|
-
/** The project ID or project key (case sensitive). */
|
|
146
|
-
projectKeyOrId: string;
|
|
147
|
-
/**
|
|
148
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
149
|
-
* This parameter accepts a comma-separated list. Note that permissions are
|
|
150
|
-
* included when you specify any value. Expand options include:
|
|
151
|
-
*
|
|
152
|
-
* * `all` Returns all expandable information.
|
|
153
|
-
* * `field` Returns information about the custom field granted the permission.
|
|
154
|
-
* * `group` Returns information about the group that is granted the permission.
|
|
155
|
-
* * `permissions` Returns all permission grants for each permission scheme.
|
|
156
|
-
* * `projectRole` Returns information about the project role granted the
|
|
157
|
-
* permission.
|
|
158
|
-
* * `user` Returns information about the user who is granted the permission.
|
|
159
|
-
*/
|
|
160
|
-
expand?: string;
|
|
161
|
-
}): Promise<PermissionScheme> {
|
|
162
|
-
return this.getClientInstance()
|
|
163
|
-
.request({
|
|
164
|
-
path: "/rest/api/3/project/{projectKeyOrId}/permissionscheme",
|
|
165
|
-
method: "GET",
|
|
166
|
-
pathParams: {
|
|
167
|
-
projectKeyOrId,
|
|
168
|
-
},
|
|
169
|
-
query: {
|
|
170
|
-
expand,
|
|
171
|
-
},
|
|
172
|
-
})
|
|
173
|
-
.then(
|
|
174
|
-
this.getClientInstance().responseHandler({
|
|
175
|
-
200: {
|
|
176
|
-
"application/json": "json",
|
|
177
|
-
},
|
|
178
|
-
}),
|
|
179
|
-
)
|
|
180
|
-
.then(
|
|
181
|
-
commonHttpClient.castResponse<{
|
|
182
|
-
status: 200;
|
|
183
|
-
mediaType: "application/json";
|
|
184
|
-
body: PermissionScheme;
|
|
185
|
-
}>(),
|
|
186
|
-
)
|
|
187
|
-
.then(
|
|
188
|
-
validationSchemaStorage.validator(
|
|
189
|
-
"ProjectPermissionSchemesService.getAssignedPermissionScheme.response",
|
|
190
|
-
),
|
|
191
|
-
)
|
|
192
|
-
.then(commonHttpClient.getBody);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Returns the [issue security scheme](https://confluence.atlassian.com/x/J4lKLg)
|
|
196
|
-
* associated with the project.
|
|
197
|
-
*
|
|
198
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
199
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or the *Administer
|
|
200
|
-
* Projects* [project permission](https://confluence.atlassian.com/x/yodKLg).
|
|
201
|
-
*
|
|
202
|
-
* @returns Returned if the request is successful.
|
|
203
|
-
*
|
|
204
|
-
* example: {
|
|
205
|
-
* "defaultSecurityLevelId": 10021,
|
|
206
|
-
* "description": "Description for the default issue security scheme",
|
|
207
|
-
* "id": 10000,
|
|
208
|
-
* "levels": [
|
|
209
|
-
* {
|
|
210
|
-
* "description": "Only the reporter and internal staff can see this issue.",
|
|
211
|
-
* "id": "10021",
|
|
212
|
-
* "name": "Reporter Only",
|
|
213
|
-
* "self": "https://your-domain.atlassian.net/rest/api/3/securitylevel/10021"
|
|
214
|
-
* }
|
|
215
|
-
* ],
|
|
216
|
-
* "name": "Default Issue Security Scheme",
|
|
217
|
-
* "self":
|
|
218
|
-
* "https://your-domain.atlassian.net/rest/api/3/issuesecurityschemes/10000"
|
|
219
|
-
* }
|
|
220
|
-
* @path {GET} /rest/api/3/project/{projectKeyOrId}/issuesecuritylevelscheme
|
|
221
|
-
* @scopes-current read:jira-work
|
|
222
|
-
* @scopes-beta read:issue-security-level:jira, read:issue-security-scheme:jira
|
|
223
|
-
*/
|
|
224
|
-
getProjectIssueSecurityScheme({
|
|
225
|
-
projectKeyOrId,
|
|
226
|
-
}: {
|
|
227
|
-
/** The project ID or project key (case sensitive). */
|
|
228
|
-
projectKeyOrId: string;
|
|
229
|
-
}): Promise<SecurityScheme> {
|
|
230
|
-
return this.getClientInstance()
|
|
231
|
-
.request({
|
|
232
|
-
path: "/rest/api/3/project/{projectKeyOrId}/issuesecuritylevelscheme",
|
|
233
|
-
method: "GET",
|
|
234
|
-
pathParams: {
|
|
235
|
-
projectKeyOrId,
|
|
236
|
-
},
|
|
237
|
-
})
|
|
238
|
-
.then(
|
|
239
|
-
this.getClientInstance().responseHandler({
|
|
240
|
-
200: {
|
|
241
|
-
"application/json": "json",
|
|
242
|
-
},
|
|
243
|
-
}),
|
|
244
|
-
)
|
|
245
|
-
.then(
|
|
246
|
-
commonHttpClient.castResponse<{
|
|
247
|
-
status: 200;
|
|
248
|
-
mediaType: "application/json";
|
|
249
|
-
body: SecurityScheme;
|
|
250
|
-
}>(),
|
|
251
|
-
)
|
|
252
|
-
.then(
|
|
253
|
-
validationSchemaStorage.validator(
|
|
254
|
-
"ProjectPermissionSchemesService.getProjectIssueSecurityScheme.response",
|
|
255
|
-
),
|
|
256
|
-
)
|
|
257
|
-
.then(commonHttpClient.getBody);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Returns all [issue security](https://confluence.atlassian.com/x/J4lKLg) levels
|
|
261
|
-
* for the project that the user has access to.
|
|
262
|
-
*
|
|
263
|
-
* This operation can be accessed anonymously.
|
|
264
|
-
*
|
|
265
|
-
* **[Permissions](#permissions) required:** *Browse projects* [global
|
|
266
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) for the project,
|
|
267
|
-
* however, issue security levels are only returned for authenticated user with
|
|
268
|
-
* *Set Issue Security* [global
|
|
269
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) for the project.
|
|
270
|
-
*
|
|
271
|
-
* @returns Returned if the request is successful.
|
|
272
|
-
*
|
|
273
|
-
* example: {
|
|
274
|
-
* "levels": [
|
|
275
|
-
* {
|
|
276
|
-
* "description": "Only the reporter and internal staff can see this issue.",
|
|
277
|
-
* "id": "100000",
|
|
278
|
-
* "name": "Reporter Only",
|
|
279
|
-
* "self":
|
|
280
|
-
* "https://your-domain.atlassian.net/rest/api/3/securitylevel/100000"
|
|
281
|
-
* },
|
|
282
|
-
* {
|
|
283
|
-
* "description": "Only internal staff can see this issue.",
|
|
284
|
-
* "id": "100001",
|
|
285
|
-
* "name": "Staff Only",
|
|
286
|
-
* "self":
|
|
287
|
-
* "https://your-domain.atlassian.net/rest/api/3/securitylevel/100001"
|
|
288
|
-
* }
|
|
289
|
-
* ]
|
|
290
|
-
* }
|
|
291
|
-
* @path {GET} /rest/api/3/project/{projectKeyOrId}/securitylevel
|
|
292
|
-
* @scopes-current read:jira-work
|
|
293
|
-
* @scopes-beta read:issue-security-level:jira
|
|
294
|
-
*/
|
|
295
|
-
getSecurityLevelsForProject({
|
|
296
|
-
projectKeyOrId,
|
|
297
|
-
}: {
|
|
298
|
-
/** The project ID or project key (case sensitive). */
|
|
299
|
-
projectKeyOrId: string;
|
|
300
|
-
}): Promise<ProjectIssueSecurityLevels> {
|
|
301
|
-
return this.getClientInstance()
|
|
302
|
-
.request({
|
|
303
|
-
path: "/rest/api/3/project/{projectKeyOrId}/securitylevel",
|
|
304
|
-
method: "GET",
|
|
305
|
-
pathParams: {
|
|
306
|
-
projectKeyOrId,
|
|
307
|
-
},
|
|
308
|
-
})
|
|
309
|
-
.then(
|
|
310
|
-
this.getClientInstance().responseHandler({
|
|
311
|
-
200: {
|
|
312
|
-
"application/json": "json",
|
|
313
|
-
},
|
|
314
|
-
}),
|
|
315
|
-
)
|
|
316
|
-
.then(
|
|
317
|
-
commonHttpClient.castResponse<{
|
|
318
|
-
status: 200;
|
|
319
|
-
mediaType: "application/json";
|
|
320
|
-
body: ProjectIssueSecurityLevels;
|
|
321
|
-
}>(),
|
|
322
|
-
)
|
|
323
|
-
.then(
|
|
324
|
-
validationSchemaStorage.validator(
|
|
325
|
-
"ProjectPermissionSchemesService.getSecurityLevelsForProject.response",
|
|
326
|
-
),
|
|
327
|
-
)
|
|
328
|
-
.then(commonHttpClient.getBody);
|
|
329
|
-
}
|
|
330
|
-
static initialize() {
|
|
331
|
-
validationSchemaStorage.registerExtensible(
|
|
332
|
-
"ProjectPermissionSchemesService.getProjectIssueSecurityScheme.response",
|
|
333
|
-
z
|
|
334
|
-
.object({
|
|
335
|
-
status: z.literal(200),
|
|
336
|
-
mediaType: z.literal("application/json"),
|
|
337
|
-
body: validationSchemaStorage.lazy("SecurityScheme"),
|
|
338
|
-
})
|
|
339
|
-
.describe(
|
|
340
|
-
"ProjectPermissionSchemesService.getProjectIssueSecurityScheme.response",
|
|
341
|
-
),
|
|
342
|
-
);
|
|
343
|
-
validationSchemaStorage.registerExtensible(
|
|
344
|
-
"ProjectPermissionSchemesService.getAssignedPermissionScheme.response",
|
|
345
|
-
z
|
|
346
|
-
.object({
|
|
347
|
-
status: z.literal(200),
|
|
348
|
-
mediaType: z.literal("application/json"),
|
|
349
|
-
body: validationSchemaStorage.lazy("PermissionScheme"),
|
|
350
|
-
})
|
|
351
|
-
.describe(
|
|
352
|
-
"ProjectPermissionSchemesService.getAssignedPermissionScheme.response",
|
|
353
|
-
),
|
|
354
|
-
);
|
|
355
|
-
validationSchemaStorage.registerExtensible(
|
|
356
|
-
"ProjectPermissionSchemesService.assignPermissionScheme.response",
|
|
357
|
-
z
|
|
358
|
-
.object({
|
|
359
|
-
status: z.literal(200),
|
|
360
|
-
mediaType: z.literal("application/json"),
|
|
361
|
-
body: validationSchemaStorage.lazy("PermissionScheme"),
|
|
362
|
-
})
|
|
363
|
-
.describe(
|
|
364
|
-
"ProjectPermissionSchemesService.assignPermissionScheme.response",
|
|
365
|
-
),
|
|
366
|
-
);
|
|
367
|
-
validationSchemaStorage.registerExtensible(
|
|
368
|
-
"ProjectPermissionSchemesService.getSecurityLevelsForProject.response",
|
|
369
|
-
z
|
|
370
|
-
.object({
|
|
371
|
-
status: z.literal(200),
|
|
372
|
-
mediaType: z.literal("application/json"),
|
|
373
|
-
body: validationSchemaStorage.lazy("ProjectIssueSecurityLevels"),
|
|
374
|
-
})
|
|
375
|
-
.describe(
|
|
376
|
-
"ProjectPermissionSchemesService.getSecurityLevelsForProject.response",
|
|
377
|
-
),
|
|
378
|
-
);
|
|
379
|
-
validationSchemaStorage.registerOnce([
|
|
380
|
-
registerCommonValidationSchemas,
|
|
381
|
-
registerProjectPermissionSchemesValidationSchemas,
|
|
382
|
-
]);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
@@ -1,320 +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 } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import {
|
|
9
|
-
type EntityProperty,
|
|
10
|
-
type PropertyKeys,
|
|
11
|
-
registerCommonValidationSchemas,
|
|
12
|
-
} from "../models/common";
|
|
13
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
14
|
-
/**
|
|
15
|
-
* This resource represents [project](#api-group-Projects) properties, which
|
|
16
|
-
* provides for storing custom data against a project. Use it to get, create, and
|
|
17
|
-
* delete project properties as well as get a list of property keys for a project.
|
|
18
|
-
* Project properties are a type of [entity
|
|
19
|
-
* property](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
|
|
20
|
-
*/
|
|
21
|
-
export class ProjectPropertiesService extends CommonHttpService {
|
|
22
|
-
/**
|
|
23
|
-
* Deletes the
|
|
24
|
-
* [property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties)
|
|
25
|
-
* from a project.
|
|
26
|
-
*
|
|
27
|
-
* This operation can be accessed anonymously.
|
|
28
|
-
*
|
|
29
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
30
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects*
|
|
31
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
32
|
-
* containing the property.
|
|
33
|
-
*
|
|
34
|
-
* @path {DELETE} /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}
|
|
35
|
-
* @scopes-current manage:jira-project
|
|
36
|
-
* @scopes-beta delete:project.property:jira
|
|
37
|
-
*/
|
|
38
|
-
deleteProjectProperty({
|
|
39
|
-
projectIdOrKey,
|
|
40
|
-
propertyKey,
|
|
41
|
-
}: {
|
|
42
|
-
/** The project ID or project key (case sensitive). */
|
|
43
|
-
projectIdOrKey: string;
|
|
44
|
-
/**
|
|
45
|
-
* The project property key. Use [Get project property
|
|
46
|
-
* keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of
|
|
47
|
-
* all project property keys.
|
|
48
|
-
*/
|
|
49
|
-
propertyKey: string;
|
|
50
|
-
}): Promise<void> {
|
|
51
|
-
return this.getClientInstance()
|
|
52
|
-
.request({
|
|
53
|
-
path: "/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}",
|
|
54
|
-
method: "DELETE",
|
|
55
|
-
pathParams: {
|
|
56
|
-
projectIdOrKey,
|
|
57
|
-
propertyKey,
|
|
58
|
-
},
|
|
59
|
-
})
|
|
60
|
-
.then(commonHttpClient.discardResult);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Returns the value of a [project
|
|
64
|
-
* property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties).
|
|
65
|
-
*
|
|
66
|
-
* This operation can be accessed anonymously.
|
|
67
|
-
*
|
|
68
|
-
* **[Permissions](#permissions) required:** *Browse Projects* [project
|
|
69
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
70
|
-
* containing the property.
|
|
71
|
-
*
|
|
72
|
-
* @returns Returned if the request is successful.
|
|
73
|
-
*
|
|
74
|
-
* example: {
|
|
75
|
-
* "key": "issue.support",
|
|
76
|
-
* "value": {
|
|
77
|
-
* "system.conversation.id": "b1bf38be-5e94-4b40-a3b8-9278735ee1e6",
|
|
78
|
-
* "system.support.time": "1m"
|
|
79
|
-
* }
|
|
80
|
-
* }
|
|
81
|
-
* @path {GET} /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}
|
|
82
|
-
* @scopes-current read:jira-work
|
|
83
|
-
* @scopes-beta read:project.property:jira
|
|
84
|
-
*/
|
|
85
|
-
getProjectProperty({
|
|
86
|
-
projectIdOrKey,
|
|
87
|
-
propertyKey,
|
|
88
|
-
}: {
|
|
89
|
-
/** The project ID or project key (case sensitive). */
|
|
90
|
-
projectIdOrKey: string;
|
|
91
|
-
/**
|
|
92
|
-
* The project property key. Use [Get project property
|
|
93
|
-
* keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of
|
|
94
|
-
* all project property keys.
|
|
95
|
-
*/
|
|
96
|
-
propertyKey: string;
|
|
97
|
-
}): Promise<EntityProperty> {
|
|
98
|
-
return this.getClientInstance()
|
|
99
|
-
.request({
|
|
100
|
-
path: "/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}",
|
|
101
|
-
method: "GET",
|
|
102
|
-
pathParams: {
|
|
103
|
-
projectIdOrKey,
|
|
104
|
-
propertyKey,
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
.then(
|
|
108
|
-
this.getClientInstance().responseHandler({
|
|
109
|
-
200: {
|
|
110
|
-
"application/json": "json",
|
|
111
|
-
},
|
|
112
|
-
}),
|
|
113
|
-
)
|
|
114
|
-
.then(
|
|
115
|
-
commonHttpClient.castResponse<{
|
|
116
|
-
status: 200;
|
|
117
|
-
mediaType: "application/json";
|
|
118
|
-
body: EntityProperty;
|
|
119
|
-
}>(),
|
|
120
|
-
)
|
|
121
|
-
.then(
|
|
122
|
-
validationSchemaStorage.validator(
|
|
123
|
-
"ProjectPropertiesService.getProjectProperty.response",
|
|
124
|
-
),
|
|
125
|
-
)
|
|
126
|
-
.then(commonHttpClient.getBody);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Returns all [project
|
|
130
|
-
* property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties)
|
|
131
|
-
* keys for the project.
|
|
132
|
-
*
|
|
133
|
-
* This operation can be accessed anonymously.
|
|
134
|
-
*
|
|
135
|
-
* **[Permissions](#permissions) required:** *Browse Projects* [project
|
|
136
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for the project.
|
|
137
|
-
*
|
|
138
|
-
* @returns Returned if the request is successful.
|
|
139
|
-
*
|
|
140
|
-
* example: {
|
|
141
|
-
* "keys": [
|
|
142
|
-
* {
|
|
143
|
-
* "key": "issue.support",
|
|
144
|
-
* "self":
|
|
145
|
-
* "https://your-domain.atlassian.net/rest/api/3/issue/EX-2/properties/issue.support"
|
|
146
|
-
* }
|
|
147
|
-
* ]
|
|
148
|
-
* }
|
|
149
|
-
* @path {GET} /rest/api/3/project/{projectIdOrKey}/properties
|
|
150
|
-
* @scopes-current read:jira-work
|
|
151
|
-
* @scopes-beta read:project.property:jira
|
|
152
|
-
*/
|
|
153
|
-
getProjectPropertyKeys({
|
|
154
|
-
projectIdOrKey,
|
|
155
|
-
}: {
|
|
156
|
-
/** The project ID or project key (case sensitive). */
|
|
157
|
-
projectIdOrKey: string;
|
|
158
|
-
}): Promise<PropertyKeys> {
|
|
159
|
-
return this.getClientInstance()
|
|
160
|
-
.request({
|
|
161
|
-
path: "/rest/api/3/project/{projectIdOrKey}/properties",
|
|
162
|
-
method: "GET",
|
|
163
|
-
pathParams: {
|
|
164
|
-
projectIdOrKey,
|
|
165
|
-
},
|
|
166
|
-
})
|
|
167
|
-
.then(
|
|
168
|
-
this.getClientInstance().responseHandler({
|
|
169
|
-
200: {
|
|
170
|
-
"application/json": "json",
|
|
171
|
-
},
|
|
172
|
-
}),
|
|
173
|
-
)
|
|
174
|
-
.then(
|
|
175
|
-
commonHttpClient.castResponse<{
|
|
176
|
-
status: 200;
|
|
177
|
-
mediaType: "application/json";
|
|
178
|
-
body: PropertyKeys;
|
|
179
|
-
}>(),
|
|
180
|
-
)
|
|
181
|
-
.then(
|
|
182
|
-
validationSchemaStorage.validator(
|
|
183
|
-
"ProjectPropertiesService.getProjectPropertyKeys.response",
|
|
184
|
-
),
|
|
185
|
-
)
|
|
186
|
-
.then(commonHttpClient.getBody);
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Sets the value of the [project
|
|
190
|
-
* property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties).
|
|
191
|
-
* You can use project properties to store custom data against the project.
|
|
192
|
-
*
|
|
193
|
-
* The value of the request body must be a
|
|
194
|
-
* [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum
|
|
195
|
-
* length is 32768 characters.
|
|
196
|
-
*
|
|
197
|
-
* This operation can be accessed anonymously.
|
|
198
|
-
*
|
|
199
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
200
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects*
|
|
201
|
-
* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project
|
|
202
|
-
* in which the property is created.
|
|
203
|
-
*
|
|
204
|
-
* @returns * status: 200, mediaType: application/json
|
|
205
|
-
*
|
|
206
|
-
* Returned if the project property is updated.
|
|
207
|
-
*
|
|
208
|
-
* * status: 201, mediaType: application/json
|
|
209
|
-
*
|
|
210
|
-
* Returned if the project property is created.
|
|
211
|
-
* @path {PUT} /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}
|
|
212
|
-
* @scopes-current manage:jira-project
|
|
213
|
-
* @scopes-beta write:project.property:jira
|
|
214
|
-
*/
|
|
215
|
-
setProjectProperty({
|
|
216
|
-
projectIdOrKey,
|
|
217
|
-
propertyKey,
|
|
218
|
-
requestBody,
|
|
219
|
-
}: {
|
|
220
|
-
/** The project ID or project key (case sensitive). */
|
|
221
|
-
projectIdOrKey: string;
|
|
222
|
-
/** The key of the project property. The maximum length is 255 characters. */
|
|
223
|
-
propertyKey: string;
|
|
224
|
-
/**
|
|
225
|
-
* The value of the property. The value has to be a valid, non-empty
|
|
226
|
-
* [JSON](https://tools.ietf.org/html/rfc4627) value. The maximum length of the
|
|
227
|
-
* property value is 32768 bytes.
|
|
228
|
-
*
|
|
229
|
-
* @example {
|
|
230
|
-
* "number": 5,
|
|
231
|
-
* "string": "string-value"
|
|
232
|
-
* }
|
|
233
|
-
*/
|
|
234
|
-
requestBody: unknown;
|
|
235
|
-
}): Promise<{
|
|
236
|
-
created: boolean;
|
|
237
|
-
body: unknown;
|
|
238
|
-
}> {
|
|
239
|
-
return this.getClientInstance()
|
|
240
|
-
.request({
|
|
241
|
-
path: "/rest/api/3/project/{projectIdOrKey}/properties/{propertyKey}",
|
|
242
|
-
method: "PUT",
|
|
243
|
-
pathParams: {
|
|
244
|
-
projectIdOrKey,
|
|
245
|
-
propertyKey,
|
|
246
|
-
},
|
|
247
|
-
headers: {
|
|
248
|
-
"Content-Type": "application/json",
|
|
249
|
-
},
|
|
250
|
-
body: requestBody,
|
|
251
|
-
})
|
|
252
|
-
.then(
|
|
253
|
-
this.getClientInstance().responseHandler({
|
|
254
|
-
200: {
|
|
255
|
-
"application/json": "json",
|
|
256
|
-
},
|
|
257
|
-
201: {
|
|
258
|
-
"application/json": "json",
|
|
259
|
-
},
|
|
260
|
-
}),
|
|
261
|
-
)
|
|
262
|
-
.then(
|
|
263
|
-
commonHttpClient.castResponse<{
|
|
264
|
-
status: 200 | 201;
|
|
265
|
-
mediaType: "application/json";
|
|
266
|
-
body: unknown;
|
|
267
|
-
}>(),
|
|
268
|
-
)
|
|
269
|
-
.then(
|
|
270
|
-
validationSchemaStorage.validator(
|
|
271
|
-
"ProjectPropertiesService.setProjectProperty.response",
|
|
272
|
-
),
|
|
273
|
-
)
|
|
274
|
-
.then(commonHttpClient.asCreatedResponse("body"));
|
|
275
|
-
}
|
|
276
|
-
static initialize() {
|
|
277
|
-
validationSchemaStorage.registerExtensible(
|
|
278
|
-
"ProjectPropertiesService.getProjectPropertyKeys.response",
|
|
279
|
-
z
|
|
280
|
-
.object({
|
|
281
|
-
status: z.literal(200),
|
|
282
|
-
mediaType: z.literal("application/json"),
|
|
283
|
-
body: validationSchemaStorage.lazy("PropertyKeys"),
|
|
284
|
-
})
|
|
285
|
-
.describe("ProjectPropertiesService.getProjectPropertyKeys.response"),
|
|
286
|
-
);
|
|
287
|
-
validationSchemaStorage.registerExtensible(
|
|
288
|
-
"ProjectPropertiesService.getProjectProperty.response",
|
|
289
|
-
z
|
|
290
|
-
.object({
|
|
291
|
-
status: z.literal(200),
|
|
292
|
-
mediaType: z.literal("application/json"),
|
|
293
|
-
body: validationSchemaStorage.lazy("EntityProperty"),
|
|
294
|
-
})
|
|
295
|
-
.describe("ProjectPropertiesService.getProjectProperty.response"),
|
|
296
|
-
);
|
|
297
|
-
validationSchemaStorage.registerExtensible(
|
|
298
|
-
"ProjectPropertiesService.setProjectProperty.response",
|
|
299
|
-
z
|
|
300
|
-
.object({
|
|
301
|
-
status: z.number(),
|
|
302
|
-
mediaType: z.string(),
|
|
303
|
-
body: z.unknown(),
|
|
304
|
-
})
|
|
305
|
-
.superRefine(({ status: status, body: body }, ctx) => {
|
|
306
|
-
if (status === 200 || status === 201) {
|
|
307
|
-
z.unknown().parse(body);
|
|
308
|
-
} else {
|
|
309
|
-
ctx.addIssue({
|
|
310
|
-
code: z.ZodIssueCode.custom,
|
|
311
|
-
path: ["status"],
|
|
312
|
-
message: `Unexpected status code: ${status}`,
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
})
|
|
316
|
-
.describe("ProjectPropertiesService.setProjectProperty.response"),
|
|
317
|
-
);
|
|
318
|
-
validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
|
|
319
|
-
}
|
|
320
|
-
}
|