@toloka-platform/sdk 0.19.1 → 0.20.0

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/src/client.ts CHANGED
@@ -3,6 +3,14 @@ import { assert } from "es-toolkit";
3
3
  import * as wire from "../openapi/gen/api";
4
4
  import type {
5
5
  AddDatasetItemsBody,
6
+ AddExpertBanListExpertsBody,
7
+ CreateExpertListBody,
8
+ AddExpertListExpertsBody,
9
+ ListExpertBanListExpertsParams,
10
+ ListExpertListExpertsParams,
11
+ RemoveExpertListExpertsBody,
12
+ RemoveExpertBanListExpertsBody,
13
+ UpdateExpertListBody,
6
14
  AttachPipelineDatasetBody,
7
15
  BatchInferenceRun as GeneratedBatchInferenceRun,
8
16
  CancelPipelineRunBody,
@@ -796,6 +804,39 @@ const createClientImplementation = (config: ClientConfig) => {
796
804
  wire.runPipelineLints(pipelineId, requestOptions),
797
805
  };
798
806
 
807
+ const expertLists = {
808
+ list: async ({ projectId }: { projectId: ProjectId }) =>
809
+ (await wire.listExpertLists(projectId, requestOptions)).expertLists,
810
+ create: ({ projectId, ...body }: { projectId: ProjectId } & CreateExpertListBody) =>
811
+ wire.createExpertList(projectId, body, requestOptions),
812
+ get: ({ expertListId }: { expertListId: string }) =>
813
+ wire.getExpertList(expertListId, requestOptions),
814
+ update: ({ expertListId, ...body }: { expertListId: string } & UpdateExpertListBody) =>
815
+ wire.updateExpertList(expertListId, body, requestOptions),
816
+ listExpertsPage: ({
817
+ expertListId,
818
+ ...params
819
+ }: { expertListId: string } & ListExpertListExpertsParams) =>
820
+ wire.listExpertListExperts(expertListId, params, requestOptions),
821
+ addExperts: ({ expertListId, ...body }: { expertListId: string } & AddExpertListExpertsBody) =>
822
+ wire.addExpertListExperts(expertListId, body, requestOptions),
823
+ removeExperts: ({
824
+ expertListId,
825
+ ...body
826
+ }: { expertListId: string } & RemoveExpertListExpertsBody) =>
827
+ wire.removeExpertListExperts(expertListId, body, requestOptions),
828
+ };
829
+
830
+ const expertBanList = {
831
+ get: ({ projectId }: { projectId: ProjectId }) => wire.getExpertBanList(projectId, requestOptions),
832
+ listExpertsPage: ({ projectId, ...params }: { projectId: ProjectId } & ListExpertBanListExpertsParams) =>
833
+ wire.listExpertBanListExperts(projectId, params, requestOptions),
834
+ addExperts: ({ projectId, ...body }: { projectId: ProjectId } & AddExpertBanListExpertsBody) =>
835
+ wire.addExpertBanListExperts(projectId, body, requestOptions),
836
+ removeExperts: ({ projectId, ...body }: { projectId: ProjectId } & RemoveExpertBanListExpertsBody) =>
837
+ wire.removeExpertBanListExperts(projectId, body, requestOptions),
838
+ };
839
+
799
840
  const deliveryOrders = {
800
841
  list: async () => (await wire.listDeliveryOrders(requestOptions)).deliveryOrders,
801
842
  };
@@ -835,6 +876,8 @@ const createClientImplementation = (config: ClientConfig) => {
835
876
  files,
836
877
  checks,
837
878
  deliveryOrders,
879
+ expertLists,
880
+ expertBanList,
838
881
  waitFor,
839
882
  };
840
883
  };
@@ -1428,10 +1428,6 @@
1428
1428
  ]
1429
1429
  },
1430
1430
  "qualityAssurance": {
1431
- "default": {
1432
- "qaMode": "llm_only",
1433
- "llmQaModelId": "gpt-5.6-terra"
1434
- },
1435
1431
  "oneOf": [
1436
1432
  {
1437
1433
  "type": "object",
@@ -1474,6 +1470,18 @@
1474
1470
  "humanQaTimeForTask": {
1475
1471
  "type": "number",
1476
1472
  "exclusiveMinimum": 0
1473
+ },
1474
+ "expertListId": {
1475
+ "description": "Expert list the experts come from, with prefix `exl.`. Requires `audienceMode: service`. `null` detaches the list. Omitted when no list is attached.",
1476
+ "anyOf": [
1477
+ {
1478
+ "type": "string",
1479
+ "pattern": "^exl\\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
1480
+ },
1481
+ {
1482
+ "type": "null"
1483
+ }
1484
+ ]
1477
1485
  }
1478
1486
  },
1479
1487
  "required": [
@@ -1498,6 +1506,18 @@
1498
1506
  "type": "number",
1499
1507
  "exclusiveMinimum": 0
1500
1508
  },
1509
+ "expertListId": {
1510
+ "description": "Expert list the experts come from, with prefix `exl.`. Requires `audienceMode: service`. `null` detaches the list. Omitted when no list is attached.",
1511
+ "anyOf": [
1512
+ {
1513
+ "type": "string",
1514
+ "pattern": "^exl\\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
1515
+ },
1516
+ {
1517
+ "type": "null"
1518
+ }
1519
+ ]
1520
+ },
1501
1521
  "llmQaModelId": {
1502
1522
  "default": "gpt-5.6-terra",
1503
1523
  "type": "string",
@@ -1520,28 +1540,6 @@
1520
1540
  ]
1521
1541
  },
1522
1542
  "audienceAndPricing": {
1523
- "default": {
1524
- "audienceType": "human",
1525
- "verifiedExperts": true,
1526
- "audience": {
1527
- "languages": {
1528
- "type": "and",
1529
- "values": []
1530
- },
1531
- "specializations": {
1532
- "type": "and",
1533
- "values": []
1534
- },
1535
- "countries": {
1536
- "type": "or",
1537
- "values": []
1538
- }
1539
- },
1540
- "pricePerTask": 6,
1541
- "timeForTask": 1800,
1542
- "perExpertCapEnabled": false,
1543
- "perExpertCapValue": 1
1544
- },
1545
1543
  "oneOf": [
1546
1544
  {
1547
1545
  "type": "object",
@@ -1665,6 +1663,18 @@
1665
1663
  "exclusiveMinimum": 0,
1666
1664
  "maximum": 50
1667
1665
  },
1666
+ "expertListId": {
1667
+ "description": "Expert list the experts come from, with prefix `exl.`. Requires `audienceMode: service`. `null` detaches the list. Omitted when no list is attached.",
1668
+ "anyOf": [
1669
+ {
1670
+ "type": "string",
1671
+ "pattern": "^exl\\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
1672
+ },
1673
+ {
1674
+ "type": "null"
1675
+ }
1676
+ ]
1677
+ },
1668
1678
  "audienceType": {
1669
1679
  "type": "string",
1670
1680
  "const": "human"
@@ -2325,6 +2335,14 @@
2325
2335
  }
2326
2336
  ]
2327
2337
  },
2338
+ "audienceMode": {
2339
+ "description": "How the node finds experts. `legacy`: audience filters and smart search. `service`: the audience service, which can also take experts from an expert list. Only teams with the audience service enabled can use `service`. Omitted when `legacy`.",
2340
+ "type": "string",
2341
+ "enum": [
2342
+ "legacy",
2343
+ "service"
2344
+ ]
2345
+ },
2328
2346
  "smartSearch": {
2329
2347
  "default": null,
2330
2348
  "anyOf": [
@@ -2648,28 +2666,6 @@
2648
2666
  "type": "string"
2649
2667
  },
2650
2668
  "audienceAndPricing": {
2651
- "default": {
2652
- "audienceType": "human",
2653
- "verifiedExperts": true,
2654
- "audience": {
2655
- "languages": {
2656
- "type": "and",
2657
- "values": []
2658
- },
2659
- "specializations": {
2660
- "type": "and",
2661
- "values": []
2662
- },
2663
- "countries": {
2664
- "type": "or",
2665
- "values": []
2666
- }
2667
- },
2668
- "pricePerTask": 6,
2669
- "timeForTask": 1800,
2670
- "perExpertCapEnabled": false,
2671
- "perExpertCapValue": 1
2672
- },
2673
2669
  "type": "object",
2674
2670
  "properties": {
2675
2671
  "verifiedExperts": {
@@ -2791,6 +2787,18 @@
2791
2787
  "exclusiveMinimum": 0,
2792
2788
  "maximum": 50
2793
2789
  },
2790
+ "expertListId": {
2791
+ "description": "Expert list the experts come from, with prefix `exl.`. Requires `audienceMode: service`. `null` detaches the list. Omitted when no list is attached.",
2792
+ "anyOf": [
2793
+ {
2794
+ "type": "string",
2795
+ "pattern": "^exl\\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2796
+ },
2797
+ {
2798
+ "type": "null"
2799
+ }
2800
+ ]
2801
+ },
2794
2802
  "audienceType": {
2795
2803
  "type": "string",
2796
2804
  "const": "human"
@@ -4151,6 +4159,14 @@
4151
4159
  }
4152
4160
  ]
4153
4161
  },
4162
+ "audienceMode": {
4163
+ "description": "How the node finds experts. `legacy`: audience filters and smart search. `service`: the audience service, which can also take experts from an expert list. Only teams with the audience service enabled can use `service`. Omitted when `legacy`.",
4164
+ "type": "string",
4165
+ "enum": [
4166
+ "legacy",
4167
+ "service"
4168
+ ]
4169
+ },
4154
4170
  "smartSearch": {
4155
4171
  "default": null,
4156
4172
  "anyOf": [