@superagnt/dub-links 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/index.js +83 -295
- package/openclaw.plugin.json +46 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,21 +8,20 @@ Connect your Dub workspace to superagnt to programmatically manage short links,
|
|
|
8
8
|
openclaw plugins install @superagnt/dub-links
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
This package is the official **OpenClaw** plugin for the **Dub** integration via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com) and your superagnt API key.
|
|
11
|
+
This package is the official **OpenClaw** plugin for the **Dub** integration via [superagnt](https://superagnt.com). Pair it with the [documentation](https://superagnt.com/docs) and your superagnt API key.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Want the live MCP surface instead?
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
the live tool
|
|
17
|
-
|
|
15
|
+
This plugin ships a fixed, baked-in toolset that only needs your
|
|
16
|
+
`SUPERAGNT_API_KEY`. For the live workspace tool surface — the full value
|
|
17
|
+
layer (data sources plus workspace Postgres, schedules, canvases,
|
|
18
|
+
enrichment), growing server-side with no plugin update — install the
|
|
19
|
+
primary superagnt plugin instead:
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
|
|
22
|
+
openclaw plugins install @superagnt/superagnt
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
Without the token the plugin uses its built-in toolset with your
|
|
24
|
-
`SUPERAGNT_API_KEY` — no behavior change from previous versions.
|
|
25
|
-
|
|
26
25
|
## Overview
|
|
27
26
|
|
|
28
27
|
OpenClaw plugin for Dub — manage short links, conversion events, customers, tags, folders, and domains with your superagnt API key.
|
|
@@ -66,8 +65,8 @@ Set `SUPERAGNT_API_KEY` in your environment, or complete browser login when the
|
|
|
66
65
|
|
|
67
66
|
## Documentation
|
|
68
67
|
|
|
69
|
-
- [Documentation](https://superagnt.com) — getting started and concepts
|
|
70
|
-
- [Connection guide (Dub)](https://superagnt.com/
|
|
68
|
+
- [Documentation](https://superagnt.com/docs) — getting started and concepts
|
|
69
|
+
- [Connection guide (Dub)](https://superagnt.com/docs) — setup and endpoints
|
|
71
70
|
- [Dashboard](https://app.superagnt.com/dashboard) — API keys and usage
|
|
72
71
|
|
|
73
72
|
## Related
|
package/index.js
CHANGED
|
@@ -28,194 +28,6 @@ function readAgntConfig() {
|
|
|
28
28
|
|
|
29
29
|
// ── End Auth Module ──────────────────────────────────────────────────────────
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
// ── CLI Module (inlined) ─────────────────────────────────────────────────────
|
|
33
|
-
|
|
34
|
-
function maskApiKey(key) {
|
|
35
|
-
if (!key || typeof key !== 'string') return '(none)'
|
|
36
|
-
const k = key.trim()
|
|
37
|
-
if (k.length <= 8) return k.slice(0, 2) + '…'
|
|
38
|
-
return k.slice(0, 6) + '…' + k.slice(-4)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function registerAgntCli(api) {
|
|
42
|
-
api.registerCli(
|
|
43
|
-
({ program }) => {
|
|
44
|
-
const cmd = program
|
|
45
|
-
.command('superagnt')
|
|
46
|
-
.description('superagnt social data API (status, doctor)')
|
|
47
|
-
|
|
48
|
-
cmd
|
|
49
|
-
.command('status')
|
|
50
|
-
.description('Show whether an API key is configured (masked)')
|
|
51
|
-
.action(async () => {
|
|
52
|
-
const cfg = readAgntConfig()
|
|
53
|
-
const key = cfg?.apiKey
|
|
54
|
-
|
|
55
|
-
console.log('\nsuperagnt status\n')
|
|
56
|
-
if (!key) {
|
|
57
|
-
console.log(' API key: not configured')
|
|
58
|
-
console.log(' Workspace: —')
|
|
59
|
-
console.log('\n Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
console.log(' API key: ' + maskApiKey(key) + ' (from ~/.superagnt/config.json)')
|
|
63
|
-
console.log(' Workspace: ' + (cfg?.workspaceId ?? '—'))
|
|
64
|
-
console.log('')
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
cmd
|
|
68
|
-
.command('doctor')
|
|
69
|
-
.description('Check connectivity and validate API key against api.superagnt.dev')
|
|
70
|
-
.action(async () => {
|
|
71
|
-
console.log('\nsuperagnt doctor\n')
|
|
72
|
-
|
|
73
|
-
try {
|
|
74
|
-
const publicRes = await fetch('https://api.superagnt.com/v1/platforms')
|
|
75
|
-
console.log(' Public API: ' + (publicRes.ok ? 'OK (' + publicRes.status + ')' : 'HTTP ' + publicRes.status))
|
|
76
|
-
} catch (err) {
|
|
77
|
-
const msg = err instanceof Error ? err.message : String(err)
|
|
78
|
-
console.log(' Public API: failed — ' + msg)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const cfg = readAgntConfig()
|
|
82
|
-
const key = cfg?.apiKey
|
|
83
|
-
|
|
84
|
-
if (!key) {
|
|
85
|
-
console.log('\n Authenticated: skipped (no API key)')
|
|
86
|
-
console.log(' Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
87
|
-
return
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
const res = await fetch('https://api.superagnt.com/v1/platforms', {
|
|
92
|
-
headers: { Authorization: 'Bearer ' + key },
|
|
93
|
-
})
|
|
94
|
-
const text = await res.text()
|
|
95
|
-
let summary = 'HTTP ' + res.status
|
|
96
|
-
if (res.ok) {
|
|
97
|
-
try {
|
|
98
|
-
const json = JSON.parse(text)
|
|
99
|
-
const n = Array.isArray(json?.data) ? json.data.length : (json?.data ? Object.keys(json.data).length : 'ok')
|
|
100
|
-
summary = 'OK — platforms payload received (' + (typeof n === 'number' ? n + ' entries' : String(n)) + ')'
|
|
101
|
-
} catch {
|
|
102
|
-
summary = 'OK (' + res.status + ')'
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
console.log(' Authenticated: ' + summary)
|
|
106
|
-
if (!res.ok) {
|
|
107
|
-
console.log(' If 401, get a new key at: https://app.superagnt.com/dashboard')
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
const msg = err instanceof Error ? err.message : String(err)
|
|
111
|
-
console.log(' Authenticated: failed — ' + msg)
|
|
112
|
-
}
|
|
113
|
-
console.log('')
|
|
114
|
-
})
|
|
115
|
-
},
|
|
116
|
-
{ commands: ['superagnt'] },
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// ── End CLI Module ───────────────────────────────────────────────────────────
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// ── System prompt (inlined) ─────────────────────────────────────────────────
|
|
124
|
-
|
|
125
|
-
function getSystemPrompt(state) {
|
|
126
|
-
const scope = "Only the Dub integration (dub)."
|
|
127
|
-
if (state.ready && state.toolCount > 0) {
|
|
128
|
-
return (
|
|
129
|
-
'<superagnt>\n' +
|
|
130
|
-
'Ignore pretrained knowledge about superagnt tool names — use only tools that exist in this session.\n' +
|
|
131
|
-
'\n' +
|
|
132
|
-
'## What superagnt is\n' +
|
|
133
|
-
'superagnt exposes **structured social-data HTTP APIs** behind OpenClaw tools. Scope for this plugin: **' + scope + '**.\n' +
|
|
134
|
-
'\n' +
|
|
135
|
-
'## When to use superagnt tools\n' +
|
|
136
|
-
'- Use superagnt when the user needs **live social/network data** (profiles, posts, companies, comments, etc.) from supported platforms.\n' +
|
|
137
|
-
'- Prefer **discovery** when unsure which endpoint fits: call public discovery (GET /v1/platforms and GET /v1/platforms/{slug}) or read tool descriptions; do not invent endpoints or parameters.\n' +
|
|
138
|
-
'\n' +
|
|
139
|
-
'## Platform selection (high level)\n' +
|
|
140
|
-
'- **linkedin** — B2B enrichment, org/person research, hiring/sales workflows\n' +
|
|
141
|
-
'- **youtube** / **tiktok** — video/creator/channel metadata and content signals\n' +
|
|
142
|
-
'- **x** / **reddit** — short-form social and community threads\n' +
|
|
143
|
-
'- **instagram** — visual/creator discovery where Instagram is the source of truth\n' +
|
|
144
|
-
'- **facebook** — pages/groups/marketplace/adjacent Facebook surface areas exposed by the API\n' +
|
|
145
|
-
'\n' +
|
|
146
|
-
'## Rules\n' +
|
|
147
|
-
'- Do **not** fabricate tool names — pick from the registered superagnt_* tools only.\n' +
|
|
148
|
-
'- If authentication fails (401), tell the user to get a new key at https://app.superagnt.com/dashboard\n' +
|
|
149
|
-
'</superagnt>'
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (state.ready && state.toolCount === 0) {
|
|
154
|
-
return (
|
|
155
|
-
'<superagnt>\n' +
|
|
156
|
-
'The superagnt plugin loaded but registered **zero** API tools. Check your OpenClaw plugin packaging and regenerate the plugin from @superagnt/clawhub.\n' +
|
|
157
|
-
'</superagnt>'
|
|
158
|
-
)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (state.error) {
|
|
162
|
-
return (
|
|
163
|
-
'<superagnt>\n' +
|
|
164
|
-
'superagnt plugin diagnostic: ' + state.error + '\n' +
|
|
165
|
-
'Do not pretend superagnt tools exist. Ask the user to fix configuration and restart the gateway.\n' +
|
|
166
|
-
'</superagnt>'
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return (
|
|
171
|
-
'<superagnt>\n' +
|
|
172
|
-
'superagnt tools are still loading. If the user asks for social data right now, ask them to wait a moment and retry.\n' +
|
|
173
|
-
'</superagnt>'
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// ── End System prompt ────────────────────────────────────────────────────────
|
|
178
|
-
|
|
179
|
-
const MCP_URL = 'https://mcp.superagnt.com/mcp'
|
|
180
|
-
|
|
181
|
-
async function mcpRpc(token, method, params) {
|
|
182
|
-
const res = await fetch(MCP_URL, {
|
|
183
|
-
method: 'POST',
|
|
184
|
-
headers: {
|
|
185
|
-
Authorization: `Bearer ${token}`,
|
|
186
|
-
'Content-Type': 'application/json',
|
|
187
|
-
Accept: 'application/json, text/event-stream',
|
|
188
|
-
},
|
|
189
|
-
body: JSON.stringify({ jsonrpc: '2.0', id: Date.now(), method, params }),
|
|
190
|
-
})
|
|
191
|
-
if (!res.ok) throw new Error(`MCP ${method} failed: HTTP ${res.status}`)
|
|
192
|
-
const data = await res.json()
|
|
193
|
-
if (data.error) throw new Error(`MCP ${method} error: ${data.error.message}`)
|
|
194
|
-
return data.result
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
async function registerLiveMcpTools(api, token) {
|
|
198
|
-
const result = await mcpRpc(token, 'tools/list', {})
|
|
199
|
-
const tools = Array.isArray(result?.tools) ? result.tools : []
|
|
200
|
-
if (tools.length === 0) throw new Error('MCP tools/list returned no tools')
|
|
201
|
-
for (const t of tools) {
|
|
202
|
-
api.registerTool({
|
|
203
|
-
name: t.name,
|
|
204
|
-
description: t.description,
|
|
205
|
-
inputSchema: t.inputSchema,
|
|
206
|
-
execute: async (input) => {
|
|
207
|
-
const args = parseToolInput(input)
|
|
208
|
-
const r = await mcpRpc(token, 'tools/call', { name: t.name, arguments: args })
|
|
209
|
-
if (r && r.structuredContent !== undefined) return r.structuredContent
|
|
210
|
-
const text = Array.isArray(r?.content) ? r.content.find((c) => c.type === 'text')?.text : undefined
|
|
211
|
-
if (text === undefined) return r
|
|
212
|
-
try { return JSON.parse(text) } catch { return text }
|
|
213
|
-
},
|
|
214
|
-
})
|
|
215
|
-
}
|
|
216
|
-
return tools.length
|
|
217
|
-
}
|
|
218
|
-
|
|
219
31
|
function parseToolInput(input) {
|
|
220
32
|
if (input == null) return {}
|
|
221
33
|
if (typeof input === 'object' && !Array.isArray(input)) return input
|
|
@@ -267,9 +79,8 @@ async function callSuperagnt(apiKey, method, path, query, body) {
|
|
|
267
79
|
return res.json()
|
|
268
80
|
}
|
|
269
81
|
|
|
270
|
-
export default
|
|
82
|
+
export default function register(api) {
|
|
271
83
|
const apiKey = api.pluginConfig.apiKey || process.env.SUPERAGNT_API_KEY || readAgntConfig()?.apiKey
|
|
272
|
-
const mcpToken = api.pluginConfig.mcpToken || process.env.SUPERAGNT_MCP_TOKEN
|
|
273
84
|
|
|
274
85
|
function ensureApiKey() {
|
|
275
86
|
if (apiKey) return apiKey
|
|
@@ -281,30 +92,10 @@ export default async function register(api) {
|
|
|
281
92
|
)
|
|
282
93
|
}
|
|
283
94
|
|
|
284
|
-
registerAgntCli(api)
|
|
285
|
-
|
|
286
|
-
const promptState = { toolCount: 0, error: '', ready: false }
|
|
287
|
-
api.on('before_prompt_build', () => ({
|
|
288
|
-
prependSystemContext: getSystemPrompt(promptState),
|
|
289
|
-
}))
|
|
290
|
-
|
|
291
|
-
// Live MCP mode: a workspace MCP token upgrades this plugin to the server's
|
|
292
|
-
// own tool surface, fetched fresh at load — it grows with agnt_tools_enable
|
|
293
|
-
// and never goes stale. Any failure falls back to the baked toolset below.
|
|
294
|
-
if (mcpToken) {
|
|
295
|
-
try {
|
|
296
|
-
promptState.toolCount = await registerLiveMcpTools(api, mcpToken)
|
|
297
|
-
promptState.ready = true
|
|
298
|
-
return
|
|
299
|
-
} catch (err) {
|
|
300
|
-
promptState.error = 'Live MCP connect failed (' + (err && err.message ? err.message : err) + '); using the built-in toolset.'
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
95
|
api.registerTool({
|
|
305
96
|
name: 'superagnt_connection_dub_getLinks',
|
|
306
97
|
description: "Retrieve a list of links",
|
|
307
|
-
|
|
98
|
+
parameters: {
|
|
308
99
|
"type": "object",
|
|
309
100
|
"properties": {
|
|
310
101
|
"domain": {
|
|
@@ -366,7 +157,7 @@ export default async function register(api) {
|
|
|
366
157
|
}
|
|
367
158
|
},
|
|
368
159
|
execute: async (input) => {
|
|
369
|
-
const key =
|
|
160
|
+
const key = ensureApiKey()
|
|
370
161
|
const params = parseToolInput(input)
|
|
371
162
|
return callSuperagnt(key, 'GET', '/links', params)
|
|
372
163
|
},
|
|
@@ -375,12 +166,12 @@ export default async function register(api) {
|
|
|
375
166
|
api.registerTool({
|
|
376
167
|
name: 'superagnt_connection_dub_createLink',
|
|
377
168
|
description: "Create a link",
|
|
378
|
-
|
|
169
|
+
parameters: {
|
|
379
170
|
"type": "object",
|
|
380
171
|
"properties": {}
|
|
381
172
|
},
|
|
382
173
|
execute: async (input) => {
|
|
383
|
-
const key =
|
|
174
|
+
const key = ensureApiKey()
|
|
384
175
|
const params = parseToolInput(input)
|
|
385
176
|
return callSuperagnt(key, 'POST', '/links', undefined, params)
|
|
386
177
|
},
|
|
@@ -389,12 +180,12 @@ export default async function register(api) {
|
|
|
389
180
|
api.registerTool({
|
|
390
181
|
name: 'superagnt_connection_dub_upsertLink',
|
|
391
182
|
description: "Upsert a link",
|
|
392
|
-
|
|
183
|
+
parameters: {
|
|
393
184
|
"type": "object",
|
|
394
185
|
"properties": {}
|
|
395
186
|
},
|
|
396
187
|
execute: async (input) => {
|
|
397
|
-
const key =
|
|
188
|
+
const key = ensureApiKey()
|
|
398
189
|
const params = parseToolInput(input)
|
|
399
190
|
return callSuperagnt(key, 'PUT', '/links', undefined, params)
|
|
400
191
|
},
|
|
@@ -403,7 +194,7 @@ export default async function register(api) {
|
|
|
403
194
|
api.registerTool({
|
|
404
195
|
name: 'superagnt_connection_dub_getLinkInfo',
|
|
405
196
|
description: "Retrieve a link",
|
|
406
|
-
|
|
197
|
+
parameters: {
|
|
407
198
|
"type": "object",
|
|
408
199
|
"properties": {
|
|
409
200
|
"domain": {
|
|
@@ -425,7 +216,7 @@ export default async function register(api) {
|
|
|
425
216
|
}
|
|
426
217
|
},
|
|
427
218
|
execute: async (input) => {
|
|
428
|
-
const key =
|
|
219
|
+
const key = ensureApiKey()
|
|
429
220
|
const params = parseToolInput(input)
|
|
430
221
|
return callSuperagnt(key, 'GET', '/links/info', params)
|
|
431
222
|
},
|
|
@@ -434,7 +225,7 @@ export default async function register(api) {
|
|
|
434
225
|
api.registerTool({
|
|
435
226
|
name: 'superagnt_connection_dub_getLinksCount',
|
|
436
227
|
description: "Retrieve links count",
|
|
437
|
-
|
|
228
|
+
parameters: {
|
|
438
229
|
"type": "object",
|
|
439
230
|
"properties": {
|
|
440
231
|
"domain": {
|
|
@@ -472,7 +263,7 @@ export default async function register(api) {
|
|
|
472
263
|
}
|
|
473
264
|
},
|
|
474
265
|
execute: async (input) => {
|
|
475
|
-
const key =
|
|
266
|
+
const key = ensureApiKey()
|
|
476
267
|
const params = parseToolInput(input)
|
|
477
268
|
return callSuperagnt(key, 'GET', '/links/count', params)
|
|
478
269
|
},
|
|
@@ -481,7 +272,7 @@ export default async function register(api) {
|
|
|
481
272
|
api.registerTool({
|
|
482
273
|
name: 'superagnt_connection_dub_updateLink',
|
|
483
274
|
description: "Update a link",
|
|
484
|
-
|
|
275
|
+
parameters: {
|
|
485
276
|
"type": "object",
|
|
486
277
|
"properties": {
|
|
487
278
|
"linkId": {
|
|
@@ -494,7 +285,7 @@ export default async function register(api) {
|
|
|
494
285
|
]
|
|
495
286
|
},
|
|
496
287
|
execute: async (input) => {
|
|
497
|
-
const key =
|
|
288
|
+
const key = ensureApiKey()
|
|
498
289
|
const params = parseToolInput(input)
|
|
499
290
|
return callSuperagnt(key, 'PATCH', '/links/{linkId}', undefined, params)
|
|
500
291
|
},
|
|
@@ -503,7 +294,7 @@ export default async function register(api) {
|
|
|
503
294
|
api.registerTool({
|
|
504
295
|
name: 'superagnt_connection_dub_deleteLink',
|
|
505
296
|
description: "Delete a link",
|
|
506
|
-
|
|
297
|
+
parameters: {
|
|
507
298
|
"type": "object",
|
|
508
299
|
"properties": {
|
|
509
300
|
"linkId": {
|
|
@@ -516,7 +307,7 @@ export default async function register(api) {
|
|
|
516
307
|
]
|
|
517
308
|
},
|
|
518
309
|
execute: async (input) => {
|
|
519
|
-
const key =
|
|
310
|
+
const key = ensureApiKey()
|
|
520
311
|
const params = parseToolInput(input)
|
|
521
312
|
return callSuperagnt(key, 'DELETE', '/links/{linkId}', undefined, params)
|
|
522
313
|
},
|
|
@@ -525,12 +316,12 @@ export default async function register(api) {
|
|
|
525
316
|
api.registerTool({
|
|
526
317
|
name: 'superagnt_connection_dub_bulkCreateLinks',
|
|
527
318
|
description: "Bulk create links",
|
|
528
|
-
|
|
319
|
+
parameters: {
|
|
529
320
|
"type": "object",
|
|
530
321
|
"properties": {}
|
|
531
322
|
},
|
|
532
323
|
execute: async (input) => {
|
|
533
|
-
const key =
|
|
324
|
+
const key = ensureApiKey()
|
|
534
325
|
const params = parseToolInput(input)
|
|
535
326
|
return callSuperagnt(key, 'POST', '/links/bulk', undefined, params)
|
|
536
327
|
},
|
|
@@ -539,7 +330,7 @@ export default async function register(api) {
|
|
|
539
330
|
api.registerTool({
|
|
540
331
|
name: 'superagnt_connection_dub_bulkUpdateLinks',
|
|
541
332
|
description: "Bulk update links",
|
|
542
|
-
|
|
333
|
+
parameters: {
|
|
543
334
|
"type": "object",
|
|
544
335
|
"properties": {
|
|
545
336
|
"linkIds": {
|
|
@@ -560,7 +351,7 @@ export default async function register(api) {
|
|
|
560
351
|
]
|
|
561
352
|
},
|
|
562
353
|
execute: async (input) => {
|
|
563
|
-
const key =
|
|
354
|
+
const key = ensureApiKey()
|
|
564
355
|
const params = parseToolInput(input)
|
|
565
356
|
return callSuperagnt(key, 'PATCH', '/links/bulk', undefined, params)
|
|
566
357
|
},
|
|
@@ -569,7 +360,7 @@ export default async function register(api) {
|
|
|
569
360
|
api.registerTool({
|
|
570
361
|
name: 'superagnt_connection_dub_bulkDeleteLinks',
|
|
571
362
|
description: "Bulk delete links",
|
|
572
|
-
|
|
363
|
+
parameters: {
|
|
573
364
|
"type": "object",
|
|
574
365
|
"properties": {
|
|
575
366
|
"linkIds": {
|
|
@@ -582,7 +373,7 @@ export default async function register(api) {
|
|
|
582
373
|
]
|
|
583
374
|
},
|
|
584
375
|
execute: async (input) => {
|
|
585
|
-
const key =
|
|
376
|
+
const key = ensureApiKey()
|
|
586
377
|
const params = parseToolInput(input)
|
|
587
378
|
return callSuperagnt(key, 'DELETE', '/links/bulk', undefined, params)
|
|
588
379
|
},
|
|
@@ -591,7 +382,7 @@ export default async function register(api) {
|
|
|
591
382
|
api.registerTool({
|
|
592
383
|
name: 'superagnt_connection_dub_retrieveAnalytics',
|
|
593
384
|
description: "Retrieve analytics",
|
|
594
|
-
|
|
385
|
+
parameters: {
|
|
595
386
|
"type": "object",
|
|
596
387
|
"properties": {
|
|
597
388
|
"event": {
|
|
@@ -737,7 +528,7 @@ export default async function register(api) {
|
|
|
737
528
|
}
|
|
738
529
|
},
|
|
739
530
|
execute: async (input) => {
|
|
740
|
-
const key =
|
|
531
|
+
const key = ensureApiKey()
|
|
741
532
|
const params = parseToolInput(input)
|
|
742
533
|
return callSuperagnt(key, 'GET', '/analytics', params)
|
|
743
534
|
},
|
|
@@ -746,7 +537,7 @@ export default async function register(api) {
|
|
|
746
537
|
api.registerTool({
|
|
747
538
|
name: 'superagnt_connection_dub_listEvents',
|
|
748
539
|
description: "Retrieve a list of events",
|
|
749
|
-
|
|
540
|
+
parameters: {
|
|
750
541
|
"type": "object",
|
|
751
542
|
"properties": {
|
|
752
543
|
"event": {
|
|
@@ -892,7 +683,7 @@ export default async function register(api) {
|
|
|
892
683
|
}
|
|
893
684
|
},
|
|
894
685
|
execute: async (input) => {
|
|
895
|
-
const key =
|
|
686
|
+
const key = ensureApiKey()
|
|
896
687
|
const params = parseToolInput(input)
|
|
897
688
|
return callSuperagnt(key, 'GET', '/events', params)
|
|
898
689
|
},
|
|
@@ -901,7 +692,7 @@ export default async function register(api) {
|
|
|
901
692
|
api.registerTool({
|
|
902
693
|
name: 'superagnt_connection_dub_getTags',
|
|
903
694
|
description: "Retrieve a list of tags",
|
|
904
|
-
|
|
695
|
+
parameters: {
|
|
905
696
|
"type": "object",
|
|
906
697
|
"properties": {
|
|
907
698
|
"sortBy": {
|
|
@@ -931,7 +722,7 @@ export default async function register(api) {
|
|
|
931
722
|
}
|
|
932
723
|
},
|
|
933
724
|
execute: async (input) => {
|
|
934
|
-
const key =
|
|
725
|
+
const key = ensureApiKey()
|
|
935
726
|
const params = parseToolInput(input)
|
|
936
727
|
return callSuperagnt(key, 'GET', '/tags', params)
|
|
937
728
|
},
|
|
@@ -940,7 +731,7 @@ export default async function register(api) {
|
|
|
940
731
|
api.registerTool({
|
|
941
732
|
name: 'superagnt_connection_dub_createTag',
|
|
942
733
|
description: "Create a tag",
|
|
943
|
-
|
|
734
|
+
parameters: {
|
|
944
735
|
"type": "object",
|
|
945
736
|
"properties": {
|
|
946
737
|
"name": {
|
|
@@ -954,7 +745,7 @@ export default async function register(api) {
|
|
|
954
745
|
}
|
|
955
746
|
},
|
|
956
747
|
execute: async (input) => {
|
|
957
|
-
const key =
|
|
748
|
+
const key = ensureApiKey()
|
|
958
749
|
const params = parseToolInput(input)
|
|
959
750
|
return callSuperagnt(key, 'POST', '/tags', undefined, params)
|
|
960
751
|
},
|
|
@@ -963,7 +754,7 @@ export default async function register(api) {
|
|
|
963
754
|
api.registerTool({
|
|
964
755
|
name: 'superagnt_connection_dub_updateTag',
|
|
965
756
|
description: "Update a tag",
|
|
966
|
-
|
|
757
|
+
parameters: {
|
|
967
758
|
"type": "object",
|
|
968
759
|
"properties": {
|
|
969
760
|
"id": {
|
|
@@ -984,7 +775,7 @@ export default async function register(api) {
|
|
|
984
775
|
]
|
|
985
776
|
},
|
|
986
777
|
execute: async (input) => {
|
|
987
|
-
const key =
|
|
778
|
+
const key = ensureApiKey()
|
|
988
779
|
const params = parseToolInput(input)
|
|
989
780
|
return callSuperagnt(key, 'PATCH', '/tags/{id}', undefined, params)
|
|
990
781
|
},
|
|
@@ -993,7 +784,7 @@ export default async function register(api) {
|
|
|
993
784
|
api.registerTool({
|
|
994
785
|
name: 'superagnt_connection_dub_listFolders',
|
|
995
786
|
description: "Retrieve a list of folders",
|
|
996
|
-
|
|
787
|
+
parameters: {
|
|
997
788
|
"type": "object",
|
|
998
789
|
"properties": {
|
|
999
790
|
"search": {
|
|
@@ -1011,7 +802,7 @@ export default async function register(api) {
|
|
|
1011
802
|
}
|
|
1012
803
|
},
|
|
1013
804
|
execute: async (input) => {
|
|
1014
|
-
const key =
|
|
805
|
+
const key = ensureApiKey()
|
|
1015
806
|
const params = parseToolInput(input)
|
|
1016
807
|
return callSuperagnt(key, 'GET', '/folders', params)
|
|
1017
808
|
},
|
|
@@ -1020,7 +811,7 @@ export default async function register(api) {
|
|
|
1020
811
|
api.registerTool({
|
|
1021
812
|
name: 'superagnt_connection_dub_createFolder',
|
|
1022
813
|
description: "Create a folder",
|
|
1023
|
-
|
|
814
|
+
parameters: {
|
|
1024
815
|
"type": "object",
|
|
1025
816
|
"properties": {
|
|
1026
817
|
"name": {
|
|
@@ -1037,7 +828,7 @@ export default async function register(api) {
|
|
|
1037
828
|
]
|
|
1038
829
|
},
|
|
1039
830
|
execute: async (input) => {
|
|
1040
|
-
const key =
|
|
831
|
+
const key = ensureApiKey()
|
|
1041
832
|
const params = parseToolInput(input)
|
|
1042
833
|
return callSuperagnt(key, 'POST', '/folders', undefined, params)
|
|
1043
834
|
},
|
|
@@ -1046,7 +837,7 @@ export default async function register(api) {
|
|
|
1046
837
|
api.registerTool({
|
|
1047
838
|
name: 'superagnt_connection_dub_updateFolder',
|
|
1048
839
|
description: "Update a folder",
|
|
1049
|
-
|
|
840
|
+
parameters: {
|
|
1050
841
|
"type": "object",
|
|
1051
842
|
"properties": {
|
|
1052
843
|
"id": {
|
|
@@ -1067,7 +858,7 @@ export default async function register(api) {
|
|
|
1067
858
|
]
|
|
1068
859
|
},
|
|
1069
860
|
execute: async (input) => {
|
|
1070
|
-
const key =
|
|
861
|
+
const key = ensureApiKey()
|
|
1071
862
|
const params = parseToolInput(input)
|
|
1072
863
|
return callSuperagnt(key, 'PATCH', '/folders/{id}', undefined, params)
|
|
1073
864
|
},
|
|
@@ -1076,7 +867,7 @@ export default async function register(api) {
|
|
|
1076
867
|
api.registerTool({
|
|
1077
868
|
name: 'superagnt_connection_dub_deleteFolder',
|
|
1078
869
|
description: "Delete a folder",
|
|
1079
|
-
|
|
870
|
+
parameters: {
|
|
1080
871
|
"type": "object",
|
|
1081
872
|
"properties": {
|
|
1082
873
|
"id": {
|
|
@@ -1089,7 +880,7 @@ export default async function register(api) {
|
|
|
1089
880
|
]
|
|
1090
881
|
},
|
|
1091
882
|
execute: async (input) => {
|
|
1092
|
-
const key =
|
|
883
|
+
const key = ensureApiKey()
|
|
1093
884
|
const params = parseToolInput(input)
|
|
1094
885
|
return callSuperagnt(key, 'DELETE', '/folders/{id}', undefined, params)
|
|
1095
886
|
},
|
|
@@ -1098,7 +889,7 @@ export default async function register(api) {
|
|
|
1098
889
|
api.registerTool({
|
|
1099
890
|
name: 'superagnt_connection_dub_listCustomers',
|
|
1100
891
|
description: "Retrieve a list of customers",
|
|
1101
|
-
|
|
892
|
+
parameters: {
|
|
1102
893
|
"type": "object",
|
|
1103
894
|
"properties": {
|
|
1104
895
|
"email": {
|
|
@@ -1140,7 +931,7 @@ export default async function register(api) {
|
|
|
1140
931
|
}
|
|
1141
932
|
},
|
|
1142
933
|
execute: async (input) => {
|
|
1143
|
-
const key =
|
|
934
|
+
const key = ensureApiKey()
|
|
1144
935
|
const params = parseToolInput(input)
|
|
1145
936
|
return callSuperagnt(key, 'GET', '/customers', params)
|
|
1146
937
|
},
|
|
@@ -1149,7 +940,7 @@ export default async function register(api) {
|
|
|
1149
940
|
api.registerTool({
|
|
1150
941
|
name: 'superagnt_connection_dub_getCustomer',
|
|
1151
942
|
description: "Retrieve a customer",
|
|
1152
|
-
|
|
943
|
+
parameters: {
|
|
1153
944
|
"type": "object",
|
|
1154
945
|
"properties": {
|
|
1155
946
|
"id": {
|
|
@@ -1166,7 +957,7 @@ export default async function register(api) {
|
|
|
1166
957
|
]
|
|
1167
958
|
},
|
|
1168
959
|
execute: async (input) => {
|
|
1169
|
-
const key =
|
|
960
|
+
const key = ensureApiKey()
|
|
1170
961
|
const params = parseToolInput(input)
|
|
1171
962
|
return callSuperagnt(key, 'GET', '/customers/{id}', params)
|
|
1172
963
|
},
|
|
@@ -1175,7 +966,7 @@ export default async function register(api) {
|
|
|
1175
966
|
api.registerTool({
|
|
1176
967
|
name: 'superagnt_connection_dub_updateCustomer',
|
|
1177
968
|
description: "Update a customer",
|
|
1178
|
-
|
|
969
|
+
parameters: {
|
|
1179
970
|
"type": "object",
|
|
1180
971
|
"properties": {
|
|
1181
972
|
"id": {
|
|
@@ -1204,7 +995,7 @@ export default async function register(api) {
|
|
|
1204
995
|
]
|
|
1205
996
|
},
|
|
1206
997
|
execute: async (input) => {
|
|
1207
|
-
const key =
|
|
998
|
+
const key = ensureApiKey()
|
|
1208
999
|
const params = parseToolInput(input)
|
|
1209
1000
|
return callSuperagnt(key, 'PATCH', '/customers/{id}', undefined, params)
|
|
1210
1001
|
},
|
|
@@ -1213,7 +1004,7 @@ export default async function register(api) {
|
|
|
1213
1004
|
api.registerTool({
|
|
1214
1005
|
name: 'superagnt_connection_dub_deleteCustomer',
|
|
1215
1006
|
description: "Delete a customer",
|
|
1216
|
-
|
|
1007
|
+
parameters: {
|
|
1217
1008
|
"type": "object",
|
|
1218
1009
|
"properties": {
|
|
1219
1010
|
"id": {
|
|
@@ -1226,7 +1017,7 @@ export default async function register(api) {
|
|
|
1226
1017
|
]
|
|
1227
1018
|
},
|
|
1228
1019
|
execute: async (input) => {
|
|
1229
|
-
const key =
|
|
1020
|
+
const key = ensureApiKey()
|
|
1230
1021
|
const params = parseToolInput(input)
|
|
1231
1022
|
return callSuperagnt(key, 'DELETE', '/customers/{id}', undefined, params)
|
|
1232
1023
|
},
|
|
@@ -1235,7 +1026,7 @@ export default async function register(api) {
|
|
|
1235
1026
|
api.registerTool({
|
|
1236
1027
|
name: 'superagnt_connection_dub_createDomain',
|
|
1237
1028
|
description: "Create a domain",
|
|
1238
|
-
|
|
1029
|
+
parameters: {
|
|
1239
1030
|
"type": "object",
|
|
1240
1031
|
"properties": {
|
|
1241
1032
|
"slug": {
|
|
@@ -1264,7 +1055,7 @@ export default async function register(api) {
|
|
|
1264
1055
|
]
|
|
1265
1056
|
},
|
|
1266
1057
|
execute: async (input) => {
|
|
1267
|
-
const key =
|
|
1058
|
+
const key = ensureApiKey()
|
|
1268
1059
|
const params = parseToolInput(input)
|
|
1269
1060
|
return callSuperagnt(key, 'POST', '/domains', undefined, params)
|
|
1270
1061
|
},
|
|
@@ -1273,7 +1064,7 @@ export default async function register(api) {
|
|
|
1273
1064
|
api.registerTool({
|
|
1274
1065
|
name: 'superagnt_connection_dub_updateDomain',
|
|
1275
1066
|
description: "Update a domain",
|
|
1276
|
-
|
|
1067
|
+
parameters: {
|
|
1277
1068
|
"type": "object",
|
|
1278
1069
|
"properties": {
|
|
1279
1070
|
"slug": {
|
|
@@ -1302,7 +1093,7 @@ export default async function register(api) {
|
|
|
1302
1093
|
]
|
|
1303
1094
|
},
|
|
1304
1095
|
execute: async (input) => {
|
|
1305
|
-
const key =
|
|
1096
|
+
const key = ensureApiKey()
|
|
1306
1097
|
const params = parseToolInput(input)
|
|
1307
1098
|
return callSuperagnt(key, 'PATCH', '/domains/{slug}', undefined, params)
|
|
1308
1099
|
},
|
|
@@ -1311,7 +1102,7 @@ export default async function register(api) {
|
|
|
1311
1102
|
api.registerTool({
|
|
1312
1103
|
name: 'superagnt_connection_dub_deleteDomain',
|
|
1313
1104
|
description: "Delete a domain",
|
|
1314
|
-
|
|
1105
|
+
parameters: {
|
|
1315
1106
|
"type": "object",
|
|
1316
1107
|
"properties": {
|
|
1317
1108
|
"slug": {
|
|
@@ -1324,7 +1115,7 @@ export default async function register(api) {
|
|
|
1324
1115
|
]
|
|
1325
1116
|
},
|
|
1326
1117
|
execute: async (input) => {
|
|
1327
|
-
const key =
|
|
1118
|
+
const key = ensureApiKey()
|
|
1328
1119
|
const params = parseToolInput(input)
|
|
1329
1120
|
return callSuperagnt(key, 'DELETE', '/domains/{slug}', undefined, params)
|
|
1330
1121
|
},
|
|
@@ -1333,7 +1124,7 @@ export default async function register(api) {
|
|
|
1333
1124
|
api.registerTool({
|
|
1334
1125
|
name: 'superagnt_connection_dub_trackLead',
|
|
1335
1126
|
description: "Track a lead",
|
|
1336
|
-
|
|
1127
|
+
parameters: {
|
|
1337
1128
|
"type": "object",
|
|
1338
1129
|
"properties": {
|
|
1339
1130
|
"clickId": {
|
|
@@ -1380,7 +1171,7 @@ export default async function register(api) {
|
|
|
1380
1171
|
]
|
|
1381
1172
|
},
|
|
1382
1173
|
execute: async (input) => {
|
|
1383
|
-
const key =
|
|
1174
|
+
const key = ensureApiKey()
|
|
1384
1175
|
const params = parseToolInput(input)
|
|
1385
1176
|
return callSuperagnt(key, 'POST', '/track/lead', undefined, params)
|
|
1386
1177
|
},
|
|
@@ -1389,7 +1180,7 @@ export default async function register(api) {
|
|
|
1389
1180
|
api.registerTool({
|
|
1390
1181
|
name: 'superagnt_connection_dub_trackSale',
|
|
1391
1182
|
description: "Track a sale",
|
|
1392
|
-
|
|
1183
|
+
parameters: {
|
|
1393
1184
|
"type": "object",
|
|
1394
1185
|
"properties": {
|
|
1395
1186
|
"customerExternalId": {
|
|
@@ -1447,7 +1238,7 @@ export default async function register(api) {
|
|
|
1447
1238
|
]
|
|
1448
1239
|
},
|
|
1449
1240
|
execute: async (input) => {
|
|
1450
|
-
const key =
|
|
1241
|
+
const key = ensureApiKey()
|
|
1451
1242
|
const params = parseToolInput(input)
|
|
1452
1243
|
return callSuperagnt(key, 'POST', '/track/sale', undefined, params)
|
|
1453
1244
|
},
|
|
@@ -1456,7 +1247,7 @@ export default async function register(api) {
|
|
|
1456
1247
|
api.registerTool({
|
|
1457
1248
|
name: 'superagnt_connection_dub_listPartners',
|
|
1458
1249
|
description: "List partners",
|
|
1459
|
-
|
|
1250
|
+
parameters: {
|
|
1460
1251
|
"type": "object",
|
|
1461
1252
|
"properties": {
|
|
1462
1253
|
"groupId": {
|
|
@@ -1502,7 +1293,7 @@ export default async function register(api) {
|
|
|
1502
1293
|
}
|
|
1503
1294
|
},
|
|
1504
1295
|
execute: async (input) => {
|
|
1505
|
-
const key =
|
|
1296
|
+
const key = ensureApiKey()
|
|
1506
1297
|
const params = parseToolInput(input)
|
|
1507
1298
|
return callSuperagnt(key, 'GET', '/partners', params)
|
|
1508
1299
|
},
|
|
@@ -1511,7 +1302,7 @@ export default async function register(api) {
|
|
|
1511
1302
|
api.registerTool({
|
|
1512
1303
|
name: 'superagnt_connection_dub_createPartner',
|
|
1513
1304
|
description: "Create or update a partner",
|
|
1514
|
-
|
|
1305
|
+
parameters: {
|
|
1515
1306
|
"type": "object",
|
|
1516
1307
|
"properties": {
|
|
1517
1308
|
"email": {
|
|
@@ -1556,7 +1347,7 @@ export default async function register(api) {
|
|
|
1556
1347
|
]
|
|
1557
1348
|
},
|
|
1558
1349
|
execute: async (input) => {
|
|
1559
|
-
const key =
|
|
1350
|
+
const key = ensureApiKey()
|
|
1560
1351
|
const params = parseToolInput(input)
|
|
1561
1352
|
return callSuperagnt(key, 'POST', '/partners', undefined, params)
|
|
1562
1353
|
},
|
|
@@ -1565,7 +1356,7 @@ export default async function register(api) {
|
|
|
1565
1356
|
api.registerTool({
|
|
1566
1357
|
name: 'superagnt_connection_dub_retrievePartnerLinks',
|
|
1567
1358
|
description: "Retrieve a partner's links",
|
|
1568
|
-
|
|
1359
|
+
parameters: {
|
|
1569
1360
|
"type": "object",
|
|
1570
1361
|
"properties": {
|
|
1571
1362
|
"partnerId": {
|
|
@@ -1579,7 +1370,7 @@ export default async function register(api) {
|
|
|
1579
1370
|
}
|
|
1580
1371
|
},
|
|
1581
1372
|
execute: async (input) => {
|
|
1582
|
-
const key =
|
|
1373
|
+
const key = ensureApiKey()
|
|
1583
1374
|
const params = parseToolInput(input)
|
|
1584
1375
|
return callSuperagnt(key, 'GET', '/partners/links', params)
|
|
1585
1376
|
},
|
|
@@ -1588,12 +1379,12 @@ export default async function register(api) {
|
|
|
1588
1379
|
api.registerTool({
|
|
1589
1380
|
name: 'superagnt_connection_dub_createPartnerLink',
|
|
1590
1381
|
description: "Create a partner link",
|
|
1591
|
-
|
|
1382
|
+
parameters: {
|
|
1592
1383
|
"type": "object",
|
|
1593
1384
|
"properties": {}
|
|
1594
1385
|
},
|
|
1595
1386
|
execute: async (input) => {
|
|
1596
|
-
const key =
|
|
1387
|
+
const key = ensureApiKey()
|
|
1597
1388
|
const params = parseToolInput(input)
|
|
1598
1389
|
return callSuperagnt(key, 'POST', '/partners/links', undefined, params)
|
|
1599
1390
|
},
|
|
@@ -1602,12 +1393,12 @@ export default async function register(api) {
|
|
|
1602
1393
|
api.registerTool({
|
|
1603
1394
|
name: 'superagnt_connection_dub_upsertPartnerLink',
|
|
1604
1395
|
description: "Upsert a partner link",
|
|
1605
|
-
|
|
1396
|
+
parameters: {
|
|
1606
1397
|
"type": "object",
|
|
1607
1398
|
"properties": {}
|
|
1608
1399
|
},
|
|
1609
1400
|
execute: async (input) => {
|
|
1610
|
-
const key =
|
|
1401
|
+
const key = ensureApiKey()
|
|
1611
1402
|
const params = parseToolInput(input)
|
|
1612
1403
|
return callSuperagnt(key, 'PUT', '/partners/links/upsert', undefined, params)
|
|
1613
1404
|
},
|
|
@@ -1616,7 +1407,7 @@ export default async function register(api) {
|
|
|
1616
1407
|
api.registerTool({
|
|
1617
1408
|
name: 'superagnt_connection_dub_banPartner',
|
|
1618
1409
|
description: "Ban a partner",
|
|
1619
|
-
|
|
1410
|
+
parameters: {
|
|
1620
1411
|
"type": "object",
|
|
1621
1412
|
"properties": {
|
|
1622
1413
|
"partnerId": {
|
|
@@ -1637,7 +1428,7 @@ export default async function register(api) {
|
|
|
1637
1428
|
]
|
|
1638
1429
|
},
|
|
1639
1430
|
execute: async (input) => {
|
|
1640
|
-
const key =
|
|
1431
|
+
const key = ensureApiKey()
|
|
1641
1432
|
const params = parseToolInput(input)
|
|
1642
1433
|
return callSuperagnt(key, 'POST', '/partners/ban', undefined, params)
|
|
1643
1434
|
},
|
|
@@ -1646,7 +1437,7 @@ export default async function register(api) {
|
|
|
1646
1437
|
api.registerTool({
|
|
1647
1438
|
name: 'superagnt_connection_dub_deactivatePartner',
|
|
1648
1439
|
description: "Deactivate a partner",
|
|
1649
|
-
|
|
1440
|
+
parameters: {
|
|
1650
1441
|
"type": "object",
|
|
1651
1442
|
"properties": {
|
|
1652
1443
|
"partnerId": {
|
|
@@ -1660,7 +1451,7 @@ export default async function register(api) {
|
|
|
1660
1451
|
}
|
|
1661
1452
|
},
|
|
1662
1453
|
execute: async (input) => {
|
|
1663
|
-
const key =
|
|
1454
|
+
const key = ensureApiKey()
|
|
1664
1455
|
const params = parseToolInput(input)
|
|
1665
1456
|
return callSuperagnt(key, 'POST', '/partners/deactivate', undefined, params)
|
|
1666
1457
|
},
|
|
@@ -1669,7 +1460,7 @@ export default async function register(api) {
|
|
|
1669
1460
|
api.registerTool({
|
|
1670
1461
|
name: 'superagnt_connection_dub_listBountySubmissions',
|
|
1671
1462
|
description: "List bounty submissions",
|
|
1672
|
-
|
|
1463
|
+
parameters: {
|
|
1673
1464
|
"type": "object",
|
|
1674
1465
|
"properties": {
|
|
1675
1466
|
"bountyId": {
|
|
@@ -1710,7 +1501,7 @@ export default async function register(api) {
|
|
|
1710
1501
|
]
|
|
1711
1502
|
},
|
|
1712
1503
|
execute: async (input) => {
|
|
1713
|
-
const key =
|
|
1504
|
+
const key = ensureApiKey()
|
|
1714
1505
|
const params = parseToolInput(input)
|
|
1715
1506
|
return callSuperagnt(key, 'GET', '/bounties/{bountyId}/submissions', params)
|
|
1716
1507
|
},
|
|
@@ -1719,7 +1510,7 @@ export default async function register(api) {
|
|
|
1719
1510
|
api.registerTool({
|
|
1720
1511
|
name: 'superagnt_connection_dub_approveBountySubmission',
|
|
1721
1512
|
description: "Approve a bounty submission",
|
|
1722
|
-
|
|
1513
|
+
parameters: {
|
|
1723
1514
|
"type": "object",
|
|
1724
1515
|
"properties": {
|
|
1725
1516
|
"bountyId": {
|
|
@@ -1741,7 +1532,7 @@ export default async function register(api) {
|
|
|
1741
1532
|
]
|
|
1742
1533
|
},
|
|
1743
1534
|
execute: async (input) => {
|
|
1744
|
-
const key =
|
|
1535
|
+
const key = ensureApiKey()
|
|
1745
1536
|
const params = parseToolInput(input)
|
|
1746
1537
|
return callSuperagnt(key, 'POST', '/bounties/{bountyId}/submissions/{submissionId}/approve', undefined, params)
|
|
1747
1538
|
},
|
|
@@ -1750,7 +1541,7 @@ export default async function register(api) {
|
|
|
1750
1541
|
api.registerTool({
|
|
1751
1542
|
name: 'superagnt_connection_dub_rejectBountySubmission',
|
|
1752
1543
|
description: "Reject a bounty submission",
|
|
1753
|
-
|
|
1544
|
+
parameters: {
|
|
1754
1545
|
"type": "object",
|
|
1755
1546
|
"properties": {
|
|
1756
1547
|
"bountyId": {
|
|
@@ -1776,7 +1567,7 @@ export default async function register(api) {
|
|
|
1776
1567
|
]
|
|
1777
1568
|
},
|
|
1778
1569
|
execute: async (input) => {
|
|
1779
|
-
const key =
|
|
1570
|
+
const key = ensureApiKey()
|
|
1780
1571
|
const params = parseToolInput(input)
|
|
1781
1572
|
return callSuperagnt(key, 'POST', '/bounties/{bountyId}/submissions/{submissionId}/reject', undefined, params)
|
|
1782
1573
|
},
|
|
@@ -1785,7 +1576,7 @@ export default async function register(api) {
|
|
|
1785
1576
|
api.registerTool({
|
|
1786
1577
|
name: 'superagnt_connection_dub_listCommissions',
|
|
1787
1578
|
description: "List commissions",
|
|
1788
|
-
|
|
1579
|
+
parameters: {
|
|
1789
1580
|
"type": "object",
|
|
1790
1581
|
"properties": {
|
|
1791
1582
|
"type": {
|
|
@@ -1863,7 +1654,7 @@ export default async function register(api) {
|
|
|
1863
1654
|
}
|
|
1864
1655
|
},
|
|
1865
1656
|
execute: async (input) => {
|
|
1866
|
-
const key =
|
|
1657
|
+
const key = ensureApiKey()
|
|
1867
1658
|
const params = parseToolInput(input)
|
|
1868
1659
|
return callSuperagnt(key, 'GET', '/commissions', params)
|
|
1869
1660
|
},
|
|
@@ -1872,7 +1663,7 @@ export default async function register(api) {
|
|
|
1872
1663
|
api.registerTool({
|
|
1873
1664
|
name: 'superagnt_connection_dub_updateCommission',
|
|
1874
1665
|
description: "Update a commission",
|
|
1875
|
-
|
|
1666
|
+
parameters: {
|
|
1876
1667
|
"type": "object",
|
|
1877
1668
|
"properties": {
|
|
1878
1669
|
"id": {
|
|
@@ -1913,7 +1704,7 @@ export default async function register(api) {
|
|
|
1913
1704
|
]
|
|
1914
1705
|
},
|
|
1915
1706
|
execute: async (input) => {
|
|
1916
|
-
const key =
|
|
1707
|
+
const key = ensureApiKey()
|
|
1917
1708
|
const params = parseToolInput(input)
|
|
1918
1709
|
return callSuperagnt(key, 'PATCH', '/commissions/{id}', undefined, params)
|
|
1919
1710
|
},
|
|
@@ -1922,7 +1713,7 @@ export default async function register(api) {
|
|
|
1922
1713
|
api.registerTool({
|
|
1923
1714
|
name: 'superagnt_connection_dub_listPayouts',
|
|
1924
1715
|
description: "List payouts",
|
|
1925
|
-
|
|
1716
|
+
parameters: {
|
|
1926
1717
|
"type": "object",
|
|
1927
1718
|
"properties": {
|
|
1928
1719
|
"status": {
|
|
@@ -1960,12 +1751,9 @@ export default async function register(api) {
|
|
|
1960
1751
|
}
|
|
1961
1752
|
},
|
|
1962
1753
|
execute: async (input) => {
|
|
1963
|
-
const key =
|
|
1754
|
+
const key = ensureApiKey()
|
|
1964
1755
|
const params = parseToolInput(input)
|
|
1965
1756
|
return callSuperagnt(key, 'GET', '/payouts', params)
|
|
1966
1757
|
},
|
|
1967
1758
|
})
|
|
1968
|
-
|
|
1969
|
-
promptState.toolCount = 41
|
|
1970
|
-
promptState.ready = true
|
|
1971
1759
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"id": "dub-links",
|
|
3
3
|
"name": "Dub Integration",
|
|
4
4
|
"description": "OpenClaw plugin for Dub — manage short links, conversion events, customers, tags, folders, and domains with your superagnt API key.",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.4",
|
|
6
|
+
"contracts": {
|
|
7
|
+
"tools": [
|
|
8
|
+
"superagnt_connection_dub_getLinks",
|
|
9
|
+
"superagnt_connection_dub_createLink",
|
|
10
|
+
"superagnt_connection_dub_upsertLink",
|
|
11
|
+
"superagnt_connection_dub_getLinkInfo",
|
|
12
|
+
"superagnt_connection_dub_getLinksCount",
|
|
13
|
+
"superagnt_connection_dub_updateLink",
|
|
14
|
+
"superagnt_connection_dub_deleteLink",
|
|
15
|
+
"superagnt_connection_dub_bulkCreateLinks",
|
|
16
|
+
"superagnt_connection_dub_bulkUpdateLinks",
|
|
17
|
+
"superagnt_connection_dub_bulkDeleteLinks",
|
|
18
|
+
"superagnt_connection_dub_retrieveAnalytics",
|
|
19
|
+
"superagnt_connection_dub_listEvents",
|
|
20
|
+
"superagnt_connection_dub_getTags",
|
|
21
|
+
"superagnt_connection_dub_createTag",
|
|
22
|
+
"superagnt_connection_dub_updateTag",
|
|
23
|
+
"superagnt_connection_dub_listFolders",
|
|
24
|
+
"superagnt_connection_dub_createFolder",
|
|
25
|
+
"superagnt_connection_dub_updateFolder",
|
|
26
|
+
"superagnt_connection_dub_deleteFolder",
|
|
27
|
+
"superagnt_connection_dub_listCustomers",
|
|
28
|
+
"superagnt_connection_dub_getCustomer",
|
|
29
|
+
"superagnt_connection_dub_updateCustomer",
|
|
30
|
+
"superagnt_connection_dub_deleteCustomer",
|
|
31
|
+
"superagnt_connection_dub_createDomain",
|
|
32
|
+
"superagnt_connection_dub_updateDomain",
|
|
33
|
+
"superagnt_connection_dub_deleteDomain",
|
|
34
|
+
"superagnt_connection_dub_trackLead",
|
|
35
|
+
"superagnt_connection_dub_trackSale",
|
|
36
|
+
"superagnt_connection_dub_listPartners",
|
|
37
|
+
"superagnt_connection_dub_createPartner",
|
|
38
|
+
"superagnt_connection_dub_retrievePartnerLinks",
|
|
39
|
+
"superagnt_connection_dub_createPartnerLink",
|
|
40
|
+
"superagnt_connection_dub_upsertPartnerLink",
|
|
41
|
+
"superagnt_connection_dub_banPartner",
|
|
42
|
+
"superagnt_connection_dub_deactivatePartner",
|
|
43
|
+
"superagnt_connection_dub_listBountySubmissions",
|
|
44
|
+
"superagnt_connection_dub_approveBountySubmission",
|
|
45
|
+
"superagnt_connection_dub_rejectBountySubmission",
|
|
46
|
+
"superagnt_connection_dub_listCommissions",
|
|
47
|
+
"superagnt_connection_dub_updateCommission",
|
|
48
|
+
"superagnt_connection_dub_listPayouts"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
6
51
|
"configSchema": {
|
|
7
52
|
"type": "object",
|
|
8
53
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superagnt/dub-links",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw plugin for Dub — manage short links, conversion events, customers, tags, folders, and domains with your superagnt API key.",
|
|
6
6
|
"main": "index.js",
|