UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

69 lines 2.61 kB
/** * ProjectManager API for TypeScript * * (c) ProjectManager.com, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author ProjectManager.com <support@projectmanager.com> * @copyright ProjectManager.com, Inc. * @link https://github.com/projectmgr/projectmanager-sdk-typescript */ export class IntegrationClient { client; /** * Internal constructor for this client library */ constructor(client) { this.client = client; } /** * Retrieves an Integration specified by a unique identifier. * * The Integrations API is intended for use by ProjectManager and its business development partners. Please * contact ProjectManager's sales team to request use of this API. * * @param integrationId The unique identifier of this Integration */ retrieveIntegration(integrationId) { const url = `/api/data/integrations/${integrationId}`; return this.client.request("get", url, null, null); } /** * Enable a specific Integration for the current Workspace. * * The Integrations API is intended for use by ProjectManager and its business development partners. Please * contact ProjectManager's sales team to request use of this API. * * @param integrationId The unique identifier of the Integration to enable */ enableIntegration(integrationId) { const url = `/api/data/integrations/${integrationId}`; return this.client.request("post", url, null, null); } /** * Disable a specific Integration for the current Workspace. * * The Integrations API is intended for use by ProjectManager and its business development partners. Please * contact ProjectManager's sales team to request use of this API. * * @param integrationId The unique identifier of the Integration to disable */ disableIntegration(integrationId) { const url = `/api/data/integrations/${integrationId}`; return this.client.request("delete", url, null, null); } /** * Retrieves all Integrations for the current Workspace. * * The Integrations API is intended for use by ProjectManager and its business development partners. Please * contact ProjectManager's sales team to request use of this API. * */ retrieveAllIntegrations() { const url = `/api/data/integrations`; return this.client.request("get", url, null, null); } } //# sourceMappingURL=IntegrationClient.js.map