@saooti/octopus-sdk 41.1.7 → 41.1.9
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -68,36 +68,46 @@ import { ListClassicReturn } from "../../../stores/class/general/listReturn";
|
|
|
68
68
|
import { useI18n } from "vue-i18n";
|
|
69
69
|
import { podcastApi, PodcastMonetisation, PodcastSearchOptions, PodcastSort } from "../../../api/podcastApi";
|
|
70
70
|
|
|
71
|
-
|
|
72
71
|
//Props
|
|
73
|
-
const props = defineProps
|
|
74
|
-
first
|
|
75
|
-
size
|
|
76
|
-
organisationId
|
|
77
|
-
emissionId
|
|
78
|
-
iabId
|
|
79
|
-
participantId
|
|
80
|
-
query
|
|
81
|
-
monetisable
|
|
82
|
-
popularSort
|
|
83
|
-
reload
|
|
84
|
-
before
|
|
85
|
-
after
|
|
86
|
-
includeHidden
|
|
87
|
-
showCount
|
|
88
|
-
displaySortText
|
|
89
|
-
sortCriteria
|
|
90
|
-
validity
|
|
91
|
-
rubriqueId
|
|
92
|
-
rubriquageId
|
|
93
|
-
noRubriquageId
|
|
94
|
-
justSizeChosen
|
|
95
|
-
withVideo
|
|
96
|
-
includeTag
|
|
97
|
-
forceUpdateParameters
|
|
72
|
+
const props = withDefaults(defineProps<{
|
|
73
|
+
first?: number;
|
|
74
|
+
size?: number;
|
|
75
|
+
organisationId?: Array<string>;
|
|
76
|
+
emissionId?: number;
|
|
77
|
+
iabId?: number;
|
|
78
|
+
participantId?: number;
|
|
79
|
+
query?: string;
|
|
80
|
+
monetisable?: PodcastMonetisation;
|
|
81
|
+
popularSort?: boolean;
|
|
82
|
+
reload?: boolean;
|
|
83
|
+
before?: string;
|
|
84
|
+
after?: string;
|
|
85
|
+
includeHidden?: boolean;
|
|
86
|
+
showCount?: boolean;
|
|
87
|
+
displaySortText?: boolean;
|
|
88
|
+
sortCriteria?: PodcastSort;
|
|
89
|
+
validity?: 'true'|'false'|''|boolean; // TODO improve this
|
|
90
|
+
rubriqueId?: Array<number>;
|
|
91
|
+
rubriquageId?: Array<number>;
|
|
92
|
+
noRubriquageId?: Array<number>;
|
|
93
|
+
justSizeChosen?: boolean;
|
|
94
|
+
withVideo?: boolean;
|
|
95
|
+
includeTag?: Array<string>;
|
|
96
|
+
forceUpdateParameters?: boolean;
|
|
98
97
|
/** The beneficiaries to filter on */
|
|
99
|
-
beneficiaries
|
|
100
|
-
})
|
|
98
|
+
beneficiaries?: Array<string>;
|
|
99
|
+
}>(), {
|
|
100
|
+
first: 0,
|
|
101
|
+
size: 30,
|
|
102
|
+
popularSort: false,
|
|
103
|
+
reload: false,
|
|
104
|
+
includeHidden: false,
|
|
105
|
+
showCount: false,
|
|
106
|
+
displaySortText: true,
|
|
107
|
+
validity: true,
|
|
108
|
+
justSizeChosen: false,
|
|
109
|
+
forceUpdateParameters: false
|
|
110
|
+
});
|
|
101
111
|
|
|
102
112
|
//Emits
|
|
103
113
|
const emit = defineEmits(["fetch", "emptyList"]);
|
|
@@ -178,9 +188,11 @@ onBeforeMount(()=>fetchContent(false))
|
|
|
178
188
|
async function fetchContent(reset: boolean): Promise<void> {
|
|
179
189
|
loading.value = true;
|
|
180
190
|
|
|
191
|
+
// Sadly we kinda have no idea what will be passed as 'validity', we need to
|
|
192
|
+
// handle multiple cases.
|
|
181
193
|
let validity: undefined|boolean = undefined;
|
|
182
|
-
if (props.validity !== undefined) {
|
|
183
|
-
validity = props.validity
|
|
194
|
+
if (props.validity !== undefined && props.validity !== '') {
|
|
195
|
+
validity = props.validity === 'true' || props.validity === true;
|
|
184
196
|
}
|
|
185
197
|
|
|
186
198
|
const param: PodcastSearchOptions = {
|
|
@@ -195,11 +207,11 @@ async function fetchContent(reset: boolean): Promise<void> {
|
|
|
195
207
|
sort: sort.value,
|
|
196
208
|
pubDateBefore: props.before,
|
|
197
209
|
pubDateAfter: props.after,
|
|
198
|
-
noRubriquageId: props.noRubriquageId
|
|
210
|
+
noRubriquageId: props.noRubriquageId?.length
|
|
199
211
|
? props.noRubriquageId
|
|
200
212
|
: undefined,
|
|
201
|
-
rubriqueId: props.rubriqueId
|
|
202
|
-
rubriquageId: props.rubriquageId
|
|
213
|
+
rubriqueId: props.rubriqueId?.length ? props.rubriqueId : undefined,
|
|
214
|
+
rubriquageId: props.rubriquageId?.length ? props.rubriquageId : undefined,
|
|
203
215
|
includeHidden: props.includeHidden,
|
|
204
216
|
validity,
|
|
205
217
|
/* publisherId:
|
|
@@ -208,7 +220,7 @@ async function fetchContent(reset: boolean): Promise<void> {
|
|
|
208
220
|
: undefined, */
|
|
209
221
|
processingStatus: [PodcastProcessingStatus.Ready, PodcastProcessingStatus.Processing],
|
|
210
222
|
withVideo: props.withVideo,
|
|
211
|
-
tags: props.includeTag
|
|
223
|
+
tags: props.includeTag?.length ? props.includeTag : undefined,
|
|
212
224
|
beneficiaries: props.beneficiaries ?? undefined
|
|
213
225
|
};
|
|
214
226
|
try {
|