Skip to content
Commits on Source (177)
File mode changed from 100755 to 100644
{
"extends": ["react-app", "airbnb", "prettier"],
"rules": {
"no-underscore-dangle": "off",
"react/jsx-filename-extension": "off",
"arrow-body-style": "off",
"class-methods-use-this": "off",
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"react/prefer-stateless-function": "off",
"import/prefer-default-export": "off",
"react/no-typos": "off",
"react/sort-comp": "off",
"react/destructuring-assignment": "off",
"no-plusplus": "off"
}
}
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'react-app',
],
rules: {
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-const': 'off',
'import/no-anonymous-default-export': 'off',
'jsx-a11y/alt-text': 'off',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-empty-pattern': 'off',
'no-extra-boolean-cast': 'off',
'no-restricted-globals': 'off',
'no-unsafe-optional-chaining': 'off',
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
'react/jsx-no-target-blank': 'off',
},
};
node_modules
coverage
.nyc_output
.cache
.DS_Store
.idea
yarn-error.log
.env
.history
.cache
.idea
.nyc_output
.vscode
coverage
dist
.env
.npmrc
lib
node_modules
tmp
yarn-error.log
image: node:latest
default:
image: node:14
before_script:
- npm ci --cache .npm --prefer-offline
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee -a .npmrc
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
stages:
- build
- deploy
deploy:
build:
stage: build
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
- if: $CI_COMMIT_BRANCH == 'v1'
script:
- ./scripts/build/package.sh
- mv node_modules tmp/package/node_modules
artifacts:
paths:
- tmp/package
expire_in: 10 mins
deploy:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == 'v1'
script:
- npm version from-git --allow-same-version
- npm ci
- npm run build
- echo "@sportnet:registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc
- echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
- npm publish
- cd tmp/package
- npm run semantic-release
\ No newline at end of file
node_modules
coverage
.nyc_output
.DS_Store
.idea
yarn-error.log
.history
.babelrc
.cache
dist
.DS_Store
.env*
.eslintrc
.gitlab-ci.yml
.history
.idea
.npmrc
.nyc_output
.prettierrc
.vscode
build.js
coverage
dist
node_modules
prestart.js
src
.gitlab-ci.yml
tsconfig.json
.vscode
tslint.json
.babelrc
.eslintrc
.prettierrc
build.js
\ No newline at end of file
yarn-error.log
\ No newline at end of file
@sportnet:registry=https://gitlab.bart.sk/api/v4/packages/npm/
registry=https://registry.npmjs.org
{
"branches": ["master", "v1"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/gitlab",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
......@@ -9,16 +9,21 @@ Balík `content` nahrádza balík `csm-widgets` (pre zobrazovanie obsahu) a `csm
## Inštalácia
V package.json:
```json
{
"dependencies": {
"content": "git+https://gitlab.bart.sk/sportnet/open-source/content.git"
}
}
Do .npmrc súboru pridať riadky:
```
@sportnet:registry=https://gitlab.bart.sk/api/v4/packages/npm/
registry=https://registry.npmjs.org
```
Následne inštalácia cez
```
npm i @sportnet/content
```
## Zobrazovanie obsahu
**POZOR**: pre použitie je nevyhnutné komponent obaliť (styled-components: ThemeProvider) v téme z balíka @sportnet/ui rozšírenú o tému aplikácie:
```ts
......@@ -35,8 +40,6 @@ const widgetsTheme = {
};
```
## Zobrazovanie obsahu
### Základné
```tsx
......@@ -223,7 +226,7 @@ import ContentEditor from 'content/lib/editor';
</ThemeProvider>;
```
## Poznámky
### Poznámky
- editor neobaľujte v elemente `<form></form>`, inak sa úpravou obsahu môže spustiť odoslanie formulára
- stav editora (value) udržujte v lokálnom stave komponentu (nie v redux store)
......@@ -358,16 +361,6 @@ const contextValue = {
};
```
### Instalacia vyvojovej verzie do CMS.UI a inych projektov na lokalnom prostedi
Ak vyvoj prebieha vo vlastnom branch, vieme upravenu verziu `content` nainstalovat do lubovolneho projektu, kde je mozne testovat zmeny. Pred nainstalovanim novej verzie je potrebne odinstalovat povodnu. Novu verziu instalujeme priamo z git, kde za znakom `#` nasleduje nazov branch, v ktorej mame upravenu verziu `content`.
```
$ npm unisntall content && npm install git+https://gitlab.bart.sk/sportnet/open-source/content.git#nazov-branch-s-upravenou-verziou-content
```
**POZOR: Po instalacii a otestovani je nutne vratit `package.json` a `package-lock.json` do povodneho stavu a necommitovat s projektom.**
### Upgrade conent balika v projektoch
Ak mame zmeny v `content` baliku hotove a su mergnute v `master`, mozme tuto novu verziu naisntalovat do projektov, kde bude potrebna (cms.ui, pages, sportnet.sme.sk a pod.).
......@@ -378,8 +371,6 @@ Vacsina projektov ponuka prikaz, ktorym preinstalujeme zavislosti:
$ npm run reinstall
```
Alebo ako v predchadzajucej kapitole, `content` balik odisntalujeme a nainstalujeme z git, ale bez znaku `#` v URL a nazvu branche (cize z `master` branch).
Po uspesnej instalacii sa vygeneruje novy `package-lock.json`, ktory obsahuje `content` balik s hashom posledneho commitu z `master` branch. Tento novy `package-lock.json` commitneme a odosleme na deployment.
#### TODO
......
require('dotenv').config();
var execSync = require('child_process').execSync;
const OUT_DIR = './lib';
const TMP_OUT_DIR = './lib2';
const cleanup = e => {
execSync(`rm -rf ${OUT_DIR} ${TMP_OUT_DIR}`);
};
// const handleError = e => {
// cleanup();
// process.exit(1);
// };
// process.on('uncaughtException', handleError);
cleanup();
execSync(`npx tsc --outDir ${OUT_DIR}`, { stdio: 'inherit' });
// resolve absolute paths to realtive paths (convert ~ to relative path)
execSync(
`BABEL_ENV=after_build npx babel ${OUT_DIR}/ --out-dir ${TMP_OUT_DIR}`,
{
stdio: 'inherit',
},
);
execSync(`rm -rf ${OUT_DIR}`);
execSync(`mv ${TMP_OUT_DIR} ${OUT_DIR}`);
execSync(
`rm -rf ${OUT_DIR}/index.html ${OUT_DIR}/index.dev.tsx ${OUT_DIR}/fixtures`,
);
// only declarations
execSync(
`npx tsc --outDir ${OUT_DIR} --allowJs false --emitDeclarationOnly -d`,
{
stdio: 'inherit',
},
);
"use strict";
exports.__esModule = true;
var utilities_1 = require("../utilities");
var fixture = [{
type: 'article',
value: [1, 2]
}, {
type: 'dateFrom',
value: '2020-07-27T12:24:57.496Z'
}, {
type: 'dateTo',
value: '2020-07-28T12:24:57.496Z'
}, {
type: 'calendar',
value: ['1', '2']
}, {
type: 'doctype',
value: ['article', 'other']
}, {
type: 'limit',
value: '12'
}, {
type: 'parentSection',
value: ['123']
}, {
type: 'section',
value: ['456', '654']
}, {
type: 'section',
value: ['456']
}, {
type: 'section',
value: []
}, {
type: 'siblingSections',
value: ['789', '987']
}, {
type: 'smarttag',
subtype: 'includes',
value: [{
key: 'a',
values: [{
key: 'b'
}, {
key: 'c'
}]
}]
}, {
type: 'smarttag',
subtype: 'includes',
value: [{
key: 'aa;',
values: [{
key: 'b'
}, {
key: 'c'
}]
}]
}, {
type: 'smarttag',
subtype: 'excludes',
value: [{
key: '1',
values: [{
key: '2'
}, {
key: '3'
}]
}]
}, {
type: 'smarttag',
subtype: 'excludes',
value: []
}];
describe('filterToUrl', function () {
it('should convert to url', function () {
expect(utilities_1.filterToUrl(fixture)).toBe('article=1%2C2&dateFrom=2020-07-27T12%3A24%3A57.496Z&dateTo=2020-07-28T12%3A24%3A57.496Z&calendar=1%2C2&doctype=article%2Cother&limit=12&parentSection=123&section=456%2C654%3B%7C%3B456%3B%7C%3B&siblingSections=789%2C987&smarttag=a%3Ab%2Cc%3B%7C%3Baa%3B%3Ab%2Cc&smarttag_exclude=1%3A2%2C3%3B%7C%3B');
});
it('should handle empty state', function () {
expect(utilities_1.filterToUrl([])).toBe('');
});
it('should handle invalid filters state', function () {
expect(utilities_1.filterToUrl([{
type: 'invalid',
value: '?'
}, {
type: 'limit',
value: '12'
}])).toBe('limit=12');
});
it('should handle single values for section, parentSection, doctype, siblingSections filters', function () {
expect(utilities_1.filterToUrl([{
type: 'doctype',
value: 'article'
}, {
type: 'parentSection',
value: '123'
}, {
type: 'section',
value: '654'
}, {
type: 'section',
value: '456'
}, {
type: 'siblingSections',
value: '789'
}])).toBe('doctype=article&parentSection=123&section=654%3B%7C%3B456&siblingSections=789');
});
});
describe('urlToFilter', function () {
it('should convert from url', function () {
expect(utilities_1.urlToFilter('article=1%2C2&dateFrom=2020-07-27T12%3A24%3A57.496Z&dateTo=2020-07-28T12%3A24%3A57.496Z&calendar=1%2C2&doctype=article%2Cother&limit=12&parentSection=123&section=456%2C654%3B%7C%3B456%3B%7C%3B&siblingSections=789%2C987&smarttag=a%3Ab%2Cc%3B%7C%3Baa%3B%3Ab%2Cc&smarttag_exclude=1%3A2%2C3%3B%7C%3B')).toEqual(fixture);
});
it('should handle empty state', function () {
expect(utilities_1.urlToFilter('')).toEqual([]);
});
it('should handle invalid filters state', function () {
expect(utilities_1.urlToFilter('invalid=a&limit=12')).toEqual([{
type: 'limit',
value: '12'
}]);
});
});
\ No newline at end of file
import 'isomorphic-fetch';
export declare type ThenArg<T> = T extends Promise<infer U> ? U : T extends (...args: any[]) => Promise<infer U> ? U : T;
declare type QueryParameters = {
[key: string]: string | number | string[] | number[] | boolean | boolean[] | undefined;
};
export declare type Calendar_Groups_List = {
items?: Array<string>;
};
export declare type EventInsert = {
title: string;
description: Array<Widget>;
perex?: string;
title_photo?: TitlePhoto;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId: string;
venue?: VenueNullable;
};
export declare type EventUpdate = {
title?: string;
description?: Array<Widget>;
perex?: string;
title_photo?: TitlePhoto;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId?: string;
venue?: VenueNullable;
};
export declare type EventDetail = {
title?: string;
description?: Array<Widget>;
perex?: string;
title_photo?: TitlePhoto;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId?: string;
appspace?: string;
_id?: string;
venue?: VenueNullable;
};
export declare type AdminEventDetail = {
title?: string;
description?: Array<Widget>;
perex?: string;
title_photo?: TitlePhoto;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId?: string;
appspace?: string;
_id?: string;
venue?: VenueNullable;
hasManagingRight?: boolean;
};
export declare type EventList = {
events: Array<Event>;
dateFrom?: string;
dateTo?: string;
};
export declare type Event = {
title?: string;
perex?: string;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId?: string;
appspace?: string;
_id?: string;
venue?: VenueNullable;
};
export declare type AdminEventList = {
events: Array<AdminEvent>;
dateFrom?: string;
dateTo?: string;
};
export declare type AdminEvent = {
title?: string;
perex?: string;
link?: string;
date_from?: string;
date_to?: string;
dates?: Array<DateTimeInterval>;
smarttags?: Array<SmartTag>;
calendarId?: string;
appspace?: string;
_id?: string;
venue?: VenueNullable;
hasManagingRight?: boolean;
};
export declare type TitlePhoto = object | null;
export declare type Widget = {
type: string;
};
export declare type DateTimeInterval = {
from: string;
to: string;
allDayEvent?: boolean;
};
export declare type SmartTag = {
key: string;
values: Array<{
key: string;
title?: string;
}>;
};
export declare type CalendarInsert = {
calendarId: string;
group?: string | null;
name: string;
color: string;
public: boolean;
managers?: CalendarManagers;
publication_groups?: PublicationGroups;
calendar_type: CalendarType;
competitionId?: string | null;
};
export declare type CalendarUpdate = {
name?: string;
group?: string | null;
color?: string;
public?: boolean;
managers?: CalendarManagers;
publication_groups?: PublicationGroups;
calendar_type?: CalendarType;
competitionId?: string | null;
};
export declare type CalendarType = 'standard' | 'competition';
export declare type CalendarDetail = {
calendarId?: string;
group?: string | null;
appspace?: string;
name?: string;
color?: string;
public?: boolean;
_id?: string;
calendar_type?: CalendarType;
competitionId?: string | null;
};
export declare type CalendarList = {
calendars: Array<CalendarDetail>;
};
export declare type AdminCalendarDetail = {
calendarId?: string;
group?: string | null;
appspace?: string;
name?: string;
color?: string;
public?: boolean;
_id?: string;
calendar_type?: CalendarType;
competitionId?: string | null;
hasManagingRight?: boolean;
created_by?: {
_id: string;
display_name?: string;
};
managers?: CalendarManagers;
publication_groups?: PublicationGroups;
};
export declare type AdminCalendarList = {
calendars: Array<AdminCalendarDetail>;
};
export declare type PublicationGroups = Array<string> | null;
export declare type CalendarManagers = Array<{
_id: string;
display_name?: string;
}>;
export declare type Address = {
street: string;
number: string;
zip: string;
city: string;
country: string;
};
export declare type VenueNullable = object | null;
export declare type Error = {
statusCode: number;
name: string;
description: string | null;
payload?: object | null;
userinfo?: string;
};
/**
*
* @class Api
* @param {(string)} [domainOrOptions] - The project domain.
*/
declare class Api {
protected baseUrl: string;
protected token: string;
serializeQueryParams(parameters: QueryParameters): string;
protected transformParameter(value: any, transformOperation?: string): any;
setBaseUrl(baseUrl: string): void;
setToken(token: string): void;
protected appendAuthHeaders(headerParams: Headers): Headers;
private request;
/**
*
* @method
* @name Api#getPublicCalendarGroups
*/
getPublicCalendarGroups(appspace: string, parameters?: {}): Promise<Calendar_Groups_List>;
/**
* Return array of events
* @method
* @name Api#getAppEventsPublic
*/
getAppEventsPublic(appspace: string, parameters?: {
dateFrom?: string;
dateTo?: string;
smarttags?: Array<string>;
calendarId?: Array<string>;
}): Promise<EventList>;
/**
* Return iCal file
* @method
* @name Api#getAppEventsPublicICalFile
*/
getAppEventsPublicICalFile(appspace: string, parameters?: {
dateFrom?: string;
smarttags?: Array<string>;
calendarId?: string;
token?: string;
}): Promise<File>;
/**
* Get event detail by EventId
* @method
* @name Api#getEventDetailPublic
*/
getEventDetailPublic(eventId: string, appspace: string, parameters?: {}): Promise<EventDetail>;
/**
* Return array of public calendars
* @method
* @name Api#getCalendarsPublic
*/
getCalendarsPublic(appspace: string, parameters?: {}): Promise<CalendarList>;
}
declare const _default: Api;
export default _default;
export { Api };
"use strict";
exports.__esModule = true;
exports.Api = void 0;
var tslib_1 = require("tslib");
/* tslint:disable */
require("isomorphic-fetch");
var ApiError =
/** @class */
function () {
function ApiError(message) {
this.details = null;
this.message = message;
}
return ApiError;
}();
/**
*
* @class Api
* @param {(string)} [domainOrOptions] - The project domain.
*/
var Api =
/** @class */
function () {
function Api() {
this.baseUrl = 'https://calendar.sportnet.online/api/v1';
this.token = '';
}
Api.prototype.serializeQueryParams = function (parameters) {
return Object.keys(parameters).reduce(function (acc, p) {
var param = parameters[p];
if (typeof param === 'undefined' || param === '') {
return acc;
}
return tslib_1.__spreadArrays(acc, [encodeURIComponent(p) + "=" + encodeURIComponent(String(parameters[p]))]);
}, []).join('&');
};
Api.prototype.transformParameter = function (value, transformOperation) {
switch (transformOperation) {
case 'joinUsingPipes':
return Array.isArray(value) ? value.join('|') : value;
default:
return value;
}
};
Api.prototype.setBaseUrl = function (baseUrl) {
this.baseUrl = baseUrl;
};
Api.prototype.setToken = function (token) {
this.token = token;
};
Api.prototype.appendAuthHeaders = function (headerParams) {
var headers = new Headers(headerParams);
if (this.token) {
headers.append('Authorization', "Bearer " + this.token);
}
return headers;
};
Api.prototype.request = function (method, url, body, headers, queryParameters) {
if (headers === void 0) {
headers = new Headers();
}
if (queryParameters === void 0) {
queryParameters = {};
}
return tslib_1.__awaiter(this, void 0, void 0, function () {
var queryParams, urlWithParams, form, k, response, responseContentType, err, _a;
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
queryParams = queryParameters && Object.keys(queryParameters).length ? this.serializeQueryParams(queryParameters) : null;
urlWithParams = url + (queryParams ? '?' + queryParams : '');
if (headers.get('Content-Type') === 'multipart/form-data') {
form = new FormData();
for (k in body) {
form.append(k, body[k]);
}
body = form;
} else if (headers.get('Content-Type') === 'application/json' && body && Object.keys(body).length > 0) {
body = JSON.stringify(body);
} else {
body = undefined;
}
if (headers.get('Content-Type') === 'multipart/form-data') {
headers["delete"]('Content-Type');
}
return [4
/*yield*/
, fetch(urlWithParams, {
method: method,
headers: headers,
body: body
})];
case 1:
response = _b.sent();
if (!response.ok) return [3
/*break*/
, 2];
responseContentType = response.headers && response.headers.get('Content-Type') || '';
if (responseContentType.includes('application/json')) {
return [2
/*return*/
, response.json()];
} else if (responseContentType.includes('application/pdf')) {
return [2
/*return*/
, response.blob()];
} else if (responseContentType.includes('text/plain')) {
return [2
/*return*/
, response.text()];
}
return [2
/*return*/
, {}];
case 2:
err = new ApiError(response.statusText);
_a = err;
return [4
/*yield*/
, response.json()];
case 3:
_a.details = _b.sent();
throw err;
}
});
});
};
/**
*
* @method
* @name Api#getPublicCalendarGroups
*/
Api.prototype.getPublicCalendarGroups = function (appspace, parameters) {
if (parameters === void 0) {
parameters = {};
}
var path = '/public/{appspace}/calendargroups';
var headers = new Headers();
var queryParameters = {};
headers = this.appendAuthHeaders(headers);
headers.append('Accept', 'application/json');
headers.append('Content-Type', 'application/json');
path = path.replace('{appspace}', appspace.toString());
return this.request('GET', "" + this.baseUrl + path, {}, headers, queryParameters);
};
/**
* Return array of events
* @method
* @name Api#getAppEventsPublic
*/
Api.prototype.getAppEventsPublic = function (appspace, parameters) {
if (parameters === void 0) {
parameters = {};
}
var path = '/public/{appspace}/events';
var headers = new Headers();
var queryParameters = {};
headers = this.appendAuthHeaders(headers);
headers.append('Accept', 'application/json');
headers.append('Content-Type', 'application/json');
if (typeof parameters['dateFrom'] !== 'undefined') {
queryParameters['dateFrom'] = parameters['dateFrom'];
}
queryParameters['dateFrom'] = this.transformParameter(queryParameters['dateFrom']);
if (typeof parameters['dateTo'] !== 'undefined') {
queryParameters['dateTo'] = parameters['dateTo'];
}
queryParameters['dateTo'] = this.transformParameter(queryParameters['dateTo']);
if (typeof parameters['smarttags'] !== 'undefined') {
queryParameters['smarttags'] = parameters['smarttags'];
}
queryParameters['smarttags'] = this.transformParameter(queryParameters['smarttags'], 'joinUsingPipes');
if (typeof parameters['calendarId'] !== 'undefined') {
queryParameters['calendarId'] = parameters['calendarId'];
}
queryParameters['calendarId'] = this.transformParameter(queryParameters['calendarId']);
path = path.replace('{appspace}', appspace.toString());
return this.request('GET', "" + this.baseUrl + path, {}, headers, queryParameters);
};
/**
* Return iCal file
* @method
* @name Api#getAppEventsPublicICalFile
*/
Api.prototype.getAppEventsPublicICalFile = function (appspace, parameters) {
if (parameters === void 0) {
parameters = {};
}
var path = '/public/{appspace}/export/events';
var headers = new Headers();
var queryParameters = {};
headers = this.appendAuthHeaders(headers);
headers.append('Accept', 'text/calendar');
headers.append('Content-Type', 'application/json');
if (typeof parameters['dateFrom'] !== 'undefined') {
queryParameters['dateFrom'] = parameters['dateFrom'];
}
queryParameters['dateFrom'] = this.transformParameter(queryParameters['dateFrom']);
if (typeof parameters['smarttags'] !== 'undefined') {
queryParameters['smarttags'] = parameters['smarttags'];
}
queryParameters['smarttags'] = this.transformParameter(queryParameters['smarttags'], 'joinUsingPipes');
if (typeof parameters['calendarId'] !== 'undefined') {
queryParameters['calendarId'] = parameters['calendarId'];
}
queryParameters['calendarId'] = this.transformParameter(queryParameters['calendarId']);
if (typeof parameters['token'] !== 'undefined') {
queryParameters['token'] = parameters['token'];
}
queryParameters['token'] = this.transformParameter(queryParameters['token']);
path = path.replace('{appspace}', appspace.toString());
return this.request('GET', "" + this.baseUrl + path, {}, headers, queryParameters);
};
/**
* Get event detail by EventId
* @method
* @name Api#getEventDetailPublic
*/
Api.prototype.getEventDetailPublic = function (eventId, appspace, parameters) {
if (parameters === void 0) {
parameters = {};
}
var path = '/public/{appspace}/events/{eventId}';
var headers = new Headers();
var queryParameters = {};
headers = this.appendAuthHeaders(headers);
headers.append('Accept', 'application/json');
headers.append('Content-Type', 'application/json');
path = path.replace('{eventId}', eventId.toString());
path = path.replace('{appspace}', appspace.toString());
return this.request('GET', "" + this.baseUrl + path, {}, headers, queryParameters);
};
/**
* Return array of public calendars
* @method
* @name Api#getCalendarsPublic
*/
Api.prototype.getCalendarsPublic = function (appspace, parameters) {
if (parameters === void 0) {
parameters = {};
}
var path = '/public/{appspace}/calendars';
var headers = new Headers();
var queryParameters = {};
headers = this.appendAuthHeaders(headers);
headers.append('Accept', 'application/json');
headers.append('Content-Type', 'application/json');
path = path.replace('{appspace}', appspace.toString());
return this.request('GET', "" + this.baseUrl + path, {}, headers, queryParameters);
};
return Api;
}();
exports.Api = Api;
exports["default"] = new Api();
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.