
* create Apps view * create more app components, generate types and messages * apps refactor, update snapshots * show error message in tooltip when app installation fail * update apps components and view, add apps list to storybook * update defaultMessages * create app details view * update AppListPage with Skeleton component * create app activate/deactivate dialogs, create app details stories * add AppHeader to AppDetailsPage * update defaultMessages * update AppDetails view and components after review * create custom app details view * refactor webhooks * update webhooks fixtures * update WebhookDetailsPage story * update strings * create CustomAppCreate view and components * update AppListPage story * create AppInstall view and page * handle errors in AppInstall view * update defaultMessages * add AppInstallPage to storybook * add status prop to MessageManager * update defaultMessages * remove service account section * remove service account routes * remove as operator from notify status * add notifications for app installations * update styles for deactivated app * update app installations with local storage * update defaultMessages * AppInstall update * dd delete button to ongoin installations table * fix active installations condition * fix error messages in AppsList * update defaultMessages * add iframe to AppDetailsPage * create AppDetailsSettingsPage * install macaw-ui * apps styles clean up * update schema, fixtures * few apps updates * WebhookCreate - fix onBack button name * WebhookCreatePage story update * rename apps table from external to thirdparty * update defaultMessages * fix test, update snapshots * AppDetailsSettings - add token to headers * fix first number in local apps query * app details settings - use shop domain host * add onSettingsRowClick to InstalledApps * resolve conflicts * update changelog and messages * add noopener noreferrer do app privacy link * update snapshots * update snapshots * updates after review * update defaultMessages * CustomAppDetails - add missing notify status
134 lines
3.2 KiB
TypeScript
134 lines
3.2 KiB
TypeScript
import {
|
|
AppTypeEnum,
|
|
JobStatusEnum,
|
|
PermissionEnum
|
|
} from "../types/globalTypes";
|
|
import { App_app } from "./types/App";
|
|
import { AppFetch_appFetchManifest_manifest } from "./types/AppFetch";
|
|
import { AppsInstallations_appsInstallations } from "./types/AppsInstallations";
|
|
import { AppsList_apps_edges } from "./types/AppsList";
|
|
|
|
export const appsList: AppsList_apps_edges[] = [
|
|
{
|
|
__typename: "AppCountableEdge",
|
|
node: {
|
|
__typename: "App",
|
|
id: "QXBwOjE3Ng==",
|
|
isActive: true,
|
|
name: "app",
|
|
type: AppTypeEnum.THIRDPARTY
|
|
}
|
|
},
|
|
{
|
|
__typename: "AppCountableEdge",
|
|
node: {
|
|
__typename: "App",
|
|
id: "QXBwOjE3Ng==",
|
|
isActive: false,
|
|
name: "app1",
|
|
type: AppTypeEnum.THIRDPARTY
|
|
}
|
|
}
|
|
];
|
|
|
|
export const customAppsList: AppsList_apps_edges[] = [
|
|
{
|
|
__typename: "AppCountableEdge",
|
|
node: {
|
|
__typename: "App",
|
|
id: "QXBwOjE3Ng==",
|
|
isActive: true,
|
|
name: "app custom",
|
|
type: AppTypeEnum.LOCAL
|
|
}
|
|
}
|
|
];
|
|
|
|
export const appsInProgress: AppsInstallations_appsInstallations[] = [
|
|
{
|
|
__typename: "AppInstallation",
|
|
appName: "app",
|
|
id: "QXBwSW5zdGFsbGF0aW9uOjk2",
|
|
manifestUrl: "http://localhost:3000/manifest",
|
|
message: "Failed to connect to app. Try later or contact with app support.",
|
|
status: JobStatusEnum.FAILED
|
|
},
|
|
{
|
|
__typename: "AppInstallation",
|
|
appName: "app pending",
|
|
id: "QXBwSW5zdGFsbGF0aW9uOjk2",
|
|
manifestUrl: "http://localhost:3000/manifest",
|
|
message: "Pending.",
|
|
status: JobStatusEnum.PENDING
|
|
},
|
|
{
|
|
__typename: "AppInstallation",
|
|
appName: "app success",
|
|
id: "QXBwSW5zdGFsbGF0aW9uOjk2",
|
|
manifestUrl: "http://localhost:3000/manifest",
|
|
message: "Success.",
|
|
status: JobStatusEnum.SUCCESS
|
|
}
|
|
];
|
|
|
|
export const appDetails: App_app = {
|
|
__typename: "App",
|
|
aboutApp: "Lorem ipsum",
|
|
accessToken: "token",
|
|
appUrl: "http://localhost:8888/app",
|
|
configurationUrl: "htpp://localhost:8888/configuration",
|
|
created: "2020-06-02T12:24:26.818138+00:00",
|
|
dataPrivacy: "Lorem ipsum",
|
|
dataPrivacyUrl: "http://localhost:8888/app-data-privacy",
|
|
homepageUrl: "http://localhost:8888/homepage",
|
|
id: "QXBwOjE4MQ==",
|
|
isActive: true,
|
|
metadata: [],
|
|
name: "app1",
|
|
permissions: [
|
|
{
|
|
__typename: "Permission",
|
|
code: PermissionEnum.MANAGE_ORDERS,
|
|
name: "Manage orders."
|
|
},
|
|
{
|
|
__typename: "Permission",
|
|
code: PermissionEnum.MANAGE_USERS,
|
|
name: "Manage customers."
|
|
}
|
|
],
|
|
privateMetadata: [],
|
|
supportUrl: "http://localhost:8888/support",
|
|
tokens: [],
|
|
type: AppTypeEnum.THIRDPARTY,
|
|
version: "1.0.0",
|
|
webhooks: []
|
|
};
|
|
|
|
export const installApp: AppFetch_appFetchManifest_manifest = {
|
|
__typename: "Manifest",
|
|
|
|
about: "Lorem ipsum",
|
|
appUrl: null,
|
|
configurationUrl: null,
|
|
dataPrivacy: null,
|
|
dataPrivacyUrl: null,
|
|
homepageUrl: null,
|
|
identifier: "app",
|
|
name: "app",
|
|
permissions: [
|
|
{
|
|
__typename: "Permission",
|
|
code: PermissionEnum.MANAGE_USERS,
|
|
name: "Manage users"
|
|
},
|
|
{
|
|
__typename: "Permission",
|
|
code: PermissionEnum.MANAGE_ORDERS,
|
|
name: "Manage orders"
|
|
}
|
|
],
|
|
supportUrl: null,
|
|
tokenTargetUrl: null,
|
|
version: "1.0"
|
|
};
|