diff --git a/apps/login/src/lib/zitadel.ts b/apps/login/src/lib/zitadel.ts index 322dca4efd..4afb429a20 100644 --- a/apps/login/src/lib/zitadel.ts +++ b/apps/login/src/lib/zitadel.ts @@ -59,11 +59,9 @@ async function cacheWrapper(callback: Promise) { export async function getBrandingSettings({ serviceUrl, - organization, }: { serviceUrl: string; - organization?: string; }) { const settingsService: Client = @@ -78,11 +76,9 @@ export async function getBrandingSettings({ export async function getLoginSettings({ serviceUrl, - organization, }: { serviceUrl: string; - organization?: string; }) { const settingsService: Client = @@ -97,11 +93,9 @@ export async function getLoginSettings({ export async function getLockoutSettings({ serviceUrl, - orgId, }: { serviceUrl: string; - orgId?: string; }) { const settingsService: Client = @@ -116,11 +110,9 @@ export async function getLockoutSettings({ export async function getPasswordExpirySettings({ serviceUrl, - orgId, }: { serviceUrl: string; - orgId?: string; }) { const settingsService: Client = @@ -135,11 +127,9 @@ export async function getPasswordExpirySettings({ export async function listIDPLinks({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -152,11 +142,9 @@ export async function listIDPLinks({ export async function addOTPEmail({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -169,11 +157,9 @@ export async function addOTPEmail({ export async function addOTPSMS({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -186,11 +172,9 @@ export async function addOTPSMS({ export async function registerTOTP({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -218,11 +202,9 @@ export async function getGeneralSettings({ export async function getLegalAndSupportSettings({ serviceUrl, - organization, }: { serviceUrl: string; - organization?: string; }) { const settingsService: Client = @@ -237,11 +219,9 @@ export async function getLegalAndSupportSettings({ export async function getPasswordComplexitySettings({ serviceUrl, - organization, }: { serviceUrl: string; - organization?: string; }) { const settingsService: Client = @@ -256,13 +236,11 @@ export async function getPasswordComplexitySettings({ export async function createSessionFromChecks({ serviceUrl, - checks, challenges, lifetime, }: { serviceUrl: string; - checks: Checks; challenges: RequestChallenges | undefined; lifetime?: Duration; @@ -275,13 +253,11 @@ export async function createSessionFromChecks({ export async function createSessionForUserIdAndIdpIntent({ serviceUrl, - userId, idpIntent, lifetime, }: { serviceUrl: string; - userId: string; idpIntent: { idpIntentId?: string | undefined; @@ -308,7 +284,6 @@ export async function createSessionForUserIdAndIdpIntent({ export async function setSession({ serviceUrl, - sessionId, sessionToken, challenges, @@ -316,7 +291,6 @@ export async function setSession({ lifetime, }: { serviceUrl: string; - sessionId: string; sessionToken: string; challenges: RequestChallenges | undefined; @@ -341,12 +315,10 @@ export async function setSession({ export async function getSession({ serviceUrl, - sessionId, sessionToken, }: { serviceUrl: string; - sessionId: string; sessionToken: string; }) { @@ -358,12 +330,10 @@ export async function getSession({ export async function deleteSession({ serviceUrl, - sessionId, sessionToken, }: { serviceUrl: string; - sessionId: string; sessionToken: string; }) { @@ -375,7 +345,6 @@ export async function deleteSession({ type ListSessionsCommand = { serviceUrl: string; - ids: string[]; }; @@ -404,7 +373,6 @@ export async function listSessions({ export type AddHumanUserData = { serviceUrl: string; - firstName: string; lastName: string; email: string; @@ -414,7 +382,6 @@ export type AddHumanUserData = { export async function addHumanUser({ serviceUrl, - email, firstName, lastName, @@ -447,11 +414,9 @@ export async function addHumanUser({ export async function addHuman({ serviceUrl, - request, }: { serviceUrl: string; - request: AddHumanUserRequest; }) { const userService: Client = await createServiceForHost( @@ -464,12 +429,10 @@ export async function addHuman({ export async function verifyTOTPRegistration({ serviceUrl, - code, userId, }: { serviceUrl: string; - code: string; userId: string; }) { @@ -483,11 +446,9 @@ export async function verifyTOTPRegistration({ export async function getUserByID({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -500,12 +461,10 @@ export async function getUserByID({ export async function verifyInviteCode({ serviceUrl, - userId, verificationCode, }: { serviceUrl: string; - userId: string; verificationCode: string; }) { @@ -519,11 +478,9 @@ export async function verifyInviteCode({ export async function resendInviteCode({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -536,12 +493,10 @@ export async function resendInviteCode({ export async function sendEmailCode({ serviceUrl, - userId, urlTemplate, }: { serviceUrl: string; - userId: string; urlTemplate: string; }) { @@ -567,12 +522,10 @@ export async function sendEmailCode({ export async function createInviteCode({ serviceUrl, - urlTemplate, userId, }: { serviceUrl: string; - urlTemplate: string; userId: string; }) { @@ -604,7 +557,6 @@ export async function createInviteCode({ export type ListUsersCommand = { serviceUrl: string; - loginName?: string; userName?: string; email?: string; @@ -614,7 +566,6 @@ export type ListUsersCommand = { export async function listUsers({ serviceUrl, - loginName, userName, phone, @@ -713,7 +664,6 @@ export async function listUsers({ export type SearchUsersCommand = { serviceUrl: string; - searchValue: string; loginSettings: LoginSettings; organizationId?: string; @@ -759,7 +709,6 @@ const EmailQuery = (searchValue: string) => * */ export async function searchUsers({ serviceUrl, - searchValue, loginSettings, organizationId, @@ -904,11 +853,9 @@ export async function getDefaultOrg({ export async function getOrgsByDomain({ serviceUrl, - domain, }: { serviceUrl: string; - domain: string; }) { const orgService: Client = @@ -931,7 +878,6 @@ export async function getOrgsByDomain({ export async function startIdentityProviderFlow({ serviceUrl, - idpId, urls, }: { @@ -956,7 +902,6 @@ export async function startIdentityProviderFlow({ export async function retrieveIdentityProviderInformation({ serviceUrl, - idpIntentId, idpIntentToken, }: { @@ -978,11 +923,9 @@ export async function retrieveIdentityProviderInformation({ export async function getAuthRequest({ serviceUrl, - authRequestId, }: { serviceUrl: string; - authRequestId: string; }) { const oidcService = await createServiceForHost(OIDCService, serviceUrl); @@ -994,11 +937,9 @@ export async function getAuthRequest({ export async function createCallback({ serviceUrl, - req, }: { serviceUrl: string; - req: CreateCallbackRequest; }) { const oidcService = await createServiceForHost(OIDCService, serviceUrl); @@ -1008,11 +949,9 @@ export async function createCallback({ export async function getSAMLRequest({ serviceUrl, - samlRequestId, }: { serviceUrl: string; - samlRequestId: string; }) { const samlService = await createServiceForHost(SAMLService, serviceUrl); @@ -1036,12 +975,10 @@ export async function createResponse({ export async function verifyEmail({ serviceUrl, - userId, verificationCode, }: { serviceUrl: string; - userId: string; verificationCode: string; }) { @@ -1061,12 +998,10 @@ export async function verifyEmail({ export async function resendEmailCode({ serviceUrl, - userId, urlTemplate, }: { serviceUrl: string; - userId: string; urlTemplate: string; }) { @@ -1090,12 +1025,10 @@ export async function resendEmailCode({ export async function retrieveIDPIntent({ serviceUrl, - id, token, }: { serviceUrl: string; - id: string; token: string; }) { @@ -1112,11 +1045,9 @@ export async function retrieveIDPIntent({ export async function getIDPByID({ serviceUrl, - id, }: { serviceUrl: string; - id: string; }) { const idpService: Client = @@ -1127,12 +1058,10 @@ export async function getIDPByID({ export async function addIDPLink({ serviceUrl, - idp, userId, }: { serviceUrl: string; - idp: { id: string; userId: string; userName: string }; userId: string; }) { @@ -1156,12 +1085,10 @@ export async function addIDPLink({ export async function passwordReset({ serviceUrl, - userId, urlTemplate, }: { serviceUrl: string; - userId: string; urlTemplate?: string; }) { @@ -1193,14 +1120,12 @@ export async function passwordReset({ export async function setUserPassword({ serviceUrl, - userId, password, user, code, }: { serviceUrl: string; - userId: string; password: string; user: User; @@ -1256,11 +1181,9 @@ export async function setUserPassword({ export async function setPassword({ serviceUrl, - payload, }: { serviceUrl: string; - payload: SetPasswordRequest; }) { const userService: Client = await createServiceForHost( @@ -1279,11 +1202,9 @@ export async function setPassword({ */ export async function createPasskeyRegistrationLink({ serviceUrl, - userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost( @@ -1309,12 +1230,10 @@ export async function createPasskeyRegistrationLink({ */ export async function registerU2F({ serviceUrl, - userId, domain, }: { serviceUrl: string; - userId: string; domain: string; }) { @@ -1337,11 +1256,9 @@ export async function registerU2F({ */ export async function verifyU2FRegistration({ serviceUrl, - request, }: { serviceUrl: string; - request: VerifyU2FRegistrationRequest; }) { const userService: Client = await createServiceForHost( @@ -1361,12 +1278,10 @@ export async function verifyU2FRegistration({ */ export async function getActiveIdentityProviders({ serviceUrl, - orgId, linking_allowed, }: { serviceUrl: string; - orgId?: string; linking_allowed?: boolean; }) { @@ -1388,11 +1303,9 @@ export async function getActiveIdentityProviders({ */ export async function verifyPasskeyRegistration({ serviceUrl, - request, }: { serviceUrl: string; - request: VerifyPasskeyRegistrationRequest; }) { const userService: Client = await createServiceForHost( @@ -1413,13 +1326,11 @@ export async function verifyPasskeyRegistration({ */ export async function registerPasskey({ serviceUrl, - userId, code, domain, }: { serviceUrl: string; - userId: string; code: { id: string; code: string }; domain: string; @@ -1447,7 +1358,6 @@ export async function listAuthenticationMethodTypes({ userId, }: { serviceUrl: string; - userId: string; }) { const userService: Client = await createServiceForHost(