Reorganize repo structure and standards references

This commit is contained in:
david committed 2026-06-29 05:03:42 +02:00
1 parent 3cb93a81be
commit be2054274d
5885 files changed
+2588 -195

No files matched your search

@@ -0,0 +1,29 @@
export function getApiKeyCrudPermissions(c: boolean, r: boolean, u: boolean, d: boolean) {
let permissions = "";
if (c) {
permissions += "C";
}
if (r) {
permissions += "R";
}
if (u) {
permissions += "U";
}
if (d) {
permissions += "D";
}
return permissions;
}
export function checkApiKeyCallIsCreditable(statusCode: number | null) {
if (!statusCode) {
return false;
}
if (apiKeyCreditableStatusCodes.includes(statusCode)) {
return true;
}
return false;
}
export const apiKeyCreditableStatusCodes = [200, 201, 202, 203, 204, 205, 206, 207, 208, 226];
export const apiKeyIgnoreEndpoints = ["/v1/usage"];