mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-04 19:20:28 +09:00
Ref https://github.com/webstudio-is/webstudio/issues/3789 Here changed a few things - replace WebhookForm action prop with resource, which is sent with hidden field instead of instance id - prevented generating method and action in client side code - generate "action" resource instead of form properties for server action prop is replaced only inside cli to not require support in builder yet, in the future this can be part of client migrations
62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
declare module "__CONSTANTS__" {
|
|
import type { ImageLoader } from "@webstudio-is/image";
|
|
export const assetBaseUrl: string;
|
|
export const imageBaseUrl: string;
|
|
export const imageLoader: ImageLoader;
|
|
}
|
|
|
|
declare module "__CLIENT__" {
|
|
import type {
|
|
FontAsset,
|
|
ImageAsset,
|
|
ResourceRequest,
|
|
System,
|
|
} from "@webstudio-is/sdk";
|
|
|
|
export const siteName: string;
|
|
|
|
export const favIconAsset: ImageAsset | undefined;
|
|
|
|
// Font assets on current page (can be preloaded)
|
|
export const pageFontAssets: FontAsset[];
|
|
|
|
export const pageBackgroundImageAssets: ImageAsset[];
|
|
|
|
export const CustomCode: () => ReactNode;
|
|
|
|
export const Page: (props: { system: System }) => ReactNode;
|
|
}
|
|
|
|
declare module "__SERVER__" {
|
|
import type { PageMeta, System, ResourceRequest } from "@webstudio-is/sdk";
|
|
|
|
export const getResources: (props: { system: System }) => {
|
|
data: Map<string, ResourceRequest>;
|
|
action: Map<string, ResourceRequest>;
|
|
};
|
|
|
|
export const getPageMeta: (props: {
|
|
system: System;
|
|
resources: Record<string, any>;
|
|
}) => PageMeta;
|
|
|
|
type Params = Record<string, string | undefined>;
|
|
export const getRemixParams: ({ ...params }: Params) => Params;
|
|
|
|
export const projectId: string;
|
|
|
|
export const contactEmail: undefined | string;
|
|
}
|
|
|
|
declare module "__SITEMAP__" {
|
|
export const sitemap: Array<{
|
|
path: string;
|
|
lastModified: string;
|
|
}>;
|
|
}
|
|
|
|
declare module "__REDIRECT__" {
|
|
export const url: string;
|
|
export const status: number;
|
|
}
|