diff --git a/api/bots/mother.ts b/api/bots/mother.ts index 3176975..5ab5079 100644 --- a/api/bots/mother.ts +++ b/api/bots/mother.ts @@ -1,6 +1,7 @@ // import * as SphinxBot from '../../../sphinx-bot' import * as Sphinx from 'sphinx-bot' import { finalAction } from '../controllers/actions' +import { installBot } from '../controllers/bots' import * as path from 'path' import * as WelcomeBot from './welcome' import * as LoopBot from './loop' @@ -85,8 +86,11 @@ export function init() { const bot = await getBotByName(botName) if(bot && bot.uuid) { console.log('=> FOUDN BOT', bot) - // send msg to bot owner - // await models.ChatBot.create(chatBot) + const chat = await models.Chat.findOne({where:{ + uuid: message.channel.id + }}) + if(!chat) return + installBot(chat.id, bot) } else { const embed = new Sphinx.MessageEmbed() .setAuthor('MotherBot') diff --git a/api/controllers/bots.ts b/api/controllers/bots.ts index c363af5..ea56a2a 100644 --- a/api/controllers/bots.ts +++ b/api/controllers/bots.ts @@ -20,18 +20,30 @@ export const getBots = async (req, res) => { } export const createBot = async (req, res) => { - const { name, webhook } = req.body + const { name, webhook, price_per_use, img, description, tags, } = req.body const uuid = await tribes.genSignedTimestamp() const newBot = { name, uuid, webhook, id: crypto.randomBytes(12).toString('hex').toUpperCase(), secret: crypto.randomBytes(16).toString('hex').toUpperCase(), - pricePerUse: 0 + pricePerUse: price_per_use||0 } try { + const owner = await models.Contact.findOne({ where: { isOwner: true } }) const theBot = await models.Bot.create(newBot) // post to bots.sphinx.chat + tribes.declare_bot({ + uuid, + owner_pubkey: owner.publicKey, + price_per_use, + name: name, + description: description||'', + tags: tags||[], + img: img||'', + unlisted:false, + deleted:false, + }) success(res, jsonUtils.botToJson(theBot)) } catch (e) { failure(res, 'bot creation failed') @@ -50,33 +62,29 @@ export const deleteBot = async (req, res) => { } } -// async function broadcastAction(chat,text){ -// finalAction({ -// action:'broadcast', -// text, chatUUID: chat.uuid, -// botName:'MotherBot' -// }) -// } - -export function installBot(botname, botInTribe) { - console.log("INSTALL BOT NOW") - // search registry for bot (by name) - - // need bot uuid and maker pubkey - // send bot_install to bot maker - - // generate ChatMember with bot=true - // bot_maker_pubkey, bot_uuid, bot_prefix +export async function installBot(chatId:number, bot_json) { + const {uuid,owner_pubkey,unique_name,price_per_use} = bot_json + const chatBot = { + chatId, + botPrefix: '/' +unique_name, + botType: constants.bot_types.remote, + botUuid: uuid, + botMakerPubkey: owner_pubkey, + pricePerUse: price_per_use + } + console.log("installBot INSTALL BOT NOW",chatBot) + keysendBotInstall(chatBot) + await models.ChatBot.create(chatBot) } -export async function sendBotInstall(_, b): Promise { +export async function keysendBotInstall(b): Promise { return await botKeysend( constants.message_types.bot_install, b.botUuid, b.botMakerPubkey, b.pricePerUse, ) } -export async function sendBotCmd(msg, b): Promise { +export async function keysendBotCmd(msg, b): Promise { return await botKeysend( constants.message_types.bot_cmd, b.botUuid, b.botMakerPubkey, b.pricePerUse, diff --git a/api/controllers/chatTribes.ts b/api/controllers/chatTribes.ts index 44e34ba..f189d3f 100644 --- a/api/controllers/chatTribes.ts +++ b/api/controllers/chatTribes.ts @@ -222,6 +222,7 @@ export async function editTribe(req, res) { unlisted, is_private: req.body.private, app_url, + deleted: false, }) } catch(e) { okToUpdate = false diff --git a/api/network/intercept.ts b/api/network/intercept.ts index 2a74e38..d51fb75 100644 --- a/api/network/intercept.ts +++ b/api/network/intercept.ts @@ -1,7 +1,7 @@ import {Msg} from './interfaces' import { models } from '../models' import {builtinBotEmit,buildBotPayload} from '../bots' -import {sendBotCmd} from '../controllers/bots' +import {keysendBotCmd} from '../controllers/bots' import * as path from 'path' import fetch from 'node-fetch' @@ -64,11 +64,10 @@ async function emitMessageToBot(msg, botInTribe): Promise { case constants.bot_types.local: return postToBotServer(msg, botInTribe) case constants.bot_types.remote: - return sendBotCmd(msg, botInTribe) + return keysendBotCmd(msg, botInTribe) default: return false } - } async function postToBotServer(msg, botInTribe): Promise { diff --git a/api/utils/tribes.ts b/api/utils/tribes.ts index 6205e7e..036d0a0 100644 --- a/api/utils/tribes.ts +++ b/api/utils/tribes.ts @@ -99,7 +99,28 @@ export async function declare({ uuid, name, description, tags, img, group_key, h } } -export async function edit({ uuid, host, name, description, tags, img, price_per_message, price_to_join, owner_alias, escrow_amount, escrow_millis, unlisted, is_private, app_url }) { +export async function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) { + const host = getHost() + try { + await fetch('https://' + host + '/bots', { + method: 'POST', + body: JSON.stringify({ + uuid, owner_pubkey, + name, description, tags, img: img || '', + price_per_use: price_per_use || 0, + unlisted: unlisted||false, + deleted: deleted||false, + }), + headers: { 'Content-Type': 'application/json' } + }) + // const j = await r.json() + } catch (e) { + console.log('[tribes] unauthorized to declare') + throw e + } +} + +export async function edit({ uuid, host, name, description, tags, img, price_per_message, price_to_join, owner_alias, escrow_amount, escrow_millis, unlisted, is_private, app_url, deleted }) { try { const token = await genSignedTimestamp() await fetch('https://' + host + '/tribe?token=' + token, { @@ -114,6 +135,7 @@ export async function edit({ uuid, host, name, description, tags, img, price_per owner_alias, unlisted: unlisted||false, private: is_private||false, + deleted: deleted||false, app_url: app_url||'', }), headers: { 'Content-Type': 'application/json' } diff --git a/dist/api/bots/mother.js b/dist/api/bots/mother.js index c449b48..9ba93c3 100644 --- a/dist/api/bots/mother.js +++ b/dist/api/bots/mother.js @@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); // import * as SphinxBot from '../../../sphinx-bot' const Sphinx = require("sphinx-bot"); const actions_1 = require("../controllers/actions"); +const bots_1 = require("../controllers/bots"); const path = require("path"); const WelcomeBot = require("./welcome"); const LoopBot = require("./loop"); @@ -92,8 +93,12 @@ function init() { const bot = yield getBotByName(botName); if (bot && bot.uuid) { console.log('=> FOUDN BOT', bot); - // send msg to bot owner - // await models.ChatBot.create(chatBot) + const chat = yield models_1.models.Chat.findOne({ where: { + uuid: message.channel.id + } }); + if (!chat) + return; + bots_1.installBot(chat.id, bot); } else { const embed = new Sphinx.MessageEmbed() diff --git a/dist/api/bots/mother.js.map b/dist/api/bots/mother.js.map index 7af5663..c8e6b6b 100644 --- a/dist/api/bots/mother.js.map +++ b/dist/api/bots/mother.js.map @@ -1 +1 @@ -{"version":3,"file":"mother.js","sourceRoot":"","sources":["../../../api/bots/mother.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,oDAAoD;AACpD,qCAAoC;AACpC,oDAAoD;AACpD,6BAA4B;AAC5B,wCAAuC;AACvC,kCAAiC;AACjC,sCAAkC;AAClC,2CAA8B;AAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAA;AAEjC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAA;AACjD,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAC9E,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE1E,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,SAAS;CACrB,CAAA;AAED,MAAM,kBAAkB,GAAG;IACzB,SAAS,EAAC;QACR,SAAS,CAAC,aAAa,CAAC,OAAO;QAC/B,SAAS,CAAC,aAAa,CAAC,UAAU;KACnC;CACF,CAAA;AAED,MAAM,eAAe,GAAG;IACtB,OAAO,EAAC,YAAY;IACpB,OAAO,EAAC,SAAS;CAClB,CAAA;AAED,SAAgB,IAAI;IAElB,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAA;IAClC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,qBAAW,CAAC,CAAA;IAE9B,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAO,OAAuB,EAAE,EAAE;QAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACtC,IAAI,GAAG,CAAC,MAAM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} \ No newline at end of file diff --git a/dist/api/controllers/bots.js b/dist/api/controllers/bots.js index a14817a..3bc37ae 100644 --- a/dist/api/controllers/bots.js +++ b/dist/api/controllers/bots.js @@ -29,17 +29,29 @@ exports.getBots = (req, res) => __awaiter(void 0, void 0, void 0, function* () { } }); exports.createBot = (req, res) => __awaiter(void 0, void 0, void 0, function* () { - const { name, webhook } = req.body; + const { name, webhook, price_per_use, img, description, tags, } = req.body; const uuid = yield tribes.genSignedTimestamp(); const newBot = { name, uuid, webhook, id: crypto.randomBytes(12).toString('hex').toUpperCase(), secret: crypto.randomBytes(16).toString('hex').toUpperCase(), - pricePerUse: 0 + pricePerUse: price_per_use || 0 }; try { + const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } }); const theBot = yield models_1.models.Bot.create(newBot); // post to bots.sphinx.chat + tribes.declare_bot({ + uuid, + owner_pubkey: owner.publicKey, + price_per_use, + name: name, + description: description || '', + tags: tags || [], + img: img || '', + unlisted: false, + deleted: false, + }); res_1.success(res, jsonUtils.botToJson(theBot)); } catch (e) { @@ -59,34 +71,35 @@ exports.deleteBot = (req, res) => __awaiter(void 0, void 0, void 0, function* () res_1.failure(res, e); } }); -// async function broadcastAction(chat,text){ -// finalAction({ -// action:'broadcast', -// text, chatUUID: chat.uuid, -// botName:'MotherBot' -// }) -// } -function installBot(botname, botInTribe) { - console.log("INSTALL BOT NOW"); - // search registry for bot (by name) - // need bot uuid and maker pubkey - // send bot_install to bot maker - // generate ChatMember with bot=true - // bot_maker_pubkey, bot_uuid, bot_prefix +function installBot(chatId, bot_json) { + return __awaiter(this, void 0, void 0, function* () { + const { uuid, owner_pubkey, unique_name, price_per_use } = bot_json; + const chatBot = { + chatId, + botPrefix: '/' + unique_name, + botType: constants.bot_types.remote, + botUuid: uuid, + botMakerPubkey: owner_pubkey, + pricePerUse: price_per_use + }; + console.log("installBot INSTALL BOT NOW", chatBot); + keysendBotInstall(chatBot); + yield models_1.models.ChatBot.create(chatBot); + }); } exports.installBot = installBot; -function sendBotInstall(_, b) { +function keysendBotInstall(b) { return __awaiter(this, void 0, void 0, function* () { return yield botKeysend(constants.message_types.bot_install, b.botUuid, b.botMakerPubkey, b.pricePerUse); }); } -exports.sendBotInstall = sendBotInstall; -function sendBotCmd(msg, b) { +exports.keysendBotInstall = keysendBotInstall; +function keysendBotCmd(msg, b) { return __awaiter(this, void 0, void 0, function* () { return yield botKeysend(constants.message_types.bot_cmd, b.botUuid, b.botMakerPubkey, b.pricePerUse, msg.message.content); }); } -exports.sendBotCmd = sendBotCmd; +exports.keysendBotCmd = keysendBotCmd; function receiveBotInstall(payload) { return __awaiter(this, void 0, void 0, function* () { console.log('=> receiveBotInstall'); diff --git a/dist/api/controllers/bots.js.map b/dist/api/controllers/bots.js.map index acc64f9..3dab637 100644 --- a/dist/api/controllers/bots.js.map +++ b/dist/api/controllers/bots.js.map @@ -1 +1 @@ -{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../../api/controllers/bots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,0CAAyC;AACzC,iCAAgC;AAChC,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AAErC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAEjE,QAAA,OAAO,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACxC,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;QACvC,aAAO,CAAC,GAAG,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SAC5C,CAAC,CAAA;KACH;IAAC,OAAO,CAAC,EAAE;QACV,aAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;KACxB;AACH,CAAC,CAAA,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AAC,CAAA;QACxE,MAAM,QAAQ,GAAG,CAAC,CAAA;QAClB,MAAM,OAAO,GAAG,eAAe,CAAA;QAC/B,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,OAAO;YACb,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ;gBACR,OAAO,EAAE,EAAC,OAAO,EAAE,OAAO,IAAE,EAAE,EAAC;gBAC/B,MAAM,EAAE;oBACN,OAAO,EAAE,KAAK,CAAC,SAAS;iBACzB;aACF;YACD,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,IAAI,QAAQ,CAAC;SACzC,CAAA;QACD,IAAI;YACF,MAAM,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;YAC/B,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAA;SACb;IACH,CAAC;CAAA;AAtBD,gCAsBC;AAED,oEAAoE;AAEpE,SAAsB,aAAa,CAAC,OAAO;;QACzC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC5C,oCAAoC;QAEpC,yCAAyC;QACzC,4CAA4C;QAC5C,gCAAgC;QAChC,qDAAqD;QACrD,oCAAoC;IACtC,CAAC;CAAA;AAVD,sCAUC;AAED,SAAsB,aAAa,CAAC,OAAO;;QACzC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC5C,uBAAuB;QACvB,8BAA8B;IAEhC,CAAC;CAAA;AAND,sCAMC"} \ No newline at end of file +{"version":3,"file":"bots.js","sourceRoot":"","sources":["../../../api/controllers/bots.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,0CAAyC;AACzC,iCAAgC;AAChC,sCAAk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EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QACxE,MAAM,QAAQ,GAAG,CAAC,CAAA;QAClB,MAAM,OAAO,GAAG,eAAe,CAAA;QAC/B,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,OAAO;YACb,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ;gBACR,OAAO,EAAE,EAAC,OAAO,EAAE,OAAO,IAAE,EAAE,EAAC;gBAC/B,MAAM,EAAE;oBACN,OAAO,EAAE,KAAK,CAAC,SAAS;iBACzB;aACF;YACD,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,aAAa,IAAI,QAAQ,CAAC;SACzC,CAAA;QACD,IAAI;YACF,MAAM,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;YAC/B,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAA;SACb;IACH,CAAC;CAAA;AAtBD,gCAsBC;AAED,oEAAoE;AAEpE,SAAsB,aAAa,CAAC,OAAO;;QACzC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC5C,oCAAoC;QAEpC,yCAAyC;QACzC,4CAA4C;QAC5C,gCAAgC;QAChC,qDAAqD;QACrD,oCAAoC;IACtC,CAAC;CAAA;AAVD,sCAUC;AAED,SAAsB,aAAa,CAAC,OAAO;;QACzC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC5C,uBAAuB;QACvB,8BAA8B;IAEhC,CAAC;CAAA;AAND,sCAMC"} \ No newline at end of file diff --git a/dist/api/controllers/chatTribes.js b/dist/api/controllers/chatTribes.js index 7e8a877..82faefa 100644 --- a/dist/api/controllers/chatTribes.js +++ b/dist/api/controllers/chatTribes.js @@ -210,6 +210,7 @@ function editTribe(req, res) { unlisted, is_private: req.body.private, app_url, + deleted: false, }); } catch (e) { diff --git a/dist/api/controllers/chatTribes.js.map b/dist/api/controllers/chatTribes.js.map index 49fab71..bdf2911 100644 --- a/dist/api/controllers/chatTribes.js.map +++ b/dist/api/controllers/chatTribes.js.map @@ -1 +1 @@ -{"version":3,"file":"chatTribes.js","sourceRoot":"","sources":["../../../api/controllers/chatTribes.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,2CAA0C;AAC1C,sCAA+C;AAC/C,sCAAqC;AACrC,qCAAoC;AACpC,sCAAqC;AACrC,0CAAyC;AACzC,0CAAyC;AACzC,6BAA4B;AAC5B,gCAAyC;AACzC,sCAA+D;AAC/D,yCAA8B;AAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,SAAsB,SAAS,CAAC,GAAG,EAAE,GAAG;;QACvC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;QAC3B,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,IAAI,CAAA;QACxF,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAA;QAEnC,MAAM,QAAQ,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC,EAAC,IAAI,EAAC,EAAC,CAAC,CAAA;QAC1D,IAAG,QAAQ,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAA;YACnD,OAAO,aAAO,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;SACtC;QAED,IAAG,CAAC,YAAY,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE;YACxC,OAAO,CAAC,G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AAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAChD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC7C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/network/intercept.js b/dist/api/network/intercept.js index 8d2947c..ba8e489 100644 --- a/dist/api/network/intercept.js +++ b/dist/api/network/intercept.js @@ -73,7 +73,7 @@ function emitMessageToBot(msg, botInTribe) { case constants.bot_types.local: return postToBotServer(msg, botInTribe); case constants.bot_types.remote: - return bots_2.sendBotCmd(msg, botInTribe); + return bots_2.keysendBotCmd(msg, botInTribe); default: return false; } diff --git a/dist/api/network/intercept.js.map b/dist/api/network/intercept.js.map index 0280710..73bd509 100644 --- a/dist/api/network/intercept.js.map +++ b/dist/api/network/intercept.js.map @@ -1 +1 @@ -{"version":3,"file":"intercept.js","sourceRoot":"","sources":["../../../api/network/intercept.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAClC,kCAAsD;AACtD,8CAA8C;AAC9C,6BAA4B;AAC5B,2CAA8B;AAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E;;;EAGE;AAEF,kDAAkD;AAClD,SAAsB,QAAQ,CAAC,GAAO,EAAE,QAAgB;;QACtD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAA;QAC/B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAA;QACxB,IAAG,OAAO,KAAG,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE;YAC5C,OAAO,KAAK,CAAA,CAAC,sCAAsC;SACpD;QACD,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC;gBAC5C,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;aACpB,EAA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CAAA"} \ No newline at end of file +{"version":3,"file":"intercept.js","sourceRoot":"","sources":["../../../api/network/intercept.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAClC,kCAAsD;AACtD,8CAAiD;AACjD,6BAA4B;AAC5B,2CAA8B;AAE9B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E;;;EAGE;AAEF,kDAAkD;AAClD,SAAsB,QAAQ,CAAC,GAAO,EAAE,QAAgB;;QACtD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAA;QAC/B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAA;QACxB,IAAG,OAAO,KAAG,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE;YAC5C,OAAO,KAAK,CAAA,CAAC,sCAAsC;SACpD;QACD,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC;gBAC5C,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;aACpB,EAAC,CAAC,CAAA;QACH,IAAG,CAAC,IAAI;YAAE,OAAO,KAAK,CAAA;QAEtB,IAAI,OAAO,GAAG,KAAK,CAAA;QAEnB,IAAG,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YAC1B,qBAAc,CAAC,GAAG,CAAC,CAAA;YACnB,OAAO,GAAG,IAAI,CAAA;SACf;QACD,IAAG,OAAO;YAAE,OAAO,OAAO,CAAA;QAE1B,MAAM,WAAW,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC;gBACtD,MAAM,EAAE,IAAI,CAAC,EAAE;aAChB,EAAC,CAAC,CAAA;QAEH,IAAG,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC;YAAE,OAAO,KAAK,CAAA;QAErD,MAAM,YAAY,CAAC,WAA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I,EAAE,UAAU,CAAC,OAAO;aACzB,EAAC,CAAC,CAAA;QACH,IAAG,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM;YAAE,OAAO,KAAK,CAAA;QAC5C,MAAM,CAAC,GAAG,MAAM,oBAAK,CAAC,GAAG,CAAC,OAAO,EAAE;YACjC,MAAM,EAAC,MAAM;YACb,IAAI,EAAC,IAAI,CAAC,SAAS,CACjB,sBAAe,CAAC,GAAG,CAAC,CACrB;YACD,OAAO,EAAC;gBACN,UAAU,EAAE,GAAG,CAAC,MAAM;gBACtB,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAA;QACF,OAAO,CAAC,CAAC,EAAE,CAAA;IACb,CAAC;CAAA;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACjD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC5C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/api/utils/tribes.js b/dist/api/utils/tribes.js index c046488..c9d889c 100644 --- a/dist/api/utils/tribes.js +++ b/dist/api/utils/tribes.js @@ -121,7 +121,31 @@ function declare({ uuid, name, description, tags, img, group_key, host, price_pe }); } exports.declare = declare; -function edit({ uuid, host, name, description, tags, img, price_per_message, price_to_join, owner_alias, escrow_amount, escrow_millis, unlisted, is_private, app_url }) { +function declare_bot({ uuid, name, description, tags, img, price_per_use, owner_pubkey, unlisted, deleted }) { + return __awaiter(this, void 0, void 0, function* () { + const host = getHost(); + try { + yield node_fetch_1.default('https://' + host + '/bots', { + method: 'POST', + body: JSON.stringify({ + uuid, owner_pubkey, + name, description, tags, img: img || '', + price_per_use: price_per_use || 0, + unlisted: unlisted || false, + deleted: deleted || false, + }), + headers: { 'Content-Type': 'application/json' } + }); + // const j = await r.json() + } + catch (e) { + console.log('[tribes] unauthorized to declare'); + throw e; + } + }); +} +exports.declare_bot = declare_bot; +function edit({ uuid, host, name, description, tags, img, price_per_message, price_to_join, owner_alias, escrow_amount, escrow_millis, unlisted, is_private, app_url, deleted }) { return __awaiter(this, void 0, void 0, function* () { try { const token = yield genSignedTimestamp(); @@ -137,6 +161,7 @@ function edit({ uuid, host, name, description, tags, img, price_per_message, pri owner_alias, unlisted: unlisted || false, private: is_private || false, + deleted: deleted || false, app_url: app_url || '', }), headers: { 'Content-Type': 'application/json' } diff --git a/dist/api/utils/tribes.js.map b/dist/api/utils/tribes.js.map index 699fa17..d12dc71 100644 --- a/dist/api/utils/tribes.js.map +++ b/dist/api/utils/tribes.js.map @@ -1 +1 @@ -{"version":3,"file":"tribes.js","sourceRoot":"","sources":["../../../api/utils/tribes.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,iCAAgC;AAChC,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,6BAA4B;AAC5B,2CAA8B;AAC9B,sCAAkC;AAElC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAA;AACjD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE1E,IAAI,MAAW,CAAA;AAEf,SAAsB,OAAO,CAAC,SAAS;;QACrC,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;YAEhC,SAAe,SAAS;;oBACtB,MAAM,GAAG,IAAI,CAAA;oBACb,MAAM,GAAG,GAAG,MAAM,kBAAkB,EAAE,CAAA;oBACtC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,SAAS,MAAM,CAAC,WAAW,OAAO,CAAC,CAAA;oBAC3E,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,MAAM,CAAC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