File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ export interface SyncResult {
4646 total_count : number ;
4747}
4848
49+ interface ReleasePreview {
50+ release_id : string ;
51+ preview_timestamp : string ;
52+ }
53+
4954// Contentstack Config
5055export interface Config {
5156 api_key : string ;
@@ -56,7 +61,8 @@ export interface Config {
5661 live_preview ?: LivePreview ;
5762 plugins ?: ContentstackPlugin [ ] ;
5863 fetchOptions ?: FetchOptions ;
59- early_access ?: string [ ]
64+ early_access ?: string [ ] ;
65+ release_preview ?: ReleasePreview ;
6066}
6167// Stack Config
6268export interface StackConfig {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export default class Stack {
6969 }
7070 } ;
7171 this . config = JSON . parse ( JSON . stringify ( config ) ) ;
72- this . plugins = [ ]
72+ this . plugins = [ ] ;
7373
7474 if ( stack_arguments [ 0 ] . live_preview && stack_arguments [ 0 ] . live_preview . enable === true && stack_arguments [ 0 ] . live_preview . management_token !== null ) {
7575 if ( stack_arguments [ 0 ] . live_preview . management_token ) {
@@ -118,6 +118,10 @@ export default class Stack {
118118 if ( typeof stack_arguments [ 0 ] . early_access == "object" && Array . isArray ( stack_arguments [ 0 ] . early_access ) && stack_arguments [ 0 ] . early_access . length > 0 ) {
119119 this . headers [ 'x-header-ea' ] = stack_arguments [ 0 ] . early_access . join ( ',' )
120120 }
121+ if ( typeof stack_arguments [ 0 ] . release_preview == "object" && stack_arguments [ 0 ] . release_preview !== null && Object . keys ( stack_arguments [ 0 ] . release_preview ) . length > 0 ) {
122+ this . headers [ 'release_id' ] = stack_arguments [ 0 ] . release_preview . release_id ;
123+ this . headers [ 'preview_timestamp' ] = stack_arguments [ 0 ] . release_preview . preview_timestamp ;
124+ }
121125 this . environment = stack_arguments [ 0 ] . environment ;
122126 return this ;
123127 } else {
You can’t perform that action at this time.
0 commit comments