starta.apiclient 1.37.3430 → 1.37.3441

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,9 @@ export default class Communications {
13
13
  enabled: boolean;
14
14
  hoursBeforeStart: number;
15
15
  };
16
+ orderCreatedByOrg: {
17
+ enabled: boolean;
18
+ };
16
19
  }): Promise<import("../types").StartaResponse>;
17
20
  getSMSCreditsBalance(organizationLogin: string): Promise<import("../types").StartaResponse>;
18
21
  getSMSCreditsPaymentLink(organizationLogin: string, creditsPackage: 'lite250' | 'lite1100' | 'pro250' | 'pro1100'): Promise<import("../types").StartaResponse>;
@@ -12,6 +12,7 @@ import Integrations from './integrations';
12
12
  import Schedules from './schedules';
13
13
  import Worklogs from './worklogs';
14
14
  import StartaTransactions from './startaTransactions';
15
+ import Warehouses from './warehouses';
15
16
  export declare type TariffDetails = {
16
17
  tariff: 'lite' | 'pro';
17
18
  period: 'monthly' | 'yearly';
@@ -101,5 +102,6 @@ export default class Organizations {
101
102
  get integrations(): Integrations;
102
103
  get schedules(): Schedules;
103
104
  get worklogs(): Worklogs;
105
+ get warehouses(): Warehouses;
104
106
  get startaTransactions(): StartaTransactions;
105
107
  }
@@ -13,6 +13,7 @@ const integrations_1 = require("./integrations");
13
13
  const schedules_1 = require("./schedules");
14
14
  const worklogs_1 = require("./worklogs");
15
15
  const startaTransactions_1 = require("./startaTransactions");
16
+ const warehouses_1 = require("./warehouses");
16
17
  const _helpers_1 = require("../_helpers");
17
18
  class Organizations {
18
19
  constructor(requestRunner) {
@@ -238,6 +239,9 @@ class Organizations {
238
239
  get worklogs() {
239
240
  return new worklogs_1.default(this._requestRunner);
240
241
  }
242
+ get warehouses() {
243
+ return new warehouses_1.default(this._requestRunner);
244
+ }
241
245
  get startaTransactions() {
242
246
  return new startaTransactions_1.default(this._requestRunner);
243
247
  }
@@ -0,0 +1,14 @@
1
+ import { StartaRequestRunner } from '../../types';
2
+ export default class Warehouses {
3
+ private _requestRunner;
4
+ constructor(requestRunner: StartaRequestRunner);
5
+ add(organizationLogin: string, { name, type, }: {
6
+ name: string;
7
+ type: 'forServices' | 'forSales';
8
+ }): Promise<import("../../types").StartaResponse>;
9
+ update(organizationLogin: string, warehouseId: string, { name, type, }: {
10
+ name: string;
11
+ type: 'forServices' | 'forSales';
12
+ }): Promise<import("../../types").StartaResponse>;
13
+ delete(organizationLogin: string, warehouseId: string): Promise<import("../../types").StartaResponse>;
14
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class Warehouses {
4
+ constructor(requestRunner) {
5
+ this._requestRunner = requestRunner;
6
+ }
7
+ add(organizationLogin, { name, type, }) {
8
+ return this._requestRunner.performRequest({
9
+ url: `accounts/${organizationLogin}/warehouses`,
10
+ method: 'POST',
11
+ body: {
12
+ name,
13
+ type,
14
+ },
15
+ });
16
+ }
17
+ update(organizationLogin, warehouseId, { name, type, }) {
18
+ return this._requestRunner.performRequest({
19
+ url: `accounts/${organizationLogin}/warehouses/${warehouseId}`,
20
+ method: 'PUT',
21
+ body: {
22
+ name,
23
+ type,
24
+ },
25
+ });
26
+ }
27
+ delete(organizationLogin, warehouseId) {
28
+ return this._requestRunner.performRequest({
29
+ url: `accounts/${organizationLogin}/warehouses/${warehouseId}`,
30
+ method: 'DELETE'
31
+ });
32
+ }
33
+ }
34
+ exports.default = Warehouses;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.37.3430",
3
+ "version": "1.37.3441",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",