@revxui/api-clients-ts
Version:
swagger client for @revxui/api-clients-ts
1,132 lines (1,125 loc) • 619 kB
JavaScript
import * as i0 from '@angular/core';
import { InjectionToken, Injectable, Optional, Inject, NgModule, SkipSelf } from '@angular/core';
import * as i1 from '@angular/common/http';
import { HttpHeaders, HttpUrlEncodingCodec, HttpParams } from '@angular/common/http';
const BASE_PATH = new InjectionToken('basePath');
const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
};
class Configuration {
constructor(configurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;
this.username = configurationParameters.username;
this.password = configurationParameters.password;
this.accessToken = configurationParameters.accessToken;
this.basePath = configurationParameters.basePath;
this.withCredentials = configurationParameters.withCredentials;
}
/**
* Select the correct content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
selectHeaderContentType(contentTypes) {
if (contentTypes.length == 0) {
return undefined;
}
let type = contentTypes.find(x => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
return type;
}
/**
* Select the correct accept content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param accepts - the array of content types that are available for selection.
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
selectHeaderAccept(accepts) {
if (accepts.length == 0) {
return undefined;
}
let type = accepts.find(x => this.isJsonMime(x));
if (type === undefined) {
return accepts[0];
}
return type;
}
/**
* 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) {
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
}
/**
* Api Documentation
* Api Documentation
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AdminControllerService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://apiv2stage1.atomex.net';
this.defaultHeaders = new HttpHeaders();
this.configuration = new Configuration();
if (basePath) {
this.basePath = basePath;
}
if (configuration) {
this.configuration = configuration;
this.basePath = basePath || configuration.basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
canConsumeForm(consumes) {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
checkAdminUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'*/*'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/admin`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
checkDemoUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'*/*'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/demo`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
checkRWAccessUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'*/*'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/rw`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
checkRoUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'*/*'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/ro`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
checkSAdminUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'*/*'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/sadmin`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
}
AdminControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdminControllerService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
AdminControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdminControllerService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdminControllerService, decorators: [{
type: Injectable
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }]; } });
/**
* CustomHttpUrlEncodingCodec
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
encodeKey(k) {
k = super.encodeKey(k);
return k.replace(/\+/gi, '%2B');
}
encodeValue(v) {
v = super.encodeValue(v);
return v.replace(/\+/gi, '%2B');
}
}
/**
* Api Documentation
* Api Documentation
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AdvertiserControllerService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://apiv2stage1.atomex.net';
this.defaultHeaders = new HttpHeaders();
this.configuration = new Configuration();
if (basePath) {
this.basePath = basePath;
}
if (configuration) {
this.configuration = configuration;
this.basePath = basePath || configuration.basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
canConsumeForm(consumes) {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
activateAdvertiserUsingPOST(commaSepratedIds, reqId, token, observe = 'body', reportProgress = false) {
if (commaSepratedIds === null || commaSepratedIds === undefined) {
throw new Error('Required parameter commaSepratedIds was null or undefined when calling activateAdvertiserUsingPOST.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (commaSepratedIds !== undefined && commaSepratedIds !== null) {
queryParameters = queryParameters.set('commaSepratedIds', commaSepratedIds);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/activate`, null, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
createAdvertiserUsingPOST(advertiser, reqId, token, observe = 'body', reportProgress = false) {
if (advertiser === null || advertiser === undefined) {
throw new Error('Required parameter advertiser was null or undefined when calling createAdvertiserUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/advertisers`, advertiser, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
deactivateAdvertiserUsingPOST(commaSepratedIds, reqId, token, observe = 'body', reportProgress = false) {
if (commaSepratedIds === null || commaSepratedIds === undefined) {
throw new Error('Required parameter commaSepratedIds was null or undefined when calling deactivateAdvertiserUsingPOST.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (commaSepratedIds !== undefined && commaSepratedIds !== null) {
queryParameters = queryParameters.set('commaSepratedIds', commaSepratedIds);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/deactivate`, null, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getActiveAdvertisersWithoutSlackChannelUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/missing-slack-channel`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getAdvertiserAnalyticsUsingGET(id, type, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getAdvertiserAnalyticsUsingGET.');
}
if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling getAdvertiserAnalyticsUsingGET.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (type !== undefined && type !== null) {
queryParameters = queryParameters.set('type', type);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}/analytics`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getAdvertiserCohortDetailsUsingPOST(dto, reqId, token, observe = 'body', reportProgress = false) {
if (dto === null || dto === undefined) {
throw new Error('Required parameter dto was null or undefined when calling getAdvertiserCohortDetailsUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/cohort/details`, dto, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getAdvertiserSettingsUsingGET(id, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getAdvertiserSettingsUsingGET.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/settings/${encodeURIComponent(String(id))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getByIdUsingGET(id, refresh, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getByIdUsingGET.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (refresh !== undefined && refresh !== null) {
queryParameters = queryParameters.set('refresh', refresh);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getCampaignOrStrategyListForCohortUsingGET(id, type, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getCampaignOrStrategyListForCohortUsingGET.');
}
if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling getCampaignOrStrategyListForCohortUsingGET.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (type !== undefined && type !== null) {
queryParameters = queryParameters.set('type', type);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}/cohort/dimension/details`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getIfAdvertiserCohortUsingGET(id, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getIfAdvertiserCohortUsingGET.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}/cohort/check`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getSkadTargetPrivilegesUsingPOST(searchRequest, advertiserId, reqId, token, observe = 'body', reportProgress = false) {
if (searchRequest === null || searchRequest === undefined) {
throw new Error('Required parameter searchRequest was null or undefined when calling getSkadTargetPrivilegesUsingPOST.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (advertiserId !== undefined && advertiserId !== null) {
queryParameters = queryParameters.set('advertiserId', advertiserId);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/skadtargetprivilege`, searchRequest, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getSmartTagUsingGET(id, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSmartTagUsingGET.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/advertisers/smarttag/${encodeURIComponent(String(id))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
updateASTUsingPOST(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/ast-tag`, null, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
updateASTUsingPOST1(id, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateASTUsingPOST1.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}/ast-tag`, null, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
updateAdvertiserSettingByKeyUsingPOST(id, settingDto, reqId, token, observe = 'body', reportProgress = false) {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateAdvertiserSettingByKeyUsingPOST.');
}
if (settingDto === null || settingDto === undefined) {
throw new Error('Required parameter settingDto was null or undefined when calling updateAdvertiserSettingByKeyUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/settings/${encodeURIComponent(String(id))}`, settingDto, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
updateAdvertiserUsingPOST(advertiser, id, reqId, token, observe = 'body', reportProgress = false) {
if (advertiser === null || advertiser === undefined) {
throw new Error('Required parameter advertiser was null or undefined when calling updateAdvertiserUsingPOST.');
}
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateAdvertiserUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/advertisers/${encodeURIComponent(String(id))}`, advertiser, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
}
AdvertiserControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdvertiserControllerService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
AdvertiserControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdvertiserControllerService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AdvertiserControllerService, decorators: [{
type: Injectable
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }]; } });
/**
* Api Documentation
* Api Documentation
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AppSettingsControllerService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://apiv2stage1.atomex.net';
this.defaultHeaders = new HttpHeaders();
this.configuration = new Configuration();
if (basePath) {
this.basePath = basePath;
}
if (configuration) {
this.configuration = configuration;
this.basePath = basePath || configuration.basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
canConsumeForm(consumes) {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
createAppSettingsUsingPOST(appSettings, reqId, token, observe = 'body', reportProgress = false) {
if (appSettings === null || appSettings === undefined) {
throw new Error('Required parameter appSettings was null or undefined when calling createAppSettingsUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/appsettings`, appSettings, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
fetchAllDynamicVideoTemplatesUsingGET(reqId, token, observe = 'body', reportProgress = false) {
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/appsettings/dynamicvideo/templates`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
fetchDynamicVideoConfigUsingGET(advertiserId, reqId, token, observe = 'body', reportProgress = false) {
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (advertiserId !== undefined && advertiserId !== null) {
queryParameters = queryParameters.set('advertiserId', advertiserId);
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/appsettings/dynamicvideo/config`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
getAppSettingsUsingGET(advertiserId, reqId, settingsKeys, token, observe = 'body', reportProgress = false) {
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (advertiserId !== undefined && advertiserId !== null) {
queryParameters = queryParameters.set('advertiserId', advertiserId);
}
if (settingsKeys) {
settingsKeys.forEach((element) => {
queryParameters = queryParameters.append('settingsKeys', element);
});
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [];
return this.httpClient.get(`${this.basePath}/v2/api/appsettings`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
updateAppSettingsUsingPOST(appSettings, reqId, token, observe = 'body', reportProgress = false) {
if (appSettings === null || appSettings === undefined) {
throw new Error('Required parameter appSettings was null or undefined when calling updateAppSettingsUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/appsettings/update`, appSettings, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
upsertDynamicVideoUsingPOST(dynamicVideoDTO, reqId, token, observe = 'body', reportProgress = false) {
if (dynamicVideoDTO === null || dynamicVideoDTO === undefined) {
throw new Error('Required parameter dynamicVideoDTO was null or undefined when calling upsertDynamicVideoUsingPOST.');
}
let headers = this.defaultHeaders;
if (reqId !== undefined && reqId !== null) {
headers = headers.set('reqId', String(reqId));
}
if (token !== undefined && token !== null) {
headers = headers.set('token', String(token));
}
// to determine the Accept header
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes = [
'application/json'
];
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.post(`${this.basePath}/v2/api/appsettings/dynamicvideo/upsert`, dynamicVideoDTO, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
}
AppSettingsControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppSettingsControllerService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
AppSettingsControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppSettingsControllerService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppSettingsControllerService, decorators: [{
type: Injectable
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
type: Optional
}, {
type: Inject,
args: [BASE_PATH]
}] }, { type: Configuration, decorators: [{
type: Optional
}] }]; } });
/**
* Api Documentation
* Api Documentation
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
class AppsFlyerControllerService {
constructor(httpClient, basePath, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://apiv2stage1.atomex.net';
this.defaultHeaders = new HttpHeaders();
this.configuration = new Configuration();
if (basePath) {
this.basePath = basePath;
}
if (configuration) {
this.configuration = configuration;
this.basePath = basePath || configuration.basePath || this.basePath;
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
canConsumeForm(consumes) {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
getCreativeMetaDataUsingGET(ids, reqId, token, observe = 'body', reportProgress = false) {
if (ids === null || ids === undefined) {
throw new Error('Required parameter ids was null or undefined when calling getCreativeMetaDataUsingGET.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (ids !== undefined && ids !== null) {
q