@livestore/sync-s2 0.0.0-snapshot-446f5de211c4578498f20693bd2998869be3e796

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.
Files changed (48) hide show
  1. package/LICENSE +201 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/api-schema.d.ts +32 -0
  4. package/dist/api-schema.d.ts.map +1 -0
  5. package/dist/api-schema.js +17 -0
  6. package/dist/api-schema.js.map +1 -0
  7. package/dist/api-schema.test.d.ts +2 -0
  8. package/dist/api-schema.test.d.ts.map +1 -0
  9. package/dist/api-schema.test.js +20 -0
  10. package/dist/api-schema.test.js.map +1 -0
  11. package/dist/decode.d.ts +11 -0
  12. package/dist/decode.d.ts.map +1 -0
  13. package/dist/decode.js +19 -0
  14. package/dist/decode.js.map +1 -0
  15. package/dist/http-client-generated.d.ts +1477 -0
  16. package/dist/http-client-generated.d.ts.map +1 -0
  17. package/dist/http-client-generated.js +830 -0
  18. package/dist/http-client-generated.js.map +1 -0
  19. package/dist/make-s2-url.d.ts +7 -0
  20. package/dist/make-s2-url.d.ts.map +1 -0
  21. package/dist/make-s2-url.js +16 -0
  22. package/dist/make-s2-url.js.map +1 -0
  23. package/dist/mod.d.ts +8 -0
  24. package/dist/mod.d.ts.map +1 -0
  25. package/dist/mod.js +7 -0
  26. package/dist/mod.js.map +1 -0
  27. package/dist/s2-proxy-helpers.d.ts +61 -0
  28. package/dist/s2-proxy-helpers.d.ts.map +1 -0
  29. package/dist/s2-proxy-helpers.js +143 -0
  30. package/dist/s2-proxy-helpers.js.map +1 -0
  31. package/dist/sync-provider.d.ts +60 -0
  32. package/dist/sync-provider.d.ts.map +1 -0
  33. package/dist/sync-provider.js +154 -0
  34. package/dist/sync-provider.js.map +1 -0
  35. package/dist/types.d.ts +25 -0
  36. package/dist/types.d.ts.map +1 -0
  37. package/dist/types.js +13 -0
  38. package/dist/types.js.map +1 -0
  39. package/package.json +29 -0
  40. package/src/api-schema.test.ts +21 -0
  41. package/src/api-schema.ts +24 -0
  42. package/src/decode.ts +28 -0
  43. package/src/http-client-generated.ts +1341 -0
  44. package/src/make-s2-url.ts +23 -0
  45. package/src/mod.ts +7 -0
  46. package/src/s2-proxy-helpers.ts +196 -0
  47. package/src/sync-provider.ts +267 -0
  48. package/src/types.ts +26 -0
@@ -0,0 +1,1477 @@
1
+ import { Effect, type HttpClient, HttpClientError, HttpClientRequest, HttpClientResponse, type ParseResult, Schema as S } from '@livestore/utils/effect';
2
+ declare const ListAccessTokensParams_base: S.Struct<{
3
+ prefix: S.optionalWith<typeof S.String, {
4
+ nullable: true;
5
+ default: () => "";
6
+ }>;
7
+ start_after: S.optionalWith<typeof S.String, {
8
+ nullable: true;
9
+ default: () => "";
10
+ }>;
11
+ limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
12
+ nullable: true;
13
+ default: () => 1000;
14
+ }>;
15
+ }>;
16
+ export declare class ListAccessTokensParams extends ListAccessTokensParams_base {
17
+ }
18
+ declare const ResourceSet_base: S.Union<[S.Struct<{
19
+ /**
20
+ * Match only the resource with this exact name.
21
+ * Use an empty string to match no resources.
22
+ */
23
+ exact: typeof S.String;
24
+ }>, S.Struct<{
25
+ /**
26
+ * Match all resources that start with this prefix.
27
+ * Use an empty string to match all resource.
28
+ */
29
+ prefix: typeof S.String;
30
+ }>]>;
31
+ export declare class ResourceSet extends ResourceSet_base {
32
+ }
33
+ declare const ReadWritePermissions_base: S.Class<ReadWritePermissions, {
34
+ /**
35
+ * Read permission.
36
+ */
37
+ read: S.optionalWith<typeof S.Boolean, {
38
+ nullable: true;
39
+ default: () => false;
40
+ }>;
41
+ /**
42
+ * Write permission.
43
+ */
44
+ write: S.optionalWith<typeof S.Boolean, {
45
+ nullable: true;
46
+ default: () => false;
47
+ }>;
48
+ }, S.Struct.Encoded<{
49
+ /**
50
+ * Read permission.
51
+ */
52
+ read: S.optionalWith<typeof S.Boolean, {
53
+ nullable: true;
54
+ default: () => false;
55
+ }>;
56
+ /**
57
+ * Write permission.
58
+ */
59
+ write: S.optionalWith<typeof S.Boolean, {
60
+ nullable: true;
61
+ default: () => false;
62
+ }>;
63
+ }>, never, {
64
+ readonly read?: boolean;
65
+ } & {
66
+ readonly write?: boolean;
67
+ }, {}, {}>;
68
+ export declare class ReadWritePermissions extends ReadWritePermissions_base {
69
+ }
70
+ declare const PermittedOperationGroups_base: S.Class<PermittedOperationGroups, {
71
+ account: S.optionalWith<typeof ReadWritePermissions, {
72
+ nullable: true;
73
+ }>;
74
+ basin: S.optionalWith<typeof ReadWritePermissions, {
75
+ nullable: true;
76
+ }>;
77
+ stream: S.optionalWith<typeof ReadWritePermissions, {
78
+ nullable: true;
79
+ }>;
80
+ }, S.Struct.Encoded<{
81
+ account: S.optionalWith<typeof ReadWritePermissions, {
82
+ nullable: true;
83
+ }>;
84
+ basin: S.optionalWith<typeof ReadWritePermissions, {
85
+ nullable: true;
86
+ }>;
87
+ stream: S.optionalWith<typeof ReadWritePermissions, {
88
+ nullable: true;
89
+ }>;
90
+ }>, never, {
91
+ readonly account?: ReadWritePermissions | undefined;
92
+ } & {
93
+ readonly basin?: ReadWritePermissions | undefined;
94
+ } & {
95
+ readonly stream?: ReadWritePermissions | undefined;
96
+ }, {}, {}>;
97
+ export declare class PermittedOperationGroups extends PermittedOperationGroups_base {
98
+ }
99
+ declare const Operation_base: S.Literal<["list-basins", "create-basin", "delete-basin", "reconfigure-basin", "get-basin-config", "issue-access-token", "revoke-access-token", "list-access-tokens", "list-streams", "create-stream", "delete-stream", "get-stream-config", "reconfigure-stream", "check-tail", "append", "read", "trim", "fence", "account-metrics", "basin-metrics", "stream-metrics"]>;
100
+ export declare class Operation extends Operation_base {
101
+ }
102
+ declare const AccessTokenScope_base: S.Class<AccessTokenScope, {
103
+ access_tokens: S.optionalWith<typeof ResourceSet, {
104
+ nullable: true;
105
+ }>;
106
+ basins: S.optionalWith<typeof ResourceSet, {
107
+ nullable: true;
108
+ }>;
109
+ op_groups: S.optionalWith<typeof PermittedOperationGroups, {
110
+ nullable: true;
111
+ }>;
112
+ /**
113
+ * Operations allowed for the token.
114
+ * A union of allowed operations and groups is used as an effective set of allowed operations.
115
+ */
116
+ ops: S.optionalWith<S.Array$<typeof Operation>, {
117
+ nullable: true;
118
+ }>;
119
+ streams: S.optionalWith<typeof ResourceSet, {
120
+ nullable: true;
121
+ }>;
122
+ }, S.Struct.Encoded<{
123
+ access_tokens: S.optionalWith<typeof ResourceSet, {
124
+ nullable: true;
125
+ }>;
126
+ basins: S.optionalWith<typeof ResourceSet, {
127
+ nullable: true;
128
+ }>;
129
+ op_groups: S.optionalWith<typeof PermittedOperationGroups, {
130
+ nullable: true;
131
+ }>;
132
+ /**
133
+ * Operations allowed for the token.
134
+ * A union of allowed operations and groups is used as an effective set of allowed operations.
135
+ */
136
+ ops: S.optionalWith<S.Array$<typeof Operation>, {
137
+ nullable: true;
138
+ }>;
139
+ streams: S.optionalWith<typeof ResourceSet, {
140
+ nullable: true;
141
+ }>;
142
+ }>, never, {
143
+ readonly access_tokens?: {
144
+ readonly exact: string;
145
+ } | {
146
+ readonly prefix: string;
147
+ } | undefined;
148
+ } & {
149
+ readonly basins?: {
150
+ readonly exact: string;
151
+ } | {
152
+ readonly prefix: string;
153
+ } | undefined;
154
+ } & {
155
+ readonly op_groups?: PermittedOperationGroups | undefined;
156
+ } & {
157
+ readonly ops?: readonly ("read" | "list-basins" | "create-basin" | "delete-basin" | "reconfigure-basin" | "get-basin-config" | "issue-access-token" | "revoke-access-token" | "list-access-tokens" | "list-streams" | "create-stream" | "delete-stream" | "get-stream-config" | "reconfigure-stream" | "check-tail" | "append" | "trim" | "fence" | "account-metrics" | "basin-metrics" | "stream-metrics")[] | undefined;
158
+ } & {
159
+ readonly streams?: {
160
+ readonly exact: string;
161
+ } | {
162
+ readonly prefix: string;
163
+ } | undefined;
164
+ }, {}, {}>;
165
+ export declare class AccessTokenScope extends AccessTokenScope_base {
166
+ }
167
+ declare const AccessTokenInfo_base: S.Class<AccessTokenInfo, {
168
+ /**
169
+ * Namespace streams based on the configured stream-level scope, which must be a prefix.
170
+ * Stream name arguments will be automatically prefixed, and the prefix will be stripped when listing streams.
171
+ */
172
+ auto_prefix_streams: S.optionalWith<typeof S.Boolean, {
173
+ nullable: true;
174
+ default: () => false;
175
+ }>;
176
+ /**
177
+ * Expiration time in ISO 8601 format.
178
+ * If not set, the expiration will be set to that of the requestor's token.
179
+ */
180
+ expires_at: S.optionalWith<typeof S.String, {
181
+ nullable: true;
182
+ }>;
183
+ /**
184
+ * Access token ID.
185
+ * It must be unique to the account and between 1 and 96 bytes in length.
186
+ */
187
+ id: typeof S.String;
188
+ /**
189
+ * Access token scope.
190
+ */
191
+ scope: typeof AccessTokenScope;
192
+ }, S.Struct.Encoded<{
193
+ /**
194
+ * Namespace streams based on the configured stream-level scope, which must be a prefix.
195
+ * Stream name arguments will be automatically prefixed, and the prefix will be stripped when listing streams.
196
+ */
197
+ auto_prefix_streams: S.optionalWith<typeof S.Boolean, {
198
+ nullable: true;
199
+ default: () => false;
200
+ }>;
201
+ /**
202
+ * Expiration time in ISO 8601 format.
203
+ * If not set, the expiration will be set to that of the requestor's token.
204
+ */
205
+ expires_at: S.optionalWith<typeof S.String, {
206
+ nullable: true;
207
+ }>;
208
+ /**
209
+ * Access token ID.
210
+ * It must be unique to the account and between 1 and 96 bytes in length.
211
+ */
212
+ id: typeof S.String;
213
+ /**
214
+ * Access token scope.
215
+ */
216
+ scope: typeof AccessTokenScope;
217
+ }>, never, {
218
+ readonly id: string;
219
+ } & {
220
+ readonly scope: AccessTokenScope;
221
+ } & {
222
+ readonly auto_prefix_streams?: boolean;
223
+ } & {
224
+ readonly expires_at?: string | undefined;
225
+ }, {}, {}>;
226
+ export declare class AccessTokenInfo extends AccessTokenInfo_base {
227
+ }
228
+ declare const ListAccessTokensResponse_base: S.Class<ListAccessTokensResponse, {
229
+ /**
230
+ * Matching access tokens.
231
+ */
232
+ access_tokens: S.filter<S.Array$<typeof AccessTokenInfo>>;
233
+ /**
234
+ * Indicates that there are more access tokens that match the criteria.
235
+ */
236
+ has_more: typeof S.Boolean;
237
+ }, S.Struct.Encoded<{
238
+ /**
239
+ * Matching access tokens.
240
+ */
241
+ access_tokens: S.filter<S.Array$<typeof AccessTokenInfo>>;
242
+ /**
243
+ * Indicates that there are more access tokens that match the criteria.
244
+ */
245
+ has_more: typeof S.Boolean;
246
+ }>, never, {
247
+ readonly access_tokens: readonly AccessTokenInfo[];
248
+ } & {
249
+ readonly has_more: boolean;
250
+ }, {}, {}>;
251
+ export declare class ListAccessTokensResponse extends ListAccessTokensResponse_base {
252
+ }
253
+ declare const ErrorResponse_base: S.Class<ErrorResponse, {
254
+ code: S.optionalWith<typeof S.String, {
255
+ nullable: true;
256
+ }>;
257
+ message: typeof S.String;
258
+ }, S.Struct.Encoded<{
259
+ code: S.optionalWith<typeof S.String, {
260
+ nullable: true;
261
+ }>;
262
+ message: typeof S.String;
263
+ }>, never, {
264
+ readonly message: string;
265
+ } & {
266
+ readonly code?: string | undefined;
267
+ }, {}, {}>;
268
+ export declare class ErrorResponse extends ErrorResponse_base {
269
+ }
270
+ declare const IssueAccessTokenResponse_base: S.Class<IssueAccessTokenResponse, {
271
+ /**
272
+ * Created access token.
273
+ */
274
+ access_token: typeof S.String;
275
+ }, S.Struct.Encoded<{
276
+ /**
277
+ * Created access token.
278
+ */
279
+ access_token: typeof S.String;
280
+ }>, never, {
281
+ readonly access_token: string;
282
+ }, {}, {}>;
283
+ export declare class IssueAccessTokenResponse extends IssueAccessTokenResponse_base {
284
+ }
285
+ declare const ListBasinsParams_base: S.Struct<{
286
+ prefix: S.optionalWith<typeof S.String, {
287
+ nullable: true;
288
+ default: () => "";
289
+ }>;
290
+ start_after: S.optionalWith<typeof S.String, {
291
+ nullable: true;
292
+ default: () => "";
293
+ }>;
294
+ limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
295
+ nullable: true;
296
+ default: () => 1000;
297
+ }>;
298
+ }>;
299
+ export declare class ListBasinsParams extends ListBasinsParams_base {
300
+ }
301
+ declare const BasinScope_base: S.Literal<["aws:us-east-1"]>;
302
+ export declare class BasinScope extends BasinScope_base {
303
+ }
304
+ declare const BasinState_base: S.Literal<["active", "creating", "deleting"]>;
305
+ export declare class BasinState extends BasinState_base {
306
+ }
307
+ declare const BasinInfo_base: S.Class<BasinInfo, {
308
+ /**
309
+ * Basin name.
310
+ */
311
+ name: typeof S.String;
312
+ /**
313
+ * Basin scope.
314
+ */
315
+ scope: typeof BasinScope;
316
+ /**
317
+ * Basin state.
318
+ */
319
+ state: typeof BasinState;
320
+ }, S.Struct.Encoded<{
321
+ /**
322
+ * Basin name.
323
+ */
324
+ name: typeof S.String;
325
+ /**
326
+ * Basin scope.
327
+ */
328
+ scope: typeof BasinScope;
329
+ /**
330
+ * Basin state.
331
+ */
332
+ state: typeof BasinState;
333
+ }>, never, {
334
+ readonly name: string;
335
+ } & {
336
+ readonly scope: "aws:us-east-1";
337
+ } & {
338
+ readonly state: "active" | "creating" | "deleting";
339
+ }, {}, {}>;
340
+ export declare class BasinInfo extends BasinInfo_base {
341
+ }
342
+ declare const ListBasinsResponse_base: S.Class<ListBasinsResponse, {
343
+ /**
344
+ * Matching basins.
345
+ */
346
+ basins: S.filter<S.Array$<typeof BasinInfo>>;
347
+ /**
348
+ * Indicates that there are more basins that match the criteria.
349
+ */
350
+ has_more: typeof S.Boolean;
351
+ }, S.Struct.Encoded<{
352
+ /**
353
+ * Matching basins.
354
+ */
355
+ basins: S.filter<S.Array$<typeof BasinInfo>>;
356
+ /**
357
+ * Indicates that there are more basins that match the criteria.
358
+ */
359
+ has_more: typeof S.Boolean;
360
+ }>, never, {
361
+ readonly basins: readonly BasinInfo[];
362
+ } & {
363
+ readonly has_more: boolean;
364
+ }, {}, {}>;
365
+ export declare class ListBasinsResponse extends ListBasinsResponse_base {
366
+ }
367
+ declare const DeleteOnEmptyConfig_base: S.Class<DeleteOnEmptyConfig, {
368
+ /**
369
+ * Minimum age in seconds before an empty stream can be deleted.
370
+ * Set to 0 (default) to disable delete-on-empty (don't delete automatically).
371
+ */
372
+ min_age_secs: S.optionalWith<S.filter<typeof S.Int>, {
373
+ nullable: true;
374
+ }>;
375
+ }, S.Struct.Encoded<{
376
+ /**
377
+ * Minimum age in seconds before an empty stream can be deleted.
378
+ * Set to 0 (default) to disable delete-on-empty (don't delete automatically).
379
+ */
380
+ min_age_secs: S.optionalWith<S.filter<typeof S.Int>, {
381
+ nullable: true;
382
+ }>;
383
+ }>, never, {
384
+ readonly min_age_secs?: number | undefined;
385
+ }, {}, {}>;
386
+ export declare class DeleteOnEmptyConfig extends DeleteOnEmptyConfig_base {
387
+ }
388
+ declare const InfiniteRetention_base: S.Record$<typeof S.String, typeof S.Unknown>;
389
+ export declare class InfiniteRetention extends InfiniteRetention_base {
390
+ }
391
+ declare const RetentionPolicy_base: S.Union<[S.Struct<{
392
+ /**
393
+ * Age in seconds for automatic trimming of records older than this threshold.
394
+ * This must be set to a value greater than 0 seconds.
395
+ * (While S2 is in public preview, this is capped at 28 days. Let us know if you'd like the cap removed.)
396
+ */
397
+ age: S.filter<typeof S.Int>;
398
+ }>, S.Struct<{
399
+ /**
400
+ * Retain records unless explicitly trimmed.
401
+ */
402
+ infinite: typeof InfiniteRetention;
403
+ }>]>;
404
+ export declare class RetentionPolicy extends RetentionPolicy_base {
405
+ }
406
+ declare const StorageClass_base: S.Literal<["standard", "express"]>;
407
+ export declare class StorageClass extends StorageClass_base {
408
+ }
409
+ declare const TimestampingMode_base: S.Literal<["client-prefer", "client-require", "arrival"]>;
410
+ export declare class TimestampingMode extends TimestampingMode_base {
411
+ }
412
+ declare const TimestampingConfig_base: S.Class<TimestampingConfig, {
413
+ mode: S.optionalWith<typeof TimestampingMode, {
414
+ nullable: true;
415
+ }>;
416
+ /**
417
+ * Allow client-specified timestamps to exceed the arrival time.
418
+ * If this is `false` or not set, client timestamps will be capped at the arrival time.
419
+ */
420
+ uncapped: S.optionalWith<typeof S.Boolean, {
421
+ nullable: true;
422
+ }>;
423
+ }, S.Struct.Encoded<{
424
+ mode: S.optionalWith<typeof TimestampingMode, {
425
+ nullable: true;
426
+ }>;
427
+ /**
428
+ * Allow client-specified timestamps to exceed the arrival time.
429
+ * If this is `false` or not set, client timestamps will be capped at the arrival time.
430
+ */
431
+ uncapped: S.optionalWith<typeof S.Boolean, {
432
+ nullable: true;
433
+ }>;
434
+ }>, never, {
435
+ readonly mode?: "client-prefer" | "client-require" | "arrival" | undefined;
436
+ } & {
437
+ readonly uncapped?: boolean | undefined;
438
+ }, {}, {}>;
439
+ export declare class TimestampingConfig extends TimestampingConfig_base {
440
+ }
441
+ declare const StreamConfig_base: S.Class<StreamConfig, {
442
+ delete_on_empty: S.optionalWith<typeof DeleteOnEmptyConfig, {
443
+ nullable: true;
444
+ }>;
445
+ retention_policy: S.optionalWith<typeof RetentionPolicy, {
446
+ nullable: true;
447
+ }>;
448
+ storage_class: S.optionalWith<typeof StorageClass, {
449
+ nullable: true;
450
+ }>;
451
+ timestamping: S.optionalWith<typeof TimestampingConfig, {
452
+ nullable: true;
453
+ }>;
454
+ }, S.Struct.Encoded<{
455
+ delete_on_empty: S.optionalWith<typeof DeleteOnEmptyConfig, {
456
+ nullable: true;
457
+ }>;
458
+ retention_policy: S.optionalWith<typeof RetentionPolicy, {
459
+ nullable: true;
460
+ }>;
461
+ storage_class: S.optionalWith<typeof StorageClass, {
462
+ nullable: true;
463
+ }>;
464
+ timestamping: S.optionalWith<typeof TimestampingConfig, {
465
+ nullable: true;
466
+ }>;
467
+ }>, never, {
468
+ readonly delete_on_empty?: DeleteOnEmptyConfig | undefined;
469
+ } & {
470
+ readonly retention_policy?: {
471
+ readonly age: number;
472
+ } | {
473
+ readonly infinite: {
474
+ readonly [x: string]: unknown;
475
+ };
476
+ } | undefined;
477
+ } & {
478
+ readonly storage_class?: "standard" | "express" | undefined;
479
+ } & {
480
+ readonly timestamping?: TimestampingConfig | undefined;
481
+ }, {}, {}>;
482
+ export declare class StreamConfig extends StreamConfig_base {
483
+ }
484
+ declare const BasinConfig_base: S.Class<BasinConfig, {
485
+ /**
486
+ * Create stream on append if it doesn't exist, using the default stream configuration.
487
+ */
488
+ create_stream_on_append: S.optionalWith<typeof S.Boolean, {
489
+ nullable: true;
490
+ }>;
491
+ /**
492
+ * Create stream on read if it doesn't exist, using the default stream configuration.
493
+ */
494
+ create_stream_on_read: S.optionalWith<typeof S.Boolean, {
495
+ nullable: true;
496
+ }>;
497
+ default_stream_config: S.optionalWith<typeof StreamConfig, {
498
+ nullable: true;
499
+ }>;
500
+ }, S.Struct.Encoded<{
501
+ /**
502
+ * Create stream on append if it doesn't exist, using the default stream configuration.
503
+ */
504
+ create_stream_on_append: S.optionalWith<typeof S.Boolean, {
505
+ nullable: true;
506
+ }>;
507
+ /**
508
+ * Create stream on read if it doesn't exist, using the default stream configuration.
509
+ */
510
+ create_stream_on_read: S.optionalWith<typeof S.Boolean, {
511
+ nullable: true;
512
+ }>;
513
+ default_stream_config: S.optionalWith<typeof StreamConfig, {
514
+ nullable: true;
515
+ }>;
516
+ }>, never, {
517
+ readonly create_stream_on_append?: boolean | undefined;
518
+ } & {
519
+ readonly create_stream_on_read?: boolean | undefined;
520
+ } & {
521
+ readonly default_stream_config?: StreamConfig | undefined;
522
+ }, {}, {}>;
523
+ export declare class BasinConfig extends BasinConfig_base {
524
+ }
525
+ declare const CreateBasinRequest_base: S.Class<CreateBasinRequest, {
526
+ /**
527
+ * Basin name which must be globally unique.
528
+ * It can be between 8 and 48 characters in length, and comprise lowercase letters, numbers and hyphens.
529
+ * It cannot begin or end with a hyphen.
530
+ */
531
+ basin: typeof S.String;
532
+ config: S.optionalWith<typeof BasinConfig, {
533
+ nullable: true;
534
+ }>;
535
+ /**
536
+ * Basin scope.
537
+ */
538
+ scope: S.optionalWith<typeof BasinScope, {
539
+ nullable: true;
540
+ default: () => "aws:us-east-1";
541
+ }>;
542
+ }, S.Struct.Encoded<{
543
+ /**
544
+ * Basin name which must be globally unique.
545
+ * It can be between 8 and 48 characters in length, and comprise lowercase letters, numbers and hyphens.
546
+ * It cannot begin or end with a hyphen.
547
+ */
548
+ basin: typeof S.String;
549
+ config: S.optionalWith<typeof BasinConfig, {
550
+ nullable: true;
551
+ }>;
552
+ /**
553
+ * Basin scope.
554
+ */
555
+ scope: S.optionalWith<typeof BasinScope, {
556
+ nullable: true;
557
+ default: () => "aws:us-east-1";
558
+ }>;
559
+ }>, never, {
560
+ readonly basin: string;
561
+ } & {
562
+ readonly scope?: "aws:us-east-1";
563
+ } & {
564
+ readonly config?: BasinConfig | undefined;
565
+ }, {}, {}>;
566
+ export declare class CreateBasinRequest extends CreateBasinRequest_base {
567
+ }
568
+ declare const CreateOrReconfigureBasinParams_base: S.Struct<{
569
+ 's2-request-token': S.optionalWith<typeof S.String, {
570
+ nullable: true;
571
+ }>;
572
+ }>;
573
+ export declare class CreateOrReconfigureBasinParams extends CreateOrReconfigureBasinParams_base {
574
+ }
575
+ declare const CreateOrReconfigureBasinRequest_base: typeof S.Null;
576
+ export declare class CreateOrReconfigureBasinRequest extends CreateOrReconfigureBasinRequest_base {
577
+ }
578
+ declare const DeleteOnEmptyReconfiguration_base: S.Class<DeleteOnEmptyReconfiguration, {
579
+ /**
580
+ * Minimum age in seconds before an empty stream can be deleted.
581
+ * Set to 0 to disable delete-on-empty (don't delete automatically).
582
+ */
583
+ min_age_secs: S.optionalWith<S.filter<typeof S.Int>, {
584
+ nullable: true;
585
+ }>;
586
+ }, S.Struct.Encoded<{
587
+ /**
588
+ * Minimum age in seconds before an empty stream can be deleted.
589
+ * Set to 0 to disable delete-on-empty (don't delete automatically).
590
+ */
591
+ min_age_secs: S.optionalWith<S.filter<typeof S.Int>, {
592
+ nullable: true;
593
+ }>;
594
+ }>, never, {
595
+ readonly min_age_secs?: number | undefined;
596
+ }, {}, {}>;
597
+ export declare class DeleteOnEmptyReconfiguration extends DeleteOnEmptyReconfiguration_base {
598
+ }
599
+ declare const TimestampingReconfiguration_base: S.Class<TimestampingReconfiguration, {
600
+ mode: S.optionalWith<typeof TimestampingMode, {
601
+ nullable: true;
602
+ }>;
603
+ /**
604
+ * Allow client-specified timestamps to exceed the arrival time.
605
+ */
606
+ uncapped: S.optionalWith<typeof S.Boolean, {
607
+ nullable: true;
608
+ }>;
609
+ }, S.Struct.Encoded<{
610
+ mode: S.optionalWith<typeof TimestampingMode, {
611
+ nullable: true;
612
+ }>;
613
+ /**
614
+ * Allow client-specified timestamps to exceed the arrival time.
615
+ */
616
+ uncapped: S.optionalWith<typeof S.Boolean, {
617
+ nullable: true;
618
+ }>;
619
+ }>, never, {
620
+ readonly mode?: "client-prefer" | "client-require" | "arrival" | undefined;
621
+ } & {
622
+ readonly uncapped?: boolean | undefined;
623
+ }, {}, {}>;
624
+ export declare class TimestampingReconfiguration extends TimestampingReconfiguration_base {
625
+ }
626
+ declare const StreamReconfiguration_base: S.Class<StreamReconfiguration, {
627
+ delete_on_empty: S.optionalWith<typeof DeleteOnEmptyReconfiguration, {
628
+ nullable: true;
629
+ }>;
630
+ retention_policy: S.optionalWith<typeof RetentionPolicy, {
631
+ nullable: true;
632
+ }>;
633
+ storage_class: S.optionalWith<typeof StorageClass, {
634
+ nullable: true;
635
+ }>;
636
+ timestamping: S.optionalWith<typeof TimestampingReconfiguration, {
637
+ nullable: true;
638
+ }>;
639
+ }, S.Struct.Encoded<{
640
+ delete_on_empty: S.optionalWith<typeof DeleteOnEmptyReconfiguration, {
641
+ nullable: true;
642
+ }>;
643
+ retention_policy: S.optionalWith<typeof RetentionPolicy, {
644
+ nullable: true;
645
+ }>;
646
+ storage_class: S.optionalWith<typeof StorageClass, {
647
+ nullable: true;
648
+ }>;
649
+ timestamping: S.optionalWith<typeof TimestampingReconfiguration, {
650
+ nullable: true;
651
+ }>;
652
+ }>, never, {
653
+ readonly delete_on_empty?: DeleteOnEmptyReconfiguration | undefined;
654
+ } & {
655
+ readonly retention_policy?: {
656
+ readonly age: number;
657
+ } | {
658
+ readonly infinite: {
659
+ readonly [x: string]: unknown;
660
+ };
661
+ } | undefined;
662
+ } & {
663
+ readonly storage_class?: "standard" | "express" | undefined;
664
+ } & {
665
+ readonly timestamping?: TimestampingReconfiguration | undefined;
666
+ }, {}, {}>;
667
+ export declare class StreamReconfiguration extends StreamReconfiguration_base {
668
+ }
669
+ declare const BasinReconfiguration_base: S.Class<BasinReconfiguration, {
670
+ /**
671
+ * Create a stream on append.
672
+ */
673
+ create_stream_on_append: S.optionalWith<typeof S.Boolean, {
674
+ nullable: true;
675
+ }>;
676
+ /**
677
+ * Create a stream on read.
678
+ */
679
+ create_stream_on_read: S.optionalWith<typeof S.Boolean, {
680
+ nullable: true;
681
+ }>;
682
+ default_stream_config: S.optionalWith<typeof StreamReconfiguration, {
683
+ nullable: true;
684
+ }>;
685
+ }, S.Struct.Encoded<{
686
+ /**
687
+ * Create a stream on append.
688
+ */
689
+ create_stream_on_append: S.optionalWith<typeof S.Boolean, {
690
+ nullable: true;
691
+ }>;
692
+ /**
693
+ * Create a stream on read.
694
+ */
695
+ create_stream_on_read: S.optionalWith<typeof S.Boolean, {
696
+ nullable: true;
697
+ }>;
698
+ default_stream_config: S.optionalWith<typeof StreamReconfiguration, {
699
+ nullable: true;
700
+ }>;
701
+ }>, never, {
702
+ readonly create_stream_on_append?: boolean | undefined;
703
+ } & {
704
+ readonly create_stream_on_read?: boolean | undefined;
705
+ } & {
706
+ readonly default_stream_config?: StreamReconfiguration | undefined;
707
+ }, {}, {}>;
708
+ export declare class BasinReconfiguration extends BasinReconfiguration_base {
709
+ }
710
+ declare const AccountMetricSet_base: S.Literal<["active-basins", "account-ops"]>;
711
+ export declare class AccountMetricSet extends AccountMetricSet_base {
712
+ }
713
+ declare const TimeseriesInterval_base: S.Literal<["minute", "hour", "day"]>;
714
+ export declare class TimeseriesInterval extends TimeseriesInterval_base {
715
+ }
716
+ declare const AccountMetricsParams_base: S.Struct<{
717
+ set: typeof AccountMetricSet;
718
+ start: S.optionalWith<S.filter<typeof S.Int>, {
719
+ nullable: true;
720
+ }>;
721
+ end: S.optionalWith<S.filter<typeof S.Int>, {
722
+ nullable: true;
723
+ }>;
724
+ interval: S.optionalWith<typeof TimeseriesInterval, {
725
+ nullable: true;
726
+ }>;
727
+ }>;
728
+ export declare class AccountMetricsParams extends AccountMetricsParams_base {
729
+ }
730
+ declare const MetricUnit_base: S.Literal<["bytes", "operations"]>;
731
+ export declare class MetricUnit extends MetricUnit_base {
732
+ }
733
+ declare const Scalar_base: S.Class<Scalar, {
734
+ /**
735
+ * Metric name.
736
+ */
737
+ name: typeof S.String;
738
+ /**
739
+ * Unit of the metric.
740
+ */
741
+ unit: typeof MetricUnit;
742
+ /**
743
+ * Metric value.
744
+ */
745
+ value: typeof S.Number;
746
+ }, S.Struct.Encoded<{
747
+ /**
748
+ * Metric name.
749
+ */
750
+ name: typeof S.String;
751
+ /**
752
+ * Unit of the metric.
753
+ */
754
+ unit: typeof MetricUnit;
755
+ /**
756
+ * Metric value.
757
+ */
758
+ value: typeof S.Number;
759
+ }>, never, {
760
+ readonly name: string;
761
+ } & {
762
+ readonly value: number;
763
+ } & {
764
+ readonly unit: "bytes" | "operations";
765
+ }, {}, {}>;
766
+ export declare class Scalar extends Scalar_base {
767
+ }
768
+ declare const Accumulation_base: S.Class<Accumulation, {
769
+ /**
770
+ * The duration of bucket for the accumulation.
771
+ */
772
+ bucket_length: typeof TimeseriesInterval;
773
+ /**
774
+ * Timeseries name.
775
+ */
776
+ name: typeof S.String;
777
+ /**
778
+ * Unit of the metric.
779
+ */
780
+ unit: typeof MetricUnit;
781
+ }, S.Struct.Encoded<{
782
+ /**
783
+ * The duration of bucket for the accumulation.
784
+ */
785
+ bucket_length: typeof TimeseriesInterval;
786
+ /**
787
+ * Timeseries name.
788
+ */
789
+ name: typeof S.String;
790
+ /**
791
+ * Unit of the metric.
792
+ */
793
+ unit: typeof MetricUnit;
794
+ }>, never, {
795
+ readonly name: string;
796
+ } & {
797
+ readonly unit: "bytes" | "operations";
798
+ } & {
799
+ readonly bucket_length: "minute" | "hour" | "day";
800
+ }, {}, {}>;
801
+ export declare class Accumulation extends Accumulation_base {
802
+ }
803
+ declare const Gauge_base: S.Class<Gauge, {
804
+ /**
805
+ * Timeseries name.
806
+ */
807
+ name: typeof S.String;
808
+ /**
809
+ * Unit of the metric.
810
+ */
811
+ unit: typeof MetricUnit;
812
+ }, S.Struct.Encoded<{
813
+ /**
814
+ * Timeseries name.
815
+ */
816
+ name: typeof S.String;
817
+ /**
818
+ * Unit of the metric.
819
+ */
820
+ unit: typeof MetricUnit;
821
+ }>, never, {
822
+ readonly name: string;
823
+ } & {
824
+ readonly unit: "bytes" | "operations";
825
+ }, {}, {}>;
826
+ export declare class Gauge extends Gauge_base {
827
+ }
828
+ declare const Label_base: S.Class<Label, {
829
+ /**
830
+ * Label name.
831
+ */
832
+ name: typeof S.String;
833
+ /**
834
+ * Label values.
835
+ */
836
+ values: S.Array$<typeof S.String>;
837
+ }, S.Struct.Encoded<{
838
+ /**
839
+ * Label name.
840
+ */
841
+ name: typeof S.String;
842
+ /**
843
+ * Label values.
844
+ */
845
+ values: S.Array$<typeof S.String>;
846
+ }>, never, {
847
+ readonly values: readonly string[];
848
+ } & {
849
+ readonly name: string;
850
+ }, {}, {}>;
851
+ export declare class Label extends Label_base {
852
+ }
853
+ declare const Metric_base: S.Union<[S.Struct<{
854
+ /**
855
+ * Single named value.
856
+ */
857
+ scalar: typeof Scalar;
858
+ }>, S.Struct<{
859
+ /**
860
+ * Named series of `(timestamp, value)` points representing an accumulation over a specified
861
+ * bucket.
862
+ */
863
+ accumulation: typeof Accumulation;
864
+ }>, S.Struct<{
865
+ /**
866
+ * Named series of `(timestamp, value)` points each representing an instantaneous value.
867
+ */
868
+ gauge: typeof Gauge;
869
+ }>, S.Struct<{
870
+ /**
871
+ * Set of string labels.
872
+ */
873
+ label: typeof Label;
874
+ }>]>;
875
+ export declare class Metric extends Metric_base {
876
+ }
877
+ declare const MetricSetResponse_base: S.Class<MetricSetResponse, {
878
+ /**
879
+ * Metrics comprising the set.
880
+ */
881
+ values: S.Array$<typeof Metric>;
882
+ }, S.Struct.Encoded<{
883
+ /**
884
+ * Metrics comprising the set.
885
+ */
886
+ values: S.Array$<typeof Metric>;
887
+ }>, never, {
888
+ readonly values: readonly ({
889
+ readonly scalar: Scalar;
890
+ } | {
891
+ readonly accumulation: Accumulation;
892
+ } | {
893
+ readonly gauge: Gauge;
894
+ } | {
895
+ readonly label: Label;
896
+ })[];
897
+ }, {}, {}>;
898
+ export declare class MetricSetResponse extends MetricSetResponse_base {
899
+ }
900
+ declare const BasinMetricSet_base: S.Literal<["storage", "append-ops", "read-ops", "read-throughput", "append-throughput", "basin-ops"]>;
901
+ export declare class BasinMetricSet extends BasinMetricSet_base {
902
+ }
903
+ declare const BasinMetricsParams_base: S.Struct<{
904
+ set: typeof BasinMetricSet;
905
+ start: S.optionalWith<S.filter<typeof S.Int>, {
906
+ nullable: true;
907
+ }>;
908
+ end: S.optionalWith<S.filter<typeof S.Int>, {
909
+ nullable: true;
910
+ }>;
911
+ interval: S.optionalWith<typeof TimeseriesInterval, {
912
+ nullable: true;
913
+ }>;
914
+ }>;
915
+ export declare class BasinMetricsParams extends BasinMetricsParams_base {
916
+ }
917
+ declare const StreamMetricSet_base: S.Literal<["storage"]>;
918
+ export declare class StreamMetricSet extends StreamMetricSet_base {
919
+ }
920
+ declare const StreamMetricsParams_base: S.Struct<{
921
+ set: typeof StreamMetricSet;
922
+ start: S.optionalWith<S.filter<typeof S.Int>, {
923
+ nullable: true;
924
+ }>;
925
+ end: S.optionalWith<S.filter<typeof S.Int>, {
926
+ nullable: true;
927
+ }>;
928
+ interval: S.optionalWith<typeof TimeseriesInterval, {
929
+ nullable: true;
930
+ }>;
931
+ }>;
932
+ export declare class StreamMetricsParams extends StreamMetricsParams_base {
933
+ }
934
+ declare const ListStreamsParams_base: S.Struct<{
935
+ prefix: S.optionalWith<typeof S.String, {
936
+ nullable: true;
937
+ default: () => "";
938
+ }>;
939
+ start_after: S.optionalWith<typeof S.String, {
940
+ nullable: true;
941
+ default: () => "";
942
+ }>;
943
+ limit: S.optionalWith<S.filter<S.filter<typeof S.Int>>, {
944
+ nullable: true;
945
+ default: () => 1000;
946
+ }>;
947
+ }>;
948
+ export declare class ListStreamsParams extends ListStreamsParams_base {
949
+ }
950
+ declare const StreamInfo_base: S.Class<StreamInfo, {
951
+ /**
952
+ * Creation time in ISO 8601 format.
953
+ */
954
+ created_at: typeof S.String;
955
+ /**
956
+ * Deletion time in ISO 8601 format, if the stream is being deleted.
957
+ */
958
+ deleted_at: S.optionalWith<typeof S.String, {
959
+ nullable: true;
960
+ }>;
961
+ /**
962
+ * Stream name.
963
+ */
964
+ name: typeof S.String;
965
+ }, S.Struct.Encoded<{
966
+ /**
967
+ * Creation time in ISO 8601 format.
968
+ */
969
+ created_at: typeof S.String;
970
+ /**
971
+ * Deletion time in ISO 8601 format, if the stream is being deleted.
972
+ */
973
+ deleted_at: S.optionalWith<typeof S.String, {
974
+ nullable: true;
975
+ }>;
976
+ /**
977
+ * Stream name.
978
+ */
979
+ name: typeof S.String;
980
+ }>, never, {
981
+ readonly name: string;
982
+ } & {
983
+ readonly created_at: string;
984
+ } & {
985
+ readonly deleted_at?: string | undefined;
986
+ }, {}, {}>;
987
+ export declare class StreamInfo extends StreamInfo_base {
988
+ }
989
+ declare const ListStreamsResponse_base: S.Class<ListStreamsResponse, {
990
+ /**
991
+ * Indicates that there are more results that match the criteria.
992
+ */
993
+ has_more: typeof S.Boolean;
994
+ /**
995
+ * Matching streams.
996
+ */
997
+ streams: S.filter<S.Array$<typeof StreamInfo>>;
998
+ }, S.Struct.Encoded<{
999
+ /**
1000
+ * Indicates that there are more results that match the criteria.
1001
+ */
1002
+ has_more: typeof S.Boolean;
1003
+ /**
1004
+ * Matching streams.
1005
+ */
1006
+ streams: S.filter<S.Array$<typeof StreamInfo>>;
1007
+ }>, never, {
1008
+ readonly streams: readonly StreamInfo[];
1009
+ } & {
1010
+ readonly has_more: boolean;
1011
+ }, {}, {}>;
1012
+ export declare class ListStreamsResponse extends ListStreamsResponse_base {
1013
+ }
1014
+ declare const CreateStreamRequest_base: S.Class<CreateStreamRequest, {
1015
+ config: S.optionalWith<typeof StreamConfig, {
1016
+ nullable: true;
1017
+ }>;
1018
+ /**
1019
+ * Stream name that is unique to the basin.
1020
+ * It can be between 1 and 512 bytes in length.
1021
+ */
1022
+ stream: typeof S.String;
1023
+ }, S.Struct.Encoded<{
1024
+ config: S.optionalWith<typeof StreamConfig, {
1025
+ nullable: true;
1026
+ }>;
1027
+ /**
1028
+ * Stream name that is unique to the basin.
1029
+ * It can be between 1 and 512 bytes in length.
1030
+ */
1031
+ stream: typeof S.String;
1032
+ }>, never, {
1033
+ readonly stream: string;
1034
+ } & {
1035
+ readonly config?: StreamConfig | undefined;
1036
+ }, {}, {}>;
1037
+ export declare class CreateStreamRequest extends CreateStreamRequest_base {
1038
+ }
1039
+ declare const CreateOrReconfigureStreamParams_base: S.Struct<{
1040
+ 's2-request-token': S.optionalWith<typeof S.String, {
1041
+ nullable: true;
1042
+ }>;
1043
+ }>;
1044
+ export declare class CreateOrReconfigureStreamParams extends CreateOrReconfigureStreamParams_base {
1045
+ }
1046
+ declare const CreateOrReconfigureStreamRequest_base: S.Union<[typeof S.Null, typeof StreamConfig]>;
1047
+ export declare class CreateOrReconfigureStreamRequest extends CreateOrReconfigureStreamRequest_base {
1048
+ }
1049
+ declare const S2Format_base: S.Literal<["raw", "base64"]>;
1050
+ export declare class S2Format extends S2Format_base {
1051
+ }
1052
+ declare const U64_base: S.filter<typeof S.Int>;
1053
+ export declare class U64 extends U64_base {
1054
+ }
1055
+ declare const ReadParams_base: S.Struct<{
1056
+ 's2-format': S.optionalWith<typeof S2Format, {
1057
+ nullable: true;
1058
+ }>;
1059
+ seq_num: S.optionalWith<typeof U64, {
1060
+ nullable: true;
1061
+ }>;
1062
+ timestamp: S.optionalWith<typeof U64, {
1063
+ nullable: true;
1064
+ }>;
1065
+ tail_offset: S.optionalWith<S.filter<typeof S.Int>, {
1066
+ nullable: true;
1067
+ }>;
1068
+ count: S.optionalWith<S.filter<typeof S.Int>, {
1069
+ nullable: true;
1070
+ }>;
1071
+ bytes: S.optionalWith<S.filter<typeof S.Int>, {
1072
+ nullable: true;
1073
+ }>;
1074
+ until: S.optionalWith<typeof U64, {
1075
+ nullable: true;
1076
+ }>;
1077
+ clamp: S.optionalWith<typeof S.Boolean, {
1078
+ nullable: true;
1079
+ }>;
1080
+ }>;
1081
+ export declare class ReadParams extends ReadParams_base {
1082
+ }
1083
+ declare const Header_base: S.filter<S.filter<S.NonEmptyArray<typeof S.String>>>;
1084
+ /**
1085
+ * Headers add structured information to a record as name-value pairs.
1086
+ *
1087
+ * The name cannot be empty, with the exception of an S2 command record.
1088
+ */
1089
+ export declare class Header extends Header_base {
1090
+ }
1091
+ declare const SequencedRecord_base: S.Class<SequencedRecord, {
1092
+ /**
1093
+ * Body of the record.
1094
+ */
1095
+ body: S.optionalWith<typeof S.String, {
1096
+ nullable: true;
1097
+ }>;
1098
+ /**
1099
+ * Series of name-value pairs for this record.
1100
+ */
1101
+ headers: S.optionalWith<S.Array$<typeof Header>, {
1102
+ nullable: true;
1103
+ }>;
1104
+ /**
1105
+ * Sequence number assigned by the service.
1106
+ */
1107
+ seq_num: typeof U64;
1108
+ /**
1109
+ * Timestamp for this record.
1110
+ */
1111
+ timestamp: typeof U64;
1112
+ }, S.Struct.Encoded<{
1113
+ /**
1114
+ * Body of the record.
1115
+ */
1116
+ body: S.optionalWith<typeof S.String, {
1117
+ nullable: true;
1118
+ }>;
1119
+ /**
1120
+ * Series of name-value pairs for this record.
1121
+ */
1122
+ headers: S.optionalWith<S.Array$<typeof Header>, {
1123
+ nullable: true;
1124
+ }>;
1125
+ /**
1126
+ * Sequence number assigned by the service.
1127
+ */
1128
+ seq_num: typeof U64;
1129
+ /**
1130
+ * Timestamp for this record.
1131
+ */
1132
+ timestamp: typeof U64;
1133
+ }>, never, {
1134
+ readonly seq_num: number;
1135
+ } & {
1136
+ readonly timestamp: number;
1137
+ } & {
1138
+ readonly body?: string | undefined;
1139
+ } & {
1140
+ readonly headers?: readonly (readonly [string, ...string[]])[] | undefined;
1141
+ }, {}, {}>;
1142
+ /**
1143
+ * Record that is durably sequenced on a stream.
1144
+ */
1145
+ export declare class SequencedRecord extends SequencedRecord_base {
1146
+ }
1147
+ declare const StreamPosition_base: S.Class<StreamPosition, {
1148
+ /**
1149
+ * Sequence number assigned by the service.
1150
+ */
1151
+ seq_num: S.filter<typeof S.Int>;
1152
+ /**
1153
+ * Timestamp, which may be client-specified or assigned by the service.
1154
+ * If it is assigned by the service, it will represent milliseconds since Unix epoch.
1155
+ */
1156
+ timestamp: S.filter<typeof S.Int>;
1157
+ }, S.Struct.Encoded<{
1158
+ /**
1159
+ * Sequence number assigned by the service.
1160
+ */
1161
+ seq_num: S.filter<typeof S.Int>;
1162
+ /**
1163
+ * Timestamp, which may be client-specified or assigned by the service.
1164
+ * If it is assigned by the service, it will represent milliseconds since Unix epoch.
1165
+ */
1166
+ timestamp: S.filter<typeof S.Int>;
1167
+ }>, never, {
1168
+ readonly seq_num: number;
1169
+ } & {
1170
+ readonly timestamp: number;
1171
+ }, {}, {}>;
1172
+ /**
1173
+ * Position of a record in a stream.
1174
+ */
1175
+ export declare class StreamPosition extends StreamPosition_base {
1176
+ }
1177
+ declare const ReadBatch_base: S.Class<ReadBatch, {
1178
+ /**
1179
+ * Records that are durably sequenced on the stream, retrieved based on the requested criteria.
1180
+ * This can only be empty in response to a regular (non-SSE) read, if the request cannot be satisfied without violating an explicit limit.
1181
+ */
1182
+ records: S.Array$<typeof SequencedRecord>;
1183
+ tail: S.optionalWith<typeof StreamPosition, {
1184
+ nullable: true;
1185
+ }>;
1186
+ }, S.Struct.Encoded<{
1187
+ /**
1188
+ * Records that are durably sequenced on the stream, retrieved based on the requested criteria.
1189
+ * This can only be empty in response to a regular (non-SSE) read, if the request cannot be satisfied without violating an explicit limit.
1190
+ */
1191
+ records: S.Array$<typeof SequencedRecord>;
1192
+ tail: S.optionalWith<typeof StreamPosition, {
1193
+ nullable: true;
1194
+ }>;
1195
+ }>, never, {
1196
+ readonly records: readonly SequencedRecord[];
1197
+ } & {
1198
+ readonly tail?: StreamPosition | undefined;
1199
+ }, {}, {}>;
1200
+ export declare class ReadBatch extends ReadBatch_base {
1201
+ }
1202
+ declare const TailResponse_base: S.Class<TailResponse, {
1203
+ /**
1204
+ * Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.
1205
+ */
1206
+ tail: typeof StreamPosition;
1207
+ }, S.Struct.Encoded<{
1208
+ /**
1209
+ * Sequence number that will be assigned to the next record on the stream, and timestamp of the last record.
1210
+ */
1211
+ tail: typeof StreamPosition;
1212
+ }>, never, {
1213
+ readonly tail: StreamPosition;
1214
+ }, {}, {}>;
1215
+ export declare class TailResponse extends TailResponse_base {
1216
+ }
1217
+ declare const AppendParams_base: S.Struct<{
1218
+ 's2-format': S.optionalWith<typeof S2Format, {
1219
+ nullable: true;
1220
+ }>;
1221
+ }>;
1222
+ export declare class AppendParams extends AppendParams_base {
1223
+ }
1224
+ declare const AppendRecord_base: S.Class<AppendRecord, {
1225
+ /**
1226
+ * Body of the record.
1227
+ */
1228
+ body: S.optionalWith<typeof S.String, {
1229
+ nullable: true;
1230
+ }>;
1231
+ /**
1232
+ * Series of name-value pairs for this record.
1233
+ */
1234
+ headers: S.optionalWith<S.Array$<typeof Header>, {
1235
+ nullable: true;
1236
+ }>;
1237
+ timestamp: S.optionalWith<typeof U64, {
1238
+ nullable: true;
1239
+ }>;
1240
+ }, S.Struct.Encoded<{
1241
+ /**
1242
+ * Body of the record.
1243
+ */
1244
+ body: S.optionalWith<typeof S.String, {
1245
+ nullable: true;
1246
+ }>;
1247
+ /**
1248
+ * Series of name-value pairs for this record.
1249
+ */
1250
+ headers: S.optionalWith<S.Array$<typeof Header>, {
1251
+ nullable: true;
1252
+ }>;
1253
+ timestamp: S.optionalWith<typeof U64, {
1254
+ nullable: true;
1255
+ }>;
1256
+ }>, never, {
1257
+ readonly timestamp?: number | undefined;
1258
+ } & {
1259
+ readonly body?: string | undefined;
1260
+ } & {
1261
+ readonly headers?: readonly (readonly [string, ...string[]])[] | undefined;
1262
+ }, {}, {}>;
1263
+ /**
1264
+ * Record to be appended to a stream.
1265
+ */
1266
+ export declare class AppendRecord extends AppendRecord_base {
1267
+ }
1268
+ declare const AppendInput_base: S.Class<AppendInput, {
1269
+ /**
1270
+ * Enforce a fencing token, which starts out as an empty string that can be overridden by a `fence` command record.
1271
+ */
1272
+ fencing_token: S.optionalWith<typeof S.String, {
1273
+ nullable: true;
1274
+ }>;
1275
+ match_seq_num: S.optionalWith<typeof U64, {
1276
+ nullable: true;
1277
+ }>;
1278
+ /**
1279
+ * Batch of records to append atomically, which must contain at least one record, and no more than 1000.
1280
+ * The total size of a batch of records may not exceed 1 MiB of metered bytes.
1281
+ */
1282
+ records: S.Array$<typeof AppendRecord>;
1283
+ }, S.Struct.Encoded<{
1284
+ /**
1285
+ * Enforce a fencing token, which starts out as an empty string that can be overridden by a `fence` command record.
1286
+ */
1287
+ fencing_token: S.optionalWith<typeof S.String, {
1288
+ nullable: true;
1289
+ }>;
1290
+ match_seq_num: S.optionalWith<typeof U64, {
1291
+ nullable: true;
1292
+ }>;
1293
+ /**
1294
+ * Batch of records to append atomically, which must contain at least one record, and no more than 1000.
1295
+ * The total size of a batch of records may not exceed 1 MiB of metered bytes.
1296
+ */
1297
+ records: S.Array$<typeof AppendRecord>;
1298
+ }>, never, {
1299
+ readonly records: readonly AppendRecord[];
1300
+ } & {
1301
+ readonly fencing_token?: string | undefined;
1302
+ } & {
1303
+ readonly match_seq_num?: number | undefined;
1304
+ }, {}, {}>;
1305
+ /**
1306
+ * Payload of an `append` request.
1307
+ */
1308
+ export declare class AppendInput extends AppendInput_base {
1309
+ }
1310
+ declare const AppendAck_base: S.Class<AppendAck, {
1311
+ /**
1312
+ * Sequence number of the last record that was appended `+ 1`, and timestamp of the last record that was appended.
1313
+ * The difference between `end.seq_num` and `start.seq_num` will be the number of records appended.
1314
+ */
1315
+ end: typeof StreamPosition;
1316
+ /**
1317
+ * Sequence number and timestamp of the first record that was appended.
1318
+ */
1319
+ start: typeof StreamPosition;
1320
+ /**
1321
+ * Sequence number that will be assigned to the next record on the stream, and timestamp of the last record on the stream.
1322
+ * This can be greater than the `end` position in case of concurrent appends.
1323
+ */
1324
+ tail: typeof StreamPosition;
1325
+ }, S.Struct.Encoded<{
1326
+ /**
1327
+ * Sequence number of the last record that was appended `+ 1`, and timestamp of the last record that was appended.
1328
+ * The difference between `end.seq_num` and `start.seq_num` will be the number of records appended.
1329
+ */
1330
+ end: typeof StreamPosition;
1331
+ /**
1332
+ * Sequence number and timestamp of the first record that was appended.
1333
+ */
1334
+ start: typeof StreamPosition;
1335
+ /**
1336
+ * Sequence number that will be assigned to the next record on the stream, and timestamp of the last record on the stream.
1337
+ * This can be greater than the `end` position in case of concurrent appends.
1338
+ */
1339
+ tail: typeof StreamPosition;
1340
+ }>, never, {
1341
+ readonly start: StreamPosition;
1342
+ } & {
1343
+ readonly end: StreamPosition;
1344
+ } & {
1345
+ readonly tail: StreamPosition;
1346
+ }, {}, {}>;
1347
+ /**
1348
+ * Success response to an `append` request.
1349
+ */
1350
+ export declare class AppendAck extends AppendAck_base {
1351
+ }
1352
+ declare const AppendConditionFailed_base: S.Union<[S.Struct<{
1353
+ /**
1354
+ * Fencing token did not match.
1355
+ * The expected fencing token is returned.
1356
+ */
1357
+ fencing_token_mismatch: typeof S.String;
1358
+ }>, S.Struct<{
1359
+ /**
1360
+ * Sequence number did not match the tail of the stream.
1361
+ * The expected next sequence number is returned.
1362
+ */
1363
+ seq_num_mismatch: S.filter<typeof S.Int>;
1364
+ }>]>;
1365
+ /**
1366
+ * Aborted due to a failed condition.
1367
+ */
1368
+ export declare class AppendConditionFailed extends AppendConditionFailed_base {
1369
+ }
1370
+ export declare const make: (httpClient: HttpClient.HttpClient, options?: {
1371
+ readonly transformClient?: ((client: HttpClient.HttpClient) => Effect.Effect<HttpClient.HttpClient>) | undefined;
1372
+ }) => Client;
1373
+ export interface Client {
1374
+ readonly httpClient: HttpClient.HttpClient;
1375
+ /**
1376
+ * List access tokens.
1377
+ */
1378
+ readonly listAccessTokens: (options?: typeof ListAccessTokensParams.Encoded | undefined) => Effect.Effect<typeof ListAccessTokensResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1379
+ /**
1380
+ * Issue a new access token.
1381
+ */
1382
+ readonly issueAccessToken: (options: typeof AccessTokenInfo.Encoded) => Effect.Effect<typeof IssueAccessTokenResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1383
+ /**
1384
+ * Revoke an access token.
1385
+ */
1386
+ readonly revokeAccessToken: (id: string) => Effect.Effect<void, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1387
+ /**
1388
+ * List basins.
1389
+ */
1390
+ readonly listBasins: (options?: typeof ListBasinsParams.Encoded | undefined) => Effect.Effect<typeof ListBasinsResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1391
+ /**
1392
+ * Create a basin.
1393
+ */
1394
+ readonly createBasin: (options: typeof CreateBasinRequest.Encoded) => Effect.Effect<typeof BasinInfo.Type | typeof BasinInfo.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1395
+ /**
1396
+ * Get basin configuration.
1397
+ */
1398
+ readonly getBasinConfig: (basin: string) => Effect.Effect<typeof BasinConfig.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1399
+ /**
1400
+ * Create or reconfigure a basin.
1401
+ */
1402
+ readonly createOrReconfigureBasin: (basin: string, options: {
1403
+ readonly params?: typeof CreateOrReconfigureBasinParams.Encoded | undefined;
1404
+ readonly payload: typeof CreateOrReconfigureBasinRequest.Encoded;
1405
+ }) => Effect.Effect<typeof BasinInfo.Type | typeof BasinInfo.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1406
+ /**
1407
+ * Delete a basin.
1408
+ */
1409
+ readonly deleteBasin: (basin: string) => Effect.Effect<void, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1410
+ /**
1411
+ * Reconfigure a basin.
1412
+ */
1413
+ readonly reconfigureBasin: (basin: string, options: typeof BasinReconfiguration.Encoded) => Effect.Effect<typeof BasinConfig.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1414
+ /**
1415
+ * Account-level metrics.
1416
+ */
1417
+ readonly accountMetrics: (options: typeof AccountMetricsParams.Encoded) => Effect.Effect<typeof MetricSetResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1418
+ /**
1419
+ * Basin-level metrics.
1420
+ */
1421
+ readonly basinMetrics: (basin: string, options: typeof BasinMetricsParams.Encoded) => Effect.Effect<typeof MetricSetResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1422
+ /**
1423
+ * Stream-level metrics.
1424
+ */
1425
+ readonly streamMetrics: (basin: string, stream: string, options: typeof StreamMetricsParams.Encoded) => Effect.Effect<typeof MetricSetResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1426
+ /**
1427
+ * List streams.
1428
+ */
1429
+ readonly listStreams: (options?: typeof ListStreamsParams.Encoded | undefined) => Effect.Effect<typeof ListStreamsResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1430
+ /**
1431
+ * Create a stream.
1432
+ */
1433
+ readonly createStream: (options: typeof CreateStreamRequest.Encoded) => Effect.Effect<typeof StreamInfo.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1434
+ /**
1435
+ * Get stream configuration.
1436
+ */
1437
+ readonly getStreamConfig: (stream: string) => Effect.Effect<typeof StreamConfig.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1438
+ /**
1439
+ * Create or reconfigure a stream.
1440
+ */
1441
+ readonly createOrReconfigureStream: (stream: string, options: {
1442
+ readonly params?: typeof CreateOrReconfigureStreamParams.Encoded | undefined;
1443
+ readonly payload: typeof CreateOrReconfigureStreamRequest.Encoded;
1444
+ }) => Effect.Effect<typeof StreamInfo.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1445
+ /**
1446
+ * Delete a stream.
1447
+ */
1448
+ readonly deleteStream: (stream: string) => Effect.Effect<void, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1449
+ /**
1450
+ * Reconfigure a stream.
1451
+ */
1452
+ readonly reconfigureStream: (stream: string, options: typeof StreamReconfiguration.Encoded) => Effect.Effect<typeof StreamConfig.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1453
+ /**
1454
+ * Read records.
1455
+ */
1456
+ readonly read: (stream: string, options?: typeof ReadParams.Encoded | undefined) => Effect.Effect<typeof ReadBatch.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'TailResponse', typeof TailResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1457
+ /**
1458
+ * Append records.
1459
+ */
1460
+ readonly append: (stream: string, options: {
1461
+ readonly params?: typeof AppendParams.Encoded | undefined;
1462
+ readonly payload: typeof AppendInput.Encoded;
1463
+ }) => Effect.Effect<typeof AppendAck.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'AppendConditionFailed', typeof AppendConditionFailed.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1464
+ /**
1465
+ * Check the tail.
1466
+ */
1467
+ readonly checkTail: (stream: string) => Effect.Effect<typeof TailResponse.Type, HttpClientError.HttpClientError | ParseResult.ParseError | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type> | ClientError<'ErrorResponse', typeof ErrorResponse.Type>>;
1468
+ }
1469
+ export interface ClientError<Tag extends string, E> {
1470
+ readonly _tag: Tag;
1471
+ readonly request: HttpClientRequest.HttpClientRequest;
1472
+ readonly response: HttpClientResponse.HttpClientResponse;
1473
+ readonly cause: E;
1474
+ }
1475
+ export declare const ClientError: <Tag extends string, E>(tag: Tag, cause: E, response: HttpClientResponse.HttpClientResponse) => ClientError<Tag, E>;
1476
+ export {};
1477
+ //# sourceMappingURL=http-client-generated.d.ts.map