mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
chore: Update the sdk to match the rust and vica verse
This commit is contained in:
4
core/startos/bindings/AddressInfo.ts
Normal file
4
core/startos/bindings/AddressInfo.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { BindOptions } from "./BindOptions";
|
||||
|
||||
export interface AddressInfo { username: string | null, hostId: string, bindOptions: BindOptions, suffix: string, }
|
||||
3
core/startos/bindings/AllowedStatuses.ts
Normal file
3
core/startos/bindings/AllowedStatuses.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type AllowedStatuses = "only-running" | "only-stopped" | "any" | "disabled";
|
||||
5
core/startos/bindings/BindOptions.ts
Normal file
5
core/startos/bindings/BindOptions.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AddSslOptions } from "./AddSslOptions";
|
||||
import type { BindOptionsSecure } from "./BindOptionsSecure";
|
||||
|
||||
export interface BindOptions { scheme: string | null, preferredExternalPort: number, addSsl: AddSslOptions | null, secure: BindOptionsSecure | null, }
|
||||
3
core/startos/bindings/BindOptionsSecure.ts
Normal file
3
core/startos/bindings/BindOptionsSecure.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface BindOptionsSecure { ssl: boolean, }
|
||||
@@ -1,5 +1,6 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AddSslOptions } from "./AddSslOptions";
|
||||
import type { BindKind } from "./BindKind";
|
||||
import type { BindOptionsSecure } from "./BindOptionsSecure";
|
||||
|
||||
export interface BindParams { kind: BindKind, id: string, internalPort: number, scheme: string, preferredExternalPort: number, addSsl: AddSslOptions | null, secure: boolean, ssl: boolean, }
|
||||
export interface BindParams { kind: BindKind, id: string, internalPort: number, scheme: string, preferredExternalPort: number, addSsl: AddSslOptions | null, secure: BindOptionsSecure | null, }
|
||||
4
core/startos/bindings/ExportActionParams.ts
Normal file
4
core/startos/bindings/ExportActionParams.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AllowedStatuses } from "./AllowedStatuses";
|
||||
|
||||
export interface ExportActionParams { name: string, description: string, id: string, input: {[key: string]: any}, allowedStatuses: AllowedStatuses, group: string | null, }
|
||||
5
core/startos/bindings/ExportServiceInterfaceParams.ts
Normal file
5
core/startos/bindings/ExportServiceInterfaceParams.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AddressInfo } from "./AddressInfo";
|
||||
import type { ServiceInterfaceType } from "./ServiceInterfaceType";
|
||||
|
||||
export interface ExportServiceInterfaceParams { id: string, name: string, description: string, hasPrimary: boolean, disabled: boolean, masked: boolean, addressInfo: AddressInfo, type: ServiceInterfaceType, }
|
||||
4
core/startos/bindings/GetPrimaryUrlParams.ts
Normal file
4
core/startos/bindings/GetPrimaryUrlParams.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Callback } from "./Callback";
|
||||
|
||||
export interface GetPrimaryUrlParams { packageId: string | null, serviceInterfaceId: string, callback: Callback, }
|
||||
3
core/startos/bindings/GetServicePortForwardParams.ts
Normal file
3
core/startos/bindings/GetServicePortForwardParams.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface GetServicePortForwardParams { packageId: string | null, internalPort: number, }
|
||||
4
core/startos/bindings/GetSystemSmtpParams.ts
Normal file
4
core/startos/bindings/GetSystemSmtpParams.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Callback } from "./Callback";
|
||||
|
||||
export interface GetSystemSmtpParams { callback: Callback, }
|
||||
4
core/startos/bindings/ListServiceInterfacesParams.ts
Normal file
4
core/startos/bindings/ListServiceInterfacesParams.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Callback } from "./Callback";
|
||||
|
||||
export interface ListServiceInterfacesParams { packageId: string | null, callback: Callback, }
|
||||
4
core/startos/bindings/MountParams.ts
Normal file
4
core/startos/bindings/MountParams.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MountTarget } from "./MountTarget";
|
||||
|
||||
export interface MountParams { location: string, target: MountTarget, }
|
||||
3
core/startos/bindings/MountTarget.ts
Normal file
3
core/startos/bindings/MountTarget.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface MountTarget { packageId: string, volumeId: string, path: string, readonly: boolean, }
|
||||
3
core/startos/bindings/RemoveActionParams.ts
Normal file
3
core/startos/bindings/RemoveActionParams.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface RemoveActionParams { id: string, }
|
||||
3
core/startos/bindings/RemoveAddressParams.ts
Normal file
3
core/startos/bindings/RemoveAddressParams.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface RemoveAddressParams { id: string, }
|
||||
3
core/startos/bindings/ReverseProxyBind.ts
Normal file
3
core/startos/bindings/ReverseProxyBind.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ReverseProxyBind { ip: string | null, port: number, ssl: boolean, }
|
||||
3
core/startos/bindings/ReverseProxyDestination.ts
Normal file
3
core/startos/bindings/ReverseProxyDestination.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ReverseProxyDestination { ip: string | null, port: number, ssl: boolean, }
|
||||
3
core/startos/bindings/ReverseProxyHttp.ts
Normal file
3
core/startos/bindings/ReverseProxyHttp.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ReverseProxyHttp { headers: null | {[key: string]: string}, }
|
||||
6
core/startos/bindings/ReverseProxyParams.ts
Normal file
6
core/startos/bindings/ReverseProxyParams.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReverseProxyBind } from "./ReverseProxyBind";
|
||||
import type { ReverseProxyDestination } from "./ReverseProxyDestination";
|
||||
import type { ReverseProxyHttp } from "./ReverseProxyHttp";
|
||||
|
||||
export interface ReverseProxyParams { bind: ReverseProxyBind, dst: ReverseProxyDestination, http: ReverseProxyHttp, }
|
||||
3
core/startos/bindings/ServiceInterfaceType.ts
Normal file
3
core/startos/bindings/ServiceInterfaceType.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ServiceInterfaceType = "ui" | "p2p" | "api";
|
||||
@@ -184,11 +184,48 @@ struct GetServicePortForwardParams {
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct BindOptionsSecure {
|
||||
ssl: bool,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct BindOptions {
|
||||
scheme: Option<String>,
|
||||
preferred_external_port: u32,
|
||||
add_ssl: Option<AddSslOptions>,
|
||||
secure: Option<BindOptionsSecure>,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct AddressInfo {
|
||||
username: Option<String>,
|
||||
host_id: String,
|
||||
bind_options: BindOptions,
|
||||
suffix: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
enum ServiceInterfaceType {
|
||||
Ui,
|
||||
P2p,
|
||||
Api,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct ExportServiceInterfaceParams {
|
||||
#[ts(type = "string | null")]
|
||||
package_id: Option<PackageId>,
|
||||
service_interface_id: String,
|
||||
callback: Callback,
|
||||
id: String,
|
||||
name: String,
|
||||
description: String,
|
||||
has_primary: bool,
|
||||
disabled: bool,
|
||||
masked: bool,
|
||||
address_info: AddressInfo,
|
||||
r#type: ServiceInterfaceType,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[ts(export)]
|
||||
@@ -277,8 +314,8 @@ struct ReverseProxyParams {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct MountTarget {
|
||||
#[ts(type = "string")]
|
||||
packageId: PackageId,
|
||||
volumeId: String,
|
||||
package_id: PackageId,
|
||||
volume_id: String,
|
||||
path: String,
|
||||
readonly: bool,
|
||||
}
|
||||
@@ -399,8 +436,7 @@ struct BindParams {
|
||||
scheme: String,
|
||||
preferred_external_port: u32,
|
||||
add_ssl: Option<AddSslOptions>,
|
||||
secure: bool,
|
||||
ssl: bool,
|
||||
secure: Option<BindOptionsSecure>,
|
||||
}
|
||||
async fn bind(_: AnyContext, BindParams { .. }: BindParams) -> Result<Value, Error> {
|
||||
todo!()
|
||||
|
||||
Reference in New Issue
Block a user