diff --git a/canopeum_backend/canopeum_backend/settings.py b/canopeum_backend/canopeum_backend/settings.py
index 4e0f2dadf..767ebd078 100644
--- a/canopeum_backend/canopeum_backend/settings.py
+++ b/canopeum_backend/canopeum_backend/settings.py
@@ -127,7 +127,7 @@
"USER": "root",
"PASSWORD": "canopeum",
"HOST": "localhost",
- "PORT": "3306",
+ "PORT": "3308", # Same as in docker-compose.yml
},
}
diff --git a/canopeum_backend/canopeum_backend/views.py b/canopeum_backend/canopeum_backend/views.py
index ad3522912..f918f1a03 100644
--- a/canopeum_backend/canopeum_backend/views.py
+++ b/canopeum_backend/canopeum_backend/views.py
@@ -194,11 +194,8 @@ class PostListAPIView(APIView):
def get(self, request):
comment_count = Comment.objects.filter(post=request.data.get("id")).count()
has_liked = 0
- siteId = request.GET.get("siteId", "")
- if siteId != "":
- posts = Post.objects.filter(site=siteId)
- else:
- posts = Post.objects.all()
+ site_id = request.GET.get("siteId", "")
+ posts = Post.objects.filter(site=site_id) if not site_id else Post.objects.all()
serializer = PostSerializer(posts, many=True, context={"comment_count": comment_count, "has_liked": has_liked})
return Response(serializer.data)
diff --git a/canopeum_frontend/src/pages/Home.tsx b/canopeum_frontend/src/pages/Home.tsx
index 9954140fe..e00b8746e 100644
--- a/canopeum_frontend/src/pages/Home.tsx
+++ b/canopeum_frontend/src/pages/Home.tsx
@@ -14,8 +14,8 @@ const Home = () => {
const fetchData = async () => {
setIsLoading(true)
try {
- const response = await api().analytics.batches();
- setData(response);
+ const response = await api().analytics.batches()
+ setData(response)
} catch (error_: unknown) {
setError(ensureError(error_))
} finally {
diff --git a/canopeum_frontend/src/pages/MapSite.tsx b/canopeum_frontend/src/pages/MapSite.tsx
index 4d9864243..9915fbe3e 100644
--- a/canopeum_frontend/src/pages/MapSite.tsx
+++ b/canopeum_frontend/src/pages/MapSite.tsx
@@ -1,8 +1,10 @@
import { useParams } from 'react-router-dom'
const MapSite = () => {
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- We plan on using it
+ /* eslint-disable @typescript-eslint/no-unused-vars -- We plan on using it */
+ // @ts-expect-error: We plan on using it
const { siteId } = useParams()
+ /* eslint-enable @typescript-eslint/no-unused-vars */
return (
diff --git a/canopeum_frontend/src/services/api.ts b/canopeum_frontend/src/services/api.ts
index 63e342728..358365804 100644
--- a/canopeum_frontend/src/services/api.ts
+++ b/canopeum_frontend/src/services/api.ts
@@ -1,3267 +1,3406 @@
-//----------------------
+// ----------------------
//
// Generated using the NSwag toolchain v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
//
-//----------------------
+// ----------------------
/* tslint:disable */
/* eslint-disable */
// ReSharper disable InconsistentNaming
export class Client {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise
};
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise }
+ private baseUrl: string
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined
constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "";
+ this.http = http ? http : window as any
+ this.baseUrl = baseUrl ?? ''
}
batchAll(): Promise {
- let url_ = this.baseUrl + "/analytics/batches/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/analytics/batches/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBatchAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processBatchAll(_response)
+ })
}
protected processBatchAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(BatchAnalytics.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(BatchAnalytics.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
batchCreate(body: Batch | undefined): Promise {
- let url_ = this.baseUrl + "/analytics/batches/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/analytics/batches/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBatchCreate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processBatchCreate(_response)
+ })
}
protected processBatchCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Batch.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Batch.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
batchUpdate(batchId: number, body: PatchedBatch | undefined): Promise {
- let url_ = this.baseUrl + "/analytics/batches/{batchId}/";
- if (batchId === undefined || batchId === null)
- throw new Error("The parameter 'batchId' must be defined.");
- url_ = url_.replace("{batchId}", encodeURIComponent("" + batchId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/analytics/batches/{batchId}/'
+ if (batchId === undefined || batchId === null) {
+ throw new Error("The parameter 'batchId' must be defined.")
+ }
+ url_ = url_.replace('{batchId}', encodeURIComponent('' + batchId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBatchUpdate(_response);
- });
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processBatchUpdate(_response)
+ })
}
protected processBatchUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Batch.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Batch.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
/**
* @return No response body
*/
batchDelete(batchId: number): Promise {
- let url_ = this.baseUrl + "/analytics/batches/{batchId}/";
- if (batchId === undefined || batchId === null)
- throw new Error("The parameter 'batchId' must be defined.");
- url_ = url_.replace("{batchId}", encodeURIComponent("" + batchId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "DELETE",
- headers: {
- }
- };
+ let url_ = this.baseUrl + '/analytics/batches/{batchId}/'
+ if (batchId === undefined || batchId === null) {
+ throw new Error("The parameter 'batchId' must be defined.")
+ }
+ url_ = url_.replace('{batchId}', encodeURIComponent('' + batchId))
+ url_ = url_.replace(/[?&]$/, '')
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBatchDelete(_response);
- });
+ let options_: RequestInit = {
+ method: 'DELETE',
+ headers: {},
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processBatchDelete(_response)
+ })
}
protected processBatchDelete(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 204) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 204) {
+ return response.text().then(_responseText => {
+ return
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteAll(): Promise {
- let url_ = this.baseUrl + "/analytics/sites/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/analytics/sites/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteAll(_response)
+ })
}
protected processSiteAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(Site.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(Site.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteCreate(body: Site): Promise {
- let url_ = this.baseUrl + "/analytics/sites/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/analytics/sites/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteCreate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteCreate(_response)
+ })
}
protected processSiteCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Site.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Site.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteDetail(siteId: number): Promise {
- let url_ = this.baseUrl + "/analytics/sites/{siteId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/analytics/sites/{siteId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteDetail(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteDetail(_response)
+ })
}
protected processSiteDetail(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Site.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Site.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteUpdate(siteId: number, body: PatchedSite | undefined): Promise {
- let url_ = this.baseUrl + "/analytics/sites/{siteId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/analytics/sites/{siteId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteUpdate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteUpdate(_response)
+ })
}
protected processSiteUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Site.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- siteDelete(siteId: number): Promise<{ [key: string]: any; }> {
- let url_ = this.baseUrl + "/analytics/sites/{siteId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "DELETE",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteDelete(_response);
- });
- }
-
- protected processSiteDelete(response: Response): Promise<{ [key: string]: any; }> {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (resultData200) {
- result200 = {} as any;
- for (let key in resultData200) {
- if (resultData200.hasOwnProperty(key))
- (result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null;
- }
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve<{ [key: string]: any; }>(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Site.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
+ }
+
+ siteDelete(siteId: number): Promise<{ [key: string]: any }> {
+ let url_ = this.baseUrl + '/analytics/sites/{siteId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'DELETE',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteDelete(_response)
+ })
+ }
+
+ protected processSiteDelete(response: Response): Promise<{ [key: string]: any }> {
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (resultData200) {
+ result200 = {} as any
+ for (let key in resultData200) {
+ if (resultData200.hasOwnProperty(key)) {
+ ;( result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null
+ }
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve<{ [key: string]: any }>(null as any)
}
siteSummary(siteId: number): Promise {
- let url_ = this.baseUrl + "/analytics/sites/{siteId}/summary";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/analytics/sites/{siteId}/summary'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteSummary(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteSummary(_response)
+ })
}
protected processSiteSummary(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = SiteSummary.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = SiteSummary.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteSummaryAll(): Promise {
- let url_ = this.baseUrl + "/analytics/sites/summary";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/analytics/sites/summary'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteSummaryAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteSummaryAll(_response)
+ })
}
protected processSiteSummaryAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(SiteSummary.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- apiSchemaRetrieve(format: Format | undefined, lang: Lang | undefined): Promise<{ [key: string]: any; }> {
- let url_ = this.baseUrl + "/api/schema/?";
- if (format === null)
- throw new Error("The parameter 'format' cannot be null.");
- else if (format !== undefined)
- url_ += "format=" + encodeURIComponent("" + format) + "&";
- if (lang === null)
- throw new Error("The parameter 'lang' cannot be null.");
- else if (lang !== undefined)
- url_ += "lang=" + encodeURIComponent("" + lang) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/vnd.oai.openapi"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processApiSchemaRetrieve(_response);
- });
- }
-
- protected processApiSchemaRetrieve(response: Response): Promise<{ [key: string]: any; }> {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (resultData200) {
- result200 = {} as any;
- for (let key in resultData200) {
- if (resultData200.hasOwnProperty(key))
- (result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null;
- }
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve<{ [key: string]: any; }>(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(SiteSummary.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
+ }
+
+ apiSchemaRetrieve(format: Format | undefined, lang: Lang | undefined): Promise<{ [key: string]: any }> {
+ let url_ = this.baseUrl + '/api/schema/?'
+ if (format === null) {
+ throw new Error("The parameter 'format' cannot be null.")
+ } else if (format !== undefined) {
+ url_ += 'format=' + encodeURIComponent('' + format) + '&'
+ }
+ if (lang === null) {
+ throw new Error("The parameter 'lang' cannot be null.")
+ } else if (lang !== undefined) {
+ url_ += 'lang=' + encodeURIComponent('' + lang) + '&'
+ }
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/vnd.oai.openapi',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processApiSchemaRetrieve(_response)
+ })
+ }
+
+ protected processApiSchemaRetrieve(response: Response): Promise<{ [key: string]: any }> {
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (resultData200) {
+ result200 = {} as any
+ for (let key in resultData200) {
+ if (resultData200.hasOwnProperty(key)) {
+ ;( result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null
+ }
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve<{ [key: string]: any }>(null as any)
}
authenticationLogin(body: AuthUser): Promise {
- let url_ = this.baseUrl + "/auth/login/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/auth/login/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processAuthenticationLogin(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processAuthenticationLogin(_response)
+ })
}
protected processAuthenticationLogin(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = User.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- authenticationLogout(): Promise<{ [key: string]: any; }> {
- let url_ = this.baseUrl + "/auth/logout/";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processAuthenticationLogout(_response);
- });
- }
-
- protected processAuthenticationLogout(response: Response): Promise<{ [key: string]: any; }> {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (resultData200) {
- result200 = {} as any;
- for (let key in resultData200) {
- if (resultData200.hasOwnProperty(key))
- (result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null;
- }
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve<{ [key: string]: any; }>(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = User.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
+ }
+
+ authenticationLogout(): Promise<{ [key: string]: any }> {
+ let url_ = this.baseUrl + '/auth/logout/'
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'POST',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processAuthenticationLogout(_response)
+ })
+ }
+
+ protected processAuthenticationLogout(response: Response): Promise<{ [key: string]: any }> {
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (resultData200) {
+ result200 = {} as any
+ for (let key in resultData200) {
+ if (resultData200.hasOwnProperty(key)) {
+ ;( result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null
+ }
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve<{ [key: string]: any }>(null as any)
}
authenticationRegister(body: User): Promise {
- let url_ = this.baseUrl + "/auth/register/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/auth/register/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processAuthenticationRegister(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processAuthenticationRegister(_response)
+ })
}
protected processAuthenticationRegister(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = AuthUser.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = AuthUser.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteMap(): Promise {
- let url_ = this.baseUrl + "/map/sites/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/map/sites/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteMap(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteMap(_response)
+ })
}
protected processSiteMap(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(SiteMap.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(SiteMap.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
postAll(): Promise {
- let url_ = this.baseUrl + "/social/posts/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/social/posts/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processPostAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processPostAll(_response)
+ })
}
protected processPostAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(Post.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(Post.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
postCreate(body: Post): Promise {
- let url_ = this.baseUrl + "/social/posts/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/social/posts/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processPostCreate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processPostCreate(_response)
+ })
}
protected processPostCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Post.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Post.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
commentAll(postId: number): Promise {
- let url_ = this.baseUrl + "/social/posts/{postId}/comments/";
- if (postId === undefined || postId === null)
- throw new Error("The parameter 'postId' must be defined.");
- url_ = url_.replace("{postId}", encodeURIComponent("" + postId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/posts/{postId}/comments/'
+ if (postId === undefined || postId === null) {
+ throw new Error("The parameter 'postId' must be defined.")
+ }
+ url_ = url_.replace('{postId}', encodeURIComponent('' + postId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processCommentAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processCommentAll(_response)
+ })
}
protected processCommentAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(Comment.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(Comment.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
commentCreate(postId: number, body: Comment | undefined): Promise {
- let url_ = this.baseUrl + "/social/posts/{postId}/comments/";
- if (postId === undefined || postId === null)
- throw new Error("The parameter 'postId' must be defined.");
- url_ = url_.replace("{postId}", encodeURIComponent("" + postId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/posts/{postId}/comments/'
+ if (postId === undefined || postId === null) {
+ throw new Error("The parameter 'postId' must be defined.")
+ }
+ url_ = url_.replace('{postId}', encodeURIComponent('' + postId))
+ url_ = url_.replace(/[?&]$/, '')
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processCommentCreate(_response);
- });
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processCommentCreate(_response)
+ })
}
protected processCommentCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Comment.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Comment.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
/**
* @return No response body
*/
commentDelete(commentId: number, postId: number): Promise {
- let url_ = this.baseUrl + "/social/posts/{postId}/comments/{commentId}/";
- if (commentId === undefined || commentId === null)
- throw new Error("The parameter 'commentId' must be defined.");
- url_ = url_.replace("{commentId}", encodeURIComponent("" + commentId));
- if (postId === undefined || postId === null)
- throw new Error("The parameter 'postId' must be defined.");
- url_ = url_.replace("{postId}", encodeURIComponent("" + postId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "DELETE",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processCommentDelete(_response);
- });
+ let url_ = this.baseUrl + '/social/posts/{postId}/comments/{commentId}/'
+ if (commentId === undefined || commentId === null) {
+ throw new Error("The parameter 'commentId' must be defined.")
+ }
+ url_ = url_.replace('{commentId}', encodeURIComponent('' + commentId))
+ if (postId === undefined || postId === null) {
+ throw new Error("The parameter 'postId' must be defined.")
+ }
+ url_ = url_.replace('{postId}', encodeURIComponent('' + postId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'DELETE',
+ headers: {},
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processCommentDelete(_response)
+ })
}
protected processCommentDelete(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 204) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 204) {
+ return response.text().then(_responseText => {
+ return
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
likeAll(postId: number, body: Like | undefined): Promise {
- let url_ = this.baseUrl + "/social/posts/{postId}/likes/";
- if (postId === undefined || postId === null)
- throw new Error("The parameter 'postId' must be defined.");
- url_ = url_.replace("{postId}", encodeURIComponent("" + postId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/posts/{postId}/likes/'
+ if (postId === undefined || postId === null) {
+ throw new Error("The parameter 'postId' must be defined.")
+ }
+ url_ = url_.replace('{postId}', encodeURIComponent('' + postId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processLikeAll(_response);
- });
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processLikeAll(_response)
+ })
}
protected processLikeAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Like.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Like.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteSocialAll(): Promise {
- let url_ = this.baseUrl + "/social/sites/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/social/sites/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteSocialAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteSocialAll(_response)
+ })
}
protected processSiteSocialAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = SiteSocial.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = SiteSocial.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
siteSocial(siteId: number): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/sites/{siteId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSiteSocial(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processSiteSocial(_response)
+ })
}
protected processSiteSocial(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = SiteSocial.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = SiteSocial.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
announcementUpdate(siteId: number, body: PatchedAnnouncement | undefined): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/announcements/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/sites/{siteId}/announcements/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processAnnouncementUpdate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processAnnouncementUpdate(_response)
+ })
}
protected processAnnouncementUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Announcement.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Announcement.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
contactUpdate(contactId: number, siteId: number, body: PatchedContact | undefined): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/contacts/{contactId}/";
- if (contactId === undefined || contactId === null)
- throw new Error("The parameter 'contactId' must be defined.");
- url_ = url_.replace("{contactId}", encodeURIComponent("" + contactId));
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processContactUpdate(_response);
- });
+ let url_ = this.baseUrl + '/social/sites/{siteId}/contacts/{contactId}/'
+ if (contactId === undefined || contactId === null) {
+ throw new Error("The parameter 'contactId' must be defined.")
+ }
+ url_ = url_.replace('{contactId}', encodeURIComponent('' + contactId))
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processContactUpdate(_response)
+ })
}
protected processContactUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Contact.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Contact.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
widgetCreate(siteId: number, body: Widget | undefined): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/widgets/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/social/sites/{siteId}/widgets/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processWidgetCreate(_response);
- });
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processWidgetCreate(_response)
+ })
}
protected processWidgetCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Widget.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Widget.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
widgetUpdate(siteId: number, widgetId: number, body: PatchedWidget | undefined): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/widgets/{widgetId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- if (widgetId === undefined || widgetId === null)
- throw new Error("The parameter 'widgetId' must be defined.");
- url_ = url_.replace("{widgetId}", encodeURIComponent("" + widgetId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processWidgetUpdate(_response);
- });
+ let url_ = this.baseUrl + '/social/sites/{siteId}/widgets/{widgetId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ if (widgetId === undefined || widgetId === null) {
+ throw new Error("The parameter 'widgetId' must be defined.")
+ }
+ url_ = url_.replace('{widgetId}', encodeURIComponent('' + widgetId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processWidgetUpdate(_response)
+ })
}
protected processWidgetUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Widget.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = Widget.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
/**
* @return No response body
*/
widgetDelete(siteId: number, widgetId: number): Promise {
- let url_ = this.baseUrl + "/social/sites/{siteId}/widgets/{widgetId}/";
- if (siteId === undefined || siteId === null)
- throw new Error("The parameter 'siteId' must be defined.");
- url_ = url_.replace("{siteId}", encodeURIComponent("" + siteId));
- if (widgetId === undefined || widgetId === null)
- throw new Error("The parameter 'widgetId' must be defined.");
- url_ = url_.replace("{widgetId}", encodeURIComponent("" + widgetId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "DELETE",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processWidgetDelete(_response);
- });
+ let url_ = this.baseUrl + '/social/sites/{siteId}/widgets/{widgetId}/'
+ if (siteId === undefined || siteId === null) {
+ throw new Error("The parameter 'siteId' must be defined.")
+ }
+ url_ = url_.replace('{siteId}', encodeURIComponent('' + siteId))
+ if (widgetId === undefined || widgetId === null) {
+ throw new Error("The parameter 'widgetId' must be defined.")
+ }
+ url_ = url_.replace('{widgetId}', encodeURIComponent('' + widgetId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'DELETE',
+ headers: {},
+ }
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processWidgetDelete(_response)
+ })
}
protected processWidgetDelete(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 204) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 204) {
+ return response.text().then(_responseText => {
+ return
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
userAll(): Promise {
- let url_ = this.baseUrl + "/users/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/users/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUserAll(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processUserAll(_response)
+ })
}
protected processUserAll(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(User.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ if (Array.isArray(resultData200)) {
+ result200 = [] as any
+ for (let item of resultData200) {
+ result200!.push(User.fromJS(item))
+ }
+ } else {
+ result200 = null
+ }
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
userCreate(body: User): Promise {
- let url_ = this.baseUrl + "/users/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/users/'
+ url_ = url_.replace(/[?&]$/, '')
- const content_ = JSON.stringify(body);
+ const content_ = JSON.stringify(body)
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ body: content_,
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUserCreate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processUserCreate(_response)
+ })
}
protected processUserCreate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = User.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = User.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
userDetail(userId: number): Promise {
- let url_ = this.baseUrl + "/users/{userId}/";
- if (userId === undefined || userId === null)
- throw new Error("The parameter 'userId' must be defined.");
- url_ = url_.replace("{userId}", encodeURIComponent("" + userId));
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/users/{userId}/'
+ if (userId === undefined || userId === null) {
+ throw new Error("The parameter 'userId' must be defined.")
+ }
+ url_ = url_.replace('{userId}', encodeURIComponent('' + userId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUserDetail(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processUserDetail(_response)
+ })
}
protected processUserDetail(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = User.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = User.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
userUpdate(userId: number, body: PatchedUser | undefined): Promise {
- let url_ = this.baseUrl + "/users/{userId}/";
- if (userId === undefined || userId === null)
- throw new Error("The parameter 'userId' must be defined.");
- url_ = url_.replace("{userId}", encodeURIComponent("" + userId));
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(body);
-
- let options_: RequestInit = {
- body: content_,
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
+ let url_ = this.baseUrl + '/users/{userId}/'
+ if (userId === undefined || userId === null) {
+ throw new Error("The parameter 'userId' must be defined.")
+ }
+ url_ = url_.replace('{userId}', encodeURIComponent('' + userId))
+ url_ = url_.replace(/[?&]$/, '')
+
+ const content_ = JSON.stringify(body)
+
+ let options_: RequestInit = {
+ body: content_,
+ method: 'PATCH',
+ headers: {
+ 'Content-Type': 'application/json',
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUserUpdate(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processUserUpdate(_response)
+ })
}
protected processUserUpdate(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = User.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = User.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
userCurrentUser(): Promise {
- let url_ = this.baseUrl + "/users/current_user/";
- url_ = url_.replace(/[?&]$/, "");
+ let url_ = this.baseUrl + '/users/current_user/'
+ url_ = url_.replace(/[?&]$/, '')
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
+ let options_: RequestInit = {
+ method: 'GET',
+ headers: {
+ Accept: 'application/json',
+ },
+ }
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUserCurrentUser(_response);
- });
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processUserCurrentUser(_response)
+ })
}
protected processUserCurrentUser(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = User.fromJS(resultData200);
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
+ const status = response.status
+ let _headers: any = {}
+ if (response.headers && response.headers.forEach) response.headers.forEach((v: any, k: any) => _headers[k] = v)
+ if (status === 200) {
+ return response.text().then(_responseText => {
+ let result200: any = null
+ let resultData200 = _responseText === '' ? null : JSON.parse(_responseText, this.jsonParseReviver)
+ result200 = User.fromJS(resultData200)
+ return result200
+ })
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then(_responseText => {
+ return throwException('An unexpected server error occurred.', status, _responseText, _headers)
+ })
+ }
+ return Promise.resolve(null as any)
}
}
export class Announcement implements IAnnouncement {
- readonly id!: number;
- body?: string | undefined;
+ readonly id!: number
+ body?: string | undefined
link?: string | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IAnnouncement) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.body = _data["body"];
- this.link = _data["link"];
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.body = _data['body']
+ this.link = _data['link']
+ }
}
static fromJS(data: any): Announcement {
- data = typeof data === 'object' ? data : {};
- let result = new Announcement();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Announcement()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
}
- data["id"] = this.id;
- data["body"] = this.body;
- data["link"] = this.link;
- return data;
+ }
+ data['id'] = this.id
+ data['body'] = this.body
+ data['link'] = this.link
+ return data
}
}
export interface IAnnouncement {
- id: number;
- body?: string | undefined;
- link?: string | undefined;
+ id: number
+ body?: string | undefined
+ link?: string | undefined
- [key: string]: any;
+ [key: string]: any
}
export class AuthUser implements IAuthUser {
- readonly id!: number;
+ readonly id!: number
/** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */
- username!: string;
- email?: string;
+ username!: string
+ email?: string
password!: string;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IAuthUser) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.username = _data["username"];
- this.email = _data["email"];
- this.password = _data["password"];
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.username = _data['username']
+ this.email = _data['email']
+ this.password = _data['password']
+ }
}
static fromJS(data: any): AuthUser {
- data = typeof data === 'object' ? data : {};
- let result = new AuthUser();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new AuthUser()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["username"] = this.username;
- data["email"] = this.email;
- data["password"] = this.password;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['username'] = this.username
+ data['email'] = this.email
+ data['password'] = this.password
+ return data
}
}
export interface IAuthUser {
- id: number;
+ id: number
/** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */
- username: string;
- email?: string;
- password: string;
+ username: string
+ email?: string
+ password: string
- [key: string]: any;
+ [key: string]: any
}
export class Batch implements IBatch {
- readonly id!: number;
- createdAt?: Date | undefined;
- name?: string | undefined;
- sponsor?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- totalNumberSeed?: number | undefined;
- totalPropagation?: number | undefined;
+ readonly id!: number
+ createdAt?: Date | undefined
+ name?: string | undefined
+ sponsor?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ totalNumberSeed?: number | undefined
+ totalPropagation?: number | undefined
site?: number | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IBatch) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.createdAt = _data["createdAt"] ? new Date(_data["createdAt"].toString()) : undefined;
- this.name = _data["name"];
- this.sponsor = _data["sponsor"];
- this.size = _data["size"];
- this.soilCondition = _data["soilCondition"];
- this.totalNumberSeed = _data["totalNumberSeed"];
- this.totalPropagation = _data["totalPropagation"];
- this.site = _data["site"];
- }
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
+ }
+ ;( this).id = _data['id']
+ this.createdAt = _data['createdAt'] ? new Date(_data['createdAt'].toString()) : undefined
+ this.name = _data['name']
+ this.sponsor = _data['sponsor']
+ this.size = _data['size']
+ this.soilCondition = _data['soilCondition']
+ this.totalNumberSeed = _data['totalNumberSeed']
+ this.totalPropagation = _data['totalPropagation']
+ this.site = _data['site']
+ }
}
static fromJS(data: any): Batch {
- data = typeof data === 'object' ? data : {};
- let result = new Batch();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Batch()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["createdAt"] = this.createdAt ? this.createdAt.toISOString() : undefined;
- data["name"] = this.name;
- data["sponsor"] = this.sponsor;
- data["size"] = this.size;
- data["soilCondition"] = this.soilCondition;
- data["totalNumberSeed"] = this.totalNumberSeed;
- data["totalPropagation"] = this.totalPropagation;
- data["site"] = this.site;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['createdAt'] = this.createdAt ? this.createdAt.toISOString() : undefined
+ data['name'] = this.name
+ data['sponsor'] = this.sponsor
+ data['size'] = this.size
+ data['soilCondition'] = this.soilCondition
+ data['totalNumberSeed'] = this.totalNumberSeed
+ data['totalPropagation'] = this.totalPropagation
+ data['site'] = this.site
+ return data
}
}
export interface IBatch {
- id: number;
- createdAt?: Date | undefined;
- name?: string | undefined;
- sponsor?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- totalNumberSeed?: number | undefined;
- totalPropagation?: number | undefined;
- site?: number | undefined;
-
- [key: string]: any;
+ id: number
+ createdAt?: Date | undefined
+ name?: string | undefined
+ sponsor?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ totalNumberSeed?: number | undefined
+ totalPropagation?: number | undefined
+ site?: number | undefined
+
+ [key: string]: any
}
export class BatchAnalytics implements IBatchAnalytics {
- readonly id!: number;
- name?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- readonly fertilizers!: string;
- readonly mulchLayers!: string;
- readonly supportedSpecies!: string;
- readonly plantCount!: string;
- readonly survivedCount!: string;
- readonly replaceCount!: string;
- readonly seedCollectedCount!: string;
- readonly seeds!: string;
+ readonly id!: number
+ name?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ readonly fertilizers!: string
+ readonly mulchLayers!: string
+ readonly supportedSpecies!: string
+ readonly plantCount!: string
+ readonly survivedCount!: string
+ readonly replaceCount!: string
+ readonly seedCollectedCount!: string
+ readonly seeds!: string
readonly species!: string;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IBatchAnalytics) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.name = _data["name"];
- this.size = _data["size"];
- this.soilCondition = _data["soilCondition"];
- (this).fertilizers = _data["fertilizers"];
- (this).mulchLayers = _data["mulchLayers"];
- (this).supportedSpecies = _data["supportedSpecies"];
- (this).plantCount = _data["plantCount"];
- (this).survivedCount = _data["survivedCount"];
- (this).replaceCount = _data["replaceCount"];
- (this).seedCollectedCount = _data["seedCollectedCount"];
- (this).seeds = _data["seeds"];
- (this).species = _data["species"];
- }
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
+ }
+ ;( this).id = _data['id']
+ this.name = _data['name']
+ this.size = _data['size']
+ this.soilCondition = _data['soilCondition']
+ ;( this).fertilizers = _data['fertilizers']
+ ;( this).mulchLayers = _data['mulchLayers']
+ ;( this).supportedSpecies = _data['supportedSpecies']
+ ;( this).plantCount = _data['plantCount']
+ ;( this).survivedCount = _data['survivedCount']
+ ;( this).replaceCount = _data['replaceCount']
+ ;( this).seedCollectedCount = _data['seedCollectedCount']
+ ;( this).seeds = _data['seeds']
+ ;( this).species = _data['species']
+ }
}
static fromJS(data: any): BatchAnalytics {
- data = typeof data === 'object' ? data : {};
- let result = new BatchAnalytics();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new BatchAnalytics()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["name"] = this.name;
- data["size"] = this.size;
- data["soilCondition"] = this.soilCondition;
- data["fertilizers"] = this.fertilizers;
- data["mulchLayers"] = this.mulchLayers;
- data["supportedSpecies"] = this.supportedSpecies;
- data["plantCount"] = this.plantCount;
- data["survivedCount"] = this.survivedCount;
- data["replaceCount"] = this.replaceCount;
- data["seedCollectedCount"] = this.seedCollectedCount;
- data["seeds"] = this.seeds;
- data["species"] = this.species;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['name'] = this.name
+ data['size'] = this.size
+ data['soilCondition'] = this.soilCondition
+ data['fertilizers'] = this.fertilizers
+ data['mulchLayers'] = this.mulchLayers
+ data['supportedSpecies'] = this.supportedSpecies
+ data['plantCount'] = this.plantCount
+ data['survivedCount'] = this.survivedCount
+ data['replaceCount'] = this.replaceCount
+ data['seedCollectedCount'] = this.seedCollectedCount
+ data['seeds'] = this.seeds
+ data['species'] = this.species
+ return data
}
}
export interface IBatchAnalytics {
- id: number;
- name?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- fertilizers: string;
- mulchLayers: string;
- supportedSpecies: string;
- plantCount: string;
- survivedCount: string;
- replaceCount: string;
- seedCollectedCount: string;
- seeds: string;
- species: string;
-
- [key: string]: any;
+ id: number
+ name?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ fertilizers: string
+ mulchLayers: string
+ supportedSpecies: string
+ plantCount: string
+ survivedCount: string
+ replaceCount: string
+ seedCollectedCount: string
+ seeds: string
+ species: string
+
+ [key: string]: any
}
export class Comment implements IComment {
- readonly id!: number;
- body?: string | undefined;
- authUser?: number | undefined;
+ readonly id!: number
+ body?: string | undefined
+ authUser?: number | undefined
createdAt?: Date | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IComment) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.body = _data["body"];
- this.authUser = _data["authUser"];
- this.createdAt = _data["createdAt"] ? new Date(_data["createdAt"].toString()) : undefined;
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.body = _data['body']
+ this.authUser = _data['authUser']
+ this.createdAt = _data['createdAt'] ? new Date(_data['createdAt'].toString()) : undefined
+ }
}
static fromJS(data: any): Comment {
- data = typeof data === 'object' ? data : {};
- let result = new Comment();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Comment()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["body"] = this.body;
- data["authUser"] = this.authUser;
- data["createdAt"] = this.createdAt ? this.createdAt.toISOString() : undefined;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['body'] = this.body
+ data['authUser'] = this.authUser
+ data['createdAt'] = this.createdAt ? this.createdAt.toISOString() : undefined
+ return data
}
}
export interface IComment {
- id: number;
- body?: string | undefined;
- authUser?: number | undefined;
- createdAt?: Date | undefined;
+ id: number
+ body?: string | undefined
+ authUser?: number | undefined
+ createdAt?: Date | undefined
- [key: string]: any;
+ [key: string]: any
}
export class Contact implements IContact {
- readonly id!: number;
- address?: string | undefined;
- email?: string | undefined;
- phone?: string | undefined;
- facebookLink?: string | undefined;
- xLink?: string | undefined;
- instagramLink?: string | undefined;
+ readonly id!: number
+ address?: string | undefined
+ email?: string | undefined
+ phone?: string | undefined
+ facebookLink?: string | undefined
+ xLink?: string | undefined
+ instagramLink?: string | undefined
linkedinLink?: string | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IContact) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.address = _data["address"];
- this.email = _data["email"];
- this.phone = _data["phone"];
- this.facebookLink = _data["facebookLink"];
- this.xLink = _data["xLink"];
- this.instagramLink = _data["instagramLink"];
- this.linkedinLink = _data["linkedinLink"];
- }
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
+ }
+ ;( this).id = _data['id']
+ this.address = _data['address']
+ this.email = _data['email']
+ this.phone = _data['phone']
+ this.facebookLink = _data['facebookLink']
+ this.xLink = _data['xLink']
+ this.instagramLink = _data['instagramLink']
+ this.linkedinLink = _data['linkedinLink']
+ }
}
static fromJS(data: any): Contact {
- data = typeof data === 'object' ? data : {};
- let result = new Contact();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Contact()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["address"] = this.address;
- data["email"] = this.email;
- data["phone"] = this.phone;
- data["facebookLink"] = this.facebookLink;
- data["xLink"] = this.xLink;
- data["instagramLink"] = this.instagramLink;
- data["linkedinLink"] = this.linkedinLink;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['address'] = this.address
+ data['email'] = this.email
+ data['phone'] = this.phone
+ data['facebookLink'] = this.facebookLink
+ data['xLink'] = this.xLink
+ data['instagramLink'] = this.instagramLink
+ data['linkedinLink'] = this.linkedinLink
+ return data
}
}
export interface IContact {
- id: number;
- address?: string | undefined;
- email?: string | undefined;
- phone?: string | undefined;
- facebookLink?: string | undefined;
- xLink?: string | undefined;
- instagramLink?: string | undefined;
- linkedinLink?: string | undefined;
-
- [key: string]: any;
+ id: number
+ address?: string | undefined
+ email?: string | undefined
+ phone?: string | undefined
+ facebookLink?: string | undefined
+ xLink?: string | undefined
+ instagramLink?: string | undefined
+ linkedinLink?: string | undefined
+
+ [key: string]: any
}
export class Coordinates implements ICoordinates {
- readonly id!: number;
- dmsLatitude?: string | undefined;
- dmsLongitude?: string | undefined;
- ddLatitude?: string | undefined;
- ddLongitude?: string | undefined;
+ readonly id!: number
+ dmsLatitude?: string | undefined
+ dmsLongitude?: string | undefined
+ ddLatitude?: string | undefined
+ ddLongitude?: string | undefined
address?: string | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: ICoordinates) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.dmsLatitude = _data["dmsLatitude"];
- this.dmsLongitude = _data["dmsLongitude"];
- this.ddLatitude = _data["ddLatitude"];
- this.ddLongitude = _data["ddLongitude"];
- this.address = _data["address"];
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.dmsLatitude = _data['dmsLatitude']
+ this.dmsLongitude = _data['dmsLongitude']
+ this.ddLatitude = _data['ddLatitude']
+ this.ddLongitude = _data['ddLongitude']
+ this.address = _data['address']
+ }
}
static fromJS(data: any): Coordinates {
- data = typeof data === 'object' ? data : {};
- let result = new Coordinates();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Coordinates()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["dmsLatitude"] = this.dmsLatitude;
- data["dmsLongitude"] = this.dmsLongitude;
- data["ddLatitude"] = this.ddLatitude;
- data["ddLongitude"] = this.ddLongitude;
- data["address"] = this.address;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['dmsLatitude'] = this.dmsLatitude
+ data['dmsLongitude'] = this.dmsLongitude
+ data['ddLatitude'] = this.ddLatitude
+ data['ddLongitude'] = this.ddLongitude
+ data['address'] = this.address
+ return data
}
}
export interface ICoordinates {
- id: number;
- dmsLatitude?: string | undefined;
- dmsLongitude?: string | undefined;
- ddLatitude?: string | undefined;
- ddLongitude?: string | undefined;
- address?: string | undefined;
-
- [key: string]: any;
+ id: number
+ dmsLatitude?: string | undefined
+ dmsLongitude?: string | undefined
+ ddLatitude?: string | undefined
+ ddLongitude?: string | undefined
+ address?: string | undefined
+
+ [key: string]: any
}
export class Like implements ILike {
- readonly id!: number;
- authUser?: number | undefined;
+ readonly id!: number
+ authUser?: number | undefined
post?: number | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: ILike) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.authUser = _data["authUser"];
- this.post = _data["post"];
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.authUser = _data['authUser']
+ this.post = _data['post']
+ }
}
static fromJS(data: any): Like {
- data = typeof data === 'object' ? data : {};
- let result = new Like();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new Like()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
}
- data["id"] = this.id;
- data["authUser"] = this.authUser;
- data["post"] = this.post;
- return data;
+ }
+ data['id'] = this.id
+ data['authUser'] = this.authUser
+ data['post'] = this.post
+ return data
}
}
export interface ILike {
- id: number;
- authUser?: number | undefined;
- post?: number | undefined;
+ id: number
+ authUser?: number | undefined
+ post?: number | undefined
- [key: string]: any;
+ [key: string]: any
}
export class PatchedAnnouncement implements IPatchedAnnouncement {
- readonly id?: number;
- body?: string | undefined;
+ readonly id?: number
+ body?: string | undefined
link?: string | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IPatchedAnnouncement) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.body = _data["body"];
- this.link = _data["link"];
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
}
+ ;( this).id = _data['id']
+ this.body = _data['body']
+ this.link = _data['link']
+ }
}
static fromJS(data: any): PatchedAnnouncement {
- data = typeof data === 'object' ? data : {};
- let result = new PatchedAnnouncement();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new PatchedAnnouncement()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
}
- data["id"] = this.id;
- data["body"] = this.body;
- data["link"] = this.link;
- return data;
+ }
+ data['id'] = this.id
+ data['body'] = this.body
+ data['link'] = this.link
+ return data
}
}
export interface IPatchedAnnouncement {
- id?: number;
- body?: string | undefined;
- link?: string | undefined;
+ id?: number
+ body?: string | undefined
+ link?: string | undefined
- [key: string]: any;
+ [key: string]: any
}
export class PatchedBatch implements IPatchedBatch {
- readonly id?: number;
- createdAt?: Date | undefined;
- name?: string | undefined;
- sponsor?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- totalNumberSeed?: number | undefined;
- totalPropagation?: number | undefined;
+ readonly id?: number
+ createdAt?: Date | undefined
+ name?: string | undefined
+ sponsor?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ totalNumberSeed?: number | undefined
+ totalPropagation?: number | undefined
site?: number | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IPatchedBatch) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = ( data)[property]
+ }
}
+ }
}
init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- (this).id = _data["id"];
- this.createdAt = _data["createdAt"] ? new Date(_data["createdAt"].toString()) : undefined;
- this.name = _data["name"];
- this.sponsor = _data["sponsor"];
- this.size = _data["size"];
- this.soilCondition = _data["soilCondition"];
- this.totalNumberSeed = _data["totalNumberSeed"];
- this.totalPropagation = _data["totalPropagation"];
- this.site = _data["site"];
- }
+ if (_data) {
+ for (var property in _data) {
+ if (_data.hasOwnProperty(property)) {
+ this[property] = _data[property]
+ }
+ }
+ ;( this).id = _data['id']
+ this.createdAt = _data['createdAt'] ? new Date(_data['createdAt'].toString()) : undefined
+ this.name = _data['name']
+ this.sponsor = _data['sponsor']
+ this.size = _data['size']
+ this.soilCondition = _data['soilCondition']
+ this.totalNumberSeed = _data['totalNumberSeed']
+ this.totalPropagation = _data['totalPropagation']
+ this.site = _data['site']
+ }
}
static fromJS(data: any): PatchedBatch {
- data = typeof data === 'object' ? data : {};
- let result = new PatchedBatch();
- result.init(data);
- return result;
+ data = typeof data === 'object' ? data : {}
+ let result = new PatchedBatch()
+ result.init(data)
+ return result
}
toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["id"] = this.id;
- data["createdAt"] = this.createdAt ? this.createdAt.toISOString() : undefined;
- data["name"] = this.name;
- data["sponsor"] = this.sponsor;
- data["size"] = this.size;
- data["soilCondition"] = this.soilCondition;
- data["totalNumberSeed"] = this.totalNumberSeed;
- data["totalPropagation"] = this.totalPropagation;
- data["site"] = this.site;
- return data;
+ data = typeof data === 'object' ? data : {}
+ for (var property in this) {
+ if (this.hasOwnProperty(property)) {
+ data[property] = this[property]
+ }
+ }
+ data['id'] = this.id
+ data['createdAt'] = this.createdAt ? this.createdAt.toISOString() : undefined
+ data['name'] = this.name
+ data['sponsor'] = this.sponsor
+ data['size'] = this.size
+ data['soilCondition'] = this.soilCondition
+ data['totalNumberSeed'] = this.totalNumberSeed
+ data['totalPropagation'] = this.totalPropagation
+ data['site'] = this.site
+ return data
}
}
export interface IPatchedBatch {
- id?: number;
- createdAt?: Date | undefined;
- name?: string | undefined;
- sponsor?: string | undefined;
- size?: string | undefined;
- soilCondition?: string | undefined;
- totalNumberSeed?: number | undefined;
- totalPropagation?: number | undefined;
- site?: number | undefined;
-
- [key: string]: any;
+ id?: number
+ createdAt?: Date | undefined
+ name?: string | undefined
+ sponsor?: string | undefined
+ size?: string | undefined
+ soilCondition?: string | undefined
+ totalNumberSeed?: number | undefined
+ totalPropagation?: number | undefined
+ site?: number | undefined
+
+ [key: string]: any
}
export class PatchedContact implements IPatchedContact {
- readonly id?: number;
- address?: string | undefined;
- email?: string | undefined;
- phone?: string | undefined;
- facebookLink?: string | undefined;
- xLink?: string | undefined;
- instagramLink?: string | undefined;
+ readonly id?: number
+ address?: string | undefined
+ email?: string | undefined
+ phone?: string | undefined
+ facebookLink?: string | undefined
+ xLink?: string | undefined
+ instagramLink?: string | undefined
linkedinLink?: string | undefined;
- [key: string]: any;
+ [key: string]: any
constructor(data?: IPatchedContact) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
+ if (data) {
+ for (var property in data) {
+ if (data.hasOwnProperty(property)) {
+ ;( this)[property] = (