UNPKG

ebay-api

Version:

eBay API for Node and Browser

48 lines (47 loc) 1.64 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const index_js_1 = __importDefault(require("../../index.js")); class Message extends index_js_1.default { get basePath() { return '/commerce/message/v1'; } getConversations({ limit, offset, conversationStatus, conversationType, referenceId, referenceType, startTime, endTime, otherPartyUsername } = {}) { return this.get('/conversation', { params: { limit, offset, conversation_status: conversationStatus, conversation_type: conversationType, reference_id: referenceId, reference_type: referenceType, start_time: startTime, end_time: endTime, other_party_username: otherPartyUsername } }); } getConversation(conversationId, { conversationType, limit, offset }) { return this.get(`/conversation/${conversationId}`, { params: { conversation_type: conversationType, limit, offset } }); } updateConversation(body) { return this.post('/update_conversation', body); } bulkUpdateConversation(body) { return this.post('/bulk_update_conversation', body); } sendMessage(body) { return this.post('/send_message', body); } ; } Message.id = 'Message'; exports.default = Message;