+
{children}
diff --git a/src/components/layout/NavBar.tsx b/src/components/layout/NavBar.tsx
index 61469f9..6a6a441 100644
--- a/src/components/layout/NavBar.tsx
+++ b/src/components/layout/NavBar.tsx
@@ -1,113 +1,51 @@
/* eslint-disable @next/next/no-img-element */
/* This example requires Tailwind CSS v2.0+ */
import { Popover, Transition } from '@headlessui/react';
-import {
- BookmarkAltIcon,
- BriefcaseIcon,
- ChartBarIcon,
- CheckCircleIcon,
- CursorClickIcon,
- DesktopComputerIcon,
- GlobeAltIcon,
- InformationCircleIcon,
- MenuIcon,
- NewspaperIcon,
- OfficeBuildingIcon,
- PhoneIcon,
- PlayIcon,
- ShieldCheckIcon,
- UserGroupIcon,
- ViewGridIcon,
- XIcon,
-} from '@heroicons/react/outline';
-import { ChevronDownIcon } from '@heroicons/react/solid';
+import { MenuIcon, XIcon } from '@heroicons/react/outline';
import Button from '@NonoviumUI/buttons/Button';
import LogoutButton from '@NonoviumUI/buttons/LogoutButton';
import Link from 'next/link';
+import { useRouter } from 'next/router';
import { Fragment } from 'react';
import { useUser } from '@/lib/api';
import ThemeChanger from '@/components/layout/ThemeChanger';
-const solutions = [
+const navItems = [
{
- name: 'Analytics',
- description:
- 'Get a better understanding of where your traffic is coming from.',
- href: '#',
- icon: ChartBarIcon,
+ title: 'Home',
+ href: '/',
+ srOnlyText: 'Go to Home Page',
},
{
- name: 'Engagement',
- description: 'Speak directly to your customers in a more meaningful way.',
- href: '#',
- icon: CursorClickIcon,
+ title: 'Blog',
+ href: '/blog',
+ srOnlyText: 'Go to our Blog Page',
},
{
- name: 'Security',
- description: "Your customers' data will be safe and secure.",
- href: '#',
- icon: ShieldCheckIcon,
+ title: 'Projects',
+ href: '/projects',
+ srOnlyText: 'Go to my Projects Page',
},
{
- name: 'Integrations',
- description: "Connect with third-party tools that you're already using.",
- href: '#',
- icon: ViewGridIcon,
- },
-];
-const callsToAction = [
- { name: 'Watch Demo', href: '#', icon: PlayIcon },
- { name: 'View All Products', href: '#', icon: CheckCircleIcon },
- { name: 'Contact Sales', href: '#', icon: PhoneIcon },
-];
-const company = [
- { name: 'About', href: '#', icon: InformationCircleIcon },
- { name: 'Customers', href: '#', icon: OfficeBuildingIcon },
- { name: 'Press', href: '#', icon: NewspaperIcon },
- { name: 'Careers', href: '#', icon: BriefcaseIcon },
- { name: 'Privacy', href: '#', icon: ShieldCheckIcon },
-];
-const resources = [
- { name: 'Community', href: '#', icon: UserGroupIcon },
- { name: 'Partners', href: '#', icon: GlobeAltIcon },
- { name: 'Guides', href: '#', icon: BookmarkAltIcon },
- { name: 'Webinars', href: '#', icon: DesktopComputerIcon },
-];
-const blogPosts = [
- {
- id: 1,
- name: 'Boost your conversion rate',
- href: '#',
- preview:
- 'Eget ullamcorper ac ut vulputate fames nec mattis pellentesque elementum. Viverra tempor id mus.',
- imageUrl:
- 'https://images.unsplash.com/photo-1558478551-1a378f63328e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2849&q=80',
+ title: 'About',
+ href: '/about',
+ srOnlyText: 'Go to my About Page',
},
{
- id: 2,
- name: 'How to use search engine optimization to drive traffic to your site',
- href: '#',
- preview:
- 'Eget ullamcorper ac ut vulputate fames nec mattis pellentesque elementum. Viverra tempor id mus.',
- imageUrl:
- 'https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=2300&q=80',
+ title: 'Contact',
+ href: '/contact',
+ srOnlyText: 'Go to my Contact Page',
},
];
-function classNames(...classes: string[]) {
- return classes.filter(Boolean).join(' ');
-}
-
export default function NavBar() {
+ const router = useRouter();
const { isAuthenticated } = useUser();
return (
-
-
+
+
@@ -115,8 +53,8 @@ export default function NavBar() {
@@ -128,248 +66,30 @@ export default function NavBar() {
-
-
- {({ open }) => (
- <>
-
- Solutions
-
-
-
-
-
-
-
-
- {callsToAction.map((item) => (
-
- ))}
-
-
-
-
- >
- )}
-
-
- Pricing
-
-
- Docs
-
-
- {({ open }) => (
- <>
-
- More
-
-
-
-
-
-
-
-
-
- >
- )}
-
-
+
+ {navItems.map(({ href, title }) => (
+
+
+ {title}
+
+
+ ))}
+
{!isAuthenticated ? (
<>
-
+ {/*
-
+ */}
>
) : (
<>
@@ -384,7 +104,7 @@ export default function NavBar() {
-
+ {/* Slide Out Menu */}
@@ -425,29 +145,19 @@ export default function NavBar() {
diff --git a/src/components/videoPlayer/VideoPlayer.tsx b/src/components/videoPlayer/VideoPlayer.tsx
index 1b549da..f841219 100644
--- a/src/components/videoPlayer/VideoPlayer.tsx
+++ b/src/components/videoPlayer/VideoPlayer.tsx
@@ -5,9 +5,9 @@ import { IVideoPlayerProps } from '../../lib/types';
const defaultPlayer = {
id: 'vs',
- url: 'http://videocms.jcloud.ik-server.com//media/encoded/7/admin1/5f47ebfc2bb840129579ea73bf784772.5f47ebfc2bb840129579ea73bf784772.caminandes_llamigos_1080p151.mp4.mp4',
+ url: 'https://vcms-ssl.capt.nonovium.com/media/encoded/7/admin1/4edaffd01f264cff914264b632cb5089.4edaffd01f264cff914264b632cb5089.caminandes_llamigos_1080p1511_-_Copy.mp4.mp4',
poster:
- 'http://videocms.jcloud.ik-server.com//media/original/thumbnails/user/admin1/5f47ebfc2bb840129579ea73bf784772.caminandes_llamigos_1080p151.mp4_Bn9Sg69.jpg',
+ 'https://vcms-ssl.capt.nonovium.com/media/original/thumbnails/user/admin1/4edaffd01f264cff914264b632cb5089.caminandes_llamigos_1080p1511_-_Copy.mp4_eDq3E3Z.jpg',
fluid: true,
fitVideoSize: 'auto',
};
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 2718792..cf2df4f 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -3,7 +3,6 @@ import createAuthRefreshInterceptor from 'axios-auth-refresh';
import useSWR from 'swr';
import { getRefreshToken, getToken, setTokens } from './auth';
-// import { isAuthenticated as checkAuth } from './auth';
import { publishedOnDate } from './helper';
import { secondsToHHMMSS } from './helper';
import { IExtendedEncodedVideo } from './types';
@@ -35,7 +34,6 @@ const refreshAuthLogic = (failedRequest: {
}
)
.then((tokenRefreshResponse) => {
- // localStorage.setItem('token', tokenRefreshResponse.data.token);
setTokens(
tokenRefreshResponse.data.access,
tokenRefreshResponse.data.refresh
@@ -47,8 +45,6 @@ const refreshAuthLogic = (failedRequest: {
// instantiate the interceptor
createAuthRefreshInterceptor(axios, refreshAuthLogic);
-// const userFetcher = (url: string) =>
-// axios.get(url, { withCredentials: true }).then((res) => res.data);
const userFetcher = (url: string) =>
axios
.get(url, {
@@ -60,27 +56,23 @@ const userFetcher = (url: string) =>
})
.then((res) => res.data);
-export function headers() {
- return {
- withCredentials: true,
- headers: {
- 'Content-Type': 'application/json',
- },
- };
-}
+// export function headers() {
+// return {
+// withCredentials: true,
+// headers: {
+// 'Content-Type': 'application/json',
+// },
+// };
+// }
-export async function fileUploadHeaders() {
- return {
- withCredentials: true,
- headers: {
- 'Content-Type': 'multipart/form-data',
- 'X-CSRFToken': await getCSRF(),
- },
- };
-}
-//! Auth Requests
-// export function registerUser(formdata) {
-// return axios.post(`${baseUrl}/register`, formdata);
+// export async function fileUploadHeaders() {
+// return {
+// withCredentials: true,
+// headers: {
+// 'Content-Type': 'multipart/form-data',
+// 'X-CSRFToken': await getCSRF(),
+// },
+// };
// }
export async function refreshUser() {
@@ -101,17 +93,12 @@ export async function refreshUser() {
export async function loginUser(formdata: Record) {
return axios.post(
- // `${baseUrl}/spa/login/`,
- //'https://vcms-ssl.capt.nonovium.com/spa/login/',
`${baseUrl}/spa/token/`,
- // `${baseUrl}/api/v1/login`,
{ ...formdata },
{
- // withCredentials: true,
withCredentials: false,
headers: {
'Content-Type': 'application/json',
- // 'X-CSRFToken': await getCSRF(),
},
}
);
@@ -126,14 +113,7 @@ export async function logoutUser() {
);
}
-// TODO curl -X POST http://127.0.0.1:8088/auth/token/logout/ --data 'b704c9fc3655635646356ac2950269f352ea1139' -H 'Authorization: Token b704c9fc3655635646356ac2950269f352ea1139'
-
export function useUser() {
- // const {
- // data: userData,
- // mutate: userMutate,
- // error: userError,
- // } = useSWR(`${baseUrl}/spa/whoami/`, userFetcher);
const {
data: userData,
mutate: userMutate,
@@ -141,7 +121,6 @@ export function useUser() {
} = useSWR(`${baseUrl}/spa/auth/users/me/`, userFetcher);
const loading: boolean = !userData && !userError;
const isAuthenticated: boolean = userData?.id !== undefined;
- // const isAuthenticated = checkAuth()
return {
loading,
@@ -158,7 +137,7 @@ export function useUserMedia() {
userFetcher
);
const { data: media, error: mediaError } = useSWR(
- user ? `${baseUrl}/api/v1/media/?author=${user.username}` : null,
+ user ? `${baseUrl}/spa/video/?author=${user.username}` : null,
userFetcher,
{
refreshInterval: 1000,
@@ -182,6 +161,7 @@ export function useVideoDetail(videoID: string) {
// need to check that videoID is a string. As types throws error on useRouter...
// we also check videoID is not 'null' or 'undefined as the VideoPage [videoID].tsx
// passes this as a string
+ // TODO: chore: refactor, could be cleaner
const shouldFetch =
videoID &&
videoID !== 'null' &&
@@ -194,7 +174,6 @@ export function useVideoDetail(videoID: string) {
error: videoError,
mutate: videoMutate,
} = useSWR(
- // shouldFetch ? `${baseUrl}/api/v1/media/${videoID}` : null,
shouldFetch ? `${baseUrl}/spa/video/${videoID}` : null,
userFetcher,
{
@@ -204,6 +183,7 @@ export function useVideoDetail(videoID: string) {
revalidateOnReconnect: false,
}
);
+
const formattedDuration = video?.duration
? secondsToHHMMSS(video.duration)
: '';
@@ -253,29 +233,6 @@ export function useVideoDetail(videoID: string) {
videoPosterURL: video?.poster_url ? baseUrl + video?.poster_url : undefined,
};
- // const encodingAssets = video?.encodings_info && Object.keys(video?.encodings_info).map((key, i) => {
- // return {
- // resolution: key,
- // encoding: video?.encodings_info[key],
- // };
- // });
-
- // const encodingAssets = video?.encodings_info && Object.keys(video?.encodings_info).map((key, i) => {
- // const filesArray = [];
- // const encodedFiles = Object.keys(video?.encodings_info[key]).map((key2, i2) => {
- // const encodedVideo = video?.encodings_info[key][key2];
- // const encodedVideoFiles = {
- // resolution: key,
- // encoder: key2,
- // ...encodedVideo,
- // };
- // console.log('encodedVideoFiles', encodedVideoFiles)
- // filesArray.push(encodedVideoFiles);
- // })
- // console.log('filesArray', filesArray)
- // return filesArray;
- // });
-
const encodedFilesArray: IEncodedVideoArray = [];
const encodedH264FilesArray: IEncodedH264VideoArray = [];
// eslint-disable-next-line unused-imports/no-unused-vars
@@ -352,23 +309,3 @@ export async function getCSRF() {
return 'Error';
}
}
-
-// export function csrfToken() {
-// let i,
-// cookies,
-// cookie,
-// cookieVal = null;
-// if (document.cookie && '' !== document.cookie) {
-// cookies = document.cookie.split(';');
-// i = 0;
-// while (i < cookies.length) {
-// cookie = cookies[i].trim();
-// if ('csrftoken=' === cookie.substring(0, 10)) {
-// cookieVal = decodeURIComponent(cookie.substring(10));
-// break;
-// }
-// i += 1;
-// }
-// }
-// return cookieVal;
-// }
diff --git a/src/lib/auth.js b/src/lib/auth.js
index 6178122..9b87172 100644
--- a/src/lib/auth.js
+++ b/src/lib/auth.js
@@ -85,11 +85,3 @@ export function isOwner(userId) {
if (!payload) return false;
return userId === payload.userId;
}
-
-// function getCsrfToken(token) {
-// console.log('token', token);
-// return console.log(btoa(token));
-// }
-
-// getCsrfToken('697989cfa78e8cc67ba4d22456e29e5e142b7d6d');
-// getCsrfToken('Njk3OTg5Y2ZhNzhlOGNjNjdiYTRkMjI0NTZlMjllNWUxNDJiN2Q2ZA==');
diff --git a/src/lib/fetch-blog-posts.ts b/src/lib/fetch-blog-posts.ts
new file mode 100644
index 0000000..5e7239a
--- /dev/null
+++ b/src/lib/fetch-blog-posts.ts
@@ -0,0 +1,13 @@
+export async function loadBlogPosts() {
+ // Call an external API endpoint to get public blog posts
+ try {
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_VCMS_HOST}/spa/video/?post_type=blog_post`
+ );
+ const data = await res.json();
+
+ return data;
+ } catch (error) {
+ return error;
+ }
+}
diff --git a/src/lib/getDevTechIcon.tsx b/src/lib/getDevTechIcon.tsx
new file mode 100644
index 0000000..ed5b60b
--- /dev/null
+++ b/src/lib/getDevTechIcon.tsx
@@ -0,0 +1,139 @@
+import { devIconList } from 'data/devIconList';
+import { FaCode, FaReact, FaSass } from 'react-icons/fa';
+import {
+ SiAdobeaftereffects,
+ SiAdobeillustrator,
+ SiAdobephotoshop,
+ SiAdobepremierepro,
+ SiBulma,
+ SiCss3,
+ SiDjango,
+ SiDocker,
+ SiExpress,
+ SiGit,
+ SiGithub,
+ SiGraphql,
+ SiHtml5,
+ SiJavascript,
+ SiLess,
+ SiMongodb,
+ SiNeo4J,
+ SiNextdotjs,
+ SiNodedotjs,
+ SiNpm,
+ SiPostgresql,
+ SiPython,
+ SiTailwindcss,
+ SiTypescript,
+ SiVisualstudio,
+ SiWebpack,
+} from 'react-icons/si';
+
+import { DevTech, DevTechIconFormat } from './types';
+
+export function getDevTechIcon(
+ devTech: DevTech,
+ iconFormat: DevTechIconFormat
+) {
+ const devTechnology = devTech
+ .toLowerCase()
+ .replaceAll(' ', '')
+ .replaceAll('-', '');
+
+ if (iconFormat === 'IconComponent') {
+ switch (devTechnology) {
+ case 'typescript':
+ return ;
+ case 'javascript':
+ return ;
+ case 'react':
+ return ;
+ case 'python':
+ return ;
+ case 'next':
+ return ;
+ case 'nextjs':
+ return ;
+ case 'node':
+ return ;
+ case 'nodejs':
+ return ;
+ case 'express':
+ return ;
+ case 'mongodb':
+ return ;
+ case 'postgresql':
+ return ;
+ case 'graphql':
+ return ;
+ case 'django':
+ return ;
+ case 'docker':
+ return ;
+ case 'css3':
+ return ;
+ case 'tailwindcss':
+ return ;
+ case 'bulma':
+ return ;
+ case 'html5':
+ return ;
+ case 'sass':
+ return ;
+ case 'less':
+ return ;
+ case 'github':
+ return ;
+ case 'git':
+ return ;
+ case 'npm':
+ return ;
+ case 'webpack':
+ return ;
+ case 'illustrator':
+ return ;
+ case 'photoshop':
+ return ;
+ case 'aftereffects':
+ return ;
+ case 'adobeaftereffects':
+ return ;
+ case 'adobepremiere':
+ return ;
+ case 'premierepro':
+ return ;
+ case 'visualstudio':
+ return ;
+ case 'neo4j':
+ return ;
+ default:
+ return ;
+ }
+ } else if (iconFormat == 'DevIconUrl') {
+ if (devIconList.includes(`${devTechnology}-original.svg`)) {
+ return `/dev-icons/${devTechnology}-original.svg`;
+ } else if (devIconList.includes(`${devTechnology}-plain.svg`)) {
+ return `/dev-icons/${devTechnology}-plain.svg`;
+ } else if (devIconList.includes(`${devTechnology}-original-wordmark.svg`)) {
+ return `/dev-icons/${devTechnology}-original-wordmark.svg`;
+ } else if (devIconList.includes(`${devTechnology}-plain-wordmark.svg`)) {
+ return `/dev-icons/${devTechnology}-plain-wordmark.svg`;
+ } else {
+ return `/dev-icons/unknown.svg`;
+ }
+ } else if (iconFormat == 'DevIconWordUrl') {
+ if (devIconList.includes(`${devTechnology}-original-wordmark.svg`)) {
+ return `/dev-icons/${devTechnology}-original-wordmark.svg`;
+ } else if (devIconList.includes(`${devTechnology}-plain-wordmark.svg`)) {
+ return `/dev-icons/${devTechnology}-plain-wordmark.svg`;
+ } else if (devIconList.includes(`${devTechnology}-original.svg`)) {
+ return `/dev-icons/${devTechnology}-original.svg`;
+ } else if (devIconList.includes(`${devTechnology}-plain.svg`)) {
+ return `/dev-icons/${devTechnology}-plain.svg`;
+ } else {
+ return `/dev-icons/unknown-wordmark.svg`;
+ }
+ } else {
+ return '';
+ }
+}
diff --git a/src/lib/helper.ts b/src/lib/helper.ts
index 0e209d2..742d969 100644
--- a/src/lib/helper.ts
+++ b/src/lib/helper.ts
@@ -12,7 +12,7 @@ export function openGraph({
templateTitle,
description,
// !STARTERCONF Or, you can use my server with your own logo.
- logo = 'https://og.thcl.dev/images/logo.jpg',
+ logo = 'https://s3.pub1.infomaniak.cloud/object/v1/AUTH_598753f3935548c6a1ca8f065e534ac1/supersuperdev-pub/img/logo-ss/logo-ss.svg',
}: OpenGraphType): string {
const ogLogo = encodeURIComponent(logo);
const ogSiteName = encodeURIComponent(siteName.trim());
diff --git a/src/lib/types.ts b/src/lib/types.ts
index e94e7cf..37cb294 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -60,8 +60,14 @@ export interface IVideoDetails {
ratings_info: string;
add_subtitle_url: string;
allow_download: boolean;
+ post_type: string;
+}
+export interface IBlogPosts {
+ count: 2;
+ next: null;
+ previous: null;
+ results: IVideoDetails[];
}
-
export interface IEncodedH264Video {
name: string;
url: string;
@@ -108,3 +114,46 @@ export interface IDynamicVideoThumbnail {
export interface ICodec {
[key: string]: string | unknown;
}
+
+export type DevIcons = {
+ name: string;
+ title: string;
+ alt: string;
+};
+
+export type DevTech =
+ | 'TypeScript'
+ | 'JavaScript'
+ | 'Python'
+ | 'React'
+ | 'Next'
+ | 'Nextjs'
+ | 'Nodejs'
+ | 'Node'
+ | 'Express'
+ | 'MongoDB'
+ | 'PostgreSQL'
+ | 'GraphQL'
+ | 'Django'
+ | 'Docker'
+ | 'CSS3'
+ | 'Tailwind CSS'
+ | 'Bulma'
+ | 'HTML5'
+ | 'Sass'
+ | 'Less'
+ | 'GitHub'
+ | 'Git'
+ | 'NPM'
+ | 'Webpack'
+ | 'Illustrator'
+ | 'Photoshop'
+ | 'After Effects'
+ | 'Premiere Pro'
+ | 'Visual Studio'
+ | 'Neo4j';
+
+export type DevTechIconFormat =
+ | 'IconComponent'
+ | 'DevIconUrl'
+ | 'DevIconWordUrl';
diff --git a/src/pages/blog/[blogID].tsx b/src/pages/blog/[blogID].tsx
new file mode 100644
index 0000000..48572b8
--- /dev/null
+++ b/src/pages/blog/[blogID].tsx
@@ -0,0 +1,51 @@
+//import Button from '@NonoviumUI/buttons/Button';
+import HeaderFooter from '@NonoviumUI/layout/HeaderFooter';
+//import Link from 'next/link';
+import { useRouter } from 'next/router';
+import { ReactElement } from 'react';
+
+import Block from '@/components/containers/Block';
+import Layout from '@/components/layout/Layout';
+//import SidebarLayout from '@/components/layout/SidebarLayout';
+import Seo from '@/components/Seo';
+
+//import FullDetail from '../../../components/videos-ui/FullDetail';
+
+export default function Blog() {
+ const router = useRouter();
+ const { blogID } = router.query;
+
+ return (
+ <>
+
+
+
+
+ {blogID !== null && blogID !== undefined && (
+ <>
+ {/* */}
+ {/*
+
+
+
+
+
+ */}
+ {blogID}
+ >
+ )}
+
+
+ >
+ );
+}
+
+Blog.getLayout = function getLayout(Page: ReactElement) {
+ return (
+
+ {Page}
+
+ );
+};
diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx
new file mode 100644
index 0000000..d454c86
--- /dev/null
+++ b/src/pages/blog/index.tsx
@@ -0,0 +1,51 @@
+import HeaderFooter from '@NonoviumUI/layout/HeaderFooter';
+import { ReactElement } from 'react';
+
+import { loadBlogPosts } from '@/lib/fetch-blog-posts';
+
+import Layout from '@/components/layout/Layout';
+import Seo from '@/components/Seo';
+
+import { IVideoDetails } from '../../lib/types';
+
+export default function Blog({
+ blogPosts: blogPosts,
+}: {
+ blogPosts: IVideoDetails[];
+}) {
+ return (
+ <>
+
+ Blog
+
+ {blogPosts.map(({ title }) => (
+ - {title}
+ ))}
+
+ >
+ );
+}
+
+Blog.getLayout = function getLayout(Blog: ReactElement) {
+ return (
+
+ {Blog}
+
+ );
+};
+
+export async function getStaticProps() {
+ const data = await loadBlogPosts();
+ const featuredPost = data.results[0];
+ // if data.results.length > 1 const blogPosts = data.results.slice(1), if data.results.length is 0 const blogPosts = data.results;
+
+ const blogPosts: IVideoDetails[] =
+ data.results.length >= 2 ? data.results.slice(1) : data.results;
+
+ return {
+ props: {
+ featuredPost,
+ blogPosts,
+ },
+ };
+}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 7f77479..48ce4df 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,28 +1,57 @@
import HeaderFooter from '@NonoviumUI/layout/HeaderFooter';
+import Image from 'next/image';
import { ReactElement } from 'react';
-/** SVGR Support * Caveat: No React Props Type.
- * You can override the next-env if the type is important to you
- * @see https://stackoverflow.com/questions/68103844/how-to-override-next-js-svg-module-declaration
- */
import Layout from '@/components/layout/Layout';
import Seo from '@/components/Seo';
-// import { useUser } from '../lib/api';
-export default function Page() {
- // const { isAuthenticated, user } = useUser();
- // const router = useRouter();
- // useEffect(() => {
- // if (user && isAuthenticated) {
- // router.push('/dashboard');
- // }
- // // eslint-disable-next-line react-hooks/exhaustive-deps
- // }, [user, isAuthenticated]);
+import DevIconInline from '../components/devLang/DevIconInline';
+export default function Page() {
return (
<>
- Home Page
+
+
+
+
+ I'm{' '}
+
+ Steven Saunders
+
+ . I'm a full stack developer and software engineer with a
+ passion for coding.
+
+
+
+
+
+
+
+
+
+ I build scalable, performant, and accessible web applications.
+
+
+
+
+
+
Icon Images
+
+
+
+
Icon Wordmarks
+
+
+
+
>
);
}
diff --git a/src/pages/videos/index.tsx b/src/pages/videos/index.tsx
index ced1418..ecf76c8 100644
--- a/src/pages/videos/index.tsx
+++ b/src/pages/videos/index.tsx
@@ -1,6 +1,8 @@
import dynamic from 'next/dynamic';
import * as React from 'react';
+import { IVideoPlayerProps } from '@/lib/types';
+
import Box from '@/components/containers/Box';
const DynamicVideoPlayer = dynamic(
@@ -8,20 +10,24 @@ const DynamicVideoPlayer = dynamic(
{ ssr: false }
);
-const defaultPlayer = {
- id: 'vs',
- url: 'http://videocms.jcloud.ik-server.com//media/encoded/7/admin1/5f47ebfc2bb840129579ea73bf784772.5f47ebfc2bb840129579ea73bf784772.caminandes_llamigos_1080p151.mp4.mp4',
- poster:
- 'http://videocms.jcloud.ik-server.com//media/original/thumbnails/user/admin1/5f47ebfc2bb840129579ea73bf784772.caminandes_llamigos_1080p151.mp4_Bn9Sg69.jpg',
- fluid: true,
-};
-
export default function VideoHomePage() {
+ const swiftSrc =
+ 'https://supersuperdev-pub.598753f3935548c6a1ca8f065e534ac1.s3.pub1.infomaniak.cloud/test-video/1080.caminandes.mp4';
+ // const vcmsSrc = 'https://vcms-ssl.capt.nonovium.com/media/encoded/7/admin1/4edaffd01f264cff914264b632cb5089.4edaffd01f264cff914264b632cb5089.caminandes_llamigos_1080p1511_-_Copy.mp4.mp4'
+
+ const defaultPlayerProps: IVideoPlayerProps = {
+ id: 'vs',
+ url: swiftSrc,
+ poster:
+ 'https://vcms-ssl.capt.nonovium.com/media/original/thumbnails/user/admin1/4edaffd01f264cff914264b632cb5089.caminandes_llamigos_1080p1511_-_Copy.mp4_eDq3E3Z.jpg',
+ fluid: true,
+ progress: 100,
+ };
return (
<>
Video Home Page
-
+
>
);
diff --git a/src/styles/globals.css b/src/styles/globals.css
index dba33c7..0464a8b 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -120,4 +120,118 @@
.animated-underline:focus-visible {
background-size: 0 2px, 100% 2px;
}
+ .anim-bg-light {
+ background: linear-gradient(
+ 220deg,
+ #c4d0ee,
+ #f3e1f9,
+ #d1ebf9,
+ #cde5ea,
+ #bac4ea,
+ #6e0a62
+ );
+ background-size: 1200% 1200%;
+
+ -webkit-animation: AnimBGLight 54s ease infinite;
+ -moz-animation: AnimBGLight 54s ease infinite;
+ animation: AnimBGLight 54s ease infinite;
+ }
+
+ @-webkit-keyframes AnimBGLight {
+ 0% {
+ background-position: 0% 91%;
+ }
+ 50% {
+ background-position: 100% 10%;
+ }
+ 100% {
+ background-position: 0% 91%;
+ }
+ }
+ @-moz-keyframes AnimBGLight {
+ 0% {
+ background-position: 0% 91%;
+ }
+ 50% {
+ background-position: 100% 10%;
+ }
+ 100% {
+ background-position: 0% 91%;
+ }
+ }
+ @keyframes AnimBGLight {
+ 0% {
+ background-position: 0% 91%;
+ }
+ 50% {
+ background-position: 100% 10%;
+ }
+ 100% {
+ background-position: 0% 91%;
+ }
+ }
+
+ .anim-bg-dark {
+ background: linear-gradient(
+ 60deg,
+ #181738,
+ #000000,
+ #202649,
+ #120425,
+ #360c0a,
+ #110529,
+ #110229,
+ #301a1a,
+ #181738
+ );
+ background-size: 600% 600%;
+
+ -webkit-animation: AnimBGDark 76s ease infinite;
+ -moz-animation: AnimBGDark 76s ease infinite;
+ animation: AnimBGDark 76s ease infinite;
+ }
+
+ @-webkit-keyframes AnimBGDark {
+ 0% {
+ background-position: 4% 0%;
+ }
+ 50% {
+ background-position: 97% 100%;
+ }
+ 100% {
+ background-position: 4% 0%;
+ }
+ }
+ @-moz-keyframes AnimBGDark {
+ 0% {
+ background-position: 4% 0%;
+ }
+ 50% {
+ background-position: 97% 100%;
+ }
+ 100% {
+ background-position: 4% 0%;
+ }
+ }
+ @keyframes AnimBGDark {
+ 0% {
+ background-position: 4% 0%;
+ }
+ 50% {
+ background-position: 97% 100%;
+ }
+ 100% {
+ background-position: 4% 0%;
+ }
+ }
+
+ .txt-shdw-distant {
+ text-shadow: 0px 3px 0px black, 0px 14px 10px rgba(0, 0, 0, 0.15),
+ 0px 24px 2px rgba(0, 0, 0, 0.1), 0px 34px 30px rgba(0, 0, 0, 0.1);
+ }
+
+ .txt-shdw-distant-dark {
+ text-shadow: 0px 3px 0px black, 0px 14px 10px rgba(0, 0, 0, 0.15),
+ 0px 24px 2px rgba(0, 0, 0, 0.1), 0px 34px 30px rgba(0, 0, 0, 0.3);
+ }
}
diff --git a/vcms-schema/schema.ts b/vcms-schema/schema.ts
deleted file mode 100644
index e1943c9..0000000
--- a/vcms-schema/schema.ts
+++ /dev/null
@@ -1,1030 +0,0 @@
-/**
- * This file was auto-generated by openapi-typescript.
- * Do not make direct changes to the file.
- */
-
-export interface paths {
- '/categories': {
- /** Lists all categories */
- get: operations['categories_list'];
- };
- '/comments': {
- /** Paginated listing of all comments */
- get: operations['comments_list'];
- };
- '/encode_profiles/': {
- /** Lists all encoding profiles for videos */
- get: operations['encode_profiles_list'];
- };
- '/login': {
- /** Login url endpoint. According to what the portal provides, you may provide username and/or email, plus the password */
- post: operations['login_create'];
- };
- '/manage_comments': {
- /** Manage comments for VCMS managers and reviewers */
- get: operations['manage_comments_list'];
- /** Delete comments for VCMS managers and reviewers */
- delete: operations['manage_comments_delete'];
- };
- '/manage_media': {
- /** Manage media for VCMS managers and reviewers */
- get: operations['manage_media_list'];
- /** Delete media for VCMS managers and reviewers */
- delete: operations['manage_media_delete'];
- };
- '/manage_users': {
- /** Manage users for VCMS managers and reviewers */
- get: operations['manage_users_list'];
- /** Delete users for VCMS managers */
- delete: operations['manage_users_delete'];
- };
- '/media/': {
- /** Lists all media */
- get: operations['media_list'];
- /** Adds a new media, for authenticated users */
- post: operations['media_create'];
- };
- '/media/{friendly_token}': {
- /** Get information for a media */
- get: operations['media_read'];
- /** Update a Media, for Media uploader */
- put: operations['media_update'];
- /** Actions for a media, for VCMS editors and managers */
- post: operations['media_manager_actions'];
- /** Delete a Media, for VCMS editors and managers */
- delete: operations['media_delete'];
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- };
- '/media/{friendly_token}/actions': {
- /** to_be_written */
- get: operations['media_actions_list'];
- /** to_be_written */
- post: operations['media_actions_create'];
- /** to_be_written */
- delete: operations['media_actions_delete'];
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- };
- '/media/{friendly_token}/comments': {
- /** to_be_written */
- get: operations['media_comments_list'];
- /** to_be_written */
- post: operations['media_comments_create'];
- /** to_be_written */
- delete: operations['media_comments_delete'];
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- };
- '/media/{friendly_token}/comments/{uid}': {
- /** to_be_written */
- get: operations['media_comments_read'];
- /** to_be_written */
- post: operations['media_comments_create'];
- /** to_be_written */
- delete: operations['media_comments_delete'];
- parameters: {
- path: {
- friendly_token: string;
- uid: string;
- };
- };
- };
- '/playlists': {
- /** to_be_written */
- get: operations['playlists_list'];
- /** to_be_written */
- post: operations['playlists_create'];
- };
- '/playlists/': {
- /** to_be_written */
- get: operations['playlists_list'];
- /** to_be_written */
- post: operations['playlists_create'];
- };
- '/playlists/{friendly_token}': {
- /** to_be_written */
- get: operations['playlists_read'];
- /** to_be_written */
- put: operations['playlists_update'];
- /** to_be_written */
- post: operations['playlists_create'];
- /** to_be_written */
- delete: operations['playlists_delete'];
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- };
- '/search': {
- /** to_be_written */
- get: operations['search_list'];
- };
- '/tags': {
- /** Paginated listing of all tags */
- get: operations['tags_list'];
- };
- '/user/action/{action}': {
- /** Lists user actions */
- get: operations['user_action_read'];
- parameters: {
- path: {
- action: string;
- };
- };
- };
- '/user/token': {
- /** Returns an authenticated user's token */
- get: operations['user_token_list'];
- };
- '/users': {
- /** Paginated listing of users */
- get: operations['users_list'];
- };
- '/users/': {
- /** Paginated listing of users */
- get: operations['users_list'];
- };
- '/users/{username}': {
- /** Get user details */
- get: operations['users_read'];
- /** to_be_written */
- put: operations['users_update'];
- /** Post user details - authenticated view */
- post: operations['users_create'];
- /** to_be_written */
- delete: operations['users_delete'];
- parameters: {
- path: {
- username: string;
- };
- };
- };
- '/users/{username}/contact': {
- /** Contact user through email, if user has set this option */
- post: operations['users_contact_create'];
- parameters: {
- path: {
- username: string;
- };
- };
- };
- '/whoami': {
- /** Whoami user information */
- get: operations['whoami_read'];
- };
-}
-
-export interface definitions {
- Category: {
- /** Title */
- title: string;
- /** Description */
- description?: string;
- /**
- * Is global
- * @description global categories or user specific
- */
- is_global?: boolean;
- /**
- * Media count
- * @description number of media
- */
- media_count?: number;
- /** User */
- user?: string;
- /** Thumbnail url */
- thumbnail_url?: string;
- };
- Comment: {
- /**
- * Add date
- * Format: date-time
- */
- add_date?: string;
- /**
- * Text
- * @description text
- */
- text: string;
- /** Parent */
- parent?: number;
- /** Author thumbnail url */
- author_thumbnail_url?: string;
- /** Author profile */
- author_profile?: string;
- /** Author name */
- author_name?: string;
- /** Media url */
- media_url?: string;
- /**
- * Uid
- * Format: uuid
- */
- uid?: string;
- };
- EncodeProfile: {
- /** Name */
- name: string;
- /**
- * Extension
- * @enum {string}
- */
- extension: 'mp4' | 'webm' | 'gif';
- /**
- * Resolution
- * @enum {integer}
- */
- resolution?: 2160 | 1440 | 1080 | 720 | 480 | 360 | 240;
- /**
- * Codec
- * @enum {string}
- */
- codec?: 'h265' | 'h264' | 'vp9';
- /**
- * Description
- * @description description
- */
- description?: string;
- };
- Login: {
- /** Email */
- email?: string;
- /** Username */
- username?: string;
- /** Password */
- password: string;
- /** Token */
- token?: string;
- };
- Media: {
- /**
- * Friendly token
- * @description Identifier for the Media
- */
- friendly_token?: string;
- /** Url */
- url?: string;
- /** Api url */
- api_url?: string;
- /** User */
- user?: string;
- /**
- * Title
- * @description media title
- */
- title?: string;
- /** Description */
- description?: string;
- /**
- * Date produced
- * Format: date-time
- */
- add_date?: string;
- /** Views */
- views?: number;
- /**
- * Media type
- * @enum {string}
- */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
- /**
- * State
- * @description state of Media
- * @enum {string}
- */
- state?: 'private' | 'public' | 'unlisted';
- /** Duration */
- duration?: number;
- /** Thumbnail url */
- thumbnail_url?: string;
- /**
- * Is reviewed
- * @description Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
- /** Preview url */
- preview_url?: string;
- /** Author name */
- author_name?: string;
- /** Author profile */
- author_profile?: string;
- /** Author thumbnail */
- author_thumbnail?: string;
- /**
- * Encoding status
- * @enum {string}
- */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
- /** Likes */
- likes?: number;
- /** Dislikes */
- dislikes?: number;
- /**
- * Reported times
- * @description how many time a media is reported
- */
- reported_times?: number;
- /**
- * Featured
- * @description Whether media is globally featured by a VCMS editor
- */
- featured?: boolean;
- /**
- * User featured
- * @description Featured by the user
- */
- user_featured?: boolean;
- /**
- * Size
- * @description media size in bytes, automatically calculated
- */
- size?: string;
- };
- SingleMedia: {
- /** Url */
- url?: string;
- /** User */
- user?: string;
- /**
- * Title
- * @description media title
- */
- title?: string;
- /** Description */
- description?: string;
- /**
- * Date produced
- * Format: date-time
- */
- add_date?: string;
- /**
- * Edit date
- * Format: date-time
- */
- edit_date?: string;
- /**
- * Media type
- * @enum {string}
- */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
- /**
- * State
- * @description state of Media
- * @enum {string}
- */
- state?: 'private' | 'public' | 'unlisted';
- /** Duration */
- duration?: number;
- /** Thumbnail url */
- thumbnail_url?: string;
- /** Poster url */
- poster_url?: string;
- /**
- * Thumbnail time
- * @description Time on video that a thumbnail will be taken
- */
- thumbnail_time?: number;
- /** Sprites url */
- sprites_url?: string;
- /** Preview url */
- preview_url?: string;
- /** Author name */
- author_name?: string;
- /** Author profile */
- author_profile?: string;
- /** Author thumbnail */
- author_thumbnail?: string;
- /** Encodings info */
- encodings_info?: string;
- /**
- * Encoding status
- * @enum {string}
- */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
- /** Views */
- views?: number;
- /** Likes */
- likes?: number;
- /** Dislikes */
- dislikes?: number;
- /**
- * Reported times
- * @description how many time a media is reported
- */
- reported_times?: number;
- /**
- * User featured
- * @description Featured by the user
- */
- user_featured?: boolean;
- /** Original media url */
- original_media_url?: string;
- /**
- * Size
- * @description media size in bytes, automatically calculated
- */
- size?: string;
- /** Video height */
- video_height?: number;
- /**
- * Enable comments
- * @description Whether comments will be allowed for this media
- */
- enable_comments?: boolean;
- /** Categories info */
- categories_info?: string;
- /**
- * Is reviewed
- * @description Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
- /** Edit url */
- edit_url?: string;
- /** Tags info */
- tags_info?: string;
- /** Hls info */
- hls_info?: string;
- /** License */
- license?: number;
- /** Subtitles info */
- subtitles_info?: string;
- /** Ratings info */
- ratings_info?: string;
- /** Add subtitle url */
- add_subtitle_url?: string;
- /**
- * Allow download
- * @description Whether option to download media is shown
- */
- allow_download?: boolean;
- };
- Playlist: {
- /**
- * Add date
- * Format: date-time
- */
- add_date?: string;
- /** Title */
- title: string;
- /**
- * Description
- * @description description
- */
- description?: string;
- /** User */
- user?: string;
- /** Media count */
- media_count?: string;
- /** Url */
- url?: string;
- /** Api url */
- api_url?: string;
- /** Thumbnail url */
- thumbnail_url?: string;
- };
- Tag: {
- /** Title */
- title: string;
- /**
- * Media count
- * @description number of media
- */
- media_count?: number;
- /** Thumbnail url */
- thumbnail_url?: string;
- };
- UserDetail: {
- /** About me */
- description?: string;
- /**
- * Date added
- * Format: date-time
- */
- date_added?: string;
- /** Full name */
- name?: string;
- /** Is featured */
- is_featured?: boolean;
- /** Thumbnail url */
- thumbnail_url?: string;
- /** Banner thumbnail url */
- banner_thumbnail_url?: string;
- /** Url */
- url?: string;
- /**
- * Username
- * @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
- */
- username?: string;
- /** Media info */
- media_info?: string;
- /** Api url */
- api_url?: string;
- /** Edit url */
- edit_url?: string;
- /** Default channel edit url */
- default_channel_edit_url?: string;
- };
-}
-
-export interface operations {
- /** Lists all categories */
- categories_list: {
- responses: {
- /** response description */
- 200: {
- schema: definitions['Category'];
- };
- };
- };
- /** Paginated listing of all comments */
- comments_list: {
- parameters: {
- query: {
- /** Page number */
- page?: number;
- /** username */
- author?: string;
- };
- };
- responses: {
- /** response description */
- 200: {
- schema: definitions['Comment'][];
- };
- };
- };
- /** Lists all encoding profiles for videos */
- encode_profiles_list: {
- responses: {
- 200: {
- schema: definitions['EncodeProfile'][];
- };
- };
- };
- /** Login url endpoint. According to what the portal provides, you may provide username and/or email, plus the password */
- login_create: {
- parameters: {
- formData: {
- /** username */
- username?: string;
- /** email */
- email?: string;
- /** password */
- password: string;
- };
- };
- responses: {
- /** user details */
- 200: {
- schema: definitions['Login'];
- };
- /** Bad request */
- 404: unknown;
- };
- };
- /** Manage comments for VCMS managers and reviewers */
- manage_comments_list: {
- responses: {
- 200: unknown;
- };
- };
- /** Delete comments for VCMS managers and reviewers */
- manage_comments_delete: {
- responses: {
- 204: never;
- };
- };
- /** Manage media for VCMS managers and reviewers */
- manage_media_list: {
- parameters: {
- query: {
- /** Sort by any of: title, add_date, edit_date, views, likes, reported_times */
- sort_by?: string;
- /** Order by: asc, desc */
- ordering?: string;
- /** Media state, options: private", "public", "unlisted */
- state?: string;
- /** Encoding status, options "pending", "running", "fail", "success" */
- encoding_status?: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** Delete media for VCMS managers and reviewers */
- manage_media_delete: {
- responses: {
- 204: never;
- };
- };
- /** Manage users for VCMS managers and reviewers */
- manage_users_list: {
- responses: {
- 200: unknown;
- };
- };
- /** Delete users for VCMS managers */
- manage_users_delete: {
- responses: {
- 204: never;
- };
- };
- /** Lists all media */
- media_list: {
- parameters: {
- query: {
- /** Page number */
- page?: number;
- /** username */
- author?: string;
- /** show */
- show?: 'recommended' | 'featured' | 'latest';
- };
- };
- responses: {
- 200: {
- schema: definitions['Media'][];
- };
- };
- };
- /** Adds a new media, for authenticated users */
- media_create: {
- parameters: {
- formData: {
- /** media_file */
- media_file: unknown;
- /** description */
- description?: string;
- /** title */
- title?: string;
- };
- };
- responses: {
- /** response description */
- 201: {
- schema: definitions['Media'];
- };
- /** bad request */
- 401: unknown;
- };
- };
- /** Get information for a media */
- media_read: {
- parameters: {
- path: {
- /** unique identifier */
- friendly_token: string;
- };
- };
- responses: {
- 200: {
- schema: definitions['SingleMedia'];
- };
- /** bad request */
- 400: unknown;
- };
- };
- /** Update a Media, for Media uploader */
- media_update: {
- parameters: {
- path: {
- friendly_token: string;
- };
- formData: {
- /** description */
- description?: string;
- /** title */
- title?: string;
- /** media_file */
- media_file?: unknown;
- };
- };
- responses: {
- /** response description */
- 201: {
- schema: definitions['Media'];
- };
- /** bad request */
- 401: unknown;
- };
- };
- /** Actions for a media, for VCMS editors and managers */
- media_manager_actions: {
- parameters: {
- path: {
- /** unique identifier */
- friendly_token: string;
- };
- formData: {
- /** action to perform */
- type?: 'encode' | 'review';
- /** if action to perform is encode, need to specify list of ids of encoding profiles */
- encoding_profiles?: string[];
- /** if action is review, this is the result (True for reviewed, False for not reviewed) */
- result?: boolean;
- };
- };
- responses: {
- /** action created */
- 201: unknown;
- /** bad request */
- 400: unknown;
- };
- };
- /** Delete a Media, for VCMS editors and managers */
- media_delete: {
- parameters: {
- path: {
- /** unique identifier */
- friendly_token: string;
- };
- };
- responses: {
- /** no content */
- 204: never;
- };
- };
- /** to_be_written */
- media_actions_list: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- media_actions_create: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 201: unknown;
- };
- };
- /** to_be_written */
- media_actions_delete: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 204: never;
- };
- };
- /** to_be_written */
- media_comments_list: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- media_comments_create: {
- parameters: {
- path: {
- friendly_token: string;
- uid: string;
- };
- };
- responses: {
- 201: unknown;
- };
- };
- /** to_be_written */
- media_comments_delete: {
- parameters: {
- path: {
- friendly_token: string;
- uid: string;
- };
- };
- responses: {
- 204: never;
- };
- };
- /** to_be_written */
- media_comments_read: {
- parameters: {
- path: {
- friendly_token: string;
- uid: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- playlists_list: {
- responses: {
- /** response description */
- 200: {
- schema: definitions['Playlist'][];
- };
- };
- };
- /** to_be_written */
- playlists_create: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 201: unknown;
- };
- };
- /** to_be_written */
- playlists_read: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- playlists_update: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- playlists_delete: {
- parameters: {
- path: {
- friendly_token: string;
- };
- };
- responses: {
- 204: never;
- };
- };
- /** to_be_written */
- search_list: {
- responses: {
- 200: unknown;
- };
- };
- /** Paginated listing of all tags */
- tags_list: {
- parameters: {
- query: {
- /** Page number */
- page?: number;
- };
- };
- responses: {
- /** response description */
- 200: {
- schema: definitions['Tag'];
- };
- };
- };
- /** Lists user actions */
- user_action_read: {
- parameters: {
- path: {
- /** action */
- action: 'like' | 'dislike' | 'watch' | 'report' | 'rate';
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** Returns an authenticated user's token */
- user_token_list: {
- responses: {
- /** token */
- 200: unknown;
- /** Forbidden */
- 403: unknown;
- };
- };
- /** Paginated listing of users */
- users_list: {
- parameters: {
- query: {
- /** Page number */
- page?: number;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** Get user details */
- users_read: {
- parameters: {
- path: {
- /** username */
- username: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** to_be_written */
- users_update: {
- parameters: {
- path: {
- username: string;
- };
- };
- responses: {
- 200: unknown;
- };
- };
- /** Post user details - authenticated view */
- users_create: {
- parameters: {
- path: {
- /** username */
- username: string;
- };
- formData: {
- /** logo */
- logo: unknown;
- /** description */
- description?: string;
- /** name */
- name?: string;
- };
- };
- responses: {
- /** response description */
- 201: {
- schema: definitions['UserDetail'];
- };
- /** bad request */
- 400: unknown;
- };
- };
- /** to_be_written */
- users_delete: {
- parameters: {
- path: {
- username: string;
- };
- };
- responses: {
- 204: never;
- };
- };
- /** Contact user through email, if user has set this option */
- users_contact_create: {
- parameters: {
- path: {
- username: string;
- };
- };
- responses: {
- 201: unknown;
- };
- };
- /** Whoami user information */
- whoami_read: {
- responses: {
- /** response description */
- 200: {
- schema: definitions['UserDetail'];
- };
- /** Forbidden */
- 403: unknown;
- };
- };
-}
-
-// export interface external {}
diff --git a/vcms-schema/schema/vcms-types.ts b/vcms-schema/schema/vcms-types.ts
deleted file mode 100644
index b88d487..0000000
--- a/vcms-schema/schema/vcms-types.ts
+++ /dev/null
@@ -1,1596 +0,0 @@
-/* eslint-disable */
-/* tslint:disable */
-/*
- * ---------------------------------------------------------------
- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
- * ## ##
- * ## AUTHOR: acacode ##
- * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
- * ---------------------------------------------------------------
- */
-
-export interface Category {
- /** Title */
- title: string;
-
- /** Description */
- description?: string;
-
- /**
- * Is global
- * global categories or user specific
- */
- is_global?: boolean;
-
- /**
- * Media count
- * number of media
- * @min -2147483648
- * @max 2147483647
- */
- media_count?: number;
-
- /** User */
- user?: string;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface Comment {
- /**
- * Add date
- * @format date-time
- */
- add_date?: string;
-
- /**
- * Text
- * text
- */
- text: string;
-
- /** Parent */
- parent?: number | null;
-
- /** Author thumbnail url */
- author_thumbnail_url?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Media url */
- media_url?: string;
-
- /**
- * Uid
- * @format uuid
- */
- uid?: string;
-}
-
-export interface EncodeProfile {
- /** Name */
- name: string;
-
- /** Extension */
- extension: 'mp4' | 'webm' | 'gif';
-
- /** Resolution */
- resolution?: '2160' | '1440' | '1080' | '720' | '480' | '360' | '240' | null;
-
- /** Codec */
- codec?: 'h265' | 'h264' | 'vp9' | null;
-
- /**
- * Description
- * description
- */
- description?: string;
-}
-
-export interface Login {
- /** Email */
- email?: string;
-
- /** Username */
- username?: string;
-
- /** Password */
- password: string;
-
- /** Token */
- token?: string;
-}
-
-export interface IMedia {
- /**
- * Friendly token
- * Identifier for the Media
- */
- friendly_token?: string;
-
- /** Url */
- url?: string;
-
- /** Api url */
- api_url?: string;
-
- /** User */
- user?: string;
-
- /**
- * Title
- * media title
- */
- title?: string;
-
- /** Description */
- description?: string;
-
- /**
- * Date produced
- * @format date-time
- */
- add_date?: string;
-
- /** Views */
- views?: number;
-
- /** Media type */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
-
- /**
- * State
- * state of Media
- */
- state?: 'private' | 'public' | 'unlisted';
-
- /** Duration */
- duration?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /**
- * Is reviewed
- * Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
-
- /** Preview url */
- preview_url?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author thumbnail */
- author_thumbnail?: string;
-
- /** Encoding status */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
-
- /** Likes */
- likes?: number;
-
- /** Dislikes */
- dislikes?: number;
-
- /**
- * Reported times
- * how many time a media is reported
- */
- reported_times?: number;
-
- /**
- * Featured
- * Whether media is globally featured by a VCMS editor
- */
- featured?: boolean;
-
- /**
- * User featured
- * Featured by the user
- */
- user_featured?: boolean;
-
- /**
- * Size
- * media size in bytes, automatically calculated
- */
- size?: string;
-}
-
-export interface SingleMedia {
- /** Url */
- url?: string;
-
- /** User */
- user?: string;
-
- /**
- * Title
- * media title
- */
- title?: string;
-
- /** Description */
- description?: string;
-
- /**
- * Date produced
- * @format date-time
- */
- add_date?: string;
-
- /**
- * Edit date
- * @format date-time
- */
- edit_date?: string;
-
- /** Media type */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
-
- /**
- * State
- * state of Media
- */
- state?: 'private' | 'public' | 'unlisted';
-
- /** Duration */
- duration?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /** Poster url */
- poster_url?: string;
-
- /**
- * Thumbnail time
- * Time on video that a thumbnail will be taken
- */
- thumbnail_time?: number | null;
-
- /** Sprites url */
- sprites_url?: string;
-
- /** Preview url */
- preview_url?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author thumbnail */
- author_thumbnail?: string;
-
- /** Encodings info */
- encodings_info?: string;
-
- /** Encoding status */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
-
- /** Views */
- views?: number;
-
- /** Likes */
- likes?: number;
-
- /** Dislikes */
- dislikes?: number;
-
- /**
- * Reported times
- * how many time a media is reported
- */
- reported_times?: number;
-
- /**
- * User featured
- * Featured by the user
- */
- user_featured?: boolean;
-
- /** Original media url */
- original_media_url?: string;
-
- /**
- * Size
- * media size in bytes, automatically calculated
- */
- size?: string;
-
- /** Video height */
- video_height?: number;
-
- /**
- * Enable comments
- * Whether comments will be allowed for this media
- */
- enable_comments?: boolean;
-
- /** Categories info */
- categories_info?: string;
-
- /**
- * Is reviewed
- * Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
-
- /** Edit url */
- edit_url?: string;
-
- /** Tags info */
- tags_info?: string;
-
- /** Hls info */
- hls_info?: string;
-
- /** License */
- license?: number | null;
-
- /** Subtitles info */
- subtitles_info?: string;
-
- /** Ratings info */
- ratings_info?: string;
-
- /** Add subtitle url */
- add_subtitle_url?: string;
-
- /**
- * Allow download
- * Whether option to download media is shown
- */
- allow_download?: boolean;
-}
-
-export interface Playlist {
- /**
- * Add date
- * @format date-time
- */
- add_date?: string;
-
- /** Title */
- title: string;
-
- /**
- * Description
- * description
- */
- description?: string;
-
- /** User */
- user?: string;
-
- /** Media count */
- media_count?: string;
-
- /** Url */
- url?: string;
-
- /** Api url */
- api_url?: string;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface Tag {
- /** Title */
- title: string;
-
- /**
- * Media count
- * number of media
- * @min -2147483648
- * @max 2147483647
- */
- media_count?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface UserDetail {
- /** About me */
- description?: string;
-
- /**
- * Date added
- * @format date-time
- */
- date_added?: string;
-
- /** Full name */
- name?: string;
-
- /** Is featured */
- is_featured?: boolean;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /** Banner thumbnail url */
- banner_thumbnail_url?: string;
-
- /** Url */
- url?: string;
-
- /**
- * Username
- * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
- */
- username?: string;
-
- /** Media info */
- media_info?: string;
-
- /** Api url */
- api_url?: string;
-
- /** Edit url */
- edit_url?: string;
-
- /** Default channel edit url */
- default_channel_edit_url?: string;
-}
-
-export type QueryParamsType = Record;
-export type ResponseFormat = keyof Omit;
-
-export interface FullRequestParams extends Omit {
- /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
- /** request path */
- path: string;
- /** content type of request body */
- type?: ContentType;
- /** query params */
- query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
- /** request body */
- body?: unknown;
- /** base url */
- baseUrl?: string;
- /** request cancellation token */
- cancelToken?: CancelToken;
-}
-
-export type RequestParams = Omit<
- FullRequestParams,
- 'body' | 'method' | 'query' | 'path'
->;
-
-export interface ApiConfig {
- baseUrl?: string;
- baseApiParams?: Omit;
- securityWorker?: (
- securityData: SecurityDataType | null
- ) => Promise | RequestParams | void;
- customFetch?: typeof fetch;
-}
-
-export interface HttpResponse
- extends Response {
- data: D;
- error: E;
-}
-
-type CancelToken = Symbol | string | number;
-
-export enum ContentType {
- Json = 'application/json',
- FormData = 'multipart/form-data',
- UrlEncoded = 'application/x-www-form-urlencoded',
-}
-
-export class HttpClient {
- public baseUrl: string = 'http://localhost/api/v1';
- private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig['securityWorker'];
- private abortControllers = new Map();
- private customFetch = (...fetchParams: Parameters) =>
- fetch(...fetchParams);
-
- private baseApiParams: RequestParams = {
- credentials: 'same-origin',
- headers: {},
- redirect: 'follow',
- referrerPolicy: 'no-referrer',
- };
-
- constructor(apiConfig: ApiConfig = {}) {
- Object.assign(this, apiConfig);
- }
-
- public setSecurityData = (data: SecurityDataType | null) => {
- this.securityData = data;
- };
-
- private encodeQueryParam(key: string, value: any) {
- const encodedKey = encodeURIComponent(key);
- return `${encodedKey}=${encodeURIComponent(
- typeof value === 'number' ? value : `${value}`
- )}`;
- }
-
- private addQueryParam(query: QueryParamsType, key: string) {
- return this.encodeQueryParam(key, query[key]);
- }
-
- private addArrayQueryParam(query: QueryParamsType, key: string) {
- const value = query[key];
- return value.map((v: any) => this.encodeQueryParam(key, v)).join('&');
- }
-
- protected toQueryString(rawQuery?: QueryParamsType): string {
- const query = rawQuery || {};
- const keys = Object.keys(query).filter(
- (key) => 'undefined' !== typeof query[key]
- );
- return keys
- .map((key) =>
- Array.isArray(query[key])
- ? this.addArrayQueryParam(query, key)
- : this.addQueryParam(query, key)
- )
- .join('&');
- }
-
- protected addQueryParams(rawQuery?: QueryParamsType): string {
- const queryString = this.toQueryString(rawQuery);
- return queryString ? `?${queryString}` : '';
- }
-
- private contentFormatters: Record any> = {
- [ContentType.Json]: (input: any) =>
- input !== null && (typeof input === 'object' || typeof input === 'string')
- ? JSON.stringify(input)
- : input,
- [ContentType.FormData]: (input: any) =>
- Object.keys(input || {}).reduce((formData, key) => {
- const property = input[key];
- formData.append(
- key,
- property instanceof Blob
- ? property
- : typeof property === 'object' && property !== null
- ? JSON.stringify(property)
- : `${property}`
- );
- return formData;
- }, new FormData()),
- [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
- };
-
- private mergeRequestParams(
- params1: RequestParams,
- params2?: RequestParams
- ): RequestParams {
- return {
- ...this.baseApiParams,
- ...params1,
- ...(params2 || {}),
- headers: {
- ...(this.baseApiParams.headers || {}),
- ...(params1.headers || {}),
- ...((params2 && params2.headers) || {}),
- },
- };
- }
-
- private createAbortSignal = (
- cancelToken: CancelToken
- ): AbortSignal | undefined => {
- if (this.abortControllers.has(cancelToken)) {
- const abortController = this.abortControllers.get(cancelToken);
- if (abortController) {
- return abortController.signal;
- }
- return void 0;
- }
-
- const abortController = new AbortController();
- this.abortControllers.set(cancelToken, abortController);
- return abortController.signal;
- };
-
- public abortRequest = (cancelToken: CancelToken) => {
- const abortController = this.abortControllers.get(cancelToken);
-
- if (abortController) {
- abortController.abort();
- this.abortControllers.delete(cancelToken);
- }
- };
-
- public request = async ({
- body,
- secure,
- path,
- type,
- query,
- format,
- baseUrl,
- cancelToken,
- ...params
- }: FullRequestParams): Promise> => {
- const secureParams =
- ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&
- this.securityWorker &&
- (await this.securityWorker(this.securityData))) ||
- {};
- const requestParams = this.mergeRequestParams(params, secureParams);
- const queryString = query && this.toQueryString(query);
- const payloadFormatter = this.contentFormatters[type || ContentType.Json];
- const responseFormat = format || requestParams.format;
-
- return this.customFetch(
- `${baseUrl || this.baseUrl || ''}${path}${
- queryString ? `?${queryString}` : ''
- }`,
- {
- ...requestParams,
- headers: {
- ...(type && type !== ContentType.FormData
- ? { 'Content-Type': type }
- : {}),
- ...(requestParams.headers || {}),
- },
- signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
- body:
- typeof body === 'undefined' || body === null
- ? null
- : payloadFormatter(body),
- }
- ).then(async (response) => {
- const r = response as HttpResponse;
- r.data = null as unknown as T;
- r.error = null as unknown as E;
-
- const data = !responseFormat
- ? r
- : await response[responseFormat]()
- .then((data) => {
- if (r.ok) {
- r.data = data;
- } else {
- r.error = data;
- }
- return r;
- })
- .catch((e) => {
- r.error = e;
- return r;
- });
-
- if (cancelToken) {
- this.abortControllers.delete(cancelToken);
- }
-
- if (!response.ok) throw data;
- return data;
- });
- };
-}
-
-/**
- * @title Nonovium VCMS API
- * @version v1
- * @baseUrl http://localhost/api/v1
- * @contact (https://nonovium.com)
- */
-export class Api<
- SecurityDataType extends unknown
-> extends HttpClient {
- categories = {
- /**
- * @description Lists all categories
- *
- * @tags Categories
- * @name CategoriesList
- * @summary Lists Categories
- * @request GET:/categories
- * @secure
- */
- categoriesList: (params: RequestParams = {}) =>
- this.request({
- path: `/categories`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- comments = {
- /**
- * @description Paginated listing of all comments
- *
- * @tags Comments
- * @name CommentsList
- * @summary Lists Comments
- * @request GET:/comments
- * @secure
- */
- commentsList: (
- query?: { page?: number; author?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/comments`,
- method: 'GET',
- query: query,
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- encodeProfiles = {
- /**
- * @description Lists all encoding profiles for videos
- *
- * @tags Encoding Profiles
- * @name EncodeProfilesList
- * @summary List Encoding Profiles
- * @request GET:/encode_profiles/
- * @secure
- */
- encodeProfilesList: (params: RequestParams = {}) =>
- this.request({
- path: `/encode_profiles/`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- login = {
- /**
- * @description Login url endpoint. According to what the portal provides, you may provide username and/or email, plus the password
- *
- * @tags Users
- * @name LoginCreate
- * @summary Login url
- * @request POST:/login
- * @secure
- */
- loginCreate: (
- data: { username?: string; email?: string; password: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/login`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
- };
- manageComments = {
- /**
- * @description Manage comments for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageCommentsList
- * @summary Manage Comments
- * @request GET:/manage_comments
- * @secure
- */
- manageCommentsList: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_comments`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete comments for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageCommentsDelete
- * @summary Delete Comments
- * @request DELETE:/manage_comments
- * @secure
- */
- manageCommentsDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_comments`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- manageMedia = {
- /**
- * @description Manage media for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageMediaList
- * @summary Manage Media
- * @request GET:/manage_media
- * @secure
- */
- manageMediaList: (
- query?: {
- sort_by?: string;
- ordering?: string;
- state?: string;
- encoding_status?: string;
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/manage_media`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete media for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageMediaDelete
- * @summary Delete Media
- * @request DELETE:/manage_media
- * @secure
- */
- manageMediaDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_media`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- manageUsers = {
- /**
- * @description Manage users for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageUsersList
- * @summary Manage Users
- * @request GET:/manage_users
- * @secure
- */
- manageUsersList: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_users`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete users for VCMS managers
- *
- * @tags Manage
- * @name ManageUsersDelete
- * @summary Delete Users
- * @request DELETE:/manage_users
- * @secure
- */
- manageUsersDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_users`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- media = {
- /**
- * @description Lists all media
- *
- * @tags Media
- * @name MediaList
- * @summary List Media
- * @request GET:/media/
- * @secure
- */
- mediaList: (
- query?: {
- page?: number;
- author?: string;
- show?: 'recommended' | 'featured' | 'latest';
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/`,
- method: 'GET',
- query: query,
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Adds a new media, for authenticated users
- *
- * @tags Media
- * @name MediaCreate
- * @summary Add new Media
- * @request POST:/media/
- * @secure
- */
- mediaCreate: (
- data: { media_file: File; description?: string; title?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Get information for a media
- *
- * @tags Media
- * @name MediaRead
- * @summary Get information for Media
- * @request GET:/media/{friendly_token}
- * @secure
- */
- mediaRead: (
- friendlyToken: string,
- friendlyToken: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'GET',
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Actions for a media, for VCMS editors and managers
- *
- * @tags Media
- * @name MediaManagerActions
- * @summary Run action on Media
- * @request POST:/media/{friendly_token}
- * @secure
- */
- mediaManagerActions: (
- friendlyToken: string,
- friendlyToken: string,
- data: {
- type?: 'encode' | 'review';
- encoding_profiles?: string[];
- result?: boolean;
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- ...params,
- }),
-
- /**
- * @description Update a Media, for Media uploader
- *
- * @tags Media
- * @name MediaUpdate
- * @summary Update Media
- * @request PUT:/media/{friendly_token}
- * @secure
- */
- mediaUpdate: (
- friendlyToken: string,
- data: { description?: string; title?: string; media_file?: File },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'PUT',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Delete a Media, for VCMS editors and managers
- *
- * @tags Media
- * @name MediaDelete
- * @summary Delete Media
- * @request DELETE:/media/{friendly_token}
- * @secure
- */
- mediaDelete: (
- friendlyToken: string,
- friendlyToken: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'DELETE',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsList
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsList: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsCreate
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsCreate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsDelete
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsList
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsList: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsCreate
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsCreate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsDelete
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsRead
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/comments/{uid}
- * @secure
- */
- mediaCommentsRead: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsCreate2
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/comments/{uid}
- * @originalName mediaCommentsCreate
- * @duplicate
- * @secure
- */
- mediaCommentsCreate2: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsDelete2
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/comments/{uid}
- * @originalName mediaCommentsDelete
- * @duplicate
- * @secure
- */
- mediaCommentsDelete2: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- playlists = {
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsList
- * @summary to_be_written
- * @request GET:/playlists
- * @secure
- */
- playlistsList: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate
- * @summary to_be_written
- * @request POST:/playlists
- * @secure
- */
- playlistsCreate: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsList2
- * @summary to_be_written
- * @request GET:/playlists/
- * @originalName playlistsList
- * @duplicate
- * @secure
- */
- playlistsList2: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists/`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate2
- * @summary to_be_written
- * @request POST:/playlists/
- * @originalName playlistsCreate
- * @duplicate
- * @secure
- */
- playlistsCreate2: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists/`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsRead
- * @summary to_be_written
- * @request GET:/playlists/{friendly_token}
- * @secure
- */
- playlistsRead: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate3
- * @summary to_be_written
- * @request POST:/playlists/{friendly_token}
- * @originalName playlistsCreate
- * @duplicate
- * @secure
- */
- playlistsCreate3: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsUpdate
- * @summary to_be_written
- * @request PUT:/playlists/{friendly_token}
- * @secure
- */
- playlistsUpdate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'PUT',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsDelete
- * @summary to_be_written
- * @request DELETE:/playlists/{friendly_token}
- * @secure
- */
- playlistsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- search = {
- /**
- * @description to_be_written
- *
- * @tags Search
- * @name SearchList
- * @summary to_be_written
- * @request GET:/search
- * @secure
- */
- searchList: (params: RequestParams = {}) =>
- this.request({
- path: `/search`,
- method: 'GET',
- secure: true,
- ...params,
- }),
- };
- tags = {
- /**
- * @description Paginated listing of all tags
- *
- * @tags Tags
- * @name TagsList
- * @summary Lists Tags
- * @request GET:/tags
- * @secure
- */
- tagsList: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/tags`,
- method: 'GET',
- query: query,
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- user = {
- /**
- * @description Lists user actions
- *
- * @tags Users
- * @name UserActionRead
- * @summary List user actions
- * @request GET:/user/action/{action}
- * @secure
- */
- userActionRead: (
- action: string,
- action: 'like' | 'dislike' | 'watch' | 'report' | 'rate',
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/user/action/${action}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Returns an authenticated user's token
- *
- * @tags Users
- * @name UserTokenList
- * @summary Get a user token
- * @request GET:/user/token
- * @secure
- */
- userTokenList: (params: RequestParams = {}) =>
- this.request({
- path: `/user/token`,
- method: 'GET',
- secure: true,
- ...params,
- }),
- };
- users = {
- /**
- * @description Paginated listing of users
- *
- * @tags Users
- * @name UsersList
- * @summary List users
- * @request GET:/users
- * @secure
- */
- usersList: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/users`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Paginated listing of users
- *
- * @tags Users
- * @name UsersList2
- * @summary List users
- * @request GET:/users/
- * @originalName usersList
- * @duplicate
- * @secure
- */
- usersList2: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/users/`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Get user details
- *
- * @tags Users
- * @name UsersRead
- * @summary List user details
- * @request GET:/users/{username}
- * @secure
- */
- usersRead: (
- username: string,
- username: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/users/${username}`,
- method: 'GET',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description Post user details - authenticated view
- *
- * @tags Users
- * @name UsersCreate
- * @summary Edit user details
- * @request POST:/users/{username}
- * @secure
- */
- usersCreate: (
- username: string,
- username: string,
- data: { logo: File; description?: string; name?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/users/${username}`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Users
- * @name UsersUpdate
- * @summary Xto_be_written
- * @request PUT:/users/{username}
- * @secure
- */
- usersUpdate: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}`,
- method: 'PUT',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Users
- * @name UsersDelete
- * @summary to_be_written
- * @request DELETE:/users/{username}
- * @secure
- */
- usersDelete: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}`,
- method: 'DELETE',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description Contact user through email, if user has set this option
- *
- * @tags Users
- * @name UsersContactCreate
- * @summary Contact user
- * @request POST:/users/{username}/contact
- * @secure
- */
- usersContactCreate: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}/contact`,
- method: 'POST',
- secure: true,
- ...params,
- }),
- };
- whoami = {
- /**
- * @description Whoami user information
- *
- * @tags Users
- * @name WhoamiRead
- * @summary Whoami user information
- * @request GET:/whoami
- * @secure
- */
- whoamiRead: (params: RequestParams = {}) =>
- this.request({
- path: `/whoami`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
-}
diff --git a/vcms-schema/swagger.json b/vcms-schema/swagger.json
deleted file mode 100644
index b219fb6..0000000
--- a/vcms-schema/swagger.json
+++ /dev/null
@@ -1,1411 +0,0 @@
-{
- "swagger": "2.0",
- "info": {
- "title": "Nonovium VCMS API",
- "contact": { "url": "https://nonovium.com" },
- "x-logo": { "url": "../../static/images/logo_dark.svg" },
- "version": "v1"
- },
- "host": "localhost",
- "schemes": ["http"],
- "basePath": "/api/v1",
- "consumes": ["application/json"],
- "produces": ["application/json"],
- "securityDefinitions": { "Basic": { "type": "basic" } },
- "security": [{ "Basic": [] }],
- "paths": {
- "/categories": {
- "get": {
- "operationId": "categories_list",
- "summary": "Lists Categories",
- "description": "Lists all categories",
- "parameters": [],
- "responses": {
- "200": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/Category" }
- }
- },
- "tags": ["Categories"]
- },
- "parameters": []
- },
- "/comments": {
- "get": {
- "operationId": "comments_list",
- "summary": "Lists Comments",
- "description": "Paginated listing of all comments",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "type": "integer"
- },
- {
- "name": "author",
- "in": "query",
- "description": "username",
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "response description",
- "schema": {
- "type": "array",
- "items": { "$ref": "#/definitions/Comment" }
- }
- }
- },
- "tags": ["Comments"]
- },
- "parameters": []
- },
- "/encode_profiles/": {
- "get": {
- "operationId": "encode_profiles_list",
- "summary": "List Encoding Profiles",
- "description": "Lists all encoding profiles for videos",
- "parameters": [],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": { "$ref": "#/definitions/EncodeProfile" }
- }
- }
- },
- "tags": ["Encoding Profiles"]
- },
- "parameters": []
- },
- "/login": {
- "post": {
- "operationId": "login_create",
- "summary": "Login url",
- "description": "Login url endpoint. According to what the portal provides, you may provide username and/or email, plus the password",
- "parameters": [
- {
- "name": "username",
- "in": "formData",
- "description": "username",
- "required": false,
- "type": "string"
- },
- {
- "name": "email",
- "in": "formData",
- "description": "email",
- "required": false,
- "type": "string"
- },
- {
- "name": "password",
- "in": "formData",
- "description": "password",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "user details",
- "schema": { "$ref": "#/definitions/Login" }
- },
- "404": { "description": "Bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Users"]
- },
- "parameters": []
- },
- "/manage_comments": {
- "get": {
- "operationId": "manage_comments_list",
- "summary": "Manage Comments",
- "description": "Manage comments for VCMS managers and reviewers",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Manage"]
- },
- "delete": {
- "operationId": "manage_comments_delete",
- "summary": "Delete Comments",
- "description": "Delete comments for VCMS managers and reviewers",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Manage"]
- },
- "parameters": []
- },
- "/manage_media": {
- "get": {
- "operationId": "manage_media_list",
- "summary": "Manage Media",
- "description": "Manage media for VCMS managers and reviewers",
- "parameters": [
- {
- "name": "sort_by",
- "in": "query",
- "description": "Sort by any of: title, add_date, edit_date, views, likes, reported_times",
- "type": "string"
- },
- {
- "name": "ordering",
- "in": "query",
- "description": "Order by: asc, desc",
- "type": "string"
- },
- {
- "name": "state",
- "in": "query",
- "description": "Media state, options: private\", \"public\", \"unlisted",
- "type": "string"
- },
- {
- "name": "encoding_status",
- "in": "query",
- "description": "Encoding status, options \"pending\", \"running\", \"fail\", \"success\"",
- "type": "string"
- }
- ],
- "responses": { "200": { "description": "" } },
- "tags": ["Manage"]
- },
- "delete": {
- "operationId": "manage_media_delete",
- "summary": "Delete Media",
- "description": "Delete media for VCMS managers and reviewers",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Manage"]
- },
- "parameters": []
- },
- "/manage_users": {
- "get": {
- "operationId": "manage_users_list",
- "summary": "Manage Users",
- "description": "Manage users for VCMS managers and reviewers",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Manage"]
- },
- "delete": {
- "operationId": "manage_users_delete",
- "summary": "Delete Users",
- "description": "Delete users for VCMS managers",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Manage"]
- },
- "parameters": []
- },
- "/media/": {
- "get": {
- "operationId": "media_list",
- "summary": "List Media",
- "description": "Lists all media",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "type": "integer"
- },
- {
- "name": "author",
- "in": "query",
- "description": "username",
- "type": "string"
- },
- {
- "name": "show",
- "in": "query",
- "description": "show",
- "type": "string",
- "enum": ["recommended", "featured", "latest"]
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": { "$ref": "#/definitions/Media" }
- }
- }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "post": {
- "operationId": "media_create",
- "summary": "Add new Media",
- "description": "Adds a new media, for authenticated users",
- "parameters": [
- {
- "name": "media_file",
- "in": "formData",
- "description": "media_file",
- "required": true,
- "type": "file"
- },
- {
- "name": "description",
- "in": "formData",
- "description": "description",
- "required": false,
- "type": "string"
- },
- {
- "name": "title",
- "in": "formData",
- "description": "title",
- "required": false,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/Media" }
- },
- "401": { "description": "bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "parameters": []
- },
- "/media/{friendly_token}": {
- "get": {
- "operationId": "media_read",
- "summary": "Get information for Media",
- "description": "Get information for a media",
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "description": "unique identifier",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "schema": { "$ref": "#/definitions/SingleMedia" }
- },
- "400": { "description": "bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "post": {
- "operationId": "media_manager_actions",
- "summary": "Run action on Media",
- "description": "Actions for a media, for VCMS editors and managers",
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "description": "unique identifier",
- "required": true,
- "type": "string"
- },
- {
- "name": "type",
- "in": "formData",
- "description": "action to perform",
- "type": "string",
- "enum": ["encode", "review"]
- },
- {
- "name": "encoding_profiles",
- "in": "formData",
- "description": "if action to perform is encode, need to specify list of ids of encoding profiles",
- "type": "array",
- "items": { "type": "string" }
- },
- {
- "name": "result",
- "in": "formData",
- "description": "if action is review, this is the result (True for reviewed, False for not reviewed)",
- "type": "boolean"
- }
- ],
- "responses": {
- "201": { "description": "action created" },
- "400": { "description": "bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "put": {
- "operationId": "media_update",
- "summary": "Update Media",
- "description": "Update a Media, for Media uploader",
- "parameters": [
- {
- "name": "description",
- "in": "formData",
- "description": "description",
- "required": false,
- "type": "string"
- },
- {
- "name": "title",
- "in": "formData",
- "description": "title",
- "required": false,
- "type": "string"
- },
- {
- "name": "media_file",
- "in": "formData",
- "description": "media_file",
- "required": false,
- "type": "file"
- }
- ],
- "responses": {
- "201": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/Media" }
- },
- "401": { "description": "bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "delete": {
- "operationId": "media_delete",
- "summary": "Delete Media",
- "description": "Delete a Media, for VCMS editors and managers",
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "description": "unique identifier",
- "required": true,
- "type": "string"
- }
- ],
- "responses": { "204": { "description": "no content" } },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Media"]
- },
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "required": true,
- "type": "string"
- }
- ]
- },
- "/media/{friendly_token}/actions": {
- "get": {
- "operationId": "media_actions_list",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Media"]
- },
- "post": {
- "operationId": "media_actions_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Media"]
- },
- "delete": {
- "operationId": "media_actions_delete",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Media"]
- },
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "required": true,
- "type": "string"
- }
- ]
- },
- "/media/{friendly_token}/comments": {
- "get": {
- "operationId": "media_comments_list",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Media"]
- },
- "post": {
- "operationId": "media_comments_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Media"]
- },
- "delete": {
- "operationId": "media_comments_delete",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Media"]
- },
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "required": true,
- "type": "string"
- }
- ]
- },
- "/media/{friendly_token}/comments/{uid}": {
- "get": {
- "operationId": "media_comments_read",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Media"]
- },
- "post": {
- "operationId": "media_comments_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Media"]
- },
- "delete": {
- "operationId": "media_comments_delete",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Media"]
- },
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "required": true,
- "type": "string"
- },
- { "name": "uid", "in": "path", "required": true, "type": "string" }
- ]
- },
- "/playlists": {
- "get": {
- "operationId": "playlists_list",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": {
- "200": {
- "description": "response description",
- "schema": {
- "type": "array",
- "items": { "$ref": "#/definitions/Playlist" }
- }
- }
- },
- "tags": ["Playlists"]
- },
- "post": {
- "operationId": "playlists_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Playlists"]
- },
- "parameters": []
- },
- "/playlists/": {
- "get": {
- "operationId": "playlists_list",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": {
- "200": {
- "description": "response description",
- "schema": {
- "type": "array",
- "items": { "$ref": "#/definitions/Playlist" }
- }
- }
- },
- "tags": ["Playlists"]
- },
- "post": {
- "operationId": "playlists_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Playlists"]
- },
- "parameters": []
- },
- "/playlists/{friendly_token}": {
- "get": {
- "operationId": "playlists_read",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Playlists"]
- },
- "post": {
- "operationId": "playlists_create",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Playlists"]
- },
- "put": {
- "operationId": "playlists_update",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Playlists"]
- },
- "delete": {
- "operationId": "playlists_delete",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "tags": ["Playlists"]
- },
- "parameters": [
- {
- "name": "friendly_token",
- "in": "path",
- "required": true,
- "type": "string"
- }
- ]
- },
- "/search": {
- "get": {
- "operationId": "search_list",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "tags": ["Search"]
- },
- "parameters": []
- },
- "/tags": {
- "get": {
- "operationId": "tags_list",
- "summary": "Lists Tags",
- "description": "Paginated listing of all tags",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "type": "integer"
- }
- ],
- "responses": {
- "200": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/Tag" }
- }
- },
- "tags": ["Tags"]
- },
- "parameters": []
- },
- "/user/action/{action}": {
- "get": {
- "operationId": "user_action_read",
- "summary": "List user actions",
- "description": "Lists user actions",
- "parameters": [
- {
- "name": "action",
- "in": "path",
- "description": "action",
- "required": true,
- "type": "string",
- "enum": ["like", "dislike", "watch", "report", "rate"]
- }
- ],
- "responses": { "200": { "description": "" } },
- "tags": ["Users"]
- },
- "parameters": [
- { "name": "action", "in": "path", "required": true, "type": "string" }
- ]
- },
- "/user/token": {
- "get": {
- "operationId": "user_token_list",
- "summary": "Get a user token",
- "description": "Returns an authenticated user's token",
- "parameters": [],
- "responses": {
- "200": { "description": "token" },
- "403": { "description": "Forbidden" }
- },
- "tags": ["Users"]
- },
- "parameters": []
- },
- "/users": {
- "get": {
- "operationId": "users_list",
- "summary": "List users",
- "description": "Paginated listing of users",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "type": "integer"
- }
- ],
- "responses": { "200": { "description": "" } },
- "tags": ["Users"]
- },
- "parameters": []
- },
- "/users/": {
- "get": {
- "operationId": "users_list",
- "summary": "List users",
- "description": "Paginated listing of users",
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "description": "Page number",
- "type": "integer"
- }
- ],
- "responses": { "200": { "description": "" } },
- "tags": ["Users"]
- },
- "parameters": []
- },
- "/users/{username}": {
- "get": {
- "operationId": "users_read",
- "summary": "List user details",
- "description": "Get user details",
- "parameters": [
- {
- "name": "username",
- "in": "path",
- "description": "username",
- "required": true,
- "type": "string"
- }
- ],
- "responses": { "200": { "description": "" } },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Users"]
- },
- "post": {
- "operationId": "users_create",
- "summary": "Edit user details",
- "description": "Post user details - authenticated view",
- "parameters": [
- {
- "name": "logo",
- "in": "formData",
- "description": "logo",
- "required": true,
- "type": "file"
- },
- {
- "name": "description",
- "in": "formData",
- "description": "description",
- "required": false,
- "type": "string"
- },
- {
- "name": "name",
- "in": "formData",
- "description": "name",
- "required": false,
- "type": "string"
- },
- {
- "name": "username",
- "in": "path",
- "description": "username",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "201": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/UserDetail" }
- },
- "400": { "description": "bad request" }
- },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Users"]
- },
- "put": {
- "operationId": "users_update",
- "summary": "Xto_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "200": { "description": "" } },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Users"]
- },
- "delete": {
- "operationId": "users_delete",
- "summary": "to_be_written",
- "description": "to_be_written",
- "parameters": [],
- "responses": { "204": { "description": "" } },
- "consumes": [
- "multipart/form-data",
- "application/x-www-form-urlencoded"
- ],
- "tags": ["Users"]
- },
- "parameters": [
- { "name": "username", "in": "path", "required": true, "type": "string" }
- ]
- },
- "/users/{username}/contact": {
- "post": {
- "operationId": "users_contact_create",
- "summary": "Contact user",
- "description": "Contact user through email, if user has set this option",
- "parameters": [],
- "responses": { "201": { "description": "" } },
- "tags": ["Users"]
- },
- "parameters": [
- { "name": "username", "in": "path", "required": true, "type": "string" }
- ]
- },
- "/whoami": {
- "get": {
- "operationId": "whoami_read",
- "summary": "Whoami user information",
- "description": "Whoami user information",
- "parameters": [],
- "responses": {
- "200": {
- "description": "response description",
- "schema": { "$ref": "#/definitions/UserDetail" }
- },
- "403": { "description": "Forbidden" }
- },
- "tags": ["Users"]
- },
- "parameters": []
- }
- },
- "definitions": {
- "Category": {
- "required": ["title"],
- "type": "object",
- "properties": {
- "title": {
- "title": "Title",
- "type": "string",
- "maxLength": 100,
- "minLength": 1
- },
- "description": { "title": "Description", "type": "string" },
- "is_global": {
- "title": "Is global",
- "description": "global categories or user specific",
- "type": "boolean"
- },
- "media_count": {
- "title": "Media count",
- "description": "number of media",
- "type": "integer",
- "maximum": 2147483647,
- "minimum": -2147483648
- },
- "user": { "title": "User", "type": "string", "readOnly": true },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- }
- }
- },
- "Comment": {
- "required": ["text"],
- "type": "object",
- "properties": {
- "add_date": {
- "title": "Add date",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "text": {
- "title": "Text",
- "description": "text",
- "type": "string",
- "minLength": 1
- },
- "parent": { "title": "Parent", "type": "integer", "x-nullable": true },
- "author_thumbnail_url": {
- "title": "Author thumbnail url",
- "type": "string",
- "readOnly": true
- },
- "author_profile": {
- "title": "Author profile",
- "type": "string",
- "readOnly": true
- },
- "author_name": {
- "title": "Author name",
- "type": "string",
- "readOnly": true
- },
- "media_url": {
- "title": "Media url",
- "type": "string",
- "readOnly": true
- },
- "uid": {
- "title": "Uid",
- "type": "string",
- "format": "uuid",
- "readOnly": true
- }
- }
- },
- "EncodeProfile": {
- "required": ["name", "extension"],
- "type": "object",
- "properties": {
- "name": {
- "title": "Name",
- "type": "string",
- "maxLength": 90,
- "minLength": 1
- },
- "extension": {
- "title": "Extension",
- "type": "string",
- "enum": ["mp4", "webm", "gif"]
- },
- "resolution": {
- "title": "Resolution",
- "type": "integer",
- "enum": [2160, 1440, 1080, 720, 480, 360, 240],
- "x-nullable": true
- },
- "codec": {
- "title": "Codec",
- "type": "string",
- "enum": ["h265", "h264", "vp9"],
- "x-nullable": true
- },
- "description": {
- "title": "Description",
- "description": "description",
- "type": "string"
- }
- }
- },
- "Login": {
- "required": ["password"],
- "type": "object",
- "properties": {
- "email": {
- "title": "Email",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "username": {
- "title": "Username",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- },
- "password": {
- "title": "Password",
- "type": "string",
- "maxLength": 128,
- "minLength": 1
- },
- "token": {
- "title": "Token",
- "type": "string",
- "maxLength": 255,
- "minLength": 1
- }
- }
- },
- "Media": {
- "type": "object",
- "properties": {
- "friendly_token": {
- "title": "Friendly token",
- "description": "Identifier for the Media",
- "type": "string",
- "readOnly": true,
- "minLength": 1
- },
- "url": { "title": "Url", "type": "string", "readOnly": true },
- "api_url": { "title": "Api url", "type": "string", "readOnly": true },
- "user": { "title": "User", "type": "string", "readOnly": true },
- "title": {
- "title": "Title",
- "description": "media title",
- "type": "string",
- "maxLength": 100
- },
- "description": { "title": "Description", "type": "string" },
- "add_date": {
- "title": "Date produced",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "views": { "title": "Views", "type": "integer", "readOnly": true },
- "media_type": {
- "title": "Media type",
- "type": "string",
- "enum": ["video", "image", "pdf", "audio"],
- "readOnly": true
- },
- "state": {
- "title": "State",
- "description": "state of Media",
- "type": "string",
- "enum": ["private", "public", "unlisted"],
- "readOnly": true
- },
- "duration": {
- "title": "Duration",
- "type": "integer",
- "readOnly": true
- },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- },
- "is_reviewed": {
- "title": "Is reviewed",
- "description": "Whether media is reviewed, so it can appear on public listings",
- "type": "boolean",
- "readOnly": true
- },
- "preview_url": {
- "title": "Preview url",
- "type": "string",
- "readOnly": true
- },
- "author_name": {
- "title": "Author name",
- "type": "string",
- "readOnly": true
- },
- "author_profile": {
- "title": "Author profile",
- "type": "string",
- "readOnly": true
- },
- "author_thumbnail": {
- "title": "Author thumbnail",
- "type": "string",
- "readOnly": true
- },
- "encoding_status": {
- "title": "Encoding status",
- "type": "string",
- "enum": ["pending", "running", "fail", "success"],
- "readOnly": true
- },
- "likes": { "title": "Likes", "type": "integer", "readOnly": true },
- "dislikes": {
- "title": "Dislikes",
- "type": "integer",
- "readOnly": true
- },
- "reported_times": {
- "title": "Reported times",
- "description": "how many time a media is reported",
- "type": "integer",
- "readOnly": true
- },
- "featured": {
- "title": "Featured",
- "description": "Whether media is globally featured by a VCMS editor",
- "type": "boolean",
- "readOnly": true
- },
- "user_featured": {
- "title": "User featured",
- "description": "Featured by the user",
- "type": "boolean"
- },
- "size": {
- "title": "Size",
- "description": "media size in bytes, automatically calculated",
- "type": "string",
- "readOnly": true,
- "minLength": 1
- }
- }
- },
- "SingleMedia": {
- "type": "object",
- "properties": {
- "url": { "title": "Url", "type": "string", "readOnly": true },
- "user": { "title": "User", "type": "string", "readOnly": true },
- "title": {
- "title": "Title",
- "description": "media title",
- "type": "string",
- "maxLength": 100
- },
- "description": { "title": "Description", "type": "string" },
- "add_date": {
- "title": "Date produced",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "edit_date": {
- "title": "Edit date",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "media_type": {
- "title": "Media type",
- "type": "string",
- "enum": ["video", "image", "pdf", "audio"],
- "readOnly": true
- },
- "state": {
- "title": "State",
- "description": "state of Media",
- "type": "string",
- "enum": ["private", "public", "unlisted"],
- "readOnly": true
- },
- "duration": {
- "title": "Duration",
- "type": "integer",
- "readOnly": true
- },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- },
- "poster_url": {
- "title": "Poster url",
- "type": "string",
- "readOnly": true
- },
- "thumbnail_time": {
- "title": "Thumbnail time",
- "description": "Time on video that a thumbnail will be taken",
- "type": "number",
- "x-nullable": true
- },
- "sprites_url": {
- "title": "Sprites url",
- "type": "string",
- "readOnly": true
- },
- "preview_url": {
- "title": "Preview url",
- "type": "string",
- "readOnly": true
- },
- "author_name": {
- "title": "Author name",
- "type": "string",
- "readOnly": true
- },
- "author_profile": {
- "title": "Author profile",
- "type": "string",
- "readOnly": true
- },
- "author_thumbnail": {
- "title": "Author thumbnail",
- "type": "string",
- "readOnly": true
- },
- "encodings_info": {
- "title": "Encodings info",
- "type": "string",
- "readOnly": true
- },
- "encoding_status": {
- "title": "Encoding status",
- "type": "string",
- "enum": ["pending", "running", "fail", "success"],
- "readOnly": true
- },
- "views": { "title": "Views", "type": "integer", "readOnly": true },
- "likes": { "title": "Likes", "type": "integer", "readOnly": true },
- "dislikes": {
- "title": "Dislikes",
- "type": "integer",
- "readOnly": true
- },
- "reported_times": {
- "title": "Reported times",
- "description": "how many time a media is reported",
- "type": "integer",
- "readOnly": true
- },
- "user_featured": {
- "title": "User featured",
- "description": "Featured by the user",
- "type": "boolean"
- },
- "original_media_url": {
- "title": "Original media url",
- "type": "string",
- "readOnly": true
- },
- "size": {
- "title": "Size",
- "description": "media size in bytes, automatically calculated",
- "type": "string",
- "readOnly": true,
- "minLength": 1
- },
- "video_height": {
- "title": "Video height",
- "type": "integer",
- "readOnly": true
- },
- "enable_comments": {
- "title": "Enable comments",
- "description": "Whether comments will be allowed for this media",
- "type": "boolean"
- },
- "categories_info": {
- "title": "Categories info",
- "type": "string",
- "readOnly": true
- },
- "is_reviewed": {
- "title": "Is reviewed",
- "description": "Whether media is reviewed, so it can appear on public listings",
- "type": "boolean",
- "readOnly": true
- },
- "edit_url": { "title": "Edit url", "type": "string", "readOnly": true },
- "tags_info": {
- "title": "Tags info",
- "type": "string",
- "readOnly": true
- },
- "hls_info": { "title": "Hls info", "type": "string", "readOnly": true },
- "license": {
- "title": "License",
- "type": "integer",
- "x-nullable": true
- },
- "subtitles_info": {
- "title": "Subtitles info",
- "type": "string",
- "readOnly": true
- },
- "ratings_info": {
- "title": "Ratings info",
- "type": "string",
- "readOnly": true
- },
- "add_subtitle_url": {
- "title": "Add subtitle url",
- "type": "string",
- "readOnly": true
- },
- "allow_download": {
- "title": "Allow download",
- "description": "Whether option to download media is shown",
- "type": "boolean"
- }
- }
- },
- "Playlist": {
- "required": ["title"],
- "type": "object",
- "properties": {
- "add_date": {
- "title": "Add date",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "title": {
- "title": "Title",
- "type": "string",
- "maxLength": 100,
- "minLength": 1
- },
- "description": {
- "title": "Description",
- "description": "description",
- "type": "string"
- },
- "user": { "title": "User", "type": "string", "readOnly": true },
- "media_count": {
- "title": "Media count",
- "type": "string",
- "readOnly": true
- },
- "url": { "title": "Url", "type": "string", "readOnly": true },
- "api_url": { "title": "Api url", "type": "string", "readOnly": true },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- }
- }
- },
- "Tag": {
- "required": ["title"],
- "type": "object",
- "properties": {
- "title": {
- "title": "Title",
- "type": "string",
- "maxLength": 100,
- "minLength": 1
- },
- "media_count": {
- "title": "Media count",
- "description": "number of media",
- "type": "integer",
- "maximum": 2147483647,
- "minimum": -2147483648
- },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- }
- }
- },
- "UserDetail": {
- "type": "object",
- "properties": {
- "description": { "title": "About me", "type": "string" },
- "date_added": {
- "title": "Date added",
- "type": "string",
- "format": "date-time",
- "readOnly": true
- },
- "name": {
- "title": "Full name",
- "type": "string",
- "maxLength": 250,
- "minLength": 1
- },
- "is_featured": {
- "title": "Is featured",
- "type": "boolean",
- "readOnly": true
- },
- "thumbnail_url": {
- "title": "Thumbnail url",
- "type": "string",
- "readOnly": true
- },
- "banner_thumbnail_url": {
- "title": "Banner thumbnail url",
- "type": "string",
- "readOnly": true
- },
- "url": { "title": "Url", "type": "string", "readOnly": true },
- "username": {
- "title": "Username",
- "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
- "type": "string",
- "readOnly": true,
- "minLength": 1
- },
- "media_info": {
- "title": "Media info",
- "type": "string",
- "readOnly": true
- },
- "api_url": { "title": "Api url", "type": "string", "readOnly": true },
- "edit_url": { "title": "Edit url", "type": "string", "readOnly": true },
- "default_channel_edit_url": {
- "title": "Default channel edit url",
- "type": "string",
- "readOnly": true
- }
- }
- }
- }
-}
diff --git a/vcms-schema/swagger.ts b/vcms-schema/swagger.ts
deleted file mode 100644
index e69de29..0000000
diff --git a/vcms-schema/swagger.yaml b/vcms-schema/swagger.yaml
deleted file mode 100644
index d1c0347..0000000
--- a/vcms-schema/swagger.yaml
+++ /dev/null
@@ -1,1367 +0,0 @@
-swagger: '2.0'
-info:
- title: Nonovium VCMS API
- contact:
- url: https://nonovium.com
- x-logo:
- url: ../../static/images/logo_dark.svg
- version: v1
-host: localhost
-schemes:
- - http
-basePath: /api/v1
-consumes:
- - application/json
-produces:
- - application/json
-securityDefinitions:
- Basic:
- type: basic
-security:
- - Basic: []
-paths:
- /categories:
- get:
- operationId: categories_list
- summary: Lists Categories
- description: Lists all categories
- parameters: []
- responses:
- '200':
- description: response description
- schema:
- $ref: '#/definitions/Category'
- tags:
- - Categories
- parameters: []
- /comments:
- get:
- operationId: comments_list
- summary: Lists Comments
- description: Paginated listing of all comments
- parameters:
- - name: page
- in: query
- description: Page number
- type: integer
- - name: author
- in: query
- description: username
- type: string
- responses:
- '200':
- description: response description
- schema:
- type: array
- items:
- $ref: '#/definitions/Comment'
- tags:
- - Comments
- parameters: []
- /encode_profiles/:
- get:
- operationId: encode_profiles_list
- summary: List Encoding Profiles
- description: Lists all encoding profiles for videos
- parameters: []
- responses:
- '200':
- description: ''
- schema:
- type: array
- items:
- $ref: '#/definitions/EncodeProfile'
- tags:
- - Encoding Profiles
- parameters: []
- /login:
- post:
- operationId: login_create
- summary: Login url
- description:
- Login url endpoint. According to what the portal provides, you
- may provide username and/or email, plus the password
- parameters:
- - name: username
- in: formData
- description: username
- required: false
- type: string
- - name: email
- in: formData
- description: email
- required: false
- type: string
- - name: password
- in: formData
- description: password
- required: true
- type: string
- responses:
- '200':
- description: user details
- schema:
- $ref: '#/definitions/Login'
- '404':
- description: Bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Users
- parameters: []
- /manage_comments:
- get:
- operationId: manage_comments_list
- summary: Manage Comments
- description: Manage comments for VCMS managers and reviewers
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Manage
- delete:
- operationId: manage_comments_delete
- summary: Delete Comments
- description: Delete comments for VCMS managers and reviewers
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Manage
- parameters: []
- /manage_media:
- get:
- operationId: manage_media_list
- summary: Manage Media
- description: Manage media for VCMS managers and reviewers
- parameters:
- - name: sort_by
- in: query
- description:
- 'Sort by any of: title, add_date, edit_date, views, likes,
- reported_times'
- type: string
- - name: ordering
- in: query
- description: 'Order by: asc, desc'
- type: string
- - name: state
- in: query
- description: 'Media state, options: private", "public", "unlisted'
- type: string
- - name: encoding_status
- in: query
- description: Encoding status, options "pending", "running", "fail", "success"
- type: string
- responses:
- '200':
- description: ''
- tags:
- - Manage
- delete:
- operationId: manage_media_delete
- summary: Delete Media
- description: Delete media for VCMS managers and reviewers
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Manage
- parameters: []
- /manage_users:
- get:
- operationId: manage_users_list
- summary: Manage Users
- description: Manage users for VCMS managers and reviewers
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Manage
- delete:
- operationId: manage_users_delete
- summary: Delete Users
- description: Delete users for VCMS managers
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Manage
- parameters: []
- /media/:
- get:
- operationId: media_list
- summary: List Media
- description: Lists all media
- parameters:
- - name: page
- in: query
- description: Page number
- type: integer
- - name: author
- in: query
- description: username
- type: string
- - name: show
- in: query
- description: show
- type: string
- enum:
- - recommended
- - featured
- - latest
- responses:
- '200':
- description: ''
- schema:
- type: array
- items:
- $ref: '#/definitions/Media'
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- post:
- operationId: media_create
- summary: Add new Media
- description: Adds a new media, for authenticated users
- parameters:
- - name: media_file
- in: formData
- description: media_file
- required: true
- type: file
- - name: description
- in: formData
- description: description
- required: false
- type: string
- - name: title
- in: formData
- description: title
- required: false
- type: string
- responses:
- '201':
- description: response description
- schema:
- $ref: '#/definitions/Media'
- '401':
- description: bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- parameters: []
- /media/{friendly_token}:
- get:
- operationId: media_read
- summary: Get information for Media
- description: Get information for a media
- parameters:
- - name: friendly_token
- in: path
- description: unique identifier
- required: true
- type: string
- responses:
- '200':
- description: ''
- schema:
- $ref: '#/definitions/SingleMedia'
- '400':
- description: bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- post:
- operationId: media_manager_actions
- summary: Run action on Media
- description: Actions for a media, for VCMS editors and managers
- parameters:
- - name: friendly_token
- in: path
- description: unique identifier
- required: true
- type: string
- - name: type
- in: formData
- description: action to perform
- type: string
- enum:
- - encode
- - review
- - name: encoding_profiles
- in: formData
- description:
- if action to perform is encode, need to specify list of ids
- of encoding profiles
- type: array
- items:
- type: string
- - name: result
- in: formData
- description:
- if action is review, this is the result (True for reviewed,
- False for not reviewed)
- type: boolean
- responses:
- '201':
- description: action created
- '400':
- description: bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- put:
- operationId: media_update
- summary: Update Media
- description: Update a Media, for Media uploader
- parameters:
- - name: description
- in: formData
- description: description
- required: false
- type: string
- - name: title
- in: formData
- description: title
- required: false
- type: string
- - name: media_file
- in: formData
- description: media_file
- required: false
- type: file
- responses:
- '201':
- description: response description
- schema:
- $ref: '#/definitions/Media'
- '401':
- description: bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- delete:
- operationId: media_delete
- summary: Delete Media
- description: Delete a Media, for VCMS editors and managers
- parameters:
- - name: friendly_token
- in: path
- description: unique identifier
- required: true
- type: string
- responses:
- '204':
- description: no content
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Media
- parameters:
- - name: friendly_token
- in: path
- required: true
- type: string
- /media/{friendly_token}/actions:
- get:
- operationId: media_actions_list
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Media
- post:
- operationId: media_actions_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Media
- delete:
- operationId: media_actions_delete
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Media
- parameters:
- - name: friendly_token
- in: path
- required: true
- type: string
- /media/{friendly_token}/comments:
- get:
- operationId: media_comments_list
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Media
- post:
- operationId: media_comments_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Media
- delete:
- operationId: media_comments_delete
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Media
- parameters:
- - name: friendly_token
- in: path
- required: true
- type: string
- /media/{friendly_token}/comments/{uid}:
- get:
- operationId: media_comments_read
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Media
- post:
- operationId: media_comments_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Media
- delete:
- operationId: media_comments_delete
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Media
- parameters:
- - name: friendly_token
- in: path
- required: true
- type: string
- - name: uid
- in: path
- required: true
- type: string
- /playlists:
- get:
- operationId: playlists_list
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: response description
- schema:
- type: array
- items:
- $ref: '#/definitions/Playlist'
- tags:
- - Playlists
- post:
- operationId: playlists_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Playlists
- parameters: []
- /playlists/:
- get:
- operationId: playlists_list
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: response description
- schema:
- type: array
- items:
- $ref: '#/definitions/Playlist'
- tags:
- - Playlists
- post:
- operationId: playlists_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Playlists
- parameters: []
- /playlists/{friendly_token}:
- get:
- operationId: playlists_read
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Playlists
- post:
- operationId: playlists_create
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Playlists
- put:
- operationId: playlists_update
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Playlists
- delete:
- operationId: playlists_delete
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '204':
- description: ''
- tags:
- - Playlists
- parameters:
- - name: friendly_token
- in: path
- required: true
- type: string
- /search:
- get:
- operationId: search_list
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- tags:
- - Search
- parameters: []
- /tags:
- get:
- operationId: tags_list
- summary: Lists Tags
- description: Paginated listing of all tags
- parameters:
- - name: page
- in: query
- description: Page number
- type: integer
- responses:
- '200':
- description: response description
- schema:
- $ref: '#/definitions/Tag'
- tags:
- - Tags
- parameters: []
- /user/action/{action}:
- get:
- operationId: user_action_read
- summary: List user actions
- description: Lists user actions
- parameters:
- - name: action
- in: path
- description: action
- required: true
- type: string
- enum:
- - like
- - dislike
- - watch
- - report
- - rate
- responses:
- '200':
- description: ''
- tags:
- - Users
- parameters:
- - name: action
- in: path
- required: true
- type: string
- /user/token:
- get:
- operationId: user_token_list
- summary: Get a user token
- description: Returns an authenticated user's token
- parameters: []
- responses:
- '200':
- description: token
- '403':
- description: Forbidden
- tags:
- - Users
- parameters: []
- /users:
- get:
- operationId: users_list
- summary: List users
- description: Paginated listing of users
- parameters:
- - name: page
- in: query
- description: Page number
- type: integer
- responses:
- '200':
- description: ''
- tags:
- - Users
- parameters: []
- /users/:
- get:
- operationId: users_list
- summary: List users
- description: Paginated listing of users
- parameters:
- - name: page
- in: query
- description: Page number
- type: integer
- responses:
- '200':
- description: ''
- tags:
- - Users
- parameters: []
- /users/{username}:
- get:
- operationId: users_read
- summary: List user details
- description: Get user details
- parameters:
- - name: username
- in: path
- description: username
- required: true
- type: string
- responses:
- '200':
- description: ''
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Users
- post:
- operationId: users_create
- summary: Edit user details
- description: Post user details - authenticated view
- parameters:
- - name: logo
- in: formData
- description: logo
- required: true
- type: file
- - name: description
- in: formData
- description: description
- required: false
- type: string
- - name: name
- in: formData
- description: name
- required: false
- type: string
- - name: username
- in: path
- description: username
- required: true
- type: string
- responses:
- '201':
- description: response description
- schema:
- $ref: '#/definitions/UserDetail'
- '400':
- description: bad request
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Users
- put:
- operationId: users_update
- summary: Xto_be_written
- description: to_be_written
- parameters: []
- responses:
- '200':
- description: ''
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Users
- delete:
- operationId: users_delete
- summary: to_be_written
- description: to_be_written
- parameters: []
- responses:
- '204':
- description: ''
- consumes:
- - multipart/form-data
- - application/x-www-form-urlencoded
- tags:
- - Users
- parameters:
- - name: username
- in: path
- required: true
- type: string
- /users/{username}/contact:
- post:
- operationId: users_contact_create
- summary: Contact user
- description: Contact user through email, if user has set this option
- parameters: []
- responses:
- '201':
- description: ''
- tags:
- - Users
- parameters:
- - name: username
- in: path
- required: true
- type: string
- /whoami:
- get:
- operationId: whoami_read
- summary: Whoami user information
- description: Whoami user information
- parameters: []
- responses:
- '200':
- description: response description
- schema:
- $ref: '#/definitions/UserDetail'
- '403':
- description: Forbidden
- tags:
- - Users
- parameters: []
-definitions:
- Category:
- required:
- - title
- type: object
- properties:
- title:
- title: Title
- type: string
- maxLength: 100
- minLength: 1
- description:
- title: Description
- type: string
- is_global:
- title: Is global
- description: global categories or user specific
- type: boolean
- media_count:
- title: Media count
- description: number of media
- type: integer
- maximum: 2147483647
- minimum: -2147483648
- user:
- title: User
- type: string
- readOnly: true
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- Comment:
- required:
- - text
- type: object
- properties:
- add_date:
- title: Add date
- type: string
- format: date-time
- readOnly: true
- text:
- title: Text
- description: text
- type: string
- minLength: 1
- parent:
- title: Parent
- type: integer
- x-nullable: true
- author_thumbnail_url:
- title: Author thumbnail url
- type: string
- readOnly: true
- author_profile:
- title: Author profile
- type: string
- readOnly: true
- author_name:
- title: Author name
- type: string
- readOnly: true
- media_url:
- title: Media url
- type: string
- readOnly: true
- uid:
- title: Uid
- type: string
- format: uuid
- readOnly: true
- EncodeProfile:
- required:
- - name
- - extension
- type: object
- properties:
- name:
- title: Name
- type: string
- maxLength: 90
- minLength: 1
- extension:
- title: Extension
- type: string
- enum:
- - mp4
- - webm
- - gif
- resolution:
- title: Resolution
- type: integer
- enum:
- - 2160
- - 1440
- - 1080
- - 720
- - 480
- - 360
- - 240
- x-nullable: true
- codec:
- title: Codec
- type: string
- enum:
- - h265
- - h264
- - vp9
- x-nullable: true
- description:
- title: Description
- description: description
- type: string
- Login:
- required:
- - password
- type: object
- properties:
- email:
- title: Email
- type: string
- maxLength: 255
- minLength: 1
- username:
- title: Username
- type: string
- maxLength: 255
- minLength: 1
- password:
- title: Password
- type: string
- maxLength: 128
- minLength: 1
- token:
- title: Token
- type: string
- maxLength: 255
- minLength: 1
- Media:
- type: object
- properties:
- friendly_token:
- title: Friendly token
- description: Identifier for the Media
- type: string
- readOnly: true
- minLength: 1
- url:
- title: Url
- type: string
- readOnly: true
- api_url:
- title: Api url
- type: string
- readOnly: true
- user:
- title: User
- type: string
- readOnly: true
- title:
- title: Title
- description: media title
- type: string
- maxLength: 100
- description:
- title: Description
- type: string
- add_date:
- title: Date produced
- type: string
- format: date-time
- readOnly: true
- views:
- title: Views
- type: integer
- readOnly: true
- media_type:
- title: Media type
- type: string
- enum:
- - video
- - image
- - pdf
- - audio
- readOnly: true
- state:
- title: State
- description: state of Media
- type: string
- enum:
- - private
- - public
- - unlisted
- readOnly: true
- duration:
- title: Duration
- type: integer
- readOnly: true
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- is_reviewed:
- title: Is reviewed
- description: Whether media is reviewed, so it can appear on public listings
- type: boolean
- readOnly: true
- preview_url:
- title: Preview url
- type: string
- readOnly: true
- author_name:
- title: Author name
- type: string
- readOnly: true
- author_profile:
- title: Author profile
- type: string
- readOnly: true
- author_thumbnail:
- title: Author thumbnail
- type: string
- readOnly: true
- encoding_status:
- title: Encoding status
- type: string
- enum:
- - pending
- - running
- - fail
- - success
- readOnly: true
- likes:
- title: Likes
- type: integer
- readOnly: true
- dislikes:
- title: Dislikes
- type: integer
- readOnly: true
- reported_times:
- title: Reported times
- description: how many time a media is reported
- type: integer
- readOnly: true
- featured:
- title: Featured
- description: Whether media is globally featured by a VCMS editor
- type: boolean
- readOnly: true
- user_featured:
- title: User featured
- description: Featured by the user
- type: boolean
- size:
- title: Size
- description: media size in bytes, automatically calculated
- type: string
- readOnly: true
- minLength: 1
- SingleMedia:
- type: object
- properties:
- url:
- title: Url
- type: string
- readOnly: true
- user:
- title: User
- type: string
- readOnly: true
- title:
- title: Title
- description: media title
- type: string
- maxLength: 100
- description:
- title: Description
- type: string
- add_date:
- title: Date produced
- type: string
- format: date-time
- readOnly: true
- edit_date:
- title: Edit date
- type: string
- format: date-time
- readOnly: true
- media_type:
- title: Media type
- type: string
- enum:
- - video
- - image
- - pdf
- - audio
- readOnly: true
- state:
- title: State
- description: state of Media
- type: string
- enum:
- - private
- - public
- - unlisted
- readOnly: true
- duration:
- title: Duration
- type: integer
- readOnly: true
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- poster_url:
- title: Poster url
- type: string
- readOnly: true
- thumbnail_time:
- title: Thumbnail time
- description: Time on video that a thumbnail will be taken
- type: number
- x-nullable: true
- sprites_url:
- title: Sprites url
- type: string
- readOnly: true
- preview_url:
- title: Preview url
- type: string
- readOnly: true
- author_name:
- title: Author name
- type: string
- readOnly: true
- author_profile:
- title: Author profile
- type: string
- readOnly: true
- author_thumbnail:
- title: Author thumbnail
- type: string
- readOnly: true
- encodings_info:
- title: Encodings info
- type: string
- readOnly: true
- encoding_status:
- title: Encoding status
- type: string
- enum:
- - pending
- - running
- - fail
- - success
- readOnly: true
- views:
- title: Views
- type: integer
- readOnly: true
- likes:
- title: Likes
- type: integer
- readOnly: true
- dislikes:
- title: Dislikes
- type: integer
- readOnly: true
- reported_times:
- title: Reported times
- description: how many time a media is reported
- type: integer
- readOnly: true
- user_featured:
- title: User featured
- description: Featured by the user
- type: boolean
- original_media_url:
- title: Original media url
- type: string
- readOnly: true
- size:
- title: Size
- description: media size in bytes, automatically calculated
- type: string
- readOnly: true
- minLength: 1
- video_height:
- title: Video height
- type: integer
- readOnly: true
- enable_comments:
- title: Enable comments
- description: Whether comments will be allowed for this media
- type: boolean
- categories_info:
- title: Categories info
- type: string
- readOnly: true
- is_reviewed:
- title: Is reviewed
- description: Whether media is reviewed, so it can appear on public listings
- type: boolean
- readOnly: true
- edit_url:
- title: Edit url
- type: string
- readOnly: true
- tags_info:
- title: Tags info
- type: string
- readOnly: true
- hls_info:
- title: Hls info
- type: string
- readOnly: true
- license:
- title: License
- type: integer
- x-nullable: true
- subtitles_info:
- title: Subtitles info
- type: string
- readOnly: true
- ratings_info:
- title: Ratings info
- type: string
- readOnly: true
- add_subtitle_url:
- title: Add subtitle url
- type: string
- readOnly: true
- allow_download:
- title: Allow download
- description: Whether option to download media is shown
- type: boolean
- Playlist:
- required:
- - title
- type: object
- properties:
- add_date:
- title: Add date
- type: string
- format: date-time
- readOnly: true
- title:
- title: Title
- type: string
- maxLength: 100
- minLength: 1
- description:
- title: Description
- description: description
- type: string
- user:
- title: User
- type: string
- readOnly: true
- media_count:
- title: Media count
- type: string
- readOnly: true
- url:
- title: Url
- type: string
- readOnly: true
- api_url:
- title: Api url
- type: string
- readOnly: true
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- Tag:
- required:
- - title
- type: object
- properties:
- title:
- title: Title
- type: string
- maxLength: 100
- minLength: 1
- media_count:
- title: Media count
- description: number of media
- type: integer
- maximum: 2147483647
- minimum: -2147483648
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- UserDetail:
- type: object
- properties:
- description:
- title: About me
- type: string
- date_added:
- title: Date added
- type: string
- format: date-time
- readOnly: true
- name:
- title: Full name
- type: string
- maxLength: 250
- minLength: 1
- is_featured:
- title: Is featured
- type: boolean
- readOnly: true
- thumbnail_url:
- title: Thumbnail url
- type: string
- readOnly: true
- banner_thumbnail_url:
- title: Banner thumbnail url
- type: string
- readOnly: true
- url:
- title: Url
- type: string
- readOnly: true
- username:
- title: Username
- description:
- Required. 150 characters or fewer. Letters, digits and @/./+/-/_
- only.
- type: string
- readOnly: true
- minLength: 1
- media_info:
- title: Media info
- type: string
- readOnly: true
- api_url:
- title: Api url
- type: string
- readOnly: true
- edit_url:
- title: Edit url
- type: string
- readOnly: true
- default_channel_edit_url:
- title: Default channel edit url
- type: string
- readOnly: true
diff --git a/vcms-schema/swagger2.ts b/vcms-schema/swagger2.ts
deleted file mode 100644
index d805bbd..0000000
--- a/vcms-schema/swagger2.ts
+++ /dev/null
@@ -1,1596 +0,0 @@
-/* eslint-disable */
-/* tslint:disable */
-/*
- * ---------------------------------------------------------------
- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
- * ## ##
- * ## AUTHOR: acacode ##
- * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
- * ---------------------------------------------------------------
- */
-
-export interface Category {
- /** Title */
- title: string;
-
- /** Description */
- description?: string;
-
- /**
- * Is global
- * global categories or user specific
- */
- is_global?: boolean;
-
- /**
- * Media count
- * number of media
- * @min -2147483648
- * @max 2147483647
- */
- media_count?: number;
-
- /** User */
- user?: string;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface Comment {
- /**
- * Add date
- * @format date-time
- */
- add_date?: string;
-
- /**
- * Text
- * text
- */
- text: string;
-
- /** Parent */
- parent?: number | null;
-
- /** Author thumbnail url */
- author_thumbnail_url?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Media url */
- media_url?: string;
-
- /**
- * Uid
- * @format uuid
- */
- uid?: string;
-}
-
-export interface EncodeProfile {
- /** Name */
- name: string;
-
- /** Extension */
- extension: 'mp4' | 'webm' | 'gif';
-
- /** Resolution */
- resolution?: '2160' | '1440' | '1080' | '720' | '480' | '360' | '240' | null;
-
- /** Codec */
- codec?: 'h265' | 'h264' | 'vp9' | null;
-
- /**
- * Description
- * description
- */
- description?: string;
-}
-
-export interface Login {
- /** Email */
- email?: string;
-
- /** Username */
- username?: string;
-
- /** Password */
- password: string;
-
- /** Token */
- token?: string;
-}
-
-export interface Media {
- /**
- * Friendly token
- * Identifier for the Media
- */
- friendly_token?: string;
-
- /** Url */
- url?: string;
-
- /** Api url */
- api_url?: string;
-
- /** User */
- user?: string;
-
- /**
- * Title
- * media title
- */
- title?: string;
-
- /** Description */
- description?: string;
-
- /**
- * Date produced
- * @format date-time
- */
- add_date?: string;
-
- /** Views */
- views?: number;
-
- /** Media type */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
-
- /**
- * State
- * state of Media
- */
- state?: 'private' | 'public' | 'unlisted';
-
- /** Duration */
- duration?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /**
- * Is reviewed
- * Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
-
- /** Preview url */
- preview_url?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author thumbnail */
- author_thumbnail?: string;
-
- /** Encoding status */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
-
- /** Likes */
- likes?: number;
-
- /** Dislikes */
- dislikes?: number;
-
- /**
- * Reported times
- * how many time a media is reported
- */
- reported_times?: number;
-
- /**
- * Featured
- * Whether media is globally featured by a VCMS editor
- */
- featured?: boolean;
-
- /**
- * User featured
- * Featured by the user
- */
- user_featured?: boolean;
-
- /**
- * Size
- * media size in bytes, automatically calculated
- */
- size?: string;
-}
-
-export interface SingleMedia {
- /** Url */
- url?: string;
-
- /** User */
- user?: string;
-
- /**
- * Title
- * media title
- */
- title?: string;
-
- /** Description */
- description?: string;
-
- /**
- * Date produced
- * @format date-time
- */
- add_date?: string;
-
- /**
- * Edit date
- * @format date-time
- */
- edit_date?: string;
-
- /** Media type */
- media_type?: 'video' | 'image' | 'pdf' | 'audio';
-
- /**
- * State
- * state of Media
- */
- state?: 'private' | 'public' | 'unlisted';
-
- /** Duration */
- duration?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /** Poster url */
- poster_url?: string;
-
- /**
- * Thumbnail time
- * Time on video that a thumbnail will be taken
- */
- thumbnail_time?: number | null;
-
- /** Sprites url */
- sprites_url?: string;
-
- /** Preview url */
- preview_url?: string;
-
- /** Author name */
- author_name?: string;
-
- /** Author profile */
- author_profile?: string;
-
- /** Author thumbnail */
- author_thumbnail?: string;
-
- /** Encodings info */
- encodings_info?: string;
-
- /** Encoding status */
- encoding_status?: 'pending' | 'running' | 'fail' | 'success';
-
- /** Views */
- views?: number;
-
- /** Likes */
- likes?: number;
-
- /** Dislikes */
- dislikes?: number;
-
- /**
- * Reported times
- * how many time a media is reported
- */
- reported_times?: number;
-
- /**
- * User featured
- * Featured by the user
- */
- user_featured?: boolean;
-
- /** Original media url */
- original_media_url?: string;
-
- /**
- * Size
- * media size in bytes, automatically calculated
- */
- size?: string;
-
- /** Video height */
- video_height?: number;
-
- /**
- * Enable comments
- * Whether comments will be allowed for this media
- */
- enable_comments?: boolean;
-
- /** Categories info */
- categories_info?: string;
-
- /**
- * Is reviewed
- * Whether media is reviewed, so it can appear on public listings
- */
- is_reviewed?: boolean;
-
- /** Edit url */
- edit_url?: string;
-
- /** Tags info */
- tags_info?: string;
-
- /** Hls info */
- hls_info?: string;
-
- /** License */
- license?: number | null;
-
- /** Subtitles info */
- subtitles_info?: string;
-
- /** Ratings info */
- ratings_info?: string;
-
- /** Add subtitle url */
- add_subtitle_url?: string;
-
- /**
- * Allow download
- * Whether option to download media is shown
- */
- allow_download?: boolean;
-}
-
-export interface Playlist {
- /**
- * Add date
- * @format date-time
- */
- add_date?: string;
-
- /** Title */
- title: string;
-
- /**
- * Description
- * description
- */
- description?: string;
-
- /** User */
- user?: string;
-
- /** Media count */
- media_count?: string;
-
- /** Url */
- url?: string;
-
- /** Api url */
- api_url?: string;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface Tag {
- /** Title */
- title: string;
-
- /**
- * Media count
- * number of media
- * @min -2147483648
- * @max 2147483647
- */
- media_count?: number;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-}
-
-export interface UserDetail {
- /** About me */
- description?: string;
-
- /**
- * Date added
- * @format date-time
- */
- date_added?: string;
-
- /** Full name */
- name?: string;
-
- /** Is featured */
- is_featured?: boolean;
-
- /** Thumbnail url */
- thumbnail_url?: string;
-
- /** Banner thumbnail url */
- banner_thumbnail_url?: string;
-
- /** Url */
- url?: string;
-
- /**
- * Username
- * Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
- */
- username?: string;
-
- /** Media info */
- media_info?: string;
-
- /** Api url */
- api_url?: string;
-
- /** Edit url */
- edit_url?: string;
-
- /** Default channel edit url */
- default_channel_edit_url?: string;
-}
-
-export type QueryParamsType = Record;
-export type ResponseFormat = keyof Omit;
-
-export interface FullRequestParams extends Omit {
- /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
- /** request path */
- path: string;
- /** content type of request body */
- type?: ContentType;
- /** query params */
- query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
- /** request body */
- body?: unknown;
- /** base url */
- baseUrl?: string;
- /** request cancellation token */
- cancelToken?: CancelToken;
-}
-
-export type RequestParams = Omit<
- FullRequestParams,
- 'body' | 'method' | 'query' | 'path'
->;
-
-export interface ApiConfig {
- baseUrl?: string;
- baseApiParams?: Omit;
- securityWorker?: (
- securityData: SecurityDataType | null
- ) => Promise | RequestParams | void;
- customFetch?: typeof fetch;
-}
-
-export interface HttpResponse
- extends Response {
- data: D;
- error: E;
-}
-
-type CancelToken = Symbol | string | number;
-
-export enum ContentType {
- Json = 'application/json',
- FormData = 'multipart/form-data',
- UrlEncoded = 'application/x-www-form-urlencoded',
-}
-
-export class HttpClient {
- public baseUrl: string = 'http://localhost/api/v1';
- private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig['securityWorker'];
- private abortControllers = new Map();
- private customFetch = (...fetchParams: Parameters) =>
- fetch(...fetchParams);
-
- private baseApiParams: RequestParams = {
- credentials: 'same-origin',
- headers: {},
- redirect: 'follow',
- referrerPolicy: 'no-referrer',
- };
-
- constructor(apiConfig: ApiConfig = {}) {
- Object.assign(this, apiConfig);
- }
-
- public setSecurityData = (data: SecurityDataType | null) => {
- this.securityData = data;
- };
-
- private encodeQueryParam(key: string, value: any) {
- const encodedKey = encodeURIComponent(key);
- return `${encodedKey}=${encodeURIComponent(
- typeof value === 'number' ? value : `${value}`
- )}`;
- }
-
- private addQueryParam(query: QueryParamsType, key: string) {
- return this.encodeQueryParam(key, query[key]);
- }
-
- private addArrayQueryParam(query: QueryParamsType, key: string) {
- const value = query[key];
- return value.map((v: any) => this.encodeQueryParam(key, v)).join('&');
- }
-
- protected toQueryString(rawQuery?: QueryParamsType): string {
- const query = rawQuery || {};
- const keys = Object.keys(query).filter(
- (key) => 'undefined' !== typeof query[key]
- );
- return keys
- .map((key) =>
- Array.isArray(query[key])
- ? this.addArrayQueryParam(query, key)
- : this.addQueryParam(query, key)
- )
- .join('&');
- }
-
- protected addQueryParams(rawQuery?: QueryParamsType): string {
- const queryString = this.toQueryString(rawQuery);
- return queryString ? `?${queryString}` : '';
- }
-
- private contentFormatters: Record any> = {
- [ContentType.Json]: (input: any) =>
- input !== null && (typeof input === 'object' || typeof input === 'string')
- ? JSON.stringify(input)
- : input,
- [ContentType.FormData]: (input: any) =>
- Object.keys(input || {}).reduce((formData, key) => {
- const property = input[key];
- formData.append(
- key,
- property instanceof Blob
- ? property
- : typeof property === 'object' && property !== null
- ? JSON.stringify(property)
- : `${property}`
- );
- return formData;
- }, new FormData()),
- [ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
- };
-
- private mergeRequestParams(
- params1: RequestParams,
- params2?: RequestParams
- ): RequestParams {
- return {
- ...this.baseApiParams,
- ...params1,
- ...(params2 || {}),
- headers: {
- ...(this.baseApiParams.headers || {}),
- ...(params1.headers || {}),
- ...((params2 && params2.headers) || {}),
- },
- };
- }
-
- private createAbortSignal = (
- cancelToken: CancelToken
- ): AbortSignal | undefined => {
- if (this.abortControllers.has(cancelToken)) {
- const abortController = this.abortControllers.get(cancelToken);
- if (abortController) {
- return abortController.signal;
- }
- return void 0;
- }
-
- const abortController = new AbortController();
- this.abortControllers.set(cancelToken, abortController);
- return abortController.signal;
- };
-
- public abortRequest = (cancelToken: CancelToken) => {
- const abortController = this.abortControllers.get(cancelToken);
-
- if (abortController) {
- abortController.abort();
- this.abortControllers.delete(cancelToken);
- }
- };
-
- public request = async ({
- body,
- secure,
- path,
- type,
- query,
- format,
- baseUrl,
- cancelToken,
- ...params
- }: FullRequestParams): Promise> => {
- const secureParams =
- ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&
- this.securityWorker &&
- (await this.securityWorker(this.securityData))) ||
- {};
- const requestParams = this.mergeRequestParams(params, secureParams);
- const queryString = query && this.toQueryString(query);
- const payloadFormatter = this.contentFormatters[type || ContentType.Json];
- const responseFormat = format || requestParams.format;
-
- return this.customFetch(
- `${baseUrl || this.baseUrl || ''}${path}${
- queryString ? `?${queryString}` : ''
- }`,
- {
- ...requestParams,
- headers: {
- ...(type && type !== ContentType.FormData
- ? { 'Content-Type': type }
- : {}),
- ...(requestParams.headers || {}),
- },
- signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
- body:
- typeof body === 'undefined' || body === null
- ? null
- : payloadFormatter(body),
- }
- ).then(async (response) => {
- const r = response as HttpResponse;
- r.data = null as unknown as T;
- r.error = null as unknown as E;
-
- const data = !responseFormat
- ? r
- : await response[responseFormat]()
- .then((data) => {
- if (r.ok) {
- r.data = data;
- } else {
- r.error = data;
- }
- return r;
- })
- .catch((e) => {
- r.error = e;
- return r;
- });
-
- if (cancelToken) {
- this.abortControllers.delete(cancelToken);
- }
-
- if (!response.ok) throw data;
- return data;
- });
- };
-}
-
-/**
- * @title Nonovium VCMS API
- * @version v1
- * @baseUrl http://localhost/api/v1
- * @contact (https://nonovium.com)
- */
-export class Api<
- SecurityDataType extends unknown
-> extends HttpClient {
- categories = {
- /**
- * @description Lists all categories
- *
- * @tags Categories
- * @name CategoriesList
- * @summary Lists Categories
- * @request GET:/categories
- * @secure
- */
- categoriesList: (params: RequestParams = {}) =>
- this.request({
- path: `/categories`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- comments = {
- /**
- * @description Paginated listing of all comments
- *
- * @tags Comments
- * @name CommentsList
- * @summary Lists Comments
- * @request GET:/comments
- * @secure
- */
- commentsList: (
- query?: { page?: number; author?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/comments`,
- method: 'GET',
- query: query,
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- encodeProfiles = {
- /**
- * @description Lists all encoding profiles for videos
- *
- * @tags Encoding Profiles
- * @name EncodeProfilesList
- * @summary List Encoding Profiles
- * @request GET:/encode_profiles/
- * @secure
- */
- encodeProfilesList: (params: RequestParams = {}) =>
- this.request({
- path: `/encode_profiles/`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- login = {
- /**
- * @description Login url endpoint. According to what the portal provides, you may provide username and/or email, plus the password
- *
- * @tags Users
- * @name LoginCreate
- * @summary Login url
- * @request POST:/login
- * @secure
- */
- loginCreate: (
- data: { username?: string; email?: string; password: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/login`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
- };
- manageComments = {
- /**
- * @description Manage comments for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageCommentsList
- * @summary Manage Comments
- * @request GET:/manage_comments
- * @secure
- */
- manageCommentsList: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_comments`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete comments for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageCommentsDelete
- * @summary Delete Comments
- * @request DELETE:/manage_comments
- * @secure
- */
- manageCommentsDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_comments`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- manageMedia = {
- /**
- * @description Manage media for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageMediaList
- * @summary Manage Media
- * @request GET:/manage_media
- * @secure
- */
- manageMediaList: (
- query?: {
- sort_by?: string;
- ordering?: string;
- state?: string;
- encoding_status?: string;
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/manage_media`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete media for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageMediaDelete
- * @summary Delete Media
- * @request DELETE:/manage_media
- * @secure
- */
- manageMediaDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_media`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- manageUsers = {
- /**
- * @description Manage users for VCMS managers and reviewers
- *
- * @tags Manage
- * @name ManageUsersList
- * @summary Manage Users
- * @request GET:/manage_users
- * @secure
- */
- manageUsersList: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_users`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Delete users for VCMS managers
- *
- * @tags Manage
- * @name ManageUsersDelete
- * @summary Delete Users
- * @request DELETE:/manage_users
- * @secure
- */
- manageUsersDelete: (params: RequestParams = {}) =>
- this.request({
- path: `/manage_users`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- media = {
- /**
- * @description Lists all media
- *
- * @tags Media
- * @name MediaList
- * @summary List Media
- * @request GET:/media/
- * @secure
- */
- mediaList: (
- query?: {
- page?: number;
- author?: string;
- show?: 'recommended' | 'featured' | 'latest';
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/`,
- method: 'GET',
- query: query,
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Adds a new media, for authenticated users
- *
- * @tags Media
- * @name MediaCreate
- * @summary Add new Media
- * @request POST:/media/
- * @secure
- */
- mediaCreate: (
- data: { media_file: File; description?: string; title?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Get information for a media
- *
- * @tags Media
- * @name MediaRead
- * @summary Get information for Media
- * @request GET:/media/{friendly_token}
- * @secure
- */
- mediaRead: (
- friendlyToken: string,
- friendlyToken: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'GET',
- secure: true,
- type: ContentType.UrlEncoded,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Actions for a media, for VCMS editors and managers
- *
- * @tags Media
- * @name MediaManagerActions
- * @summary Run action on Media
- * @request POST:/media/{friendly_token}
- * @secure
- */
- mediaManagerActions: (
- friendlyToken: string,
- friendlyToken: string,
- data: {
- type?: 'encode' | 'review';
- encoding_profiles?: string[];
- result?: boolean;
- },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- ...params,
- }),
-
- /**
- * @description Update a Media, for Media uploader
- *
- * @tags Media
- * @name MediaUpdate
- * @summary Update Media
- * @request PUT:/media/{friendly_token}
- * @secure
- */
- mediaUpdate: (
- friendlyToken: string,
- data: { description?: string; title?: string; media_file?: File },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'PUT',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description Delete a Media, for VCMS editors and managers
- *
- * @tags Media
- * @name MediaDelete
- * @summary Delete Media
- * @request DELETE:/media/{friendly_token}
- * @secure
- */
- mediaDelete: (
- friendlyToken: string,
- friendlyToken: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}`,
- method: 'DELETE',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsList
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsList: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsCreate
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsCreate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaActionsDelete
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/actions
- * @secure
- */
- mediaActionsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/actions`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsList
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsList: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsCreate
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsCreate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsDelete
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/comments
- * @secure
- */
- mediaCommentsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/media/${friendlyToken}/comments`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsRead
- * @summary to_be_written
- * @request GET:/media/{friendly_token}/comments/{uid}
- * @secure
- */
- mediaCommentsRead: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsCreate2
- * @summary to_be_written
- * @request POST:/media/{friendly_token}/comments/{uid}
- * @originalName mediaCommentsCreate
- * @duplicate
- * @secure
- */
- mediaCommentsCreate2: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Media
- * @name MediaCommentsDelete2
- * @summary to_be_written
- * @request DELETE:/media/{friendly_token}/comments/{uid}
- * @originalName mediaCommentsDelete
- * @duplicate
- * @secure
- */
- mediaCommentsDelete2: (
- friendlyToken: string,
- uid: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/media/${friendlyToken}/comments/${uid}`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- playlists = {
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsList
- * @summary to_be_written
- * @request GET:/playlists
- * @secure
- */
- playlistsList: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate
- * @summary to_be_written
- * @request POST:/playlists
- * @secure
- */
- playlistsCreate: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsList2
- * @summary to_be_written
- * @request GET:/playlists/
- * @originalName playlistsList
- * @duplicate
- * @secure
- */
- playlistsList2: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists/`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate2
- * @summary to_be_written
- * @request POST:/playlists/
- * @originalName playlistsCreate
- * @duplicate
- * @secure
- */
- playlistsCreate2: (params: RequestParams = {}) =>
- this.request({
- path: `/playlists/`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsRead
- * @summary to_be_written
- * @request GET:/playlists/{friendly_token}
- * @secure
- */
- playlistsRead: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsCreate3
- * @summary to_be_written
- * @request POST:/playlists/{friendly_token}
- * @originalName playlistsCreate
- * @duplicate
- * @secure
- */
- playlistsCreate3: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'POST',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsUpdate
- * @summary to_be_written
- * @request PUT:/playlists/{friendly_token}
- * @secure
- */
- playlistsUpdate: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'PUT',
- secure: true,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Playlists
- * @name PlaylistsDelete
- * @summary to_be_written
- * @request DELETE:/playlists/{friendly_token}
- * @secure
- */
- playlistsDelete: (friendlyToken: string, params: RequestParams = {}) =>
- this.request({
- path: `/playlists/${friendlyToken}`,
- method: 'DELETE',
- secure: true,
- ...params,
- }),
- };
- search = {
- /**
- * @description to_be_written
- *
- * @tags Search
- * @name SearchList
- * @summary to_be_written
- * @request GET:/search
- * @secure
- */
- searchList: (params: RequestParams = {}) =>
- this.request({
- path: `/search`,
- method: 'GET',
- secure: true,
- ...params,
- }),
- };
- tags = {
- /**
- * @description Paginated listing of all tags
- *
- * @tags Tags
- * @name TagsList
- * @summary Lists Tags
- * @request GET:/tags
- * @secure
- */
- tagsList: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/tags`,
- method: 'GET',
- query: query,
- secure: true,
- format: 'json',
- ...params,
- }),
- };
- user = {
- /**
- * @description Lists user actions
- *
- * @tags Users
- * @name UserActionRead
- * @summary List user actions
- * @request GET:/user/action/{action}
- * @secure
- */
- userActionRead: (
- action: string,
- action: 'like' | 'dislike' | 'watch' | 'report' | 'rate',
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/user/action/${action}`,
- method: 'GET',
- secure: true,
- ...params,
- }),
-
- /**
- * @description Returns an authenticated user's token
- *
- * @tags Users
- * @name UserTokenList
- * @summary Get a user token
- * @request GET:/user/token
- * @secure
- */
- userTokenList: (params: RequestParams = {}) =>
- this.request({
- path: `/user/token`,
- method: 'GET',
- secure: true,
- ...params,
- }),
- };
- users = {
- /**
- * @description Paginated listing of users
- *
- * @tags Users
- * @name UsersList
- * @summary List users
- * @request GET:/users
- * @secure
- */
- usersList: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/users`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Paginated listing of users
- *
- * @tags Users
- * @name UsersList2
- * @summary List users
- * @request GET:/users/
- * @originalName usersList
- * @duplicate
- * @secure
- */
- usersList2: (query?: { page?: number }, params: RequestParams = {}) =>
- this.request({
- path: `/users/`,
- method: 'GET',
- query: query,
- secure: true,
- ...params,
- }),
-
- /**
- * @description Get user details
- *
- * @tags Users
- * @name UsersRead
- * @summary List user details
- * @request GET:/users/{username}
- * @secure
- */
- usersRead: (
- username: string,
- username: string,
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/users/${username}`,
- method: 'GET',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description Post user details - authenticated view
- *
- * @tags Users
- * @name UsersCreate
- * @summary Edit user details
- * @request POST:/users/{username}
- * @secure
- */
- usersCreate: (
- username: string,
- username: string,
- data: { logo: File; description?: string; name?: string },
- params: RequestParams = {}
- ) =>
- this.request({
- path: `/users/${username}`,
- method: 'POST',
- body: data,
- secure: true,
- type: ContentType.FormData,
- format: 'json',
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Users
- * @name UsersUpdate
- * @summary Xto_be_written
- * @request PUT:/users/{username}
- * @secure
- */
- usersUpdate: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}`,
- method: 'PUT',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description to_be_written
- *
- * @tags Users
- * @name UsersDelete
- * @summary to_be_written
- * @request DELETE:/users/{username}
- * @secure
- */
- usersDelete: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}`,
- method: 'DELETE',
- secure: true,
- type: ContentType.UrlEncoded,
- ...params,
- }),
-
- /**
- * @description Contact user through email, if user has set this option
- *
- * @tags Users
- * @name UsersContactCreate
- * @summary Contact user
- * @request POST:/users/{username}/contact
- * @secure
- */
- usersContactCreate: (username: string, params: RequestParams = {}) =>
- this.request({
- path: `/users/${username}/contact`,
- method: 'POST',
- secure: true,
- ...params,
- }),
- };
- whoami = {
- /**
- * @description Whoami user information
- *
- * @tags Users
- * @name WhoamiRead
- * @summary Whoami user information
- * @request GET:/whoami
- * @secure
- */
- whoamiRead: (params: RequestParams = {}) =>
- this.request({
- path: `/whoami`,
- method: 'GET',
- secure: true,
- format: 'json',
- ...params,
- }),
- };
-}
diff --git a/yarn.lock b/yarn.lock
index fc5b28e..6e56139 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1995,6 +1995,11 @@
resolved "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz"
integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==
+"@iconify/react@^3.2.1":
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/@iconify/react/-/react-3.2.1.tgz#d18da31cec58c1aa8fdf4def451cc7e3196d88de"
+ integrity sha512-yKzixjC9ct9RC/aSGo1OGxkG2rpfhlr/urRz6k2YZlIBzn92PBTlqtSx8o8dFYEorr3eUFSCBZFzBy1yw5jsAA==
+
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz"