@emilgroup/notification-sdk 0.8.1-beta.28 → 0.8.1-beta.29
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/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/email-messages-api.ts +120 -0
- package/api/notifications-api.ts +107 -0
- package/dist/api/email-messages-api.d.ts +66 -0
- package/dist/api/email-messages-api.js +99 -0
- package/dist/api/notifications-api.d.ts +57 -0
- package/dist/api/notifications-api.js +93 -0
- package/dist/models/assign-email-message-entity-body-dto.d.ts +43 -0
- package/dist/models/assign-email-message-entity-body-dto.js +22 -0
- package/dist/models/assign-email-message-entity-response-class.d.ts +25 -0
- package/dist/models/assign-email-message-entity-response-class.js +15 -0
- package/dist/models/email-message-class.d.ts +2 -1
- package/dist/models/email-message-class.js +2 -1
- package/dist/models/grpc-send-email-request-dto.d.ts +137 -0
- package/dist/models/grpc-send-email-request-dto.js +22 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/inline-attachment-dto.d.ts +36 -0
- package/dist/models/inline-attachment-dto.js +15 -0
- package/dist/models/send-email-request-dto.d.ts +131 -0
- package/dist/models/send-email-request-dto.js +22 -0
- package/dist/models/send-email-response-class.d.ts +24 -0
- package/dist/models/send-email-response-class.js +15 -0
- package/models/assign-email-message-entity-body-dto.ts +52 -0
- package/models/assign-email-message-entity-response-class.ts +31 -0
- package/models/email-message-class.ts +3 -2
- package/models/grpc-send-email-request-dto.ts +144 -0
- package/models/index.ts +6 -0
- package/models/inline-attachment-dto.ts +42 -0
- package/models/send-email-request-dto.ts +138 -0
- package/models/send-email-response-class.ts +30 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -16,6 +16,8 @@ common.ts
|
|
|
16
16
|
configuration.ts
|
|
17
17
|
git_push.sh
|
|
18
18
|
index.ts
|
|
19
|
+
models/assign-email-message-entity-body-dto.ts
|
|
20
|
+
models/assign-email-message-entity-response-class.ts
|
|
19
21
|
models/complete-email-verification-dto.ts
|
|
20
22
|
models/complete-email-verification-response-class.ts
|
|
21
23
|
models/create-layout-request-dto.ts
|
|
@@ -34,10 +36,12 @@ models/get-layout-request-dto.ts
|
|
|
34
36
|
models/get-layout-response-class.ts
|
|
35
37
|
models/get-notification-template-request-dto.ts
|
|
36
38
|
models/get-notification-template-response-class.ts
|
|
39
|
+
models/grpc-send-email-request-dto.ts
|
|
37
40
|
models/html-template-class.ts
|
|
38
41
|
models/index.ts
|
|
39
42
|
models/initiate-email-verification-dto.ts
|
|
40
43
|
models/initiate-email-verification-response-class.ts
|
|
44
|
+
models/inline-attachment-dto.ts
|
|
41
45
|
models/inline-response200.ts
|
|
42
46
|
models/inline-response503.ts
|
|
43
47
|
models/layout-class.ts
|
|
@@ -48,6 +52,8 @@ models/list-layouts-response-class.ts
|
|
|
48
52
|
models/list-notification-templates-response-class.ts
|
|
49
53
|
models/notification-template-class.ts
|
|
50
54
|
models/s3-document-dto.ts
|
|
55
|
+
models/send-email-request-dto.ts
|
|
56
|
+
models/send-email-response-class.ts
|
|
51
57
|
models/send-notification-request-dto.ts
|
|
52
58
|
models/send-notification-response-class.ts
|
|
53
59
|
models/update-html-template-request-dto.ts
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/notification-sdk@0.8.1-beta.
|
|
20
|
+
npm install @emilgroup/notification-sdk@0.8.1-beta.29 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/notification-sdk@0.8.1-beta.
|
|
24
|
+
yarn add @emilgroup/notification-sdk@0.8.1-beta.29
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
|
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
|
+
import { AssignEmailMessageEntityBodyDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { AssignEmailMessageEntityResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
24
28
|
import { DownloadAttachmentResponseClass } from '../models';
|
|
25
29
|
// @ts-ignore
|
|
26
30
|
import { GetEmailMessageResponseClass } from '../models';
|
|
@@ -34,6 +38,57 @@ import { ListEmailMessagesResponseClass } from '../models';
|
|
|
34
38
|
*/
|
|
35
39
|
export const EmailMessagesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
40
|
return {
|
|
41
|
+
/**
|
|
42
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
43
|
+
* @summary Assign an email message to an entity
|
|
44
|
+
* @param {string} code
|
|
45
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
46
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
*/
|
|
50
|
+
assignEntity: async (code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
51
|
+
// verify required parameter 'code' is not null or undefined
|
|
52
|
+
assertParamExists('assignEntity', 'code', code)
|
|
53
|
+
// verify required parameter 'assignEmailMessageEntityBodyDto' is not null or undefined
|
|
54
|
+
assertParamExists('assignEntity', 'assignEmailMessageEntityBodyDto', assignEmailMessageEntityBodyDto)
|
|
55
|
+
const localVarPath = `/notificationservice/v1/email-messages/{code}/entity`
|
|
56
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
57
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
58
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
59
|
+
let baseOptions;
|
|
60
|
+
let baseAccessToken;
|
|
61
|
+
if (configuration) {
|
|
62
|
+
baseOptions = configuration.baseOptions;
|
|
63
|
+
baseAccessToken = configuration.accessToken;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
67
|
+
const localVarHeaderParameter = {} as any;
|
|
68
|
+
const localVarQueryParameter = {} as any;
|
|
69
|
+
|
|
70
|
+
// authentication bearer required
|
|
71
|
+
// http bearer authentication required
|
|
72
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
73
|
+
|
|
74
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
75
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
81
|
+
|
|
82
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
83
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
84
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
85
|
+
localVarRequestOptions.data = serializeDataIfNeeded(assignEmailMessageEntityBodyDto, localVarRequestOptions, configuration)
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
url: toPathString(localVarUrlObj),
|
|
89
|
+
options: localVarRequestOptions,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
37
92
|
/**
|
|
38
93
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
39
94
|
* @summary Download the email message attachment
|
|
@@ -259,6 +314,19 @@ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Confi
|
|
|
259
314
|
export const EmailMessagesApiFp = function(configuration?: Configuration) {
|
|
260
315
|
const localVarAxiosParamCreator = EmailMessagesApiAxiosParamCreator(configuration)
|
|
261
316
|
return {
|
|
317
|
+
/**
|
|
318
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
319
|
+
* @summary Assign an email message to an entity
|
|
320
|
+
* @param {string} code
|
|
321
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
322
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
323
|
+
* @param {*} [options] Override http request option.
|
|
324
|
+
* @throws {RequiredError}
|
|
325
|
+
*/
|
|
326
|
+
async assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssignEmailMessageEntityResponseClass>> {
|
|
327
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.assignEntity(code, assignEmailMessageEntityBodyDto, authorization, options);
|
|
328
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
329
|
+
},
|
|
262
330
|
/**
|
|
263
331
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
264
332
|
* @summary Download the email message attachment
|
|
@@ -324,6 +392,18 @@ export const EmailMessagesApiFp = function(configuration?: Configuration) {
|
|
|
324
392
|
export const EmailMessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
325
393
|
const localVarFp = EmailMessagesApiFp(configuration)
|
|
326
394
|
return {
|
|
395
|
+
/**
|
|
396
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
397
|
+
* @summary Assign an email message to an entity
|
|
398
|
+
* @param {string} code
|
|
399
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
400
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
401
|
+
* @param {*} [options] Override http request option.
|
|
402
|
+
* @throws {RequiredError}
|
|
403
|
+
*/
|
|
404
|
+
assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: any): AxiosPromise<AssignEmailMessageEntityResponseClass> {
|
|
405
|
+
return localVarFp.assignEntity(code, assignEmailMessageEntityBodyDto, authorization, options).then((request) => request(axios, basePath));
|
|
406
|
+
},
|
|
327
407
|
/**
|
|
328
408
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
329
409
|
* @summary Download the email message attachment
|
|
@@ -378,6 +458,34 @@ export const EmailMessagesApiFactory = function (configuration?: Configuration,
|
|
|
378
458
|
};
|
|
379
459
|
};
|
|
380
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Request parameters for assignEntity operation in EmailMessagesApi.
|
|
463
|
+
* @export
|
|
464
|
+
* @interface EmailMessagesApiAssignEntityRequest
|
|
465
|
+
*/
|
|
466
|
+
export interface EmailMessagesApiAssignEntityRequest {
|
|
467
|
+
/**
|
|
468
|
+
*
|
|
469
|
+
* @type {string}
|
|
470
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
471
|
+
*/
|
|
472
|
+
readonly code: string
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
*
|
|
476
|
+
* @type {AssignEmailMessageEntityBodyDto}
|
|
477
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
478
|
+
*/
|
|
479
|
+
readonly assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
483
|
+
* @type {string}
|
|
484
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
485
|
+
*/
|
|
486
|
+
readonly authorization?: string
|
|
487
|
+
}
|
|
488
|
+
|
|
381
489
|
/**
|
|
382
490
|
* Request parameters for downloadAttachment operation in EmailMessagesApi.
|
|
383
491
|
* @export
|
|
@@ -518,6 +626,18 @@ export interface EmailMessagesApiListEmailMessagesRequest {
|
|
|
518
626
|
* @extends {BaseAPI}
|
|
519
627
|
*/
|
|
520
628
|
export class EmailMessagesApi extends BaseAPI {
|
|
629
|
+
/**
|
|
630
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
631
|
+
* @summary Assign an email message to an entity
|
|
632
|
+
* @param {EmailMessagesApiAssignEntityRequest} requestParameters Request parameters.
|
|
633
|
+
* @param {*} [options] Override http request option.
|
|
634
|
+
* @throws {RequiredError}
|
|
635
|
+
* @memberof EmailMessagesApi
|
|
636
|
+
*/
|
|
637
|
+
public assignEntity(requestParameters: EmailMessagesApiAssignEntityRequest, options?: AxiosRequestConfig) {
|
|
638
|
+
return EmailMessagesApiFp(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailMessageEntityBodyDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
639
|
+
}
|
|
640
|
+
|
|
521
641
|
/**
|
|
522
642
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
523
643
|
* @summary Download the email message attachment
|
package/api/notifications-api.ts
CHANGED
|
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
|
+
import { SendEmailRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { SendEmailResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
24
28
|
import { SendNotificationRequestDto } from '../models';
|
|
25
29
|
// @ts-ignore
|
|
26
30
|
import { SendNotificationResponseClass } from '../models';
|
|
@@ -30,6 +34,53 @@ import { SendNotificationResponseClass } from '../models';
|
|
|
30
34
|
*/
|
|
31
35
|
export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
36
|
return {
|
|
37
|
+
/**
|
|
38
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
39
|
+
* @summary Send an email without a template
|
|
40
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
41
|
+
* @param {string} [authorization] Bearer Token
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
sendEmail: async (sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'sendEmailRequestDto' is not null or undefined
|
|
47
|
+
assertParamExists('sendEmail', 'sendEmailRequestDto', sendEmailRequestDto)
|
|
48
|
+
const localVarPath = `/notificationservice/v1/notifications/emails`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
let baseAccessToken;
|
|
53
|
+
if (configuration) {
|
|
54
|
+
baseOptions = configuration.baseOptions;
|
|
55
|
+
baseAccessToken = configuration.accessToken;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
59
|
+
const localVarHeaderParameter = {} as any;
|
|
60
|
+
const localVarQueryParameter = {} as any;
|
|
61
|
+
|
|
62
|
+
// authentication bearer required
|
|
63
|
+
// http bearer authentication required
|
|
64
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
65
|
+
|
|
66
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
67
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
+
localVarRequestOptions.data = serializeDataIfNeeded(sendEmailRequestDto, localVarRequestOptions, configuration)
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
url: toPathString(localVarUrlObj),
|
|
81
|
+
options: localVarRequestOptions,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
33
84
|
/**
|
|
34
85
|
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
35
86
|
* @summary Send a notification
|
|
@@ -87,6 +138,18 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
87
138
|
export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
88
139
|
const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
|
|
89
140
|
return {
|
|
141
|
+
/**
|
|
142
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
143
|
+
* @summary Send an email without a template
|
|
144
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
145
|
+
* @param {string} [authorization] Bearer Token
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
async sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendEmailResponseClass>> {
|
|
150
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendEmail(sendEmailRequestDto, authorization, options);
|
|
151
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
152
|
+
},
|
|
90
153
|
/**
|
|
91
154
|
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
92
155
|
* @summary Send a notification
|
|
@@ -109,6 +172,17 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
109
172
|
export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
110
173
|
const localVarFp = NotificationsApiFp(configuration)
|
|
111
174
|
return {
|
|
175
|
+
/**
|
|
176
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
177
|
+
* @summary Send an email without a template
|
|
178
|
+
* @param {SendEmailRequestDto} sendEmailRequestDto
|
|
179
|
+
* @param {string} [authorization] Bearer Token
|
|
180
|
+
* @param {*} [options] Override http request option.
|
|
181
|
+
* @throws {RequiredError}
|
|
182
|
+
*/
|
|
183
|
+
sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: any): AxiosPromise<SendEmailResponseClass> {
|
|
184
|
+
return localVarFp.sendEmail(sendEmailRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
185
|
+
},
|
|
112
186
|
/**
|
|
113
187
|
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
114
188
|
* @summary Send a notification
|
|
@@ -123,6 +197,27 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
123
197
|
};
|
|
124
198
|
};
|
|
125
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Request parameters for sendEmail operation in NotificationsApi.
|
|
202
|
+
* @export
|
|
203
|
+
* @interface NotificationsApiSendEmailRequest
|
|
204
|
+
*/
|
|
205
|
+
export interface NotificationsApiSendEmailRequest {
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @type {SendEmailRequestDto}
|
|
209
|
+
* @memberof NotificationsApiSendEmail
|
|
210
|
+
*/
|
|
211
|
+
readonly sendEmailRequestDto: SendEmailRequestDto
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Bearer Token
|
|
215
|
+
* @type {string}
|
|
216
|
+
* @memberof NotificationsApiSendEmail
|
|
217
|
+
*/
|
|
218
|
+
readonly authorization?: string
|
|
219
|
+
}
|
|
220
|
+
|
|
126
221
|
/**
|
|
127
222
|
* Request parameters for sendNotification operation in NotificationsApi.
|
|
128
223
|
* @export
|
|
@@ -151,6 +246,18 @@ export interface NotificationsApiSendNotificationRequest {
|
|
|
151
246
|
* @extends {BaseAPI}
|
|
152
247
|
*/
|
|
153
248
|
export class NotificationsApi extends BaseAPI {
|
|
249
|
+
/**
|
|
250
|
+
* Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
|
|
251
|
+
* @summary Send an email without a template
|
|
252
|
+
* @param {NotificationsApiSendEmailRequest} requestParameters Request parameters.
|
|
253
|
+
* @param {*} [options] Override http request option.
|
|
254
|
+
* @throws {RequiredError}
|
|
255
|
+
* @memberof NotificationsApi
|
|
256
|
+
*/
|
|
257
|
+
public sendEmail(requestParameters: NotificationsApiSendEmailRequest, options?: AxiosRequestConfig) {
|
|
258
|
+
return NotificationsApiFp(this.configuration).sendEmail(requestParameters.sendEmailRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
259
|
+
}
|
|
260
|
+
|
|
154
261
|
/**
|
|
155
262
|
* Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
|
|
156
263
|
* @summary Send a notification
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
13
|
import { Configuration } from '../configuration';
|
|
14
14
|
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { AssignEmailMessageEntityBodyDto } from '../models';
|
|
16
|
+
import { AssignEmailMessageEntityResponseClass } from '../models';
|
|
15
17
|
import { DownloadAttachmentResponseClass } from '../models';
|
|
16
18
|
import { GetEmailMessageResponseClass } from '../models';
|
|
17
19
|
import { ListEmailAttachmentsResponseClass } from '../models';
|
|
@@ -21,6 +23,16 @@ import { ListEmailMessagesResponseClass } from '../models';
|
|
|
21
23
|
* @export
|
|
22
24
|
*/
|
|
23
25
|
export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
26
|
+
/**
|
|
27
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
28
|
+
* @summary Assign an email message to an entity
|
|
29
|
+
* @param {string} code
|
|
30
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
31
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
32
|
+
* @param {*} [options] Override http request option.
|
|
33
|
+
* @throws {RequiredError}
|
|
34
|
+
*/
|
|
35
|
+
assignEntity: (code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
24
36
|
/**
|
|
25
37
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
26
38
|
* @summary Download the email message attachment
|
|
@@ -70,6 +82,16 @@ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configu
|
|
|
70
82
|
* @export
|
|
71
83
|
*/
|
|
72
84
|
export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
|
|
85
|
+
/**
|
|
86
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
87
|
+
* @summary Assign an email message to an entity
|
|
88
|
+
* @param {string} code
|
|
89
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
90
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
*/
|
|
94
|
+
assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssignEmailMessageEntityResponseClass>>;
|
|
73
95
|
/**
|
|
74
96
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
75
97
|
* @summary Download the email message attachment
|
|
@@ -119,6 +141,16 @@ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
|
|
|
119
141
|
* @export
|
|
120
142
|
*/
|
|
121
143
|
export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
144
|
+
/**
|
|
145
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
146
|
+
* @summary Assign an email message to an entity
|
|
147
|
+
* @param {string} code
|
|
148
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
149
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
assignEntity(code: string, assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto, authorization?: string, options?: any): AxiosPromise<AssignEmailMessageEntityResponseClass>;
|
|
122
154
|
/**
|
|
123
155
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
124
156
|
* @summary Download the email message attachment
|
|
@@ -163,6 +195,31 @@ export declare const EmailMessagesApiFactory: (configuration?: Configuration, ba
|
|
|
163
195
|
*/
|
|
164
196
|
listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass>;
|
|
165
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* Request parameters for assignEntity operation in EmailMessagesApi.
|
|
200
|
+
* @export
|
|
201
|
+
* @interface EmailMessagesApiAssignEntityRequest
|
|
202
|
+
*/
|
|
203
|
+
export interface EmailMessagesApiAssignEntityRequest {
|
|
204
|
+
/**
|
|
205
|
+
*
|
|
206
|
+
* @type {string}
|
|
207
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
208
|
+
*/
|
|
209
|
+
readonly code: string;
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @type {AssignEmailMessageEntityBodyDto}
|
|
213
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
214
|
+
*/
|
|
215
|
+
readonly assignEmailMessageEntityBodyDto: AssignEmailMessageEntityBodyDto;
|
|
216
|
+
/**
|
|
217
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
218
|
+
* @type {string}
|
|
219
|
+
* @memberof EmailMessagesApiAssignEntity
|
|
220
|
+
*/
|
|
221
|
+
readonly authorization?: string;
|
|
222
|
+
}
|
|
166
223
|
/**
|
|
167
224
|
* Request parameters for downloadAttachment operation in EmailMessagesApi.
|
|
168
225
|
* @export
|
|
@@ -288,6 +345,15 @@ export interface EmailMessagesApiListEmailMessagesRequest {
|
|
|
288
345
|
* @extends {BaseAPI}
|
|
289
346
|
*/
|
|
290
347
|
export declare class EmailMessagesApi extends BaseAPI {
|
|
348
|
+
/**
|
|
349
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
350
|
+
* @summary Assign an email message to an entity
|
|
351
|
+
* @param {EmailMessagesApiAssignEntityRequest} requestParameters Request parameters.
|
|
352
|
+
* @param {*} [options] Override http request option.
|
|
353
|
+
* @throws {RequiredError}
|
|
354
|
+
* @memberof EmailMessagesApi
|
|
355
|
+
*/
|
|
356
|
+
assignEntity(requestParameters: EmailMessagesApiAssignEntityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AssignEmailMessageEntityResponseClass, any, {}>>;
|
|
291
357
|
/**
|
|
292
358
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
293
359
|
* @summary Download the email message attachment
|
|
@@ -92,6 +92,59 @@ var base_1 = require("../base");
|
|
|
92
92
|
var EmailMessagesApiAxiosParamCreator = function (configuration) {
|
|
93
93
|
var _this = this;
|
|
94
94
|
return {
|
|
95
|
+
/**
|
|
96
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
97
|
+
* @summary Assign an email message to an entity
|
|
98
|
+
* @param {string} code
|
|
99
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
100
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
*/
|
|
104
|
+
assignEntity: function (code, assignEmailMessageEntityBodyDto, authorization, options) {
|
|
105
|
+
if (options === void 0) { options = {}; }
|
|
106
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
107
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
// verify required parameter 'code' is not null or undefined
|
|
112
|
+
(0, common_1.assertParamExists)('assignEntity', 'code', code);
|
|
113
|
+
// verify required parameter 'assignEmailMessageEntityBodyDto' is not null or undefined
|
|
114
|
+
(0, common_1.assertParamExists)('assignEntity', 'assignEmailMessageEntityBodyDto', assignEmailMessageEntityBodyDto);
|
|
115
|
+
localVarPath = "/notificationservice/v1/email-messages/{code}/entity"
|
|
116
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
117
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
118
|
+
if (configuration) {
|
|
119
|
+
baseOptions = configuration.baseOptions;
|
|
120
|
+
baseAccessToken = configuration.accessToken;
|
|
121
|
+
}
|
|
122
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
123
|
+
localVarHeaderParameter = {};
|
|
124
|
+
localVarQueryParameter = {};
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
128
|
+
case 1:
|
|
129
|
+
// authentication bearer required
|
|
130
|
+
// http bearer authentication required
|
|
131
|
+
_a.sent();
|
|
132
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
134
|
+
}
|
|
135
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
137
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(assignEmailMessageEntityBodyDto, localVarRequestOptions, configuration);
|
|
140
|
+
return [2 /*return*/, {
|
|
141
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
}];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
},
|
|
95
148
|
/**
|
|
96
149
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
97
150
|
* @summary Download the email message attachment
|
|
@@ -322,6 +375,28 @@ exports.EmailMessagesApiAxiosParamCreator = EmailMessagesApiAxiosParamCreator;
|
|
|
322
375
|
var EmailMessagesApiFp = function (configuration) {
|
|
323
376
|
var localVarAxiosParamCreator = (0, exports.EmailMessagesApiAxiosParamCreator)(configuration);
|
|
324
377
|
return {
|
|
378
|
+
/**
|
|
379
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
380
|
+
* @summary Assign an email message to an entity
|
|
381
|
+
* @param {string} code
|
|
382
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
383
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
*/
|
|
387
|
+
assignEntity: function (code, assignEmailMessageEntityBodyDto, authorization, options) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
389
|
+
var localVarAxiosArgs;
|
|
390
|
+
return __generator(this, function (_a) {
|
|
391
|
+
switch (_a.label) {
|
|
392
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.assignEntity(code, assignEmailMessageEntityBodyDto, authorization, options)];
|
|
393
|
+
case 1:
|
|
394
|
+
localVarAxiosArgs = _a.sent();
|
|
395
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
},
|
|
325
400
|
/**
|
|
326
401
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
327
402
|
* @summary Download the email message attachment
|
|
@@ -423,6 +498,18 @@ exports.EmailMessagesApiFp = EmailMessagesApiFp;
|
|
|
423
498
|
var EmailMessagesApiFactory = function (configuration, basePath, axios) {
|
|
424
499
|
var localVarFp = (0, exports.EmailMessagesApiFp)(configuration);
|
|
425
500
|
return {
|
|
501
|
+
/**
|
|
502
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
503
|
+
* @summary Assign an email message to an entity
|
|
504
|
+
* @param {string} code
|
|
505
|
+
* @param {AssignEmailMessageEntityBodyDto} assignEmailMessageEntityBodyDto
|
|
506
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
507
|
+
* @param {*} [options] Override http request option.
|
|
508
|
+
* @throws {RequiredError}
|
|
509
|
+
*/
|
|
510
|
+
assignEntity: function (code, assignEmailMessageEntityBodyDto, authorization, options) {
|
|
511
|
+
return localVarFp.assignEntity(code, assignEmailMessageEntityBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
512
|
+
},
|
|
426
513
|
/**
|
|
427
514
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
428
515
|
* @summary Download the email message attachment
|
|
@@ -488,6 +575,18 @@ var EmailMessagesApi = /** @class */ (function (_super) {
|
|
|
488
575
|
function EmailMessagesApi() {
|
|
489
576
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
490
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* Links the email message to the given entity, identified by code or by number (the code wins when both are set), and moves it into that entity\'s open thread. The entity must exist. **Required Permissions** \"notification-management.email-messages.update\"
|
|
580
|
+
* @summary Assign an email message to an entity
|
|
581
|
+
* @param {EmailMessagesApiAssignEntityRequest} requestParameters Request parameters.
|
|
582
|
+
* @param {*} [options] Override http request option.
|
|
583
|
+
* @throws {RequiredError}
|
|
584
|
+
* @memberof EmailMessagesApi
|
|
585
|
+
*/
|
|
586
|
+
EmailMessagesApi.prototype.assignEntity = function (requestParameters, options) {
|
|
587
|
+
var _this = this;
|
|
588
|
+
return (0, exports.EmailMessagesApiFp)(this.configuration).assignEntity(requestParameters.code, requestParameters.assignEmailMessageEntityBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
589
|
+
};
|
|
491
590
|
/**
|
|
492
591
|
* Returns a download URL for the given attachment of the email message. **Required Permissions** \"notification-management.email-messages.view\"
|
|
493
592
|
* @summary Download the email message attachment
|