UNPKG

1.9 kBTypeScriptView Raw
1import type { BasicMetaSysProps, Link, MakeRequest, DefaultElements } from '../common-types';
2import type { ContentfulEnvironmentTemplateApi } from '../create-environment-template-api';
3import type { ContentTypeProps } from './content-type';
4import type { EditorInterfaceProps } from './editor-interface';
5export type Hint = {
6 operation: 'renameFieldId';
7 fieldId: string;
8 previousFieldId: string;
9};
10export interface EditorInterfaceTemplateProps extends Omit<EditorInterfaceProps, 'sys'> {
11 contentTypeTemplate: Link<'ContentTypeTemplate'>;
12}
13export interface ContentTypeTemplateProps extends Omit<ContentTypeProps, 'sys'> {
14 id: string;
15 basedOn?: {
16 space: Link<'Space'>;
17 environment: Link<'Environment'>;
18 contentType: Link<'ContentType'>;
19 };
20 hints?: Array<Hint>;
21}
22export type EnvironmentTemplateProps = {
23 sys: BasicMetaSysProps & {
24 version: number;
25 organization: Link<'Organization'>;
26 };
27 name: string;
28 description?: string;
29 versionName: string;
30 versionDescription?: string;
31 entities: {
32 contentTypeTemplates: Array<ContentTypeTemplateProps>;
33 editorInterfaceTemplates: Array<EditorInterfaceTemplateProps>;
34 };
35};
36export type CreateEnvironmentTemplateProps = Omit<EnvironmentTemplateProps, 'sys'>;
37export type EnvironmentTemplate = EnvironmentTemplateProps & DefaultElements<EnvironmentTemplateProps> & ContentfulEnvironmentTemplateApi;
38export declare function wrapEnvironmentTemplate(makeRequest: MakeRequest, data: EnvironmentTemplateProps, organizationId: string): EnvironmentTemplate;
39export declare const wrapEnvironmentTemplateCollection: (makeRequest: MakeRequest, data: import("../common-types").CursorPaginatedCollectionProp<EnvironmentTemplateProps>, organizationId: string) => import("../common-types").CursorPaginatedCollection<EnvironmentTemplate, EnvironmentTemplateProps>;