omnipartners
Version:
Node.js wrapper for Omniparners API.
272 lines (271 loc) • 12.1 kB
JavaScript
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Api_1 = __importDefault(require("../../lib/Api"));
const apiDecorators_1 = require("../../lib/apiDecorators");
class Metadata extends Api_1.default {
constructor() {
super(...arguments);
this.defaultHost = "http://metadata.omnipartners.be/";
}
_call(action, data) {
return this.post("/", {
action,
...data,
});
}
getLegalForms(data) {
return this._call("get-legal-forms", data);
}
getCounties(data) {
return this._call("get-counties", data);
}
getAddressTypes(data) {
return this._call("get-address-types", data);
}
getMemberCountries(data) {
return this._call("get-countries", data);
}
getCommunicationPreferences(data) {
return this._call("get-communication-preferences", data);
}
getInterests(data) {
return this._call("get-interests", data);
}
getUserTitles(data) {
return this._call("get-user-titles", data);
}
getMemberLanguages(data) {
return this._call("get-languages", data);
}
getAccessRights(data) {
return this._call("get-access-rights", data);
}
getSubscriptions(data) {
return this._call("get-subscriptions", data);
}
getPlaceOfPurchase(data) {
return this._call("get-places-of-purchases", data);
}
getCustomerGroups(data) {
return this._call("get-customer-groups", data);
}
getAnimalTypes(data) {
return this._call("get-animal-types", data);
}
getAnimalBreeds(data) {
return this._call("get-animal-breeds", data);
}
getAnimalDeletionCauses(data) {
return this._call("get-deletion-causes", data);
}
getAnimalLifestyles(data) {
return this._call("get-animal-lifestyles", data);
}
getAgendaCategories(data) {
return this._call("get-agenda-categories", data);
}
getAnimalUniverse(data) {
return this._call("get-animal-universes", data);
}
getAnimalPathologies(data) {
return this._call("get-animal-pathologies", data);
}
getAnimalStages(data) {
return this._call("get-animal-universes-stages", data);
}
getAnimalSpecialNeeds(data) {
return this._call("get-animal-special-needs", data);
}
getDiagnosticCodes(data) {
return this._call("get-diagnostic-codes", data);
}
getAnimalBCS(data) {
return this._call("get-animal-bcs", data);
}
getPartnerTypesList(data) {
return this._call("get-partner-types", data);
}
getPartnerTypeRoles(data) {
return this._call("get-partner-type-roles", data);
}
getProductRanges(data) {
return this._call("get-product-ranges", data);
}
getProductBrands(data) {
return this._call("get-product-brands", data);
}
getProductFamilies(data) {
return this._call("get-product-families", data);
}
getCollectionRelationTypesList(data) {
return this._call("get-collection-relation-types", data);
}
getLoyaltyProgramTypes(data) {
return this._call("get-loyalty-program-types", data);
}
getLoyaltyProgram(data) {
return this._call("get-loyalty-programs", data);
}
getFeaturedAactivities(data) {
return this._call("get-featured-activities", data);
}
getFeaturedServices(data) {
return this._call("get-featured-services", data);
}
getPartnerRelationTypes(data) {
return this._call("get-partner-relation-types", data);
}
getSocialNetworks(data) {
return this._call("get-social-networks", data);
}
}
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Legal_Forms"),
(0, apiDecorators_1.filterInput)(["legal_form_codes", "lang", "indexed"])
], Metadata.prototype, "getLegalForms", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Counties"),
(0, apiDecorators_1.filterInput)(["country", "lang", "indexed"])
], Metadata.prototype, "getCounties", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Address_Types"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAddressTypes", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Member_Countries"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getMemberCountries", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Communication_Preferences"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getCommunicationPreferences", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Interests"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getInterests", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_User_Titles"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getUserTitles", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Member_Languages"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getMemberLanguages", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Access_Rights"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAccessRights", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Subscriptions"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getSubscriptions", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Place_of_Purchase"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getPlaceOfPurchase", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Customer_Groups"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getCustomerGroups", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Types"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalTypes", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Breeds"),
(0, apiDecorators_1.filterInput)(["lang", "type", "indexed", "search", "order"])
], Metadata.prototype, "getAnimalBreeds", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Deletion_Causes"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalDeletionCauses", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Lifestyles"),
(0, apiDecorators_1.filterInput)(["type", "lang", "indexed"])
], Metadata.prototype, "getAnimalLifestyles", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Agenda_Categories"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAgendaCategories", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Universe"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalUniverse", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Pathologies"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalPathologies", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_Stages"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalStages", null);
__decorate([
(0, apiDecorators_1.doc)("https://doc.clixray.com/index.php?title=Get_Animal_Special_Needs"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getAnimalSpecialNeeds", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Diagnostic_Codes"),
(0, apiDecorators_1.filterInput)(["lang", "type", "search", "page", "record_per-page"])
], Metadata.prototype, "getDiagnosticCodes", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Animal_BCS"),
(0, apiDecorators_1.filterInput)(["lang", "species", "universe"])
], Metadata.prototype, "getAnimalBCS", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Partner_Types_List"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getPartnerTypesList", null);
__decorate([
(0, apiDecorators_1.doc)("https://doc.clixray.com/index.php?title=Get_Partner_Type_Roles_List"),
(0, apiDecorators_1.filterInput)(["indexed", "partner_type"])
], Metadata.prototype, "getPartnerTypeRoles", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Product_Ranges"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getProductRanges", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Product_Brands"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getProductBrands", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Product_Families"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getProductFamilies", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Collection_Relation_Types_List"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getCollectionRelationTypesList", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Loyalty_Program_Types"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getLoyaltyProgramTypes", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_loyalty_Programs"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getLoyaltyProgram", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Featured_Activities_List"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getFeaturedAactivities", null);
__decorate([
(0, apiDecorators_1.doc)("https://doc.clixray.com/index.php?title=Get_Featured_Services_List"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getFeaturedServices", null);
__decorate([
(0, apiDecorators_1.doc)("http://doc.omnipartners.be/index.php/Get_Partner_Relation_Types_List"),
(0, apiDecorators_1.filterInput)(["lang", "indexed"])
], Metadata.prototype, "getPartnerRelationTypes", null);
__decorate([
(0, apiDecorators_1.doc)("https://doc.clixray.com/index.php?title=Get_Social_Networks"),
(0, apiDecorators_1.filterInput)(["indexed"])
], Metadata.prototype, "getSocialNetworks", null);
exports.default = Metadata;