@makeplane/plane-node-sdk 0.1.0
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/.github/workflows/publish-node-sdk.yml +24 -0
- package/.openapi-generator/FILES +119 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +95 -0
- package/dist/apis/AssetsApi.d.ts +100 -0
- package/dist/apis/AssetsApi.js +522 -0
- package/dist/apis/CyclesApi.d.ts +225 -0
- package/dist/apis/CyclesApi.js +1142 -0
- package/dist/apis/IntakeApi.d.ts +96 -0
- package/dist/apis/IntakeApi.js +485 -0
- package/dist/apis/LabelsApi.d.ts +97 -0
- package/dist/apis/LabelsApi.js +488 -0
- package/dist/apis/MembersApi.d.ts +44 -0
- package/dist/apis/MembersApi.js +228 -0
- package/dist/apis/ModulesApi.d.ts +198 -0
- package/dist/apis/ModulesApi.js +991 -0
- package/dist/apis/ProjectsApi.d.ts +120 -0
- package/dist/apis/ProjectsApi.js +621 -0
- package/dist/apis/StatesApi.d.ts +96 -0
- package/dist/apis/StatesApi.js +485 -0
- package/dist/apis/UsersApi.d.ts +27 -0
- package/dist/apis/UsersApi.js +149 -0
- package/dist/apis/WorkItemActivityApi.d.ts +58 -0
- package/dist/apis/WorkItemActivityApi.js +270 -0
- package/dist/apis/WorkItemAttachmentsApi.d.ts +80 -0
- package/dist/apis/WorkItemAttachmentsApi.js +400 -0
- package/dist/apis/WorkItemCommentsApi.d.ts +102 -0
- package/dist/apis/WorkItemCommentsApi.js +500 -0
- package/dist/apis/WorkItemLinksApi.d.ts +106 -0
- package/dist/apis/WorkItemLinksApi.js +515 -0
- package/dist/apis/WorkItemPropertiesApi.d.ts +210 -0
- package/dist/apis/WorkItemPropertiesApi.js +1066 -0
- package/dist/apis/WorkItemTypesApi.d.ts +92 -0
- package/dist/apis/WorkItemTypesApi.js +473 -0
- package/dist/apis/WorkItemWorklogsApi.d.ts +95 -0
- package/dist/apis/WorkItemWorklogsApi.js +479 -0
- package/dist/apis/WorkItemsApi.d.ts +134 -0
- package/dist/apis/WorkItemsApi.js +674 -0
- package/dist/apis/index.d.ts +17 -0
- package/dist/apis/index.js +34 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +20 -0
- package/dist/models/AccessEnum.d.ts +25 -0
- package/dist/models/AccessEnum.js +51 -0
- package/dist/models/Cycle.d.ts +215 -0
- package/dist/models/Cycle.js +93 -0
- package/dist/models/CycleCreateRequest.d.ts +77 -0
- package/dist/models/CycleCreateRequest.js +67 -0
- package/dist/models/CycleIssue.d.ts +94 -0
- package/dist/models/CycleIssue.js +65 -0
- package/dist/models/CycleIssueRequestRequest.d.ts +34 -0
- package/dist/models/CycleIssueRequestRequest.js +50 -0
- package/dist/models/CycleLite.d.ts +161 -0
- package/dist/models/CycleLite.js +96 -0
- package/dist/models/EntityTypeEnum.d.ts +25 -0
- package/dist/models/EntityTypeEnum.js +51 -0
- package/dist/models/GenericAssetUploadRequest.d.ts +65 -0
- package/dist/models/GenericAssetUploadRequest.js +62 -0
- package/dist/models/GetWorkspaceMembers200ResponseInner.d.ts +73 -0
- package/dist/models/GetWorkspaceMembers200ResponseInner.js +55 -0
- package/dist/models/GroupEnum.d.ts +33 -0
- package/dist/models/GroupEnum.js +59 -0
- package/dist/models/IntakeIssue.d.ts +150 -0
- package/dist/models/IntakeIssue.js +80 -0
- package/dist/models/IntakeIssueCreateRequest.d.ts +72 -0
- package/dist/models/IntakeIssueCreateRequest.js +66 -0
- package/dist/models/IntakeWorkItemStatusEnum.d.ts +31 -0
- package/dist/models/IntakeWorkItemStatusEnum.js +57 -0
- package/dist/models/Issue.d.ts +197 -0
- package/dist/models/Issue.js +98 -0
- package/dist/models/IssueActivity.d.ts +136 -0
- package/dist/models/IssueActivity.js +83 -0
- package/dist/models/IssueAttachment.d.ts +172 -0
- package/dist/models/IssueAttachment.js +89 -0
- package/dist/models/IssueAttachmentUploadRequest.d.ts +58 -0
- package/dist/models/IssueAttachmentUploadRequest.js +60 -0
- package/dist/models/IssueComment.d.ts +137 -0
- package/dist/models/IssueComment.js +74 -0
- package/dist/models/IssueCommentCreateRequest.d.ts +59 -0
- package/dist/models/IssueCommentCreateRequest.js +57 -0
- package/dist/models/IssueExpand.d.ts +226 -0
- package/dist/models/IssueExpand.js +105 -0
- package/dist/models/IssueForIntakeRequest.d.ts +53 -0
- package/dist/models/IssueForIntakeRequest.js +57 -0
- package/dist/models/IssueLink.d.ts +100 -0
- package/dist/models/IssueLink.js +64 -0
- package/dist/models/IssueLinkCreateRequest.d.ts +34 -0
- package/dist/models/IssueLinkCreateRequest.js +50 -0
- package/dist/models/IssuePropertyAPI.d.ts +171 -0
- package/dist/models/IssuePropertyAPI.js +88 -0
- package/dist/models/IssuePropertyAPIRequest.d.ts +99 -0
- package/dist/models/IssuePropertyAPIRequest.js +76 -0
- package/dist/models/IssuePropertyOptionAPI.d.ts +133 -0
- package/dist/models/IssuePropertyOptionAPI.js +73 -0
- package/dist/models/IssuePropertyOptionAPIRequest.d.ts +67 -0
- package/dist/models/IssuePropertyOptionAPIRequest.js +62 -0
- package/dist/models/IssuePropertyValueAPI.d.ts +133 -0
- package/dist/models/IssuePropertyValueAPI.js +78 -0
- package/dist/models/IssuePropertyValueAPIRequest.d.ts +85 -0
- package/dist/models/IssuePropertyValueAPIRequest.js +70 -0
- package/dist/models/IssueRequest.d.ts +167 -0
- package/dist/models/IssueRequest.js +95 -0
- package/dist/models/IssueSearch.d.ts +64 -0
- package/dist/models/IssueSearch.js +70 -0
- package/dist/models/IssueTypeAPI.d.ts +127 -0
- package/dist/models/IssueTypeAPI.js +72 -0
- package/dist/models/IssueTypeAPIRequest.d.ts +67 -0
- package/dist/models/IssueTypeAPIRequest.js +62 -0
- package/dist/models/IssueWorkLogAPI.d.ts +85 -0
- package/dist/models/IssueWorkLogAPI.js +60 -0
- package/dist/models/IssueWorkLogAPIRequest.d.ts +49 -0
- package/dist/models/IssueWorkLogAPIRequest.js +54 -0
- package/dist/models/Label.d.ts +118 -0
- package/dist/models/Label.js +70 -0
- package/dist/models/LabelCreateUpdateRequest.d.ts +70 -0
- package/dist/models/LabelCreateUpdateRequest.js +62 -0
- package/dist/models/LabelLite.d.ts +46 -0
- package/dist/models/LabelLite.js +53 -0
- package/dist/models/Module.d.ts +197 -0
- package/dist/models/Module.js +91 -0
- package/dist/models/ModuleCreateRequest.d.ts +83 -0
- package/dist/models/ModuleCreateRequest.js +67 -0
- package/dist/models/ModuleIssue.d.ts +94 -0
- package/dist/models/ModuleIssue.js +63 -0
- package/dist/models/ModuleIssueRequestRequest.d.ts +34 -0
- package/dist/models/ModuleIssueRequestRequest.js +50 -0
- package/dist/models/ModuleLite.d.ts +167 -0
- package/dist/models/ModuleLite.js +97 -0
- package/dist/models/ModuleStatusEnum.d.ts +33 -0
- package/dist/models/ModuleStatusEnum.js +59 -0
- package/dist/models/NetworkEnum.d.ts +25 -0
- package/dist/models/NetworkEnum.js +51 -0
- package/dist/models/PaginatedArchivedCycleResponse.d.ts +98 -0
- package/dist/models/PaginatedArchivedCycleResponse.js +95 -0
- package/dist/models/PaginatedArchivedModuleResponse.d.ts +98 -0
- package/dist/models/PaginatedArchivedModuleResponse.js +95 -0
- package/dist/models/PaginatedCycleIssueResponse.d.ts +98 -0
- package/dist/models/PaginatedCycleIssueResponse.js +95 -0
- package/dist/models/PaginatedCycleResponse.d.ts +98 -0
- package/dist/models/PaginatedCycleResponse.js +95 -0
- package/dist/models/PaginatedIntakeIssueResponse.d.ts +98 -0
- package/dist/models/PaginatedIntakeIssueResponse.js +95 -0
- package/dist/models/PaginatedIssueActivityDetailResponse.d.ts +98 -0
- package/dist/models/PaginatedIssueActivityDetailResponse.js +95 -0
- package/dist/models/PaginatedIssueActivityResponse.d.ts +98 -0
- package/dist/models/PaginatedIssueActivityResponse.js +95 -0
- package/dist/models/PaginatedIssueCommentResponse.d.ts +98 -0
- package/dist/models/PaginatedIssueCommentResponse.js +95 -0
- package/dist/models/PaginatedIssueLinkDetailResponse.d.ts +98 -0
- package/dist/models/PaginatedIssueLinkDetailResponse.js +95 -0
- package/dist/models/PaginatedIssueLinkResponse.d.ts +98 -0
- package/dist/models/PaginatedIssueLinkResponse.js +95 -0
- package/dist/models/PaginatedLabelResponse.d.ts +98 -0
- package/dist/models/PaginatedLabelResponse.js +95 -0
- package/dist/models/PaginatedModuleIssueResponse.d.ts +98 -0
- package/dist/models/PaginatedModuleIssueResponse.js +95 -0
- package/dist/models/PaginatedModuleResponse.d.ts +98 -0
- package/dist/models/PaginatedModuleResponse.js +95 -0
- package/dist/models/PaginatedProjectResponse.d.ts +98 -0
- package/dist/models/PaginatedProjectResponse.js +95 -0
- package/dist/models/PaginatedStateResponse.d.ts +98 -0
- package/dist/models/PaginatedStateResponse.js +95 -0
- package/dist/models/PaginatedWorkItemResponse.d.ts +98 -0
- package/dist/models/PaginatedWorkItemResponse.js +95 -0
- package/dist/models/PatchedAssetUpdateRequest.d.ts +34 -0
- package/dist/models/PatchedAssetUpdateRequest.js +48 -0
- package/dist/models/PatchedCycleUpdateRequest.d.ts +77 -0
- package/dist/models/PatchedCycleUpdateRequest.js +63 -0
- package/dist/models/PatchedGenericAssetUpdateRequest.d.ts +34 -0
- package/dist/models/PatchedGenericAssetUpdateRequest.js +48 -0
- package/dist/models/PatchedIntakeIssueUpdateRequest.d.ts +66 -0
- package/dist/models/PatchedIntakeIssueUpdateRequest.js +60 -0
- package/dist/models/PatchedIssueCommentCreateRequest.d.ts +59 -0
- package/dist/models/PatchedIssueCommentCreateRequest.js +57 -0
- package/dist/models/PatchedIssueLinkUpdateRequest.d.ts +34 -0
- package/dist/models/PatchedIssueLinkUpdateRequest.js +48 -0
- package/dist/models/PatchedIssuePropertyAPIRequest.d.ts +99 -0
- package/dist/models/PatchedIssuePropertyAPIRequest.js +72 -0
- package/dist/models/PatchedIssuePropertyOptionAPIRequest.d.ts +67 -0
- package/dist/models/PatchedIssuePropertyOptionAPIRequest.js +60 -0
- package/dist/models/PatchedIssueRequest.d.ts +167 -0
- package/dist/models/PatchedIssueRequest.js +93 -0
- package/dist/models/PatchedIssueTypeAPIRequest.d.ts +67 -0
- package/dist/models/PatchedIssueTypeAPIRequest.js +60 -0
- package/dist/models/PatchedIssueWorkLogAPIRequest.d.ts +49 -0
- package/dist/models/PatchedIssueWorkLogAPIRequest.js +54 -0
- package/dist/models/PatchedLabelCreateUpdateRequest.d.ts +70 -0
- package/dist/models/PatchedLabelCreateUpdateRequest.js +60 -0
- package/dist/models/PatchedModuleUpdateRequest.d.ts +83 -0
- package/dist/models/PatchedModuleUpdateRequest.js +65 -0
- package/dist/models/PatchedProjectUpdateRequest.d.ts +143 -0
- package/dist/models/PatchedProjectUpdateRequest.js +85 -0
- package/dist/models/PatchedStateRequest.d.ts +83 -0
- package/dist/models/PatchedStateRequest.js +65 -0
- package/dist/models/PriorityEnum.d.ts +31 -0
- package/dist/models/PriorityEnum.js +57 -0
- package/dist/models/Project.d.ts +294 -0
- package/dist/models/Project.js +124 -0
- package/dist/models/ProjectCreateRequest.d.ts +131 -0
- package/dist/models/ProjectCreateRequest.js +85 -0
- package/dist/models/ProjectWorklogSummary.d.ts +37 -0
- package/dist/models/ProjectWorklogSummary.js +54 -0
- package/dist/models/PropertyTypeEnum.d.ts +39 -0
- package/dist/models/PropertyTypeEnum.js +65 -0
- package/dist/models/RelationTypeEnum.d.ts +25 -0
- package/dist/models/RelationTypeEnum.js +51 -0
- package/dist/models/RetrieveWorkItemAttachment400Response.d.ts +37 -0
- package/dist/models/RetrieveWorkItemAttachment400Response.js +50 -0
- package/dist/models/State.d.ts +137 -0
- package/dist/models/State.js +78 -0
- package/dist/models/StateLite.d.ts +53 -0
- package/dist/models/StateLite.js +50 -0
- package/dist/models/StateRequest.d.ts +83 -0
- package/dist/models/StateRequest.js +69 -0
- package/dist/models/TimezoneEnum.d.ts +887 -0
- package/dist/models/TimezoneEnum.js +913 -0
- package/dist/models/TransferCycleIssueRequestRequest.d.ts +34 -0
- package/dist/models/TransferCycleIssueRequestRequest.js +50 -0
- package/dist/models/TransferCycleWorkItems200Response.d.ts +31 -0
- package/dist/models/TransferCycleWorkItems200Response.js +48 -0
- package/dist/models/TransferCycleWorkItems400Response.d.ts +31 -0
- package/dist/models/TransferCycleWorkItems400Response.js +48 -0
- package/dist/models/TypeEnum.d.ts +31 -0
- package/dist/models/TypeEnum.js +57 -0
- package/dist/models/UserAssetUploadRequest.d.ts +64 -0
- package/dist/models/UserAssetUploadRequest.js +62 -0
- package/dist/models/UserLite.d.ts +70 -0
- package/dist/models/UserLite.js +52 -0
- package/dist/models/index.d.ts +93 -0
- package/dist/models/index.js +110 -0
- package/dist/runtime.d.ts +183 -0
- package/dist/runtime.js +563 -0
- package/eslint.config.mjs +11 -0
- package/package.json +23 -0
- package/src/apis/AssetsApi.ts +388 -0
- package/src/apis/CyclesApi.ts +1031 -0
- package/src/apis/IntakeApi.ts +401 -0
- package/src/apis/LabelsApi.ts +406 -0
- package/src/apis/MembersApi.ts +146 -0
- package/src/apis/ModulesApi.ts +890 -0
- package/src/apis/ProjectsApi.ts +486 -0
- package/src/apis/StatesApi.ts +401 -0
- package/src/apis/UsersApi.ts +71 -0
- package/src/apis/WorkItemActivityApi.ts +228 -0
- package/src/apis/WorkItemAttachmentsApi.ts +335 -0
- package/src/apis/WorkItemCommentsApi.ts +439 -0
- package/src/apis/WorkItemLinksApi.ts +469 -0
- package/src/apis/WorkItemPropertiesApi.ts +981 -0
- package/src/apis/WorkItemTypesApi.ts +378 -0
- package/src/apis/WorkItemWorklogsApi.ts +398 -0
- package/src/apis/WorkItemsApi.ts +591 -0
- package/src/apis/index.ts +19 -0
- package/src/index.ts +5 -0
- package/src/models/AccessEnum.ts +53 -0
- package/src/models/Cycle.ts +300 -0
- package/src/models/CycleCreateRequest.ts +135 -0
- package/src/models/CycleIssue.ts +142 -0
- package/src/models/CycleIssueRequestRequest.ts +68 -0
- package/src/models/CycleLite.ts +246 -0
- package/src/models/EntityTypeEnum.ts +53 -0
- package/src/models/GenericAssetUploadRequest.ts +110 -0
- package/src/models/GetWorkspaceMembers200ResponseInner.ts +113 -0
- package/src/models/GroupEnum.ts +61 -0
- package/src/models/IntakeIssue.ts +227 -0
- package/src/models/IntakeIssueCreateRequest.ts +134 -0
- package/src/models/IntakeWorkItemStatusEnum.ts +59 -0
- package/src/models/Issue.ts +287 -0
- package/src/models/IssueActivity.ts +202 -0
- package/src/models/IssueAttachment.ts +245 -0
- package/src/models/IssueAttachmentUploadRequest.ts +101 -0
- package/src/models/IssueComment.ts +204 -0
- package/src/models/IssueCommentCreateRequest.ts +109 -0
- package/src/models/IssueExpand.ts +348 -0
- package/src/models/IssueForIntakeRequest.ts +102 -0
- package/src/models/IssueLink.ts +148 -0
- package/src/models/IssueLinkCreateRequest.ts +68 -0
- package/src/models/IssuePropertyAPI.ts +255 -0
- package/src/models/IssuePropertyAPIRequest.ts +171 -0
- package/src/models/IssuePropertyOptionAPI.ts +190 -0
- package/src/models/IssuePropertyOptionAPIRequest.ts +113 -0
- package/src/models/IssuePropertyValueAPI.ts +194 -0
- package/src/models/IssuePropertyValueAPIRequest.ts +138 -0
- package/src/models/IssueRequest.ts +254 -0
- package/src/models/IssueSearch.ts +113 -0
- package/src/models/IssueTypeAPI.ts +183 -0
- package/src/models/IssueTypeAPIRequest.ts +113 -0
- package/src/models/IssueWorkLogAPI.ts +130 -0
- package/src/models/IssueWorkLogAPIRequest.ts +88 -0
- package/src/models/Label.ts +172 -0
- package/src/models/LabelCreateUpdateRequest.ts +116 -0
- package/src/models/LabelLite.ts +83 -0
- package/src/models/Module.ts +280 -0
- package/src/models/ModuleCreateRequest.ts +142 -0
- package/src/models/ModuleIssue.ts +140 -0
- package/src/models/ModuleIssueRequestRequest.ts +68 -0
- package/src/models/ModuleLite.ts +253 -0
- package/src/models/ModuleStatusEnum.ts +61 -0
- package/src/models/NetworkEnum.ts +53 -0
- package/src/models/PaginatedArchivedCycleResponse.ts +172 -0
- package/src/models/PaginatedArchivedModuleResponse.ts +172 -0
- package/src/models/PaginatedCycleIssueResponse.ts +172 -0
- package/src/models/PaginatedCycleResponse.ts +172 -0
- package/src/models/PaginatedIntakeIssueResponse.ts +172 -0
- package/src/models/PaginatedIssueActivityDetailResponse.ts +172 -0
- package/src/models/PaginatedIssueActivityResponse.ts +172 -0
- package/src/models/PaginatedIssueCommentResponse.ts +172 -0
- package/src/models/PaginatedIssueLinkDetailResponse.ts +172 -0
- package/src/models/PaginatedIssueLinkResponse.ts +172 -0
- package/src/models/PaginatedLabelResponse.ts +172 -0
- package/src/models/PaginatedModuleIssueResponse.ts +172 -0
- package/src/models/PaginatedModuleResponse.ts +172 -0
- package/src/models/PaginatedProjectResponse.ts +172 -0
- package/src/models/PaginatedStateResponse.ts +172 -0
- package/src/models/PaginatedWorkItemResponse.ts +172 -0
- package/src/models/PatchedAssetUpdateRequest.ts +67 -0
- package/src/models/PatchedCycleUpdateRequest.ts +133 -0
- package/src/models/PatchedGenericAssetUpdateRequest.ts +67 -0
- package/src/models/PatchedIntakeIssueUpdateRequest.ts +124 -0
- package/src/models/PatchedIssueCommentCreateRequest.ts +109 -0
- package/src/models/PatchedIssueLinkUpdateRequest.ts +67 -0
- package/src/models/PatchedIssuePropertyAPIRequest.ts +169 -0
- package/src/models/PatchedIssuePropertyOptionAPIRequest.ts +112 -0
- package/src/models/PatchedIssueRequest.ts +253 -0
- package/src/models/PatchedIssueTypeAPIRequest.ts +112 -0
- package/src/models/PatchedIssueWorkLogAPIRequest.ts +88 -0
- package/src/models/PatchedLabelCreateUpdateRequest.ts +115 -0
- package/src/models/PatchedModuleUpdateRequest.ts +141 -0
- package/src/models/PatchedProjectUpdateRequest.ts +221 -0
- package/src/models/PatchedStateRequest.ts +141 -0
- package/src/models/PriorityEnum.ts +59 -0
- package/src/models/Project.ts +414 -0
- package/src/models/ProjectCreateRequest.ts +207 -0
- package/src/models/ProjectWorklogSummary.ts +74 -0
- package/src/models/PropertyTypeEnum.ts +67 -0
- package/src/models/RelationTypeEnum.ts +53 -0
- package/src/models/RetrieveWorkItemAttachment400Response.ts +72 -0
- package/src/models/State.ts +206 -0
- package/src/models/StateLite.ts +97 -0
- package/src/models/StateRequest.ts +143 -0
- package/src/models/TimezoneEnum.ts +915 -0
- package/src/models/TransferCycleIssueRequestRequest.ts +68 -0
- package/src/models/TransferCycleWorkItems200Response.ts +64 -0
- package/src/models/TransferCycleWorkItems400Response.ts +64 -0
- package/src/models/TypeEnum.ts +59 -0
- package/src/models/UserAssetUploadRequest.ts +121 -0
- package/src/models/UserLite.ts +108 -0
- package/src/models/index.ts +95 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* The Plane REST API
|
|
6
|
+
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
|
|
7
|
+
*
|
|
8
|
+
* The version of the API Spec: 0.0.1
|
|
9
|
+
* Contact: support@plane.so
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated.
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __extends = (this && this.__extends) || (function () {
|
|
15
|
+
var extendStatics = function (d, b) {
|
|
16
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
19
|
+
return extendStatics(d, b);
|
|
20
|
+
};
|
|
21
|
+
return function (d, b) {
|
|
22
|
+
if (typeof b !== "function" && b !== null)
|
|
23
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
24
|
+
extendStatics(d, b);
|
|
25
|
+
function __() { this.constructor = d; }
|
|
26
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
30
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
31
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
32
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
33
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
34
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
35
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
39
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
40
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
41
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
42
|
+
function step(op) {
|
|
43
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
44
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
45
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
46
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
47
|
+
switch (op[0]) {
|
|
48
|
+
case 0: case 1: t = op; break;
|
|
49
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
50
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
51
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
52
|
+
default:
|
|
53
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
54
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
55
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
56
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
57
|
+
if (t[2]) _.ops.pop();
|
|
58
|
+
_.trys.pop(); continue;
|
|
59
|
+
}
|
|
60
|
+
op = body.call(thisArg, _);
|
|
61
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
62
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
+
exports.ProjectsApi = void 0;
|
|
67
|
+
var runtime = require("../runtime");
|
|
68
|
+
var index_1 = require("../models/index");
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
var ProjectsApi = /** @class */ (function (_super) {
|
|
73
|
+
__extends(ProjectsApi, _super);
|
|
74
|
+
function ProjectsApi() {
|
|
75
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Move a project to archived status, hiding it from active project lists.
|
|
79
|
+
* Archive project
|
|
80
|
+
*/
|
|
81
|
+
ProjectsApi.prototype.archiveProjectRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
84
|
+
return __generator(this, function (_g) {
|
|
85
|
+
switch (_g.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['projectId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling archiveProject().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['slug'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling archiveProject().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
96
|
+
_a = headerParameters;
|
|
97
|
+
_b = "X-API-Key";
|
|
98
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
99
|
+
case 1:
|
|
100
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
101
|
+
_g.label = 2;
|
|
102
|
+
case 2:
|
|
103
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
104
|
+
// oauth required
|
|
105
|
+
_c = headerParameters;
|
|
106
|
+
_d = "Authorization";
|
|
107
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
108
|
+
case 3:
|
|
109
|
+
// oauth required
|
|
110
|
+
_c[_d] = _g.sent();
|
|
111
|
+
_g.label = 4;
|
|
112
|
+
case 4:
|
|
113
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
114
|
+
// oauth required
|
|
115
|
+
_e = headerParameters;
|
|
116
|
+
_f = "Authorization";
|
|
117
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
118
|
+
case 5:
|
|
119
|
+
// oauth required
|
|
120
|
+
_e[_f] = _g.sent();
|
|
121
|
+
_g.label = 6;
|
|
122
|
+
case 6: return [4 /*yield*/, this.request({
|
|
123
|
+
path: "/api/v1/workspaces/{slug}/projects/{project_id}/archive/".replace("{".concat("project_id", "}"), encodeURIComponent(String(requestParameters['projectId']))).replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
124
|
+
method: 'POST',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
}, initOverrides)];
|
|
128
|
+
case 7:
|
|
129
|
+
response = _g.sent();
|
|
130
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Move a project to archived status, hiding it from active project lists.
|
|
137
|
+
* Archive project
|
|
138
|
+
*/
|
|
139
|
+
ProjectsApi.prototype.archiveProject = function (requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
141
|
+
return __generator(this, function (_a) {
|
|
142
|
+
switch (_a.label) {
|
|
143
|
+
case 0: return [4 /*yield*/, this.archiveProjectRaw(requestParameters, initOverrides)];
|
|
144
|
+
case 1:
|
|
145
|
+
_a.sent();
|
|
146
|
+
return [2 /*return*/];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Create a new project in the workspace with default states and member assignments.
|
|
153
|
+
* Create project
|
|
154
|
+
*/
|
|
155
|
+
ProjectsApi.prototype.createProjectRaw = function (requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
157
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
158
|
+
return __generator(this, function (_g) {
|
|
159
|
+
switch (_g.label) {
|
|
160
|
+
case 0:
|
|
161
|
+
if (requestParameters['slug'] == null) {
|
|
162
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling createProject().');
|
|
163
|
+
}
|
|
164
|
+
if (requestParameters['projectCreateRequest'] == null) {
|
|
165
|
+
throw new runtime.RequiredError('projectCreateRequest', 'Required parameter "projectCreateRequest" was null or undefined when calling createProject().');
|
|
166
|
+
}
|
|
167
|
+
queryParameters = {};
|
|
168
|
+
headerParameters = {};
|
|
169
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
170
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
171
|
+
_a = headerParameters;
|
|
172
|
+
_b = "X-API-Key";
|
|
173
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
174
|
+
case 1:
|
|
175
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
176
|
+
_g.label = 2;
|
|
177
|
+
case 2:
|
|
178
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
179
|
+
// oauth required
|
|
180
|
+
_c = headerParameters;
|
|
181
|
+
_d = "Authorization";
|
|
182
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
183
|
+
case 3:
|
|
184
|
+
// oauth required
|
|
185
|
+
_c[_d] = _g.sent();
|
|
186
|
+
_g.label = 4;
|
|
187
|
+
case 4:
|
|
188
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
189
|
+
// oauth required
|
|
190
|
+
_e = headerParameters;
|
|
191
|
+
_f = "Authorization";
|
|
192
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
193
|
+
case 5:
|
|
194
|
+
// oauth required
|
|
195
|
+
_e[_f] = _g.sent();
|
|
196
|
+
_g.label = 6;
|
|
197
|
+
case 6: return [4 /*yield*/, this.request({
|
|
198
|
+
path: "/api/v1/workspaces/{slug}/projects/".replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
199
|
+
method: 'POST',
|
|
200
|
+
headers: headerParameters,
|
|
201
|
+
query: queryParameters,
|
|
202
|
+
body: (0, index_1.ProjectCreateRequestToJSON)(requestParameters['projectCreateRequest']),
|
|
203
|
+
}, initOverrides)];
|
|
204
|
+
case 7:
|
|
205
|
+
response = _g.sent();
|
|
206
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProjectFromJSON)(jsonValue); })];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Create a new project in the workspace with default states and member assignments.
|
|
213
|
+
* Create project
|
|
214
|
+
*/
|
|
215
|
+
ProjectsApi.prototype.createProject = function (requestParameters, initOverrides) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
217
|
+
var response;
|
|
218
|
+
return __generator(this, function (_a) {
|
|
219
|
+
switch (_a.label) {
|
|
220
|
+
case 0: return [4 /*yield*/, this.createProjectRaw(requestParameters, initOverrides)];
|
|
221
|
+
case 1:
|
|
222
|
+
response = _a.sent();
|
|
223
|
+
return [4 /*yield*/, response.value()];
|
|
224
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Permanently remove a project and all its associated data from the workspace.
|
|
231
|
+
* Delete project
|
|
232
|
+
*/
|
|
233
|
+
ProjectsApi.prototype.deleteProjectRaw = function (requestParameters, initOverrides) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
236
|
+
return __generator(this, function (_g) {
|
|
237
|
+
switch (_g.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
if (requestParameters['pk'] == null) {
|
|
240
|
+
throw new runtime.RequiredError('pk', 'Required parameter "pk" was null or undefined when calling deleteProject().');
|
|
241
|
+
}
|
|
242
|
+
if (requestParameters['slug'] == null) {
|
|
243
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling deleteProject().');
|
|
244
|
+
}
|
|
245
|
+
queryParameters = {};
|
|
246
|
+
headerParameters = {};
|
|
247
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
248
|
+
_a = headerParameters;
|
|
249
|
+
_b = "X-API-Key";
|
|
250
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
251
|
+
case 1:
|
|
252
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
253
|
+
_g.label = 2;
|
|
254
|
+
case 2:
|
|
255
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
256
|
+
// oauth required
|
|
257
|
+
_c = headerParameters;
|
|
258
|
+
_d = "Authorization";
|
|
259
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
260
|
+
case 3:
|
|
261
|
+
// oauth required
|
|
262
|
+
_c[_d] = _g.sent();
|
|
263
|
+
_g.label = 4;
|
|
264
|
+
case 4:
|
|
265
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
266
|
+
// oauth required
|
|
267
|
+
_e = headerParameters;
|
|
268
|
+
_f = "Authorization";
|
|
269
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
270
|
+
case 5:
|
|
271
|
+
// oauth required
|
|
272
|
+
_e[_f] = _g.sent();
|
|
273
|
+
_g.label = 6;
|
|
274
|
+
case 6: return [4 /*yield*/, this.request({
|
|
275
|
+
path: "/api/v1/workspaces/{slug}/projects/{pk}/".replace("{".concat("pk", "}"), encodeURIComponent(String(requestParameters['pk']))).replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
276
|
+
method: 'DELETE',
|
|
277
|
+
headers: headerParameters,
|
|
278
|
+
query: queryParameters,
|
|
279
|
+
}, initOverrides)];
|
|
280
|
+
case 7:
|
|
281
|
+
response = _g.sent();
|
|
282
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Permanently remove a project and all its associated data from the workspace.
|
|
289
|
+
* Delete project
|
|
290
|
+
*/
|
|
291
|
+
ProjectsApi.prototype.deleteProject = function (requestParameters, initOverrides) {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
293
|
+
return __generator(this, function (_a) {
|
|
294
|
+
switch (_a.label) {
|
|
295
|
+
case 0: return [4 /*yield*/, this.deleteProjectRaw(requestParameters, initOverrides)];
|
|
296
|
+
case 1:
|
|
297
|
+
_a.sent();
|
|
298
|
+
return [2 /*return*/];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Retrieve all projects in a workspace or get details of a specific project.
|
|
305
|
+
* List or retrieve projects
|
|
306
|
+
*/
|
|
307
|
+
ProjectsApi.prototype.listProjectsRaw = function (requestParameters, initOverrides) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
309
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
310
|
+
return __generator(this, function (_g) {
|
|
311
|
+
switch (_g.label) {
|
|
312
|
+
case 0:
|
|
313
|
+
if (requestParameters['slug'] == null) {
|
|
314
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling listProjects().');
|
|
315
|
+
}
|
|
316
|
+
queryParameters = {};
|
|
317
|
+
if (requestParameters['cursor'] != null) {
|
|
318
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
319
|
+
}
|
|
320
|
+
if (requestParameters['expand'] != null) {
|
|
321
|
+
queryParameters['expand'] = requestParameters['expand'];
|
|
322
|
+
}
|
|
323
|
+
if (requestParameters['fields'] != null) {
|
|
324
|
+
queryParameters['fields'] = requestParameters['fields'];
|
|
325
|
+
}
|
|
326
|
+
if (requestParameters['orderBy'] != null) {
|
|
327
|
+
queryParameters['order_by'] = requestParameters['orderBy'];
|
|
328
|
+
}
|
|
329
|
+
if (requestParameters['perPage'] != null) {
|
|
330
|
+
queryParameters['per_page'] = requestParameters['perPage'];
|
|
331
|
+
}
|
|
332
|
+
headerParameters = {};
|
|
333
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
334
|
+
_a = headerParameters;
|
|
335
|
+
_b = "X-API-Key";
|
|
336
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
337
|
+
case 1:
|
|
338
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
339
|
+
_g.label = 2;
|
|
340
|
+
case 2:
|
|
341
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
342
|
+
// oauth required
|
|
343
|
+
_c = headerParameters;
|
|
344
|
+
_d = "Authorization";
|
|
345
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
346
|
+
case 3:
|
|
347
|
+
// oauth required
|
|
348
|
+
_c[_d] = _g.sent();
|
|
349
|
+
_g.label = 4;
|
|
350
|
+
case 4:
|
|
351
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
352
|
+
// oauth required
|
|
353
|
+
_e = headerParameters;
|
|
354
|
+
_f = "Authorization";
|
|
355
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
356
|
+
case 5:
|
|
357
|
+
// oauth required
|
|
358
|
+
_e[_f] = _g.sent();
|
|
359
|
+
_g.label = 6;
|
|
360
|
+
case 6: return [4 /*yield*/, this.request({
|
|
361
|
+
path: "/api/v1/workspaces/{slug}/projects/".replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
362
|
+
method: 'GET',
|
|
363
|
+
headers: headerParameters,
|
|
364
|
+
query: queryParameters,
|
|
365
|
+
}, initOverrides)];
|
|
366
|
+
case 7:
|
|
367
|
+
response = _g.sent();
|
|
368
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProjectResponseFromJSON)(jsonValue); })];
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Retrieve all projects in a workspace or get details of a specific project.
|
|
375
|
+
* List or retrieve projects
|
|
376
|
+
*/
|
|
377
|
+
ProjectsApi.prototype.listProjects = function (requestParameters, initOverrides) {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
379
|
+
var response;
|
|
380
|
+
return __generator(this, function (_a) {
|
|
381
|
+
switch (_a.label) {
|
|
382
|
+
case 0: return [4 /*yield*/, this.listProjectsRaw(requestParameters, initOverrides)];
|
|
383
|
+
case 1:
|
|
384
|
+
response = _a.sent();
|
|
385
|
+
return [4 /*yield*/, response.value()];
|
|
386
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* Retrieve details of a specific project.
|
|
393
|
+
* Retrieve project
|
|
394
|
+
*/
|
|
395
|
+
ProjectsApi.prototype.retrieveProjectRaw = function (requestParameters, initOverrides) {
|
|
396
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
397
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
398
|
+
return __generator(this, function (_g) {
|
|
399
|
+
switch (_g.label) {
|
|
400
|
+
case 0:
|
|
401
|
+
if (requestParameters['pk'] == null) {
|
|
402
|
+
throw new runtime.RequiredError('pk', 'Required parameter "pk" was null or undefined when calling retrieveProject().');
|
|
403
|
+
}
|
|
404
|
+
if (requestParameters['slug'] == null) {
|
|
405
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling retrieveProject().');
|
|
406
|
+
}
|
|
407
|
+
queryParameters = {};
|
|
408
|
+
headerParameters = {};
|
|
409
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
410
|
+
_a = headerParameters;
|
|
411
|
+
_b = "X-API-Key";
|
|
412
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
413
|
+
case 1:
|
|
414
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
415
|
+
_g.label = 2;
|
|
416
|
+
case 2:
|
|
417
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
418
|
+
// oauth required
|
|
419
|
+
_c = headerParameters;
|
|
420
|
+
_d = "Authorization";
|
|
421
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
422
|
+
case 3:
|
|
423
|
+
// oauth required
|
|
424
|
+
_c[_d] = _g.sent();
|
|
425
|
+
_g.label = 4;
|
|
426
|
+
case 4:
|
|
427
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
428
|
+
// oauth required
|
|
429
|
+
_e = headerParameters;
|
|
430
|
+
_f = "Authorization";
|
|
431
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
432
|
+
case 5:
|
|
433
|
+
// oauth required
|
|
434
|
+
_e[_f] = _g.sent();
|
|
435
|
+
_g.label = 6;
|
|
436
|
+
case 6: return [4 /*yield*/, this.request({
|
|
437
|
+
path: "/api/v1/workspaces/{slug}/projects/{pk}/".replace("{".concat("pk", "}"), encodeURIComponent(String(requestParameters['pk']))).replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
438
|
+
method: 'GET',
|
|
439
|
+
headers: headerParameters,
|
|
440
|
+
query: queryParameters,
|
|
441
|
+
}, initOverrides)];
|
|
442
|
+
case 7:
|
|
443
|
+
response = _g.sent();
|
|
444
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProjectFromJSON)(jsonValue); })];
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Retrieve details of a specific project.
|
|
451
|
+
* Retrieve project
|
|
452
|
+
*/
|
|
453
|
+
ProjectsApi.prototype.retrieveProject = function (requestParameters, initOverrides) {
|
|
454
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
455
|
+
var response;
|
|
456
|
+
return __generator(this, function (_a) {
|
|
457
|
+
switch (_a.label) {
|
|
458
|
+
case 0: return [4 /*yield*/, this.retrieveProjectRaw(requestParameters, initOverrides)];
|
|
459
|
+
case 1:
|
|
460
|
+
response = _a.sent();
|
|
461
|
+
return [4 /*yield*/, response.value()];
|
|
462
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* Restore an archived project to active status, making it available in regular workflows.
|
|
469
|
+
* Unarchive project
|
|
470
|
+
*/
|
|
471
|
+
ProjectsApi.prototype.unarchiveProjectRaw = function (requestParameters, initOverrides) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
473
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
474
|
+
return __generator(this, function (_g) {
|
|
475
|
+
switch (_g.label) {
|
|
476
|
+
case 0:
|
|
477
|
+
if (requestParameters['projectId'] == null) {
|
|
478
|
+
throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling unarchiveProject().');
|
|
479
|
+
}
|
|
480
|
+
if (requestParameters['slug'] == null) {
|
|
481
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling unarchiveProject().');
|
|
482
|
+
}
|
|
483
|
+
queryParameters = {};
|
|
484
|
+
headerParameters = {};
|
|
485
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
486
|
+
_a = headerParameters;
|
|
487
|
+
_b = "X-API-Key";
|
|
488
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
489
|
+
case 1:
|
|
490
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
491
|
+
_g.label = 2;
|
|
492
|
+
case 2:
|
|
493
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
494
|
+
// oauth required
|
|
495
|
+
_c = headerParameters;
|
|
496
|
+
_d = "Authorization";
|
|
497
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
498
|
+
case 3:
|
|
499
|
+
// oauth required
|
|
500
|
+
_c[_d] = _g.sent();
|
|
501
|
+
_g.label = 4;
|
|
502
|
+
case 4:
|
|
503
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
504
|
+
// oauth required
|
|
505
|
+
_e = headerParameters;
|
|
506
|
+
_f = "Authorization";
|
|
507
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
508
|
+
case 5:
|
|
509
|
+
// oauth required
|
|
510
|
+
_e[_f] = _g.sent();
|
|
511
|
+
_g.label = 6;
|
|
512
|
+
case 6: return [4 /*yield*/, this.request({
|
|
513
|
+
path: "/api/v1/workspaces/{slug}/projects/{project_id}/archive/".replace("{".concat("project_id", "}"), encodeURIComponent(String(requestParameters['projectId']))).replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
514
|
+
method: 'DELETE',
|
|
515
|
+
headers: headerParameters,
|
|
516
|
+
query: queryParameters,
|
|
517
|
+
}, initOverrides)];
|
|
518
|
+
case 7:
|
|
519
|
+
response = _g.sent();
|
|
520
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Restore an archived project to active status, making it available in regular workflows.
|
|
527
|
+
* Unarchive project
|
|
528
|
+
*/
|
|
529
|
+
ProjectsApi.prototype.unarchiveProject = function (requestParameters, initOverrides) {
|
|
530
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
531
|
+
return __generator(this, function (_a) {
|
|
532
|
+
switch (_a.label) {
|
|
533
|
+
case 0: return [4 /*yield*/, this.unarchiveProjectRaw(requestParameters, initOverrides)];
|
|
534
|
+
case 1:
|
|
535
|
+
_a.sent();
|
|
536
|
+
return [2 /*return*/];
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
});
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Partially update an existing project\'s properties like name, description, or settings.
|
|
543
|
+
* Update project
|
|
544
|
+
*/
|
|
545
|
+
ProjectsApi.prototype.updateProjectRaw = function (requestParameters, initOverrides) {
|
|
546
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
547
|
+
var queryParameters, headerParameters, _a, _b, _c, _d, _e, _f, response;
|
|
548
|
+
return __generator(this, function (_g) {
|
|
549
|
+
switch (_g.label) {
|
|
550
|
+
case 0:
|
|
551
|
+
if (requestParameters['pk'] == null) {
|
|
552
|
+
throw new runtime.RequiredError('pk', 'Required parameter "pk" was null or undefined when calling updateProject().');
|
|
553
|
+
}
|
|
554
|
+
if (requestParameters['slug'] == null) {
|
|
555
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling updateProject().');
|
|
556
|
+
}
|
|
557
|
+
queryParameters = {};
|
|
558
|
+
headerParameters = {};
|
|
559
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
560
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
561
|
+
_a = headerParameters;
|
|
562
|
+
_b = "X-API-Key";
|
|
563
|
+
return [4 /*yield*/, this.configuration.apiKey("X-API-Key")];
|
|
564
|
+
case 1:
|
|
565
|
+
_a[_b] = _g.sent(); // ApiKeyAuthentication authentication
|
|
566
|
+
_g.label = 2;
|
|
567
|
+
case 2:
|
|
568
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
569
|
+
// oauth required
|
|
570
|
+
_c = headerParameters;
|
|
571
|
+
_d = "Authorization";
|
|
572
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
573
|
+
case 3:
|
|
574
|
+
// oauth required
|
|
575
|
+
_c[_d] = _g.sent();
|
|
576
|
+
_g.label = 4;
|
|
577
|
+
case 4:
|
|
578
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 6];
|
|
579
|
+
// oauth required
|
|
580
|
+
_e = headerParameters;
|
|
581
|
+
_f = "Authorization";
|
|
582
|
+
return [4 /*yield*/, this.configuration.accessToken("OAuth2Authentication", [])];
|
|
583
|
+
case 5:
|
|
584
|
+
// oauth required
|
|
585
|
+
_e[_f] = _g.sent();
|
|
586
|
+
_g.label = 6;
|
|
587
|
+
case 6: return [4 /*yield*/, this.request({
|
|
588
|
+
path: "/api/v1/workspaces/{slug}/projects/{pk}/".replace("{".concat("pk", "}"), encodeURIComponent(String(requestParameters['pk']))).replace("{".concat("slug", "}"), encodeURIComponent(String(requestParameters['slug']))),
|
|
589
|
+
method: 'PATCH',
|
|
590
|
+
headers: headerParameters,
|
|
591
|
+
query: queryParameters,
|
|
592
|
+
body: (0, index_1.PatchedProjectUpdateRequestToJSON)(requestParameters['patchedProjectUpdateRequest']),
|
|
593
|
+
}, initOverrides)];
|
|
594
|
+
case 7:
|
|
595
|
+
response = _g.sent();
|
|
596
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProjectFromJSON)(jsonValue); })];
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
});
|
|
600
|
+
};
|
|
601
|
+
/**
|
|
602
|
+
* Partially update an existing project\'s properties like name, description, or settings.
|
|
603
|
+
* Update project
|
|
604
|
+
*/
|
|
605
|
+
ProjectsApi.prototype.updateProject = function (requestParameters, initOverrides) {
|
|
606
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
607
|
+
var response;
|
|
608
|
+
return __generator(this, function (_a) {
|
|
609
|
+
switch (_a.label) {
|
|
610
|
+
case 0: return [4 /*yield*/, this.updateProjectRaw(requestParameters, initOverrides)];
|
|
611
|
+
case 1:
|
|
612
|
+
response = _a.sent();
|
|
613
|
+
return [4 /*yield*/, response.value()];
|
|
614
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
});
|
|
618
|
+
};
|
|
619
|
+
return ProjectsApi;
|
|
620
|
+
}(runtime.BaseAPI));
|
|
621
|
+
exports.ProjectsApi = ProjectsApi;
|