@contello/client 2.2.2 → 2.2.3
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/cli.d.ts +2 -0
- package/dist/cli.js +15 -14
- package/dist/cli.js.map +1 -0
- package/dist/generate-DIoN94iO.js +1068 -0
- package/dist/generate-DIoN94iO.js.map +1 -0
- package/dist/index.cjs +936 -1074
- package/dist/index.d.cts +118 -119
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +119 -119
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +925 -1048
- package/dist/index.js.map +1 -0
- package/package.json +2 -2
- package/dist/generate-Z4LVDAB4.js +0 -1241
package/dist/index.d.cts
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import { ReadableStream as ReadableStream$1 } from
|
|
1
|
+
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
2
2
|
|
|
3
|
+
//#region src/http.d.ts
|
|
3
4
|
type HttpAgentOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
pipelining?: number | undefined;
|
|
6
|
+
allowH2?: boolean | undefined;
|
|
7
|
+
maxConcurrentStreams?: number | undefined;
|
|
8
|
+
keepAliveTimeout?: number | undefined;
|
|
8
9
|
};
|
|
9
10
|
type DownloadResult = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
mimeType: string;
|
|
12
|
+
size: number;
|
|
13
|
+
bytes(): Promise<Uint8Array>;
|
|
14
|
+
stream(): ReadableStream<Uint8Array>;
|
|
14
15
|
};
|
|
15
16
|
type ProxyResult = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
status: number;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
stream(): ReadableStream<Uint8Array>;
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/types.d.ts
|
|
21
23
|
type OperationKind = 'query' | 'mutation' | 'subscription';
|
|
22
24
|
type OperationDef<TResult = unknown, TVariables = Record<string, unknown>, TKind extends OperationKind = OperationKind> = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** phantom type — exists only at the type level */
|
|
28
|
-
__variables?: TVariables | undefined;
|
|
25
|
+
document: string;
|
|
26
|
+
kind: TKind; /** phantom type — exists only at the type level */
|
|
27
|
+
__result?: TResult | undefined; /** phantom type — exists only at the type level */
|
|
28
|
+
__variables?: TVariables | undefined;
|
|
29
29
|
};
|
|
30
30
|
type OperationMap = Record<string, OperationDef>;
|
|
31
31
|
type InferResult<T extends OperationDef> = NonNullable<T['__result']>;
|
|
32
32
|
type InferVariables<T extends OperationDef> = NonNullable<T['__variables']>;
|
|
33
33
|
type RpcMethod<T extends OperationDef> = T['kind'] extends 'subscription' ? InferVariables<T> extends Record<string, never> ? () => AsyncIterable<InferResult<T>> : (variables: InferVariables<T>) => AsyncIterable<InferResult<T>> : InferVariables<T> extends Record<string, never> ? () => Promise<InferResult<T>> : (variables: InferVariables<T>) => Promise<InferResult<T>>;
|
|
34
|
-
type Rpc<T extends OperationMap> = {
|
|
35
|
-
[K in keyof T]: RpcMethod<T[K]>;
|
|
36
|
-
};
|
|
34
|
+
type Rpc<T extends OperationMap> = { [K in keyof T]: RpcMethod<T[K]> };
|
|
37
35
|
/**
|
|
38
36
|
* Discriminator for how a SourceDef binds to a Subscription field:
|
|
39
37
|
* - `entity` — a Contello entity model collection (`categoriesBatch` etc.), accepts optional `{ ids }` filter
|
|
@@ -44,16 +42,12 @@ type Rpc<T extends OperationMap> = {
|
|
|
44
42
|
*/
|
|
45
43
|
type SourceCardinality = 'entity' | 'singleton' | 'route' | 'asset' | 'i18nMessage';
|
|
46
44
|
type SourceDef<TModel extends string = string, TCardinality extends SourceCardinality = SourceCardinality, TResult = unknown> = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
__model: TModel;
|
|
54
|
-
__cardinality: TCardinality;
|
|
55
|
-
/** phantom type — exists only at the type level */
|
|
56
|
-
__result?: TResult | undefined;
|
|
45
|
+
/** the GQL fragment text — bundled with transitive deps if any */document: string; /** the fragment name to spread inside the source subscription — e.g. `Category` */
|
|
46
|
+
fragment: string; /** the subscription field this fragment is bound to — `categoriesBatch`, `config`, etc */
|
|
47
|
+
subscription: string;
|
|
48
|
+
__model: TModel;
|
|
49
|
+
__cardinality: TCardinality; /** phantom type — exists only at the type level */
|
|
50
|
+
__result?: TResult | undefined;
|
|
57
51
|
};
|
|
58
52
|
type SourceMap = Record<string, SourceDef>;
|
|
59
53
|
/**
|
|
@@ -63,109 +57,112 @@ type SourceMap = Record<string, SourceDef>;
|
|
|
63
57
|
* - store uses `models` (for the dependency resolver) on top of what client uses.
|
|
64
58
|
*/
|
|
65
59
|
type Schema<TOps extends OperationMap = OperationMap, TSources extends SourceMap = SourceMap, TModels extends string = string> = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
operations: TOps;
|
|
61
|
+
sources: TSources;
|
|
62
|
+
models: Record<TModels, string>;
|
|
69
63
|
};
|
|
70
64
|
type SourceFetcherFor<S> = S extends SourceDef<string, 'singleton', infer R> ? () => Promise<R> : S extends SourceDef<string, 'entity', infer R> ? (vars?: {
|
|
71
|
-
|
|
65
|
+
ids?: string[];
|
|
72
66
|
}) => Promise<R[]> : S extends SourceDef<string, 'route', infer R> ? (vars?: {
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
ids?: string[] | undefined;
|
|
68
|
+
paths?: string[] | undefined;
|
|
75
69
|
} | undefined) => Promise<R[]> : S extends SourceDef<string, 'asset', infer R> ? (vars?: {
|
|
76
|
-
|
|
70
|
+
ids?: string[] | undefined;
|
|
77
71
|
} | undefined) => Promise<R[]> : S extends SourceDef<string, 'i18nMessage', infer R> ? (vars: {
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
collection: string;
|
|
73
|
+
ids?: string[] | undefined;
|
|
80
74
|
}) => Promise<R[]> : never;
|
|
81
75
|
/** Per-source runtime accessor: `client.sources.category.fetch()` → `Promise<CategoryFragment[]>` etc. */
|
|
82
|
-
type SourceAccessors<TSources extends SourceMap> = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
type SourceAccessors<TSources extends SourceMap> = { [K in keyof TSources]: {
|
|
77
|
+
fetch: SourceFetcherFor<TSources[K]>;
|
|
78
|
+
} };
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/upload.d.ts
|
|
88
81
|
type UploadMetadata = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
name: string;
|
|
83
|
+
mimeType?: string | undefined;
|
|
84
|
+
size?: number | undefined;
|
|
85
|
+
annotations?: {
|
|
86
|
+
key: string;
|
|
87
|
+
value: string;
|
|
88
|
+
}[] | undefined;
|
|
89
|
+
collectionRefs?: string[] | undefined;
|
|
97
90
|
};
|
|
98
91
|
type UploadData = Uint8Array | ReadableStream$1<Uint8Array> | ReadableStream<Uint8Array>;
|
|
99
92
|
type UploadOptions = {
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
chunkSize?: number | undefined;
|
|
94
|
+
abort?: AbortSignal | undefined;
|
|
102
95
|
};
|
|
103
|
-
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/client.d.ts
|
|
104
98
|
type ConnectionContext = {
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
connectionId: string;
|
|
100
|
+
websocketUrl: string;
|
|
107
101
|
};
|
|
108
102
|
type ConnectionEvents = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
onConnected?: ((context: ConnectionContext) => void) | undefined;
|
|
104
|
+
onConnecting?: ((context: ConnectionContext) => void) | undefined;
|
|
105
|
+
onClosed?: ((context: ConnectionContext) => void) | undefined;
|
|
106
|
+
onError?: ((context: ConnectionContext, error: unknown) => void) | undefined;
|
|
113
107
|
};
|
|
114
108
|
type ContelloClientOptions<TSchema extends Schema | undefined = undefined> = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
url: string;
|
|
110
|
+
project: string;
|
|
111
|
+
token: string;
|
|
112
|
+
schema?: TSchema | undefined;
|
|
113
|
+
connections?: number | undefined;
|
|
114
|
+
http?: HttpAgentOptions | undefined;
|
|
115
|
+
onConnected?: (() => void) | undefined;
|
|
116
|
+
onReconnecting?: (() => void) | undefined;
|
|
117
|
+
onError?: ((error: unknown) => void) | undefined;
|
|
118
|
+
connectionEvents?: ConnectionEvents | undefined;
|
|
125
119
|
};
|
|
126
120
|
declare class ContelloClient<TSchema extends Schema | undefined = undefined> {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
121
|
+
private _pool;
|
|
122
|
+
private _rpc;
|
|
123
|
+
private _sources;
|
|
124
|
+
private _url;
|
|
125
|
+
private _project;
|
|
126
|
+
private _token;
|
|
127
|
+
private _agent;
|
|
128
|
+
constructor(options: ContelloClientOptions<TSchema>);
|
|
129
|
+
get rpc(): TSchema extends Schema<infer TOps, any, any> ? Rpc<TOps> : never;
|
|
130
|
+
get sources(): TSchema extends Schema<any, infer TSources, any> ? SourceAccessors<TSources> : never;
|
|
131
|
+
init(): Promise<void>;
|
|
132
|
+
destroy(): Promise<void>;
|
|
133
|
+
ping(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Open a subscription on the websocket. Each `[Symbol.asyncIterator]()` call (the implicit one
|
|
136
|
+
* from `for await`, or via `rxjs.from(this)`) starts a fresh server subscription and tears it
|
|
137
|
+
* down when the iterator is returned (`break`, error, or explicit stop).
|
|
138
|
+
*/
|
|
139
|
+
subscribe<TData>(query: string, variables?: Record<string, unknown> | undefined): AsyncIterable<TData>;
|
|
140
|
+
download(fileId: string): Promise<DownloadResult>;
|
|
141
|
+
proxyHls(path: string, signal?: AbortSignal | undefined): Promise<ProxyResult>;
|
|
142
|
+
upload(data: UploadData, meta: UploadMetadata, options?: UploadOptions | undefined): Promise<string>;
|
|
143
|
+
execute<TData>(query: string, variables?: Record<string, unknown> | undefined): Promise<TData>;
|
|
150
144
|
}
|
|
151
145
|
declare function createContelloClient<TSchema extends Schema | undefined = undefined>(options: ContelloClientOptions<TSchema>): ContelloClient<TSchema>;
|
|
152
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/scalars.d.ts
|
|
153
148
|
type LocalDateTime = {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
149
|
+
year: number;
|
|
150
|
+
month: number;
|
|
151
|
+
day: number;
|
|
152
|
+
hour: number;
|
|
153
|
+
minute: number;
|
|
154
|
+
second: number;
|
|
160
155
|
};
|
|
161
156
|
type LocalDate = {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
year: number;
|
|
158
|
+
month: number;
|
|
159
|
+
day: number;
|
|
165
160
|
};
|
|
166
|
-
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/source-subscription.d.ts
|
|
167
163
|
declare function createSourceSubscription(source: SourceDef): string;
|
|
168
|
-
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/async-iterable-utils.d.ts
|
|
169
166
|
/**
|
|
170
167
|
* Returns the first value yielded by `iter`, then disposes the iterator. Throws if the iterable
|
|
171
168
|
* completes without yielding. Equivalent of rxjs's `firstValueFrom` for AsyncIterables.
|
|
@@ -196,7 +193,8 @@ declare function runWithBackoff(fn: () => Promise<unknown>, signal?: AbortSignal
|
|
|
196
193
|
* Designed for subscriptions that should stay open across reconnects (e.g. the watcher).
|
|
197
194
|
*/
|
|
198
195
|
declare function asyncKeepalive<T>(factory: () => AsyncIterable<T>, signal?: AbortSignal | undefined): AsyncIterable<T>;
|
|
199
|
-
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/async-iterable-subject.d.ts
|
|
200
198
|
/**
|
|
201
199
|
* Multicast event source with `next` / `error` / `complete` (Subject semantics) plus an
|
|
202
200
|
* `AsyncIterable` view. Two consumption modes that fan out from the same source:
|
|
@@ -217,15 +215,16 @@ declare function asyncKeepalive<T>(factory: () => AsyncIterable<T>, signal?: Abo
|
|
|
217
215
|
* Backpressure: unbounded queue per pending iterator. Intended for low-frequency events.
|
|
218
216
|
*/
|
|
219
217
|
type AsyncIterableSubject<T> = AsyncIterable<T> & {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
218
|
+
next: (value: T) => void;
|
|
219
|
+
error: (err: unknown) => void;
|
|
220
|
+
complete: () => void;
|
|
221
|
+
subscribe: (observerOrNext: ((value: T) => void) | {
|
|
222
|
+
next?: (value: T) => void;
|
|
223
|
+
error?: (err: unknown) => void;
|
|
224
|
+
complete?: () => void;
|
|
225
|
+
}) => () => void;
|
|
228
226
|
};
|
|
229
227
|
declare function createAsyncIterableSubject<T>(): AsyncIterableSubject<T>;
|
|
230
|
-
|
|
228
|
+
//#endregion
|
|
231
229
|
export { type AsyncIterableSubject, type ConnectionContext, type ConnectionEvents, ContelloClient, type ContelloClientOptions, type DownloadResult, type HttpAgentOptions, type LocalDate, type LocalDateTime, type OperationDef, type OperationKind, type OperationMap, type ProxyResult, type Rpc, type Schema, type SourceAccessors, type SourceCardinality, type SourceDef, type SourceMap, type UploadData, type UploadMetadata, type UploadOptions, asyncKeepalive, collectAsync, createAsyncIterableSubject, createContelloClient, createSourceSubscription, exponentialBackoff, filterAsync, firstAsync, mapAsync, runWithBackoff };
|
|
230
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/http.ts","../src/types.ts","../src/upload.ts","../src/client.ts","../src/scalars.ts","../src/source-subscription.ts","../src/async-iterable-utils.ts","../src/async-iterable-subject.ts"],"mappings":";;;KAiCY,gBAAA;EACV,UAAA;EACA,OAAA;EACA,oBAAA;EACA,gBAAA;AAAA;AAAA,KAcU,cAAA;EACV,QAAA;EACA,IAAA;EACA,KAAA,IAAS,OAAA,CAAQ,UAAA;EACjB,MAAA,IAAU,cAAA,CAAe,UAAA;AAAA;AAAA,KAiCf,WAAA;EACV,MAAA;EACA,OAAA,EAAS,OAAA;EACT,MAAA,IAAU,cAAA,CAAe,UAAA;AAAA;;;KC3Ff,aAAA;AAAA,KAEA,YAAA,iCAEG,MAAA,iCACC,aAAA,GAAgB,aAAA;EAE9B,QAAA;EACA,IAAA,EAAM,KAAA,EDyBI;ECvBV,QAAA,GAAW,OAAA;EAEX,WAAA,GAAc,UAAA;AAAA;AAAA,KAGJ,YAAA,GAAe,MAAM,SAAS,YAAA;AAAA,KAE9B,WAAA,WAAsB,YAAA,IAAgB,WAAA,CAAY,CAAA;AAAA,KAClD,cAAA,WAAyB,YAAA,IAAgB,WAAA,CAAY,CAAA;AAAA,KAErD,SAAA,WAAoB,YAAA,IAAgB,CAAA,kCAC5C,cAAA,CAAe,CAAA,UAAW,MAAA,wBAClB,aAAA,CAAc,WAAA,CAAY,CAAA,MAC/B,SAAA,EAAW,cAAA,CAAe,CAAA,MAAO,aAAA,CAAc,WAAA,CAAY,CAAA,KAC9D,cAAA,CAAe,CAAA,UAAW,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;EACd,KAAA,GAAQ,GAAA;EACR,QAAA;EACA,SAAA,GACE,cAAA,IACM,KAAA,EAAO,CAAA;IAET,IAAA,IAAQ,KAAA,EAAO,CAAA;IACf,KAAA,IAAS,GAAA;IACT,QAAA;EAAA;AAAA;AAAA,iBAsBQ,0BAAA,OAAiC,oBAAoB,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Agent } from "undici";
|
|
2
|
+
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
2
3
|
|
|
4
|
+
//#region src/http.d.ts
|
|
3
5
|
type HttpAgentOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
pipelining?: number | undefined;
|
|
7
|
+
allowH2?: boolean | undefined;
|
|
8
|
+
maxConcurrentStreams?: number | undefined;
|
|
9
|
+
keepAliveTimeout?: number | undefined;
|
|
8
10
|
};
|
|
9
11
|
type DownloadResult = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
mimeType: string;
|
|
13
|
+
size: number;
|
|
14
|
+
bytes(): Promise<Uint8Array>;
|
|
15
|
+
stream(): ReadableStream<Uint8Array>;
|
|
14
16
|
};
|
|
15
17
|
type ProxyResult = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
status: number;
|
|
19
|
+
headers: Headers;
|
|
20
|
+
stream(): ReadableStream<Uint8Array>;
|
|
19
21
|
};
|
|
20
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/types.d.ts
|
|
21
24
|
type OperationKind = 'query' | 'mutation' | 'subscription';
|
|
22
25
|
type OperationDef<TResult = unknown, TVariables = Record<string, unknown>, TKind extends OperationKind = OperationKind> = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** phantom type — exists only at the type level */
|
|
28
|
-
__variables?: TVariables | undefined;
|
|
26
|
+
document: string;
|
|
27
|
+
kind: TKind; /** phantom type — exists only at the type level */
|
|
28
|
+
__result?: TResult | undefined; /** phantom type — exists only at the type level */
|
|
29
|
+
__variables?: TVariables | undefined;
|
|
29
30
|
};
|
|
30
31
|
type OperationMap = Record<string, OperationDef>;
|
|
31
32
|
type InferResult<T extends OperationDef> = NonNullable<T['__result']>;
|
|
32
33
|
type InferVariables<T extends OperationDef> = NonNullable<T['__variables']>;
|
|
33
34
|
type RpcMethod<T extends OperationDef> = T['kind'] extends 'subscription' ? InferVariables<T> extends Record<string, never> ? () => AsyncIterable<InferResult<T>> : (variables: InferVariables<T>) => AsyncIterable<InferResult<T>> : InferVariables<T> extends Record<string, never> ? () => Promise<InferResult<T>> : (variables: InferVariables<T>) => Promise<InferResult<T>>;
|
|
34
|
-
type Rpc<T extends OperationMap> = {
|
|
35
|
-
[K in keyof T]: RpcMethod<T[K]>;
|
|
36
|
-
};
|
|
35
|
+
type Rpc<T extends OperationMap> = { [K in keyof T]: RpcMethod<T[K]> };
|
|
37
36
|
/**
|
|
38
37
|
* Discriminator for how a SourceDef binds to a Subscription field:
|
|
39
38
|
* - `entity` — a Contello entity model collection (`categoriesBatch` etc.), accepts optional `{ ids }` filter
|
|
@@ -44,16 +43,12 @@ type Rpc<T extends OperationMap> = {
|
|
|
44
43
|
*/
|
|
45
44
|
type SourceCardinality = 'entity' | 'singleton' | 'route' | 'asset' | 'i18nMessage';
|
|
46
45
|
type SourceDef<TModel extends string = string, TCardinality extends SourceCardinality = SourceCardinality, TResult = unknown> = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
__model: TModel;
|
|
54
|
-
__cardinality: TCardinality;
|
|
55
|
-
/** phantom type — exists only at the type level */
|
|
56
|
-
__result?: TResult | undefined;
|
|
46
|
+
/** the GQL fragment text — bundled with transitive deps if any */document: string; /** the fragment name to spread inside the source subscription — e.g. `Category` */
|
|
47
|
+
fragment: string; /** the subscription field this fragment is bound to — `categoriesBatch`, `config`, etc */
|
|
48
|
+
subscription: string;
|
|
49
|
+
__model: TModel;
|
|
50
|
+
__cardinality: TCardinality; /** phantom type — exists only at the type level */
|
|
51
|
+
__result?: TResult | undefined;
|
|
57
52
|
};
|
|
58
53
|
type SourceMap = Record<string, SourceDef>;
|
|
59
54
|
/**
|
|
@@ -63,109 +58,112 @@ type SourceMap = Record<string, SourceDef>;
|
|
|
63
58
|
* - store uses `models` (for the dependency resolver) on top of what client uses.
|
|
64
59
|
*/
|
|
65
60
|
type Schema<TOps extends OperationMap = OperationMap, TSources extends SourceMap = SourceMap, TModels extends string = string> = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
operations: TOps;
|
|
62
|
+
sources: TSources;
|
|
63
|
+
models: Record<TModels, string>;
|
|
69
64
|
};
|
|
70
65
|
type SourceFetcherFor<S> = S extends SourceDef<string, 'singleton', infer R> ? () => Promise<R> : S extends SourceDef<string, 'entity', infer R> ? (vars?: {
|
|
71
|
-
|
|
66
|
+
ids?: string[];
|
|
72
67
|
}) => Promise<R[]> : S extends SourceDef<string, 'route', infer R> ? (vars?: {
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
ids?: string[] | undefined;
|
|
69
|
+
paths?: string[] | undefined;
|
|
75
70
|
} | undefined) => Promise<R[]> : S extends SourceDef<string, 'asset', infer R> ? (vars?: {
|
|
76
|
-
|
|
71
|
+
ids?: string[] | undefined;
|
|
77
72
|
} | undefined) => Promise<R[]> : S extends SourceDef<string, 'i18nMessage', infer R> ? (vars: {
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
collection: string;
|
|
74
|
+
ids?: string[] | undefined;
|
|
80
75
|
}) => Promise<R[]> : never;
|
|
81
76
|
/** Per-source runtime accessor: `client.sources.category.fetch()` → `Promise<CategoryFragment[]>` etc. */
|
|
82
|
-
type SourceAccessors<TSources extends SourceMap> = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
type SourceAccessors<TSources extends SourceMap> = { [K in keyof TSources]: {
|
|
78
|
+
fetch: SourceFetcherFor<TSources[K]>;
|
|
79
|
+
} };
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/upload.d.ts
|
|
88
82
|
type UploadMetadata = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
name: string;
|
|
84
|
+
mimeType?: string | undefined;
|
|
85
|
+
size?: number | undefined;
|
|
86
|
+
annotations?: {
|
|
87
|
+
key: string;
|
|
88
|
+
value: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
collectionRefs?: string[] | undefined;
|
|
97
91
|
};
|
|
98
92
|
type UploadData = Uint8Array | ReadableStream$1<Uint8Array> | ReadableStream<Uint8Array>;
|
|
99
93
|
type UploadOptions = {
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
chunkSize?: number | undefined;
|
|
95
|
+
abort?: AbortSignal | undefined;
|
|
102
96
|
};
|
|
103
|
-
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/client.d.ts
|
|
104
99
|
type ConnectionContext = {
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
connectionId: string;
|
|
101
|
+
websocketUrl: string;
|
|
107
102
|
};
|
|
108
103
|
type ConnectionEvents = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
onConnected?: ((context: ConnectionContext) => void) | undefined;
|
|
105
|
+
onConnecting?: ((context: ConnectionContext) => void) | undefined;
|
|
106
|
+
onClosed?: ((context: ConnectionContext) => void) | undefined;
|
|
107
|
+
onError?: ((context: ConnectionContext, error: unknown) => void) | undefined;
|
|
113
108
|
};
|
|
114
109
|
type ContelloClientOptions<TSchema extends Schema | undefined = undefined> = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
url: string;
|
|
111
|
+
project: string;
|
|
112
|
+
token: string;
|
|
113
|
+
schema?: TSchema | undefined;
|
|
114
|
+
connections?: number | undefined;
|
|
115
|
+
http?: HttpAgentOptions | undefined;
|
|
116
|
+
onConnected?: (() => void) | undefined;
|
|
117
|
+
onReconnecting?: (() => void) | undefined;
|
|
118
|
+
onError?: ((error: unknown) => void) | undefined;
|
|
119
|
+
connectionEvents?: ConnectionEvents | undefined;
|
|
125
120
|
};
|
|
126
121
|
declare class ContelloClient<TSchema extends Schema | undefined = undefined> {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
122
|
+
private _pool;
|
|
123
|
+
private _rpc;
|
|
124
|
+
private _sources;
|
|
125
|
+
private _url;
|
|
126
|
+
private _project;
|
|
127
|
+
private _token;
|
|
128
|
+
private _agent;
|
|
129
|
+
constructor(options: ContelloClientOptions<TSchema>);
|
|
130
|
+
get rpc(): TSchema extends Schema<infer TOps, any, any> ? Rpc<TOps> : never;
|
|
131
|
+
get sources(): TSchema extends Schema<any, infer TSources, any> ? SourceAccessors<TSources> : never;
|
|
132
|
+
init(): Promise<void>;
|
|
133
|
+
destroy(): Promise<void>;
|
|
134
|
+
ping(): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Open a subscription on the websocket. Each `[Symbol.asyncIterator]()` call (the implicit one
|
|
137
|
+
* from `for await`, or via `rxjs.from(this)`) starts a fresh server subscription and tears it
|
|
138
|
+
* down when the iterator is returned (`break`, error, or explicit stop).
|
|
139
|
+
*/
|
|
140
|
+
subscribe<TData>(query: string, variables?: Record<string, unknown> | undefined): AsyncIterable<TData>;
|
|
141
|
+
download(fileId: string): Promise<DownloadResult>;
|
|
142
|
+
proxyHls(path: string, signal?: AbortSignal | undefined): Promise<ProxyResult>;
|
|
143
|
+
upload(data: UploadData, meta: UploadMetadata, options?: UploadOptions | undefined): Promise<string>;
|
|
144
|
+
execute<TData>(query: string, variables?: Record<string, unknown> | undefined): Promise<TData>;
|
|
150
145
|
}
|
|
151
146
|
declare function createContelloClient<TSchema extends Schema | undefined = undefined>(options: ContelloClientOptions<TSchema>): ContelloClient<TSchema>;
|
|
152
|
-
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/scalars.d.ts
|
|
153
149
|
type LocalDateTime = {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
year: number;
|
|
151
|
+
month: number;
|
|
152
|
+
day: number;
|
|
153
|
+
hour: number;
|
|
154
|
+
minute: number;
|
|
155
|
+
second: number;
|
|
160
156
|
};
|
|
161
157
|
type LocalDate = {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
year: number;
|
|
159
|
+
month: number;
|
|
160
|
+
day: number;
|
|
165
161
|
};
|
|
166
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/source-subscription.d.ts
|
|
167
164
|
declare function createSourceSubscription(source: SourceDef): string;
|
|
168
|
-
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/async-iterable-utils.d.ts
|
|
169
167
|
/**
|
|
170
168
|
* Returns the first value yielded by `iter`, then disposes the iterator. Throws if the iterable
|
|
171
169
|
* completes without yielding. Equivalent of rxjs's `firstValueFrom` for AsyncIterables.
|
|
@@ -196,7 +194,8 @@ declare function runWithBackoff(fn: () => Promise<unknown>, signal?: AbortSignal
|
|
|
196
194
|
* Designed for subscriptions that should stay open across reconnects (e.g. the watcher).
|
|
197
195
|
*/
|
|
198
196
|
declare function asyncKeepalive<T>(factory: () => AsyncIterable<T>, signal?: AbortSignal | undefined): AsyncIterable<T>;
|
|
199
|
-
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/async-iterable-subject.d.ts
|
|
200
199
|
/**
|
|
201
200
|
* Multicast event source with `next` / `error` / `complete` (Subject semantics) plus an
|
|
202
201
|
* `AsyncIterable` view. Two consumption modes that fan out from the same source:
|
|
@@ -217,15 +216,16 @@ declare function asyncKeepalive<T>(factory: () => AsyncIterable<T>, signal?: Abo
|
|
|
217
216
|
* Backpressure: unbounded queue per pending iterator. Intended for low-frequency events.
|
|
218
217
|
*/
|
|
219
218
|
type AsyncIterableSubject<T> = AsyncIterable<T> & {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
219
|
+
next: (value: T) => void;
|
|
220
|
+
error: (err: unknown) => void;
|
|
221
|
+
complete: () => void;
|
|
222
|
+
subscribe: (observerOrNext: ((value: T) => void) | {
|
|
223
|
+
next?: (value: T) => void;
|
|
224
|
+
error?: (err: unknown) => void;
|
|
225
|
+
complete?: () => void;
|
|
226
|
+
}) => () => void;
|
|
228
227
|
};
|
|
229
228
|
declare function createAsyncIterableSubject<T>(): AsyncIterableSubject<T>;
|
|
230
|
-
|
|
229
|
+
//#endregion
|
|
231
230
|
export { type AsyncIterableSubject, type ConnectionContext, type ConnectionEvents, ContelloClient, type ContelloClientOptions, type DownloadResult, type HttpAgentOptions, type LocalDate, type LocalDateTime, type OperationDef, type OperationKind, type OperationMap, type ProxyResult, type Rpc, type Schema, type SourceAccessors, type SourceCardinality, type SourceDef, type SourceMap, type UploadData, type UploadMetadata, type UploadOptions, asyncKeepalive, collectAsync, createAsyncIterableSubject, createContelloClient, createSourceSubscription, exponentialBackoff, filterAsync, firstAsync, mapAsync, runWithBackoff };
|
|
231
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/http.ts","../src/types.ts","../src/upload.ts","../src/client.ts","../src/scalars.ts","../src/source-subscription.ts","../src/async-iterable-utils.ts","../src/async-iterable-subject.ts"],"mappings":";;;;KAiCY,gBAAA;EACV,UAAA;EACA,OAAA;EACA,oBAAA;EACA,gBAAA;AAAA;AAAA,KAcU,cAAA;EACV,QAAA;EACA,IAAA;EACA,KAAA,IAAS,OAAA,CAAQ,UAAA;EACjB,MAAA,IAAU,cAAA,CAAe,UAAA;AAAA;AAAA,KAiCf,WAAA;EACV,MAAA;EACA,OAAA,EAAS,OAAA;EACT,MAAA,IAAU,cAAA,CAAe,UAAA;AAAA;;;KC3Ff,aAAA;AAAA,KAEA,YAAA,iCAEG,MAAA,iCACC,aAAA,GAAgB,aAAA;EAE9B,QAAA;EACA,IAAA,EAAM,KAAA,EDyBI;ECvBV,QAAA,GAAW,OAAA;EAEX,WAAA,GAAc,UAAA;AAAA;AAAA,KAGJ,YAAA,GAAe,MAAM,SAAS,YAAA;AAAA,KAE9B,WAAA,WAAsB,YAAA,IAAgB,WAAA,CAAY,CAAA;AAAA,KAClD,cAAA,WAAyB,YAAA,IAAgB,WAAA,CAAY,CAAA;AAAA,KAErD,SAAA,WAAoB,YAAA,IAAgB,CAAA,kCAC5C,cAAA,CAAe,CAAA,UAAW,MAAA,wBAClB,aAAA,CAAc,WAAA,CAAY,CAAA,MAC/B,SAAA,EAAW,cAAA,CAAe,CAAA,MAAO,aAAA,CAAc,WAAA,CAAY,CAAA,KAC9D,cAAA,CAAe,CAAA,UAAW,MAAA,wBAClB,OAAA,CAAQ,WAAA,CAAY,CAAA,MACzB,SAAA,EAAW,cAAA,CAAe,CAAA,MAAO,OAAA,CAAQ,WAAA,CAAY,CAAA;AAAA,KAEhD,GAAA,WAAc,YAAA,kBACZ,CAAA,GAAI,SAAA,CAAU,CAAA,CAAE,CAAA;;;;;;;;;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