@warmhub/sdk-ts 0.66.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-U5Z6ZS6A.js → chunk-2KN2JWJU.js} +445 -305
- package/dist/chunk-2KN2JWJU.js.map +1 -0
- package/dist/index.d.ts +238 -66
- package/dist/index.js +1 -1
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-U5Z6ZS6A.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,6 @@ declare const COMMIT_OPERATIONS: readonly ["add", "revise", "retract", "rename"]
|
|
|
2
2
|
type CommitOperation = (typeof COMMIT_OPERATIONS)[number];
|
|
3
3
|
declare const COMMIT_OPERATION_KINDS: readonly ["shape", "thing", "assertion", "collection"];
|
|
4
4
|
type CommitOperationKind = (typeof COMMIT_OPERATION_KINDS)[number];
|
|
5
|
-
type CollectionAbout$2 = {
|
|
6
|
-
pair: [string, string];
|
|
7
|
-
} | {
|
|
8
|
-
triple: [string, string, string];
|
|
9
|
-
} | {
|
|
10
|
-
set: string[];
|
|
11
|
-
} | {
|
|
12
|
-
list: string[];
|
|
13
|
-
};
|
|
14
5
|
|
|
15
6
|
/**
|
|
16
7
|
* Canonical request signing for component CLI dispatch.
|
|
@@ -276,16 +267,7 @@ type AccessResolveResult$1 = {
|
|
|
276
267
|
type AuthSyncResult = {
|
|
277
268
|
success: boolean;
|
|
278
269
|
};
|
|
279
|
-
type
|
|
280
|
-
pair: [string, string];
|
|
281
|
-
} | {
|
|
282
|
-
triple: [string, string, string];
|
|
283
|
-
} | {
|
|
284
|
-
set: Array<string>;
|
|
285
|
-
} | {
|
|
286
|
-
list: Array<string>;
|
|
287
|
-
};
|
|
288
|
-
type CollectionTag$1 = 'pair' | 'triple' | 'set' | 'list';
|
|
270
|
+
type CollectionTag$1 = 'pair' | 'set' | 'list';
|
|
289
271
|
type CommitApplyResult = {
|
|
290
272
|
committer?: string;
|
|
291
273
|
createdByEmail?: string;
|
|
@@ -312,6 +294,85 @@ type CommitApplyResult = {
|
|
|
312
294
|
};
|
|
313
295
|
}>;
|
|
314
296
|
};
|
|
297
|
+
type CollectionContainsResult$1 = {
|
|
298
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
299
|
+
wref: string;
|
|
300
|
+
version: number;
|
|
301
|
+
results: Array<{
|
|
302
|
+
member: string;
|
|
303
|
+
contains: boolean;
|
|
304
|
+
positions?: Array<number>;
|
|
305
|
+
}>;
|
|
306
|
+
};
|
|
307
|
+
type CollectionDiffResult$1 = {
|
|
308
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
309
|
+
leftWref: string;
|
|
310
|
+
rightWref: string;
|
|
311
|
+
leftVersion: number;
|
|
312
|
+
rightVersion: number;
|
|
313
|
+
mode: 'membership' | 'ordered';
|
|
314
|
+
added: Array<{
|
|
315
|
+
wref: string;
|
|
316
|
+
position?: number;
|
|
317
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
318
|
+
}>;
|
|
319
|
+
removed: Array<{
|
|
320
|
+
wref: string;
|
|
321
|
+
position?: number;
|
|
322
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
323
|
+
}>;
|
|
324
|
+
unchanged: Array<{
|
|
325
|
+
wref: string;
|
|
326
|
+
position?: number;
|
|
327
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
328
|
+
}>;
|
|
329
|
+
changed: Array<{
|
|
330
|
+
position: number;
|
|
331
|
+
left?: {
|
|
332
|
+
wref: string;
|
|
333
|
+
position?: number;
|
|
334
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
335
|
+
};
|
|
336
|
+
right?: {
|
|
337
|
+
wref: string;
|
|
338
|
+
position?: number;
|
|
339
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
340
|
+
};
|
|
341
|
+
}>;
|
|
342
|
+
};
|
|
343
|
+
type CollectionMember$1 = {
|
|
344
|
+
wref: string;
|
|
345
|
+
position?: number;
|
|
346
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
347
|
+
};
|
|
348
|
+
type CollectionMembersPage$1 = {
|
|
349
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
350
|
+
wref: string;
|
|
351
|
+
version: number;
|
|
352
|
+
items: Array<{
|
|
353
|
+
wref: string;
|
|
354
|
+
position?: number;
|
|
355
|
+
fieldPath: 'first' | 'second' | 'third' | 'members' | 'items';
|
|
356
|
+
}>;
|
|
357
|
+
nextCursor?: string;
|
|
358
|
+
};
|
|
359
|
+
type CollectionMutationResult$1 = {
|
|
360
|
+
type: 'pair' | 'set' | 'list';
|
|
361
|
+
wref: string;
|
|
362
|
+
version: number;
|
|
363
|
+
memberCount: number;
|
|
364
|
+
dataHash?: string;
|
|
365
|
+
operationCount: number;
|
|
366
|
+
status: 'created' | 'updated' | 'noop';
|
|
367
|
+
};
|
|
368
|
+
type CollectionStatsResult$1 = {
|
|
369
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
370
|
+
wref: string;
|
|
371
|
+
version: number;
|
|
372
|
+
memberCount: number;
|
|
373
|
+
uniqueMemberCount: number;
|
|
374
|
+
};
|
|
375
|
+
type CollectionType$1 = 'pair' | 'set' | 'list';
|
|
315
376
|
type ComponentDetail = {
|
|
316
377
|
ref?: string;
|
|
317
378
|
componentName: string;
|
|
@@ -482,10 +543,7 @@ type StreamAppendInput$1 = {
|
|
|
482
543
|
committer?: string;
|
|
483
544
|
message?: string;
|
|
484
545
|
allocatedTokens?: never;
|
|
485
|
-
allocatedTokenRanges:
|
|
486
|
-
start: number;
|
|
487
|
-
end: number;
|
|
488
|
-
}>;
|
|
546
|
+
allocatedTokenRanges: [];
|
|
489
547
|
operations: Array<{
|
|
490
548
|
operation: 'add';
|
|
491
549
|
kind: 'shape';
|
|
@@ -502,22 +560,14 @@ type StreamAppendInput$1 = {
|
|
|
502
560
|
operation: 'add';
|
|
503
561
|
kind: 'assertion';
|
|
504
562
|
name: string;
|
|
505
|
-
about: string
|
|
506
|
-
pair: [string, string];
|
|
507
|
-
} | {
|
|
508
|
-
triple: [string, string, string];
|
|
509
|
-
} | {
|
|
510
|
-
set: Array<string>;
|
|
511
|
-
} | {
|
|
512
|
-
list: Array<string>;
|
|
513
|
-
};
|
|
563
|
+
about: string;
|
|
514
564
|
data: unknown;
|
|
515
565
|
skipExisting?: boolean;
|
|
516
566
|
} | {
|
|
517
567
|
operation: 'add';
|
|
518
568
|
kind: 'collection';
|
|
519
|
-
name
|
|
520
|
-
type: 'pair' | '
|
|
569
|
+
name: string;
|
|
570
|
+
type: 'pair' | 'set' | 'list';
|
|
521
571
|
members: Array<string>;
|
|
522
572
|
skipExisting?: boolean;
|
|
523
573
|
} | {
|
|
@@ -544,6 +594,14 @@ type StreamAppendInput$1 = {
|
|
|
544
594
|
expectedVersion?: number;
|
|
545
595
|
active?: never;
|
|
546
596
|
leaseId?: string;
|
|
597
|
+
} | {
|
|
598
|
+
operation: 'revise';
|
|
599
|
+
kind: 'collection';
|
|
600
|
+
name: string;
|
|
601
|
+
type: 'pair' | 'set' | 'list';
|
|
602
|
+
members: Array<string>;
|
|
603
|
+
expectedVersion?: number;
|
|
604
|
+
leaseId?: string;
|
|
547
605
|
} | {
|
|
548
606
|
operation: 'retract';
|
|
549
607
|
name: string;
|
|
@@ -558,10 +616,7 @@ type StreamAppendInput$1 = {
|
|
|
558
616
|
}>;
|
|
559
617
|
};
|
|
560
618
|
type StreamAppendResult$1 = {
|
|
561
|
-
allocatedTokenRanges:
|
|
562
|
-
start: number;
|
|
563
|
-
end: number;
|
|
564
|
-
}>;
|
|
619
|
+
allocatedTokenRanges: [];
|
|
565
620
|
results: Array<{
|
|
566
621
|
opIndex?: number;
|
|
567
622
|
name: string;
|
|
@@ -712,6 +767,17 @@ type ThingGetManyResult$1 = {
|
|
|
712
767
|
validatedShape?: string;
|
|
713
768
|
version: number;
|
|
714
769
|
data?: unknown;
|
|
770
|
+
collection?: {
|
|
771
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
772
|
+
memberField: 'first/second' | 'first/second/third' | 'members' | 'items';
|
|
773
|
+
memberCount: number;
|
|
774
|
+
dataMode: 'full' | 'summary';
|
|
775
|
+
fullData: boolean;
|
|
776
|
+
truncated: boolean;
|
|
777
|
+
inlineLimit?: number;
|
|
778
|
+
preview?: Array<string>;
|
|
779
|
+
previewCount?: number;
|
|
780
|
+
};
|
|
715
781
|
active: boolean;
|
|
716
782
|
synthesized?: boolean;
|
|
717
783
|
aboutWref?: string;
|
|
@@ -983,10 +1049,10 @@ interface AddOperation {
|
|
|
983
1049
|
*/
|
|
984
1050
|
name?: string;
|
|
985
1051
|
/**
|
|
986
|
-
* Assertion target wref
|
|
1052
|
+
* Assertion target wref. Presence of
|
|
987
1053
|
* `about` makes the add an assertion unless `kind` overrides it.
|
|
988
1054
|
*/
|
|
989
|
-
about?: string
|
|
1055
|
+
about?: string;
|
|
990
1056
|
/**
|
|
991
1057
|
* Shape-validated data payload for shape, thing, or assertion adds.
|
|
992
1058
|
*/
|
|
@@ -1039,6 +1105,14 @@ interface ReviseOperation {
|
|
|
1039
1105
|
* New shape-validated data payload.
|
|
1040
1106
|
*/
|
|
1041
1107
|
data?: unknown;
|
|
1108
|
+
/**
|
|
1109
|
+
* Collection type. Required when `kind` is `collection`.
|
|
1110
|
+
*/
|
|
1111
|
+
type?: CollectionTag$1;
|
|
1112
|
+
/**
|
|
1113
|
+
* Collection member wrefs. Required when `kind` is `collection`.
|
|
1114
|
+
*/
|
|
1115
|
+
members?: string[];
|
|
1042
1116
|
/**
|
|
1043
1117
|
* Optional optimistic-concurrency precondition. When supplied, the revise is
|
|
1044
1118
|
* applied only if the target is still at this version number. A stale value
|
|
@@ -1283,7 +1357,7 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1283
1357
|
* transport-ambiguous failure (timeout / 5xx / network reset / no-code
|
|
1284
1358
|
* error) on the first chunk triggers a bounded retry — but only when
|
|
1285
1359
|
* the first chunk contains exactly one operation. The SDK mints a
|
|
1286
|
-
* fresh `streamId`,
|
|
1360
|
+
* fresh `streamId`, sleeps with jittered
|
|
1287
1361
|
* exponential backoff, and re-issues the same operation. The retried
|
|
1288
1362
|
* call is observationally indistinguishable from a single clean
|
|
1289
1363
|
* apply — the SDK does not rewrite the request or the response.
|
|
@@ -1291,17 +1365,13 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1291
1365
|
* Multi-op chunks bypass retry entirely because the backend applies
|
|
1292
1366
|
* operations one-at-a-time in their own transactions, so a mid-chunk
|
|
1293
1367
|
* transport failure on attempt 1 may have committed an arbitrary
|
|
1294
|
-
* prefix.
|
|
1295
|
-
* bypass retry
|
|
1296
|
-
* so re-issuing under a fresh `streamId` would commit a different
|
|
1297
|
-
* identity than the first attempt may have landed. Multi-chunk
|
|
1298
|
-
* mid-flight failures (`chunkResults.length > 0`) also bypass retry.
|
|
1299
|
-
* All three surface `PartialStreamSubmissionError` exactly as before;
|
|
1368
|
+
* prefix. Multi-chunk mid-flight failures (`chunkResults.length > 0`)
|
|
1369
|
+
* also bypass retry. Both surface `PartialStreamSubmissionError` exactly as before;
|
|
1300
1370
|
* the existing full-input rerun contract remains the recovery path.
|
|
1301
1371
|
*
|
|
1302
1372
|
* Definite client rejections (`UNAUTHENTICATED`, `VALIDATION_ERROR`,
|
|
1303
|
-
* `CONFLICT`, `RATE_LIMITED`, `
|
|
1304
|
-
*
|
|
1373
|
+
* `CONFLICT`, `RATE_LIMITED`, `ALREADY_RETRACTED`, …) on the first chunk
|
|
1374
|
+
* still rethrow the raw cause unchanged — they
|
|
1305
1375
|
* are not transient, and structured detail (e.g. `retryAfter` on
|
|
1306
1376
|
* `RATE_LIMITED`) survives. If the caller's original attempt landed but
|
|
1307
1377
|
* the response was lost, the retry surfaces the resulting `CONFLICT`
|
|
@@ -1339,10 +1409,8 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
1339
1409
|
* any subset of the defaults (`{ 3, 250, 8_000 }`).
|
|
1340
1410
|
*
|
|
1341
1411
|
* Retry is automatically suppressed when the caller supplies
|
|
1342
|
-
* `args.streamId
|
|
1343
|
-
*
|
|
1344
|
-
* streams instead surface `PartialStreamSubmissionError` on append
|
|
1345
|
-
* failure.
|
|
1412
|
+
* `args.streamId`, because caller-managed streams may coordinate retries
|
|
1413
|
+
* outside the SDK.
|
|
1346
1414
|
*
|
|
1347
1415
|
* The server remains stateless across `stream.append` calls — there is
|
|
1348
1416
|
* no `streamId`-keyed dedup table. See docs/dev/commit-flow.md for the
|
|
@@ -1500,7 +1568,7 @@ interface BaseAddOp {
|
|
|
1500
1568
|
/**
|
|
1501
1569
|
* Assertion target wref. Presence of `about` makes the add an assertion unless `kind` overrides it.
|
|
1502
1570
|
*/
|
|
1503
|
-
readonly about?: string
|
|
1571
|
+
readonly about?: string;
|
|
1504
1572
|
/**
|
|
1505
1573
|
* Optional shape wref used by local validation.
|
|
1506
1574
|
*/
|
|
@@ -1529,8 +1597,7 @@ interface AddOp extends BaseAddOp {
|
|
|
1529
1597
|
readonly name: string;
|
|
1530
1598
|
}
|
|
1531
1599
|
/**
|
|
1532
|
-
* Builder collection add operation.
|
|
1533
|
-
* canonical auto-named collection from the supplied members.
|
|
1600
|
+
* Builder collection add operation. ADR 0004 requires an explicit name.
|
|
1534
1601
|
* @see https://docs.warmhub.ai/sdk-reference/interfaces/collectionaddop/
|
|
1535
1602
|
*/
|
|
1536
1603
|
interface CollectionAddOp {
|
|
@@ -1544,10 +1611,10 @@ interface CollectionAddOp {
|
|
|
1544
1611
|
*/
|
|
1545
1612
|
readonly kind?: 'collection';
|
|
1546
1613
|
/**
|
|
1547
|
-
*
|
|
1548
|
-
* collection
|
|
1614
|
+
* Explicit collection name. ADR 0004 treats collections as ordinary named
|
|
1615
|
+
* things, so collection adds cannot be nameless.
|
|
1549
1616
|
*/
|
|
1550
|
-
readonly name
|
|
1617
|
+
readonly name: string;
|
|
1551
1618
|
/**
|
|
1552
1619
|
* Collection type.
|
|
1553
1620
|
*/
|
|
@@ -1591,6 +1658,14 @@ interface ReviseOp {
|
|
|
1591
1658
|
* New shape-validated data payload.
|
|
1592
1659
|
*/
|
|
1593
1660
|
readonly data?: unknown;
|
|
1661
|
+
/**
|
|
1662
|
+
* Collection type. Required when `kind` is `collection`.
|
|
1663
|
+
*/
|
|
1664
|
+
readonly type?: CollectionAddType;
|
|
1665
|
+
/**
|
|
1666
|
+
* Collection member wrefs. Required when `kind` is `collection`.
|
|
1667
|
+
*/
|
|
1668
|
+
readonly members?: string[];
|
|
1594
1669
|
/**
|
|
1595
1670
|
* Optional optimistic-concurrency precondition. When supplied, the revise is
|
|
1596
1671
|
* applied only if the target is still at this version number. A stale value
|
|
@@ -1826,8 +1901,6 @@ declare class OperationBuilder {
|
|
|
1826
1901
|
private assertCanModify;
|
|
1827
1902
|
}
|
|
1828
1903
|
|
|
1829
|
-
/** @internal */
|
|
1830
|
-
type CollectionAbout = CollectionAbout$1;
|
|
1831
1904
|
/** @internal */
|
|
1832
1905
|
type CollectionTag = CollectionTag$1;
|
|
1833
1906
|
/** @internal */
|
|
@@ -1970,7 +2043,7 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
|
|
|
1970
2043
|
* - `NETWORK` — cause: connection failed before the server produced a response (DNS, refused, timeout, fetch error); retryable: true; action: check connectivity to the configured `apiUrl` and retry with backoff; origin: SDK `fetchWithAuth` connection-error mapping
|
|
1971
2044
|
*
|
|
1972
2045
|
* Backend domain codes (e.g. `SHAPE_MISMATCH`, `WREF_UNRESOLVABLE`,
|
|
1973
|
-
* `
|
|
2046
|
+
* `ARCHIVED`, `INTERNAL_ERROR`) pass through unchanged on
|
|
1974
2047
|
* `code` / `kind`. Surface the `message` and `hint` verbatim and use the
|
|
1975
2048
|
* message to decide whether to retry — most pass-through codes are terminal,
|
|
1976
2049
|
* but the backend reuses some codes for transient failures (notably
|
|
@@ -1978,8 +2051,8 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
|
|
|
1978
2051
|
* `please retry` message when DNS or HEAD probes flake). See the
|
|
1979
2052
|
* [HTTP error catalog](/http-api/overview/#response-format)
|
|
1980
2053
|
* for HTTP-status mapping and the most common backend codes (the catalog is
|
|
1981
|
-
* not exhaustive — rarer codes such as `
|
|
1982
|
-
*
|
|
2054
|
+
* not exhaustive — rarer codes such as `WREF_UNRESOLVABLE` are emitted by the
|
|
2055
|
+
* backend but not yet tabulated).
|
|
1983
2056
|
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/errorkind/
|
|
1984
2057
|
*/
|
|
1985
2058
|
type ErrorKind = CoreErrorKind | (string & {});
|
|
@@ -2580,6 +2653,20 @@ type ThingMetadata = {
|
|
|
2580
2653
|
revisedOn: number;
|
|
2581
2654
|
};
|
|
2582
2655
|
/** @internal */
|
|
2656
|
+
type CollectionReadDataMode = 'auto' | 'full';
|
|
2657
|
+
/** @internal */
|
|
2658
|
+
type CollectionReadSummary = {
|
|
2659
|
+
type: 'pair' | 'set' | 'list' | 'triple';
|
|
2660
|
+
memberField: 'first/second' | 'first/second/third' | 'members' | 'items';
|
|
2661
|
+
memberCount: number;
|
|
2662
|
+
dataMode: 'full' | 'summary';
|
|
2663
|
+
fullData: boolean;
|
|
2664
|
+
truncated: boolean;
|
|
2665
|
+
inlineLimit?: number;
|
|
2666
|
+
preview?: string[];
|
|
2667
|
+
previewCount?: number;
|
|
2668
|
+
};
|
|
2669
|
+
/** @internal */
|
|
2583
2670
|
type ThingItem = {
|
|
2584
2671
|
wref: string;
|
|
2585
2672
|
name: string;
|
|
@@ -2645,6 +2732,7 @@ type ThingDetail = {
|
|
|
2645
2732
|
version: number;
|
|
2646
2733
|
active: boolean;
|
|
2647
2734
|
data?: unknown;
|
|
2735
|
+
collection?: CollectionReadSummary;
|
|
2648
2736
|
/** True on synthesized empty stubs from getReadme/getAgents when no row exists yet. */
|
|
2649
2737
|
synthesized?: boolean;
|
|
2650
2738
|
aboutWref?: string;
|
|
@@ -2792,6 +2880,7 @@ type ThingHistoryOptions = {
|
|
|
2792
2880
|
/** @internal */
|
|
2793
2881
|
type ThingGetOptions = {
|
|
2794
2882
|
includeRetracted?: boolean;
|
|
2883
|
+
dataMode?: CollectionReadDataMode;
|
|
2795
2884
|
};
|
|
2796
2885
|
/** @internal */
|
|
2797
2886
|
type ThingGraphOptions = {
|
|
@@ -2889,6 +2978,20 @@ type SearchResult = HeadResult;
|
|
|
2889
2978
|
/** @internal */
|
|
2890
2979
|
type RefsResult = RefsResult$1;
|
|
2891
2980
|
/** @internal */
|
|
2981
|
+
type CollectionType = CollectionType$1;
|
|
2982
|
+
/** @internal */
|
|
2983
|
+
type CollectionMember = CollectionMember$1;
|
|
2984
|
+
/** @internal */
|
|
2985
|
+
type CollectionMembersPage = CollectionMembersPage$1;
|
|
2986
|
+
/** @internal */
|
|
2987
|
+
type CollectionContainsResult = CollectionContainsResult$1;
|
|
2988
|
+
/** @internal */
|
|
2989
|
+
type CollectionDiffResult = CollectionDiffResult$1;
|
|
2990
|
+
/** @internal */
|
|
2991
|
+
type CollectionMutationResult = CollectionMutationResult$1;
|
|
2992
|
+
/** @internal */
|
|
2993
|
+
type CollectionStatsResult = CollectionStatsResult$1;
|
|
2994
|
+
/** @internal */
|
|
2892
2995
|
type ResolveWrefResult = ThingDetail;
|
|
2893
2996
|
/** @internal */
|
|
2894
2997
|
type ThingGetManyResult = ThingGetManyResult$1;
|
|
@@ -3026,6 +3129,61 @@ type RefsOptions = {
|
|
|
3026
3129
|
cursor?: string;
|
|
3027
3130
|
};
|
|
3028
3131
|
/** @internal */
|
|
3132
|
+
type CollectionQuerySourceOptions = Pick<FilterOptions, 'shape' | 'kind' | 'about' | 'match' | 'componentRef' | 'excludeComponents' | 'where'>;
|
|
3133
|
+
type CollectionMemberSourceOptions = {
|
|
3134
|
+
members: string[];
|
|
3135
|
+
query?: CollectionQuerySourceOptions;
|
|
3136
|
+
sourceRepo?: never;
|
|
3137
|
+
} | {
|
|
3138
|
+
members?: never;
|
|
3139
|
+
query: CollectionQuerySourceOptions;
|
|
3140
|
+
sourceRepo: RepoLocator;
|
|
3141
|
+
} | {
|
|
3142
|
+
members?: string[];
|
|
3143
|
+
query: CollectionQuerySourceOptions;
|
|
3144
|
+
sourceRepo?: never;
|
|
3145
|
+
};
|
|
3146
|
+
/** @internal */
|
|
3147
|
+
type CollectionCreateOptions = {
|
|
3148
|
+
type: CollectionType;
|
|
3149
|
+
name: string;
|
|
3150
|
+
from?: string;
|
|
3151
|
+
add?: string[];
|
|
3152
|
+
remove?: string[];
|
|
3153
|
+
replaceMembers?: string[];
|
|
3154
|
+
skipExisting?: boolean;
|
|
3155
|
+
message?: string;
|
|
3156
|
+
committer?: string;
|
|
3157
|
+
} & CollectionMemberSourceOptions;
|
|
3158
|
+
/** @internal */
|
|
3159
|
+
type CollectionMembersOptions = {
|
|
3160
|
+
version?: number;
|
|
3161
|
+
limit?: number;
|
|
3162
|
+
cursor?: string;
|
|
3163
|
+
};
|
|
3164
|
+
/** @internal */
|
|
3165
|
+
type CollectionContainsOptions = {
|
|
3166
|
+
version?: number;
|
|
3167
|
+
position?: number;
|
|
3168
|
+
};
|
|
3169
|
+
/** @internal */
|
|
3170
|
+
type CollectionDiffOptions = {
|
|
3171
|
+
leftVersion?: number;
|
|
3172
|
+
rightVersion?: number;
|
|
3173
|
+
mode?: 'auto' | 'membership' | 'ordered';
|
|
3174
|
+
};
|
|
3175
|
+
/** @internal */
|
|
3176
|
+
type CollectionReviseOptions = {
|
|
3177
|
+
add?: string[];
|
|
3178
|
+
remove?: string[];
|
|
3179
|
+
message?: string;
|
|
3180
|
+
committer?: string;
|
|
3181
|
+
} & CollectionMemberSourceOptions;
|
|
3182
|
+
/** @internal */
|
|
3183
|
+
type CollectionStatsOptions = {
|
|
3184
|
+
version?: number;
|
|
3185
|
+
};
|
|
3186
|
+
/** @internal */
|
|
3029
3187
|
type PingResult = {
|
|
3030
3188
|
ok: boolean;
|
|
3031
3189
|
error?: string;
|
|
@@ -3985,6 +4143,18 @@ declare class WarmHubClient {
|
|
|
3985
4143
|
*/
|
|
3986
4144
|
listNotifications: (orgName: string, repoName: string, opts?: ActionListNotificationsOptions) => Promise<ActionNotificationInfo[]>;
|
|
3987
4145
|
};
|
|
4146
|
+
readonly collection: {
|
|
4147
|
+
create: (orgName: string, repoName: string, opts: CollectionCreateOptions) => Promise<CollectionMutationResult>;
|
|
4148
|
+
members: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions) => Promise<CollectionMembersPage>;
|
|
4149
|
+
membersIter: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions) => AsyncIterableIterator<CollectionMember>;
|
|
4150
|
+
membersAll: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionMembersOptions & {
|
|
4151
|
+
max?: number;
|
|
4152
|
+
}) => Promise<CollectionMember[]>;
|
|
4153
|
+
contains: (orgName: string | undefined, repoName: string | undefined, wref: string, members: string[], opts?: CollectionContainsOptions) => Promise<CollectionContainsResult>;
|
|
4154
|
+
diff: (orgName: string | undefined, repoName: string | undefined, leftWref: string, rightWref: string, opts?: CollectionDiffOptions) => Promise<CollectionDiffResult>;
|
|
4155
|
+
revise: (orgName: string, repoName: string, wref: string, opts: CollectionReviseOptions) => Promise<CollectionMutationResult>;
|
|
4156
|
+
stats: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionStatsOptions) => Promise<CollectionStatsResult>;
|
|
4157
|
+
};
|
|
3988
4158
|
/**
|
|
3989
4159
|
* Read surface for things, assertions, histories, references, search, and in-place thing renames.
|
|
3990
4160
|
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#thing
|
|
@@ -4035,6 +4205,7 @@ declare class WarmHubClient {
|
|
|
4035
4205
|
*
|
|
4036
4206
|
* @param version Optional exact version to pin when the wref is not already version-qualified.
|
|
4037
4207
|
* @param opts.includeRetracted Include retracted records instead of treating them as missing.
|
|
4208
|
+
* @param opts.dataMode Defaults to `auto`; pass `full` to force full collection bodies.
|
|
4038
4209
|
*/
|
|
4039
4210
|
get: (orgName: string | undefined, repoName: string | undefined, wref: string, version?: number, opts?: ThingGetOptions) => Promise<ThingGet>;
|
|
4040
4211
|
/**
|
|
@@ -4085,6 +4256,7 @@ declare class WarmHubClient {
|
|
|
4085
4256
|
*/
|
|
4086
4257
|
getMany: (orgName: string | undefined, repoName: string | undefined, wrefs: string[], version?: number, opts?: {
|
|
4087
4258
|
includeRetracted?: boolean;
|
|
4259
|
+
dataMode?: CollectionReadDataMode;
|
|
4088
4260
|
chunkSize?: number;
|
|
4089
4261
|
chunkConcurrency?: number;
|
|
4090
4262
|
}) => Promise<ThingGetManyResult>;
|
|
@@ -4368,7 +4540,7 @@ declare class WarmHubClient {
|
|
|
4368
4540
|
/**
|
|
4369
4541
|
* Append one non-empty chunk of stream operations to a repository.
|
|
4370
4542
|
*
|
|
4371
|
-
* Most callers should prefer `commit.apply` or `OperationBuilder`. Use this low-level surface only when you already have stream operations
|
|
4543
|
+
* Most callers should prefer `commit.apply` or `OperationBuilder`. Use this low-level surface only when you already have backend-shaped stream operations and a caller-managed stream ID.
|
|
4372
4544
|
*/
|
|
4373
4545
|
append: (input: StreamAppendInput$1) => Promise<StreamAppendResult$1>;
|
|
4374
4546
|
};
|
|
@@ -4570,4 +4742,4 @@ declare class WarmHubClient {
|
|
|
4570
4742
|
private watchRepoQuery;
|
|
4571
4743
|
}
|
|
4572
4744
|
|
|
4573
|
-
export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type
|
|
4745
|
+
export { type AboutOptions, type AboutResult, type AccessResolveInput, type AccessResolveResult, type AccessTokenProvider, type ActionAttemptInfo, type ActionDeliveryTarget, type ActionLeaseAcquire, type ActionLeaseOp, type ActionListNotificationsOptions, type ActionListRunsOptions, type ActionLiveFeed, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddOp, type AddOperation, AllStreamOperationsFailedError, type Assertion, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionAddOp, type CollectionAddType, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallResult, type ComponentList, type ComponentListOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, type ErrorKind, type FilterOptions, type FilterResult, type FunctionLogMode, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type HeadResult, type HistoryResult, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, type Operation, OperationBuilder, type OperationBuilderAddInput, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationSubmitResult, type OrgAccessResult, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, type RefLink, type RefsOptions, type RefsResult, type RenameOperation, type RenameResult, type RepoAccessResult, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoList, type RepoListForCallerOptions, type RepoListOptions, type RepoListPageOptions, type RepoListPageResult, type RepoLocator, type RepoRecentInfo, type RepoRef, type RepoShapeInstanceCountsView, type RepoSort, type RepoStatsBatchResult, type RepoStatsView, type RepoWithStatsInfo, type RequestEvent, type ResolveWrefResult, type RetractOp, type RetractOperation, type RetryPolicyOptions, type ReviseOp, type ReviseOperation, SDK_VERSION, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeReviseOptions, type ShapeValidatorResult, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingDetail, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-
|
|
1
|
+
export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-2KN2JWJU.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WarmHubClient } from './chunk-
|
|
2
|
-
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-
|
|
1
|
+
import { WarmHubClient } from './chunk-2KN2JWJU.js';
|
|
2
|
+
export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-2KN2JWJU.js';
|
|
3
3
|
import { createContext, useMemo, useState, useEffect, useContext } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
package/package.json
CHANGED