@powersync/service-types 0.10.0 → 0.11.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/CHANGELOG.md +7 -0
- package/dist/config/PowerSyncConfig.d.ts +636 -166
- package/dist/config/PowerSyncConfig.js +391 -88
- package/dist/config/PowerSyncConfig.js.map +1 -1
- package/package.json +2 -1
- package/src/config/PowerSyncConfig.ts +459 -148
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as t from 'ts-codec';
|
|
2
|
+
/**
|
|
3
|
+
* The meta tags here are used in the generated JSON schema.
|
|
4
|
+
* The JSON schema can be used to help self hosted users edit the YAML config file.
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* Users might specify ports as strings if using YAML custom tag environment substitutions
|
|
4
8
|
*/
|
|
@@ -14,16 +18,28 @@ export declare const portParser: {
|
|
|
14
18
|
}[];
|
|
15
19
|
};
|
|
16
20
|
};
|
|
17
|
-
export declare const DataSourceConfig: t.
|
|
18
|
-
type:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
debug_api
|
|
21
|
+
export declare const DataSourceConfig: t.Codec<{
|
|
22
|
+
type: string;
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
tag?: string | undefined;
|
|
25
|
+
debug_api?: boolean | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
type: string;
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
tag?: string | undefined;
|
|
30
|
+
debug_api?: boolean | undefined;
|
|
31
|
+
}, t.CodecType.Object, {
|
|
32
|
+
shape: {
|
|
33
|
+
type: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
34
|
+
/** Unique identifier for the connection - optional when a single connection is present. */
|
|
35
|
+
id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
36
|
+
/** Additional meta tag for connection */
|
|
37
|
+
tag: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
38
|
+
/**
|
|
39
|
+
* Allows for debug query execution
|
|
40
|
+
*/
|
|
41
|
+
debug_api: t.OptionalCodec<t.Codec<boolean, boolean, string, t.CodecProps>>;
|
|
42
|
+
};
|
|
27
43
|
}>;
|
|
28
44
|
export type DataSourceConfig = t.Decoded<typeof DataSourceConfig>;
|
|
29
45
|
/**
|
|
@@ -60,117 +76,373 @@ export declare const genericDataSourceConfig: t.Intersection<t.Codec<{
|
|
|
60
76
|
debug_api?: boolean | undefined;
|
|
61
77
|
}, string, t.CodecProps>, t.RecordCodec<t.Codec<any, any, t.CodecType.Any, t.CodecProps>>>;
|
|
62
78
|
export type GenericDataSourceConfig = t.Decoded<typeof genericDataSourceConfig>;
|
|
63
|
-
export declare const jwkRSA: t.
|
|
64
|
-
kty:
|
|
65
|
-
kid:
|
|
66
|
-
n:
|
|
67
|
-
e:
|
|
68
|
-
alg
|
|
69
|
-
use
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/** Other curves have security issues so only these two are supported. */
|
|
86
|
-
crv: t.Union<t.Codec<"Ed25519", "Ed25519", string, t.CodecProps>, t.LiteralCodec<"Ed448">>;
|
|
87
|
-
x: t.IdentityCodec<t.CodecType.String>;
|
|
88
|
-
alg: t.LiteralCodec<"EdDSA">;
|
|
89
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
90
|
-
}>;
|
|
91
|
-
export declare const jwkEC: t.ObjectCodec<{
|
|
92
|
-
kty: t.LiteralCodec<"EC">;
|
|
93
|
-
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
94
|
-
crv: t.Union<t.Codec<"P-256" | "P-384", "P-256" | "P-384", string, t.CodecProps>, t.LiteralCodec<"P-512">>;
|
|
95
|
-
x: t.IdentityCodec<t.CodecType.String>;
|
|
96
|
-
y: t.IdentityCodec<t.CodecType.String>;
|
|
97
|
-
alg: t.Union<t.Codec<"ES256" | "ES384", "ES256" | "ES384", string, t.CodecProps>, t.LiteralCodec<"ES512">>;
|
|
98
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
99
|
-
}>;
|
|
100
|
-
declare const jwk: t.Union<t.Union<t.Union<t.ObjectCodec<{
|
|
101
|
-
kty: t.LiteralCodec<"RSA">;
|
|
102
|
-
kid: t.IdentityCodec<t.CodecType.String>;
|
|
103
|
-
n: t.IdentityCodec<t.CodecType.String>;
|
|
104
|
-
e: t.IdentityCodec<t.CodecType.String>;
|
|
105
|
-
alg: t.OptionalCodec<t.Codec<"RS256" | "RS384" | "RS512", "RS256" | "RS384" | "RS512", string, t.CodecProps>>;
|
|
106
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
107
|
-
}>, t.ObjectCodec<{
|
|
108
|
-
kty: t.LiteralCodec<"oct">;
|
|
109
|
-
/**
|
|
110
|
-
* undefined kid indicates it can match any JWT, with or without a kid.
|
|
111
|
-
* Use a kid wherever possible.
|
|
112
|
-
*/
|
|
113
|
-
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
114
|
-
k: t.IdentityCodec<t.CodecType.String>;
|
|
115
|
-
alg: t.Union<t.Codec<"HS256" | "HS384", "HS256" | "HS384", string, t.CodecProps>, t.LiteralCodec<"HS512">>;
|
|
116
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
117
|
-
}>>, t.ObjectCodec<{
|
|
118
|
-
kty: t.LiteralCodec<"OKP">;
|
|
119
|
-
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
120
|
-
/** Other curves have security issues so only these two are supported. */
|
|
121
|
-
crv: t.Union<t.Codec<"Ed25519", "Ed25519", string, t.CodecProps>, t.LiteralCodec<"Ed448">>;
|
|
122
|
-
x: t.IdentityCodec<t.CodecType.String>;
|
|
123
|
-
alg: t.LiteralCodec<"EdDSA">;
|
|
124
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
125
|
-
}>>, t.ObjectCodec<{
|
|
126
|
-
kty: t.LiteralCodec<"EC">;
|
|
127
|
-
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
128
|
-
crv: t.Union<t.Codec<"P-256" | "P-384", "P-256" | "P-384", string, t.CodecProps>, t.LiteralCodec<"P-512">>;
|
|
129
|
-
x: t.IdentityCodec<t.CodecType.String>;
|
|
130
|
-
y: t.IdentityCodec<t.CodecType.String>;
|
|
131
|
-
alg: t.Union<t.Codec<"ES256" | "ES384", "ES256" | "ES384", string, t.CodecProps>, t.LiteralCodec<"ES512">>;
|
|
132
|
-
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
133
|
-
}>>;
|
|
134
|
-
export declare const strictJwks: t.ObjectCodec<{
|
|
135
|
-
keys: t.ArrayCodec<t.Union<t.Union<t.Union<t.ObjectCodec<{
|
|
136
|
-
kty: t.LiteralCodec<"RSA">;
|
|
137
|
-
kid: t.IdentityCodec<t.CodecType.String>;
|
|
138
|
-
n: t.IdentityCodec<t.CodecType.String>;
|
|
139
|
-
e: t.IdentityCodec<t.CodecType.String>;
|
|
79
|
+
export declare const jwkRSA: t.Codec<{
|
|
80
|
+
kty: "RSA";
|
|
81
|
+
kid: string;
|
|
82
|
+
n: string;
|
|
83
|
+
e: string;
|
|
84
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
85
|
+
use?: string | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
kty: "RSA";
|
|
88
|
+
kid: string;
|
|
89
|
+
n: string;
|
|
90
|
+
e: string;
|
|
91
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
92
|
+
use?: string | undefined;
|
|
93
|
+
}, t.CodecType.Object, {
|
|
94
|
+
shape: {
|
|
95
|
+
kty: t.Codec<"RSA", "RSA", t.CodecType.Literal, {
|
|
96
|
+
value: "RSA";
|
|
97
|
+
}>;
|
|
98
|
+
kid: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
99
|
+
n: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
100
|
+
e: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
140
101
|
alg: t.OptionalCodec<t.Codec<"RS256" | "RS384" | "RS512", "RS256" | "RS384" | "RS512", string, t.CodecProps>>;
|
|
141
102
|
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
103
|
+
};
|
|
104
|
+
}>;
|
|
105
|
+
export declare const jwkHmac: t.Codec<{
|
|
106
|
+
kty: "oct";
|
|
107
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
108
|
+
k: string;
|
|
109
|
+
kid?: string | undefined;
|
|
110
|
+
use?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
kty: "oct";
|
|
113
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
114
|
+
k: string;
|
|
115
|
+
kid?: string | undefined;
|
|
116
|
+
use?: string | undefined;
|
|
117
|
+
}, t.CodecType.Object, {
|
|
118
|
+
shape: {
|
|
119
|
+
kty: t.Codec<"oct", "oct", t.CodecType.Literal, {
|
|
120
|
+
value: "oct";
|
|
121
|
+
}>;
|
|
148
122
|
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
149
|
-
k: t.
|
|
150
|
-
alg: t.
|
|
123
|
+
k: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
124
|
+
alg: t.Codec<"HS256" | "HS384" | "HS512", "HS256" | "HS384" | "HS512", t.CodecType.Union, {
|
|
125
|
+
codecs: t.AnyCodec[];
|
|
126
|
+
}>;
|
|
151
127
|
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
152
|
-
}
|
|
153
|
-
|
|
128
|
+
};
|
|
129
|
+
}>;
|
|
130
|
+
export declare const jwkOKP: t.Codec<{
|
|
131
|
+
kty: "OKP";
|
|
132
|
+
alg: "EdDSA";
|
|
133
|
+
crv: "Ed25519" | "Ed448";
|
|
134
|
+
x: string;
|
|
135
|
+
kid?: string | undefined;
|
|
136
|
+
use?: string | undefined;
|
|
137
|
+
}, {
|
|
138
|
+
kty: "OKP";
|
|
139
|
+
alg: "EdDSA";
|
|
140
|
+
crv: "Ed25519" | "Ed448";
|
|
141
|
+
x: string;
|
|
142
|
+
kid?: string | undefined;
|
|
143
|
+
use?: string | undefined;
|
|
144
|
+
}, t.CodecType.Object, {
|
|
145
|
+
shape: {
|
|
146
|
+
kty: t.Codec<"OKP", "OKP", t.CodecType.Literal, {
|
|
147
|
+
value: "OKP";
|
|
148
|
+
}>;
|
|
154
149
|
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
155
150
|
/** Other curves have security issues so only these two are supported. */
|
|
156
|
-
crv: t.
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
crv: t.Codec<"Ed25519" | "Ed448", "Ed25519" | "Ed448", t.CodecType.Union, {
|
|
152
|
+
codecs: t.AnyCodec[];
|
|
153
|
+
}>;
|
|
154
|
+
x: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
155
|
+
alg: t.Codec<"EdDSA", "EdDSA", t.CodecType.Literal, {
|
|
156
|
+
value: "EdDSA";
|
|
157
|
+
}>;
|
|
159
158
|
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
160
|
-
}
|
|
161
|
-
|
|
159
|
+
};
|
|
160
|
+
}>;
|
|
161
|
+
export declare const jwkEC: t.Codec<{
|
|
162
|
+
kty: "EC";
|
|
163
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
164
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
165
|
+
x: string;
|
|
166
|
+
y: string;
|
|
167
|
+
kid?: string | undefined;
|
|
168
|
+
use?: string | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
kty: "EC";
|
|
171
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
172
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
173
|
+
x: string;
|
|
174
|
+
y: string;
|
|
175
|
+
kid?: string | undefined;
|
|
176
|
+
use?: string | undefined;
|
|
177
|
+
}, t.CodecType.Object, {
|
|
178
|
+
shape: {
|
|
179
|
+
kty: t.Codec<"EC", "EC", t.CodecType.Literal, {
|
|
180
|
+
value: "EC";
|
|
181
|
+
}>;
|
|
162
182
|
kid: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
163
|
-
crv: t.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
183
|
+
crv: t.Codec<"P-256" | "P-384" | "P-512", "P-256" | "P-384" | "P-512", t.CodecType.Union, {
|
|
184
|
+
codecs: t.AnyCodec[];
|
|
185
|
+
}>;
|
|
186
|
+
x: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
187
|
+
y: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
188
|
+
alg: t.Codec<"ES256" | "ES384" | "ES512", "ES256" | "ES384" | "ES512", t.CodecType.Union, {
|
|
189
|
+
codecs: t.AnyCodec[];
|
|
190
|
+
}>;
|
|
167
191
|
use: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
168
|
-
}
|
|
192
|
+
};
|
|
193
|
+
}>;
|
|
194
|
+
declare const jwk: t.Codec<{
|
|
195
|
+
kty: "RSA";
|
|
196
|
+
kid: string;
|
|
197
|
+
n: string;
|
|
198
|
+
e: string;
|
|
199
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
200
|
+
use?: string | undefined;
|
|
201
|
+
} | {
|
|
202
|
+
kty: "oct";
|
|
203
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
204
|
+
k: string;
|
|
205
|
+
kid?: string | undefined;
|
|
206
|
+
use?: string | undefined;
|
|
207
|
+
} | {
|
|
208
|
+
kty: "OKP";
|
|
209
|
+
alg: "EdDSA";
|
|
210
|
+
crv: "Ed25519" | "Ed448";
|
|
211
|
+
x: string;
|
|
212
|
+
kid?: string | undefined;
|
|
213
|
+
use?: string | undefined;
|
|
214
|
+
} | {
|
|
215
|
+
kty: "EC";
|
|
216
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
217
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
218
|
+
x: string;
|
|
219
|
+
y: string;
|
|
220
|
+
kid?: string | undefined;
|
|
221
|
+
use?: string | undefined;
|
|
222
|
+
}, {
|
|
223
|
+
kty: "RSA";
|
|
224
|
+
kid: string;
|
|
225
|
+
n: string;
|
|
226
|
+
e: string;
|
|
227
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
228
|
+
use?: string | undefined;
|
|
229
|
+
} | {
|
|
230
|
+
kty: "oct";
|
|
231
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
232
|
+
k: string;
|
|
233
|
+
kid?: string | undefined;
|
|
234
|
+
use?: string | undefined;
|
|
235
|
+
} | {
|
|
236
|
+
kty: "OKP";
|
|
237
|
+
alg: "EdDSA";
|
|
238
|
+
crv: "Ed25519" | "Ed448";
|
|
239
|
+
x: string;
|
|
240
|
+
kid?: string | undefined;
|
|
241
|
+
use?: string | undefined;
|
|
242
|
+
} | {
|
|
243
|
+
kty: "EC";
|
|
244
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
245
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
246
|
+
x: string;
|
|
247
|
+
y: string;
|
|
248
|
+
kid?: string | undefined;
|
|
249
|
+
use?: string | undefined;
|
|
250
|
+
}, t.CodecType.Union, {
|
|
251
|
+
codecs: t.AnyCodec[];
|
|
252
|
+
}>;
|
|
253
|
+
export declare const strictJwks: t.Codec<{
|
|
254
|
+
keys: ({
|
|
255
|
+
kty: "RSA";
|
|
256
|
+
kid: string;
|
|
257
|
+
n: string;
|
|
258
|
+
e: string;
|
|
259
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
260
|
+
use?: string | undefined;
|
|
261
|
+
} | {
|
|
262
|
+
kty: "oct";
|
|
263
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
264
|
+
k: string;
|
|
265
|
+
kid?: string | undefined;
|
|
266
|
+
use?: string | undefined;
|
|
267
|
+
} | {
|
|
268
|
+
kty: "OKP";
|
|
269
|
+
alg: "EdDSA";
|
|
270
|
+
crv: "Ed25519" | "Ed448";
|
|
271
|
+
x: string;
|
|
272
|
+
kid?: string | undefined;
|
|
273
|
+
use?: string | undefined;
|
|
274
|
+
} | {
|
|
275
|
+
kty: "EC";
|
|
276
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
277
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
278
|
+
x: string;
|
|
279
|
+
y: string;
|
|
280
|
+
kid?: string | undefined;
|
|
281
|
+
use?: string | undefined;
|
|
282
|
+
})[];
|
|
283
|
+
}, {
|
|
284
|
+
keys: ({
|
|
285
|
+
kty: "RSA";
|
|
286
|
+
kid: string;
|
|
287
|
+
n: string;
|
|
288
|
+
e: string;
|
|
289
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
290
|
+
use?: string | undefined;
|
|
291
|
+
} | {
|
|
292
|
+
kty: "oct";
|
|
293
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
294
|
+
k: string;
|
|
295
|
+
kid?: string | undefined;
|
|
296
|
+
use?: string | undefined;
|
|
297
|
+
} | {
|
|
298
|
+
kty: "OKP";
|
|
299
|
+
alg: "EdDSA";
|
|
300
|
+
crv: "Ed25519" | "Ed448";
|
|
301
|
+
x: string;
|
|
302
|
+
kid?: string | undefined;
|
|
303
|
+
use?: string | undefined;
|
|
304
|
+
} | {
|
|
305
|
+
kty: "EC";
|
|
306
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
307
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
308
|
+
x: string;
|
|
309
|
+
y: string;
|
|
310
|
+
kid?: string | undefined;
|
|
311
|
+
use?: string | undefined;
|
|
312
|
+
})[];
|
|
313
|
+
}, t.CodecType.Object, {
|
|
314
|
+
shape: {
|
|
315
|
+
keys: t.Codec<({
|
|
316
|
+
kty: "RSA";
|
|
317
|
+
kid: string;
|
|
318
|
+
n: string;
|
|
319
|
+
e: string;
|
|
320
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
321
|
+
use?: string | undefined;
|
|
322
|
+
} | {
|
|
323
|
+
kty: "oct";
|
|
324
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
325
|
+
k: string;
|
|
326
|
+
kid?: string | undefined;
|
|
327
|
+
use?: string | undefined;
|
|
328
|
+
} | {
|
|
329
|
+
kty: "OKP";
|
|
330
|
+
alg: "EdDSA";
|
|
331
|
+
crv: "Ed25519" | "Ed448";
|
|
332
|
+
x: string;
|
|
333
|
+
kid?: string | undefined;
|
|
334
|
+
use?: string | undefined;
|
|
335
|
+
} | {
|
|
336
|
+
kty: "EC";
|
|
337
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
338
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
339
|
+
x: string;
|
|
340
|
+
y: string;
|
|
341
|
+
kid?: string | undefined;
|
|
342
|
+
use?: string | undefined;
|
|
343
|
+
})[], ({
|
|
344
|
+
kty: "RSA";
|
|
345
|
+
kid: string;
|
|
346
|
+
n: string;
|
|
347
|
+
e: string;
|
|
348
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
349
|
+
use?: string | undefined;
|
|
350
|
+
} | {
|
|
351
|
+
kty: "oct";
|
|
352
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
353
|
+
k: string;
|
|
354
|
+
kid?: string | undefined;
|
|
355
|
+
use?: string | undefined;
|
|
356
|
+
} | {
|
|
357
|
+
kty: "OKP";
|
|
358
|
+
alg: "EdDSA";
|
|
359
|
+
crv: "Ed25519" | "Ed448";
|
|
360
|
+
x: string;
|
|
361
|
+
kid?: string | undefined;
|
|
362
|
+
use?: string | undefined;
|
|
363
|
+
} | {
|
|
364
|
+
kty: "EC";
|
|
365
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
366
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
367
|
+
x: string;
|
|
368
|
+
y: string;
|
|
369
|
+
kid?: string | undefined;
|
|
370
|
+
use?: string | undefined;
|
|
371
|
+
})[], t.CodecType.Array, {
|
|
372
|
+
type: t.Codec<{
|
|
373
|
+
kty: "RSA";
|
|
374
|
+
kid: string;
|
|
375
|
+
n: string;
|
|
376
|
+
e: string;
|
|
377
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
378
|
+
use?: string | undefined;
|
|
379
|
+
} | {
|
|
380
|
+
kty: "oct";
|
|
381
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
382
|
+
k: string;
|
|
383
|
+
kid?: string | undefined;
|
|
384
|
+
use?: string | undefined;
|
|
385
|
+
} | {
|
|
386
|
+
kty: "OKP";
|
|
387
|
+
alg: "EdDSA";
|
|
388
|
+
crv: "Ed25519" | "Ed448";
|
|
389
|
+
x: string;
|
|
390
|
+
kid?: string | undefined;
|
|
391
|
+
use?: string | undefined;
|
|
392
|
+
} | {
|
|
393
|
+
kty: "EC";
|
|
394
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
395
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
396
|
+
x: string;
|
|
397
|
+
y: string;
|
|
398
|
+
kid?: string | undefined;
|
|
399
|
+
use?: string | undefined;
|
|
400
|
+
}, {
|
|
401
|
+
kty: "RSA";
|
|
402
|
+
kid: string;
|
|
403
|
+
n: string;
|
|
404
|
+
e: string;
|
|
405
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
406
|
+
use?: string | undefined;
|
|
407
|
+
} | {
|
|
408
|
+
kty: "oct";
|
|
409
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
410
|
+
k: string;
|
|
411
|
+
kid?: string | undefined;
|
|
412
|
+
use?: string | undefined;
|
|
413
|
+
} | {
|
|
414
|
+
kty: "OKP";
|
|
415
|
+
alg: "EdDSA";
|
|
416
|
+
crv: "Ed25519" | "Ed448";
|
|
417
|
+
x: string;
|
|
418
|
+
kid?: string | undefined;
|
|
419
|
+
use?: string | undefined;
|
|
420
|
+
} | {
|
|
421
|
+
kty: "EC";
|
|
422
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
423
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
424
|
+
x: string;
|
|
425
|
+
y: string;
|
|
426
|
+
kid?: string | undefined;
|
|
427
|
+
use?: string | undefined;
|
|
428
|
+
}, t.CodecType.Union, {
|
|
429
|
+
codecs: t.AnyCodec[];
|
|
430
|
+
}>;
|
|
431
|
+
}>;
|
|
432
|
+
};
|
|
169
433
|
}>;
|
|
170
434
|
export type StrictJwk = t.Decoded<typeof jwk>;
|
|
171
|
-
export declare const BaseStorageConfig: t.
|
|
172
|
-
type:
|
|
173
|
-
max_pool_size
|
|
435
|
+
export declare const BaseStorageConfig: t.Codec<{
|
|
436
|
+
type: string;
|
|
437
|
+
max_pool_size?: number | undefined;
|
|
438
|
+
}, {
|
|
439
|
+
type: string;
|
|
440
|
+
max_pool_size?: number | undefined;
|
|
441
|
+
}, t.CodecType.Object, {
|
|
442
|
+
shape: {
|
|
443
|
+
type: t.Codec<string, string, t.CodecType.String, t.CodecProps>;
|
|
444
|
+
max_pool_size: t.OptionalCodec<t.Codec<number, number, string, t.CodecProps>>;
|
|
445
|
+
};
|
|
174
446
|
}>;
|
|
175
447
|
/**
|
|
176
448
|
* Base configuration for Bucket storage connections.
|
|
@@ -187,34 +459,26 @@ export declare const GenericStorageConfig: t.Intersection<t.Codec<{
|
|
|
187
459
|
max_pool_size?: number | undefined;
|
|
188
460
|
}, string, t.CodecProps>, t.RecordCodec<t.Codec<any, any, t.CodecType.Any, t.CodecProps>>>;
|
|
189
461
|
export type GenericStorageConfig = t.Encoded<typeof GenericStorageConfig>;
|
|
190
|
-
export declare const powerSyncConfig: t.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
debug_api?: boolean | undefined;
|
|
197
|
-
} & Record<string, any>)[] | undefined;
|
|
198
|
-
}, {
|
|
462
|
+
export declare const powerSyncConfig: t.Codec<{
|
|
463
|
+
storage: {
|
|
464
|
+
type: string;
|
|
465
|
+
max_pool_size?: number | undefined;
|
|
466
|
+
} & Record<string, any>;
|
|
467
|
+
replication?: {
|
|
199
468
|
connections?: ({
|
|
200
469
|
type: string;
|
|
201
470
|
id?: string | undefined;
|
|
202
471
|
tag?: string | undefined;
|
|
203
472
|
debug_api?: boolean | undefined;
|
|
204
473
|
} & Record<string, any>)[] | undefined;
|
|
205
|
-
}
|
|
206
|
-
dev
|
|
474
|
+
} | undefined;
|
|
475
|
+
dev?: {
|
|
207
476
|
demo_auth?: boolean | undefined;
|
|
208
477
|
demo_password?: string | undefined;
|
|
209
478
|
crud_api?: boolean | undefined;
|
|
210
479
|
demo_client?: boolean | undefined;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
demo_password?: string | undefined;
|
|
214
|
-
crud_api?: boolean | undefined;
|
|
215
|
-
demo_client?: boolean | undefined;
|
|
216
|
-
}, string, t.CodecProps>>;
|
|
217
|
-
client_auth: t.OptionalCodec<t.Codec<{
|
|
480
|
+
} | undefined;
|
|
481
|
+
client_auth?: {
|
|
218
482
|
jwks_uri?: string | string[] | undefined;
|
|
219
483
|
block_local_jwks?: boolean | undefined;
|
|
220
484
|
jwks_reject_ip_ranges?: string[] | undefined;
|
|
@@ -252,7 +516,59 @@ export declare const powerSyncConfig: t.ObjectCodec<{
|
|
|
252
516
|
supabase?: boolean | undefined;
|
|
253
517
|
supabase_jwt_secret?: string | undefined;
|
|
254
518
|
audience?: string[] | undefined;
|
|
255
|
-
}
|
|
519
|
+
} | undefined;
|
|
520
|
+
parameters?: Record<string, string | number | boolean | null> | undefined;
|
|
521
|
+
api?: {
|
|
522
|
+
tokens?: string[] | undefined;
|
|
523
|
+
parameters?: {
|
|
524
|
+
max_concurrent_connections?: number | undefined;
|
|
525
|
+
max_data_fetch_concurrency?: number | undefined;
|
|
526
|
+
max_buckets_per_connection?: number | undefined;
|
|
527
|
+
max_parameter_query_results?: number | undefined;
|
|
528
|
+
} | undefined;
|
|
529
|
+
} | undefined;
|
|
530
|
+
port?: number | undefined;
|
|
531
|
+
sync_rules?: {
|
|
532
|
+
content?: string | undefined;
|
|
533
|
+
path?: string | undefined;
|
|
534
|
+
exit_on_error?: boolean | undefined;
|
|
535
|
+
} | undefined;
|
|
536
|
+
metadata?: Record<string, string> | undefined;
|
|
537
|
+
migrations?: {
|
|
538
|
+
disable_auto_migration?: boolean | undefined;
|
|
539
|
+
} | undefined;
|
|
540
|
+
telemetry?: {
|
|
541
|
+
disable_telemetry_sharing: boolean;
|
|
542
|
+
prometheus_port?: number | undefined;
|
|
543
|
+
internal_service_endpoint?: string | undefined;
|
|
544
|
+
} | undefined;
|
|
545
|
+
healthcheck?: {
|
|
546
|
+
probes?: {
|
|
547
|
+
use_filesystem?: boolean | undefined;
|
|
548
|
+
use_http?: boolean | undefined;
|
|
549
|
+
use_legacy?: boolean | undefined;
|
|
550
|
+
} | undefined;
|
|
551
|
+
} | undefined;
|
|
552
|
+
}, {
|
|
553
|
+
storage: {
|
|
554
|
+
type: string;
|
|
555
|
+
max_pool_size?: number | undefined;
|
|
556
|
+
} & Record<string, any>;
|
|
557
|
+
replication?: {
|
|
558
|
+
connections?: ({
|
|
559
|
+
type: string;
|
|
560
|
+
id?: string | undefined;
|
|
561
|
+
tag?: string | undefined;
|
|
562
|
+
debug_api?: boolean | undefined;
|
|
563
|
+
} & Record<string, any>)[] | undefined;
|
|
564
|
+
} | undefined;
|
|
565
|
+
dev?: {
|
|
566
|
+
demo_auth?: boolean | undefined;
|
|
567
|
+
demo_password?: string | undefined;
|
|
568
|
+
crud_api?: boolean | undefined;
|
|
569
|
+
demo_client?: boolean | undefined;
|
|
570
|
+
} | undefined;
|
|
571
|
+
client_auth?: {
|
|
256
572
|
jwks_uri?: string | string[] | undefined;
|
|
257
573
|
block_local_jwks?: boolean | undefined;
|
|
258
574
|
jwks_reject_ip_ranges?: string[] | undefined;
|
|
@@ -290,8 +606,9 @@ export declare const powerSyncConfig: t.ObjectCodec<{
|
|
|
290
606
|
supabase?: boolean | undefined;
|
|
291
607
|
supabase_jwt_secret?: string | undefined;
|
|
292
608
|
audience?: string[] | undefined;
|
|
293
|
-
}
|
|
294
|
-
|
|
609
|
+
} | undefined;
|
|
610
|
+
parameters?: Record<string, string | number | boolean | null> | undefined;
|
|
611
|
+
api?: {
|
|
295
612
|
tokens?: string[] | undefined;
|
|
296
613
|
parameters?: {
|
|
297
614
|
max_concurrent_connections?: number | undefined;
|
|
@@ -299,49 +616,202 @@ export declare const powerSyncConfig: t.ObjectCodec<{
|
|
|
299
616
|
max_buckets_per_connection?: number | undefined;
|
|
300
617
|
max_parameter_query_results?: number | undefined;
|
|
301
618
|
} | undefined;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
max_concurrent_connections?: number | undefined;
|
|
306
|
-
max_data_fetch_concurrency?: number | undefined;
|
|
307
|
-
max_buckets_per_connection?: number | undefined;
|
|
308
|
-
max_parameter_query_results?: number | undefined;
|
|
309
|
-
} | undefined;
|
|
310
|
-
}, string, t.CodecProps>>;
|
|
311
|
-
storage: t.Intersection<t.Codec<{
|
|
312
|
-
type: string;
|
|
313
|
-
max_pool_size?: number | undefined;
|
|
314
|
-
}, {
|
|
315
|
-
type: string;
|
|
316
|
-
max_pool_size?: number | undefined;
|
|
317
|
-
}, string, t.CodecProps>, t.RecordCodec<t.Codec<any, any, t.CodecType.Any, t.CodecProps>>>;
|
|
318
|
-
port: t.OptionalCodec<t.Codec<number, string | number, string, t.CodecProps>>;
|
|
319
|
-
sync_rules: t.OptionalCodec<t.Codec<{
|
|
619
|
+
} | undefined;
|
|
620
|
+
port?: string | number | undefined;
|
|
621
|
+
sync_rules?: {
|
|
320
622
|
content?: string | undefined;
|
|
321
623
|
path?: string | undefined;
|
|
322
624
|
exit_on_error?: boolean | undefined;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
exit_on_error?: boolean | undefined;
|
|
327
|
-
}, string, t.CodecProps>>;
|
|
328
|
-
metadata: t.OptionalCodec<t.Codec<Record<string, string>, Record<string, string>, string, t.CodecProps>>;
|
|
329
|
-
migrations: t.OptionalCodec<t.Codec<{
|
|
330
|
-
disable_auto_migration?: boolean | undefined;
|
|
331
|
-
}, {
|
|
625
|
+
} | undefined;
|
|
626
|
+
metadata?: Record<string, string> | undefined;
|
|
627
|
+
migrations?: {
|
|
332
628
|
disable_auto_migration?: boolean | undefined;
|
|
333
|
-
}
|
|
334
|
-
telemetry
|
|
335
|
-
disable_telemetry_sharing: boolean;
|
|
336
|
-
prometheus_port?: number | undefined;
|
|
337
|
-
internal_service_endpoint?: string | undefined;
|
|
338
|
-
}, {
|
|
629
|
+
} | undefined;
|
|
630
|
+
telemetry?: {
|
|
339
631
|
disable_telemetry_sharing: boolean;
|
|
340
632
|
prometheus_port?: string | number | undefined;
|
|
341
633
|
internal_service_endpoint?: string | undefined;
|
|
342
|
-
}
|
|
343
|
-
|
|
634
|
+
} | undefined;
|
|
635
|
+
healthcheck?: {
|
|
636
|
+
probes?: {
|
|
637
|
+
use_filesystem?: boolean | undefined;
|
|
638
|
+
use_http?: boolean | undefined;
|
|
639
|
+
use_legacy?: boolean | undefined;
|
|
640
|
+
} | undefined;
|
|
641
|
+
} | undefined;
|
|
642
|
+
}, t.CodecType.Object, {
|
|
643
|
+
shape: {
|
|
644
|
+
replication: t.OptionalCodec<t.Codec<{
|
|
645
|
+
connections?: ({
|
|
646
|
+
type: string;
|
|
647
|
+
id?: string | undefined;
|
|
648
|
+
tag?: string | undefined;
|
|
649
|
+
debug_api?: boolean | undefined;
|
|
650
|
+
} & Record<string, any>)[] | undefined;
|
|
651
|
+
}, {
|
|
652
|
+
connections?: ({
|
|
653
|
+
type: string;
|
|
654
|
+
id?: string | undefined;
|
|
655
|
+
tag?: string | undefined;
|
|
656
|
+
debug_api?: boolean | undefined;
|
|
657
|
+
} & Record<string, any>)[] | undefined;
|
|
658
|
+
}, string, t.CodecProps>>;
|
|
659
|
+
dev: t.OptionalCodec<t.Codec<{
|
|
660
|
+
demo_auth?: boolean | undefined;
|
|
661
|
+
demo_password?: string | undefined;
|
|
662
|
+
crud_api?: boolean | undefined;
|
|
663
|
+
demo_client?: boolean | undefined;
|
|
664
|
+
}, {
|
|
665
|
+
demo_auth?: boolean | undefined;
|
|
666
|
+
demo_password?: string | undefined;
|
|
667
|
+
crud_api?: boolean | undefined;
|
|
668
|
+
demo_client?: boolean | undefined;
|
|
669
|
+
}, string, t.CodecProps>>;
|
|
670
|
+
client_auth: t.OptionalCodec<t.Codec<{
|
|
671
|
+
jwks_uri?: string | string[] | undefined;
|
|
672
|
+
block_local_jwks?: boolean | undefined;
|
|
673
|
+
jwks_reject_ip_ranges?: string[] | undefined;
|
|
674
|
+
jwks?: {
|
|
675
|
+
keys: ({
|
|
676
|
+
kty: "RSA";
|
|
677
|
+
kid: string;
|
|
678
|
+
n: string;
|
|
679
|
+
e: string;
|
|
680
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
681
|
+
use?: string | undefined;
|
|
682
|
+
} | {
|
|
683
|
+
kty: "oct";
|
|
684
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
685
|
+
k: string;
|
|
686
|
+
kid?: string | undefined;
|
|
687
|
+
use?: string | undefined;
|
|
688
|
+
} | {
|
|
689
|
+
kty: "OKP";
|
|
690
|
+
alg: "EdDSA";
|
|
691
|
+
crv: "Ed25519" | "Ed448";
|
|
692
|
+
x: string;
|
|
693
|
+
kid?: string | undefined;
|
|
694
|
+
use?: string | undefined;
|
|
695
|
+
} | {
|
|
696
|
+
kty: "EC";
|
|
697
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
698
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
699
|
+
x: string;
|
|
700
|
+
y: string;
|
|
701
|
+
kid?: string | undefined;
|
|
702
|
+
use?: string | undefined;
|
|
703
|
+
})[];
|
|
704
|
+
} | undefined;
|
|
705
|
+
supabase?: boolean | undefined;
|
|
706
|
+
supabase_jwt_secret?: string | undefined;
|
|
707
|
+
audience?: string[] | undefined;
|
|
708
|
+
}, {
|
|
709
|
+
jwks_uri?: string | string[] | undefined;
|
|
710
|
+
block_local_jwks?: boolean | undefined;
|
|
711
|
+
jwks_reject_ip_ranges?: string[] | undefined;
|
|
712
|
+
jwks?: {
|
|
713
|
+
keys: ({
|
|
714
|
+
kty: "RSA";
|
|
715
|
+
kid: string;
|
|
716
|
+
n: string;
|
|
717
|
+
e: string;
|
|
718
|
+
alg?: "RS256" | "RS384" | "RS512" | undefined;
|
|
719
|
+
use?: string | undefined;
|
|
720
|
+
} | {
|
|
721
|
+
kty: "oct";
|
|
722
|
+
alg: "HS256" | "HS384" | "HS512";
|
|
723
|
+
k: string;
|
|
724
|
+
kid?: string | undefined;
|
|
725
|
+
use?: string | undefined;
|
|
726
|
+
} | {
|
|
727
|
+
kty: "OKP";
|
|
728
|
+
alg: "EdDSA";
|
|
729
|
+
crv: "Ed25519" | "Ed448";
|
|
730
|
+
x: string;
|
|
731
|
+
kid?: string | undefined;
|
|
732
|
+
use?: string | undefined;
|
|
733
|
+
} | {
|
|
734
|
+
kty: "EC";
|
|
735
|
+
alg: "ES256" | "ES384" | "ES512";
|
|
736
|
+
crv: "P-256" | "P-384" | "P-512";
|
|
737
|
+
x: string;
|
|
738
|
+
y: string;
|
|
739
|
+
kid?: string | undefined;
|
|
740
|
+
use?: string | undefined;
|
|
741
|
+
})[];
|
|
742
|
+
} | undefined;
|
|
743
|
+
supabase?: boolean | undefined;
|
|
744
|
+
supabase_jwt_secret?: string | undefined;
|
|
745
|
+
audience?: string[] | undefined;
|
|
746
|
+
}, string, t.CodecProps>>;
|
|
747
|
+
api: t.OptionalCodec<t.Codec<{
|
|
748
|
+
tokens?: string[] | undefined;
|
|
749
|
+
parameters?: {
|
|
750
|
+
max_concurrent_connections?: number | undefined;
|
|
751
|
+
max_data_fetch_concurrency?: number | undefined;
|
|
752
|
+
max_buckets_per_connection?: number | undefined;
|
|
753
|
+
max_parameter_query_results?: number | undefined;
|
|
754
|
+
} | undefined;
|
|
755
|
+
}, {
|
|
756
|
+
tokens?: string[] | undefined;
|
|
757
|
+
parameters?: {
|
|
758
|
+
max_concurrent_connections?: number | undefined;
|
|
759
|
+
max_data_fetch_concurrency?: number | undefined;
|
|
760
|
+
max_buckets_per_connection?: number | undefined;
|
|
761
|
+
max_parameter_query_results?: number | undefined;
|
|
762
|
+
} | undefined;
|
|
763
|
+
}, string, t.CodecProps>>;
|
|
764
|
+
storage: t.Codec<{
|
|
765
|
+
type: string;
|
|
766
|
+
max_pool_size?: number | undefined;
|
|
767
|
+
} & Record<string, any>, {
|
|
768
|
+
type: string;
|
|
769
|
+
max_pool_size?: number | undefined;
|
|
770
|
+
} & Record<string, any>, t.CodecType.Intersection, {
|
|
771
|
+
codecs: t.AnyCodec[];
|
|
772
|
+
}>;
|
|
773
|
+
port: t.OptionalCodec<t.Codec<number, string | number, string, t.CodecProps>>;
|
|
774
|
+
sync_rules: t.OptionalCodec<t.Codec<{
|
|
775
|
+
content?: string | undefined;
|
|
776
|
+
path?: string | undefined;
|
|
777
|
+
exit_on_error?: boolean | undefined;
|
|
778
|
+
}, {
|
|
779
|
+
content?: string | undefined;
|
|
780
|
+
path?: string | undefined;
|
|
781
|
+
exit_on_error?: boolean | undefined;
|
|
782
|
+
}, string, t.CodecProps>>;
|
|
783
|
+
metadata: t.OptionalCodec<t.Codec<Record<string, string>, Record<string, string>, string, t.CodecProps>>;
|
|
784
|
+
migrations: t.OptionalCodec<t.Codec<{
|
|
785
|
+
disable_auto_migration?: boolean | undefined;
|
|
786
|
+
}, {
|
|
787
|
+
disable_auto_migration?: boolean | undefined;
|
|
788
|
+
}, string, t.CodecProps>>;
|
|
789
|
+
telemetry: t.OptionalCodec<t.Codec<{
|
|
790
|
+
disable_telemetry_sharing: boolean;
|
|
791
|
+
prometheus_port?: number | undefined;
|
|
792
|
+
internal_service_endpoint?: string | undefined;
|
|
793
|
+
}, {
|
|
794
|
+
disable_telemetry_sharing: boolean;
|
|
795
|
+
prometheus_port?: string | number | undefined;
|
|
796
|
+
internal_service_endpoint?: string | undefined;
|
|
797
|
+
}, string, t.CodecProps>>;
|
|
798
|
+
healthcheck: t.OptionalCodec<t.Codec<{
|
|
799
|
+
probes?: {
|
|
800
|
+
use_filesystem?: boolean | undefined;
|
|
801
|
+
use_http?: boolean | undefined;
|
|
802
|
+
use_legacy?: boolean | undefined;
|
|
803
|
+
} | undefined;
|
|
804
|
+
}, {
|
|
805
|
+
probes?: {
|
|
806
|
+
use_filesystem?: boolean | undefined;
|
|
807
|
+
use_http?: boolean | undefined;
|
|
808
|
+
use_legacy?: boolean | undefined;
|
|
809
|
+
} | undefined;
|
|
810
|
+
}, string, t.CodecProps>>;
|
|
811
|
+
parameters: t.OptionalCodec<t.Codec<Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>, string, t.CodecProps>>;
|
|
812
|
+
};
|
|
344
813
|
}>;
|
|
345
814
|
export type PowerSyncConfig = t.Decoded<typeof powerSyncConfig>;
|
|
346
815
|
export type SerializedPowerSyncConfig = t.Encoded<typeof powerSyncConfig>;
|
|
816
|
+
export declare const PowerSyncConfigJSONSchema: Record<string, any>;
|
|
347
817
|
export {};
|