npm package: @plasma-platform/service-support
Description: Support service api
Author: Kyrylo Voronoi
Latest version: 0.0.7

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

* * *

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

# Short documentation

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

### Table of Contents

-   [SupportService](#supportservice)
    -   [Parameters](#parameters)
    -   [getHeaders](#getheaders)
        -   [Parameters](#parameters-1)
    -   [getSupportByOrderId](#getsupportbyorderid)
        -   [Parameters](#parameters-2)
    -   [getSupportById](#getsupportbyid)
        -   [Parameters](#parameters-3)
    -   [searchPaidSupportByPayments](#searchpaidsupportbypayments)
        -   [Parameters](#parameters-4)
    -   [searchPaidSupportByProduct](#searchpaidsupportbyproduct)
        -   [Parameters](#parameters-5)

## SupportService

Support 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
    -   `params.locale`  {String} locale. default: 'en'
    -   `params.checkAvailability`  {Number} Check availability paid support. default: 1

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.locale`  {String} locale. default: 'en'
    -   `params.checkAvailability`  {Number} Check availability paid support. default: 1

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

### searchPaidSupportByPayments

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>** 

### searchPaidSupportByProduct

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.ids`  {String} Array of support ids divided by comma (e.g. "2530,2531")
    -   `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
    -   `params.checkAvailability`  {Number} Check availability paid support. default: 1

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