@brigadasos/nadeshiko-sdk 1.4.3-dev.cb99a26 → 1.4.3-dev.d3424ba

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.cjs CHANGED
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __moduleCache = /* @__PURE__ */ new WeakMap;
5
+ function __accessProp(key) {
6
+ return this[key];
7
+ }
6
8
  var __toCommonJS = (from) => {
7
- var entry = __moduleCache.get(from), desc;
9
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
8
10
  if (entry)
9
11
  return entry;
10
12
  entry = __defProp({}, "__esModule", { value: true });
11
- if (from && typeof from === "object" || typeof from === "function")
12
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
13
- get: () => from[key],
14
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
- }));
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (var key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(entry, key))
16
+ __defProp(entry, key, {
17
+ get: __accessProp.bind(from, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
16
21
  __moduleCache.set(from, entry);
17
22
  return entry;
18
23
  };
24
+ var __moduleCache;
25
+ var __returnValue = (v) => v;
26
+ function __exportSetter(name, newValue) {
27
+ this[name] = __returnValue.bind(null, newValue);
28
+ }
19
29
  var __export = (target, all) => {
20
30
  for (var name in all)
21
31
  __defProp(target, name, {
22
32
  get: all[name],
23
33
  enumerable: true,
24
34
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
35
+ set: __exportSetter.bind(all, name)
26
36
  });
27
37
  };
28
38
 
@@ -33,23 +43,26 @@ __export(exports_dev, {
33
43
  updateUserPreferences: () => updateUserPreferences,
34
44
  updateSeriesMedia: () => updateSeriesMedia,
35
45
  updateSeries: () => updateSeries,
46
+ updateSegmentByUuid: () => updateSegmentByUuid,
36
47
  updateSegment: () => updateSegment,
37
48
  updateMedia: () => updateMedia,
38
49
  updateEpisode: () => updateEpisode,
39
50
  updateCollectionSegment: () => updateCollectionSegment,
40
51
  updateCollection: () => updateCollection,
41
- updateAdminReviewCheck: () => updateAdminReviewCheck,
42
52
  updateAdminReport: () => updateAdminReport,
53
+ updateAdminMediaAudit: () => updateAdminMediaAudit,
54
+ unenrollUserLab: () => unenrollUserLab,
43
55
  triggerReindex: () => triggerReindex,
56
+ trackUserActivity: () => trackUserActivity,
44
57
  searchWords: () => searchWords,
58
+ searchCollectionSegments: () => searchCollectionSegments,
45
59
  search: () => search,
46
- runAdminReview: () => runAdminReview,
60
+ runAdminMediaAudit: () => runAdminMediaAudit,
47
61
  retryAdminQueueFailed: () => retryAdminQueueFailed,
48
62
  removeSegmentFromCollection: () => removeSegmentFromCollection,
49
63
  removeMediaFromSeries: () => removeMediaFromSeries,
50
64
  purgeAdminQueueFailed: () => purgeAdminQueueFailed,
51
65
  media: () => exports_media_gen,
52
- listUserReports: () => listUserReports,
53
66
  listUserLabs: () => listUserLabs,
54
67
  listUserActivity: () => listUserActivity,
55
68
  listSeries: () => listSeries,
@@ -57,12 +70,12 @@ __export(exports_dev, {
57
70
  listMedia: () => listMedia,
58
71
  listEpisodes: () => listEpisodes,
59
72
  listCollections: () => listCollections,
60
- listAdminReviewRuns: () => listAdminReviewRuns,
61
- listAdminReviewChecks: () => listAdminReviewChecks,
62
- listAdminReviewAllowlist: () => listAdminReviewAllowlist,
63
73
  listAdminReports: () => listAdminReports,
64
74
  listAdminQueueStats: () => listAdminQueueStats,
65
75
  listAdminQueueFailed: () => listAdminQueueFailed,
76
+ listAdminMediaAudits: () => listAdminMediaAudits,
77
+ listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
78
+ impersonateAdminUser: () => impersonateAdminUser,
66
79
  getUserQuota: () => getUserQuota,
67
80
  getUserPreferences: () => getUserPreferences,
68
81
  getUserActivityStats: () => getUserActivityStats,
@@ -75,20 +88,23 @@ __export(exports_dev, {
75
88
  getSearchStats: () => getSearchStats,
76
89
  getMedia: () => getMedia,
77
90
  getEpisode: () => getEpisode,
91
+ getCollectionStats: () => getCollectionStats,
78
92
  getCollection: () => getCollection,
79
93
  getCharacter: () => getCharacter,
80
- getAdminReviewRun: () => getAdminReviewRun,
81
94
  getAdminQueue: () => getAdminQueue,
95
+ getAdminMediaAuditRun: () => getAdminMediaAuditRun,
82
96
  getAdminHealth: () => getAdminHealth,
83
97
  getAdminDashboard: () => getAdminDashboard,
84
98
  exportUserData: () => exportUserData,
99
+ enrollUserLab: () => enrollUserLab,
100
+ deleteUserActivityById: () => deleteUserActivityById,
101
+ deleteUserActivityByDate: () => deleteUserActivityByDate,
85
102
  deleteUserActivity: () => deleteUserActivity,
86
103
  deleteSeries: () => deleteSeries,
87
104
  deleteSegment: () => deleteSegment,
88
105
  deleteMedia: () => deleteMedia,
89
106
  deleteEpisode: () => deleteEpisode,
90
107
  deleteCollection: () => deleteCollection,
91
- deleteAdminReviewAllowlistEntry: () => deleteAdminReviewAllowlistEntry,
92
108
  createUserReport: () => createUserReport,
93
109
  createSeries: () => createSeries,
94
110
  createSegment: () => createSegment,
@@ -96,9 +112,9 @@ __export(exports_dev, {
96
112
  createMedia: () => createMedia,
97
113
  createEpisode: () => createEpisode,
98
114
  createCollection: () => createCollection,
99
- createClient: () => createClient2,
100
- createAdminReviewAllowlistEntry: () => createAdminReviewAllowlistEntry,
101
115
  client: () => client,
116
+ clearAdminImpersonation: () => clearAdminImpersonation,
117
+ autocompleteMedia: () => autocompleteMedia,
102
118
  admin: () => exports_admin_gen,
103
119
  addSegmentToCollection: () => addSegmentToCollection,
104
120
  addMediaToSeries: () => addMediaToSeries
@@ -961,175 +977,193 @@ var createMedia = (options) => (options.client ?? client).post({
961
977
  ...options.headers
962
978
  }
963
979
  });
964
- var deleteMedia = (options) => (options.client ?? client).delete({
980
+ var autocompleteMedia = (options) => (options.client ?? client).get({
965
981
  security: [{ scheme: "bearer", type: "http" }],
966
- url: "/v1/media/{id}",
982
+ url: "/v1/media/autocomplete",
967
983
  ...options
968
984
  });
969
- var getMedia = (options) => (options.client ?? client).get({
985
+ var getSegmentByUuid = (options) => (options.client ?? client).get({
970
986
  security: [{ scheme: "bearer", type: "http" }],
971
- url: "/v1/media/{id}",
987
+ url: "/v1/media/segments/{uuid}",
972
988
  ...options
973
989
  });
974
- var updateMedia = (options) => (options.client ?? client).patch({
975
- security: [{ scheme: "bearer", type: "http" }],
976
- url: "/v1/media/{id}",
990
+ var updateSegmentByUuid = (options) => (options.client ?? client).patch({
991
+ security: [{ scheme: "bearer", type: "http" }, {
992
+ in: "cookie",
993
+ name: "nadeshiko.session_token",
994
+ type: "apiKey"
995
+ }],
996
+ url: "/v1/media/segments/{uuid}",
977
997
  ...options,
978
998
  headers: {
979
999
  "Content-Type": "application/json",
980
1000
  ...options.headers
981
1001
  }
982
1002
  });
983
- var listEpisodes = (options) => (options.client ?? client).get({
1003
+ var getSegmentContext = (options) => (options.client ?? client).get({
984
1004
  security: [{ scheme: "bearer", type: "http" }],
985
- url: "/v1/media/{mediaId}/episodes",
1005
+ url: "/v1/media/segments/{uuid}/context",
986
1006
  ...options
987
1007
  });
988
- var createEpisode = (options) => (options.client ?? client).post({
1008
+ var listSeries = (options) => (options?.client ?? client).get({
1009
+ security: [{ scheme: "bearer", type: "http" }, {
1010
+ in: "cookie",
1011
+ name: "nadeshiko.session_token",
1012
+ type: "apiKey"
1013
+ }],
1014
+ url: "/v1/media/series",
1015
+ ...options
1016
+ });
1017
+ var createSeries = (options) => (options.client ?? client).post({
989
1018
  security: [{ scheme: "bearer", type: "http" }],
990
- url: "/v1/media/{mediaId}/episodes",
1019
+ url: "/v1/media/series",
991
1020
  ...options,
992
1021
  headers: {
993
1022
  "Content-Type": "application/json",
994
1023
  ...options.headers
995
1024
  }
996
1025
  });
997
- var deleteEpisode = (options) => (options.client ?? client).delete({
1026
+ var deleteSeries = (options) => (options.client ?? client).delete({
998
1027
  security: [{ scheme: "bearer", type: "http" }],
999
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1028
+ url: "/v1/media/series/{id}",
1000
1029
  ...options
1001
1030
  });
1002
- var getEpisode = (options) => (options.client ?? client).get({
1003
- security: [{ scheme: "bearer", type: "http" }],
1004
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1031
+ var getSeries = (options) => (options.client ?? client).get({
1032
+ security: [{ scheme: "bearer", type: "http" }, {
1033
+ in: "cookie",
1034
+ name: "nadeshiko.session_token",
1035
+ type: "apiKey"
1036
+ }],
1037
+ url: "/v1/media/series/{id}",
1005
1038
  ...options
1006
1039
  });
1007
- var updateEpisode = (options) => (options.client ?? client).patch({
1040
+ var updateSeries = (options) => (options.client ?? client).patch({
1008
1041
  security: [{ scheme: "bearer", type: "http" }],
1009
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1042
+ url: "/v1/media/series/{id}",
1010
1043
  ...options,
1011
1044
  headers: {
1012
1045
  "Content-Type": "application/json",
1013
1046
  ...options.headers
1014
1047
  }
1015
1048
  });
1016
- var listSegments = (options) => (options.client ?? client).get({
1017
- security: [{ scheme: "bearer", type: "http" }],
1018
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
1019
- ...options
1020
- });
1021
- var createSegment = (options) => (options.client ?? client).post({
1049
+ var addMediaToSeries = (options) => (options.client ?? client).post({
1022
1050
  security: [{ scheme: "bearer", type: "http" }],
1023
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
1051
+ url: "/v1/media/series/{id}/media",
1024
1052
  ...options,
1025
1053
  headers: {
1026
1054
  "Content-Type": "application/json",
1027
1055
  ...options.headers
1028
1056
  }
1029
1057
  });
1030
- var deleteSegment = (options) => (options.client ?? client).delete({
1031
- security: [{ scheme: "bearer", type: "http" }],
1032
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1033
- ...options
1034
- });
1035
- var getSegment = (options) => (options.client ?? client).get({
1058
+ var removeMediaFromSeries = (options) => (options.client ?? client).delete({
1036
1059
  security: [{ scheme: "bearer", type: "http" }],
1037
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1060
+ url: "/v1/media/series/{id}/media/{mediaId}",
1038
1061
  ...options
1039
1062
  });
1040
- var updateSegment = (options) => (options.client ?? client).patch({
1063
+ var updateSeriesMedia = (options) => (options.client ?? client).patch({
1041
1064
  security: [{ scheme: "bearer", type: "http" }],
1042
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1065
+ url: "/v1/media/series/{id}/media/{mediaId}",
1043
1066
  ...options,
1044
1067
  headers: {
1045
1068
  "Content-Type": "application/json",
1046
1069
  ...options.headers
1047
1070
  }
1048
1071
  });
1049
- var getSegmentByUuid = (options) => (options.client ?? client).get({
1072
+ var getCharacter = (options) => (options.client ?? client).get({
1050
1073
  security: [{ scheme: "bearer", type: "http" }],
1051
- url: "/v1/media/segments/{uuid}",
1074
+ url: "/v1/media/characters/{id}",
1052
1075
  ...options
1053
1076
  });
1054
- var getSegmentContext = (options) => (options.client ?? client).get({
1077
+ var getSeiyuu = (options) => (options.client ?? client).get({
1055
1078
  security: [{ scheme: "bearer", type: "http" }],
1056
- url: "/v1/media/segments/{uuid}/context",
1079
+ url: "/v1/media/seiyuu/{id}",
1057
1080
  ...options
1058
1081
  });
1059
- var listSeries = (options) => (options?.client ?? client).get({
1060
- security: [{ scheme: "bearer", type: "http" }, {
1061
- in: "cookie",
1062
- name: "nadeshiko.session_token",
1063
- type: "apiKey"
1064
- }],
1065
- url: "/v1/media/series",
1082
+ var deleteMedia = (options) => (options.client ?? client).delete({
1083
+ security: [{ scheme: "bearer", type: "http" }],
1084
+ url: "/v1/media/{id}",
1066
1085
  ...options
1067
1086
  });
1068
- var createSeries = (options) => (options.client ?? client).post({
1087
+ var getMedia = (options) => (options.client ?? client).get({
1069
1088
  security: [{ scheme: "bearer", type: "http" }],
1070
- url: "/v1/media/series",
1089
+ url: "/v1/media/{id}",
1090
+ ...options
1091
+ });
1092
+ var updateMedia = (options) => (options.client ?? client).patch({
1093
+ security: [{ scheme: "bearer", type: "http" }],
1094
+ url: "/v1/media/{id}",
1071
1095
  ...options,
1072
1096
  headers: {
1073
1097
  "Content-Type": "application/json",
1074
1098
  ...options.headers
1075
1099
  }
1076
1100
  });
1077
- var deleteSeries = (options) => (options.client ?? client).delete({
1101
+ var listEpisodes = (options) => (options.client ?? client).get({
1078
1102
  security: [{ scheme: "bearer", type: "http" }],
1079
- url: "/v1/media/series/{id}",
1080
- ...options
1081
- });
1082
- var getSeries = (options) => (options.client ?? client).get({
1083
- security: [{ scheme: "bearer", type: "http" }, {
1084
- in: "cookie",
1085
- name: "nadeshiko.session_token",
1086
- type: "apiKey"
1087
- }],
1088
- url: "/v1/media/series/{id}",
1103
+ url: "/v1/media/{mediaId}/episodes",
1089
1104
  ...options
1090
1105
  });
1091
- var updateSeries = (options) => (options.client ?? client).patch({
1106
+ var createEpisode = (options) => (options.client ?? client).post({
1092
1107
  security: [{ scheme: "bearer", type: "http" }],
1093
- url: "/v1/media/series/{id}",
1108
+ url: "/v1/media/{mediaId}/episodes",
1094
1109
  ...options,
1095
1110
  headers: {
1096
1111
  "Content-Type": "application/json",
1097
1112
  ...options.headers
1098
1113
  }
1099
1114
  });
1100
- var addMediaToSeries = (options) => (options.client ?? client).post({
1115
+ var deleteEpisode = (options) => (options.client ?? client).delete({
1101
1116
  security: [{ scheme: "bearer", type: "http" }],
1102
- url: "/v1/media/series/{id}/media",
1117
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1118
+ ...options
1119
+ });
1120
+ var getEpisode = (options) => (options.client ?? client).get({
1121
+ security: [{ scheme: "bearer", type: "http" }],
1122
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1123
+ ...options
1124
+ });
1125
+ var updateEpisode = (options) => (options.client ?? client).patch({
1126
+ security: [{ scheme: "bearer", type: "http" }],
1127
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
1103
1128
  ...options,
1104
1129
  headers: {
1105
1130
  "Content-Type": "application/json",
1106
1131
  ...options.headers
1107
1132
  }
1108
1133
  });
1109
- var removeMediaFromSeries = (options) => (options.client ?? client).delete({
1134
+ var listSegments = (options) => (options.client ?? client).get({
1110
1135
  security: [{ scheme: "bearer", type: "http" }],
1111
- url: "/v1/media/series/{id}/media/{mediaId}",
1136
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
1112
1137
  ...options
1113
1138
  });
1114
- var updateSeriesMedia = (options) => (options.client ?? client).patch({
1139
+ var createSegment = (options) => (options.client ?? client).post({
1115
1140
  security: [{ scheme: "bearer", type: "http" }],
1116
- url: "/v1/media/series/{id}/media/{mediaId}",
1141
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
1117
1142
  ...options,
1118
1143
  headers: {
1119
1144
  "Content-Type": "application/json",
1120
1145
  ...options.headers
1121
1146
  }
1122
1147
  });
1123
- var getCharacter = (options) => (options.client ?? client).get({
1148
+ var deleteSegment = (options) => (options.client ?? client).delete({
1124
1149
  security: [{ scheme: "bearer", type: "http" }],
1125
- url: "/v1/media/characters/{id}",
1150
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1126
1151
  ...options
1127
1152
  });
1128
- var getSeiyuu = (options) => (options.client ?? client).get({
1153
+ var getSegment = (options) => (options.client ?? client).get({
1129
1154
  security: [{ scheme: "bearer", type: "http" }],
1130
- url: "/v1/media/seiyuu/{id}",
1155
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1131
1156
  ...options
1132
1157
  });
1158
+ var updateSegment = (options) => (options.client ?? client).patch({
1159
+ security: [{ scheme: "bearer", type: "http" }],
1160
+ url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1161
+ ...options,
1162
+ headers: {
1163
+ "Content-Type": "application/json",
1164
+ ...options.headers
1165
+ }
1166
+ });
1133
1167
  var getUserQuota = (options) => (options?.client ?? client).get({
1134
1168
  security: [{
1135
1169
  in: "cookie",
@@ -1139,15 +1173,6 @@ var getUserQuota = (options) => (options?.client ?? client).get({
1139
1173
  url: "/v1/user/quota",
1140
1174
  ...options
1141
1175
  });
1142
- var listUserReports = (options) => (options?.client ?? client).get({
1143
- security: [{
1144
- in: "cookie",
1145
- name: "nadeshiko.session_token",
1146
- type: "apiKey"
1147
- }],
1148
- url: "/v1/user/reports",
1149
- ...options
1150
- });
1151
1176
  var createUserReport = (options) => (options.client ?? client).post({
1152
1177
  security: [{
1153
1178
  in: "cookie",
@@ -1201,6 +1226,19 @@ var listUserActivity = (options) => (options?.client ?? client).get({
1201
1226
  url: "/v1/user/activity",
1202
1227
  ...options
1203
1228
  });
1229
+ var trackUserActivity = (options) => (options.client ?? client).post({
1230
+ security: [{
1231
+ in: "cookie",
1232
+ name: "nadeshiko.session_token",
1233
+ type: "apiKey"
1234
+ }],
1235
+ url: "/v1/user/activity",
1236
+ ...options,
1237
+ headers: {
1238
+ "Content-Type": "application/json",
1239
+ ...options.headers
1240
+ }
1241
+ });
1204
1242
  var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
1205
1243
  security: [{
1206
1244
  in: "cookie",
@@ -1219,6 +1257,24 @@ var getUserActivityStats = (options) => (options?.client ?? client).get({
1219
1257
  url: "/v1/user/activity/stats",
1220
1258
  ...options
1221
1259
  });
1260
+ var deleteUserActivityByDate = (options) => (options.client ?? client).delete({
1261
+ security: [{
1262
+ in: "cookie",
1263
+ name: "nadeshiko.session_token",
1264
+ type: "apiKey"
1265
+ }],
1266
+ url: "/v1/user/activity/date/{date}",
1267
+ ...options
1268
+ });
1269
+ var deleteUserActivityById = (options) => (options.client ?? client).delete({
1270
+ security: [{
1271
+ in: "cookie",
1272
+ name: "nadeshiko.session_token",
1273
+ type: "apiKey"
1274
+ }],
1275
+ url: "/v1/user/activity/{id}",
1276
+ ...options
1277
+ });
1222
1278
  var exportUserData = (options) => (options?.client ?? client).get({
1223
1279
  security: [{
1224
1280
  in: "cookie",
@@ -1237,6 +1293,24 @@ var listUserLabs = (options) => (options?.client ?? client).get({
1237
1293
  url: "/v1/user/labs",
1238
1294
  ...options
1239
1295
  });
1296
+ var unenrollUserLab = (options) => (options.client ?? client).delete({
1297
+ security: [{
1298
+ in: "cookie",
1299
+ name: "nadeshiko.session_token",
1300
+ type: "apiKey"
1301
+ }],
1302
+ url: "/v1/user/labs/{key}",
1303
+ ...options
1304
+ });
1305
+ var enrollUserLab = (options) => (options.client ?? client).post({
1306
+ security: [{
1307
+ in: "cookie",
1308
+ name: "nadeshiko.session_token",
1309
+ type: "apiKey"
1310
+ }],
1311
+ url: "/v1/user/labs/{key}",
1312
+ ...options
1313
+ });
1240
1314
  var listCollections = (options) => (options?.client ?? client).get({
1241
1315
  security: [{
1242
1316
  in: "cookie",
@@ -1325,6 +1399,24 @@ var updateCollectionSegment = (options) => (options.client ?? client).patch({
1325
1399
  ...options.headers
1326
1400
  }
1327
1401
  });
1402
+ var searchCollectionSegments = (options) => (options.client ?? client).get({
1403
+ security: [{
1404
+ in: "cookie",
1405
+ name: "nadeshiko.session_token",
1406
+ type: "apiKey"
1407
+ }],
1408
+ url: "/v1/collections/{id}/search",
1409
+ ...options
1410
+ });
1411
+ var getCollectionStats = (options) => (options.client ?? client).get({
1412
+ security: [{
1413
+ in: "cookie",
1414
+ name: "nadeshiko.session_token",
1415
+ type: "apiKey"
1416
+ }],
1417
+ url: "/v1/collections/{id}/stats",
1418
+ ...options
1419
+ });
1328
1420
  var getAdminDashboard = (options) => (options?.client ?? client).get({
1329
1421
  security: [{ scheme: "bearer", type: "http" }],
1330
1422
  url: "/v1/admin/dashboard",
@@ -1369,6 +1461,28 @@ var purgeAdminQueueFailed = (options) => (options.client ?? client).delete({
1369
1461
  url: "/v1/admin/queues/{queueName}/purge",
1370
1462
  ...options
1371
1463
  });
1464
+ var clearAdminImpersonation = (options) => (options?.client ?? client).delete({
1465
+ security: [{
1466
+ in: "cookie",
1467
+ name: "nadeshiko.session_token",
1468
+ type: "apiKey"
1469
+ }],
1470
+ url: "/v1/admin/impersonation",
1471
+ ...options
1472
+ });
1473
+ var impersonateAdminUser = (options) => (options.client ?? client).post({
1474
+ security: [{
1475
+ in: "cookie",
1476
+ name: "nadeshiko.session_token",
1477
+ type: "apiKey"
1478
+ }],
1479
+ url: "/v1/admin/impersonation",
1480
+ ...options,
1481
+ headers: {
1482
+ "Content-Type": "application/json",
1483
+ ...options.headers
1484
+ }
1485
+ });
1372
1486
  var listAdminReports = (options) => (options?.client ?? client).get({
1373
1487
  security: [{ scheme: "bearer", type: "http" }],
1374
1488
  url: "/v1/admin/reports",
@@ -1383,52 +1497,33 @@ var updateAdminReport = (options) => (options.client ?? client).patch({
1383
1497
  ...options.headers
1384
1498
  }
1385
1499
  });
1386
- var runAdminReview = (options) => (options?.client ?? client).post({
1387
- security: [{ scheme: "bearer", type: "http" }],
1388
- url: "/v1/admin/review/run",
1389
- ...options
1390
- });
1391
- var listAdminReviewChecks = (options) => (options?.client ?? client).get({
1500
+ var listAdminMediaAudits = (options) => (options?.client ?? client).get({
1392
1501
  security: [{ scheme: "bearer", type: "http" }],
1393
- url: "/v1/admin/review/checks",
1502
+ url: "/v1/admin/media/audits",
1394
1503
  ...options
1395
1504
  });
1396
- var updateAdminReviewCheck = (options) => (options.client ?? client).patch({
1505
+ var updateAdminMediaAudit = (options) => (options.client ?? client).patch({
1397
1506
  security: [{ scheme: "bearer", type: "http" }],
1398
- url: "/v1/admin/review/checks/{name}",
1507
+ url: "/v1/admin/media/audits/{name}",
1399
1508
  ...options,
1400
1509
  headers: {
1401
1510
  "Content-Type": "application/json",
1402
1511
  ...options.headers
1403
1512
  }
1404
1513
  });
1405
- var listAdminReviewRuns = (options) => (options?.client ?? client).get({
1514
+ var runAdminMediaAudit = (options) => (options.client ?? client).post({
1406
1515
  security: [{ scheme: "bearer", type: "http" }],
1407
- url: "/v1/admin/review/runs",
1516
+ url: "/v1/admin/media/audits/{name}/run",
1408
1517
  ...options
1409
1518
  });
1410
- var getAdminReviewRun = (options) => (options.client ?? client).get({
1519
+ var listAdminMediaAuditRuns = (options) => (options?.client ?? client).get({
1411
1520
  security: [{ scheme: "bearer", type: "http" }],
1412
- url: "/v1/admin/review/runs/{id}",
1521
+ url: "/v1/admin/media/audits/runs",
1413
1522
  ...options
1414
1523
  });
1415
- var listAdminReviewAllowlist = (options) => (options?.client ?? client).get({
1524
+ var getAdminMediaAuditRun = (options) => (options.client ?? client).get({
1416
1525
  security: [{ scheme: "bearer", type: "http" }],
1417
- url: "/v1/admin/review/allowlist",
1418
- ...options
1419
- });
1420
- var createAdminReviewAllowlistEntry = (options) => (options.client ?? client).post({
1421
- security: [{ scheme: "bearer", type: "http" }],
1422
- url: "/v1/admin/review/allowlist",
1423
- ...options,
1424
- headers: {
1425
- "Content-Type": "application/json",
1426
- ...options.headers
1427
- }
1428
- });
1429
- var deleteAdminReviewAllowlistEntry = (options) => (options.client ?? client).delete({
1430
- security: [{ scheme: "bearer", type: "http" }],
1431
- url: "/v1/admin/review/allowlist/{id}",
1526
+ url: "/v1/admin/media/audits/runs/{id}",
1432
1527
  ...options
1433
1528
  });
1434
1529
  // generated/dev/nadeshiko.gen.ts
@@ -1437,13 +1532,20 @@ var environments = {
1437
1532
  DEVELOPMENT: "https://api.dev.brigadasos.xyz/api",
1438
1533
  PRODUCTION: "https://api.brigadasos.xyz/api"
1439
1534
  };
1535
+ var defaultSessionTokenGetter = () => {
1536
+ if (typeof document === "undefined")
1537
+ return;
1538
+ const match = document.cookie.match(/(?:^|;\s*)nadeshiko\.session_token=([^;]*)/);
1539
+ return match ? decodeURIComponent(match[1]) : undefined;
1540
+ };
1440
1541
  function createNadeshikoClient(config) {
1441
1542
  const baseUrl = config.baseUrl ? config.baseUrl in environments ? environments[config.baseUrl] : config.baseUrl : environments.PRODUCTION;
1543
+ const getSessionToken = config.sessionToken ?? defaultSessionTokenGetter;
1442
1544
  const clientInstance = createClient(createConfig({
1443
1545
  baseUrl,
1444
1546
  auth: (auth) => {
1445
1547
  if (auth.in === "cookie") {
1446
- return config.sessionToken;
1548
+ return getSessionToken();
1447
1549
  }
1448
1550
  return config.apiKey;
1449
1551
  }
@@ -1454,16 +1556,16 @@ function createNadeshikoClient(config) {
1454
1556
  getSearchStats: (options) => getSearchStats({ ...options, client: clientInstance }),
1455
1557
  searchWords: (options) => searchWords({ ...options, client: clientInstance }),
1456
1558
  listMedia: (options) => listMedia({ ...options, client: clientInstance }),
1457
- getMedia: (options) => getMedia({ ...options, client: clientInstance }),
1458
- listEpisodes: (options) => listEpisodes({ ...options, client: clientInstance }),
1459
- getEpisode: (options) => getEpisode({ ...options, client: clientInstance }),
1460
- getSegment: (options) => getSegment({ ...options, client: clientInstance }),
1461
1559
  getSegmentByUuid: (options) => getSegmentByUuid({ ...options, client: clientInstance }),
1462
1560
  getSegmentContext: (options) => getSegmentContext({ ...options, client: clientInstance }),
1463
1561
  listSeries: (options) => listSeries({ ...options, client: clientInstance }),
1464
1562
  getSeries: (options) => getSeries({ ...options, client: clientInstance }),
1465
1563
  getCharacter: (options) => getCharacter({ ...options, client: clientInstance }),
1466
1564
  getSeiyuu: (options) => getSeiyuu({ ...options, client: clientInstance }),
1565
+ getMedia: (options) => getMedia({ ...options, client: clientInstance }),
1566
+ listEpisodes: (options) => listEpisodes({ ...options, client: clientInstance }),
1567
+ getEpisode: (options) => getEpisode({ ...options, client: clientInstance }),
1568
+ getSegment: (options) => getSegment({ ...options, client: clientInstance }),
1467
1569
  getUserQuota: (options) => getUserQuota({ ...options, client: clientInstance }),
1468
1570
  listCollections: (options) => listCollections({ ...options, client: clientInstance }),
1469
1571
  createCollection: (options) => createCollection({ ...options, client: clientInstance }),
@@ -1473,6 +1575,8 @@ function createNadeshikoClient(config) {
1473
1575
  addSegmentToCollection: (options) => addSegmentToCollection({ ...options, client: clientInstance }),
1474
1576
  updateCollectionSegment: (options) => updateCollectionSegment({ ...options, client: clientInstance }),
1475
1577
  removeSegmentFromCollection: (options) => removeSegmentFromCollection({ ...options, client: clientInstance }),
1578
+ searchCollectionSegments: (options) => searchCollectionSegments({ ...options, client: clientInstance }),
1579
+ getCollectionStats: (options) => getCollectionStats({ ...options, client: clientInstance }),
1476
1580
  triggerReindex: (options) => triggerReindex({ ...options, client: clientInstance }),
1477
1581
  listAdminQueueStats: (options) => listAdminQueueStats({ ...options, client: clientInstance }),
1478
1582
  getAdminQueue: (options) => getAdminQueue({ ...options, client: clientInstance }),
@@ -1481,15 +1585,20 @@ function createNadeshikoClient(config) {
1481
1585
  purgeAdminQueueFailed: (options) => purgeAdminQueueFailed({ ...options, client: clientInstance }),
1482
1586
  listAdminReports: (options) => listAdminReports({ ...options, client: clientInstance }),
1483
1587
  updateAdminReport: (options) => updateAdminReport({ ...options, client: clientInstance }),
1484
- runAdminReview: (options) => runAdminReview({ ...options, client: clientInstance }),
1485
- listAdminReviewChecks: (options) => listAdminReviewChecks({ ...options, client: clientInstance }),
1486
- updateAdminReviewCheck: (options) => updateAdminReviewCheck({ ...options, client: clientInstance }),
1487
- listAdminReviewRuns: (options) => listAdminReviewRuns({ ...options, client: clientInstance }),
1488
- getAdminReviewRun: (options) => getAdminReviewRun({ ...options, client: clientInstance }),
1489
- listAdminReviewAllowlist: (options) => listAdminReviewAllowlist({ ...options, client: clientInstance }),
1490
- createAdminReviewAllowlistEntry: (options) => createAdminReviewAllowlistEntry({ ...options, client: clientInstance }),
1491
- deleteAdminReviewAllowlistEntry: (options) => deleteAdminReviewAllowlistEntry({ ...options, client: clientInstance }),
1588
+ listAdminMediaAudits: (options) => listAdminMediaAudits({ ...options, client: clientInstance }),
1589
+ updateAdminMediaAudit: (options) => updateAdminMediaAudit({ ...options, client: clientInstance }),
1590
+ runAdminMediaAudit: (options) => runAdminMediaAudit({ ...options, client: clientInstance }),
1591
+ listAdminMediaAuditRuns: (options) => listAdminMediaAuditRuns({ ...options, client: clientInstance }),
1592
+ getAdminMediaAuditRun: (options) => getAdminMediaAuditRun({ ...options, client: clientInstance }),
1492
1593
  createMedia: (options) => createMedia({ ...options, client: clientInstance }),
1594
+ autocompleteMedia: (options) => autocompleteMedia({ ...options, client: clientInstance }),
1595
+ updateSegmentByUuid: (options) => updateSegmentByUuid({ ...options, client: clientInstance }),
1596
+ createSeries: (options) => createSeries({ ...options, client: clientInstance }),
1597
+ updateSeries: (options) => updateSeries({ ...options, client: clientInstance }),
1598
+ deleteSeries: (options) => deleteSeries({ ...options, client: clientInstance }),
1599
+ addMediaToSeries: (options) => addMediaToSeries({ ...options, client: clientInstance }),
1600
+ updateSeriesMedia: (options) => updateSeriesMedia({ ...options, client: clientInstance }),
1601
+ removeMediaFromSeries: (options) => removeMediaFromSeries({ ...options, client: clientInstance }),
1493
1602
  updateMedia: (options) => updateMedia({ ...options, client: clientInstance }),
1494
1603
  deleteMedia: (options) => deleteMedia({ ...options, client: clientInstance }),
1495
1604
  createEpisode: (options) => createEpisode({ ...options, client: clientInstance }),
@@ -1499,32 +1608,32 @@ function createNadeshikoClient(config) {
1499
1608
  createSegment: (options) => createSegment({ ...options, client: clientInstance }),
1500
1609
  updateSegment: (options) => updateSegment({ ...options, client: clientInstance }),
1501
1610
  deleteSegment: (options) => deleteSegment({ ...options, client: clientInstance }),
1502
- createSeries: (options) => createSeries({ ...options, client: clientInstance }),
1503
- updateSeries: (options) => updateSeries({ ...options, client: clientInstance }),
1504
- deleteSeries: (options) => deleteSeries({ ...options, client: clientInstance }),
1505
- addMediaToSeries: (options) => addMediaToSeries({ ...options, client: clientInstance }),
1506
- updateSeriesMedia: (options) => updateSeriesMedia({ ...options, client: clientInstance }),
1507
- removeMediaFromSeries: (options) => removeMediaFromSeries({ ...options, client: clientInstance }),
1508
1611
  createUserReport: (options) => createUserReport({ ...options, client: clientInstance }),
1509
- listUserReports: (options) => listUserReports({ ...options, client: clientInstance }),
1510
1612
  getUserPreferences: (options) => getUserPreferences({ ...options, client: clientInstance }),
1511
1613
  updateUserPreferences: (options) => updateUserPreferences({ ...options, client: clientInstance }),
1512
1614
  listUserActivity: (options) => listUserActivity({ ...options, client: clientInstance }),
1615
+ trackUserActivity: (options) => trackUserActivity({ ...options, client: clientInstance }),
1513
1616
  deleteUserActivity: (options) => deleteUserActivity({ ...options, client: clientInstance }),
1514
1617
  getUserActivityHeatmap: (options) => getUserActivityHeatmap({ ...options, client: clientInstance }),
1515
1618
  getUserActivityStats: (options) => getUserActivityStats({ ...options, client: clientInstance }),
1619
+ deleteUserActivityByDate: (options) => deleteUserActivityByDate({ ...options, client: clientInstance }),
1620
+ deleteUserActivityById: (options) => deleteUserActivityById({ ...options, client: clientInstance }),
1516
1621
  exportUserData: (options) => exportUserData({ ...options, client: clientInstance }),
1517
1622
  listUserLabs: (options) => listUserLabs({ ...options, client: clientInstance }),
1623
+ enrollUserLab: (options) => enrollUserLab({ ...options, client: clientInstance }),
1624
+ unenrollUserLab: (options) => unenrollUserLab({ ...options, client: clientInstance }),
1518
1625
  getAdminDashboard: (options) => getAdminDashboard({ ...options, client: clientInstance }),
1519
- getAdminHealth: (options) => getAdminHealth({ ...options, client: clientInstance })
1626
+ getAdminHealth: (options) => getAdminHealth({ ...options, client: clientInstance }),
1627
+ impersonateAdminUser: (options) => impersonateAdminUser({ ...options, client: clientInstance }),
1628
+ clearAdminImpersonation: (options) => clearAdminImpersonation({ ...options, client: clientInstance })
1520
1629
  };
1521
1630
  }
1522
- var createClient2 = createNadeshikoClient;
1523
1631
  // generated/dev/internal/media.gen.ts
1524
1632
  var exports_media_gen = {};
1525
1633
  __export(exports_media_gen, {
1526
1634
  updateSeriesMedia: () => updateSeriesMedia,
1527
1635
  updateSeries: () => updateSeries,
1636
+ updateSegmentByUuid: () => updateSegmentByUuid,
1528
1637
  updateSegment: () => updateSegment,
1529
1638
  updateMedia: () => updateMedia,
1530
1639
  updateEpisode: () => updateEpisode,
@@ -1538,28 +1647,35 @@ __export(exports_media_gen, {
1538
1647
  createSegment: () => createSegment,
1539
1648
  createMedia: () => createMedia,
1540
1649
  createEpisode: () => createEpisode,
1650
+ autocompleteMedia: () => autocompleteMedia,
1541
1651
  addMediaToSeries: () => addMediaToSeries
1542
1652
  });
1543
1653
  // generated/dev/internal/user.gen.ts
1544
1654
  var exports_user_gen = {};
1545
1655
  __export(exports_user_gen, {
1546
1656
  updateUserPreferences: () => updateUserPreferences,
1547
- listUserReports: () => listUserReports,
1657
+ unenrollUserLab: () => unenrollUserLab,
1658
+ trackUserActivity: () => trackUserActivity,
1548
1659
  listUserLabs: () => listUserLabs,
1549
1660
  listUserActivity: () => listUserActivity,
1550
1661
  getUserPreferences: () => getUserPreferences,
1551
1662
  getUserActivityStats: () => getUserActivityStats,
1552
1663
  getUserActivityHeatmap: () => getUserActivityHeatmap,
1553
1664
  exportUserData: () => exportUserData,
1665
+ enrollUserLab: () => enrollUserLab,
1666
+ deleteUserActivityById: () => deleteUserActivityById,
1667
+ deleteUserActivityByDate: () => deleteUserActivityByDate,
1554
1668
  deleteUserActivity: () => deleteUserActivity,
1555
1669
  createUserReport: () => createUserReport
1556
1670
  });
1557
1671
  // generated/dev/internal/admin.gen.ts
1558
1672
  var exports_admin_gen = {};
1559
1673
  __export(exports_admin_gen, {
1674
+ impersonateAdminUser: () => impersonateAdminUser,
1560
1675
  getAdminHealth: () => getAdminHealth,
1561
- getAdminDashboard: () => getAdminDashboard
1676
+ getAdminDashboard: () => getAdminDashboard,
1677
+ clearAdminImpersonation: () => clearAdminImpersonation
1562
1678
  });
1563
1679
 
1564
- //# debugId=6D298160C99A5F9A64756E2164756E21
1680
+ //# debugId=10181376237E504064756E2164756E21
1565
1681
  //# sourceMappingURL=index.js.map