@@ -46,7 +46,6 @@ import type { CookieHandlerInput } from "supertokens-web-js/utils/cookieHandler/
4646import type NormalisedURLDomain from "supertokens-web-js/utils/normalisedURLDomain" ;
4747import type NormalisedURLPath from "supertokens-web-js/utils/normalisedURLPath" ;
4848import type { WindowHandlerInput } from "supertokens-web-js/utils/windowHandler/types" ;
49- import type { SuperTokensPlugin as SuperTokensPluginWebJS } from "supertokens-web-js" ;
5049
5150type SuccessRedirectContextCommon = {
5251 recipeId :
@@ -532,8 +531,12 @@ export type PluginRouteHandler = {
532531 handler : ( ) => JSX . Element ;
533532} ;
534533
535- export type SuperTokensPlugin = SuperTokensPluginWebJS & {
534+ // TODO: this should probably derive from the web-js version
535+ export type SuperTokensPlugin = {
536+ id : string ;
537+ version ?: string ;
536538 compatibleAuthReactSDKVersions ?: string | string [ ] ; // match the syntax of the engines field in package.json
539+ compatibleWebJSSDKVersions ?: string | string [ ] ; // match the syntax of the engines field in package.json
537540 init ?: ( config : SuperTokensPublicConfig , allPlugins : SuperTokensPublicPlugin [ ] , sdkVersion : string ) => void ;
538541 dependencies ?: (
539542 config : SuperTokensPublicConfig ,
@@ -555,6 +558,7 @@ export type SuperTokensPlugin = SuperTokensPluginWebJS & {
555558 | PluginRouteHandler [ ] ;
556559
557560 config ?: ( config : SuperTokensPublicConfig ) => Omit < SuperTokensPublicConfig , "appInfo" > | undefined ;
561+ exports ?: Record < string , any > ;
558562} ;
559563
560564export const nonPublicConfigProperties = [ "experimental" ] as const ;
0 commit comments