@open-wa/wa-automate-types-only 4.47.3 → 4.47.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -236,6 +236,12 @@ export declare class Client {
236
236
  * @returns Observable stream of call request objects
237
237
  */
238
238
  onIncomingCall(fn: (call: Call) => void): Promise<Listener | boolean>;
239
+ /**
240
+ * Listens to changes on call state
241
+ * @event
242
+ * @returns Observable stream of call objects
243
+ */
244
+ onCallState(fn: (call: Call) => void): Promise<Listener | boolean>;
239
245
  /**
240
246
  * Listens to label change events
241
247
  *
@@ -1,4 +1,18 @@
1
1
  import { ContactId } from "./aliases";
2
+ export declare enum CallState {
3
+ INCOMING_RING = "INCOMING_RING",
4
+ OUTGOING_RING = "OUTGOING_RING",
5
+ OUTGOING_CALLING = "OUTGOING_CALLING",
6
+ CONNECTING = "CONNECTING",
7
+ CONNECTION_LOST = "CONNECTION_LOST",
8
+ ACTIVE = "ACTIVE",
9
+ HANDLED_REMOTELY = "HANDLED_REMOTELY",
10
+ ENDED = "ENDED",
11
+ REJECTED = "REJECTED",
12
+ REMOTE_CALL_IN_PROGRESS = "REMOTE_CALL_IN_PROGRESS",
13
+ FAILED = "FAILED",
14
+ NOT_ANSWERED = "NOT_ANSWERED"
15
+ }
2
16
  export interface Call {
3
17
  /**
4
18
  * The id of the call
@@ -30,4 +44,8 @@ export interface Call {
30
44
  * The other participants on a group call
31
45
  */
32
46
  participants: ContactId[];
47
+ /**
48
+ * State of the call
49
+ */
50
+ State: CallState;
33
51
  }
@@ -38,6 +38,10 @@ export declare enum SimpleListener {
38
38
  * Represents [[onIncomingCall]]
39
39
  */
40
40
  IncomingCall = "onIncomingCall",
41
+ /**
42
+ * Represents [[onIncomingCall]]
43
+ */
44
+ CallState = "onCallState",
41
45
  /**
42
46
  * Represents [[onGlobalParticipantsChanged]]
43
47
  */
@@ -8,7 +8,7 @@ export declare type cliFlags = {
8
8
  };
9
9
  export declare const setupHttpServer: (cliConfig: cliFlags) => void;
10
10
  export declare const setUpExpressApp: () => void;
11
- export declare const enableCORSRequests: () => void;
11
+ export declare const enableCORSRequests: (cliConfig: cliFlags) => void;
12
12
  export declare const setupAuthenticationLayer: (cliConfig: cliFlags) => void;
13
13
  export declare const setupApiDocs: (cliConfig: cliFlags) => void;
14
14
  export declare const setupSwaggerStatsMiddleware: (cliConfig: cliFlags) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.47.3",
3
+ "version": "4.47.5",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",