@warmhub/sdk-ts 0.150.0 → 0.152.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 +8 -0
- package/changelog.json +10 -0
- package/dist/checkpoint.js +1 -1
- package/dist/{chunk-GSHJ54OM.js → chunk-OBLKVPHV.js} +24 -24
- package/dist/chunk-OBLKVPHV.js.map +1 -0
- package/dist/chunk-YVTNE3EH.js +10 -0
- package/dist/chunk-YVTNE3EH.js.map +1 -0
- package/dist/index.d.ts +186 -20
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5TOGHSS7.js +0 -10
- package/dist/chunk-5TOGHSS7.js.map +0 -1
- package/dist/chunk-GSHJ54OM.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,10 @@ type AccessResolveInput$1 = {
|
|
|
90
90
|
}>;
|
|
91
91
|
orgs?: Array<{
|
|
92
92
|
orgName: string;
|
|
93
|
+
orgDurableId?: never;
|
|
94
|
+
} | {
|
|
95
|
+
orgDurableId: string;
|
|
96
|
+
orgName?: never;
|
|
93
97
|
}>;
|
|
94
98
|
};
|
|
95
99
|
type AccessResolveResult$1 = {
|
|
@@ -100,6 +104,7 @@ type AccessResolveResult$1 = {
|
|
|
100
104
|
orgName: string;
|
|
101
105
|
repoName: string;
|
|
102
106
|
repoDurableId?: string;
|
|
107
|
+
orgDurableId?: string;
|
|
103
108
|
} | {
|
|
104
109
|
visible: boolean;
|
|
105
110
|
scopes: Array<string>;
|
|
@@ -107,11 +112,18 @@ type AccessResolveResult$1 = {
|
|
|
107
112
|
orgName?: never;
|
|
108
113
|
repoName?: never;
|
|
109
114
|
repoDurableId: string;
|
|
115
|
+
orgDurableId?: string;
|
|
110
116
|
}>;
|
|
111
117
|
orgs: Array<{
|
|
118
|
+
visible: boolean;
|
|
119
|
+
scopes: Array<string>;
|
|
112
120
|
orgName: string;
|
|
121
|
+
orgDurableId?: string;
|
|
122
|
+
} | {
|
|
113
123
|
visible: boolean;
|
|
114
124
|
scopes: Array<string>;
|
|
125
|
+
orgName?: never;
|
|
126
|
+
orgDurableId: string;
|
|
115
127
|
}>;
|
|
116
128
|
};
|
|
117
129
|
type AuthSyncResult = {
|
|
@@ -6419,6 +6431,18 @@ type Org = {
|
|
|
6419
6431
|
errorCount?: number;
|
|
6420
6432
|
lastActivityAt?: number;
|
|
6421
6433
|
};
|
|
6434
|
+
type OrgGetResult = {
|
|
6435
|
+
name: string;
|
|
6436
|
+
displayName: string;
|
|
6437
|
+
description?: string;
|
|
6438
|
+
tier: 'free' | 'pro' | 'enterprise';
|
|
6439
|
+
archivedAt?: number;
|
|
6440
|
+
createdAt: number;
|
|
6441
|
+
repoCount?: number;
|
|
6442
|
+
errorCount?: number;
|
|
6443
|
+
lastActivityAt?: number;
|
|
6444
|
+
orgDurableId: string;
|
|
6445
|
+
};
|
|
6422
6446
|
type OrgListResult = Array<{
|
|
6423
6447
|
name: string;
|
|
6424
6448
|
displayName: string;
|
|
@@ -6439,6 +6463,16 @@ type OrgMember = {
|
|
|
6439
6463
|
invitedBy?: string;
|
|
6440
6464
|
createdAt: number;
|
|
6441
6465
|
};
|
|
6466
|
+
type ServiceAccount = {
|
|
6467
|
+
orgName: string;
|
|
6468
|
+
name: string;
|
|
6469
|
+
externalId: string;
|
|
6470
|
+
role: string;
|
|
6471
|
+
description?: string;
|
|
6472
|
+
disabled: boolean;
|
|
6473
|
+
createdBy: string | null;
|
|
6474
|
+
createdAt: number;
|
|
6475
|
+
};
|
|
6442
6476
|
type CollectionMembershipRole$1 = 'from' | 'to' | 'ends' | 'first' | 'second' | 'members' | 'items';
|
|
6443
6477
|
type RefsResult$1 = {
|
|
6444
6478
|
items: Array<{
|
|
@@ -6581,6 +6615,14 @@ type ThingHeadVersionsResult$1 = {
|
|
|
6581
6615
|
}>;
|
|
6582
6616
|
missing: Array<string>;
|
|
6583
6617
|
};
|
|
6618
|
+
type ThingNamesResult$1 = {
|
|
6619
|
+
requested: number;
|
|
6620
|
+
items: Array<{
|
|
6621
|
+
durableId: string;
|
|
6622
|
+
canonicalWref: string;
|
|
6623
|
+
}>;
|
|
6624
|
+
missing: Array<string>;
|
|
6625
|
+
};
|
|
6584
6626
|
type RepositoryCheckpointAccess$1 = {
|
|
6585
6627
|
checkpointId: string;
|
|
6586
6628
|
repoSeq: number;
|
|
@@ -6876,6 +6918,7 @@ type TokenCreateInput = {
|
|
|
6876
6918
|
description?: string;
|
|
6877
6919
|
expiresAt?: number;
|
|
6878
6920
|
committerIdentityWref?: string;
|
|
6921
|
+
serviceAccount?: string;
|
|
6879
6922
|
};
|
|
6880
6923
|
type TokenCreateResult = {
|
|
6881
6924
|
token: string;
|
|
@@ -6897,6 +6940,7 @@ type TokenCreateResult = {
|
|
|
6897
6940
|
warnings?: Array<string>;
|
|
6898
6941
|
expiresAt: number;
|
|
6899
6942
|
createdAt: number;
|
|
6943
|
+
serviceAccount?: string;
|
|
6900
6944
|
};
|
|
6901
6945
|
type TokenRevokeResult = {
|
|
6902
6946
|
ok: boolean;
|
|
@@ -7146,11 +7190,19 @@ declare const CLI_TIMESTAMP_HEADER = "X-WarmHub-Timestamp";
|
|
|
7146
7190
|
*/
|
|
7147
7191
|
type CliHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
7148
7192
|
|
|
7149
|
-
/**
|
|
7150
|
-
|
|
7193
|
+
/**
|
|
7194
|
+
* Every event type a webhook subscription can watch.
|
|
7195
|
+
* @see https://docs.warmhub.ai/sdk-reference/variables/subscribable_event_types/
|
|
7196
|
+
*/
|
|
7197
|
+
declare const SUBSCRIBABLE_EVENT_TYPES: readonly ["commit", "repo.renamed", "org.renamed", "org.member_added", "org.repo_created", "org.repo_published", "org.service_account_created", "org.service_account_role_changed", "org.service_account_disabled", "org.service_account_enabled", "org.service_account_deleted", "thing.renamed", "shape.renamed"];
|
|
7151
7198
|
type SubscribableEventType = (typeof SUBSCRIBABLE_EVENT_TYPES)[number];
|
|
7199
|
+
/**
|
|
7200
|
+
* Whether this build recognizes an event type; unknown strings remain valid on reads.
|
|
7201
|
+
* @see https://docs.warmhub.ai/sdk-reference/functions/isknownsubscribableeventtype/
|
|
7202
|
+
*/
|
|
7203
|
+
declare function isKnownSubscribableEventType(value: string): value is SubscribableEventType;
|
|
7152
7204
|
/** Org-scoped events — created with an `orgName` and no `repoName`. */
|
|
7153
|
-
declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added", "org.repo_created", "org.repo_published"];
|
|
7205
|
+
declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added", "org.repo_created", "org.repo_published", "org.service_account_created", "org.service_account_role_changed", "org.service_account_disabled", "org.service_account_enabled", "org.service_account_deleted"];
|
|
7154
7206
|
type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
|
|
7155
7207
|
|
|
7156
7208
|
/**
|
|
@@ -7822,7 +7874,8 @@ declare function commitValidateRequestBodyBytes(input: CommitValidateInput): num
|
|
|
7822
7874
|
* The one durable-token collector every decoration surface shares (GH-8699).
|
|
7823
7875
|
* The SDK link, the CLI's sidecar subsetting, and the MCP dispatcher all
|
|
7824
7876
|
* detect body references through this module, so the contract-critical skip
|
|
7825
|
-
* rule cannot drift between surfaces.
|
|
7877
|
+
* rule cannot drift between surfaces. The SDK link and the MCP dispatcher
|
|
7878
|
+
* also label the tokens through `resolveDecorations`.
|
|
7826
7879
|
*/
|
|
7827
7880
|
/**
|
|
7828
7881
|
* Collect the bare canonical durable ids referenced anywhere in `value` —
|
|
@@ -7846,13 +7899,13 @@ declare function collectDurableTokens(value: unknown): Set<string>;
|
|
|
7846
7899
|
|
|
7847
7900
|
/**
|
|
7848
7901
|
* Reference-decoration internals: discover durable reference tokens in a
|
|
7849
|
-
* response payload and
|
|
7902
|
+
* response payload and label them through `thing.names` into the additive
|
|
7850
7903
|
* `decorations` sidecar (durable id → canonical wref; a miss has no entry).
|
|
7851
7904
|
*
|
|
7852
7905
|
* Public surface: the option, the `WarmHubDecorations` type, the
|
|
7853
7906
|
* `getResponseDecorations` accessor, and `collectDurableTokens` (so CLI-side
|
|
7854
7907
|
* sidecar subsetting shares the one collector and its skip rule). The rest —
|
|
7855
|
-
* walker composition,
|
|
7908
|
+
* walker composition, link — is not.
|
|
7856
7909
|
*/
|
|
7857
7910
|
|
|
7858
7911
|
/**
|
|
@@ -9065,7 +9118,7 @@ interface WarmHubClientOptions {
|
|
|
9065
9118
|
clientFlags?: readonly string[];
|
|
9066
9119
|
/**
|
|
9067
9120
|
* Opt into response auto-decoration. Query results are walked for durable
|
|
9068
|
-
* reference tokens; one batched `thing.
|
|
9121
|
+
* reference tokens; one batched `thing.names` lookup resolves them
|
|
9069
9122
|
* under this caller's authority, and the result carries an additive
|
|
9070
9123
|
* `decorations` record mapping each bare durable id to its canonical wref.
|
|
9071
9124
|
* Unreadable and nonexistent ids get no entry. Costs one extra request per
|
|
@@ -9222,7 +9275,8 @@ type CommitApplyCompatibilityResult = CommitApplyCompatibilityResult$1;
|
|
|
9222
9275
|
type SubscriptionInfo = {
|
|
9223
9276
|
name: string;
|
|
9224
9277
|
kind: 'webhook';
|
|
9225
|
-
|
|
9278
|
+
/** Open on the wire; narrow with `isKnownSubscribableEventType`. */
|
|
9279
|
+
eventType: string;
|
|
9226
9280
|
active: boolean;
|
|
9227
9281
|
shapeName?: string;
|
|
9228
9282
|
sourceRepo?: string;
|
|
@@ -9674,10 +9728,19 @@ interface ShapeHistoryOptions {
|
|
|
9674
9728
|
type ShapeHistory = HistoryResult;
|
|
9675
9729
|
/** @internal */
|
|
9676
9730
|
type OrgInfo = Org;
|
|
9731
|
+
/** @internal `org.get` result: {@link OrgInfo} plus its durable id. */
|
|
9732
|
+
type OrgDetail = OrgGetResult;
|
|
9677
9733
|
/** @internal */
|
|
9678
9734
|
type OrgList = OrgListResult;
|
|
9679
9735
|
/** @internal */
|
|
9680
9736
|
type OrgMemberInfo = OrgMember;
|
|
9737
|
+
/**
|
|
9738
|
+
* A service account returned by `client.org.serviceAccounts`: an org-owned
|
|
9739
|
+
* principal for automation that cannot sign in and takes no seat.
|
|
9740
|
+
*
|
|
9741
|
+
* @internal
|
|
9742
|
+
*/
|
|
9743
|
+
type ServiceAccountInfo = ServiceAccount;
|
|
9681
9744
|
/** @internal */
|
|
9682
9745
|
type OrgMemberList = {
|
|
9683
9746
|
members: OrgMemberInfo[];
|
|
@@ -10307,6 +10370,11 @@ type TokenInfo = {
|
|
|
10307
10370
|
* associated identity.
|
|
10308
10371
|
*/
|
|
10309
10372
|
committerIdentityWref?: string | null;
|
|
10373
|
+
/**
|
|
10374
|
+
* Email of whoever minted a service account's token; null when unknown.
|
|
10375
|
+
* Present only when listing or getting with `serviceAccount`.
|
|
10376
|
+
*/
|
|
10377
|
+
createdBy?: string | null;
|
|
10310
10378
|
};
|
|
10311
10379
|
/** @internal */
|
|
10312
10380
|
type CredentialInfo = {
|
|
@@ -10391,6 +10459,8 @@ type ThingGetManyResult = ThingGetManyResult$1;
|
|
|
10391
10459
|
/** @internal */
|
|
10392
10460
|
type ThingHeadVersionsResult = ThingHeadVersionsResult$1;
|
|
10393
10461
|
/** @internal */
|
|
10462
|
+
type ThingNamesResult = ThingNamesResult$1;
|
|
10463
|
+
/** @internal */
|
|
10394
10464
|
type CountResult = {
|
|
10395
10465
|
count: number;
|
|
10396
10466
|
/**
|
|
@@ -10760,7 +10830,7 @@ declare function sdkVersionIsBelowMinimum(version: string, minimum: string): boo
|
|
|
10760
10830
|
*/
|
|
10761
10831
|
/**
|
|
10762
10832
|
* Input for {@link WarmHubClient.access.resolve} — repos by names or durable id;
|
|
10763
|
-
* orgs by name.
|
|
10833
|
+
* orgs by name or org durable id.
|
|
10764
10834
|
* @internal
|
|
10765
10835
|
*/
|
|
10766
10836
|
type AccessResolveInput = AccessResolveInput$1;
|
|
@@ -10873,10 +10943,12 @@ declare class WarmHubClient {
|
|
|
10873
10943
|
readonly access: {
|
|
10874
10944
|
/**
|
|
10875
10945
|
* Resolve the caller's effective access for a batch of repos and/or orgs
|
|
10876
|
-
* (repos by names or durable id; orgs by name
|
|
10877
|
-
* per target so one call answers any permission via
|
|
10878
|
-
* `scopes.includes('repo:configure')`.
|
|
10879
|
-
*
|
|
10946
|
+
* (repos by names or durable id; orgs by name or org durable id). Returns
|
|
10947
|
+
* the coarse scope SET per target so one call answers any permission via
|
|
10948
|
+
* `scopes.includes(...)` — e.g. `scopes.includes('repo:configure')`.
|
|
10949
|
+
* Non-throwing for well-formed targets: `visible: false` means
|
|
10950
|
+
* not-found/not-visible; `scopes: []` means authenticated-but-no-access. A
|
|
10951
|
+
* malformed org durable id rejects the whole call as invalid input.
|
|
10880
10952
|
* Correlate results by the echoed target, not by position.
|
|
10881
10953
|
*/
|
|
10882
10954
|
resolve: (input: AccessResolveInput) => Promise<AccessResolveResult>;
|
|
@@ -11134,9 +11206,10 @@ declare class WarmHubClient {
|
|
|
11134
11206
|
*/
|
|
11135
11207
|
readonly org: {
|
|
11136
11208
|
/**
|
|
11137
|
-
* Get an organization by name.
|
|
11209
|
+
* Get an organization by name. The result carries `orgDurableId`, which
|
|
11210
|
+
* keeps identifying the org after a rename or a reuse of its old name.
|
|
11138
11211
|
*/
|
|
11139
|
-
get: (orgName: string) => Promise<
|
|
11212
|
+
get: (orgName: string) => Promise<OrgDetail>;
|
|
11140
11213
|
/**
|
|
11141
11214
|
* Return the caller's role in an organization, or `null` when the caller is not a member.
|
|
11142
11215
|
*
|
|
@@ -11243,6 +11316,66 @@ declare class WarmHubClient {
|
|
|
11243
11316
|
* Unarchive an organization.
|
|
11244
11317
|
*/
|
|
11245
11318
|
unarchive: (orgName: string) => Promise<OrgInfo>;
|
|
11319
|
+
/**
|
|
11320
|
+
* Service accounts: org-owned principals for automation, written
|
|
11321
|
+
* `{org}/{name}`. They cannot sign in and take no seat. Only owners and
|
|
11322
|
+
* admins of the org manage them; mint their tokens with
|
|
11323
|
+
* `client.token.create({ serviceAccount, ... })`.
|
|
11324
|
+
*/
|
|
11325
|
+
serviceAccounts: {
|
|
11326
|
+
/**
|
|
11327
|
+
* Create a service account with a viewer or editor role. Refused in an archived org.
|
|
11328
|
+
*/
|
|
11329
|
+
create: (input: {
|
|
11330
|
+
orgName: string;
|
|
11331
|
+
name: string;
|
|
11332
|
+
role: "viewer" | "editor";
|
|
11333
|
+
description?: string;
|
|
11334
|
+
}) => Promise<ServiceAccountInfo>;
|
|
11335
|
+
/**
|
|
11336
|
+
* List an org's service accounts. Disabled ones are included only with `includeDisabled`.
|
|
11337
|
+
*/
|
|
11338
|
+
list: (input: {
|
|
11339
|
+
orgName: string;
|
|
11340
|
+
includeDisabled?: boolean;
|
|
11341
|
+
}) => Promise<ServiceAccountInfo[]>;
|
|
11342
|
+
/**
|
|
11343
|
+
* Get one service account by name.
|
|
11344
|
+
*/
|
|
11345
|
+
get: (input: {
|
|
11346
|
+
orgName: string;
|
|
11347
|
+
name: string;
|
|
11348
|
+
}) => Promise<ServiceAccountInfo>;
|
|
11349
|
+
/**
|
|
11350
|
+
* Change a service account's role (viewer or editor). Its tokens narrow or widen at their next request.
|
|
11351
|
+
*/
|
|
11352
|
+
setRole: (input: {
|
|
11353
|
+
orgName: string;
|
|
11354
|
+
name: string;
|
|
11355
|
+
role: "viewer" | "editor";
|
|
11356
|
+
}) => Promise<ServiceAccountInfo>;
|
|
11357
|
+
/**
|
|
11358
|
+
* Disable a service account. Its tokens are rejected until it is enabled again.
|
|
11359
|
+
*/
|
|
11360
|
+
disable: (input: {
|
|
11361
|
+
orgName: string;
|
|
11362
|
+
name: string;
|
|
11363
|
+
}) => Promise<ServiceAccountInfo>;
|
|
11364
|
+
/**
|
|
11365
|
+
* Enable a disabled service account; its existing tokens work again.
|
|
11366
|
+
*/
|
|
11367
|
+
enable: (input: {
|
|
11368
|
+
orgName: string;
|
|
11369
|
+
name: string;
|
|
11370
|
+
}) => Promise<ServiceAccountInfo>;
|
|
11371
|
+
/**
|
|
11372
|
+
* Delete a service account: revokes its tokens and frees its name. Its history stays attributed to it.
|
|
11373
|
+
*/
|
|
11374
|
+
delete: (input: {
|
|
11375
|
+
orgName: string;
|
|
11376
|
+
name: string;
|
|
11377
|
+
}) => Promise<void>;
|
|
11378
|
+
};
|
|
11246
11379
|
};
|
|
11247
11380
|
/**
|
|
11248
11381
|
* Repository management surface for lifecycle operations, metadata, statistics, and content documents.
|
|
@@ -12109,6 +12242,25 @@ declare class WarmHubClient {
|
|
|
12109
12242
|
chunkSize?: number;
|
|
12110
12243
|
chunkConcurrency?: number;
|
|
12111
12244
|
}) => Promise<ThingHeadVersionsResult>;
|
|
12245
|
+
/**
|
|
12246
|
+
* Batched name lookup for durable ids — returns
|
|
12247
|
+
* `{ durableId, canonicalWref }` per id the caller can read, with NO
|
|
12248
|
+
* version or payload. It is the lookup response decoration uses; reach
|
|
12249
|
+
* for it to label durable references, and for `headVersions` when the
|
|
12250
|
+
* version matters.
|
|
12251
|
+
*
|
|
12252
|
+
* Takes bare durable Thing ids (an optional `wh:` prefix, no version
|
|
12253
|
+
* pin). Auto-chunks above the backend's 500-id transport cap; preserves
|
|
12254
|
+
* duplicates and reports unreadable or unknown ids in `missing` rather
|
|
12255
|
+
* than throwing per item.
|
|
12256
|
+
*
|
|
12257
|
+
* @param opts.chunkSize Maximum ids per backend request. Defaults to 500 and is clamped to the backend cap.
|
|
12258
|
+
* @param opts.chunkConcurrency Maximum concurrent chunk requests. Defaults to 1 and is clamped to 8.
|
|
12259
|
+
*/
|
|
12260
|
+
names: (orgName: string | undefined, repoName: string | undefined, durableIds: string[], opts?: {
|
|
12261
|
+
chunkSize?: number;
|
|
12262
|
+
chunkConcurrency?: number;
|
|
12263
|
+
}) => Promise<ThingNamesResult>;
|
|
12112
12264
|
/**
|
|
12113
12265
|
* Return version history and timeline metadata for repository records.
|
|
12114
12266
|
*
|
|
@@ -12418,6 +12570,7 @@ declare class WarmHubClient {
|
|
|
12418
12570
|
* @param input.scopes Scope entries narrowing the token's authority. Omit for full-principal authority.
|
|
12419
12571
|
* @param input.expiresAt Unix epoch milliseconds at which the token expires.
|
|
12420
12572
|
* @param input.description Human-readable description shown in token listings.
|
|
12573
|
+
* @param input.serviceAccount Mint for a service account (`{org}/{name}`) instead of yourself. Owners and admins of its org only; `scopes` is then required, and the scopes must be within both the service account's and your own access.
|
|
12421
12574
|
*/
|
|
12422
12575
|
create: (input: TokenCreateInput) => Promise<TokenResult>;
|
|
12423
12576
|
/**
|
|
@@ -12430,13 +12583,26 @@ declare class WarmHubClient {
|
|
|
12430
12583
|
includeInactive?: boolean;
|
|
12431
12584
|
}) => Promise<TokenInfo[]>;
|
|
12432
12585
|
/**
|
|
12433
|
-
*
|
|
12586
|
+
* List a service account's tokens (`{org}/{name}`), with who minted each.
|
|
12587
|
+
* Owners and admins of its org only; works while the account is disabled.
|
|
12588
|
+
*/
|
|
12589
|
+
listForServiceAccount: (serviceAccount: string, opts?: {
|
|
12590
|
+
includeInactive?: boolean;
|
|
12591
|
+
}) => Promise<TokenInfo[]>;
|
|
12592
|
+
/**
|
|
12593
|
+
* Get one personal access token by name. With `opts.serviceAccount`
|
|
12594
|
+
* (`{org}/{name}`), get one of that service account's tokens.
|
|
12434
12595
|
*/
|
|
12435
|
-
get: (name: string
|
|
12596
|
+
get: (name: string, opts?: {
|
|
12597
|
+
serviceAccount?: string;
|
|
12598
|
+
}) => Promise<TokenInfo | null>;
|
|
12436
12599
|
/**
|
|
12437
|
-
* Revoke a personal access token by name.
|
|
12600
|
+
* Revoke a personal access token by name. With `opts.serviceAccount`
|
|
12601
|
+
* (`{org}/{name}`), revoke one of that service account's tokens.
|
|
12438
12602
|
*/
|
|
12439
|
-
revoke: (name: string
|
|
12603
|
+
revoke: (name: string, opts?: {
|
|
12604
|
+
serviceAccount?: string;
|
|
12605
|
+
}) => Promise<TokenRevokeResult>;
|
|
12440
12606
|
};
|
|
12441
12607
|
/**
|
|
12442
12608
|
* Low-level stream append surface for callers that already have v2 wire operations.
|
|
@@ -12710,4 +12876,4 @@ declare class WarmHubClient {
|
|
|
12710
12876
|
private watchRepoQuery;
|
|
12711
12877
|
}
|
|
12712
12878
|
|
|
12713
|
-
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, LEGACY_WREFS_REFUSAL, 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 OperationEventReceiptV1, type OperationSource, type OperationSubmitResult, type OrgAccessResult, type OrgAuthScope, 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, type ScopeAllowedShapes, type SearchOptions, type SearchResult, type Shape, type ShapeChange, type ShapeCountsUnavailableDetails, 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 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, isRetryable, isShapeReference, isWarmHubError, normalizeWref, operationEventStreamRequestId, readRepositoryExportStream, resolveFunctionLogMode, restoreRepositoryExportSession, sanitizeErrorMessage, sdkVersionIsBelowMinimum, shapeName, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
|
|
12879
|
+
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, LEGACY_WREFS_REFUSAL, 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 OperationEventReceiptV1, 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 ShapeCountsUnavailableDetails, 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{m as AllStreamOperationsFailedError,I as CliCallVerificationError,L as DEFAULT_API_URL,j as DEFAULT_STREAM_CHUNK_SIZE,d as DEPENDENCY_FAILED,f as LEGACY_WREFS_REFUSAL,t as MAX_COMMIT_VALIDATION_ENCODED_BYTES,s as MAX_COMMIT_VALIDATION_OPERATIONS,k as MAX_STREAM_APPEND_OPERATION_COUNT,z as OperationBuilder,l as PartialStreamSubmissionError,A as RepositoryExportError,B as RepositoryExportSession,H as SDK_VERSION,i as StreamSubmissionAggregator,G as StreamingSubmissionOutcomeUnknownError,V as WarmHubClient,a as WarmHubError,c as WriteOperationError,D as applyRepositoryExportDelta,x as collectDurableTokens,w as commitValidateRequestBodyBytes,T as connectionErrorMessage,o as countStreamAppendResultStatuses,u as createCommitValidateInput,r as createKeepShapesResolver,h as createOperationEventRequestId,g as createOperationEventSubmissionId,C as createRepositoryExportSession,v as encodeCommitValidateRequestBody,y as getResponseDecorations,P as isAllStreamOperationsFailedError,S as isConnectionError,p as isDefiniteStreamAppendRejection,R as isRetryable,e as isShapeReference,Q as isWarmHubError,K as normalizeWref,E as readRepositoryExportStream,M as resolveFunctionLogMode,F as restoreRepositoryExportSession,N as sanitizeErrorMessage,U as sdkVersionIsBelowMinimum,b as shapeName,n as streamAppendResultStatus,q as submitOperationsViaStream,O as toWarmHubError,J as verifyCliCall}from'./chunk-
|
|
1
|
+
export{m as AllStreamOperationsFailedError,I as CliCallVerificationError,L as DEFAULT_API_URL,j as DEFAULT_STREAM_CHUNK_SIZE,d as DEPENDENCY_FAILED,f as LEGACY_WREFS_REFUSAL,t as MAX_COMMIT_VALIDATION_ENCODED_BYTES,s as MAX_COMMIT_VALIDATION_OPERATIONS,k as MAX_STREAM_APPEND_OPERATION_COUNT,z as OperationBuilder,l as PartialStreamSubmissionError,A as RepositoryExportError,B as RepositoryExportSession,H as SDK_VERSION,i as StreamSubmissionAggregator,G as StreamingSubmissionOutcomeUnknownError,V as WarmHubClient,a as WarmHubError,c as WriteOperationError,D as applyRepositoryExportDelta,x as collectDurableTokens,w as commitValidateRequestBodyBytes,T as connectionErrorMessage,o as countStreamAppendResultStatuses,u as createCommitValidateInput,r as createKeepShapesResolver,h as createOperationEventRequestId,g as createOperationEventSubmissionId,C as createRepositoryExportSession,v as encodeCommitValidateRequestBody,y as getResponseDecorations,P as isAllStreamOperationsFailedError,S as isConnectionError,p as isDefiniteStreamAppendRejection,R as isRetryable,e as isShapeReference,Q as isWarmHubError,K as normalizeWref,E as readRepositoryExportStream,M as resolveFunctionLogMode,F as restoreRepositoryExportSession,N as sanitizeErrorMessage,U as sdkVersionIsBelowMinimum,b as shapeName,n as streamAppendResultStatus,q as submitOperationsViaStream,O as toWarmHubError,J as verifyCliCall}from'./chunk-YVTNE3EH.js';export{fa as CHECKPOINT_CONTENT_TYPES,B as CLI_INSTALL_REPO_HEADER,C as CLI_SIGNATURE_HEADER,D as CLI_TIMESTAMP_HEADER,I as COMPONENT_INSTALL_RESULT_STATES,O as COMPONENT_SUMMARY_STATES,k as CONTENT_FIELD_LIMIT_ERROR,Q as CREDENTIAL_SCOPES,S as GLOBAL_SEARCH_RESULT_ITEM_KINDS,U as HOMEPAGE_FEATURED_ITEM_KINDS,j as MAX_CONTENT_FIELD_BYTES,y as MAX_WREFS_PER_THING_VERSION,W as ORG_AUTH_SCOPES,Z as ORG_MEMBER_STATUSES,$ as ORG_ROLES,K as REPO_AUTH_SCOPES,G as SUBSCRIBABLE_EVENT_TYPES,l as contentFieldLimitError,ga as isKnownCheckpointContentType,J as isKnownComponentInstallResultState,P as isKnownComponentSummaryState,R as isKnownCredentialScope,T as isKnownGlobalSearchResultItemKind,V as isKnownHomepageFeaturedItemKind,X as isKnownOrgAuthScope,_ as isKnownOrgMemberStatus,aa as isKnownOrgRole,L as isKnownRepoAuthScope,H as isKnownSubscribableEventType,Y as operationEventStreamRequestId,xa as validateAgainstShape}from'./chunk-OBLKVPHV.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {V}from'./chunk-
|
|
1
|
+
import {V}from'./chunk-YVTNE3EH.js';export{L as DEFAULT_API_URL,H as SDK_VERSION,V as WarmHubClient,a as WarmHubError,O as toWarmHubError}from'./chunk-YVTNE3EH.js';import'./chunk-OBLKVPHV.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 V({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