/** * Exports service. * @module api/ExportsApi */ export default class ExportsApi { /** * Constructs a new ExportsApi. * @alias ExportsApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Callback function to receive the result of the createExport operation. * @callback createExportCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {ExportsCreateResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Create Export * Create export object. The export can be any of the following types: voucher, redemption, publication, customer, order, points_expiration, voucher_transactions, product, or sku. # Defaults If you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object: Date and time in the export API The exported date and times are always provided in the UTC time zone. # Fetching particular data sets Using the parameters body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: # Orders # Vouchers # Publications # Redemptions # Customers # Points Expirations # Gift Card Transactions # Loyalty Card Transactions # Products # SKUs * @param {ExportsCreateRequestBody} exportsCreateRequestBody Specify the details of the export that you would like to create. * @param {createExportCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link ExportsCreateResponseBody} * @returns {Promise<(ExportsCreateResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `ExportsCreateResponseBody` object or with `undefined`. */ createExport(exportsCreateRequestBody: ExportsCreateRequestBody, callback?: (error: Error | null, data?: ExportsCreateResponseBody, response?: any) => any): Promise<(ExportsCreateResponseBody | undefined)>; /** * Callback function to receive the result of the deleteExport operation. * @callback deleteExportCallback * @param {Error|null} error Error object if failed, null otherwise. * @param data This operation does not return a value. * @param {Object} [response] Full response object if successful. */ /** * Delete Export * This method deletes a previously created export object. * @param {String} exportId Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, voucher_transactions, product, or sku. * @param {deleteExportCallback} [callback] The callback function, accepting three arguments: error, data, response * @returns {Promise<( | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `` object or with `undefined`. */ deleteExport(exportId: string, callback?: (error: Error | null, data: any, response?: any) => any): Promise<(undefined)>; /** * Callback function to receive the result of the downloadExport operation. * @callback downloadExportCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {String} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Download Export * Download the contents of the exported CSV file. Important notes **Base URL:** - https://download.voucherify.io (Europe) - https://us1.download.voucherify.io (US) - https://as1.download.voucherify.io (Asia) **Token:** Can be found within the result parameter of the [Get Export](/api-reference/exports/get-export) method response. * @param {String} exportId Unique export object ID. * @param {{ token?: String, }} [opts] Optional parameters * @param {downloadExportCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link String} * @returns {Promise<(String | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `String` object or with `undefined`. */ downloadExport(exportId: string, opts?: { token?: string; }, callback?: (error: Error | null, data?: string, response?: any) => any): Promise<(string | undefined)>; /** * Callback function to receive the result of the getExport operation. * @callback getExportCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {ExportsGetResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * Get Export * Retrieves the URL of the downloadable file, which was generated via the [Create Export](/api-reference/exports/create-export) method. * @param {String} exportId Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, voucher_transactions, product, or sku. * @param {getExportCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link ExportsGetResponseBody} * @returns {Promise<(ExportsGetResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `ExportsGetResponseBody` object or with `undefined`. */ getExport(exportId: string, callback?: (error: Error | null, data?: ExportsGetResponseBody, response?: any) => any): Promise<(ExportsGetResponseBody | undefined)>; /** * Callback function to receive the result of the listExports operation. * @callback listExportsCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {ExportsListResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * List Exports * List all exports. * @param {{ limit?: Number, page?: Number, order?: Exclude, }} [opts] Optional parameters * @param {listExportsCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link ExportsListResponseBody} * @returns {Promise<(ExportsListResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `ExportsListResponseBody` object or with `undefined`. */ listExports(opts?: { limit?: number; page?: number; order?: Exclude; }, callback?: (error: Error | null, data?: ExportsListResponseBody, response?: any) => any): Promise<(ExportsListResponseBody | undefined)>; } import ExportsCreateRequestBody from '../model/ExportsCreateRequestBody'; import ExportsCreateResponseBody from '../model/ExportsCreateResponseBody'; import ExportsGetResponseBody from '../model/ExportsGetResponseBody'; import ParameterOrderListExports from '../model/ParameterOrderListExports'; import ExportsListResponseBody from '../model/ExportsListResponseBody';