Skip to content

Commit 75e6036

Browse files
committed
Marked additional properties internal
1 parent 1d82966 commit 75e6036

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

src/api/data-api-http-client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ type ExecuteCommandOptions = TimeoutOptions & {
3434
namespace?: string;
3535
}
3636

37+
/**
38+
* @internal
39+
*/
3740
export class DataApiHttpClient extends HttpClient {
3841
public collection?: string;
3942
public namespace?: string;
@@ -115,6 +118,9 @@ const mkFauxErroredResponse = (message: string): RawDataApiResponse => {
115118
return { errors: [{ message }] };
116119
}
117120

121+
/**
122+
* @internal
123+
*/
118124
export function replacer(this: any, key: string, value: any): any {
119125
if (typeof value === 'bigint') {
120126
return Number(value);
@@ -141,6 +147,9 @@ export function replacer(this: any, key: string, value: any): any {
141147
return value;
142148
}
143149

150+
/**
151+
* @internal
152+
*/
144153
export function reviver(_: string, value: any): any {
145154
if (!value) {
146155
return value;
@@ -157,6 +166,9 @@ export function reviver(_: string, value: any): any {
157166
return value;
158167
}
159168

169+
/**
170+
* @internal
171+
*/
160172
export function handleIfErrorResponse(response: any, command: Record<string, any>) {
161173
if (response.errors && response.errors.length > 0) {
162174
throw mkRespErrorFromResponse(DataAPIResponseError, command, response);

src/api/devops-api-http-client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ interface LongRunningRequestInfo {
3939
options: AdminBlockingOptions | undefined,
4040
}
4141

42+
/**
43+
* @internal
44+
*/
4245
export class DevopsApiHttpClient extends HttpClient {
4346
constructor(props: HTTPClientOptions) {
4447
super(props);

src/api/http-client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import { HTTP2Strategy } from '@/src/api/http2';
1919
import { Mutable } from '@/src/data-api/types/utils';
2020
import { Caller } from '@/src/client';
2121

22+
/**
23+
* @internal
24+
*/
2225
export class HttpClient {
2326
public readonly baseUrl: string;
2427
public readonly userAgent: string;

src/api/http1.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ axiosAgent.interceptors.response.use((response) => {
4747
return response;
4848
});
4949

50+
/**
51+
* @internal
52+
*/
5053
export const HTTP1AuthHeaderFactories = {
5154
DataApi(token: string) {
5255
return { [DEFAULT_DATA_API_AUTH_HEADER]: token };
@@ -56,6 +59,9 @@ export const HTTP1AuthHeaderFactories = {
5659
},
5760
}
5861

62+
/**
63+
* @internal
64+
*/
5965
export class HTTP1Strategy implements HTTPRequestStrategy {
6066
constructor(
6167
private readonly _authHeaderFactory: (token: string) => Record<string, string>,

src/api/http2.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import * as http2 from 'http2';
1616
import { HTTPRequestStrategy, GuaranteedAPIResponse, InternalHTTPRequestInfo } from '@/src/api/types';
1717

18+
/**
19+
* @internal
20+
*/
1821
export class HTTP2Strategy implements HTTPRequestStrategy {
1922
#session: http2.ClientHttp2Session;
2023

src/api/timeout-managers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export type TimeoutOptions = {
4444
export type MkTimeoutError = (ctx: InternalHTTPRequestInfo) => Error;
4545

4646
/**
47-
* A more complex timeout manager that tracks the remaining time for multiple calls, starting from the first call.
48-
* This is useful for scenarios where multiple calls are made in sequence, and the timeout should be shared among them,
49-
* e.g. {@link Collection.insertMany}.
47+
* Tracks the remaining time before a timeout occurs. Can be used for both single and multi-call timeout management.
48+
*
49+
* The first call to `msRemaining` will start the timer.
5050
*
5151
* @internal
5252
*/

0 commit comments

Comments
 (0)