2.6.0 • Published 4 years ago

@plasma-platform/service-services v2.6.0

Weekly downloads
47
License
CC-BY-4.0
Repository
gitlab
Last release
4 years ago

version nextVersion downloads license dependency


Full documentation
install:
npm i @plasma-platform/service-services -S

Short documentation

Table of Contents

ServicesService

Parameters

  • url string service url
  • token (string | null) user access token if available (optional, default null)

requestService

Request service

Parameters

  • id number (required) ID of the service.
  • locale string locale for service.

Examples

(async () => {
  const service = new Service('http://service-services.dev/api/v1/', token);
  const request = await service.requestService(3);
})();

Returns Promise<any>

getBundlesForType

Get bundles for type

Parameters

  • type string specific product type is required.
  • locale string locale for bundle. (optional, default 'en')

Examples

(async () => {
  const service = new Service('http://service-services.dev/api/v1/', token);
  const request = await service.getBundlesForType('wordpress');
})();

Returns Promise<any>

getBundlesById

Get bundle by id

Parameters

  • id string ID of the bundle is required.
  • locale string current locale for bundle. (optional, default 'en')

Examples

(async () => {
  const service = new Service('http://service-services.dev/api/v1/', token);
  const request = await service.getBundlesById('5a844d5ef3c03900010f1974');
})();

Returns Promise<any>

searchRequestServices

Request Services

Parameters

  • params object { channel: Presentation channel, onCart: 1 or 0 (1: Service is proposed for the whole cart; 0: Service is proposed for a special product), items: Item/Items to find services by its properties and attributes, locale: Presentation locale, serviceType: Posible types: 1) regular - Simple service; 2) bundle-pack - Service, that contains other services; 3) bundle-price-selector - something else page: page number perPage: number of services on a page } (optional, default {})

Examples

(async () => {
  const service = new Service('http://service-services.dev/api/v1/');
  const request = await service.searchRequestServices(params);
})();

Returns Promise<any>

getRequestServices

Get Request Services

Parameters

Examples

(async () => {
  const service = new Service('http://service-services.dev/api/v1/');
  const request = await service.searchRequestServices([8, 101, 1004]);
})();

Returns Promise<any>

getServicesSuggestions

Get Services Suggests

Parameters

  • params (optional, default {})

Returns Promise<any>

2.6.0

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.4.1-next.0

4 years ago

2.4.0-next.0

4 years ago

2.3.25

4 years ago

2.3.24

4 years ago

2.3.23

5 years ago

2.3.24-alpha.0

5 years ago

2.3.23-alpha.0

5 years ago

2.3.22

5 years ago

2.3.21

5 years ago

2.3.21-alpha.0

5 years ago

2.3.20-alpha.0

5 years ago

2.3.19

5 years ago

2.3.18

5 years ago

2.3.17

5 years ago

2.3.16

5 years ago

2.3.16-alpha.0

5 years ago

2.3.15-alpha.0

5 years ago

2.3.14-alpha.0

5 years ago

2.3.13

5 years ago

2.3.12

5 years ago

2.3.11

5 years ago

2.5.0-alpha.0

5 years ago

2.3.10

5 years ago

2.3.10-alpha.0

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0-alpha.0

5 years ago

2.3.0

5 years ago

2.2.11

5 years ago

2.2.10

5 years ago

2.2.9

5 years ago

2.2.8

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.12

5 years ago

2.1.11

5 years ago

2.1.10

5 years ago

2.1.9

5 years ago

2.1.8

5 years ago

2.1.7

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago