Skip to content

Commit deae166

Browse files
committed
v14.2.0
1 parent 9b47333 commit deae166

File tree

15 files changed

+287
-158
lines changed

15 files changed

+287
-158
lines changed

dist/main.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface PaginatedResult$1<T = any> {
1111
readonly resultsPerPage: number;
1212
readonly currentPage: number;
1313
readonly items: T[];
14+
readonly responseTooBig: boolean;
1415
hasNextPage(): boolean;
1516
hasPrevPage(): boolean;
1617
isLastPage(): boolean;
@@ -243,6 +244,7 @@ declare class PaginatedResult<T> implements PaginatedResult$1 {
243244
totalPages: number;
244245
resultsPerPage: number;
245246
currentPage: number;
247+
responseTooBig: boolean;
246248
items: T[];
247249
constructor(items: T[], headers: Headers);
248250
hasNextPage(): boolean;
@@ -436,8 +438,9 @@ declare abstract class BaseCollection<ElementType, SecondaryType = ElementType>
436438
/**
437439
* Return the raw JSON as-is.
438440
* @param json The raw JSON object or array returned by the API.
441+
* @param _headers The response headers (if needed).
439442
*/
440-
protected returnBareJSON<T>(json: Keyable | Keyable[]): T;
443+
protected returnBareJSON<T>(json: Keyable | Keyable[], _headers: Headers): T;
441444
/**
442445
* Convert a single object into an array if it's not already an array.
443446
* @param raw_body The raw request body.
@@ -466,6 +469,7 @@ declare abstract class BaseCollection<ElementType, SecondaryType = ElementType>
466469
* @throws Error if no URI or prefixURI is provided.
467470
*/
468471
protected getUri(uri: string | null): string;
472+
protected isResponseTooBig(headers: Headers): boolean;
469473
/**
470474
* Determine if the response headers indicate pagination.
471475
* @param headers The response headers.
@@ -658,6 +662,7 @@ type DownloadBundle = {
658662
project_id: string;
659663
bundle_url: string;
660664
branch?: string;
665+
responseTooBig?: boolean;
661666
};
662667
type FileDeleted = {
663668
project_id: string;
@@ -750,6 +755,7 @@ declare class Files extends BaseCollection<File, QueuedProcess> {
750755
protected get rootElementName(): string;
751756
protected get secondaryElementClass(): new (json: Keyable) => QueuedProcess;
752757
protected get secondaryElementNameSingular(): string;
758+
protected returnBareJSON<T>(json: Keyable | Keyable[], headers: Headers): T;
753759
list(request_params: ListFileParams): Promise<PaginatedResult$1<File>>;
754760
upload(project_id: string, upload: UploadFileParams): Promise<QueuedProcess>;
755761
download(project_id: string, download: DownloadFileParams): Promise<DownloadBundle>;

dist/main.js

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (8.0.1)
4+
activesupport (8.0.2)
55
base64
66
benchmark (>= 0.3)
77
bigdecimal
@@ -27,7 +27,7 @@ GEM
2727
commonmarker (0.23.11)
2828
concurrent-ruby (1.3.5)
2929
connection_pool (2.5.0)
30-
csv (3.3.2)
30+
csv (3.3.3)
3131
dnsruby (1.72.4)
3232
base64 (~> 0.2.0)
3333
logger (~> 1.6.5)
@@ -218,7 +218,7 @@ GEM
218218
gemoji (>= 3, < 5)
219219
html-pipeline (~> 2.2)
220220
jekyll (>= 3.0, < 5.0)
221-
json (2.10.1)
221+
json (2.10.2)
222222
kramdown (2.4.0)
223223
rexml
224224
kramdown-parser-gfm (1.1.0)
@@ -233,12 +233,12 @@ GEM
233233
jekyll (>= 3.5, < 5.0)
234234
jekyll-feed (~> 0.9)
235235
jekyll-seo-tag (~> 2.1)
236-
minitest (5.25.4)
236+
minitest (5.25.5)
237237
net-http (0.6.0)
238238
uri
239-
nokogiri (1.18.3-x64-mingw-ucrt)
239+
nokogiri (1.18.5-x64-mingw-ucrt)
240240
racc (~> 1.4)
241-
nokogiri (1.18.3-x86_64-linux-gnu)
241+
nokogiri (1.18.5-x86_64-linux-gnu)
242242
racc (~> 1.4)
243243
octokit (4.25.1)
244244
faraday (>= 1, < 3)

docs/additional_info/changelog.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 14.2.0 (20-Mar-2025)
4+
5+
* Added `responseTooBig` attribute to paginated responses and file download responses. For example:
6+
7+
```js
8+
const response = await lokaliseApi.files().download(projectId, params);
9+
10+
response.responseTooBig; // false
11+
12+
const keys = await lokaliseApi.keys().list({ project_id: projectId });
13+
14+
keys.responseTooBig; // true
15+
```
16+
17+
* This attribute is introduced to help users prepare for the upcoming changes to the API.
18+
319
## 14.1.0 (11-Mar-2025)
420

521
* Added `uuid` fields to contrbiturs and projects for internal purposes

0 commit comments

Comments
 (0)