Skip to content

Conversation

@somebody1234
Copy link
Contributor

Pull Request Description

Important Notes

None

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. x-new-feature Type: new feature request g-dashboard labels Oct 23, 2025
@PabloBuchu PabloBuchu marked this pull request as ready for review November 3, 2025 14:10
Week = 'Week',
Month = 'Month',
Year = 'Year',
Indefinetly = 'Indefinetly',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PabloBuchu Indefinitely is the correct spelling (but maybe Indefinite is more appropriate, given that the others aren't Yearly (for example))

.min(1)
.refine((name) => !apiKeyNames.has(name), getText('duplicateApiKeyError')),
description: z.string(),
expiresIn: z.enum([
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

z.nativeEnum(ApiKeyExpiresIn) should work

const { data: apiKeys } = useSuspenseQuery(backendQueryOptions(backend, 'listApiKeys', []))
const apiKeyNames = new Set(apiKeys.map((apiKey) => apiKey.name))
const createApiKey = useMutationCallback(backendMutationOptions(backend, 'createApiKey'))
const options = [
Copy link
Contributor Author

@somebody1234 somebody1234 Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would export this alongside ApiKeyExpiresIn, in the same module as the enum itself. worth trying export const NAME_HERE = Object.values(ApiKeyExpiresIn) for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard x-new-feature Type: new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants