Skip to content

Commit

Permalink
dist/ lib/ files for 0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
James Criscuolo committed Dec 23, 2020
1 parent 77bdfab commit 0c7d355
Show file tree
Hide file tree
Showing 553 changed files with 68,162 additions and 0 deletions.
20,884 changes: 20,884 additions & 0 deletions dist/sip-0.18.0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/sip-0.18.0.min.js

Large diffs are not rendered by default.

20,884 changes: 20,884 additions & 0 deletions dist/sip.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/sip.min.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions lib/api/bye.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { IncomingByeRequest, IncomingRequestMessage, ResponseOptions } from "../core";
/**
* A request to end a {@link Session} (incoming BYE).
* @public
*/
export declare class Bye {
private incomingByeRequest;
/** @internal */
constructor(incomingByeRequest: IncomingByeRequest);
/** Incoming BYE request message. */
get request(): IncomingRequestMessage;
/** Accept the request. */
accept(options?: ResponseOptions): Promise<void>;
/** Reject the request. */
reject(options?: ResponseOptions): Promise<void>;
}
//# sourceMappingURL=bye.d.ts.map
1 change: 1 addition & 0 deletions lib/api/bye.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions lib/api/bye.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* A request to end a {@link Session} (incoming BYE).
* @public
*/
export class Bye {
/** @internal */
constructor(incomingByeRequest) {
this.incomingByeRequest = incomingByeRequest;
}
/** Incoming BYE request message. */
get request() {
return this.incomingByeRequest.message;
}
/** Accept the request. */
accept(options) {
this.incomingByeRequest.accept(options);
return Promise.resolve();
}
/** Reject the request. */
reject(options) {
this.incomingByeRequest.reject(options);
return Promise.resolve();
}
}
16 changes: 16 additions & 0 deletions lib/api/dtmf.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { IncomingInfoRequest } from "../core";
import { Info } from "./info";
/**
* A DTMF signal (incoming INFO).
* @deprecated Use `Info`.
* @internal
*/
export declare class DTMF extends Info {
private _tone;
private _duration;
/** @internal */
constructor(incomingInfoRequest: IncomingInfoRequest, tone: string, duration: number);
get tone(): string;
get duration(): number;
}
//# sourceMappingURL=dtmf.d.ts.map
1 change: 1 addition & 0 deletions lib/api/dtmf.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions lib/api/dtmf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Info } from "./info";
/**
* A DTMF signal (incoming INFO).
* @deprecated Use `Info`.
* @internal
*/
export class DTMF extends Info {
/** @internal */
constructor(incomingInfoRequest, tone, duration) {
super(incomingInfoRequest);
this._tone = tone;
this._duration = duration;
}
get tone() {
return this._tone;
}
get duration() {
return this._duration;
}
}
89 changes: 89 additions & 0 deletions lib/api/emitter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* Generic observable.
* @public
*/
export interface Emitter<T> {
/**
* Sets up a function that will be called whenever the target changes.
* @param listener - Callback function.
* @param options - An options object that specifies characteristics about the listener.
* If once true, indicates that the listener should be invoked at most once after being added.
* If once true, the listener would be automatically removed when invoked.
*/
addListener(listener: (data: T) => void, options?: {
once?: boolean;
}): void;
/**
* Removes from the listener previously registered with addListener.
* @param listener - Callback function.
*/
removeListener(listener: (data: T) => void): void;
/**
* Registers a listener.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
on(listener: (data: T) => void): void;
/**
* Unregisters a listener.
* @param listener - Callback function.
* @deprecated Use removeListener.
*/
off(listener: (data: T) => void): void;
/**
* Registers a listener then unregisters the listener after one event emission.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
once(listener: (data: T) => void): void;
}
/**
* An {@link Emitter} implementation.
* @internal
*/
export declare class EmitterImpl<T> implements Emitter<T> {
private listeners;
/**
* Sets up a function that will be called whenever the target changes.
* @param listener - Callback function.
* @param options - An options object that specifies characteristics about the listener.
* If once true, indicates that the listener should be invoked at most once after being added.
* If once true, the listener would be automatically removed when invoked.
*/
addListener(listener: (data: T) => void, options?: {
once?: boolean;
}): void;
/**
* Emit change.
* @param data - Data to emit.
*/
emit(data: T): void;
/**
* Removes all listeners previously registered with addListener.
*/
removeAllListeners(): void;
/**
* Removes a listener previously registered with addListener.
* @param listener - Callback function.
*/
removeListener(listener: (data: T) => void): void;
/**
* Registers a listener.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
on(listener: (data: T) => void): void;
/**
* Unregisters a listener.
* @param listener - Callback function.
* @deprecated Use removeListener.
*/
off(listener: (data: T) => void): void;
/**
* Registers a listener then unregisters the listener after one event emission.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
once(listener: (data: T) => void): void;
}
//# sourceMappingURL=emitter.d.ts.map
1 change: 1 addition & 0 deletions lib/api/emitter.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions lib/api/emitter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* An {@link Emitter} implementation.
* @internal
*/
export class EmitterImpl {
constructor() {
this.listeners = new Array();
}
/**
* Sets up a function that will be called whenever the target changes.
* @param listener - Callback function.
* @param options - An options object that specifies characteristics about the listener.
* If once true, indicates that the listener should be invoked at most once after being added.
* If once true, the listener would be automatically removed when invoked.
*/
addListener(listener, options) {
const onceWrapper = (data) => {
this.removeListener(onceWrapper);
listener(data);
};
(options === null || options === void 0 ? void 0 : options.once) === true ? this.listeners.push(onceWrapper) : this.listeners.push(listener);
}
/**
* Emit change.
* @param data - Data to emit.
*/
emit(data) {
this.listeners.slice().forEach((listener) => listener(data));
}
/**
* Removes all listeners previously registered with addListener.
*/
removeAllListeners() {
this.listeners = [];
}
/**
* Removes a listener previously registered with addListener.
* @param listener - Callback function.
*/
removeListener(listener) {
this.listeners = this.listeners.filter((l) => l !== listener);
}
/**
* Registers a listener.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
on(listener) {
return this.addListener(listener);
}
/**
* Unregisters a listener.
* @param listener - Callback function.
* @deprecated Use removeListener.
*/
off(listener) {
return this.removeListener(listener);
}
/**
* Registers a listener then unregisters the listener after one event emission.
* @param listener - Callback function.
* @deprecated Use addListener.
*/
once(listener) {
return this.addListener(listener, { once: true });
}
}
9 changes: 9 additions & 0 deletions lib/api/exceptions/content-type-unsupported.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Exception } from "../../core";
/**
* An exception indicating an unsupported content type prevented execution.
* @public
*/
export declare class ContentTypeUnsupportedError extends Exception {
constructor(message?: string);
}
//# sourceMappingURL=content-type-unsupported.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/content-type-unsupported.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/api/exceptions/content-type-unsupported.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Exception } from "../../core";
/**
* An exception indicating an unsupported content type prevented execution.
* @public
*/
export class ContentTypeUnsupportedError extends Exception {
constructor(message) {
super(message ? message : "Unsupported content type.");
}
}
6 changes: 6 additions & 0 deletions lib/api/exceptions/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from "./content-type-unsupported";
export * from "./request-pending";
export * from "./session-description-handler";
export * from "./session-terminated";
export * from "./state-transition";
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions lib/api/exceptions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from "./content-type-unsupported";
export * from "./request-pending";
export * from "./session-description-handler";
export * from "./session-terminated";
export * from "./state-transition";
10 changes: 10 additions & 0 deletions lib/api/exceptions/request-pending.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Exception } from "../../core";
/**
* An exception indicating an outstanding prior request prevented execution.
* @public
*/
export declare class RequestPendingError extends Exception {
/** @internal */
constructor(message?: string);
}
//# sourceMappingURL=request-pending.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/request-pending.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions lib/api/exceptions/request-pending.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Exception } from "../../core";
/**
* An exception indicating an outstanding prior request prevented execution.
* @public
*/
export class RequestPendingError extends Exception {
/** @internal */
constructor(message) {
super(message ? message : "Request pending.");
}
}
9 changes: 9 additions & 0 deletions lib/api/exceptions/session-description-handler.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Exception } from "../../core";
/**
* An exception indicating a session description handler error occured.
* @public
*/
export declare class SessionDescriptionHandlerError extends Exception {
constructor(message?: string);
}
//# sourceMappingURL=session-description-handler.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/session-description-handler.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/api/exceptions/session-description-handler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Exception } from "../../core";
/**
* An exception indicating a session description handler error occured.
* @public
*/
export class SessionDescriptionHandlerError extends Exception {
constructor(message) {
super(message ? message : "Unspecified session description handler error.");
}
}
9 changes: 9 additions & 0 deletions lib/api/exceptions/session-terminated.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Exception } from "../../core";
/**
* An exception indicating the session terminated before the action completed.
* @public
*/
export declare class SessionTerminatedError extends Exception {
constructor();
}
//# sourceMappingURL=session-terminated.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/session-terminated.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/api/exceptions/session-terminated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Exception } from "../../core";
/**
* An exception indicating the session terminated before the action completed.
* @public
*/
export class SessionTerminatedError extends Exception {
constructor() {
super("The session has terminated.");
}
}
9 changes: 9 additions & 0 deletions lib/api/exceptions/state-transition.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Exception } from "../../core";
/**
* An exception indicating an invalid state transition error occured.
* @public
*/
export declare class StateTransitionError extends Exception {
constructor(message?: string);
}
//# sourceMappingURL=state-transition.d.ts.map
1 change: 1 addition & 0 deletions lib/api/exceptions/state-transition.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/api/exceptions/state-transition.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Exception } from "../../core";
/**
* An exception indicating an invalid state transition error occured.
* @public
*/
export class StateTransitionError extends Exception {
constructor(message) {
super(message ? message : "An error occurred during state transition.");
}
}
Loading

0 comments on commit 0c7d355

Please sign in to comment.