@open-wa/wa-automate-types-only 4.27.5 → 4.27.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/Client.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
2
2
|
import { PREPROCESSORS } from '../../structures/preProcessors';
|
3
|
+
import { ConfigLogTransport } from '../../utils/logging';
|
3
4
|
import { Base64 } from "./aliases";
|
4
5
|
import { SimpleListener } from './events';
|
5
6
|
/**
|
@@ -737,6 +738,16 @@ export interface ConfigObject {
|
|
737
738
|
* Automatically kill the process after a set amount of qr codes
|
738
739
|
*/
|
739
740
|
qrMax?: number;
|
741
|
+
/**
|
742
|
+
* Expose a URL where you can easily scan the qr code
|
743
|
+
*/
|
744
|
+
ezqr?: boolean;
|
745
|
+
/**
|
746
|
+
* An array of [winston](https://github.com/winstonjs/winston/blob/master/docs/transports.md#additional-transports) logging transport configurations.
|
747
|
+
*
|
748
|
+
* [Check this discussion to see how to set up logging](https://github.com/open-wa/wa-automate-nodejs/discussions/2373)
|
749
|
+
*/
|
750
|
+
logging?: ConfigLogTransport[];
|
740
751
|
/**@internal */
|
741
752
|
[x: string]: any;
|
742
753
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import TransportStream from 'winston-transport';
|
2
|
+
export declare class LogToEvTransport extends TransportStream {
|
3
|
+
constructor(opts?: any);
|
4
|
+
log(info: any, callback: any): any;
|
5
|
+
}
|
6
|
+
export declare class NoOpTransport extends TransportStream {
|
7
|
+
constructor(opts?: any);
|
8
|
+
log(info: any, callback: any): any;
|
9
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as winston from 'winston';
|
2
|
+
/**
|
3
|
+
* You can access the log in your code and add your own custom transports
|
4
|
+
*/
|
5
|
+
export declare const log: winston.Logger;
|
6
|
+
export declare const addRotateFileLogTransport: (options?: any) => void;
|
7
|
+
export declare type ConfigLogTransport = {
|
8
|
+
/**
|
9
|
+
* The type of winston transport. At the moment only file, console, ev and syslog are supported.
|
10
|
+
*/
|
11
|
+
type: 'syslog' | 'console' | 'file' | 'ev';
|
12
|
+
/**
|
13
|
+
* The options for the transport. Generally only required for syslog but you can use this to override default options for other types of transports.
|
14
|
+
*/
|
15
|
+
options?: any;
|
16
|
+
done?: boolean;
|
17
|
+
};
|
18
|
+
export declare const setupLogging: (logging: ConfigLogTransport[], sessionId?: string) => ConfigLogTransport[];
|