@lokalise/polyglot-sdk 8.0.0 → 8.0.1

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.
Files changed (2) hide show
  1. package/README.md +19 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -46,7 +46,6 @@ const polyglotResponse = await this.polyglotClient.translateAsync(
46
46
  segments: [
47
47
  {
48
48
  id: '018f5231-d61d-aec6-c6b2-ed676bbab868',
49
- position: 0,
50
49
  value: 'Hello world',
51
50
  },
52
51
  ],
@@ -72,34 +71,25 @@ Results callback will have the following structure:
72
71
  // Authorization: Bearer <callbackToken>
73
72
 
74
73
  {
75
- "data": {
76
- "originCorrelationId": "018f3958-a3bb-05cc-2243-58976a74cd35#1",
77
- "errors": [],
78
- "sourceLocale": "en-US",
79
- "targetLocale": "es",
80
- "contentUnits": [
81
- {
82
- "id": "018f3414-7070-e998-3628-5ab485306760",
83
- "locale": "es",
84
- "segments": [
85
- {
86
- "id": "018f3414-7070-e998-3628-5ab485306761",
87
- "position": 0,
88
- "translation": "mundo",
89
- "integration": "ChatGPT-4",
90
- "score": 0.88
91
- },
92
- {
93
- "id": "018f3414-7070-e998-3628-5ab485306762",
94
- "position": 1,
95
- "translation": "hola",
96
- "integration": "ChatGPT-4",
97
- "score": null
98
- }
99
- ]
100
- }
101
- ]
102
- }
74
+ "originCorrelationId": "018f3958-a3bb-05cc-2243-58976a74cd35#1",
75
+ "data": [
76
+ {
77
+ "contentUnitId": "018f3414-7070-e998-3628-5ab485306760",
78
+ "segmentId": "018f3414-7070-e998-3628-5ab485306761",
79
+ "polyglotRefId": "fc9d0719-4470-4756-a655-be925c2b56e8",
80
+ "integration": "ChatGPT-4",
81
+ "translation": "mundo",
82
+ "score": 0.88
83
+ },
84
+ {
85
+ "contentUnitId": "018f3414-7070-e998-3628-5ab485306760",
86
+ "segmentId": "018f3414-7070-e998-3628-5ab485306762",
87
+ "polyglotRefId": "403f65d3-81ab-4204-8bda-4860f08c5258",
88
+ "integration": "ChatGPT-4",
89
+ "translation": "hola",
90
+ "score": null
91
+ }
92
+ ]
103
93
  }
104
94
  ```
105
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/polyglot-sdk",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"