Initial commit of eigent-main

This commit is contained in:
puzhen 2025-08-12 01:16:39 +02:00
commit 723df5a03e
1144 changed files with 103478 additions and 0 deletions

View file

@ -0,0 +1,22 @@
// src/lib/stack-app/api-keys/index.ts
import { filterUndefined } from "@stackframe/stack-shared/dist/utils/objects";
async function apiKeyCreationOptionsToCrud(type, userIdOrTeamId, options) {
return {
description: options.description,
expires_at_millis: options.expiresAt == null ? options.expiresAt : options.expiresAt.getTime(),
is_public: options.isPublic,
...type === "user" ? { user_id: userIdOrTeamId } : { team_id: userIdOrTeamId }
};
}
async function apiKeyUpdateOptionsToCrud(type, options) {
return filterUndefined({
description: options.description,
expires_at_millis: options.expiresAt == null ? options.expiresAt : options.expiresAt.getTime(),
revoked: options.revoked
});
}
export {
apiKeyCreationOptionsToCrud,
apiKeyUpdateOptionsToCrud
};
//# sourceMappingURL=index.js.map