Skip to content

Commit 76c670b

Browse files
committed
Add all known fields to inference
1 parent b3a5577 commit 76c670b

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

packages/optimizely-cms-sdk/src/infer.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,26 @@ export type Prettify<T> = {
3737
export type InferredUrl = {
3838
type: string | null;
3939
default: string | null;
40+
hierarchical: string | null;
41+
internal: string | null;
42+
graph: string | null;
43+
base: string | null;
44+
};
45+
46+
type InferredMetadata = {
47+
key: string;
48+
locale: string;
49+
fallbackForLocale: string;
50+
version: string;
51+
displayName: string;
52+
url: InferredUrl;
53+
types: string[];
54+
published: string;
55+
status: string;
56+
created: string;
57+
lastModified: string;
58+
sortOrder: number;
59+
variation: string;
4060
};
4161

4262
type InferredRichText = {
@@ -65,9 +85,13 @@ export type InferFromProperty<T extends AnyProperty> =
6585

6686
/** Attributes included in the response from Graph in every content type */
6787
export type InferredBase = {
68-
_metadata: {
69-
url: InferredUrl;
70-
};
88+
_deleted: boolean;
89+
_fulltext: string[];
90+
_modified: string;
91+
_score: number;
92+
_id: string;
93+
_track: string;
94+
_metadata: InferredMetadata;
7195
__typename: string;
7296
__context?: { edit: boolean; preview_token: string };
7397
};

0 commit comments

Comments
 (0)