@emilgroup/changelog-sdk 1.3.1-beta.4 → 1.3.1-beta.5

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/changelog-sdk@1.3.1-beta.4 --save
20
+ npm install @emilgroup/changelog-sdk@1.3.1-beta.5 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/changelog-sdk@1.3.1-beta.4
24
+ yarn add @emilgroup/changelog-sdk@1.3.1-beta.5
25
25
  ```
26
26
 
27
27
  And then you can import ``.
@@ -83,11 +83,11 @@ export const ChangelogEventsApiAxiosParamCreator = function (configuration?: Con
83
83
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
84
84
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
85
85
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
86
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
86
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
87
87
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
88
88
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
89
89
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
90
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
90
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
91
91
  * @param {*} [options] Override http request option.
92
92
  * @throws {RequiredError}
93
93
  */
@@ -160,11 +160,11 @@ export const ChangelogEventsApiAxiosParamCreator = function (configuration?: Con
160
160
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
161
161
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
162
162
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
163
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
163
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
164
164
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
165
165
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
166
166
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
167
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
167
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
168
168
  * @param {*} [options] Override http request option.
169
169
  * @throws {RequiredError}
170
170
  */
@@ -261,11 +261,11 @@ export const ChangelogEventsApiFp = function(configuration?: Configuration) {
261
261
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
262
262
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
263
263
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
264
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
264
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
265
265
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
266
266
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
267
267
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
268
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
268
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
269
269
  * @param {*} [options] Override http request option.
270
270
  * @throws {RequiredError}
271
271
  */
@@ -280,11 +280,11 @@ export const ChangelogEventsApiFp = function(configuration?: Configuration) {
280
280
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
281
281
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
282
282
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
283
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
283
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
284
284
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
285
285
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
286
286
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
287
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
287
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
288
288
  * @param {*} [options] Override http request option.
289
289
  * @throws {RequiredError}
290
290
  */
@@ -319,11 +319,11 @@ export const ChangelogEventsApiFactory = function (configuration?: Configuration
319
319
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
320
320
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
321
321
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
322
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
322
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
323
323
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
324
324
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
325
325
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
326
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
326
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
327
327
  * @param {*} [options] Override http request option.
328
328
  * @throws {RequiredError}
329
329
  */
@@ -337,11 +337,11 @@ export const ChangelogEventsApiFactory = function (configuration?: Configuration
337
337
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
338
338
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
339
339
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
340
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
340
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
341
341
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, actorName</i>
342
342
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, occurredAt, createdAt, entityType, action</i>
343
343
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
344
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
344
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
345
345
  * @param {*} [options] Override http request option.
346
346
  * @throws {RequiredError}
347
347
  */
@@ -400,7 +400,7 @@ export interface ChangelogEventsApiListChangelogEventsRequest {
400
400
  readonly pageToken?: string
401
401
 
402
402
  /**
403
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
403
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
404
404
  * @type {string}
405
405
  * @memberof ChangelogEventsApiListChangelogEvents
406
406
  */
@@ -428,7 +428,7 @@ export interface ChangelogEventsApiListChangelogEventsRequest {
428
428
  readonly expand?: string
429
429
 
430
430
  /**
431
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
431
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
432
432
  * @type {string}
433
433
  * @memberof ChangelogEventsApiListChangelogEvents
434
434
  */
@@ -470,7 +470,7 @@ export interface ChangelogEventsApiListFormattedChangelogEventsRequest {
470
470
  readonly pageToken?: string
471
471
 
472
472
  /**
473
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
473
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
474
474
  * @type {string}
475
475
  * @memberof ChangelogEventsApiListFormattedChangelogEvents
476
476
  */
@@ -498,7 +498,7 @@ export interface ChangelogEventsApiListFormattedChangelogEventsRequest {
498
498
  readonly expand?: string
499
499
 
500
500
  /**
501
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt</i>
501
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt</i>
502
502
  * @type {string}
503
503
  * @memberof ChangelogEventsApiListFormattedChangelogEvents
504
504
  */
package/base.ts CHANGED
@@ -102,10 +102,14 @@ export class BaseAPI {
102
102
  this.configuration = configuration;
103
103
  this.basePath = configuration.basePath || this.basePath;
104
104
 
105
- // Use config token if provided, otherwise use tokenData token
106
- const configToken = this.configuration.accessToken;
107
- const storedToken = accessToken ? `Bearer ${accessToken}` : '';
108
- this.configuration.accessToken = configToken || storedToken;
105
+ if (configuration.cookieAuth) {
106
+ this.useCookieAuth();
107
+ } else {
108
+ // Use config token if provided, otherwise use tokenData token
109
+ const configToken = this.configuration.accessToken;
110
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
111
+ this.configuration.accessToken = configToken || storedToken;
112
+ }
109
113
  } else {
110
114
  const { accessToken, username } = this.tokenData;
111
115
 
@@ -119,6 +123,12 @@ export class BaseAPI {
119
123
  this.attachInterceptor(axios);
120
124
  }
121
125
 
126
+ // Cookie mode: the browser sends the HttpOnly access cookie, so no token is read from storage.
127
+ private useCookieAuth() {
128
+ this.configuration.username = this.configuration.username || this.tokenData.username;
129
+ this.configuration.baseOptions = { ...this.configuration.baseOptions, withCredentials: true };
130
+ }
131
+
122
132
  selectEnvironment(env: Environment) {
123
133
  this.selectBasePath(env);
124
134
  }
@@ -152,10 +162,12 @@ export class BaseAPI {
152
162
  const { data: { accessToken, permissions } } = response;
153
163
 
154
164
  this.configuration.username = username;
155
- this.configuration.accessToken = `Bearer ${accessToken}`;
156
165
  this.tokenData.username = username;
157
- this.tokenData.accessToken = accessToken;
158
166
  this.tokenData.permissions = permissions;
167
+ if (!this.configuration.cookieAuth) {
168
+ this.configuration.accessToken = `Bearer ${accessToken}`;
169
+ this.tokenData.accessToken = accessToken;
170
+ }
159
171
 
160
172
  // Switch workspace if provided
161
173
  if (targetWorkspace) {
@@ -178,7 +190,7 @@ export class BaseAPI {
178
190
  url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
179
191
  headers: {
180
192
  'Content-Type': 'application/json',
181
- 'Authorization': `Bearer ${this.configuration.accessToken}`,
193
+ ...(this.configuration.cookieAuth ? {} : { 'Authorization': `Bearer ${this.configuration.accessToken}` }),
182
194
  },
183
195
  data: {
184
196
  username: this.configuration.username,
@@ -190,10 +202,12 @@ export class BaseAPI {
190
202
  const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
191
203
 
192
204
  const { data: { accessToken, permissions } } = response;
193
-
194
- this.configuration.accessToken = `Bearer ${accessToken}`;
195
- this.tokenData.accessToken = accessToken;
205
+
196
206
  this.tokenData.permissions = permissions;
207
+ if (!this.configuration.cookieAuth) {
208
+ this.configuration.accessToken = `Bearer ${accessToken}`;
209
+ this.tokenData.accessToken = accessToken;
210
+ }
197
211
 
198
212
  this.storeTokenData({
199
213
  ...this.tokenData
@@ -233,6 +247,11 @@ export class BaseAPI {
233
247
 
234
248
  private storeTokenData(tokenData?: TokenData) {
235
249
  if (typeof window !== 'undefined') {
250
+ if (tokenData && this.configuration?.cookieAuth) {
251
+ // Cookie mode saves who is logged in, never the token; a token saved by apps not yet migrated stays.
252
+ const { username, permissions } = tokenData;
253
+ tokenData = { ...(defaultStorage().get<TokenData>(TOKEN_DATA) || {}), username, permissions };
254
+ }
236
255
  defaultStorage().set<TokenData>(TOKEN_DATA, tokenData);
237
256
  }
238
257
  }
@@ -263,15 +282,17 @@ export class BaseAPI {
263
282
  originalConfig._retry = true;
264
283
  try {
265
284
  const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
266
- const accessToken = `Bearer ${tokenString}`;
267
285
  this.tokenData.permissions = permissions;
268
286
 
269
287
  delete originalConfig.headers['Authorization']
270
288
 
271
- originalConfig.headers['Authorization'] = accessToken;
272
-
273
- this.configuration.accessToken = accessToken;
274
- this.tokenData.accessToken = tokenString;
289
+ // In cookie mode the refresh reply renewed the access cookie, so retry without a header.
290
+ if (!this.configuration.cookieAuth) {
291
+ const accessToken = `Bearer ${tokenString}`;
292
+ originalConfig.headers['Authorization'] = accessToken;
293
+ this.configuration.accessToken = accessToken;
294
+ this.tokenData.accessToken = tokenString;
295
+ }
275
296
 
276
297
  this.storeTokenData(this.tokenData);
277
298
 
package/configuration.ts CHANGED
@@ -21,6 +21,7 @@ export interface ConfigurationParameters {
21
21
  basePath?: string;
22
22
  baseOptions?: any;
23
23
  formDataCtor?: new () => any;
24
+ cookieAuth?: boolean;
24
25
  }
25
26
 
26
27
  export class Configuration {
@@ -74,6 +75,15 @@ export class Configuration {
74
75
  */
75
76
  formDataCtor?: new () => any;
76
77
 
78
+ /**
79
+ * Authenticate with the HttpOnly access cookie instead of a stored token: every call sends credentials.
80
+ * The browser holds one cookie, so use it with one logged-in account; log out through the auth service.
81
+ *
82
+ * @type {boolean}
83
+ * @memberof Configuration
84
+ */
85
+ cookieAuth?: boolean;
86
+
77
87
  constructor(param: ConfigurationParameters = {}) {
78
88
  this.apiKey = param.apiKey;
79
89
  this.username = param.username;
@@ -82,6 +92,7 @@ export class Configuration {
82
92
  this.basePath = param.basePath;
83
93
  this.baseOptions = param.baseOptions;
84
94
  this.formDataCtor = param.formDataCtor;
95
+ this.cookieAuth = param.cookieAuth;
85
96
  }
86
97
 
87
98
  /**
@@ -35,11 +35,11 @@ export declare const ChangelogEventsApiAxiosParamCreator: (configuration?: Confi
35
35
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
36
36
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
37
37
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
38
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
38
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
39
39
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
40
40
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
41
41
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
42
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
42
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
43
43
  * @param {*} [options] Override http request option.
44
44
  * @throws {RequiredError}
45
45
  */
@@ -51,11 +51,11 @@ export declare const ChangelogEventsApiAxiosParamCreator: (configuration?: Confi
51
51
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
52
52
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
53
53
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
54
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
54
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
55
55
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
56
56
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
57
57
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
58
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
58
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
59
59
  * @param {*} [options] Override http request option.
60
60
  * @throws {RequiredError}
61
61
  */
@@ -81,11 +81,11 @@ export declare const ChangelogEventsApiFp: (configuration?: Configuration) => {
81
81
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
82
82
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
83
83
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
84
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
84
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
85
85
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
86
86
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
87
87
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
88
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
88
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
89
89
  * @param {*} [options] Override http request option.
90
90
  * @throws {RequiredError}
91
91
  */
@@ -97,11 +97,11 @@ export declare const ChangelogEventsApiFp: (configuration?: Configuration) => {
97
97
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
98
98
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
99
99
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
100
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
100
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
101
101
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
102
102
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
103
103
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
104
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
104
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
105
105
  * @param {*} [options] Override http request option.
106
106
  * @throws {RequiredError}
107
107
  */
@@ -127,11 +127,11 @@ export declare const ChangelogEventsApiFactory: (configuration?: Configuration,
127
127
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
128
128
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
129
129
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
130
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
130
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
131
131
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
132
132
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
133
133
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
134
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
134
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
135
135
  * @param {*} [options] Override http request option.
136
136
  * @throws {RequiredError}
137
137
  */
@@ -143,11 +143,11 @@ export declare const ChangelogEventsApiFactory: (configuration?: Configuration,
143
143
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
144
144
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
145
145
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
146
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
146
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
147
147
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
148
148
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
149
149
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
150
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
150
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
151
151
  * @param {*} [options] Override http request option.
152
152
  * @throws {RequiredError}
153
153
  */
@@ -197,7 +197,7 @@ export interface ChangelogEventsApiListChangelogEventsRequest {
197
197
  */
198
198
  readonly pageToken?: string;
199
199
  /**
200
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
200
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
201
201
  * @type {string}
202
202
  * @memberof ChangelogEventsApiListChangelogEvents
203
203
  */
@@ -221,7 +221,7 @@ export interface ChangelogEventsApiListChangelogEventsRequest {
221
221
  */
222
222
  readonly expand?: string;
223
223
  /**
224
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
224
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
225
225
  * @type {string}
226
226
  * @memberof ChangelogEventsApiListChangelogEvents
227
227
  */
@@ -258,7 +258,7 @@ export interface ChangelogEventsApiListFormattedChangelogEventsRequest {
258
258
  */
259
259
  readonly pageToken?: string;
260
260
  /**
261
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
261
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
262
262
  * @type {string}
263
263
  * @memberof ChangelogEventsApiListFormattedChangelogEvents
264
264
  */
@@ -282,7 +282,7 @@ export interface ChangelogEventsApiListFormattedChangelogEventsRequest {
282
282
  */
283
283
  readonly expand?: string;
284
284
  /**
285
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
285
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
286
286
  * @type {string}
287
287
  * @memberof ChangelogEventsApiListFormattedChangelogEvents
288
288
  */
@@ -146,11 +146,11 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
146
146
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
147
147
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
148
148
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
149
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
149
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
150
150
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
151
151
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
152
152
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
153
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
153
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
154
154
  * @param {*} [options] Override http request option.
155
155
  * @throws {RequiredError}
156
156
  */
@@ -219,11 +219,11 @@ var ChangelogEventsApiAxiosParamCreator = function (configuration) {
219
219
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
220
220
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
221
221
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
222
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
222
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
223
223
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
224
224
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
225
225
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
226
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
226
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
227
227
  * @param {*} [options] Override http request option.
228
228
  * @throws {RequiredError}
229
229
  */
@@ -325,11 +325,11 @@ var ChangelogEventsApiFp = function (configuration) {
325
325
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
326
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
327
327
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
328
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
328
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
329
329
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
330
330
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
331
331
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
332
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
332
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
333
333
  * @param {*} [options] Override http request option.
334
334
  * @throws {RequiredError}
335
335
  */
@@ -353,11 +353,11 @@ var ChangelogEventsApiFp = function (configuration) {
353
353
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
354
354
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
355
355
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
356
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
356
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
357
357
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
358
358
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
359
359
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
360
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
360
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
361
361
  * @param {*} [options] Override http request option.
362
362
  * @throws {RequiredError}
363
363
  */
@@ -401,11 +401,11 @@ var ChangelogEventsApiFactory = function (configuration, basePath, axios) {
401
401
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
402
402
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
403
403
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
404
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
404
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
405
405
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
406
406
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
407
407
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
408
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
408
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
409
409
  * @param {*} [options] Override http request option.
410
410
  * @throws {RequiredError}
411
411
  */
@@ -419,11 +419,11 @@ var ChangelogEventsApiFactory = function (configuration, basePath, axios) {
419
419
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
420
420
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
421
421
  * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
422
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
422
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
423
423
  * @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Searchable fields: code, actorName&lt;/i&gt;
424
424
  * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, occurredAt, createdAt, entityType, action&lt;/i&gt;
425
425
  * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt;
426
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
426
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, action, actorSub, actorType, sourceService, accountCode, partnerCode, policyCode, claimCode, leadCode, parentType, parentCode, occurredAt, createdAt&lt;/i&gt;
427
427
  * @param {*} [options] Override http request option.
428
428
  * @throws {RequiredError}
429
429
  */
package/dist/base.d.ts CHANGED
@@ -63,6 +63,7 @@ export declare class BaseAPI {
63
63
  protected configuration: Configuration | undefined;
64
64
  private tokenData?;
65
65
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
66
+ private useCookieAuth;
66
67
  selectEnvironment(env: Environment): void;
67
68
  selectBasePath(path: string): void;
68
69
  getPermissions(): Array<string>;
package/dist/base.js CHANGED
@@ -128,10 +128,15 @@ var BaseAPI = /** @class */ (function () {
128
128
  var accessToken = this.tokenData.accessToken;
129
129
  this.configuration = configuration;
130
130
  this.basePath = configuration.basePath || this.basePath;
131
- // Use config token if provided, otherwise use tokenData token
132
- var configToken = this.configuration.accessToken;
133
- var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
134
- this.configuration.accessToken = configToken || storedToken;
131
+ if (configuration.cookieAuth) {
132
+ this.useCookieAuth();
133
+ }
134
+ else {
135
+ // Use config token if provided, otherwise use tokenData token
136
+ var configToken = this.configuration.accessToken;
137
+ var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
138
+ this.configuration.accessToken = configToken || storedToken;
139
+ }
135
140
  }
136
141
  else {
137
142
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -143,6 +148,11 @@ var BaseAPI = /** @class */ (function () {
143
148
  }
144
149
  this.attachInterceptor(axios);
145
150
  }
151
+ // Cookie mode: the browser sends the HttpOnly access cookie, so no token is read from storage.
152
+ BaseAPI.prototype.useCookieAuth = function () {
153
+ this.configuration.username = this.configuration.username || this.tokenData.username;
154
+ this.configuration.baseOptions = __assign(__assign({}, this.configuration.baseOptions), { withCredentials: true });
155
+ };
146
156
  BaseAPI.prototype.selectEnvironment = function (env) {
147
157
  this.selectBasePath(env);
148
158
  };
@@ -177,10 +187,12 @@ var BaseAPI = /** @class */ (function () {
177
187
  response = _b.sent();
178
188
  _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
179
189
  this.configuration.username = username;
180
- this.configuration.accessToken = "Bearer ".concat(accessToken);
181
190
  this.tokenData.username = username;
182
- this.tokenData.accessToken = accessToken;
183
191
  this.tokenData.permissions = permissions;
192
+ if (!this.configuration.cookieAuth) {
193
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
194
+ this.tokenData.accessToken = accessToken;
195
+ }
184
196
  if (!targetWorkspace) return [3 /*break*/, 3];
185
197
  return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
186
198
  case 2:
@@ -206,10 +218,7 @@ var BaseAPI = /** @class */ (function () {
206
218
  options = {
207
219
  method: 'POST',
208
220
  url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
209
- headers: {
210
- 'Content-Type': 'application/json',
211
- 'Authorization': "Bearer ".concat(this.configuration.accessToken),
212
- },
221
+ headers: __assign({ 'Content-Type': 'application/json' }, (this.configuration.cookieAuth ? {} : { 'Authorization': "Bearer ".concat(this.configuration.accessToken) })),
213
222
  data: {
214
223
  username: this.configuration.username,
215
224
  targetWorkspace: targetWorkspace,
@@ -220,9 +229,11 @@ var BaseAPI = /** @class */ (function () {
220
229
  case 1:
221
230
  response = _b.sent();
222
231
  _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
223
- this.configuration.accessToken = "Bearer ".concat(accessToken);
224
- this.tokenData.accessToken = accessToken;
225
232
  this.tokenData.permissions = permissions;
233
+ if (!this.configuration.cookieAuth) {
234
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
235
+ this.tokenData.accessToken = accessToken;
236
+ }
226
237
  this.storeTokenData(__assign({}, this.tokenData));
227
238
  return [2 /*return*/];
228
239
  }
@@ -265,7 +276,13 @@ var BaseAPI = /** @class */ (function () {
265
276
  });
266
277
  };
267
278
  BaseAPI.prototype.storeTokenData = function (tokenData) {
279
+ var _a;
268
280
  if (typeof window !== 'undefined') {
281
+ if (tokenData && ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.cookieAuth)) {
282
+ // Cookie mode saves who is logged in, never the token; a token saved by apps not yet migrated stays.
283
+ var username = tokenData.username, permissions = tokenData.permissions;
284
+ tokenData = __assign(__assign({}, ((0, common_1.defaultStorage)().get(TOKEN_DATA) || {})), { username: username, permissions: permissions });
285
+ }
269
286
  (0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
270
287
  }
271
288
  };
@@ -300,12 +317,15 @@ var BaseAPI = /** @class */ (function () {
300
317
  return [4 /*yield*/, this.refreshTokenInternal()];
301
318
  case 2:
302
319
  _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
303
- accessToken = "Bearer ".concat(tokenString);
304
320
  this.tokenData.permissions = permissions;
305
321
  delete originalConfig.headers['Authorization'];
306
- originalConfig.headers['Authorization'] = accessToken;
307
- this.configuration.accessToken = accessToken;
308
- this.tokenData.accessToken = tokenString;
322
+ // In cookie mode the refresh reply renewed the access cookie, so retry without a header.
323
+ if (!this.configuration.cookieAuth) {
324
+ accessToken = "Bearer ".concat(tokenString);
325
+ originalConfig.headers['Authorization'] = accessToken;
326
+ this.configuration.accessToken = accessToken;
327
+ this.tokenData.accessToken = tokenString;
328
+ }
309
329
  this.storeTokenData(this.tokenData);
310
330
  return [2 /*return*/, axios(originalConfig)];
311
331
  case 3:
@@ -17,6 +17,7 @@ export interface ConfigurationParameters {
17
17
  basePath?: string;
18
18
  baseOptions?: any;
19
19
  formDataCtor?: new () => any;
20
+ cookieAuth?: boolean;
20
21
  }
21
22
  export declare class Configuration {
22
23
  /**
@@ -68,6 +69,14 @@ export declare class Configuration {
68
69
  * @type {new () => FormData}
69
70
  */
70
71
  formDataCtor?: new () => any;
72
+ /**
73
+ * Authenticate with the HttpOnly access cookie instead of a stored token: every call sends credentials.
74
+ * The browser holds one cookie, so use it with one logged-in account; log out through the auth service.
75
+ *
76
+ * @type {boolean}
77
+ * @memberof Configuration
78
+ */
79
+ cookieAuth?: boolean;
71
80
  constructor(param?: ConfigurationParameters);
72
81
  /**
73
82
  * Check if the given MIME is a JSON MIME.
@@ -24,6 +24,7 @@ var Configuration = /** @class */ (function () {
24
24
  this.basePath = param.basePath;
25
25
  this.baseOptions = param.baseOptions;
26
26
  this.formDataCtor = param.formDataCtor;
27
+ this.cookieAuth = param.cookieAuth;
27
28
  }
28
29
  /**
29
30
  * Check if the given MIME is a JSON MIME.
@@ -100,6 +100,12 @@ export interface ChangelogEventClass {
100
100
  * @memberof ChangelogEventClass
101
101
  */
102
102
  'claimCode'?: string;
103
+ /**
104
+ * Lead code for indexed lookup
105
+ * @type {string}
106
+ * @memberof ChangelogEventClass
107
+ */
108
+ 'leadCode'?: string;
103
109
  /**
104
110
  * Type of event that occurred
105
111
  * @type {string}
@@ -105,6 +105,12 @@ export interface ChangelogEventClass {
105
105
  * @memberof ChangelogEventClass
106
106
  */
107
107
  'claimCode'?: string;
108
+ /**
109
+ * Lead code for indexed lookup
110
+ * @type {string}
111
+ * @memberof ChangelogEventClass
112
+ */
113
+ 'leadCode'?: string;
108
114
  /**
109
115
  * Type of event that occurred
110
116
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/changelog-sdk",
3
- "version": "1.3.1-beta.4",
3
+ "version": "1.3.1-beta.5",
4
4
  "description": "OpenAPI client for @emilgroup/changelog-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [