diff --git a/lib/release/api.ts b/lib/release/api.ts index e6d796f..f79e217 100644 --- a/lib/release/api.ts +++ b/lib/release/api.ts @@ -67,8 +67,8 @@ export interface Request { */ semver?: string; - /** 'balena.yml' contract contents (stringified JSON) */ - contract?: string; + /** 'balena.yml' contract contents */ + contract?: models.JsonType; } export interface Response { diff --git a/lib/release/models.ts b/lib/release/models.ts index 0bc1de6..dddda1e 100644 --- a/lib/release/models.ts +++ b/lib/release/models.ts @@ -4,6 +4,12 @@ import * as errors from './errors'; // These interfaces declare all model attributes except relations. +interface AnyObject { + [index: string]: any; +} + +export type JsonType = AnyObject; + interface ServiceAttributesBase { service_name: string; } @@ -15,7 +21,7 @@ interface ReleaseAttributesBase { source: string; start_timestamp: Date; end_timestamp?: Date; - contract?: string; + contract?: JsonType; } // eslint-disable-next-line @typescript-eslint/no-empty-interface