@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
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 41.1.9 (11/12/2025)
4
+
5
+ **Fixes**
6
+
7
+ - Correction recherche dans `PodcastList`
8
+
9
+ ## 41.1.8 (10/12/2025)
10
+
11
+ **Fixes**
12
+
13
+ - Correction recherche dans `PodcastList`
14
+
3
15
  ## 41.1.7 (10/12/2025)
4
16
 
5
17
  **Misc**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "41.1.7",
3
+ "version": "41.1.9",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -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: { default: 0, type: Number },
75
- size: { default: 30, type: Number },
76
- organisationId: { default: () => [], type: Array as () => Array<string> },
77
- emissionId: { default: undefined, type: Number },
78
- iabId: { default: undefined, type: Number },
79
- participantId: { default: undefined, type: Number },
80
- query: { default: undefined, type: String },
81
- monetisable: { default: undefined, type: String as () => PodcastMonetisation },
82
- popularSort: { default: false, type: Boolean },
83
- reload: { default: false, type: Boolean },
84
- before: { default: undefined, type: String },
85
- after: { default: undefined, type: String },
86
- includeHidden: { default: false, type: Boolean },
87
- showCount: { default: false, type: Boolean },
88
- displaySortText: { default: true, type: Boolean },
89
- sortCriteria: { default: undefined, type: String as () => PodcastSort },
90
- validity: { default: 'true', type: String },
91
- rubriqueId: { default: () => [], type: Array as () => Array<number> },
92
- rubriquageId: { default: () => [], type: Array as () => Array<number> },
93
- noRubriquageId: { default: () => [], type: Array as () => Array<number> },
94
- justSizeChosen: { default: false, type: Boolean },
95
- withVideo: { default: undefined, type: Boolean },
96
- includeTag:{ default: () => [], type: Array as () => Array<string> },
97
- forceUpdateParameters: { default: false, type: Boolean },
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: { default: null, type: Array as () => Array<string> }
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 !== 'true';
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.length
210
+ noRubriquageId: props.noRubriquageId?.length
199
211
  ? props.noRubriquageId
200
212
  : undefined,
201
- rubriqueId: props.rubriqueId.length ? props.rubriqueId : undefined,
202
- rubriquageId: props.rubriquageId.length ? props.rubriquageId : undefined,
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.length ? props.includeTag : undefined,
223
+ tags: props.includeTag?.length ? props.includeTag : undefined,
212
224
  beneficiaries: props.beneficiaries ?? undefined
213
225
  };
214
226
  try {