bigbuffet-rw/packages/pl-api/lib/entities/application.ts
marcin mikołajczak ee0232e2e6 pl-api: works on docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-29 22:26:53 +01:00

22 lines
696 B
TypeScript

import * as v from 'valibot';
/**
* @category Schemas
* @see {@link https://docs.joinmastodon.org/entities/Application/}
*/
const applicationSchema = v.object({
name: v.fallback(v.string(), ''),
website: v.fallback(v.optional(v.string()), undefined),
client_id: v.fallback(v.optional(v.string()), undefined),
client_secret: v.fallback(v.optional(v.string()), undefined),
redirect_uri: v.fallback(v.optional(v.string()), undefined),
id: v.fallback(v.optional(v.string()), undefined),
/** @deprecated */
vapid_key: v.fallback(v.optional(v.string()), undefined),
});
type Application = v.InferOutput<typeof applicationSchema>;
export { applicationSchema, type Application };