Skip to content

Commit

Permalink
test(schemas): update schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Jan 20, 2025
1 parent a76e85d commit ff26688
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 37 deletions.
89 changes: 53 additions & 36 deletions src/types/schemas/actions.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,6 @@ export interface BridgeNodeMetrics {
metrics?: BridgeMetrics
}

export interface BridgeMqttPublisherPutBridgeV2 {
local_topic?: string
parameters: BridgeMqttPublisherActionParameters
enable?: boolean
connector: string
tags?: string[]
description?: string
resource_opts?: BridgeMqttPublisherActionResourceOpts
}

export type BridgeMqttPublisherPostBridgeV2Type =
typeof BridgeMqttPublisherPostBridgeV2Type[keyof typeof BridgeMqttPublisherPostBridgeV2Type]

Expand All @@ -356,18 +346,6 @@ export const BridgeMqttPublisherPostBridgeV2Type = {
mqtt: 'mqtt',
} as const

export interface BridgeMqttPublisherPostBridgeV2 {
type: BridgeMqttPublisherPostBridgeV2Type
name: string
local_topic?: string
parameters: BridgeMqttPublisherActionParameters
enable?: boolean
connector: string
tags?: string[]
description?: string
resource_opts?: BridgeMqttPublisherActionResourceOpts
}

export type BridgeMqttPublisherGetBridgeV2Status =
typeof BridgeMqttPublisherGetBridgeV2Status[keyof typeof BridgeMqttPublisherGetBridgeV2Status]

Expand Down Expand Up @@ -433,13 +411,26 @@ export interface BridgeMqttPublisherActionParameters {
payload?: string
}

export interface BridgeHttpPutBridgeV2 {
export interface BridgeMqttPublisherPutBridgeV2 {
local_topic?: string
parameters: BridgeMqttPublisherActionParameters
enable?: boolean
connector: string
tags?: string[]
description?: string
parameters: BridgeHttpParametersOpts
resource_opts?: BridgeHttpActionResourceOpts
resource_opts?: BridgeMqttPublisherActionResourceOpts
}

export interface BridgeMqttPublisherPostBridgeV2 {
type: BridgeMqttPublisherPostBridgeV2Type
name: string
local_topic?: string
parameters: BridgeMqttPublisherActionParameters
enable?: boolean
connector: string
tags?: string[]
description?: string
resource_opts?: BridgeMqttPublisherActionResourceOpts
}

export type BridgeHttpPostBridgeV2Type =
Expand All @@ -450,17 +441,6 @@ export const BridgeHttpPostBridgeV2Type = {
http: 'http',
} as const

export interface BridgeHttpPostBridgeV2 {
type: BridgeHttpPostBridgeV2Type
name: string
enable?: boolean
connector: string
tags?: string[]
description?: string
parameters: BridgeHttpParametersOpts
resource_opts?: BridgeHttpActionResourceOpts
}

export type BridgeHttpParametersOptsHeaders = { [key: string]: any }

export type BridgeHttpParametersOptsMethod =
Expand All @@ -484,6 +464,26 @@ export interface BridgeHttpParametersOpts {
request_timeout?: string
}

export interface BridgeHttpPutBridgeV2 {
enable?: boolean
connector: string
tags?: string[]
description?: string
parameters: BridgeHttpParametersOpts
resource_opts?: BridgeHttpActionResourceOpts
}

export interface BridgeHttpPostBridgeV2 {
type: BridgeHttpPostBridgeV2Type
name: string
enable?: boolean
connector: string
tags?: string[]
description?: string
parameters: BridgeHttpParametersOpts
resource_opts?: BridgeHttpActionResourceOpts
}

export type BridgeHttpGetBridgeV2Type =
typeof BridgeHttpGetBridgeV2Type[keyof typeof BridgeHttpGetBridgeV2Type]

Expand Down Expand Up @@ -536,3 +536,20 @@ export interface BridgeHttpActionResourceOpts {
inflight_window?: number
max_buffer_bytes?: string
}

export interface ActionsAndSourcesResponseNodeStatus {
node?: string
status?: string
status_reason?: string
}

export interface ActionsAndSourcesResponseSummary {
enabled?: boolean
name?: string
type?: string
last_modified_at?: number
node_status?: ActionsAndSourcesResponseNodeStatus[]
rules?: string[]
status?: string
status_reason?: string
}
6 changes: 6 additions & 0 deletions src/types/schemas/authorization.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,8 @@ export interface AuthzMongoSingle {
enable?: boolean
collection: string
filter?: AuthzMongoSingleFilter
limit?: number
skip?: number
mongo_type: AuthzMongoSingleMongoType
server: string
w_mode?: AuthzMongoSingleWMode
Expand Down Expand Up @@ -974,6 +976,8 @@ export interface AuthzMongoSharded {
enable?: boolean
collection: string
filter?: AuthzMongoShardedFilter
limit?: number
skip?: number
mongo_type: AuthzMongoShardedMongoType
servers: string
w_mode?: AuthzMongoShardedWMode
Expand Down Expand Up @@ -1035,6 +1039,8 @@ export interface AuthzMongoRs {
enable?: boolean
collection: string
filter?: AuthzMongoRsFilter
limit?: number
skip?: number
mongo_type: AuthzMongoRsMongoType
servers: string
w_mode?: AuthzMongoRsWMode
Expand Down
2 changes: 1 addition & 1 deletion src/types/schemas/gateways.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ export type EmqxGatewayApiGatewayNodeStatusNode =

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const EmqxGatewayApiGatewayNodeStatusNode = {
'emqx@127001': 'emqx@127.0.0.1',
'emqx@1721702': 'emqx@172.17.0.2',
} as const

export interface EmqxGatewayApiGatewayNodeStatus {
Expand Down
1 change: 1 addition & 0 deletions src/types/schemas/retainer.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export interface RetainerRetainer {
max_payload_size?: string
stop_publish_clear_msg?: boolean
delivery_rate?: string
max_publish_rate?: string
backend?: RetainerMnesiaConfig
}

Expand Down
17 changes: 17 additions & 0 deletions src/types/schemas/sources.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,20 @@ export interface BridgeMqttPublisherGetSource {
description?: string
resource_opts?: BridgeMqttPublisherSourceResourceOpts
}

export interface ActionsAndSourcesResponseNodeStatus {
node?: string
status?: string
status_reason?: string
}

export interface ActionsAndSourcesResponseSummary {
enabled?: boolean
name?: string
type?: string
last_modified_at?: number
node_status?: ActionsAndSourcesResponseNodeStatus[]
rules?: string[]
status?: string
status_reason?: string
}

0 comments on commit ff26688

Please sign in to comment.