@emilgroup/changelog-sdk 1.3.1-beta.14 → 1.3.1-beta.16

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.
@@ -103,7 +103,7 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
103
103
  createChangelogConfiguration: function (createChangelogConfigurationDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -120,13 +120,16 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
120
120
  localVarQueryParameter = {};
121
121
  // authentication bearer required
122
122
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
+ // Only Authorization falls back to the configured token; an empty value is never sent.
125
+ ];
124
126
  case 1:
125
127
  // authentication bearer required
126
128
  // http bearer authentication required
127
129
  _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
+ if (authorizationValue) {
132
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
133
  }
131
134
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,7 +155,7 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
152
155
  deleteChangelogConfiguration: function (code, authorization, options) {
153
156
  if (options === void 0) { options = {}; }
154
157
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
156
159
  return __generator(this, function (_a) {
157
160
  switch (_a.label) {
158
161
  case 0:
@@ -170,13 +173,16 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
170
173
  localVarQueryParameter = {};
171
174
  // authentication bearer required
172
175
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
177
+ // Only Authorization falls back to the configured token; an empty value is never sent.
178
+ ];
174
179
  case 1:
175
180
  // authentication bearer required
176
181
  // http bearer authentication required
177
182
  _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
184
+ if (authorizationValue) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
186
  }
181
187
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
188
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -200,7 +206,7 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
200
206
  getChangelogConfiguration: function (code, authorization, options) {
201
207
  if (options === void 0) { options = {}; }
202
208
  return __awaiter(_this, void 0, void 0, function () {
203
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
204
210
  return __generator(this, function (_a) {
205
211
  switch (_a.label) {
206
212
  case 0:
@@ -218,13 +224,16 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
218
224
  localVarQueryParameter = {};
219
225
  // authentication bearer required
220
226
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
227
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
228
+ // Only Authorization falls back to the configured token; an empty value is never sent.
229
+ ];
222
230
  case 1:
223
231
  // authentication bearer required
224
232
  // http bearer authentication required
225
233
  _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
234
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
235
+ if (authorizationValue) {
236
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
237
  }
229
238
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
239
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -254,7 +263,7 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
254
263
  listChangelogConfigurations: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
255
264
  if (options === void 0) { options = {}; }
256
265
  return __awaiter(_this, void 0, void 0, function () {
257
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
266
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
258
267
  return __generator(this, function (_a) {
259
268
  switch (_a.label) {
260
269
  case 0:
@@ -295,8 +304,9 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
295
304
  if (filters !== undefined) {
296
305
  localVarQueryParameter['filters'] = filters;
297
306
  }
298
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
307
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
308
+ if (authorizationValue) {
309
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
300
310
  }
301
311
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
302
312
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -321,7 +331,7 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
321
331
  updateChangelogConfiguration: function (code, updateChangelogConfigurationDto, authorization, options) {
322
332
  if (options === void 0) { options = {}; }
323
333
  return __awaiter(_this, void 0, void 0, function () {
324
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
334
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
325
335
  return __generator(this, function (_a) {
326
336
  switch (_a.label) {
327
337
  case 0:
@@ -341,13 +351,16 @@ var ChangelogConfigurationsApiAxiosParamCreator = function (configuration) {
341
351
  localVarQueryParameter = {};
342
352
  // authentication bearer required
343
353
  // http bearer authentication required
344
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
354
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
355
+ // Only Authorization falls back to the configured token; an empty value is never sent.
356
+ ];
345
357
  case 1:
346
358
  // authentication bearer required
347
359
  // http bearer authentication required
348
360
  _a.sent();
349
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
350
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
361
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
362
+ if (authorizationValue) {
363
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
351
364
  }
352
365
  localVarHeaderParameter['Content-Type'] = 'application/json';
353
366
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -303,7 +303,7 @@ export declare class ChangelogEventsApi extends BaseAPI {
303
303
  * @throws {RequiredError}
304
304
  * @memberof ChangelogEventsApi
305
305
  */
306
- getChangelogEvent(requestParameters: ChangelogEventsApiGetChangelogEventRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetChangelogEventResponseClass, any, {}>>;
306
+ getChangelogEvent(requestParameters: ChangelogEventsApiGetChangelogEventRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetChangelogEventResponseClass, any, {}, any>>;
307
307
  /**
308
308
  * Returns a list of changelog events you have previously created. The changelog events are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"changelog-management.changelog-events.view\"
309
309
  * @summary List changelog events
@@ -312,7 +312,7 @@ export declare class ChangelogEventsApi extends BaseAPI {
312
312
  * @throws {RequiredError}
313
313
  * @memberof ChangelogEventsApi
314
314
  */
315
- listChangelogEvents(requestParameters?: ChangelogEventsApiListChangelogEventsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListChangelogEventsResponseClass, any, {}>>;
315
+ listChangelogEvents(requestParameters?: ChangelogEventsApiListChangelogEventsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListChangelogEventsResponseClass, any, {}, any>>;
316
316
  /**
317
317
  * Returns a list of formatted changelog events you have previously created. The formatted changelog events are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"changelog-management.changelog-events.view\"
318
318
  * @summary List formatted changelog events
@@ -321,5 +321,5 @@ export declare class ChangelogEventsApi extends BaseAPI {
321
321
  * @throws {RequiredError}
322
322
  * @memberof ChangelogEventsApi
323
323
  */
324
- listFormattedChangelogEvents(requestParameters: ChangelogEventsApiListFormattedChangelogEventsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFormattedChangelogEventsResponseClass, any, {}>>;
324
+ listFormattedChangelogEvents(requestParameters: ChangelogEventsApiListFormattedChangelogEventsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListFormattedChangelogEventsResponseClass, any, {}, any>>;
325
325
  }
@@ -103,7 +103,7 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
103
103
  getChangelogEvent: function (code, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
@@ -121,13 +121,16 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
121
121
  localVarQueryParameter = {};
122
122
  // authentication bearer required
123
123
  // http bearer authentication required
124
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
125
+ // Only Authorization falls back to the configured token; an empty value is never sent.
126
+ ];
125
127
  case 1:
126
128
  // authentication bearer required
127
129
  // http bearer authentication required
128
130
  _a.sent();
129
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
132
+ if (authorizationValue) {
133
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
131
134
  }
132
135
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
136
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -157,7 +160,7 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
157
160
  listChangelogEvents: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
158
161
  if (options === void 0) { options = {}; }
159
162
  return __awaiter(_this, void 0, void 0, function () {
160
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
163
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
161
164
  return __generator(this, function (_a) {
162
165
  switch (_a.label) {
163
166
  case 0:
@@ -198,8 +201,9 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
198
201
  if (filters !== undefined) {
199
202
  localVarQueryParameter['filters'] = filters;
200
203
  }
201
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
202
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
204
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
205
+ if (authorizationValue) {
206
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
203
207
  }
204
208
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
205
209
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -230,7 +234,7 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
230
234
  listFormattedChangelogEvents: function (configSlug, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
231
235
  if (options === void 0) { options = {}; }
232
236
  return __awaiter(_this, void 0, void 0, function () {
233
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
237
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
234
238
  return __generator(this, function (_a) {
235
239
  switch (_a.label) {
236
240
  case 0:
@@ -274,8 +278,9 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
274
278
  if (filters !== undefined) {
275
279
  localVarQueryParameter['filters'] = filters;
276
280
  }
277
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
278
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
282
+ if (authorizationValue) {
283
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
279
284
  }
280
285
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
281
286
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -83,5 +83,5 @@ export declare class HealthChecksApi extends BaseAPI {
83
83
  * @throws {RequiredError}
84
84
  * @memberof HealthChecksApi
85
85
  */
86
- check(requestParameters?: HealthChecksApiCheckRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
86
+ check(requestParameters?: HealthChecksApiCheckRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}, any>>;
87
87
  }
@@ -102,7 +102,7 @@ var HealthChecksApiAxiosParamCreator = function (configuration) {
102
102
  check: function (authorization, options) {
103
103
  if (options === void 0) { options = {}; }
104
104
  return __awaiter(_this, void 0, void 0, function () {
105
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
105
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
106
106
  return __generator(this, function (_a) {
107
107
  switch (_a.label) {
108
108
  case 0:
@@ -117,13 +117,16 @@ var HealthChecksApiAxiosParamCreator = function (configuration) {
117
117
  localVarQueryParameter = {};
118
118
  // authentication bearer required
119
119
  // http bearer authentication required
120
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
120
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
121
+ // Only Authorization falls back to the configured token; an empty value is never sent.
122
+ ];
121
123
  case 1:
122
124
  // authentication bearer required
123
125
  // http bearer authentication required
124
126
  _a.sent();
125
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
126
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
128
+ if (authorizationValue) {
129
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
127
130
  }
128
131
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
129
132
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
package/dist/base.d.ts CHANGED
@@ -22,9 +22,19 @@ export declare const COLLECTION_FORMATS: {
22
22
  tsv: string;
23
23
  pipes: string;
24
24
  };
25
+ export interface SessionClass {
26
+ sub: string;
27
+ username?: string;
28
+ email?: string;
29
+ tenantSlug?: string;
30
+ permissions?: string;
31
+ expiresAt?: number;
32
+ }
25
33
  export interface LoginClass {
26
34
  accessToken: string;
27
35
  permissions: string;
36
+ authMode?: string;
37
+ session?: SessionClass;
28
38
  }
29
39
  export interface SwitchWorkspaceRequest {
30
40
  username: string;
@@ -33,6 +43,8 @@ export interface SwitchWorkspaceRequest {
33
43
  export interface SwitchWorkspaceResponseClass {
34
44
  accessToken: string;
35
45
  permissions: string;
46
+ authMode?: string;
47
+ session?: SessionClass;
36
48
  }
37
49
  export declare enum Environment {
38
50
  Production = "https://apiv2.emil.de",
@@ -63,7 +75,18 @@ export declare class BaseAPI {
63
75
  protected configuration: Configuration | undefined;
64
76
  private tokenData?;
65
77
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
66
- private useCookieAuth;
78
+ private sessionAccount;
79
+ private authBasePath;
80
+ private usesSession;
81
+ private useSessionAuth;
82
+ private useHeaderAuth;
83
+ private applyTokenReply;
84
+ private sessionHeaders;
85
+ private withCurrentAuth;
86
+ private canRetryWithToken;
87
+ private canResend;
88
+ private switchToToken;
89
+ private retryWithToken;
67
90
  selectEnvironment(env: Environment): void;
68
91
  selectBasePath(path: string): void;
69
92
  getPermissions(): Array<string>;