@supertokens-plugins/rownd-nodejs 0.3.0-beta.1 → 0.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,5 @@
1
- import * as SuperTokens from 'supertokens-node';
1
+ import * as supertokens_node from 'supertokens-node';
2
2
  import { JSONObject, SuperTokensPlugin } from 'supertokens-node/types';
3
- import { TypePasswordlessEmailDeliveryInput } from 'supertokens-node/recipe/passwordless/types';
4
- import { TypeEmailVerificationEmailDeliveryInput } from 'supertokens-node/recipe/emailverification/types';
5
3
 
6
4
  type RowndSignInMethod = {
7
5
  /**
@@ -662,12 +660,16 @@ interface RowndPluginConfig {
662
660
  rowndAppKey: string;
663
661
  rowndAppSecret: string;
664
662
  enableDebugLogs?: boolean;
665
- mobileDeepLinkBaseUrl?: string;
663
+ clientDomains?: RowndClientDomains;
666
664
  telemetry?: RowndTelemetryConfig;
667
665
  schema?: RowndSchema;
668
666
  appConfig?: RowndAppConfigInput;
669
667
  subBrands?: Record<string, RowndSubBrandConfigInput>;
670
668
  }
669
+ type RowndClientDomains = {
670
+ mobile?: string;
671
+ browser?: string;
672
+ } & Record<string, string>;
671
673
  type RowndTelemetryEvent = {
672
674
  outcome: "success";
673
675
  durationMs: number;
@@ -739,7 +741,7 @@ interface RowndPluginNormalisedConfig {
739
741
  rowndAppKey: string;
740
742
  rowndAppSecret: string;
741
743
  enableDebugLogs?: boolean;
742
- mobileDeepLinkBaseUrl?: string;
744
+ clientDomains?: RowndClientDomains;
743
745
  telemetry?: RowndTelemetryConfig;
744
746
  schema?: RowndSchema;
745
747
  appConfig?: RowndAppConfigInput;
@@ -794,6 +796,7 @@ type RowndSchema = Record<string, RowndSchemaField>;
794
796
  declare const init: (config: RowndPluginConfig) => SuperTokensPlugin;
795
797
 
796
798
  declare const PLUGIN_ID = "supertokens-plugin-rownd";
799
+ declare const PLUGIN_VERSION = "0.3.0";
797
800
  declare const PLUGIN_SDK_VERSION: string[];
798
801
  declare const HANDLE_BASE_PATH = "/plugin/rownd";
799
802
  declare const PUBLIC_TENANT_ID = "public";
@@ -809,6 +812,8 @@ declare const ROWND_JWT_CLAIMS: {
809
812
  readonly AuthLevel: "https://auth.rownd.io/auth_level";
810
813
  };
811
814
  declare const DEFAULT_ROWND_SCHEMA: RowndSchema;
815
+ declare const HUB_LOGIN_PAGE_PATH = "/account/login";
816
+ declare const HUB_VERIFY_EMAIL_PAGE_PATH = "/account/verify-email";
812
817
 
813
818
  declare const ROWND_PLUGIN_ERROR_MESSAGES: {
814
819
  readonly MISSING_AUTHORIZATION_HEADER: "Missing authorization header";
@@ -820,24 +825,11 @@ declare class RowndPluginError extends Error {
820
825
  constructor(type: RowndPluginErrorType);
821
826
  }
822
827
 
823
- type RowndEmailContentResult = {
824
- body: string;
825
- isHtml: boolean;
826
- subject: string;
827
- toEmail: string;
828
- };
829
- declare function getRowndPasswordlessEmailContent(input: TypePasswordlessEmailDeliveryInput & {
830
- userContext?: Record<string, unknown>;
831
- }, originalContent: RowndEmailContentResult): Promise<RowndEmailContentResult>;
832
- declare function getRowndEmailVerificationContent(input: TypeEmailVerificationEmailDeliveryInput & {
833
- userContext?: Record<string, unknown>;
834
- }, originalContent: RowndEmailContentResult): Promise<RowndEmailContentResult>;
835
-
836
828
  declare function setRowndClient(client: IRowndClient): void;
837
829
  declare function getRowndClient(): IRowndClient;
838
830
 
839
831
  declare const _default: {
840
- init: (config: RowndPluginConfig) => SuperTokens.SuperTokensPlugin;
832
+ init: (config: RowndPluginConfig) => supertokens_node.SuperTokensPlugin;
841
833
  };
842
834
 
843
- export { ANONYMOUS_AUTH_METHOD_ID, DEFAULT_ROWND_SCHEMA, GUEST_AUTH_METHOD_ID, HANDLE_BASE_PATH, type IRowndClient, type MigrationResponse, PLUGIN_ID, PLUGIN_SDK_VERSION, PUBLIC_TENANT_ID, ROWND_JWT_CLAIMS, ROWND_PLUGIN_ERROR_MESSAGES, type RowndAppConfigInput, type RowndAuthConfig, type RowndBranding, type RowndCustomContent, type RowndEmailContentResult, type RowndLegal, type RowndPluginConfig, RowndPluginError, type RowndPluginErrorType, type RowndPluginNormalisedConfig, type RowndProfileConfig, type RowndSchema, type RowndSchemaField, type RowndSignInMethod, type RowndSubBrandConfigInput, type RowndTelemetryClient, type RowndTelemetryConfig, type RowndTelemetryEvent, type RowndUser, type RowndUserMetadata, type SuperTokensUserImport, _default as default, getRowndClient, getRowndEmailVerificationContent, getRowndPasswordlessEmailContent, init, setRowndClient };
835
+ export { ANONYMOUS_AUTH_METHOD_ID, DEFAULT_ROWND_SCHEMA, GUEST_AUTH_METHOD_ID, HANDLE_BASE_PATH, HUB_LOGIN_PAGE_PATH, HUB_VERIFY_EMAIL_PAGE_PATH, type IRowndClient, type MigrationResponse, PLUGIN_ID, PLUGIN_SDK_VERSION, PLUGIN_VERSION, PUBLIC_TENANT_ID, ROWND_JWT_CLAIMS, ROWND_PLUGIN_ERROR_MESSAGES, type RowndAppConfigInput, type RowndAuthConfig, type RowndBranding, type RowndClientDomains, type RowndCustomContent, type RowndLegal, type RowndPluginConfig, RowndPluginError, type RowndPluginErrorType, type RowndPluginNormalisedConfig, type RowndProfileConfig, type RowndSchema, type RowndSchemaField, type RowndSignInMethod, type RowndSubBrandConfigInput, type RowndTelemetryClient, type RowndTelemetryConfig, type RowndTelemetryEvent, type RowndUser, type RowndUserMetadata, type SuperTokensUserImport, _default as default, getRowndClient, init, setRowndClient };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import * as SuperTokens from 'supertokens-node';
1
+ import * as supertokens_node from 'supertokens-node';
2
2
  import { JSONObject, SuperTokensPlugin } from 'supertokens-node/types';
3
- import { TypePasswordlessEmailDeliveryInput } from 'supertokens-node/recipe/passwordless/types';
4
- import { TypeEmailVerificationEmailDeliveryInput } from 'supertokens-node/recipe/emailverification/types';
5
3
 
6
4
  type RowndSignInMethod = {
7
5
  /**
@@ -662,12 +660,16 @@ interface RowndPluginConfig {
662
660
  rowndAppKey: string;
663
661
  rowndAppSecret: string;
664
662
  enableDebugLogs?: boolean;
665
- mobileDeepLinkBaseUrl?: string;
663
+ clientDomains?: RowndClientDomains;
666
664
  telemetry?: RowndTelemetryConfig;
667
665
  schema?: RowndSchema;
668
666
  appConfig?: RowndAppConfigInput;
669
667
  subBrands?: Record<string, RowndSubBrandConfigInput>;
670
668
  }
669
+ type RowndClientDomains = {
670
+ mobile?: string;
671
+ browser?: string;
672
+ } & Record<string, string>;
671
673
  type RowndTelemetryEvent = {
672
674
  outcome: "success";
673
675
  durationMs: number;
@@ -739,7 +741,7 @@ interface RowndPluginNormalisedConfig {
739
741
  rowndAppKey: string;
740
742
  rowndAppSecret: string;
741
743
  enableDebugLogs?: boolean;
742
- mobileDeepLinkBaseUrl?: string;
744
+ clientDomains?: RowndClientDomains;
743
745
  telemetry?: RowndTelemetryConfig;
744
746
  schema?: RowndSchema;
745
747
  appConfig?: RowndAppConfigInput;
@@ -794,6 +796,7 @@ type RowndSchema = Record<string, RowndSchemaField>;
794
796
  declare const init: (config: RowndPluginConfig) => SuperTokensPlugin;
795
797
 
796
798
  declare const PLUGIN_ID = "supertokens-plugin-rownd";
799
+ declare const PLUGIN_VERSION = "0.3.0";
797
800
  declare const PLUGIN_SDK_VERSION: string[];
798
801
  declare const HANDLE_BASE_PATH = "/plugin/rownd";
799
802
  declare const PUBLIC_TENANT_ID = "public";
@@ -809,6 +812,8 @@ declare const ROWND_JWT_CLAIMS: {
809
812
  readonly AuthLevel: "https://auth.rownd.io/auth_level";
810
813
  };
811
814
  declare const DEFAULT_ROWND_SCHEMA: RowndSchema;
815
+ declare const HUB_LOGIN_PAGE_PATH = "/account/login";
816
+ declare const HUB_VERIFY_EMAIL_PAGE_PATH = "/account/verify-email";
812
817
 
813
818
  declare const ROWND_PLUGIN_ERROR_MESSAGES: {
814
819
  readonly MISSING_AUTHORIZATION_HEADER: "Missing authorization header";
@@ -820,24 +825,11 @@ declare class RowndPluginError extends Error {
820
825
  constructor(type: RowndPluginErrorType);
821
826
  }
822
827
 
823
- type RowndEmailContentResult = {
824
- body: string;
825
- isHtml: boolean;
826
- subject: string;
827
- toEmail: string;
828
- };
829
- declare function getRowndPasswordlessEmailContent(input: TypePasswordlessEmailDeliveryInput & {
830
- userContext?: Record<string, unknown>;
831
- }, originalContent: RowndEmailContentResult): Promise<RowndEmailContentResult>;
832
- declare function getRowndEmailVerificationContent(input: TypeEmailVerificationEmailDeliveryInput & {
833
- userContext?: Record<string, unknown>;
834
- }, originalContent: RowndEmailContentResult): Promise<RowndEmailContentResult>;
835
-
836
828
  declare function setRowndClient(client: IRowndClient): void;
837
829
  declare function getRowndClient(): IRowndClient;
838
830
 
839
831
  declare const _default: {
840
- init: (config: RowndPluginConfig) => SuperTokens.SuperTokensPlugin;
832
+ init: (config: RowndPluginConfig) => supertokens_node.SuperTokensPlugin;
841
833
  };
842
834
 
843
- export { ANONYMOUS_AUTH_METHOD_ID, DEFAULT_ROWND_SCHEMA, GUEST_AUTH_METHOD_ID, HANDLE_BASE_PATH, type IRowndClient, type MigrationResponse, PLUGIN_ID, PLUGIN_SDK_VERSION, PUBLIC_TENANT_ID, ROWND_JWT_CLAIMS, ROWND_PLUGIN_ERROR_MESSAGES, type RowndAppConfigInput, type RowndAuthConfig, type RowndBranding, type RowndCustomContent, type RowndEmailContentResult, type RowndLegal, type RowndPluginConfig, RowndPluginError, type RowndPluginErrorType, type RowndPluginNormalisedConfig, type RowndProfileConfig, type RowndSchema, type RowndSchemaField, type RowndSignInMethod, type RowndSubBrandConfigInput, type RowndTelemetryClient, type RowndTelemetryConfig, type RowndTelemetryEvent, type RowndUser, type RowndUserMetadata, type SuperTokensUserImport, _default as default, getRowndClient, getRowndEmailVerificationContent, getRowndPasswordlessEmailContent, init, setRowndClient };
835
+ export { ANONYMOUS_AUTH_METHOD_ID, DEFAULT_ROWND_SCHEMA, GUEST_AUTH_METHOD_ID, HANDLE_BASE_PATH, HUB_LOGIN_PAGE_PATH, HUB_VERIFY_EMAIL_PAGE_PATH, type IRowndClient, type MigrationResponse, PLUGIN_ID, PLUGIN_SDK_VERSION, PLUGIN_VERSION, PUBLIC_TENANT_ID, ROWND_JWT_CLAIMS, ROWND_PLUGIN_ERROR_MESSAGES, type RowndAppConfigInput, type RowndAuthConfig, type RowndBranding, type RowndClientDomains, type RowndCustomContent, type RowndLegal, type RowndPluginConfig, RowndPluginError, type RowndPluginErrorType, type RowndPluginNormalisedConfig, type RowndProfileConfig, type RowndSchema, type RowndSchemaField, type RowndSignInMethod, type RowndSubBrandConfigInput, type RowndTelemetryClient, type RowndTelemetryConfig, type RowndTelemetryEvent, type RowndUser, type RowndUserMetadata, type SuperTokensUserImport, _default as default, getRowndClient, init, setRowndClient };