projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
116 lines • 5.6 kB
JavaScript
/**
* 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 IntegrationProviderClient {
client;
/**
* Internal constructor for this client library
*/
constructor(client) {
this.client = client;
}
/**
* List all available IntegrationProviders that can be activated.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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.
*
*/
listProviders() {
const url = `/api/data/integrations/providers`;
return this.client.request("get", url, null, null);
}
/**
* Activates an Integration Provider and retrieves authentication information about a specific IntegrationProvider.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The unique identifier of the IntegrationProvider for which you are requesting authentication information
*/
activateIntegrationProvider(providerId) {
const url = `/api/data/integrations/providers/${providerId}`;
return this.client.request("post", url, null, null);
}
/**
* Allows you to update the auth status of the provider specific connection.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The identifier to the provider
* @param body Specify the auth status
*/
updateIntegrationProvider(providerId, body) {
const url = `/api/data/integrations/providers/${providerId}`;
return this.client.request("put", url, null, body);
}
/**
* Allows you to deactivate an integration provider.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The identifier to the provider
*/
deactivateIntegrationProvider(providerId) {
const url = `/api/data/integrations/providers/${providerId}`;
return this.client.request("delete", url, null, null);
}
/**
* Retrieves user authentication information about a specific IntegrationProvider.
*
* This connection can be used for requests to Providers that require specific user data.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The unique identifier of the IntegrationProvider for which you are requesting authentication information
*/
createUserIntegrationProviderConnection(providerId) {
const url = `/api/data/integrations/providers/${providerId}/user-connection`;
return this.client.request("post", url, null, null);
}
/**
* Allows you to update the auth status of the provider specific user connection.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The identifier to the provider
* @param body Specify the auth status
*/
updateUserIntegrationProviderConnection(providerId, body) {
const url = `/api/data/integrations/providers/${providerId}/user-connection`;
return this.client.request("put", url, null, body);
}
/**
* Allows you to disconnect the provider specific user connection.
*
* An IntegrationProvider is the name of an external application or service that can be connected to
* ProjectManager.com. 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 providerId The identifier to the provider
*/
disconnectUserIntegrationProviderConnection(providerId) {
const url = `/api/data/integrations/providers/${providerId}/user-connection`;
return this.client.request("delete", url, null, null);
}
}
//# sourceMappingURL=IntegrationProviderClient.js.map