export const Channels = { 'design-system-testing': 'C02JA6UG886', 'design-system-team': 'GGGR7AXHP', 'leafygreen-ui-releases': 'C01CBLPFD35', } as const; export type ChangeType = 'major' | 'minor' | 'patch' | 'dependency'; export interface ReleaseBotOptions { channel: keyof typeof Channels; test: boolean; dry: boolean; verbose: boolean; } export interface ComponentUpdateObject { name: string; version: string; updates?: Array; } export interface SortedUpdates { major: Array; minor: Array; patch: Array; /** Components with only a dependency update patch */ dependency: Array; } export const isComponentUpdateObject = ( obj: any, ): obj is ComponentUpdateObject => typeof obj === 'object' && Object.prototype.hasOwnProperty.call(obj, 'name') && Object.prototype.hasOwnProperty.call(obj, 'version'); export const isValidUpdatesArray = ( arr: any, ): arr is Array => Array.isArray(arr) && arr.every(isComponentUpdateObject);