@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.
- 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 +24 -840
- 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 +20 -851
- package/dist/index.js.map +5 -5
- package/dist/nadeshiko.gen.d.ts +5 -595
- 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 +1 -41
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/types.gen.d.ts.map +1 -1
- package/package.json +3 -4
- package/dist/internal/admin.gen.d.ts +0 -2
- package/dist/internal/admin.gen.d.ts.map +0 -1
- package/dist/internal/collections.gen.d.ts +0 -2
- package/dist/internal/collections.gen.d.ts.map +0 -1
- package/dist/internal/media.gen.d.ts +0 -2
- package/dist/internal/media.gen.d.ts.map +0 -1
- package/dist/internal/stats.gen.d.ts +0 -2
- package/dist/internal/stats.gen.d.ts.map +0 -1
- package/dist/internal/user.gen.d.ts +0 -2
- package/dist/internal/user.gen.d.ts.map +0 -1
- package/dist/internal.gen.d.ts +0 -6
- package/dist/internal.gen.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var __returnValue = (v) => v;
|
|
3
|
-
function __exportSetter(name, newValue) {
|
|
4
|
-
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
-
}
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
set: __exportSetter.bind(all, name)
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// generated/internal/core/bodySerializer.gen.ts
|
|
1
|
+
// generated/public/core/bodySerializer.gen.ts
|
|
17
2
|
var jsonBodySerializer = {
|
|
18
3
|
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
19
4
|
};
|
|
20
|
-
// generated/
|
|
5
|
+
// generated/public/core/params.gen.ts
|
|
21
6
|
var extraPrefixesMap = {
|
|
22
7
|
$body_: "body",
|
|
23
8
|
$headers_: "headers",
|
|
@@ -25,7 +10,7 @@ var extraPrefixesMap = {
|
|
|
25
10
|
$query_: "query"
|
|
26
11
|
};
|
|
27
12
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
28
|
-
// generated/
|
|
13
|
+
// generated/public/core/serverSentEvents.gen.ts
|
|
29
14
|
var createSseClient = ({
|
|
30
15
|
onRequest,
|
|
31
16
|
onSseError,
|
|
@@ -161,7 +146,7 @@ var createSseClient = ({
|
|
|
161
146
|
return { stream };
|
|
162
147
|
};
|
|
163
148
|
|
|
164
|
-
// generated/
|
|
149
|
+
// generated/public/core/pathSerializer.gen.ts
|
|
165
150
|
var separatorArrayExplode = (style) => {
|
|
166
151
|
switch (style) {
|
|
167
152
|
case "label":
|
|
@@ -285,7 +270,7 @@ var serializeObjectParam = ({
|
|
|
285
270
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
286
271
|
};
|
|
287
272
|
|
|
288
|
-
// generated/
|
|
273
|
+
// generated/public/core/utils.gen.ts
|
|
289
274
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
290
275
|
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
291
276
|
let url = _url;
|
|
@@ -374,7 +359,7 @@ function getValidRequestBody(options) {
|
|
|
374
359
|
return;
|
|
375
360
|
}
|
|
376
361
|
|
|
377
|
-
// generated/
|
|
362
|
+
// generated/public/core/auth.gen.ts
|
|
378
363
|
var getAuthToken = async (auth, callback) => {
|
|
379
364
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
380
365
|
if (!token) {
|
|
@@ -389,7 +374,7 @@ var getAuthToken = async (auth, callback) => {
|
|
|
389
374
|
return token;
|
|
390
375
|
};
|
|
391
376
|
|
|
392
|
-
// generated/
|
|
377
|
+
// generated/public/client/utils.gen.ts
|
|
393
378
|
var createQuerySerializer = ({
|
|
394
379
|
parameters = {},
|
|
395
380
|
...args
|
|
@@ -606,7 +591,7 @@ var createConfig = (override = {}) => ({
|
|
|
606
591
|
...override
|
|
607
592
|
});
|
|
608
593
|
|
|
609
|
-
// generated/
|
|
594
|
+
// generated/public/client/client.gen.ts
|
|
610
595
|
var createClient = (config = {}) => {
|
|
611
596
|
let _config = mergeConfigs(createConfig(), config);
|
|
612
597
|
const getConfig = () => ({ ..._config });
|
|
@@ -812,10 +797,10 @@ var createClient = (config = {}) => {
|
|
|
812
797
|
trace: makeMethodFn("TRACE")
|
|
813
798
|
};
|
|
814
799
|
};
|
|
815
|
-
// generated/
|
|
800
|
+
// generated/public/client.gen.ts
|
|
816
801
|
var client = createClient(createConfig({ baseUrl: "https://api.nadeshiko.co" }));
|
|
817
802
|
|
|
818
|
-
// generated/
|
|
803
|
+
// generated/public/sdk.gen.ts
|
|
819
804
|
var search = (options) => (options.client ?? client).post({
|
|
820
805
|
security: [{ scheme: "bearer", type: "http" }],
|
|
821
806
|
url: "/v1/search",
|
|
@@ -857,137 +842,36 @@ var getStatsOverview = (options) => (options?.client ?? client).get({
|
|
|
857
842
|
url: "/v1/stats/overview",
|
|
858
843
|
...options
|
|
859
844
|
});
|
|
860
|
-
var getCoveredWords = (options) => (options.client ?? client).get({
|
|
861
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
862
|
-
url: "/v1/stats/covered-words",
|
|
863
|
-
...options
|
|
864
|
-
});
|
|
865
|
-
var triggerCoveredWordsUpdate = (options) => (options?.client ?? client).post({
|
|
866
|
-
security: [{
|
|
867
|
-
in: "cookie",
|
|
868
|
-
name: "nadeshiko.session_token",
|
|
869
|
-
type: "apiKey"
|
|
870
|
-
}],
|
|
871
|
-
url: "/v1/stats/covered-words/update",
|
|
872
|
-
...options,
|
|
873
|
-
headers: {
|
|
874
|
-
"Content-Type": "application/json",
|
|
875
|
-
...options?.headers
|
|
876
|
-
}
|
|
877
|
-
});
|
|
878
845
|
var listMedia = (options) => (options?.client ?? client).get({
|
|
879
846
|
security: [{ scheme: "bearer", type: "http" }],
|
|
880
847
|
url: "/v1/media",
|
|
881
848
|
...options
|
|
882
849
|
});
|
|
883
|
-
var createMedia = (options) => (options.client ?? client).post({
|
|
884
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
885
|
-
url: "/v1/media",
|
|
886
|
-
...options,
|
|
887
|
-
headers: {
|
|
888
|
-
"Content-Type": "application/json",
|
|
889
|
-
...options.headers
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
850
|
var getSegment = (options) => (options.client ?? client).get({
|
|
893
851
|
security: [{ scheme: "bearer", type: "http" }],
|
|
894
852
|
url: "/v1/media/segments/{segmentPublicId}",
|
|
895
853
|
...options
|
|
896
854
|
});
|
|
897
|
-
var updateSegment = (options) => (options.client ?? client).patch({
|
|
898
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
899
|
-
url: "/v1/media/segments/{segmentPublicId}",
|
|
900
|
-
...options,
|
|
901
|
-
headers: {
|
|
902
|
-
"Content-Type": "application/json",
|
|
903
|
-
...options.headers
|
|
904
|
-
}
|
|
905
|
-
});
|
|
906
855
|
var getSegmentContext = (options) => (options.client ?? client).get({
|
|
907
856
|
security: [{ scheme: "bearer", type: "http" }],
|
|
908
857
|
url: "/v1/media/segments/{segmentPublicId}/context",
|
|
909
858
|
...options
|
|
910
859
|
});
|
|
911
|
-
var listSegmentRevisions = (options) => (options.client ?? client).get({
|
|
912
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
913
|
-
url: "/v1/media/segments/{segmentPublicId}/revisions",
|
|
914
|
-
...options
|
|
915
|
-
});
|
|
916
|
-
var deleteMedia = (options) => (options.client ?? client).delete({
|
|
917
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
918
|
-
url: "/v1/media/{mediaPublicId}",
|
|
919
|
-
...options
|
|
920
|
-
});
|
|
921
860
|
var getMedia = (options) => (options.client ?? client).get({
|
|
922
861
|
security: [{ scheme: "bearer", type: "http" }],
|
|
923
862
|
url: "/v1/media/{mediaPublicId}",
|
|
924
863
|
...options
|
|
925
864
|
});
|
|
926
|
-
var updateMedia = (options) => (options.client ?? client).patch({
|
|
927
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
928
|
-
url: "/v1/media/{mediaPublicId}",
|
|
929
|
-
...options,
|
|
930
|
-
headers: {
|
|
931
|
-
"Content-Type": "application/json",
|
|
932
|
-
...options.headers
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
865
|
var listEpisodes = (options) => (options.client ?? client).get({
|
|
936
866
|
security: [{ scheme: "bearer", type: "http" }],
|
|
937
867
|
url: "/v1/media/{mediaPublicId}/episodes",
|
|
938
868
|
...options
|
|
939
869
|
});
|
|
940
|
-
var createEpisode = (options) => (options.client ?? client).post({
|
|
941
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
942
|
-
url: "/v1/media/{mediaPublicId}/episodes",
|
|
943
|
-
...options,
|
|
944
|
-
headers: {
|
|
945
|
-
"Content-Type": "application/json",
|
|
946
|
-
...options.headers
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
var deleteEpisode = (options) => (options.client ?? client).delete({
|
|
950
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
951
|
-
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
|
|
952
|
-
...options
|
|
953
|
-
});
|
|
954
870
|
var getEpisode = (options) => (options.client ?? client).get({
|
|
955
871
|
security: [{ scheme: "bearer", type: "http" }],
|
|
956
872
|
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
|
|
957
873
|
...options
|
|
958
874
|
});
|
|
959
|
-
var updateEpisode = (options) => (options.client ?? client).patch({
|
|
960
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
961
|
-
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}",
|
|
962
|
-
...options,
|
|
963
|
-
headers: {
|
|
964
|
-
"Content-Type": "application/json",
|
|
965
|
-
...options.headers
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
var listSegments = (options) => (options.client ?? client).get({
|
|
969
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
970
|
-
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
|
|
971
|
-
...options
|
|
972
|
-
});
|
|
973
|
-
var createSegment = (options) => (options.client ?? client).post({
|
|
974
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
975
|
-
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments",
|
|
976
|
-
...options,
|
|
977
|
-
headers: {
|
|
978
|
-
"Content-Type": "application/json",
|
|
979
|
-
...options.headers
|
|
980
|
-
}
|
|
981
|
-
});
|
|
982
|
-
var createSegmentsBatch = (options) => (options.client ?? client).post({
|
|
983
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
984
|
-
url: "/v1/media/{mediaPublicId}/episodes/{episodeNumber}/segments/batch",
|
|
985
|
-
...options,
|
|
986
|
-
headers: {
|
|
987
|
-
"Content-Type": "application/json",
|
|
988
|
-
...options.headers
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
875
|
var getMe = (options) => (options?.client ?? client).get({
|
|
992
876
|
security: [{ scheme: "bearer", type: "http" }],
|
|
993
877
|
url: "/v1/user/me",
|
|
@@ -1012,68 +896,11 @@ var removeExcludedMedia = (options) => (options.client ?? client).delete({
|
|
|
1012
896
|
url: "/v1/user/excluded-media/{mediaPublicId}",
|
|
1013
897
|
...options
|
|
1014
898
|
});
|
|
1015
|
-
var createUserReport = (options) => (options.client ?? client).post({
|
|
1016
|
-
security: [{
|
|
1017
|
-
in: "cookie",
|
|
1018
|
-
name: "nadeshiko.session_token",
|
|
1019
|
-
type: "apiKey"
|
|
1020
|
-
}],
|
|
1021
|
-
url: "/v1/user/reports",
|
|
1022
|
-
...options,
|
|
1023
|
-
headers: {
|
|
1024
|
-
"Content-Type": "application/json",
|
|
1025
|
-
...options.headers
|
|
1026
|
-
}
|
|
1027
|
-
});
|
|
1028
|
-
var getUserPreferences = (options) => (options?.client ?? client).get({
|
|
1029
|
-
security: [{
|
|
1030
|
-
in: "cookie",
|
|
1031
|
-
name: "nadeshiko.session_token",
|
|
1032
|
-
type: "apiKey"
|
|
1033
|
-
}],
|
|
1034
|
-
url: "/v1/user/preferences",
|
|
1035
|
-
...options
|
|
1036
|
-
});
|
|
1037
|
-
var updateUserPreferences = (options) => (options.client ?? client).patch({
|
|
1038
|
-
security: [{
|
|
1039
|
-
in: "cookie",
|
|
1040
|
-
name: "nadeshiko.session_token",
|
|
1041
|
-
type: "apiKey"
|
|
1042
|
-
}],
|
|
1043
|
-
url: "/v1/user/preferences",
|
|
1044
|
-
...options,
|
|
1045
|
-
headers: {
|
|
1046
|
-
"Content-Type": "application/json",
|
|
1047
|
-
...options.headers
|
|
1048
|
-
}
|
|
1049
|
-
});
|
|
1050
|
-
var deleteUserActivity = (options) => (options?.client ?? client).delete({
|
|
1051
|
-
security: [{
|
|
1052
|
-
in: "cookie",
|
|
1053
|
-
name: "nadeshiko.session_token",
|
|
1054
|
-
type: "apiKey"
|
|
1055
|
-
}],
|
|
1056
|
-
url: "/v1/user/activity",
|
|
1057
|
-
...options
|
|
1058
|
-
});
|
|
1059
899
|
var listUserActivity = (options) => (options?.client ?? client).get({
|
|
1060
900
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1061
901
|
url: "/v1/user/activity",
|
|
1062
902
|
...options
|
|
1063
903
|
});
|
|
1064
|
-
var trackUserActivity = (options) => (options.client ?? client).post({
|
|
1065
|
-
security: [{
|
|
1066
|
-
in: "cookie",
|
|
1067
|
-
name: "nadeshiko.session_token",
|
|
1068
|
-
type: "apiKey"
|
|
1069
|
-
}],
|
|
1070
|
-
url: "/v1/user/activity",
|
|
1071
|
-
...options,
|
|
1072
|
-
headers: {
|
|
1073
|
-
"Content-Type": "application/json",
|
|
1074
|
-
...options.headers
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1077
904
|
var getUserActivityHeatmap = (options) => (options?.client ?? client).get({
|
|
1078
905
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1079
906
|
url: "/v1/user/activity/heatmap",
|
|
@@ -1084,60 +911,6 @@ var getUserActivityStats = (options) => (options?.client ?? client).get({
|
|
|
1084
911
|
url: "/v1/user/activity/stats",
|
|
1085
912
|
...options
|
|
1086
913
|
});
|
|
1087
|
-
var deleteUserActivityByDate = (options) => (options.client ?? client).delete({
|
|
1088
|
-
security: [{
|
|
1089
|
-
in: "cookie",
|
|
1090
|
-
name: "nadeshiko.session_token",
|
|
1091
|
-
type: "apiKey"
|
|
1092
|
-
}],
|
|
1093
|
-
url: "/v1/user/activity/date/{date}",
|
|
1094
|
-
...options
|
|
1095
|
-
});
|
|
1096
|
-
var deleteUserActivityById = (options) => (options.client ?? client).delete({
|
|
1097
|
-
security: [{
|
|
1098
|
-
in: "cookie",
|
|
1099
|
-
name: "nadeshiko.session_token",
|
|
1100
|
-
type: "apiKey"
|
|
1101
|
-
}],
|
|
1102
|
-
url: "/v1/user/activity/{activityId}",
|
|
1103
|
-
...options
|
|
1104
|
-
});
|
|
1105
|
-
var exportUserData = (options) => (options?.client ?? client).get({
|
|
1106
|
-
security: [{
|
|
1107
|
-
in: "cookie",
|
|
1108
|
-
name: "nadeshiko.session_token",
|
|
1109
|
-
type: "apiKey"
|
|
1110
|
-
}],
|
|
1111
|
-
url: "/v1/user/export",
|
|
1112
|
-
...options
|
|
1113
|
-
});
|
|
1114
|
-
var listUserLabs = (options) => (options?.client ?? client).get({
|
|
1115
|
-
security: [{
|
|
1116
|
-
in: "cookie",
|
|
1117
|
-
name: "nadeshiko.session_token",
|
|
1118
|
-
type: "apiKey"
|
|
1119
|
-
}],
|
|
1120
|
-
url: "/v1/user/labs",
|
|
1121
|
-
...options
|
|
1122
|
-
});
|
|
1123
|
-
var unenrollUserLab = (options) => (options.client ?? client).delete({
|
|
1124
|
-
security: [{
|
|
1125
|
-
in: "cookie",
|
|
1126
|
-
name: "nadeshiko.session_token",
|
|
1127
|
-
type: "apiKey"
|
|
1128
|
-
}],
|
|
1129
|
-
url: "/v1/user/labs/{key}",
|
|
1130
|
-
...options
|
|
1131
|
-
});
|
|
1132
|
-
var enrollUserLab = (options) => (options.client ?? client).post({
|
|
1133
|
-
security: [{
|
|
1134
|
-
in: "cookie",
|
|
1135
|
-
name: "nadeshiko.session_token",
|
|
1136
|
-
type: "apiKey"
|
|
1137
|
-
}],
|
|
1138
|
-
url: "/v1/user/labs/{key}",
|
|
1139
|
-
...options
|
|
1140
|
-
});
|
|
1141
914
|
var listCollections = (options) => (options?.client ?? client).get({
|
|
1142
915
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1143
916
|
url: "/v1/collections",
|
|
@@ -1162,19 +935,6 @@ var getCollection = (options) => (options.client ?? client).get({
|
|
|
1162
935
|
url: "/v1/collections/{collectionPublicId}",
|
|
1163
936
|
...options
|
|
1164
937
|
});
|
|
1165
|
-
var updateCollection = (options) => (options.client ?? client).patch({
|
|
1166
|
-
security: [{
|
|
1167
|
-
in: "cookie",
|
|
1168
|
-
name: "nadeshiko.session_token",
|
|
1169
|
-
type: "apiKey"
|
|
1170
|
-
}],
|
|
1171
|
-
url: "/v1/collections/{collectionPublicId}",
|
|
1172
|
-
...options,
|
|
1173
|
-
headers: {
|
|
1174
|
-
"Content-Type": "application/json",
|
|
1175
|
-
...options.headers
|
|
1176
|
-
}
|
|
1177
|
-
});
|
|
1178
938
|
var addSegmentToCollection = (options) => (options.client ?? client).post({
|
|
1179
939
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1180
940
|
url: "/v1/collections/{collectionPublicId}/segments",
|
|
@@ -1198,162 +958,7 @@ var removeSegmentFromCollection = (options) => (options.client ?? client).delete
|
|
|
1198
958
|
url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
|
|
1199
959
|
...options
|
|
1200
960
|
});
|
|
1201
|
-
|
|
1202
|
-
security: [{
|
|
1203
|
-
in: "cookie",
|
|
1204
|
-
name: "nadeshiko.session_token",
|
|
1205
|
-
type: "apiKey"
|
|
1206
|
-
}],
|
|
1207
|
-
url: "/v1/collections/{collectionPublicId}/segments/{segmentPublicId}",
|
|
1208
|
-
...options,
|
|
1209
|
-
headers: {
|
|
1210
|
-
"Content-Type": "application/json",
|
|
1211
|
-
...options.headers
|
|
1212
|
-
}
|
|
1213
|
-
});
|
|
1214
|
-
var getCollectionStats = (options) => (options.client ?? client).get({
|
|
1215
|
-
security: [{
|
|
1216
|
-
in: "cookie",
|
|
1217
|
-
name: "nadeshiko.session_token",
|
|
1218
|
-
type: "apiKey"
|
|
1219
|
-
}],
|
|
1220
|
-
url: "/v1/collections/{collectionPublicId}/stats",
|
|
1221
|
-
...options
|
|
1222
|
-
});
|
|
1223
|
-
var listAdminReports = (options) => (options?.client ?? client).get({
|
|
1224
|
-
security: [{
|
|
1225
|
-
in: "cookie",
|
|
1226
|
-
name: "nadeshiko.session_token",
|
|
1227
|
-
type: "apiKey"
|
|
1228
|
-
}],
|
|
1229
|
-
url: "/v1/admin/reports",
|
|
1230
|
-
...options
|
|
1231
|
-
});
|
|
1232
|
-
var batchUpdateAdminReports = (options) => (options.client ?? client).patch({
|
|
1233
|
-
security: [{
|
|
1234
|
-
in: "cookie",
|
|
1235
|
-
name: "nadeshiko.session_token",
|
|
1236
|
-
type: "apiKey"
|
|
1237
|
-
}],
|
|
1238
|
-
url: "/v1/admin/reports/batch",
|
|
1239
|
-
...options,
|
|
1240
|
-
headers: {
|
|
1241
|
-
"Content-Type": "application/json",
|
|
1242
|
-
...options.headers
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
var bulkDeleteAdminReports = (options) => (options.client ?? client).delete({
|
|
1246
|
-
security: [{
|
|
1247
|
-
in: "cookie",
|
|
1248
|
-
name: "nadeshiko.session_token",
|
|
1249
|
-
type: "apiKey"
|
|
1250
|
-
}],
|
|
1251
|
-
url: "/v1/admin/reports/bulk",
|
|
1252
|
-
...options,
|
|
1253
|
-
headers: {
|
|
1254
|
-
"Content-Type": "application/json",
|
|
1255
|
-
...options.headers
|
|
1256
|
-
}
|
|
1257
|
-
});
|
|
1258
|
-
var bulkUpdateAdminReports = (options) => (options.client ?? client).patch({
|
|
1259
|
-
security: [{
|
|
1260
|
-
in: "cookie",
|
|
1261
|
-
name: "nadeshiko.session_token",
|
|
1262
|
-
type: "apiKey"
|
|
1263
|
-
}],
|
|
1264
|
-
url: "/v1/admin/reports/bulk",
|
|
1265
|
-
...options,
|
|
1266
|
-
headers: {
|
|
1267
|
-
"Content-Type": "application/json",
|
|
1268
|
-
...options.headers
|
|
1269
|
-
}
|
|
1270
|
-
});
|
|
1271
|
-
var deleteAdminReport = (options) => (options.client ?? client).delete({
|
|
1272
|
-
security: [{
|
|
1273
|
-
in: "cookie",
|
|
1274
|
-
name: "nadeshiko.session_token",
|
|
1275
|
-
type: "apiKey"
|
|
1276
|
-
}],
|
|
1277
|
-
url: "/v1/admin/reports/{reportId}",
|
|
1278
|
-
...options
|
|
1279
|
-
});
|
|
1280
|
-
var updateAdminReport = (options) => (options.client ?? client).patch({
|
|
1281
|
-
security: [{
|
|
1282
|
-
in: "cookie",
|
|
1283
|
-
name: "nadeshiko.session_token",
|
|
1284
|
-
type: "apiKey"
|
|
1285
|
-
}],
|
|
1286
|
-
url: "/v1/admin/reports/{reportId}",
|
|
1287
|
-
...options,
|
|
1288
|
-
headers: {
|
|
1289
|
-
"Content-Type": "application/json",
|
|
1290
|
-
...options.headers
|
|
1291
|
-
}
|
|
1292
|
-
});
|
|
1293
|
-
var listAdminMediaAudits = (options) => (options?.client ?? client).get({
|
|
1294
|
-
security: [{
|
|
1295
|
-
in: "cookie",
|
|
1296
|
-
name: "nadeshiko.session_token",
|
|
1297
|
-
type: "apiKey"
|
|
1298
|
-
}],
|
|
1299
|
-
url: "/v1/admin/media/audits",
|
|
1300
|
-
...options
|
|
1301
|
-
});
|
|
1302
|
-
var updateAdminMediaAudit = (options) => (options.client ?? client).patch({
|
|
1303
|
-
security: [{
|
|
1304
|
-
in: "cookie",
|
|
1305
|
-
name: "nadeshiko.session_token",
|
|
1306
|
-
type: "apiKey"
|
|
1307
|
-
}],
|
|
1308
|
-
url: "/v1/admin/media/audits/{name}",
|
|
1309
|
-
...options,
|
|
1310
|
-
headers: {
|
|
1311
|
-
"Content-Type": "application/json",
|
|
1312
|
-
...options.headers
|
|
1313
|
-
}
|
|
1314
|
-
});
|
|
1315
|
-
var runAdminMediaAudit = (options) => (options.client ?? client).post({
|
|
1316
|
-
security: [{
|
|
1317
|
-
in: "cookie",
|
|
1318
|
-
name: "nadeshiko.session_token",
|
|
1319
|
-
type: "apiKey"
|
|
1320
|
-
}],
|
|
1321
|
-
url: "/v1/admin/media/audits/{name}/run",
|
|
1322
|
-
...options
|
|
1323
|
-
});
|
|
1324
|
-
var listAdminMediaAuditRuns = (options) => (options?.client ?? client).get({
|
|
1325
|
-
security: [{
|
|
1326
|
-
in: "cookie",
|
|
1327
|
-
name: "nadeshiko.session_token",
|
|
1328
|
-
type: "apiKey"
|
|
1329
|
-
}],
|
|
1330
|
-
url: "/v1/admin/media/audits/runs",
|
|
1331
|
-
...options
|
|
1332
|
-
});
|
|
1333
|
-
var getAdminMediaAuditRun = (options) => (options.client ?? client).get({
|
|
1334
|
-
security: [{
|
|
1335
|
-
in: "cookie",
|
|
1336
|
-
name: "nadeshiko.session_token",
|
|
1337
|
-
type: "apiKey"
|
|
1338
|
-
}],
|
|
1339
|
-
url: "/v1/admin/media/audits/runs/{auditRunId}",
|
|
1340
|
-
...options
|
|
1341
|
-
});
|
|
1342
|
-
var getAnnouncement = (options) => (options?.client ?? client).get({ url: "/v1/admin/announcement", ...options });
|
|
1343
|
-
var updateAnnouncement = (options) => (options.client ?? client).put({
|
|
1344
|
-
security: [{
|
|
1345
|
-
in: "cookie",
|
|
1346
|
-
name: "nadeshiko.session_token",
|
|
1347
|
-
type: "apiKey"
|
|
1348
|
-
}],
|
|
1349
|
-
url: "/v1/admin/announcement",
|
|
1350
|
-
...options,
|
|
1351
|
-
headers: {
|
|
1352
|
-
"Content-Type": "application/json",
|
|
1353
|
-
...options.headers
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
// generated/internal/retry.ts
|
|
961
|
+
// generated/public/retry.ts
|
|
1357
962
|
var RETRYABLE_STATUS = new Set([408, 429, 500, 502, 503, 504]);
|
|
1358
963
|
function parseRetryAfter(value) {
|
|
1359
964
|
const seconds = Number(value);
|
|
@@ -1408,7 +1013,7 @@ function withRetry(fetchImpl = globalThis.fetch, options = {}) {
|
|
|
1408
1013
|
};
|
|
1409
1014
|
}
|
|
1410
1015
|
|
|
1411
|
-
// generated/
|
|
1016
|
+
// generated/public/errors.ts
|
|
1412
1017
|
class NadeshikoError extends Error {
|
|
1413
1018
|
code;
|
|
1414
1019
|
title;
|
|
@@ -1430,7 +1035,7 @@ class NadeshikoError extends Error {
|
|
|
1430
1035
|
}
|
|
1431
1036
|
}
|
|
1432
1037
|
|
|
1433
|
-
// generated/
|
|
1038
|
+
// generated/public/paginate.ts
|
|
1434
1039
|
async function* paginate(fn, options, extract) {
|
|
1435
1040
|
let cursor = null;
|
|
1436
1041
|
let first = true;
|
|
@@ -1479,39 +1084,21 @@ async function* flatPaginate(params, fn, extract) {
|
|
|
1479
1084
|
}
|
|
1480
1085
|
}
|
|
1481
1086
|
|
|
1482
|
-
// generated/
|
|
1087
|
+
// generated/public/nadeshiko.gen.ts
|
|
1483
1088
|
var environments = {
|
|
1484
1089
|
LOCAL: "http://localhost:5000/api",
|
|
1485
|
-
DEVELOPMENT: "https://api-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
};
|
|
1489
|
-
var defaultSessionTokenGetter = () => {
|
|
1490
|
-
if (typeof document === "undefined")
|
|
1491
|
-
return;
|
|
1492
|
-
const match = document.cookie.match(/(?:^|;\s*)nadeshiko\.session_token=([^;]*)/);
|
|
1493
|
-
return match ? decodeURIComponent(match[1]) : undefined;
|
|
1090
|
+
DEVELOPMENT: "https://api-stg.nadeshiko.co",
|
|
1091
|
+
STAGING: "https://api-stg.nadeshiko.co",
|
|
1092
|
+
PRODUCTION: "https://api.nadeshiko.co"
|
|
1494
1093
|
};
|
|
1495
1094
|
function createNadeshikoClient(config) {
|
|
1496
1095
|
const rawBaseUrl = config.baseURL ?? config.baseUrl;
|
|
1497
1096
|
const baseUrl = rawBaseUrl === undefined ? environments.PRODUCTION : (rawBaseUrl in environments) ? environments[rawBaseUrl] : rawBaseUrl;
|
|
1498
|
-
const getApiKey = async () => {
|
|
1499
|
-
if (typeof config.apiKey === "function") {
|
|
1500
|
-
return await config.apiKey();
|
|
1501
|
-
}
|
|
1502
|
-
return config.apiKey;
|
|
1503
|
-
};
|
|
1504
|
-
const getSessionToken = config.sessionToken ?? defaultSessionTokenGetter;
|
|
1505
1097
|
const clientInstance = createClient(createConfig({
|
|
1506
1098
|
baseUrl,
|
|
1507
1099
|
headers: { "User-Agent": "nadeshiko-sdk-ts/2.1.0", ...config.headers },
|
|
1508
1100
|
fetch: withRetry(globalThis.fetch, config.retryOptions),
|
|
1509
|
-
auth: (
|
|
1510
|
-
if (auth.in === "cookie") {
|
|
1511
|
-
return getSessionToken();
|
|
1512
|
-
}
|
|
1513
|
-
return getApiKey();
|
|
1514
|
-
}
|
|
1101
|
+
auth: () => config.apiKey
|
|
1515
1102
|
}));
|
|
1516
1103
|
clientInstance.interceptors.error.use((error) => {
|
|
1517
1104
|
if (error && typeof error === "object" && "code" in error && typeof error.code === "string") {
|
|
@@ -1704,279 +1291,6 @@ function createNadeshikoClient(config) {
|
|
|
1704
1291
|
const p = removeSegmentFromCollection({ path: { collectionPublicId, segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1705
1292
|
return tOE === false ? p : p.then((r) => r.data);
|
|
1706
1293
|
};
|
|
1707
|
-
const _getCoveredWords = (params) => {
|
|
1708
|
-
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1709
|
-
const p = getCoveredWords({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1710
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1711
|
-
};
|
|
1712
|
-
_getCoveredWords.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1713
|
-
return getCoveredWords({ query: flat, client: clientInstance });
|
|
1714
|
-
}, (data) => ({ items: data.words, pagination: data.pagination }));
|
|
1715
|
-
const _triggerCoveredWordsUpdate = (params) => {
|
|
1716
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1717
|
-
const p = triggerCoveredWordsUpdate({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1718
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1719
|
-
};
|
|
1720
|
-
const _createMedia = (params) => {
|
|
1721
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1722
|
-
const p = createMedia({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1723
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1724
|
-
};
|
|
1725
|
-
const _updateSegment = (paramsOrId) => {
|
|
1726
|
-
if (typeof paramsOrId === "string") {
|
|
1727
|
-
return updateSegment({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1728
|
-
}
|
|
1729
|
-
const params = paramsOrId;
|
|
1730
|
-
const { throwOnError: tOE, segmentPublicId, ...body } = params ?? {};
|
|
1731
|
-
const p = updateSegment({ path: { segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1732
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1733
|
-
};
|
|
1734
|
-
const _listSegmentRevisions = (paramsOrId) => {
|
|
1735
|
-
if (typeof paramsOrId === "string") {
|
|
1736
|
-
return listSegmentRevisions({ throwOnError: true, path: { segmentPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1737
|
-
}
|
|
1738
|
-
const params = paramsOrId;
|
|
1739
|
-
const { throwOnError: tOE, segmentPublicId } = params ?? {};
|
|
1740
|
-
const p = listSegmentRevisions({ path: { segmentPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1741
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1742
|
-
};
|
|
1743
|
-
const _updateMedia = (paramsOrId) => {
|
|
1744
|
-
if (typeof paramsOrId === "string") {
|
|
1745
|
-
return updateMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1746
|
-
}
|
|
1747
|
-
const params = paramsOrId;
|
|
1748
|
-
const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
|
|
1749
|
-
const p = updateMedia({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1750
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1751
|
-
};
|
|
1752
|
-
const _deleteMedia = (paramsOrId) => {
|
|
1753
|
-
if (typeof paramsOrId === "string") {
|
|
1754
|
-
return deleteMedia({ throwOnError: true, path: { mediaPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1755
|
-
}
|
|
1756
|
-
const params = paramsOrId;
|
|
1757
|
-
const { throwOnError: tOE, mediaPublicId } = params ?? {};
|
|
1758
|
-
const p = deleteMedia({ path: { mediaPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1759
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1760
|
-
};
|
|
1761
|
-
const _createEpisode = (params) => {
|
|
1762
|
-
const { throwOnError: tOE, mediaPublicId, ...body } = params ?? {};
|
|
1763
|
-
const p = createEpisode({ path: { mediaPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1764
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1765
|
-
};
|
|
1766
|
-
const _updateEpisode = (params) => {
|
|
1767
|
-
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1768
|
-
const p = updateEpisode({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1769
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1770
|
-
};
|
|
1771
|
-
const _deleteEpisode = (params) => {
|
|
1772
|
-
const { throwOnError: tOE, mediaPublicId, episodeNumber } = params ?? {};
|
|
1773
|
-
const p = deleteEpisode({ path: { mediaPublicId, episodeNumber }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1774
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1775
|
-
};
|
|
1776
|
-
const _listSegments = (params) => {
|
|
1777
|
-
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...query } = params ?? {};
|
|
1778
|
-
const p = listSegments({ path: { mediaPublicId, episodeNumber }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1779
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1780
|
-
};
|
|
1781
|
-
_listSegments.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1782
|
-
const { mediaPublicId, episodeNumber, ...q } = flat;
|
|
1783
|
-
return listSegments({ path: { mediaPublicId, episodeNumber }, query: q, client: clientInstance });
|
|
1784
|
-
}, (data) => ({ items: data.segments, pagination: data.pagination }));
|
|
1785
|
-
const _createSegment = (params) => {
|
|
1786
|
-
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1787
|
-
const p = createSegment({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1788
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1789
|
-
};
|
|
1790
|
-
const _createSegmentsBatch = (params) => {
|
|
1791
|
-
const { throwOnError: tOE, mediaPublicId, episodeNumber, ...body } = params ?? {};
|
|
1792
|
-
const p = createSegmentsBatch({ path: { mediaPublicId, episodeNumber }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1793
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1794
|
-
};
|
|
1795
|
-
const _createUserReport = (params) => {
|
|
1796
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1797
|
-
const p = createUserReport({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1798
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1799
|
-
};
|
|
1800
|
-
const _getUserPreferences = (params) => {
|
|
1801
|
-
const tOE = params?.throwOnError;
|
|
1802
|
-
const p = getUserPreferences({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1803
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1804
|
-
};
|
|
1805
|
-
const _updateUserPreferences = (params) => {
|
|
1806
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1807
|
-
const p = updateUserPreferences({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1808
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1809
|
-
};
|
|
1810
|
-
const _trackUserActivity = (params) => {
|
|
1811
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1812
|
-
const p = trackUserActivity({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1813
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1814
|
-
};
|
|
1815
|
-
const _deleteUserActivity = (params) => {
|
|
1816
|
-
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1817
|
-
const p = deleteUserActivity({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1818
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1819
|
-
};
|
|
1820
|
-
const _deleteUserActivityByDate = (paramsOrId) => {
|
|
1821
|
-
if (typeof paramsOrId === "string") {
|
|
1822
|
-
return deleteUserActivityByDate({ throwOnError: true, path: { date: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1823
|
-
}
|
|
1824
|
-
const params = paramsOrId;
|
|
1825
|
-
const { throwOnError: tOE, date } = params ?? {};
|
|
1826
|
-
const p = deleteUserActivityByDate({ path: { date }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1827
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1828
|
-
};
|
|
1829
|
-
const _deleteUserActivityById = (paramsOrId) => {
|
|
1830
|
-
if (typeof paramsOrId === "number") {
|
|
1831
|
-
return deleteUserActivityById({ throwOnError: true, path: { activityId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1832
|
-
}
|
|
1833
|
-
const params = paramsOrId;
|
|
1834
|
-
const { throwOnError: tOE, activityId } = params ?? {};
|
|
1835
|
-
const p = deleteUserActivityById({ path: { activityId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1836
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1837
|
-
};
|
|
1838
|
-
const _exportUserData = (params) => {
|
|
1839
|
-
const tOE = params?.throwOnError;
|
|
1840
|
-
const p = exportUserData({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1841
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1842
|
-
};
|
|
1843
|
-
const _listUserLabs = (params) => {
|
|
1844
|
-
const tOE = params?.throwOnError;
|
|
1845
|
-
const p = listUserLabs({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1846
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1847
|
-
};
|
|
1848
|
-
const _enrollUserLab = (paramsOrId) => {
|
|
1849
|
-
if (typeof paramsOrId === "string") {
|
|
1850
|
-
return enrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1851
|
-
}
|
|
1852
|
-
const params = paramsOrId;
|
|
1853
|
-
const { throwOnError: tOE, key } = params ?? {};
|
|
1854
|
-
const p = enrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1855
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1856
|
-
};
|
|
1857
|
-
const _unenrollUserLab = (paramsOrId) => {
|
|
1858
|
-
if (typeof paramsOrId === "string") {
|
|
1859
|
-
return unenrollUserLab({ throwOnError: true, path: { key: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1860
|
-
}
|
|
1861
|
-
const params = paramsOrId;
|
|
1862
|
-
const { throwOnError: tOE, key } = params ?? {};
|
|
1863
|
-
const p = unenrollUserLab({ path: { key }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1864
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1865
|
-
};
|
|
1866
|
-
const _updateCollection = (paramsOrId) => {
|
|
1867
|
-
if (typeof paramsOrId === "string") {
|
|
1868
|
-
return updateCollection({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1869
|
-
}
|
|
1870
|
-
const params = paramsOrId;
|
|
1871
|
-
const { throwOnError: tOE, collectionPublicId, ...body } = params ?? {};
|
|
1872
|
-
const p = updateCollection({ path: { collectionPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1873
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1874
|
-
};
|
|
1875
|
-
const _updateCollectionSegment = (params) => {
|
|
1876
|
-
const { throwOnError: tOE, collectionPublicId, segmentPublicId, ...body } = params ?? {};
|
|
1877
|
-
const p = updateCollectionSegment({ path: { collectionPublicId, segmentPublicId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1878
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1879
|
-
};
|
|
1880
|
-
const _getCollectionStats = (paramsOrId) => {
|
|
1881
|
-
if (typeof paramsOrId === "string") {
|
|
1882
|
-
return getCollectionStats({ throwOnError: true, path: { collectionPublicId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1883
|
-
}
|
|
1884
|
-
const params = paramsOrId;
|
|
1885
|
-
const { throwOnError: tOE, collectionPublicId } = params ?? {};
|
|
1886
|
-
const p = getCollectionStats({ path: { collectionPublicId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1887
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1888
|
-
};
|
|
1889
|
-
const _listAdminReports = (params) => {
|
|
1890
|
-
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1891
|
-
const p = listAdminReports({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1892
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1893
|
-
};
|
|
1894
|
-
_listAdminReports.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1895
|
-
return listAdminReports({ query: flat, client: clientInstance });
|
|
1896
|
-
}, (data) => ({ items: data.groups, pagination: data.pagination }));
|
|
1897
|
-
const _batchUpdateAdminReports = (params) => {
|
|
1898
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1899
|
-
const p = batchUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1900
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1901
|
-
};
|
|
1902
|
-
const _bulkUpdateAdminReports = (params) => {
|
|
1903
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1904
|
-
const p = bulkUpdateAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1905
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1906
|
-
};
|
|
1907
|
-
const _bulkDeleteAdminReports = (params) => {
|
|
1908
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1909
|
-
const p = bulkDeleteAdminReports({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1910
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1911
|
-
};
|
|
1912
|
-
const _updateAdminReport = (paramsOrId) => {
|
|
1913
|
-
if (typeof paramsOrId === "number") {
|
|
1914
|
-
return updateAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1915
|
-
}
|
|
1916
|
-
const params = paramsOrId;
|
|
1917
|
-
const { throwOnError: tOE, reportId, ...body } = params ?? {};
|
|
1918
|
-
const p = updateAdminReport({ path: { reportId }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1919
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1920
|
-
};
|
|
1921
|
-
const _deleteAdminReport = (paramsOrId) => {
|
|
1922
|
-
if (typeof paramsOrId === "number") {
|
|
1923
|
-
return deleteAdminReport({ throwOnError: true, path: { reportId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1924
|
-
}
|
|
1925
|
-
const params = paramsOrId;
|
|
1926
|
-
const { throwOnError: tOE, reportId } = params ?? {};
|
|
1927
|
-
const p = deleteAdminReport({ path: { reportId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1928
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1929
|
-
};
|
|
1930
|
-
const _listAdminMediaAudits = (params) => {
|
|
1931
|
-
const tOE = params?.throwOnError;
|
|
1932
|
-
const p = listAdminMediaAudits({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1933
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1934
|
-
};
|
|
1935
|
-
const _updateAdminMediaAudit = (paramsOrId) => {
|
|
1936
|
-
if (typeof paramsOrId === "string") {
|
|
1937
|
-
return updateAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1938
|
-
}
|
|
1939
|
-
const params = paramsOrId;
|
|
1940
|
-
const { throwOnError: tOE, name, ...body } = params ?? {};
|
|
1941
|
-
const p = updateAdminMediaAudit({ path: { name }, ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1942
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1943
|
-
};
|
|
1944
|
-
const _runAdminMediaAudit = (paramsOrId) => {
|
|
1945
|
-
if (typeof paramsOrId === "string") {
|
|
1946
|
-
return runAdminMediaAudit({ throwOnError: true, path: { name: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1947
|
-
}
|
|
1948
|
-
const params = paramsOrId;
|
|
1949
|
-
const { throwOnError: tOE, name, ...query } = params ?? {};
|
|
1950
|
-
const p = runAdminMediaAudit({ path: { name }, ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1951
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1952
|
-
};
|
|
1953
|
-
const _listAdminMediaAuditRuns = (params) => {
|
|
1954
|
-
const { throwOnError: tOE, ...query } = params ?? {};
|
|
1955
|
-
const p = listAdminMediaAuditRuns({ ...Object.keys(query).length > 0 ? { query } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1956
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1957
|
-
};
|
|
1958
|
-
_listAdminMediaAuditRuns.paginate = (params) => flatPaginate(params ?? {}, (flat) => {
|
|
1959
|
-
return listAdminMediaAuditRuns({ query: flat, client: clientInstance });
|
|
1960
|
-
}, (data) => ({ items: data.runs, pagination: data.pagination }));
|
|
1961
|
-
const _getAdminMediaAuditRun = (paramsOrId) => {
|
|
1962
|
-
if (typeof paramsOrId === "number") {
|
|
1963
|
-
return getAdminMediaAuditRun({ throwOnError: true, path: { auditRunId: paramsOrId }, client: clientInstance }).then((r) => r.data);
|
|
1964
|
-
}
|
|
1965
|
-
const params = paramsOrId;
|
|
1966
|
-
const { throwOnError: tOE, auditRunId } = params ?? {};
|
|
1967
|
-
const p = getAdminMediaAuditRun({ path: { auditRunId }, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1968
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1969
|
-
};
|
|
1970
|
-
const _getAnnouncement = (params) => {
|
|
1971
|
-
const tOE = params?.throwOnError;
|
|
1972
|
-
const p = getAnnouncement({ client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1973
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1974
|
-
};
|
|
1975
|
-
const _updateAnnouncement = (params) => {
|
|
1976
|
-
const { throwOnError: tOE, ...body } = params ?? {};
|
|
1977
|
-
const p = updateAnnouncement({ ...Object.keys(body).length > 0 ? { body } : {}, client: clientInstance, throwOnError: tOE === false ? false : true });
|
|
1978
|
-
return tOE === false ? p : p.then((r) => r.data);
|
|
1979
|
-
};
|
|
1980
1294
|
return {
|
|
1981
1295
|
client: clientInstance,
|
|
1982
1296
|
search: _search,
|
|
@@ -2003,146 +1317,23 @@ function createNadeshikoClient(config) {
|
|
|
2003
1317
|
deleteCollection: _deleteCollection,
|
|
2004
1318
|
addSegmentToCollection: _addSegmentToCollection,
|
|
2005
1319
|
searchCollectionSegments: _searchCollectionSegments,
|
|
2006
|
-
removeSegmentFromCollection: _removeSegmentFromCollection
|
|
2007
|
-
getCoveredWords: _getCoveredWords,
|
|
2008
|
-
triggerCoveredWordsUpdate: _triggerCoveredWordsUpdate,
|
|
2009
|
-
createMedia: _createMedia,
|
|
2010
|
-
updateSegment: _updateSegment,
|
|
2011
|
-
listSegmentRevisions: _listSegmentRevisions,
|
|
2012
|
-
updateMedia: _updateMedia,
|
|
2013
|
-
deleteMedia: _deleteMedia,
|
|
2014
|
-
createEpisode: _createEpisode,
|
|
2015
|
-
updateEpisode: _updateEpisode,
|
|
2016
|
-
deleteEpisode: _deleteEpisode,
|
|
2017
|
-
listSegments: _listSegments,
|
|
2018
|
-
createSegment: _createSegment,
|
|
2019
|
-
createSegmentsBatch: _createSegmentsBatch,
|
|
2020
|
-
createUserReport: _createUserReport,
|
|
2021
|
-
getUserPreferences: _getUserPreferences,
|
|
2022
|
-
updateUserPreferences: _updateUserPreferences,
|
|
2023
|
-
trackUserActivity: _trackUserActivity,
|
|
2024
|
-
deleteUserActivity: _deleteUserActivity,
|
|
2025
|
-
deleteUserActivityByDate: _deleteUserActivityByDate,
|
|
2026
|
-
deleteUserActivityById: _deleteUserActivityById,
|
|
2027
|
-
exportUserData: _exportUserData,
|
|
2028
|
-
listUserLabs: _listUserLabs,
|
|
2029
|
-
enrollUserLab: _enrollUserLab,
|
|
2030
|
-
unenrollUserLab: _unenrollUserLab,
|
|
2031
|
-
updateCollection: _updateCollection,
|
|
2032
|
-
updateCollectionSegment: _updateCollectionSegment,
|
|
2033
|
-
getCollectionStats: _getCollectionStats,
|
|
2034
|
-
listAdminReports: _listAdminReports,
|
|
2035
|
-
batchUpdateAdminReports: _batchUpdateAdminReports,
|
|
2036
|
-
bulkUpdateAdminReports: _bulkUpdateAdminReports,
|
|
2037
|
-
bulkDeleteAdminReports: _bulkDeleteAdminReports,
|
|
2038
|
-
updateAdminReport: _updateAdminReport,
|
|
2039
|
-
deleteAdminReport: _deleteAdminReport,
|
|
2040
|
-
listAdminMediaAudits: _listAdminMediaAudits,
|
|
2041
|
-
updateAdminMediaAudit: _updateAdminMediaAudit,
|
|
2042
|
-
runAdminMediaAudit: _runAdminMediaAudit,
|
|
2043
|
-
listAdminMediaAuditRuns: _listAdminMediaAuditRuns,
|
|
2044
|
-
getAdminMediaAuditRun: _getAdminMediaAuditRun,
|
|
2045
|
-
getAnnouncement: _getAnnouncement,
|
|
2046
|
-
updateAnnouncement: _updateAnnouncement
|
|
1320
|
+
removeSegmentFromCollection: _removeSegmentFromCollection
|
|
2047
1321
|
};
|
|
2048
1322
|
}
|
|
2049
|
-
// generated/internal/internal/stats.gen.ts
|
|
2050
|
-
var exports_stats_gen = {};
|
|
2051
|
-
__export(exports_stats_gen, {
|
|
2052
|
-
triggerCoveredWordsUpdate: () => triggerCoveredWordsUpdate,
|
|
2053
|
-
getCoveredWords: () => getCoveredWords
|
|
2054
|
-
});
|
|
2055
|
-
// generated/internal/internal/media.gen.ts
|
|
2056
|
-
var exports_media_gen = {};
|
|
2057
|
-
__export(exports_media_gen, {
|
|
2058
|
-
updateSegment: () => updateSegment,
|
|
2059
|
-
updateMedia: () => updateMedia,
|
|
2060
|
-
updateEpisode: () => updateEpisode,
|
|
2061
|
-
listSegments: () => listSegments,
|
|
2062
|
-
listSegmentRevisions: () => listSegmentRevisions,
|
|
2063
|
-
deleteMedia: () => deleteMedia,
|
|
2064
|
-
deleteEpisode: () => deleteEpisode,
|
|
2065
|
-
createSegmentsBatch: () => createSegmentsBatch,
|
|
2066
|
-
createSegment: () => createSegment,
|
|
2067
|
-
createMedia: () => createMedia,
|
|
2068
|
-
createEpisode: () => createEpisode
|
|
2069
|
-
});
|
|
2070
|
-
// generated/internal/internal/user.gen.ts
|
|
2071
|
-
var exports_user_gen = {};
|
|
2072
|
-
__export(exports_user_gen, {
|
|
2073
|
-
updateUserPreferences: () => updateUserPreferences,
|
|
2074
|
-
unenrollUserLab: () => unenrollUserLab,
|
|
2075
|
-
trackUserActivity: () => trackUserActivity,
|
|
2076
|
-
listUserLabs: () => listUserLabs,
|
|
2077
|
-
getUserPreferences: () => getUserPreferences,
|
|
2078
|
-
exportUserData: () => exportUserData,
|
|
2079
|
-
enrollUserLab: () => enrollUserLab,
|
|
2080
|
-
deleteUserActivityById: () => deleteUserActivityById,
|
|
2081
|
-
deleteUserActivityByDate: () => deleteUserActivityByDate,
|
|
2082
|
-
deleteUserActivity: () => deleteUserActivity,
|
|
2083
|
-
createUserReport: () => createUserReport
|
|
2084
|
-
});
|
|
2085
|
-
// generated/internal/internal/collections.gen.ts
|
|
2086
|
-
var exports_collections_gen = {};
|
|
2087
|
-
__export(exports_collections_gen, {
|
|
2088
|
-
updateCollectionSegment: () => updateCollectionSegment,
|
|
2089
|
-
updateCollection: () => updateCollection,
|
|
2090
|
-
getCollectionStats: () => getCollectionStats
|
|
2091
|
-
});
|
|
2092
|
-
// generated/internal/internal/admin.gen.ts
|
|
2093
|
-
var exports_admin_gen = {};
|
|
2094
|
-
__export(exports_admin_gen, {
|
|
2095
|
-
updateAnnouncement: () => updateAnnouncement,
|
|
2096
|
-
updateAdminReport: () => updateAdminReport,
|
|
2097
|
-
updateAdminMediaAudit: () => updateAdminMediaAudit,
|
|
2098
|
-
runAdminMediaAudit: () => runAdminMediaAudit,
|
|
2099
|
-
listAdminReports: () => listAdminReports,
|
|
2100
|
-
listAdminMediaAudits: () => listAdminMediaAudits,
|
|
2101
|
-
listAdminMediaAuditRuns: () => listAdminMediaAuditRuns,
|
|
2102
|
-
getAnnouncement: () => getAnnouncement,
|
|
2103
|
-
getAdminMediaAuditRun: () => getAdminMediaAuditRun,
|
|
2104
|
-
deleteAdminReport: () => deleteAdminReport,
|
|
2105
|
-
bulkUpdateAdminReports: () => bulkUpdateAdminReports,
|
|
2106
|
-
bulkDeleteAdminReports: () => bulkDeleteAdminReports,
|
|
2107
|
-
batchUpdateAdminReports: () => batchUpdateAdminReports
|
|
2108
|
-
});
|
|
2109
1323
|
export {
|
|
2110
1324
|
withRetry,
|
|
2111
|
-
exports_user_gen as user,
|
|
2112
|
-
updateUserPreferences,
|
|
2113
|
-
updateSegment,
|
|
2114
|
-
updateMedia,
|
|
2115
|
-
updateEpisode,
|
|
2116
|
-
updateCollectionSegment,
|
|
2117
|
-
updateCollection,
|
|
2118
|
-
updateAnnouncement,
|
|
2119
|
-
updateAdminReport,
|
|
2120
|
-
updateAdminMediaAudit,
|
|
2121
|
-
unenrollUserLab,
|
|
2122
|
-
triggerCoveredWordsUpdate,
|
|
2123
|
-
trackUserActivity,
|
|
2124
|
-
exports_stats_gen as stats,
|
|
2125
1325
|
searchWords,
|
|
2126
1326
|
searchMedia,
|
|
2127
1327
|
searchCollectionSegments,
|
|
2128
1328
|
search,
|
|
2129
|
-
runAdminMediaAudit,
|
|
2130
1329
|
removeSegmentFromCollection,
|
|
2131
1330
|
removeExcludedMedia,
|
|
2132
1331
|
paginate,
|
|
2133
|
-
exports_media_gen as media,
|
|
2134
|
-
listUserLabs,
|
|
2135
1332
|
listUserActivity,
|
|
2136
|
-
listSegments,
|
|
2137
|
-
listSegmentRevisions,
|
|
2138
1333
|
listMedia,
|
|
2139
1334
|
listExcludedMedia,
|
|
2140
1335
|
listEpisodes,
|
|
2141
1336
|
listCollections,
|
|
2142
|
-
listAdminReports,
|
|
2143
|
-
listAdminMediaAudits,
|
|
2144
|
-
listAdminMediaAuditRuns,
|
|
2145
|
-
getUserPreferences,
|
|
2146
1337
|
getUserActivityStats,
|
|
2147
1338
|
getUserActivityHeatmap,
|
|
2148
1339
|
getStatsOverview,
|
|
@@ -2152,38 +1343,16 @@ export {
|
|
|
2152
1343
|
getMedia,
|
|
2153
1344
|
getMe,
|
|
2154
1345
|
getEpisode,
|
|
2155
|
-
getCoveredWords,
|
|
2156
|
-
getCollectionStats,
|
|
2157
1346
|
getCollection,
|
|
2158
|
-
getAnnouncement,
|
|
2159
|
-
getAdminMediaAuditRun,
|
|
2160
1347
|
flatPaginate,
|
|
2161
|
-
exportUserData,
|
|
2162
|
-
enrollUserLab,
|
|
2163
|
-
deleteUserActivityById,
|
|
2164
|
-
deleteUserActivityByDate,
|
|
2165
|
-
deleteUserActivity,
|
|
2166
|
-
deleteMedia,
|
|
2167
|
-
deleteEpisode,
|
|
2168
1348
|
deleteCollection,
|
|
2169
|
-
deleteAdminReport,
|
|
2170
|
-
createUserReport,
|
|
2171
|
-
createSegmentsBatch,
|
|
2172
|
-
createSegment,
|
|
2173
1349
|
createNadeshikoClient,
|
|
2174
|
-
createMedia,
|
|
2175
|
-
createEpisode,
|
|
2176
1350
|
createCollection,
|
|
2177
|
-
exports_collections_gen as collections,
|
|
2178
1351
|
client,
|
|
2179
|
-
bulkUpdateAdminReports,
|
|
2180
|
-
bulkDeleteAdminReports,
|
|
2181
|
-
batchUpdateAdminReports,
|
|
2182
|
-
exports_admin_gen as admin,
|
|
2183
1352
|
addSegmentToCollection,
|
|
2184
1353
|
addExcludedMedia,
|
|
2185
1354
|
NadeshikoError
|
|
2186
1355
|
};
|
|
2187
1356
|
|
|
2188
|
-
//# debugId=
|
|
1357
|
+
//# debugId=DA633494A11616B664756E2164756E21
|
|
2189
1358
|
//# sourceMappingURL=index.js.map
|