// Author : Younes A import { APIStrategy, ApplicationIdentityToken, SelfServiceManager, Strategy, TokenManager, UserSCIM, WebAppStrategy, } from "./appid-sdk"; import { expectType } from "tsd"; expectType( new APIStrategy({ oauthServerUrl: "{oauth-server-url}", }) ); expectType( new WebAppStrategy({ tenantId: "{tenant-id}", clientId: "{client-id}", secret: "{secret}", oauthServerUrl: "{oauth-server-url}", redirectUri: "{app-url}" + "CALLBACK_URL", }) ); const config = { tenantId: "{tenant-id}", clientId: "{client-id}", secret: "{secret}", oauthServerUrl: "{oauth-server-url}", }; const tokenManager = new TokenManager(config); expectType( await tokenManager.getApplicationIdentityToken() ); const selfServiceManager = new SelfServiceManager({ iamApiKey: "{iam-api-key}", managementUrl: "{management-url}", }); const userData = { id: "2819c223-7f76-453a-919d-413861904646", externalId: "701984", userName: "bjensen@example.com", }; expectType( await selfServiceManager.signUp(userData, "en", "iamToken") );