1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/public-signup-token-update-schema.ts
andreas-unleash 193c12acd8
chore: docs for public signup token tag (#3486)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #
[1-863](https://linear.app/unleash/issue/1-836/update-endpoints-for-tag-public-signup-tokens)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-04-21 11:26:54 +00:00

28 lines
845 B
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const publicSignupTokenUpdateSchema = {
$id: '#/components/schemas/publicSignupTokenUpdateSchema',
description:
"Used by Unleash for updating a token's expiration date or, when deleting the invite link, it's status",
type: 'object',
additionalProperties: false,
properties: {
expiresAt: {
type: 'string',
description: `The token's expiration date.`,
format: 'date-time',
example: '2023-04-11T15:46:56Z',
},
enabled: {
description: `Whether the token is active or not.`,
type: 'boolean',
example: true,
},
},
components: {},
} as const;
export type PublicSignupTokenUpdateSchema = FromSchema<
typeof publicSignupTokenUpdateSchema
>;