@brigadasos/nadeshiko-sdk 2.0.7 → 2.1.0-internal

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 (44) hide show
  1. package/README.md +101 -103
  2. package/dist/client/client.gen.d.ts.map +1 -1
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/types.gen.d.ts.map +1 -1
  5. package/dist/client/utils.gen.d.ts.map +1 -1
  6. package/dist/client.gen.d.ts.map +1 -1
  7. package/dist/core/auth.gen.d.ts.map +1 -1
  8. package/dist/core/bodySerializer.gen.d.ts.map +1 -1
  9. package/dist/core/params.gen.d.ts.map +1 -1
  10. package/dist/core/pathSerializer.gen.d.ts.map +1 -1
  11. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
  12. package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
  13. package/dist/core/types.gen.d.ts.map +1 -1
  14. package/dist/core/utils.gen.d.ts.map +1 -1
  15. package/dist/errors.d.ts +1 -1
  16. package/dist/errors.d.ts.map +1 -1
  17. package/dist/index.cjs +1204 -105
  18. package/dist/index.cjs.map +8 -8
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +1215 -101
  22. package/dist/index.js.map +8 -8
  23. package/dist/internal/admin.gen.d.ts +2 -0
  24. package/dist/internal/admin.gen.d.ts.map +1 -0
  25. package/dist/internal/collections.gen.d.ts +2 -0
  26. package/dist/internal/collections.gen.d.ts.map +1 -0
  27. package/dist/internal/media.gen.d.ts +2 -0
  28. package/dist/internal/media.gen.d.ts.map +1 -0
  29. package/dist/internal/stats.gen.d.ts +2 -0
  30. package/dist/internal/stats.gen.d.ts.map +1 -0
  31. package/dist/internal/user.gen.d.ts +2 -0
  32. package/dist/internal/user.gen.d.ts.map +1 -0
  33. package/dist/internal.gen.d.ts +6 -0
  34. package/dist/internal.gen.d.ts.map +1 -0
  35. package/dist/nadeshiko.gen.d.ts +775 -77
  36. package/dist/nadeshiko.gen.d.ts.map +1 -1
  37. package/dist/paginate.d.ts +15 -0
  38. package/dist/paginate.d.ts.map +1 -1
  39. package/dist/retry.d.ts.map +1 -1
  40. package/dist/sdk.gen.d.ts +84 -242
  41. package/dist/sdk.gen.d.ts.map +1 -1
  42. package/dist/types.gen.d.ts +1497 -2817
  43. package/dist/types.gen.d.ts.map +1 -1
  44. package/package.json +4 -3
package/dist/index.js CHANGED
@@ -1,8 +1,23 @@
1
- // generated/public/core/bodySerializer.gen.ts
1
+ var __defProp = Object.defineProperty;
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true,
11
+ configurable: true,
12
+ set: __exportSetter.bind(all, name)
13
+ });
14
+ };
15
+
16
+ // generated/internal/core/bodySerializer.gen.ts
2
17
  var jsonBodySerializer = {
3
18
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
4
19
  };
5
- // generated/public/core/params.gen.ts
20
+ // generated/internal/core/params.gen.ts
6
21
  var extraPrefixesMap = {
7
22
  $body_: "body",
8
23
  $headers_: "headers",
@@ -10,7 +25,7 @@ var extraPrefixesMap = {
10
25
  $query_: "query"
11
26
  };
12
27
  var extraPrefixes = Object.entries(extraPrefixesMap);
13
- // generated/public/core/serverSentEvents.gen.ts
28
+ // generated/internal/core/serverSentEvents.gen.ts
14
29
  var createSseClient = ({
15
30
  onRequest,
16
31
  onSseError,
@@ -146,7 +161,7 @@ var createSseClient = ({
146
161
  return { stream };
147
162
  };
148
163
 
149
- // generated/public/core/pathSerializer.gen.ts
164
+ // generated/internal/core/pathSerializer.gen.ts
150
165
  var separatorArrayExplode = (style) => {
151
166
  switch (style) {
152
167
  case "label":
@@ -270,7 +285,7 @@ var serializeObjectParam = ({
270
285
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
271
286
  };
272
287
 
273
- // generated/public/core/utils.gen.ts
288
+ // generated/internal/core/utils.gen.ts
274
289
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
275
290
  var defaultPathSerializer = ({ path, url: _url }) => {
276
291
  let url = _url;
@@ -359,7 +374,7 @@ function getValidRequestBody(options) {
359
374
  return;
360
375
  }
361
376
 
362
- // generated/public/core/auth.gen.ts
377
+ // generated/internal/core/auth.gen.ts
363
378
  var getAuthToken = async (auth, callback) => {
364
379
  const token = typeof callback === "function" ? await callback(auth) : callback;
365
380
  if (!token) {
@@ -374,7 +389,7 @@ var getAuthToken = async (auth, callback) => {
374
389
  return token;
375
390
  };
376
391
 
377
- // generated/public/client/utils.gen.ts
392
+ // generated/internal/client/utils.gen.ts
378
393
  var createQuerySerializer = ({
379
394
  parameters = {},
380
395
  ...args
@@ -591,7 +606,7 @@ var createConfig = (override = {}) => ({
591
606
  ...override
592
607
  });
593
608
 
594
- // generated/public/client/client.gen.ts
609
+ // generated/internal/client/client.gen.ts
595
610
  var createClient = (config = {}) => {
596
611
  let _config = mergeConfigs(createConfig(), config);
597
612
  const getConfig = () => ({ ..._config });
@@ -797,26 +812,26 @@ var createClient = (config = {}) => {
797
812
  trace: makeMethodFn("TRACE")
798
813
  };
799
814
  };
800
- // generated/public/client.gen.ts
815
+ // generated/internal/client.gen.ts
801
816
  var client = createClient(createConfig({ baseUrl: "https://api.nadeshiko.co" }));
802
817
 
803
- // generated/public/sdk.gen.ts
804
- var search = (options) => (options?.client ?? client).post({
818
+ // generated/internal/sdk.gen.ts
819
+ var search = (options) => (options.client ?? client).post({
805
820
  security: [{ scheme: "bearer", type: "http" }],
806
821
  url: "/v1/search",
807
822
  ...options,
808
823
  headers: {
809
824
  "Content-Type": "application/json",
810
- ...options?.headers
825
+ ...options.headers
811
826
  }
812
827
  });
813
- var getSearchStats = (options) => (options?.client ?? client).post({
828
+ var getSearchStats = (options) => (options.client ?? client).post({
814
829
  security: [{ scheme: "bearer", type: "http" }],
815
830
  url: "/v1/search/stats",
816
831
  ...options,
817
832
  headers: {
818
833
  "Content-Type": "application/json",
819
- ...options?.headers
834
+ ...options.headers
820
835
  }
821
836
  });
822
837
  var searchWords = (options) => (options.client ?? client).post({
@@ -828,6 +843,15 @@ var searchWords = (options) => (options.client ?? client).post({
828
843
  ...options.headers
829
844
  }
830
845
  });
846
+ var searchMedia = (options) => (options.client ?? client).post({
847
+ security: [{ scheme: "bearer", type: "http" }],
848
+ url: "/v1/search/media",
849
+ ...options,
850
+ headers: {
851
+ "Content-Type": "application/json",
852
+ ...options.headers
853
+ }
854
+ });
831
855
  var getStatsOverview = (options) => (options?.client ?? client).get({
832
856
  security: [{ scheme: "bearer", type: "http" }],
833
857
  url: "/v1/stats/overview",
@@ -838,52 +862,498 @@ var getCoveredWords = (options) => (options.client ?? client).get({
838
862
  url: "/v1/stats/covered-words",
839
863
  ...options
840
864
  });
865
+ var triggerCoveredWordsUpdate = (options) => (options?.client ?? client).post({
866
+ security: [{
867
+ in: "cookie",
868
+ name: "nadeshiko.session_token",
869
+ type: "apiKey"
870
+ }],
871
+ url: "/v1/stats/covered-words/update",
872
+ ...options,
873
+ headers: {
874
+ "Content-Type": "application/json",
875
+ ...options?.headers
876
+ }
877
+ });
841
878
  var listMedia = (options) => (options?.client ?? client).get({
842
879
  security: [{ scheme: "bearer", type: "http" }],
843
880
  url: "/v1/media",
844
881
  ...options
845
882
  });
846
- var getSegmentByUuid = (options) => (options.client ?? client).get({
883
+ var createMedia = (options) => (options.client ?? client).post({
884
+ security: [{ scheme: "bearer", type: "http" }],
885
+ url: "/v1/media",
886
+ ...options,
887
+ headers: {
888
+ "Content-Type": "application/json",
889
+ ...options.headers
890
+ }
891
+ });
892
+ var getSegment = (options) => (options.client ?? client).get({
847
893
  security: [{ scheme: "bearer", type: "http" }],
848
- url: "/v1/media/segments/{uuid}",
894
+ url: "/v1/media/segments/{segmentPublicId}",
849
895
  ...options
850
896
  });
897
+ var updateSegment = (options) => (options.client ?? client).patch({
898
+ security: [{ scheme: "bearer", type: "http" }],
899
+ url: "/v1/media/segments/{segmentPublicId}",
900
+ ...options,
901
+ headers: {
902
+ "Content-Type": "application/json",
903
+ ...options.headers
904
+ }
905
+ });
851
906
  var getSegmentContext = (options) => (options.client ?? client).get({
852
907
  security: [{ scheme: "bearer", type: "http" }],
853
- url: "/v1/media/segments/{uuid}/context",
908
+ url: "/v1/media/segments/{segmentPublicId}/context",
854
909
  ...options
855
910
  });
856
- var listSeries = (options) => (options?.client ?? client).get({
911
+ var listSegmentRevisions = (options) => (options.client ?? client).get({
857
912
  security: [{ scheme: "bearer", type: "http" }],
858
- url: "/v1/media/series",
913
+ url: "/v1/media/segments/{segmentPublicId}/revisions",
859
914
  ...options
860
915
  });
861
- var getSeries = (options) => (options.client ?? client).get({
916
+ var deleteMedia = (options) => (options.client ?? client).delete({
862
917
  security: [{ scheme: "bearer", type: "http" }],
863
- url: "/v1/media/series/{id}",
918
+ url: "/v1/media/{mediaPublicId}",
864
919
  ...options
865
920
  });
866
921
  var getMedia = (options) => (options.client ?? client).get({
867
922
  security: [{ scheme: "bearer", type: "http" }],
868
- url: "/v1/media/{id}",
923
+ url: "/v1/media/{mediaPublicId}",
869
924
  ...options
870
925
  });
926
+ var updateMedia = (options) => (options.client ?? client).patch({
927
+ security: [{ scheme: "bearer", type: "http" }],
928
+ url: "/v1/media/{mediaPublicId}",
929
+ ...options,
930
+ headers: {
931
+ "Content-Type": "application/json",
932
+ ...options.headers
933
+ }
934
+ });
871
935
  var listEpisodes = (options) => (options.client ?? client).get({
872
936
  security: [{ scheme: "bearer", type: "http" }],
873
- url: "/v1/media/{mediaId}/episodes",
937
+ url: "/v1/media/{mediaPublicId}/episodes",
938
+ ...options
939
+ });
940
+ var createEpisode = (options) => (options.client ?? client).post({
941
+ security: [{ scheme: "bearer", type: "http" }],
942
+ url: "/v1/media/{mediaPublicId}/episodes",
943
+ ...options,
944
+ headers: {
945
+ "Content-Type": "application/json",
946
+ ...options.headers
947
+ }
948
+ });
949
+ var deleteEpisode = (options) => (options.client ?? client).delete({
950
+ security: [{ scheme: "bearer", type: "http" }],
951
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
874
952
  ...options
875
953
  });
876
954
  var getEpisode = (options) => (options.client ?? client).get({
877
955
  security: [{ scheme: "bearer", type: "http" }],
878
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
956
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
879
957
  ...options
880
958
  });
881
- var getSegment = (options) => (options.client ?? client).get({
959
+ var updateEpisode = (options) => (options.client ?? client).patch({
960
+ security: [{ scheme: "bearer", type: "http" }],
961
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
962
+ ...options,
963
+ headers: {
964
+ "Content-Type": "application/json",
965
+ ...options.headers
966
+ }
967
+ });
968
+ var listSegments = (options) => (options.client ?? client).get({
969
+ security: [{ scheme: "bearer", type: "http" }],
970
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
971
+ ...options
972
+ });
973
+ var createSegment = (options) => (options.client ?? client).post({
974
+ security: [{ scheme: "bearer", type: "http" }],
975
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
976
+ ...options,
977
+ headers: {
978
+ "Content-Type": "application/json",
979
+ ...options.headers
980
+ }
981
+ });
982
+ var createSegmentsBatch = (options) => (options.client ?? client).post({
983
+ security: [{ scheme: "bearer", type: "http" }],
984
+ url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments/batch",
985
+ ...options,
986
+ headers: {
987
+ "Content-Type": "application/json",
988
+ ...options.headers
989
+ }
990
+ });
991
+ var getMe = (options) => (options?.client ?? client).get({
992
+ security: [{ scheme: "bearer", type: "http" }],
993
+ url: "/v1/user/me",
994
+ ...options
995
+ });
996
+ var listExcludedMedia = (options) => (options?.client ?? client).get({
997
+ security: [{ scheme: "bearer", type: "http" }],
998
+ url: "/v1/user/excluded-media",
999
+ ...options
1000
+ });
1001
+ var addExcludedMedia = (options) => (options.client ?? client).post({
1002
+ security: [{ scheme: "bearer", type: "http" }],
1003
+ url: "/v1/user/excluded-media",
1004
+ ...options,
1005
+ headers: {
1006
+ "Content-Type": "application/json",
1007
+ ...options.headers
1008
+ }
1009
+ });
1010
+ var removeExcludedMedia = (options) => (options.client ?? client).delete({
1011
+ security: [{ scheme: "bearer", type: "http" }],
1012
+ url: "/v1/user/excluded-media/{mediaPublicId}",
1013
+ ...options
1014
+ });
1015
+ var createUserReport = (options) => (options.client ?? client).post({
1016
+ security: [{
1017
+ in: "cookie",
1018
+ name: "nadeshiko.session_token",
1019
+ type: "apiKey"
1020
+ }],
1021
+ url: "/v1/user/reports",
1022
+ ...options,
1023
+ headers: {
1024
+ "Content-Type": "application/json",
1025
+ ...options.headers
1026
+ }
1027
+ });
1028
+ var getUserPreferences = (options) => (options?.client ?? client).get({
1029
+ security: [{
1030
+ in: "cookie",
1031
+ name: "nadeshiko.session_token",
1032
+ type: "apiKey"
1033
+ }],
1034
+ url: "/v1/user/preferences",
1035
+ ...options
1036
+ });
1037
+ var updateUserPreferences = (options) => (options.client ?? client).patch({
1038
+ security: [{
1039
+ in: "cookie",
1040
+ name: "nadeshiko.session_token",
1041
+ type: "apiKey"
1042
+ }],
1043
+ url: "/v1/user/preferences",
1044
+ ...options,
1045
+ headers: {
1046
+ "Content-Type": "application/json",
1047
+ ...options.headers
1048
+ }
1049
+ });
1050
+ var deleteUserActivity = (options) => (options?.client ?? client).delete({
1051
+ security: [{
1052
+ in: "cookie",
1053
+ name: "nadeshiko.session_token",
1054
+ type: "apiKey"
1055
+ }],
1056
+ url: "/v1/user/activity",
1057
+ ...options
1058
+ });
1059
+ var listUserActivity = (options) => (options?.client ?? client).get({
1060
+ security: [{ scheme: "bearer", type: "http" }],
1061
+ url: "/v1/user/activity",
1062
+ ...options
1063
+ });
1064
+ var trackUserActivity = (options) => (options.client ?? client).post({
1065
+ security: [{
1066
+ in: "cookie",
1067
+ name: "nadeshiko.session_token",
1068
+ type: "apiKey"
1069
+ }],
1070
+ url: "/v1/user/activity",
1071
+ ...options,
1072
+ headers: {
1073
+ "Content-Type": "application/json",
1074
+ ...options.headers
1075
+ }
1076
+ });
1077
+ var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
1078
+ security: [{ scheme: "bearer", type: "http" }],
1079
+ url: "/v1/user/activity/heatmap",
1080
+ ...options
1081
+ });
1082
+ var getUserActivityStats = (options) => (options?.client ?? client).get({
1083
+ security: [{ scheme: "bearer", type: "http" }],
1084
+ url: "/v1/user/activity/stats",
1085
+ ...options
1086
+ });
1087
+ var deleteUserActivityByDate = (options) => (options.client ?? client).delete({
1088
+ security: [{
1089
+ in: "cookie",
1090
+ name: "nadeshiko.session_token",
1091
+ type: "apiKey"
1092
+ }],
1093
+ url: "/v1/user/activity/date/{date}",
1094
+ ...options
1095
+ });
1096
+ var deleteUserActivityById = (options) => (options.client ?? client).delete({
1097
+ security: [{
1098
+ in: "cookie",
1099
+ name: "nadeshiko.session_token",
1100
+ type: "apiKey"
1101
+ }],
1102
+ url: "/v1/user/activity/{activityId}",
1103
+ ...options
1104
+ });
1105
+ var exportUserData = (options) => (options?.client ?? client).get({
1106
+ security: [{
1107
+ in: "cookie",
1108
+ name: "nadeshiko.session_token",
1109
+ type: "apiKey"
1110
+ }],
1111
+ url: "/v1/user/export",
1112
+ ...options
1113
+ });
1114
+ var listUserLabs = (options) => (options?.client ?? client).get({
1115
+ security: [{
1116
+ in: "cookie",
1117
+ name: "nadeshiko.session_token",
1118
+ type: "apiKey"
1119
+ }],
1120
+ url: "/v1/user/labs",
1121
+ ...options
1122
+ });
1123
+ var unenrollUserLab = (options) => (options.client ?? client).delete({
1124
+ security: [{
1125
+ in: "cookie",
1126
+ name: "nadeshiko.session_token",
1127
+ type: "apiKey"
1128
+ }],
1129
+ url: "/v1/user/labs/{key}",
1130
+ ...options
1131
+ });
1132
+ var enrollUserLab = (options) => (options.client ?? client).post({
1133
+ security: [{
1134
+ in: "cookie",
1135
+ name: "nadeshiko.session_token",
1136
+ type: "apiKey"
1137
+ }],
1138
+ url: "/v1/user/labs/{key}",
1139
+ ...options
1140
+ });
1141
+ var listCollections = (options) => (options?.client ?? client).get({
1142
+ security: [{ scheme: "bearer", type: "http" }],
1143
+ url: "/v1/collections",
1144
+ ...options
1145
+ });
1146
+ var createCollection = (options) => (options.client ?? client).post({
1147
+ security: [{ scheme: "bearer", type: "http" }],
1148
+ url: "/v1/collections",
1149
+ ...options,
1150
+ headers: {
1151
+ "Content-Type": "application/json",
1152
+ ...options.headers
1153
+ }
1154
+ });
1155
+ var deleteCollection = (options) => (options.client ?? client).delete({
882
1156
  security: [{ scheme: "bearer", type: "http" }],
883
- url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
1157
+ url: "/v1/collections/{collectionPublicId}",
884
1158
  ...options
885
1159
  });
886
- // generated/public/retry.ts
1160
+ var getCollection = (options) => (options.client ?? client).get({
1161
+ security: [{ scheme: "bearer", type: "http" }],
1162
+ url: "/v1/collections/{collectionPublicId}",
1163
+ ...options
1164
+ });
1165
+ var updateCollection = (options) => (options.client ?? client).patch({
1166
+ security: [{
1167
+ in: "cookie",
1168
+ name: "nadeshiko.session_token",
1169
+ type: "apiKey"
1170
+ }],
1171
+ url: "/v1/collections/{collectionPublicId}",
1172
+ ...options,
1173
+ headers: {
1174
+ "Content-Type": "application/json",
1175
+ ...options.headers
1176
+ }
1177
+ });
1178
+ var addSegmentToCollection = (options) => (options.client ?? client).post({
1179
+ security: [{ scheme: "bearer", type: "http" }],
1180
+ url: "/v1/collections/{collectionPublicId}/segments",
1181
+ ...options,
1182
+ headers: {
1183
+ "Content-Type": "application/json",
1184
+ ...options.headers
1185
+ }
1186
+ });
1187
+ var searchCollectionSegments = (options) => (options.client ?? client).post({
1188
+ security: [{ scheme: "bearer", type: "http" }],
1189
+ url: "/v1/collections/{collectionPublicId}/search",
1190
+ ...options,
1191
+ headers: {
1192
+ "Content-Type": "application/json",
1193
+ ...options.headers
1194
+ }
1195
+ });
1196
+ var removeSegmentFromCollection = (options) => (options.client ?? client).delete({
1197
+ security: [{ scheme: "bearer", type: "http" }],
1198
+ url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
1199
+ ...options
1200
+ });
1201
+ var updateCollectionSegment = (options) => (options.client ?? client).patch({
1202
+ security: [{
1203
+ in: "cookie",
1204
+ name: "nadeshiko.session_token",
1205
+ type: "apiKey"
1206
+ }],
1207
+ url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
1208
+ ...options,
1209
+ headers: {
1210
+ "Content-Type": "application/json",
1211
+ ...options.headers
1212
+ }
1213
+ });
1214
+ var getCollectionStats = (options) => (options.client ?? client).get({
1215
+ security: [{
1216
+ in: "cookie",
1217
+ name: "nadeshiko.session_token",
1218
+ type: "apiKey"
1219
+ }],
1220
+ url: "/v1/collections/{collectionPublicId}/stats",
1221
+ ...options
1222
+ });
1223
+ var listAdminReports = (options) => (options?.client ?? client).get({
1224
+ security: [{
1225
+ in: "cookie",
1226
+ name: "nadeshiko.session_token",
1227
+ type: "apiKey"
1228
+ }],
1229
+ url: "/v1/admin/reports",
1230
+ ...options
1231
+ });
1232
+ var batchUpdateAdminReports = (options) => (options.client ?? client).patch({
1233
+ security: [{
1234
+ in: "cookie",
1235
+ name: "nadeshiko.session_token",
1236
+ type: "apiKey"
1237
+ }],
1238
+ url: "/v1/admin/reports/batch",
1239
+ ...options,
1240
+ headers: {
1241
+ "Content-Type": "application/json",
1242
+ ...options.headers
1243
+ }
1244
+ });
1245
+ var bulkDeleteAdminReports = (options) => (options.client ?? client).delete({
1246
+ security: [{
1247
+ in: "cookie",
1248
+ name: "nadeshiko.session_token",
1249
+ type: "apiKey"
1250
+ }],
1251
+ url: "/v1/admin/reports/bulk",
1252
+ ...options,
1253
+ headers: {
1254
+ "Content-Type": "application/json",
1255
+ ...options.headers
1256
+ }
1257
+ });
1258
+ var bulkUpdateAdminReports = (options) => (options.client ?? client).patch({
1259
+ security: [{
1260
+ in: "cookie",
1261
+ name: "nadeshiko.session_token",
1262
+ type: "apiKey"
1263
+ }],
1264
+ url: "/v1/admin/reports/bulk",
1265
+ ...options,
1266
+ headers: {
1267
+ "Content-Type": "application/json",
1268
+ ...options.headers
1269
+ }
1270
+ });
1271
+ var deleteAdminReport = (options) => (options.client ?? client).delete({
1272
+ security: [{
1273
+ in: "cookie",
1274
+ name: "nadeshiko.session_token",
1275
+ type: "apiKey"
1276
+ }],
1277
+ url: "/v1/admin/reports/{reportId}",
1278
+ ...options
1279
+ });
1280
+ var updateAdminReport = (options) => (options.client ?? client).patch({
1281
+ security: [{
1282
+ in: "cookie",
1283
+ name: "nadeshiko.session_token",
1284
+ type: "apiKey"
1285
+ }],
1286
+ url: "/v1/admin/reports/{reportId}",
1287
+ ...options,
1288
+ headers: {
1289
+ "Content-Type": "application/json",
1290
+ ...options.headers
1291
+ }
1292
+ });
1293
+ var listAdminMediaAudits = (options) => (options?.client ?? client).get({
1294
+ security: [{
1295
+ in: "cookie",
1296
+ name: "nadeshiko.session_token",
1297
+ type: "apiKey"
1298
+ }],
1299
+ url: "/v1/admin/media/audits",
1300
+ ...options
1301
+ });
1302
+ var updateAdminMediaAudit = (options) => (options.client ?? client).patch({
1303
+ security: [{
1304
+ in: "cookie",
1305
+ name: "nadeshiko.session_token",
1306
+ type: "apiKey"
1307
+ }],
1308
+ url: "/v1/admin/media/audits/{name}",
1309
+ ...options,
1310
+ headers: {
1311
+ "Content-Type": "application/json",
1312
+ ...options.headers
1313
+ }
1314
+ });
1315
+ var runAdminMediaAudit = (options) => (options.client ?? client).post({
1316
+ security: [{
1317
+ in: "cookie",
1318
+ name: "nadeshiko.session_token",
1319
+ type: "apiKey"
1320
+ }],
1321
+ url: "/v1/admin/media/audits/{name}/run",
1322
+ ...options
1323
+ });
1324
+ var listAdminMediaAuditRuns = (options) => (options?.client ?? client).get({
1325
+ security: [{
1326
+ in: "cookie",
1327
+ name: "nadeshiko.session_token",
1328
+ type: "apiKey"
1329
+ }],
1330
+ url: "/v1/admin/media/audits/runs",
1331
+ ...options
1332
+ });
1333
+ var getAdminMediaAuditRun = (options) => (options.client ?? client).get({
1334
+ security: [{
1335
+ in: "cookie",
1336
+ name: "nadeshiko.session_token",
1337
+ type: "apiKey"
1338
+ }],
1339
+ url: "/v1/admin/media/audits/runs/{auditRunId}",
1340
+ ...options
1341
+ });
1342
+ var getAnnouncement = (options) => (options?.client ?? client).get({ url: "/v1/admin/announcement", ...options });
1343
+ var updateAnnouncement = (options) => (options.client ?? client).put({
1344
+ security: [{
1345
+ in: "cookie",
1346
+ name: "nadeshiko.session_token",
1347
+ type: "apiKey"
1348
+ }],
1349
+ url: "/v1/admin/announcement",
1350
+ ...options,
1351
+ headers: {
1352
+ "Content-Type": "application/json",
1353
+ ...options.headers
1354
+ }
1355
+ });
1356
+ // generated/internal/retry.ts
887
1357
  var RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
888
1358
  function parseRetryAfter(value) {
889
1359
  const seconds = Number(value);
@@ -906,42 +1376,27 @@ function withRetry(fetchImpl = globalThis.fetch, options = {}) {
906
1376
  return async function retryingFetch(input, init) {
907
1377
  let attempt = 0;
908
1378
  while (true) {
909
- let timedInit = init;
1379
+ let fetchInit = init;
1380
+ let timeoutId;
910
1381
  if (timeout !== undefined && !init?.signal) {
911
1382
  const controller = new AbortController;
912
- const timeoutId = setTimeout(() => controller.abort(new Error(`Request timed out after ${timeout}ms`)), timeout);
913
- timedInit = { ...init, signal: controller.signal };
914
- let response2;
915
- try {
916
- response2 = await fetchImpl(input, timedInit);
917
- clearTimeout(timeoutId);
918
- } catch (networkError) {
919
- clearTimeout(timeoutId);
920
- if (attempt >= maxRetries)
921
- throw networkError;
922
- await sleep(backoffDelay(attempt, initialDelayMs, maxDelayMs));
923
- attempt++;
924
- continue;
925
- }
926
- if (!RETRYABLE_STATUS.has(response2.status) || attempt >= maxRetries) {
927
- return response2;
928
- }
929
- const retryAfter2 = response2.headers.get("Retry-After");
930
- const waitMs2 = retryAfter2 ? parseRetryAfter(retryAfter2) : backoffDelay(attempt, initialDelayMs, maxDelayMs);
931
- await sleep(waitMs2);
932
- attempt++;
933
- continue;
1383
+ timeoutId = setTimeout(() => controller.abort(new Error(`Request timed out after ${timeout}ms`)), timeout);
1384
+ fetchInit = { ...init, signal: controller.signal };
934
1385
  }
935
1386
  let response;
936
1387
  try {
937
- response = await fetchImpl(input, timedInit);
1388
+ response = await fetchImpl(input, fetchInit);
938
1389
  } catch (networkError) {
1390
+ if (timeoutId !== undefined)
1391
+ clearTimeout(timeoutId);
939
1392
  if (attempt >= maxRetries)
940
1393
  throw networkError;
941
1394
  await sleep(backoffDelay(attempt, initialDelayMs, maxDelayMs));
942
1395
  attempt++;
943
1396
  continue;
944
1397
  }
1398
+ if (timeoutId !== undefined)
1399
+ clearTimeout(timeoutId);
945
1400
  if (!RETRYABLE_STATUS.has(response.status) || attempt >= maxRetries) {
946
1401
  return response;
947
1402
  }
@@ -953,7 +1408,7 @@ function withRetry(fetchImpl = globalThis.fetch, options = {}) {
953
1408
  };
954
1409
  }
955
1410
 
956
- // generated/public/errors.ts
1411
+ // generated/internal/errors.ts
957
1412
  class NadeshikoError extends Error {
958
1413
  code;
959
1414
  title;
@@ -975,13 +1430,68 @@ class NadeshikoError extends Error {
975
1430
  }
976
1431
  }
977
1432
 
978
- // generated/public/nadeshiko.gen.ts
1433
+ // generated/internal/paginate.ts
1434
+ async function* paginate(fn, options, extract) {
1435
+ let cursor = null;
1436
+ let first = true;
1437
+ while (true) {
1438
+ const callOptions = first ? options : patchCursor(options, cursor);
1439
+ first = false;
1440
+ const result = await fn(callOptions);
1441
+ if ("error" in result && result.error !== undefined) {
1442
+ throw result.error;
1443
+ }
1444
+ const { items, pagination } = extract(result.data);
1445
+ for (const item of items) {
1446
+ yield item;
1447
+ }
1448
+ if (!pagination.hasMore || pagination.cursor === null)
1449
+ break;
1450
+ cursor = pagination.cursor;
1451
+ }
1452
+ }
1453
+ function patchCursor(options, cursor) {
1454
+ if (options.body !== undefined) {
1455
+ return { ...options, body: { ...options.body, cursor } };
1456
+ }
1457
+ if (options.query !== undefined) {
1458
+ return { ...options, query: { ...options.query, cursor } };
1459
+ }
1460
+ return { ...options, body: { cursor } };
1461
+ }
1462
+ async function* flatPaginate(params, fn, extract) {
1463
+ let cursor = null;
1464
+ let first = true;
1465
+ while (true) {
1466
+ const flat = first ? params : { ...params, cursor };
1467
+ first = false;
1468
+ const result = await fn(flat);
1469
+ if ("error" in result && result.error !== undefined) {
1470
+ throw result.error;
1471
+ }
1472
+ const { items, pagination } = extract(result.data);
1473
+ for (const item of items) {
1474
+ yield item;
1475
+ }
1476
+ if (!pagination.hasMore || pagination.cursor === null)
1477
+ break;
1478
+ cursor = pagination.cursor;
1479
+ }
1480
+ }
1481
+
1482
+ // generated/internal/nadeshiko.gen.ts
979
1483
  var environments = {
980
1484
  LOCAL: "http://localhost:5000/api",
981
1485
  DEVELOPMENT: "https://api-dev.nadeshiko.co",
982
1486
  PRODUCTION: "https://api.nadeshiko.co",
983
1487
  PROXY: ""
984
1488
  };
1489
+ var defaultSessionTokenGetter = () => {
1490
+ if (typeof document === "undefined")
1491
+ return;
1492
+ const match = document.cookie.match(/(?:^|;\s*)nadeshiko\.session_token=([^;]*)/);
1493
+ return match ? decodeURIComponent(match[1]) : undefined;
1494
+ };
985
1495
  function createNadeshikoClient(config) {
986
1496
  const rawBaseUrl = config.baseURL ?? config.baseUrl;
987
1497
  const baseUrl = rawBaseUrl === undefined ? environments.PRODUCTION : (rawBaseUrl in environments) ? environments[rawBaseUrl] : rawBaseUrl;
@@ -991,85 +1501,689 @@ function createNadeshikoClient(config) {
991
1501
  }
992
1502
  return config.apiKey;
993
1503
  };
1504
+ const getSessionToken = config.sessionToken ?? defaultSessionTokenGetter;
994
1505
  const clientInstance = createClient(createConfig({
995
1506
  baseUrl,
1507
+ headers: { "User-Agent": "nadeshiko-sdk-ts/2.1.0", ...config.headers },
996
1508
  fetch: withRetry(globalThis.fetch, config.retryOptions),
997
- auth: () => getApiKey()
1509
+ auth: (auth) => {
1510
+ if (auth.in === "cookie") {
1511
+ return getSessionToken();
1512
+ }
1513
+ return getApiKey();
1514
+ }
998
1515
  }));
999
1516
  clientInstance.interceptors.error.use((error) => {
1000
1517
  if (error && typeof error === "object" && "code" in error && typeof error.code === "string") {
1001
1518
  return new NadeshikoError(error);
1002
1519
  }
1520
+ if (error && typeof error === "object" && "status" in error && typeof error.status === "number") {
1521
+ return new NadeshikoError({
1522
+ code: "UNKNOWN_ERROR",
1523
+ title: "Unexpected error",
1524
+ detail: error.message ?? error.statusText ?? `HTTP ${error.status}`,
1525
+ status: error.status
1526
+ });
1527
+ }
1003
1528
  return error;
1004
1529
  });
1005
- return {
1006
- client: clientInstance,
1007
- search: (options) => search({ throwOnError: true, ...options, client: clientInstance }),
1008
- getSearchStats: (options) => getSearchStats({ throwOnError: true, ...options, client: clientInstance }),
1009
- searchWords: (options) => searchWords({ throwOnError: true, ...options, client: clientInstance }),
1010
- getStatsOverview: (options) => getStatsOverview({ throwOnError: true, ...options, client: clientInstance }),
1011
- getCoveredWords: (options) => getCoveredWords({ throwOnError: true, ...options, client: clientInstance }),
1012
- listMedia: (options) => listMedia({ throwOnError: true, ...options, client: clientInstance }),
1013
- getSegmentByUuid: (options) => getSegmentByUuid({ throwOnError: true, ...options, client: clientInstance }),
1014
- getSegmentContext: (options) => getSegmentContext({ throwOnError: true, ...options, client: clientInstance }),
1015
- listSeries: (options) => listSeries({ throwOnError: true, ...options, client: clientInstance }),
1016
- getSeries: (options) => getSeries({ throwOnError: true, ...options, client: clientInstance }),
1017
- getMedia: (options) => getMedia({ throwOnError: true, ...options, client: clientInstance }),
1018
- listEpisodes: (options) => listEpisodes({ throwOnError: true, ...options, client: clientInstance }),
1019
- getEpisode: (options) => getEpisode({ throwOnError: true, ...options, client: clientInstance }),
1020
- getSegment: (options) => getSegment({ throwOnError: true, ...options, client: clientInstance })
1530
+ const _search = (params) => {
1531
+ const { throwOnError: tOE, ...body } = params ?? {};
1532
+ const p = search({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1533
+ return tOE === false ? p : p.then((r) => r.data);
1021
1534
  };
1022
- }
1023
- // generated/public/paginate.ts
1024
- async function* paginate(fn, options, extract) {
1025
- let cursor = null;
1026
- let first = true;
1027
- while (true) {
1028
- const callOptions = first ? options : patchCursor(options, cursor);
1029
- first = false;
1030
- const result = await fn(callOptions);
1031
- if ("error" in result && result.error !== undefined) {
1032
- throw result.error;
1535
+ _search.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1536
+ return search({ body: flat, client: clientInstance });
1537
+ }, (data) => ({ items: data.segments, pagination: data.pagination }));
1538
+ const _getSearchStats = (params) => {
1539
+ const { throwOnError: tOE, ...body } = params ?? {};
1540
+ const p = getSearchStats({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1541
+ return tOE === false ? p : p.then((r) => r.data);
1542
+ };
1543
+ const _searchWords = (params) => {
1544
+ const { throwOnError: tOE, ...body } = params ?? {};
1545
+ const p = searchWords({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1546
+ return tOE === false ? p : p.then((r) => r.data);
1547
+ };
1548
+ const _searchMedia = (params) => {
1549
+ const { throwOnError: tOE, ...body } = params ?? {};
1550
+ const p = searchMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1551
+ return tOE === false ? p : p.then((r) => r.data);
1552
+ };
1553
+ const _getStatsOverview = (params) => {
1554
+ const tOE = params?.throwOnError;
1555
+ const p = getStatsOverview({ client: clientInstance, throwOnError: tOE === false ? false : true });
1556
+ return tOE === false ? p : p.then((r) => r.data);
1557
+ };
1558
+ const _listMedia = (params) => {
1559
+ const { throwOnError: tOE, ...query } = params ?? {};
1560
+ const p = listMedia({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1561
+ return tOE === false ? p : p.then((r) => r.data);
1562
+ };
1563
+ _listMedia.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1564
+ return listMedia({ query: flat, client: clientInstance });
1565
+ }, (data) => ({ items: data.media, pagination: data.pagination }));
1566
+ const _getSegment = (paramsOrId) => {
1567
+ if (typeof paramsOrId === "string") {
1568
+ return getSegment({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1033
1569
  }
1034
- const { items, pagination } = extract(result.data);
1035
- for (const item of items) {
1036
- yield item;
1570
+ const params = paramsOrId;
1571
+ const { throwOnError: tOE, segmentPublicId } = params ?? {};
1572
+ const p = getSegment({ path: { segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1573
+ return tOE === false ? p : p.then((r) => r.data);
1574
+ };
1575
+ const _getSegmentContext = (paramsOrId) => {
1576
+ if (typeof paramsOrId === "string") {
1577
+ return getSegmentContext({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1037
1578
  }
1038
- if (!pagination.hasMore || pagination.cursor === null)
1039
- break;
1040
- cursor = pagination.cursor;
1041
- }
1042
- }
1043
- function patchCursor(options, cursor) {
1044
- if (options.body !== undefined) {
1045
- return { ...options, body: { ...options.body, cursor } };
1046
- }
1047
- if (options.query !== undefined) {
1048
- return { ...options, query: { ...options.query, cursor } };
1049
- }
1050
- return { ...options, body: { cursor } };
1579
+ const params = paramsOrId;
1580
+ const { throwOnError: tOE, segmentPublicId, ...query } = params ?? {};
1581
+ const p = getSegmentContext({ path: { segmentPublicId }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1582
+ return tOE === false ? p : p.then((r) => r.data);
1583
+ };
1584
+ const _getMedia = (paramsOrId) => {
1585
+ if (typeof paramsOrId === "string") {
1586
+ return getMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1587
+ }
1588
+ const params = paramsOrId;
1589
+ const { throwOnError: tOE, mediaPublicId } = params ?? {};
1590
+ const p = getMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1591
+ return tOE === false ? p : p.then((r) => r.data);
1592
+ };
1593
+ const _listEpisodes = (paramsOrId) => {
1594
+ if (typeof paramsOrId === "string") {
1595
+ return listEpisodes({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1596
+ }
1597
+ const params = paramsOrId;
1598
+ const { throwOnError: tOE, mediaPublicId, ...query } = params ?? {};
1599
+ const p = listEpisodes({ path: { mediaPublicId }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1600
+ return tOE === false ? p : p.then((r) => r.data);
1601
+ };
1602
+ _listEpisodes.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1603
+ const { mediaPublicId, ...q } = flat;
1604
+ return listEpisodes({ path: { mediaPublicId }, query: q, client: clientInstance });
1605
+ }, (data) => ({ items: data.episodes, pagination: data.pagination }));
1606
+ const _getEpisode = (params) => {
1607
+ const { throwOnError: tOE, mediaPublicId, episodeNumber } = params ?? {};
1608
+ const p = getEpisode({ path: { mediaPublicId, episodeNumber }, client: clientInstance, throwOnError: tOE === false ? false : true });
1609
+ return tOE === false ? p : p.then((r) => r.data);
1610
+ };
1611
+ const _getMe = (params) => {
1612
+ const tOE = params?.throwOnError;
1613
+ const p = getMe({ client: clientInstance, throwOnError: tOE === false ? false : true });
1614
+ return tOE === false ? p : p.then((r) => r.data);
1615
+ };
1616
+ const _listExcludedMedia = (params) => {
1617
+ const tOE = params?.throwOnError;
1618
+ const p = listExcludedMedia({ client: clientInstance, throwOnError: tOE === false ? false : true });
1619
+ return tOE === false ? p : p.then((r) => r.data);
1620
+ };
1621
+ const _addExcludedMedia = (params) => {
1622
+ const { throwOnError: tOE, ...body } = params ?? {};
1623
+ const p = addExcludedMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1624
+ return tOE === false ? p : p.then((r) => r.data);
1625
+ };
1626
+ const _removeExcludedMedia = (paramsOrId) => {
1627
+ if (typeof paramsOrId === "string") {
1628
+ return removeExcludedMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1629
+ }
1630
+ const params = paramsOrId;
1631
+ const { throwOnError: tOE, mediaPublicId } = params ?? {};
1632
+ const p = removeExcludedMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1633
+ return tOE === false ? p : p.then((r) => r.data);
1634
+ };
1635
+ const _listUserActivity = (params) => {
1636
+ const { throwOnError: tOE, ...query } = params ?? {};
1637
+ const p = listUserActivity({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1638
+ return tOE === false ? p : p.then((r) => r.data);
1639
+ };
1640
+ _listUserActivity.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1641
+ return listUserActivity({ query: flat, client: clientInstance });
1642
+ }, (data) => ({ items: data.activities, pagination: data.pagination }));
1643
+ const _getUserActivityHeatmap = (params) => {
1644
+ const { throwOnError: tOE, ...query } = params ?? {};
1645
+ const p = getUserActivityHeatmap({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1646
+ return tOE === false ? p : p.then((r) => r.data);
1647
+ };
1648
+ const _getUserActivityStats = (params) => {
1649
+ const { throwOnError: tOE, ...query } = params ?? {};
1650
+ const p = getUserActivityStats({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1651
+ return tOE === false ? p : p.then((r) => r.data);
1652
+ };
1653
+ const _listCollections = (params) => {
1654
+ const { throwOnError: tOE, ...query } = params ?? {};
1655
+ const p = listCollections({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1656
+ return tOE === false ? p : p.then((r) => r.data);
1657
+ };
1658
+ _listCollections.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1659
+ return listCollections({ query: flat, client: clientInstance });
1660
+ }, (data) => ({ items: data.collections, pagination: data.pagination }));
1661
+ const _createCollection = (params) => {
1662
+ const { throwOnError: tOE, ...body } = params ?? {};
1663
+ const p = createCollection({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1664
+ return tOE === false ? p : p.then((r) => r.data);
1665
+ };
1666
+ const _getCollection = (paramsOrId) => {
1667
+ if (typeof paramsOrId === "string") {
1668
+ return getCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1669
+ }
1670
+ const params = paramsOrId;
1671
+ const { throwOnError: tOE, collectionPublicId } = params ?? {};
1672
+ const p = getCollection({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1673
+ return tOE === false ? p : p.then((r) => r.data);
1674
+ };
1675
+ const _deleteCollection = (paramsOrId) => {
1676
+ if (typeof paramsOrId === "string") {
1677
+ return deleteCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1678
+ }
1679
+ const params = paramsOrId;
1680
+ const { throwOnError: tOE, collectionPublicId } = params ?? {};
1681
+ const p = deleteCollection({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1682
+ return tOE === false ? p : p.then((r) => r.data);
1683
+ };
1684
+ const _addSegmentToCollection = (params) => {
1685
+ const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
1686
+ const p = addSegmentToCollection({ path: { collectionPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1687
+ return tOE === false ? p : p.then((r) => r.data);
1688
+ };
1689
+ const _searchCollectionSegments = (paramsOrId) => {
1690
+ if (typeof paramsOrId === "string") {
1691
+ return searchCollectionSegments({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1692
+ }
1693
+ const params = paramsOrId;
1694
+ const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
1695
+ const p = searchCollectionSegments({ path: { collectionPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1696
+ return tOE === false ? p : p.then((r) => r.data);
1697
+ };
1698
+ _searchCollectionSegments.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1699
+ const { collectionPublicId, ...body } = flat;
1700
+ return searchCollectionSegments({ path: { collectionPublicId }, body, client: clientInstance });
1701
+ }, (data) => ({ items: data.segments, pagination: data.pagination }));
1702
+ const _removeSegmentFromCollection = (params) => {
1703
+ const { throwOnError: tOE, collectionPublicId, segmentPublicId } = params ?? {};
1704
+ const p = removeSegmentFromCollection({ path: { collectionPublicId, segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1705
+ return tOE === false ? p : p.then((r) => r.data);
1706
+ };
1707
+ const _getCoveredWords = (params) => {
1708
+ const { throwOnError: tOE, ...query } = params ?? {};
1709
+ const p = getCoveredWords({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1710
+ return tOE === false ? p : p.then((r) => r.data);
1711
+ };
1712
+ _getCoveredWords.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1713
+ return getCoveredWords({ query: flat, client: clientInstance });
1714
+ }, (data) => ({ items: data.words, pagination: data.pagination }));
1715
+ const _triggerCoveredWordsUpdate = (params) => {
1716
+ const { throwOnError: tOE, ...body } = params ?? {};
1717
+ const p = triggerCoveredWordsUpdate({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1718
+ return tOE === false ? p : p.then((r) => r.data);
1719
+ };
1720
+ const _createMedia = (params) => {
1721
+ const { throwOnError: tOE, ...body } = params ?? {};
1722
+ const p = createMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1723
+ return tOE === false ? p : p.then((r) => r.data);
1724
+ };
1725
+ const _updateSegment = (paramsOrId) => {
1726
+ if (typeof paramsOrId === "string") {
1727
+ return updateSegment({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1728
+ }
1729
+ const params = paramsOrId;
1730
+ const { throwOnError: tOE, segmentPublicId, ...body } = params ?? {};
1731
+ const p = updateSegment({ path: { segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1732
+ return tOE === false ? p : p.then((r) => r.data);
1733
+ };
1734
+ const _listSegmentRevisions = (paramsOrId) => {
1735
+ if (typeof paramsOrId === "string") {
1736
+ return listSegmentRevisions({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1737
+ }
1738
+ const params = paramsOrId;
1739
+ const { throwOnError: tOE, segmentPublicId } = params ?? {};
1740
+ const p = listSegmentRevisions({ path: { segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1741
+ return tOE === false ? p : p.then((r) => r.data);
1742
+ };
1743
+ const _updateMedia = (paramsOrId) => {
1744
+ if (typeof paramsOrId === "string") {
1745
+ return updateMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1746
+ }
1747
+ const params = paramsOrId;
1748
+ const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
1749
+ const p = updateMedia({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1750
+ return tOE === false ? p : p.then((r) => r.data);
1751
+ };
1752
+ const _deleteMedia = (paramsOrId) => {
1753
+ if (typeof paramsOrId === "string") {
1754
+ return deleteMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1755
+ }
1756
+ const params = paramsOrId;
1757
+ const { throwOnError: tOE, mediaPublicId } = params ?? {};
1758
+ const p = deleteMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1759
+ return tOE === false ? p : p.then((r) => r.data);
1760
+ };
1761
+ const _createEpisode = (params) => {
1762
+ const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
1763
+ const p = createEpisode({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1764
+ return tOE === false ? p : p.then((r) => r.data);
1765
+ };
1766
+ const _updateEpisode = (params) => {
1767
+ const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1768
+ const p = updateEpisode({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1769
+ return tOE === false ? p : p.then((r) => r.data);
1770
+ };
1771
+ const _deleteEpisode = (params) => {
1772
+ const { throwOnError: tOE, mediaPublicId, episodeNumber } = params ?? {};
1773
+ const p = deleteEpisode({ path: { mediaPublicId, episodeNumber }, client: clientInstance, throwOnError: tOE === false ? false : true });
1774
+ return tOE === false ? p : p.then((r) => r.data);
1775
+ };
1776
+ const _listSegments = (params) => {
1777
+ const { throwOnError: tOE, mediaPublicId, episodeNumber, ...query } = params ?? {};
1778
+ const p = listSegments({ path: { mediaPublicId, episodeNumber }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1779
+ return tOE === false ? p : p.then((r) => r.data);
1780
+ };
1781
+ _listSegments.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1782
+ const { mediaPublicId, episodeNumber, ...q } = flat;
1783
+ return listSegments({ path: { mediaPublicId, episodeNumber }, query: q, client: clientInstance });
1784
+ }, (data) => ({ items: data.segments, pagination: data.pagination }));
1785
+ const _createSegment = (params) => {
1786
+ const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1787
+ const p = createSegment({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1788
+ return tOE === false ? p : p.then((r) => r.data);
1789
+ };
1790
+ const _createSegmentsBatch = (params) => {
1791
+ const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1792
+ const p = createSegmentsBatch({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1793
+ return tOE === false ? p : p.then((r) => r.data);
1794
+ };
1795
+ const _createUserReport = (params) => {
1796
+ const { throwOnError: tOE, ...body } = params ?? {};
1797
+ const p = createUserReport({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1798
+ return tOE === false ? p : p.then((r) => r.data);
1799
+ };
1800
+ const _getUserPreferences = (params) => {
1801
+ const tOE = params?.throwOnError;
1802
+ const p = getUserPreferences({ client: clientInstance, throwOnError: tOE === false ? false : true });
1803
+ return tOE === false ? p : p.then((r) => r.data);
1804
+ };
1805
+ const _updateUserPreferences = (params) => {
1806
+ const { throwOnError: tOE, ...body } = params ?? {};
1807
+ const p = updateUserPreferences({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1808
+ return tOE === false ? p : p.then((r) => r.data);
1809
+ };
1810
+ const _trackUserActivity = (params) => {
1811
+ const { throwOnError: tOE, ...body } = params ?? {};
1812
+ const p = trackUserActivity({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1813
+ return tOE === false ? p : p.then((r) => r.data);
1814
+ };
1815
+ const _deleteUserActivity = (params) => {
1816
+ const { throwOnError: tOE, ...query } = params ?? {};
1817
+ const p = deleteUserActivity({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1818
+ return tOE === false ? p : p.then((r) => r.data);
1819
+ };
1820
+ const _deleteUserActivityByDate = (paramsOrId) => {
1821
+ if (typeof paramsOrId === "string") {
1822
+ return deleteUserActivityByDate({ throwOnError: true, path: { date: paramsOrId }, client: clientInstance }).then((r) => r.data);
1823
+ }
1824
+ const params = paramsOrId;
1825
+ const { throwOnError: tOE, date } = params ?? {};
1826
+ const p = deleteUserActivityByDate({ path: { date }, client: clientInstance, throwOnError: tOE === false ? false : true });
1827
+ return tOE === false ? p : p.then((r) => r.data);
1828
+ };
1829
+ const _deleteUserActivityById = (paramsOrId) => {
1830
+ if (typeof paramsOrId === "number") {
1831
+ return deleteUserActivityById({ throwOnError: true, path: { activityId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1832
+ }
1833
+ const params = paramsOrId;
1834
+ const { throwOnError: tOE, activityId } = params ?? {};
1835
+ const p = deleteUserActivityById({ path: { activityId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1836
+ return tOE === false ? p : p.then((r) => r.data);
1837
+ };
1838
+ const _exportUserData = (params) => {
1839
+ const tOE = params?.throwOnError;
1840
+ const p = exportUserData({ client: clientInstance, throwOnError: tOE === false ? false : true });
1841
+ return tOE === false ? p : p.then((r) => r.data);
1842
+ };
1843
+ const _listUserLabs = (params) => {
1844
+ const tOE = params?.throwOnError;
1845
+ const p = listUserLabs({ client: clientInstance, throwOnError: tOE === false ? false : true });
1846
+ return tOE === false ? p : p.then((r) => r.data);
1847
+ };
1848
+ const _enrollUserLab = (paramsOrId) => {
1849
+ if (typeof paramsOrId === "string") {
1850
+ return enrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
1851
+ }
1852
+ const params = paramsOrId;
1853
+ const { throwOnError: tOE, key } = params ?? {};
1854
+ const p = enrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
1855
+ return tOE === false ? p : p.then((r) => r.data);
1856
+ };
1857
+ const _unenrollUserLab = (paramsOrId) => {
1858
+ if (typeof paramsOrId === "string") {
1859
+ return unenrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
1860
+ }
1861
+ const params = paramsOrId;
1862
+ const { throwOnError: tOE, key } = params ?? {};
1863
+ const p = unenrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
1864
+ return tOE === false ? p : p.then((r) => r.data);
1865
+ };
1866
+ const _updateCollection = (paramsOrId) => {
1867
+ if (typeof paramsOrId === "string") {
1868
+ return updateCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1869
+ }
1870
+ const params = paramsOrId;
1871
+ const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
1872
+ const p = updateCollection({ path: { collectionPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1873
+ return tOE === false ? p : p.then((r) => r.data);
1874
+ };
1875
+ const _updateCollectionSegment = (params) => {
1876
+ const { throwOnError: tOE, collectionPublicId, segmentPublicId, ...body } = params ?? {};
1877
+ const p = updateCollectionSegment({ path: { collectionPublicId, segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1878
+ return tOE === false ? p : p.then((r) => r.data);
1879
+ };
1880
+ const _getCollectionStats = (paramsOrId) => {
1881
+ if (typeof paramsOrId === "string") {
1882
+ return getCollectionStats({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1883
+ }
1884
+ const params = paramsOrId;
1885
+ const { throwOnError: tOE, collectionPublicId } = params ?? {};
1886
+ const p = getCollectionStats({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1887
+ return tOE === false ? p : p.then((r) => r.data);
1888
+ };
1889
+ const _listAdminReports = (params) => {
1890
+ const { throwOnError: tOE, ...query } = params ?? {};
1891
+ const p = listAdminReports({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1892
+ return tOE === false ? p : p.then((r) => r.data);
1893
+ };
1894
+ _listAdminReports.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1895
+ return listAdminReports({ query: flat, client: clientInstance });
1896
+ }, (data) => ({ items: data.groups, pagination: data.pagination }));
1897
+ const _batchUpdateAdminReports = (params) => {
1898
+ const { throwOnError: tOE, ...body } = params ?? {};
1899
+ const p = batchUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1900
+ return tOE === false ? p : p.then((r) => r.data);
1901
+ };
1902
+ const _bulkUpdateAdminReports = (params) => {
1903
+ const { throwOnError: tOE, ...body } = params ?? {};
1904
+ const p = bulkUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1905
+ return tOE === false ? p : p.then((r) => r.data);
1906
+ };
1907
+ const _bulkDeleteAdminReports = (params) => {
1908
+ const { throwOnError: tOE, ...body } = params ?? {};
1909
+ const p = bulkDeleteAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1910
+ return tOE === false ? p : p.then((r) => r.data);
1911
+ };
1912
+ const _updateAdminReport = (paramsOrId) => {
1913
+ if (typeof paramsOrId === "number") {
1914
+ return updateAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1915
+ }
1916
+ const params = paramsOrId;
1917
+ const { throwOnError: tOE, reportId, ...body } = params ?? {};
1918
+ const p = updateAdminReport({ path: { reportId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1919
+ return tOE === false ? p : p.then((r) => r.data);
1920
+ };
1921
+ const _deleteAdminReport = (paramsOrId) => {
1922
+ if (typeof paramsOrId === "number") {
1923
+ return deleteAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1924
+ }
1925
+ const params = paramsOrId;
1926
+ const { throwOnError: tOE, reportId } = params ?? {};
1927
+ const p = deleteAdminReport({ path: { reportId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1928
+ return tOE === false ? p : p.then((r) => r.data);
1929
+ };
1930
+ const _listAdminMediaAudits = (params) => {
1931
+ const tOE = params?.throwOnError;
1932
+ const p = listAdminMediaAudits({ client: clientInstance, throwOnError: tOE === false ? false : true });
1933
+ return tOE === false ? p : p.then((r) => r.data);
1934
+ };
1935
+ const _updateAdminMediaAudit = (paramsOrId) => {
1936
+ if (typeof paramsOrId === "string") {
1937
+ return updateAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
1938
+ }
1939
+ const params = paramsOrId;
1940
+ const { throwOnError: tOE, name, ...body } = params ?? {};
1941
+ const p = updateAdminMediaAudit({ path: { name }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1942
+ return tOE === false ? p : p.then((r) => r.data);
1943
+ };
1944
+ const _runAdminMediaAudit = (paramsOrId) => {
1945
+ if (typeof paramsOrId === "string") {
1946
+ return runAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
1947
+ }
1948
+ const params = paramsOrId;
1949
+ const { throwOnError: tOE, name, ...query } = params ?? {};
1950
+ const p = runAdminMediaAudit({ path: { name }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1951
+ return tOE === false ? p : p.then((r) => r.data);
1952
+ };
1953
+ const _listAdminMediaAuditRuns = (params) => {
1954
+ const { throwOnError: tOE, ...query } = params ?? {};
1955
+ const p = listAdminMediaAuditRuns({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1956
+ return tOE === false ? p : p.then((r) => r.data);
1957
+ };
1958
+ _listAdminMediaAuditRuns.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1959
+ return listAdminMediaAuditRuns({ query: flat, client: clientInstance });
1960
+ }, (data) => ({ items: data.runs, pagination: data.pagination }));
1961
+ const _getAdminMediaAuditRun = (paramsOrId) => {
1962
+ if (typeof paramsOrId === "number") {
1963
+ return getAdminMediaAuditRun({ throwOnError: true, path: { auditRunId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1964
+ }
1965
+ const params = paramsOrId;
1966
+ const { throwOnError: tOE, auditRunId } = params ?? {};
1967
+ const p = getAdminMediaAuditRun({ path: { auditRunId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1968
+ return tOE === false ? p : p.then((r) => r.data);
1969
+ };
1970
+ const _getAnnouncement = (params) => {
1971
+ const tOE = params?.throwOnError;
1972
+ const p = getAnnouncement({ client: clientInstance, throwOnError: tOE === false ? false : true });
1973
+ return tOE === false ? p : p.then((r) => r.data);
1974
+ };
1975
+ const _updateAnnouncement = (params) => {
1976
+ const { throwOnError: tOE, ...body } = params ?? {};
1977
+ const p = updateAnnouncement({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1978
+ return tOE === false ? p : p.then((r) => r.data);
1979
+ };
1980
+ return {
1981
+ client: clientInstance,
1982
+ search: _search,
1983
+ getSearchStats: _getSearchStats,
1984
+ searchWords: _searchWords,
1985
+ searchMedia: _searchMedia,
1986
+ getStatsOverview: _getStatsOverview,
1987
+ listMedia: _listMedia,
1988
+ getSegment: _getSegment,
1989
+ getSegmentContext: _getSegmentContext,
1990
+ getMedia: _getMedia,
1991
+ listEpisodes: _listEpisodes,
1992
+ getEpisode: _getEpisode,
1993
+ getMe: _getMe,
1994
+ listExcludedMedia: _listExcludedMedia,
1995
+ addExcludedMedia: _addExcludedMedia,
1996
+ removeExcludedMedia: _removeExcludedMedia,
1997
+ listUserActivity: _listUserActivity,
1998
+ getUserActivityHeatmap: _getUserActivityHeatmap,
1999
+ getUserActivityStats: _getUserActivityStats,
2000
+ listCollections: _listCollections,
2001
+ createCollection: _createCollection,
2002
+ getCollection: _getCollection,
2003
+ deleteCollection: _deleteCollection,
2004
+ addSegmentToCollection: _addSegmentToCollection,
2005
+ searchCollectionSegments: _searchCollectionSegments,
2006
+ removeSegmentFromCollection: _removeSegmentFromCollection,
2007
+ getCoveredWords: _getCoveredWords,
2008
+ triggerCoveredWordsUpdate: _triggerCoveredWordsUpdate,
2009
+ createMedia: _createMedia,
2010
+ updateSegment: _updateSegment,
2011
+ listSegmentRevisions: _listSegmentRevisions,
2012
+ updateMedia: _updateMedia,
2013
+ deleteMedia: _deleteMedia,
2014
+ createEpisode: _createEpisode,
2015
+ updateEpisode: _updateEpisode,
2016
+ deleteEpisode: _deleteEpisode,
2017
+ listSegments: _listSegments,
2018
+ createSegment: _createSegment,
2019
+ createSegmentsBatch: _createSegmentsBatch,
2020
+ createUserReport: _createUserReport,
2021
+ getUserPreferences: _getUserPreferences,
2022
+ updateUserPreferences: _updateUserPreferences,
2023
+ trackUserActivity: _trackUserActivity,
2024
+ deleteUserActivity: _deleteUserActivity,
2025
+ deleteUserActivityByDate: _deleteUserActivityByDate,
2026
+ deleteUserActivityById: _deleteUserActivityById,
2027
+ exportUserData: _exportUserData,
2028
+ listUserLabs: _listUserLabs,
2029
+ enrollUserLab: _enrollUserLab,
2030
+ unenrollUserLab: _unenrollUserLab,
2031
+ updateCollection: _updateCollection,
2032
+ updateCollectionSegment: _updateCollectionSegment,
2033
+ getCollectionStats: _getCollectionStats,
2034
+ listAdminReports: _listAdminReports,
2035
+ batchUpdateAdminReports: _batchUpdateAdminReports,
2036
+ bulkUpdateAdminReports: _bulkUpdateAdminReports,
2037
+ bulkDeleteAdminReports: _bulkDeleteAdminReports,
2038
+ updateAdminReport: _updateAdminReport,
2039
+ deleteAdminReport: _deleteAdminReport,
2040
+ listAdminMediaAudits: _listAdminMediaAudits,
2041
+ updateAdminMediaAudit: _updateAdminMediaAudit,
2042
+ runAdminMediaAudit: _runAdminMediaAudit,
2043
+ listAdminMediaAuditRuns: _listAdminMediaAuditRuns,
2044
+ getAdminMediaAuditRun: _getAdminMediaAuditRun,
2045
+ getAnnouncement: _getAnnouncement,
2046
+ updateAnnouncement: _updateAnnouncement
2047
+ };
1051
2048
  }
2049
+ // generated/internal/internal/stats.gen.ts
2050
+ var exports_stats_gen = {};
2051
+ __export(exports_stats_gen, {
2052
+ triggerCoveredWordsUpdate: () => triggerCoveredWordsUpdate,
2053
+ getCoveredWords: () => getCoveredWords
2054
+ });
2055
+ // generated/internal/internal/media.gen.ts
2056
+ var exports_media_gen = {};
2057
+ __export(exports_media_gen, {
2058
+ updateSegment: () => updateSegment,
2059
+ updateMedia: () => updateMedia,
2060
+ updateEpisode: () => updateEpisode,
2061
+ listSegments: () => listSegments,
2062
+ listSegmentRevisions: () => listSegmentRevisions,
2063
+ deleteMedia: () => deleteMedia,
2064
+ deleteEpisode: () => deleteEpisode,
2065
+ createSegmentsBatch: () => createSegmentsBatch,
2066
+ createSegment: () => createSegment,
2067
+ createMedia: () => createMedia,
2068
+ createEpisode: () => createEpisode
2069
+ });
2070
+ // generated/internal/internal/user.gen.ts
2071
+ var exports_user_gen = {};
2072
+ __export(exports_user_gen, {
2073
+ updateUserPreferences: () => updateUserPreferences,
2074
+ unenrollUserLab: () => unenrollUserLab,
2075
+ trackUserActivity: () => trackUserActivity,
2076
+ listUserLabs: () => listUserLabs,
2077
+ getUserPreferences: () => getUserPreferences,
2078
+ exportUserData: () => exportUserData,
2079
+ enrollUserLab: () => enrollUserLab,
2080
+ deleteUserActivityById: () => deleteUserActivityById,
2081
+ deleteUserActivityByDate: () => deleteUserActivityByDate,
2082
+ deleteUserActivity: () => deleteUserActivity,
2083
+ createUserReport: () => createUserReport
2084
+ });
2085
+ // generated/internal/internal/collections.gen.ts
2086
+ var exports_collections_gen = {};
2087
+ __export(exports_collections_gen, {
2088
+ updateCollectionSegment: () => updateCollectionSegment,
2089
+ updateCollection: () => updateCollection,
2090
+ getCollectionStats: () => getCollectionStats
2091
+ });
2092
+ // generated/internal/internal/admin.gen.ts
2093
+ var exports_admin_gen = {};
2094
+ __export(exports_admin_gen, {
2095
+ updateAnnouncement: () => updateAnnouncement,
2096
+ updateAdminReport: () => updateAdminReport,
2097
+ updateAdminMediaAudit: () => updateAdminMediaAudit,
2098
+ runAdminMediaAudit: () => runAdminMediaAudit,
2099
+ listAdminReports: () => listAdminReports,
2100
+ listAdminMediaAudits: () => listAdminMediaAudits,
2101
+ listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
2102
+ getAnnouncement: () => getAnnouncement,
2103
+ getAdminMediaAuditRun: () => getAdminMediaAuditRun,
2104
+ deleteAdminReport: () => deleteAdminReport,
2105
+ bulkUpdateAdminReports: () => bulkUpdateAdminReports,
2106
+ bulkDeleteAdminReports: () => bulkDeleteAdminReports,
2107
+ batchUpdateAdminReports: () => batchUpdateAdminReports
2108
+ });
1052
2109
  export {
1053
2110
  withRetry,
2111
+ exports_user_gen as user,
2112
+ updateUserPreferences,
2113
+ updateSegment,
2114
+ updateMedia,
2115
+ updateEpisode,
2116
+ updateCollectionSegment,
2117
+ updateCollection,
2118
+ updateAnnouncement,
2119
+ updateAdminReport,
2120
+ updateAdminMediaAudit,
2121
+ unenrollUserLab,
2122
+ triggerCoveredWordsUpdate,
2123
+ trackUserActivity,
2124
+ exports_stats_gen as stats,
1054
2125
  searchWords,
2126
+ searchMedia,
2127
+ searchCollectionSegments,
1055
2128
  search,
2129
+ runAdminMediaAudit,
2130
+ removeSegmentFromCollection,
2131
+ removeExcludedMedia,
1056
2132
  paginate,
1057
- listSeries,
2133
+ exports_media_gen as media,
2134
+ listUserLabs,
2135
+ listUserActivity,
2136
+ listSegments,
2137
+ listSegmentRevisions,
1058
2138
  listMedia,
2139
+ listExcludedMedia,
1059
2140
  listEpisodes,
2141
+ listCollections,
2142
+ listAdminReports,
2143
+ listAdminMediaAudits,
2144
+ listAdminMediaAuditRuns,
2145
+ getUserPreferences,
2146
+ getUserActivityStats,
2147
+ getUserActivityHeatmap,
1060
2148
  getStatsOverview,
1061
- getSeries,
1062
2149
  getSegmentContext,
1063
- getSegmentByUuid,
1064
2150
  getSegment,
1065
2151
  getSearchStats,
1066
2152
  getMedia,
2153
+ getMe,
1067
2154
  getEpisode,
1068
2155
  getCoveredWords,
2156
+ getCollectionStats,
2157
+ getCollection,
2158
+ getAnnouncement,
2159
+ getAdminMediaAuditRun,
2160
+ flatPaginate,
2161
+ exportUserData,
2162
+ enrollUserLab,
2163
+ deleteUserActivityById,
2164
+ deleteUserActivityByDate,
2165
+ deleteUserActivity,
2166
+ deleteMedia,
2167
+ deleteEpisode,
2168
+ deleteCollection,
2169
+ deleteAdminReport,
2170
+ createUserReport,
2171
+ createSegmentsBatch,
2172
+ createSegment,
1069
2173
  createNadeshikoClient,
2174
+ createMedia,
2175
+ createEpisode,
2176
+ createCollection,
2177
+ exports_collections_gen as collections,
1070
2178
  client,
2179
+ bulkUpdateAdminReports,
2180
+ bulkDeleteAdminReports,
2181
+ batchUpdateAdminReports,
2182
+ exports_admin_gen as admin,
2183
+ addSegmentToCollection,
2184
+ addExcludedMedia,
1071
2185
  NadeshikoError
1072
2186
  };
1073
2187
 
1074
- //# debugId=3E16A701656D0CBF64756E2164756E21
2188
+ //# debugId=0905DF05B5DBDA9464756E2164756E21
1075
2189
  //# sourceMappingURL=index.js.map