@emilgroup/notification-sdk-node 1.4.1-beta.1 → 1.4.1-beta.14
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 +11 -0
- package/README.md +2 -2
- package/api/email-messages-api.ts +372 -0
- package/api/email-tracking-api.ts +541 -0
- package/api.ts +4 -0
- package/base.ts +0 -1
- package/dist/api/default-api.d.ts +1 -1
- package/dist/api/email-messages-api.d.ts +205 -0
- package/dist/api/email-messages-api.js +405 -0
- package/dist/api/email-tracking-api.d.ts +301 -0
- package/dist/api/email-tracking-api.js +524 -0
- package/dist/api/email-verifications-api.d.ts +2 -2
- package/dist/api/layouts-api.d.ts +5 -5
- package/dist/api/notification-templates-api.d.ts +5 -5
- package/dist/api/notifications-api.d.ts +1 -1
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/common.d.ts +1 -1
- package/dist/models/download-attachment-response-class.d.ts +36 -0
- package/dist/models/download-attachment-response-class.js +15 -0
- package/dist/models/email-attachment-class.d.ts +84 -0
- package/dist/models/email-attachment-class.js +15 -0
- package/dist/models/email-message-class.d.ts +140 -0
- package/dist/models/email-message-class.js +27 -0
- package/dist/models/email-thread-class.d.ts +83 -0
- package/dist/models/email-thread-class.js +20 -0
- package/dist/models/get-email-message-response-class.d.ts +25 -0
- package/dist/models/get-email-message-response-class.js +15 -0
- package/dist/models/get-email-thread-response-class.d.ts +25 -0
- package/dist/models/get-email-thread-response-class.js +15 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/dist/models/list-email-attachments-response-class.d.ts +25 -0
- package/dist/models/list-email-attachments-response-class.js +15 -0
- package/dist/models/list-email-messages-response-class.d.ts +43 -0
- package/dist/models/list-email-messages-response-class.js +15 -0
- package/dist/models/list-email-threads-response-class.d.ts +43 -0
- package/dist/models/list-email-threads-response-class.js +15 -0
- package/dist/models/send-notification-request-dto.d.ts +44 -2
- package/dist/models/send-notification-request-dto.js +6 -0
- package/models/download-attachment-response-class.ts +42 -0
- package/models/email-attachment-class.ts +90 -0
- package/models/email-message-class.ts +150 -0
- package/models/email-thread-class.ts +92 -0
- package/models/get-email-message-response-class.ts +31 -0
- package/models/get-email-thread-response-class.ts +31 -0
- package/models/index.ts +9 -0
- package/models/list-email-attachments-response-class.ts +31 -0
- package/models/list-email-messages-response-class.ts +49 -0
- package/models/list-email-threads-response-class.ts +49 -0
- package/models/send-notification-request-dto.ts +47 -2
- package/package.json +3 -3
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL NotificationService
|
|
3
|
+
* The EMIL NotificationService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { DownloadAttachmentResponseClass } from '../models';
|
|
16
|
+
import { GetEmailMessageResponseClass } from '../models';
|
|
17
|
+
import { ListEmailAttachmentsResponseClass } from '../models';
|
|
18
|
+
/**
|
|
19
|
+
* EmailMessagesApi - axios parameter creator
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
23
|
+
/**
|
|
24
|
+
* undefined **Required Permissions** none
|
|
25
|
+
* @param {string} code
|
|
26
|
+
* @param {number} attachmentId
|
|
27
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
*/
|
|
31
|
+
downloadAttachment: (code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
|
+
/**
|
|
33
|
+
* undefined **Required Permissions** none
|
|
34
|
+
* @param {string} code
|
|
35
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
36
|
+
* @param {*} [options] Override http request option.
|
|
37
|
+
* @throws {RequiredError}
|
|
38
|
+
*/
|
|
39
|
+
getMessage: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
40
|
+
/**
|
|
41
|
+
* undefined **Required Permissions** none
|
|
42
|
+
* @param {string} code
|
|
43
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
44
|
+
* @param {*} [options] Override http request option.
|
|
45
|
+
* @throws {RequiredError}
|
|
46
|
+
*/
|
|
47
|
+
listAttachments: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* EmailMessagesApi - functional programming interface
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
|
|
54
|
+
/**
|
|
55
|
+
* undefined **Required Permissions** none
|
|
56
|
+
* @param {string} code
|
|
57
|
+
* @param {number} attachmentId
|
|
58
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
59
|
+
* @param {*} [options] Override http request option.
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
*/
|
|
62
|
+
downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>>;
|
|
63
|
+
/**
|
|
64
|
+
* undefined **Required Permissions** none
|
|
65
|
+
* @param {string} code
|
|
66
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>>;
|
|
71
|
+
/**
|
|
72
|
+
* undefined **Required Permissions** none
|
|
73
|
+
* @param {string} code
|
|
74
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
*/
|
|
78
|
+
listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>>;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* EmailMessagesApi - factory interface
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
85
|
+
/**
|
|
86
|
+
* undefined **Required Permissions** none
|
|
87
|
+
* @param {string} code
|
|
88
|
+
* @param {number} attachmentId
|
|
89
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass>;
|
|
94
|
+
/**
|
|
95
|
+
* undefined **Required Permissions** none
|
|
96
|
+
* @param {string} code
|
|
97
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass>;
|
|
102
|
+
/**
|
|
103
|
+
* undefined **Required Permissions** none
|
|
104
|
+
* @param {string} code
|
|
105
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
*/
|
|
109
|
+
listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass>;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Request parameters for downloadAttachment operation in EmailMessagesApi.
|
|
113
|
+
* @export
|
|
114
|
+
* @interface EmailMessagesApiDownloadAttachmentRequest
|
|
115
|
+
*/
|
|
116
|
+
export interface EmailMessagesApiDownloadAttachmentRequest {
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {string}
|
|
120
|
+
* @memberof EmailMessagesApiDownloadAttachment
|
|
121
|
+
*/
|
|
122
|
+
readonly code: string;
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
* @type {number}
|
|
126
|
+
* @memberof EmailMessagesApiDownloadAttachment
|
|
127
|
+
*/
|
|
128
|
+
readonly attachmentId: number;
|
|
129
|
+
/**
|
|
130
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
131
|
+
* @type {string}
|
|
132
|
+
* @memberof EmailMessagesApiDownloadAttachment
|
|
133
|
+
*/
|
|
134
|
+
readonly authorization?: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Request parameters for getMessage operation in EmailMessagesApi.
|
|
138
|
+
* @export
|
|
139
|
+
* @interface EmailMessagesApiGetMessageRequest
|
|
140
|
+
*/
|
|
141
|
+
export interface EmailMessagesApiGetMessageRequest {
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {string}
|
|
145
|
+
* @memberof EmailMessagesApiGetMessage
|
|
146
|
+
*/
|
|
147
|
+
readonly code: string;
|
|
148
|
+
/**
|
|
149
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
150
|
+
* @type {string}
|
|
151
|
+
* @memberof EmailMessagesApiGetMessage
|
|
152
|
+
*/
|
|
153
|
+
readonly authorization?: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Request parameters for listAttachments operation in EmailMessagesApi.
|
|
157
|
+
* @export
|
|
158
|
+
* @interface EmailMessagesApiListAttachmentsRequest
|
|
159
|
+
*/
|
|
160
|
+
export interface EmailMessagesApiListAttachmentsRequest {
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @type {string}
|
|
164
|
+
* @memberof EmailMessagesApiListAttachments
|
|
165
|
+
*/
|
|
166
|
+
readonly code: string;
|
|
167
|
+
/**
|
|
168
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
169
|
+
* @type {string}
|
|
170
|
+
* @memberof EmailMessagesApiListAttachments
|
|
171
|
+
*/
|
|
172
|
+
readonly authorization?: string;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* EmailMessagesApi - object-oriented interface
|
|
176
|
+
* @export
|
|
177
|
+
* @class EmailMessagesApi
|
|
178
|
+
* @extends {BaseAPI}
|
|
179
|
+
*/
|
|
180
|
+
export declare class EmailMessagesApi extends BaseAPI {
|
|
181
|
+
/**
|
|
182
|
+
* undefined **Required Permissions** none
|
|
183
|
+
* @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
* @memberof EmailMessagesApi
|
|
187
|
+
*/
|
|
188
|
+
downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DownloadAttachmentResponseClass, any, {}>>;
|
|
189
|
+
/**
|
|
190
|
+
* undefined **Required Permissions** none
|
|
191
|
+
* @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
|
|
192
|
+
* @param {*} [options] Override http request option.
|
|
193
|
+
* @throws {RequiredError}
|
|
194
|
+
* @memberof EmailMessagesApi
|
|
195
|
+
*/
|
|
196
|
+
getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailMessageResponseClass, any, {}>>;
|
|
197
|
+
/**
|
|
198
|
+
* undefined **Required Permissions** none
|
|
199
|
+
* @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
* @memberof EmailMessagesApi
|
|
203
|
+
*/
|
|
204
|
+
listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailAttachmentsResponseClass, any, {}>>;
|
|
205
|
+
}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL NotificationService
|
|
6
|
+
* The EMIL NotificationService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.EmailMessagesApi = exports.EmailMessagesApiFactory = exports.EmailMessagesApiFp = exports.EmailMessagesApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* EmailMessagesApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var EmailMessagesApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* undefined **Required Permissions** none
|
|
101
|
+
* @param {string} code
|
|
102
|
+
* @param {number} attachmentId
|
|
103
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
downloadAttachment: function (code, attachmentId, authorization, options) {
|
|
108
|
+
if (options === void 0) { options = {}; }
|
|
109
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
// verify required parameter 'code' is not null or undefined
|
|
115
|
+
(0, common_1.assertParamExists)('downloadAttachment', 'code', code);
|
|
116
|
+
// verify required parameter 'attachmentId' is not null or undefined
|
|
117
|
+
(0, common_1.assertParamExists)('downloadAttachment', 'attachmentId', attachmentId);
|
|
118
|
+
localVarPath = "/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download"
|
|
119
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)))
|
|
120
|
+
.replace("{".concat("attachmentId", "}"), encodeURIComponent(String(attachmentId)));
|
|
121
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
122
|
+
if (configuration) {
|
|
123
|
+
baseOptions = configuration.baseOptions;
|
|
124
|
+
baseAccessToken = configuration.accessToken;
|
|
125
|
+
}
|
|
126
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
127
|
+
localVarHeaderParameter = {};
|
|
128
|
+
localVarQueryParameter = {};
|
|
129
|
+
// authentication bearer required
|
|
130
|
+
// http bearer authentication required
|
|
131
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
132
|
+
case 1:
|
|
133
|
+
// authentication bearer required
|
|
134
|
+
// http bearer authentication required
|
|
135
|
+
_a.sent();
|
|
136
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
137
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
138
|
+
}
|
|
139
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
140
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
141
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
142
|
+
return [2 /*return*/, {
|
|
143
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
144
|
+
options: localVarRequestOptions,
|
|
145
|
+
}];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* undefined **Required Permissions** none
|
|
152
|
+
* @param {string} code
|
|
153
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
154
|
+
* @param {*} [options] Override http request option.
|
|
155
|
+
* @throws {RequiredError}
|
|
156
|
+
*/
|
|
157
|
+
getMessage: function (code, authorization, options) {
|
|
158
|
+
if (options === void 0) { options = {}; }
|
|
159
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
160
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
161
|
+
return __generator(this, function (_a) {
|
|
162
|
+
switch (_a.label) {
|
|
163
|
+
case 0:
|
|
164
|
+
// verify required parameter 'code' is not null or undefined
|
|
165
|
+
(0, common_1.assertParamExists)('getMessage', 'code', code);
|
|
166
|
+
localVarPath = "/notificationservice/v1/email-messages/{code}"
|
|
167
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
168
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
169
|
+
if (configuration) {
|
|
170
|
+
baseOptions = configuration.baseOptions;
|
|
171
|
+
baseAccessToken = configuration.accessToken;
|
|
172
|
+
}
|
|
173
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
174
|
+
localVarHeaderParameter = {};
|
|
175
|
+
localVarQueryParameter = {};
|
|
176
|
+
// authentication bearer required
|
|
177
|
+
// http bearer authentication required
|
|
178
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
179
|
+
case 1:
|
|
180
|
+
// authentication bearer required
|
|
181
|
+
// http bearer authentication required
|
|
182
|
+
_a.sent();
|
|
183
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
184
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
185
|
+
}
|
|
186
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
187
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
188
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
189
|
+
return [2 /*return*/, {
|
|
190
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
191
|
+
options: localVarRequestOptions,
|
|
192
|
+
}];
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
/**
|
|
198
|
+
* undefined **Required Permissions** none
|
|
199
|
+
* @param {string} code
|
|
200
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
201
|
+
* @param {*} [options] Override http request option.
|
|
202
|
+
* @throws {RequiredError}
|
|
203
|
+
*/
|
|
204
|
+
listAttachments: function (code, authorization, options) {
|
|
205
|
+
if (options === void 0) { options = {}; }
|
|
206
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
207
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
210
|
+
case 0:
|
|
211
|
+
// verify required parameter 'code' is not null or undefined
|
|
212
|
+
(0, common_1.assertParamExists)('listAttachments', 'code', code);
|
|
213
|
+
localVarPath = "/notificationservice/v1/email-messages/{code}/attachments"
|
|
214
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
215
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
216
|
+
if (configuration) {
|
|
217
|
+
baseOptions = configuration.baseOptions;
|
|
218
|
+
baseAccessToken = configuration.accessToken;
|
|
219
|
+
}
|
|
220
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
221
|
+
localVarHeaderParameter = {};
|
|
222
|
+
localVarQueryParameter = {};
|
|
223
|
+
// authentication bearer required
|
|
224
|
+
// http bearer authentication required
|
|
225
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
226
|
+
case 1:
|
|
227
|
+
// authentication bearer required
|
|
228
|
+
// http bearer authentication required
|
|
229
|
+
_a.sent();
|
|
230
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
231
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
232
|
+
}
|
|
233
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
234
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
235
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
236
|
+
return [2 /*return*/, {
|
|
237
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
238
|
+
options: localVarRequestOptions,
|
|
239
|
+
}];
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
exports.EmailMessagesApiAxiosParamCreator = EmailMessagesApiAxiosParamCreator;
|
|
247
|
+
/**
|
|
248
|
+
* EmailMessagesApi - functional programming interface
|
|
249
|
+
* @export
|
|
250
|
+
*/
|
|
251
|
+
var EmailMessagesApiFp = function (configuration) {
|
|
252
|
+
var localVarAxiosParamCreator = (0, exports.EmailMessagesApiAxiosParamCreator)(configuration);
|
|
253
|
+
return {
|
|
254
|
+
/**
|
|
255
|
+
* undefined **Required Permissions** none
|
|
256
|
+
* @param {string} code
|
|
257
|
+
* @param {number} attachmentId
|
|
258
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
259
|
+
* @param {*} [options] Override http request option.
|
|
260
|
+
* @throws {RequiredError}
|
|
261
|
+
*/
|
|
262
|
+
downloadAttachment: function (code, attachmentId, authorization, options) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
264
|
+
var localVarAxiosArgs;
|
|
265
|
+
return __generator(this, function (_a) {
|
|
266
|
+
switch (_a.label) {
|
|
267
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options)];
|
|
268
|
+
case 1:
|
|
269
|
+
localVarAxiosArgs = _a.sent();
|
|
270
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* undefined **Required Permissions** none
|
|
277
|
+
* @param {string} code
|
|
278
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
279
|
+
* @param {*} [options] Override http request option.
|
|
280
|
+
* @throws {RequiredError}
|
|
281
|
+
*/
|
|
282
|
+
getMessage: function (code, authorization, options) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
284
|
+
var localVarAxiosArgs;
|
|
285
|
+
return __generator(this, function (_a) {
|
|
286
|
+
switch (_a.label) {
|
|
287
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getMessage(code, authorization, options)];
|
|
288
|
+
case 1:
|
|
289
|
+
localVarAxiosArgs = _a.sent();
|
|
290
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
},
|
|
295
|
+
/**
|
|
296
|
+
* undefined **Required Permissions** none
|
|
297
|
+
* @param {string} code
|
|
298
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
299
|
+
* @param {*} [options] Override http request option.
|
|
300
|
+
* @throws {RequiredError}
|
|
301
|
+
*/
|
|
302
|
+
listAttachments: function (code, authorization, options) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
304
|
+
var localVarAxiosArgs;
|
|
305
|
+
return __generator(this, function (_a) {
|
|
306
|
+
switch (_a.label) {
|
|
307
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAttachments(code, authorization, options)];
|
|
308
|
+
case 1:
|
|
309
|
+
localVarAxiosArgs = _a.sent();
|
|
310
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
exports.EmailMessagesApiFp = EmailMessagesApiFp;
|
|
318
|
+
/**
|
|
319
|
+
* EmailMessagesApi - factory interface
|
|
320
|
+
* @export
|
|
321
|
+
*/
|
|
322
|
+
var EmailMessagesApiFactory = function (configuration, basePath, axios) {
|
|
323
|
+
var localVarFp = (0, exports.EmailMessagesApiFp)(configuration);
|
|
324
|
+
return {
|
|
325
|
+
/**
|
|
326
|
+
* undefined **Required Permissions** none
|
|
327
|
+
* @param {string} code
|
|
328
|
+
* @param {number} attachmentId
|
|
329
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
downloadAttachment: function (code, attachmentId, authorization, options) {
|
|
334
|
+
return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* undefined **Required Permissions** none
|
|
338
|
+
* @param {string} code
|
|
339
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
getMessage: function (code, authorization, options) {
|
|
344
|
+
return localVarFp.getMessage(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
345
|
+
},
|
|
346
|
+
/**
|
|
347
|
+
* undefined **Required Permissions** none
|
|
348
|
+
* @param {string} code
|
|
349
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
350
|
+
* @param {*} [options] Override http request option.
|
|
351
|
+
* @throws {RequiredError}
|
|
352
|
+
*/
|
|
353
|
+
listAttachments: function (code, authorization, options) {
|
|
354
|
+
return localVarFp.listAttachments(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
exports.EmailMessagesApiFactory = EmailMessagesApiFactory;
|
|
359
|
+
/**
|
|
360
|
+
* EmailMessagesApi - object-oriented interface
|
|
361
|
+
* @export
|
|
362
|
+
* @class EmailMessagesApi
|
|
363
|
+
* @extends {BaseAPI}
|
|
364
|
+
*/
|
|
365
|
+
var EmailMessagesApi = /** @class */ (function (_super) {
|
|
366
|
+
__extends(EmailMessagesApi, _super);
|
|
367
|
+
function EmailMessagesApi() {
|
|
368
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* undefined **Required Permissions** none
|
|
372
|
+
* @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
|
|
373
|
+
* @param {*} [options] Override http request option.
|
|
374
|
+
* @throws {RequiredError}
|
|
375
|
+
* @memberof EmailMessagesApi
|
|
376
|
+
*/
|
|
377
|
+
EmailMessagesApi.prototype.downloadAttachment = function (requestParameters, options) {
|
|
378
|
+
var _this = this;
|
|
379
|
+
return (0, exports.EmailMessagesApiFp)(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* undefined **Required Permissions** none
|
|
383
|
+
* @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
* @memberof EmailMessagesApi
|
|
387
|
+
*/
|
|
388
|
+
EmailMessagesApi.prototype.getMessage = function (requestParameters, options) {
|
|
389
|
+
var _this = this;
|
|
390
|
+
return (0, exports.EmailMessagesApiFp)(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* undefined **Required Permissions** none
|
|
394
|
+
* @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
|
|
395
|
+
* @param {*} [options] Override http request option.
|
|
396
|
+
* @throws {RequiredError}
|
|
397
|
+
* @memberof EmailMessagesApi
|
|
398
|
+
*/
|
|
399
|
+
EmailMessagesApi.prototype.listAttachments = function (requestParameters, options) {
|
|
400
|
+
var _this = this;
|
|
401
|
+
return (0, exports.EmailMessagesApiFp)(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
402
|
+
};
|
|
403
|
+
return EmailMessagesApi;
|
|
404
|
+
}(base_1.BaseAPI));
|
|
405
|
+
exports.EmailMessagesApi = EmailMessagesApi;
|