@emilgroup/partner-portal-sdk 1.0.1-beta.1 → 1.1.1-beta.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.
@@ -3,7 +3,6 @@
3
3
  .openapi-generator-ignore
4
4
  README.md
5
5
  api.ts
6
- api/health-check-api.ts
7
6
  api/intermediary-api.ts
8
7
  base.ts
9
8
  common.ts
@@ -15,8 +14,6 @@ models/account-policy-class.ts
15
14
  models/create-payment-method-request-dto.ts
16
15
  models/create-policy-request-dto.ts
17
16
  models/index.ts
18
- models/inline-response200.ts
19
- models/inline-response503.ts
20
17
  models/insured-object-type-class.ts
21
18
  models/invoice-class.ts
22
19
  models/invoice-item-class.ts
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/partner-portal-sdk@1.0.1-beta.1 --save
20
+ npm install @emilgroup/partner-portal-sdk@1.1.1-beta.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/partner-portal-sdk@1.0.1-beta.1
24
+ yarn add @emilgroup/partner-portal-sdk@1.1.1-beta.0
25
25
  ```
26
26
 
27
27
  And then you can import `IntermediaryApi`.
package/api.ts CHANGED
@@ -20,10 +20,8 @@ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResp
20
20
  import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
23
- import { HealthCheckApi } from './api';
24
23
  import { IntermediaryApi } from './api';
25
24
 
26
25
 
27
- export * from './api/health-check-api';
28
26
  export * from './api/intermediary-api';
29
27
 
package/base.ts CHANGED
@@ -37,6 +37,16 @@ export interface LoginClass {
37
37
  permissions: string;
38
38
  }
39
39
 
40
+ export interface SwitchWorkspaceRequest {
41
+ username: string;
42
+ targetWorkspace: string;
43
+ }
44
+
45
+ export interface SwitchWorkspaceResponseClass {
46
+ accessToken: string;
47
+ permissions: string;
48
+ }
49
+
40
50
  export enum Environment {
41
51
  Production = 'https://apiv2.emil.de',
42
52
  Test = 'https://apiv2-test.emil.de',
@@ -87,9 +97,14 @@ export class BaseAPI {
87
97
  this.loadTokenData();
88
98
 
89
99
  if (configuration) {
100
+ const { accessToken } = this.tokenData;
90
101
  this.configuration = configuration;
91
102
  this.basePath = configuration.basePath || this.basePath;
92
- this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
103
+
104
+ // Use config token if provided, otherwise use tokenData token
105
+ const configToken = this.configuration.accessToken;
106
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
107
+ this.configuration.accessToken = configToken || storedToken;
93
108
  } else {
94
109
  const { accessToken, username } = this.tokenData;
95
110
 
@@ -119,7 +134,7 @@ export class BaseAPI {
119
134
  return this.tokenData.permissions.split(',');
120
135
  }
121
136
 
122
- async authorize(username: string, password: string): Promise<void> {
137
+ async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
123
138
  const options: AxiosRequestConfig = {
124
139
  method: 'POST',
125
140
  url: `${this.configuration.basePath}/authservice/v1/login`,
@@ -141,6 +156,40 @@ export class BaseAPI {
141
156
  this.tokenData.accessToken = accessToken;
142
157
  this.tokenData.permissions = permissions;
143
158
 
159
+ // Switch workspace if provided
160
+ if (targetWorkspace) {
161
+ await this.switchWorkspace(targetWorkspace);
162
+ } else {
163
+ // Only store if no workspace switch (since switchWorkspace will store after switching)
164
+ this.storeTokenData({
165
+ ...this.tokenData
166
+ });
167
+ }
168
+ }
169
+
170
+ async switchWorkspace(targetWorkspace: string): Promise<void> {
171
+ const options: AxiosRequestConfig = {
172
+ method: 'POST',
173
+ url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
174
+ headers: {
175
+ 'Content-Type': 'application/json',
176
+ 'Authorization': `Bearer ${this.configuration.accessToken}`,
177
+ },
178
+ data: {
179
+ username: this.configuration.username,
180
+ targetWorkspace,
181
+ } as SwitchWorkspaceRequest,
182
+ withCredentials: true,
183
+ };
184
+
185
+ const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
186
+
187
+ const { data: { accessToken, permissions } } = response;
188
+
189
+ this.configuration.accessToken = `Bearer ${accessToken}`;
190
+ this.tokenData.accessToken = accessToken;
191
+ this.tokenData.permissions = permissions;
192
+
144
193
  this.storeTokenData({
145
194
  ...this.tokenData
146
195
  });
@@ -270,7 +319,7 @@ export class BaseAPI {
270
319
  * @extends {Error}
271
320
  */
272
321
  export class RequiredError extends Error {
273
- name: "RequiredError" = "RequiredError";
322
+ override name: "RequiredError" = "RequiredError";
274
323
  constructor(public field: string, msg?: string) {
275
324
  super(msg);
276
325
  }
package/dist/api.d.ts CHANGED
@@ -9,5 +9,4 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- export * from './api/health-check-api';
13
12
  export * from './api/intermediary-api';
package/dist/api.js CHANGED
@@ -27,5 +27,4 @@ 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
- __exportStar(require("./api/health-check-api"), exports);
31
30
  __exportStar(require("./api/intermediary-api"), exports);
package/dist/base.d.ts CHANGED
@@ -26,6 +26,14 @@ export interface LoginClass {
26
26
  accessToken: string;
27
27
  permissions: string;
28
28
  }
29
+ export interface SwitchWorkspaceRequest {
30
+ username: string;
31
+ targetWorkspace: string;
32
+ }
33
+ export interface SwitchWorkspaceResponseClass {
34
+ accessToken: string;
35
+ permissions: string;
36
+ }
29
37
  export declare enum Environment {
30
38
  Production = "https://apiv2.emil.de",
31
39
  Test = "https://apiv2-test.emil.de",
@@ -57,7 +65,8 @@ export declare class BaseAPI {
57
65
  selectEnvironment(env: Environment): void;
58
66
  selectBasePath(path: string): void;
59
67
  getPermissions(): Array<string>;
60
- authorize(username: string, password: string): Promise<void>;
68
+ authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
69
+ switchWorkspace(targetWorkspace: string): Promise<void>;
61
70
  refreshTokenInternal(): Promise<LoginClass>;
62
71
  private storeTokenData;
63
72
  loadTokenData(): void;
package/dist/base.js CHANGED
@@ -124,9 +124,13 @@ var BaseAPI = /** @class */ (function () {
124
124
  this.axios = axios;
125
125
  this.loadTokenData();
126
126
  if (configuration) {
127
+ var accessToken = this.tokenData.accessToken;
127
128
  this.configuration = configuration;
128
129
  this.basePath = configuration.basePath || this.basePath;
129
- this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
130
+ // Use config token if provided, otherwise use tokenData token
131
+ var configToken = this.configuration.accessToken;
132
+ var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
133
+ this.configuration.accessToken = configToken || storedToken;
130
134
  }
131
135
  else {
132
136
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -151,7 +155,7 @@ var BaseAPI = /** @class */ (function () {
151
155
  }
152
156
  return this.tokenData.permissions.split(',');
153
157
  };
154
- BaseAPI.prototype.authorize = function (username, password) {
158
+ BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
155
159
  return __awaiter(this, void 0, void 0, function () {
156
160
  var options, response, _a, accessToken, permissions;
157
161
  return __generator(this, function (_b) {
@@ -176,6 +180,46 @@ var BaseAPI = /** @class */ (function () {
176
180
  this.tokenData.username = username;
177
181
  this.tokenData.accessToken = accessToken;
178
182
  this.tokenData.permissions = permissions;
183
+ if (!targetWorkspace) return [3 /*break*/, 3];
184
+ return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
185
+ case 2:
186
+ _b.sent();
187
+ return [3 /*break*/, 4];
188
+ case 3:
189
+ // Only store if no workspace switch (since switchWorkspace will store after switching)
190
+ this.storeTokenData(__assign({}, this.tokenData));
191
+ _b.label = 4;
192
+ case 4: return [2 /*return*/];
193
+ }
194
+ });
195
+ });
196
+ };
197
+ BaseAPI.prototype.switchWorkspace = function (targetWorkspace) {
198
+ return __awaiter(this, void 0, void 0, function () {
199
+ var options, response, _a, accessToken, permissions;
200
+ return __generator(this, function (_b) {
201
+ switch (_b.label) {
202
+ case 0:
203
+ options = {
204
+ method: 'POST',
205
+ url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
206
+ headers: {
207
+ 'Content-Type': 'application/json',
208
+ 'Authorization': "Bearer ".concat(this.configuration.accessToken),
209
+ },
210
+ data: {
211
+ username: this.configuration.username,
212
+ targetWorkspace: targetWorkspace,
213
+ },
214
+ withCredentials: true,
215
+ };
216
+ return [4 /*yield*/, axios_1.default.request(options)];
217
+ case 1:
218
+ response = _b.sent();
219
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
220
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
221
+ this.tokenData.accessToken = accessToken;
222
+ this.tokenData.permissions = permissions;
179
223
  this.storeTokenData(__assign({}, this.tokenData));
180
224
  return [2 /*return*/];
181
225
  }
@@ -2,8 +2,6 @@ export * from './account-class';
2
2
  export * from './account-policy-class';
3
3
  export * from './create-payment-method-request-dto';
4
4
  export * from './create-policy-request-dto';
5
- export * from './inline-response200';
6
- export * from './inline-response503';
7
5
  export * from './insured-object-type-class';
8
6
  export * from './invoice-class';
9
7
  export * from './invoice-item-class';
@@ -18,8 +18,6 @@ __exportStar(require("./account-class"), exports);
18
18
  __exportStar(require("./account-policy-class"), exports);
19
19
  __exportStar(require("./create-payment-method-request-dto"), exports);
20
20
  __exportStar(require("./create-policy-request-dto"), exports);
21
- __exportStar(require("./inline-response200"), exports);
22
- __exportStar(require("./inline-response503"), exports);
23
21
  __exportStar(require("./insured-object-type-class"), exports);
24
22
  __exportStar(require("./invoice-class"), exports);
25
23
  __exportStar(require("./invoice-item-class"), exports);
@@ -146,5 +146,7 @@ export type InvoiceClassTypeEnum = typeof InvoiceClassTypeEnum[keyof typeof Invo
146
146
  export declare const InvoiceClassStatusEnum: {
147
147
  readonly Open: "open";
148
148
  readonly Paid: "paid";
149
+ readonly PartiallyPaid: "partially-paid";
150
+ readonly Refunded: "refunded";
149
151
  };
150
152
  export type InvoiceClassStatusEnum = typeof InvoiceClassStatusEnum[keyof typeof InvoiceClassStatusEnum];
@@ -26,5 +26,7 @@ exports.InvoiceClassTypeEnum = {
26
26
  };
27
27
  exports.InvoiceClassStatusEnum = {
28
28
  Open: 'open',
29
- Paid: 'paid'
29
+ Paid: 'paid',
30
+ PartiallyPaid: 'partially-paid',
31
+ Refunded: 'refunded'
30
32
  };
@@ -43,5 +43,7 @@ export interface InvoiceStatusClass {
43
43
  export declare const InvoiceStatusClassStatusEnum: {
44
44
  readonly Open: "open";
45
45
  readonly Paid: "paid";
46
+ readonly PartiallyPaid: "partially-paid";
47
+ readonly Refunded: "refunded";
46
48
  };
47
49
  export type InvoiceStatusClassStatusEnum = typeof InvoiceStatusClassStatusEnum[keyof typeof InvoiceStatusClassStatusEnum];
@@ -16,5 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.InvoiceStatusClassStatusEnum = void 0;
17
17
  exports.InvoiceStatusClassStatusEnum = {
18
18
  Open: 'open',
19
- Paid: 'paid'
19
+ Paid: 'paid',
20
+ PartiallyPaid: 'partially-paid',
21
+ Refunded: 'refunded'
20
22
  };
package/models/index.ts CHANGED
@@ -2,8 +2,6 @@ export * from './account-class';
2
2
  export * from './account-policy-class';
3
3
  export * from './create-payment-method-request-dto';
4
4
  export * from './create-policy-request-dto';
5
- export * from './inline-response200';
6
- export * from './inline-response503';
7
5
  export * from './insured-object-type-class';
8
6
  export * from './invoice-class';
9
7
  export * from './invoice-item-class';
@@ -152,7 +152,9 @@ export const InvoiceClassTypeEnum = {
152
152
  export type InvoiceClassTypeEnum = typeof InvoiceClassTypeEnum[keyof typeof InvoiceClassTypeEnum];
153
153
  export const InvoiceClassStatusEnum = {
154
154
  Open: 'open',
155
- Paid: 'paid'
155
+ Paid: 'paid',
156
+ PartiallyPaid: 'partially-paid',
157
+ Refunded: 'refunded'
156
158
  } as const;
157
159
 
158
160
  export type InvoiceClassStatusEnum = typeof InvoiceClassStatusEnum[keyof typeof InvoiceClassStatusEnum];
@@ -48,7 +48,9 @@ export interface InvoiceStatusClass {
48
48
 
49
49
  export const InvoiceStatusClassStatusEnum = {
50
50
  Open: 'open',
51
- Paid: 'paid'
51
+ Paid: 'paid',
52
+ PartiallyPaid: 'partially-paid',
53
+ Refunded: 'refunded'
52
54
  } as const;
53
55
 
54
56
  export type InvoiceStatusClassStatusEnum = typeof InvoiceStatusClassStatusEnum[keyof typeof InvoiceStatusClassStatusEnum];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/partner-portal-sdk",
3
- "version": "1.0.1-beta.1",
3
+ "version": "1.1.1-beta.0",
4
4
  "description": "OpenAPI client for @emilgroup/partner-portal-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
package/tsconfig.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "module": "CommonJS",
6
6
  "noImplicitAny": true,
7
7
  "esModuleInterop": true,
8
+ "noImplicitOverride": true,
8
9
  "outDir": "dist",
9
10
  "rootDir": ".",
10
11
  "lib": [
@@ -1,124 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL PartnerPortal
5
- * The EMIL PartnerPortal API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
- import { Configuration } from '../configuration';
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
- // @ts-ignore
22
- import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
- // @ts-ignore
24
- import { InlineResponse200 } from '../models';
25
- // @ts-ignore
26
- import { InlineResponse503 } from '../models';
27
- /**
28
- * HealthCheckApi - axios parameter creator
29
- * @export
30
- */
31
- export const HealthCheckApiAxiosParamCreator = function (configuration?: Configuration) {
32
- return {
33
- /**
34
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
35
- * @summary Health Check
36
- * @param {*} [options] Override http request option.
37
- * @throws {RequiredError}
38
- */
39
- check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
- const localVarPath = `/partner-portal/health`;
41
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
43
- let baseOptions;
44
- let baseAccessToken;
45
- if (configuration) {
46
- baseOptions = configuration.baseOptions;
47
- baseAccessToken = configuration.accessToken;
48
- }
49
-
50
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
51
- const localVarHeaderParameter = {} as any;
52
- const localVarQueryParameter = {} as any;
53
-
54
-
55
-
56
- setSearchParams(localVarUrlObj, localVarQueryParameter);
57
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
59
-
60
- return {
61
- url: toPathString(localVarUrlObj),
62
- options: localVarRequestOptions,
63
- };
64
- },
65
- }
66
- };
67
-
68
- /**
69
- * HealthCheckApi - functional programming interface
70
- * @export
71
- */
72
- export const HealthCheckApiFp = function(configuration?: Configuration) {
73
- const localVarAxiosParamCreator = HealthCheckApiAxiosParamCreator(configuration)
74
- return {
75
- /**
76
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
77
- * @summary Health Check
78
- * @param {*} [options] Override http request option.
79
- * @throws {RequiredError}
80
- */
81
- async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
82
- const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
83
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
84
- },
85
- }
86
- };
87
-
88
- /**
89
- * HealthCheckApi - factory interface
90
- * @export
91
- */
92
- export const HealthCheckApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
93
- const localVarFp = HealthCheckApiFp(configuration)
94
- return {
95
- /**
96
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
97
- * @summary Health Check
98
- * @param {*} [options] Override http request option.
99
- * @throws {RequiredError}
100
- */
101
- check(options?: any): AxiosPromise<InlineResponse200> {
102
- return localVarFp.check(options).then((request) => request(axios, basePath));
103
- },
104
- };
105
- };
106
-
107
- /**
108
- * HealthCheckApi - object-oriented interface
109
- * @export
110
- * @class HealthCheckApi
111
- * @extends {BaseAPI}
112
- */
113
- export class HealthCheckApi extends BaseAPI {
114
- /**
115
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
116
- * @summary Health Check
117
- * @param {*} [options] Override http request option.
118
- * @throws {RequiredError}
119
- * @memberof HealthCheckApi
120
- */
121
- public check(options?: AxiosRequestConfig) {
122
- return HealthCheckApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
123
- }
124
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * EMIL PartnerPortal
3
- * The EMIL PartnerPortal API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
14
- import { RequestArgs, BaseAPI } from '../base';
15
- import { InlineResponse200 } from '../models';
16
- /**
17
- * HealthCheckApi - axios parameter creator
18
- * @export
19
- */
20
- export declare const HealthCheckApiAxiosParamCreator: (configuration?: Configuration) => {
21
- /**
22
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
23
- * @summary Health Check
24
- * @param {*} [options] Override http request option.
25
- * @throws {RequiredError}
26
- */
27
- check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
28
- };
29
- /**
30
- * HealthCheckApi - functional programming interface
31
- * @export
32
- */
33
- export declare const HealthCheckApiFp: (configuration?: Configuration) => {
34
- /**
35
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
36
- * @summary Health Check
37
- * @param {*} [options] Override http request option.
38
- * @throws {RequiredError}
39
- */
40
- check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
41
- };
42
- /**
43
- * HealthCheckApi - factory interface
44
- * @export
45
- */
46
- export declare const HealthCheckApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
47
- /**
48
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
49
- * @summary Health Check
50
- * @param {*} [options] Override http request option.
51
- * @throws {RequiredError}
52
- */
53
- check(options?: any): AxiosPromise<InlineResponse200>;
54
- };
55
- /**
56
- * HealthCheckApi - object-oriented interface
57
- * @export
58
- * @class HealthCheckApi
59
- * @extends {BaseAPI}
60
- */
61
- export declare class HealthCheckApi extends BaseAPI {
62
- /**
63
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
64
- * @summary Health Check
65
- * @param {*} [options] Override http request option.
66
- * @throws {RequiredError}
67
- * @memberof HealthCheckApi
68
- */
69
- check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
70
- }
@@ -1,200 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL PartnerPortal
6
- * The EMIL PartnerPortal API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __assign = (this && this.__assign) || function () {
31
- __assign = Object.assign || function(t) {
32
- for (var s, i = 1, n = arguments.length; i < n; i++) {
33
- s = arguments[i];
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
- t[p] = s[p];
36
- }
37
- return t;
38
- };
39
- return __assign.apply(this, arguments);
40
- };
41
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
- return new (P || (P = Promise))(function (resolve, reject) {
44
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
- step((generator = generator.apply(thisArg, _arguments || [])).next());
48
- });
49
- };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
- var __importDefault = (this && this.__importDefault) || function (mod) {
78
- return (mod && mod.__esModule) ? mod : { "default": mod };
79
- };
80
- Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.HealthCheckApi = exports.HealthCheckApiFactory = exports.HealthCheckApiFp = exports.HealthCheckApiAxiosParamCreator = void 0;
82
- var axios_1 = __importDefault(require("axios"));
83
- // Some imports not used depending on template conditions
84
- // @ts-ignore
85
- var common_1 = require("../common");
86
- // @ts-ignore
87
- var base_1 = require("../base");
88
- /**
89
- * HealthCheckApi - axios parameter creator
90
- * @export
91
- */
92
- var HealthCheckApiAxiosParamCreator = function (configuration) {
93
- var _this = this;
94
- return {
95
- /**
96
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
97
- * @summary Health Check
98
- * @param {*} [options] Override http request option.
99
- * @throws {RequiredError}
100
- */
101
- check: function (options) {
102
- if (options === void 0) { options = {}; }
103
- return __awaiter(_this, void 0, void 0, function () {
104
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
105
- return __generator(this, function (_a) {
106
- localVarPath = "/partner-portal/health";
107
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
108
- if (configuration) {
109
- baseOptions = configuration.baseOptions;
110
- baseAccessToken = configuration.accessToken;
111
- }
112
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
113
- localVarHeaderParameter = {};
114
- localVarQueryParameter = {};
115
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
116
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
117
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
118
- return [2 /*return*/, {
119
- url: (0, common_1.toPathString)(localVarUrlObj),
120
- options: localVarRequestOptions,
121
- }];
122
- });
123
- });
124
- },
125
- };
126
- };
127
- exports.HealthCheckApiAxiosParamCreator = HealthCheckApiAxiosParamCreator;
128
- /**
129
- * HealthCheckApi - functional programming interface
130
- * @export
131
- */
132
- var HealthCheckApiFp = function (configuration) {
133
- var localVarAxiosParamCreator = (0, exports.HealthCheckApiAxiosParamCreator)(configuration);
134
- return {
135
- /**
136
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
137
- * @summary Health Check
138
- * @param {*} [options] Override http request option.
139
- * @throws {RequiredError}
140
- */
141
- check: function (options) {
142
- return __awaiter(this, void 0, void 0, function () {
143
- var localVarAxiosArgs;
144
- return __generator(this, function (_a) {
145
- switch (_a.label) {
146
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.check(options)];
147
- case 1:
148
- localVarAxiosArgs = _a.sent();
149
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
150
- }
151
- });
152
- });
153
- },
154
- };
155
- };
156
- exports.HealthCheckApiFp = HealthCheckApiFp;
157
- /**
158
- * HealthCheckApi - factory interface
159
- * @export
160
- */
161
- var HealthCheckApiFactory = function (configuration, basePath, axios) {
162
- var localVarFp = (0, exports.HealthCheckApiFp)(configuration);
163
- return {
164
- /**
165
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
166
- * @summary Health Check
167
- * @param {*} [options] Override http request option.
168
- * @throws {RequiredError}
169
- */
170
- check: function (options) {
171
- return localVarFp.check(options).then(function (request) { return request(axios, basePath); });
172
- },
173
- };
174
- };
175
- exports.HealthCheckApiFactory = HealthCheckApiFactory;
176
- /**
177
- * HealthCheckApi - object-oriented interface
178
- * @export
179
- * @class HealthCheckApi
180
- * @extends {BaseAPI}
181
- */
182
- var HealthCheckApi = /** @class */ (function (_super) {
183
- __extends(HealthCheckApi, _super);
184
- function HealthCheckApi() {
185
- return _super !== null && _super.apply(this, arguments) || this;
186
- }
187
- /**
188
- * Returns the health status of the partner portal service. This endpoint is used to monitor the operational status of the partner portal service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
189
- * @summary Health Check
190
- * @param {*} [options] Override http request option.
191
- * @throws {RequiredError}
192
- * @memberof HealthCheckApi
193
- */
194
- HealthCheckApi.prototype.check = function (options) {
195
- var _this = this;
196
- return (0, exports.HealthCheckApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
197
- };
198
- return HealthCheckApi;
199
- }(base_1.BaseAPI));
200
- exports.HealthCheckApi = HealthCheckApi;
@@ -1,54 +0,0 @@
1
- /**
2
- * EMIL PartnerPortal
3
- * The EMIL PartnerPortal API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface InlineResponse200
16
- */
17
- export interface InlineResponse200 {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof InlineResponse200
22
- */
23
- 'status'?: string;
24
- /**
25
- *
26
- * @type {{ [key: string]: { [key: string]: object; }; }}
27
- * @memberof InlineResponse200
28
- */
29
- 'info'?: {
30
- [key: string]: {
31
- [key: string]: object;
32
- };
33
- } | null;
34
- /**
35
- *
36
- * @type {{ [key: string]: { [key: string]: object; }; }}
37
- * @memberof InlineResponse200
38
- */
39
- 'error'?: {
40
- [key: string]: {
41
- [key: string]: object;
42
- };
43
- } | null;
44
- /**
45
- *
46
- * @type {{ [key: string]: { [key: string]: object; }; }}
47
- * @memberof InlineResponse200
48
- */
49
- 'details'?: {
50
- [key: string]: {
51
- [key: string]: object;
52
- };
53
- };
54
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL PartnerPortal
6
- * The EMIL PartnerPortal API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,54 +0,0 @@
1
- /**
2
- * EMIL PartnerPortal
3
- * The EMIL PartnerPortal API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface InlineResponse503
16
- */
17
- export interface InlineResponse503 {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof InlineResponse503
22
- */
23
- 'status'?: string;
24
- /**
25
- *
26
- * @type {{ [key: string]: { [key: string]: object; }; }}
27
- * @memberof InlineResponse503
28
- */
29
- 'info'?: {
30
- [key: string]: {
31
- [key: string]: object;
32
- };
33
- } | null;
34
- /**
35
- *
36
- * @type {{ [key: string]: { [key: string]: object; }; }}
37
- * @memberof InlineResponse503
38
- */
39
- 'error'?: {
40
- [key: string]: {
41
- [key: string]: object;
42
- };
43
- } | null;
44
- /**
45
- *
46
- * @type {{ [key: string]: { [key: string]: object; }; }}
47
- * @memberof InlineResponse503
48
- */
49
- 'details'?: {
50
- [key: string]: {
51
- [key: string]: object;
52
- };
53
- };
54
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL PartnerPortal
6
- * The EMIL PartnerPortal API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL PartnerPortal
5
- * The EMIL PartnerPortal API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface InlineResponse200
21
- */
22
- export interface InlineResponse200 {
23
- /**
24
- *
25
- * @type {string}
26
- * @memberof InlineResponse200
27
- */
28
- 'status'?: string;
29
- /**
30
- *
31
- * @type {{ [key: string]: { [key: string]: object; }; }}
32
- * @memberof InlineResponse200
33
- */
34
- 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
- /**
36
- *
37
- * @type {{ [key: string]: { [key: string]: object; }; }}
38
- * @memberof InlineResponse200
39
- */
40
- 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
- /**
42
- *
43
- * @type {{ [key: string]: { [key: string]: object; }; }}
44
- * @memberof InlineResponse200
45
- */
46
- 'details'?: { [key: string]: { [key: string]: object; }; };
47
- }
48
-
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL PartnerPortal
5
- * The EMIL PartnerPortal API description
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
-
17
- /**
18
- *
19
- * @export
20
- * @interface InlineResponse503
21
- */
22
- export interface InlineResponse503 {
23
- /**
24
- *
25
- * @type {string}
26
- * @memberof InlineResponse503
27
- */
28
- 'status'?: string;
29
- /**
30
- *
31
- * @type {{ [key: string]: { [key: string]: object; }; }}
32
- * @memberof InlineResponse503
33
- */
34
- 'info'?: { [key: string]: { [key: string]: object; }; } | null;
35
- /**
36
- *
37
- * @type {{ [key: string]: { [key: string]: object; }; }}
38
- * @memberof InlineResponse503
39
- */
40
- 'error'?: { [key: string]: { [key: string]: object; }; } | null;
41
- /**
42
- *
43
- * @type {{ [key: string]: { [key: string]: object; }; }}
44
- * @memberof InlineResponse503
45
- */
46
- 'details'?: { [key: string]: { [key: string]: object; }; };
47
- }
48
-