npm package: @plasma-platform/service-supports
Description: Supports service api
Author: Kyrylo Voronoi
Latest version: 0.0.3
Deprecated: test

![version](https://badgen.net/npm/v/@plasma-platform/service-supports)
![nextVersion](https://badgen.net/npm/v/@plasma-platform/service-supports/next)
![downloads](https://badgen.net/npm/dt/@plasma-platform/service-supports)
![license](https://badgen.net/npm/license/@plasma-platform/service-supports)
![dependency](https://badgen.net/npm/dependents/@plasma-platform/service-supports)

* * *

[Full documentation](https://templatemonster.gitlab.io/PlasmaPlatform/Frontend/plasma-platform/?path=/story/plasma-platform-sdk--service-supports)
install:
`npm i @plasma-platform/service-supports -S`

# Short documentation

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [SupportsService](#supportsservice)
    -   [Parameters](#parameters)
    -   [getHeaders](#getheaders)
        -   [Parameters](#parameters-1)
    -   [getSupportByOrderId](#getsupportbyorderid)
        -   [Parameters](#parameters-2)
    -   [getSupportById](#getsupportbyid)
        -   [Parameters](#parameters-3)
    -   [searchPaidSupportsByPayments](#searchpaidsupportsbypayments)
        -   [Parameters](#parameters-4)
    -   [searchPaidSupportsByProduct](#searchpaidsupportsbyproduct)
        -   [Parameters](#parameters-5)

## SupportsService

Supports Micro Service API

### Parameters

-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** service url
-   `token` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | null)** user access token if available (optional, default `null`)

### getHeaders

Get response headers

#### Parameters

-   `response`  {Object} response data

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 

### getSupportByOrderId

Support - Get support by id + orderId

#### Parameters

-   `params`  {Object} request parameters
    -   `params.supportId`  {Number} support id
    -   `params.orderId`  {String} order id

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;any>** 

### getSupportById

Support - Get support by id

#### Parameters

-   `params`  {Object} request parameters
    -   `params.supportId`  {Number} support id
    -   `params.orderId`  {String} order id

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;any>** 

### searchPaidSupportsByPayments

Support - Search paid support by payments

#### Parameters

-   `params`  {Object} request parameters
    -   `params.productType`  {String} Product type
    -   `params.productIds`  {String} Array of product id divided by comma (e.g. "55555,62222")
    -   `params.ordersIds`  {String} Array of order id divided by comma (e.g. "xxx1,az22")
    -   `params.productTypes`  {String} Array of product type divided by comma (e.g. "template,offer"), default: template
    -   `params.locale`  {String} 2 char locale (en, ru de, etc.). default: en
    -   `params.perPage`  {Number} Max items per one page (50 is max size)
    -   `params.page`  {Number} Page number to view

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;any>** 

### searchPaidSupportsByProduct

Support - Search paid supports by product

#### Parameters

-   `params`  {Object} request parameters
    -   `params.locale`  {String} 2 char locale (en, ru de, etc.). default: en
    -   `params.productIds`  {String} Array of product id divided by comma (e.g. "55555,62222")
    -   `params.productTypes`  {String} Array of product type divided by comma (e.g. "template,offer"), default: template
    -   `params.perPage`  {Number} Max items per one page (50 is max size)
    -   `params.page`  {Number} Page number to view

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)&lt;any>**