UNPKG

@goteborgco/open-api-js-client

Version:

Official JavaScript client for the Göteborg & Co GraphQL API

46 lines (45 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Contact = void 0; class Contact { constructor(data) { this.email = data.email; this.phone = data.phone; this.website = data.website; this.facebook = data.facebook; this.instagram = data.instagram; } /** * Get social media links * @returns Object containing social media links */ getSocialLinks() { return { facebook: this.facebook, instagram: this.instagram }; } /** * Get contact methods * @returns Object containing contact methods */ getContactMethods() { return { email: this.email, phone: this.phone, website: this.website }; } /** * Check if any contact information exists * @returns boolean indicating if any contact information is available */ hasContactInfo() { return Boolean(this.email || this.phone || this.website || this.facebook || this.instagram); } } exports.Contact = Contact;