@terminal3/t3n-sdk 4.28.0 → 4.29.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/cli/index.js +1 -1
- package/dist/index.d.ts +94 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4696,6 +4696,48 @@ interface ContractRegisterResult {
|
|
|
4696
4696
|
/** Stable monotonic numeric contract id assigned at registration time. */
|
|
4697
4697
|
contract_id: number;
|
|
4698
4698
|
}
|
|
4699
|
+
/** Lifecycle status of a registered contract, mirroring the tenant contract's
|
|
4700
|
+
* `ContractStatus` enum. */
|
|
4701
|
+
type ContractLifecycleStatus = "active" | "disabled";
|
|
4702
|
+
/**
|
|
4703
|
+
* Descriptor facets on a {@link DetailedContract} row. A `null` `descriptor`
|
|
4704
|
+
* on the enclosing row means *no descriptor is published*; a present value
|
|
4705
|
+
* with an empty `summary` means a descriptor exists but carries no summary
|
|
4706
|
+
* text — the two are deliberately distinguishable.
|
|
4707
|
+
*/
|
|
4708
|
+
interface ContractDescriptorFacets {
|
|
4709
|
+
/** Contract-level summary from the descriptor (empty string when the
|
|
4710
|
+
* published descriptor has no `summary` field). */
|
|
4711
|
+
summary: string;
|
|
4712
|
+
/** Contract-level tags from the descriptor (empty when absent). */
|
|
4713
|
+
tags: string[];
|
|
4714
|
+
}
|
|
4715
|
+
/**
|
|
4716
|
+
* One contract in a {@link ContractListDetailedPage}, mirroring the tenant
|
|
4717
|
+
* contract's `contract-list-detailed` `DetailedContract` wire shape.
|
|
4718
|
+
*/
|
|
4719
|
+
interface DetailedContract {
|
|
4720
|
+
/** Canonical `z:<tid>:<tail>` name. */
|
|
4721
|
+
name: string;
|
|
4722
|
+
/** Trailing tail segment (`z:<tid>:payroll` → `payroll`) for display. */
|
|
4723
|
+
short_name: string;
|
|
4724
|
+
/** Current registered version. */
|
|
4725
|
+
version: string;
|
|
4726
|
+
/** Lifecycle status. */
|
|
4727
|
+
status: ContractLifecycleStatus;
|
|
4728
|
+
/** Descriptor facets, or `null` when no descriptor is published for the
|
|
4729
|
+
* current version. */
|
|
4730
|
+
descriptor: ContractDescriptorFacets | null;
|
|
4731
|
+
}
|
|
4732
|
+
/**
|
|
4733
|
+
* One page of {@link TenantContractsNamespace.listDetailed}. `next` is a cursor
|
|
4734
|
+
* (a canonical contract name) to pass back as `after` for the following page,
|
|
4735
|
+
* or `null` at the end of the inventory.
|
|
4736
|
+
*/
|
|
4737
|
+
interface ContractListDetailedPage {
|
|
4738
|
+
contracts: DetailedContract[];
|
|
4739
|
+
next: string | null;
|
|
4740
|
+
}
|
|
4699
4741
|
|
|
4700
4742
|
type JsonObject = Record<string, unknown>;
|
|
4701
4743
|
interface TenantExecutionSession {
|
|
@@ -4743,6 +4785,18 @@ interface TenantTargetOptions {
|
|
|
4743
4785
|
*/
|
|
4744
4786
|
tenantTarget?: string;
|
|
4745
4787
|
}
|
|
4788
|
+
/**
|
|
4789
|
+
* Options for {@link TenantContractsNamespace.listDetailed} — a tenant target
|
|
4790
|
+
* plus cursor pagination.
|
|
4791
|
+
*/
|
|
4792
|
+
interface ContractListDetailedOptions extends TenantTargetOptions {
|
|
4793
|
+
/** Page cursor: the previous page's `next` (a canonical contract name).
|
|
4794
|
+
* Omit for the first page. */
|
|
4795
|
+
after?: string;
|
|
4796
|
+
/** Max contracts in the page. Omit for the server default; values above the
|
|
4797
|
+
* server ceiling are clamped down. */
|
|
4798
|
+
limit?: number;
|
|
4799
|
+
}
|
|
4746
4800
|
/**
|
|
4747
4801
|
* Options for {@link TenantClient.admitForOrg}.
|
|
4748
4802
|
*/
|
|
@@ -4831,6 +4885,45 @@ declare class TenantContractsNamespace {
|
|
|
4831
4885
|
* without one is not dispatchable through it.
|
|
4832
4886
|
*/
|
|
4833
4887
|
setDescriptor(input: ContractSetDescriptorInput, opts?: TenantTargetOptions): Promise<unknown>;
|
|
4888
|
+
/**
|
|
4889
|
+
* List the canonical names of every contract registered under the resolved
|
|
4890
|
+
* tenant — the org-admin inventory view.
|
|
4891
|
+
*
|
|
4892
|
+
* Dispatches `tee:tenant/contracts::contract-list`. Access is gated node-side
|
|
4893
|
+
* by `resolve_tenant_did`: for an org-owned tenant the authenticated DID must
|
|
4894
|
+
* be in the org's admin set (a non-admin gets a hard `OrgAdminRequired` error,
|
|
4895
|
+
* never a masked-empty result); for an individual tenant the caller must be
|
|
4896
|
+
* the tenant itself.
|
|
4897
|
+
*
|
|
4898
|
+
* Omit `tenantTarget` for individual self-management (the node resolves the
|
|
4899
|
+
* target from the session DID); supply an org's 40-hex tid (or
|
|
4900
|
+
* `did:t3n:<tid>`) to read an org-owned tenant's inventory as one of its
|
|
4901
|
+
* admins.
|
|
4902
|
+
*
|
|
4903
|
+
* Returns the canonical `z:<tid>:<tail>` name of each live contract, one entry
|
|
4904
|
+
* per name (version history collapsed to the `:current` name), lexicographically
|
|
4905
|
+
* ordered. Names only — no descriptor or summary is carried.
|
|
4906
|
+
*/
|
|
4907
|
+
list(opts?: TenantTargetOptions): Promise<string[]>;
|
|
4908
|
+
/**
|
|
4909
|
+
* List the resolved tenant's contracts with per-contract detail — current
|
|
4910
|
+
* version, lifecycle status, and descriptor facets — one page at a time.
|
|
4911
|
+
*
|
|
4912
|
+
* Dispatches `tee:tenant/contracts::contract-list-detailed`, gated node-side
|
|
4913
|
+
* by the same `resolve_tenant_did` admin check as {@link list}. Where `list`
|
|
4914
|
+
* returns names only, this hydrates each row for an inventory view: `status`
|
|
4915
|
+
* reflects `contract-enable` / `contract-disable`, and `descriptor` carries
|
|
4916
|
+
* the published descriptor's `{summary, tags}` facets — or `null` when no
|
|
4917
|
+
* descriptor has been published, which is deliberately distinct from a
|
|
4918
|
+
* descriptor whose `summary` is empty.
|
|
4919
|
+
*
|
|
4920
|
+
* Cursor-paged: pass the previous page's `next` back as `opts.after`; a
|
|
4921
|
+
* `null` `next` marks the end of the inventory. `opts.limit` caps the page
|
|
4922
|
+
* (the server applies a default and a ceiling); omit for the default. Omit
|
|
4923
|
+
* `tenantTarget` for individual self-management, or supply an org's tid to
|
|
4924
|
+
* read an org-owned tenant's inventory as one of its admins.
|
|
4925
|
+
*/
|
|
4926
|
+
listDetailed(opts?: ContractListDetailedOptions): Promise<ContractListDetailedPage>;
|
|
4834
4927
|
disable(tail: string, opts?: TenantTargetOptions): Promise<unknown>;
|
|
4835
4928
|
enable(tail: string, opts?: TenantTargetOptions): Promise<unknown>;
|
|
4836
4929
|
unregister(tail: string, opts?: TenantTargetOptions): Promise<unknown>;
|
|
@@ -4939,4 +5032,4 @@ declare function validateTail(tail: string): string;
|
|
|
4939
5032
|
declare function canonicalTenantName(tenantDid: string, tail: string): string;
|
|
4940
5033
|
|
|
4941
5034
|
export { AGENT_CARDS_SCOPE, AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_ENVIRONMENT, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, HandshakeError, HttpTransport, InvokeError, KycStatusTimeoutError, LogLevel, MockTransport, NODE_URLS, OrgDataClient, OtpRateLimitedError, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, SessionUsageReportClient, T3nClient, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, WasmError, WireEncodingError, Z_PAYROLL_AUDIT_READ_FUNCTIONS, Z_PAYROLL_RUN_FUNCTIONS, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, buildSecretWriteArgs, bytesToString, canonicalTenantName, clearKeyCache, clearManifestVersionFloor, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, createUsageReportClientFromSession, createWorkloadAuthInput, decodeWasmErrorMessage, deriveAgentCardEntryId, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, fetchTrustedManifest, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, invoke, isAgentCardResponse, isDataGetResponse, isDataListResponse, isListAgentsResponse, isMutationResponse, isObject, isOrgAdminStatus, isOrgContractGrants, isOrgPolicyMeta, isOrgPolicyView, isOrgUsageReport, isOrgWriters, isRoleAssignmentsResponse, isRoleGetResponse, isSecretListResponse, isSecretRecord, isSecretView, isUnsafeTrustServer, loadConfig, loadWasmComponent, manifestToTrustAnchor, maskKeyMaterial, mergeAgentAuthEntries, mergeDiscoverDids, metamask_get_address, metamask_sign, parseAgentAuthGet, parseAgentAuthPolicy, parseContractResponse, redactSecrets, redactSecretsFromJson, requestToWire, setEnvironment, setGlobalLogLevel, setNodeUrl, stringToBytes, tenantDidHex, toAgentAuthUpdateWire, toBaseUnits, validateConfig, validateTail, verifyDkgAttestation, verifyManifestSignature, verifyTdxQuote };
|
|
4942
|
-
export type { ActivityCallerType, ActivityEntry, ActivityOutcome, ActivityReport, AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthPolicy, AgentAuthScriptGrant, AgentAuthUpdateInput, AgentCardRefInput, AgentCardResponse, AgentCardSetInput, AgentSummary, AssignRolesInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractExecuteInput, ContractKind, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, ContractSetDescriptorInput, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DelegationGrantKind, DelegationGrantRef, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, FetchTrustedManifestOptions, GetActivityLogOptions, GetUsageOptions, GrantCheckParams, GrantCheckResult, GranteeInput, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, InvokeOptions, InvokeRequest, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, ListAgentsInput, ListAgentsResponse, ListContractsParams, ListContractsResult, ListContractsScope, ListedContract, Logger, MapCreateInput, MapLifecycleStatus, MapResponse, MapUpdateInput, MapVisibility, MutationResponse, OidcAuthInput, OidcCredentials, OrgAdminStatus, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgUsageReport, OrgUsageReportInput, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, PurgeOrgInput, QuoteVerifyResult, ReaderSet, RemoveMemberGrantsInput, RoleAssignments, RoleAssignmentsResponse, RoleDefinition, RoleGetResponse, RoleGrant, RoleIdInput, SdkConfig, SecretKind, SecretListInput, SecretListResponse, SecretNameInput, SecretRecord, SecretSetValueInput, SecretView, SecretWriteInput, SessionCrypto, SessionId, SetGrantsInput, SetRoleInput, SetWritersInput, SignedTrustManifest, StringEncoding, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantContractSetDescriptorInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, TrustAnchor, TrustAnchorOrUnsafe, TrustManifestPayload, UnassignRolesInput, UnsafeTrustServer, UpdateMetaInput, UsageEntry, UsagePage, UsageReportSignature, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WireBlock, WorkloadAuthInput, WriteDataInput, WriterSet, WritersGetInput };
|
|
5035
|
+
export type { ActivityCallerType, ActivityEntry, ActivityOutcome, ActivityReport, AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthPolicy, AgentAuthScriptGrant, AgentAuthUpdateInput, AgentCardRefInput, AgentCardResponse, AgentCardSetInput, AgentSummary, AssignRolesInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractDescriptorFacets, ContractExecuteInput, ContractKind, ContractLifecycleStatus, ContractListDetailedOptions, ContractListDetailedPage, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, ContractSetDescriptorInput, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DelegationGrantKind, DelegationGrantRef, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, DetailedContract, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, FetchTrustedManifestOptions, GetActivityLogOptions, GetUsageOptions, GrantCheckParams, GrantCheckResult, GranteeInput, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, InvokeOptions, InvokeRequest, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, ListAgentsInput, ListAgentsResponse, ListContractsParams, ListContractsResult, ListContractsScope, ListedContract, Logger, MapCreateInput, MapLifecycleStatus, MapResponse, MapUpdateInput, MapVisibility, MutationResponse, OidcAuthInput, OidcCredentials, OrgAdminStatus, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgUsageReport, OrgUsageReportInput, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, PurgeOrgInput, QuoteVerifyResult, ReaderSet, RemoveMemberGrantsInput, RoleAssignments, RoleAssignmentsResponse, RoleDefinition, RoleGetResponse, RoleGrant, RoleIdInput, SdkConfig, SecretKind, SecretListInput, SecretListResponse, SecretNameInput, SecretRecord, SecretSetValueInput, SecretView, SecretWriteInput, SessionCrypto, SessionId, SetGrantsInput, SetRoleInput, SetWritersInput, SignedTrustManifest, StringEncoding, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantContractSetDescriptorInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, TrustAnchor, TrustAnchorOrUnsafe, TrustManifestPayload, UnassignRolesInput, UnsafeTrustServer, UpdateMetaInput, UsageEntry, UsagePage, UsageReportSignature, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WireBlock, WorkloadAuthInput, WriteDataInput, WriterSet, WritersGetInput };
|