Skip to content

Commit d71937c

Browse files
Merge branch 'VC-311-changes-for-rest-preview-service' into fix/CS-43301-merge-live-preview
2 parents 6d7405a + 43fbdd5 commit d71937c

File tree

9 files changed

+941
-250
lines changed

9 files changed

+941
-250
lines changed

.github/workflows/sca-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
env:
1313
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1414
with:
15-
args: --all-projects --fail-on=all
15+
args: --all-projects --fail-on=all

config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const config = {
1313
},
1414
live_preview: {
1515
enable: false,
16-
host: 'api.contentstack.io'
16+
host: 'rest-preview.contentstack.com'
1717
}
1818
};
1919

index.d.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,21 @@ export interface ContentTypeCollection {
7272
count?: number
7373
}
7474

75-
export interface LivePreview {
76-
host: string
77-
management_token: string
75+
export type LivePreview = {
76+
host?: string
7877
enable: boolean
78+
} & (LivePreivewConfigWithManagementToken | LivePreviewConfigWithPreviewToken)
79+
80+
export interface LivePreivewConfigWithManagementToken {
81+
/**
82+
* @deprecated Please use `preview_token` instead to enable live preview.
83+
* The `management_token` will be removed in future releases.
84+
*/
85+
management_token: string;
86+
}
87+
88+
export interface LivePreviewConfigWithPreviewToken {
89+
preview_token: string;
7990
}
8091

8192
export interface LivePreviewQuery {

0 commit comments

Comments
 (0)