5
5
``` ts
6
6
7
7
import { BigNumber } from ' bignumber.js' ;
8
- import { CollSerDesConfig as CollSerDesConfig_2 } from ' ../../documents/collections/ser-des/ser-des.js' ;
8
+ import { CollectionSerDesConfig as CollectionSerDesConfig_2 } from ' ../../documents/collections/ser-des/ser-des.js' ;
9
9
import { Decoder } from ' decoders' ;
10
10
import type { DecoderType } from ' decoders' ;
11
11
import { Monoid as Monoid_2 } from ' ../../lib/opts-handler.js' ;
@@ -319,6 +319,8 @@ export interface BaseSerDesCtx {
319
319
target: SerDesTarget ;
320
320
}
321
321
322
+ export { BigNumber }
323
+
322
324
// @public
323
325
export const blob: (blob : DataAPIBlobLike ) => DataAPIBlob ;
324
326
@@ -350,54 +352,6 @@ export interface Camel2SnakeCaseOptions {
350
352
transformNested? : boolean | ((path : KeyTransformerCtx ) => boolean );
351
353
}
352
354
353
- // @public (undocumented)
354
- export type CollCodec <Class extends CollCodecClass > = InstanceType <Class >;
355
-
356
- // @public (undocumented)
357
- export interface CollCodecClass {
358
- // (undocumented)
359
- [$DeserializeForCollection ]: SerDesFn <CollDesCtx >;
360
- // (undocumented)
361
- new (... args : any []): {
362
- [$SerializeForCollection ]: (ctx : CollSerCtx ) => ReturnType <SerDesFn <any >>;
363
- };
364
- }
365
-
366
- // @public (undocumented)
367
- export class CollCodecs {
368
- // Warning: (ae-forgotten-export) The symbol "CollCustomCodecOpts" needs to be exported by the entry point index.d.ts
369
- //
370
- // (undocumented)
371
- static custom(opts : CollCustomCodecOpts ): RawCollCodecs ;
372
- // (undocumented)
373
- static Defaults: {
374
- $date: RawCollCodecs ;
375
- $vector: RawCollCodecs ;
376
- $uuid: RawCollCodecs ;
377
- $objectId: RawCollCodecs ;
378
- };
379
- // Warning: (ae-forgotten-export) The symbol "CollNominalCodecOpts" needs to be exported by the entry point index.d.ts
380
- //
381
- // (undocumented)
382
- static forId(optsOrClass : CollNominalCodecOpts & {
383
- class? : SomeConstructor ;
384
- } | CollCodecClass ): RawCollCodecs ;
385
- // (undocumented)
386
- static forName(name : string , optsOrClass : CollNominalCodecOpts | CollCodecClass ): RawCollCodecs ;
387
- // (undocumented)
388
- static forPath(path : (string | number )[], optsOrClass : CollNominalCodecOpts | CollCodecClass ): RawCollCodecs ;
389
- // Warning: (ae-forgotten-export) The symbol "CollTypeCodecOpts" needs to be exported by the entry point index.d.ts
390
- //
391
- // (undocumented)
392
- static forType(type : string , optsOrClass : CollTypeCodecOpts | CollCodecClass ): RawCollCodecs ;
393
- }
394
-
395
- // @public (undocumented)
396
- export interface CollDesCtx extends BaseDesCtx <CollDesCtx > {
397
- // (undocumented)
398
- getNumRepForPath? : GetCollNumRepFn ;
399
- }
400
-
401
355
// @public
402
356
export class Collection <WSchema extends SomeDoc = SomeDoc , RSchema extends WithId <SomeDoc > = FoundDoc <WSchema >> {
403
357
// Warning: (ae-forgotten-export) The symbol "DataAPIHttpClient" needs to be exported by the entry point index.d.ts
@@ -445,6 +399,48 @@ export type CollectionArrayUpdate<Schema> = {
445
399
[K in keyof Schema as any [] extends Schema [K ] ? K : never ]? : PickArrayTypes <Schema [K ]>;
446
400
};
447
401
402
+ // @public (undocumented)
403
+ export type CollectionCodec <Class extends CollectionCodecClass > = InstanceType <Class >;
404
+
405
+ // @public (undocumented)
406
+ export interface CollectionCodecClass {
407
+ // (undocumented)
408
+ [$DeserializeForCollection ]: SerDesFn <CollectionDesCtx >;
409
+ // (undocumented)
410
+ new (... args : any []): {
411
+ [$SerializeForCollection ]: (ctx : CollectionSerCtx ) => ReturnType <SerDesFn <any >>;
412
+ };
413
+ }
414
+
415
+ // @public (undocumented)
416
+ export class CollectionCodecs {
417
+ // Warning: (ae-forgotten-export) The symbol "CollCustomCodecOpts" needs to be exported by the entry point index.d.ts
418
+ //
419
+ // (undocumented)
420
+ static custom(opts : CollCustomCodecOpts ): RawCollCodecs ;
421
+ // (undocumented)
422
+ static Defaults: {
423
+ $date: RawCollCodecs ;
424
+ $vector: RawCollCodecs ;
425
+ $uuid: RawCollCodecs ;
426
+ $objectId: RawCollCodecs ;
427
+ };
428
+ // Warning: (ae-forgotten-export) The symbol "CollNominalCodecOpts" needs to be exported by the entry point index.d.ts
429
+ //
430
+ // (undocumented)
431
+ static forId(optsOrClass : CollNominalCodecOpts & {
432
+ class? : SomeConstructor ;
433
+ } | CollectionCodecClass ): RawCollCodecs ;
434
+ // (undocumented)
435
+ static forName(name : string , optsOrClass : CollNominalCodecOpts | CollectionCodecClass ): RawCollCodecs ;
436
+ // (undocumented)
437
+ static forPath(path : (string | number )[], optsOrClass : CollNominalCodecOpts | CollectionCodecClass ): RawCollCodecs ;
438
+ // Warning: (ae-forgotten-export) The symbol "CollTypeCodecOpts" needs to be exported by the entry point index.d.ts
439
+ //
440
+ // (undocumented)
441
+ static forType(type : string , optsOrClass : CollTypeCodecOpts | CollectionCodecClass ): RawCollCodecs ;
442
+ }
443
+
448
444
// @public
449
445
export type CollectionCurrentDate <Schema > = {
450
446
[K in keyof Schema as Schema [K ] extends Date | {
@@ -496,6 +492,12 @@ export interface CollectionDescriptor {
496
492
name: string ;
497
493
}
498
494
495
+ // @public (undocumented)
496
+ export interface CollectionDesCtx extends BaseDesCtx <CollectionDesCtx > {
497
+ // (undocumented)
498
+ getNumRepForPath? : GetCollNumRepFn ;
499
+ }
500
+
499
501
// @public
500
502
export type CollectionFilter <Schema extends SomeDoc > = {
501
503
[K in keyof ToDotNotation <NoId <Schema >>]? : CollectionFilterExpr <ToDotNotation <NoId <Schema >>[K ]>;
@@ -585,7 +587,7 @@ export interface CollectionOptions extends WithKeyspace {
585
587
embeddingApiKey? : string | EmbeddingHeadersProvider | null ;
586
588
logging? : DataAPILoggingConfig ;
587
589
// @beta
588
- serdes? : CollSerDesConfig ;
590
+ serdes? : CollectionSerDesConfig ;
589
591
timeoutDefaults? : Partial <TimeoutDescriptor >;
590
592
}
591
593
@@ -608,6 +610,20 @@ export type CollectionReplaceOneOptions = GenericReplaceOneOptions;
608
610
// @public
609
611
export type CollectionReplaceOneResult <RSchema > = GenericUpdateResult <IdOf <RSchema >, 0 | 1 >;
610
612
613
+ // @public (undocumented)
614
+ export interface CollectionSerCtx extends BaseSerCtx <CollectionSerCtx > {
615
+ // (undocumented)
616
+ bigNumsEnabled: boolean ;
617
+ }
618
+
619
+ // @public (undocumented)
620
+ export interface CollectionSerDesConfig extends BaseSerDesConfig <CollectionSerCtx , CollectionDesCtx > {
621
+ // (undocumented)
622
+ codecs? : RawCollCodecs [];
623
+ // (undocumented)
624
+ enableBigNumbers? : GetCollNumRepFn | CollNumRepCfg ;
625
+ }
626
+
611
627
// @public
612
628
export interface CollectionUpdateFilter <Schema extends SomeDoc > {
613
629
$addToSet? : CollectionPush <Schema > & SomeDoc ;
@@ -660,20 +676,6 @@ export type CollNumRep = 'number' | 'bigint' | 'bignumber' | 'string' | 'number_
660
676
// @public (undocumented)
661
677
export type CollNumRepCfg = Record <string , CollNumRep >;
662
678
663
- // @public (undocumented)
664
- export interface CollSerCtx extends BaseSerCtx <CollSerCtx > {
665
- // (undocumented)
666
- bigNumsEnabled: boolean ;
667
- }
668
-
669
- // @public (undocumented)
670
- export interface CollSerDesConfig extends BaseSerDesConfig <CollSerCtx , CollDesCtx > {
671
- // (undocumented)
672
- codecs? : RawCollCodecs [];
673
- // (undocumented)
674
- enableBigNumbers? : GetCollNumRepFn | CollNumRepCfg ;
675
- }
676
-
677
679
// @public
678
680
export abstract class CommandEvent extends BaseDataAPIClientEvent {
679
681
// Warning: (ae-forgotten-export) The symbol "DataAPIRequestInfo" needs to be exported by the entry point index.d.ts
@@ -1079,10 +1081,10 @@ export class DataAPITimeoutError extends DataAPIError {
1079
1081
}
1080
1082
1081
1083
// @public
1082
- export class DataAPIVector implements CollCodec <typeof DataAPIVector >, TableCodec <typeof DataAPIVector > {
1083
- static [$DeserializeForCollection ](value : any , ctx : CollDesCtx ): readonly [0 , (DataAPIVector | undefined )? ];
1084
+ export class DataAPIVector implements CollectionCodec <typeof DataAPIVector >, TableCodec <typeof DataAPIVector > {
1085
+ static [$DeserializeForCollection ](value : any , ctx : CollectionDesCtx ): readonly [0 , (DataAPIVector | undefined )? ];
1084
1086
static [$DeserializeForTable ](value : any , ctx : TableDesCtx ): readonly [0 , (DataAPIVector | undefined )? ];
1085
- [$SerializeForCollection ](ctx : CollSerCtx ): readonly [0 , (number [] | {
1087
+ [$SerializeForCollection ](ctx : CollectionSerCtx ): readonly [0 , (number [] | {
1086
1088
$binary: string ;
1087
1089
} | undefined )? ];
1088
1090
[$SerializeForTable ](ctx : TableSerCtx ): readonly [0 , (number [] | {
@@ -1179,7 +1181,7 @@ export interface DbOptions {
1179
1181
1180
1182
// @public
1181
1183
export interface DbSerDesConfig {
1182
- collection? : Omit <CollSerDesConfig , ' mutateInPlace' >;
1184
+ collection? : Omit <CollectionSerDesConfig , ' mutateInPlace' >;
1183
1185
mutateInPlace? : boolean ;
1184
1186
table? : Omit <TableSerDesConfig , ' mutateInPlace' >;
1185
1187
}
@@ -1619,7 +1621,7 @@ export abstract class KeyTransformer {
1619
1621
export const LIB_NAME = " astra-db-ts" ;
1620
1622
1621
1623
// @public
1622
- export const LIB_VERSION = " 2.0.0-preview.3 " ;
1624
+ export const LIB_VERSION = " 2.0.0-preview.4 " ;
1623
1625
1624
1626
// @public
1625
1627
export interface ListAstraDatabasesOptions extends WithTimeout <' databaseAdminTimeoutMs' > {
@@ -1765,9 +1767,9 @@ export class NumCoercionError extends Error {
1765
1767
}
1766
1768
1767
1769
// @public
1768
- export class ObjectId implements CollCodec <typeof ObjectId > {
1769
- static [$DeserializeForCollection ](value : any , ctx : CollDesCtx ): readonly [0 , (ObjectId | undefined )? ];
1770
- [$SerializeForCollection ](ctx : CollSerCtx ): readonly [0 , ({
1770
+ export class ObjectId implements CollectionCodec <typeof ObjectId > {
1771
+ static [$DeserializeForCollection ](value : any , ctx : CollectionDesCtx ): readonly [0 , (ObjectId | undefined )? ];
1772
+ [$SerializeForCollection ](ctx : CollectionSerCtx ): readonly [0 , ({
1771
1773
$objectId: string ;
1772
1774
} | undefined )? ];
1773
1775
constructor (id ? : string | number | null , validate ? : boolean );
@@ -2244,10 +2246,10 @@ export class UsernamePasswordTokenProvider extends TokenProvider {
2244
2246
}
2245
2247
2246
2248
// @public
2247
- export class UUID implements CollCodec <typeof UUID >, TableCodec <typeof UUID > {
2248
- static [$DeserializeForCollection ](value : any , ctx : CollDesCtx ): readonly [0 , (UUID | undefined )? ];
2249
+ export class UUID implements CollectionCodec <typeof UUID >, TableCodec <typeof UUID > {
2250
+ static [$DeserializeForCollection ](value : any , ctx : CollectionDesCtx ): readonly [0 , (UUID | undefined )? ];
2249
2251
static [$DeserializeForTable ](value : any , ctx : TableDesCtx ): readonly [0 , (UUID | undefined )? ];
2250
- [$SerializeForCollection ](ctx : CollSerCtx ): readonly [0 , ({
2252
+ [$SerializeForCollection ](ctx : CollectionSerCtx ): readonly [0 , ({
2251
2253
$uuid: string ;
2252
2254
} | undefined )? ];
2253
2255
[$SerializeForTable ](ctx : TableSerCtx ): readonly [0 , (string | undefined )? ];
@@ -2316,9 +2318,6 @@ export interface WithTimeout<Timeouts extends keyof TimeoutDescriptor> {
2316
2318
timeout? : number | Pick <Partial <TimeoutDescriptor >, ' requestTimeoutMs' | Timeouts >;
2317
2319
}
2318
2320
2319
-
2320
- export * from " bignumber.js" ;
2321
-
2322
2321
// Warnings were encountered during analysis:
2323
2322
//
2324
2323
// dist/esm/documents/collections/ser-des/codecs.d.ts:41:9 - (ae-forgotten-export) The symbol "RawCollCodecs" needs to be exported by the entry point index.d.ts
0 commit comments