chore: bump openapi-typescript

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2024-08-02 16:44:46 -03:00
parent 5e3315c7ff
commit 202825cef7
No known key found for this signature in database
GPG key ID: B7AB4B76A7CA7318
9 changed files with 8818 additions and 6654 deletions

View file

@ -9,5 +9,16 @@ module.exports = {
// production only
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'vue/no-unused-components': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
}
},
overrides: [
{
files: ['src/types/openapi/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
quotes: 'off',
'no-multiple-empty-lines': 'off',
'no-use-before-define': 'off',
},
},
],
}

View file

@ -20,6 +20,23 @@
}
},
"schemas": {
"AccountFile": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"$ref": "#/components/schemas/NewFile"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"CertificatePfxData": {
"type": "object",
"required": [
@ -227,6 +244,31 @@
}
}
},
"FolderSettings": {
"type": "object",
"properties": {
"folderName": {
"type": "string"
},
"separator": {
"type": "string"
},
"folderPatterns": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"setting": {
"type": "string"
}
}
}
}
},
"IdentifyAccount": {
"type": "object",
"required": [
@ -293,6 +335,41 @@
}
}
},
"NewFile": {
"type": "object",
"properties": {
"base64": {
"type": "string"
},
"fileId": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"url": {
"type": "string"
}
}
},
"NewSigner": {
"type": "object",
"required": [
"identify"
],
"properties": {
"identify": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"account": {
"type": "string"
}
}
}
}
},
"NextcloudFile": {
"type": "object",
"required": [

628
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,7 @@
"watch": "webpack --node-env development --progress --watch",
"serve": "webpack serve --node-env development --progress --allowed-hosts all --host 0.0.0.0",
"typescript:check": "tsc --noEmit",
"typescript:generate": "npx openapi-typescript \"./openapi*.json\" --immutable -t -o src/types/openapi/",
"typescript:generate": "npx openapi-typescript -t",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"stylelint": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue",

13
redocly.yaml Normal file
View file

@ -0,0 +1,13 @@
apis:
openapi@v1:
root: ./openapi.json
x-openapi-ts:
output: ./src/types/openapi/openapi.ts
openapi-administration@v1:
root: ./openapi-administration.json
x-openapi-ts:
output: ./src/types/openapi/openapi-administration.ts
openapi-full@v1:
root: ./openapi-full.json
x-openapi-ts:
output: ./src/types/openapi/openapi-full.ts

View file

@ -3,349 +3,432 @@
* Do not make direct changes to the file.
*/
export type paths = {
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": {
/**
* Generate certificate using CFSSL engine
* @description This endpoint requires admin access
*/
post: operations["admin-generate-certificate-cfssl"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/openssl": {
/**
* Generate certificate using OpenSSL engine
* @description This endpoint requires admin access
*/
post: operations["admin-generate-certificate-open-ssl"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate": {
/**
* Load certificate data
* @description Return all data of root certificate and a field called `generated` with a boolean value.
* This endpoint requires admin access
*/
get: operations["admin-load-certificate"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/configure-check": {
/**
* Check the configuration of LibreSign
* @description Return the status of necessary configuration and tips to fix the problems.
* This endpoint requires admin access
*/
get: operations["admin-configure-check"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/disable-hate-limit": {
/**
* Disable hate limit to current session
* @description This will disable hate limit to current session.
* This endpoint requires admin access
*/
get: operations["admin-disable-hate-limit"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/setting/has-root-cert": {
/**
* Has root certificate
* @description Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have
*/
get: operations["setting-has-root-cert"];
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Generate certificate using CFSSL engine
* @description This endpoint requires admin access
*/
post: operations["admin-generate-certificate-cfssl"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/openssl": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Generate certificate using OpenSSL engine
* @description This endpoint requires admin access
*/
post: operations["admin-generate-certificate-open-ssl"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Load certificate data
* @description Return all data of root certificate and a field called `generated` with a boolean value.
* This endpoint requires admin access
*/
get: operations["admin-load-certificate"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/configure-check": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Check the configuration of LibreSign
* @description Return the status of necessary configuration and tips to fix the problems.
* This endpoint requires admin access
*/
get: operations["admin-configure-check"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/disable-hate-limit": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Disable hate limit to current session
* @description This will disable hate limit to current session.
* This endpoint requires admin access
*/
get: operations["admin-disable-hate-limit"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/ocs/v2.php/apps/libresign/api/{apiVersion}/setting/has-root-cert": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Has root certificate
* @description Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have
*/
get: operations["setting-has-root-cert"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
};
export type webhooks = Record<string, never>;
export type components = {
schemas: {
CetificateDataGenerated: components["schemas"]["EngineHandler"] & {
generated: boolean;
schemas: {
CetificateDataGenerated: components["schemas"]["EngineHandler"] & {
generated: boolean;
};
ConfigureCheck: {
message: string;
resource: string;
/** @enum {string} */
status: "error" | "success";
tip: string;
};
EngineHandler: {
configPath: string;
cfsslUri?: string;
rootCert: components["schemas"]["RootCertificate"];
};
OCSMeta: {
status: string;
statuscode: number;
message?: string;
totalitems?: string;
itemsperpage?: string;
};
RootCertificate: {
commonName: string;
names: components["schemas"]["RootCertificateName"][];
};
RootCertificateName: {
id: string;
value: string;
};
};
ConfigureCheck: {
message: string;
resource: string;
/** @enum {string} */
status: "error" | "success";
tip: string;
};
EngineHandler: {
configPath: string;
cfsslUri?: string;
rootCert: components["schemas"]["RootCertificate"];
};
OCSMeta: {
status: string;
statuscode: number;
message?: string;
totalitems?: string;
itemsperpage?: string;
};
RootCertificate: {
commonName: string;
names: components["schemas"]["RootCertificateName"][];
};
RootCertificateName: {
id: string;
value: string;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
};
export type $defs = Record<string, never>;
export type external = Record<string, never>;
export type operations = {
/**
* Generate certificate using CFSSL engine
* @description This endpoint requires admin access
*/
"admin-generate-certificate-cfssl": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
requestBody: {
content: {
"application/json": {
/** @description fields of root certificate */
rootCert: {
commonName: string;
names: {
[key: string]: {
value: string;
};
export interface operations {
"admin-generate-certificate-cfssl": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
};
/**
* @description URI of CFSSL API
* @default
*/
cfsslUri?: string;
/**
* @description Path of config files of CFSSL
* @default
*/
configPath?: string;
};
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
data: components["schemas"]["EngineHandler"];
};
path: {
apiVersion: "v1";
};
};
cookie?: never;
};
};
/** @description Account not found */
401: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
requestBody: {
content: {
"application/json": {
/** @description fields of root certificate */
rootCert: {
commonName: string;
names: {
[key: string]: {
value: string;
};
};
};
/**
* @description URI of CFSSL API
* @default
*/
cfsslUri?: string;
/**
* @description Path of config files of CFSSL
* @default
*/
configPath?: string;
};
};
};
};
};
};
};
/**
* Generate certificate using OpenSSL engine
* @description This endpoint requires admin access
*/
"admin-generate-certificate-open-ssl": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
requestBody: {
content: {
"application/json": {
/** @description fields of root certificate */
rootCert: {
commonName: string;
names: {
[key: string]: {
value: string;
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
data: components["schemas"]["EngineHandler"];
};
};
};
};
};
};
/**
* @description Path of config files of CFSSL
* @default
*/
configPath?: string;
};
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
data: components["schemas"]["EngineHandler"];
};
/** @description Account not found */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
};
/** @description Account not found */
401: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
"admin-generate-certificate-open-ssl": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
};
};
};
};
};
/**
* Load certificate data
* @description Return all data of root certificate and a field called `generated` with a boolean value.
* This endpoint requires admin access
*/
"admin-load-certificate": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: components["schemas"]["CetificateDataGenerated"];
path: {
apiVersion: "v1";
};
};
cookie?: never;
};
};
};
};
/**
* Check the configuration of LibreSign
* @description Return the status of necessary configuration and tips to fix the problems.
* This endpoint requires admin access
*/
"admin-configure-check": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: components["schemas"]["ConfigureCheck"][];
requestBody: {
content: {
"application/json": {
/** @description fields of root certificate */
rootCert: {
commonName: string;
names: {
[key: string]: {
value: string;
};
};
};
/**
* @description Path of config files of CFSSL
* @default
*/
configPath?: string;
};
};
};
};
};
};
};
/**
* Disable hate limit to current session
* @description This will disable hate limit to current session.
* This endpoint requires admin access
*/
"admin-disable-hate-limit": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: unknown;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
data: components["schemas"]["EngineHandler"];
};
};
};
};
};
};
};
};
};
};
/**
* Has root certificate
* @description Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have
*/
"setting-has-root-cert": {
parameters: {
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
};
responses: {
/** @description OK */
200: {
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
hasRootCert: boolean;
};
/** @description Account not found */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
message: string;
};
};
};
};
};
};
};
};
};
};
};
"admin-load-certificate": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: components["schemas"]["CetificateDataGenerated"];
};
};
};
};
};
};
"admin-configure-check": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: components["schemas"]["ConfigureCheck"][];
};
};
};
};
};
};
"admin-disable-hate-limit": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: unknown;
};
};
};
};
};
};
"setting-has-root-cert": {
parameters: {
query?: never;
header: {
/** @description Required to be true for the API request to pass */
"OCS-APIRequest": boolean;
};
path: {
apiVersion: "v1";
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
ocs: {
meta: components["schemas"]["OCSMeta"];
data: {
hasRootCert: boolean;
};
};
};
};
};
};
};
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -83,12 +83,12 @@
"source": {
"type": "git",
"url": "https://github.com/vitormattos/openapi-extractor.git",
"reference": "99777c35c1b7802d4cef736a18768394973491ca"
"reference": "c818f176b4eb6f432c0e1317925d2ada79c950a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vitormattos/openapi-extractor/zipball/99777c35c1b7802d4cef736a18768394973491ca",
"reference": "99777c35c1b7802d4cef736a18768394973491ca",
"url": "https://api.github.com/repos/vitormattos/openapi-extractor/zipball/c818f176b4eb6f432c0e1317925d2ada79c950a9",
"reference": "c818f176b4eb6f432c0e1317925d2ada79c950a9",
"shasum": ""
},
"require": {
@ -129,7 +129,7 @@
"support": {
"source": "https://github.com/vitormattos/openapi-extractor/tree/develop"
},
"time": "2024-07-23T12:06:37+00:00"
"time": "2024-08-02T19:18:29+00:00"
},
{
"name": "nikic/php-parser",