### Hierarchy

- Copyleaks

## Index

### Constructors

- constructor

### Methods

- deleteAsync
- exportAsync
- getCreditsBalanceAsync
- getOCRSupportedLanguagesAsync
- getReleaseNotesAsync
- getSupportedFileTypesAsync
- getUsagesHistoryCsvAsync
- loginAsync
- resendWebhookAsync
- startAsync
- submitFileAsync
- submitFileOcrAsync
- submitUrlAsync
- verifyAuthToken

## Constructors

### constructor

- new Copyleaks(): Copyleaks

- #### Returns Copyleaks

## Methods

### deleteAsync

- deleteAsync(authToken: CopyleaksAuthToken, payloads: CopyleaksDeleteRequestModel): Promise<void>

- - Defined in src/Copyleaks.ts:280

  Delete the specific process from the server. For more info: https://api.copyleaks.com/documentation/v3/scans/delete

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  - ##### payloads: CopyleaksDeleteRequestModel

  #### Returns Promise<void>

### exportAsync

- exportAsync(authToken: CopyleaksAuthToken, scanId: string, exportId: string, model: CopyleaksExportModel): Promise<void>

- - Defined in src/Copyleaks.ts:211

  Exporting scans artifact into your server. For more info: https://api.copyleaks.com/documentation/v3/downloads/export

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Your login token to Copyleaks server

  - ##### scanId: string

    The scan ID of the specific scan to export.

  - ##### exportId: string

    A new Id for the export process.

  - ##### model: CopyleaksExportModel

    Request of which artifact should be exported.

  #### Returns Promise<void>

### getCreditsBalanceAsync

- getCreditsBalanceAsync(authToken: CopyleaksAuthToken): Promise<any>

- - Defined in src/Copyleaks.ts:353

  Get current credits balance for the Copyleaks account. For more info: https://api.copyleaks.com/documentation/v3/scans/credits

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff
  - RateLimitException: Too many requests. Please wait before calling again.

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  #### Returns Promise<any>

### getOCRSupportedLanguagesAsync

- getOCRSupportedLanguagesAsync(): Promise<any>

- - Defined in src/Copyleaks.ts:494

  Get a list of the supported languages for OCR (this is not a list of supported languages for the api, but only for the OCR files scan). For more info: https://api.copyleaks.com/documentation/v3/specifications/ocr-languages/list

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff
  - RateLimitException: Too many requests. Please wait before calling again.

  #### Returns Promise<any>

  List of supported OCR languages.

### getReleaseNotesAsync

- getReleaseNotesAsync(): Promise<any>

- - Defined in src/Copyleaks.ts:428

  Get updates about copyleaks api release notes. For more info: https://api.copyleaks.com/documentation/v3/release-notes

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff
  - RateLimitException: Too many requests. Please wait before calling again.

  #### Returns Promise<any>

  List of release notes.

### getSupportedFileTypesAsync

- getSupportedFileTypesAsync(): Promise<any>

- - Defined in src/Copyleaks.ts:461

  Get a list of the supported file types. For more info: https://api.copyleaks.com/documentation/v3/specifications/supported-file-types

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff
  - RateLimitException: Too many requests. Please wait before calling again.

  #### Returns Promise<any>

  List of supported file types.

### getUsagesHistoryCsvAsync

- getUsagesHistoryCsvAsync(authToken: CopyleaksAuthToken, startDate: string, endDate: string): Promise<any>

- - Defined in src/Copyleaks.ts:392

  This endpoint allows you to export your usage history between two dates. The output results will be exported to a csv file and it will be attached to the response. For more info: https://api.copyleaks.com/documentation/v3/scans/usages/history

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff
  - RateLimitException: Too many requests. Please wait before calling again.

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token.

  - ##### startDate: string

    The start date to collect usage history from. Date Format: `dd-MM-yyyy`.

  - ##### endDate: string

    The end date to collect usage history from. Date Format: `dd-MM-yyyy`.

  #### Returns Promise<any>

### loginAsync

- loginAsync(email: string, key: string): Promise<CopyleaksAuthToken>

- - Defined in src/Copyleaks.ts:49

  Login to Copyleaks authentication server. For more info: https://api.copyleaks.com/documentation/v3/account/login.

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### email: string

    Copyleaks account email address.

  - ##### key: string

    Copyleaks account secret key.

  #### Returns Promise<CopyleaksAuthToken>

  A authentication token that being expired after certain amount of time.

### resendWebhookAsync

- resendWebhookAsync(authToken: CopyleaksAuthToken, scanId: string): Promise<void>

- - Defined in src/Copyleaks.ts:318

  Resend status webhooks for existing scans. For more info: https://api.copyleaks.com/documentation/v3/scans/webhook-resend

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  - ##### scanId: string

    Copyleaks scan Id

  #### Returns Promise<void>

### startAsync

- startAsync(authToken: CopyleaksAuthToken, model: CopyleaksStartRequestModel): Promise<any>

- - Defined in src/Copyleaks.ts:246

  Start scanning all the files you submitted for a price-check. For more info: https://api.copyleaks.com/documentation/v3/scans/start

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Your login token to Copyleaks server.

  - ##### model: CopyleaksStartRequestModel

    Include information about which scans should be started.

  #### Returns Promise<any>

### submitFileAsync

- submitFileAsync(authToken: CopyleaksAuthToken, scanId: string, submission: CopyleaksFileSubmissionModel): Promise<void>

- - Defined in src/Copyleaks.ts:105

  Starting a new process by providing a file to scan. For more info: https://api.copyleaks.com/documentation/v3/scans/submit/file

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  - ##### scanId: string

    Attach your own scan Id

  - ##### submission: CopyleaksFileSubmissionModel

    Submission properties

  #### Returns Promise<void>

### submitFileOcrAsync

- submitFileOcrAsync(authToken: CopyleaksAuthToken, scanId: string, submission: CopyleaksFileOcrSubmissionModel): Promise<void>

- - Defined in src/Copyleaks.ts:140

  Starting a new process by providing a OCR image file to scan. For more info: https://api.copyleaks.com/documentation/v3/scans/submit/ocr

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  - ##### scanId: string

    Attach your own scan Id

  - ##### submission: CopyleaksFileOcrSubmissionModel

    Submission properties

  #### Returns Promise<void>

### submitUrlAsync

- submitUrlAsync(authToken: CopyleaksAuthToken, scanId: string, submission: CopyleaksURLSubmissionModel): Promise<void>

- - Defined in src/Copyleaks.ts:175

  Starting a new process by providing a URL to scan. For more info: https://api.copyleaks.com/documentation/v3/scans/submit/url

  - Exceptions:
  - CommandExceptions: Server reject the request. See response status code, headers and content for more info.
  - UnderMaintenanceException: Copyleaks servers are unavailable for maintenance. We recommend to implement exponential backoff algorithm as described here: https://api.copyleaks.com/documentation/v3/exponential-backoff

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  - ##### scanId: string

    Attach your own scan Id

  - ##### submission: CopyleaksURLSubmissionModel

    Submission properties

  #### Returns Promise<void>

### verifyAuthToken

- verifyAuthToken(authToken: CopyleaksAuthToken): void

- - Defined in src/Copyleaks.ts:79

  Verify that Copyleaks authentication token is exists and not exipired.

  - Exceptions:
  - AuthExipredException: authentication expired. Need to login again.

  #### Parameters

  - ##### authToken: CopyleaksAuthToken

    Copyleaks authentication token

  #### Returns void

Generated using TypeDoc