1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src/lib/openapi/spec/public-signup-tokens-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

50 lines
1.6 KiB
TypeScript

import type { FromSchema } from 'json-schema-to-ts';
import { userSchema } from './user-schema';
import { roleSchema } from './role-schema';
import { publicSignupTokenSchema } from './public-signup-token-schema';
export const publicSignupTokensSchema = {
$id: '#/components/schemas/publicSignupTokensSchema',
type: 'object',
description: 'A wrapper object containing all the public signup tokens',
additionalProperties: false,
required: ['tokens'],
properties: {
tokens: {
type: 'array',
description: 'An array of all the public signup tokens',
example: [
{
secret: 'a3c84b25409ea8ca1782ef17f94a42fc',
url: 'https://my_unleash_instance/new-user?invite=a3c84b25409ea8ca1782ef17f94a42fc',
name: 'Invite public viewers',
enabled: false,
expiresAt: '2023-04-12T11:13:31.960Z',
createdAt: '2023-04-12T11:13:31.960Z',
createdBy: 'someone',
users: null,
role: {
id: 3,
type: 'root',
name: 'Viewer',
},
},
],
items: {
$ref: '#/components/schemas/publicSignupTokenSchema',
},
},
},
components: {
schemas: {
publicSignupTokenSchema,
userSchema,
roleSchema,
},
},
} as const;
export type PublicSignupTokensSchema = FromSchema<
typeof publicSignupTokensSchema
>;