@bringg/dashboard-sdk 0.16.3 → 0.16.4

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.
@@ -60,7 +60,14 @@ var ServicePlanSEntity = /** @class */ (function (_super) {
60
60
  return _super.call(this, {
61
61
  session: session,
62
62
  entityName: 'service_plans',
63
- routes: [Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.Get, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.GetAll]
63
+ routes: [
64
+ Entity_1.BaseRoutes.Get,
65
+ Entity_1.BaseRoutes.GetAll,
66
+ Entity_1.BaseRoutes.Update,
67
+ Entity_1.BaseRoutes.Create,
68
+ Entity_1.BaseRoutes.Delete,
69
+ Entity_1.BaseRoutes.Patch
70
+ ]
64
71
  }) || this;
65
72
  }
66
73
  ServicePlanSEntity.prototype.getAll = function () {
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePlansEntity.js","sourceRoot":"","sources":["../../../src/ServicePlans/Entity/ServicePlansEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4CAA+C;AAE/C,sDAAiD;AACjD,8DAAmE;AAEnE;IAAgD,sCAA4B;IAC3E,4BAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,eAAe;YAC3B,MAAM,EAAE,CAAC,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,GAAG,EAAE,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,CAAC;SACjF,CAAC;IACH,CAAC;IACK,mCAAM,GAAZ;;;gBACC,sBAAO,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,+CAAyB,EAAE,+CAAyB,CAAC,EAAC;;;KACtF;IAEK,gCAAG,GAAT,UAAU,EAAU;;;gBACnB,sBAAO,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,+CAAyB,EAAE,+CAAyB,CAAC,EAAC;;;KACjF;IACF,yBAAC;AAAD,CAAC,AAfD,CAAgD,qBAAW,GAe1D"}
1
+ {"version":3,"file":"ServicePlansEntity.js","sourceRoot":"","sources":["../../../src/ServicePlans/Entity/ServicePlansEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4CAA+C;AAE/C,sDAAiD;AACjD,8DAAmE;AAGnE;IAAgD,sCAA4B;IAC3E,4BAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,eAAe;YAC3B,MAAM,EAAE;gBACP,mBAAU,CAAC,GAAG;gBACd,mBAAU,CAAC,MAAM;gBACjB,mBAAU,CAAC,MAAM;gBACjB,mBAAU,CAAC,MAAM;gBACjB,mBAAU,CAAC,MAAM;gBACjB,mBAAU,CAAC,KAAK;aAChB;SACD,CAAC;IACH,CAAC;IACK,mCAAM,GAAZ;;;gBACC,sBAAO,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,+CAAyB,EAAE,+CAAyB,CAAC,EAAC;;;KACtF;IAEK,gCAAG,GAAT,UAAU,EAAU;;;gBACnB,sBAAO,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,+CAAyB,EAAE,+CAAyB,CAAC,EAAC;;;KACjF;IACF,yBAAC;AAAD,CAAC,AAtBD,CAAgD,qBAAW,GAsB1D"}
@@ -1,8 +1,13 @@
1
- import { ServicePlan as ServicePlanType } from '@bringg/types';
1
+ import { ServicePlan as ServicePlanType, Timestamp } from '@bringg/types';
2
2
  import Session from '../Services/Identity/Session';
3
+ import { Require } from '../utils/types/helper-types';
4
+ export declare type ServicePlanEntity = Require<Omit<ServicePlanType, keyof Timestamp | 'id'>, 'name'>;
3
5
  export default class ServicePlansApi {
4
6
  private servicePlansEntity;
5
7
  constructor(session: Session);
6
8
  getAll(): Promise<ServicePlanType[]>;
7
9
  get(id: number): Promise<ServicePlanType>;
10
+ create(servicePlan: ServicePlanEntity): Promise<ServicePlanType>;
11
+ update(id: number, servicePlan: ServicePlanEntity): Promise<ServicePlanType>;
12
+ delete(id: number): Promise<boolean>;
8
13
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var ServicePlansEntity_1 = require("./Entity/ServicePlansEntity");
4
+ var ServicePlans_consts_1 = require("./ServicePlans.consts");
4
5
  var ServicePlansApi = /** @class */ (function () {
5
6
  function ServicePlansApi(session) {
6
7
  this.servicePlansEntity = new ServicePlansEntity_1.default(session);
@@ -11,6 +12,15 @@ var ServicePlansApi = /** @class */ (function () {
11
12
  ServicePlansApi.prototype.get = function (id) {
12
13
  return this.servicePlansEntity.service.get(id);
13
14
  };
15
+ ServicePlansApi.prototype.create = function (servicePlan) {
16
+ return this.servicePlansEntity.service.create(servicePlan, ServicePlans_consts_1.planningResponseExtractor, ServicePlans_consts_1.planningResponseExtractor);
17
+ };
18
+ ServicePlansApi.prototype.update = function (id, servicePlan) {
19
+ return this.servicePlansEntity.service.update(id, servicePlan, ServicePlans_consts_1.planningResponseExtractor, ServicePlans_consts_1.planningResponseExtractor);
20
+ };
21
+ ServicePlansApi.prototype.delete = function (id) {
22
+ return this.servicePlansEntity.service.delete(id);
23
+ };
14
24
  return ServicePlansApi;
15
25
  }());
16
26
  exports.default = ServicePlansApi;
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePlansApi.js","sourceRoot":"","sources":["../../src/ServicePlans/ServicePlansApi.ts"],"names":[],"mappings":";;AAEA,kEAA6D;AAE7D;IAGC,yBAAY,OAAgB;QAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEM,gCAAM,GAAb;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IAEM,6BAAG,GAAV,UAAW,EAAU;QACpB,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IACF,sBAAC;AAAD,CAAC,AAdD,IAcC"}
1
+ {"version":3,"file":"ServicePlansApi.js","sourceRoot":"","sources":["../../src/ServicePlans/ServicePlansApi.ts"],"names":[],"mappings":";;AAEA,kEAA6D;AAE7D,6DAAkE;AAIlE;IAGC,yBAAY,OAAgB;QAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEM,gCAAM,GAAb;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;IACzC,CAAC;IAEM,6BAAG,GAAV,UAAW,EAAU;QACpB,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChD,CAAC;IAEM,gCAAM,GAAb,UAAc,WAA8B;QAC3C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAC5C,WAAW,EACX,+CAAyB,EACzB,+CAAyB,CACzB,CAAC;IACH,CAAC;IAEM,gCAAM,GAAb,UAAc,EAAU,EAAE,WAA8B;QACvD,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAC5C,EAAE,EACF,WAAW,EACX,+CAAyB,EACzB,+CAAyB,CACzB,CAAC;IACH,CAAC;IAEM,gCAAM,GAAb,UAAc,EAAU;QACvB,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnD,CAAC;IACF,sBAAC;AAAD,CAAC,AAnCD,IAmCC"}
@@ -52,7 +52,7 @@ var axios_1 = require("axios");
52
52
  var Logger_1 = require("../Core/Logger");
53
53
  var lodash_1 = require("lodash");
54
54
  var BringgException_1 = require("../Core/BringgException");
55
- var version = '0.16.3';
55
+ var version = '0.16.4';
56
56
  function logErrorResponse(response) {
57
57
  var data = response.data, status = response.status;
58
58
  try {