@emilgroup/public-api-sdk 1.2.0 → 1.4.0

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.
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/public-api-sdk@1.2.0 --save
20
+ npm install @emilgroup/public-api-sdk@1.4.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.2.0
24
+ yarn add @emilgroup/public-api-sdk@1.4.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
package/api.ts CHANGED
@@ -33,8 +33,3 @@ export * from './api/notifications-api';
33
33
  export * from './api/payments-setup-api';
34
34
  export * from './api/products-api';
35
35
 
36
-
37
- export enum Environment {
38
- Production = 'https://apiv2.emil.de',
39
- Test = 'https://apiv2-test.emil.de',
40
- }
package/base.ts CHANGED
@@ -40,6 +40,7 @@ export interface LoginClass {
40
40
  export enum Environment {
41
41
  Production = 'https://apiv2.emil.de',
42
42
  Test = 'https://apiv2-test.emil.de',
43
+ Development = 'https://apiv2-dev.emil.de',
43
44
  }
44
45
 
45
46
  let _retry_count = 0
@@ -128,7 +129,7 @@ export class BaseAPI {
128
129
  });
129
130
  }
130
131
 
131
- async refreshToken(): Promise<string> {
132
+ async refreshTokenInternal(): Promise<string> {
132
133
  const { username } = this.configuration;
133
134
 
134
135
  if (!username) {
@@ -179,7 +180,7 @@ export class BaseAPI {
179
180
  && !originalConfig._retry) {
180
181
  originalConfig._retry = true;
181
182
  try {
182
- let tokenString = await this.refreshToken();
183
+ let tokenString = await this.refreshTokenInternal();
183
184
  const accessToken = `Bearer ${tokenString}`;
184
185
 
185
186
  delete originalConfig.headers['Authorization']
@@ -205,7 +206,7 @@ export class BaseAPI {
205
206
  ) {
206
207
  _retry_count++;
207
208
  try {
208
- let tokenString = await this.refreshToken();
209
+ let tokenString = await this.refreshTokenInternal();
209
210
  const accessToken = `Bearer ${tokenString}`;
210
211
 
211
212
  _retry = true;
package/dist/api.d.ts CHANGED
@@ -14,7 +14,3 @@ export * from './api/leads-api';
14
14
  export * from './api/notifications-api';
15
15
  export * from './api/payments-setup-api';
16
16
  export * from './api/products-api';
17
- export declare enum Environment {
18
- Production = "https://apiv2.emil.de",
19
- Test = "https://apiv2-test.emil.de"
20
- }
package/dist/api.js CHANGED
@@ -27,14 +27,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Environment = void 0;
31
30
  __exportStar(require("./api/documents-api"), exports);
32
31
  __exportStar(require("./api/leads-api"), exports);
33
32
  __exportStar(require("./api/notifications-api"), exports);
34
33
  __exportStar(require("./api/payments-setup-api"), exports);
35
34
  __exportStar(require("./api/products-api"), exports);
36
- var Environment;
37
- (function (Environment) {
38
- Environment["Production"] = "https://apiv2.emil.de";
39
- Environment["Test"] = "https://apiv2-test.emil.de";
40
- })(Environment = exports.Environment || (exports.Environment = {}));
package/dist/base.d.ts CHANGED
@@ -28,7 +28,8 @@ export interface LoginClass {
28
28
  }
29
29
  export declare enum Environment {
30
30
  Production = "https://apiv2.emil.de",
31
- Test = "https://apiv2-test.emil.de"
31
+ Test = "https://apiv2-test.emil.de",
32
+ Development = "https://apiv2-dev.emil.de"
32
33
  }
33
34
  export declare function resetRetry(): void;
34
35
  /**
@@ -53,7 +54,7 @@ export declare class BaseAPI {
53
54
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
54
55
  selectEnvironment(env: Environment): void;
55
56
  authorize(username: string, password: string): Promise<void>;
56
- refreshToken(): Promise<string>;
57
+ refreshTokenInternal(): Promise<string>;
57
58
  private storeTokenData;
58
59
  loadTokenData(): void;
59
60
  cleanTokenData(): void;
package/dist/base.js CHANGED
@@ -99,6 +99,7 @@ var Environment;
99
99
  (function (Environment) {
100
100
  Environment["Production"] = "https://apiv2.emil.de";
101
101
  Environment["Test"] = "https://apiv2-test.emil.de";
102
+ Environment["Development"] = "https://apiv2-dev.emil.de";
102
103
  })(Environment = exports.Environment || (exports.Environment = {}));
103
104
  var _retry_count = 0;
104
105
  var _retry = null;
@@ -167,7 +168,7 @@ var BaseAPI = /** @class */ (function () {
167
168
  });
168
169
  });
169
170
  };
170
- BaseAPI.prototype.refreshToken = function () {
171
+ BaseAPI.prototype.refreshTokenInternal = function () {
171
172
  return __awaiter(this, void 0, void 0, function () {
172
173
  var username, options, accessToken;
173
174
  return __generator(this, function (_a) {
@@ -224,7 +225,7 @@ var BaseAPI = /** @class */ (function () {
224
225
  _a.label = 1;
225
226
  case 1:
226
227
  _a.trys.push([1, 3, , 4]);
227
- return [4 /*yield*/, this.refreshToken()];
228
+ return [4 /*yield*/, this.refreshTokenInternal()];
228
229
  case 2:
229
230
  tokenString = _a.sent();
230
231
  accessToken = "Bearer ".concat(tokenString);
@@ -249,7 +250,7 @@ var BaseAPI = /** @class */ (function () {
249
250
  _a.label = 6;
250
251
  case 6:
251
252
  _a.trys.push([6, 8, , 9]);
252
- return [4 /*yield*/, this.refreshToken()];
253
+ return [4 /*yield*/, this.refreshTokenInternal()];
253
254
  case 7:
254
255
  tokenString = _a.sent();
255
256
  accessToken = "Bearer ".concat(tokenString);
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- export { BaseAPI } from "./base";
12
+ export { Environment, BaseAPI } from "./base";
13
13
  export * from "./api";
14
14
  export * from "./configuration";
15
15
  export * from "./models";
package/dist/index.js CHANGED
@@ -27,8 +27,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.BaseAPI = void 0;
30
+ exports.BaseAPI = exports.Environment = void 0;
31
31
  var base_1 = require("./base");
32
+ Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return base_1.Environment; } });
32
33
  Object.defineProperty(exports, "BaseAPI", { enumerable: true, get: function () { return base_1.BaseAPI; } });
33
34
  __exportStar(require("./api"), exports);
34
35
  __exportStar(require("./configuration"), exports);
@@ -17,6 +17,12 @@ import { PremiumOverrideRequestDto } from './premium-override-request-dto';
17
17
  * @interface CreateEstimatedInvoiceRequestDto
18
18
  */
19
19
  export interface CreateEstimatedInvoiceRequestDto {
20
+ /**
21
+ * Unique identifier referencing the product version.
22
+ * @type {number}
23
+ * @memberof CreateEstimatedInvoiceRequestDto
24
+ */
25
+ 'productVersionId'?: number;
20
26
  /**
21
27
  * The policy objects to calculate premium.
22
28
  * @type {Array<PolicyObjectRequestDto>}
@@ -26,6 +26,12 @@ export interface CreateLeadRequestDto {
26
26
  * @memberof CreateLeadRequestDto
27
27
  */
28
28
  'code'?: string;
29
+ /**
30
+ * Unique identifier referencing the product version.
31
+ * @type {number}
32
+ * @memberof CreateLeadRequestDto
33
+ */
34
+ 'productVersionId'?: number;
29
35
  /**
30
36
  * Unique identifier of the product that this object belongs to.
31
37
  * @type {string}
@@ -74,4 +74,16 @@ export interface LeadClass {
74
74
  * @memberof LeadClass
75
75
  */
76
76
  'customData'?: object;
77
+ /**
78
+ * Time at which the object was created.
79
+ * @type {string}
80
+ * @memberof LeadClass
81
+ */
82
+ 'createdAt': string;
83
+ /**
84
+ * Time at which the object was updated.
85
+ * @type {string}
86
+ * @memberof LeadClass
87
+ */
88
+ 'updatedAt': string;
77
89
  }
@@ -26,6 +26,12 @@ export interface UpdateLeadRequestDto {
26
26
  * @memberof UpdateLeadRequestDto
27
27
  */
28
28
  'code': string;
29
+ /**
30
+ * Unique identifier referencing the product version.
31
+ * @type {number}
32
+ * @memberof UpdateLeadRequestDto
33
+ */
34
+ 'productVersionId'?: number;
29
35
  /**
30
36
  * Unique identifier of the product that this object belongs to.
31
37
  * @type {string}
package/index.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
- export { BaseAPI } from "./base";
16
+ export { Environment, BaseAPI } from "./base";
17
17
  export * from "./api";
18
18
  export * from "./configuration";
19
19
  export * from "./models";
@@ -22,6 +22,12 @@ import { PremiumOverrideRequestDto } from './premium-override-request-dto';
22
22
  * @interface CreateEstimatedInvoiceRequestDto
23
23
  */
24
24
  export interface CreateEstimatedInvoiceRequestDto {
25
+ /**
26
+ * Unique identifier referencing the product version.
27
+ * @type {number}
28
+ * @memberof CreateEstimatedInvoiceRequestDto
29
+ */
30
+ 'productVersionId'?: number;
25
31
  /**
26
32
  * The policy objects to calculate premium.
27
33
  * @type {Array<PolicyObjectRequestDto>}
@@ -31,6 +31,12 @@ export interface CreateLeadRequestDto {
31
31
  * @memberof CreateLeadRequestDto
32
32
  */
33
33
  'code'?: string;
34
+ /**
35
+ * Unique identifier referencing the product version.
36
+ * @type {number}
37
+ * @memberof CreateLeadRequestDto
38
+ */
39
+ 'productVersionId'?: number;
34
40
  /**
35
41
  * Unique identifier of the product that this object belongs to.
36
42
  * @type {string}
@@ -79,5 +79,17 @@ export interface LeadClass {
79
79
  * @memberof LeadClass
80
80
  */
81
81
  'customData'?: object;
82
+ /**
83
+ * Time at which the object was created.
84
+ * @type {string}
85
+ * @memberof LeadClass
86
+ */
87
+ 'createdAt': string;
88
+ /**
89
+ * Time at which the object was updated.
90
+ * @type {string}
91
+ * @memberof LeadClass
92
+ */
93
+ 'updatedAt': string;
82
94
  }
83
95
 
@@ -31,6 +31,12 @@ export interface UpdateLeadRequestDto {
31
31
  * @memberof UpdateLeadRequestDto
32
32
  */
33
33
  'code': string;
34
+ /**
35
+ * Unique identifier referencing the product version.
36
+ * @type {number}
37
+ * @memberof UpdateLeadRequestDto
38
+ */
39
+ 'productVersionId'?: number;
34
40
  /**
35
41
  * Unique identifier of the product that this object belongs to.
36
42
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/public-api-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "OpenAPI client for @emilgroup/public-api-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -21,6 +21,7 @@
21
21
  "axios": "^0.27.2"
22
22
  },
23
23
  "devDependencies": {
24
+
24
25
  "typescript": "^4.0"
25
26
  }
26
27
  }