@warmhub/sdk-ts 0.86.0 → 0.87.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/README.md +4 -0
- package/dist/checkpoint.js +1 -1
- package/dist/checkpoint.js.map +1 -1
- package/dist/{chunk-FDD3D4H7.js → chunk-2SDARM7P.js} +24 -24
- package/dist/chunk-2SDARM7P.js.map +1 -0
- package/dist/chunk-7C47GTDA.js +8 -0
- package/dist/chunk-7C47GTDA.js.map +1 -0
- package/dist/index.d.ts +210 -9
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-FDD3D4H7.js.map +0 -1
- package/dist/chunk-H7QYGBKI.js +0 -8
- package/dist/chunk-H7QYGBKI.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -583,6 +583,83 @@ type Capabilities = {
|
|
|
583
583
|
minSupportedClients: Record<string, string>;
|
|
584
584
|
writeContractVersion: number;
|
|
585
585
|
features: Record<string, boolean>;
|
|
586
|
+
honoredClientFlags: Array<string>;
|
|
587
|
+
};
|
|
588
|
+
type GrantCreateInput = {
|
|
589
|
+
orgName: string;
|
|
590
|
+
repoName: string;
|
|
591
|
+
idempotencyKey: string;
|
|
592
|
+
grantee: {
|
|
593
|
+
principalId: string;
|
|
594
|
+
principalKind: 'member' | 'pat' | 'component';
|
|
595
|
+
};
|
|
596
|
+
coverage?: {
|
|
597
|
+
include: Array<string>;
|
|
598
|
+
exclude?: Array<string>;
|
|
599
|
+
};
|
|
600
|
+
viewRef?: string;
|
|
601
|
+
ops: Array<string>;
|
|
602
|
+
};
|
|
603
|
+
type GrantListInput = {
|
|
604
|
+
orgName: string;
|
|
605
|
+
repoName: string;
|
|
606
|
+
limit: number;
|
|
607
|
+
cursor?: string;
|
|
608
|
+
};
|
|
609
|
+
type GrantListResult$1 = {
|
|
610
|
+
items: Array<{
|
|
611
|
+
id: string;
|
|
612
|
+
grantee: {
|
|
613
|
+
principalId: string;
|
|
614
|
+
principalKind: 'anonymous' | 'member' | 'pat' | 'component';
|
|
615
|
+
};
|
|
616
|
+
issuer: {
|
|
617
|
+
principalId: string;
|
|
618
|
+
principalKind: 'anonymous' | 'member' | 'pat' | 'component';
|
|
619
|
+
};
|
|
620
|
+
idempotencyKey: string;
|
|
621
|
+
requestHash: string;
|
|
622
|
+
coverage: {
|
|
623
|
+
include: Array<string>;
|
|
624
|
+
exclude?: Array<string>;
|
|
625
|
+
} | null;
|
|
626
|
+
viewRef: string | null;
|
|
627
|
+
ops: Array<string>;
|
|
628
|
+
createdBy: string;
|
|
629
|
+
createdAt: string;
|
|
630
|
+
revokedAt: string | null;
|
|
631
|
+
revokedBy: string | null;
|
|
632
|
+
revokedReason: string | null;
|
|
633
|
+
}>;
|
|
634
|
+
nextCursor?: string;
|
|
635
|
+
};
|
|
636
|
+
type GrantRevokeResult$1 = {
|
|
637
|
+
grantId: string;
|
|
638
|
+
revoked: boolean;
|
|
639
|
+
};
|
|
640
|
+
type GrantView = {
|
|
641
|
+
id: string;
|
|
642
|
+
grantee: {
|
|
643
|
+
principalId: string;
|
|
644
|
+
principalKind: 'anonymous' | 'member' | 'pat' | 'component';
|
|
645
|
+
};
|
|
646
|
+
issuer: {
|
|
647
|
+
principalId: string;
|
|
648
|
+
principalKind: 'anonymous' | 'member' | 'pat' | 'component';
|
|
649
|
+
};
|
|
650
|
+
idempotencyKey: string;
|
|
651
|
+
requestHash: string;
|
|
652
|
+
coverage: {
|
|
653
|
+
include: Array<string>;
|
|
654
|
+
exclude?: Array<string>;
|
|
655
|
+
} | null;
|
|
656
|
+
viewRef: string | null;
|
|
657
|
+
ops: Array<string>;
|
|
658
|
+
createdBy: string;
|
|
659
|
+
createdAt: string;
|
|
660
|
+
revokedAt: string | null;
|
|
661
|
+
revokedBy: string | null;
|
|
662
|
+
revokedReason: string | null;
|
|
586
663
|
};
|
|
587
664
|
type HomepageFeaturedListsResult$1 = {
|
|
588
665
|
lists: Array<{
|
|
@@ -772,7 +849,6 @@ type StreamAppendResult$1 = {
|
|
|
772
849
|
createdByEmail?: string;
|
|
773
850
|
appendTotalMs?: number;
|
|
774
851
|
appendResolveRepoMs?: number;
|
|
775
|
-
appendTokenResolveMs?: number;
|
|
776
852
|
appendApplyMs?: number;
|
|
777
853
|
applySubphases?: {
|
|
778
854
|
addThingMs?: number;
|
|
@@ -783,7 +859,6 @@ type StreamAppendResult$1 = {
|
|
|
783
859
|
reviseCollectionMs?: number;
|
|
784
860
|
preparePinnedLoadShapeFieldsMs?: number;
|
|
785
861
|
preparePinnedPinWrefsMs?: number;
|
|
786
|
-
preparePinnedResolveTokensMs?: number;
|
|
787
862
|
preparePinnedValidateMs?: number;
|
|
788
863
|
operationLoopMs?: number;
|
|
789
864
|
persistMs?: number;
|
|
@@ -2381,6 +2456,58 @@ type WireScopeEntry$1 = {
|
|
|
2381
2456
|
permissions: Array<string>;
|
|
2382
2457
|
allowedMatches?: Array<string>;
|
|
2383
2458
|
};
|
|
2459
|
+
type ViewEvaluateInput = {
|
|
2460
|
+
orgName: string;
|
|
2461
|
+
repoName: string;
|
|
2462
|
+
wref: string;
|
|
2463
|
+
limit?: number;
|
|
2464
|
+
cursor?: string;
|
|
2465
|
+
};
|
|
2466
|
+
type ViewEvaluateResult$1 = {
|
|
2467
|
+
items: Array<{
|
|
2468
|
+
wref: string;
|
|
2469
|
+
name: string;
|
|
2470
|
+
kind: 'shape' | 'thing' | 'assertion' | 'collection';
|
|
2471
|
+
shapeName?: string;
|
|
2472
|
+
componentRef?: string;
|
|
2473
|
+
version: number;
|
|
2474
|
+
createdAt: number;
|
|
2475
|
+
data?: unknown;
|
|
2476
|
+
active: boolean;
|
|
2477
|
+
aboutWref?: string;
|
|
2478
|
+
roles?: Array<'from' | 'to' | 'ends' | 'first' | 'second'>;
|
|
2479
|
+
metadata?: {
|
|
2480
|
+
durableId: string;
|
|
2481
|
+
createdOn: number;
|
|
2482
|
+
revisedOn: number;
|
|
2483
|
+
};
|
|
2484
|
+
}>;
|
|
2485
|
+
nextCursor?: string;
|
|
2486
|
+
repoSeq?: number;
|
|
2487
|
+
view: {
|
|
2488
|
+
wref: string;
|
|
2489
|
+
version: number;
|
|
2490
|
+
};
|
|
2491
|
+
};
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* Input for idempotently creating an inline-coverage repository Grant.
|
|
2495
|
+
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/grantcreateoptions/
|
|
2496
|
+
*/
|
|
2497
|
+
type GrantCreateOptions = Omit<GrantCreateInput, 'orgName' | 'repoName' | 'coverage' | 'viewRef'> & {
|
|
2498
|
+
coverage: NonNullable<GrantCreateInput['coverage']>;
|
|
2499
|
+
};
|
|
2500
|
+
/** @internal */
|
|
2501
|
+
type GrantListOptions = Partial<Omit<GrantListInput, 'orgName' | 'repoName'>>;
|
|
2502
|
+
/**
|
|
2503
|
+
* An immutable active or revoked repository Grant record.
|
|
2504
|
+
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/grant/
|
|
2505
|
+
*/
|
|
2506
|
+
type Grant = GrantView;
|
|
2507
|
+
/** @internal */
|
|
2508
|
+
type GrantListResult = GrantListResult$1;
|
|
2509
|
+
/** @internal */
|
|
2510
|
+
type GrantRevokeResult = GrantRevokeResult$1;
|
|
2384
2511
|
|
|
2385
2512
|
type DateMappedRepositoryCheckpointStatus<T> = T extends {
|
|
2386
2513
|
createdAt: number;
|
|
@@ -3630,6 +3757,13 @@ interface WarmHubClientOptions {
|
|
|
3630
3757
|
name?: string;
|
|
3631
3758
|
version?: string;
|
|
3632
3759
|
};
|
|
3760
|
+
/**
|
|
3761
|
+
* Client-declared opt-in flags sent on `X-WarmHub-Client-Flags`. Flag names
|
|
3762
|
+
* are defined by the backend deployment; see your deployment's
|
|
3763
|
+
* documentation. Grammar-checked here; validated and honored only by the
|
|
3764
|
+
* server. Untrusted intent — never an authz signal.
|
|
3765
|
+
*/
|
|
3766
|
+
clientFlags?: readonly string[];
|
|
3633
3767
|
}
|
|
3634
3768
|
|
|
3635
3769
|
/**
|
|
@@ -4545,6 +4679,18 @@ type ThingHeadRequest = {
|
|
|
4545
4679
|
};
|
|
4546
4680
|
/** @internal */
|
|
4547
4681
|
type ThingHead = HeadResult;
|
|
4682
|
+
/**
|
|
4683
|
+
* Page options for evaluating a stored View.
|
|
4684
|
+
*
|
|
4685
|
+
* The View definition version is selected by the single versionable `wref`
|
|
4686
|
+
* passed to `view.evaluate`; there is no separate version option.
|
|
4687
|
+
*/
|
|
4688
|
+
/** @internal */
|
|
4689
|
+
type ViewEvaluateOptions = Omit<ViewEvaluateInput, 'orgName' | 'repoName' | 'wref'>;
|
|
4690
|
+
/** One page of live results from a selected stored View definition. */
|
|
4691
|
+
/** @internal */
|
|
4692
|
+
type ViewEvaluateResult = ViewEvaluateResult$1;
|
|
4693
|
+
|
|
4548
4694
|
/** @internal */
|
|
4549
4695
|
type LiveWatchResult = {
|
|
4550
4696
|
updates: number;
|
|
@@ -5091,10 +5237,11 @@ declare function isConnectionError(error: unknown): boolean;
|
|
|
5091
5237
|
*/
|
|
5092
5238
|
declare function connectionErrorMessage(url: string): string;
|
|
5093
5239
|
/**
|
|
5094
|
-
* Returns true when `version` is strictly older than `minimum`.
|
|
5095
|
-
*
|
|
5096
|
-
*
|
|
5097
|
-
*
|
|
5240
|
+
* Returns true when `version` is strictly older than `minimum`. This is the
|
|
5241
|
+
* parse boundary for the read-side compatibility hint: both arguments arrive
|
|
5242
|
+
* as unproved strings, and a string that is not SemVer returns false rather
|
|
5243
|
+
* than failing the read. Write admission parses both values separately and
|
|
5244
|
+
* fails closed.
|
|
5098
5245
|
*
|
|
5099
5246
|
* @internal
|
|
5100
5247
|
*/
|
|
@@ -5145,10 +5292,14 @@ declare class WarmHubClient {
|
|
|
5145
5292
|
private readonly accessToken;
|
|
5146
5293
|
/** Resolved `X-WarmHub-Client` identity; defaults to this SDK's name/version. */
|
|
5147
5294
|
private readonly clientIdentity;
|
|
5295
|
+
/** Normalized `clientFlags` option; stamped on every request. */
|
|
5296
|
+
private readonly clientFlags;
|
|
5148
5297
|
protected readonly functionLogMode: FunctionLogMode;
|
|
5149
5298
|
protected readonly getToken?: () => Promise<string | undefined>;
|
|
5150
5299
|
private readonly trpc;
|
|
5151
5300
|
private compatibilityCheck?;
|
|
5301
|
+
private overrideNoticePrinted;
|
|
5302
|
+
private noteCompatibilityOverride;
|
|
5152
5303
|
private assertWriteCompatible;
|
|
5153
5304
|
private createCompatibilityLink;
|
|
5154
5305
|
/**
|
|
@@ -6177,6 +6328,55 @@ declare class WarmHubClient {
|
|
|
6177
6328
|
revise: (orgName: string, repoName: string, wref: string, opts: CollectionReviseOptions) => Promise<CollectionMutationResult>;
|
|
6178
6329
|
stats: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: CollectionStatsOptions) => Promise<CollectionStatsResult>;
|
|
6179
6330
|
};
|
|
6331
|
+
/**
|
|
6332
|
+
* Execute stored View definitions against the repository's live read model.
|
|
6333
|
+
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#view
|
|
6334
|
+
*/
|
|
6335
|
+
readonly view: {
|
|
6336
|
+
/**
|
|
6337
|
+
* Evaluate one identity-scoped or pinned View definition and return one page.
|
|
6338
|
+
*
|
|
6339
|
+
* The `wref` is the sole definition selector. Cursors are short-lived resume
|
|
6340
|
+
* tokens for the same query and result scope. If the selected identity-scoped
|
|
6341
|
+
* View changes, the backend may reject a saved cursor with
|
|
6342
|
+
* `CURSOR_EPOCH_INVALID`; restart the query without `cursor`.
|
|
6343
|
+
*/
|
|
6344
|
+
evaluate: (orgName: string, repoName: string, wref: string, opts?: ViewEvaluateOptions) => Promise<ViewEvaluateResult>;
|
|
6345
|
+
/**
|
|
6346
|
+
* Iterate every live result from an identity-scoped or pinned View.
|
|
6347
|
+
*
|
|
6348
|
+
* The iterator preserves the caller's page size and optional resume cursor,
|
|
6349
|
+
* and rejects non-advancing or cyclic backend cursors.
|
|
6350
|
+
*
|
|
6351
|
+
* Cursors resume the same query and result scope. If the backend reports
|
|
6352
|
+
* `CURSOR_EPOCH_INVALID`, restart the query without `cursor`.
|
|
6353
|
+
*/
|
|
6354
|
+
evaluateIter: (orgName: string, repoName: string, wref: string, opts?: ViewEvaluateOptions) => AsyncIterableIterator<ThingItem>;
|
|
6355
|
+
/**
|
|
6356
|
+
* Materialize every live result from an identity-scoped or pinned View.
|
|
6357
|
+
*
|
|
6358
|
+
* Use `max` to guard memory usage. The call throws `VALIDATION_ERROR` only
|
|
6359
|
+
* after more than `max` items have actually been observed.
|
|
6360
|
+
*
|
|
6361
|
+
* Cursors resume the same query and result scope. If the backend reports
|
|
6362
|
+
* `CURSOR_EPOCH_INVALID`, restart the query without `cursor`.
|
|
6363
|
+
*/
|
|
6364
|
+
evaluateAll: (orgName: string, repoName: string, wref: string, opts?: ViewEvaluateOptions & {
|
|
6365
|
+
max?: number;
|
|
6366
|
+
}) => Promise<ThingItem[]>;
|
|
6367
|
+
};
|
|
6368
|
+
/**
|
|
6369
|
+
* Create and administer immutable repository Grants.
|
|
6370
|
+
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#grant
|
|
6371
|
+
*/
|
|
6372
|
+
readonly grant: {
|
|
6373
|
+
create: (orgName: string, repoName: string, input: GrantCreateOptions) => Promise<Grant>;
|
|
6374
|
+
get: (orgName: string, repoName: string, grantId: string) => Promise<Grant>;
|
|
6375
|
+
list: (orgName: string, repoName: string, opts?: GrantListOptions) => Promise<GrantListResult>;
|
|
6376
|
+
revoke: (orgName: string, repoName: string, grantId: string, opts?: {
|
|
6377
|
+
reason?: string;
|
|
6378
|
+
}) => Promise<GrantRevokeResult>;
|
|
6379
|
+
};
|
|
6180
6380
|
/**
|
|
6181
6381
|
* Read surface for things, assertions, histories, references, search, and in-place thing renames.
|
|
6182
6382
|
* @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/#thing
|
|
@@ -6851,8 +7051,9 @@ declare class WarmHubClient {
|
|
|
6851
7051
|
};
|
|
6852
7052
|
private openSse;
|
|
6853
7053
|
/**
|
|
6854
|
-
* Stamp the `X-WarmHub-Client` self-identification
|
|
6855
|
-
* already set
|
|
7054
|
+
* Stamp the `X-WarmHub-Client` self-identification and `X-WarmHub-Client-Flags`
|
|
7055
|
+
* headers, unless the caller already set them on the request (a per-request
|
|
7056
|
+
* header wins over the default).
|
|
6856
7057
|
*/
|
|
6857
7058
|
private applyClientHeader;
|
|
6858
7059
|
private fetchWithAuth;
|
|
@@ -6861,4 +7062,4 @@ declare class WarmHubClient {
|
|
|
6861
7062
|
private watchRepoQuery;
|
|
6862
7063
|
}
|
|
6863
7064
|
|
|
6864
|
-
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 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 CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CommitApplyCompatibilityResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, 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 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 HistoryVersion, 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 OperationEventReceiptV1, 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 RenameOptions, type RenameResult, type RepoAccessResult, 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 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 ShapeRemoveOptions, 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 ThingChanges, type ThingDetail, 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 ThingQueryChangesOptions, 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, aggregateSubmittedStreamResult, completedOperationsFrom, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createOperationEventRequestId, createOperationEventSubmissionId, isConnectionError, isDefiniteStreamAppendRejection, isRetryable, isWarmHubError, normalizeWref, offsetChunkResultIndexes, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
|
7065
|
+
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 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 CollectionMembershipRole, type CollectionMutationResult, type CollectionQuerySourceOptions, type CollectionReadDataMode, type CollectionReadSummary, type CollectionReviseOptions, type CollectionStatsOptions, type CollectionStatsResult, type CollectionTag, type CollectionType, type CommitApplyCompatibilityResult, type ComponentHistory, type ComponentHistoryOptions, type ComponentInfo, type ComponentInstallOptions, type ComponentInstallResult, type ComponentList, type ComponentListOptions, 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 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 Grant, type GrantCreateOptions, type GrantListOptions, type GrantListResult, type GrantRevokeResult, type HeadResult, type HistoryResult, type HistoryVersion, 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 OperationEventReceiptV1, 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 RenameOptions, type RenameResult, type RepoAccessResult, 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 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 ShapeRemoveOptions, 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 ThingChanges, type ThingDetail, 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 ThingQueryChangesOptions, type TokenInfo, type TokenResult, type UndeclaredFieldsWarning, type ValidationDiagnostic, type ValidationResult, type VerifiedCliCall, type ViewEvaluateOptions, type ViewEvaluateResult, WarmHubClient, type WarmHubClientOptions, WarmHubError, type WarmHubErrorDetails, type WherePredicate, type WhoamiInfo, type WhoamiScopeEntry, type WireScopeEntry, aggregateSubmittedStreamResult, completedOperationsFrom, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, createOperationEventRequestId, createOperationEventSubmissionId, isConnectionError, isDefiniteStreamAppendRejection, isRetryable, isWarmHubError, normalizeWref, offsetChunkResultIndexes, operationEventStreamRequestId, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{g as AllStreamOperationsFailedError,p as CliCallVerificationError,t as DEFAULT_API_URL,d as DEFAULT_STREAM_CHUNK_SIZE,e as MAX_STREAM_APPEND_OPERATION_COUNT,r as OperationBuilder,f as PartialStreamSubmissionError,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,m as aggregateSubmittedStreamResult,n as completedOperationsFrom,B as connectionErrorMessage,i as countStreamAppendResultStatuses,b as createOperationEventRequestId,a as createOperationEventSubmissionId,A as isConnectionError,j as isDefiniteStreamAppendRejection,z as isRetryable,y as isWarmHubError,s as normalizeWref,l as offsetChunkResultIndexes,c as operationEventStreamRequestId,u as resolveFunctionLogMode,v as sanitizeErrorMessage,C as sdkVersionIsBelowMinimum,h as streamAppendResultStatus,k as submitOperationsViaStream,x as toWarmHubError,q as verifyCliCall}from'./chunk-
|
|
1
|
+
export{g as AllStreamOperationsFailedError,p as CliCallVerificationError,t as DEFAULT_API_URL,d as DEFAULT_STREAM_CHUNK_SIZE,e as MAX_STREAM_APPEND_OPERATION_COUNT,r as OperationBuilder,f as PartialStreamSubmissionError,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,m as aggregateSubmittedStreamResult,n as completedOperationsFrom,B as connectionErrorMessage,i as countStreamAppendResultStatuses,b as createOperationEventRequestId,a as createOperationEventSubmissionId,A as isConnectionError,j as isDefiniteStreamAppendRejection,z as isRetryable,y as isWarmHubError,s as normalizeWref,l as offsetChunkResultIndexes,c as operationEventStreamRequestId,u as resolveFunctionLogMode,v as sanitizeErrorMessage,C as sdkVersionIsBelowMinimum,h as streamAppendResultStatus,k as submitOperationsViaStream,x as toWarmHubError,q as verifyCliCall}from'./chunk-7C47GTDA.js';export{m as CLI_INSTALL_REPO_HEADER,n as CLI_SIGNATURE_HEADER,o as CLI_TIMESTAMP_HEADER,u as CONTENT_FIELD_LIMIT_ERROR,t as MAX_CONTENT_FIELD_BYTES,v as contentFieldLimitError,I as validateAgainstShape}from'./chunk-2SDARM7P.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {D}from'./chunk-
|
|
1
|
+
import {D}from'./chunk-7C47GTDA.js';export{t as DEFAULT_API_URL,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,x as toWarmHubError}from'./chunk-7C47GTDA.js';import'./chunk-2SDARM7P.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var b=createContext(null),p=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:i,client:o}){let r=o?.name,n=o?.version,s=useMemo(()=>new D({apiUrl:e,accessToken:async()=>await i.getAccessToken()??void 0,client:{name:r,version:n}}),[e,i.getAccessToken,r,n]);return jsx(b.Provider,{value:s,children:jsx(g,{auth:i,client:s,children:t})})}function g({auth:e,client:t,children:i}){let[o,r]=useState(null),n=e.isAuthenticated&&o===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let u=false;return t.auth.sync().then(()=>{u||r(t);}).catch(f=>{console.error("auth.sync failed:",f),u||r(t);}),()=>{u=true;}},[e.isAuthenticated,t]);let s=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(p.Provider,{value:s,children:i})}function v(){let e=useContext(b);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(p)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
package/package.json
CHANGED