diff --git a/src/folksonomy.ts b/src/folksonomy.ts index 005007d..e310c9d 100644 --- a/src/folksonomy.ts +++ b/src/folksonomy.ts @@ -15,10 +15,12 @@ export type FolksonomyKey = { export class Folksonomy { private readonly fetch: typeof global.fetch; private readonly baseUrl: string; + private authToken?: string; readonly raw: ReturnType>; - constructor(fetch: typeof global.fetch, authToken: string) { + constructor(fetch: typeof global.fetch, authToken?: string) { this.baseUrl = "https://api.folksonomy.openfoodfacts.org"; + this.authToken = authToken; this.fetch = fetch; this.raw = createClient({ @@ -53,6 +55,12 @@ export class Folksonomy { } async putTag(tag: FolksonomyTag): Promise { + if (!this.authToken) { + throw new Error( + "Auth token must be provided or login method invoked to update a tag", + ); + } + const res = await this.raw.PUT("/product", { body: tag }); return res.response.status === 200; @@ -81,6 +89,12 @@ export class Folksonomy { * @returns if the tag was added or updated */ async addTag(tag: FolksonomyTag): Promise { + if (!this.authToken) { + throw new Error( + "Auth token must be provided or login method invoked to add a tag", + ); + } + const res = await this.raw.POST("/product", { body: tag, }); @@ -94,6 +108,12 @@ export class Folksonomy { * @returns if the tag was deleted */ async removeTag(tag: FolksonomyTag & { version: number }) { + if (!this.authToken) { + throw new Error( + "Auth token must be provided or login method invoked to remove a tag", + ); + } + const res = await this.raw.DELETE("/product/{product}/{k}", { params: { path: { product: tag.product, k: tag.k }, @@ -145,6 +165,8 @@ export class Folksonomy { token_type: string; }; + this.authToken = token.access_token; + return { token }; } } diff --git a/src/schemas/folksonomy.ts b/src/schemas/folksonomy.ts index 542b469..cb5a241 100644 --- a/src/schemas/folksonomy.ts +++ b/src/schemas/folksonomy.ts @@ -3,580 +3,761 @@ * Do not make direct changes to the file. */ - export interface paths { - "/": { - /** Hello */ - get: operations["hello__get"]; - }; - "/auth": { - /** - * Authentication - * @description Authentication: provide user/password and get a bearer token in return - * - * - **username**: Open Food Facts user_id (not email) - * - **password**: user password (clear text, but HTTPS encrypted) - * - * token is returned, to be used in later requests with usual "Authorization: bearer token" headers - */ - post: operations["authentication_auth_post"]; - }; - "/auth_by_cookie": { - /** - * Authentication - * @description Authentication: provide Open Food Facts session cookie and get a bearer token in return - * - * - **session cookie**: Open Food Facts session cookie - * - * token is returned, to be used in later requests with usual "Authorization: bearer token" headers - */ - post: operations["authentication_auth_by_cookie_post"]; - }; - "/products/stats": { - /** - * Product Stats - * @description Get the list of products with tags statistics - * - * The products list can be limited to some tags (k or k=v) - */ - get: operations["product_stats_products_stats_get"]; - }; - "/products": { - /** - * Product List - * @description Get the list of products matching k or k=v - */ - get: operations["product_list_products_get"]; - }; - "/product/{product}": { - /** - * Product Tags List - * @description Get a list of existing tags for a product - */ - get: operations["product_tags_list_product__product__get"]; - }; - "/product/{product}/{k}": { - /** - * Product Tag - * @description Get a specific tag or tag hierarchy on a product - * - * - /product/xxx/key returns only the requested key - * - /product/xxx/key* returns the key and subkeys (key:subkey) - */ - get: operations["product_tag_product__product___k__get"]; - /** - * Product Tag Delete - * @description Delete a product tag - */ - delete: operations["product_tag_delete_product__product___k__delete"]; - }; - "/product/{product}/{k}/versions": { - /** - * Product Tag List Versions - * @description Get a list of all versions of a tag for a product - */ - get: operations["product_tag_list_versions_product__product___k__versions_get"]; - }; - "/product": { - /** - * Product Tag Update - * @description Update a product tag - * - * - **product**: which product - * - **k**: which key for the tag - * - **v**: which value to set for the tag - * - **version**: must be equal to previous version + 1 - * - **owner**: None or empty for public tags, or your own user_id - */ - put: operations["product_tag_update_product_put"]; - /** - * Product Tag Add - * @description Create a new product tag (version=1) - * - * - **product**: which product - * - **k**: which key for the tag - * - **v**: which value to set for the tag - * - **version**: none or empty or 1 - * - **owner**: none or empty for public tags, or your own user_id - * - * Be aware it's not possible to create the same tag twice. Though, you can update - * a tag and add multiple values the way you want (don't forget to document how); comma - * separated list is a good option. - */ - post: operations["product_tag_add_product_post"]; - }; - "/keys": { - /** - * Keys List - * @description Get the list of keys with statistics - * - * The keys list can be restricted to private tags from some owner - */ - get: operations["keys_list_keys_get"]; - }; - "/ping": { - /** - * Pong - * @description Check server health - */ - get: operations["pong_ping_get"]; - }; -} - -export type webhooks = Record; - -export interface components { - schemas: { - /** Body_authentication_auth_post */ - Body_authentication_auth_post: { - /** Grant Type */ - grant_type?: string; - /** Username */ - username: string; - /** Password */ - password: string; - /** - * Scope - * @default - */ - scope?: string; - /** Client Id */ - client_id?: string; - /** Client Secret */ - client_secret?: string; - }; - /** HTTPValidationError */ - HTTPValidationError: { - /** Detail */ - detail?: components["schemas"]["ValidationError"][]; - }; - /** ProductList */ - ProductList: { - /** Product */ - product: string; - /** K */ - k: string; - /** V */ - v: string; - }; - /** ProductStats */ - ProductStats: { - /** Product */ - product: string; - /** Keys */ - keys: number; - /** Editors */ - editors: number; - /** - * Last Edit - * Format: date-time - */ - last_edit: string; - }; - /** ProductTag */ - ProductTag: { - /** Product */ - product: string; - /** K */ - k: string; - /** V */ - v: string; - /** - * Owner - * @default - */ - owner?: string; - /** - * Version - * @default 1 - */ - version?: number; - /** Editor */ - editor?: string; - /** - * Last Edit - * Format: date-time - */ - last_edit?: string; - /** - * Comment - * @default - */ - comment?: string; - }; - /** ValidationError */ - ValidationError: { - /** Location */ - loc: string[]; - /** Message */ - msg: string; - /** Error Type */ - type: string; + "/": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Hello */ + get: operations["hello__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type $defs = Record; - -export type external = Record; - -export interface operations { - - /** Hello */ - hello__get: { - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; + "/auth": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Authentication + * @description Authentication: provide user/password and get a bearer token in return + * + * - **username**: Open Food Facts user_id (not email) + * - **password**: user password (clear text, but HTTPS encrypted) + * + * token is returned, to be used in later requests with usual "Authorization: bearer token" headers + */ + post: operations["authentication_auth_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - /** - * Authentication - * @description Authentication: provide user/password and get a bearer token in return - * - * - **username**: Open Food Facts user_id (not email) - * - **password**: user password (clear text, but HTTPS encrypted) - * - * token is returned, to be used in later requests with usual "Authorization: bearer token" headers - */ - authentication_auth_post: { - requestBody: { - content: { - "application/x-www-form-urlencoded": components["schemas"]["Body_authentication_auth_post"]; - }; + "/auth_by_cookie": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Authentication + * @description Authentication: provide Open Food Facts session cookie and get a bearer token in return + * + * - **session cookie**: Open Food Facts session cookie + * + * token is returned, to be used in later requests with usual "Authorization: bearer token" headers + */ + post: operations["authentication_auth_by_cookie_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + "/products/stats": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Product Stats + * @description Get the list of products with tags statistics + * + * The products list can be limited to some tags (k or k=v) + */ + get: operations["product_stats_products_stats_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - /** - * Authentication - * @description Authentication: provide Open Food Facts session cookie and get a bearer token in return - * - * - **session cookie**: Open Food Facts session cookie - * - * token is returned, to be used in later requests with usual "Authorization: bearer token" headers - */ - authentication_auth_by_cookie_post: { - parameters: { - cookie?: { - session?: string; - }; + "/products": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Product List + * @description Get the list of products matching k or k=v + */ + get: operations["product_list_products_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + "/product/{product}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Product Tags List + * @description Get a list of existing tags for a product + */ + get: operations["product_tags_list_product__product__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - /** - * Product Stats - * @description Get the list of products with tags statistics - * - * The products list can be limited to some tags (k or k=v) - */ - product_stats_products_stats_get: { - parameters: { - query?: { - owner?: unknown; - k?: unknown; - v?: unknown; - }; + "/product/{product}/{k}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Product Tag + * @description Get a specific tag or tag hierarchy on a product + * + * - /product/xxx/key returns only the requested key + * - /product/xxx/key* returns the key and subkeys (key:subkey) + */ + get: operations["product_tag_product__product___k__get"]; + put?: never; + post?: never; + /** + * Product Tag Delete + * @description Delete a product tag + */ + delete: operations["product_tag_delete_product__product___k__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["ProductStats"][]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + "/product/{product}/{k}/versions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Product Tag List Versions + * @description Get a list of all versions of a tag for a product + */ + get: operations["product_tag_list_versions_product__product___k__versions_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - /** - * Product List - * @description Get the list of products matching k or k=v - */ - product_list_products_get: { - parameters: { - query?: { - owner?: unknown; - k?: unknown; - v?: unknown; - }; + "/product": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Product Tag Update + * @description Update a product tag + * + * - **product**: which product + * - **k**: which key for the tag + * - **v**: which value to set for the tag + * - **version**: must be equal to previous version + 1 + * - **owner**: None or empty for public tags, or your own user_id + */ + put: operations["product_tag_update_product_put"]; + /** + * Product Tag Add + * @description Create a new product tag (version=1) + * + * - **product**: which product + * - **k**: which key for the tag + * - **v**: which value to set for the tag + * - **version**: none or empty or 1 + * - **owner**: none or empty for public tags, or your own user_id + * + * Be aware it's not possible to create the same tag twice. Though, you can update + * a tag and add multiple values the way you want (don't forget to document how); comma + * separated list is a good option. + */ + post: operations["product_tag_add_product_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["ProductList"][]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + "/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Keys List + * @description Get the list of keys with statistics + * + * The keys list can be restricted to private tags from some owner + */ + get: operations["keys_list_keys_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - }; - /** - * Product Tags List - * @description Get a list of existing tags for a product - */ - product_tags_list_product__product__get: { - parameters: { - query?: { - owner?: unknown; - }; - path: { - product: string; - }; + "/ping": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Pong + * @description Check server health + */ + get: operations["pong_ping_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["ProductTag"][]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** Body_authentication_auth_post */ + Body_authentication_auth_post: { + /** Grant Type */ + grant_type?: string | null; + /** Username */ + username: string; + /** Password */ + password: string; + /** + * Scope + * @default + */ + scope: string; + /** Client Id */ + client_id?: string | null; + /** Client Secret */ + client_secret?: string | null; + }; + /** HTTPValidationError */ + HTTPValidationError: { + /** Detail */ + detail?: components["schemas"]["ValidationError"][]; + }; + /** ProductList */ + ProductList: { + /** Product */ + product: string; + /** K */ + k: string; + /** V */ + v: string; + }; + /** ProductStats */ + ProductStats: { + /** Product */ + product: string; + /** Keys */ + keys: number; + /** Editors */ + editors: number; + /** + * Last Edit + * Format: date-time + */ + last_edit: string; + }; + /** ProductTag */ + ProductTag: { + /** Product */ + product: string; + /** K */ + k: string; + /** V */ + v: string; + /** + * Owner + * @default + */ + owner: string; + /** + * Version + * @default 1 + */ + version: number; + /** Editor */ + editor?: string | null; + /** Last Edit */ + last_edit?: string | null; + /** + * Comment + * @default + */ + comment: string | null; + }; + /** ValidationError */ + ValidationError: { + /** Location */ + loc: (string | number)[]; + /** Message */ + msg: string; + /** Error Type */ + type: string; + }; }; - }; - /** - * Product Tag - * @description Get a specific tag or tag hierarchy on a product - * - * - /product/xxx/key returns only the requested key - * - /product/xxx/key* returns the key and subkeys (key:subkey) - */ - product_tag_product__product___k__get: { - parameters: { - query?: { - owner?: unknown; - }; - path: { - product: string; - k: string; - }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + hello__get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["ProductTag"]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + authentication_auth_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": components["schemas"]["Body_authentication_auth_post"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Product Tag Delete - * @description Delete a product tag - */ - product_tag_delete_product__product___k__delete: { - parameters: { - query: { - version: number; - owner?: unknown; - }; - path: { - product: string; - k: string; - }; + authentication_auth_by_cookie_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: { + session?: string | null; + }; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + product_stats_products_stats_get: { + parameters: { + query?: { + owner?: unknown; + k?: unknown; + v?: unknown; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProductStats"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Product Tag List Versions - * @description Get a list of all versions of a tag for a product - */ - product_tag_list_versions_product__product___k__versions_get: { - parameters: { - query?: { - owner?: unknown; - }; - path: { - product: string; - k: string; - }; + product_list_products_get: { + parameters: { + query?: { + owner?: unknown; + k?: unknown; + v?: unknown; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProductList"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["ProductTag"][]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + product_tags_list_product__product__get: { + parameters: { + query?: { + owner?: unknown; + }; + header?: never; + path: { + product: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProductTag"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Product Tag Update - * @description Update a product tag - * - * - **product**: which product - * - **k**: which key for the tag - * - **v**: which value to set for the tag - * - **version**: must be equal to previous version + 1 - * - **owner**: None or empty for public tags, or your own user_id - */ - product_tag_update_product_put: { - requestBody: { - content: { - "application/json": components["schemas"]["ProductTag"]; - }; + product_tag_product__product___k__get: { + parameters: { + query?: { + owner?: unknown; + }; + header?: never; + path: { + product: string; + k: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProductTag"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + product_tag_delete_product__product___k__delete: { + parameters: { + query: { + version: number; + owner?: unknown; + }; + header?: never; + path: { + product: string; + k: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Product Tag Add - * @description Create a new product tag (version=1) - * - * - **product**: which product - * - **k**: which key for the tag - * - **v**: which value to set for the tag - * - **version**: none or empty or 1 - * - **owner**: none or empty for public tags, or your own user_id - * - * Be aware it's not possible to create the same tag twice. Though, you can update - * a tag and add multiple values the way you want (don't forget to document how); comma - * separated list is a good option. - */ - product_tag_add_product_post: { - requestBody: { - content: { - "application/json": components["schemas"]["ProductTag"]; - }; + product_tag_list_versions_product__product___k__versions_get: { + parameters: { + query?: { + owner?: unknown; + }; + header?: never; + path: { + product: string; + k: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProductTag"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + product_tag_update_product_put: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ProductTag"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Keys List - * @description Get the list of keys with statistics - * - * The keys list can be restricted to private tags from some owner - */ - keys_list_keys_get: { - parameters: { - query?: { - owner?: unknown; - }; + product_tag_add_product_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ProductTag"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; + keys_list_keys_get: { + parameters: { + query?: { + owner?: unknown; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; }; - }; - /** - * Pong - * @description Check server health - */ - pong_ping_get: { - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": unknown; - }; - }; + pong_ping_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; }; - }; }