forked from nestjs/nest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix(@nestjs/microservices) extract external typings nestjs#594
- Loading branch information
1 parent
5cfb0bf
commit 3ad570e
Showing
19 changed files
with
796 additions
and
23 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/common/interfaces/external/cors-options.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
packages/common/interfaces/external/mqtt-options.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
/** | ||
* @see https://github.com/mqttjs/MQTT.js/ | ||
*/ | ||
export declare type QoS = 0 | 1 | 2; | ||
|
||
export interface MqttClientOptions extends ISecureClientOptions { | ||
port?: number; // port is made into a number subsequently | ||
host?: string; // host does NOT include port | ||
hostname?: string; | ||
path?: string; | ||
protocol?: 'wss' | 'ws' | 'mqtt' | 'mqtts' | 'tcp' | 'ssl' | 'wx' | 'wxs'; | ||
|
||
wsOptions?: { | ||
[x: string]: any; | ||
}; | ||
/** | ||
* 10 seconds, set to 0 to disable | ||
*/ | ||
keepalive?: number; | ||
/** | ||
* 'mqttjs_' + Math.random().toString(16).substr(2, 8) | ||
*/ | ||
clientId?: string; | ||
/** | ||
* 'MQTT' | ||
*/ | ||
protocolId?: string; | ||
/** | ||
* 4 | ||
*/ | ||
protocolVersion?: number; | ||
/** | ||
* true, set to false to receive QoS 1 and 2 messages while offline | ||
*/ | ||
clean?: boolean; | ||
/** | ||
* 1000 milliseconds, interval between two reconnections | ||
*/ | ||
reconnectPeriod?: number; | ||
/** | ||
* 30 * 1000 milliseconds, time to wait before a CONNACK is received | ||
*/ | ||
connectTimeout?: number; | ||
/** | ||
* the username required by your broker, if any | ||
*/ | ||
username?: string; | ||
/** | ||
* the password required by your broker, if any | ||
*/ | ||
password?: string; | ||
/** | ||
* a any for the incoming packets | ||
*/ | ||
incomingStore?: any; | ||
/** | ||
* a any for the outgoing packets | ||
*/ | ||
outgoingStore?: any; | ||
queueQoSZero?: boolean; | ||
reschedulePings?: boolean; | ||
servers?: Array<{ | ||
host: string; | ||
port: number; | ||
}>; | ||
/** | ||
* true, set to false to disable re-subscribe functionality | ||
*/ | ||
resubscribe?: boolean; | ||
/** | ||
* a message that will sent by the broker automatically when the client disconnect badly. | ||
*/ | ||
will?: { | ||
/** | ||
* the topic to publish | ||
*/ | ||
topic: string; | ||
/** | ||
* the message to publish | ||
*/ | ||
payload: string; | ||
/** | ||
* the QoS | ||
*/ | ||
qos: QoS; | ||
/** | ||
* the retain flag | ||
*/ | ||
retain: boolean; | ||
}; | ||
transformWsUrl?: ( | ||
url: string, | ||
options: any, | ||
client: any, | ||
) => string; | ||
} | ||
export interface ISecureClientOptions { | ||
/** | ||
* optional private keys in PEM format | ||
*/ | ||
key?: string | string[] | Buffer | Buffer[] | Object[]; | ||
/** | ||
* optional cert chains in PEM format | ||
*/ | ||
cert?: string | string[] | Buffer | Buffer[]; | ||
/** | ||
* Optionally override the trusted CA certificates in PEM format | ||
*/ | ||
ca?: string | string[] | Buffer | Buffer[]; | ||
rejectUnauthorized?: boolean; | ||
} | ||
export interface IClientPublishOptions { | ||
/** | ||
* the QoS | ||
*/ | ||
qos: QoS; | ||
/** | ||
* the retain flag | ||
*/ | ||
retain?: boolean; | ||
/** | ||
* whether or not mark a message as duplicate | ||
*/ | ||
dup?: boolean; | ||
} | ||
export interface IClientSubscribeOptions { | ||
/** | ||
* the QoS | ||
*/ | ||
qos: QoS; | ||
} | ||
export interface IClientReconnectOptions { | ||
/** | ||
* a any for the incoming packets | ||
*/ | ||
incomingStore?: any; | ||
/** | ||
* a any for the outgoing packets | ||
*/ | ||
outgoingStore?: any; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/common/interfaces/external/multer-options.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.