4
4
5
5
``` ts
6
6
7
- import type { AxiosError } from ' axios ' ;
8
- import { AxiosResponse } from ' axios ' ;
7
+ import { context as context_2 } from ' fetch-h2 ' ;
8
+ import { Headers as Headers_2 } from ' fetch-h2/dist/lib/headers ' ;
9
9
import TypedEmitter from ' typed-emitter' ;
10
10
11
11
// @public
@@ -57,8 +57,10 @@ export class AdminCommandStartedEvent extends AdminCommandEvent {
57
57
58
58
// @public
59
59
export class AdminCommandSucceededEvent extends AdminCommandEvent {
60
+ // Warning: (ae-forgotten-export) The symbol "GuaranteedAPIResponse" needs to be exported by the entry point index.d.ts
61
+ //
60
62
// @internal
61
- constructor (info : DevOpsAPIRequestInfo , longRunning : boolean , resp : AxiosResponse , started : number );
63
+ constructor (info : DevOpsAPIRequestInfo , longRunning : boolean , resp : GuaranteedAPIResponse , started : number );
62
64
readonly duration: number ;
63
65
readonly resBody? : Record <string , any >;
64
66
}
@@ -115,10 +117,10 @@ export class AstraAdmin {
115
117
116
118
// @public
117
119
export class AstraDbAdmin extends DbAdmin {
118
- // Warning: (ae-forgotten-export) The symbol "HttpClient " needs to be exported by the entry point index.d.ts
120
+ // Warning: (ae-forgotten-export) The symbol "InternalRootClientOpts " needs to be exported by the entry point index.d.ts
119
121
//
120
122
// @internal
121
- constructor (_db : Db , httpClient : HttpClient , options : InternalRootClientOpts [ ' adminOptions ' ] );
123
+ constructor (_db : Db , options : InternalRootClientOpts );
122
124
createNamespace(namespace : string , options ? : AdminBlockingOptions ): Promise <void >;
123
125
db(): Db ;
124
126
drop(options ? : AdminBlockingOptions ): Promise <void >;
@@ -294,6 +296,7 @@ export class CursorIsStartedError extends DataAPIError {
294
296
export class DataAPIClient extends DataAPIClientEventEmitterBase {
295
297
constructor (token : string , options ? : DataAPIClientOptions | null );
296
298
admin(options ? : AdminSpawnOptions ): AstraAdmin ;
299
+ close(): Promise <void >;
297
300
db(endpoint : string , options ? : DbSpawnOptions ): Db ;
298
301
db(id : string , region : string , options ? : DbSpawnOptions ): Db ;
299
302
}
@@ -309,6 +312,8 @@ export interface DataAPIClientOptions {
309
312
adminOptions? : AdminSpawnOptions ;
310
313
caller? : Caller | Caller [];
311
314
dbOptions? : DbSpawnOptions ;
315
+ // (undocumented)
316
+ preferHttp2? : boolean ;
312
317
}
313
318
314
319
// @public
@@ -416,22 +421,17 @@ export type DateUpdate<Schema> = {
416
421
};
417
422
418
423
// @public
419
- export class Db implements Disposable {
420
- [Symbol .dispose ](): void ;
424
+ export class Db {
421
425
// @internal
422
426
constructor (endpoint : string , options : InternalRootClientOpts );
423
427
admin(options ? : AdminSpawnOptions ): AstraDbAdmin ;
424
- close(): void ;
425
428
collection<Schema extends SomeDoc = SomeDoc >(name : string , options ? : WithNamespace ): Collection <Schema >;
426
429
collections(options ? : WithNamespace & WithTimeout ): Promise <Collection []>;
427
430
command(command : Record <string , any >, options ? : RunCommandOptions ): Promise <RawDataAPIResponse >;
428
431
createCollection<Schema extends SomeDoc = SomeDoc >(collectionName : string , options ? : CreateCollectionOptions <Schema >): Promise <Collection <Schema >>;
429
432
dropCollection(name : string , options ? : DropCollectionOptions ): Promise <boolean >;
430
- // (undocumented)
431
- httpStrategy(): ' http1' | ' http2' ;
432
433
get id(): string ;
433
434
info(options ? : WithTimeout ): Promise <DatabaseInfo >;
434
- isClosed(): boolean | undefined ;
435
435
listCollections(options : ListCollectionsOptions & {
436
436
nameOnly: true ;
437
437
}): Promise <string []>;
@@ -458,7 +458,6 @@ export interface DbSpawnOptions {
458
458
monitorCommands? : boolean ;
459
459
namespace? : string ;
460
460
token? : string ;
461
- useHttp2? : boolean ;
462
461
}
463
462
464
463
// @public
@@ -513,7 +512,7 @@ export interface DevOpsAPIErrorDescriptor {
513
512
// @public
514
513
export class DevOpsAPIResponseError extends DevOpsAPIError {
515
514
// @internal
516
- constructor (error : AxiosError );
515
+ constructor (resp : GuaranteedAPIResponse );
517
516
readonly errors: DevOpsAPIErrorDescriptor [];
518
517
readonly status? : number ;
519
518
}
@@ -529,7 +528,7 @@ export class DevOpsAPITimeout extends DevOpsAPIError {
529
528
// @public
530
529
export class DevOpsUnexpectedStateError extends DevOpsAPIError {
531
530
// @internal
532
- constructor (message : string , raw ? : AxiosResponse );
531
+ constructor (message : string , raw ? : GuaranteedAPIResponse );
533
532
readonly dbInfo? : FullDatabaseInfo ;
534
533
readonly status? : number ;
535
534
}
@@ -755,24 +754,6 @@ export interface InsertOneResult<Schema> {
755
754
insertedId: IdOf <Schema >;
756
755
}
757
756
758
- // @public (undocumented)
759
- export interface InternalRootClientOpts {
760
- // (undocumented)
761
- adminOptions: AdminSpawnOptions & {
762
- adminToken: string ;
763
- monitorCommands: boolean ;
764
- };
765
- // (undocumented)
766
- caller? : Caller | Caller [];
767
- // (undocumented)
768
- dbOptions: DbSpawnOptions & {
769
- token: string ;
770
- monitorCommands: boolean ;
771
- };
772
- // (undocumented)
773
- emitter: TypedEmitter <DataAPIClientEvents >;
774
- }
775
-
776
757
// @public
777
758
export type InternalUpdateResult <Schema extends SomeDoc , N extends number > = (GuaranteedUpdateOptions <N > & UpsertedUpdateOptions <Schema >) | (GuaranteedUpdateOptions <N > & NoUpsertUpdateOptions );
778
759
0 commit comments