@warmhub/sdk-ts 0.99.0 → 0.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkpoint.js +1 -1
- package/dist/checkpoint.js.map +1 -1
- package/dist/chunk-5LZWCDNV.js +10 -0
- package/dist/chunk-5LZWCDNV.js.map +1 -0
- package/dist/{chunk-2E722CFI.js → chunk-JBTUW4MQ.js} +24 -24
- package/dist/chunk-JBTUW4MQ.js.map +1 -0
- package/dist/index.d.ts +32 -18
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2E722CFI.js.map +0 -1
- package/dist/chunk-2UVRVJFH.js +0 -10
- package/dist/chunk-2UVRVJFH.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,11 @@ type AccessResolveInput$1 = {
|
|
|
80
80
|
repos?: Array<{
|
|
81
81
|
orgName: string;
|
|
82
82
|
repoName: string;
|
|
83
|
+
repoDurableId?: never;
|
|
84
|
+
} | {
|
|
85
|
+
repoDurableId: string;
|
|
86
|
+
orgName?: never;
|
|
87
|
+
repoName?: never;
|
|
83
88
|
}>;
|
|
84
89
|
orgs?: Array<{
|
|
85
90
|
orgName: string;
|
|
@@ -87,12 +92,19 @@ type AccessResolveInput$1 = {
|
|
|
87
92
|
};
|
|
88
93
|
type AccessResolveResult$1 = {
|
|
89
94
|
repos: Array<{
|
|
95
|
+
visible: boolean;
|
|
96
|
+
scopes: Array<string>;
|
|
97
|
+
allowedMatches?: Array<string>;
|
|
90
98
|
orgName: string;
|
|
91
99
|
repoName: string;
|
|
100
|
+
repoDurableId?: string;
|
|
101
|
+
} | {
|
|
92
102
|
visible: boolean;
|
|
93
103
|
scopes: Array<string>;
|
|
94
104
|
allowedMatches?: Array<string>;
|
|
95
|
-
|
|
105
|
+
orgName?: never;
|
|
106
|
+
repoName?: never;
|
|
107
|
+
repoDurableId: string;
|
|
96
108
|
}>;
|
|
97
109
|
orgs: Array<{
|
|
98
110
|
orgName: string;
|
|
@@ -4974,7 +4986,7 @@ type RepositoryCheckpointAccess$1 = {
|
|
|
4974
4986
|
type RepositoryCheckpointStatus$1 = {
|
|
4975
4987
|
checkpointId: string;
|
|
4976
4988
|
repoSeq: number;
|
|
4977
|
-
contractVersion:
|
|
4989
|
+
contractVersion: 2;
|
|
4978
4990
|
attemptsStarted: number;
|
|
4979
4991
|
runAgeMs: number;
|
|
4980
4992
|
createdAt: number;
|
|
@@ -4985,7 +4997,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
4985
4997
|
} | {
|
|
4986
4998
|
checkpointId: string;
|
|
4987
4999
|
repoSeq: number;
|
|
4988
|
-
contractVersion:
|
|
5000
|
+
contractVersion: 2;
|
|
4989
5001
|
attemptsStarted: number;
|
|
4990
5002
|
runAgeMs: number;
|
|
4991
5003
|
createdAt: number;
|
|
@@ -4996,7 +5008,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
4996
5008
|
} | {
|
|
4997
5009
|
checkpointId: string;
|
|
4998
5010
|
repoSeq: number;
|
|
4999
|
-
contractVersion:
|
|
5011
|
+
contractVersion: 2;
|
|
5000
5012
|
attemptsStarted: number;
|
|
5001
5013
|
runAgeMs: number;
|
|
5002
5014
|
createdAt: number;
|
|
@@ -5018,7 +5030,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
5018
5030
|
} | {
|
|
5019
5031
|
checkpointId: string;
|
|
5020
5032
|
repoSeq: number;
|
|
5021
|
-
contractVersion:
|
|
5033
|
+
contractVersion: 2;
|
|
5022
5034
|
attemptsStarted: number;
|
|
5023
5035
|
runAgeMs: number;
|
|
5024
5036
|
createdAt: number;
|
|
@@ -5031,7 +5043,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
5031
5043
|
} | {
|
|
5032
5044
|
checkpointId: string;
|
|
5033
5045
|
repoSeq: number;
|
|
5034
|
-
contractVersion:
|
|
5046
|
+
contractVersion: 2;
|
|
5035
5047
|
attemptsStarted: number;
|
|
5036
5048
|
runAgeMs: number;
|
|
5037
5049
|
createdAt: number;
|
|
@@ -5044,7 +5056,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
5044
5056
|
} | {
|
|
5045
5057
|
checkpointId: string;
|
|
5046
5058
|
repoSeq: number;
|
|
5047
|
-
contractVersion:
|
|
5059
|
+
contractVersion: 2;
|
|
5048
5060
|
attemptsStarted: number;
|
|
5049
5061
|
runAgeMs: number;
|
|
5050
5062
|
createdAt: number;
|
|
@@ -5057,7 +5069,7 @@ type RepositoryCheckpointStatus$1 = {
|
|
|
5057
5069
|
} | {
|
|
5058
5070
|
checkpointId: string;
|
|
5059
5071
|
repoSeq: number;
|
|
5060
|
-
contractVersion:
|
|
5072
|
+
contractVersion: 2;
|
|
5061
5073
|
attemptsStarted: number;
|
|
5062
5074
|
runAgeMs: number;
|
|
5063
5075
|
createdAt: number;
|
|
@@ -5511,6 +5523,12 @@ type SubscribableEventType = (typeof SUBSCRIBABLE_EVENT_TYPES)[number];
|
|
|
5511
5523
|
declare const ORG_SCOPED_EVENT_TYPES: readonly ["org.renamed", "org.member_added", "org.repo_created", "org.repo_published"];
|
|
5512
5524
|
type OrgScopedEventType = (typeof ORG_SCOPED_EVENT_TYPES)[number];
|
|
5513
5525
|
|
|
5526
|
+
/**
|
|
5527
|
+
* Derive the ratified UUIDv5 request identity for one stream chunk.
|
|
5528
|
+
* @see https://docs.warmhub.ai/sdk-reference/functions/operationeventstreamrequestid/
|
|
5529
|
+
*/
|
|
5530
|
+
declare function operationEventStreamRequestId(submissionId: string, chunkOrdinal: number): string;
|
|
5531
|
+
|
|
5514
5532
|
/**
|
|
5515
5533
|
* Warning details for input fields that no shape in the effective set declares.
|
|
5516
5534
|
* @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
|
|
@@ -6867,11 +6885,6 @@ declare function createOperationEventSubmissionId(): string;
|
|
|
6867
6885
|
* @see https://docs.warmhub.ai/sdk-reference/variables/createoperationeventrequestid/
|
|
6868
6886
|
*/
|
|
6869
6887
|
declare const createOperationEventRequestId: typeof createOperationEventSubmissionId;
|
|
6870
|
-
/**
|
|
6871
|
-
* Derive the ratified UUIDv5 request identity for one stream chunk.
|
|
6872
|
-
* @see https://docs.warmhub.ai/sdk-reference/functions/operationeventstreamrequestid/
|
|
6873
|
-
*/
|
|
6874
|
-
declare function operationEventStreamRequestId(submissionId: string, chunkOrdinal: number): string;
|
|
6875
6888
|
|
|
6876
6889
|
/**
|
|
6877
6890
|
* Version string for the installed SDK package.
|
|
@@ -8520,12 +8533,13 @@ declare function sdkVersionIsBelowMinimum(version: string, minimum: string): boo
|
|
|
8520
8533
|
* @see https://docs.warmhub.ai/sdk/client/
|
|
8521
8534
|
*/
|
|
8522
8535
|
/**
|
|
8523
|
-
* Input for {@link WarmHubClient.access.resolve} — repos
|
|
8536
|
+
* Input for {@link WarmHubClient.access.resolve} — repos by names or durable id;
|
|
8537
|
+
* orgs by name.
|
|
8524
8538
|
* @internal
|
|
8525
8539
|
*/
|
|
8526
8540
|
type AccessResolveInput = AccessResolveInput$1;
|
|
8527
8541
|
/**
|
|
8528
|
-
* Batch effective-access result; correlate by the echoed
|
|
8542
|
+
* Batch effective-access result; correlate by the echoed repo/org target.
|
|
8529
8543
|
* @internal
|
|
8530
8544
|
*/
|
|
8531
8545
|
type AccessResolveResult = AccessResolveResult$1;
|
|
@@ -8613,11 +8627,11 @@ declare class WarmHubClient {
|
|
|
8613
8627
|
readonly access: {
|
|
8614
8628
|
/**
|
|
8615
8629
|
* Resolve the caller's effective access for a batch of repos and/or orgs
|
|
8616
|
-
* (
|
|
8617
|
-
* answers any permission via `scopes.includes(...)` — e.g.
|
|
8630
|
+
* (repos by names or durable id; orgs by name). Returns the coarse scope SET
|
|
8631
|
+
* per target so one call answers any permission via `scopes.includes(...)` — e.g.
|
|
8618
8632
|
* `scopes.includes('repo:configure')`. Non-throwing: `visible: false` means
|
|
8619
8633
|
* not-found/not-visible; `scopes: []` means authenticated-but-no-access.
|
|
8620
|
-
* Correlate results by the echoed
|
|
8634
|
+
* Correlate results by the echoed target, not by position.
|
|
8621
8635
|
*/
|
|
8622
8636
|
resolve: (input: AccessResolveInput) => Promise<AccessResolveResult>;
|
|
8623
8637
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{n as AllStreamOperationsFailedError,u as CliCallVerificationError,y as DEFAULT_API_URL,k as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,l as MAX_STREAM_APPEND_OPERATION_COUNT,w as OperationBuilder,m as PartialStreamSubmissionError,t as SDK_VERSION,h as StreamSubmissionAggregator,s as StreamingSubmissionOutcomeUnknownError,I as WarmHubClient,B as WarmHubError,f as collectDurableTokens,e as commitValidateRequestBodyBytes,G as connectionErrorMessage,p as countStreamAppendResultStatuses,c as createCommitValidateInput,j as createOperationEventRequestId,i as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,g as getResponseDecorations,F as isConnectionError,q as isDefiniteStreamAppendRejection,E as isRetryable,D as isWarmHubError,x as normalizeWref,z as resolveFunctionLogMode,A as sanitizeErrorMessage,H as sdkVersionIsBelowMinimum,o as streamAppendResultStatus,r as submitOperationsViaStream,C as toWarmHubError,v as verifyCliCall}from'./chunk-5LZWCDNV.js';export{n as CLI_INSTALL_REPO_HEADER,o as CLI_SIGNATURE_HEADER,p as CLI_TIMESTAMP_HEADER,y as CONTENT_FIELD_LIMIT_ERROR,x as MAX_CONTENT_FIELD_BYTES,A as ORG_AUTH_SCOPES,s as REPO_AUTH_SCOPES,z as contentFieldLimitError,B as isKnownOrgAuthScope,t as isKnownRepoAuthScope,C as operationEventStreamRequestId,R as validateAgainstShape}from'./chunk-JBTUW4MQ.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {I}from'./chunk-5LZWCDNV.js';export{y as DEFAULT_API_URL,t as SDK_VERSION,I as WarmHubClient,B as WarmHubError,C as toWarmHubError}from'./chunk-5LZWCDNV.js';import'./chunk-JBTUW4MQ.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=useMemo(()=>new I({apiUrl:e,accessToken:async()=>await o.getAccessToken()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,o.getAccessToken,n,u,r]);return jsx(p.Provider,{value:i,children:jsx(g,{auth:o,client:i,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(c=>{console.error("auth.sync failed:",c),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