mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
chore: Add getAddresses
This commit is contained in:
67
lib/types.ts
67
lib/types.ts
@@ -165,6 +165,32 @@ export type ActionMetaData = {
|
|||||||
group?: string
|
group?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type AddressType = {
|
||||||
|
/** The title of this field to be dsimplayed */
|
||||||
|
name: string
|
||||||
|
/** Human readable description, used as tooltip usually */
|
||||||
|
description: string
|
||||||
|
/** URI location */
|
||||||
|
address: string
|
||||||
|
id: string
|
||||||
|
/** Defaults to false, but describes if this address can be opened in a browser as an
|
||||||
|
* ui interface
|
||||||
|
*/
|
||||||
|
ui?: boolean
|
||||||
|
/**
|
||||||
|
* The id is that a path will create a link in the ui that can go to specific pages, like
|
||||||
|
* admin, or settings, or something like that.
|
||||||
|
* Default = ''
|
||||||
|
*/
|
||||||
|
path?: string
|
||||||
|
/**
|
||||||
|
* This is the query params in the url, and is a map of key value pairs
|
||||||
|
* Default = {}
|
||||||
|
* if empty then will not be added to the url
|
||||||
|
*/
|
||||||
|
search?: Record<string, string>
|
||||||
|
}
|
||||||
|
|
||||||
/** Used to reach out from the pure js runtime */
|
/** Used to reach out from the pure js runtime */
|
||||||
export type Effects = {
|
export type Effects = {
|
||||||
/** Usable when not sandboxed */
|
/** Usable when not sandboxed */
|
||||||
@@ -350,33 +376,18 @@ export type Effects = {
|
|||||||
/** When we want to create a link in the front end interfaces, and example is
|
/** When we want to create a link in the front end interfaces, and example is
|
||||||
* exposing a url to view a web service
|
* exposing a url to view a web service
|
||||||
*/
|
*/
|
||||||
exportAddress(options: {
|
exportAddress(options: AddressType): Promise<string>
|
||||||
/** The title of this field to be dsimplayed */
|
|
||||||
name: string
|
|
||||||
/** Human readable description, used as tooltip usually */
|
|
||||||
description: string
|
|
||||||
/** URI location */
|
|
||||||
address: string
|
|
||||||
id: string
|
|
||||||
/** Defaults to false, but describes if this address can be opened in a browser as an
|
|
||||||
* ui interface
|
|
||||||
*/
|
|
||||||
ui?: boolean
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id is that a path will create a link in the ui that can go to specific pages, like
|
* There are times that we want to see the addresses that where exported
|
||||||
* admin, or settings, or something like that.
|
* @param options.addressId If we want to filter the address id
|
||||||
* Default = ''
|
*
|
||||||
*/
|
* Note: any auth should be filtered out already
|
||||||
path?: string
|
*/
|
||||||
|
getAddresses(options: {
|
||||||
/**
|
id?: PackageId
|
||||||
* This is the query params in the url, and is a map of key value pairs
|
addressId?: string
|
||||||
* Default = {}
|
}): Promise<AddressType>
|
||||||
* if empty then will not be added to the url
|
|
||||||
*/
|
|
||||||
search?: Record<string, string>
|
|
||||||
}): Promise<string>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*Remove an address that was exported. Used problably during main or during setConfig.
|
*Remove an address that was exported. Used problably during main or during setConfig.
|
||||||
@@ -441,9 +452,9 @@ export type Effects = {
|
|||||||
port: number
|
port: number
|
||||||
ssl: boolean
|
ssl: boolean
|
||||||
}
|
}
|
||||||
http: {
|
http?: {
|
||||||
// optional, will do TCP layer proxy only if not present
|
// optional, will do TCP layer proxy only if not present
|
||||||
headers: (headers: Record<string, string>) => Record<string, string>
|
headers?: (headers: Record<string, string>) => Record<string, string>
|
||||||
}
|
}
|
||||||
}): Promise<{ stop(): Promise<void> }>
|
}): Promise<{ stop(): Promise<void> }>
|
||||||
restart(): void
|
restart(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user