@cfworker/cosmos 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +285 -0
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/response.js +60 -0
- package/dist/{retry.d.ts → cjs/retry.d.ts} +1 -1
- package/dist/cjs/retry.js +29 -0
- package/dist/cjs/session.js +55 -0
- package/dist/cjs/signer.js +49 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/util.js +42 -0
- package/dist/esm/client.d.ts +144 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/response.d.ts +24 -0
- package/dist/esm/retry.d.ts +21 -0
- package/dist/esm/session.d.ts +24 -0
- package/dist/esm/signer.d.ts +12 -0
- package/dist/esm/types.d.ts +62 -0
- package/dist/esm/util.d.ts +5 -0
- package/dist/tsconfig-cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -6
- package/src/client.ts +26 -10
- package/src/response.ts +9 -9
- package/src/retry.ts +1 -1
- package/src/session.ts +3 -3
- package/src/signer.ts +7 -4
- package/src/util.ts +2 -2
- /package/dist/{client.d.ts → cjs/client.d.ts} +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{response.d.ts → cjs/response.d.ts} +0 -0
- /package/dist/{session.d.ts → cjs/session.d.ts} +0 -0
- /package/dist/{signer.d.ts → cjs/signer.d.ts} +0 -0
- /package/dist/{types.d.ts → cjs/types.d.ts} +0 -0
- /package/dist/{util.d.ts → cjs/util.d.ts} +0 -0
- /package/dist/{client.js → esm/client.js} +0 -0
- /package/dist/{index.js → esm/index.d.ts} +0 -0
- /package/dist/{response.js → esm/response.js} +0 -0
- /package/dist/{retry.js → esm/retry.js} +0 -0
- /package/dist/{session.js → esm/session.js} +0 -0
- /package/dist/{signer.js → esm/signer.js} +0 -0
- /package/dist/{types.js → esm/types.js} +0 -0
- /package/dist/{util.js → esm/util.js} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { FeedResponse, ItemResponse } from './response.js';
|
|
2
|
+
import { RetryPolicy } from './retry.js';
|
|
3
|
+
import { SessionContainer } from './session.js';
|
|
4
|
+
import { Collection, ConnectionInfo, ConsistencyLevel, Database, Document, IndexingDirective, IndexingPolicy, OfferType, PartitionKeyDefinition, Resource } from './types.js';
|
|
5
|
+
export type CosmosClientConfig = (ConnectionInfo & CosmosClientConfigBase) | ({
|
|
6
|
+
connectionString: string;
|
|
7
|
+
} & CosmosClientConfigBase);
|
|
8
|
+
interface CosmosClientConfigBase {
|
|
9
|
+
retryPolicy?: RetryPolicy;
|
|
10
|
+
consistencyLevel?: ConsistencyLevel;
|
|
11
|
+
dbId?: string;
|
|
12
|
+
collId?: string;
|
|
13
|
+
sessions?: SessionContainer;
|
|
14
|
+
enableCrossPartitionQueries?: boolean;
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
}
|
|
17
|
+
export declare class CosmosClient {
|
|
18
|
+
private readonly endpoint;
|
|
19
|
+
private readonly signer;
|
|
20
|
+
private readonly retryPolicy;
|
|
21
|
+
private readonly consistencyLevel;
|
|
22
|
+
private readonly dbId;
|
|
23
|
+
private readonly collId;
|
|
24
|
+
private readonly enableCrossPartitionQueries;
|
|
25
|
+
private readonly systemFetch;
|
|
26
|
+
readonly sessions: SessionContainer;
|
|
27
|
+
requestCharges: number;
|
|
28
|
+
retries: {
|
|
29
|
+
count: number;
|
|
30
|
+
delayMs: number;
|
|
31
|
+
};
|
|
32
|
+
constructor(config: CosmosClientConfig);
|
|
33
|
+
getDatabases(args?: GetDatabasesArgs): Promise<FeedResponse<Database>>;
|
|
34
|
+
getDatabase(args?: GetDatabaseArgs): Promise<ItemResponse<Database>>;
|
|
35
|
+
getCollections(args?: GetCollectionsArgs): Promise<FeedResponse<Collection>>;
|
|
36
|
+
getCollection(args?: GetCollectionArgs): Promise<ItemResponse<Collection>>;
|
|
37
|
+
createCollection(args: CreateCollectionArgs): Promise<ItemResponse<Collection>>;
|
|
38
|
+
replaceCollection(args: ReplaceCollectionArgs): Promise<ItemResponse<Collection>>;
|
|
39
|
+
deleteCollection(args?: DeleteCollectionArgs): Promise<Response>;
|
|
40
|
+
getDocuments<T extends Resource>(args: GetDocumentsArgs): Promise<FeedResponse<T & Document>>;
|
|
41
|
+
getDocument<T extends Resource>(args: GetDocumentArgs): Promise<ItemResponse<T & Document>>;
|
|
42
|
+
createDocument<T extends Resource>(args: CreateDocumentArgs): Promise<ItemResponse<T & Document>>;
|
|
43
|
+
replaceDocument<T extends Resource>(args: ReplaceDocumentArgs): Promise<ItemResponse<T & Document>>;
|
|
44
|
+
deleteDocument(args: DeleteDocumentArgs): Promise<Response>;
|
|
45
|
+
queryDocuments<T>(args: QueryDocumentsArgs): Promise<FeedResponse<T>>;
|
|
46
|
+
private getNext;
|
|
47
|
+
private fetchWithRetry;
|
|
48
|
+
private fetch;
|
|
49
|
+
private setHeaders;
|
|
50
|
+
}
|
|
51
|
+
export type DocumentInit = BufferSource | ReadableStream | string | Resource;
|
|
52
|
+
interface CommonArgs {
|
|
53
|
+
activityId?: string;
|
|
54
|
+
consistencyLevel?: ConsistencyLevel;
|
|
55
|
+
}
|
|
56
|
+
interface CommonGetArgs extends CommonArgs {
|
|
57
|
+
ifNoneMatch?: string;
|
|
58
|
+
ifModifiedSince?: Date;
|
|
59
|
+
}
|
|
60
|
+
interface CommonGetListArgs extends CommonGetArgs {
|
|
61
|
+
maxItems?: number;
|
|
62
|
+
continuation?: string;
|
|
63
|
+
}
|
|
64
|
+
export type GetDatabasesArgs = CommonGetListArgs;
|
|
65
|
+
export interface GetDatabaseArgs extends CommonGetArgs {
|
|
66
|
+
dbId?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface GetCollectionsArgs extends CommonGetListArgs {
|
|
69
|
+
dbId?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface GetCollectionArgs extends CommonGetArgs {
|
|
72
|
+
dbId?: string;
|
|
73
|
+
collId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CreateCollectionArgs extends CommonArgs {
|
|
76
|
+
dbId?: string;
|
|
77
|
+
collId?: string;
|
|
78
|
+
indexingPolicy?: IndexingPolicy;
|
|
79
|
+
partitionKey: PartitionKeyDefinition;
|
|
80
|
+
offerThroughput?: number;
|
|
81
|
+
offerType?: OfferType;
|
|
82
|
+
}
|
|
83
|
+
export interface ReplaceCollectionArgs extends CommonArgs {
|
|
84
|
+
dbId?: string;
|
|
85
|
+
collId?: string;
|
|
86
|
+
indexingPolicy: IndexingPolicy;
|
|
87
|
+
partitionKey: PartitionKeyDefinition;
|
|
88
|
+
ifMatch?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface DeleteCollectionArgs extends CommonArgs {
|
|
91
|
+
dbId?: string;
|
|
92
|
+
collId?: string;
|
|
93
|
+
ifMatch?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface GetDocumentsArgs extends CommonGetListArgs {
|
|
96
|
+
dbId?: string;
|
|
97
|
+
collId?: string;
|
|
98
|
+
partitionKey?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface GetDocumentArgs extends CommonGetArgs {
|
|
101
|
+
dbId?: string;
|
|
102
|
+
collId?: string;
|
|
103
|
+
docId: string;
|
|
104
|
+
partitionKey: string;
|
|
105
|
+
}
|
|
106
|
+
export interface QueryDocumentsArgs extends CommonGetListArgs {
|
|
107
|
+
dbId?: string;
|
|
108
|
+
collId?: string;
|
|
109
|
+
query: string;
|
|
110
|
+
parameters?: QueryParameter[];
|
|
111
|
+
partitionKey?: string;
|
|
112
|
+
enableCrossPartition?: boolean;
|
|
113
|
+
populateMetrics?: boolean;
|
|
114
|
+
enableScan?: boolean;
|
|
115
|
+
}
|
|
116
|
+
export interface QueryParameter {
|
|
117
|
+
name: string;
|
|
118
|
+
value: string | number | boolean | null | undefined;
|
|
119
|
+
}
|
|
120
|
+
export interface CreateDocumentArgs extends CommonArgs {
|
|
121
|
+
dbId?: string;
|
|
122
|
+
collId?: string;
|
|
123
|
+
document: DocumentInit;
|
|
124
|
+
partitionKey: string;
|
|
125
|
+
isUpsert?: boolean;
|
|
126
|
+
indexingDirective?: IndexingDirective;
|
|
127
|
+
}
|
|
128
|
+
export interface ReplaceDocumentArgs extends CommonArgs {
|
|
129
|
+
dbId?: string;
|
|
130
|
+
collId?: string;
|
|
131
|
+
docId: string;
|
|
132
|
+
document: DocumentInit;
|
|
133
|
+
partitionKey: string;
|
|
134
|
+
ifMatch?: string;
|
|
135
|
+
indexingDirective?: IndexingDirective;
|
|
136
|
+
}
|
|
137
|
+
export interface DeleteDocumentArgs extends CommonArgs {
|
|
138
|
+
dbId?: string;
|
|
139
|
+
collId?: string;
|
|
140
|
+
docId: string;
|
|
141
|
+
partitionKey: string;
|
|
142
|
+
ifMatch?: string;
|
|
143
|
+
}
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PersistedResource } from './types.js';
|
|
2
|
+
export declare abstract class CosmosResponse {
|
|
3
|
+
protected readonly response: Response;
|
|
4
|
+
constructor(response: Response);
|
|
5
|
+
get status(): number;
|
|
6
|
+
get headers(): Headers;
|
|
7
|
+
get body(): ReadableStream<Uint8Array> | null;
|
|
8
|
+
get activityId(): string | null;
|
|
9
|
+
get etag(): string;
|
|
10
|
+
get requestCharge(): number;
|
|
11
|
+
get raw(): Response;
|
|
12
|
+
}
|
|
13
|
+
export declare class ItemResponse<T extends PersistedResource> extends CosmosResponse {
|
|
14
|
+
constructor(response: Response);
|
|
15
|
+
json(): Promise<T>;
|
|
16
|
+
}
|
|
17
|
+
export declare class FeedResponse<T> extends CosmosResponse {
|
|
18
|
+
readonly next: () => Promise<FeedResponse<T>>;
|
|
19
|
+
private readonly itemsProperty;
|
|
20
|
+
constructor(response: Response, next: () => Promise<FeedResponse<T>>, itemsProperty: string);
|
|
21
|
+
get count(): number;
|
|
22
|
+
get hasNext(): boolean;
|
|
23
|
+
json(): Promise<T[]>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface RetryContext {
|
|
2
|
+
request: Request;
|
|
3
|
+
response: Response;
|
|
4
|
+
attempts: number;
|
|
5
|
+
cumulativeWaitMs: number;
|
|
6
|
+
}
|
|
7
|
+
export interface RetryInstruction {
|
|
8
|
+
retry: boolean;
|
|
9
|
+
delayMs: number;
|
|
10
|
+
}
|
|
11
|
+
export interface RetryPolicy {
|
|
12
|
+
shouldRetry(context: RetryContext): Promise<RetryInstruction>;
|
|
13
|
+
}
|
|
14
|
+
export declare class DefaultRetryPolicy implements RetryPolicy {
|
|
15
|
+
readonly maxAttempts: number;
|
|
16
|
+
readonly maxCumulativeWaitTimeMs: number;
|
|
17
|
+
readonly defaultRetryDelayMs: number;
|
|
18
|
+
constructor(maxAttempts?: number, maxCumulativeWaitTimeMs?: number, defaultRetryDelayMs?: number);
|
|
19
|
+
shouldRetry(context: RetryContext): Promise<RetryInstruction>;
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultRetryPolicy: RetryPolicy;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function readSessionNotAvailable(response: Response): boolean;
|
|
2
|
+
export declare function getCollectionId({ url, headers }: {
|
|
3
|
+
url: string;
|
|
4
|
+
headers: Headers;
|
|
5
|
+
}): {
|
|
6
|
+
dbId: string;
|
|
7
|
+
collId: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export interface SessionTokens {
|
|
10
|
+
[dbId: string]: {
|
|
11
|
+
[collId: string]: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface SessionContainer {
|
|
15
|
+
tokens: SessionTokens;
|
|
16
|
+
setRequestSession(request: Request): void;
|
|
17
|
+
readResponseSession(response: Response): void;
|
|
18
|
+
}
|
|
19
|
+
export declare class DefaultSessionContainer implements SessionContainer {
|
|
20
|
+
readonly tokens: SessionTokens;
|
|
21
|
+
constructor(tokens?: SessionTokens);
|
|
22
|
+
setRequestSession(request: Request): void;
|
|
23
|
+
readResponseSession(response: Response): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Signer {
|
|
2
|
+
private readonly masterkey;
|
|
3
|
+
private readonly encoder;
|
|
4
|
+
constructor(masterkey: string);
|
|
5
|
+
sign(request: Request, date?: Date): Promise<void>;
|
|
6
|
+
getPayload(request: Request, date: Date): Uint8Array;
|
|
7
|
+
pathnameToResource(pathname: string): {
|
|
8
|
+
resourceType: string;
|
|
9
|
+
resourceId: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function getSigner(masterKey: string): Signer;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type ConsistencyLevel = 'Strong' | 'Bounded' | 'Session' | 'Eventual';
|
|
2
|
+
export type OfferType = 'S1' | 'S2' | 'S3';
|
|
3
|
+
export type IndexingDirective = 'Include' | 'Exclude';
|
|
4
|
+
export type IndexingMode = 'none' | 'consistent' | 'lazy';
|
|
5
|
+
export interface Resource {
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PersistedResource extends Resource {
|
|
9
|
+
_rid: string;
|
|
10
|
+
_self: string;
|
|
11
|
+
_etag: string;
|
|
12
|
+
_ts: number;
|
|
13
|
+
}
|
|
14
|
+
export interface Document extends PersistedResource {
|
|
15
|
+
_attachments: 'attachments/';
|
|
16
|
+
}
|
|
17
|
+
export interface Database extends PersistedResource {
|
|
18
|
+
_colls: 'colls/';
|
|
19
|
+
_users: 'users/';
|
|
20
|
+
}
|
|
21
|
+
export interface IndexingPolicy {
|
|
22
|
+
indexingMode: IndexingMode;
|
|
23
|
+
automatic: boolean;
|
|
24
|
+
includedPaths?: {
|
|
25
|
+
path: string;
|
|
26
|
+
indexes?: {
|
|
27
|
+
dataType: 'String' | 'Number';
|
|
28
|
+
precision: number;
|
|
29
|
+
kind: 'Range' | 'Hash';
|
|
30
|
+
}[];
|
|
31
|
+
}[];
|
|
32
|
+
excludedPaths?: {
|
|
33
|
+
path: string;
|
|
34
|
+
}[];
|
|
35
|
+
}
|
|
36
|
+
export interface PartitionKeyDefinition {
|
|
37
|
+
paths: string[];
|
|
38
|
+
kind: 'Hash';
|
|
39
|
+
}
|
|
40
|
+
export interface ConflictResolutionPolicy {
|
|
41
|
+
mode: 'LastWriterWins';
|
|
42
|
+
conflictResolutionPath: '/_ts';
|
|
43
|
+
conflictResolutionProcedure: '';
|
|
44
|
+
}
|
|
45
|
+
export interface GeospatialConfig {
|
|
46
|
+
type: 'Geography';
|
|
47
|
+
}
|
|
48
|
+
export interface Collection extends PersistedResource {
|
|
49
|
+
indexingPolicy: IndexingPolicy;
|
|
50
|
+
partitionKey: PartitionKeyDefinition;
|
|
51
|
+
conflictResolutionPolicy: ConflictResolutionPolicy;
|
|
52
|
+
geospatialConfig: GeospatialConfig;
|
|
53
|
+
_docs: 'docs/';
|
|
54
|
+
_sprocs: 'sprocs/';
|
|
55
|
+
_triggers: 'triggers/';
|
|
56
|
+
_udfs: 'udfs/';
|
|
57
|
+
_conflicts: 'conflicts/';
|
|
58
|
+
}
|
|
59
|
+
export interface ConnectionInfo {
|
|
60
|
+
endpoint: string;
|
|
61
|
+
masterKey: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ConnectionInfo } from './types';
|
|
2
|
+
export declare function escapeNonASCII(s: string): string;
|
|
3
|
+
export declare function assertArg(name: string, value: any): asserts value;
|
|
4
|
+
export declare function uri(strings: TemplateStringsArray, ...values: any[]): string;
|
|
5
|
+
export declare function parseConnectionString(connString: string): ConnectionInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/typescript/lib/lib.webworker.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/types.ts","../src/response.ts","../src/session.ts","../src/retry.ts","../../../node_modules/rfc4648/lib/src/codec.d.ts","../../../node_modules/rfc4648/lib/src/index.d.ts","../src/signer.ts","../src/util.ts","../src/client.ts","../src/index.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"7ad342d4d126c62920de283dffe88f5c06f81b496bb47613df59f4506a1ef074","affectsGlobalScope":true},{"version":"3c01508aed780c01c623a8015b1668744f573b7ba3153f4431cf67b9a4e026ac","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"ac6cb68143786981cba97dfb4cbdff712d9cb53afdcd63ddd8e33f0e1c42bee5","signature":"bcda3ce62780938fd66b25dc63caa074d782922e95b88f398ac3ecfb9e1ac08d"},{"version":"a7d869836cdcb630d1f58ceff00c072b47269cc329222caa3a72dbf237d8b642","signature":"0509d8ffc9788dabde32e5c19442ade72812a8a8c03690dc62fcb0582c157684"},{"version":"654b0f9a6f9c230962cb416507cf1369f885b6fdc0efeba60f4b1750f39ed739","signature":"2842c4ae523fbd0243ac181d9e75971be629f552efce8f3c99e6472ad915725c"},{"version":"acadbb58efd3378b6399f89c81fde10f8669d2bc8a200aa3120e4dabb77b3f2c","signature":"eb4862265fa942099e21b1e89cae1b4d0f83532216fa7d66dd34a740d611fcb9"},"b85e0cacbcbddaeaed7497fc24c779c06dbe9e1f7e16e1979c120831c92f0c0e","3f7413da40595a5149d55455ba7c80c95eaca631d62b886b0e42c2bcbdf0ff27",{"version":"38ce9748d9f8e30919ccb2ab5cbeef9c716c76d9c6a0f857ca5f4738e2e08b2a","signature":"d302c3e6c4886a64badde2ecf4a8d2b891d53091e02b439bc181bb42054588cb"},{"version":"89b405d0dce36e3bb5530990c8ff10f3ba742e06845d73154104494e20b75fee","signature":"2368308813ccda9611434e3963fcb21926eea7088373f77c89ebf6c20a27a90e"},{"version":"287cc94eddef2dde1728dfe52b0e820e5e6ed51db86b518fa03fcaaa562660e0","signature":"2489b71c0a924f1df511a1a8d525960125b617720146c21c15c550bf658a349f"},"f137e2724628de500f9952726a547cb1285738c04029022573ddb3fe523c4a10"],"root":[[74,77],[80,83]],"options":{"composite":true,"esModuleInterop":true,"isolatedDeclarations":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./cjs","removeComments":true,"rootDir":"../src","strict":true,"target":99},"fileIdsList":[[78],[74,75,76,77,80,81],[74,75,76,80,81,82],[74],[76],[79]],"referencedMap":[[79,1],[82,2],[83,3],[75,4],[77,5],[80,6],[81,4]],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"5.5.4"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/typescript/lib/lib.webworker.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.object.d.ts","../../../node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/types.ts","../src/response.ts","../src/session.ts","../src/retry.ts","../../../node_modules/rfc4648/lib/src/codec.d.ts","../../../node_modules/rfc4648/lib/src/index.d.ts","../src/signer.ts","../src/util.ts","../src/client.ts","../src/index.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5",{"version":"7ad342d4d126c62920de283dffe88f5c06f81b496bb47613df59f4506a1ef074","affectsGlobalScope":true},{"version":"3c01508aed780c01c623a8015b1668744f573b7ba3153f4431cf67b9a4e026ac","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true},{"version":"9d540251809289a05349b70ab5f4b7b99f922af66ab3c39ba56a475dcf95d5ff","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"ac6cb68143786981cba97dfb4cbdff712d9cb53afdcd63ddd8e33f0e1c42bee5","signature":"bcda3ce62780938fd66b25dc63caa074d782922e95b88f398ac3ecfb9e1ac08d"},{"version":"a7d869836cdcb630d1f58ceff00c072b47269cc329222caa3a72dbf237d8b642","signature":"0509d8ffc9788dabde32e5c19442ade72812a8a8c03690dc62fcb0582c157684"},{"version":"654b0f9a6f9c230962cb416507cf1369f885b6fdc0efeba60f4b1750f39ed739","signature":"2842c4ae523fbd0243ac181d9e75971be629f552efce8f3c99e6472ad915725c"},{"version":"acadbb58efd3378b6399f89c81fde10f8669d2bc8a200aa3120e4dabb77b3f2c","signature":"eb4862265fa942099e21b1e89cae1b4d0f83532216fa7d66dd34a740d611fcb9"},"b85e0cacbcbddaeaed7497fc24c779c06dbe9e1f7e16e1979c120831c92f0c0e","3f7413da40595a5149d55455ba7c80c95eaca631d62b886b0e42c2bcbdf0ff27",{"version":"38ce9748d9f8e30919ccb2ab5cbeef9c716c76d9c6a0f857ca5f4738e2e08b2a","signature":"d302c3e6c4886a64badde2ecf4a8d2b891d53091e02b439bc181bb42054588cb"},{"version":"89b405d0dce36e3bb5530990c8ff10f3ba742e06845d73154104494e20b75fee","signature":"2368308813ccda9611434e3963fcb21926eea7088373f77c89ebf6c20a27a90e"},{"version":"287cc94eddef2dde1728dfe52b0e820e5e6ed51db86b518fa03fcaaa562660e0","signature":"2489b71c0a924f1df511a1a8d525960125b617720146c21c15c550bf658a349f"},"f137e2724628de500f9952726a547cb1285738c04029022573ddb3fe523c4a10"],"root":[[74,77],[80,83]],"options":{"composite":true,"esModuleInterop":true,"isolatedDeclarations":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","removeComments":true,"rootDir":"../src","strict":true,"target":99},"fileIdsList":[[78],[74,75,76,77,80,81],[74,75,76,80,81,82],[74],[76],[79]],"referencedMap":[[79,1],[82,2],[83,3],[75,4],[77,5],[80,6],[81,4]],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.5.4"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfworker/cosmos",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"description": "Azure Cosmos DB client for Cloudflare Workers and service workers",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"azure",
|
|
@@ -14,16 +14,20 @@
|
|
|
14
14
|
"service-worker"
|
|
15
15
|
],
|
|
16
16
|
"sideEffects": false,
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"module": "dist/index.js",
|
|
17
|
+
"main": "dist/cjs/index.js",
|
|
18
|
+
"module": "dist/esm/index.js",
|
|
19
19
|
"source": "src/index.ts",
|
|
20
|
-
"types": "dist/index.d.ts",
|
|
20
|
+
"types": "dist/esm/index.d.ts",
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/**/*",
|
|
23
23
|
"src/**/*",
|
|
24
24
|
"README.md",
|
|
25
25
|
"package.json"
|
|
26
26
|
],
|
|
27
|
+
"exports": {
|
|
28
|
+
"import": "./dist/esm/index.js",
|
|
29
|
+
"require": "./dist/cjs/index.js"
|
|
30
|
+
},
|
|
27
31
|
"repository": "https://github.com/cfworker/cfworker",
|
|
28
32
|
"author": "Jeremy Danyow <jdanyow@gmail.com>",
|
|
29
33
|
"homepage": "https://github.com/cfworker/cfworker/tree/master/packages/cosmos/README.md",
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
"access": "public"
|
|
33
37
|
},
|
|
34
38
|
"scripts": {
|
|
35
|
-
"build": "tsc --build",
|
|
39
|
+
"build": "tsc --build & tsc --build tsconfig-cjs.json",
|
|
36
40
|
"clean": "tsc --build --clean",
|
|
37
41
|
"pretest": "esbuild test/test.ts --target=esnext --bundle --format=esm --conditions=worker,browser --outdir=dist-test --ignore-annotations",
|
|
38
42
|
"test": "node ../../test.mjs"
|
|
@@ -47,6 +51,6 @@
|
|
|
47
51
|
"esbuild": "^0.23.1",
|
|
48
52
|
"mocha": "^10.7.3",
|
|
49
53
|
"typescript": "^5.5.4",
|
|
50
|
-
"wrangler": "^3.72.
|
|
54
|
+
"wrangler": "^3.72.1"
|
|
51
55
|
}
|
|
52
56
|
}
|
package/src/client.ts
CHANGED
|
@@ -114,7 +114,9 @@ export class CosmosClient {
|
|
|
114
114
|
return new FeedResponse<Database>(response, next, 'Databases');
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
public async getDatabase(
|
|
117
|
+
public async getDatabase(
|
|
118
|
+
args: GetDatabaseArgs = {}
|
|
119
|
+
): Promise<ItemResponse<Database>> {
|
|
118
120
|
const { dbId = this.dbId, ...headers } = args;
|
|
119
121
|
assertArg('dbId', dbId);
|
|
120
122
|
const url = this.endpoint + uri`/dbs/${dbId}`;
|
|
@@ -137,7 +139,9 @@ export class CosmosClient {
|
|
|
137
139
|
return new FeedResponse<Collection>(response, next, 'DocumentCollections');
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
public async getCollection(
|
|
142
|
+
public async getCollection(
|
|
143
|
+
args: GetCollectionArgs = {}
|
|
144
|
+
): Promise<ItemResponse<Collection>> {
|
|
141
145
|
const { dbId = this.dbId, collId = this.collId, ...headers } = args;
|
|
142
146
|
assertArg('dbId', dbId);
|
|
143
147
|
assertArg('collId', collId);
|
|
@@ -148,7 +152,9 @@ export class CosmosClient {
|
|
|
148
152
|
return new ItemResponse<Collection>(response);
|
|
149
153
|
}
|
|
150
154
|
|
|
151
|
-
public async createCollection(
|
|
155
|
+
public async createCollection(
|
|
156
|
+
args: CreateCollectionArgs
|
|
157
|
+
): Promise<ItemResponse<Collection>> {
|
|
152
158
|
const {
|
|
153
159
|
dbId = this.dbId,
|
|
154
160
|
collId = this.collId,
|
|
@@ -167,7 +173,9 @@ export class CosmosClient {
|
|
|
167
173
|
return new ItemResponse<Collection>(response);
|
|
168
174
|
}
|
|
169
175
|
|
|
170
|
-
public async replaceCollection(
|
|
176
|
+
public async replaceCollection(
|
|
177
|
+
args: ReplaceCollectionArgs
|
|
178
|
+
): Promise<ItemResponse<Collection>> {
|
|
171
179
|
const {
|
|
172
180
|
dbId = this.dbId,
|
|
173
181
|
collId = this.collId,
|
|
@@ -186,7 +194,9 @@ export class CosmosClient {
|
|
|
186
194
|
return new ItemResponse<Collection>(response);
|
|
187
195
|
}
|
|
188
196
|
|
|
189
|
-
public async deleteCollection(
|
|
197
|
+
public async deleteCollection(
|
|
198
|
+
args: DeleteCollectionArgs = {}
|
|
199
|
+
): Promise<Response> {
|
|
190
200
|
const { dbId = this.dbId, collId = this.collId, ...headers } = args;
|
|
191
201
|
assertArg('dbId', dbId);
|
|
192
202
|
assertArg('collId', collId);
|
|
@@ -215,7 +225,9 @@ export class CosmosClient {
|
|
|
215
225
|
return new FeedResponse<T & Document>(response, next, 'Documents');
|
|
216
226
|
}
|
|
217
227
|
|
|
218
|
-
public async getDocument<T extends Resource>(
|
|
228
|
+
public async getDocument<T extends Resource>(
|
|
229
|
+
args: GetDocumentArgs
|
|
230
|
+
): Promise<ItemResponse<T & Document>> {
|
|
219
231
|
const { dbId = this.dbId, collId = this.collId, docId, ...headers } = args;
|
|
220
232
|
assertArg('dbId', dbId);
|
|
221
233
|
assertArg('collId', collId);
|
|
@@ -226,7 +238,9 @@ export class CosmosClient {
|
|
|
226
238
|
return new ItemResponse<T & Document>(response);
|
|
227
239
|
}
|
|
228
240
|
|
|
229
|
-
public async createDocument<T extends Resource>(
|
|
241
|
+
public async createDocument<T extends Resource>(
|
|
242
|
+
args: CreateDocumentArgs
|
|
243
|
+
): Promise<ItemResponse<T & Document>> {
|
|
230
244
|
const {
|
|
231
245
|
dbId = this.dbId,
|
|
232
246
|
collId = this.collId,
|
|
@@ -244,7 +258,9 @@ export class CosmosClient {
|
|
|
244
258
|
return new ItemResponse<T & Document>(response);
|
|
245
259
|
}
|
|
246
260
|
|
|
247
|
-
public async replaceDocument<T extends Resource>(
|
|
261
|
+
public async replaceDocument<T extends Resource>(
|
|
262
|
+
args: ReplaceDocumentArgs
|
|
263
|
+
): Promise<ItemResponse<T & Document>> {
|
|
248
264
|
const {
|
|
249
265
|
dbId = this.dbId,
|
|
250
266
|
collId = this.collId,
|
|
@@ -263,7 +279,7 @@ export class CosmosClient {
|
|
|
263
279
|
return new ItemResponse<T & Document>(response);
|
|
264
280
|
}
|
|
265
281
|
|
|
266
|
-
public async deleteDocument(args: DeleteDocumentArgs) {
|
|
282
|
+
public async deleteDocument(args: DeleteDocumentArgs): Promise<Response> {
|
|
267
283
|
const { dbId = this.dbId, collId = this.collId, docId, ...headers } = args;
|
|
268
284
|
assertArg('dbId', dbId);
|
|
269
285
|
assertArg('collId', collId);
|
|
@@ -316,7 +332,7 @@ export class CosmosClient {
|
|
|
316
332
|
response: Response,
|
|
317
333
|
args: TArgs,
|
|
318
334
|
fn: (args: TArgs) => Promise<FeedResponse<TResult>>
|
|
319
|
-
) {
|
|
335
|
+
): () => Promise<FeedResponse<TResult>> {
|
|
320
336
|
return () => {
|
|
321
337
|
const continuation = response.headers.get('x-ms-continuation');
|
|
322
338
|
if (!continuation) {
|
package/src/response.ts
CHANGED
|
@@ -3,25 +3,25 @@ import { PersistedResource } from './types.js';
|
|
|
3
3
|
export abstract class CosmosResponse {
|
|
4
4
|
constructor(protected readonly response: Response) {}
|
|
5
5
|
|
|
6
|
-
get status() {
|
|
6
|
+
get status(): number {
|
|
7
7
|
return this.response.status;
|
|
8
8
|
}
|
|
9
|
-
get headers() {
|
|
9
|
+
get headers(): Headers {
|
|
10
10
|
return this.response.headers;
|
|
11
11
|
}
|
|
12
|
-
get body() {
|
|
12
|
+
get body(): ReadableStream<Uint8Array> | null {
|
|
13
13
|
return this.response.body;
|
|
14
14
|
}
|
|
15
|
-
get activityId() {
|
|
15
|
+
get activityId(): string | null {
|
|
16
16
|
return this.response.headers.get('x-ms-activity-id');
|
|
17
17
|
}
|
|
18
|
-
get etag() {
|
|
18
|
+
get etag(): string {
|
|
19
19
|
return this.response.headers.get('etag')!;
|
|
20
20
|
}
|
|
21
|
-
get requestCharge() {
|
|
21
|
+
get requestCharge(): number {
|
|
22
22
|
return parseInt(this.response.headers.get('x-ms-request-charge')!);
|
|
23
23
|
}
|
|
24
|
-
get raw() {
|
|
24
|
+
get raw(): Response {
|
|
25
25
|
return this.response;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -45,10 +45,10 @@ export class FeedResponse<T> extends CosmosResponse {
|
|
|
45
45
|
super(response);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
get count() {
|
|
48
|
+
get count(): number {
|
|
49
49
|
return parseInt(this.response.headers.get('x-ms-item-count')!);
|
|
50
50
|
}
|
|
51
|
-
get hasNext() {
|
|
51
|
+
get hasNext(): boolean {
|
|
52
52
|
return this.response.headers.has('x-ms-continuation');
|
|
53
53
|
}
|
|
54
54
|
|
package/src/retry.ts
CHANGED
package/src/session.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const readSessionNotAvailableSubstatus = '1002';
|
|
1
|
+
const readSessionNotAvailableSubstatus: string = '1002';
|
|
2
2
|
|
|
3
3
|
export function readSessionNotAvailable(response: Response): boolean {
|
|
4
4
|
return (
|
|
@@ -40,7 +40,7 @@ export interface SessionContainer {
|
|
|
40
40
|
export class DefaultSessionContainer implements SessionContainer {
|
|
41
41
|
constructor(public readonly tokens: SessionTokens = {}) {}
|
|
42
42
|
|
|
43
|
-
setRequestSession(request: Request) {
|
|
43
|
+
setRequestSession(request: Request): void {
|
|
44
44
|
if (request.headers.get('x-ms-consistency-level') !== 'Session') {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
@@ -54,7 +54,7 @@ export class DefaultSessionContainer implements SessionContainer {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
readResponseSession(response: Response) {
|
|
57
|
+
readResponseSession(response: Response): void {
|
|
58
58
|
const ids = getCollectionId(response);
|
|
59
59
|
if (!ids) {
|
|
60
60
|
return;
|