mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
Merge pull request #11 from Start9Labs/feat/more-iface
add hasPrimary and disabled to network interfaces
This commit is contained in:
18
lib/types.ts
18
lib/types.ts
@@ -2,6 +2,7 @@ export * as configTypes from "./config/configTypes"
|
||||
import { InputSpec } from "./config/configTypes"
|
||||
import { DependenciesReceipt } from "./config/setupConfig"
|
||||
import { PortOptions } from "./interfaces/Host"
|
||||
import { UrlString } from "./util/getNetworkInterface"
|
||||
|
||||
export type ExportedAction = (options: {
|
||||
effects: Effects
|
||||
@@ -143,7 +144,6 @@ export type SmtpValue = {
|
||||
from: string
|
||||
login: string
|
||||
password: string | null | undefined
|
||||
tls: boolean
|
||||
}
|
||||
|
||||
export type CommandType<A extends string> =
|
||||
@@ -185,12 +185,16 @@ export type NetworkInterface = {
|
||||
name: string
|
||||
/** Human readable description, used as tooltip usually */
|
||||
description: string
|
||||
/** Whether or not one address must be the primary address */
|
||||
hasPrimary: boolean
|
||||
/** Disabled interfaces do not serve, but they retain their metadata and addresses */
|
||||
disabled: boolean
|
||||
/** All URIs */
|
||||
addresses: Address[]
|
||||
/** Defaults to false, but describes if this address can be opened in a browser as an
|
||||
* ui interface
|
||||
*/
|
||||
ui?: boolean
|
||||
ui: boolean
|
||||
}
|
||||
// prettier-ignore
|
||||
export type ExposeAllServicePaths<Store, PreviousPath extends string = ""> =
|
||||
@@ -370,6 +374,16 @@ export type Effects = {
|
||||
callback: () => void
|
||||
}): Promise<NetworkInterface>
|
||||
|
||||
/**
|
||||
* The user sets the primary url for a interface
|
||||
* @param options
|
||||
*/
|
||||
getPrimaryUrl(options: {
|
||||
packageId?: PackageId
|
||||
interfaceId: InterfaceId
|
||||
callback: () => void
|
||||
}): Promise<UrlString | null>
|
||||
|
||||
/**
|
||||
* There are times that we want to see the addresses that where exported
|
||||
* @param options.addressId If we want to filter the address id
|
||||
|
||||
Reference in New Issue
Block a user