-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
73 lines (66 loc) · 1.49 KB
/
types.ts
File metadata and controls
73 lines (66 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Description: Type definitions for the Contentstack API
// PublishDetails object - Represents the details of publish functionality
export interface PublishDetails {
environment: string;
locale: string;
time: string;
user: string;
}
// File object - Represents a file in Contentstack
export interface File {
uid: string;
created_at: string;
updated_at: string;
created_by: string;
updated_by: string;
content_type: string;
file_size: string;
tags: string[];
filename: string;
url: string;
ACL: any[] | object;
is_dir: boolean;
parent_uid: string;
_version: number;
title: string;
_metadata?: object;
publish_details: PublishDetails;
$: any;
}
// Link object - Represents a hyperlink in Contentstack
export interface Link {
title: string;
href: string;
}
// Taxonomy object - Represents a taxonomy in Contentstack
export interface Taxonomy {
taxonomy_uid: string;
max_terms?: number;
mandatory: boolean;
non_localizable: boolean;
}
// Block object - Represents a modular block in Contentstack
export interface Block {
_version?: number;
_metadata: any;
$: any;
title?: string;
copy?: string;
image?: File | null;
layout?: ("image_left" | "image_right") | null;
}
export interface Blocks {
block: Block;
}
// Page object - Represents a page in Contentstack
export interface Page {
uid: string;
$: any;
_version?: number;
title: string;
url?: string;
description?: string;
image?: File | null;
rich_text?: string;
blocks?: Blocks[];
}