@ord-api/ord-api-types 1.0.5 → 1.0.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/types.ts +208 -65
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ord-api/ord-api-types",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "TypeScript types for ORD API - Auto-generated from OpenAPI specification",
5
5
  "main": "types.ts",
6
6
  "types": "types.ts",
package/types.ts CHANGED
@@ -148,6 +148,26 @@ export interface paths {
148
148
  patch?: never;
149
149
  trace?: never;
150
150
  };
151
+ "/api/v1/words/ai/suggest-vocabulary": {
152
+ parameters: {
153
+ query?: never;
154
+ header?: never;
155
+ path?: never;
156
+ cookie?: never;
157
+ };
158
+ get?: never;
159
+ put?: never;
160
+ /**
161
+ * Suggest vocabulary for learning
162
+ * @description Generate personalized AI-powered vocabulary suggestions based on user's proficiency level and existing vocabulary (streaming response). Optionally accepts context to tailor suggestions to specific scenarios (e.g., 'business meetings', 'grocery shopping').
163
+ */
164
+ post: operations["suggestVocabulary"];
165
+ delete?: never;
166
+ options?: never;
167
+ head?: never;
168
+ patch?: never;
169
+ trace?: never;
170
+ };
151
171
  "/api/v1/words/ai/generate-manual": {
152
172
  parameters: {
153
173
  query?: never;
@@ -604,6 +624,26 @@ export interface paths {
604
624
  patch?: never;
605
625
  trace?: never;
606
626
  };
627
+ "/api/v1/ai-explainer/explain-phrase": {
628
+ parameters: {
629
+ query?: never;
630
+ header?: never;
631
+ path?: never;
632
+ cookie?: never;
633
+ };
634
+ get?: never;
635
+ put?: never;
636
+ /**
637
+ * Get AI explanation of a word or phrase
638
+ * @description Stream a clear, educational explanation of a word or phrase in plain text, including translation, definition, examples, and usage notes tailored to the user's proficiency level.
639
+ */
640
+ post: operations["explainPhrase"];
641
+ delete?: never;
642
+ options?: never;
643
+ head?: never;
644
+ patch?: never;
645
+ trace?: never;
646
+ };
607
647
  "/api/v1/words/{id}": {
608
648
  parameters: {
609
649
  query?: never;
@@ -866,7 +906,7 @@ export interface components {
866
906
  * @enum {string}
867
907
  */
868
908
  type: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
869
- origin: string;
909
+ sourceWord: string;
870
910
  translation: string;
871
911
  definition: string;
872
912
  /**
@@ -878,12 +918,7 @@ export interface components {
878
918
  * @description Supported languages in the platform
879
919
  * @enum {string}
880
920
  */
881
- translatedFrom: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
882
- /**
883
- * @description Supported languages in the platform
884
- * @enum {string}
885
- */
886
- translatedTo?: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
921
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
887
922
  /** Format: uuid */
888
923
  bankId?: string;
889
924
  bankToCreate?: components["schemas"]["CreateBankRequest"];
@@ -923,7 +958,7 @@ export interface components {
923
958
  * @enum {string}
924
959
  */
925
960
  type: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
926
- origin: string;
961
+ sourceWord: string;
927
962
  translation: string;
928
963
  definition: string;
929
964
  /**
@@ -935,12 +970,7 @@ export interface components {
935
970
  * @description Supported languages in the platform
936
971
  * @enum {string}
937
972
  */
938
- translatedFrom: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
939
- /**
940
- * @description Supported languages in the platform
941
- * @enum {string}
942
- */
943
- translatedTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
973
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
944
974
  isCompleted: boolean;
945
975
  isBookmarked: boolean;
946
976
  /** Format: int32 */
@@ -1055,7 +1085,7 @@ export interface components {
1055
1085
  /** @enum {string} */
1056
1086
  sortDirection?: "ASC" | "DESC";
1057
1087
  /** @enum {string} */
1058
- sortBy?: "CREATED_AT" | "ORIGIN";
1088
+ sortBy?: "CREATED_AT" | "SOURCE_WORD";
1059
1089
  };
1060
1090
  BankCompact: {
1061
1091
  name: string;
@@ -1110,7 +1140,7 @@ export interface components {
1110
1140
  id: string;
1111
1141
  /** Format: int32 */
1112
1142
  points: number;
1113
- origin: string;
1143
+ sourceWord: string;
1114
1144
  translation: string;
1115
1145
  isCompleted: boolean;
1116
1146
  isBookmarked: boolean;
@@ -1128,12 +1158,7 @@ export interface components {
1128
1158
  * @description Supported languages in the platform
1129
1159
  * @enum {string}
1130
1160
  */
1131
- translatedFrom: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1132
- /**
1133
- * @description Supported languages in the platform
1134
- * @enum {string}
1135
- */
1136
- translatedTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1161
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1137
1162
  bank?: components["schemas"]["BankCompact"];
1138
1163
  };
1139
1164
  ChangeBankForMultipleWordsRequest: {
@@ -1142,6 +1167,29 @@ export interface components {
1142
1167
  wordIds: string[];
1143
1168
  bankToCreate?: components["schemas"]["CreateBankRequest"];
1144
1169
  };
1170
+ /** @description Request to generate AI-powered vocabulary suggestions */
1171
+ SuggestVocabularyRequest: {
1172
+ /**
1173
+ * @description Supported languages in the platform
1174
+ * @example SPANISH
1175
+ * @enum {string}
1176
+ */
1177
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1178
+ /**
1179
+ * @description Optional context or scenario for vocabulary suggestions (e.g., 'for daily conversation in a grocery store')
1180
+ * @example for business meetings and professional emails
1181
+ */
1182
+ context?: string | null;
1183
+ /**
1184
+ * @description Optional list of words to exclude from suggestions (e.g., already suggested words in previous requests)
1185
+ * @example [
1186
+ * "hola",
1187
+ * "adiós",
1188
+ * "gracias"
1189
+ * ]
1190
+ */
1191
+ excludedWords?: (string | null)[] | null;
1192
+ };
1145
1193
  GenerateWordManualRequest: {
1146
1194
  word: string;
1147
1195
  /**
@@ -1159,6 +1207,7 @@ export interface components {
1159
1207
  };
1160
1208
  AIGeneratedWordManual: {
1161
1209
  originalWord: string;
1210
+ suggestedCorrection?: string;
1162
1211
  translation: string;
1163
1212
  definition: string;
1164
1213
  /**
@@ -1204,6 +1253,11 @@ export interface components {
1204
1253
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1205
1254
  /** @enum {string} */
1206
1255
  level: "A1" | "A2" | "B1" | "B2" | "C1" | "C2";
1256
+ /**
1257
+ * @description Supported languages in the platform
1258
+ * @enum {string}
1259
+ */
1260
+ translateTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1207
1261
  /**
1208
1262
  * @description Supported languages in the platform
1209
1263
  * @enum {string}
@@ -1271,6 +1325,11 @@ export interface components {
1271
1325
  * @enum {string}
1272
1326
  */
1273
1327
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1328
+ /**
1329
+ * @description Optional translation of the word
1330
+ * @example comprensivo
1331
+ */
1332
+ translation?: string | null;
1274
1333
  /**
1275
1334
  * @description Optional definition or notes about the word
1276
1335
  * @example Complete; including all or nearly all elements or aspects
@@ -1308,6 +1367,11 @@ export interface components {
1308
1367
  * @enum {string}
1309
1368
  */
1310
1369
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1370
+ /**
1371
+ * @description Translation of the word
1372
+ * @example comprensivo
1373
+ */
1374
+ translation?: string | null;
1311
1375
  /**
1312
1376
  * @description Definition or notes about the word
1313
1377
  * @example Complete; including all elements
@@ -1354,6 +1418,7 @@ export interface components {
1354
1418
  };
1355
1419
  PublicQAWWordItem: {
1356
1420
  word: string;
1421
+ translation?: string;
1357
1422
  definition?: string;
1358
1423
  /**
1359
1424
  * @description Extra marks or tags for word classification by register or domain
@@ -1366,40 +1431,19 @@ export interface components {
1366
1431
  */
1367
1432
  type?: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
1368
1433
  };
1369
- QuicklyAddedWordEntity: {
1370
- /** Format: uuid */
1371
- id?: string;
1372
- word: string;
1434
+ CreateLanguageProficiencyRequest: {
1373
1435
  /**
1374
1436
  * @description Supported languages in the platform
1375
1437
  * @enum {string}
1376
1438
  */
1377
1439
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1378
- definition?: string;
1379
- /**
1380
- * @description Extra marks or tags for word classification by register or domain
1381
- * @enum {string}
1382
- */
1383
- extraMark?: "OFFENSIVE" | "SLANG" | "FORMAL" | "INFORMAL" | "SCIENTIFIC" | "TECHNICAL" | "LEGAL" | "MEDICAL" | "COLLOQUIAL" | "POETIC";
1384
- /**
1385
- * @description Type of word or expression
1386
- * @enum {string}
1387
- */
1388
- type?: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
1389
- isApproved: boolean;
1390
- /** Format: date-time */
1391
- createdAt: string;
1392
- /** Format: uuid */
1393
- userId: string;
1394
- };
1395
- CreateLanguageProficiencyRequest: {
1440
+ /** @enum {string} */
1441
+ level: "A1" | "A2" | "B1" | "B2" | "C1" | "C2";
1396
1442
  /**
1397
1443
  * @description Supported languages in the platform
1398
1444
  * @enum {string}
1399
1445
  */
1400
- language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1401
- /** @enum {string} */
1402
- level: "A1" | "A2" | "B1" | "B2" | "C1" | "C2";
1446
+ translateTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1403
1447
  /**
1404
1448
  * @description Supported languages in the platform
1405
1449
  * @enum {string}
@@ -1416,6 +1460,11 @@ export interface components {
1416
1460
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1417
1461
  /** @enum {string} */
1418
1462
  level: "A1" | "A2" | "B1" | "B2" | "C1" | "C2";
1463
+ /**
1464
+ * @description Supported languages in the platform
1465
+ * @enum {string}
1466
+ */
1467
+ translateTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1419
1468
  /**
1420
1469
  * @description Supported languages in the platform
1421
1470
  * @enum {string}
@@ -1755,6 +1804,30 @@ export interface components {
1755
1804
  */
1756
1805
  email: string;
1757
1806
  };
1807
+ /** @description Request to get an AI-powered explanation of a word or phrase */
1808
+ ExplainPhraseRequest: {
1809
+ /**
1810
+ * @description The word or phrase to explain
1811
+ * @example hund
1812
+ */
1813
+ phrase: string;
1814
+ /**
1815
+ * @description Supported languages in the platform
1816
+ * @example NORWEGIAN
1817
+ * @enum {string}
1818
+ */
1819
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1820
+ /**
1821
+ * @description Optional context where the phrase is used (e.g., a paragraph or sentence containing the phrase)
1822
+ * @example I was reading a book and came across this phrase: 'break the ice'. The context was about meeting new people at a party.
1823
+ */
1824
+ context?: string | null;
1825
+ /**
1826
+ * @description Optional custom instruction in any language to guide the explanation (e.g., 'Focus on informal usage', 'Explain like I'm 5', 'Include etymology')
1827
+ * @example Please focus on how this is used in everyday conversation
1828
+ */
1829
+ customInstruction?: string | null;
1830
+ };
1758
1831
  JsonNullableSetExampleSentence: {
1759
1832
  present?: boolean;
1760
1833
  };
@@ -1791,7 +1864,7 @@ export interface components {
1791
1864
  * @enum {string}
1792
1865
  */
1793
1866
  type?: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
1794
- origin?: string;
1867
+ sourceWord?: string;
1795
1868
  translation?: string;
1796
1869
  definition?: string;
1797
1870
  /**
@@ -1803,18 +1876,14 @@ export interface components {
1803
1876
  * @description Supported languages in the platform
1804
1877
  * @enum {string}
1805
1878
  */
1806
- translatedFrom?: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1807
- /**
1808
- * @description Supported languages in the platform
1809
- * @enum {string}
1810
- */
1811
- translatedTo?: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1879
+ language?: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1812
1880
  /** Format: uuid */
1813
1881
  bankId?: string;
1814
1882
  bankToCreate?: components["schemas"]["CreateBankRequest"];
1815
1883
  };
1816
1884
  UpdateQAWRequest: {
1817
1885
  updatedWord?: string;
1886
+ translation?: string;
1818
1887
  definition?: string;
1819
1888
  /**
1820
1889
  * @description Extra marks or tags for word classification by register or domain
@@ -1838,6 +1907,11 @@ export interface components {
1838
1907
  language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1839
1908
  /** @enum {string} */
1840
1909
  level?: "A1" | "A2" | "B1" | "B2" | "C1" | "C2";
1910
+ /**
1911
+ * @description Supported languages in the platform
1912
+ * @enum {string}
1913
+ */
1914
+ translateTo?: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1841
1915
  /**
1842
1916
  * @description Supported languages in the platform
1843
1917
  * @enum {string}
@@ -1852,7 +1926,7 @@ export interface components {
1852
1926
  * @enum {string}
1853
1927
  */
1854
1928
  type: "NOUN" | "VERB" | "ADJECTIVE" | "ADVERB" | "IDIOM" | "PHRASE";
1855
- origin: string;
1929
+ sourceWord: string;
1856
1930
  translation: string;
1857
1931
  definition: string;
1858
1932
  /**
@@ -1864,12 +1938,7 @@ export interface components {
1864
1938
  * @description Supported languages in the platform
1865
1939
  * @enum {string}
1866
1940
  */
1867
- translatedFrom: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1868
- /**
1869
- * @description Supported languages in the platform
1870
- * @enum {string}
1871
- */
1872
- translatedTo: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1941
+ language: "POLISH" | "ENGLISH" | "GERMAN" | "FRENCH" | "SPANISH" | "ITALIAN" | "NORWEGIAN" | "RUSSIAN" | "SLOVENIAN";
1873
1942
  isCompleted: boolean;
1874
1943
  isBookmarked: boolean;
1875
1944
  /** Format: int32 */
@@ -2264,6 +2333,44 @@ export interface operations {
2264
2333
  };
2265
2334
  };
2266
2335
  };
2336
+ suggestVocabulary: {
2337
+ parameters: {
2338
+ query?: never;
2339
+ header?: never;
2340
+ path?: never;
2341
+ cookie?: never;
2342
+ };
2343
+ requestBody: {
2344
+ content: {
2345
+ "application/json": components["schemas"]["SuggestVocabularyRequest"];
2346
+ };
2347
+ };
2348
+ responses: {
2349
+ /** @description Vocabulary suggestions stream started successfully */
2350
+ 200: {
2351
+ headers: {
2352
+ [name: string]: unknown;
2353
+ };
2354
+ content: {
2355
+ "text/event-stream": string[];
2356
+ };
2357
+ };
2358
+ /** @description Invalid request data or user does not have proficiency in the requested language */
2359
+ 400: {
2360
+ headers: {
2361
+ [name: string]: unknown;
2362
+ };
2363
+ content?: never;
2364
+ };
2365
+ /** @description Unauthorized */
2366
+ 401: {
2367
+ headers: {
2368
+ [name: string]: unknown;
2369
+ };
2370
+ content?: never;
2371
+ };
2372
+ };
2373
+ };
2267
2374
  generateAIManual: {
2268
2375
  parameters: {
2269
2376
  query?: never;
@@ -2515,13 +2622,11 @@ export interface operations {
2515
2622
  };
2516
2623
  responses: {
2517
2624
  /** @description Words created successfully */
2518
- 200: {
2625
+ 204: {
2519
2626
  headers: {
2520
2627
  [name: string]: unknown;
2521
2628
  };
2522
- content: {
2523
- "*/*": components["schemas"]["QuicklyAddedWordEntity"][];
2524
- };
2629
+ content?: never;
2525
2630
  };
2526
2631
  /** @description Invalid request data or authentication failed */
2527
2632
  400: {
@@ -3316,6 +3421,44 @@ export interface operations {
3316
3421
  };
3317
3422
  };
3318
3423
  };
3424
+ explainPhrase: {
3425
+ parameters: {
3426
+ query?: never;
3427
+ header?: never;
3428
+ path?: never;
3429
+ cookie?: never;
3430
+ };
3431
+ requestBody: {
3432
+ content: {
3433
+ "application/json": components["schemas"]["ExplainPhraseRequest"];
3434
+ };
3435
+ };
3436
+ responses: {
3437
+ /** @description Word/phrase explanation stream started successfully */
3438
+ 200: {
3439
+ headers: {
3440
+ [name: string]: unknown;
3441
+ };
3442
+ content: {
3443
+ "text/event-stream": string[];
3444
+ };
3445
+ };
3446
+ /** @description Invalid request data or user does not have proficiency in the requested language */
3447
+ 400: {
3448
+ headers: {
3449
+ [name: string]: unknown;
3450
+ };
3451
+ content?: never;
3452
+ };
3453
+ /** @description Unauthorized */
3454
+ 401: {
3455
+ headers: {
3456
+ [name: string]: unknown;
3457
+ };
3458
+ content?: never;
3459
+ };
3460
+ };
3461
+ };
3319
3462
  getWord: {
3320
3463
  parameters: {
3321
3464
  query?: never;