Skip to content

Commit

Permalink
feat(ts) TypeScript enum for VideoSIPGWConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
garyhuntddn authored Feb 25, 2022
1 parent 1935342 commit 74721c4
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 117 deletions.
63 changes: 0 additions & 63 deletions modules/videosipgw/VideoSIPGWConstants.js

This file was deleted.

73 changes: 73 additions & 0 deletions modules/videosipgw/VideoSIPGWConstants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
export enum VideoSIPGWStatusConstants {
/**
* Status that video SIP GW service is available.
*/
STATUS_AVAILABLE = 'available',

/**
* Status that video SIP GW service is not available.
*/
STATUS_UNDEFINED = 'undefined',

/**
* Status that video SIP GW service is available but there are no free nodes
* at the moment to serve new requests.
*/
STATUS_BUSY = 'busy'
};

export enum VideoSIPGWStateConstants {
/**
* Video SIP GW session state, currently running.
*/
STATE_ON = 'on',

/**
* Video SIP GW session state, currently stopped and not running.
*/
STATE_OFF = 'off',

/**
* Video SIP GW session state, currently is starting.
*/
STATE_PENDING = 'pending',

/**
* Video SIP GW session state, has observed some issues and is retrying at the
* moment.
*/
STATE_RETRYING = 'retrying',

/**
* Video SIP GW session state, tried to start but it failed.
*/
STATE_FAILED = 'failed'
};

export enum VideoSIPGWErrorConstants {
/**
* Error on trying to create video SIP GW session in conference where
* there is no room connection (hasn't joined or has left the room).
*/
ERROR_NO_CONNECTION = 'error_no_connection',

/**
* Error on trying to create video SIP GW session with address for which
* there is an already created session.
*/
ERROR_SESSION_EXISTS = 'error_session_already_exists'
};

// exported for backward compatibility
export const STATUS_AVAILABLE = VideoSIPGWStatusConstants.STATUS_AVAILABLE;
export const STATUS_UNDEFINED = VideoSIPGWStatusConstants.STATUS_UNDEFINED;
export const STATUS_BUSY = VideoSIPGWStatusConstants.STATUS_BUSY;

export const STATE_ON = VideoSIPGWStateConstants.STATE_ON;
export const STATE_OFF = VideoSIPGWStateConstants.STATE_OFF;
export const STATE_PENDING = VideoSIPGWStateConstants.STATE_PENDING;
export const STATE_RETRYING = VideoSIPGWStateConstants.STATE_RETRYING;
export const STATE_FAILED = VideoSIPGWStateConstants.STATE_FAILED;

export const ERROR_NO_CONNECTION = VideoSIPGWErrorConstants.ERROR_NO_CONNECTION;
export const ERROR_SESSION_EXISTS = VideoSIPGWErrorConstants.ERROR_SESSION_EXISTS;
114 changes: 60 additions & 54 deletions types/auto/modules/videosipgw/VideoSIPGWConstants.d.ts
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
/**
* Status that video SIP GW service is available.
* @type {string}
*/
export const STATUS_AVAILABLE: string;
/**
* Status that video SIP GW service is not available.
* @type {string}
*/
export const STATUS_UNDEFINED: string;
/**
* Status that video SIP GW service is available but there are no free nodes
* at the moment to serve new requests.
* @type {string}
*/
export const STATUS_BUSY: string;
/**
* Video SIP GW session state, currently running.
* @type {string}
*/
export const STATE_ON: string;
/**
* Video SIP GW session state, currently stopped and not running.
* @type {string}
*/
export const STATE_OFF: string;
/**
* Video SIP GW session state, currently is starting.
* @type {string}
*/
export const STATE_PENDING: string;
/**
* Video SIP GW session state, has observed some issues and is retrying at the
* moment.
* @type {string}
*/
export const STATE_RETRYING: string;
/**
* Video SIP GW session state, tried to start but it failed.
* @type {string}
*/
export const STATE_FAILED: string;
/**
* Error on trying to create video SIP GW session in conference where
* there is no room connection (hasn't joined or has left the room).
* @type {string}
*/
export const ERROR_NO_CONNECTION: string;
/**
* Error on trying to create video SIP GW session with address for which
* there is an already created session.
* @type {string}
*/
export const ERROR_SESSION_EXISTS: string;
export declare enum VideoSIPGWStatusConstants {
/**
* Status that video SIP GW service is available.
*/
STATUS_AVAILABLE = "available",
/**
* Status that video SIP GW service is not available.
*/
STATUS_UNDEFINED = "undefined",
/**
* Status that video SIP GW service is available but there are no free nodes
* at the moment to serve new requests.
*/
STATUS_BUSY = "busy"
}
export declare enum VideoSIPGWStateConstants {
/**
* Video SIP GW session state, currently running.
*/
STATE_ON = "on",
/**
* Video SIP GW session state, currently stopped and not running.
*/
STATE_OFF = "off",
/**
* Video SIP GW session state, currently is starting.
*/
STATE_PENDING = "pending",
/**
* Video SIP GW session state, has observed some issues and is retrying at the
* moment.
*/
STATE_RETRYING = "retrying",
/**
* Video SIP GW session state, tried to start but it failed.
*/
STATE_FAILED = "failed"
}
export declare enum VideoSIPGWErrorConstants {
/**
* Error on trying to create video SIP GW session in conference where
* there is no room connection (hasn't joined or has left the room).
*/
ERROR_NO_CONNECTION = "error_no_connection",
/**
* Error on trying to create video SIP GW session with address for which
* there is an already created session.
*/
ERROR_SESSION_EXISTS = "error_session_already_exists"
}
export declare const STATUS_AVAILABLE = VideoSIPGWStatusConstants.STATUS_AVAILABLE;
export declare const STATUS_UNDEFINED = VideoSIPGWStatusConstants.STATUS_UNDEFINED;
export declare const STATUS_BUSY = VideoSIPGWStatusConstants.STATUS_BUSY;
export declare const STATE_ON = VideoSIPGWStateConstants.STATE_ON;
export declare const STATE_OFF = VideoSIPGWStateConstants.STATE_OFF;
export declare const STATE_PENDING = VideoSIPGWStateConstants.STATE_PENDING;
export declare const STATE_RETRYING = VideoSIPGWStateConstants.STATE_RETRYING;
export declare const STATE_FAILED = VideoSIPGWStateConstants.STATE_FAILED;
export declare const ERROR_NO_CONNECTION = VideoSIPGWErrorConstants.ERROR_NO_CONNECTION;
export declare const ERROR_SESSION_EXISTS = VideoSIPGWErrorConstants.ERROR_SESSION_EXISTS;

0 comments on commit 74721c4

Please sign in to comment.