@mintlify/validation
Advanced tools
Comparing version 0.1.295 to 0.1.296
import { UserInfo } from '../userInfo.js'; | ||
import { authEntitlements, userAuthEntitlements } from './deploymentEntitlements.js'; | ||
export type UserAuth = (SharedSessionAuth | JwtAuth | OAuth) & { | ||
@@ -61,2 +62,3 @@ invalidatedAt?: number; | ||
}; | ||
export declare function AuthEntitlementToAuthType(entitlement: (typeof authEntitlements)[number] | (typeof userAuthEntitlements)[number]): AuthType | UserAuthType; | ||
export {}; |
@@ -1,1 +0,22 @@ | ||
export {}; | ||
export function AuthEntitlementToAuthType(entitlement) { | ||
switch (entitlement) { | ||
case 'AUTH': | ||
return 'jwt'; | ||
case 'USER_AUTH': | ||
return 'jwt'; | ||
case 'AUTH_OAUTH': | ||
return 'oauth'; | ||
case 'AUTH_PASSWORD': | ||
return 'password'; | ||
case 'AUTH_JWT': | ||
return 'jwt'; | ||
case 'AUTH_MINTLIFY': | ||
return 'mintlify'; | ||
case 'PERSONALIZATION_JWT': | ||
return 'jwt'; | ||
case 'PERSONALIZATION_OAUTH': | ||
return 'oauth'; | ||
case 'PERSONALIZATION_SHARED_SESSION': | ||
return 'shared-session'; | ||
} | ||
} |
import { EntitlementConfiguration } from '@mintlify/models'; | ||
export type DeploymentEntitlements = Partial<Record<DeploymentEntitlement, EntitlementConfiguration>>; | ||
export type DeploymentEntitlements = Partial<Record<DeploymentEntitlement | AuthEntitlement | UserAuthEntitlement, EntitlementConfiguration>>; | ||
export type AuthEntitlement = (typeof authEntitlements)[number]; | ||
export type UserAuthEntitlement = (typeof userAuthEntitlements)[number]; | ||
export declare const authEntitlements: readonly ["AUTH", "AUTH_OAUTH", "AUTH_PASSWORD", "AUTH_JWT", "AUTH_MINTLIFY"]; | ||
@@ -4,0 +6,0 @@ export declare const userAuthEntitlements: readonly ["USER_AUTH", "PERSONALIZATION_JWT", "PERSONALIZATION_OAUTH", "PERSONALIZATION_SHARED_SESSION"]; |
{ | ||
"name": "@mintlify/validation", | ||
"version": "0.1.295", | ||
"version": "0.1.296", | ||
"description": "Validates mint.json files", | ||
@@ -63,3 +63,3 @@ "author": "Mintlify, Inc.", | ||
}, | ||
"gitHead": "3cfa565e798b042fd4c08895e6d9f69014311179" | ||
"gitHead": "f95969426461265495d9594910c5958e5f151581" | ||
} |
Sorry, the diff of this file is not supported yet
3574427
78880