@apify/actors-mcp-server 0.18.3-beta.0 → 0.18.3-beta.2
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/dist/resources/api_resources.d.ts +4 -3
- package/dist/resources/api_resources.d.ts.map +1 -1
- package/dist/resources/api_resources.js +7 -6
- package/dist/resources/api_resources.js.map +1 -1
- package/dist/test_kit/tsconfig.tsbuildinfo +1 -1
- package/dist/tools/actors/actor_run_response.d.ts.map +1 -1
- package/dist/tools/actors/actor_run_response.js +7 -6
- package/dist/tools/actors/actor_run_response.js.map +1 -1
- package/dist/tools/actors/call_actor.js +2 -2
- package/dist/tools/actors/call_actor.js.map +1 -1
- package/dist/tools/api/apify_api_request.js +2 -2
- package/dist/tools/api/apify_api_request.js.map +1 -1
- package/dist/tools/api/apify_api_write.d.ts.map +1 -1
- package/dist/tools/api/apify_api_write.js +3 -2
- package/dist/tools/api/apify_api_write.js.map +1 -1
- package/dist/tools/schedules/schedule_helpers.d.ts.map +1 -1
- package/dist/tools/schedules/schedule_helpers.js +2 -2
- package/dist/tools/schedules/schedule_helpers.js.map +1 -1
- package/dist/tools/structured_output_schemas.d.ts +161 -38
- package/dist/tools/structured_output_schemas.d.ts.map +1 -1
- package/dist/tools/structured_output_schemas.js +67 -34
- package/dist/tools/structured_output_schemas.js.map +1 -1
- package/dist/tools/tasks/create_actor_task.js +2 -2
- package/dist/tools/tasks/create_actor_task.js.map +1 -1
- package/dist/tools/tasks/update_actor_task.d.ts.map +1 -1
- package/dist/tools/tasks/update_actor_task.js +2 -4
- package/dist/tools/tasks/update_actor_task.js.map +1 -1
- package/dist/tools/widgets/call_actor_widget.js +2 -2
- package/dist/tools/widgets/call_actor_widget.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Shared JSON schema definitions for structured output across tools.
|
|
4
|
+
* These schemas define the format of structured data returned by various tools.
|
|
5
|
+
*
|
|
6
|
+
* The `type: '...' as const` assertions throughout narrow the string to a literal,
|
|
7
|
+
* which the MCP SDK's schema types require (a plain `string` won't type-check).
|
|
8
|
+
*
|
|
9
|
+
* Some MCP clients refuse a `type` array or a keyword-less `{}` subschema, so nullable
|
|
10
|
+
* and free-form values are spelled with `anyOf` branches of a single `type` each.
|
|
11
|
+
*/
|
|
12
|
+
/** A string or `null`. Spread it next to a `description`. */
|
|
13
|
+
export declare const stringOrNullSchema: {
|
|
14
|
+
anyOf: {
|
|
15
|
+
type: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
/** Any JSON value. Spread it next to a `description`, or pass it to a Zod `.meta()`. */
|
|
19
|
+
export declare const anyJsonValueSchema: {
|
|
20
|
+
anyOf: {
|
|
21
|
+
type: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
/** Zod schema for any JSON object; emits `additionalProperties: true` instead of Zod's `{}`. */
|
|
25
|
+
export declare const anyJsonObjectSchema: z.ZodObject<{}, z.core.$loose>;
|
|
1
26
|
/**
|
|
2
27
|
* Schema for pricing information
|
|
3
28
|
*/
|
|
@@ -312,6 +337,15 @@ export declare const actorInfoSchema: {
|
|
|
312
337
|
type: "object";
|
|
313
338
|
properties: {
|
|
314
339
|
type: {
|
|
340
|
+
anyOf: ({
|
|
341
|
+
type: string;
|
|
342
|
+
items?: undefined;
|
|
343
|
+
} | {
|
|
344
|
+
type: string;
|
|
345
|
+
items: {
|
|
346
|
+
type: string;
|
|
347
|
+
};
|
|
348
|
+
})[];
|
|
315
349
|
description: string;
|
|
316
350
|
};
|
|
317
351
|
};
|
|
@@ -547,6 +581,15 @@ export declare const actorDetailsOutputSchema: {
|
|
|
547
581
|
type: "object";
|
|
548
582
|
properties: {
|
|
549
583
|
type: {
|
|
584
|
+
anyOf: ({
|
|
585
|
+
type: string;
|
|
586
|
+
items?: undefined;
|
|
587
|
+
} | {
|
|
588
|
+
type: string;
|
|
589
|
+
items: {
|
|
590
|
+
type: string;
|
|
591
|
+
};
|
|
592
|
+
})[];
|
|
550
593
|
description: string;
|
|
551
594
|
};
|
|
552
595
|
};
|
|
@@ -828,6 +871,15 @@ export declare const actorSearchOutputSchema: {
|
|
|
828
871
|
type: "object";
|
|
829
872
|
properties: {
|
|
830
873
|
type: {
|
|
874
|
+
anyOf: ({
|
|
875
|
+
type: string;
|
|
876
|
+
items?: undefined;
|
|
877
|
+
} | {
|
|
878
|
+
type: string;
|
|
879
|
+
items: {
|
|
880
|
+
type: string;
|
|
881
|
+
};
|
|
882
|
+
})[];
|
|
831
883
|
description: string;
|
|
832
884
|
};
|
|
833
885
|
};
|
|
@@ -1084,6 +1136,15 @@ export declare const actorSearchWidgetOutputSchema: {
|
|
|
1084
1136
|
type: "object";
|
|
1085
1137
|
properties: {
|
|
1086
1138
|
type: {
|
|
1139
|
+
anyOf: ({
|
|
1140
|
+
type: string;
|
|
1141
|
+
items?: undefined;
|
|
1142
|
+
} | {
|
|
1143
|
+
type: string;
|
|
1144
|
+
items: {
|
|
1145
|
+
type: string;
|
|
1146
|
+
};
|
|
1147
|
+
})[];
|
|
1087
1148
|
description: string;
|
|
1088
1149
|
};
|
|
1089
1150
|
};
|
|
@@ -1208,43 +1269,69 @@ export declare const actorTaskOutputSchema: {
|
|
|
1208
1269
|
description: string;
|
|
1209
1270
|
};
|
|
1210
1271
|
title: {
|
|
1211
|
-
type: string[];
|
|
1212
1272
|
description: string;
|
|
1273
|
+
anyOf: {
|
|
1274
|
+
type: string;
|
|
1275
|
+
}[];
|
|
1213
1276
|
};
|
|
1214
1277
|
description: {
|
|
1215
|
-
type: string[];
|
|
1216
1278
|
description: string;
|
|
1279
|
+
anyOf: {
|
|
1280
|
+
type: string;
|
|
1281
|
+
}[];
|
|
1217
1282
|
};
|
|
1218
1283
|
publishedAt: {
|
|
1219
|
-
type: string[];
|
|
1220
1284
|
description: string;
|
|
1285
|
+
anyOf: {
|
|
1286
|
+
type: string;
|
|
1287
|
+
}[];
|
|
1221
1288
|
};
|
|
1222
1289
|
publicConfig: {
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1290
|
+
anyOf: ({
|
|
1291
|
+
type: string;
|
|
1292
|
+
properties: {
|
|
1293
|
+
seoTitle: {
|
|
1294
|
+
anyOf: {
|
|
1295
|
+
type: string;
|
|
1296
|
+
}[];
|
|
1297
|
+
};
|
|
1298
|
+
seoDescription: {
|
|
1299
|
+
anyOf: {
|
|
1300
|
+
type: string;
|
|
1301
|
+
}[];
|
|
1302
|
+
};
|
|
1303
|
+
inputSchemaFields: {
|
|
1304
|
+
anyOf: ({
|
|
1305
|
+
type: string;
|
|
1306
|
+
items: {
|
|
1307
|
+
type: string;
|
|
1308
|
+
};
|
|
1309
|
+
} | {
|
|
1310
|
+
type: string;
|
|
1311
|
+
items?: undefined;
|
|
1312
|
+
})[];
|
|
1313
|
+
};
|
|
1314
|
+
datasetName: {
|
|
1315
|
+
anyOf: {
|
|
1316
|
+
type: string;
|
|
1317
|
+
}[];
|
|
1318
|
+
};
|
|
1319
|
+
datasetView: {
|
|
1320
|
+
anyOf: {
|
|
1321
|
+
type: string;
|
|
1322
|
+
}[];
|
|
1236
1323
|
};
|
|
1237
1324
|
};
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
};
|
|
1244
|
-
};
|
|
1325
|
+
} | {
|
|
1326
|
+
type: string;
|
|
1327
|
+
properties?: undefined;
|
|
1328
|
+
})[];
|
|
1329
|
+
description: string;
|
|
1245
1330
|
};
|
|
1246
1331
|
input: {
|
|
1247
|
-
|
|
1332
|
+
anyOf: {
|
|
1333
|
+
type: string;
|
|
1334
|
+
}[];
|
|
1248
1335
|
description: string;
|
|
1249
1336
|
};
|
|
1250
1337
|
};
|
|
@@ -1263,12 +1350,16 @@ export declare const scheduleOutputSchema: {
|
|
|
1263
1350
|
description: string;
|
|
1264
1351
|
};
|
|
1265
1352
|
title: {
|
|
1266
|
-
type: string[];
|
|
1267
1353
|
description: string;
|
|
1354
|
+
anyOf: {
|
|
1355
|
+
type: string;
|
|
1356
|
+
}[];
|
|
1268
1357
|
};
|
|
1269
1358
|
description: {
|
|
1270
|
-
type: string[];
|
|
1271
1359
|
description: string;
|
|
1360
|
+
anyOf: {
|
|
1361
|
+
type: string;
|
|
1362
|
+
}[];
|
|
1272
1363
|
};
|
|
1273
1364
|
cronExpression: {
|
|
1274
1365
|
type: string;
|
|
@@ -1287,20 +1378,28 @@ export declare const scheduleOutputSchema: {
|
|
|
1287
1378
|
description: string;
|
|
1288
1379
|
};
|
|
1289
1380
|
nextRunAt: {
|
|
1290
|
-
type: string[];
|
|
1291
1381
|
description: string;
|
|
1382
|
+
anyOf: {
|
|
1383
|
+
type: string;
|
|
1384
|
+
}[];
|
|
1292
1385
|
};
|
|
1293
1386
|
lastRunAt: {
|
|
1294
|
-
type: string[];
|
|
1295
1387
|
description: string;
|
|
1388
|
+
anyOf: {
|
|
1389
|
+
type: string;
|
|
1390
|
+
}[];
|
|
1296
1391
|
};
|
|
1297
1392
|
createdAt: {
|
|
1298
|
-
type: string[];
|
|
1299
1393
|
description: string;
|
|
1394
|
+
anyOf: {
|
|
1395
|
+
type: string;
|
|
1396
|
+
}[];
|
|
1300
1397
|
};
|
|
1301
1398
|
modifiedAt: {
|
|
1302
|
-
type: string[];
|
|
1303
1399
|
description: string;
|
|
1400
|
+
anyOf: {
|
|
1401
|
+
type: string;
|
|
1402
|
+
}[];
|
|
1304
1403
|
};
|
|
1305
1404
|
actions: {
|
|
1306
1405
|
type: string;
|
|
@@ -1316,8 +1415,10 @@ export declare const scheduleOutputSchema: {
|
|
|
1316
1415
|
description: string;
|
|
1317
1416
|
};
|
|
1318
1417
|
input: {
|
|
1319
|
-
type: string[];
|
|
1320
1418
|
description: string;
|
|
1419
|
+
anyOf: {
|
|
1420
|
+
type: string;
|
|
1421
|
+
}[];
|
|
1321
1422
|
};
|
|
1322
1423
|
build: {
|
|
1323
1424
|
type: string;
|
|
@@ -1414,12 +1515,16 @@ export declare const getActorBuildToolOutputSchema: {
|
|
|
1414
1515
|
description: string;
|
|
1415
1516
|
};
|
|
1416
1517
|
startedAt: {
|
|
1417
|
-
type: string[];
|
|
1418
1518
|
description: string;
|
|
1519
|
+
anyOf: {
|
|
1520
|
+
type: string;
|
|
1521
|
+
}[];
|
|
1419
1522
|
};
|
|
1420
1523
|
finishedAt: {
|
|
1421
|
-
type: string[];
|
|
1422
1524
|
description: string;
|
|
1525
|
+
anyOf: {
|
|
1526
|
+
type: string;
|
|
1527
|
+
}[];
|
|
1423
1528
|
};
|
|
1424
1529
|
};
|
|
1425
1530
|
type: "object";
|
|
@@ -1457,12 +1562,16 @@ export declare const buildActorToolOutputSchema: {
|
|
|
1457
1562
|
description: string;
|
|
1458
1563
|
};
|
|
1459
1564
|
startedAt: {
|
|
1460
|
-
type: string[];
|
|
1461
1565
|
description: string;
|
|
1566
|
+
anyOf: {
|
|
1567
|
+
type: string;
|
|
1568
|
+
}[];
|
|
1462
1569
|
};
|
|
1463
1570
|
finishedAt: {
|
|
1464
|
-
type: string[];
|
|
1465
1571
|
description: string;
|
|
1572
|
+
anyOf: {
|
|
1573
|
+
type: string;
|
|
1574
|
+
}[];
|
|
1466
1575
|
};
|
|
1467
1576
|
};
|
|
1468
1577
|
type: "object";
|
|
@@ -2254,8 +2363,10 @@ export declare const datasetMetadataOutputSchema: {
|
|
|
2254
2363
|
description: string;
|
|
2255
2364
|
};
|
|
2256
2365
|
name: {
|
|
2257
|
-
type: string[];
|
|
2258
2366
|
description: string;
|
|
2367
|
+
anyOf: {
|
|
2368
|
+
type: string;
|
|
2369
|
+
}[];
|
|
2259
2370
|
};
|
|
2260
2371
|
itemCount: {
|
|
2261
2372
|
type: string;
|
|
@@ -2358,8 +2469,10 @@ export declare const keyValueStoreOutputSchema: {
|
|
|
2358
2469
|
description: string;
|
|
2359
2470
|
};
|
|
2360
2471
|
name: {
|
|
2361
|
-
type: string[];
|
|
2362
2472
|
description: string;
|
|
2473
|
+
anyOf: {
|
|
2474
|
+
type: string;
|
|
2475
|
+
}[];
|
|
2363
2476
|
};
|
|
2364
2477
|
summary: {
|
|
2365
2478
|
type: "string";
|
|
@@ -2409,8 +2522,10 @@ export declare const keyValueStoreKeysOutputSchema: {
|
|
|
2409
2522
|
description: string;
|
|
2410
2523
|
};
|
|
2411
2524
|
nextExclusiveStartKey: {
|
|
2412
|
-
type: string[];
|
|
2413
2525
|
description: string;
|
|
2526
|
+
anyOf: {
|
|
2527
|
+
type: string;
|
|
2528
|
+
}[];
|
|
2414
2529
|
};
|
|
2415
2530
|
summary: {
|
|
2416
2531
|
type: "string";
|
|
@@ -2439,6 +2554,9 @@ export declare const keyValueStoreRecordOutputSchema: {
|
|
|
2439
2554
|
};
|
|
2440
2555
|
value: {
|
|
2441
2556
|
description: string;
|
|
2557
|
+
anyOf: {
|
|
2558
|
+
type: string;
|
|
2559
|
+
}[];
|
|
2442
2560
|
};
|
|
2443
2561
|
contentType: {
|
|
2444
2562
|
type: string;
|
|
@@ -2535,6 +2653,7 @@ export declare const apifyApiDetailsOutputSchema: {
|
|
|
2535
2653
|
description: string;
|
|
2536
2654
|
};
|
|
2537
2655
|
schema: {
|
|
2656
|
+
type: string;
|
|
2538
2657
|
description: string;
|
|
2539
2658
|
};
|
|
2540
2659
|
};
|
|
@@ -2550,6 +2669,7 @@ export declare const apifyApiDetailsOutputSchema: {
|
|
|
2550
2669
|
description: string;
|
|
2551
2670
|
};
|
|
2552
2671
|
schema: {
|
|
2672
|
+
type: string;
|
|
2553
2673
|
description: string;
|
|
2554
2674
|
};
|
|
2555
2675
|
};
|
|
@@ -2588,6 +2708,9 @@ export declare const apifyApiCallOutputSchema: {
|
|
|
2588
2708
|
};
|
|
2589
2709
|
data: {
|
|
2590
2710
|
description: string;
|
|
2711
|
+
anyOf: {
|
|
2712
|
+
type: string;
|
|
2713
|
+
}[];
|
|
2591
2714
|
};
|
|
2592
2715
|
};
|
|
2593
2716
|
required: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured_output_schemas.d.ts","sourceRoot":"","sources":["../../src/tools/structured_output_schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"structured_output_schemas.d.ts","sourceRoot":"","sources":["../../src/tools/structured_output_schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AAEH,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB;;;;CAAoD,CAAC;AAEpF,wFAAwF;AACxF,eAAO,MAAM,kBAAkB;;;;CAS9B,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,gCAAyD,CAAC;AA6D1F;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;CAOvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoE3B,CAAC;AAEF;;;;;;;;GAQG;AACH,eA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;;;;;;;;;CASrC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;CASrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBtC,CAAC;AAsCF;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAepC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { TIP_MESSAGE_LIMIT } from '../const.js';
|
|
2
3
|
/**
|
|
3
4
|
* Shared JSON schema definitions for structured output across tools.
|
|
@@ -5,7 +6,25 @@ import { TIP_MESSAGE_LIMIT } from '../const.js';
|
|
|
5
6
|
*
|
|
6
7
|
* The `type: '...' as const` assertions throughout narrow the string to a literal,
|
|
7
8
|
* which the MCP SDK's schema types require (a plain `string` won't type-check).
|
|
9
|
+
*
|
|
10
|
+
* Some MCP clients refuse a `type` array or a keyword-less `{}` subschema, so nullable
|
|
11
|
+
* and free-form values are spelled with `anyOf` branches of a single `type` each.
|
|
8
12
|
*/
|
|
13
|
+
/** A string or `null`. Spread it next to a `description`. */
|
|
14
|
+
export const stringOrNullSchema = { anyOf: [{ type: 'string' }, { type: 'null' }] };
|
|
15
|
+
/** Any JSON value. Spread it next to a `description`, or pass it to a Zod `.meta()`. */
|
|
16
|
+
export const anyJsonValueSchema = {
|
|
17
|
+
anyOf: [
|
|
18
|
+
{ type: 'object' },
|
|
19
|
+
{ type: 'array' },
|
|
20
|
+
{ type: 'string' },
|
|
21
|
+
{ type: 'number' },
|
|
22
|
+
{ type: 'boolean' },
|
|
23
|
+
{ type: 'null' },
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
/** Zod schema for any JSON object; emits `additionalProperties: true` instead of Zod's `{}`. */
|
|
27
|
+
export const anyJsonObjectSchema = z.looseObject({}).meta({ additionalProperties: true });
|
|
9
28
|
/**
|
|
10
29
|
* Schema for developer information
|
|
11
30
|
*/
|
|
@@ -154,7 +173,10 @@ export const actorInfoSchema = {
|
|
|
154
173
|
additionalProperties: {
|
|
155
174
|
type: 'object',
|
|
156
175
|
properties: {
|
|
157
|
-
type: {
|
|
176
|
+
type: {
|
|
177
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
178
|
+
description: 'JSON Schema field type — string or array of strings.',
|
|
179
|
+
},
|
|
158
180
|
},
|
|
159
181
|
required: ['type'],
|
|
160
182
|
},
|
|
@@ -338,25 +360,32 @@ export const actorTaskOutputSchema = {
|
|
|
338
360
|
taskId: { type: 'string', description: 'ID of the task' },
|
|
339
361
|
actorId: { type: 'string', description: 'ID of the Actor the task belongs to' },
|
|
340
362
|
name: { type: 'string', description: 'Name of the task' },
|
|
341
|
-
title: {
|
|
342
|
-
description: {
|
|
363
|
+
title: { ...stringOrNullSchema, description: 'Human-readable title of the task' },
|
|
364
|
+
description: { ...stringOrNullSchema, description: 'Short description of the task' },
|
|
343
365
|
publishedAt: {
|
|
344
|
-
|
|
366
|
+
...stringOrNullSchema,
|
|
345
367
|
description: 'When the task was published (ISO 8601); null when the task is not published',
|
|
346
368
|
},
|
|
347
369
|
publicConfig: {
|
|
348
|
-
|
|
370
|
+
anyOf: [
|
|
371
|
+
{
|
|
372
|
+
type: 'object',
|
|
373
|
+
properties: {
|
|
374
|
+
seoTitle: stringOrNullSchema,
|
|
375
|
+
seoDescription: stringOrNullSchema,
|
|
376
|
+
inputSchemaFields: {
|
|
377
|
+
anyOf: [{ type: 'array', items: { type: 'string' } }, { type: 'null' }],
|
|
378
|
+
},
|
|
379
|
+
datasetName: stringOrNullSchema,
|
|
380
|
+
datasetView: stringOrNullSchema,
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
{ type: 'null' },
|
|
384
|
+
],
|
|
349
385
|
description: 'Public display configuration of the task landing page',
|
|
350
|
-
properties: {
|
|
351
|
-
seoTitle: { type: ['string', 'null'] },
|
|
352
|
-
seoDescription: { type: ['string', 'null'] },
|
|
353
|
-
inputSchemaFields: { type: ['array', 'null'], items: { type: 'string' } },
|
|
354
|
-
datasetName: { type: ['string', 'null'] },
|
|
355
|
-
datasetView: { type: ['string', 'null'] },
|
|
356
|
-
},
|
|
357
386
|
},
|
|
358
387
|
input: {
|
|
359
|
-
type:
|
|
388
|
+
anyOf: [{ type: 'object' }, { type: 'array' }, { type: 'null' }],
|
|
360
389
|
description: 'The stored task input, as the API returns it; fields the Actor declares as secret are ' +
|
|
361
390
|
'encrypted placeholders, never plaintext. Its keys are what `publicConfig.inputSchemaFields` can use.',
|
|
362
391
|
},
|
|
@@ -370,7 +399,7 @@ const scheduleActionOutputSchema = {
|
|
|
370
399
|
actorId: { type: 'string', description: 'ID of the Actor this action runs (Actor actions only)' },
|
|
371
400
|
taskId: { type: 'string', description: 'ID of the task this action runs (task actions only)' },
|
|
372
401
|
input: {
|
|
373
|
-
|
|
402
|
+
...anyJsonValueSchema,
|
|
374
403
|
description: 'The Actor input, or the overrides applied on top of the stored task input; secret fields are ' +
|
|
375
404
|
'encrypted placeholders. A non-JSON Actor input body is returned as a string.',
|
|
376
405
|
},
|
|
@@ -386,8 +415,8 @@ export const scheduleOutputSchema = {
|
|
|
386
415
|
properties: {
|
|
387
416
|
scheduleId: { type: 'string', description: 'ID of the schedule' },
|
|
388
417
|
name: { type: 'string', description: 'Name of the schedule' },
|
|
389
|
-
title: {
|
|
390
|
-
description: {
|
|
418
|
+
title: { ...stringOrNullSchema, description: 'Human-readable title of the schedule' },
|
|
419
|
+
description: { ...stringOrNullSchema, description: 'Description of the schedule' },
|
|
391
420
|
cronExpression: { type: 'string', description: 'When the schedule fires, as a cron expression' },
|
|
392
421
|
timezone: { type: 'string', description: 'Time zone the cron expression is evaluated in' },
|
|
393
422
|
isEnabled: { type: 'boolean', description: 'Whether the schedule fires' },
|
|
@@ -396,15 +425,15 @@ export const scheduleOutputSchema = {
|
|
|
396
425
|
description: 'Whether an action is skipped while its previous scheduled run is still running',
|
|
397
426
|
},
|
|
398
427
|
nextRunAt: {
|
|
399
|
-
|
|
428
|
+
...stringOrNullSchema,
|
|
400
429
|
description: 'Next firing time (ISO 8601); null while the schedule is disabled',
|
|
401
430
|
},
|
|
402
431
|
lastRunAt: {
|
|
403
|
-
|
|
432
|
+
...stringOrNullSchema,
|
|
404
433
|
description: 'Last firing time (ISO 8601); null when the schedule has not fired yet',
|
|
405
434
|
},
|
|
406
|
-
createdAt: {
|
|
407
|
-
modifiedAt: {
|
|
435
|
+
createdAt: { ...stringOrNullSchema, description: 'When the schedule was created (ISO 8601)' },
|
|
436
|
+
modifiedAt: { ...stringOrNullSchema, description: 'When the schedule was last changed (ISO 8601)' },
|
|
408
437
|
actions: {
|
|
409
438
|
type: 'array',
|
|
410
439
|
items: scheduleActionOutputSchema,
|
|
@@ -465,8 +494,8 @@ const actorBuildItemSchema = {
|
|
|
465
494
|
actorId: { type: 'string', description: 'ID of the Actor the build belongs to' },
|
|
466
495
|
buildNumber: { type: 'string', description: 'Build number, e.g. 0.1.12' },
|
|
467
496
|
status: { type: 'string', description: 'Build status, e.g. RUNNING, SUCCEEDED, FAILED' },
|
|
468
|
-
startedAt: {
|
|
469
|
-
finishedAt: {
|
|
497
|
+
startedAt: { ...stringOrNullSchema, description: 'ISO timestamp' },
|
|
498
|
+
finishedAt: { ...stringOrNullSchema, description: 'ISO timestamp; null while the build is running' },
|
|
470
499
|
},
|
|
471
500
|
required: ['id', 'actorId', 'buildNumber', 'status', 'startedAt', 'finishedAt'],
|
|
472
501
|
};
|
|
@@ -767,9 +796,9 @@ const actorRunListItemSchema = {
|
|
|
767
796
|
type: 'string',
|
|
768
797
|
description: 'Run status: READY | RUNNING | SUCCEEDED | FAILED | TIMING-OUT | TIMED-OUT | ABORTING | ABORTED.',
|
|
769
798
|
},
|
|
770
|
-
startedAt: {
|
|
799
|
+
startedAt: { ...stringOrNullSchema, description: 'ISO timestamp when the run started.' },
|
|
771
800
|
finishedAt: {
|
|
772
|
-
|
|
801
|
+
...stringOrNullSchema,
|
|
773
802
|
description: 'ISO timestamp when the run finished; null while still running.',
|
|
774
803
|
},
|
|
775
804
|
buildId: { type: 'string', description: 'ID of the Actor build used for the run.' },
|
|
@@ -790,11 +819,11 @@ const actorListItemSchema = {
|
|
|
790
819
|
id: { type: 'string', description: 'Actor ID.' },
|
|
791
820
|
name: { type: 'string', description: 'Actor name, unique within the owner account.' },
|
|
792
821
|
fullName: { type: 'string', description: 'Full Actor name, username/name; the username is the owner.' },
|
|
793
|
-
title: {
|
|
794
|
-
createdAt: {
|
|
795
|
-
modifiedAt: {
|
|
822
|
+
title: { ...stringOrNullSchema, description: 'Display title; null when the Actor has none.' },
|
|
823
|
+
createdAt: { ...stringOrNullSchema, description: 'ISO timestamp when the Actor was created.' },
|
|
824
|
+
modifiedAt: { ...stringOrNullSchema, description: 'ISO timestamp when the Actor was last modified.' },
|
|
796
825
|
lastRunStartedAt: {
|
|
797
|
-
|
|
826
|
+
...stringOrNullSchema,
|
|
798
827
|
description: 'ISO timestamp when the last run of the Actor started; null when it has never run.',
|
|
799
828
|
},
|
|
800
829
|
},
|
|
@@ -841,7 +870,7 @@ export const datasetMetadataOutputSchema = {
|
|
|
841
870
|
type: 'object',
|
|
842
871
|
properties: {
|
|
843
872
|
id: { type: 'string', description: 'Dataset ID' },
|
|
844
|
-
name: {
|
|
873
|
+
name: { ...stringOrNullSchema, description: 'Dataset name (null for unnamed datasets)' },
|
|
845
874
|
itemCount: { type: 'number', description: 'Number of items in the dataset' },
|
|
846
875
|
fields: {
|
|
847
876
|
type: 'array',
|
|
@@ -896,7 +925,7 @@ export const keyValueStoreOutputSchema = {
|
|
|
896
925
|
type: 'object',
|
|
897
926
|
properties: {
|
|
898
927
|
id: { type: 'string', description: 'Key-value store ID' },
|
|
899
|
-
name: {
|
|
928
|
+
name: { ...stringOrNullSchema, description: 'Store name (null for unnamed stores)' },
|
|
900
929
|
summary: summaryProperty,
|
|
901
930
|
nextStep: nextStepProperty,
|
|
902
931
|
},
|
|
@@ -924,7 +953,7 @@ export const keyValueStoreKeysOutputSchema = {
|
|
|
924
953
|
count: { type: 'number', description: 'Number of keys returned' },
|
|
925
954
|
isTruncated: { type: 'boolean', description: 'Whether more keys are available' },
|
|
926
955
|
nextExclusiveStartKey: {
|
|
927
|
-
|
|
956
|
+
...stringOrNullSchema,
|
|
928
957
|
description: 'Pass as exclusiveStartKey to fetch the next page of keys; null when not truncated',
|
|
929
958
|
},
|
|
930
959
|
summary: summaryProperty,
|
|
@@ -940,7 +969,10 @@ export const keyValueStoreRecordOutputSchema = {
|
|
|
940
969
|
properties: {
|
|
941
970
|
keyValueStoreId: { type: 'string', description: 'Key-value store ID' },
|
|
942
971
|
key: { type: 'string', description: 'Record key' },
|
|
943
|
-
value: {
|
|
972
|
+
value: {
|
|
973
|
+
...anyJsonValueSchema,
|
|
974
|
+
description: 'The stored value (JSON, text, or binary)',
|
|
975
|
+
},
|
|
944
976
|
contentType: { type: 'string', description: 'MIME type of the stored value' },
|
|
945
977
|
summary: summaryProperty,
|
|
946
978
|
},
|
|
@@ -985,7 +1017,7 @@ const apiOperationDetailsSchema = {
|
|
|
985
1017
|
in: { type: 'string', enum: ['path', 'query'], description: 'Where the parameter goes' },
|
|
986
1018
|
isRequired: { type: 'boolean', description: 'Whether the parameter is required' },
|
|
987
1019
|
description: { type: 'string', description: 'What the parameter does' },
|
|
988
|
-
schema: { description: 'JSON schema of the value' },
|
|
1020
|
+
schema: { type: 'object', description: 'JSON schema of the value' },
|
|
989
1021
|
},
|
|
990
1022
|
required: ['name', 'in', 'isRequired'],
|
|
991
1023
|
},
|
|
@@ -995,7 +1027,7 @@ const apiOperationDetailsSchema = {
|
|
|
995
1027
|
type: 'object',
|
|
996
1028
|
properties: {
|
|
997
1029
|
isRequired: { type: 'boolean', description: 'Whether the body is required' },
|
|
998
|
-
schema: { description: 'JSON schema of the body, sent as JSON' },
|
|
1030
|
+
schema: { type: 'object', description: 'JSON schema of the body, sent as JSON' },
|
|
999
1031
|
},
|
|
1000
1032
|
required: ['isRequired', 'schema'],
|
|
1001
1033
|
description: 'Only when the operation takes a body',
|
|
@@ -1028,6 +1060,7 @@ export const apifyApiCallOutputSchema = {
|
|
|
1028
1060
|
statusCode: { type: 'integer', description: 'HTTP status code' },
|
|
1029
1061
|
contentType: { type: 'string', description: 'Content-Type of the response' },
|
|
1030
1062
|
data: {
|
|
1063
|
+
...anyJsonValueSchema,
|
|
1031
1064
|
description: 'Response body: parsed JSON, text, or null for an empty or binary body, or for a write response ' +
|
|
1032
1065
|
'over the inline limit',
|
|
1033
1066
|
},
|