@dynamic-labs/sdk-api
Advanced tools
Comparing version 0.0.26 to 0.0.27
{ | ||
"name": "@dynamic-labs/sdk-api", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"author": "Dynamic Labs", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -13,3 +13,3 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { CreateProjectResponse, EnvironmentsResponse, ProjectRequest, ProjectsResponse } from '../models'; | ||
import { CreateProjectResponse, EnvironmentsResponse, ProjectRequest, ProjectsResponse, UpdateProjectRequest, UpdateProjectResponse } from '../models'; | ||
export interface CreateProjectRequest { | ||
@@ -28,2 +28,6 @@ organizationId: string; | ||
} | ||
export interface UpdateProjectOperationRequest { | ||
projectId: string; | ||
updateProjectRequest: UpdateProjectRequest; | ||
} | ||
/** | ||
@@ -65,2 +69,10 @@ * | ||
getProjects(requestParameters: GetProjectsRequest, initOverrides?: RequestInit): Promise<ProjectsResponse>; | ||
/** | ||
* Update a project | ||
*/ | ||
updateProjectRaw(requestParameters: UpdateProjectOperationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<UpdateProjectResponse>>; | ||
/** | ||
* Update a project | ||
*/ | ||
updateProject(requestParameters: UpdateProjectOperationRequest, initOverrides?: RequestInit): Promise<UpdateProjectResponse>; | ||
} |
@@ -199,4 +199,44 @@ "use strict"; | ||
} | ||
/** | ||
* Update a project | ||
*/ | ||
updateProjectRaw(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (requestParameters.projectId === null || requestParameters.projectId === undefined) { | ||
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateProject.'); | ||
} | ||
if (requestParameters.updateProjectRequest === null || requestParameters.updateProjectRequest === undefined) { | ||
throw new runtime.RequiredError('updateProjectRequest', 'Required parameter requestParameters.updateProjectRequest was null or undefined when calling updateProject.'); | ||
} | ||
const queryParameters = {}; | ||
const headerParameters = {}; | ||
headerParameters['Content-Type'] = 'application/json'; | ||
if (this.configuration && this.configuration.accessToken) { | ||
const token = this.configuration.accessToken; | ||
const tokenString = yield token("bearerAuth", []); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = yield this.request({ | ||
path: `/projects/{projectId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))), | ||
method: 'PUT', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
body: (0, models_1.UpdateProjectRequestToJSON)(requestParameters.updateProjectRequest), | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.UpdateProjectResponseFromJSON)(jsonValue)); | ||
}); | ||
} | ||
/** | ||
* Update a project | ||
*/ | ||
updateProject(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.updateProjectRaw(requestParameters, initOverrides); | ||
return yield response.value(); | ||
}); | ||
} | ||
} | ||
exports.ProjectsApi = ProjectsApi; | ||
//# sourceMappingURL=ProjectsApi.js.map |
@@ -51,2 +51,4 @@ export * from './BadRequest'; | ||
export * from './Unauthorized'; | ||
export * from './UpdateProjectRequest'; | ||
export * from './UpdateProjectResponse'; | ||
export * from './User'; | ||
@@ -53,0 +55,0 @@ export * from './UserFields'; |
@@ -69,2 +69,4 @@ "use strict"; | ||
__exportStar(require("./Unauthorized"), exports); | ||
__exportStar(require("./UpdateProjectRequest"), exports); | ||
__exportStar(require("./UpdateProjectResponse"), exports); | ||
__exportStar(require("./User"), exports); | ||
@@ -71,0 +73,0 @@ __exportStar(require("./UserFields"), exports); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
391610
225
7615