@saooti/octopus-sdk 41.9.5 → 41.9.6

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,15 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 41.9.6 (20/04/2026)
4
+
5
+ **Features**
6
+
7
+ - Ajout `transcriptionApi.updateTranslation`
8
+
9
+ **Misc**
10
+
11
+ - Correction lien label avec checkbox/switch
12
+
3
13
  ## 41.9.5 (17/04/2026)
4
14
 
5
15
  **Fixes**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "41.9.5",
3
+ "version": "41.9.6",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -84,7 +84,7 @@ export default {
84
84
  return response?.data;
85
85
  },
86
86
 
87
- async putData<Type>(params: RequestParameters): Promise<Type> {
87
+ async putData<Type>(params: RequestParameters & { raw?: boolean }): Promise<Type> {
88
88
  let paramsString = "";
89
89
  if(params.parameters){
90
90
  const parameters = fetchHelper.getUriSearchParams(params.parameters).toString();
@@ -106,13 +106,18 @@ export default {
106
106
  dataToSend.append(key, value);
107
107
  }
108
108
  }
109
+ } else if (params.raw === true && params.dataToSend) {
110
+ typeHeader = { "Content-Type": 'text/plain; charset=utf-8' };
111
+ dataToSend = params.dataToSend;
109
112
  }else if(null!=params.dataToSend || undefined!=params.dataToSend){
110
113
  typeHeader = { "Content-Type": 'application/json; charset=utf-8' };
111
- dataToSend = JSON.stringify(params.dataToSend);
114
+ dataToSend = params.dataToSend;//JSON.stringify(params.dataToSend);
112
115
  }
116
+
113
117
  if(params.noContentType){
114
118
  typeHeader = {};
115
119
  }
120
+
116
121
  const response = await axios.put(url,dataToSend,{headers:{...params.headers, ...typeHeader, ...authHeaders} });
117
122
  return response.data;
118
123
  },
@@ -162,6 +162,20 @@ async function updateTranscription(podcastId: number, transcript: string): Promi
162
162
  });
163
163
  }
164
164
 
165
+ /**
166
+ * Update the translation of a podcast
167
+ * @param podcastId ID of the podcast
168
+ * @param transcript The new translation
169
+ */
170
+ async function updateTranslation(podcastId: number, language: string, translation: string): Promise<void> {
171
+ await classicApi.putData({
172
+ api: ModuleApi.SPEECHTOTEXT,
173
+ path: `transcription/${podcastId}/languages/${language}/srt`,
174
+ dataToSend: translation,
175
+ raw: true
176
+ });
177
+ }
178
+
165
179
  export const transcriptionApi = {
166
180
  changeTranscriptionVisibility,
167
181
  getTranslations,
@@ -169,5 +183,6 @@ export const transcriptionApi = {
169
183
  getRawTranscription,
170
184
  generateTranscription,
171
185
  regenerateTranscription,
172
- updateTranscription
186
+ updateTranscription,
187
+ updateTranslation
173
188
  };
@@ -29,7 +29,7 @@ import { useI18n } from "vue-i18n";
29
29
  //Props
30
30
  const props = defineProps({
31
31
  defaultanswer: { default: "", type: String },
32
- width: { default: "100%", type: String },
32
+ width: { default: undefined, type: String },
33
33
  /**
34
34
  * Active la sélection multiple
35
35
  */
@@ -31,6 +31,7 @@
31
31
  <label
32
32
  class="c-hand"
33
33
  :class="[classLabel, displayLabel ? '' : 'd-none', isDisabled ? 'disabled' : '']"
34
+ :for="isSwitch ? undefined : computedIdCheckbox"
34
35
  @click="clickSlider"
35
36
  >
36
37
  {{ label }}
@@ -73,7 +74,7 @@ function emitClickAction(): void {
73
74
  emit("clickAction");
74
75
  }
75
76
  function clickSlider() {
76
- if (!props.isDisabled) {
77
+ if (!props.isDisabled && props.isSwitch) {
77
78
  emit("update:textInit", !props.textInit);
78
79
  emitClickAction();
79
80
  }
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <section v-if="isInit" class="page-box">
3
+ <!-- TODO à intégrer dans frontoffice -->
3
4
  <router-link
4
5
  v-if="isRolePlaylists && !isPodcastmaker"
5
6
  to="/main/priv/edit/playlist"