mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 12:10:24 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
22
package/@stackframe/react/dist/esm/lib/stack-app/api-keys/index.js
vendored
Normal file
22
package/@stackframe/react/dist/esm/lib/stack-app/api-keys/index.js
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue