UNPKG

@crazy-web/feedback

Version:

A feedback form handler package that shows a popup based on allowed URLs.

65 lines (64 loc) 3.74 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchAnnouncements = void 0; const fetchOrganizationData_1 = require("./fetchOrganizationData"); const fetchAnnouncements = (_a) => __awaiter(void 0, [_a], void 0, function* ({ websiteId, organizationId, page }) { // if (page === 3) { // return { // success: true, // data: [] // } // } const data = yield (0, fetchOrganizationData_1.fetchOrganizationData)({ organizationId, source: "announcement", page, websiteId }); // const data = { // "success": true, // data: [ // { // id: "1", // name: "Beamer 2024: The Year in Review ✨", // description: "2024 was a successful year for Beamer, filled with powerful new features and enhancements to help you engage better with your audience and get the most out of your releases. In case you missed what we’ve been up to, here’s a roundup of all the amazing updates we rolled out this year:", // updated_at: "December 24, 2024", // is_new: true // }, // { // id: "2", // name: "Send email notifications & NPS from your custom domain", // description: "Your users' inbox is a busy place, so to help your brand show up consistently for the launches and asks that matter most, we're excited to share that you can now send changelog post email notifications and NPS email surveys from your own custom domain and email!", // updated_at: "September 07, 2024", // is_new: true // }, // { // id: "3", // name: "Power up your customer communications toolkit with Userflow! 🧰", // description: "With our new SSO (Single-Sign-On) feature, you can now seamlessly sign up to Userflow with your existing Beamer account and fast-track your users to the aha moment!", // updated_at: "June 28, 2024", // is_new: false // }, // { // id: "4", // name: "A small step for our post editor a giant leap for... 🚀", // description: "With our new SSO (Single-Sign-On) feature, you can now seamlessly sign up to Userflow with your existing Beamer account and fast-track your users to the aha moment!", // updated_at: "June 14, 2023", // is_new: false // }, // { // id: "5", // name: "Beamer 2024: The Year in Review ✨", // description: "With our new SSO (Single-Sign-On) feature, you can now seamlessly sign up to Userflow with your existing Beamer account and fast-track your users to the aha moment!", // updated_at: "December 24, 2024", // is_new: false // }, // ] // } return data; }); exports.fetchAnnouncements = fetchAnnouncements;