File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,15 @@ type ResponseString<T extends UfcResponseType> = string & {
174174 readonly __type : T ;
175175} ;
176176
177+ /**
178+ * A wrapper around a server response that includes the response, etag, and fetchedAt timestamp.
179+ */
180+ interface IConfigResponse < T extends UfcResponseType > {
181+ readonly response : ResponseString < T > ; // JSON-encoded server response
182+ readonly etag ?: string ; // Entity Tag - denotes a snapshot or version of the config.
183+ readonly fetchedAt ?: string ; // ISO timestamp for when this config was fetched
184+ }
185+
177186export function inflateResponse < T extends UfcResponseType > ( response : ResponseString < T > ) : T {
178187 return JSON . parse ( response ) as T ;
179188}
@@ -182,12 +191,6 @@ export function deflateResponse<T extends UfcResponseType>(value: T): ResponseSt
182191 return JSON . stringify ( value ) as ResponseString < T > ;
183192}
184193
185- interface IConfigResponse < T extends UfcResponseType > {
186- readonly response : ResponseString < T > ; // JSON-encoded server response
187- readonly etag ?: string ; // Entity Tag - denotes a snapshot or version of the config.
188- readonly fetchedAt ?: string ; // ISO timestamp for when this config was fetched
189- }
190-
191194export class ConfigurationWireV1 implements IConfigurationWire {
192195 public readonly version = 1 ;
193196
You can’t perform that action at this time.
0 commit comments