@al/connectors
Version:
A lightweight client library for interacting with the Integrations API
229 lines (228 loc) • 7.28 kB
TypeScript
/**
* Integrations API client
*/
import { AlApiClient } from '@al/core';
import { AlIntegrationType, AlIntegrationTypeDetail, AlIntegrationConnection, AlConnectorsPayloadTypes, AlConnectionTargets, AlConnectionTargetType, AlConnectionNotifications } from './types';
export declare class AlConnectorsClientInstance {
protected client: AlApiClient;
protected serviceVersion: string;
protected serviceStack: string;
constructor(client?: AlApiClient);
/**
* Get a list of supported integration types
* GET
* /v1/integration_types
* https://integrations.mdr.global.alertlogic.com
*
* @returns a list of integration types
*
* @remarks
*
* */
getIntegrationTypes(): Promise<AlIntegrationType[]>;
/**
* Get a list of supported integration types by account
* GET
* /v1/{account_id}/integration_types/{name}
* https://integrations.mdr.global.alertlogic.com
*
* @param accountId account id
* @param name integration name
* @returns a list of integration types
*
* @remarks
*
* */
getIntegrationTypeByAccount(accountId: string, name: string): Promise<AlIntegrationTypeDetail>;
/**
* Get integration type details
* GET
* /v1/integration_types/{name}
* https://integrations.mdr.global.alertlogic.com
*
* @returns an integration type
*
* @remarks
*
* */
getIntegrationTypeByName(name: string): Promise<AlIntegrationTypeDetail>;
/**
* Returns Integration Connection Information
* GET
* /v1/{account_id}/connections
* https://integrations.mdr.global.alertlogic.com
*
* @returns an existing connection
*
* @remarks
*
* */
getConnections(accountId: string, params?: {
include_sample_payload: boolean;
}): Promise<AlIntegrationConnection[]>;
/**
* Returns Integration Connection Information
* GET
* /v1/{account_id}/connections/{id}
* https://integrations.mdr.global.alertlogic.com
*
* @returns an existing connection
*
* @remarks
*
* */
getConnectionById(accountId: string, connectionId: string): Promise<AlIntegrationConnection>;
/**
* Create a connection
* POST
* /v1/{account_id}/connections
*
* @param accountId account id
* @param payload
* @param dryRun
* @returns a promise with the new connection
*
* @remarks
*/
createConnection(accountId: string, payload: AlIntegrationConnection, dryRun: boolean): Promise<AlIntegrationConnection>;
/**
* Update a connection
* PUT
* /v1/{account_id}/connections/{id}
*
* @param accountId account id
* @param connectionId connection id
* @param payload
* @param dryRun When present and set to true just tests the connection without updating an existing connection instance.
* @returns a promise with the new connection
*
* @remarks
*/
updateConnection(accountId: string, connectionId: string, payload: AlIntegrationConnection, dryRun?: boolean): Promise<AlIntegrationConnection>;
/**
* Delete existing integration connection
* DELETE
* /v1/{account_id}/connections/{id}
*
* @param accountId The AIMS Account ID
* @param connectionId id
* @returns just the status code
*
* @remarks
*/
deleteConnectionById(accountId: string, connectionId: string): Promise<void>;
/**
* Returns list of payload types
* GET
* /v1/payload_types
* https://integrations.mdr.global.alertlogic.com
*
* @remarks
*
* */
getPayloadTypes(): Promise<AlConnectorsPayloadTypes[]>;
/**
* Returns a list of all connections targets for an account
* GET
* /v1/{account_id}/connection_targets
* https://connectors.mdr.product.dev.alertlogic.com
*
* @returns the list of connection targets
*
* @remarks
*
* */
getConnectionTargets(accountId: string, params?: {
[key: string]: string;
}): Promise<AlConnectionTargets[]>;
/**
* Returns Get a list of supported connection targets
* GET
* /v1/connection_targets
* https://connectors.mdr.product.dev.alertlogic.com
*
* @returns the List of Connection Target with forms
*
* @remarks
*
* */
getConnectionTargetsDefinitions(): Promise<AlConnectionTargetType[]>;
/**
* Returns Connection Target Information
* GET
* /v1/{account_id}/connection_targets/{id}
* https://connectors.mdr.product.dev.alertlogic.com
*
* @param accountId account id
* @param connectionTargetId connection id
* @returns an existing connection target
*
* @remarks
*
* */
getConnectionTargetById(accountId: string, connectionTargetId: string): Promise<AlConnectionTargets>;
/**
* Create a connection target
* POST
* /v1/{account_id}/connection_targets
* https://connectors.mdr.product.dev.alertlogic.com
*
* @param accountId account id
* @param payload connection target
* @returns a promise with the new connection
*
* @remarks
*/
createConnectionTarget(accountId: string, payload: AlConnectionTargets): Promise<AlConnectionTargets>;
/**
* Updates existing connection target
* PUT
* /v1/{account_id}/connection_targets/{id}
* https://connectors.mdr.product.dev.alertlogic.com
*
* @param accountId account id
* @param connectionTargetId connection id
* @param payload
* @returns a promise with the new connection
*
* @remarks
*/
updateConnectionTarget(accountId: string, connectionTargetId: string, payload: AlConnectionTargets): Promise<AlConnectionTargets>;
/**
* Deletes existing connection target
* DELETE
* /v1/{account_id}/connection_targets/{id}
* https://connectors.mdr.product.dev.alertlogic.com
*
* @param accountId The AIMS Account ID
* @param connectionTargetId connection id
* @returns just the status code
*
* @remarks
*/
deleteConnectionTargetById(accountId: string, connectionTargetId: string): Promise<void>;
/**
* Returns Get a list of supported connection targets
* GET
* /v1/{{accountId}}/definitions/connection_targets
* https://connectors.mdr.product.dev.alertlogic.com
*
* @returns the List of Connection Target with forms
*
* @remarks
*
* */
getConnectionTargetsDefinitionsByAccountId(accountId: string): Promise<AlConnectionTargetType[]>;
/**
* Returns Get a list of supported notifications
* GET
* /v1/{{accountId}}/notifications
* https://connectors.mdr.product.dev.alertlogic.com
*
* @returns the List of notifications
*
* @remarks
*
* */
getConnectionNotificationsByAccountId(accountId: string): Promise<AlConnectionNotifications[]>;
}