@brigadasos/nadeshiko-sdk 1.4.2-dev.a13aba0 → 1.4.3-dev.5fa35ac

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/index.js CHANGED
@@ -1034,7 +1034,7 @@ var getSeiyuu = (options) => (options.client ?? client).get({
1034
1034
  url: "/v1/media/seiyuu/{id}",
1035
1035
  ...options
1036
1036
  });
1037
- var getQuota = (options) => (options?.client ?? client).get({
1037
+ var getUserQuota = (options) => (options?.client ?? client).get({
1038
1038
  security: [{
1039
1039
  in: "cookie",
1040
1040
  name: "nadeshiko.session_token",
@@ -1043,7 +1043,7 @@ var getQuota = (options) => (options?.client ?? client).get({
1043
1043
  url: "/v1/user/quota",
1044
1044
  ...options
1045
1045
  });
1046
- var listReports = (options) => (options?.client ?? client).get({
1046
+ var listUserReports = (options) => (options?.client ?? client).get({
1047
1047
  security: [{
1048
1048
  in: "cookie",
1049
1049
  name: "nadeshiko.session_token",
@@ -1052,7 +1052,7 @@ var listReports = (options) => (options?.client ?? client).get({
1052
1052
  url: "/v1/user/reports",
1053
1053
  ...options
1054
1054
  });
1055
- var createReport = (options) => (options.client ?? client).post({
1055
+ var createUserReport = (options) => (options.client ?? client).post({
1056
1056
  security: [{
1057
1057
  in: "cookie",
1058
1058
  name: "nadeshiko.session_token",
@@ -1065,7 +1065,7 @@ var createReport = (options) => (options.client ?? client).post({
1065
1065
  ...options.headers
1066
1066
  }
1067
1067
  });
1068
- var getPreferences = (options) => (options?.client ?? client).get({
1068
+ var getUserPreferences = (options) => (options?.client ?? client).get({
1069
1069
  security: [{
1070
1070
  in: "cookie",
1071
1071
  name: "nadeshiko.session_token",
@@ -1074,7 +1074,7 @@ var getPreferences = (options) => (options?.client ?? client).get({
1074
1074
  url: "/v1/user/preferences",
1075
1075
  ...options
1076
1076
  });
1077
- var updatePreferences = (options) => (options.client ?? client).patch({
1077
+ var updateUserPreferences = (options) => (options.client ?? client).patch({
1078
1078
  security: [{
1079
1079
  in: "cookie",
1080
1080
  name: "nadeshiko.session_token",
@@ -1087,7 +1087,7 @@ var updatePreferences = (options) => (options.client ?? client).patch({
1087
1087
  ...options.headers
1088
1088
  }
1089
1089
  });
1090
- var deleteActivity = (options) => (options?.client ?? client).delete({
1090
+ var deleteUserActivity = (options) => (options?.client ?? client).delete({
1091
1091
  security: [{
1092
1092
  in: "cookie",
1093
1093
  name: "nadeshiko.session_token",
@@ -1096,7 +1096,7 @@ var deleteActivity = (options) => (options?.client ?? client).delete({
1096
1096
  url: "/v1/user/activity",
1097
1097
  ...options
1098
1098
  });
1099
- var listActivity = (options) => (options?.client ?? client).get({
1099
+ var listUserActivity = (options) => (options?.client ?? client).get({
1100
1100
  security: [{
1101
1101
  in: "cookie",
1102
1102
  name: "nadeshiko.session_token",
@@ -1105,7 +1105,7 @@ var listActivity = (options) => (options?.client ?? client).get({
1105
1105
  url: "/v1/user/activity",
1106
1106
  ...options
1107
1107
  });
1108
- var getActivityHeatmap = (options) => (options?.client ?? client).get({
1108
+ var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
1109
1109
  security: [{
1110
1110
  in: "cookie",
1111
1111
  name: "nadeshiko.session_token",
@@ -1114,7 +1114,7 @@ var getActivityHeatmap = (options) => (options?.client ?? client).get({
1114
1114
  url: "/v1/user/activity/heatmap",
1115
1115
  ...options
1116
1116
  });
1117
- var getActivityStats = (options) => (options?.client ?? client).get({
1117
+ var getUserActivityStats = (options) => (options?.client ?? client).get({
1118
1118
  security: [{
1119
1119
  in: "cookie",
1120
1120
  name: "nadeshiko.session_token",
@@ -1123,7 +1123,7 @@ var getActivityStats = (options) => (options?.client ?? client).get({
1123
1123
  url: "/v1/user/activity/stats",
1124
1124
  ...options
1125
1125
  });
1126
- var exportData = (options) => (options?.client ?? client).get({
1126
+ var exportUserData = (options) => (options?.client ?? client).get({
1127
1127
  security: [{
1128
1128
  in: "cookie",
1129
1129
  name: "nadeshiko.session_token",
@@ -1132,7 +1132,7 @@ var exportData = (options) => (options?.client ?? client).get({
1132
1132
  url: "/v1/user/export",
1133
1133
  ...options
1134
1134
  });
1135
- var listLabs = (options) => (options?.client ?? client).get({
1135
+ var listUserLabs = (options) => (options?.client ?? client).get({
1136
1136
  security: [{
1137
1137
  in: "cookie",
1138
1138
  name: "nadeshiko.session_token",
@@ -1345,7 +1345,12 @@ function createNadeshikoClient(config) {
1345
1345
  const baseUrl = config.baseUrl ? config.baseUrl in environments ? environments[config.baseUrl] : config.baseUrl : environments.PRODUCTION;
1346
1346
  const clientInstance = createClient(createConfig({
1347
1347
  baseUrl,
1348
- headers: { Authorization: `Bearer ${config.apiKey}` }
1348
+ auth: (auth) => {
1349
+ if (auth.in === "cookie") {
1350
+ return config.sessionToken;
1351
+ }
1352
+ return config.apiKey;
1353
+ }
1349
1354
  }));
1350
1355
  return {
1351
1356
  client: clientInstance,
@@ -1363,7 +1368,7 @@ function createNadeshikoClient(config) {
1363
1368
  getSeries: (options) => getSeries({ ...options, client: clientInstance }),
1364
1369
  getCharacter: (options) => getCharacter({ ...options, client: clientInstance }),
1365
1370
  getSeiyuu: (options) => getSeiyuu({ ...options, client: clientInstance }),
1366
- getQuota: (options) => getQuota({ ...options, client: clientInstance }),
1371
+ getUserQuota: (options) => getUserQuota({ ...options, client: clientInstance }),
1367
1372
  listCollections: (options) => listCollections({ ...options, client: clientInstance }),
1368
1373
  createCollection: (options) => createCollection({ ...options, client: clientInstance }),
1369
1374
  getCollection: (options) => getCollection({ ...options, client: clientInstance }),
@@ -1404,16 +1409,16 @@ function createNadeshikoClient(config) {
1404
1409
  addMediaToSeries: (options) => addMediaToSeries({ ...options, client: clientInstance }),
1405
1410
  updateSeriesMedia: (options) => updateSeriesMedia({ ...options, client: clientInstance }),
1406
1411
  removeMediaFromSeries: (options) => removeMediaFromSeries({ ...options, client: clientInstance }),
1407
- createReport: (options) => createReport({ ...options, client: clientInstance }),
1408
- listReports: (options) => listReports({ ...options, client: clientInstance }),
1409
- getPreferences: (options) => getPreferences({ ...options, client: clientInstance }),
1410
- updatePreferences: (options) => updatePreferences({ ...options, client: clientInstance }),
1411
- listActivity: (options) => listActivity({ ...options, client: clientInstance }),
1412
- deleteActivity: (options) => deleteActivity({ ...options, client: clientInstance }),
1413
- getActivityHeatmap: (options) => getActivityHeatmap({ ...options, client: clientInstance }),
1414
- getActivityStats: (options) => getActivityStats({ ...options, client: clientInstance }),
1415
- exportData: (options) => exportData({ ...options, client: clientInstance }),
1416
- listLabs: (options) => listLabs({ ...options, client: clientInstance }),
1412
+ createUserReport: (options) => createUserReport({ ...options, client: clientInstance }),
1413
+ listUserReports: (options) => listUserReports({ ...options, client: clientInstance }),
1414
+ getUserPreferences: (options) => getUserPreferences({ ...options, client: clientInstance }),
1415
+ updateUserPreferences: (options) => updateUserPreferences({ ...options, client: clientInstance }),
1416
+ listUserActivity: (options) => listUserActivity({ ...options, client: clientInstance }),
1417
+ deleteUserActivity: (options) => deleteUserActivity({ ...options, client: clientInstance }),
1418
+ getUserActivityHeatmap: (options) => getUserActivityHeatmap({ ...options, client: clientInstance }),
1419
+ getUserActivityStats: (options) => getUserActivityStats({ ...options, client: clientInstance }),
1420
+ exportUserData: (options) => exportUserData({ ...options, client: clientInstance }),
1421
+ listUserLabs: (options) => listUserLabs({ ...options, client: clientInstance }),
1417
1422
  getAdminDashboard: (options) => getAdminDashboard({ ...options, client: clientInstance }),
1418
1423
  getAdminHealth: (options) => getAdminHealth({ ...options, client: clientInstance })
1419
1424
  };
@@ -1442,16 +1447,16 @@ __export(exports_media_gen, {
1442
1447
  // generated/dev/internal/user.gen.ts
1443
1448
  var exports_user_gen = {};
1444
1449
  __export(exports_user_gen, {
1445
- updatePreferences: () => updatePreferences,
1446
- listReports: () => listReports,
1447
- listLabs: () => listLabs,
1448
- listActivity: () => listActivity,
1449
- getPreferences: () => getPreferences,
1450
- getActivityStats: () => getActivityStats,
1451
- getActivityHeatmap: () => getActivityHeatmap,
1452
- exportData: () => exportData,
1453
- deleteActivity: () => deleteActivity,
1454
- createReport: () => createReport
1450
+ updateUserPreferences: () => updateUserPreferences,
1451
+ listUserReports: () => listUserReports,
1452
+ listUserLabs: () => listUserLabs,
1453
+ listUserActivity: () => listUserActivity,
1454
+ getUserPreferences: () => getUserPreferences,
1455
+ getUserActivityStats: () => getUserActivityStats,
1456
+ getUserActivityHeatmap: () => getUserActivityHeatmap,
1457
+ exportUserData: () => exportUserData,
1458
+ deleteUserActivity: () => deleteUserActivity,
1459
+ createUserReport: () => createUserReport
1455
1460
  });
1456
1461
  // generated/dev/internal/admin.gen.ts
1457
1462
  var exports_admin_gen = {};
@@ -1461,10 +1466,10 @@ __export(exports_admin_gen, {
1461
1466
  });
1462
1467
  export {
1463
1468
  exports_user_gen as user,
1469
+ updateUserPreferences,
1464
1470
  updateSeriesMedia,
1465
1471
  updateSeries,
1466
1472
  updateSegment,
1467
- updatePreferences,
1468
1473
  updateMedia,
1469
1474
  updateEpisode,
1470
1475
  updateCollectionSegment,
@@ -1480,11 +1485,12 @@ export {
1480
1485
  removeMediaFromSeries,
1481
1486
  purgeAdminQueueFailed,
1482
1487
  exports_media_gen as media,
1488
+ listUserReports,
1489
+ listUserLabs,
1490
+ listUserActivity,
1483
1491
  listSeries,
1484
1492
  listSegments,
1485
- listReports,
1486
1493
  listMedia,
1487
- listLabs,
1488
1494
  listEpisodes,
1489
1495
  listCollections,
1490
1496
  listAdminReviewRuns,
@@ -1493,15 +1499,16 @@ export {
1493
1499
  listAdminReports,
1494
1500
  listAdminQueueStats,
1495
1501
  listAdminQueueFailed,
1496
- listActivity,
1502
+ getUserQuota,
1503
+ getUserPreferences,
1504
+ getUserActivityStats,
1505
+ getUserActivityHeatmap,
1497
1506
  getSeries,
1498
1507
  getSeiyuu,
1499
1508
  getSegmentContext,
1500
1509
  getSegmentByUuid,
1501
1510
  getSegment,
1502
1511
  getSearchStats,
1503
- getQuota,
1504
- getPreferences,
1505
1512
  getMedia,
1506
1513
  getEpisode,
1507
1514
  getCollection,
@@ -1510,19 +1517,17 @@ export {
1510
1517
  getAdminQueue,
1511
1518
  getAdminHealth,
1512
1519
  getAdminDashboard,
1513
- getActivityStats,
1514
- getActivityHeatmap,
1515
- exportData,
1520
+ exportUserData,
1521
+ deleteUserActivity,
1516
1522
  deleteSeries,
1517
1523
  deleteSegment,
1518
1524
  deleteMedia,
1519
1525
  deleteEpisode,
1520
1526
  deleteCollection,
1521
1527
  deleteAdminReviewAllowlistEntry,
1522
- deleteActivity,
1528
+ createUserReport,
1523
1529
  createSeries,
1524
1530
  createSegment,
1525
- createReport,
1526
1531
  createNadeshikoClient,
1527
1532
  createMedia,
1528
1533
  createEpisode,
@@ -1535,5 +1540,5 @@ export {
1535
1540
  addMediaToSeries
1536
1541
  };
1537
1542
 
1538
- //# debugId=6DCBA6AB10BC445664756E2164756E21
1543
+ //# debugId=263E667AD4EF730B64756E2164756E21
1539
1544
  //# sourceMappingURL=index.js.map