@warmhub/sdk-ts 0.158.1 → 0.160.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 +42 -0
- package/README.md +3 -9
- package/changelog.json +19 -0
- package/dist/checkpoint.js +1 -1
- package/dist/chunk-NAJ36D5X.js +34 -0
- package/dist/chunk-NAJ36D5X.js.map +1 -0
- package/dist/chunk-PTPZF24G.js +10 -0
- package/dist/chunk-PTPZF24G.js.map +1 -0
- package/dist/index.d.ts +59 -125
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DFF6JNW3.js +0 -10
- package/dist/chunk-DFF6JNW3.js.map +0 -1
- package/dist/chunk-ZPREHZXB.js +0 -36
- package/dist/chunk-ZPREHZXB.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ type AccessResolveResult$1 = {
|
|
|
129
129
|
type AuthSyncResult = {
|
|
130
130
|
success: boolean;
|
|
131
131
|
};
|
|
132
|
-
type CollectionTag$1 = '
|
|
132
|
+
type CollectionTag$1 = 'set' | 'list';
|
|
133
133
|
type CommitRealOperationResult$1 = {
|
|
134
134
|
opIndex: number;
|
|
135
135
|
operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename' | 'redact' | 'remove' | 'restore' | 'rewrite';
|
|
@@ -245,8 +245,6 @@ type CommitRealOperationResult$1 = {
|
|
|
245
245
|
reason: 'target_redacted';
|
|
246
246
|
targetDurableId: string;
|
|
247
247
|
fieldPath?: string;
|
|
248
|
-
} | {
|
|
249
|
-
reason: 'legacy-wrefs-window-ended';
|
|
250
248
|
} | {
|
|
251
249
|
reason: 'invalid_token';
|
|
252
250
|
};
|
|
@@ -295,8 +293,6 @@ type CommitDiagnostic$1 = {
|
|
|
295
293
|
reason: 'target_redacted';
|
|
296
294
|
targetDurableId: string;
|
|
297
295
|
fieldPath?: string;
|
|
298
|
-
} | {
|
|
299
|
-
reason: 'legacy-wrefs-window-ended';
|
|
300
296
|
} | {
|
|
301
297
|
reason: 'invalid_token';
|
|
302
298
|
};
|
|
@@ -570,8 +566,6 @@ type CommitValidateResult$1 = {
|
|
|
570
566
|
reason: 'target_redacted';
|
|
571
567
|
targetDurableId: string;
|
|
572
568
|
fieldPath?: string;
|
|
573
|
-
} | {
|
|
574
|
-
reason: 'legacy-wrefs-window-ended';
|
|
575
569
|
} | {
|
|
576
570
|
reason: 'invalid_token';
|
|
577
571
|
};
|
|
@@ -689,8 +683,6 @@ type CommitValidateResult$1 = {
|
|
|
689
683
|
reason: 'target_redacted';
|
|
690
684
|
targetDurableId: string;
|
|
691
685
|
fieldPath?: string;
|
|
692
|
-
} | {
|
|
693
|
-
reason: 'legacy-wrefs-window-ended';
|
|
694
686
|
} | {
|
|
695
687
|
reason: 'invalid_token';
|
|
696
688
|
};
|
|
@@ -812,8 +804,6 @@ type CommitValidateResult$1 = {
|
|
|
812
804
|
reason: 'target_redacted';
|
|
813
805
|
targetDurableId: string;
|
|
814
806
|
fieldPath?: string;
|
|
815
|
-
} | {
|
|
816
|
-
reason: 'legacy-wrefs-window-ended';
|
|
817
807
|
} | {
|
|
818
808
|
reason: 'invalid_token';
|
|
819
809
|
};
|
|
@@ -983,8 +973,6 @@ type OperationEventReceipt$1 = {
|
|
|
983
973
|
reason: 'target_redacted';
|
|
984
974
|
targetDurableId: string;
|
|
985
975
|
fieldPath?: string;
|
|
986
|
-
} | {
|
|
987
|
-
reason: 'legacy-wrefs-window-ended';
|
|
988
976
|
} | {
|
|
989
977
|
reason: 'invalid_token';
|
|
990
978
|
};
|
|
@@ -1147,8 +1135,6 @@ type OperationEventReceiptV2 = {
|
|
|
1147
1135
|
reason: 'target_redacted';
|
|
1148
1136
|
targetDurableId: string;
|
|
1149
1137
|
fieldPath?: string;
|
|
1150
|
-
} | {
|
|
1151
|
-
reason: 'legacy-wrefs-window-ended';
|
|
1152
1138
|
} | {
|
|
1153
1139
|
reason: 'invalid_token';
|
|
1154
1140
|
};
|
|
@@ -1230,7 +1216,7 @@ type CollectionStatsResult$1 = {
|
|
|
1230
1216
|
memberCount: number;
|
|
1231
1217
|
uniqueMemberCount: number;
|
|
1232
1218
|
};
|
|
1233
|
-
type CollectionType$1 = '
|
|
1219
|
+
type CollectionType$1 = 'set' | 'list';
|
|
1234
1220
|
type ComponentDetail = {
|
|
1235
1221
|
ref?: string;
|
|
1236
1222
|
componentName: string;
|
|
@@ -1440,8 +1426,6 @@ type ComponentInstallResult$1 = {
|
|
|
1440
1426
|
reason: 'target_redacted';
|
|
1441
1427
|
targetDurableId: string;
|
|
1442
1428
|
fieldPath?: string;
|
|
1443
|
-
} | {
|
|
1444
|
-
reason: 'legacy-wrefs-window-ended';
|
|
1445
1429
|
} | {
|
|
1446
1430
|
reason: 'invalid_token';
|
|
1447
1431
|
};
|
|
@@ -1625,8 +1609,6 @@ type ComponentUninstallResult$1 = {
|
|
|
1625
1609
|
reason: 'target_redacted';
|
|
1626
1610
|
targetDurableId: string;
|
|
1627
1611
|
fieldPath?: string;
|
|
1628
|
-
} | {
|
|
1629
|
-
reason: 'legacy-wrefs-window-ended';
|
|
1630
1612
|
} | {
|
|
1631
1613
|
reason: 'invalid_token';
|
|
1632
1614
|
};
|
|
@@ -1814,11 +1796,6 @@ type StreamAppendInput$1 = {
|
|
|
1814
1796
|
committer?: string;
|
|
1815
1797
|
message?: string;
|
|
1816
1798
|
returnRepoSeq?: boolean;
|
|
1817
|
-
allocatedTokens?: never;
|
|
1818
|
-
allocatedTokenRanges: Array<{
|
|
1819
|
-
start: number;
|
|
1820
|
-
end: number;
|
|
1821
|
-
}>;
|
|
1822
1799
|
operations: Array<{
|
|
1823
1800
|
operation: 'add';
|
|
1824
1801
|
name: string;
|
|
@@ -1886,10 +1863,6 @@ type StreamAppendInput$1 = {
|
|
|
1886
1863
|
submissionId: string;
|
|
1887
1864
|
};
|
|
1888
1865
|
type StreamAppendResult$1 = {
|
|
1889
|
-
allocatedTokenRanges: Array<{
|
|
1890
|
-
start: number;
|
|
1891
|
-
end: number;
|
|
1892
|
-
}>;
|
|
1893
1866
|
repoSeq?: number;
|
|
1894
1867
|
createdByEmail?: string;
|
|
1895
1868
|
appendTotalMs?: number;
|
|
@@ -2041,8 +2014,6 @@ type StreamAppendResult$1 = {
|
|
|
2041
2014
|
reason: 'target_redacted';
|
|
2042
2015
|
targetDurableId: string;
|
|
2043
2016
|
fieldPath?: string;
|
|
2044
|
-
} | {
|
|
2045
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2046
2017
|
} | {
|
|
2047
2018
|
reason: 'invalid_token';
|
|
2048
2019
|
};
|
|
@@ -2181,8 +2152,6 @@ type StreamAppendResult$1 = {
|
|
|
2181
2152
|
reason: 'target_redacted';
|
|
2182
2153
|
targetDurableId: string;
|
|
2183
2154
|
fieldPath?: string;
|
|
2184
|
-
} | {
|
|
2185
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2186
2155
|
} | {
|
|
2187
2156
|
reason: 'invalid_token';
|
|
2188
2157
|
};
|
|
@@ -2195,6 +2164,14 @@ type StreamAppendResult$1 = {
|
|
|
2195
2164
|
submissionId?: string;
|
|
2196
2165
|
pruned?: true;
|
|
2197
2166
|
};
|
|
2167
|
+
uploads?: Array<{
|
|
2168
|
+
opIndex: number;
|
|
2169
|
+
name: string;
|
|
2170
|
+
fileId: string;
|
|
2171
|
+
url: string;
|
|
2172
|
+
maxBytes: number;
|
|
2173
|
+
expiresAt: string;
|
|
2174
|
+
}>;
|
|
2198
2175
|
results?: Array<{
|
|
2199
2176
|
opIndex: number;
|
|
2200
2177
|
operation: 'add' | 'revise' | 'retract' | 'reaffirm' | 'rename' | 'redact' | 'remove' | 'restore' | 'rewrite';
|
|
@@ -2310,8 +2287,6 @@ type StreamAppendResult$1 = {
|
|
|
2310
2287
|
reason: 'target_redacted';
|
|
2311
2288
|
targetDurableId: string;
|
|
2312
2289
|
fieldPath?: string;
|
|
2313
|
-
} | {
|
|
2314
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2315
2290
|
} | {
|
|
2316
2291
|
reason: 'invalid_token';
|
|
2317
2292
|
};
|
|
@@ -2437,8 +2412,6 @@ type StreamingSubmissionRow$1 = {
|
|
|
2437
2412
|
reason: 'target_redacted';
|
|
2438
2413
|
targetDurableId: string;
|
|
2439
2414
|
fieldPath?: string;
|
|
2440
|
-
} | {
|
|
2441
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2442
2415
|
} | {
|
|
2443
2416
|
reason: 'invalid_token';
|
|
2444
2417
|
};
|
|
@@ -2623,8 +2596,6 @@ type CommitApplyCompatibilityResult$1 = {
|
|
|
2623
2596
|
reason: 'target_redacted';
|
|
2624
2597
|
targetDurableId: string;
|
|
2625
2598
|
fieldPath?: string;
|
|
2626
|
-
} | {
|
|
2627
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2628
2599
|
} | {
|
|
2629
2600
|
reason: 'invalid_token';
|
|
2630
2601
|
};
|
|
@@ -2763,8 +2734,6 @@ type CommitApplyCompatibilityResult$1 = {
|
|
|
2763
2734
|
reason: 'target_redacted';
|
|
2764
2735
|
targetDurableId: string;
|
|
2765
2736
|
fieldPath?: string;
|
|
2766
|
-
} | {
|
|
2767
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2768
2737
|
} | {
|
|
2769
2738
|
reason: 'invalid_token';
|
|
2770
2739
|
};
|
|
@@ -2779,7 +2748,7 @@ type CommitApplyCompatibilityResult$1 = {
|
|
|
2779
2748
|
};
|
|
2780
2749
|
};
|
|
2781
2750
|
type CollectionMutationCompatibilityResult = {
|
|
2782
|
-
type?: '
|
|
2751
|
+
type?: 'set' | 'list';
|
|
2783
2752
|
wref?: string;
|
|
2784
2753
|
version?: number;
|
|
2785
2754
|
memberCount?: number;
|
|
@@ -2935,8 +2904,6 @@ type CollectionMutationCompatibilityResult = {
|
|
|
2935
2904
|
reason: 'target_redacted';
|
|
2936
2905
|
targetDurableId: string;
|
|
2937
2906
|
fieldPath?: string;
|
|
2938
|
-
} | {
|
|
2939
|
-
reason: 'legacy-wrefs-window-ended';
|
|
2940
2907
|
} | {
|
|
2941
2908
|
reason: 'invalid_token';
|
|
2942
2909
|
};
|
|
@@ -3075,8 +3042,6 @@ type CollectionMutationCompatibilityResult = {
|
|
|
3075
3042
|
reason: 'target_redacted';
|
|
3076
3043
|
targetDurableId: string;
|
|
3077
3044
|
fieldPath?: string;
|
|
3078
|
-
} | {
|
|
3079
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3080
3045
|
} | {
|
|
3081
3046
|
reason: 'invalid_token';
|
|
3082
3047
|
};
|
|
@@ -3218,8 +3183,6 @@ type RemoveCompatibilityResult = {
|
|
|
3218
3183
|
reason: 'target_redacted';
|
|
3219
3184
|
targetDurableId: string;
|
|
3220
3185
|
fieldPath?: string;
|
|
3221
|
-
} | {
|
|
3222
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3223
3186
|
} | {
|
|
3224
3187
|
reason: 'invalid_token';
|
|
3225
3188
|
};
|
|
@@ -3358,8 +3321,6 @@ type RemoveCompatibilityResult = {
|
|
|
3358
3321
|
reason: 'target_redacted';
|
|
3359
3322
|
targetDurableId: string;
|
|
3360
3323
|
fieldPath?: string;
|
|
3361
|
-
} | {
|
|
3362
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3363
3324
|
} | {
|
|
3364
3325
|
reason: 'invalid_token';
|
|
3365
3326
|
};
|
|
@@ -3501,8 +3462,6 @@ type RenameCompatibilityResult = {
|
|
|
3501
3462
|
reason: 'target_redacted';
|
|
3502
3463
|
targetDurableId: string;
|
|
3503
3464
|
fieldPath?: string;
|
|
3504
|
-
} | {
|
|
3505
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3506
3465
|
} | {
|
|
3507
3466
|
reason: 'invalid_token';
|
|
3508
3467
|
};
|
|
@@ -3641,8 +3600,6 @@ type RenameCompatibilityResult = {
|
|
|
3641
3600
|
reason: 'target_redacted';
|
|
3642
3601
|
targetDurableId: string;
|
|
3643
3602
|
fieldPath?: string;
|
|
3644
|
-
} | {
|
|
3645
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3646
3603
|
} | {
|
|
3647
3604
|
reason: 'invalid_token';
|
|
3648
3605
|
};
|
|
@@ -3786,8 +3743,6 @@ type RewriteCompatibilityResult = {
|
|
|
3786
3743
|
reason: 'target_redacted';
|
|
3787
3744
|
targetDurableId: string;
|
|
3788
3745
|
fieldPath?: string;
|
|
3789
|
-
} | {
|
|
3790
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3791
3746
|
} | {
|
|
3792
3747
|
reason: 'invalid_token';
|
|
3793
3748
|
};
|
|
@@ -3926,8 +3881,6 @@ type RewriteCompatibilityResult = {
|
|
|
3926
3881
|
reason: 'target_redacted';
|
|
3927
3882
|
targetDurableId: string;
|
|
3928
3883
|
fieldPath?: string;
|
|
3929
|
-
} | {
|
|
3930
|
-
reason: 'legacy-wrefs-window-ended';
|
|
3931
3884
|
} | {
|
|
3932
3885
|
reason: 'invalid_token';
|
|
3933
3886
|
};
|
|
@@ -4072,8 +4025,6 @@ type ShapeChangeCompatibilityResult = {
|
|
|
4072
4025
|
reason: 'target_redacted';
|
|
4073
4026
|
targetDurableId: string;
|
|
4074
4027
|
fieldPath?: string;
|
|
4075
|
-
} | {
|
|
4076
|
-
reason: 'legacy-wrefs-window-ended';
|
|
4077
4028
|
} | {
|
|
4078
4029
|
reason: 'invalid_token';
|
|
4079
4030
|
};
|
|
@@ -4212,8 +4163,6 @@ type ShapeChangeCompatibilityResult = {
|
|
|
4212
4163
|
reason: 'target_redacted';
|
|
4213
4164
|
targetDurableId: string;
|
|
4214
4165
|
fieldPath?: string;
|
|
4215
|
-
} | {
|
|
4216
|
-
reason: 'legacy-wrefs-window-ended';
|
|
4217
4166
|
} | {
|
|
4218
4167
|
reason: 'invalid_token';
|
|
4219
4168
|
};
|
|
@@ -4359,8 +4308,6 @@ type ShapeRemoveCompatibilityResult = {
|
|
|
4359
4308
|
reason: 'target_redacted';
|
|
4360
4309
|
targetDurableId: string;
|
|
4361
4310
|
fieldPath?: string;
|
|
4362
|
-
} | {
|
|
4363
|
-
reason: 'legacy-wrefs-window-ended';
|
|
4364
4311
|
} | {
|
|
4365
4312
|
reason: 'invalid_token';
|
|
4366
4313
|
};
|
|
@@ -4499,8 +4446,6 @@ type ShapeRemoveCompatibilityResult = {
|
|
|
4499
4446
|
reason: 'target_redacted';
|
|
4500
4447
|
targetDurableId: string;
|
|
4501
4448
|
fieldPath?: string;
|
|
4502
|
-
} | {
|
|
4503
|
-
reason: 'legacy-wrefs-window-ended';
|
|
4504
4449
|
} | {
|
|
4505
4450
|
reason: 'invalid_token';
|
|
4506
4451
|
};
|
|
@@ -5009,8 +4954,8 @@ type TokenCreateInput = {
|
|
|
5009
4954
|
shapeless?: boolean;
|
|
5010
4955
|
};
|
|
5011
4956
|
}>;
|
|
5012
|
-
allowedMatches?:
|
|
5013
|
-
allowedShapes?:
|
|
4957
|
+
allowedMatches?: never;
|
|
4958
|
+
allowedShapes?: never;
|
|
5014
4959
|
}>;
|
|
5015
4960
|
structured?: boolean;
|
|
5016
4961
|
description?: string;
|
|
@@ -5624,14 +5569,7 @@ declare function contentFieldLimitError(path: string, value: string): string | n
|
|
|
5624
5569
|
* after a `lease_held` to back off until the lease expires (#3625).
|
|
5625
5570
|
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/warmhuberrordetails/
|
|
5626
5571
|
*/
|
|
5627
|
-
type WarmHubErrorDetails = NonNullable<CommitDiagnostic$1['details']>
|
|
5628
|
-
/**
|
|
5629
|
-
* A `CLIENT_INCOMPATIBLE` refusal's cause, a stable reason to branch on:
|
|
5630
|
-
* `legacy-wrefs-sdk` is the SDK refusing every call under `legacy-wrefs`.
|
|
5631
|
-
*/
|
|
5632
|
-
| {
|
|
5633
|
-
reason: 'legacy-wrefs-sdk';
|
|
5634
|
-
} | OldNameDetails;
|
|
5572
|
+
type WarmHubErrorDetails = NonNullable<CommitDiagnostic$1['details']> | OldNameDetails;
|
|
5635
5573
|
/**
|
|
5636
5574
|
* Why a Thing read refused with `NOT_FOUND` although it can be answered: the
|
|
5637
5575
|
* name asked for is an old `Shape/name` spelling, and `currentName` is the
|
|
@@ -5839,21 +5777,6 @@ declare const DEPENDENCY_FAILED = "DEPENDENCY_FAILED";
|
|
|
5839
5777
|
*/
|
|
5840
5778
|
declare function isShapeReference(value: unknown): value is string;
|
|
5841
5779
|
|
|
5842
|
-
/**
|
|
5843
|
-
* The SDK's refusal under `legacy-wrefs` (adjudicator's final wording).
|
|
5844
|
-
* @see https://docs.warmhub.ai/sdk-reference/variables/legacy_wrefs_refusal/
|
|
5845
|
-
*/
|
|
5846
|
-
declare const LEGACY_WREFS_REFUSAL = "`legacy-wrefs` is set; the SDKs are v2-only. Unset it, or use the `wh` CLI for v1.";
|
|
5847
|
-
/**
|
|
5848
|
-
* @internal How a send path treats operations.
|
|
5849
|
-
*
|
|
5850
|
-
* - `v2`: every operation is checked, and keepShapes revises resolved.
|
|
5851
|
-
* - `passThrough`: the CLI's raw input under `legacy-wrefs`, sent as given.
|
|
5852
|
-
* A builder or a keepShapes revise is still refused: both are v2 payloads,
|
|
5853
|
-
* and keepShapes needs a v2 read.
|
|
5854
|
-
*/
|
|
5855
|
-
type OperationChecks = 'v2' | 'passThrough';
|
|
5856
|
-
|
|
5857
5780
|
/**
|
|
5858
5781
|
* Batch Thing read a keepShapes revise's Shapes and version come from, as
|
|
5859
5782
|
* {@link createKeepShapesResolver} takes it.
|
|
@@ -5939,12 +5862,9 @@ type CommitValidateOperations = readonly CommitValidateOperation[] | QueuedOpera
|
|
|
5939
5862
|
* @internal The commit.validate request input: the CLI byte preflight builds
|
|
5940
5863
|
* it from raw operations; {@link sendCommitValidate} takes its header from it
|
|
5941
5864
|
* and supplies operations already resolved (keepShapes revises), then checks
|
|
5942
|
-
* that body against the same limit.
|
|
5943
|
-
* `passThrough` only for the CLI's byte preflight of raw input under
|
|
5944
|
-
* legacy-wrefs: this builds an input and sends nothing, and only a
|
|
5945
|
-
* pass-through client can send one.
|
|
5865
|
+
* that body against the same limit.
|
|
5946
5866
|
*/
|
|
5947
|
-
declare function createCommitValidateInput(orgName: string, repoName: string, operations: readonly CommitValidateOperation[], opts?: CommitValidateOptions
|
|
5867
|
+
declare function createCommitValidateInput(orgName: string, repoName: string, operations: readonly CommitValidateOperation[], opts?: CommitValidateOptions): CommitValidateInput;
|
|
5948
5868
|
/**
|
|
5949
5869
|
* Serialize the exact body sent by the dedicated unbatched tRPC HTTP link.
|
|
5950
5870
|
*
|
|
@@ -6044,13 +5964,6 @@ declare const DEFAULT_STREAM_CHUNK_SIZE = 1000;
|
|
|
6044
5964
|
*/
|
|
6045
5965
|
declare const MAX_STREAM_APPEND_OPERATION_COUNT = 10000;
|
|
6046
5966
|
interface OperationStreamClient {
|
|
6047
|
-
/**
|
|
6048
|
-
* The normalized client flags this client stamps on its requests. A
|
|
6049
|
-
* `WarmHubClient` reports them. Under `legacy-wrefs` nothing is sent. A
|
|
6050
|
-
* stream client that reports no flags is treated as having none: if it
|
|
6051
|
-
* stamps `legacy-wrefs` on its requests itself, report it here.
|
|
6052
|
-
*/
|
|
6053
|
-
readonly clientFlags?: readonly string[];
|
|
6054
5967
|
stream: {
|
|
6055
5968
|
append(input: StreamAppendInput$1): Promise<StreamAppendResult$1>;
|
|
6056
5969
|
};
|
|
@@ -6079,6 +5992,12 @@ type SubmittedStreamResult = {
|
|
|
6079
5992
|
operations: CommitRealOperationResult$1[];
|
|
6080
5993
|
/** One exact immutable receipt per stream chunk, in submission order. */
|
|
6081
5994
|
receipts: OperationEventReceipt$1[];
|
|
5995
|
+
/**
|
|
5996
|
+
* Upload tickets for the files this submission's operations started, with
|
|
5997
|
+
* `opIndex` across the whole submission; absent when there are none. A
|
|
5998
|
+
* receipt lookup carries none; resubmitting the same submission re-mints them.
|
|
5999
|
+
*/
|
|
6000
|
+
uploads?: NonNullable<StreamAppendResult$1['uploads']>;
|
|
6082
6001
|
};
|
|
6083
6002
|
/**
|
|
6084
6003
|
* Stream identity metadata for caller-managed streamed commit submissions.
|
|
@@ -6136,6 +6055,12 @@ declare class PartialStreamSubmissionError extends Error {
|
|
|
6136
6055
|
* @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#completedoperations
|
|
6137
6056
|
*/
|
|
6138
6057
|
readonly completedOperations: SubmittedStreamResult['operations'];
|
|
6058
|
+
/**
|
|
6059
|
+
* Upload tickets from acknowledged chunks, with submission-wide `opIndex`.
|
|
6060
|
+
* Receipts omit tickets, so this is the only place they survive a failure.
|
|
6061
|
+
* @see https://docs.warmhub.ai/sdk-reference/classes/partialstreamsubmissionerror/#uploads
|
|
6062
|
+
*/
|
|
6063
|
+
readonly uploads: NonNullable<SubmittedStreamResult['uploads']>;
|
|
6139
6064
|
readonly submissionId: string;
|
|
6140
6065
|
readonly eventRequestId: string;
|
|
6141
6066
|
readonly chunkOrdinal: number;
|
|
@@ -6169,6 +6094,7 @@ declare class PartialStreamSubmissionError extends Error {
|
|
|
6169
6094
|
cause: unknown;
|
|
6170
6095
|
completedReceipts: readonly OperationEventReceipt$1[];
|
|
6171
6096
|
completedOperations?: SubmittedStreamResult['operations'];
|
|
6097
|
+
uploads?: NonNullable<SubmittedStreamResult['uploads']>;
|
|
6172
6098
|
acknowledgedOperationCount?: number;
|
|
6173
6099
|
lastAcknowledgedRepoSeq?: number;
|
|
6174
6100
|
attemptedAppendOutcome: 'not_applied' | 'unknown';
|
|
@@ -6201,6 +6127,7 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
6201
6127
|
constructor(result: SubmittedStreamResult);
|
|
6202
6128
|
}
|
|
6203
6129
|
|
|
6130
|
+
type StreamAppendUpload = NonNullable<SubmittedStreamResult['uploads']>[number];
|
|
6204
6131
|
/**
|
|
6205
6132
|
* Running reducer over stream-append chunk outputs.
|
|
6206
6133
|
*
|
|
@@ -6214,6 +6141,7 @@ declare class AllStreamOperationsFailedError extends Error {
|
|
|
6214
6141
|
declare class StreamSubmissionAggregator {
|
|
6215
6142
|
readonly receipts: OperationEventReceipt$1[];
|
|
6216
6143
|
private readonly operations;
|
|
6144
|
+
private readonly uploads;
|
|
6217
6145
|
private readonly statusCounts;
|
|
6218
6146
|
/** True once at least one row landed and every row failed. */
|
|
6219
6147
|
get allFailed(): boolean;
|
|
@@ -6221,10 +6149,13 @@ declare class StreamSubmissionAggregator {
|
|
|
6221
6149
|
addChunk(input: {
|
|
6222
6150
|
receipt: OperationEventReceipt$1;
|
|
6223
6151
|
chunkStart: number;
|
|
6152
|
+
uploads?: readonly StreamAppendUpload[];
|
|
6224
6153
|
}): void;
|
|
6225
6154
|
addReceipt(receipt: OperationEventReceipt$1): void;
|
|
6226
6155
|
/** Rows confirmed applied or noop, for partial-submission recovery. */
|
|
6227
6156
|
completedOperations(): SubmittedStreamResult['operations'];
|
|
6157
|
+
/** Upload tickets from acknowledged chunks; receipts never carry them. */
|
|
6158
|
+
completedUploads(): StreamAppendUpload[];
|
|
6228
6159
|
/** Project the accumulated state into the legacy aggregate write result. */
|
|
6229
6160
|
toResult(meta: {
|
|
6230
6161
|
committer?: string;
|
|
@@ -7272,10 +7203,10 @@ type CoreErrorKind = 'BACKEND' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHENTICATED' |
|
|
|
7272
7203
|
* @remarks
|
|
7273
7204
|
* Stable kinds (members of `CoreErrorKind`):
|
|
7274
7205
|
*
|
|
7275
|
-
* - `BACKEND` — cause: server-side failure that did not carry a more specific domain code (tRPC error data has no `data.warmhub.code`, REST status mapped to the catch-all default — primarily 5xx that lack a body `error.code` — or an SDK transport throw such as a
|
|
7206
|
+
* - `BACKEND` — cause: server-side failure that did not carry a more specific domain code (tRPC error data has no `data.warmhub.code`, REST status mapped to the catch-all default — primarily 5xx that lack a body `error.code` — or an SDK transport throw such as a missing SSE body); retryable: true; action: retry with backoff and surface the message if it persists; if the underlying error is a deterministic local-adapter failure (e.g. a misconfigured custom `fetch`), fix the adapter rather than retrying; origin: SDK tRPC fallback, `httpStatusToWarmHubCode` default for unmapped HTTP statuses (an SSE 5xx included), unknown thrown values inside tRPC paths (custom-`fetch` adapter throws are normalized to `BACKEND` only on tRPC surfaces — on REST and `ping` surfaces the raw error escapes uncaught). REST responses with a parseable body surface as their pass-through `error.code` (typically `INTERNAL_ERROR`), and REST 4xx responses without a body code fall through to the HTTP-status mapping (`NOT_FOUND`, `UNAUTHENTICATED`, `FORBIDDEN`, `CONFLICT`, `VALIDATION_ERROR`, `RATE_LIMITED`), not `BACKEND`.
|
|
7276
7207
|
* - `NOT_FOUND` — cause: a referenced entity (repo, org, thing, shape, subscription, credential set, etc.) is missing or the caller cannot see it, or the client hit a removed/renamed tRPC procedure path or unsupported method because its route contract is out of sync with the backend; retryable: false; action: verify the identifier the call site used (wref, slug, name) and escalate to a caller with read access if the entity should exist; when the message or hint names a procedure/method mismatch, upgrade the WarmHub client to match the backend; origin: SDK reads across all surfaces, commit pipeline, REST query endpoints, tRPC transport 404/405 route-missing/version-skew failures
|
|
7277
7208
|
* - `FORBIDDEN` — cause: caller is authenticated but lacks the required permission; retryable: false; action: request the missing permission or use a token with broader scope; origin: SDK + REST authorization middleware
|
|
7278
|
-
* - `UNAUTHENTICATED` — cause: missing, expired, or invalid bearer token on a tRPC or REST call; retryable: false; action: mint a fresh PAT and update whichever client option the application wires it into (`auth.getToken` callback or `accessToken` — the SDK does not read `WH_TOKEN` or any env var directly); `wh auth login` only refreshes the CLI's on-disk credentials and does not propagate to a constructed SDK client; for export tickets, remint via the appropriate backend endpoint; origin: SDK + REST auth middleware.
|
|
7209
|
+
* - `UNAUTHENTICATED` — cause: missing, expired, or invalid bearer token on a tRPC or REST call; retryable: false; action: mint a fresh PAT and update whichever client option the application wires it into (`auth.getToken` callback or `accessToken` — the SDK does not read `WH_TOKEN` or any env var directly); `wh auth login` only refreshes the CLI's on-disk credentials and does not propagate to a constructed SDK client; for export tickets, remint via the appropriate backend endpoint; origin: SDK + REST auth middleware. A live helper's `/sse` refusal keeps its code (an invalid ticket is `UNAUTHENTICATED`) and ends its reconnect loop.
|
|
7279
7210
|
* - `VALIDATION_ERROR` — cause: input failed schema, shape, content-length, or read-pagination cursor validation; retryable: false; action: fix the offending field per the error message, or restart the read without a stale/non-advancing cursor; origin: commit pipeline, SDK writes, SDK read pagination helpers, client-side content limits
|
|
7280
7211
|
* - `CONFLICT` — cause: write collides with current state (concurrent edit, name already in use); retryable: false; action: refetch the current state and reconcile before retrying the write; origin: commit pipeline, repo/org creation. Archived org / repo writes surface as the pass-through code `ARCHIVED`, not `CONFLICT`.
|
|
7281
7212
|
* - `RATE_LIMITED` — cause: caller exceeded the per-token or per-org request budget; retryable: true; action: wait {@link WarmHubError.retryAfter} seconds before retrying; origin: REST + tRPC throttling
|
|
@@ -8329,11 +8260,19 @@ type LiveWatchResult = {
|
|
|
8329
8260
|
updates: number;
|
|
8330
8261
|
};
|
|
8331
8262
|
/**
|
|
8332
|
-
* Handle returned by live subscription helpers.
|
|
8263
|
+
* Handle returned by live subscription helpers. The stream reconnects on its
|
|
8264
|
+
* own (the server ends each stream when its ticket expires, so access is
|
|
8265
|
+
* re-decided on every reconnect).
|
|
8333
8266
|
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/livehandle/
|
|
8334
8267
|
*/
|
|
8335
8268
|
type LiveHandle = {
|
|
8336
8269
|
close: () => void;
|
|
8270
|
+
/**
|
|
8271
|
+
* Resolves once the handle is closed or its signal aborts; rejects when the
|
|
8272
|
+
* loop stops on an error it does not retry: a refused reconnect
|
|
8273
|
+
* (`NOT_FOUND`, `UNAUTHENTICATED`, `FORBIDDEN`, ...) or a throw from your
|
|
8274
|
+
* callback.
|
|
8275
|
+
*/
|
|
8337
8276
|
closed: Promise<LiveWatchResult>;
|
|
8338
8277
|
};
|
|
8339
8278
|
/** @internal */
|
|
@@ -8510,12 +8449,8 @@ type SearchResult = Omit<HeadResult, 'repoSeq'>;
|
|
|
8510
8449
|
type RefsResult = RefsResult$1;
|
|
8511
8450
|
/** @internal */
|
|
8512
8451
|
type CollectionType = CollectionType$1;
|
|
8513
|
-
/**
|
|
8514
|
-
|
|
8515
|
-
* accepted during the compatibility window (issue #10668) and lowered by the
|
|
8516
|
-
* backend to ordinary Things with a deprecation warning.
|
|
8517
|
-
*/
|
|
8518
|
-
type CollectionWriteType = CollectionType;
|
|
8452
|
+
/** @internal What `collection.create` writes. */
|
|
8453
|
+
type CollectionWriteType = Extract<CollectionType, 'set' | 'list'>;
|
|
8519
8454
|
/** @internal */
|
|
8520
8455
|
type CollectionMutationResult = CollectionMutationCompatibilityResult;
|
|
8521
8456
|
/** @internal */
|
|
@@ -8963,21 +8898,13 @@ declare class WarmHubClient {
|
|
|
8963
8898
|
private noteCompatibilityHeaders;
|
|
8964
8899
|
private noteCompatibilityOverride;
|
|
8965
8900
|
private assertWriteCompatible;
|
|
8966
|
-
/**
|
|
8967
|
-
* Why a request may not leave under `legacy-wrefs`, or `undefined` when it
|
|
8968
|
-
* may. The SDK sends nothing under the flag. The CLI's pass-through lets
|
|
8969
|
-
* reads and the raw commit routes through; the typed seams upstream have
|
|
8970
|
-
* already refused builder output and keepShapes.
|
|
8971
|
-
*/
|
|
8972
|
-
private legacyWrefsRefusal;
|
|
8973
8901
|
/**
|
|
8974
8902
|
* The low-level `stream.append` takes operations as given, but a pinned
|
|
8975
|
-
* Shape is refused locally as everywhere else.
|
|
8976
|
-
* CLI's enrolled pass-through under `legacy-wrefs` sends raw v1 unchanged.
|
|
8903
|
+
* Shape is refused locally as everywhere else.
|
|
8977
8904
|
*/
|
|
8978
8905
|
private pinnedShapeRefusal;
|
|
8979
8906
|
/** Local refusals, ahead of every other link and the compatibility probe. */
|
|
8980
|
-
private
|
|
8907
|
+
private createLocalRefusalLink;
|
|
8981
8908
|
private createCompatibilityLink;
|
|
8982
8909
|
/**
|
|
8983
8910
|
* Authentication helpers for browser sign-in flows, session checks, and token diagnostics.
|
|
@@ -10815,8 +10742,7 @@ declare class WarmHubClient {
|
|
|
10815
10742
|
constructor(options?: WarmHubClientOptions);
|
|
10816
10743
|
/**
|
|
10817
10744
|
* The normalized `clientFlags` this client stamps on every request: frozen,
|
|
10818
|
-
* so it can be read but not changed.
|
|
10819
|
-
* nothing (see {@link LEGACY_WREFS_REFUSAL}).
|
|
10745
|
+
* so it can be read but not changed.
|
|
10820
10746
|
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#clientflags
|
|
10821
10747
|
*/
|
|
10822
10748
|
get clientFlags(): readonly string[];
|
|
@@ -10941,6 +10867,14 @@ declare class WarmHubClient {
|
|
|
10941
10867
|
*/
|
|
10942
10868
|
listNotifications: (orgName: string, repoName: string, opts?: ActionListNotificationsOptions) => Promise<ActionNotificationInfo[]>;
|
|
10943
10869
|
};
|
|
10870
|
+
/**
|
|
10871
|
+
* Keeps a repository stream open until `signal` aborts. Every connection
|
|
10872
|
+
* asks for a fresh ticket, so when the server ends a stream at ticket
|
|
10873
|
+
* expiry, the reconnect is decided against current authority. A retryable
|
|
10874
|
+
* failure reconnects after a pause; any other failure, or one thrown by the
|
|
10875
|
+
* consumer, ends the loop with that error.
|
|
10876
|
+
*/
|
|
10877
|
+
private runLiveLoop;
|
|
10944
10878
|
private openSse;
|
|
10945
10879
|
/**
|
|
10946
10880
|
* Stamp the `X-WarmHub-Client` self-identification and `X-WarmHub-Client-Flags`
|
|
@@ -10960,4 +10894,4 @@ declare class WarmHubClient {
|
|
|
10960
10894
|
private watchRepoQuery;
|
|
10961
10895
|
}
|
|
10962
10896
|
|
|
10963
|
-
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 ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddInput, type AddOperation, AllStreamOperationsFailedError, type Assertion, CHECKPOINT_CONTENT_TYPES, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, COMPONENT_INSTALL_RESULT_STATES, COMPONENT_SUMMARY_STATES, CONTENT_FIELD_LIMIT_ERROR, CREDENTIAL_SCOPES, type CheckpointContentType, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CollectionWriteType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOperation, type CommitValidateOperations, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentInstallResultState, type ComponentList, type ComponentListOptions, type ComponentSummaryState, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialScope, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, DEPENDENCY_FAILED, type DeclaredFieldEntry, type ErrorKind, type FieldIndexCarryingMarker, type FieldIndexCarryingShape, type FieldIndexConsistency, type FieldIndexPinResult, type FilterOptions, type FilterResult, type FunctionLogMode, GLOBAL_SEARCH_RESULT_ITEM_KINDS, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type GlobalSearchResultItemKind, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, HOMEPAGE_FEATURED_ITEM_KINDS, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedItemKind, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type KeepShapesRevise,
|
|
10897
|
+
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 ActionLiveFeedItem, type ActionLiveFeedOptions, type ActionNotificationInfo, type ActionRunInfo, type ActionRunStatsInfo, type ActionRunStatsOptions, type AddInput, type AddOperation, AllStreamOperationsFailedError, type Assertion, CHECKPOINT_CONTENT_TYPES, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, COMPONENT_INSTALL_RESULT_STATES, COMPONENT_SUMMARY_STATES, CONTENT_FIELD_LIMIT_ERROR, CREDENTIAL_SCOPES, type CheckpointContentType, type CliCallSecrets, CliCallVerificationError, type CliCallVerificationFailureReason, type CollectionContainsOptions, type CollectionContainsResult, type CollectionCreateOptions, type CollectionDiffOptions, type CollectionDiffResult, type CollectionMember, type CollectionMembersOptions, type CollectionMembersPage, type CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CollectionWriteType, type CommitApplyCompatibilityResult, type CommitDiagnostic, type CommitRealOperationResult, type CommitValidateInput, type CommitValidateOperation, type CommitValidateOperations, type CommitValidateOptions, type CommitValidateResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentInstallResultState, type ComponentList, type ComponentListOptions, type ComponentSummaryState, type ComponentUninstallOptions, type ComponentUninstallResult, type ComponentView, type CoreErrorKind, type CountOptions, type CountResult, type CredentialAuditEntry, type CredentialDeleteResult, type CredentialGrantResult, type CredentialInfo, type CredentialKeyMutationResult, type CredentialRevokeResult, type CredentialScope, type CredentialUngrantResult, type CurrentUserInfo, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, DEPENDENCY_FAILED, type DeclaredFieldEntry, type ErrorKind, type FieldIndexCarryingMarker, type FieldIndexCarryingShape, type FieldIndexConsistency, type FieldIndexPinResult, type FilterOptions, type FilterResult, type FunctionLogMode, GLOBAL_SEARCH_RESULT_ITEM_KINDS, type GlobalSearchOptions, type GlobalSearchResult, type GlobalSearchResultItem, type GlobalSearchResultItemKind, type Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRecipientSelector, type GrantRevokeResult, HOMEPAGE_FEATURED_ITEM_KINDS, type HeadResult, type HistoryResult, type HistoryVersion, type HomepageFeaturedItemKind, type HomepageFeaturedListsResult, type IndexedFieldEntry, type IndexedFieldsReport, type KeepShapesRevise, type LiveHandle, type LiveRepoEvent, type LiveSubscriptionLogOptions, type LiveThingHeadOptions, type LiveThingHistoryOptions, type LiveWatchResult, MAX_COMMIT_VALIDATION_ENCODED_BYTES, MAX_COMMIT_VALIDATION_OPERATIONS, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT, MAX_WREFS_PER_THING_VERSION, type MemberScopeEntry, ORG_AUTH_SCOPES, ORG_MEMBER_STATUSES, ORG_ROLES, type OldNameDetails, type Operation, OperationBuilder, type OperationBuilderClient, type OperationBuilderOp, type OperationBuilderOptions, type OperationEventReceipt, type OperationEventReceiptMetadata, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, type OrgDetail, type OrgInfo, type OrgList, type OrgListMembersOptions, type OrgListOptions, type OrgMemberInfo, type OrgMemberList, type OrgMemberStatus, type OrgRef, type OrgRole, type Page, type PageRequest, PartialStreamSubmissionError, type PingResult, REPO_AUTH_SCOPES, type ReaffirmInput, type ReaffirmOperation, type RedactOptions, type RedactResult, type RefLink, type RefsOptions, type RefsResult, type RemoveOperation, type RemoveOptions, type RemoveResult, type RenameOperation, type RenameOptions, type RenameResult, type RepoAccessResult, type RepoAuthScope, type RepoConfigureStatsView, type RepoDescribeResult, type RepoExploreBrowseOptions, type RepoExploreItem, type RepoExploreOptions, type RepoExploreResult, type RepoInfo, type RepoLicense, 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 RepositoryCheckpointAccess, type RepositoryCheckpointStatus, type RepositoryExportDeltaFormats, RepositoryExportError, type RepositoryExportErrorReason, type RepositoryExportExpectation, type RepositoryExportOptions, type RepositoryExportPreparation, type RepositoryExportPrepareOptions, type RepositoryExportRestoreOptions, type RepositoryExportRowMap, type RepositoryExportRows, type RepositoryExportSegmentOptions, RepositoryExportSession, type RequestEvent, type ResolveWrefResult, type RestoreInput, type RestoreOperation, type RetractInput, type RetractOperation, type RetryPolicyOptions, type ReviseInput, type ReviseOperation, type RewriteOperation, type RewriteOptions, type RewriteResult, SDK_VERSION, SUBSCRIBABLE_EVENT_TYPES, type ScopeAllowedShapes, type SearchOptions, type SearchResult, type ServiceAccountInfo, type Shape, type ShapeChange, type ShapeCreateOptions, type ShapeFields, type ShapeGetOptions, type ShapeHistory, type ShapeHistoryOptions, type ShapeList, type ShapeListOptions, type ShapeRef, type ShapeRemove, type ShapeRemoveOptions, type ShapeReviseOptions, type ShapeValidatorResult, type ShapesChoice, type StreamAppendInput, type StreamAppendResult, type StreamContinuationState, StreamSubmissionAggregator, type StreamingSubmissionHandle, type StreamingSubmissionOptions, StreamingSubmissionOutcomeUnknownError, type StreamingSubmissionRetryIdentity, type StreamingSubmissionRow, type SubscriptionBindCredentialsResult, type SubscriptionCompatCreateInput, type SubscriptionCompatUpdateInput, type SubscriptionInfo, type SubscriptionList, type SubscriptionUnbindCredentialsResult, type SynthesizedRepoContent, type ThingChanges, type ThingDetail, type ThingDetailFields, type ThingGet, type ThingGetManyResult, type ThingGetOptions, type ThingGetWithLease, type ThingGraphOptions, type ThingGraphResult, type ThingGraphValue, type ThingHead, type ThingHeadChangesOptions, type ThingHeadOptions, type ThingHeadRequest, type ThingHeadVersionsResult, type ThingHistory, type ThingHistoryOptions, type ThingItem, type ThingMetadata, type ThingNamesResult, type ThingQueryChangesOptions, type ThingShapesReader, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, type WarmHubDecorations, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, type WriteOperation, WriteOperationError, applyRepositoryExportDelta, collectDurableTokens, commitValidateRequestBodyBytes, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createCommitValidateInput, createKeepShapesResolver, createOperationEventRequestId, createOperationEventSubmissionId, createRepositoryExportSession, encodeCommitValidateRequestBody, getResponseDecorations, isAllStreamOperationsFailedError, isConnectionError, isDefiniteStreamAppendRejection, isKnownCheckpointContentType, isKnownComponentInstallResultState, isKnownComponentSummaryState, isKnownCredentialScope, isKnownGlobalSearchResultItemKind, isKnownHomepageFeaturedItemKind, isKnownOrgAuthScope, isKnownOrgMemberStatus, isKnownOrgRole, isKnownRepoAuthScope, isKnownSubscribableEventType, isRetryable, isShapeReference, isWarmHubError, normalizeWref, operationEventStreamRequestId, readRepositoryExportStream, resolveFunctionLogMode, restoreRepositoryExportSession, sanitizeErrorMessage, sdkVersionIsBelowMinimum, shapeName, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{s as AllStreamOperationsFailedError,H as CliCallVerificationError,K as DEFAULT_API_URL,p as DEFAULT_STREAM_CHUNK_SIZE,d as DEPENDENCY_FAILED,g as MAX_COMMIT_VALIDATION_ENCODED_BYTES,f as MAX_COMMIT_VALIDATION_OPERATIONS,q as MAX_STREAM_APPEND_OPERATION_COUNT,y as OperationBuilder,r as PartialStreamSubmissionError,z as RepositoryExportError,A as RepositoryExportSession,G as SDK_VERSION,m as StreamSubmissionAggregator,F as StreamingSubmissionOutcomeUnknownError,U as WarmHubClient,a as WarmHubError,c as WriteOperationError,C as applyRepositoryExportDelta,k as collectDurableTokens,j as commitValidateRequestBodyBytes,S as connectionErrorMessage,u as countStreamAppendResultStatuses,h as createCommitValidateInput,x as createKeepShapesResolver,o as createOperationEventRequestId,n as createOperationEventSubmissionId,B as createRepositoryExportSession,i as encodeCommitValidateRequestBody,l as getResponseDecorations,O as isAllStreamOperationsFailedError,R as isConnectionError,v as isDefiniteStreamAppendRejection,Q as isRetryable,e as isShapeReference,P as isWarmHubError,J as normalizeWref,D as readRepositoryExportStream,L as resolveFunctionLogMode,E as restoreRepositoryExportSession,M as sanitizeErrorMessage,T as sdkVersionIsBelowMinimum,b as shapeName,t as streamAppendResultStatus,w as submitOperationsViaStream,N as toWarmHubError,I as verifyCliCall}from'./chunk-PTPZF24G.js';export{ia as CHECKPOINT_CONTENT_TYPES,C as CLI_INSTALL_REPO_HEADER,D as CLI_SIGNATURE_HEADER,E as CLI_TIMESTAMP_HEADER,J as COMPONENT_INSTALL_RESULT_STATES,P as COMPONENT_SUMMARY_STATES,l as CONTENT_FIELD_LIMIT_ERROR,R as CREDENTIAL_SCOPES,T as GLOBAL_SEARCH_RESULT_ITEM_KINDS,V as HOMEPAGE_FEATURED_ITEM_KINDS,k as MAX_CONTENT_FIELD_BYTES,z as MAX_WREFS_PER_THING_VERSION,X as ORG_AUTH_SCOPES,$ as ORG_MEMBER_STATUSES,ba as ORG_ROLES,L as REPO_AUTH_SCOPES,H as SUBSCRIBABLE_EVENT_TYPES,m as contentFieldLimitError,ja as isKnownCheckpointContentType,K as isKnownComponentInstallResultState,Q as isKnownComponentSummaryState,S as isKnownCredentialScope,U as isKnownGlobalSearchResultItemKind,W as isKnownHomepageFeaturedItemKind,Y as isKnownOrgAuthScope,aa as isKnownOrgMemberStatus,ca as isKnownOrgRole,M as isKnownRepoAuthScope,I as isKnownSubscribableEventType,Z as operationEventStreamRequestId,Aa as validateAgainstShape}from'./chunk-NAJ36D5X.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {U}from'./chunk-PTPZF24G.js';export{K as DEFAULT_API_URL,G as SDK_VERSION,U as WarmHubClient,a as WarmHubError,N as toWarmHubError}from'./chunk-PTPZF24G.js';import'./chunk-NAJ36D5X.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null),f=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:o,client:s,decorateResponses:r}){let n=s?.name,u=s?.version,i=o.getAccessToken,a=useMemo(()=>new U({apiUrl:e,accessToken:async()=>await i()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,n,u,r,i]);return jsx(p.Provider,{value:a,children:jsx(g,{auth:o,client:a,children:t})})}function g({auth:e,client:t,children:o}){let[s,r]=useState(null),n=e.isAuthenticated&&s===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let i=false;return t.auth.sync().then(()=>{i||r(t);}).catch(a=>{console.error("auth.sync failed:",a),i||r(t);}),()=>{i=true;}},[e.isAuthenticated,t]);let u=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(f.Provider,{value:u,children:o})}function v(){let e=useContext(p);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(f)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
package/package.json
CHANGED