@meltwater/conversations-api-services 1.0.10 → 1.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltwater/conversations-api-services",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Repository to contain all conversations api services shared across our services",
5
5
  "type": "module",
6
6
  "main": "src/data-access/index.js",
@@ -65,7 +65,7 @@ export class LinkedInApiClient {
65
65
  'X-RestLi-Protocol-Version': configuration.get(
66
66
  'LINKEDIN_API_VERSION'
67
67
  ),
68
- 'LinkedIn-Version': '202305',
68
+ 'LinkedIn-Version': '202311',
69
69
  });
70
70
  } else {
71
71
  loggerChild.debug(`${documentId} - sending to linkedin `, {
@@ -80,7 +80,7 @@ export class LinkedInApiClient {
80
80
  'X-RestLi-Protocol-Version': configuration.get(
81
81
  'LINKEDIN_API_VERSION'
82
82
  ),
83
- 'LinkedIn-Version': '202305',
83
+ 'LinkedIn-Version': '202311',
84
84
  })
85
85
  .send(payload);
86
86
  }
@@ -153,7 +153,7 @@ export class LinkedInApiClient {
153
153
  'X-RestLi-Protocol-Version': configuration.get(
154
154
  'LINKEDIN_API_VERSION'
155
155
  ),
156
- 'LinkedIn-Version': '202305',
156
+ 'LinkedIn-Version': '202311',
157
157
  });
158
158
 
159
159
  loggerChild.info(
@@ -247,7 +247,7 @@ export class LinkedInApiClient {
247
247
  'X-RestLi-Protocol-Version': configuration.get(
248
248
  'LINKEDIN_API_VERSION'
249
249
  ),
250
- 'LinkedIn-Version': '202305',
250
+ 'LinkedIn-Version': '202311',
251
251
  })
252
252
  .send(body);
253
253
 
@@ -301,7 +301,7 @@ export class LinkedInApiClient {
301
301
  'X-RestLi-Protocol-Version': configuration.get(
302
302
  'LINKEDIN_API_VERSION'
303
303
  ),
304
- 'LinkedIn-Version': '202305',
304
+ 'LinkedIn-Version': '202311',
305
305
  })
306
306
  .send(body);
307
307
 
@@ -340,7 +340,7 @@ export class LinkedInApiClient {
340
340
  'X-RestLi-Protocol-Version': configuration.get(
341
341
  'LINKEDIN_API_VERSION'
342
342
  ),
343
- 'LinkedIn-Version': '202305',
343
+ 'LinkedIn-Version': '202311',
344
344
  })
345
345
  .then((result) => result.body);
346
346
  } catch (error) {
@@ -373,7 +373,7 @@ export class LinkedInApiClient {
373
373
  'X-RestLi-Protocol-Version': configuration.get(
374
374
  'LINKEDIN_API_VERSION'
375
375
  ),
376
- 'LinkedIn-Version': '202305',
376
+ 'LinkedIn-Version': '202311',
377
377
  })
378
378
  .then((result) => result.body);
379
379
  } catch (error) {
@@ -409,7 +409,7 @@ export class LinkedInApiClient {
409
409
  'X-RestLi-Protocol-Version': configuration.get(
410
410
  'LINKEDIN_API_VERSION'
411
411
  ),
412
- 'LinkedIn-Version': '202305',
412
+ 'LinkedIn-Version': '202311',
413
413
  });
414
414
  } catch (error) {
415
415
  loggerChild.error('Error in getAllStats ' + error, error);
@@ -478,7 +478,7 @@ export class LinkedInApiClient {
478
478
  'X-RestLi-Protocol-Version': configuration.get(
479
479
  'LINKEDIN_API_VERSION'
480
480
  ),
481
- 'LinkedIn-Version': '202305',
481
+ 'LinkedIn-Version': '202311',
482
482
  });
483
483
  } catch (error) {
484
484
  loggerChild.error('Error in getImageMedia ' + error, error);
@@ -538,7 +538,7 @@ export class LinkedInApiClient {
538
538
  'X-RestLi-Protocol-Version': configuration.get(
539
539
  'LINKEDIN_API_VERSION'
540
540
  ),
541
- 'LinkedIn-Version': '202305',
541
+ 'LinkedIn-Version': '202311',
542
542
  });
543
543
  } catch (error) {
544
544
  loggerChild.error('Error in getVideoMedia ' + error, error);
@@ -622,7 +622,7 @@ export class LinkedInApiClient {
622
622
  'X-RestLi-Protocol-Version': configuration.get(
623
623
  'LINKEDIN_API_VERSION'
624
624
  ),
625
- 'LinkedIn-Version': '202305',
625
+ 'LinkedIn-Version': '202311',
626
626
  })
627
627
  .then((result) => result.body);
628
628
  } catch (error) {
@@ -653,7 +653,7 @@ export class LinkedInApiClient {
653
653
  'X-RestLi-Protocol-Version': configuration.get(
654
654
  'LINKEDIN_API_VERSION'
655
655
  ),
656
- 'LinkedIn-Version': '202305',
656
+ 'LinkedIn-Version': '202311',
657
657
  })
658
658
  .send(data)
659
659
  .catch((err) => {
@@ -418,8 +418,10 @@ export class TikTokApiClient {
418
418
  //very small chance we get externalid instead of id
419
419
  const video_id =
420
420
  discussionType === 're'
421
- ? (parentDoc.metaData.inReplyTo.id ? parentDoc.metaData.inReplyTo.id : parentDoc.metaData.inReplyTo.externalId)
422
- : (document.metaData.inReplyTo.id ? document.metaData.inReplyTo.id : document.metaData.inReplyTo.externalId);
421
+ ? parentDoc?.metaData?.inReplyTo?.id ||
422
+ parentDoc?.metaData?.inReplyTo?.externalId
423
+ : document?.metaData?.inReplyTo?.id ||
424
+ document?.metaData?.inReplyTo?.externalId;
423
425
 
424
426
  const { body: publishedMessage } =
425
427
  (await this.sendPost({
@@ -446,8 +448,8 @@ export class TikTokApiClient {
446
448
 
447
449
  const video_id =
448
450
  discussionType === 're'
449
- ? parentDoc.metaData.inReplyTo.id
450
- : document.metaData.inReplyTo.id;
451
+ ? parentDoc?.metaData?.inReplyTo?.id
452
+ : document?.metaData?.inReplyTo?.id;
451
453
 
452
454
  const { body: publishedMessage } =
453
455
  (await this.sendPost({