feat(core): Add endpoint to create free AI credits (#12362)

This commit is contained in:
Ricardo Espinoza
2024-12-27 09:46:57 -05:00
committed by GitHub
parent c00b95e08f
commit ac4e042231
19 changed files with 258 additions and 34 deletions

View File

@@ -37,10 +37,13 @@ const randomTopLevelDomain = () => chooseRandomly(POPULAR_TOP_LEVEL_DOMAINS);
export const randomName = () => randomString(4, 8).toLowerCase();
export const randomCredentialPayload = (): CredentialPayload => ({
export const randomCredentialPayload = ({
isManaged = false,
}: { isManaged?: boolean } = {}): CredentialPayload => ({
name: randomName(),
type: randomName(),
data: { accessToken: randomString(6, 16) },
isManaged,
});
export const uniqueId = () => uuid();