Comparing version 0.1.1-alpha.2 to 0.2.0
@@ -1,15 +0,42 @@ | ||
import { Notes, Reservations, Tasks, Tours } from './models'; | ||
import Axios from 'axios'; | ||
import { USER_AGENT } from './user_agent'; | ||
import * as Auth from './auth'; | ||
export * from './models'; | ||
import * as Auth_1 from './auth'; | ||
export { Auth_1 as Auth }; | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Client = exports.Auth = void 0; | ||
const models_1 = require("./models"); | ||
const axios_1 = __importDefault(require("axios")); | ||
const user_agent_1 = require("./user_agent"); | ||
const Auth = __importStar(require("./auth")); | ||
__exportStar(require("./models"), exports); | ||
exports.Auth = __importStar(require("./auth")); | ||
/** | ||
* Base Client for TigerBay reservation system | ||
*/ | ||
export class Client { | ||
class Client { | ||
constructor(config) { | ||
this.config = config; | ||
this.axios = Axios.create(); | ||
this.axios = axios_1.default.create(); | ||
this.axios.defaults.baseURL = config.baseUrl.toString(); | ||
@@ -20,3 +47,3 @@ this.axios.defaults.timeout = this.config.timeout; | ||
this.axios.defaults.headers = { | ||
'User-Agent': USER_AGENT, | ||
'User-Agent': user_agent_1.USER_AGENT, | ||
'Content-Type': 'application/json', | ||
@@ -32,3 +59,3 @@ 'Accept': 'application/json', | ||
get reservations() { | ||
return new Reservations.Api(this.axios); | ||
return new models_1.Reservations.Api(this.axios); | ||
} | ||
@@ -39,3 +66,3 @@ /** | ||
get tasks() { | ||
return new Tasks.Api(this.axios); | ||
return new models_1.Tasks.Api(this.axios); | ||
} | ||
@@ -46,3 +73,3 @@ /** | ||
get tours() { | ||
return new Tours.Api(this.axios); | ||
return new models_1.Tours.Api(this.axios); | ||
} | ||
@@ -53,3 +80,3 @@ /** | ||
get notes() { | ||
return new Notes.Api(this.axios); | ||
return new models_1.Notes.Api(this.axios); | ||
} | ||
@@ -88,1 +115,2 @@ /** | ||
} | ||
exports.Client = Client; |
{ | ||
"name": "tigerbay", | ||
"version": "0.1.1-alpha.2", | ||
"version": "0.2.0", | ||
"description": "API Client library for TigerBay", | ||
@@ -5,0 +5,0 @@ "main": "lib/client.js", |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"module": "ES6", | ||
"module": "CommonJS", | ||
"rootDir": "src/", | ||
@@ -6,0 +6,0 @@ "outDir": "lib/", |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
962
0
32317
16