Skip to content

Commit 252356a

Browse files
authored
fix(client): adjust DefaultValues so it contains defaultPageSize (#210)
1 parent 74b9c41 commit 252356a

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

packages/clients/src/bridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export { isJSONObject } from './helpers/json'
33
export { waitForResource } from './internal/async/interval-retrier'
44
export type { WaitForOptions } from './internal/async/interval-retrier'
55
export { API } from './scw/api'
6-
export type { DefaultValues } from './scw/client-ini-profile'
6+
export type { DefaultValues } from './scw/client-settings'
77
export type {
88
Money,
99
ServiceInfo,

packages/clients/src/internals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type { RequestInterceptor } from './internal/interceptors/request'
44
export type { ResponseInterceptor } from './internal/interceptors/response'
55
export { API } from './scw/api'
66
export { authenticateWithSessionToken } from './scw/auth'
7-
export type { DefaultValues } from './scw/client-ini-profile'
7+
export type { DefaultValues } from './scw/client-settings'
88
export {
99
marshalScwFile,
1010
marshalMoney,

packages/clients/src/scw/client-ini-profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface AuthenticationSecrets {
2828
*
2929
* @public
3030
*/
31-
export interface DefaultValues {
31+
export interface ProfileDefaultValues {
3232
/**
3333
* APIURL overrides the API URL of the Scaleway API to the given URL.
3434
* Change that if you want to direct requests to a different endpoint.
@@ -65,7 +65,7 @@ export interface DefaultValues {
6565
*
6666
* @public
6767
*/
68-
export type Profile = Partial<DefaultValues & AuthenticationSecrets>
68+
export type Profile = Partial<ProfileDefaultValues & AuthenticationSecrets>
6969

7070
/**
7171
* Verifies that the payload contains both the accessKey and the secretKey.

packages/clients/src/scw/client-settings.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ import {
77
isURL,
88
isZone,
99
} from '../internal/validations/string-validation'
10-
import type { DefaultValues } from './client-ini-profile'
10+
import type { ProfileDefaultValues } from './client-ini-profile'
11+
12+
/**
13+
* Holds default values of settings.
14+
*
15+
* @public
16+
*/
17+
export type DefaultValues = ProfileDefaultValues & {
18+
/**
19+
* The default number of results when requesting a paginated resource.
20+
*/
21+
defaultPageSize?: number
22+
}
1123

1224
/**
1325
* Settings hold the values of all client options.

0 commit comments

Comments
 (0)