@dynamic-labs/message-transport 2.0.0-alpha.31 → 2.0.0

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/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ ## [2.0.0-alpha.32](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-04-15)
3
+
2
4
  ## [2.0.0-alpha.31](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-04-11)
3
5
 
4
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/message-transport",
3
- "version": "2.0.0-alpha.31",
3
+ "version": "2.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,8 +26,8 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "peerDependencies": {
29
- "@dynamic-labs/sdk-react-core": "2.0.0-alpha.31",
30
- "@dynamic-labs/types": "2.0.0-alpha.31",
29
+ "@dynamic-labs/sdk-react-core": "2.0.0",
30
+ "@dynamic-labs/types": "2.0.0",
31
31
  "eventemitter3": "5.0.1"
32
32
  }
33
33
  }
package/src/index.d.ts CHANGED
@@ -3,4 +3,4 @@ export { createRequestChannel, type RequestChannel } from './requestChannel';
3
3
  export { parseMessageTransportData } from './utils/parseMessageTransportData';
4
4
  export { createEventEmitterForMessages, createStore, createStoreSetter, type MessagesForEventEmitter, } from './store';
5
5
  export type { Store, StoreKeys, StoreSetter, StoreStateEvents, StoreStateGetters, } from './store/types';
6
- export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type SdkModuleMessages, type SdkModuleState, type WalletsModuleState, } from './messageTypes';
6
+ export { sdkHasLoadedEventName, type AuthModuleMessages, type AuthModuleState, type ClientManifest, type OtpExtensionMessages, type SdkModuleMessages, type SdkModuleState, type WalletsModuleState, } from './messageTypes';
@@ -0,0 +1,17 @@
1
+ import { OtpDestination, PhoneData } from '@dynamic-labs/sdk-react-core';
2
+ type OtpData = {
3
+ destination: Extract<OtpDestination, 'email'>;
4
+ target: string;
5
+ } | {
6
+ destination: Extract<OtpDestination, 'sms'>;
7
+ target: PhoneData;
8
+ };
9
+ export type OtpExtensionMessages = {
10
+ /** Request to send an OTP to a destination for verification */
11
+ sendOTP: (data: OtpData) => Promise<void>;
12
+ /** Performs verification for the latest send OTP */
13
+ verifyOTP: (token: string) => Promise<void>;
14
+ /** Re-sends the OTP for verification */
15
+ resendOTP: () => Promise<void>;
16
+ };
17
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from './AuthModuleMessages';
2
+ export * from './OtpExtensionMessages';
2
3
  export * from './SdkModuleMessages';
3
4
  export * from './WalletsModuleMessages';