Skip to content

Commit

Permalink
Update contract types for API v7
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
myarmolinsky committed Sep 16, 2024
1 parent eb4ce1d commit aaf97a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/release/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion lib/release/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
Expand Down

0 comments on commit aaf97a5

Please sign in to comment.