|
@@ -1,9 +1,6 @@
|
|
import {
|
|
import {
|
|
- UserEventSignIn,
|
|
|
|
SignInPayloadPB,
|
|
SignInPayloadPB,
|
|
- UserEventGetUserProfile,
|
|
|
|
- UserEventGetUserSetting,
|
|
|
|
-} from '../../../services/backend/events/flowy-user/index';
|
|
|
|
|
|
+} from '../../../services/backend/models/flowy-user/index';
|
|
import { nanoid } from 'nanoid';
|
|
import { nanoid } from 'nanoid';
|
|
import { UserNotificationListener } from '../user/application/notifications';
|
|
import { UserNotificationListener } from '../user/application/notifications';
|
|
import {
|
|
import {
|
|
@@ -11,14 +8,13 @@ import {
|
|
CreateAppPayloadPB,
|
|
CreateAppPayloadPB,
|
|
CreateWorkspacePayloadPB,
|
|
CreateWorkspacePayloadPB,
|
|
FolderEventCreateApp,
|
|
FolderEventCreateApp,
|
|
- FolderEventCreateView,
|
|
|
|
FolderEventCreateWorkspace,
|
|
FolderEventCreateWorkspace,
|
|
FolderEventOpenWorkspace,
|
|
FolderEventOpenWorkspace,
|
|
- FolderEventReadCurrentWorkspace,
|
|
|
|
WorkspaceIdPB,
|
|
WorkspaceIdPB,
|
|
} from '../../../services/backend/events/flowy-folder';
|
|
} from '../../../services/backend/events/flowy-folder';
|
|
import { useEffect, useState } from 'react';
|
|
import { useEffect, useState } from 'react';
|
|
-import * as dependency_1 from '../../../services/backend/classes/flowy-folder/app';
|
|
|
|
|
|
+import * as dependency_1 from '../../../services/backend/models/flowy-folder/app';
|
|
|
|
+import { UserEventGetUserSetting, UserEventSignIn } from '../../../services/backend/events/flowy-user';
|
|
|
|
|
|
const TestApiButton = () => {
|
|
const TestApiButton = () => {
|
|
const [workspaceId, setWorkspaceId] = useState('');
|
|
const [workspaceId, setWorkspaceId] = useState('');
|
|
@@ -59,14 +55,14 @@ const TestApiButton = () => {
|
|
}, [workspaceId]);
|
|
}, [workspaceId]);
|
|
|
|
|
|
async function sendSignInEvent() {
|
|
async function sendSignInEvent() {
|
|
- let make_payload = () =>
|
|
|
|
|
|
+ const make_payload = () =>
|
|
SignInPayloadPB.fromObject({
|
|
SignInPayloadPB.fromObject({
|
|
email: nanoid(4) + '@gmail.com',
|
|
email: nanoid(4) + '@gmail.com',
|
|
password: 'A!@123abc',
|
|
password: 'A!@123abc',
|
|
name: 'abc',
|
|
name: 'abc',
|
|
});
|
|
});
|
|
|
|
|
|
- let listener = new UserNotificationListener({
|
|
|
|
|
|
+ const listener = new UserNotificationListener({
|
|
onUserSignIn: (userProfile) => {
|
|
onUserSignIn: (userProfile) => {
|
|
console.log(userProfile);
|
|
console.log(userProfile);
|
|
},
|
|
},
|