Comparing version 1.1.0-beta.5 to 1.1.0-beta.6
import { AxiosInstance } from "axios"; | ||
import { APIGroup, PatchPayload } from "./common"; | ||
import { CustomerContact } from "./customers"; | ||
import { Note } from "./notes"; | ||
import { AddNoteRequest } from "./reservations"; | ||
export declare class PassengerAPI extends APIGroup { | ||
@@ -10,2 +12,6 @@ private booking; | ||
/** | ||
* Update the passenger APIS details. | ||
*/ | ||
updateApis(updates: PassengerAPIS): Promise<void>; | ||
/** | ||
* List customer contacts | ||
@@ -40,9 +46,6 @@ * | ||
deleteInsurance(id: number): Promise<void>; | ||
notes(): Promise<Note[]>; | ||
addNote(note: AddNoteRequest): Promise<Note>; | ||
deleteNote(id: number): Promise<void>; | ||
/** | ||
* Update the passenger APIS details. | ||
* Merges the given APIs details with the existing ones. | ||
* Any properties in `updates` which are undefined will be unchanged. | ||
*/ | ||
updateApis(updates: Partial<PassengerAPIS>): Promise<void>; | ||
/** | ||
* Get the path to the current passenger resource. | ||
@@ -49,0 +52,0 @@ */ |
@@ -26,2 +26,10 @@ "use strict"; | ||
/** | ||
* Update the passenger APIS details. | ||
*/ | ||
updateApis(updates) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.axios.put(`${this.path}/apis`, updates); | ||
}); | ||
} | ||
/** | ||
* List customer contacts | ||
@@ -84,14 +92,17 @@ * | ||
} | ||
/** | ||
* Update the passenger APIS details. | ||
* Merges the given APIs details with the existing ones. | ||
* Any properties in `updates` which are undefined will be unchanged. | ||
*/ | ||
updateApis(updates) { | ||
notes() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const existing = yield this.getApis(); | ||
const payload = Object.assign(Object.assign({}, existing), updates); | ||
yield this.axios.put(`${this.path}/apis`, payload); | ||
return (yield this.axios.get(`${this.path}/notes`)).data; | ||
}); | ||
} | ||
addNote(note) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return (yield this.axios.post(`${this.path}/notes`, note)).data; | ||
}); | ||
} | ||
deleteNote(id) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return (yield this.axios.delete(`${this.path}/notes/${id}`)); | ||
}); | ||
} | ||
/** | ||
@@ -98,0 +109,0 @@ * Get the path to the current passenger resource. |
{ | ||
"name": "tigerbay", | ||
"version": "1.1.0-beta.5", | ||
"version": "1.1.0-beta.6", | ||
"description": "API Client library for TigerBay", | ||
@@ -5,0 +5,0 @@ "main": "lib/client.js", |
Sorry, the diff of this file is not supported yet
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
102574
2540