ctan-openapi-fetch
Version:
A thin wrapper around `openapi-fetch` for use with the CTAN API
663 lines (661 loc) • 24 kB
TypeScript
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/authors": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List of Authors
* @description The list of authors can be obtained. The authors contained in this list are ordered ascending on the key of the author.
*
* Note that the authors information does not contain the email address of the author to protect the privacy.
*/
get: {
parameters: {
query?: {
/** @description If set, only items with keys starting with the given string will be returned. */
key?: components["parameters"]["key"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Author"][];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/author/{key}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Author
* @description The information about a single author can be obtained.
*
* Note that the authors information does not contain the email address of the author to protect the privacy.
*/
get: {
parameters: {
query?: {
/** @description Requests the list of packages in which the author is mentioned. */
ref?: boolean;
};
header?: never;
path: {
/** @description The key of the author as used by CTAN. Those keys are also listed in the [list of authors](#/paths/~1json~11.1~1authors/get). */
key: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Author"];
};
};
404: components["responses"]["NotFound"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/topics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List of Topics
* @description The list of topics can be obtained. The topics contained in this list are ordered ascending on the key of the topic.
*/
get: {
parameters: {
query?: {
/** @description If set, only items with keys starting with the given string will be returned. */
key?: components["parameters"]["key"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Topic"][];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/topic/{key}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Topic
* @description The information about a single topic can be obtained.
*/
get: {
parameters: {
query?: {
/** @description Requests the list of packages in which the topic is mentioned. In this case the attribute `packages` contains a list of package keys. The keys are unique ~~and sorted alphabetically~~.
*
* ⚠️ Package keys do not seem to be sorted. */
ref?: boolean;
};
header?: never;
path: {
/** @description The key of the topic as used by CTAN. Those keys are also listed in the [list of topics](#/paths/~1json~11.1~1topics/get). */
key: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Topic"];
};
};
404: components["responses"]["NotFound"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/packages": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List of Packages
* @description The list of packages can be obtained. The packages contained in this list are ordered ascending on the key of the packages.
*/
get: {
parameters: {
query?: {
/** @description If set, only items with keys starting with the given string will be returned. */
key?: components["parameters"]["key"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PackageSummary"][];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/pkg/{key}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Package
* @description The information about a single package can be obtained.
*/
get: {
parameters: {
query?: {
/** @description A comma separated list of fields to drop. */
drop?: components["parameters"]["drop"];
/** @description Always keeps valid URLs as attributes, instead of `ctan:`-prefixed ones. */
"keep-url"?: components["parameters"]["keep-url"];
/**
* @deprecated
* @description ⚠️ This does not seem to be working.
*
* If the parameter `author-name` can be set to `true` to include the first name and family name of the author as well.
*/
"author-name"?: components["parameters"]["author-name"];
};
header?: never;
path: {
/** @description The key of the package as used by CTAN in the [list of packages](#/paths/~1json~11.1~1packages/get). */
key: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["Package"];
};
};
404: components["responses"]["NotFound"];
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/licenses": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List of Licenses
* @description The list of licenses can be obtained. The licenses contained in this list are ordered ascending on the key of the license.
*/
get: {
parameters: {
query?: {
/** @description If set, only items with keys starting with the given string will be returned. */
key?: components["parameters"]["key"];
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["License"][];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/version": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Version
* @description The information about the version of the interface can be obtained.
*/
get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["ApiVersion"];
};
};
};
};
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
/**
* Author
* @description Information about an author.
*/
Author: {
/** @description The key of the author. */
key: string;
/**
* @description The given name.
* @default
*/
givenname: string;
/**
* @description The family name.
* @default
*/
familyname: string;
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `packages`.
*
* List of ids of packages mentioning the author. This attribute is included if the query parameter `ref` is set to `true`.
*/
pkgs?: string[];
/** @description UNDOCUMENTED.
*
* List of ids of packages mentioning the author. This attribute is included if the query parameter `ref` is set to `true`. */
packages?: string[];
};
/**
* NotFound
* @description Not Found
*/
NotFound: {
errors: "Not found"[];
};
/**
* Topic
* @description Information about a topic.
*/
Topic: {
/** @description The key of the topic. */
key: string;
/** @description A short descriptive text about the meaning of the topic. */
details: string;
/** @description UNDOCUMENTED.
*
* The list of ids of packages referring to the topic. This attribute is included if the parameter `ref` is set to `true`. */
packages?: string[];
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `packages`.
*
* The list of ids of packages referring to the topic. This attribute is included if the parameter `ref` is set to `true`.
*/
references?: string[];
};
/**
* PackageSummary
* @description Summary of a package.
*/
PackageSummary: {
/** @description The key of the package. */
key: string;
/** @description The name of the package. */
name: string;
/** @description UNDOCUMENTED.
*
* A short descriptive text about the content of the package. */
caption: string;
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `caption`.
*
* A short descriptive text about the content of the package.
*/
detailed?: string;
};
/**
* PackageAttribute
* @enum {string}
*/
PackageAttribute: "author" | "authors" | "bugs" | "copyright" | "ctan" | "description" | "descriptions" | "development" | "documentation" | "index" | "install" | "miktex" | "name" | "repository" | "support" | "texlive" | "topic" | "version";
/**
* PackageAuthor
* @description Information about a package author.
*/
PackageAuthor: {
/** @description The key of the author. */
id: string;
/** @description UNDOCUMENTED. */
active: boolean;
};
/** Copyright */
Copyright: {
/** @description The name of the copyright holder. */
owner: string;
/** @description The year or years of the copyright. */
year: string | null;
};
/**
* LicenseIdentifier
* @description Identifier of a license.
* @enum {string}
*/
LicenseIdentifier: "apache2" | "artistic" | "artistic2" | "bsd" | "bsd2" | "bsd3" | "bsd4" | "cc-by-1" | "cc-by-2" | "cc-by-3" | "cc-by-4" | "cc-by-nc-1" | "cc-by-nc-2" | "cc-by-nc-3" | "cc-by-nc-4" | "cc-by-nc-nd-1" | "cc-by-nc-nd-2" | "cc-by-nc-nd-2.5" | "cc-by-nc-nd-3" | "cc-by-nc-nd-4" | "cc-by-nc-sa4" | "cc-by-nd-1" | "cc-by-nd-2" | "cc-by-nd-3" | "cc-by-nd-4" | "cc-by-sa-1" | "cc-by-sa-2" | "cc-by-sa-3" | "cc-by-sa-4" | "cc0" | "eupl" | "fdl" | "gfl" | "gfsl" | "gpl" | "gpl1" | "gpl1+" | "gpl2" | "gpl2+" | "gpl3" | "gpl3+" | "isc" | "knuth" | "lgpl" | "lgpl2.1" | "lgpl3" | "lppl" | "lppl1" | "lppl1.2" | "lppl1.3" | "lppl1.3a" | "lppl1.3b" | "lppl1.3c" | "mit" | "nocommercial" | "nosell" | "nosource" | "ofl" | "opl" | "other-free" | "other-nonfree" | "pd" | "shareware" | "x11" | "noinfo";
/**
* PackageVersion
* @description Information about the version of a package.
*/
PackageVersion: {
/** @description The version number. */
number?: string;
/** @description The version date. */
date?: string;
};
/**
* PackageDescription
* @description A long description of a package.
*/
PackageDescription: {
/** @description UNDOCUMENTED.
*
* The longer description of the package, which may include HTML markup. An inner tag `<ref>` is used to reference a package with attribute `refid`. */
text?: string;
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `text`.
*
* The longer description of the package, which may include HTML markup. An inner tag `<ref>` is used to reference a package with attribute `refid`.
*/
description?: string;
/** @description UNDOCUMENTED.
*
* The ISO code for the language of the description. Alternately it may be `null` to indicate the default language, i.e. English. */
language?: string | null;
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `lang`.
*
* The ISO code for the language of the description. Alternately it may be `null` to indicate the default language, i.e. English.
*/
lang?: string | null;
};
/** PackageDocumentation */
PackageDocumentation: {
/** @description UNDOCUMENTED.
*
* The ISO code for the language of the description. */
language?: string | null;
/**
* @deprecated
* @description ⚠️ This appears to have been renamed `language`.
*
* The ISO code for the language of the description.
*/
lang?: string | null;
/** @description The (English) text describing this documentation item. */
details?: string;
/**
* Format: uri
* @description A reference to the documentation. The prefix `ctan:` indicates a reference to a directory on CTAN. If the parameter `keep-url` is `true` then this attribute contains always a valid URL without the `ctan:` prefix.
*/
href?: string;
};
/**
* Package
* @description Information about a package.
*/
Package: {
/** @description The unique id of the package. */
id: string;
/** @description The print representation of the package name. */
name: string;
/** @description A short description of the package. */
caption: string;
/** @description The list of authors. */
authors: components["schemas"]["PackageAuthor"][];
/** @description The information about the copyright. */
copyright?: components["schemas"]["Copyright"][];
/** @description The keys of licenses. */
license?: components["schemas"]["LicenseIdentifier"] | components["schemas"]["LicenseIdentifier"][];
version?: components["schemas"]["PackageVersion"];
/** @description Long descriptions of the package. */
descriptions: components["schemas"]["PackageDescription"][];
/** @description List of references to documentation. */
documentation: components["schemas"]["PackageDocumentation"][];
/** @description The location of the package in the CTAN tree. */
ctan?: {
/**
* Format: uri-reference
* @description The relative path of the package in the CTAN tree.
*/
path: string;
/**
* @description The indicator that this package consists of a single file only.
* @default false
*/
file: boolean;
};
install?: string | {
/**
* Format: uri-reference
* @description The path relative to the CTAN directory `/install`.
*/
path: string;
};
miktex?: string | {
/** @description ⚠️ This does not seem to be a correct type definition.
*
* The name of the package in MiKTeX. */
location: string;
};
texlive?: string | {
/** @description ⚠️ This does not seem to be a correct type definition.
*
* The name of the package in TeX Live. */
location?: string;
};
/** @description A list of extra terms to be indexed for the search. */
index?: string[];
/** @description A list of topics keys for this entry. */
topics?: string[];
/**
* Format: uri
* @description The URL of the home page of the package.
*/
home?: string;
/**
* Format: uri
* @description The URL of the source code repository for the package.
*/
repository?: string;
/** @description UNDOCUMENTED. */
also?: string[];
};
/**
* License
* @description Information about a license.
*/
License: {
/** @description The key of the license. */
key: components["schemas"]["LicenseIdentifier"];
/** @description The printable name of the license. */
name: string;
/** @description The indication whether the license is considered free. */
free: boolean;
};
/**
* ApiVersion
* @description The information about the version of the interface.
*/
ApiVersion: {
/**
* @description The version number as string.
* @constant
*/
version: "1.1";
};
};
responses: {
/** @description Not Found */
NotFound: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["NotFound"];
};
};
};
parameters: {
/**
* @deprecated
* @description ⚠️ This does not seem to be working.
*
* If the parameter `author-name` can be set to `true` to include the first name and family name of the author as well.
*/
"author-name": boolean;
/** @description A comma separated list of fields to drop. */
drop: components["schemas"]["PackageAttribute"][];
/** @description Always keeps valid URLs as attributes, instead of `ctan:`-prefixed ones. */
"keep-url": boolean;
/** @description If set, only items with keys starting with the given string will be returned. */
key: string;
};
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
export type operations = Record<string, never>;