UNPKG

trello-for-wolves

Version:
179 lines (178 loc) 7.96 kB
"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 __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); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Trello = exports.TrelloForWolvesError = void 0; require("cross-fetch/polyfill"); var Action_1 = require("./resources/Action"); var Batch_1 = require("./resources/Batch"); var Board_1 = require("./resources/Board"); var Card_1 = require("./resources/Card"); var Checklist_1 = require("./resources/Checklist"); var CustomField_1 = require("./resources/CustomField"); var Enterprise_1 = require("./resources/Enterprise"); var Label_1 = require("./resources/Label"); var List_1 = require("./resources/List"); var Member_1 = require("./resources/Member"); var Notification_1 = require("./resources/Notification"); var Organization_1 = require("./resources/Organization"); var Plugin_1 = require("./resources/Plugin"); var Reaction_1 = require("./resources/Reaction"); var Search_1 = require("./resources/Search"); var Token_1 = require("./resources/Token"); var Type_1 = require("./resources/Type"); var Webhook_1 = require("./resources/Webhook"); var fetchFromApi_1 = require("./utils/fetchFromApi"); var TrelloForWolvesError_1 = require("./TrelloForWolvesError"); Object.defineProperty(exports, "TrelloForWolvesError", { enumerable: true, get: function () { return TrelloForWolvesError_1.TrelloForWolvesError; } }); __exportStar(require("./resources/Action"), exports); __exportStar(require("./resources/Attachment"), exports); __exportStar(require("./resources/Batch"), exports); __exportStar(require("./resources/Board"), exports); __exportStar(require("./resources/BoardBackgrounds"), exports); __exportStar(require("./resources/BoardMyPrefs"), exports); __exportStar(require("./resources/BoardPref"), exports); __exportStar(require("./resources/BoardStar"), exports); __exportStar(require("./resources/Card"), exports); __exportStar(require("./resources/CheckItem"), exports); __exportStar(require("./resources/Checklist"), exports); __exportStar(require("./resources/Comment"), exports); __exportStar(require("./resources/CustomEmoji"), exports); __exportStar(require("./resources/CustomField"), exports); __exportStar(require("./resources/CustomFieldOption"), exports); __exportStar(require("./resources/Enterprise"), exports); __exportStar(require("./resources/Label"), exports); __exportStar(require("./resources/List"), exports); __exportStar(require("./resources/Member"), exports); __exportStar(require("./resources/Membership"), exports); __exportStar(require("./resources/Notification"), exports); __exportStar(require("./resources/Organization"), exports); __exportStar(require("./resources/OrganizationPref"), exports); __exportStar(require("./resources/Plugin"), exports); __exportStar(require("./resources/Reaction"), exports); __exportStar(require("./resources/SavedSearch"), exports); __exportStar(require("./resources/Search"), exports); __exportStar(require("./resources/Stickers"), exports); __exportStar(require("./resources/Token"), exports); __exportStar(require("./resources/Type"), exports); __exportStar(require("./resources/Webhook"), exports); __exportStar(require("./typeDefs"), exports); var Trello = /** @class */ (function () { function Trello(trelloConfig) { this.trelloConfig = trelloConfig; } Trello.prototype.makeApiRequest = function (endpoint, paramsByName, fetchConfig) { if (fetchConfig === void 0) { fetchConfig = null; } return (0, fetchFromApi_1.fetchFromApi)({ endpoint: endpoint, trelloConfig: this.trelloConfig, fetchConfig: fetchConfig, paramsByName: paramsByName, }); }; Trello.prototype.actions = function (idAction) { return new Action_1.Action(this.trelloConfig, [], "actions", { identifier: idAction, }); }; Trello.prototype.batch = function () { return new Batch_1.Batch(this.trelloConfig, [], "batch"); }; Trello.prototype.boards = function (idBoard) { if (idBoard === void 0) { idBoard = ""; } return new Board_1.Board(this.trelloConfig, [], "boards", { identifier: idBoard, }); }; Trello.prototype.cards = function (idCard) { if (idCard === void 0) { idCard = ""; } return new Card_1.Card(this.trelloConfig, [], "cards", { identifier: idCard, }); }; Trello.prototype.checklists = function (idChecklist) { if (idChecklist === void 0) { idChecklist = ""; } return new Checklist_1.Checklist(this.trelloConfig, [], "checklists", { identifier: idChecklist, }); }; Trello.prototype.customFields = function (idCustomField) { if (idCustomField === void 0) { idCustomField = ""; } return new CustomField_1.CustomField(this.trelloConfig, [], "customFields", { identifier: idCustomField, }); }; Trello.prototype.emoji = function () { return new Reaction_1.Emoji(this.trelloConfig, [], "emoji"); }; Trello.prototype.enterprises = function (idEnterprise) { return new Enterprise_1.Enterprise(this.trelloConfig, [], "enterprises", { identifier: idEnterprise, }); }; Trello.prototype.labels = function (idLabel) { if (idLabel === void 0) { idLabel = ""; } return new Label_1.Label(this.trelloConfig, [], "labels", { identifier: idLabel, }); }; Trello.prototype.lists = function (idList) { if (idList === void 0) { idList = ""; } return new List_1.List(this.trelloConfig, [], "lists", { identifier: idList, }); }; Trello.prototype.members = function (idMemberOrUserName) { if (idMemberOrUserName === void 0) { idMemberOrUserName = ""; } return new Member_1.Member(this.trelloConfig, [], "members", { identifier: idMemberOrUserName, }); }; Trello.prototype.notifications = function (idNotification) { if (idNotification === void 0) { idNotification = ""; } return new Notification_1.Notification(this.trelloConfig, [], "notifications", { identifier: idNotification, }); }; Trello.prototype.organizations = function (idOrganizationOrName) { if (idOrganizationOrName === void 0) { idOrganizationOrName = ""; } return new Organization_1.Organization(this.trelloConfig, [], "organizations", { identifier: idOrganizationOrName, }); }; Trello.prototype.plugins = function (idPlugin) { if (idPlugin === void 0) { idPlugin = ""; } return new Plugin_1.Plugin(this.trelloConfig, [], "plugins", { identifier: idPlugin, }); }; Trello.prototype.search = function () { return new Search_1.Search(this.trelloConfig, [], "search"); }; Trello.prototype.tokens = function (tokenName) { return new Token_1.Token(this.trelloConfig, [], "tokens", { identifier: tokenName, }); }; Trello.prototype.types = function (idOrganizationOrUser) { return new Type_1.Type(this.trelloConfig, [], "types", { identifier: idOrganizationOrUser, }); }; Trello.prototype.webhooks = function (idWebhook) { if (idWebhook === void 0) { idWebhook = ""; } return new Webhook_1.Webhook(this.trelloConfig, [], "webhooks", { identifier: idWebhook, }); }; return Trello; }()); exports.Trello = Trello;