cardus 0.0.72 → 0.0.73

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/index.js CHANGED
@@ -193,7 +193,9 @@ class IntegrationManager {
193
193
  const { configurationService, llmAPIService } = this.services;
194
194
  const insert = (data, tempShimpmentId) => {
195
195
  data.forEach((tempContent) => {
196
- this.dataToInsert.contents.push(Object.assign(Object.assign({}, tempContent), { id_envio: tempShimpmentId }));
196
+ if (tempContent.contenido) {
197
+ this.dataToInsert.contents.push(Object.assign(Object.assign({}, tempContent), { id_envio: tempShimpmentId }));
198
+ }
197
199
  });
198
200
  };
199
201
  // Limpia los contenidos para eliminar valores no deseados
@@ -214,6 +216,7 @@ class IntegrationManager {
214
216
  ? yield llmAPIService.getTaricCode('chatgpt', detail.bulto.nombre_producto)
215
217
  : null;
216
218
  return {
219
+ id_envio: detail.id_envio,
217
220
  id_usuario: idUsuario,
218
221
  contenido: detail.bulto.nombre_producto,
219
222
  valor: detail.bulto.valor || getRandomContentValue(),
package/index.ts CHANGED
@@ -268,10 +268,12 @@ export class IntegrationManager {
268
268
  tempShimpmentId: number
269
269
  ) => {
270
270
  data.forEach((tempContent) => {
271
- this.dataToInsert.contents.push({
272
- ...tempContent,
273
- id_envio: tempShimpmentId
274
- });
271
+ if (tempContent.contenido) {
272
+ this.dataToInsert.contents.push({
273
+ ...tempContent,
274
+ id_envio: tempShimpmentId
275
+ });
276
+ }
275
277
  });
276
278
  };
277
279
 
@@ -308,6 +310,7 @@ export class IntegrationManager {
308
310
  : null;
309
311
 
310
312
  return {
313
+ id_envio: detail.id_envio,
311
314
  id_usuario: idUsuario,
312
315
  contenido: detail.bulto.nombre_producto,
313
316
  valor: detail.bulto.valor || getRandomContentValue(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cardus",
3
- "version": "0.0.72",
3
+ "version": "0.0.73",
4
4
  "description": "an integration manager",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/types/index.ts CHANGED
@@ -295,6 +295,7 @@ export type CountriesService = {
295
295
  };
296
296
 
297
297
  export type UserDefaultConfigurationContent = {
298
+ id_envio: number;
298
299
  id_usuario: number;
299
300
  contenido: string;
300
301
  valor: number;