@@ -46,6 +46,7 @@ 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" ;
4950
5051type SuccessRedirectContextCommon = {
5152 recipeId :
@@ -531,12 +532,8 @@ export type PluginRouteHandler = {
531532 handler : ( ) => JSX . Element ;
532533} ;
533534
534- // TODO: this should probably derive from the web-js version
535- export type SuperTokensPlugin = {
536- id : string ;
537- version ?: string ;
535+ export type SuperTokensPlugin = SuperTokensPluginWebJS & {
538536 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
540537 init ?: ( config : SuperTokensPublicConfig , allPlugins : SuperTokensPublicPlugin [ ] , sdkVersion : string ) => void ;
541538 dependencies ?: (
542539 config : SuperTokensPublicConfig ,
@@ -558,7 +555,6 @@ export type SuperTokensPlugin = {
558555 | PluginRouteHandler [ ] ;
559556
560557 config ?: ( config : SuperTokensPublicConfig ) => Omit < SuperTokensPublicConfig , "appInfo" > | undefined ;
561- exports ?: Record < string , any > ;
562558} ;
563559
564560export const nonPublicConfigProperties = [ "experimental" ] as const ;
0 commit comments