@emilgroup/notification-sdk-node 1.4.0 → 1.4.1-beta.1
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 +2 -2
- package/api/default-api.ts +8 -4
- package/api/email-verifications-api.ts +8 -8
- package/api/layouts-api.ts +60 -60
- package/api/notification-templates-api.ts +60 -60
- package/api/notifications-api.ts +4 -4
- package/base.ts +47 -5
- package/common.ts +2 -2
- package/configuration.ts +9 -0
- package/dist/api/default-api.d.ts +8 -4
- package/dist/api/default-api.js +8 -4
- package/dist/api/email-verifications-api.d.ts +8 -8
- package/dist/api/email-verifications-api.js +8 -8
- package/dist/api/layouts-api.d.ts +60 -60
- package/dist/api/layouts-api.js +41 -41
- package/dist/api/notification-templates-api.d.ts +60 -60
- package/dist/api/notification-templates-api.js +41 -41
- package/dist/api/notifications-api.d.ts +4 -4
- package/dist/api/notifications-api.js +4 -4
- package/dist/base.d.ts +11 -2
- package/dist/base.js +43 -4
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +6 -0
- package/dist/configuration.js +8 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -0
|
@@ -43,7 +43,7 @@ const FormData = require('form-data');
|
|
|
43
43
|
export const NotificationTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
44
44
|
return {
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* undefined **Required Permissions** \"notification-management.email-templates.create\"
|
|
47
47
|
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
|
|
48
48
|
* @param {string} [authorization] Bearer Token
|
|
49
49
|
* @param {*} [options] Override http request option.
|
|
@@ -89,7 +89,7 @@ export const NotificationTemplatesApiAxiosParamCreator = function (configuration
|
|
|
89
89
|
};
|
|
90
90
|
},
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
|
|
93
93
|
* @param {number} id
|
|
94
94
|
* @param {string} [authorization] Bearer Token
|
|
95
95
|
* @param {*} [options] Override http request option.
|
|
@@ -133,7 +133,7 @@ export const NotificationTemplatesApiAxiosParamCreator = function (configuration
|
|
|
133
133
|
};
|
|
134
134
|
},
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
136
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
137
137
|
* @param {number} id
|
|
138
138
|
* @param {number} id2
|
|
139
139
|
* @param {string} [authorization] Bearer Token
|
|
@@ -189,19 +189,19 @@ export const NotificationTemplatesApiAxiosParamCreator = function (configuration
|
|
|
189
189
|
};
|
|
190
190
|
},
|
|
191
191
|
/**
|
|
192
|
-
*
|
|
192
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
193
193
|
* @param {string} [authorization] Bearer Token
|
|
194
|
-
* @param {
|
|
195
|
-
* @param {
|
|
196
|
-
* @param {
|
|
197
|
-
* @param {
|
|
198
|
-
* @param {
|
|
199
|
-
* @param {
|
|
200
|
-
* @param {
|
|
194
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
195
|
+
* @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.
|
|
196
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
197
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
198
|
+
* @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
199
|
+
* @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
200
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
201
201
|
* @param {*} [options] Override http request option.
|
|
202
202
|
* @throws {RequiredError}
|
|
203
203
|
*/
|
|
204
|
-
listNotificationTemplates: async (authorization?: string, pageSize?:
|
|
204
|
+
listNotificationTemplates: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
205
205
|
const localVarPath = `/notificationservice/v1/notification-templates`;
|
|
206
206
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
207
207
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -264,7 +264,7 @@ export const NotificationTemplatesApiAxiosParamCreator = function (configuration
|
|
|
264
264
|
};
|
|
265
265
|
},
|
|
266
266
|
/**
|
|
267
|
-
*
|
|
267
|
+
* undefined **Required Permissions** \"notification-management.email-templates.update\"
|
|
268
268
|
* @param {number} id
|
|
269
269
|
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
|
|
270
270
|
* @param {string} [authorization] Bearer Token
|
|
@@ -324,7 +324,7 @@ export const NotificationTemplatesApiFp = function(configuration?: Configuration
|
|
|
324
324
|
const localVarAxiosParamCreator = NotificationTemplatesApiAxiosParamCreator(configuration)
|
|
325
325
|
return {
|
|
326
326
|
/**
|
|
327
|
-
*
|
|
327
|
+
* undefined **Required Permissions** \"notification-management.email-templates.create\"
|
|
328
328
|
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
|
|
329
329
|
* @param {string} [authorization] Bearer Token
|
|
330
330
|
* @param {*} [options] Override http request option.
|
|
@@ -335,7 +335,7 @@ export const NotificationTemplatesApiFp = function(configuration?: Configuration
|
|
|
335
335
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
336
336
|
},
|
|
337
337
|
/**
|
|
338
|
-
*
|
|
338
|
+
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
|
|
339
339
|
* @param {number} id
|
|
340
340
|
* @param {string} [authorization] Bearer Token
|
|
341
341
|
* @param {*} [options] Override http request option.
|
|
@@ -346,7 +346,7 @@ export const NotificationTemplatesApiFp = function(configuration?: Configuration
|
|
|
346
346
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
347
347
|
},
|
|
348
348
|
/**
|
|
349
|
-
*
|
|
349
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
350
350
|
* @param {number} id
|
|
351
351
|
* @param {number} id2
|
|
352
352
|
* @param {string} [authorization] Bearer Token
|
|
@@ -359,24 +359,24 @@ export const NotificationTemplatesApiFp = function(configuration?: Configuration
|
|
|
359
359
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
360
360
|
},
|
|
361
361
|
/**
|
|
362
|
-
*
|
|
362
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
363
363
|
* @param {string} [authorization] Bearer Token
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
367
|
-
* @param {
|
|
368
|
-
* @param {
|
|
369
|
-
* @param {
|
|
370
|
-
* @param {
|
|
364
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
365
|
+
* @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.
|
|
366
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
367
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
368
|
+
* @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
369
|
+
* @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
370
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
371
371
|
* @param {*} [options] Override http request option.
|
|
372
372
|
* @throws {RequiredError}
|
|
373
373
|
*/
|
|
374
|
-
async listNotificationTemplates(authorization?: string, pageSize?:
|
|
374
|
+
async listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListNotificationTemplatesResponseClass>> {
|
|
375
375
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
376
376
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
377
377
|
},
|
|
378
378
|
/**
|
|
379
|
-
*
|
|
379
|
+
* undefined **Required Permissions** \"notification-management.email-templates.update\"
|
|
380
380
|
* @param {number} id
|
|
381
381
|
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
|
|
382
382
|
* @param {string} [authorization] Bearer Token
|
|
@@ -398,7 +398,7 @@ export const NotificationTemplatesApiFactory = function (configuration?: Configu
|
|
|
398
398
|
const localVarFp = NotificationTemplatesApiFp(configuration)
|
|
399
399
|
return {
|
|
400
400
|
/**
|
|
401
|
-
*
|
|
401
|
+
* undefined **Required Permissions** \"notification-management.email-templates.create\"
|
|
402
402
|
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
|
|
403
403
|
* @param {string} [authorization] Bearer Token
|
|
404
404
|
* @param {*} [options] Override http request option.
|
|
@@ -408,7 +408,7 @@ export const NotificationTemplatesApiFactory = function (configuration?: Configu
|
|
|
408
408
|
return localVarFp.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
409
409
|
},
|
|
410
410
|
/**
|
|
411
|
-
*
|
|
411
|
+
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
|
|
412
412
|
* @param {number} id
|
|
413
413
|
* @param {string} [authorization] Bearer Token
|
|
414
414
|
* @param {*} [options] Override http request option.
|
|
@@ -418,7 +418,7 @@ export const NotificationTemplatesApiFactory = function (configuration?: Configu
|
|
|
418
418
|
return localVarFp.deleteNotificationTemplate(id, authorization, options).then((request) => request(axios, basePath));
|
|
419
419
|
},
|
|
420
420
|
/**
|
|
421
|
-
*
|
|
421
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
422
422
|
* @param {number} id
|
|
423
423
|
* @param {number} id2
|
|
424
424
|
* @param {string} [authorization] Bearer Token
|
|
@@ -430,23 +430,23 @@ export const NotificationTemplatesApiFactory = function (configuration?: Configu
|
|
|
430
430
|
return localVarFp.getNotificationTemplate(id, id2, authorization, expand, options).then((request) => request(axios, basePath));
|
|
431
431
|
},
|
|
432
432
|
/**
|
|
433
|
-
*
|
|
433
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
434
434
|
* @param {string} [authorization] Bearer Token
|
|
435
|
-
* @param {
|
|
436
|
-
* @param {
|
|
437
|
-
* @param {
|
|
438
|
-
* @param {
|
|
439
|
-
* @param {
|
|
440
|
-
* @param {
|
|
441
|
-
* @param {
|
|
435
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
436
|
+
* @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.
|
|
437
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
438
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
439
|
+
* @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
440
|
+
* @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
441
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
442
442
|
* @param {*} [options] Override http request option.
|
|
443
443
|
* @throws {RequiredError}
|
|
444
444
|
*/
|
|
445
|
-
listNotificationTemplates(authorization?: string, pageSize?:
|
|
445
|
+
listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListNotificationTemplatesResponseClass> {
|
|
446
446
|
return localVarFp.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
447
447
|
},
|
|
448
448
|
/**
|
|
449
|
-
*
|
|
449
|
+
* undefined **Required Permissions** \"notification-management.email-templates.update\"
|
|
450
450
|
* @param {number} id
|
|
451
451
|
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
|
|
452
452
|
* @param {string} [authorization] Bearer Token
|
|
@@ -551,52 +551,52 @@ export interface NotificationTemplatesApiListNotificationTemplatesRequest {
|
|
|
551
551
|
|
|
552
552
|
/**
|
|
553
553
|
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
554
|
-
* @type {
|
|
554
|
+
* @type {number}
|
|
555
555
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
556
556
|
*/
|
|
557
|
-
readonly pageSize?:
|
|
557
|
+
readonly pageSize?: number
|
|
558
558
|
|
|
559
559
|
/**
|
|
560
|
-
* 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,
|
|
561
|
-
* @type {
|
|
560
|
+
* 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.
|
|
561
|
+
* @type {string}
|
|
562
562
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
563
563
|
*/
|
|
564
|
-
readonly pageToken?:
|
|
564
|
+
readonly pageToken?: string
|
|
565
565
|
|
|
566
566
|
/**
|
|
567
567
|
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
568
|
-
* @type {
|
|
568
|
+
* @type {string}
|
|
569
569
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
570
570
|
*/
|
|
571
|
-
readonly filter?:
|
|
571
|
+
readonly filter?: string
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
574
|
* To search the list by any field, pass search=xxx to fetch the result.
|
|
575
|
-
* @type {
|
|
575
|
+
* @type {string}
|
|
576
576
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
577
577
|
*/
|
|
578
|
-
readonly search?:
|
|
578
|
+
readonly search?: string
|
|
579
579
|
|
|
580
580
|
/**
|
|
581
581
|
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
582
|
-
* @type {
|
|
582
|
+
* @type {string}
|
|
583
583
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
584
584
|
*/
|
|
585
|
-
readonly order?:
|
|
585
|
+
readonly order?: string
|
|
586
586
|
|
|
587
587
|
/**
|
|
588
|
-
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
589
|
-
* @type {
|
|
588
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
589
|
+
* @type {string}
|
|
590
590
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
591
591
|
*/
|
|
592
|
-
readonly expand?:
|
|
592
|
+
readonly expand?: string
|
|
593
593
|
|
|
594
594
|
/**
|
|
595
595
|
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
|
|
596
|
-
* @type {
|
|
596
|
+
* @type {string}
|
|
597
597
|
* @memberof NotificationTemplatesApiListNotificationTemplates
|
|
598
598
|
*/
|
|
599
|
-
readonly filters?:
|
|
599
|
+
readonly filters?: string
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
/**
|
|
@@ -635,7 +635,7 @@ export interface NotificationTemplatesApiUpdateNotificationTemplateRequest {
|
|
|
635
635
|
*/
|
|
636
636
|
export class NotificationTemplatesApi extends BaseAPI {
|
|
637
637
|
/**
|
|
638
|
-
*
|
|
638
|
+
* undefined **Required Permissions** \"notification-management.email-templates.create\"
|
|
639
639
|
* @param {NotificationTemplatesApiCreateNotificationTemplateRequest} requestParameters Request parameters.
|
|
640
640
|
* @param {*} [options] Override http request option.
|
|
641
641
|
* @throws {RequiredError}
|
|
@@ -646,7 +646,7 @@ export class NotificationTemplatesApi extends BaseAPI {
|
|
|
646
646
|
}
|
|
647
647
|
|
|
648
648
|
/**
|
|
649
|
-
*
|
|
649
|
+
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
|
|
650
650
|
* @param {NotificationTemplatesApiDeleteNotificationTemplateRequest} requestParameters Request parameters.
|
|
651
651
|
* @param {*} [options] Override http request option.
|
|
652
652
|
* @throws {RequiredError}
|
|
@@ -657,7 +657,7 @@ export class NotificationTemplatesApi extends BaseAPI {
|
|
|
657
657
|
}
|
|
658
658
|
|
|
659
659
|
/**
|
|
660
|
-
*
|
|
660
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
661
661
|
* @param {NotificationTemplatesApiGetNotificationTemplateRequest} requestParameters Request parameters.
|
|
662
662
|
* @param {*} [options] Override http request option.
|
|
663
663
|
* @throws {RequiredError}
|
|
@@ -668,7 +668,7 @@ export class NotificationTemplatesApi extends BaseAPI {
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
/**
|
|
671
|
-
*
|
|
671
|
+
* undefined **Required Permissions** \"notification-management.email-templates.view\"
|
|
672
672
|
* @param {NotificationTemplatesApiListNotificationTemplatesRequest} requestParameters Request parameters.
|
|
673
673
|
* @param {*} [options] Override http request option.
|
|
674
674
|
* @throws {RequiredError}
|
|
@@ -679,7 +679,7 @@ export class NotificationTemplatesApi extends BaseAPI {
|
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
/**
|
|
682
|
-
*
|
|
682
|
+
* undefined **Required Permissions** \"notification-management.email-templates.update\"
|
|
683
683
|
* @param {NotificationTemplatesApiUpdateNotificationTemplateRequest} requestParameters Request parameters.
|
|
684
684
|
* @param {*} [options] Override http request option.
|
|
685
685
|
* @throws {RequiredError}
|
package/api/notifications-api.ts
CHANGED
|
@@ -35,7 +35,7 @@ const FormData = require('form-data');
|
|
|
35
35
|
export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
36
|
return {
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* undefined **Required Permissions** none
|
|
39
39
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
40
40
|
* @param {string} [authorization] Bearer Token
|
|
41
41
|
* @param {*} [options] Override http request option.
|
|
@@ -91,7 +91,7 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
91
91
|
const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
|
|
92
92
|
return {
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* undefined **Required Permissions** none
|
|
95
95
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
96
96
|
* @param {string} [authorization] Bearer Token
|
|
97
97
|
* @param {*} [options] Override http request option.
|
|
@@ -112,7 +112,7 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
112
112
|
const localVarFp = NotificationsApiFp(configuration)
|
|
113
113
|
return {
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* undefined **Required Permissions** none
|
|
116
116
|
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
117
117
|
* @param {string} [authorization] Bearer Token
|
|
118
118
|
* @param {*} [options] Override http request option.
|
|
@@ -153,7 +153,7 @@ export interface NotificationsApiSendNotificationRequest {
|
|
|
153
153
|
*/
|
|
154
154
|
export class NotificationsApi extends BaseAPI {
|
|
155
155
|
/**
|
|
156
|
-
*
|
|
156
|
+
* undefined **Required Permissions** none
|
|
157
157
|
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
|
|
158
158
|
* @param {*} [options] Override http request option.
|
|
159
159
|
* @throws {RequiredError}
|
package/base.ts
CHANGED
|
@@ -44,6 +44,16 @@ export interface LoginClass {
|
|
|
44
44
|
permissions: string;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
export interface SwitchWorkspaceRequest {
|
|
48
|
+
username: string;
|
|
49
|
+
targetWorkspace: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface SwitchWorkspaceResponseClass {
|
|
53
|
+
accessToken: string;
|
|
54
|
+
permissions: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
export enum Environment {
|
|
48
58
|
Production = 'https://apiv2.emil.de',
|
|
49
59
|
Test = 'https://apiv2-test.emil.de',
|
|
@@ -94,13 +104,13 @@ export class BaseAPI {
|
|
|
94
104
|
this.attachInterceptor(axios);
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
async initialize(env: Environment = Environment.Production) {
|
|
107
|
+
async initialize(env: Environment = Environment.Production, targetWorkspace?: string) {
|
|
98
108
|
this.configuration.basePath = env;
|
|
99
109
|
|
|
100
110
|
await this.loadCredentials();
|
|
101
111
|
|
|
102
112
|
if (this.username) {
|
|
103
|
-
await this.authorize(this.username, this.password);
|
|
113
|
+
await this.authorize(this.username, this.password, targetWorkspace);
|
|
104
114
|
this.password = null; // to avoid keeping password loaded in memory.
|
|
105
115
|
}
|
|
106
116
|
}
|
|
@@ -150,7 +160,7 @@ export class BaseAPI {
|
|
|
150
160
|
this.configuration.basePath = env;
|
|
151
161
|
}
|
|
152
162
|
|
|
153
|
-
async authorize(username: string, password: string): Promise<void> {
|
|
163
|
+
async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
|
|
154
164
|
const options: AxiosRequestConfig = {
|
|
155
165
|
method: 'POST',
|
|
156
166
|
url: `${this.configuration.basePath}/authservice/v1/login`,
|
|
@@ -170,6 +180,38 @@ export class BaseAPI {
|
|
|
170
180
|
|
|
171
181
|
const refreshToken = this.extractRefreshToken(response)
|
|
172
182
|
this.configuration.refreshToken = refreshToken;
|
|
183
|
+
|
|
184
|
+
// Switch workspace if provided
|
|
185
|
+
if (targetWorkspace) {
|
|
186
|
+
await this.switchWorkspace(targetWorkspace);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
async switchWorkspace(targetWorkspace: string): Promise<void> {
|
|
191
|
+
const options: AxiosRequestConfig = {
|
|
192
|
+
method: 'POST',
|
|
193
|
+
url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
|
|
194
|
+
headers: {
|
|
195
|
+
'Content-Type': 'application/json',
|
|
196
|
+
'Authorization': `Bearer ${this.configuration.accessToken}`,
|
|
197
|
+
'Cookie': this.configuration.refreshToken,
|
|
198
|
+
},
|
|
199
|
+
data: {
|
|
200
|
+
username: this.configuration.username,
|
|
201
|
+
targetWorkspace,
|
|
202
|
+
} as SwitchWorkspaceRequest,
|
|
203
|
+
withCredentials: true,
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
|
|
207
|
+
|
|
208
|
+
const { data: { accessToken } } = response;
|
|
209
|
+
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
210
|
+
|
|
211
|
+
const refreshToken = this.extractRefreshToken(response);
|
|
212
|
+
if (refreshToken) {
|
|
213
|
+
this.configuration.refreshToken = refreshToken;
|
|
214
|
+
}
|
|
173
215
|
}
|
|
174
216
|
|
|
175
217
|
async refreshTokenInternal(): Promise<string> {
|
|
@@ -225,7 +267,7 @@ export class BaseAPI {
|
|
|
225
267
|
const tokenString = await this.refreshTokenInternal();
|
|
226
268
|
const accessToken = `Bearer ${tokenString}`;
|
|
227
269
|
|
|
228
|
-
originalConfig.headers['Authorization'] =
|
|
270
|
+
originalConfig.headers['Authorization'] = accessToken;
|
|
229
271
|
|
|
230
272
|
this.configuration.accessToken = accessToken;
|
|
231
273
|
|
|
@@ -278,7 +320,7 @@ export class BaseAPI {
|
|
|
278
320
|
* @extends {Error}
|
|
279
321
|
*/
|
|
280
322
|
export class RequiredError extends Error {
|
|
281
|
-
name: "RequiredError" = "RequiredError";
|
|
323
|
+
override name: "RequiredError" = "RequiredError";
|
|
282
324
|
constructor(public field: string, msg?: string) {
|
|
283
325
|
super(msg);
|
|
284
326
|
}
|
package/common.ts
CHANGED
|
@@ -66,7 +66,7 @@ export const setBearerAuthToObject = async function (object: any, configuration?
|
|
|
66
66
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
67
67
|
? await configuration.accessToken()
|
|
68
68
|
: await configuration.accessToken;
|
|
69
|
-
object["Authorization"] =
|
|
69
|
+
object["Authorization"] = configuration.getBearerToken(accessToken);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -79,7 +79,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
79
79
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
80
80
|
? await configuration.accessToken(name, scopes)
|
|
81
81
|
: await configuration.accessToken;
|
|
82
|
-
object["Authorization"] =
|
|
82
|
+
object["Authorization"] = configuration.getBearerToken(localVarAccessTokenValue);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
package/configuration.ts
CHANGED
|
@@ -106,4 +106,13 @@ export class Configuration {
|
|
|
106
106
|
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
107
107
|
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Returns "Bearer" token.
|
|
112
|
+
* @param token - access token.
|
|
113
|
+
* @return Bearer token.
|
|
114
|
+
*/
|
|
115
|
+
public getBearerToken(token?: string): string {
|
|
116
|
+
return ('' + token).startsWith("Bearer") ? token : "Bearer " + token;
|
|
117
|
+
}
|
|
109
118
|
}
|
|
@@ -19,7 +19,8 @@ import { InlineResponse200 } from '../models';
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
23
|
+
* @summary Health Check
|
|
23
24
|
* @param {*} [options] Override http request option.
|
|
24
25
|
* @throws {RequiredError}
|
|
25
26
|
*/
|
|
@@ -31,7 +32,8 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
31
32
|
*/
|
|
32
33
|
export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
36
|
+
* @summary Health Check
|
|
35
37
|
* @param {*} [options] Override http request option.
|
|
36
38
|
* @throws {RequiredError}
|
|
37
39
|
*/
|
|
@@ -43,7 +45,8 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
43
45
|
*/
|
|
44
46
|
export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
45
47
|
/**
|
|
46
|
-
*
|
|
48
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
49
|
+
* @summary Health Check
|
|
47
50
|
* @param {*} [options] Override http request option.
|
|
48
51
|
* @throws {RequiredError}
|
|
49
52
|
*/
|
|
@@ -57,7 +60,8 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
57
60
|
*/
|
|
58
61
|
export declare class DefaultApi extends BaseAPI {
|
|
59
62
|
/**
|
|
60
|
-
*
|
|
63
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
64
|
+
* @summary Health Check
|
|
61
65
|
* @param {*} [options] Override http request option.
|
|
62
66
|
* @throws {RequiredError}
|
|
63
67
|
* @memberof DefaultApi
|
package/dist/api/default-api.js
CHANGED
|
@@ -97,7 +97,8 @@ var DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
101
|
+
* @summary Health Check
|
|
101
102
|
* @param {*} [options] Override http request option.
|
|
102
103
|
* @throws {RequiredError}
|
|
103
104
|
*/
|
|
@@ -136,7 +137,8 @@ var DefaultApiFp = function (configuration) {
|
|
|
136
137
|
var localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
|
|
137
138
|
return {
|
|
138
139
|
/**
|
|
139
|
-
*
|
|
140
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
141
|
+
* @summary Health Check
|
|
140
142
|
* @param {*} [options] Override http request option.
|
|
141
143
|
* @throws {RequiredError}
|
|
142
144
|
*/
|
|
@@ -164,7 +166,8 @@ var DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
164
166
|
var localVarFp = (0, exports.DefaultApiFp)(configuration);
|
|
165
167
|
return {
|
|
166
168
|
/**
|
|
167
|
-
*
|
|
169
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
170
|
+
* @summary Health Check
|
|
168
171
|
* @param {*} [options] Override http request option.
|
|
169
172
|
* @throws {RequiredError}
|
|
170
173
|
*/
|
|
@@ -186,7 +189,8 @@ var DefaultApi = /** @class */ (function (_super) {
|
|
|
186
189
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
187
190
|
}
|
|
188
191
|
/**
|
|
189
|
-
*
|
|
192
|
+
* Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
|
|
193
|
+
* @summary Health Check
|
|
190
194
|
* @param {*} [options] Override http request option.
|
|
191
195
|
* @throws {RequiredError}
|
|
192
196
|
* @memberof DefaultApi
|
|
@@ -22,7 +22,7 @@ import { InitiateEmailVerificationResponseClass } from '../models';
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const EmailVerificationsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* undefined **Required Permissions** none
|
|
26
26
|
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
|
|
27
27
|
* @param {string} [authorization] Bearer Token
|
|
28
28
|
* @param {*} [options] Override http request option.
|
|
@@ -30,7 +30,7 @@ export declare const EmailVerificationsApiAxiosParamCreator: (configuration?: Co
|
|
|
30
30
|
*/
|
|
31
31
|
completeEmailVerification: (completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* undefined **Required Permissions** none
|
|
34
34
|
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
|
|
35
35
|
* @param {string} [authorization] Bearer Token
|
|
36
36
|
* @param {*} [options] Override http request option.
|
|
@@ -44,7 +44,7 @@ export declare const EmailVerificationsApiAxiosParamCreator: (configuration?: Co
|
|
|
44
44
|
*/
|
|
45
45
|
export declare const EmailVerificationsApiFp: (configuration?: Configuration) => {
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* undefined **Required Permissions** none
|
|
48
48
|
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
|
|
49
49
|
* @param {string} [authorization] Bearer Token
|
|
50
50
|
* @param {*} [options] Override http request option.
|
|
@@ -52,7 +52,7 @@ export declare const EmailVerificationsApiFp: (configuration?: Configuration) =>
|
|
|
52
52
|
*/
|
|
53
53
|
completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompleteEmailVerificationResponseClass>>;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* undefined **Required Permissions** none
|
|
56
56
|
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
|
|
57
57
|
* @param {string} [authorization] Bearer Token
|
|
58
58
|
* @param {*} [options] Override http request option.
|
|
@@ -66,7 +66,7 @@ export declare const EmailVerificationsApiFp: (configuration?: Configuration) =>
|
|
|
66
66
|
*/
|
|
67
67
|
export declare const EmailVerificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* undefined **Required Permissions** none
|
|
70
70
|
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
|
|
71
71
|
* @param {string} [authorization] Bearer Token
|
|
72
72
|
* @param {*} [options] Override http request option.
|
|
@@ -74,7 +74,7 @@ export declare const EmailVerificationsApiFactory: (configuration?: Configuratio
|
|
|
74
74
|
*/
|
|
75
75
|
completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: any): AxiosPromise<CompleteEmailVerificationResponseClass>;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* undefined **Required Permissions** none
|
|
78
78
|
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
|
|
79
79
|
* @param {string} [authorization] Bearer Token
|
|
80
80
|
* @param {*} [options] Override http request option.
|
|
@@ -128,7 +128,7 @@ export interface EmailVerificationsApiInitiateEmailVerificationRequest {
|
|
|
128
128
|
*/
|
|
129
129
|
export declare class EmailVerificationsApi extends BaseAPI {
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* undefined **Required Permissions** none
|
|
132
132
|
* @param {EmailVerificationsApiCompleteEmailVerificationRequest} requestParameters Request parameters.
|
|
133
133
|
* @param {*} [options] Override http request option.
|
|
134
134
|
* @throws {RequiredError}
|
|
@@ -136,7 +136,7 @@ export declare class EmailVerificationsApi extends BaseAPI {
|
|
|
136
136
|
*/
|
|
137
137
|
completeEmailVerification(requestParameters: EmailVerificationsApiCompleteEmailVerificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CompleteEmailVerificationResponseClass, any>>;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* undefined **Required Permissions** none
|
|
140
140
|
* @param {EmailVerificationsApiInitiateEmailVerificationRequest} requestParameters Request parameters.
|
|
141
141
|
* @param {*} [options] Override http request option.
|
|
142
142
|
* @throws {RequiredError}
|