import ShipengineAPIClient from '..'; import { DeploymentType } from '../../app-loader'; import { ConnectApp, PaginatedItems } from '../../types'; export default class Apps { private client; constructor(apiClient: ShipengineAPIClient); /** * Creates a new App. * @returns {Promise} Promise object that resolves to a ConnectApp object. */ create({ appId, name, type, }: { appId?: string; name: string; type: DeploymentType; }): Promise; /** * Updates an App. * @returns {Promise} Promise object that resolves to a ConnectApp object. */ update(appId: string, name: string, type: string): Promise; /** * Finds or creates a new app by name * @returns {Promise} Promise object that resolves to a ConnectApp object. */ findOrCreateApp({ appId, name, type, }: { appId?: string; name: string; type: DeploymentType; }): Promise; /** * Gets all Apps that belong to the given API key. * @returns {Promise>} Promise object that resolves to an Array of ConnectApp objects. */ getAll(): Promise>; /** * Get an App by its ID. * @returns {Promise} Promise object that resolves to a ConnectApp object. */ getById(id: string): Promise; /** * Get an App by its name. * @returns {Promise} Promise object that resolves to a ConnectApp object. */ getByName(name: string): Promise; /** * @description Returns an app, if an id is provided it will use that, if not it defaults to looking it up by name * @param name The name of the app (this is bad, we want it to eventually always be the id) * @param appId The appId found in the manifest of the package.json file */ getByIdOrName(name: string, appId?: string): Promise; }