import * as Heroku from '@heroku-cli/schema'; type DeepRequired = T extends object ? { [K in keyof T]-?: DeepRequired; } : T; /** * This is the base type for the property `addon` on an `AddOnAttachment` as described in the Platform API Reference. */ type AddonDescriptor = DeepRequired['addon']; /** * This is the modified type for the `addon` property when the request to Platform API includes the value `addon:plan` * in the `Accept-Inclusion` header. */ type AddonDescriptorWithPlanInclusion = AddonDescriptor & { plan: { id: string; name: string; }; }; /** * This is the modified type for the `AddOnAttachment` type when the request to Platform API includes the value * `config_vars` in the `Accept-Inclusion` header. */ type AddonAttachmentWithConfigVarsInclusion = DeepRequired & { config_vars: string[]; }; /** * This is the modified type for the `AddOnAttachment` we use on these lib functions because all requests made to * Platform API to get add-on attachments, either through the Add-on Attachment List endpoint or the * add-on attachment resolver action endpoint, include the header `Accept-Inclusion: addon:plan,config_vars`. */ export type ExtendedAddonAttachment = AddonAttachmentWithConfigVarsInclusion & { addon: AddonDescriptorWithPlanInclusion; }; /** * This is the modified type for the `AddOn` we use on these lib functions because all requests made to * Platform API to get add-ons, either through the Add-on List endpoint or the add-on resolver action endpoint, * include the header `Accept-Expansion: addon_service,plan`. */ export type ExtendedAddon = DeepRequired & { addon_service: DeepRequired; plan: DeepRequired; }; /** * The next two types need review and cleanup. They're not used anywhere in this codebase yet. */ export type AddOnWithRelatedData = AddonDescriptor & { attachment_names?: string[]; links?: Link[]; plan: DeepRequired; }; export type Link = { attachment_name?: string; created_at: string; message: string; name: string; remote?: Link; }; export {};