chatkitty
Advanced tools
Comparing version 0.0.2 to 0.0.3
import { ChatKittyConfiguration } from './chatkitty.configuration'; | ||
import { GetCurrentUserResult } from './model/current-user/get/current-user.get.results'; | ||
import { SessionStartRequest } from './model/session/start/session.start.request'; | ||
import { SessionAccessDeniedResult, SessionStartedResult } from './model/session/start/session.start.results'; | ||
export default class ChatKitty { | ||
@@ -9,4 +10,4 @@ private readonly configuration; | ||
constructor(configuration: ChatKittyConfiguration); | ||
startSession(request: SessionStartRequest): void; | ||
getCurrentUser(callback: (result: GetCurrentUserResult) => void): void; | ||
startSession(request: SessionStartRequest): Promise<SessionStartedResult | SessionAccessDeniedResult>; | ||
getCurrentUser(): Promise<GetCurrentUserResult>; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var environment_1 = require("../environments/environment"); | ||
var chatkitty_error_1 = require("./model/chatkitty.error"); | ||
var current_user_get_results_1 = require("./model/current-user/get/current-user.get.results"); | ||
@@ -19,27 +20,35 @@ var session_errors_1 = require("./model/session/start/session.errors"); | ||
var _this = this; | ||
this.client.connect({ | ||
apiKey: this.configuration.apiKey, | ||
username: request.username, | ||
authParams: request.authParams, | ||
onSuccess: function () { | ||
_this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: function (user) { | ||
request.callback(new session_start_results_1.SessionStartedResult({ user: user })); | ||
return new Promise(function (resolve) { | ||
_this.client.connect({ | ||
apiKey: _this.configuration.apiKey, | ||
username: request.username, | ||
authParams: request.authParams, | ||
onSuccess: function () { | ||
_this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: function (user) { | ||
resolve(new session_start_results_1.SessionStartedResult({ user: user })); | ||
} | ||
}); | ||
}, | ||
onError: function (error) { | ||
if (error.error === 'AccessDeniedError') { | ||
resolve(new session_start_results_1.SessionAccessDeniedResult(new session_errors_1.SessionAccessDeniedError())); | ||
} | ||
}); | ||
}, | ||
onError: function (error) { | ||
if (error.error === 'AccessDeniedError') { | ||
request.callback(new session_start_results_1.SessionAccessDeniedResult(new session_errors_1.SessionAccessDeniedError())); | ||
else { | ||
resolve(new session_start_results_1.SessionAccessDeniedResult(new chatkitty_error_1.UnknownChatKittyError())); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
}; | ||
ChatKitty.prototype.getCurrentUser = function (callback) { | ||
this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: function (user) { | ||
callback(new current_user_get_results_1.GetCurrentUserResult(user)); | ||
} | ||
ChatKitty.prototype.getCurrentUser = function () { | ||
var _this = this; | ||
return new Promise(function (resolve) { | ||
_this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: function (user) { | ||
resolve(new current_user_get_results_1.GetCurrentUserResult(user)); | ||
} | ||
}); | ||
}); | ||
@@ -51,2 +60,2 @@ }; | ||
exports.default = ChatKitty; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9jaGF0a2l0dHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyREFBMEQ7QUFJMUQsOEZBQXlGO0FBQ3pGLHVFQUFnRjtBQUVoRixxRkFHcUQ7QUFDckQsd0RBQXNEO0FBRXREO0lBS0UsbUJBQW9DLGFBQXFDO1FBQXJDLGtCQUFhLEdBQWIsYUFBYSxDQUF3QjtRQUN2RSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksNEJBQVksQ0FBQztZQUM3QixRQUFRLEVBQUUsYUFBYSxDQUFDLFFBQVEsS0FBSyxTQUFTLElBQUksYUFBYSxDQUFDLFFBQVE7WUFDeEUsSUFBSSxFQUFFLGFBQWEsQ0FBQyxJQUFJLElBQUksbUJBQW1CO1lBQy9DLE9BQU8sRUFBRSxDQUFDLHlCQUFXLENBQUMsVUFBVTt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O2dCQUMxQyxDQUFDO2FBQ0YsQ0FBQyxDQUFDO1FBQ0wsQ0FBQyxDQUNGLENBQUM7SUFDSixDQUFDO0lBbkR1QiwwQkFBZ0IsR0FBRyxnQ0FBZ0MsQ0FBQztJQW9EOUUsZ0JBQUM7Q0FBQSxBQXJERCxJQXFEQztrQkFyRG9CLFNBQVMifQ== |
@@ -1,5 +0,8 @@ | ||
export declare class ChatKittyError { | ||
export declare abstract class ChatKittyError { | ||
type: string; | ||
message: string; | ||
constructor(type: string, message: string); | ||
protected constructor(type: string, message: string); | ||
} | ||
export declare class UnknownChatKittyError extends ChatKittyError { | ||
constructor(); | ||
} |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChatKittyError = void 0; | ||
exports.UnknownChatKittyError = exports.ChatKittyError = void 0; | ||
var ChatKittyError = /** @class */ (function () { | ||
@@ -12,2 +25,10 @@ function ChatKittyError(type, message) { | ||
exports.ChatKittyError = ChatKittyError; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2RlbC9jaGF0a2l0dHkuZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7SUFDRSx3QkFBbUIsSUFBWSxFQUFTLE9BQWU7UUFBcEMsU0FBSSxHQUFKLElBQUksQ0FBUTtRQUFTLFlBQU8sR0FBUCxPQUFPLENBQVE7SUFBRyxDQUFDO0lBQzdELHFCQUFDO0FBQUQsQ0FBQyxBQUZELElBRUM7QUFGWSx3Q0FBYyJ9 | ||
var UnknownChatKittyError = /** @class */ (function (_super) { | ||
__extends(UnknownChatKittyError, _super); | ||
function UnknownChatKittyError() { | ||
return _super.call(this, 'UnknownChatKittyError', 'An unknown error has occurred.') || this; | ||
} | ||
return UnknownChatKittyError; | ||
}(ChatKittyError)); | ||
exports.UnknownChatKittyError = UnknownChatKittyError; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2RlbC9jaGF0a2l0dHkuZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0lBQ0Usd0JBQTZCLElBQVksRUFBUyxPQUFlO1FBQXBDLFNBQUksR0FBSixJQUFJLENBQVE7UUFBUyxZQUFPLEdBQVAsT0FBTyxDQUFRO0lBQ2pFLENBQUM7SUFDSCxxQkFBQztBQUFELENBQUMsQUFIRCxJQUdDO0FBSHFCLHdDQUFjO0FBS3BDO0lBQTJDLHlDQUFjO0lBQ3ZEO2VBQ0Usa0JBQU0sdUJBQXVCLEVBQUUsZ0NBQWdDLENBQUM7SUFDbEUsQ0FBQztJQUNILDRCQUFDO0FBQUQsQ0FBQyxBQUpELENBQTJDLGNBQWMsR0FJeEQ7QUFKWSxzREFBcUIifQ== |
@@ -1,6 +0,4 @@ | ||
import { SessionAccessDeniedResult, SessionStartedResult } from './session.start.results'; | ||
export interface SessionStartRequest { | ||
username: string; | ||
authParams?: unknown; | ||
callback: (result: SessionStartedResult | SessionAccessDeniedResult) => void; | ||
} |
import { ChatKittyConfiguration } from './chatkitty.configuration'; | ||
import { GetCurrentUserResult } from './model/current-user/get/current-user.get.results'; | ||
import { SessionStartRequest } from './model/session/start/session.start.request'; | ||
import { SessionAccessDeniedResult, SessionStartedResult } from './model/session/start/session.start.results'; | ||
export default class ChatKitty { | ||
@@ -9,4 +10,4 @@ private readonly configuration; | ||
constructor(configuration: ChatKittyConfiguration); | ||
startSession(request: SessionStartRequest): void; | ||
getCurrentUser(callback: (result: GetCurrentUserResult) => void): void; | ||
startSession(request: SessionStartRequest): Promise<SessionStartedResult | SessionAccessDeniedResult>; | ||
getCurrentUser(): Promise<GetCurrentUserResult>; | ||
} |
import { environment } from '../environments/environment'; | ||
import { UnknownChatKittyError } from './model/chatkitty.error'; | ||
import { GetCurrentUserResult } from './model/current-user/get/current-user.get.results'; | ||
@@ -16,27 +17,34 @@ import { SessionAccessDeniedError } from './model/session/start/session.errors'; | ||
startSession(request) { | ||
this.client.connect({ | ||
apiKey: this.configuration.apiKey, | ||
username: request.username, | ||
authParams: request.authParams, | ||
onSuccess: () => { | ||
this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: user => { | ||
request.callback(new SessionStartedResult({ user: user })); | ||
return new Promise(resolve => { | ||
this.client.connect({ | ||
apiKey: this.configuration.apiKey, | ||
username: request.username, | ||
authParams: request.authParams, | ||
onSuccess: () => { | ||
this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: user => { | ||
resolve(new SessionStartedResult({ user: user })); | ||
} | ||
}); | ||
}, | ||
onError: (error) => { | ||
if (error.error === 'AccessDeniedError') { | ||
resolve(new SessionAccessDeniedResult(new SessionAccessDeniedError())); | ||
} | ||
}); | ||
}, | ||
onError: (error) => { | ||
if (error.error === 'AccessDeniedError') { | ||
request.callback(new SessionAccessDeniedResult(new SessionAccessDeniedError())); | ||
else { | ||
resolve(new SessionAccessDeniedResult(new UnknownChatKittyError())); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
} | ||
getCurrentUser(callback) { | ||
this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: user => { | ||
callback(new GetCurrentUserResult(user)); | ||
} | ||
getCurrentUser() { | ||
return new Promise(resolve => { | ||
this.client.relayResource({ | ||
destination: ChatKitty.currentUserRelay, | ||
onSuccess: user => { | ||
resolve(new GetCurrentUserResult(user)); | ||
} | ||
}); | ||
}); | ||
@@ -46,2 +54,2 @@ } | ||
ChatKitty.currentUserRelay = '/application/v1/users/me.relay'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9jaGF0a2l0dHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBSTFELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG1EQUFtRCxDQUFDO0FBQ3pGLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBRWhGLE9BQU8sRUFDTCx5QkFBeUIsRUFDekIsb0JBQW9CLEVBQ3JCLE1BQU0sNkNBQTZDLENBQUM7QUFDckQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXRELE1BQU0sQ0FBQyxPQUFPLE9BQU8sU0FBUztJQUs1QixZQUFvQyxhQUFxQztRQUFyQyxrQkFBYSxHQUFiLGFBQWEsQ0FBd0I7UUFDdkUsSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLFlBQVksQ0FBQztZQUM3QixRQUFRLEVBQUUsYUFBYSxDQUFDLFFBQVEsS0FBSyxTQUFTLElBQUksYUFBYSxDQUFDLFFBQVE7WUFDeEUsSUFBSSxFQUFFLGFBQWEsQ0FBQyxJQUFJ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BQ0wsQ0FBQyxDQUNGLENBQUM7SUFDSixDQUFDO0lBRU0sY0FBYztRQUNuQixPQUFPLElBQUksT0FBTyxDQUNoQixPQUFPLENBQUMsRUFBRTtZQUNSLElBQUksQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFjO2dCQUNyQyxXQUFXLEVBQUUsU0FBUyxDQUFDLGdCQUFnQjtnQkFDdkMsU0FBUyxFQUFFLElBQUksQ0FBQyxFQUFFO29CQUNoQixPQUFPLENBQUMsSUFBSSxvQkFBb0IsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO2dCQUMxQyxDQUFDO2FBQ0YsQ0FBQyxDQUFDO1FBQ0wsQ0FBQyxDQUNGLENBQUM7SUFDSixDQUFDOztBQW5EdUIsMEJBQWdCLEdBQUcsZ0NBQWdDLENBQUMifQ== |
@@ -1,5 +0,8 @@ | ||
export declare class ChatKittyError { | ||
export declare abstract class ChatKittyError { | ||
type: string; | ||
message: string; | ||
constructor(type: string, message: string); | ||
protected constructor(type: string, message: string); | ||
} | ||
export declare class UnknownChatKittyError extends ChatKittyError { | ||
constructor(); | ||
} |
@@ -7,2 +7,7 @@ export class ChatKittyError { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2RlbC9jaGF0a2l0dHkuZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFPLGNBQWM7SUFDekIsWUFBbUIsSUFBWSxFQUFTLE9BQWU7UUFBcEMsU0FBSSxHQUFKLElBQUksQ0FBUTtRQUFTLFlBQU8sR0FBUCxPQUFPLENBQVE7SUFBRyxDQUFDO0NBQzVEIn0= | ||
export class UnknownChatKittyError extends ChatKittyError { | ||
constructor() { | ||
super('UnknownChatKittyError', 'An unknown error has occurred.'); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhdGtpdHR5LmVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2RlbC9jaGF0a2l0dHkuZXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFnQixjQUFjO0lBQ2xDLFlBQTZCLElBQVksRUFBUyxPQUFlO1FBQXBDLFNBQUksR0FBSixJQUFJLENBQVE7UUFBUyxZQUFPLEdBQVAsT0FBTyxDQUFRO0lBQ2pFLENBQUM7Q0FDRjtBQUVELE1BQU0sT0FBTyxxQkFBc0IsU0FBUSxjQUFjO0lBQ3ZEO1FBQ0UsS0FBSyxDQUFDLHVCQUF1QixFQUFFLGdDQUFnQyxDQUFDLENBQUM7SUFDbkUsQ0FBQztDQUNGIn0= |
@@ -1,6 +0,4 @@ | ||
import { SessionAccessDeniedResult, SessionStartedResult } from './session.start.results'; | ||
export interface SessionStartRequest { | ||
username: string; | ||
authParams?: unknown; | ||
callback: (result: SessionStartedResult | SessionAccessDeniedResult) => void; | ||
} |
{ | ||
"name": "chatkitty", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "JS SDK for the ChatKitty Chat API", | ||
@@ -5,0 +5,0 @@ "main": "build/main/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59252
811