@perplexity-ai/perplexity_ai 0.38.7 → 0.39.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/generated/api.d.ts +478 -9
  3. package/dist/generated/api.d.ts.map +1 -1
  4. package/dist/generated/api.js +144 -18
  5. package/dist/generated/api.js.map +1 -1
  6. package/dist/generated/runtime.d.ts +7 -0
  7. package/dist/generated/runtime.d.ts.map +1 -1
  8. package/dist/generated/runtime.js +113 -0
  9. package/dist/generated/runtime.js.map +1 -1
  10. package/dist/resources/client.d.ts +21 -0
  11. package/dist/resources/client.d.ts.map +1 -1
  12. package/dist/resources/client.js +8 -2
  13. package/dist/resources/client.js.map +1 -1
  14. package/dist/resources/decisions.d.ts +7 -0
  15. package/dist/resources/decisions.d.ts.map +1 -0
  16. package/dist/resources/decisions.js +3 -0
  17. package/dist/resources/decisions.js.map +1 -0
  18. package/dist/resources/index.d.ts +3 -0
  19. package/dist/resources/index.d.ts.map +1 -1
  20. package/dist/resources/index.js +3 -0
  21. package/dist/resources/index.js.map +1 -1
  22. package/dist/resources/models.d.ts +5 -0
  23. package/dist/resources/models.d.ts.map +1 -0
  24. package/dist/resources/models.js +3 -0
  25. package/dist/resources/models.js.map +1 -0
  26. package/dist/resources/shared.d.ts +12 -0
  27. package/dist/resources/shared.d.ts.map +1 -1
  28. package/dist/resources/skills/index.d.ts +3 -0
  29. package/dist/resources/skills/index.d.ts.map +1 -0
  30. package/dist/resources/skills/index.js +3 -0
  31. package/dist/resources/skills/index.js.map +1 -0
  32. package/dist/resources/skills/revisions.d.ts +5 -0
  33. package/dist/resources/skills/revisions.d.ts.map +1 -0
  34. package/dist/resources/skills/revisions.js +3 -0
  35. package/dist/resources/skills/revisions.js.map +1 -0
  36. package/dist/resources/skills/skills.d.ts +9 -0
  37. package/dist/resources/skills/skills.d.ts.map +1 -0
  38. package/dist/resources/skills/skills.js +3 -0
  39. package/dist/resources/skills/skills.js.map +1 -0
  40. package/dist/resources/skills.d.ts +2 -0
  41. package/dist/resources/skills.d.ts.map +1 -0
  42. package/dist/resources/skills.js +2 -0
  43. package/dist/resources/skills.js.map +1 -0
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.js +1 -1
  46. package/package.json +1 -1
  47. package/src/generated/api.ts +596 -31
  48. package/src/generated/runtime.ts +129 -0
  49. package/src/resources/client.ts +26 -2
  50. package/src/resources/decisions.ts +6 -0
  51. package/src/resources/index.ts +3 -0
  52. package/src/resources/models.ts +4 -0
  53. package/src/resources/shared.ts +12 -0
  54. package/src/resources/skills/index.ts +2 -0
  55. package/src/resources/skills/revisions.ts +4 -0
  56. package/src/resources/skills/skills.ts +8 -0
  57. package/src/resources/skills.ts +1 -0
  58. package/src/version.ts +1 -1
@@ -234,6 +234,22 @@ export type ApiSearchResponseOutput = {
234
234
  results: ApiSearchPageOutput[];
235
235
  server_time?: string | null;
236
236
  };
237
+ export type ApprovalFilterInput = {
238
+ read_only?: boolean | null;
239
+ tool_names?: string[] | null;
240
+ };
241
+ export type ApprovalFilterOutput = {
242
+ read_only?: boolean | null;
243
+ tool_names?: string[] | null;
244
+ };
245
+ export type ApprovalFiltersInput = {
246
+ always?: (ApprovalFilterInput) | null;
247
+ never?: (ApprovalFilterInput) | null;
248
+ };
249
+ export type ApprovalFiltersOutput = {
250
+ always?: (ApprovalFilterOutput) | null;
251
+ never?: (ApprovalFilterOutput) | null;
252
+ };
237
253
  export type AsyncApiChatCompletionsRequestInput = {
238
254
  idempotency_key?: string | null;
239
255
  request: ApiChatCompletionsRequestInput;
@@ -415,6 +431,7 @@ export type CompletionResponseTypeOutput = "message" | "info" | "end_of_stream";
415
431
  export type ConnectorToolInput = {
416
432
  allowed_tools?: string[];
417
433
  id: string;
434
+ require_approval?: RequireApprovalInput;
418
435
  server_description?: string;
419
436
  server_label: string;
420
437
  type: "connector";
@@ -422,6 +439,7 @@ export type ConnectorToolInput = {
422
439
  export type ConnectorToolOutput = {
423
440
  allowed_tools?: string[];
424
441
  id: string;
442
+ require_approval?: RequireApprovalOutput;
425
443
  server_description?: string;
426
444
  server_label: string;
427
445
  type: "connector";
@@ -520,6 +538,110 @@ export type DateFiltersOutput = {
520
538
  search_before_date_filter?: DateOutput;
521
539
  search_recency_filter?: SearchRecencyFilterOutput;
522
540
  };
541
+ export type DecisionAnswerInput = DecisionNoulAnswerInput | DecisionScoreAnswerInput | DecisionChoiceAnswerInput;
542
+ export type DecisionAnswerOutput = DecisionNoulAnswerOutput | DecisionScoreAnswerOutput | DecisionChoiceAnswerOutput;
543
+ export type DecisionChoiceAnswerInput = {
544
+ choice: string;
545
+ confidence: number;
546
+ probabilities: {} & Record<string, number>;
547
+ type: "choice";
548
+ };
549
+ export type DecisionChoiceAnswerOutput = {
550
+ choice: string;
551
+ confidence: number;
552
+ probabilities: {} & Record<string, number>;
553
+ type: "choice";
554
+ };
555
+ export type DecisionChoiceQuestionInput = {
556
+ criteria: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[] | null>;
557
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
558
+ type: "choice";
559
+ };
560
+ export type DecisionChoiceQuestionOutput = {
561
+ criteria: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[] | null>;
562
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
563
+ type: "choice";
564
+ };
565
+ export type DecisionNoulAnswerInput = {
566
+ noul: number;
567
+ type: "noul";
568
+ };
569
+ export type DecisionNoulAnswerOutput = {
570
+ noul: number;
571
+ type: "noul";
572
+ };
573
+ export type DecisionNoulCriteriaInput = {
574
+ false?: string | ({} & Record<string, unknown>) | unknown[] | null;
575
+ true?: string | ({} & Record<string, unknown>) | unknown[] | null;
576
+ } | null;
577
+ export type DecisionNoulCriteriaOutput = {
578
+ false?: string | ({} & Record<string, unknown>) | unknown[] | null;
579
+ true?: string | ({} & Record<string, unknown>) | unknown[] | null;
580
+ } | null;
581
+ export type DecisionNoulQuestionInput = {
582
+ criteria?: DecisionNoulCriteriaInput;
583
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
584
+ type: "noul";
585
+ };
586
+ export type DecisionNoulQuestionOutput = {
587
+ criteria?: DecisionNoulCriteriaOutput;
588
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
589
+ type: "noul";
590
+ };
591
+ export type DecisionQuestionInput = DecisionNoulQuestionInput | DecisionChoiceQuestionInput | DecisionScoreQuestionInput;
592
+ export type DecisionQuestionOutput = DecisionNoulQuestionOutput | DecisionChoiceQuestionOutput | DecisionScoreQuestionOutput;
593
+ export type DecisionScoreAnswerInput = {
594
+ confidence: number;
595
+ legend: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[]>;
596
+ probabilities: {} & Record<string, number>;
597
+ score: number;
598
+ type: "score";
599
+ };
600
+ export type DecisionScoreAnswerOutput = {
601
+ confidence: number;
602
+ legend: {} & Record<string, string | ({} & Record<string, unknown>) | unknown[]>;
603
+ probabilities: {} & Record<string, number>;
604
+ score: number;
605
+ type: "score";
606
+ };
607
+ export type DecisionScoreQuestionInput = {
608
+ criteria: (string | ({} & Record<string, unknown>) | unknown[])[];
609
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
610
+ type: "score";
611
+ };
612
+ export type DecisionScoreQuestionOutput = {
613
+ criteria: (string | ({} & Record<string, unknown>) | unknown[])[];
614
+ instructions?: string | ({} & Record<string, unknown>) | unknown[] | null;
615
+ type: "score";
616
+ };
617
+ export type DecisionsRequestInput = {
618
+ model: string;
619
+ questions: {} & Record<string, DecisionQuestionInput>;
620
+ state: string | ({} & Record<string, unknown>) | unknown[];
621
+ };
622
+ export type DecisionsRequestOutput = {
623
+ model: string;
624
+ questions: {} & Record<string, DecisionQuestionOutput>;
625
+ state: string | ({} & Record<string, unknown>) | unknown[];
626
+ };
627
+ export type DecisionsResponseInput = {
628
+ answers: {} & Record<string, DecisionAnswerInput>;
629
+ model: string;
630
+ usage: DecisionUsageInput;
631
+ };
632
+ export type DecisionsResponseOutput = {
633
+ answers: {} & Record<string, DecisionAnswerOutput>;
634
+ model: string;
635
+ usage: DecisionUsageOutput;
636
+ };
637
+ export type DecisionUsageInput = {
638
+ input_tokens: number;
639
+ output_tokens: number;
640
+ };
641
+ export type DecisionUsageOutput = {
642
+ input_tokens: number;
643
+ output_tokens: number;
644
+ };
523
645
  export type EmbeddingObjectInput = {
524
646
  embedding?: string;
525
647
  index?: number;
@@ -852,17 +974,27 @@ export type InputContentPartOutput = {
852
974
  text?: string;
853
975
  type: "input_text" | "input_image" | "input_file";
854
976
  };
855
- export type InputItemInput = InputMessageInput | FunctionCallOutputInputInput | FunctionCallInputInput | ReasoningInputItemInput;
856
- export type InputItemOutput = InputMessageOutput | FunctionCallOutputInputOutput | FunctionCallInputOutput | ReasoningInputItemOutput;
977
+ export type InputItemInput = InputMessageInput | FunctionCallOutputInputInput | FunctionCallInputInput | ReasoningInputItemInput | McpApprovalResponseInputInput | McpApprovalRequestInputInput | McpCallInputInput | McpListToolsInputInput;
978
+ export type InputItemOutput = InputMessageOutput | FunctionCallOutputInputOutput | FunctionCallInputOutput | ReasoningInputItemOutput | McpApprovalResponseInputOutput | McpApprovalRequestInputOutput | McpCallInputOutput | McpListToolsInputOutput;
857
979
  export type InputMessageInput = {
858
980
  content: InputContentInput;
859
981
  role: "user" | "assistant" | "system" | "developer";
860
- type: "message";
982
+ type?: "message";
861
983
  };
862
984
  export type InputMessageOutput = {
863
985
  content: InputContentOutput;
864
986
  role: "user" | "assistant" | "system" | "developer";
865
- type: "message";
987
+ type?: "message";
988
+ };
989
+ export type InputTokensDetailsInput = {
990
+ cache_creation_input_tokens?: number;
991
+ cache_read_input_tokens?: number;
992
+ cached_tokens: number;
993
+ };
994
+ export type InputTokensDetailsOutput = {
995
+ cache_creation_input_tokens?: number;
996
+ cache_read_input_tokens?: number;
997
+ cached_tokens: number;
866
998
  };
867
999
  export type JSONSchemaInput = {
868
1000
  description?: string | null;
@@ -896,7 +1028,98 @@ export type ListAsyncApiChatCompletionsResponseOutput = {
896
1028
  next_token?: string | null;
897
1029
  requests: AsyncApiChatCompletionsResponseSummaryOutput[];
898
1030
  };
1031
+ export type ManagedSkillInput = {
1032
+ created_at?: string;
1033
+ description?: string;
1034
+ latest_revision?: string;
1035
+ name?: string;
1036
+ revision?: string;
1037
+ skill_id: string;
1038
+ updated_at?: string;
1039
+ };
1040
+ export type ManagedSkillOutput = {
1041
+ created_at?: string;
1042
+ description?: string;
1043
+ latest_revision?: string;
1044
+ name?: string;
1045
+ revision?: string;
1046
+ skill_id: string;
1047
+ updated_at?: string;
1048
+ };
1049
+ export type McpApprovalRequestInputInput = {
1050
+ arguments: string;
1051
+ connector_id?: string;
1052
+ id: string;
1053
+ name: string;
1054
+ server_label: string;
1055
+ thought_signature?: string;
1056
+ type: "mcp_approval_request";
1057
+ };
1058
+ export type McpApprovalRequestInputOutput = {
1059
+ arguments: string;
1060
+ connector_id?: string;
1061
+ id: string;
1062
+ name: string;
1063
+ server_label: string;
1064
+ thought_signature?: string;
1065
+ type: "mcp_approval_request";
1066
+ };
1067
+ export type McpApprovalRequestOutputItemInput = {
1068
+ arguments: string;
1069
+ connector_id?: string;
1070
+ id: string;
1071
+ name: string;
1072
+ server_label: string;
1073
+ thought_signature?: string;
1074
+ type: "mcp_approval_request";
1075
+ };
1076
+ export type McpApprovalRequestOutputItemOutput = {
1077
+ arguments: string;
1078
+ connector_id?: string;
1079
+ id: string;
1080
+ name: string;
1081
+ server_label: string;
1082
+ thought_signature?: string;
1083
+ type: "mcp_approval_request";
1084
+ };
1085
+ export type McpApprovalResponseInputInput = {
1086
+ approval_request_id: string;
1087
+ approve: boolean;
1088
+ id?: string | null;
1089
+ reason?: string | null;
1090
+ type: "mcp_approval_response";
1091
+ };
1092
+ export type McpApprovalResponseInputOutput = {
1093
+ approval_request_id: string;
1094
+ approve: boolean;
1095
+ id?: string | null;
1096
+ reason?: string | null;
1097
+ type: "mcp_approval_response";
1098
+ };
1099
+ export type McpCallInputInput = {
1100
+ approval_request_id?: string | null;
1101
+ arguments: string;
1102
+ connector_id?: string;
1103
+ error?: string | null;
1104
+ id: string;
1105
+ name: string;
1106
+ output?: string;
1107
+ server_label: string;
1108
+ type: "mcp_call";
1109
+ };
1110
+ export type McpCallInputOutput = {
1111
+ approval_request_id?: string | null;
1112
+ arguments: string;
1113
+ connector_id?: string;
1114
+ error?: string | null;
1115
+ id: string;
1116
+ name: string;
1117
+ output?: string;
1118
+ server_label: string;
1119
+ type: "mcp_call";
1120
+ };
899
1121
  export type McpCallOutputItemInput = {
1122
+ approval_request_id?: string | null;
900
1123
  arguments: string;
901
1124
  connector_id?: string;
902
1125
  error?: string | null;
@@ -907,6 +1130,7 @@ export type McpCallOutputItemInput = {
907
1130
  type: "mcp_call";
908
1131
  };
909
1132
  export type McpCallOutputItemOutput = {
1133
+ approval_request_id?: string | null;
910
1134
  arguments: string;
911
1135
  connector_id?: string;
912
1136
  error?: string | null;
@@ -916,6 +1140,20 @@ export type McpCallOutputItemOutput = {
916
1140
  server_label: string;
917
1141
  type: "mcp_call";
918
1142
  };
1143
+ export type McpListToolsInputInput = {
1144
+ error?: string | null;
1145
+ id?: string;
1146
+ server_label?: string;
1147
+ tools?: McpToolDefInput[];
1148
+ type: "mcp_list_tools";
1149
+ };
1150
+ export type McpListToolsInputOutput = {
1151
+ error?: string | null;
1152
+ id?: string;
1153
+ server_label?: string;
1154
+ tools?: McpToolDefOutput[];
1155
+ type: "mcp_list_tools";
1156
+ };
919
1157
  export type McpListToolsOutputItemInput = {
920
1158
  connector_id?: string;
921
1159
  error?: string;
@@ -937,6 +1175,7 @@ export type McpToolInput = {
937
1175
  authorization?: string;
938
1176
  defer_loading?: boolean;
939
1177
  headers?: {} & Record<string, string>;
1178
+ require_approval?: RequireApprovalInput;
940
1179
  server_label: string;
941
1180
  server_url: string;
942
1181
  type: "mcp";
@@ -946,16 +1185,23 @@ export type McpToolOutput = {
946
1185
  authorization?: string;
947
1186
  defer_loading?: boolean;
948
1187
  headers?: {} & Record<string, string>;
1188
+ require_approval?: RequireApprovalOutput;
949
1189
  server_label: string;
950
1190
  server_url: string;
951
1191
  type: "mcp";
952
1192
  };
953
1193
  export type McpToolDefInput = {
1194
+ annotations?: ({
1195
+ read_only?: boolean;
1196
+ } & Record<string, unknown>) | null;
954
1197
  description?: string;
955
1198
  input_schema: {} & Record<string, unknown>;
956
1199
  name: string;
957
1200
  };
958
1201
  export type McpToolDefOutput = {
1202
+ annotations?: ({
1203
+ read_only?: boolean;
1204
+ } & Record<string, unknown>) | null;
959
1205
  description?: string;
960
1206
  input_schema: {} & Record<string, unknown>;
961
1207
  name: string;
@@ -974,6 +1220,26 @@ export type MessageOutputItemOutput = {
974
1220
  status: StatusOutput;
975
1221
  type: "message";
976
1222
  };
1223
+ export type ModelInput = {
1224
+ created: number;
1225
+ id: string;
1226
+ object: "model";
1227
+ owned_by: string;
1228
+ };
1229
+ export type ModelOutput = {
1230
+ created: number;
1231
+ id: string;
1232
+ object: "model";
1233
+ owned_by: string;
1234
+ };
1235
+ export type ModelListInput = {
1236
+ data: ModelInput[];
1237
+ object: "list";
1238
+ };
1239
+ export type ModelListOutput = {
1240
+ data: ModelOutput[];
1241
+ object: "list";
1242
+ };
977
1243
  export type NamespaceToolInput = {
978
1244
  description: string;
979
1245
  name: string;
@@ -998,8 +1264,8 @@ export type NamespaceToolDefOutput = {
998
1264
  parameters?: {} & Record<string, unknown>;
999
1265
  type: "function";
1000
1266
  };
1001
- export type OutputItemInput = MessageOutputItemInput | SearchResultsOutputItemInput | ImageSearchResultsOutputItemInput | FetchUrlResultsOutputItemInput | FunctionCallOutputItemInput | McpListToolsOutputItemInput | McpCallOutputItemInput | ToolSearchOutputItemInput | SkillLoadedOutputItemInput | AdvisorResultOutputItemInput | SandboxResultsOutputItemInput | SandboxWriteFileOutputItemInput | SandboxReadFileOutputItemInput | SandboxEditFileOutputItemInput | SandboxGrepOutputItemInput | SandboxGlobOutputItemInput | SandboxApplyPatchOutputItemInput | ShareFileOutputItemInput | UnknownOutputItemInput;
1002
- export type OutputItemOutput = MessageOutputItemOutput | SearchResultsOutputItemOutput | ImageSearchResultsOutputItemOutput | FetchUrlResultsOutputItemOutput | FunctionCallOutputItemOutput | McpListToolsOutputItemOutput | McpCallOutputItemOutput | ToolSearchOutputItemOutput | SkillLoadedOutputItemOutput | AdvisorResultOutputItemOutput | SandboxResultsOutputItemOutput | SandboxWriteFileOutputItemOutput | SandboxReadFileOutputItemOutput | SandboxEditFileOutputItemOutput | SandboxGrepOutputItemOutput | SandboxGlobOutputItemOutput | SandboxApplyPatchOutputItemOutput | ShareFileOutputItemOutput | UnknownOutputItemOutput;
1267
+ export type OutputItemInput = MessageOutputItemInput | SearchResultsOutputItemInput | ImageSearchResultsOutputItemInput | FetchUrlResultsOutputItemInput | FunctionCallOutputItemInput | McpListToolsOutputItemInput | McpCallOutputItemInput | McpApprovalRequestOutputItemInput | ToolSearchOutputItemInput | SkillLoadedOutputItemInput | AdvisorResultOutputItemInput | SandboxResultsOutputItemInput | SandboxWriteFileOutputItemInput | SandboxReadFileOutputItemInput | SandboxEditFileOutputItemInput | SandboxGrepOutputItemInput | SandboxGlobOutputItemInput | SandboxApplyPatchOutputItemInput | ShareFileOutputItemInput | UnknownOutputItemInput;
1268
+ export type OutputItemOutput = MessageOutputItemOutput | SearchResultsOutputItemOutput | ImageSearchResultsOutputItemOutput | FetchUrlResultsOutputItemOutput | FunctionCallOutputItemOutput | McpListToolsOutputItemOutput | McpCallOutputItemOutput | McpApprovalRequestOutputItemOutput | ToolSearchOutputItemOutput | SkillLoadedOutputItemOutput | AdvisorResultOutputItemOutput | SandboxResultsOutputItemOutput | SandboxWriteFileOutputItemOutput | SandboxReadFileOutputItemOutput | SandboxEditFileOutputItemOutput | SandboxGrepOutputItemOutput | SandboxGlobOutputItemOutput | SandboxApplyPatchOutputItemOutput | ShareFileOutputItemOutput | UnknownOutputItemOutput;
1003
1269
  export type OutputItemAddedEventInput = {
1004
1270
  item: OutputItemInput;
1005
1271
  output_index: number;
@@ -1024,6 +1290,12 @@ export type OutputItemDoneEventOutput = {
1024
1290
  sequence_number: number;
1025
1291
  type: "response.output_item.done";
1026
1292
  };
1293
+ export type OutputTokensDetailsInput = {
1294
+ reasoning_tokens: number;
1295
+ };
1296
+ export type OutputTokensDetailsOutput = {
1297
+ reasoning_tokens: number;
1298
+ };
1027
1299
  export type ParameterSpecInput = {
1028
1300
  additional_properties?: boolean | null;
1029
1301
  properties: {} & Record<string, unknown>;
@@ -1150,6 +1422,8 @@ export type RegexSchemaOutput = {
1150
1422
  regex: string;
1151
1423
  strict?: boolean | null;
1152
1424
  };
1425
+ export type RequireApprovalInput = ("always" | "never") | ApprovalFiltersInput;
1426
+ export type RequireApprovalOutput = ("always" | "never") | ApprovalFiltersOutput;
1153
1427
  export type ResponseCompletedEventInput = {
1154
1428
  response?: ResponsesResponseInput;
1155
1429
  sequence_number: number;
@@ -1284,10 +1558,11 @@ export type ResponsesRequestInput = {
1284
1558
  preset?: string;
1285
1559
  previous_response_id?: string;
1286
1560
  profile?: ProfileReferenceInput;
1561
+ prompt_cache_key?: string;
1287
1562
  reasoning?: ReasoningConfigInput;
1288
1563
  response_format?: ResponseFormatInput;
1564
+ service_tier?: "auto" | "default" | "flex" | "priority" | "fast";
1289
1565
  skills?: SkillInput[];
1290
- step_budget_reminder?: boolean;
1291
1566
  store?: boolean;
1292
1567
  stream?: boolean;
1293
1568
  temperature?: number;
@@ -1307,10 +1582,11 @@ export type ResponsesRequestOutput = {
1307
1582
  preset?: string;
1308
1583
  previous_response_id?: string;
1309
1584
  profile?: ProfileReferenceOutput;
1585
+ prompt_cache_key?: string;
1310
1586
  reasoning?: ReasoningConfigOutput;
1311
1587
  response_format?: ResponseFormatOutput;
1588
+ service_tier?: "auto" | "default" | "flex" | "priority" | "fast";
1312
1589
  skills?: SkillOutput[];
1313
- step_budget_reminder?: boolean;
1314
1590
  store?: boolean;
1315
1591
  stream?: boolean;
1316
1592
  temperature?: number;
@@ -1327,6 +1603,8 @@ export type ResponsesResponseInput = {
1327
1603
  object: ResponsesObjectTypeInput;
1328
1604
  output: OutputItemInput[];
1329
1605
  previous_response_id?: string | null;
1606
+ prompt_cache_key?: string | null;
1607
+ service_tier?: string;
1330
1608
  status: StatusInput;
1331
1609
  store?: boolean;
1332
1610
  usage?: ResponsesUsageInput;
@@ -1340,6 +1618,8 @@ export type ResponsesResponseOutput = {
1340
1618
  object: ResponsesObjectTypeOutput;
1341
1619
  output: OutputItemOutput[];
1342
1620
  previous_response_id?: string | null;
1621
+ prompt_cache_key?: string | null;
1622
+ service_tier?: string;
1343
1623
  status: StatusOutput;
1344
1624
  store?: boolean;
1345
1625
  usage?: ResponsesUsageOutput;
@@ -1586,6 +1866,30 @@ export type ShareFileOutputItemOutput = {
1586
1866
  };
1587
1867
  export type SkillInput = BuiltinSkillInput | InlineSkillInput | CustomSkillInput;
1588
1868
  export type SkillOutput = BuiltinSkillOutput | InlineSkillOutput | CustomSkillOutput;
1869
+ export type SkillBundleInput = {
1870
+ file: Blob;
1871
+ };
1872
+ export type SkillBundleOutput = {
1873
+ file: string;
1874
+ };
1875
+ export type SkillDownloadInput = {
1876
+ download_url: string;
1877
+ name?: string;
1878
+ revision?: string;
1879
+ };
1880
+ export type SkillDownloadOutput = {
1881
+ download_url: string;
1882
+ name?: string;
1883
+ revision?: string;
1884
+ };
1885
+ export type SkillListInput = {
1886
+ next_page_token?: string;
1887
+ skills: SkillSummaryInput[];
1888
+ };
1889
+ export type SkillListOutput = {
1890
+ next_page_token?: string;
1891
+ skills: SkillSummaryOutput[];
1892
+ };
1589
1893
  export type SkillLoadedOutputItemInput = {
1590
1894
  name: string;
1591
1895
  type: "skill_loaded";
@@ -1594,6 +1898,38 @@ export type SkillLoadedOutputItemOutput = {
1594
1898
  name: string;
1595
1899
  type: "skill_loaded";
1596
1900
  };
1901
+ export type SkillRevisionInput = {
1902
+ created_at?: string;
1903
+ name?: string;
1904
+ revision: string;
1905
+ };
1906
+ export type SkillRevisionOutput = {
1907
+ created_at?: string;
1908
+ name?: string;
1909
+ revision: string;
1910
+ };
1911
+ export type SkillRevisionListInput = {
1912
+ next_page_token?: string;
1913
+ revisions: SkillRevisionInput[];
1914
+ };
1915
+ export type SkillRevisionListOutput = {
1916
+ next_page_token?: string;
1917
+ revisions: SkillRevisionOutput[];
1918
+ };
1919
+ export type SkillSummaryInput = {
1920
+ created_at?: string;
1921
+ name?: string;
1922
+ revision?: string;
1923
+ skill_id: string;
1924
+ updated_at?: string;
1925
+ };
1926
+ export type SkillSummaryOutput = {
1927
+ created_at?: string;
1928
+ name?: string;
1929
+ revision?: string;
1930
+ skill_id: string;
1931
+ updated_at?: string;
1932
+ };
1597
1933
  export type StatusInput = "completed" | "failed" | "in_progress" | "queued" | "cancelled" | "requires_action";
1598
1934
  export type StatusOutput = "completed" | "failed" | "in_progress" | "queued" | "cancelled" | "requires_action";
1599
1935
  export type TextDeltaEventInput = {
@@ -1641,10 +1977,14 @@ export type ToolCallOutput = {
1641
1977
  type?: "function" | null;
1642
1978
  };
1643
1979
  export type ToolCallDetailsInput = {
1980
+ cost_usd?: number;
1644
1981
  invocation?: number;
1982
+ token_usage?: ToolCallTokenUsageInput[];
1645
1983
  };
1646
1984
  export type ToolCallDetailsOutput = {
1985
+ cost_usd?: number;
1647
1986
  invocation?: number;
1987
+ token_usage?: ToolCallTokenUsageOutput[];
1648
1988
  };
1649
1989
  export type ToolCallFunctionInput = {
1650
1990
  arguments?: string | null;
@@ -1654,6 +1994,20 @@ export type ToolCallFunctionOutput = {
1654
1994
  arguments?: string | null;
1655
1995
  name?: string | null;
1656
1996
  };
1997
+ export type ToolCallTokenUsageInput = {
1998
+ input_tokens: number;
1999
+ input_tokens_details: InputTokensDetailsInput;
2000
+ model?: string;
2001
+ output_tokens: number;
2002
+ output_tokens_details: OutputTokensDetailsInput;
2003
+ };
2004
+ export type ToolCallTokenUsageOutput = {
2005
+ input_tokens: number;
2006
+ input_tokens_details: InputTokensDetailsOutput;
2007
+ model?: string;
2008
+ output_tokens: number;
2009
+ output_tokens_details: OutputTokensDetailsOutput;
2010
+ };
1657
2011
  export type ToolChoiceInput = ("none" | "auto" | "required") | ({} & Record<string, unknown>);
1658
2012
  export type ToolChoiceOutput = ("none" | "auto" | "required") | ({} & Record<string, unknown>);
1659
2013
  export type ToolSearchOutputItemInput = {
@@ -1858,6 +2212,14 @@ export declare class ResponsesFilesResource {
1858
2212
  }, options?: RequestOptions): APIPromise<Response>;
1859
2213
  list(responseID: string, options?: RequestOptions): APIPromise<ResponseFileListOutput>;
1860
2214
  }
2215
+ export declare class SkillsRevisionsResource {
2216
+ private readonly _client;
2217
+ constructor(client: SdkTransport);
2218
+ list(skillID: string, params?: {
2219
+ limit?: number;
2220
+ page_token?: string;
2221
+ }, options?: RequestOptions): APIPromise<SkillRevisionListOutput>;
2222
+ }
1861
2223
  export declare class AsyncResource {
1862
2224
  readonly chat: AsyncChatResource;
1863
2225
  constructor(client: SdkTransport);
@@ -1875,11 +2237,21 @@ export declare class ContextualizedEmbeddingsResource {
1875
2237
  constructor(client: SdkTransport);
1876
2238
  create(body: ContextualizedEmbeddingsRequestInput, options?: RequestOptions): APIPromise<ContextualizedEmbeddingsResponseOutput>;
1877
2239
  }
2240
+ export declare class DecisionsResource {
2241
+ private readonly _client;
2242
+ constructor(client: SdkTransport);
2243
+ create(body: DecisionsRequestInput, options?: RequestOptions): APIPromise<DecisionsResponseOutput>;
2244
+ }
1878
2245
  export declare class EmbeddingsResource {
1879
2246
  private readonly _client;
1880
2247
  constructor(client: SdkTransport);
1881
2248
  create(body: EmbeddingsRequestInput, options?: RequestOptions): APIPromise<EmbeddingsResponseOutput>;
1882
2249
  }
2250
+ export declare class ModelsResource {
2251
+ private readonly _client;
2252
+ constructor(client: SdkTransport);
2253
+ list(options?: RequestOptions): APIPromise<ModelListOutput>;
2254
+ }
1883
2255
  export declare class ResponsesResource {
1884
2256
  private readonly _client;
1885
2257
  readonly files: ResponsesFilesResource;
@@ -1899,23 +2271,78 @@ export declare class ResponsesResource {
1899
2271
  create(body: ResponsesRequestInput, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
1900
2272
  output_text: string;
1901
2273
  }) | Stream<ResponseStreamEventOutput>>;
1902
- retrieve(responseID: string, options?: RequestOptions): APIPromise<ResponsesResponseOutput & {
2274
+ retrieve(responseID: string, params?: Omit<{
2275
+ starting_after?: number;
2276
+ stream?: boolean;
2277
+ }, "stream"> & {
2278
+ stream?: false;
2279
+ }, options?: RequestOptions): APIPromise<ResponsesResponseOutput & {
2280
+ output_text: string;
2281
+ }>;
2282
+ retrieve(responseID: string, params: Omit<Required<{
2283
+ starting_after?: number;
2284
+ stream?: boolean;
2285
+ }>, "stream"> & {
2286
+ stream: true;
2287
+ }, options?: RequestOptions): APIPromise<Stream<ResponseStreamEventOutput>>;
2288
+ retrieve(responseID: string, params: Omit<Required<{
2289
+ starting_after?: number;
2290
+ stream?: boolean;
2291
+ }>, "stream"> & {
2292
+ stream: boolean;
2293
+ }, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
2294
+ output_text: string;
2295
+ }) | Stream<ResponseStreamEventOutput>>;
2296
+ retrieve(responseID: string, params?: Omit<RequestOptions, "__binaryResponse" | "body" | "defaultBaseURL" | "method" | "path"> & {
2297
+ starting_after?: never;
2298
+ }, options?: RequestOptions): APIPromise<ResponsesResponseOutput & {
1903
2299
  output_text: string;
1904
2300
  }>;
2301
+ retrieve(responseID: string, params?: {
2302
+ starting_after?: number;
2303
+ stream?: boolean;
2304
+ }, options?: RequestOptions): APIPromise<(ResponsesResponseOutput & {
2305
+ output_text: string;
2306
+ }) | Stream<ResponseStreamEventOutput>>;
1905
2307
  }
1906
2308
  export declare class SearchResource {
1907
2309
  private readonly _client;
1908
2310
  constructor(client: SdkTransport);
1909
2311
  create(body: ApiSearchRequestInput, options?: RequestOptions): APIPromise<ApiSearchResponseOutput>;
1910
2312
  }
2313
+ export declare class SkillsResource {
2314
+ private readonly _client;
2315
+ readonly revisions: SkillsRevisionsResource;
2316
+ constructor(client: SdkTransport);
2317
+ create(body: SkillBundleInput, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
2318
+ delete(skillID: string, params: {
2319
+ expected_revision: string;
2320
+ }, options?: RequestOptions): APIPromise<void>;
2321
+ download(skillID: string, params?: {
2322
+ revision?: string;
2323
+ }, options?: RequestOptions): APIPromise<SkillDownloadOutput>;
2324
+ list(params?: {
2325
+ limit?: number;
2326
+ page_token?: string;
2327
+ }, options?: RequestOptions): APIPromise<SkillListOutput>;
2328
+ retrieve(skillID: string, params?: {
2329
+ revision?: string;
2330
+ }, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
2331
+ update(skillID: string, body: SkillBundleInput, params: {
2332
+ expected_revision: string;
2333
+ }, options?: RequestOptions): APIPromise<ManagedSkillOutput>;
2334
+ }
1911
2335
  export declare class PerplexitySdk {
1912
2336
  readonly async: AsyncResource;
1913
2337
  readonly browser: BrowserResource;
1914
2338
  readonly chat: ChatResource;
1915
2339
  readonly contextualizedEmbeddings: ContextualizedEmbeddingsResource;
2340
+ readonly decisions: DecisionsResource;
1916
2341
  readonly embeddings: EmbeddingsResource;
2342
+ readonly models: ModelsResource;
1917
2343
  readonly responses: ResponsesResource;
1918
2344
  readonly search: SearchResource;
2345
+ readonly skills: SkillsResource;
1919
2346
  constructor(client: SdkTransport);
1920
2347
  }
1921
2348
  export declare class Async extends AsyncResource {
@@ -1926,12 +2353,18 @@ export declare class Chat extends ChatResource {
1926
2353
  }
1927
2354
  export declare class ContextualizedEmbeddings extends ContextualizedEmbeddingsResource {
1928
2355
  }
2356
+ export declare class Decisions extends DecisionsResource {
2357
+ }
1929
2358
  export declare class Embeddings extends EmbeddingsResource {
1930
2359
  }
2360
+ export declare class Models extends ModelsResource {
2361
+ }
1931
2362
  export declare class Responses extends ResponsesResource {
1932
2363
  }
1933
2364
  export declare class Search extends SearchResource {
1934
2365
  }
2366
+ export declare class Skills extends SkillsResource {
2367
+ }
1935
2368
  export type Annotation = AnnotationOutput;
1936
2369
  export type APIPublicSearchResult = ApiPublicSearchResultOutput;
1937
2370
  export type BrowserSessionResponse = BrowserSessionResponseOutput;
@@ -1942,6 +2375,10 @@ export type ContentPart = ContentPartOutput;
1942
2375
  export type ContextualizedEmbeddingCreateParams = ContextualizedEmbeddingsRequestInput;
1943
2376
  export type ContextualizedEmbeddingCreateResponse = ContextualizedEmbeddingsResponseOutput;
1944
2377
  export type ContextualizedEmbeddingObject = ContextualizedEmbeddingObjectOutput;
2378
+ export type DecisionAnswer = DecisionAnswerOutput;
2379
+ export type DecisionCreateParams = DecisionsRequestInput;
2380
+ export type DecisionCreateResponse = Awaited<ReturnType<DecisionsResource["create"]>>;
2381
+ export type DecisionQuestion = DecisionQuestionInput;
1945
2382
  export type EmbeddingCreateParams = EmbeddingsRequestInput;
1946
2383
  export type EmbeddingCreateResponse = EmbeddingsResponseOutput;
1947
2384
  export type EmbeddingObject = EmbeddingObjectOutput;
@@ -1954,6 +2391,9 @@ export type ImageSearchResultsOutputItem = ImageSearchResultsOutputItemOutput;
1954
2391
  export type ImageSearchTool = ImageSearchToolInput;
1955
2392
  export type InputItem = InputItemInput;
1956
2393
  export type JsonSchemaFormat = JSONSchemaFormatInput;
2394
+ export type ManagedSkill = ManagedSkillOutput;
2395
+ export type Model = ModelOutput;
2396
+ export type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
1957
2397
  export type OutputItem = OutputItemOutput;
1958
2398
  export type ResponseCancelResponse = Awaited<ReturnType<ResponsesResource["cancel"]>>;
1959
2399
  export type ResponseCreateParams = ResponsesRequestInput;
@@ -1972,6 +2412,11 @@ export type ResponsesUsage = ResponsesUsageOutput;
1972
2412
  export type SearchCreateParams = ApiSearchRequestInput;
1973
2413
  export type SearchCreateResponse = ApiSearchResponseOutput;
1974
2414
  export type SearchResult = SearchResultOutput;
2415
+ export type SkillDownloadResponse = SkillDownloadOutput;
2416
+ export type SkillListResponse = SkillListOutput;
2417
+ export type SkillRevision = SkillRevisionOutput;
2418
+ export type SkillRevisionListResponse = SkillRevisionListOutput;
2419
+ export type SkillUploadParams = SkillBundleInput;
1975
2420
  export type StreamChunk = CompletionResponseOutput;
1976
2421
  export type UsageInfo = UsageInfoOutput;
1977
2422
  export type UserLocation = UserLocationInput;
@@ -2029,10 +2474,20 @@ export declare namespace ContextualizedEmbeddings {
2029
2474
  type ContextualizedEmbeddingCreateParams = ContextualizedEmbeddingsRequestInput;
2030
2475
  type ContextualizedEmbeddingCreateResponse = ContextualizedEmbeddingsResponseOutput;
2031
2476
  }
2477
+ export declare namespace Decisions {
2478
+ type DecisionAnswer = DecisionAnswerOutput;
2479
+ type DecisionCreateParams = DecisionsRequestInput;
2480
+ type DecisionCreateResponse = Awaited<ReturnType<DecisionsResource["create"]>>;
2481
+ type DecisionQuestion = DecisionQuestionInput;
2482
+ }
2032
2483
  export declare namespace Embeddings {
2033
2484
  type EmbeddingCreateParams = EmbeddingsRequestInput;
2034
2485
  type EmbeddingCreateResponse = EmbeddingsResponseOutput;
2035
2486
  }
2487
+ export declare namespace Models {
2488
+ type Model = ModelOutput;
2489
+ type ModelListResponse = Awaited<ReturnType<ModelsResource["list"]>>;
2490
+ }
2036
2491
  export declare namespace Responses {
2037
2492
  class Files extends ResponsesFilesResource {
2038
2493
  }
@@ -2074,4 +2529,18 @@ export declare namespace Search {
2074
2529
  type SearchCreateParams = ApiSearchRequestInput;
2075
2530
  type SearchCreateResponse = ApiSearchResponseOutput;
2076
2531
  }
2532
+ export declare namespace Skills {
2533
+ class Revisions extends SkillsRevisionsResource {
2534
+ }
2535
+ type ManagedSkill = ManagedSkillOutput;
2536
+ type SkillDownloadResponse = SkillDownloadOutput;
2537
+ type SkillListResponse = SkillListOutput;
2538
+ type SkillRevision = SkillRevisionOutput;
2539
+ type SkillRevisionListResponse = SkillRevisionListOutput;
2540
+ type SkillUploadParams = SkillBundleInput;
2541
+ namespace Revisions {
2542
+ type SkillRevision = SkillRevisionOutput;
2543
+ type SkillRevisionListResponse = SkillRevisionListOutput;
2544
+ }
2545
+ }
2077
2546
  //# sourceMappingURL=api.d.ts.map