@brigadasos/nadeshiko-sdk 2.2.0-internal.df1b7ee → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/client/client.gen.d.ts.map +1 -1
  2. package/dist/client/index.d.ts.map +1 -1
  3. package/dist/client/types.gen.d.ts.map +1 -1
  4. package/dist/client/utils.gen.d.ts.map +1 -1
  5. package/dist/client.gen.d.ts.map +1 -1
  6. package/dist/core/auth.gen.d.ts.map +1 -1
  7. package/dist/core/bodySerializer.gen.d.ts.map +1 -1
  8. package/dist/core/params.gen.d.ts.map +1 -1
  9. package/dist/core/pathSerializer.gen.d.ts.map +1 -1
  10. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
  11. package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
  12. package/dist/core/types.gen.d.ts.map +1 -1
  13. package/dist/core/utils.gen.d.ts.map +1 -1
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/index.cjs +24 -840
  16. package/dist/index.cjs.map +5 -5
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +20 -851
  20. package/dist/index.js.map +5 -5
  21. package/dist/nadeshiko.gen.d.ts +5 -595
  22. package/dist/nadeshiko.gen.d.ts.map +1 -1
  23. package/dist/paginate.d.ts.map +1 -1
  24. package/dist/retry.d.ts.map +1 -1
  25. package/dist/sdk.gen.d.ts +1 -41
  26. package/dist/sdk.gen.d.ts.map +1 -1
  27. package/dist/types.gen.d.ts.map +1 -1
  28. package/package.json +3 -4
  29. package/dist/internal/admin.gen.d.ts +0 -2
  30. package/dist/internal/admin.gen.d.ts.map +0 -1
  31. package/dist/internal/collections.gen.d.ts +0 -2
  32. package/dist/internal/collections.gen.d.ts.map +0 -1
  33. package/dist/internal/media.gen.d.ts +0 -2
  34. package/dist/internal/media.gen.d.ts.map +0 -1
  35. package/dist/internal/stats.gen.d.ts +0 -2
  36. package/dist/internal/stats.gen.d.ts.map +0 -1
  37. package/dist/internal/user.gen.d.ts +0 -2
  38. package/dist/internal/user.gen.d.ts.map +0 -1
  39. package/dist/internal.gen.d.ts +0 -6
  40. package/dist/internal.gen.d.ts.map +0 -1
package/dist/index.cjs CHANGED
@@ -36,45 +36,22 @@ var __export = (target, all) => {
36
36
  });
37
37
  };
38
38
 
39
- // generated/internal/index.ts
40
- var exports_internal = {};
41
- __export(exports_internal, {
39
+ // generated/public/index.ts
40
+ var exports_public = {};
41
+ __export(exports_public, {
42
42
  withRetry: () => withRetry,
43
- user: () => exports_user_gen,
44
- updateUserPreferences: () => updateUserPreferences,
45
- updateSegment: () => updateSegment,
46
- updateMedia: () => updateMedia,
47
- updateEpisode: () => updateEpisode,
48
- updateCollectionSegment: () => updateCollectionSegment,
49
- updateCollection: () => updateCollection,
50
- updateAnnouncement: () => updateAnnouncement,
51
- updateAdminReport: () => updateAdminReport,
52
- updateAdminMediaAudit: () => updateAdminMediaAudit,
53
- unenrollUserLab: () => unenrollUserLab,
54
- triggerCoveredWordsUpdate: () => triggerCoveredWordsUpdate,
55
- trackUserActivity: () => trackUserActivity,
56
- stats: () => exports_stats_gen,
57
43
  searchWords: () => searchWords,
58
44
  searchMedia: () => searchMedia,
59
45
  searchCollectionSegments: () => searchCollectionSegments,
60
46
  search: () => search,
61
- runAdminMediaAudit: () => runAdminMediaAudit,
62
47
  removeSegmentFromCollection: () => removeSegmentFromCollection,
63
48
  removeExcludedMedia: () => removeExcludedMedia,
64
49
  paginate: () => paginate,
65
- media: () => exports_media_gen,
66
- listUserLabs: () => listUserLabs,
67
50
  listUserActivity: () => listUserActivity,
68
- listSegments: () => listSegments,
69
- listSegmentRevisions: () => listSegmentRevisions,
70
51
  listMedia: () => listMedia,
71
52
  listExcludedMedia: () => listExcludedMedia,
72
53
  listEpisodes: () => listEpisodes,
73
54
  listCollections: () => listCollections,
74
- listAdminReports: () => listAdminReports,
75
- listAdminMediaAudits: () => listAdminMediaAudits,
76
- listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
77
- getUserPreferences: () => getUserPreferences,
78
55
  getUserActivityStats: () => getUserActivityStats,
79
56
  getUserActivityHeatmap: () => getUserActivityHeatmap,
80
57
  getStatsOverview: () => getStatsOverview,
@@ -84,45 +61,23 @@ __export(exports_internal, {
84
61
  getMedia: () => getMedia,
85
62
  getMe: () => getMe,
86
63
  getEpisode: () => getEpisode,
87
- getCoveredWords: () => getCoveredWords,
88
- getCollectionStats: () => getCollectionStats,
89
64
  getCollection: () => getCollection,
90
- getAnnouncement: () => getAnnouncement,
91
- getAdminMediaAuditRun: () => getAdminMediaAuditRun,
92
65
  flatPaginate: () => flatPaginate,
93
- exportUserData: () => exportUserData,
94
- enrollUserLab: () => enrollUserLab,
95
- deleteUserActivityById: () => deleteUserActivityById,
96
- deleteUserActivityByDate: () => deleteUserActivityByDate,
97
- deleteUserActivity: () => deleteUserActivity,
98
- deleteMedia: () => deleteMedia,
99
- deleteEpisode: () => deleteEpisode,
100
66
  deleteCollection: () => deleteCollection,
101
- deleteAdminReport: () => deleteAdminReport,
102
- createUserReport: () => createUserReport,
103
- createSegmentsBatch: () => createSegmentsBatch,
104
- createSegment: () => createSegment,
105
67
  createNadeshikoClient: () => createNadeshikoClient,
106
- createMedia: () => createMedia,
107
- createEpisode: () => createEpisode,
108
68
  createCollection: () => createCollection,
109
- collections: () => exports_collections_gen,
110
69
  client: () => client,
111
- bulkUpdateAdminReports: () => bulkUpdateAdminReports,
112
- bulkDeleteAdminReports: () => bulkDeleteAdminReports,
113
- batchUpdateAdminReports: () => batchUpdateAdminReports,
114
- admin: () => exports_admin_gen,
115
70
  addSegmentToCollection: () => addSegmentToCollection,
116
71
  addExcludedMedia: () => addExcludedMedia,
117
72
  NadeshikoError: () => NadeshikoError
118
73
  });
119
- module.exports = __toCommonJS(exports_internal);
74
+ module.exports = __toCommonJS(exports_public);
120
75
 
121
- // generated/internal/core/bodySerializer.gen.ts
76
+ // generated/public/core/bodySerializer.gen.ts
122
77
  var jsonBodySerializer = {
123
78
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
124
79
  };
125
- // generated/internal/core/params.gen.ts
80
+ // generated/public/core/params.gen.ts
126
81
  var extraPrefixesMap = {
127
82
  $body_: "body",
128
83
  $headers_: "headers",
@@ -130,7 +85,7 @@ var extraPrefixesMap = {
130
85
  $query_: "query"
131
86
  };
132
87
  var extraPrefixes = Object.entries(extraPrefixesMap);
133
- // generated/internal/core/serverSentEvents.gen.ts
88
+ // generated/public/core/serverSentEvents.gen.ts
134
89
  var createSseClient = ({
135
90
  onRequest,
136
91
  onSseError,
@@ -266,7 +221,7 @@ var createSseClient = ({
266
221
  return { stream };
267
222
  };
268
223
 
269
- // generated/internal/core/pathSerializer.gen.ts
224
+ // generated/public/core/pathSerializer.gen.ts
270
225
  var separatorArrayExplode = (style) => {
271
226
  switch (style) {
272
227
  case "label":
@@ -390,7 +345,7 @@ var serializeObjectParam = ({
390
345
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
391
346
  };
392
347
 
393
- // generated/internal/core/utils.gen.ts
348
+ // generated/public/core/utils.gen.ts
394
349
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
395
350
  var defaultPathSerializer = ({ path, url: _url }) => {
396
351
  let url = _url;
@@ -479,7 +434,7 @@ function getValidRequestBody(options) {
479
434
  return;
480
435
  }
481
436
 
482
- // generated/internal/core/auth.gen.ts
437
+ // generated/public/core/auth.gen.ts
483
438
  var getAuthToken = async (auth, callback) => {
484
439
  const token = typeof callback === "function" ? await callback(auth) : callback;
485
440
  if (!token) {
@@ -494,7 +449,7 @@ var getAuthToken = async (auth, callback) => {
494
449
  return token;
495
450
  };
496
451
 
497
- // generated/internal/client/utils.gen.ts
452
+ // generated/public/client/utils.gen.ts
498
453
  var createQuerySerializer = ({
499
454
  parameters = {},
500
455
  ...args
@@ -711,7 +666,7 @@ var createConfig = (override = {}) => ({
711
666
  ...override
712
667
  });
713
668
 
714
- // generated/internal/client/client.gen.ts
669
+ // generated/public/client/client.gen.ts
715
670
  var createClient = (config = {}) => {
716
671
  let _config = mergeConfigs(createConfig(), config);
717
672
  const getConfig = () => ({ ..._config });
@@ -917,10 +872,10 @@ var createClient = (config = {}) => {
917
872
  trace: makeMethodFn("TRACE")
918
873
  };
919
874
  };
920
- // generated/internal/client.gen.ts
875
+ // generated/public/client.gen.ts
921
876
  var client = createClient(createConfig({ baseUrl: "https://api.nadeshiko.co" }));
922
877
 
923
- // generated/internal/sdk.gen.ts
878
+ // generated/public/sdk.gen.ts
924
879
  var search = (options) => (options.client ?? client).post({
925
880
  security: [{ scheme: "bearer", type: "http" }],
926
881
  url: "/v1/search",
@@ -962,137 +917,36 @@ var getStatsOverview = (options) => (options?.client ?? client).get({
962
917
  url: "/v1/stats/overview",
963
918
  ...options
964
919
  });
965
- var getCoveredWords = (options) => (options.client ?? client).get({
966
- security: [{ scheme: "bearer", type: "http" }],
967
- url: "/v1/stats/covered-words",
968
- ...options
969
- });
970
- var triggerCoveredWordsUpdate = (options) => (options?.client ?? client).post({
971
- security: [{
972
- in: "cookie",
973
- name: "nadeshiko.session_token",
974
- type: "apiKey"
975
- }],
976
- url: "/v1/stats/covered-words/update",
977
- ...options,
978
- headers: {
979
- "Content-Type": "application/json",
980
- ...options?.headers
981
- }
982
- });
983
920
  var listMedia = (options) => (options?.client ?? client).get({
984
921
  security: [{ scheme: "bearer", type: "http" }],
985
922
  url: "/v1/media",
986
923
  ...options
987
924
  });
988
- var createMedia = (options) => (options.client ?? client).post({
989
- security: [{ scheme: "bearer", type: "http" }],
990
- url: "/v1/media",
991
- ...options,
992
- headers: {
993
- "Content-Type": "application/json",
994
- ...options.headers
995
- }
996
- });
997
925
  var getSegment = (options) => (options.client ?? client).get({
998
926
  security: [{ scheme: "bearer", type: "http" }],
999
927
  url: "/v1/media/segments/{segmentPublicId}",
1000
928
  ...options
1001
929
  });
1002
- var updateSegment = (options) => (options.client ?? client).patch({
1003
- security: [{ scheme: "bearer", type: "http" }],
1004
- url: "/v1/media/segments/{segmentPublicId}",
1005
- ...options,
1006
- headers: {
1007
- "Content-Type": "application/json",
1008
- ...options.headers
1009
- }
1010
- });
1011
930
  var getSegmentContext = (options) => (options.client ?? client).get({
1012
931
  security: [{ scheme: "bearer", type: "http" }],
1013
932
  url: "/v1/media/segments/{segmentPublicId}/context",
1014
933
  ...options
1015
934
  });
1016
- var listSegmentRevisions = (options) => (options.client ?? client).get({
1017
- security: [{ scheme: "bearer", type: "http" }],
1018
- url: "/v1/media/segments/{segmentPublicId}/revisions",
1019
- ...options
1020
- });
1021
- var deleteMedia = (options) => (options.client ?? client).delete({
1022
- security: [{ scheme: "bearer", type: "http" }],
1023
- url: "/v1/media/{mediaPublicId}",
1024
- ...options
1025
- });
1026
935
  var getMedia = (options) => (options.client ?? client).get({
1027
936
  security: [{ scheme: "bearer", type: "http" }],
1028
937
  url: "/v1/media/{mediaPublicId}",
1029
938
  ...options
1030
939
  });
1031
- var updateMedia = (options) => (options.client ?? client).patch({
1032
- security: [{ scheme: "bearer", type: "http" }],
1033
- url: "/v1/media/{mediaPublicId}",
1034
- ...options,
1035
- headers: {
1036
- "Content-Type": "application/json",
1037
- ...options.headers
1038
- }
1039
- });
1040
940
  var listEpisodes = (options) => (options.client ?? client).get({
1041
941
  security: [{ scheme: "bearer", type: "http" }],
1042
942
  url: "/v1/media/{mediaPublicId}/episodes",
1043
943
  ...options
1044
944
  });
1045
- var createEpisode = (options) => (options.client ?? client).post({
1046
- security: [{ scheme: "bearer", type: "http" }],
1047
- url: "/v1/media/{mediaPublicId}/episodes",
1048
- ...options,
1049
- headers: {
1050
- "Content-Type": "application/json",
1051
- ...options.headers
1052
- }
1053
- });
1054
- var deleteEpisode = (options) => (options.client ?? client).delete({
1055
- security: [{ scheme: "bearer", type: "http" }],
1056
- url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
1057
- ...options
1058
- });
1059
945
  var getEpisode = (options) => (options.client ?? client).get({
1060
946
  security: [{ scheme: "bearer", type: "http" }],
1061
947
  url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
1062
948
  ...options
1063
949
  });
1064
- var updateEpisode = (options) => (options.client ?? client).patch({
1065
- security: [{ scheme: "bearer", type: "http" }],
1066
- url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
1067
- ...options,
1068
- headers: {
1069
- "Content-Type": "application/json",
1070
- ...options.headers
1071
- }
1072
- });
1073
- var listSegments = (options) => (options.client ?? client).get({
1074
- security: [{ scheme: "bearer", type: "http" }],
1075
- url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
1076
- ...options
1077
- });
1078
- var createSegment = (options) => (options.client ?? client).post({
1079
- security: [{ scheme: "bearer", type: "http" }],
1080
- url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
1081
- ...options,
1082
- headers: {
1083
- "Content-Type": "application/json",
1084
- ...options.headers
1085
- }
1086
- });
1087
- var createSegmentsBatch = (options) => (options.client ?? client).post({
1088
- security: [{ scheme: "bearer", type: "http" }],
1089
- url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments/batch",
1090
- ...options,
1091
- headers: {
1092
- "Content-Type": "application/json",
1093
- ...options.headers
1094
- }
1095
- });
1096
950
  var getMe = (options) => (options?.client ?? client).get({
1097
951
  security: [{ scheme: "bearer", type: "http" }],
1098
952
  url: "/v1/user/me",
@@ -1117,68 +971,11 @@ var removeExcludedMedia = (options) => (options.client ?? client).delete({
1117
971
  url: "/v1/user/excluded-media/{mediaPublicId}",
1118
972
  ...options
1119
973
  });
1120
- var createUserReport = (options) => (options.client ?? client).post({
1121
- security: [{
1122
- in: "cookie",
1123
- name: "nadeshiko.session_token",
1124
- type: "apiKey"
1125
- }],
1126
- url: "/v1/user/reports",
1127
- ...options,
1128
- headers: {
1129
- "Content-Type": "application/json",
1130
- ...options.headers
1131
- }
1132
- });
1133
- var getUserPreferences = (options) => (options?.client ?? client).get({
1134
- security: [{
1135
- in: "cookie",
1136
- name: "nadeshiko.session_token",
1137
- type: "apiKey"
1138
- }],
1139
- url: "/v1/user/preferences",
1140
- ...options
1141
- });
1142
- var updateUserPreferences = (options) => (options.client ?? client).patch({
1143
- security: [{
1144
- in: "cookie",
1145
- name: "nadeshiko.session_token",
1146
- type: "apiKey"
1147
- }],
1148
- url: "/v1/user/preferences",
1149
- ...options,
1150
- headers: {
1151
- "Content-Type": "application/json",
1152
- ...options.headers
1153
- }
1154
- });
1155
- var deleteUserActivity = (options) => (options?.client ?? client).delete({
1156
- security: [{
1157
- in: "cookie",
1158
- name: "nadeshiko.session_token",
1159
- type: "apiKey"
1160
- }],
1161
- url: "/v1/user/activity",
1162
- ...options
1163
- });
1164
974
  var listUserActivity = (options) => (options?.client ?? client).get({
1165
975
  security: [{ scheme: "bearer", type: "http" }],
1166
976
  url: "/v1/user/activity",
1167
977
  ...options
1168
978
  });
1169
- var trackUserActivity = (options) => (options.client ?? client).post({
1170
- security: [{
1171
- in: "cookie",
1172
- name: "nadeshiko.session_token",
1173
- type: "apiKey"
1174
- }],
1175
- url: "/v1/user/activity",
1176
- ...options,
1177
- headers: {
1178
- "Content-Type": "application/json",
1179
- ...options.headers
1180
- }
1181
- });
1182
979
  var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
1183
980
  security: [{ scheme: "bearer", type: "http" }],
1184
981
  url: "/v1/user/activity/heatmap",
@@ -1189,60 +986,6 @@ var getUserActivityStats = (options) => (options?.client ?? client).get({
1189
986
  url: "/v1/user/activity/stats",
1190
987
  ...options
1191
988
  });
1192
- var deleteUserActivityByDate = (options) => (options.client ?? client).delete({
1193
- security: [{
1194
- in: "cookie",
1195
- name: "nadeshiko.session_token",
1196
- type: "apiKey"
1197
- }],
1198
- url: "/v1/user/activity/date/{date}",
1199
- ...options
1200
- });
1201
- var deleteUserActivityById = (options) => (options.client ?? client).delete({
1202
- security: [{
1203
- in: "cookie",
1204
- name: "nadeshiko.session_token",
1205
- type: "apiKey"
1206
- }],
1207
- url: "/v1/user/activity/{activityId}",
1208
- ...options
1209
- });
1210
- var exportUserData = (options) => (options?.client ?? client).get({
1211
- security: [{
1212
- in: "cookie",
1213
- name: "nadeshiko.session_token",
1214
- type: "apiKey"
1215
- }],
1216
- url: "/v1/user/export",
1217
- ...options
1218
- });
1219
- var listUserLabs = (options) => (options?.client ?? client).get({
1220
- security: [{
1221
- in: "cookie",
1222
- name: "nadeshiko.session_token",
1223
- type: "apiKey"
1224
- }],
1225
- url: "/v1/user/labs",
1226
- ...options
1227
- });
1228
- var unenrollUserLab = (options) => (options.client ?? client).delete({
1229
- security: [{
1230
- in: "cookie",
1231
- name: "nadeshiko.session_token",
1232
- type: "apiKey"
1233
- }],
1234
- url: "/v1/user/labs/{key}",
1235
- ...options
1236
- });
1237
- var enrollUserLab = (options) => (options.client ?? client).post({
1238
- security: [{
1239
- in: "cookie",
1240
- name: "nadeshiko.session_token",
1241
- type: "apiKey"
1242
- }],
1243
- url: "/v1/user/labs/{key}",
1244
- ...options
1245
- });
1246
989
  var listCollections = (options) => (options?.client ?? client).get({
1247
990
  security: [{ scheme: "bearer", type: "http" }],
1248
991
  url: "/v1/collections",
@@ -1267,19 +1010,6 @@ var getCollection = (options) => (options.client ?? client).get({
1267
1010
  url: "/v1/collections/{collectionPublicId}",
1268
1011
  ...options
1269
1012
  });
1270
- var updateCollection = (options) => (options.client ?? client).patch({
1271
- security: [{
1272
- in: "cookie",
1273
- name: "nadeshiko.session_token",
1274
- type: "apiKey"
1275
- }],
1276
- url: "/v1/collections/{collectionPublicId}",
1277
- ...options,
1278
- headers: {
1279
- "Content-Type": "application/json",
1280
- ...options.headers
1281
- }
1282
- });
1283
1013
  var addSegmentToCollection = (options) => (options.client ?? client).post({
1284
1014
  security: [{ scheme: "bearer", type: "http" }],
1285
1015
  url: "/v1/collections/{collectionPublicId}/segments",
@@ -1303,162 +1033,7 @@ var removeSegmentFromCollection = (options) => (options.client ?? client).delete
1303
1033
  url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
1304
1034
  ...options
1305
1035
  });
1306
- var updateCollectionSegment = (options) => (options.client ?? client).patch({
1307
- security: [{
1308
- in: "cookie",
1309
- name: "nadeshiko.session_token",
1310
- type: "apiKey"
1311
- }],
1312
- url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
1313
- ...options,
1314
- headers: {
1315
- "Content-Type": "application/json",
1316
- ...options.headers
1317
- }
1318
- });
1319
- var getCollectionStats = (options) => (options.client ?? client).get({
1320
- security: [{
1321
- in: "cookie",
1322
- name: "nadeshiko.session_token",
1323
- type: "apiKey"
1324
- }],
1325
- url: "/v1/collections/{collectionPublicId}/stats",
1326
- ...options
1327
- });
1328
- var listAdminReports = (options) => (options?.client ?? client).get({
1329
- security: [{
1330
- in: "cookie",
1331
- name: "nadeshiko.session_token",
1332
- type: "apiKey"
1333
- }],
1334
- url: "/v1/admin/reports",
1335
- ...options
1336
- });
1337
- var batchUpdateAdminReports = (options) => (options.client ?? client).patch({
1338
- security: [{
1339
- in: "cookie",
1340
- name: "nadeshiko.session_token",
1341
- type: "apiKey"
1342
- }],
1343
- url: "/v1/admin/reports/batch",
1344
- ...options,
1345
- headers: {
1346
- "Content-Type": "application/json",
1347
- ...options.headers
1348
- }
1349
- });
1350
- var bulkDeleteAdminReports = (options) => (options.client ?? client).delete({
1351
- security: [{
1352
- in: "cookie",
1353
- name: "nadeshiko.session_token",
1354
- type: "apiKey"
1355
- }],
1356
- url: "/v1/admin/reports/bulk",
1357
- ...options,
1358
- headers: {
1359
- "Content-Type": "application/json",
1360
- ...options.headers
1361
- }
1362
- });
1363
- var bulkUpdateAdminReports = (options) => (options.client ?? client).patch({
1364
- security: [{
1365
- in: "cookie",
1366
- name: "nadeshiko.session_token",
1367
- type: "apiKey"
1368
- }],
1369
- url: "/v1/admin/reports/bulk",
1370
- ...options,
1371
- headers: {
1372
- "Content-Type": "application/json",
1373
- ...options.headers
1374
- }
1375
- });
1376
- var deleteAdminReport = (options) => (options.client ?? client).delete({
1377
- security: [{
1378
- in: "cookie",
1379
- name: "nadeshiko.session_token",
1380
- type: "apiKey"
1381
- }],
1382
- url: "/v1/admin/reports/{reportId}",
1383
- ...options
1384
- });
1385
- var updateAdminReport = (options) => (options.client ?? client).patch({
1386
- security: [{
1387
- in: "cookie",
1388
- name: "nadeshiko.session_token",
1389
- type: "apiKey"
1390
- }],
1391
- url: "/v1/admin/reports/{reportId}",
1392
- ...options,
1393
- headers: {
1394
- "Content-Type": "application/json",
1395
- ...options.headers
1396
- }
1397
- });
1398
- var listAdminMediaAudits = (options) => (options?.client ?? client).get({
1399
- security: [{
1400
- in: "cookie",
1401
- name: "nadeshiko.session_token",
1402
- type: "apiKey"
1403
- }],
1404
- url: "/v1/admin/media/audits",
1405
- ...options
1406
- });
1407
- var updateAdminMediaAudit = (options) => (options.client ?? client).patch({
1408
- security: [{
1409
- in: "cookie",
1410
- name: "nadeshiko.session_token",
1411
- type: "apiKey"
1412
- }],
1413
- url: "/v1/admin/media/audits/{name}",
1414
- ...options,
1415
- headers: {
1416
- "Content-Type": "application/json",
1417
- ...options.headers
1418
- }
1419
- });
1420
- var runAdminMediaAudit = (options) => (options.client ?? client).post({
1421
- security: [{
1422
- in: "cookie",
1423
- name: "nadeshiko.session_token",
1424
- type: "apiKey"
1425
- }],
1426
- url: "/v1/admin/media/audits/{name}/run",
1427
- ...options
1428
- });
1429
- var listAdminMediaAuditRuns = (options) => (options?.client ?? client).get({
1430
- security: [{
1431
- in: "cookie",
1432
- name: "nadeshiko.session_token",
1433
- type: "apiKey"
1434
- }],
1435
- url: "/v1/admin/media/audits/runs",
1436
- ...options
1437
- });
1438
- var getAdminMediaAuditRun = (options) => (options.client ?? client).get({
1439
- security: [{
1440
- in: "cookie",
1441
- name: "nadeshiko.session_token",
1442
- type: "apiKey"
1443
- }],
1444
- url: "/v1/admin/media/audits/runs/{auditRunId}",
1445
- ...options
1446
- });
1447
- var getAnnouncement = (options) => (options?.client ?? client).get({ url: "/v1/admin/announcement", ...options });
1448
- var updateAnnouncement = (options) => (options.client ?? client).put({
1449
- security: [{
1450
- in: "cookie",
1451
- name: "nadeshiko.session_token",
1452
- type: "apiKey"
1453
- }],
1454
- url: "/v1/admin/announcement",
1455
- ...options,
1456
- headers: {
1457
- "Content-Type": "application/json",
1458
- ...options.headers
1459
- }
1460
- });
1461
- // generated/internal/retry.ts
1036
+ // generated/public/retry.ts
1462
1037
  var RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
1463
1038
  function parseRetryAfter(value) {
1464
1039
  const seconds = Number(value);
@@ -1513,7 +1088,7 @@ function withRetry(fetchImpl = globalThis.fetch, options = {}) {
1513
1088
  };
1514
1089
  }
1515
1090
 
1516
- // generated/internal/errors.ts
1091
+ // generated/public/errors.ts
1517
1092
  class NadeshikoError extends Error {
1518
1093
  code;
1519
1094
  title;
@@ -1535,7 +1110,7 @@ class NadeshikoError extends Error {
1535
1110
  }
1536
1111
  }
1537
1112
 
1538
- // generated/internal/paginate.ts
1113
+ // generated/public/paginate.ts
1539
1114
  async function* paginate(fn, options, extract) {
1540
1115
  let cursor = null;
1541
1116
  let first = true;
@@ -1584,39 +1159,21 @@ async function* flatPaginate(params, fn, extract) {
1584
1159
  }
1585
1160
  }
1586
1161
 
1587
- // generated/internal/nadeshiko.gen.ts
1162
+ // generated/public/nadeshiko.gen.ts
1588
1163
  var environments = {
1589
1164
  LOCAL: "http://localhost:5000/api",
1590
- DEVELOPMENT: "https://api-dev.nadeshiko.co",
1591
- PRODUCTION: "https://api.nadeshiko.co",
1592
- PROXY: ""
1593
- };
1594
- var defaultSessionTokenGetter = () => {
1595
- if (typeof document === "undefined")
1596
- return;
1597
- const match = document.cookie.match(/(?:^|;\s*)nadeshiko\.session_token=([^;]*)/);
1598
- return match ? decodeURIComponent(match[1]) : undefined;
1165
+ DEVELOPMENT: "https://api-stg.nadeshiko.co",
1166
+ STAGING: "https://api-stg.nadeshiko.co",
1167
+ PRODUCTION: "https://api.nadeshiko.co"
1599
1168
  };
1600
1169
  function createNadeshikoClient(config) {
1601
1170
  const rawBaseUrl = config.baseURL ?? config.baseUrl;
1602
1171
  const baseUrl = rawBaseUrl === undefined ? environments.PRODUCTION : (rawBaseUrl in environments) ? environments[rawBaseUrl] : rawBaseUrl;
1603
- const getApiKey = async () => {
1604
- if (typeof config.apiKey === "function") {
1605
- return await config.apiKey();
1606
- }
1607
- return config.apiKey;
1608
- };
1609
- const getSessionToken = config.sessionToken ?? defaultSessionTokenGetter;
1610
1172
  const clientInstance = createClient(createConfig({
1611
1173
  baseUrl,
1612
1174
  headers: { "User-Agent": "nadeshiko-sdk-ts/2.1.0", ...config.headers },
1613
1175
  fetch: withRetry(globalThis.fetch, config.retryOptions),
1614
- auth: (auth) => {
1615
- if (auth.in === "cookie") {
1616
- return getSessionToken();
1617
- }
1618
- return getApiKey();
1619
- }
1176
+ auth: () => config.apiKey
1620
1177
  }));
1621
1178
  clientInstance.interceptors.error.use((error) => {
1622
1179
  if (error && typeof error === "object" && "code" in error && typeof error.code === "string") {
@@ -1809,279 +1366,6 @@ function createNadeshikoClient(config) {
1809
1366
  const p = removeSegmentFromCollection({ path: { collectionPublicId, segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1810
1367
  return tOE === false ? p : p.then((r) => r.data);
1811
1368
  };
1812
- const _getCoveredWords = (params) => {
1813
- const { throwOnError: tOE, ...query } = params ?? {};
1814
- const p = getCoveredWords({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1815
- return tOE === false ? p : p.then((r) => r.data);
1816
- };
1817
- _getCoveredWords.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1818
- return getCoveredWords({ query: flat, client: clientInstance });
1819
- }, (data) => ({ items: data.words, pagination: data.pagination }));
1820
- const _triggerCoveredWordsUpdate = (params) => {
1821
- const { throwOnError: tOE, ...body } = params ?? {};
1822
- const p = triggerCoveredWordsUpdate({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1823
- return tOE === false ? p : p.then((r) => r.data);
1824
- };
1825
- const _createMedia = (params) => {
1826
- const { throwOnError: tOE, ...body } = params ?? {};
1827
- const p = createMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1828
- return tOE === false ? p : p.then((r) => r.data);
1829
- };
1830
- const _updateSegment = (paramsOrId) => {
1831
- if (typeof paramsOrId === "string") {
1832
- return updateSegment({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1833
- }
1834
- const params = paramsOrId;
1835
- const { throwOnError: tOE, segmentPublicId, ...body } = params ?? {};
1836
- const p = updateSegment({ path: { segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1837
- return tOE === false ? p : p.then((r) => r.data);
1838
- };
1839
- const _listSegmentRevisions = (paramsOrId) => {
1840
- if (typeof paramsOrId === "string") {
1841
- return listSegmentRevisions({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1842
- }
1843
- const params = paramsOrId;
1844
- const { throwOnError: tOE, segmentPublicId } = params ?? {};
1845
- const p = listSegmentRevisions({ path: { segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1846
- return tOE === false ? p : p.then((r) => r.data);
1847
- };
1848
- const _updateMedia = (paramsOrId) => {
1849
- if (typeof paramsOrId === "string") {
1850
- return updateMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1851
- }
1852
- const params = paramsOrId;
1853
- const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
1854
- const p = updateMedia({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1855
- return tOE === false ? p : p.then((r) => r.data);
1856
- };
1857
- const _deleteMedia = (paramsOrId) => {
1858
- if (typeof paramsOrId === "string") {
1859
- return deleteMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1860
- }
1861
- const params = paramsOrId;
1862
- const { throwOnError: tOE, mediaPublicId } = params ?? {};
1863
- const p = deleteMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1864
- return tOE === false ? p : p.then((r) => r.data);
1865
- };
1866
- const _createEpisode = (params) => {
1867
- const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
1868
- const p = createEpisode({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1869
- return tOE === false ? p : p.then((r) => r.data);
1870
- };
1871
- const _updateEpisode = (params) => {
1872
- const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1873
- const p = updateEpisode({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1874
- return tOE === false ? p : p.then((r) => r.data);
1875
- };
1876
- const _deleteEpisode = (params) => {
1877
- const { throwOnError: tOE, mediaPublicId, episodeNumber } = params ?? {};
1878
- const p = deleteEpisode({ path: { mediaPublicId, episodeNumber }, client: clientInstance, throwOnError: tOE === false ? false : true });
1879
- return tOE === false ? p : p.then((r) => r.data);
1880
- };
1881
- const _listSegments = (params) => {
1882
- const { throwOnError: tOE, mediaPublicId, episodeNumber, ...query } = params ?? {};
1883
- const p = listSegments({ path: { mediaPublicId, episodeNumber }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1884
- return tOE === false ? p : p.then((r) => r.data);
1885
- };
1886
- _listSegments.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
1887
- const { mediaPublicId, episodeNumber, ...q } = flat;
1888
- return listSegments({ path: { mediaPublicId, episodeNumber }, query: q, client: clientInstance });
1889
- }, (data) => ({ items: data.segments, pagination: data.pagination }));
1890
- const _createSegment = (params) => {
1891
- const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1892
- const p = createSegment({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1893
- return tOE === false ? p : p.then((r) => r.data);
1894
- };
1895
- const _createSegmentsBatch = (params) => {
1896
- const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
1897
- const p = createSegmentsBatch({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1898
- return tOE === false ? p : p.then((r) => r.data);
1899
- };
1900
- const _createUserReport = (params) => {
1901
- const { throwOnError: tOE, ...body } = params ?? {};
1902
- const p = createUserReport({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1903
- return tOE === false ? p : p.then((r) => r.data);
1904
- };
1905
- const _getUserPreferences = (params) => {
1906
- const tOE = params?.throwOnError;
1907
- const p = getUserPreferences({ client: clientInstance, throwOnError: tOE === false ? false : true });
1908
- return tOE === false ? p : p.then((r) => r.data);
1909
- };
1910
- const _updateUserPreferences = (params) => {
1911
- const { throwOnError: tOE, ...body } = params ?? {};
1912
- const p = updateUserPreferences({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1913
- return tOE === false ? p : p.then((r) => r.data);
1914
- };
1915
- const _trackUserActivity = (params) => {
1916
- const { throwOnError: tOE, ...body } = params ?? {};
1917
- const p = trackUserActivity({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1918
- return tOE === false ? p : p.then((r) => r.data);
1919
- };
1920
- const _deleteUserActivity = (params) => {
1921
- const { throwOnError: tOE, ...query } = params ?? {};
1922
- const p = deleteUserActivity({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1923
- return tOE === false ? p : p.then((r) => r.data);
1924
- };
1925
- const _deleteUserActivityByDate = (paramsOrId) => {
1926
- if (typeof paramsOrId === "string") {
1927
- return deleteUserActivityByDate({ throwOnError: true, path: { date: paramsOrId }, client: clientInstance }).then((r) => r.data);
1928
- }
1929
- const params = paramsOrId;
1930
- const { throwOnError: tOE, date } = params ?? {};
1931
- const p = deleteUserActivityByDate({ path: { date }, client: clientInstance, throwOnError: tOE === false ? false : true });
1932
- return tOE === false ? p : p.then((r) => r.data);
1933
- };
1934
- const _deleteUserActivityById = (paramsOrId) => {
1935
- if (typeof paramsOrId === "number") {
1936
- return deleteUserActivityById({ throwOnError: true, path: { activityId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1937
- }
1938
- const params = paramsOrId;
1939
- const { throwOnError: tOE, activityId } = params ?? {};
1940
- const p = deleteUserActivityById({ path: { activityId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1941
- return tOE === false ? p : p.then((r) => r.data);
1942
- };
1943
- const _exportUserData = (params) => {
1944
- const tOE = params?.throwOnError;
1945
- const p = exportUserData({ client: clientInstance, throwOnError: tOE === false ? false : true });
1946
- return tOE === false ? p : p.then((r) => r.data);
1947
- };
1948
- const _listUserLabs = (params) => {
1949
- const tOE = params?.throwOnError;
1950
- const p = listUserLabs({ client: clientInstance, throwOnError: tOE === false ? false : true });
1951
- return tOE === false ? p : p.then((r) => r.data);
1952
- };
1953
- const _enrollUserLab = (paramsOrId) => {
1954
- if (typeof paramsOrId === "string") {
1955
- return enrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
1956
- }
1957
- const params = paramsOrId;
1958
- const { throwOnError: tOE, key } = params ?? {};
1959
- const p = enrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
1960
- return tOE === false ? p : p.then((r) => r.data);
1961
- };
1962
- const _unenrollUserLab = (paramsOrId) => {
1963
- if (typeof paramsOrId === "string") {
1964
- return unenrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
1965
- }
1966
- const params = paramsOrId;
1967
- const { throwOnError: tOE, key } = params ?? {};
1968
- const p = unenrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
1969
- return tOE === false ? p : p.then((r) => r.data);
1970
- };
1971
- const _updateCollection = (paramsOrId) => {
1972
- if (typeof paramsOrId === "string") {
1973
- return updateCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1974
- }
1975
- const params = paramsOrId;
1976
- const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
1977
- const p = updateCollection({ path: { collectionPublicId }, ...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
- const _updateCollectionSegment = (params) => {
1981
- const { throwOnError: tOE, collectionPublicId, segmentPublicId, ...body } = params ?? {};
1982
- const p = updateCollectionSegment({ path: { collectionPublicId, segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1983
- return tOE === false ? p : p.then((r) => r.data);
1984
- };
1985
- const _getCollectionStats = (paramsOrId) => {
1986
- if (typeof paramsOrId === "string") {
1987
- return getCollectionStats({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
1988
- }
1989
- const params = paramsOrId;
1990
- const { throwOnError: tOE, collectionPublicId } = params ?? {};
1991
- const p = getCollectionStats({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
1992
- return tOE === false ? p : p.then((r) => r.data);
1993
- };
1994
- const _listAdminReports = (params) => {
1995
- const { throwOnError: tOE, ...query } = params ?? {};
1996
- const p = listAdminReports({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
1997
- return tOE === false ? p : p.then((r) => r.data);
1998
- };
1999
- _listAdminReports.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
2000
- return listAdminReports({ query: flat, client: clientInstance });
2001
- }, (data) => ({ items: data.groups, pagination: data.pagination }));
2002
- const _batchUpdateAdminReports = (params) => {
2003
- const { throwOnError: tOE, ...body } = params ?? {};
2004
- const p = batchUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2005
- return tOE === false ? p : p.then((r) => r.data);
2006
- };
2007
- const _bulkUpdateAdminReports = (params) => {
2008
- const { throwOnError: tOE, ...body } = params ?? {};
2009
- const p = bulkUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2010
- return tOE === false ? p : p.then((r) => r.data);
2011
- };
2012
- const _bulkDeleteAdminReports = (params) => {
2013
- const { throwOnError: tOE, ...body } = params ?? {};
2014
- const p = bulkDeleteAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2015
- return tOE === false ? p : p.then((r) => r.data);
2016
- };
2017
- const _updateAdminReport = (paramsOrId) => {
2018
- if (typeof paramsOrId === "number") {
2019
- return updateAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
2020
- }
2021
- const params = paramsOrId;
2022
- const { throwOnError: tOE, reportId, ...body } = params ?? {};
2023
- const p = updateAdminReport({ path: { reportId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2024
- return tOE === false ? p : p.then((r) => r.data);
2025
- };
2026
- const _deleteAdminReport = (paramsOrId) => {
2027
- if (typeof paramsOrId === "number") {
2028
- return deleteAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
2029
- }
2030
- const params = paramsOrId;
2031
- const { throwOnError: tOE, reportId } = params ?? {};
2032
- const p = deleteAdminReport({ path: { reportId }, client: clientInstance, throwOnError: tOE === false ? false : true });
2033
- return tOE === false ? p : p.then((r) => r.data);
2034
- };
2035
- const _listAdminMediaAudits = (params) => {
2036
- const tOE = params?.throwOnError;
2037
- const p = listAdminMediaAudits({ client: clientInstance, throwOnError: tOE === false ? false : true });
2038
- return tOE === false ? p : p.then((r) => r.data);
2039
- };
2040
- const _updateAdminMediaAudit = (paramsOrId) => {
2041
- if (typeof paramsOrId === "string") {
2042
- return updateAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
2043
- }
2044
- const params = paramsOrId;
2045
- const { throwOnError: tOE, name, ...body } = params ?? {};
2046
- const p = updateAdminMediaAudit({ path: { name }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2047
- return tOE === false ? p : p.then((r) => r.data);
2048
- };
2049
- const _runAdminMediaAudit = (paramsOrId) => {
2050
- if (typeof paramsOrId === "string") {
2051
- return runAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
2052
- }
2053
- const params = paramsOrId;
2054
- const { throwOnError: tOE, name, ...query } = params ?? {};
2055
- const p = runAdminMediaAudit({ path: { name }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2056
- return tOE === false ? p : p.then((r) => r.data);
2057
- };
2058
- const _listAdminMediaAuditRuns = (params) => {
2059
- const { throwOnError: tOE, ...query } = params ?? {};
2060
- const p = listAdminMediaAuditRuns({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2061
- return tOE === false ? p : p.then((r) => r.data);
2062
- };
2063
- _listAdminMediaAuditRuns.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
2064
- return listAdminMediaAuditRuns({ query: flat, client: clientInstance });
2065
- }, (data) => ({ items: data.runs, pagination: data.pagination }));
2066
- const _getAdminMediaAuditRun = (paramsOrId) => {
2067
- if (typeof paramsOrId === "number") {
2068
- return getAdminMediaAuditRun({ throwOnError: true, path: { auditRunId: paramsOrId }, client: clientInstance }).then((r) => r.data);
2069
- }
2070
- const params = paramsOrId;
2071
- const { throwOnError: tOE, auditRunId } = params ?? {};
2072
- const p = getAdminMediaAuditRun({ path: { auditRunId }, client: clientInstance, throwOnError: tOE === false ? false : true });
2073
- return tOE === false ? p : p.then((r) => r.data);
2074
- };
2075
- const _getAnnouncement = (params) => {
2076
- const tOE = params?.throwOnError;
2077
- const p = getAnnouncement({ client: clientInstance, throwOnError: tOE === false ? false : true });
2078
- return tOE === false ? p : p.then((r) => r.data);
2079
- };
2080
- const _updateAnnouncement = (params) => {
2081
- const { throwOnError: tOE, ...body } = params ?? {};
2082
- const p = updateAnnouncement({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
2083
- return tOE === false ? p : p.then((r) => r.data);
2084
- };
2085
1369
  return {
2086
1370
  client: clientInstance,
2087
1371
  search: _search,
@@ -2108,109 +1392,9 @@ function createNadeshikoClient(config) {
2108
1392
  deleteCollection: _deleteCollection,
2109
1393
  addSegmentToCollection: _addSegmentToCollection,
2110
1394
  searchCollectionSegments: _searchCollectionSegments,
2111
- removeSegmentFromCollection: _removeSegmentFromCollection,
2112
- getCoveredWords: _getCoveredWords,
2113
- triggerCoveredWordsUpdate: _triggerCoveredWordsUpdate,
2114
- createMedia: _createMedia,
2115
- updateSegment: _updateSegment,
2116
- listSegmentRevisions: _listSegmentRevisions,
2117
- updateMedia: _updateMedia,
2118
- deleteMedia: _deleteMedia,
2119
- createEpisode: _createEpisode,
2120
- updateEpisode: _updateEpisode,
2121
- deleteEpisode: _deleteEpisode,
2122
- listSegments: _listSegments,
2123
- createSegment: _createSegment,
2124
- createSegmentsBatch: _createSegmentsBatch,
2125
- createUserReport: _createUserReport,
2126
- getUserPreferences: _getUserPreferences,
2127
- updateUserPreferences: _updateUserPreferences,
2128
- trackUserActivity: _trackUserActivity,
2129
- deleteUserActivity: _deleteUserActivity,
2130
- deleteUserActivityByDate: _deleteUserActivityByDate,
2131
- deleteUserActivityById: _deleteUserActivityById,
2132
- exportUserData: _exportUserData,
2133
- listUserLabs: _listUserLabs,
2134
- enrollUserLab: _enrollUserLab,
2135
- unenrollUserLab: _unenrollUserLab,
2136
- updateCollection: _updateCollection,
2137
- updateCollectionSegment: _updateCollectionSegment,
2138
- getCollectionStats: _getCollectionStats,
2139
- listAdminReports: _listAdminReports,
2140
- batchUpdateAdminReports: _batchUpdateAdminReports,
2141
- bulkUpdateAdminReports: _bulkUpdateAdminReports,
2142
- bulkDeleteAdminReports: _bulkDeleteAdminReports,
2143
- updateAdminReport: _updateAdminReport,
2144
- deleteAdminReport: _deleteAdminReport,
2145
- listAdminMediaAudits: _listAdminMediaAudits,
2146
- updateAdminMediaAudit: _updateAdminMediaAudit,
2147
- runAdminMediaAudit: _runAdminMediaAudit,
2148
- listAdminMediaAuditRuns: _listAdminMediaAuditRuns,
2149
- getAdminMediaAuditRun: _getAdminMediaAuditRun,
2150
- getAnnouncement: _getAnnouncement,
2151
- updateAnnouncement: _updateAnnouncement
1395
+ removeSegmentFromCollection: _removeSegmentFromCollection
2152
1396
  };
2153
1397
  }
2154
- // generated/internal/internal/stats.gen.ts
2155
- var exports_stats_gen = {};
2156
- __export(exports_stats_gen, {
2157
- triggerCoveredWordsUpdate: () => triggerCoveredWordsUpdate,
2158
- getCoveredWords: () => getCoveredWords
2159
- });
2160
- // generated/internal/internal/media.gen.ts
2161
- var exports_media_gen = {};
2162
- __export(exports_media_gen, {
2163
- updateSegment: () => updateSegment,
2164
- updateMedia: () => updateMedia,
2165
- updateEpisode: () => updateEpisode,
2166
- listSegments: () => listSegments,
2167
- listSegmentRevisions: () => listSegmentRevisions,
2168
- deleteMedia: () => deleteMedia,
2169
- deleteEpisode: () => deleteEpisode,
2170
- createSegmentsBatch: () => createSegmentsBatch,
2171
- createSegment: () => createSegment,
2172
- createMedia: () => createMedia,
2173
- createEpisode: () => createEpisode
2174
- });
2175
- // generated/internal/internal/user.gen.ts
2176
- var exports_user_gen = {};
2177
- __export(exports_user_gen, {
2178
- updateUserPreferences: () => updateUserPreferences,
2179
- unenrollUserLab: () => unenrollUserLab,
2180
- trackUserActivity: () => trackUserActivity,
2181
- listUserLabs: () => listUserLabs,
2182
- getUserPreferences: () => getUserPreferences,
2183
- exportUserData: () => exportUserData,
2184
- enrollUserLab: () => enrollUserLab,
2185
- deleteUserActivityById: () => deleteUserActivityById,
2186
- deleteUserActivityByDate: () => deleteUserActivityByDate,
2187
- deleteUserActivity: () => deleteUserActivity,
2188
- createUserReport: () => createUserReport
2189
- });
2190
- // generated/internal/internal/collections.gen.ts
2191
- var exports_collections_gen = {};
2192
- __export(exports_collections_gen, {
2193
- updateCollectionSegment: () => updateCollectionSegment,
2194
- updateCollection: () => updateCollection,
2195
- getCollectionStats: () => getCollectionStats
2196
- });
2197
- // generated/internal/internal/admin.gen.ts
2198
- var exports_admin_gen = {};
2199
- __export(exports_admin_gen, {
2200
- updateAnnouncement: () => updateAnnouncement,
2201
- updateAdminReport: () => updateAdminReport,
2202
- updateAdminMediaAudit: () => updateAdminMediaAudit,
2203
- runAdminMediaAudit: () => runAdminMediaAudit,
2204
- listAdminReports: () => listAdminReports,
2205
- listAdminMediaAudits: () => listAdminMediaAudits,
2206
- listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
2207
- getAnnouncement: () => getAnnouncement,
2208
- getAdminMediaAuditRun: () => getAdminMediaAuditRun,
2209
- deleteAdminReport: () => deleteAdminReport,
2210
- bulkUpdateAdminReports: () => bulkUpdateAdminReports,
2211
- bulkDeleteAdminReports: () => bulkDeleteAdminReports,
2212
- batchUpdateAdminReports: () => batchUpdateAdminReports
2213
- });
2214
1398
 
2215
- //# debugId=BE8DCA78AE43E62F64756E2164756E21
1399
+ //# debugId=2AD1C0CC78360F0264756E2164756E21
2216
1400
  //# sourceMappingURL=index.js.map