@superagnt/tiktok-data 2.0.3 → 2.0.5

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/index.js CHANGED
@@ -7,7 +7,8 @@ import { homedir as _homedir } from 'node:os'
7
7
  import { join as _join } from 'node:path'
8
8
  import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
9
9
 
10
- const BASE_URL = 'https://api.superagnt.com/v1/data/tiktok'
10
+ // SUPERAGNT_API_URL overrides the API origin (QA/staging); customers never set it.
11
+ const BASE_URL = (process.env.SUPERAGNT_API_URL || 'https://api.superagnt.com') + '/v1/data/tiktok'
11
12
 
12
13
 
13
14
  // ── Auth Module (inlined) ────────────────────────────────────────────────────
@@ -95,7 +96,7 @@ export default function register(api) {
95
96
  api.registerTool({
96
97
  name: 'superagnt_tiktok_Video_Details_get',
97
98
  description: "Video Details",
98
- inputSchema: {
99
+ parameters: {
99
100
  "type": "object",
100
101
  "properties": {
101
102
  "video_id": {
@@ -107,7 +108,7 @@ export default function register(api) {
107
108
  "video_id"
108
109
  ]
109
110
  },
110
- execute: async (input) => {
111
+ execute: async (_toolCallId, input) => {
111
112
  const key = ensureApiKey()
112
113
  const params = parseToolInput(input)
113
114
  return callSuperagnt(key, 'GET', '/video/details', params)
@@ -117,7 +118,7 @@ export default function register(api) {
117
118
  api.registerTool({
118
119
  name: 'superagnt_tiktok_Video_Details_post',
119
120
  description: "Video Details",
120
- inputSchema: {
121
+ parameters: {
121
122
  "type": "object",
122
123
  "properties": {
123
124
  "video_id": {
@@ -129,7 +130,7 @@ export default function register(api) {
129
130
  "video_id"
130
131
  ]
131
132
  },
132
- execute: async (input) => {
133
+ execute: async (_toolCallId, input) => {
133
134
  const key = ensureApiKey()
134
135
  const params = parseToolInput(input)
135
136
  return callSuperagnt(key, 'POST', '/video/details', undefined, params)
@@ -139,7 +140,7 @@ export default function register(api) {
139
140
  api.registerTool({
140
141
  name: 'superagnt_tiktok_User_s_Videos_get',
141
142
  description: "User's Videos",
142
- inputSchema: {
143
+ parameters: {
143
144
  "type": "object",
144
145
  "properties": {
145
146
  "username": {
@@ -151,7 +152,7 @@ export default function register(api) {
151
152
  "username"
152
153
  ]
153
154
  },
154
- execute: async (input) => {
155
+ execute: async (_toolCallId, input) => {
155
156
  const key = ensureApiKey()
156
157
  const params = parseToolInput(input)
157
158
  return callSuperagnt(key, 'GET', '/user/videos', params)
@@ -161,7 +162,7 @@ export default function register(api) {
161
162
  api.registerTool({
162
163
  name: 'superagnt_tiktok_User_s_Videos_post',
163
164
  description: "User's Videos",
164
- inputSchema: {
165
+ parameters: {
165
166
  "type": "object",
166
167
  "properties": {
167
168
  "username": {
@@ -173,7 +174,7 @@ export default function register(api) {
173
174
  "username"
174
175
  ]
175
176
  },
176
- execute: async (input) => {
177
+ execute: async (_toolCallId, input) => {
177
178
  const key = ensureApiKey()
178
179
  const params = parseToolInput(input)
179
180
  return callSuperagnt(key, 'POST', '/user/videos', undefined, params)
@@ -183,7 +184,7 @@ export default function register(api) {
183
184
  api.registerTool({
184
185
  name: 'superagnt_tiktok_Collection_Videos_Details',
185
186
  description: "Collection Videos/Details",
186
- inputSchema: {
187
+ parameters: {
187
188
  "type": "object",
188
189
  "properties": {
189
190
  "collection_id": {
@@ -200,7 +201,7 @@ export default function register(api) {
200
201
  "username"
201
202
  ]
202
203
  },
203
- execute: async (input) => {
204
+ execute: async (_toolCallId, input) => {
204
205
  const key = ensureApiKey()
205
206
  const params = parseToolInput(input)
206
207
  return callSuperagnt(key, 'GET', '/collection/', params)
@@ -210,7 +211,7 @@ export default function register(api) {
210
211
  api.registerTool({
211
212
  name: 'superagnt_tiktok_User_s_Videos_Continuation',
212
213
  description: "User's Videos Continuation",
213
- inputSchema: {
214
+ parameters: {
214
215
  "type": "object",
215
216
  "properties": {
216
217
  "continuation_token": {
@@ -232,7 +233,7 @@ export default function register(api) {
232
233
  "secondary_id"
233
234
  ]
234
235
  },
235
- execute: async (input) => {
236
+ execute: async (_toolCallId, input) => {
236
237
  const key = ensureApiKey()
237
238
  const params = parseToolInput(input)
238
239
  return callSuperagnt(key, 'GET', '/user/videos/continuation', params)
@@ -242,7 +243,7 @@ export default function register(api) {
242
243
  api.registerTool({
243
244
  name: 'superagnt_tiktok_User_s_Details_get',
244
245
  description: "User's Details",
245
- inputSchema: {
246
+ parameters: {
246
247
  "type": "object",
247
248
  "properties": {
248
249
  "username": {
@@ -254,7 +255,7 @@ export default function register(api) {
254
255
  "username"
255
256
  ]
256
257
  },
257
- execute: async (input) => {
258
+ execute: async (_toolCallId, input) => {
258
259
  const key = ensureApiKey()
259
260
  const params = parseToolInput(input)
260
261
  return callSuperagnt(key, 'GET', '/user/details', params)
@@ -264,7 +265,7 @@ export default function register(api) {
264
265
  api.registerTool({
265
266
  name: 'superagnt_tiktok_User_s_Details_post',
266
267
  description: "User's Details",
267
- inputSchema: {
268
+ parameters: {
268
269
  "type": "object",
269
270
  "properties": {
270
271
  "username": {
@@ -276,7 +277,7 @@ export default function register(api) {
276
277
  "username"
277
278
  ]
278
279
  },
279
- execute: async (input) => {
280
+ execute: async (_toolCallId, input) => {
280
281
  const key = ensureApiKey()
281
282
  const params = parseToolInput(input)
282
283
  return callSuperagnt(key, 'POST', '/user/details', undefined, params)
@@ -286,7 +287,7 @@ export default function register(api) {
286
287
  api.registerTool({
287
288
  name: 'superagnt_tiktok_Search_Accounts_get',
288
289
  description: "Search Accounts",
289
- inputSchema: {
290
+ parameters: {
290
291
  "type": "object",
291
292
  "properties": {
292
293
  "query": {
@@ -298,7 +299,7 @@ export default function register(api) {
298
299
  "query"
299
300
  ]
300
301
  },
301
- execute: async (input) => {
302
+ execute: async (_toolCallId, input) => {
302
303
  const key = ensureApiKey()
303
304
  const params = parseToolInput(input)
304
305
  return callSuperagnt(key, 'GET', '/search/accounts/query', params)
@@ -308,7 +309,7 @@ export default function register(api) {
308
309
  api.registerTool({
309
310
  name: 'superagnt_tiktok_Search_Accounts_post',
310
311
  description: "Search Accounts",
311
- inputSchema: {
312
+ parameters: {
312
313
  "type": "object",
313
314
  "properties": {
314
315
  "query": {
@@ -320,7 +321,7 @@ export default function register(api) {
320
321
  "query"
321
322
  ]
322
323
  },
323
- execute: async (input) => {
324
+ execute: async (_toolCallId, input) => {
324
325
  const key = ensureApiKey()
325
326
  const params = parseToolInput(input)
326
327
  return callSuperagnt(key, 'POST', '/search/accounts/query', undefined, params)
@@ -330,7 +331,7 @@ export default function register(api) {
330
331
  api.registerTool({
331
332
  name: 'superagnt_tiktok_Search_Videos_get',
332
333
  description: "Search Videos",
333
- inputSchema: {
334
+ parameters: {
334
335
  "type": "object",
335
336
  "properties": {
336
337
  "query": {
@@ -342,7 +343,7 @@ export default function register(api) {
342
343
  "query"
343
344
  ]
344
345
  },
345
- execute: async (input) => {
346
+ execute: async (_toolCallId, input) => {
346
347
  const key = ensureApiKey()
347
348
  const params = parseToolInput(input)
348
349
  return callSuperagnt(key, 'GET', '/search/general/query', params)
@@ -352,7 +353,7 @@ export default function register(api) {
352
353
  api.registerTool({
353
354
  name: 'superagnt_tiktok_Search_Videos_post',
354
355
  description: "Search Videos",
355
- inputSchema: {
356
+ parameters: {
356
357
  "type": "object",
357
358
  "properties": {
358
359
  "query": {
@@ -364,7 +365,7 @@ export default function register(api) {
364
365
  "query"
365
366
  ]
366
367
  },
367
- execute: async (input) => {
368
+ execute: async (_toolCallId, input) => {
368
369
  const key = ensureApiKey()
369
370
  const params = parseToolInput(input)
370
371
  return callSuperagnt(key, 'POST', '/search/general/query', undefined, params)
@@ -2,7 +2,7 @@
2
2
  "id": "tiktok-data",
3
3
  "name": "TikTok Data",
4
4
  "description": "Unified access to video details, creator profiles, and search across accounts and videos. Built for LLMs and automation — not one-off scraping.",
5
- "version": "2.0.3",
5
+ "version": "2.0.5",
6
6
  "contracts": {
7
7
  "tools": [
8
8
  "superagnt_tiktok_Video_Details_get",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superagnt/tiktok-data",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "type": "module",
5
5
  "description": "Unified access to video details, creator profiles, and search across accounts and videos. Built for LLMs and automation — not one-off scraping.",
6
6
  "main": "index.js",