Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ eslint.config.mjs
package.json
src/apis/AssetsApi.ts
src/apis/CyclesApi.ts
src/apis/EpicsApi.ts
src/apis/IntakeApi.ts
src/apis/LabelsApi.ts
src/apis/MembersApi.ts
src/apis/ModulesApi.ts
src/apis/PagesApi.ts
src/apis/ProjectsApi.ts
src/apis/StatesApi.ts
src/apis/UsersApi.ts
Expand All @@ -20,15 +22,17 @@ src/apis/WorkItemPropertiesApi.ts
src/apis/WorkItemTypesApi.ts
src/apis/WorkItemWorklogsApi.ts
src/apis/WorkItemsApi.ts
src/apis/WorkspacesApi.ts
src/apis/index.ts
src/index.ts
src/models/AccessEnum.ts
src/models/AccessBd4Enum.ts
src/models/Cycle.ts
src/models/CycleCreateRequest.ts
src/models/CycleIssue.ts
src/models/CycleIssueRequestRequest.ts
src/models/CycleLite.ts
src/models/EntityTypeEnum.ts
src/models/Epic.ts
src/models/GenericAssetUploadRequest.ts
src/models/GetWorkspaceMembers200ResponseInner.ts
src/models/GroupEnum.ts
Expand All @@ -47,12 +51,18 @@ src/models/IssueForIntakeRequest.ts
src/models/IssueLink.ts
src/models/IssueLinkCreateRequest.ts
src/models/IssuePropertyAPI.ts
src/models/IssuePropertyAPIRelationTypeEnum.ts
src/models/IssuePropertyAPIRequest.ts
src/models/IssuePropertyOptionAPI.ts
src/models/IssuePropertyOptionAPIRequest.ts
src/models/IssuePropertyValueAPI.ts
src/models/IssuePropertyValueAPIDetail.ts
src/models/IssuePropertyValueAPIRequest.ts
src/models/IssueRelation.ts
src/models/IssueRelationCreateRelationTypeEnum.ts
src/models/IssueRelationCreateRequest.ts
src/models/IssueRelationRemoveRequest.ts
src/models/IssueRelationResponse.ts
src/models/IssueRequest.ts
src/models/IssueSearch.ts
src/models/IssueSearchItem.ts
Expand All @@ -69,10 +79,15 @@ src/models/ModuleIssueRequestRequest.ts
src/models/ModuleLite.ts
src/models/ModuleStatusEnum.ts
src/models/NetworkEnum.ts
src/models/PageCreateAPI.ts
src/models/PageCreateAPIAccessEnum.ts
src/models/PageCreateAPIRequest.ts
src/models/PageDetailAPI.ts
src/models/PaginatedArchivedCycleResponse.ts
src/models/PaginatedArchivedModuleResponse.ts
src/models/PaginatedCycleIssueResponse.ts
src/models/PaginatedCycleResponse.ts
src/models/PaginatedEpicResponse.ts
src/models/PaginatedIntakeIssueResponse.ts
src/models/PaginatedIssueActivityDetailResponse.ts
src/models/PaginatedIssueActivityResponse.ts
Expand Down Expand Up @@ -105,7 +120,6 @@ src/models/Project.ts
src/models/ProjectCreateRequest.ts
src/models/ProjectWorklogSummary.ts
src/models/PropertyTypeEnum.ts
src/models/RelationTypeEnum.ts
src/models/RetrieveWorkItemAttachment400Response.ts
src/models/State.ts
src/models/StateLite.ts
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @makeplane/plane-node-sdk@0.1.4
## @makeplane/plane-node-sdk@0.1.5

This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:

Expand Down Expand Up @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_

```
npm install @makeplane/plane-node-sdk@0.1.4 --save
npm install @makeplane/plane-node-sdk@0.1.5 --save
```

_unPublished (not recommended):_
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@makeplane/plane-node-sdk",
"version": "0.1.4",
"version": "0.1.5",
"description": "Node SDK for Plane",
"author": "Plane <support@plane.so>",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/AssetsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down
8 changes: 4 additions & 4 deletions src/apis/CyclesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down Expand Up @@ -151,7 +151,7 @@ export class CyclesApi extends runtime.BaseAPI {
* Assign multiple work items to a cycle. Automatically handles bulk creation and updates with activity tracking.
* Add Work Items to Cycle
*/
async addCycleWorkItemsRaw(requestParameters: AddCycleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CycleIssue>> {
async addCycleWorkItemsRaw(requestParameters: AddCycleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CycleIssue>>> {
if (requestParameters['cycleId'] == null) {
throw new runtime.RequiredError(
'cycleId',
Expand Down Expand Up @@ -208,14 +208,14 @@ export class CyclesApi extends runtime.BaseAPI {
body: CycleIssueRequestRequestToJSON(requestParameters['cycleIssueRequestRequest']),
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => CycleIssueFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CycleIssueFromJSON));
}

/**
* Assign multiple work items to a cycle. Automatically handles bulk creation and updates with activity tracking.
* Add Work Items to Cycle
*/
async addCycleWorkItems(requestParameters: AddCycleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CycleIssue> {
async addCycleWorkItems(requestParameters: AddCycleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CycleIssue>> {
const response = await this.addCycleWorkItemsRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down
177 changes: 177 additions & 0 deletions src/apis/EpicsApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/* tslint:disable */
/* eslint-disable */
/**
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/


import * as runtime from '../runtime';
import type {
Epic,
PaginatedEpicResponse,
} from '../models/index';
import {
EpicFromJSON,
EpicToJSON,
PaginatedEpicResponseFromJSON,
PaginatedEpicResponseToJSON,
} from '../models/index';

export interface ListEpicsRequest {
projectId: string;
slug: string;
cursor?: string;
perPage?: number;
}

export interface RetrieveEpicRequest {
pk: string;
projectId: string;
slug: string;
fields?: string;
}

/**
*
*/
export class EpicsApi extends runtime.BaseAPI {

/**
* List epics
* List epics
*/
async listEpicsRaw(requestParameters: ListEpicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedEpicResponse>> {
if (requestParameters['projectId'] == null) {
throw new runtime.RequiredError(
'projectId',
'Required parameter "projectId" was null or undefined when calling listEpics().'
);
}

if (requestParameters['slug'] == null) {
throw new runtime.RequiredError(
'slug',
'Required parameter "slug" was null or undefined when calling listEpics().'
);
}

const queryParameters: any = {};

if (requestParameters['cursor'] != null) {
queryParameters['cursor'] = requestParameters['cursor'];
}

if (requestParameters['perPage'] != null) {
queryParameters['per_page'] = requestParameters['perPage'];
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/epics/`.replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedEpicResponseFromJSON(jsonValue));
}

/**
* List epics
* List epics
*/
async listEpics(requestParameters: ListEpicsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedEpicResponse> {
const response = await this.listEpicsRaw(requestParameters, initOverrides);
return await response.value();
}

/**
* Retrieve an epic by id
* Retrieve an epic
*/
async retrieveEpicRaw(requestParameters: RetrieveEpicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Epic>> {
if (requestParameters['pk'] == null) {
throw new runtime.RequiredError(
'pk',
'Required parameter "pk" was null or undefined when calling retrieveEpic().'
);
}

if (requestParameters['projectId'] == null) {
throw new runtime.RequiredError(
'projectId',
'Required parameter "projectId" was null or undefined when calling retrieveEpic().'
);
}

if (requestParameters['slug'] == null) {
throw new runtime.RequiredError(
'slug',
'Required parameter "slug" was null or undefined when calling retrieveEpic().'
);
}

const queryParameters: any = {};

if (requestParameters['fields'] != null) {
queryParameters['fields'] = requestParameters['fields'];
}

const headerParameters: runtime.HTTPHeaders = {};

if (this.configuration && this.configuration.apiKey) {
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuthentication authentication
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

if (this.configuration && this.configuration.accessToken) {
// oauth required
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Authentication", []);
}

const response = await this.request({
path: `/api/v1/workspaces/{slug}/projects/{project_id}/epics/{pk}/`.replace(`{${"pk"}}`, encodeURIComponent(String(requestParameters['pk']))).replace(`{${"project_id"}}`, encodeURIComponent(String(requestParameters['projectId']))).replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => EpicFromJSON(jsonValue));
}

/**
* Retrieve an epic by id
* Retrieve an epic
*/
async retrieveEpic(requestParameters: RetrieveEpicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Epic> {
const response = await this.retrieveEpicRaw(requestParameters, initOverrides);
return await response.value();
}

}
2 changes: 1 addition & 1 deletion src/apis/IntakeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down
2 changes: 1 addition & 1 deletion src/apis/LabelsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down
2 changes: 1 addition & 1 deletion src/apis/MembersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down
8 changes: 4 additions & 4 deletions src/apis/ModulesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* The Plane REST API
* The Plane REST API Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
*
* The version of the API Spec: 0.0.1
* The version of the API Spec: 0.0.2
* Contact: support@plane.so
*
* NOTE: This class is auto generated.
Expand Down Expand Up @@ -133,7 +133,7 @@ export class ModulesApi extends runtime.BaseAPI {
* Assign multiple work items to a module or move them from another module. Automatically handles bulk creation and updates with activity tracking.
* Add Work Items to Module
*/
async addModuleWorkItemsRaw(requestParameters: AddModuleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModuleIssue>> {
async addModuleWorkItemsRaw(requestParameters: AddModuleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ModuleIssue>>> {
if (requestParameters['moduleId'] == null) {
throw new runtime.RequiredError(
'moduleId',
Expand Down Expand Up @@ -190,14 +190,14 @@ export class ModulesApi extends runtime.BaseAPI {
body: ModuleIssueRequestRequestToJSON(requestParameters['moduleIssueRequestRequest']),
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => ModuleIssueFromJSON(jsonValue));
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ModuleIssueFromJSON));
}

/**
* Assign multiple work items to a module or move them from another module. Automatically handles bulk creation and updates with activity tracking.
* Add Work Items to Module
*/
async addModuleWorkItems(requestParameters: AddModuleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModuleIssue> {
async addModuleWorkItems(requestParameters: AddModuleWorkItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ModuleIssue>> {
const response = await this.addModuleWorkItemsRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down
Loading