@daocloud-proto/kant
Advanced tools
Comparing version 0.1.0-alpha4 to 0.1.0-alpha5
@@ -10,3 +10,3 @@ /* eslint-disable */ | ||
export type ListBatchNodeRequest = { | ||
cluster?: string | ||
edgeunit?: string | ||
name?: string | ||
@@ -24,3 +24,3 @@ nodeNamePrefix?: string | ||
export type GetBatchNodeRequest = { | ||
cluster?: string | ||
edgeunit?: string | ||
name?: string | ||
@@ -30,3 +30,3 @@ } | ||
export type CreateBatchNodeRequest = { | ||
cluster?: string | ||
edgeunit?: string | ||
metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta | ||
@@ -37,3 +37,3 @@ spec?: BatchNodeSpec | ||
export type UpdateBatchNodeRequest = { | ||
cluster?: string | ||
edgeunit?: string | ||
name?: string | ||
@@ -40,0 +40,0 @@ metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta |
@@ -20,22 +20,22 @@ /* eslint-disable */ | ||
static List(req: KantIoApiBatchV1alpha1Batch.ListBatchNodeRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListCustomResourcesResponse> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.ListBatchNodeRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListCustomResourcesResponse>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.ListBatchNodeRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListCustomResourcesResponse>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes?${fm.renderURLSearchParams(req, ["edgeunit"])}`, {...initReq, method: "GET"}) | ||
} | ||
static Get(req: KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, initReq?: fm.InitReq): Promise<KantIoApiBatchV1alpha1Batch.BatchNode> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes/${req["name"]}?${fm.renderURLSearchParams(req, ["edgeunit", "name"])}`, {...initReq, method: "GET"}) | ||
} | ||
static Create(req: KantIoApiBatchV1alpha1Batch.CreateBatchNodeRequest, initReq?: fm.InitReq): Promise<KantIoApiBatchV1alpha1Batch.BatchNode> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.CreateBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes`, {...initReq, method: "POST", body: JSON.stringify(req)}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.CreateBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes`, {...initReq, method: "POST", body: JSON.stringify(req)}) | ||
} | ||
static Update(req: KantIoApiBatchV1alpha1Batch.UpdateBatchNodeRequest, initReq?: fm.InitReq): Promise<KantIoApiBatchV1alpha1Batch.BatchNode> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.UpdateBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.UpdateBatchNodeRequest, KantIoApiBatchV1alpha1Batch.BatchNode>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)}) | ||
} | ||
static Delete(req: KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, GoogleProtobufEmpty.Empty>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes/${req["name"]}`, {...initReq, method: "DELETE"}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, GoogleProtobufEmpty.Empty>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes/${req["name"]}`, {...initReq, method: "DELETE"}) | ||
} | ||
static DownloadCert(req: KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, GoogleApiHttpbody.HttpBody>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes/${req["name"]}/cert?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, GoogleApiHttpbody.HttpBody>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes/${req["name"]}/cert?${fm.renderURLSearchParams(req, ["edgeunit", "name"])}`, {...initReq, method: "GET"}) | ||
} | ||
static JoinHelp(req: KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, initReq?: fm.InitReq): Promise<KantIoApiBatchV1alpha1Batch.JoinHelpResponse> { | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, KantIoApiBatchV1alpha1Batch.JoinHelpResponse>(`/apis/batch.kant.io/v1alpha1/clusters/${req["cluster"]}/batch-nodes/${req["name"]}/join-help?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"}) | ||
return fm.fetchReq<KantIoApiBatchV1alpha1Batch.GetBatchNodeRequest, KantIoApiBatchV1alpha1Batch.JoinHelpResponse>(`/apis/batch.kant.io/v1alpha1/edgeunits/${req["edgeunit"]}/batch-nodes/${req["name"]}/join-help?${fm.renderURLSearchParams(req, ["edgeunit", "name"])}`, {...initReq, method: "GET"}) | ||
} | ||
} |
@@ -6,2 +6,4 @@ /* eslint-disable */ | ||
*/ | ||
import * as KpandaIoApiTypesObjectmeta from "../../kpanda.io/api/types/objectmeta.pb" | ||
export type Deployment = { | ||
@@ -36,4 +38,4 @@ metadata?: ObjectMeta | ||
status?: string | ||
lastUpdateTime?: Time | ||
lastTransitionTime?: Time | ||
lastUpdateTime?: string | ||
lastTransitionTime?: string | ||
reason?: string | ||
@@ -44,4 +46,4 @@ message?: string | ||
export type RollingUpdateDeployment = { | ||
maxUnavailable?: IntOrString | ||
maxSurge?: IntOrString | ||
maxUnavailable?: string | ||
maxSurge?: string | ||
} | ||
@@ -74,2 +76,3 @@ | ||
collisionCount?: number | ||
state?: KpandaIoApiTypesObjectmeta.WorkloadState | ||
} | ||
@@ -283,3 +286,3 @@ | ||
preemptionPolicy?: string | ||
overhead?: {[key: string]: Quantity} | ||
overhead?: {[key: string]: string} | ||
topologySpreadConstraints?: TopologySpreadConstraint[] | ||
@@ -373,3 +376,3 @@ setHostnameAsFQDN?: boolean | ||
medium?: string | ||
sizeLimit?: Quantity | ||
sizeLimit?: string | ||
} | ||
@@ -505,3 +508,3 @@ | ||
resource?: string | ||
divisor?: Quantity | ||
divisor?: string | ||
} | ||
@@ -528,3 +531,3 @@ | ||
export type ConfigMapVolumeSource = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
items?: KeyToPath[] | ||
@@ -588,3 +591,3 @@ defaultMode?: number | ||
export type ConfigMapProjection = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
items?: KeyToPath[] | ||
@@ -703,3 +706,2 @@ optional?: boolean | ||
export type Probe = { | ||
handler?: ProbeHandler | ||
initialDelaySeconds?: number | ||
@@ -711,2 +713,6 @@ timeoutSeconds?: number | ||
terminationGracePeriodSeconds?: string | ||
exec?: ExecAction | ||
httpGet?: HTTPGetAction | ||
tcpSocket?: TCPSocketAction | ||
grpc?: GRPCAction | ||
} | ||
@@ -727,3 +733,3 @@ | ||
export type TCPSocketAction = { | ||
port?: IntOrString | ||
port?: number | ||
host?: string | ||
@@ -734,3 +740,3 @@ } | ||
path?: string | ||
port?: IntOrString | ||
port?: number | ||
host?: string | ||
@@ -784,3 +790,3 @@ scheme?: string | ||
export type SecretKeySelector = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
key?: string | ||
@@ -791,3 +797,3 @@ optional?: boolean | ||
export type ConfigMapKeySelector = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
key?: string | ||
@@ -842,3 +848,3 @@ optional?: boolean | ||
export type SecretEnvSource = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
optional?: boolean | ||
@@ -848,3 +854,3 @@ } | ||
export type ConfigMapEnvSource = { | ||
localObjectReference?: LocalObjectReference | ||
name?: string | ||
optional?: boolean | ||
@@ -851,0 +857,0 @@ } |
@@ -6,12 +6,272 @@ /* eslint-disable */ | ||
*/ | ||
import * as KantIoApiCommonV1alpha1Objectmeta from "../../common/v1alpha1/objectmeta.pb" | ||
import * as GoogleProtobufAny from "../../google/protobuf/any.pb" | ||
export enum ProtocolConfigCommonCollectType { | ||
sync = "sync", | ||
async = "async", | ||
} | ||
export type ListClusterDeviceRequest = { | ||
cluster?: string | ||
page?: number | ||
pageSize?: number | ||
name?: string | ||
} | ||
export type ListDeviceRequest = { | ||
cluster?: string | ||
namespace?: string | ||
name?: string | ||
page?: number | ||
pageSize?: number | ||
name?: string | ||
} | ||
export type ListDeviceResponse = { | ||
export type GetDeviceRequest = { | ||
cluster?: string | ||
namespace?: string | ||
name?: string | ||
} | ||
export type CreateDeviceRequest = { | ||
cluster?: string | ||
namespace?: string | ||
metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta | ||
spec?: DeviceSpec | ||
} | ||
export type UpdateDeviceRequest = { | ||
cluster?: string | ||
namespace?: string | ||
name?: string | ||
metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta | ||
spec?: DeviceSpec | ||
} | ||
export type DeleteDeviceRequest = { | ||
cluster?: string | ||
namespace?: string | ||
name?: string | ||
} | ||
export type DeviceModel = { | ||
apiVersion?: string | ||
kind?: string | ||
metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta | ||
spec?: DeviceModelSpec | ||
} | ||
export type DeviceModelSpec = { | ||
properties?: DeviceProperty[] | ||
protocol?: string | ||
} | ||
export type DeviceProperty = { | ||
name?: string | ||
description?: string | ||
type?: PropertyType | ||
} | ||
export type PropertyType = { | ||
int?: PropertyTypeInt64 | ||
string?: PropertyTypeString | ||
double?: PropertyTypeDouble | ||
float?: PropertyTypeFloat | ||
boolean?: PropertyTypeBoolean | ||
bytes?: PropertyTypeBytes | ||
} | ||
export type PropertyTypeInt64 = { | ||
accessMode?: string | ||
defaultValue?: string | ||
minimum?: string | ||
maximum?: string | ||
unit?: string | ||
} | ||
export type PropertyTypeString = { | ||
accessMode?: string | ||
defaultValue?: string | ||
} | ||
export type PropertyTypeDouble = { | ||
accessMode?: string | ||
defaultValue?: number | ||
minimum?: number | ||
maximum?: number | ||
unit?: string | ||
} | ||
export type PropertyTypeFloat = { | ||
accessMode?: string | ||
defaultValue?: number | ||
minimum?: number | ||
maximum?: number | ||
unit?: string | ||
} | ||
export type PropertyTypeBoolean = { | ||
accessMode?: string | ||
defaultValue?: boolean | ||
} | ||
export type PropertyTypeBytes = { | ||
accessMode?: string | ||
} | ||
export type Device = { | ||
apiVersion?: string | ||
kind?: string | ||
metadata?: KantIoApiCommonV1alpha1Objectmeta.ObjectMeta | ||
spec?: DeviceSpec | ||
status?: DeviceStatus | ||
} | ||
export type DeviceSpec = { | ||
deviceModelReference?: string | ||
protocol?: ProtocolConfig | ||
nodeSelector?: DeviceNodeSelector | ||
propertyVisitors?: DevicePropertyVisitor[] | ||
properties?: DeviceProperty[] | ||
} | ||
export type ProtocolConfig = { | ||
opcua?: ProtocolConfigOpcUA | ||
modbus?: ProtocolConfigModbus | ||
bluetooth?: ProtocolConfigBluetooth | ||
common?: ProtocolConfigCommon | ||
customizedProtocol?: ProtocolConfigCustomized | ||
} | ||
export type ProtocolConfigOpcUA = { | ||
url?: string | ||
userName?: string | ||
password?: string | ||
securityPolicy?: string | ||
securityMode?: string | ||
certificate?: string | ||
privateKey?: string | ||
timeout?: string | ||
} | ||
export type ProtocolConfigModbus = { | ||
slaveID?: string | ||
} | ||
export type ProtocolConfigBluetooth = { | ||
macAddress?: string | ||
} | ||
export type ProtocolConfigCommon = { | ||
com?: ProtocolConfigCOM | ||
tcp?: ProtocolConfigTCP | ||
commType?: string | ||
reconnTimeout?: string | ||
reconnRetryTimes?: string | ||
collectTimeout?: string | ||
collectRetryTimes?: string | ||
collectType?: ProtocolConfigCommonCollectType | ||
customizedValues?: CustomizedValue | ||
} | ||
export type ProtocolConfigCOM = { | ||
serialPort?: string | ||
baudRate?: string | ||
dataBits?: string | ||
parity?: string | ||
stopBits?: string | ||
} | ||
export type ProtocolConfigTCP = { | ||
ip?: string | ||
port?: string | ||
} | ||
export type CustomizedValue = { | ||
data?: {[key: string]: GoogleProtobufAny.Any} | ||
} | ||
export type ProtocolConfigCustomized = { | ||
protocolName?: string | ||
configData?: CustomizedValue | ||
} | ||
export type DevicePropertyVisitor = { | ||
propertyName?: string | ||
reportCycle?: string | ||
collectCycle?: string | ||
customizedValues?: CustomizedValue | ||
opcua?: VisitorConfigOPCUA | ||
modbus?: VisitorConfigModbus | ||
bluetooth?: VisitorConfigBluetooth | ||
customizedProtocol?: VisitorConfigCustomized | ||
} | ||
export type VisitorConfigOPCUA = { | ||
nodeID?: string | ||
browseName?: string | ||
} | ||
export type VisitorConfigModbus = { | ||
register?: string | ||
offset?: string | ||
limit?: string | ||
scale?: number | ||
isSwap?: boolean | ||
isRegisterSwap?: boolean | ||
} | ||
export type VisitorConfigBluetooth = { | ||
characteristicUUID?: string | ||
dataWrite?: {[key: string]: Uint8Array} | ||
dataConverter?: BluetoothReadConverter | ||
} | ||
export type BluetoothReadConverter = { | ||
startIndex?: string | ||
endIndex?: string | ||
shiftLeft?: string | ||
shiftRight?: string | ||
orderOfOperations?: BluetoothOperations[] | ||
} | ||
export type BluetoothOperations = { | ||
operationType?: string | ||
operationValue?: number | ||
} | ||
export type VisitorConfigCustomized = { | ||
protocolName?: string | ||
configData?: CustomizedValue | ||
} | ||
export type DeviceStatus = { | ||
twins?: Twin[] | ||
state?: string | ||
} | ||
export type Twin = { | ||
propertyName?: string | ||
desired?: TwinProperty | ||
reported?: TwinProperty | ||
} | ||
export type TwinProperty = { | ||
value?: string | ||
metadata?: {[key: string]: string} | ||
} | ||
export type DeviceNodeSelector = { | ||
nodeSelectorTerms?: DeviceNodeSelectorTerm[] | ||
} | ||
export type DeviceNodeSelectorTerm = { | ||
matchExpressions?: DeviceNodeSelectorRequirement[] | ||
} | ||
export type DeviceNodeSelectorRequirement = { | ||
key?: string | ||
operator?: string | ||
values?: string[] | ||
} |
@@ -22,7 +22,2 @@ /* eslint-disable */ | ||
import * as KantIoApiCoreV1alpha1Workspaces from "./workspaces.pb" | ||
export class Device { | ||
static ListDevice(req: KantIoApiCoreV1alpha1Device.ListDeviceRequest, initReq?: fm.InitReq): Promise<KantIoApiCoreV1alpha1Device.ListDeviceResponse> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.ListDeviceRequest, KantIoApiCoreV1alpha1Device.ListDeviceResponse>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"}) | ||
} | ||
} | ||
export class Nodes { | ||
@@ -184,2 +179,22 @@ static ListNode(req: KpandaIoApiCoreV1alpha1Node.ListNodesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Node.ListNodesResponse> { | ||
} | ||
} | ||
export class Devices { | ||
static ListClusterDevices(req: KantIoApiCoreV1alpha1Device.ListClusterDeviceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListClusterCustomResourcesResponse> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.ListClusterDeviceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListClusterCustomResourcesResponse>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/devices?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"}) | ||
} | ||
static ListDevices(req: KantIoApiCoreV1alpha1Device.ListDeviceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListCustomResourcesResponse> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.ListDeviceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.ListCustomResourcesResponse>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"}) | ||
} | ||
static GetDevice(req: KantIoApiCoreV1alpha1Device.GetDeviceRequest, initReq?: fm.InitReq): Promise<KantIoApiCoreV1alpha1Device.Device> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.GetDeviceRequest, KantIoApiCoreV1alpha1Device.Device>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"}) | ||
} | ||
static CreateDevice(req: KantIoApiCoreV1alpha1Device.CreateDeviceRequest, initReq?: fm.InitReq): Promise<KantIoApiCoreV1alpha1Device.Device> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.CreateDeviceRequest, KantIoApiCoreV1alpha1Device.Device>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices`, {...initReq, method: "POST", body: JSON.stringify(req)}) | ||
} | ||
static UpdateDevice(req: KantIoApiCoreV1alpha1Device.UpdateDeviceRequest, initReq?: fm.InitReq): Promise<KantIoApiCoreV1alpha1Device.Device> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.UpdateDeviceRequest, KantIoApiCoreV1alpha1Device.Device>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)}) | ||
} | ||
static DeleteDevice(req: KantIoApiCoreV1alpha1Device.DeleteDeviceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> { | ||
return fm.fetchReq<KantIoApiCoreV1alpha1Device.DeleteDeviceRequest, GoogleProtobufEmpty.Empty>(`/apis/core.kant.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/devices/${req["name"]}`, {...initReq, method: "DELETE"}) | ||
} | ||
} |
{ | ||
"name":"@daocloud-proto/kant", | ||
"version":"0.1.0-alpha4", | ||
"version":"0.1.0-alpha5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
139086
4563