@brigadasos/nadeshiko-sdk 2.2.0 → 2.2.1-internal.53bb652
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/client.gen.d.ts.map +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.d.ts.map +1 -1
- package/dist/client.gen.d.ts.map +1 -1
- package/dist/core/auth.gen.d.ts.map +1 -1
- package/dist/core/bodySerializer.gen.d.ts.map +1 -1
- package/dist/core/params.gen.d.ts.map +1 -1
- package/dist/core/pathSerializer.gen.d.ts.map +1 -1
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/core/types.gen.d.ts.map +1 -1
- package/dist/core/utils.gen.d.ts.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.cjs +840 -23
- package/dist/index.cjs.map +5 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +851 -19
- package/dist/index.js.map +5 -5
- package/dist/internal/admin.gen.d.ts +2 -0
- package/dist/internal/admin.gen.d.ts.map +1 -0
- package/dist/internal/collections.gen.d.ts +2 -0
- package/dist/internal/collections.gen.d.ts.map +1 -0
- package/dist/internal/media.gen.d.ts +2 -0
- package/dist/internal/media.gen.d.ts.map +1 -0
- package/dist/internal/stats.gen.d.ts +2 -0
- package/dist/internal/stats.gen.d.ts.map +1 -0
- package/dist/internal/user.gen.d.ts +2 -0
- package/dist/internal/user.gen.d.ts.map +1 -0
- package/dist/internal.gen.d.ts +6 -0
- package/dist/internal.gen.d.ts.map +1 -0
- package/dist/nadeshiko.gen.d.ts +592 -2
- package/dist/nadeshiko.gen.d.ts.map +1 -1
- package/dist/paginate.d.ts.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/sdk.gen.d.ts +41 -1
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/types.gen.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -36,22 +36,45 @@ var __export = (target, all) => {
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
// generated/
|
|
40
|
-
var
|
|
41
|
-
__export(
|
|
39
|
+
// generated/internal/index.ts
|
|
40
|
+
var exports_internal = {};
|
|
41
|
+
__export(exports_internal, {
|
|
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,
|
|
43
57
|
searchWords: () => searchWords,
|
|
44
58
|
searchMedia: () => searchMedia,
|
|
45
59
|
searchCollectionSegments: () => searchCollectionSegments,
|
|
46
60
|
search: () => search,
|
|
61
|
+
runAdminMediaAudit: () => runAdminMediaAudit,
|
|
47
62
|
removeSegmentFromCollection: () => removeSegmentFromCollection,
|
|
48
63
|
removeExcludedMedia: () => removeExcludedMedia,
|
|
49
64
|
paginate: () => paginate,
|
|
65
|
+
media: () => exports_media_gen,
|
|
66
|
+
listUserLabs: () => listUserLabs,
|
|
50
67
|
listUserActivity: () => listUserActivity,
|
|
68
|
+
listSegments: () => listSegments,
|
|
69
|
+
listSegmentRevisions: () => listSegmentRevisions,
|
|
51
70
|
listMedia: () => listMedia,
|
|
52
71
|
listExcludedMedia: () => listExcludedMedia,
|
|
53
72
|
listEpisodes: () => listEpisodes,
|
|
54
73
|
listCollections: () => listCollections,
|
|
74
|
+
listAdminReports: () => listAdminReports,
|
|
75
|
+
listAdminMediaAudits: () => listAdminMediaAudits,
|
|
76
|
+
listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
|
|
77
|
+
getUserPreferences: () => getUserPreferences,
|
|
55
78
|
getUserActivityStats: () => getUserActivityStats,
|
|
56
79
|
getUserActivityHeatmap: () => getUserActivityHeatmap,
|
|
57
80
|
getStatsOverview: () => getStatsOverview,
|
|
@@ -61,23 +84,45 @@ __export(exports_public, {
|
|
|
61
84
|
getMedia: () => getMedia,
|
|
62
85
|
getMe: () => getMe,
|
|
63
86
|
getEpisode: () => getEpisode,
|
|
87
|
+
getCoveredWords: () => getCoveredWords,
|
|
88
|
+
getCollectionStats: () => getCollectionStats,
|
|
64
89
|
getCollection: () => getCollection,
|
|
90
|
+
getAnnouncement: () => getAnnouncement,
|
|
91
|
+
getAdminMediaAuditRun: () => getAdminMediaAuditRun,
|
|
65
92
|
flatPaginate: () => flatPaginate,
|
|
93
|
+
exportUserData: () => exportUserData,
|
|
94
|
+
enrollUserLab: () => enrollUserLab,
|
|
95
|
+
deleteUserActivityById: () => deleteUserActivityById,
|
|
96
|
+
deleteUserActivityByDate: () => deleteUserActivityByDate,
|
|
97
|
+
deleteUserActivity: () => deleteUserActivity,
|
|
98
|
+
deleteMedia: () => deleteMedia,
|
|
99
|
+
deleteEpisode: () => deleteEpisode,
|
|
66
100
|
deleteCollection: () => deleteCollection,
|
|
101
|
+
deleteAdminReport: () => deleteAdminReport,
|
|
102
|
+
createUserReport: () => createUserReport,
|
|
103
|
+
createSegmentsBatch: () => createSegmentsBatch,
|
|
104
|
+
createSegment: () => createSegment,
|
|
67
105
|
createNadeshikoClient: () => createNadeshikoClient,
|
|
106
|
+
createMedia: () => createMedia,
|
|
107
|
+
createEpisode: () => createEpisode,
|
|
68
108
|
createCollection: () => createCollection,
|
|
109
|
+
collections: () => exports_collections_gen,
|
|
69
110
|
client: () => client,
|
|
111
|
+
bulkUpdateAdminReports: () => bulkUpdateAdminReports,
|
|
112
|
+
bulkDeleteAdminReports: () => bulkDeleteAdminReports,
|
|
113
|
+
batchUpdateAdminReports: () => batchUpdateAdminReports,
|
|
114
|
+
admin: () => exports_admin_gen,
|
|
70
115
|
addSegmentToCollection: () => addSegmentToCollection,
|
|
71
116
|
addExcludedMedia: () => addExcludedMedia,
|
|
72
117
|
NadeshikoError: () => NadeshikoError
|
|
73
118
|
});
|
|
74
|
-
module.exports = __toCommonJS(
|
|
119
|
+
module.exports = __toCommonJS(exports_internal);
|
|
75
120
|
|
|
76
|
-
// generated/
|
|
121
|
+
// generated/internal/core/bodySerializer.gen.ts
|
|
77
122
|
var jsonBodySerializer = {
|
|
78
123
|
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
79
124
|
};
|
|
80
|
-
// generated/
|
|
125
|
+
// generated/internal/core/params.gen.ts
|
|
81
126
|
var extraPrefixesMap = {
|
|
82
127
|
$body_: "body",
|
|
83
128
|
$headers_: "headers",
|
|
@@ -85,7 +130,7 @@ var extraPrefixesMap = {
|
|
|
85
130
|
$query_: "query"
|
|
86
131
|
};
|
|
87
132
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
88
|
-
// generated/
|
|
133
|
+
// generated/internal/core/serverSentEvents.gen.ts
|
|
89
134
|
var createSseClient = ({
|
|
90
135
|
onRequest,
|
|
91
136
|
onSseError,
|
|
@@ -221,7 +266,7 @@ var createSseClient = ({
|
|
|
221
266
|
return { stream };
|
|
222
267
|
};
|
|
223
268
|
|
|
224
|
-
// generated/
|
|
269
|
+
// generated/internal/core/pathSerializer.gen.ts
|
|
225
270
|
var separatorArrayExplode = (style) => {
|
|
226
271
|
switch (style) {
|
|
227
272
|
case "label":
|
|
@@ -345,7 +390,7 @@ var serializeObjectParam = ({
|
|
|
345
390
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
346
391
|
};
|
|
347
392
|
|
|
348
|
-
// generated/
|
|
393
|
+
// generated/internal/core/utils.gen.ts
|
|
349
394
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
350
395
|
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
351
396
|
let url = _url;
|
|
@@ -434,7 +479,7 @@ function getValidRequestBody(options) {
|
|
|
434
479
|
return;
|
|
435
480
|
}
|
|
436
481
|
|
|
437
|
-
// generated/
|
|
482
|
+
// generated/internal/core/auth.gen.ts
|
|
438
483
|
var getAuthToken = async (auth, callback) => {
|
|
439
484
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
440
485
|
if (!token) {
|
|
@@ -449,7 +494,7 @@ var getAuthToken = async (auth, callback) => {
|
|
|
449
494
|
return token;
|
|
450
495
|
};
|
|
451
496
|
|
|
452
|
-
// generated/
|
|
497
|
+
// generated/internal/client/utils.gen.ts
|
|
453
498
|
var createQuerySerializer = ({
|
|
454
499
|
parameters = {},
|
|
455
500
|
...args
|
|
@@ -666,7 +711,7 @@ var createConfig = (override = {}) => ({
|
|
|
666
711
|
...override
|
|
667
712
|
});
|
|
668
713
|
|
|
669
|
-
// generated/
|
|
714
|
+
// generated/internal/client/client.gen.ts
|
|
670
715
|
var createClient = (config = {}) => {
|
|
671
716
|
let _config = mergeConfigs(createConfig(), config);
|
|
672
717
|
const getConfig = () => ({ ..._config });
|
|
@@ -872,10 +917,10 @@ var createClient = (config = {}) => {
|
|
|
872
917
|
trace: makeMethodFn("TRACE")
|
|
873
918
|
};
|
|
874
919
|
};
|
|
875
|
-
// generated/
|
|
920
|
+
// generated/internal/client.gen.ts
|
|
876
921
|
var client = createClient(createConfig({ baseUrl: "https://api.nadeshiko.co" }));
|
|
877
922
|
|
|
878
|
-
// generated/
|
|
923
|
+
// generated/internal/sdk.gen.ts
|
|
879
924
|
var search = (options) => (options.client ?? client).post({
|
|
880
925
|
security: [{ scheme: "bearer", type: "http" }],
|
|
881
926
|
url: "/v1/search",
|
|
@@ -917,36 +962,137 @@ var getStatsOverview = (options) => (options?.client ?? client).get({
|
|
|
917
962
|
url: "/v1/stats/overview",
|
|
918
963
|
...options
|
|
919
964
|
});
|
|
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
|
+
});
|
|
920
983
|
var listMedia = (options) => (options?.client ?? client).get({
|
|
921
984
|
security: [{ scheme: "bearer", type: "http" }],
|
|
922
985
|
url: "/v1/media",
|
|
923
986
|
...options
|
|
924
987
|
});
|
|
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
|
+
});
|
|
925
997
|
var getSegment = (options) => (options.client ?? client).get({
|
|
926
998
|
security: [{ scheme: "bearer", type: "http" }],
|
|
927
999
|
url: "/v1/media/segments/{segmentPublicId}",
|
|
928
1000
|
...options
|
|
929
1001
|
});
|
|
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
|
+
});
|
|
930
1011
|
var getSegmentContext = (options) => (options.client ?? client).get({
|
|
931
1012
|
security: [{ scheme: "bearer", type: "http" }],
|
|
932
1013
|
url: "/v1/media/segments/{segmentPublicId}/context",
|
|
933
1014
|
...options
|
|
934
1015
|
});
|
|
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
|
+
});
|
|
935
1026
|
var getMedia = (options) => (options.client ?? client).get({
|
|
936
1027
|
security: [{ scheme: "bearer", type: "http" }],
|
|
937
1028
|
url: "/v1/media/{mediaPublicId}",
|
|
938
1029
|
...options
|
|
939
1030
|
});
|
|
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
|
+
});
|
|
940
1040
|
var listEpisodes = (options) => (options.client ?? client).get({
|
|
941
1041
|
security: [{ scheme: "bearer", type: "http" }],
|
|
942
1042
|
url: "/v1/media/{mediaPublicId}/episodes",
|
|
943
1043
|
...options
|
|
944
1044
|
});
|
|
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
|
+
});
|
|
945
1059
|
var getEpisode = (options) => (options.client ?? client).get({
|
|
946
1060
|
security: [{ scheme: "bearer", type: "http" }],
|
|
947
1061
|
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
|
|
948
1062
|
...options
|
|
949
1063
|
});
|
|
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
|
+
});
|
|
950
1096
|
var getMe = (options) => (options?.client ?? client).get({
|
|
951
1097
|
security: [{ scheme: "bearer", type: "http" }],
|
|
952
1098
|
url: "/v1/user/me",
|
|
@@ -971,11 +1117,68 @@ var removeExcludedMedia = (options) => (options.client ?? client).delete({
|
|
|
971
1117
|
url: "/v1/user/excluded-media/{mediaPublicId}",
|
|
972
1118
|
...options
|
|
973
1119
|
});
|
|
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
|
+
});
|
|
974
1164
|
var listUserActivity = (options) => (options?.client ?? client).get({
|
|
975
1165
|
security: [{ scheme: "bearer", type: "http" }],
|
|
976
1166
|
url: "/v1/user/activity",
|
|
977
1167
|
...options
|
|
978
1168
|
});
|
|
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
|
+
});
|
|
979
1182
|
var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
|
|
980
1183
|
security: [{ scheme: "bearer", type: "http" }],
|
|
981
1184
|
url: "/v1/user/activity/heatmap",
|
|
@@ -986,6 +1189,60 @@ var getUserActivityStats = (options) => (options?.client ?? client).get({
|
|
|
986
1189
|
url: "/v1/user/activity/stats",
|
|
987
1190
|
...options
|
|
988
1191
|
});
|
|
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
|
+
});
|
|
989
1246
|
var listCollections = (options) => (options?.client ?? client).get({
|
|
990
1247
|
security: [{ scheme: "bearer", type: "http" }],
|
|
991
1248
|
url: "/v1/collections",
|
|
@@ -1010,6 +1267,19 @@ var getCollection = (options) => (options.client ?? client).get({
|
|
|
1010
1267
|
url: "/v1/collections/{collectionPublicId}",
|
|
1011
1268
|
...options
|
|
1012
1269
|
});
|
|
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
|
+
});
|
|
1013
1283
|
var addSegmentToCollection = (options) => (options.client ?? client).post({
|
|
1014
1284
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1015
1285
|
url: "/v1/collections/{collectionPublicId}/segments",
|
|
@@ -1033,7 +1303,162 @@ var removeSegmentFromCollection = (options) => (options.client ?? client).delete
|
|
|
1033
1303
|
url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
|
|
1034
1304
|
...options
|
|
1035
1305
|
});
|
|
1036
|
-
|
|
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
|
|
1037
1462
|
var RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
|
|
1038
1463
|
function parseRetryAfter(value) {
|
|
1039
1464
|
const seconds = Number(value);
|
|
@@ -1088,7 +1513,7 @@ function withRetry(fetchImpl = globalThis.fetch, options = {}) {
|
|
|
1088
1513
|
};
|
|
1089
1514
|
}
|
|
1090
1515
|
|
|
1091
|
-
// generated/
|
|
1516
|
+
// generated/internal/errors.ts
|
|
1092
1517
|
class NadeshikoError extends Error {
|
|
1093
1518
|
code;
|
|
1094
1519
|
title;
|
|
@@ -1110,7 +1535,7 @@ class NadeshikoError extends Error {
|
|
|
1110
1535
|
}
|
|
1111
1536
|
}
|
|
1112
1537
|
|
|
1113
|
-
// generated/
|
|
1538
|
+
// generated/internal/paginate.ts
|
|
1114
1539
|
async function* paginate(fn, options, extract) {
|
|
1115
1540
|
let cursor = null;
|
|
1116
1541
|
let first = true;
|
|
@@ -1159,21 +1584,40 @@ async function* flatPaginate(params, fn, extract) {
|
|
|
1159
1584
|
}
|
|
1160
1585
|
}
|
|
1161
1586
|
|
|
1162
|
-
// generated/
|
|
1587
|
+
// generated/internal/nadeshiko.gen.ts
|
|
1163
1588
|
var environments = {
|
|
1164
1589
|
LOCAL: "http://localhost:5000/api",
|
|
1165
1590
|
DEVELOPMENT: "https://api-stg.nadeshiko.co",
|
|
1166
1591
|
STAGING: "https://api-stg.nadeshiko.co",
|
|
1167
|
-
PRODUCTION: "https://api.nadeshiko.co"
|
|
1592
|
+
PRODUCTION: "https://api.nadeshiko.co",
|
|
1593
|
+
PROXY: ""
|
|
1594
|
+
};
|
|
1595
|
+
var defaultSessionTokenGetter = () => {
|
|
1596
|
+
if (typeof document === "undefined")
|
|
1597
|
+
return;
|
|
1598
|
+
const match = document.cookie.match(/(?:^|;\s*)nadeshiko\.session_token=([^;]*)/);
|
|
1599
|
+
return match ? decodeURIComponent(match[1]) : undefined;
|
|
1168
1600
|
};
|
|
1169
1601
|
function createNadeshikoClient(config) {
|
|
1170
1602
|
const rawBaseUrl = config.baseURL ?? config.baseUrl;
|
|
1171
1603
|
const baseUrl = rawBaseUrl === undefined ? environments.PRODUCTION : (rawBaseUrl in environments) ? environments[rawBaseUrl] : rawBaseUrl;
|
|
1604
|
+
const getApiKey = async () => {
|
|
1605
|
+
if (typeof config.apiKey === "function") {
|
|
1606
|
+
return await config.apiKey();
|
|
1607
|
+
}
|
|
1608
|
+
return config.apiKey;
|
|
1609
|
+
};
|
|
1610
|
+
const getSessionToken = config.sessionToken ?? defaultSessionTokenGetter;
|
|
1172
1611
|
const clientInstance = createClient(createConfig({
|
|
1173
1612
|
baseUrl,
|
|
1174
|
-
headers: { "User-Agent": "nadeshiko-sdk-ts/2.
|
|
1613
|
+
headers: { "User-Agent": "nadeshiko-sdk-ts/2.2.0", ...config.headers },
|
|
1175
1614
|
fetch: withRetry(globalThis.fetch, config.retryOptions),
|
|
1176
|
-
auth: () =>
|
|
1615
|
+
auth: (auth) => {
|
|
1616
|
+
if (auth.in === "cookie") {
|
|
1617
|
+
return getSessionToken();
|
|
1618
|
+
}
|
|
1619
|
+
return getApiKey();
|
|
1620
|
+
}
|
|
1177
1621
|
}));
|
|
1178
1622
|
clientInstance.interceptors.error.use((error) => {
|
|
1179
1623
|
if (error && typeof error === "object" && "code" in error && typeof error.code === "string") {
|
|
@@ -1366,6 +1810,279 @@ function createNadeshikoClient(config) {
|
|
|
1366
1810
|
const p = removeSegmentFromCollection({ path: { collectionPublicId, segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1367
1811
|
return tOE === false ? p : p.then((r) => r.data);
|
|
1368
1812
|
};
|
|
1813
|
+
const _getCoveredWords = (params) => {
|
|
1814
|
+
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1815
|
+
const p = getCoveredWords({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1816
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1817
|
+
};
|
|
1818
|
+
_getCoveredWords.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1819
|
+
return getCoveredWords({ query: flat, client: clientInstance });
|
|
1820
|
+
}, (data) => ({ items: data.words, pagination: data.pagination }));
|
|
1821
|
+
const _triggerCoveredWordsUpdate = (params) => {
|
|
1822
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1823
|
+
const p = triggerCoveredWordsUpdate({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1824
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1825
|
+
};
|
|
1826
|
+
const _createMedia = (params) => {
|
|
1827
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1828
|
+
const p = createMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1829
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1830
|
+
};
|
|
1831
|
+
const _updateSegment = (paramsOrId) => {
|
|
1832
|
+
if (typeof paramsOrId === "string") {
|
|
1833
|
+
return updateSegment({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1834
|
+
}
|
|
1835
|
+
const params = paramsOrId;
|
|
1836
|
+
const { throwOnError: tOE, segmentPublicId, ...body } = params ?? {};
|
|
1837
|
+
const p = updateSegment({ path: { segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1838
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1839
|
+
};
|
|
1840
|
+
const _listSegmentRevisions = (paramsOrId) => {
|
|
1841
|
+
if (typeof paramsOrId === "string") {
|
|
1842
|
+
return listSegmentRevisions({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1843
|
+
}
|
|
1844
|
+
const params = paramsOrId;
|
|
1845
|
+
const { throwOnError: tOE, segmentPublicId } = params ?? {};
|
|
1846
|
+
const p = listSegmentRevisions({ path: { segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1847
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1848
|
+
};
|
|
1849
|
+
const _updateMedia = (paramsOrId) => {
|
|
1850
|
+
if (typeof paramsOrId === "string") {
|
|
1851
|
+
return updateMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1852
|
+
}
|
|
1853
|
+
const params = paramsOrId;
|
|
1854
|
+
const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
|
|
1855
|
+
const p = updateMedia({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1856
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1857
|
+
};
|
|
1858
|
+
const _deleteMedia = (paramsOrId) => {
|
|
1859
|
+
if (typeof paramsOrId === "string") {
|
|
1860
|
+
return deleteMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1861
|
+
}
|
|
1862
|
+
const params = paramsOrId;
|
|
1863
|
+
const { throwOnError: tOE, mediaPublicId } = params ?? {};
|
|
1864
|
+
const p = deleteMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1865
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1866
|
+
};
|
|
1867
|
+
const _createEpisode = (params) => {
|
|
1868
|
+
const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
|
|
1869
|
+
const p = createEpisode({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1870
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1871
|
+
};
|
|
1872
|
+
const _updateEpisode = (params) => {
|
|
1873
|
+
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1874
|
+
const p = updateEpisode({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1875
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1876
|
+
};
|
|
1877
|
+
const _deleteEpisode = (params) => {
|
|
1878
|
+
const { throwOnError: tOE, mediaPublicId, episodeNumber } = params ?? {};
|
|
1879
|
+
const p = deleteEpisode({ path: { mediaPublicId, episodeNumber }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1880
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1881
|
+
};
|
|
1882
|
+
const _listSegments = (params) => {
|
|
1883
|
+
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...query } = params ?? {};
|
|
1884
|
+
const p = listSegments({ path: { mediaPublicId, episodeNumber }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1885
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1886
|
+
};
|
|
1887
|
+
_listSegments.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1888
|
+
const { mediaPublicId, episodeNumber, ...q } = flat;
|
|
1889
|
+
return listSegments({ path: { mediaPublicId, episodeNumber }, query: q, client: clientInstance });
|
|
1890
|
+
}, (data) => ({ items: data.segments, pagination: data.pagination }));
|
|
1891
|
+
const _createSegment = (params) => {
|
|
1892
|
+
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1893
|
+
const p = createSegment({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1894
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1895
|
+
};
|
|
1896
|
+
const _createSegmentsBatch = (params) => {
|
|
1897
|
+
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1898
|
+
const p = createSegmentsBatch({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1899
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1900
|
+
};
|
|
1901
|
+
const _createUserReport = (params) => {
|
|
1902
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1903
|
+
const p = createUserReport({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1904
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1905
|
+
};
|
|
1906
|
+
const _getUserPreferences = (params) => {
|
|
1907
|
+
const tOE = params?.throwOnError;
|
|
1908
|
+
const p = getUserPreferences({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1909
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1910
|
+
};
|
|
1911
|
+
const _updateUserPreferences = (params) => {
|
|
1912
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1913
|
+
const p = updateUserPreferences({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1914
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1915
|
+
};
|
|
1916
|
+
const _trackUserActivity = (params) => {
|
|
1917
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1918
|
+
const p = trackUserActivity({ ...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 _deleteUserActivity = (params) => {
|
|
1922
|
+
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1923
|
+
const p = deleteUserActivity({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1924
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1925
|
+
};
|
|
1926
|
+
const _deleteUserActivityByDate = (paramsOrId) => {
|
|
1927
|
+
if (typeof paramsOrId === "string") {
|
|
1928
|
+
return deleteUserActivityByDate({ throwOnError: true, path: { date: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1929
|
+
}
|
|
1930
|
+
const params = paramsOrId;
|
|
1931
|
+
const { throwOnError: tOE, date } = params ?? {};
|
|
1932
|
+
const p = deleteUserActivityByDate({ path: { date }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1933
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1934
|
+
};
|
|
1935
|
+
const _deleteUserActivityById = (paramsOrId) => {
|
|
1936
|
+
if (typeof paramsOrId === "number") {
|
|
1937
|
+
return deleteUserActivityById({ throwOnError: true, path: { activityId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1938
|
+
}
|
|
1939
|
+
const params = paramsOrId;
|
|
1940
|
+
const { throwOnError: tOE, activityId } = params ?? {};
|
|
1941
|
+
const p = deleteUserActivityById({ path: { activityId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1942
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1943
|
+
};
|
|
1944
|
+
const _exportUserData = (params) => {
|
|
1945
|
+
const tOE = params?.throwOnError;
|
|
1946
|
+
const p = exportUserData({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1947
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1948
|
+
};
|
|
1949
|
+
const _listUserLabs = (params) => {
|
|
1950
|
+
const tOE = params?.throwOnError;
|
|
1951
|
+
const p = listUserLabs({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1952
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1953
|
+
};
|
|
1954
|
+
const _enrollUserLab = (paramsOrId) => {
|
|
1955
|
+
if (typeof paramsOrId === "string") {
|
|
1956
|
+
return enrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1957
|
+
}
|
|
1958
|
+
const params = paramsOrId;
|
|
1959
|
+
const { throwOnError: tOE, key } = params ?? {};
|
|
1960
|
+
const p = enrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1961
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1962
|
+
};
|
|
1963
|
+
const _unenrollUserLab = (paramsOrId) => {
|
|
1964
|
+
if (typeof paramsOrId === "string") {
|
|
1965
|
+
return unenrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1966
|
+
}
|
|
1967
|
+
const params = paramsOrId;
|
|
1968
|
+
const { throwOnError: tOE, key } = params ?? {};
|
|
1969
|
+
const p = unenrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1970
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1971
|
+
};
|
|
1972
|
+
const _updateCollection = (paramsOrId) => {
|
|
1973
|
+
if (typeof paramsOrId === "string") {
|
|
1974
|
+
return updateCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1975
|
+
}
|
|
1976
|
+
const params = paramsOrId;
|
|
1977
|
+
const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
|
|
1978
|
+
const p = updateCollection({ path: { collectionPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1979
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1980
|
+
};
|
|
1981
|
+
const _updateCollectionSegment = (params) => {
|
|
1982
|
+
const { throwOnError: tOE, collectionPublicId, segmentPublicId, ...body } = params ?? {};
|
|
1983
|
+
const p = updateCollectionSegment({ path: { collectionPublicId, segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1984
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1985
|
+
};
|
|
1986
|
+
const _getCollectionStats = (paramsOrId) => {
|
|
1987
|
+
if (typeof paramsOrId === "string") {
|
|
1988
|
+
return getCollectionStats({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1989
|
+
}
|
|
1990
|
+
const params = paramsOrId;
|
|
1991
|
+
const { throwOnError: tOE, collectionPublicId } = params ?? {};
|
|
1992
|
+
const p = getCollectionStats({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1993
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1994
|
+
};
|
|
1995
|
+
const _listAdminReports = (params) => {
|
|
1996
|
+
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1997
|
+
const p = listAdminReports({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1998
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
1999
|
+
};
|
|
2000
|
+
_listAdminReports.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
2001
|
+
return listAdminReports({ query: flat, client: clientInstance });
|
|
2002
|
+
}, (data) => ({ items: data.groups, pagination: data.pagination }));
|
|
2003
|
+
const _batchUpdateAdminReports = (params) => {
|
|
2004
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
2005
|
+
const p = batchUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2006
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2007
|
+
};
|
|
2008
|
+
const _bulkUpdateAdminReports = (params) => {
|
|
2009
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
2010
|
+
const p = bulkUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2011
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2012
|
+
};
|
|
2013
|
+
const _bulkDeleteAdminReports = (params) => {
|
|
2014
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
2015
|
+
const p = bulkDeleteAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2016
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2017
|
+
};
|
|
2018
|
+
const _updateAdminReport = (paramsOrId) => {
|
|
2019
|
+
if (typeof paramsOrId === "number") {
|
|
2020
|
+
return updateAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
2021
|
+
}
|
|
2022
|
+
const params = paramsOrId;
|
|
2023
|
+
const { throwOnError: tOE, reportId, ...body } = params ?? {};
|
|
2024
|
+
const p = updateAdminReport({ path: { reportId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2025
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2026
|
+
};
|
|
2027
|
+
const _deleteAdminReport = (paramsOrId) => {
|
|
2028
|
+
if (typeof paramsOrId === "number") {
|
|
2029
|
+
return deleteAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
2030
|
+
}
|
|
2031
|
+
const params = paramsOrId;
|
|
2032
|
+
const { throwOnError: tOE, reportId } = params ?? {};
|
|
2033
|
+
const p = deleteAdminReport({ path: { reportId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2034
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2035
|
+
};
|
|
2036
|
+
const _listAdminMediaAudits = (params) => {
|
|
2037
|
+
const tOE = params?.throwOnError;
|
|
2038
|
+
const p = listAdminMediaAudits({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2039
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2040
|
+
};
|
|
2041
|
+
const _updateAdminMediaAudit = (paramsOrId) => {
|
|
2042
|
+
if (typeof paramsOrId === "string") {
|
|
2043
|
+
return updateAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
2044
|
+
}
|
|
2045
|
+
const params = paramsOrId;
|
|
2046
|
+
const { throwOnError: tOE, name, ...body } = params ?? {};
|
|
2047
|
+
const p = updateAdminMediaAudit({ path: { name }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2048
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2049
|
+
};
|
|
2050
|
+
const _runAdminMediaAudit = (paramsOrId) => {
|
|
2051
|
+
if (typeof paramsOrId === "string") {
|
|
2052
|
+
return runAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
2053
|
+
}
|
|
2054
|
+
const params = paramsOrId;
|
|
2055
|
+
const { throwOnError: tOE, name, ...query } = params ?? {};
|
|
2056
|
+
const p = runAdminMediaAudit({ path: { name }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2057
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2058
|
+
};
|
|
2059
|
+
const _listAdminMediaAuditRuns = (params) => {
|
|
2060
|
+
const { throwOnError: tOE, ...query } = params ?? {};
|
|
2061
|
+
const p = listAdminMediaAuditRuns({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2062
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2063
|
+
};
|
|
2064
|
+
_listAdminMediaAuditRuns.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
2065
|
+
return listAdminMediaAuditRuns({ query: flat, client: clientInstance });
|
|
2066
|
+
}, (data) => ({ items: data.runs, pagination: data.pagination }));
|
|
2067
|
+
const _getAdminMediaAuditRun = (paramsOrId) => {
|
|
2068
|
+
if (typeof paramsOrId === "number") {
|
|
2069
|
+
return getAdminMediaAuditRun({ throwOnError: true, path: { auditRunId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
2070
|
+
}
|
|
2071
|
+
const params = paramsOrId;
|
|
2072
|
+
const { throwOnError: tOE, auditRunId } = params ?? {};
|
|
2073
|
+
const p = getAdminMediaAuditRun({ path: { auditRunId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2074
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2075
|
+
};
|
|
2076
|
+
const _getAnnouncement = (params) => {
|
|
2077
|
+
const tOE = params?.throwOnError;
|
|
2078
|
+
const p = getAnnouncement({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2079
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2080
|
+
};
|
|
2081
|
+
const _updateAnnouncement = (params) => {
|
|
2082
|
+
const { throwOnError: tOE, ...body } = params ?? {};
|
|
2083
|
+
const p = updateAnnouncement({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
2084
|
+
return tOE === false ? p : p.then((r) => r.data);
|
|
2085
|
+
};
|
|
1369
2086
|
return {
|
|
1370
2087
|
client: clientInstance,
|
|
1371
2088
|
search: _search,
|
|
@@ -1392,9 +2109,109 @@ function createNadeshikoClient(config) {
|
|
|
1392
2109
|
deleteCollection: _deleteCollection,
|
|
1393
2110
|
addSegmentToCollection: _addSegmentToCollection,
|
|
1394
2111
|
searchCollectionSegments: _searchCollectionSegments,
|
|
1395
|
-
removeSegmentFromCollection: _removeSegmentFromCollection
|
|
2112
|
+
removeSegmentFromCollection: _removeSegmentFromCollection,
|
|
2113
|
+
getCoveredWords: _getCoveredWords,
|
|
2114
|
+
triggerCoveredWordsUpdate: _triggerCoveredWordsUpdate,
|
|
2115
|
+
createMedia: _createMedia,
|
|
2116
|
+
updateSegment: _updateSegment,
|
|
2117
|
+
listSegmentRevisions: _listSegmentRevisions,
|
|
2118
|
+
updateMedia: _updateMedia,
|
|
2119
|
+
deleteMedia: _deleteMedia,
|
|
2120
|
+
createEpisode: _createEpisode,
|
|
2121
|
+
updateEpisode: _updateEpisode,
|
|
2122
|
+
deleteEpisode: _deleteEpisode,
|
|
2123
|
+
listSegments: _listSegments,
|
|
2124
|
+
createSegment: _createSegment,
|
|
2125
|
+
createSegmentsBatch: _createSegmentsBatch,
|
|
2126
|
+
createUserReport: _createUserReport,
|
|
2127
|
+
getUserPreferences: _getUserPreferences,
|
|
2128
|
+
updateUserPreferences: _updateUserPreferences,
|
|
2129
|
+
trackUserActivity: _trackUserActivity,
|
|
2130
|
+
deleteUserActivity: _deleteUserActivity,
|
|
2131
|
+
deleteUserActivityByDate: _deleteUserActivityByDate,
|
|
2132
|
+
deleteUserActivityById: _deleteUserActivityById,
|
|
2133
|
+
exportUserData: _exportUserData,
|
|
2134
|
+
listUserLabs: _listUserLabs,
|
|
2135
|
+
enrollUserLab: _enrollUserLab,
|
|
2136
|
+
unenrollUserLab: _unenrollUserLab,
|
|
2137
|
+
updateCollection: _updateCollection,
|
|
2138
|
+
updateCollectionSegment: _updateCollectionSegment,
|
|
2139
|
+
getCollectionStats: _getCollectionStats,
|
|
2140
|
+
listAdminReports: _listAdminReports,
|
|
2141
|
+
batchUpdateAdminReports: _batchUpdateAdminReports,
|
|
2142
|
+
bulkUpdateAdminReports: _bulkUpdateAdminReports,
|
|
2143
|
+
bulkDeleteAdminReports: _bulkDeleteAdminReports,
|
|
2144
|
+
updateAdminReport: _updateAdminReport,
|
|
2145
|
+
deleteAdminReport: _deleteAdminReport,
|
|
2146
|
+
listAdminMediaAudits: _listAdminMediaAudits,
|
|
2147
|
+
updateAdminMediaAudit: _updateAdminMediaAudit,
|
|
2148
|
+
runAdminMediaAudit: _runAdminMediaAudit,
|
|
2149
|
+
listAdminMediaAuditRuns: _listAdminMediaAuditRuns,
|
|
2150
|
+
getAdminMediaAuditRun: _getAdminMediaAuditRun,
|
|
2151
|
+
getAnnouncement: _getAnnouncement,
|
|
2152
|
+
updateAnnouncement: _updateAnnouncement
|
|
1396
2153
|
};
|
|
1397
2154
|
}
|
|
2155
|
+
// generated/internal/internal/stats.gen.ts
|
|
2156
|
+
var exports_stats_gen = {};
|
|
2157
|
+
__export(exports_stats_gen, {
|
|
2158
|
+
triggerCoveredWordsUpdate: () => triggerCoveredWordsUpdate,
|
|
2159
|
+
getCoveredWords: () => getCoveredWords
|
|
2160
|
+
});
|
|
2161
|
+
// generated/internal/internal/media.gen.ts
|
|
2162
|
+
var exports_media_gen = {};
|
|
2163
|
+
__export(exports_media_gen, {
|
|
2164
|
+
updateSegment: () => updateSegment,
|
|
2165
|
+
updateMedia: () => updateMedia,
|
|
2166
|
+
updateEpisode: () => updateEpisode,
|
|
2167
|
+
listSegments: () => listSegments,
|
|
2168
|
+
listSegmentRevisions: () => listSegmentRevisions,
|
|
2169
|
+
deleteMedia: () => deleteMedia,
|
|
2170
|
+
deleteEpisode: () => deleteEpisode,
|
|
2171
|
+
createSegmentsBatch: () => createSegmentsBatch,
|
|
2172
|
+
createSegment: () => createSegment,
|
|
2173
|
+
createMedia: () => createMedia,
|
|
2174
|
+
createEpisode: () => createEpisode
|
|
2175
|
+
});
|
|
2176
|
+
// generated/internal/internal/user.gen.ts
|
|
2177
|
+
var exports_user_gen = {};
|
|
2178
|
+
__export(exports_user_gen, {
|
|
2179
|
+
updateUserPreferences: () => updateUserPreferences,
|
|
2180
|
+
unenrollUserLab: () => unenrollUserLab,
|
|
2181
|
+
trackUserActivity: () => trackUserActivity,
|
|
2182
|
+
listUserLabs: () => listUserLabs,
|
|
2183
|
+
getUserPreferences: () => getUserPreferences,
|
|
2184
|
+
exportUserData: () => exportUserData,
|
|
2185
|
+
enrollUserLab: () => enrollUserLab,
|
|
2186
|
+
deleteUserActivityById: () => deleteUserActivityById,
|
|
2187
|
+
deleteUserActivityByDate: () => deleteUserActivityByDate,
|
|
2188
|
+
deleteUserActivity: () => deleteUserActivity,
|
|
2189
|
+
createUserReport: () => createUserReport
|
|
2190
|
+
});
|
|
2191
|
+
// generated/internal/internal/collections.gen.ts
|
|
2192
|
+
var exports_collections_gen = {};
|
|
2193
|
+
__export(exports_collections_gen, {
|
|
2194
|
+
updateCollectionSegment: () => updateCollectionSegment,
|
|
2195
|
+
updateCollection: () => updateCollection,
|
|
2196
|
+
getCollectionStats: () => getCollectionStats
|
|
2197
|
+
});
|
|
2198
|
+
// generated/internal/internal/admin.gen.ts
|
|
2199
|
+
var exports_admin_gen = {};
|
|
2200
|
+
__export(exports_admin_gen, {
|
|
2201
|
+
updateAnnouncement: () => updateAnnouncement,
|
|
2202
|
+
updateAdminReport: () => updateAdminReport,
|
|
2203
|
+
updateAdminMediaAudit: () => updateAdminMediaAudit,
|
|
2204
|
+
runAdminMediaAudit: () => runAdminMediaAudit,
|
|
2205
|
+
listAdminReports: () => listAdminReports,
|
|
2206
|
+
listAdminMediaAudits: () => listAdminMediaAudits,
|
|
2207
|
+
listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
|
|
2208
|
+
getAnnouncement: () => getAnnouncement,
|
|
2209
|
+
getAdminMediaAuditRun: () => getAdminMediaAuditRun,
|
|
2210
|
+
deleteAdminReport: () => deleteAdminReport,
|
|
2211
|
+
bulkUpdateAdminReports: () => bulkUpdateAdminReports,
|
|
2212
|
+
bulkDeleteAdminReports: () => bulkDeleteAdminReports,
|
|
2213
|
+
batchUpdateAdminReports: () => batchUpdateAdminReports
|
|
2214
|
+
});
|
|
1398
2215
|
|
|
1399
|
-
//# debugId=
|
|
2216
|
+
//# debugId=AE1B81017D3E1A9B64756E2164756E21
|
|
1400
2217
|
//# sourceMappingURL=index.js.map
|